Browse Source

feat: mail springdoc

xingyu 2 years ago
parent
commit
edbbb1a50a
19 changed files with 120 additions and 144 deletions
  1. 12 13
      yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/mail/MailAccountController.java
  2. 7 12
      yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/mail/MailLogController.java
  3. 13 14
      yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/mail/MailTemplateController.java
  4. 7 7
      yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/mail/vo/account/MailAccountBaseVO.java
  5. 2 5
      yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/mail/vo/account/MailAccountCreateReqVO.java
  6. 4 5
      yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/mail/vo/account/MailAccountPageReqVO.java
  7. 4 5
      yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/mail/vo/account/MailAccountRespVO.java
  8. 4 5
      yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/mail/vo/account/MailAccountSimpleRespVO.java
  9. 3 4
      yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/mail/vo/account/MailAccountUpdateReqVO.java
  10. 16 18
      yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/mail/vo/log/MailLogBaseVO.java
  11. 9 11
      yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/mail/vo/log/MailLogPageReqVO.java
  12. 4 4
      yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/mail/vo/log/MailLogRespVO.java
  13. 9 10
      yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/mail/vo/template/MailTemplateBaseVO.java
  14. 2 2
      yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/mail/vo/template/MailTemplateCreateReqVO.java
  15. 7 8
      yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/mail/vo/template/MailTemplatePageReqVO.java
  16. 5 6
      yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/mail/vo/template/MailTemplateRespVO.java
  17. 5 6
      yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/mail/vo/template/MailTemplateSendReqVO.java
  18. 4 5
      yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/mail/vo/template/MailTemplateSimpleRespVO.java
  19. 3 4
      yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/mail/vo/template/MailTemplateUpdateReqVO.java

+ 12 - 13
yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/mail/MailAccountController.java

@@ -7,20 +7,19 @@ import cn.iocoder.yudao.module.system.controller.admin.mail.vo.account.*;
 import cn.iocoder.yudao.module.system.convert.mail.MailAccountConvert;
 import cn.iocoder.yudao.module.system.dal.dataobject.mail.MailAccountDO;
 import cn.iocoder.yudao.module.system.service.mail.MailAccountService;
-import io.swagger.annotations.Api;
-import io.swagger.annotations.ApiImplicitParam;
-import io.swagger.annotations.ApiOperation;
+import io.swagger.v3.oas.annotations.Operation;
+import io.swagger.v3.oas.annotations.Parameter;
+import io.swagger.v3.oas.annotations.tags.Tag;
 import org.springframework.security.access.prepost.PreAuthorize;
 import org.springframework.web.bind.annotation.*;
 
 import javax.annotation.Resource;
 import javax.validation.Valid;
-import java.util.Comparator;
 import java.util.List;
 
 import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success;
 
-@Api(tags = "管理后台 - 邮箱账号")
+@Tag(name = "管理后台 - 邮箱账号")
 @RestController
 @RequestMapping("/system/mail-account")
 public class MailAccountController {
@@ -29,14 +28,14 @@ public class MailAccountController {
     private MailAccountService mailAccountService;
 
     @PostMapping("/create")
-    @ApiOperation("创建邮箱账号")
+    @Operation(summary = "创建邮箱账号")
     @PreAuthorize("@ss.hasPermission('system:mail-account:create')")
     public CommonResult<Long> createMailAccount(@Valid @RequestBody MailAccountCreateReqVO createReqVO) {
         return success(mailAccountService.createMailAccount(createReqVO));
     }
 
     @PutMapping("/update")
-    @ApiOperation("修改邮箱账号")
+    @Operation(summary = "修改邮箱账号")
     @PreAuthorize("@ss.hasPermission('system:mail-account:update')")
     public CommonResult<Boolean> updateMailAccount(@Valid @RequestBody MailAccountUpdateReqVO updateReqVO) {
         mailAccountService.updateMailAccount(updateReqVO);
@@ -44,8 +43,8 @@ public class MailAccountController {
     }
 
     @DeleteMapping("/delete")
-    @ApiOperation("删除邮箱账号")
-    @ApiImplicitParam(name = "id", value = "编号", required = true, dataTypeClass = Long.class)
+    @Operation(summary = "删除邮箱账号")
+    @Parameter(name = "id", description = "编号", required = true)
     @PreAuthorize("@ss.hasPermission('system:mail-account:delete')")
     public CommonResult<Boolean> deleteMailAccount(@RequestParam Long id) {
         mailAccountService.deleteMailAccount(id);
@@ -53,8 +52,8 @@ public class MailAccountController {
     }
 
     @GetMapping("/get")
-    @ApiOperation("获得邮箱账号")
-    @ApiImplicitParam(name = "id", value = "编号", required = true, example = "1024", dataTypeClass = Long.class)
+    @Operation(summary = "获得邮箱账号")
+    @Parameter(name = "id", description = "编号", required = true, example = "1024")
     @PreAuthorize("@ss.hasPermission('system:mail-account:get')")
     public CommonResult<MailAccountRespVO> getMailAccount(@RequestParam("id") Long id) {
         MailAccountDO mailAccountDO = mailAccountService.getMailAccount(id);
@@ -62,7 +61,7 @@ public class MailAccountController {
     }
 
     @GetMapping("/page")
-    @ApiOperation("获得邮箱账号分页")
+    @Operation(summary = "获得邮箱账号分页")
     @PreAuthorize("@ss.hasPermission('system:mail-account:query')")
     public CommonResult<PageResult<MailAccountBaseVO>> getMailAccountPage(@Valid MailAccountPageReqVO pageReqVO) {
         PageResult<MailAccountDO> pageResult = mailAccountService.getMailAccountPage(pageReqVO);
@@ -70,7 +69,7 @@ public class MailAccountController {
     }
 
     @GetMapping("/list-all-simple")
-    @ApiOperation(value = "获得邮箱账号精简列表")
+    @Operation(summary = "获得邮箱账号精简列表")
     public CommonResult<List<MailAccountSimpleRespVO>> getSimpleMailAccountList() {
         List<MailAccountDO> list = mailAccountService.getMailAccountList();
         return success(MailAccountConvert.INSTANCE.convertList02(list));

+ 7 - 12
yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/mail/MailLogController.java

@@ -1,19 +1,15 @@
 package cn.iocoder.yudao.module.system.controller.admin.mail;
 
-
 import cn.iocoder.yudao.framework.common.pojo.CommonResult;
 import cn.iocoder.yudao.framework.common.pojo.PageResult;
 import cn.iocoder.yudao.module.system.controller.admin.mail.vo.log.MailLogPageReqVO;
 import cn.iocoder.yudao.module.system.controller.admin.mail.vo.log.MailLogRespVO;
-import cn.iocoder.yudao.module.system.controller.admin.mail.vo.template.MailTemplateRespVO;
 import cn.iocoder.yudao.module.system.convert.mail.MailLogConvert;
-import cn.iocoder.yudao.module.system.convert.mail.MailTemplateConvert;
 import cn.iocoder.yudao.module.system.dal.dataobject.mail.MailLogDO;
-import cn.iocoder.yudao.module.system.dal.dataobject.mail.MailTemplateDO;
 import cn.iocoder.yudao.module.system.service.mail.MailLogService;
-import io.swagger.annotations.Api;
-import io.swagger.annotations.ApiImplicitParam;
-import io.swagger.annotations.ApiOperation;
+import io.swagger.v3.oas.annotations.Operation;
+import io.swagger.v3.oas.annotations.Parameter;
+import io.swagger.v3.oas.annotations.tags.Tag;
 import org.springframework.security.access.prepost.PreAuthorize;
 import org.springframework.web.bind.annotation.GetMapping;
 import org.springframework.web.bind.annotation.RequestMapping;
@@ -25,8 +21,7 @@ import javax.validation.Valid;
 
 import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success;
 
-
-@Api(tags = "管理后台 - 邮件日志")
+@Tag(name = "管理后台 - 邮件日志")
 @RestController
 @RequestMapping("/system/mail-log")
 public class MailLogController {
@@ -35,7 +30,7 @@ public class MailLogController {
     private MailLogService mailLogService;
 
     @GetMapping("/page")
-    @ApiOperation("获得邮箱日志分页")
+    @Operation(summary = "获得邮箱日志分页")
     @PreAuthorize("@ss.hasPermission('system:mail-log:query')")
     public CommonResult<PageResult<MailLogRespVO>> getMailLogPage(@Valid MailLogPageReqVO pageVO) {
         PageResult<MailLogDO> pageResult = mailLogService.getMailLogPage(pageVO);
@@ -43,8 +38,8 @@ public class MailLogController {
     }
 
     @GetMapping("/get")
-    @ApiOperation("获得邮箱日志")
-    @ApiImplicitParam(name = "id", value = "编号", required = true, example = "1024", dataTypeClass = Long.class)
+    @Operation(summary = "获得邮箱日志")
+    @Parameter(name = "id", description = "编号", required = true, example = "1024")
     @PreAuthorize("@ss.hasPermission('system:mail-log:query')")
     public CommonResult<MailLogRespVO> getMailTemplate(@RequestParam("id") Long id) {
         MailLogDO mailLogDO = mailLogService.getMailLog(id);

+ 13 - 14
yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/mail/MailTemplateController.java

@@ -3,14 +3,13 @@ package cn.iocoder.yudao.module.system.controller.admin.mail;
 import cn.iocoder.yudao.framework.common.pojo.CommonResult;
 import cn.iocoder.yudao.framework.common.pojo.PageResult;
 import cn.iocoder.yudao.module.system.controller.admin.mail.vo.template.*;
-import cn.iocoder.yudao.module.system.controller.admin.sms.vo.template.SmsTemplateSendReqVO;
 import cn.iocoder.yudao.module.system.convert.mail.MailTemplateConvert;
 import cn.iocoder.yudao.module.system.dal.dataobject.mail.MailTemplateDO;
 import cn.iocoder.yudao.module.system.service.mail.MailSendService;
 import cn.iocoder.yudao.module.system.service.mail.MailTemplateService;
-import io.swagger.annotations.Api;
-import io.swagger.annotations.ApiImplicitParam;
-import io.swagger.annotations.ApiOperation;
+import io.swagger.v3.oas.annotations.Operation;
+import io.swagger.v3.oas.annotations.Parameter;
+import io.swagger.v3.oas.annotations.tags.Tag;
 import org.springframework.security.access.prepost.PreAuthorize;
 import org.springframework.web.bind.annotation.*;
 
@@ -20,7 +19,7 @@ import java.util.List;
 
 import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success;
 
-@Api(tags = "管理后台 - 邮件模版")
+@Tag(name = "管理后台 - 邮件模版")
 @RestController
 @RequestMapping("/system/mail-template")
 public class MailTemplateController {
@@ -31,14 +30,14 @@ public class MailTemplateController {
     private MailSendService mailSendService;
 
     @PostMapping("/create")
-    @ApiOperation("创建邮件模版")
+    @Operation(summary = "创建邮件模版")
     @PreAuthorize("@ss.hasPermission('system:mail-template:create')")
     public CommonResult<Long> createMailTemplate(@Valid @RequestBody MailTemplateCreateReqVO createReqVO){
         return success(mailTempleService.createMailTemplate(createReqVO));
     }
 
     @PutMapping("/update")
-    @ApiOperation("修改邮件模版")
+    @Operation(summary = "修改邮件模版")
     @PreAuthorize("@ss.hasPermission('system:mail-template:update')")
     public CommonResult<Boolean> updateMailTemplate(@Valid @RequestBody MailTemplateUpdateReqVO updateReqVO){
         mailTempleService.updateMailTemplate(updateReqVO);
@@ -46,8 +45,8 @@ public class MailTemplateController {
     }
 
     @DeleteMapping("/delete")
-    @ApiOperation("删除邮件模版")
-    @ApiImplicitParam(name = "id", value = "编号", required = true, example = "1024", dataTypeClass = Long.class)
+    @Operation(summary = "删除邮件模版")
+    @Parameter(name = "id", description = "编号", required = true, example = "1024")
     @PreAuthorize("@ss.hasPermission('system:mail-template:delete')")
     public CommonResult<Boolean> deleteMailTemplate(@RequestParam("id") Long id) {
         mailTempleService.deleteMailTemplate(id);
@@ -55,8 +54,8 @@ public class MailTemplateController {
     }
 
     @GetMapping("/get")
-    @ApiOperation("获得邮件模版")
-    @ApiImplicitParam(name = "id", value = "编号", required = true, example = "1024", dataTypeClass = Long.class)
+    @Operation(summary = "获得邮件模版")
+    @Parameter(name = "id", description = "编号", required = true, example = "1024")
     @PreAuthorize("@ss.hasPermission('system:mail-template:get')")
     public CommonResult<MailTemplateRespVO> getMailTemplate(@RequestParam("id") Long id) {
         MailTemplateDO mailTemplateDO = mailTempleService.getMailTemplate(id);
@@ -64,7 +63,7 @@ public class MailTemplateController {
     }
 
     @GetMapping("/page")
-    @ApiOperation("获得邮件模版分页")
+    @Operation(summary = "获得邮件模版分页")
     @PreAuthorize("@ss.hasPermission('system:mail-template:query')")
     public CommonResult<PageResult<MailTemplateRespVO>> getMailTemplatePage(@Valid MailTemplatePageReqVO pageReqVO) {
         PageResult<MailTemplateDO> pageResult = mailTempleService.getMailTemplatePage(pageReqVO);
@@ -72,14 +71,14 @@ public class MailTemplateController {
     }
 
     @GetMapping("/list-all-simple")
-    @ApiOperation(value = "获得邮件模版精简列表")
+    @Operation(summary = "获得邮件模版精简列表")
     public CommonResult<List<MailTemplateSimpleRespVO>> getSimpleTemplateList() {
         List<MailTemplateDO> list = mailTempleService.getMailTemplateList();
         return success(MailTemplateConvert.INSTANCE.convertList02(list));
     }
 
     @PostMapping("/send-mail")
-    @ApiOperation("发送短信")
+    @Operation(summary = "发送短信")
     @PreAuthorize("@ss.hasPermission('system:mail-template:send-mail')")
     public CommonResult<Long> sendMail(@Valid @RequestBody MailTemplateSendReqVO sendReqVO) {
         return success(mailSendService.sendSingleMailToAdmin(sendReqVO.getMail(), null,

+ 7 - 7
yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/mail/vo/account/MailAccountBaseVO.java

@@ -1,6 +1,6 @@
 package cn.iocoder.yudao.module.system.controller.admin.mail.vo.account;
 
-import io.swagger.annotations.ApiModelProperty;
+import io.swagger.v3.oas.annotations.media.Schema;
 import lombok.Data;
 
 import javax.validation.constraints.Email;
@@ -13,28 +13,28 @@ import javax.validation.constraints.NotNull;
 @Data
 public class MailAccountBaseVO {
 
-    @ApiModelProperty(value = "邮箱", required = true, example = "yudaoyuanma@123.com")
+    @Schema(description = "邮箱", required = true, example = "yudaoyuanma@123.com")
     @NotNull(message = "邮箱不能为空")
     @Email(message = "必须是 Email 格式")
     private String mail;
 
-    @ApiModelProperty(value = "用户名", required = true, example = "yudao")
+    @Schema(description = "用户名", required = true, example = "yudao")
     @NotNull(message = "用户名不能为空")
     private String username;
 
-    @ApiModelProperty(value = "密码", required = true, example = "123456")
+    @Schema(description = "密码", required = true, example = "123456")
     @NotNull(message = "密码必填")
     private String password;
 
-    @ApiModelProperty(value = "SMTP 服务器域名", required = true, example = "www.iocoder.cn")
+    @Schema(description = "SMTP 服务器域名", required = true, example = "www.iocoder.cn")
     @NotNull(message = "SMTP 服务器域名不能为空")
     private String host;
 
-    @ApiModelProperty(value = "SMTP 服务器端口", required = true, example = "80")
+    @Schema(description = "SMTP 服务器端口", required = true, example = "80")
     @NotNull(message = "SMTP 服务器端口不能为空")
     private Integer port;
 
-    @ApiModelProperty(value = "是否开启 ssl", required = true, example = "true")
+    @Schema(description = "是否开启 ssl", required = true, example = "true")
     @NotNull(message = "是否开启 ssl 必填")
     private Boolean sslEnable;
 

+ 2 - 5
yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/mail/vo/account/MailAccountCreateReqVO.java

@@ -1,14 +1,11 @@
 package cn.iocoder.yudao.module.system.controller.admin.mail.vo.account;
 
-import io.swagger.annotations.ApiModel;
-import io.swagger.annotations.ApiModelProperty;
+import io.swagger.v3.oas.annotations.media.Schema;
 import lombok.Data;
 import lombok.EqualsAndHashCode;
 import lombok.ToString;
 
-import javax.validation.constraints.NotNull;
-
-@ApiModel("管理后台 - 邮箱账号创建 Request VO")
+@Schema(description = "管理后台 - 邮箱账号创建 Request VO")
 @Data
 @EqualsAndHashCode(callSuper = true)
 @ToString(callSuper = true)

+ 4 - 5
yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/mail/vo/account/MailAccountPageReqVO.java

@@ -1,22 +1,21 @@
 package cn.iocoder.yudao.module.system.controller.admin.mail.vo.account;
 
 import cn.iocoder.yudao.framework.common.pojo.PageParam;
-import io.swagger.annotations.ApiModel;
-import io.swagger.annotations.ApiModelProperty;
+import io.swagger.v3.oas.annotations.media.Schema;
 import lombok.Data;
 import lombok.EqualsAndHashCode;
 import lombok.ToString;
 
-@ApiModel("管理后台 - 邮箱账号分页 Request VO")
+@Schema(description = "管理后台 - 邮箱账号分页 Request VO")
 @Data
 @EqualsAndHashCode(callSuper = true)
 @ToString(callSuper = true)
 public class MailAccountPageReqVO extends PageParam {
 
-    @ApiModelProperty(value = "邮箱", required = true, example = "yudaoyuanma@123.com")
+    @Schema(description = "邮箱", required = true, example = "yudaoyuanma@123.com")
     private String mail;
 
-    @ApiModelProperty(value = "用户名" , required = true , example = "yudao")
+    @Schema(description = "用户名" , required = true , example = "yudao")
     private String username;
 
 }

+ 4 - 5
yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/mail/vo/account/MailAccountRespVO.java

@@ -1,7 +1,6 @@
 package cn.iocoder.yudao.module.system.controller.admin.mail.vo.account;
 
-import io.swagger.annotations.ApiModel;
-import io.swagger.annotations.ApiModelProperty;
+import io.swagger.v3.oas.annotations.media.Schema;
 import lombok.Data;
 import lombok.EqualsAndHashCode;
 import lombok.ToString;
@@ -9,17 +8,17 @@ import lombok.ToString;
 import javax.validation.constraints.NotNull;
 import java.time.LocalDateTime;
 
-@ApiModel("管理后台 - 邮箱账号 Response VO")
+@Schema(description ="管理后台 - 邮箱账号 Response VO")
 @Data
 @EqualsAndHashCode(callSuper = true)
 @ToString(callSuper = true)
 public class MailAccountRespVO extends MailAccountBaseVO {
 
-    @ApiModelProperty(value = "编号", required = true, example = "1024")
+    @Schema(description = "编号", required = true, example = "1024")
     @NotNull(message = "编号不能为空")
     private Long id;
 
-    @ApiModelProperty(value = "创建时间", required = true)
+    @Schema(description = "创建时间", required = true)
     private LocalDateTime createTime;
 
 }

+ 4 - 5
yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/mail/vo/account/MailAccountSimpleRespVO.java

@@ -1,17 +1,16 @@
 package cn.iocoder.yudao.module.system.controller.admin.mail.vo.account;
 
-import io.swagger.annotations.ApiModel;
-import io.swagger.annotations.ApiModelProperty;
+import io.swagger.v3.oas.annotations.media.Schema;
 import lombok.Data;
 
-@ApiModel("管理后台 - 邮箱账号的精简 Response VO")
+@Schema(description = "管理后台 - 邮箱账号的精简 Response VO")
 @Data
 public class MailAccountSimpleRespVO {
 
-    @ApiModelProperty(value = "邮箱编号", required = true, example = "1024")
+    @Schema(description = "邮箱编号", required = true, example = "1024")
     private Long id;
 
-    @ApiModelProperty(value = "邮箱", required = true, example = "768541388@qq.com")
+    @Schema(description = "邮箱", required = true, example = "768541388@qq.com")
     private String mail;
 
 }

+ 3 - 4
yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/mail/vo/account/MailAccountUpdateReqVO.java

@@ -1,20 +1,19 @@
 package cn.iocoder.yudao.module.system.controller.admin.mail.vo.account;
 
-import io.swagger.annotations.ApiModel;
-import io.swagger.annotations.ApiModelProperty;
+import io.swagger.v3.oas.annotations.media.Schema;
 import lombok.Data;
 import lombok.EqualsAndHashCode;
 import lombok.ToString;
 
 import javax.validation.constraints.NotNull;
 
-@ApiModel("管理后台 - 邮箱账号修改 Request VO")
+@Schema(description = "管理后台 - 邮箱账号修改 Request VO")
 @Data
 @EqualsAndHashCode(callSuper = true)
 @ToString(callSuper = true)
 public class MailAccountUpdateReqVO extends MailAccountBaseVO {
 
-    @ApiModelProperty(value = "编号", required = true, example = "1024")
+    @Schema(description = "编号", required = true, example = "1024")
     @NotNull(message = "编号不能为空")
     private Long id;
 

+ 16 - 18
yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/mail/vo/log/MailLogBaseVO.java

@@ -1,11 +1,9 @@
 package cn.iocoder.yudao.module.system.controller.admin.mail.vo.log;
 
+import io.swagger.v3.oas.annotations.media.Schema;
 import lombok.*;
 import java.util.*;
 import java.time.LocalDateTime;
-import java.time.LocalDateTime;
-import java.time.LocalDateTime;
-import io.swagger.annotations.*;
 import javax.validation.constraints.*;
 import org.springframework.format.annotation.DateTimeFormat;
 
@@ -18,59 +16,59 @@ import static cn.iocoder.yudao.framework.common.util.date.DateUtils.FORMAT_YEAR_
 @Data
 public class MailLogBaseVO {
 
-    @ApiModelProperty(value = "用户编号", example = "30883")
+    @Schema(description = "用户编号", example = "30883")
     private Long userId;
 
-    @ApiModelProperty(value = "用户类型", example = "2", notes = "参见 UserTypeEnum 枚举")
+    @Schema(description = "用户类型 - 参见 UserTypeEnum 枚举", example = "2")
     private Byte userType;
 
-    @ApiModelProperty(value = "接收邮箱地址", required = true, example = "76854@qq.com")
+    @Schema(description = "接收邮箱地址", required = true, example = "76854@qq.com")
     @NotNull(message = "接收邮箱地址不能为空")
     private String toMail;
 
-    @ApiModelProperty(value = "邮箱账号编号", required = true, example = "18107")
+    @Schema(description = "邮箱账号编号", required = true, example = "18107")
     @NotNull(message = "邮箱账号编号不能为空")
     private Long accountId;
 
-    @ApiModelProperty(value = "发送邮箱地址", required = true, example = "85757@qq.com")
+    @Schema(description = "发送邮箱地址", required = true, example = "85757@qq.com")
     @NotNull(message = "发送邮箱地址不能为空")
     private String fromMail;
 
-    @ApiModelProperty(value = "模板编号", required = true, example = "5678")
+    @Schema(description = "模板编号", required = true, example = "5678")
     @NotNull(message = "模板编号不能为空")
     private Long templateId;
 
-    @ApiModelProperty(value = "模板编码", required = true, example = "test_01")
+    @Schema(description = "模板编码", required = true, example = "test_01")
     @NotNull(message = "模板编码不能为空")
     private String templateCode;
 
-    @ApiModelProperty(value = "模版发送人名称", example = "李四")
+    @Schema(description = "模版发送人名称", example = "李四")
     private String templateNickname;
 
-    @ApiModelProperty(value = "邮件标题", required = true, example = "测试标题")
+    @Schema(description = "邮件标题", required = true, example = "测试标题")
     @NotNull(message = "邮件标题不能为空")
     private String templateTitle;
 
-    @ApiModelProperty(value = "邮件内容", required = true, example = "测试内容")
+    @Schema(description = "邮件内容", required = true, example = "测试内容")
     @NotNull(message = "邮件内容不能为空")
     private String templateContent;
 
-    @ApiModelProperty(value = "邮件参数", required = true)
+    @Schema(description = "邮件参数", required = true)
     @NotNull(message = "邮件参数不能为空")
     private Map<String, Object> templateParams;
 
-    @ApiModelProperty(value = "发送状态", required = true, example = "1", notes = "参见 MailSendStatusEnum 枚举")
+    @Schema(description = "发送状态 - 参见 MailSendStatusEnum 枚举", required = true, example = "1")
     @NotNull(message = "发送状态不能为空")
     private Byte sendStatus;
 
-    @ApiModelProperty(value = "发送时间")
+    @Schema(description = "发送时间")
     @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
     private LocalDateTime sendTime;
 
-    @ApiModelProperty(value = "发送返回的消息 ID", example = "28568")
+    @Schema(description = "发送返回的消息 ID", example = "28568")
     private String sendMessageId;
 
-    @ApiModelProperty(value = "发送异常")
+    @Schema(description = "发送异常")
     private String sendException;
 
 }

+ 9 - 11
yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/mail/vo/log/MailLogPageReqVO.java

@@ -1,43 +1,41 @@
 package cn.iocoder.yudao.module.system.controller.admin.mail.vo.log;
 
 import cn.iocoder.yudao.framework.common.pojo.PageParam;
-import io.swagger.annotations.ApiModel;
-import io.swagger.annotations.ApiModelProperty;
+import io.swagger.v3.oas.annotations.media.Schema;
 import lombok.Data;
 import lombok.EqualsAndHashCode;
 import lombok.ToString;
 import org.springframework.format.annotation.DateTimeFormat;
 
-import java.sql.Timestamp;
 import java.time.LocalDateTime;
 
 import static cn.iocoder.yudao.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND;
 
-@ApiModel("管理后台 - 邮箱日志分页 Request VO")
+@Schema(description = "管理后台 - 邮箱日志分页 Request VO")
 @Data
 @EqualsAndHashCode(callSuper = true)
 @ToString(callSuper = true)
 public class MailLogPageReqVO extends PageParam {
 
-    @ApiModelProperty(value = "用户编号", example = "30883")
+    @Schema(description = "用户编号", example = "30883")
     private Long userId;
 
-    @ApiModelProperty(value = "用户类型", example = "2", notes = "参见 UserTypeEnum 枚举")
+    @Schema(description = "用户类型 - 参见 UserTypeEnum 枚举", example = "2")
     private Integer userType;
 
-    @ApiModelProperty(value = "接收邮箱地址", example = "76854@qq.com", notes = "模糊匹配")
+    @Schema(description = "接收邮箱地址 模糊匹配", example = "76854@qq.com")
     private String toMail;
 
-    @ApiModelProperty(value = "邮箱账号编号", example = "18107")
+    @Schema(description = "邮箱账号编号", example = "18107")
     private Long accountId;
 
-    @ApiModelProperty(value = "模板编号", example = "5678")
+    @Schema(description = "模板编号", example = "5678")
     private Long templateId;
 
-    @ApiModelProperty(value = "发送状态", example = "1", notes = "参见 MailSendStatusEnum 枚举")
+    @Schema(description = "发送状态 - 参见 MailSendStatusEnum 枚举", example = "1")
     private Integer sendStatus;
 
-    @ApiModelProperty(value = "发送时间")
+    @Schema(description = "发送时间")
     @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
     private LocalDateTime[] sendTime;
 

+ 4 - 4
yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/mail/vo/log/MailLogRespVO.java

@@ -1,19 +1,19 @@
 package cn.iocoder.yudao.module.system.controller.admin.mail.vo.log;
 
+import io.swagger.v3.oas.annotations.media.Schema;
 import lombok.*;
 import java.time.LocalDateTime;
-import io.swagger.annotations.*;
 
-@ApiModel("管理后台 - 邮件日志 Response VO")
+@Schema(description = "管理后台 - 邮件日志 Response VO")
 @Data
 @EqualsAndHashCode(callSuper = true)
 @ToString(callSuper = true)
 public class MailLogRespVO extends MailLogBaseVO {
 
-    @ApiModelProperty(value = "编号", required = true, example = "31020")
+    @Schema(description = "编号", required = true, example = "31020")
     private Long id;
 
-    @ApiModelProperty(value = "创建时间", required = true)
+    @Schema(description = "创建时间", required = true)
     private LocalDateTime createTime;
 
 }

+ 9 - 10
yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/mail/vo/template/MailTemplateBaseVO.java

@@ -1,7 +1,6 @@
 package cn.iocoder.yudao.module.system.controller.admin.mail.vo.template;
 
-import cn.iocoder.yudao.module.system.dal.dataobject.mail.MailAccountDO;
-import io.swagger.annotations.ApiModelProperty;
+import io.swagger.v3.oas.annotations.media.Schema;
 import lombok.Data;
 
 import javax.validation.constraints.NotEmpty;
@@ -14,34 +13,34 @@ import javax.validation.constraints.NotNull;
 @Data
 public class MailTemplateBaseVO {
 
-    @ApiModelProperty(value = "模版名称", required = true, example = "测试名字")
+    @Schema(description = "模版名称", required = true, example = "测试名字")
     @NotNull(message = "名称不能为空")
     private String name;
 
-    @ApiModelProperty(value = "模版编号", required = true, example = "test")
+    @Schema(description = "模版编号", required = true, example = "test")
     @NotNull(message = "模版编号不能为空")
     private String code;
 
-    @ApiModelProperty(value = "发送的邮箱账号编号", required = true, example = "1")
+    @Schema(description = "发送的邮箱账号编号", required = true, example = "1")
     @NotNull(message = "发送的邮箱账号编号不能为空")
     private Long accountId;
 
-    @ApiModelProperty(value = "发送人名称", example = "芋头")
+    @Schema(description = "发送人名称", example = "芋头")
     private String nickname;
 
-    @ApiModelProperty(value = "标题", required = true, example = "注册成功")
+    @Schema(description = "标题", required = true, example = "注册成功")
     @NotEmpty(message = "标题不能为空")
     private String title;
 
-    @ApiModelProperty(value = "内容", required = true, example = "你好,注册成功啦")
+    @Schema(description = "内容", required = true, example = "你好,注册成功啦")
     @NotEmpty(message = "内容不能为空")
     private String content;
 
-    @ApiModelProperty(value = "状态", required = true, example = "1", notes = "参见 CommonStatusEnum 枚举")
+    @Schema(description = "状态 - 参见 CommonStatusEnum 枚举", required = true, example = "1")
     @NotNull(message = "状态不能为空")
     private Integer status;
 
-    @ApiModelProperty(value = "备注", example = "奥特曼")
+    @Schema(description = "备注", example = "奥特曼")
     private String remark;
 
 }

+ 2 - 2
yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/mail/vo/template/MailTemplateCreateReqVO.java

@@ -1,11 +1,11 @@
 package cn.iocoder.yudao.module.system.controller.admin.mail.vo.template;
 
-import io.swagger.annotations.ApiModel;
+import io.swagger.v3.oas.annotations.media.Schema;
 import lombok.Data;
 import lombok.EqualsAndHashCode;
 import lombok.ToString;
 
-@ApiModel("管理后台 - 邮件模版创建 Request VO")
+@Schema(description = "管理后台 - 邮件模版创建 Request VO")
 @Data
 @EqualsAndHashCode(callSuper = true)
 @ToString(callSuper = true)

+ 7 - 8
yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/mail/vo/template/MailTemplatePageReqVO.java

@@ -1,8 +1,7 @@
 package cn.iocoder.yudao.module.system.controller.admin.mail.vo.template;
 
 import cn.iocoder.yudao.framework.common.pojo.PageParam;
-import io.swagger.annotations.ApiModel;
-import io.swagger.annotations.ApiModelProperty;
+import io.swagger.v3.oas.annotations.media.Schema;
 import lombok.Data;
 import lombok.EqualsAndHashCode;
 import lombok.ToString;
@@ -12,25 +11,25 @@ import java.time.LocalDateTime;
 
 import static cn.iocoder.yudao.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND;
 
-@ApiModel("管理后台 - 邮件模版分页 Request VO")
+@Schema(description = "管理后台 - 邮件模版分页 Request VO")
 @Data
 @EqualsAndHashCode(callSuper = true)
 @ToString(callSuper = true)
 public class MailTemplatePageReqVO extends PageParam {
 
-    @ApiModelProperty(value = "状态", example = "1", notes = "参见 CommonStatusEnum 枚举")
+    @Schema(description = "状态 - 参见 CommonStatusEnum 枚举", example = "1")
     private Integer status;
 
-    @ApiModelProperty(value = "标识", example = "code_1024", notes = "模糊匹配")
+    @Schema(description = "标识 - 模糊匹配", example = "code_1024")
     private String code;
 
-    @ApiModelProperty(value = "名称", example = "芋头", notes = "模糊匹配")
+    @Schema(description = "名称 - 模糊匹配", example = "芋头")
     private String name;
 
-    @ApiModelProperty(value = "账号编号", example = "2048")
+    @Schema(description = "账号编号", example = "2048")
     private Long accountId;
 
-    @ApiModelProperty(value = "创建时间")
+    @Schema(description = "创建时间")
     @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
     private LocalDateTime[] createTime;
 

+ 5 - 6
yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/mail/vo/template/MailTemplateRespVO.java

@@ -1,7 +1,6 @@
 package cn.iocoder.yudao.module.system.controller.admin.mail.vo.template;
 
-import io.swagger.annotations.ApiModel;
-import io.swagger.annotations.ApiModelProperty;
+import io.swagger.v3.oas.annotations.media.Schema;
 import lombok.Data;
 import lombok.EqualsAndHashCode;
 import lombok.ToString;
@@ -9,19 +8,19 @@ import lombok.ToString;
 import java.time.LocalDateTime;
 import java.util.List;
 
-@ApiModel("管理后台 - 邮件末班 Response VO")
+@Schema(description = "管理后台 - 邮件末班 Response VO")
 @Data
 @EqualsAndHashCode(callSuper = true)
 @ToString(callSuper = true)
 public class MailTemplateRespVO extends MailTemplateBaseVO {
 
-    @ApiModelProperty(value = "编号", required = true, example = "1024")
+    @Schema(description = "编号", required = true, example = "1024")
     private Long id;
 
-    @ApiModelProperty(value = "参数数组", example = "name,code")
+    @Schema(description = "参数数组", example = "name,code")
     private List<String> params;
 
-    @ApiModelProperty(value = "创建时间", required = true)
+    @Schema(description = "创建时间", required = true)
     private LocalDateTime createTime;
 
 }

+ 5 - 6
yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/mail/vo/template/MailTemplateSendReqVO.java

@@ -1,26 +1,25 @@
 package cn.iocoder.yudao.module.system.controller.admin.mail.vo.template;
 
-import io.swagger.annotations.ApiModel;
-import io.swagger.annotations.ApiModelProperty;
+import io.swagger.v3.oas.annotations.media.Schema;
 import lombok.Data;
 
 import javax.validation.constraints.NotEmpty;
 import javax.validation.constraints.NotNull;
 import java.util.Map;
 
-@ApiModel("管理后台 - 邮件发送 Req VO")
+@Schema(description = "管理后台 - 邮件发送 Req VO")
 @Data
 public class MailTemplateSendReqVO {
 
-    @ApiModelProperty(value = "接收邮箱", required = true, example = "7685413@qq.com")
+    @Schema(description = "接收邮箱", required = true, example = "7685413@qq.com")
     @NotEmpty(message = "接收邮箱不能为空")
     private String mail;
 
-    @ApiModelProperty(value = "模板编码", required = true, example = "test_01")
+    @Schema(description = "模板编码", required = true, example = "test_01")
     @NotNull(message = "模板编码不能为空")
     private String templateCode;
 
-    @ApiModelProperty(value = "模板参数")
+    @Schema(description = "模板参数")
     private Map<String, Object> templateParams;
 
 }

+ 4 - 5
yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/mail/vo/template/MailTemplateSimpleRespVO.java

@@ -1,17 +1,16 @@
 package cn.iocoder.yudao.module.system.controller.admin.mail.vo.template;
 
-import io.swagger.annotations.ApiModel;
-import io.swagger.annotations.ApiModelProperty;
+import io.swagger.v3.oas.annotations.media.Schema;
 import lombok.Data;
 
-@ApiModel("管理后台 - 邮件模版的精简 Response VO")
+@Schema(description = "管理后台 - 邮件模版的精简 Response VO")
 @Data
 public class MailTemplateSimpleRespVO {
 
-    @ApiModelProperty(value = "模版编号", required = true, example = "1024")
+    @Schema(description = "模版编号", required = true, example = "1024")
     private Long id;
 
-    @ApiModelProperty(value = "模版名字", required = true, example = "哒哒哒")
+    @Schema(description = "模版名字", required = true, example = "哒哒哒")
     private String name;
 
 }

+ 3 - 4
yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/mail/vo/template/MailTemplateUpdateReqVO.java

@@ -1,20 +1,19 @@
 package cn.iocoder.yudao.module.system.controller.admin.mail.vo.template;
 
-import io.swagger.annotations.ApiModel;
-import io.swagger.annotations.ApiModelProperty;
+import io.swagger.v3.oas.annotations.media.Schema;
 import lombok.Data;
 import lombok.EqualsAndHashCode;
 import lombok.ToString;
 
 import javax.validation.constraints.NotNull;
 
-@ApiModel("管理后台 - 邮件模版修改 Request VO")
+@Schema(description = "管理后台 - 邮件模版修改 Request VO")
 @Data
 @EqualsAndHashCode(callSuper = true)
 @ToString(callSuper = true)
 public class MailTemplateUpdateReqVO extends MailTemplateBaseVO {
 
-    @ApiModelProperty(value = "编号", required = true, example = "1024")
+    @Schema(description = "编号", required = true, example = "1024")
     @NotNull(message = "编号不能为空")
     private Long id;