Commit edbbb1a50a0641be377ba3c82f358cf2f1e7bc20

Authored by xingyu
1 parent ffb0358c

feat: mail springdoc

Showing 19 changed files with 120 additions and 144 deletions
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.*;
7 7 import cn.iocoder.yudao.module.system.convert.mail.MailAccountConvert;
8 8 import cn.iocoder.yudao.module.system.dal.dataobject.mail.MailAccountDO;
9 9 import cn.iocoder.yudao.module.system.service.mail.MailAccountService;
10   -import io.swagger.annotations.Api;
11   -import io.swagger.annotations.ApiImplicitParam;
12   -import io.swagger.annotations.ApiOperation;
  10 +import io.swagger.v3.oas.annotations.Operation;
  11 +import io.swagger.v3.oas.annotations.Parameter;
  12 +import io.swagger.v3.oas.annotations.tags.Tag;
13 13 import org.springframework.security.access.prepost.PreAuthorize;
14 14 import org.springframework.web.bind.annotation.*;
15 15  
16 16 import javax.annotation.Resource;
17 17 import javax.validation.Valid;
18   -import java.util.Comparator;
19 18 import java.util.List;
20 19  
21 20 import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success;
22 21  
23   -@Api(tags = "管理后台 - 邮箱账号")
  22 +@Tag(name = "管理后台 - 邮箱账号")
24 23 @RestController
25 24 @RequestMapping("/system/mail-account")
26 25 public class MailAccountController {
... ... @@ -29,14 +28,14 @@ public class MailAccountController {
29 28 private MailAccountService mailAccountService;
30 29  
31 30 @PostMapping("/create")
32   - @ApiOperation("创建邮箱账号")
  31 + @Operation(summary = "创建邮箱账号")
33 32 @PreAuthorize("@ss.hasPermission('system:mail-account:create')")
34 33 public CommonResult<Long> createMailAccount(@Valid @RequestBody MailAccountCreateReqVO createReqVO) {
35 34 return success(mailAccountService.createMailAccount(createReqVO));
36 35 }
37 36  
38 37 @PutMapping("/update")
39   - @ApiOperation("修改邮箱账号")
  38 + @Operation(summary = "修改邮箱账号")
40 39 @PreAuthorize("@ss.hasPermission('system:mail-account:update')")
41 40 public CommonResult<Boolean> updateMailAccount(@Valid @RequestBody MailAccountUpdateReqVO updateReqVO) {
42 41 mailAccountService.updateMailAccount(updateReqVO);
... ... @@ -44,8 +43,8 @@ public class MailAccountController {
44 43 }
45 44  
46 45 @DeleteMapping("/delete")
47   - @ApiOperation("删除邮箱账号")
48   - @ApiImplicitParam(name = "id", value = "编号", required = true, dataTypeClass = Long.class)
  46 + @Operation(summary = "删除邮箱账号")
  47 + @Parameter(name = "id", description = "编号", required = true)
49 48 @PreAuthorize("@ss.hasPermission('system:mail-account:delete')")
50 49 public CommonResult<Boolean> deleteMailAccount(@RequestParam Long id) {
51 50 mailAccountService.deleteMailAccount(id);
... ... @@ -53,8 +52,8 @@ public class MailAccountController {
53 52 }
54 53  
55 54 @GetMapping("/get")
56   - @ApiOperation("获得邮箱账号")
57   - @ApiImplicitParam(name = "id", value = "编号", required = true, example = "1024", dataTypeClass = Long.class)
  55 + @Operation(summary = "获得邮箱账号")
  56 + @Parameter(name = "id", description = "编号", required = true, example = "1024")
58 57 @PreAuthorize("@ss.hasPermission('system:mail-account:get')")
59 58 public CommonResult<MailAccountRespVO> getMailAccount(@RequestParam("id") Long id) {
60 59 MailAccountDO mailAccountDO = mailAccountService.getMailAccount(id);
... ... @@ -62,7 +61,7 @@ public class MailAccountController {
62 61 }
63 62  
64 63 @GetMapping("/page")
65   - @ApiOperation("获得邮箱账号分页")
  64 + @Operation(summary = "获得邮箱账号分页")
66 65 @PreAuthorize("@ss.hasPermission('system:mail-account:query')")
67 66 public CommonResult<PageResult<MailAccountBaseVO>> getMailAccountPage(@Valid MailAccountPageReqVO pageReqVO) {
68 67 PageResult<MailAccountDO> pageResult = mailAccountService.getMailAccountPage(pageReqVO);
... ... @@ -70,7 +69,7 @@ public class MailAccountController {
70 69 }
71 70  
72 71 @GetMapping("/list-all-simple")
73   - @ApiOperation(value = "获得邮箱账号精简列表")
  72 + @Operation(summary = "获得邮箱账号精简列表")
74 73 public CommonResult<List<MailAccountSimpleRespVO>> getSimpleMailAccountList() {
75 74 List<MailAccountDO> list = mailAccountService.getMailAccountList();
76 75 return success(MailAccountConvert.INSTANCE.convertList02(list));
... ...
yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/mail/MailLogController.java
1 1 package cn.iocoder.yudao.module.system.controller.admin.mail;
2 2  
3   -
4 3 import cn.iocoder.yudao.framework.common.pojo.CommonResult;
5 4 import cn.iocoder.yudao.framework.common.pojo.PageResult;
6 5 import cn.iocoder.yudao.module.system.controller.admin.mail.vo.log.MailLogPageReqVO;
7 6 import cn.iocoder.yudao.module.system.controller.admin.mail.vo.log.MailLogRespVO;
8   -import cn.iocoder.yudao.module.system.controller.admin.mail.vo.template.MailTemplateRespVO;
9 7 import cn.iocoder.yudao.module.system.convert.mail.MailLogConvert;
10   -import cn.iocoder.yudao.module.system.convert.mail.MailTemplateConvert;
11 8 import cn.iocoder.yudao.module.system.dal.dataobject.mail.MailLogDO;
12   -import cn.iocoder.yudao.module.system.dal.dataobject.mail.MailTemplateDO;
13 9 import cn.iocoder.yudao.module.system.service.mail.MailLogService;
14   -import io.swagger.annotations.Api;
15   -import io.swagger.annotations.ApiImplicitParam;
16   -import io.swagger.annotations.ApiOperation;
  10 +import io.swagger.v3.oas.annotations.Operation;
  11 +import io.swagger.v3.oas.annotations.Parameter;
  12 +import io.swagger.v3.oas.annotations.tags.Tag;
17 13 import org.springframework.security.access.prepost.PreAuthorize;
18 14 import org.springframework.web.bind.annotation.GetMapping;
19 15 import org.springframework.web.bind.annotation.RequestMapping;
... ... @@ -25,8 +21,7 @@ import javax.validation.Valid;
25 21  
26 22 import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success;
27 23  
28   -
29   -@Api(tags = "管理后台 - 邮件日志")
  24 +@Tag(name = "管理后台 - 邮件日志")
30 25 @RestController
31 26 @RequestMapping("/system/mail-log")
32 27 public class MailLogController {
... ... @@ -35,7 +30,7 @@ public class MailLogController {
35 30 private MailLogService mailLogService;
36 31  
37 32 @GetMapping("/page")
38   - @ApiOperation("获得邮箱日志分页")
  33 + @Operation(summary = "获得邮箱日志分页")
39 34 @PreAuthorize("@ss.hasPermission('system:mail-log:query')")
40 35 public CommonResult<PageResult<MailLogRespVO>> getMailLogPage(@Valid MailLogPageReqVO pageVO) {
41 36 PageResult<MailLogDO> pageResult = mailLogService.getMailLogPage(pageVO);
... ... @@ -43,8 +38,8 @@ public class MailLogController {
43 38 }
44 39  
45 40 @GetMapping("/get")
46   - @ApiOperation("获得邮箱日志")
47   - @ApiImplicitParam(name = "id", value = "编号", required = true, example = "1024", dataTypeClass = Long.class)
  41 + @Operation(summary = "获得邮箱日志")
  42 + @Parameter(name = "id", description = "编号", required = true, example = "1024")
48 43 @PreAuthorize("@ss.hasPermission('system:mail-log:query')")
49 44 public CommonResult<MailLogRespVO> getMailTemplate(@RequestParam("id") Long id) {
50 45 MailLogDO mailLogDO = mailLogService.getMailLog(id);
... ...
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;
3 3 import cn.iocoder.yudao.framework.common.pojo.CommonResult;
4 4 import cn.iocoder.yudao.framework.common.pojo.PageResult;
5 5 import cn.iocoder.yudao.module.system.controller.admin.mail.vo.template.*;
6   -import cn.iocoder.yudao.module.system.controller.admin.sms.vo.template.SmsTemplateSendReqVO;
7 6 import cn.iocoder.yudao.module.system.convert.mail.MailTemplateConvert;
8 7 import cn.iocoder.yudao.module.system.dal.dataobject.mail.MailTemplateDO;
9 8 import cn.iocoder.yudao.module.system.service.mail.MailSendService;
10 9 import cn.iocoder.yudao.module.system.service.mail.MailTemplateService;
11   -import io.swagger.annotations.Api;
12   -import io.swagger.annotations.ApiImplicitParam;
13   -import io.swagger.annotations.ApiOperation;
  10 +import io.swagger.v3.oas.annotations.Operation;
  11 +import io.swagger.v3.oas.annotations.Parameter;
  12 +import io.swagger.v3.oas.annotations.tags.Tag;
14 13 import org.springframework.security.access.prepost.PreAuthorize;
15 14 import org.springframework.web.bind.annotation.*;
16 15  
... ... @@ -20,7 +19,7 @@ import java.util.List;
20 19  
21 20 import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success;
22 21  
23   -@Api(tags = "管理后台 - 邮件模版")
  22 +@Tag(name = "管理后台 - 邮件模版")
24 23 @RestController
25 24 @RequestMapping("/system/mail-template")
26 25 public class MailTemplateController {
... ... @@ -31,14 +30,14 @@ public class MailTemplateController {
31 30 private MailSendService mailSendService;
32 31  
33 32 @PostMapping("/create")
34   - @ApiOperation("创建邮件模版")
  33 + @Operation(summary = "创建邮件模版")
35 34 @PreAuthorize("@ss.hasPermission('system:mail-template:create')")
36 35 public CommonResult<Long> createMailTemplate(@Valid @RequestBody MailTemplateCreateReqVO createReqVO){
37 36 return success(mailTempleService.createMailTemplate(createReqVO));
38 37 }
39 38  
40 39 @PutMapping("/update")
41   - @ApiOperation("修改邮件模版")
  40 + @Operation(summary = "修改邮件模版")
42 41 @PreAuthorize("@ss.hasPermission('system:mail-template:update')")
43 42 public CommonResult<Boolean> updateMailTemplate(@Valid @RequestBody MailTemplateUpdateReqVO updateReqVO){
44 43 mailTempleService.updateMailTemplate(updateReqVO);
... ... @@ -46,8 +45,8 @@ public class MailTemplateController {
46 45 }
47 46  
48 47 @DeleteMapping("/delete")
49   - @ApiOperation("删除邮件模版")
50   - @ApiImplicitParam(name = "id", value = "编号", required = true, example = "1024", dataTypeClass = Long.class)
  48 + @Operation(summary = "删除邮件模版")
  49 + @Parameter(name = "id", description = "编号", required = true, example = "1024")
51 50 @PreAuthorize("@ss.hasPermission('system:mail-template:delete')")
52 51 public CommonResult<Boolean> deleteMailTemplate(@RequestParam("id") Long id) {
53 52 mailTempleService.deleteMailTemplate(id);
... ... @@ -55,8 +54,8 @@ public class MailTemplateController {
55 54 }
56 55  
57 56 @GetMapping("/get")
58   - @ApiOperation("获得邮件模版")
59   - @ApiImplicitParam(name = "id", value = "编号", required = true, example = "1024", dataTypeClass = Long.class)
  57 + @Operation(summary = "获得邮件模版")
  58 + @Parameter(name = "id", description = "编号", required = true, example = "1024")
60 59 @PreAuthorize("@ss.hasPermission('system:mail-template:get')")
61 60 public CommonResult<MailTemplateRespVO> getMailTemplate(@RequestParam("id") Long id) {
62 61 MailTemplateDO mailTemplateDO = mailTempleService.getMailTemplate(id);
... ... @@ -64,7 +63,7 @@ public class MailTemplateController {
64 63 }
65 64  
66 65 @GetMapping("/page")
67   - @ApiOperation("获得邮件模版分页")
  66 + @Operation(summary = "获得邮件模版分页")
68 67 @PreAuthorize("@ss.hasPermission('system:mail-template:query')")
69 68 public CommonResult<PageResult<MailTemplateRespVO>> getMailTemplatePage(@Valid MailTemplatePageReqVO pageReqVO) {
70 69 PageResult<MailTemplateDO> pageResult = mailTempleService.getMailTemplatePage(pageReqVO);
... ... @@ -72,14 +71,14 @@ public class MailTemplateController {
72 71 }
73 72  
74 73 @GetMapping("/list-all-simple")
75   - @ApiOperation(value = "获得邮件模版精简列表")
  74 + @Operation(summary = "获得邮件模版精简列表")
76 75 public CommonResult<List<MailTemplateSimpleRespVO>> getSimpleTemplateList() {
77 76 List<MailTemplateDO> list = mailTempleService.getMailTemplateList();
78 77 return success(MailTemplateConvert.INSTANCE.convertList02(list));
79 78 }
80 79  
81 80 @PostMapping("/send-mail")
82   - @ApiOperation("发送短信")
  81 + @Operation(summary = "发送短信")
83 82 @PreAuthorize("@ss.hasPermission('system:mail-template:send-mail')")
84 83 public CommonResult<Long> sendMail(@Valid @RequestBody MailTemplateSendReqVO sendReqVO) {
85 84 return success(mailSendService.sendSingleMailToAdmin(sendReqVO.getMail(), null,
... ...
yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/mail/vo/account/MailAccountBaseVO.java
1 1 package cn.iocoder.yudao.module.system.controller.admin.mail.vo.account;
2 2  
3   -import io.swagger.annotations.ApiModelProperty;
  3 +import io.swagger.v3.oas.annotations.media.Schema;
4 4 import lombok.Data;
5 5  
6 6 import javax.validation.constraints.Email;
... ... @@ -13,28 +13,28 @@ import javax.validation.constraints.NotNull;
13 13 @Data
14 14 public class MailAccountBaseVO {
15 15  
16   - @ApiModelProperty(value = "邮箱", required = true, example = "yudaoyuanma@123.com")
  16 + @Schema(description = "邮箱", required = true, example = "yudaoyuanma@123.com")
17 17 @NotNull(message = "邮箱不能为空")
18 18 @Email(message = "必须是 Email 格式")
19 19 private String mail;
20 20  
21   - @ApiModelProperty(value = "用户名", required = true, example = "yudao")
  21 + @Schema(description = "用户名", required = true, example = "yudao")
22 22 @NotNull(message = "用户名不能为空")
23 23 private String username;
24 24  
25   - @ApiModelProperty(value = "密码", required = true, example = "123456")
  25 + @Schema(description = "密码", required = true, example = "123456")
26 26 @NotNull(message = "密码必填")
27 27 private String password;
28 28  
29   - @ApiModelProperty(value = "SMTP 服务器域名", required = true, example = "www.iocoder.cn")
  29 + @Schema(description = "SMTP 服务器域名", required = true, example = "www.iocoder.cn")
30 30 @NotNull(message = "SMTP 服务器域名不能为空")
31 31 private String host;
32 32  
33   - @ApiModelProperty(value = "SMTP 服务器端口", required = true, example = "80")
  33 + @Schema(description = "SMTP 服务器端口", required = true, example = "80")
34 34 @NotNull(message = "SMTP 服务器端口不能为空")
35 35 private Integer port;
36 36  
37   - @ApiModelProperty(value = "是否开启 ssl", required = true, example = "true")
  37 + @Schema(description = "是否开启 ssl", required = true, example = "true")
38 38 @NotNull(message = "是否开启 ssl 必填")
39 39 private Boolean sslEnable;
40 40  
... ...
yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/mail/vo/account/MailAccountCreateReqVO.java
1 1 package cn.iocoder.yudao.module.system.controller.admin.mail.vo.account;
2 2  
3   -import io.swagger.annotations.ApiModel;
4   -import io.swagger.annotations.ApiModelProperty;
  3 +import io.swagger.v3.oas.annotations.media.Schema;
5 4 import lombok.Data;
6 5 import lombok.EqualsAndHashCode;
7 6 import lombok.ToString;
8 7  
9   -import javax.validation.constraints.NotNull;
10   -
11   -@ApiModel("管理后台 - 邮箱账号创建 Request VO")
  8 +@Schema(description = "管理后台 - 邮箱账号创建 Request VO")
12 9 @Data
13 10 @EqualsAndHashCode(callSuper = true)
14 11 @ToString(callSuper = true)
... ...
yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/mail/vo/account/MailAccountPageReqVO.java
1 1 package cn.iocoder.yudao.module.system.controller.admin.mail.vo.account;
2 2  
3 3 import cn.iocoder.yudao.framework.common.pojo.PageParam;
4   -import io.swagger.annotations.ApiModel;
5   -import io.swagger.annotations.ApiModelProperty;
  4 +import io.swagger.v3.oas.annotations.media.Schema;
6 5 import lombok.Data;
7 6 import lombok.EqualsAndHashCode;
8 7 import lombok.ToString;
9 8  
10   -@ApiModel("管理后台 - 邮箱账号分页 Request VO")
  9 +@Schema(description = "管理后台 - 邮箱账号分页 Request VO")
11 10 @Data
12 11 @EqualsAndHashCode(callSuper = true)
13 12 @ToString(callSuper = true)
14 13 public class MailAccountPageReqVO extends PageParam {
15 14  
16   - @ApiModelProperty(value = "邮箱", required = true, example = "yudaoyuanma@123.com")
  15 + @Schema(description = "邮箱", required = true, example = "yudaoyuanma@123.com")
17 16 private String mail;
18 17  
19   - @ApiModelProperty(value = "用户名" , required = true , example = "yudao")
  18 + @Schema(description = "用户名" , required = true , example = "yudao")
20 19 private String username;
21 20  
22 21 }
... ...
yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/mail/vo/account/MailAccountRespVO.java
1 1 package cn.iocoder.yudao.module.system.controller.admin.mail.vo.account;
2 2  
3   -import io.swagger.annotations.ApiModel;
4   -import io.swagger.annotations.ApiModelProperty;
  3 +import io.swagger.v3.oas.annotations.media.Schema;
5 4 import lombok.Data;
6 5 import lombok.EqualsAndHashCode;
7 6 import lombok.ToString;
... ... @@ -9,17 +8,17 @@ import lombok.ToString;
9 8 import javax.validation.constraints.NotNull;
10 9 import java.time.LocalDateTime;
11 10  
12   -@ApiModel("管理后台 - 邮箱账号 Response VO")
  11 +@Schema(description ="管理后台 - 邮箱账号 Response VO")
13 12 @Data
14 13 @EqualsAndHashCode(callSuper = true)
15 14 @ToString(callSuper = true)
16 15 public class MailAccountRespVO extends MailAccountBaseVO {
17 16  
18   - @ApiModelProperty(value = "编号", required = true, example = "1024")
  17 + @Schema(description = "编号", required = true, example = "1024")
19 18 @NotNull(message = "编号不能为空")
20 19 private Long id;
21 20  
22   - @ApiModelProperty(value = "创建时间", required = true)
  21 + @Schema(description = "创建时间", required = true)
23 22 private LocalDateTime createTime;
24 23  
25 24 }
... ...
yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/mail/vo/account/MailAccountSimpleRespVO.java
1 1 package cn.iocoder.yudao.module.system.controller.admin.mail.vo.account;
2 2  
3   -import io.swagger.annotations.ApiModel;
4   -import io.swagger.annotations.ApiModelProperty;
  3 +import io.swagger.v3.oas.annotations.media.Schema;
5 4 import lombok.Data;
6 5  
7   -@ApiModel("管理后台 - 邮箱账号的精简 Response VO")
  6 +@Schema(description = "管理后台 - 邮箱账号的精简 Response VO")
8 7 @Data
9 8 public class MailAccountSimpleRespVO {
10 9  
11   - @ApiModelProperty(value = "邮箱编号", required = true, example = "1024")
  10 + @Schema(description = "邮箱编号", required = true, example = "1024")
12 11 private Long id;
13 12  
14   - @ApiModelProperty(value = "邮箱", required = true, example = "768541388@qq.com")
  13 + @Schema(description = "邮箱", required = true, example = "768541388@qq.com")
15 14 private String mail;
16 15  
17 16 }
... ...
yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/mail/vo/account/MailAccountUpdateReqVO.java
1 1 package cn.iocoder.yudao.module.system.controller.admin.mail.vo.account;
2 2  
3   -import io.swagger.annotations.ApiModel;
4   -import io.swagger.annotations.ApiModelProperty;
  3 +import io.swagger.v3.oas.annotations.media.Schema;
5 4 import lombok.Data;
6 5 import lombok.EqualsAndHashCode;
7 6 import lombok.ToString;
8 7  
9 8 import javax.validation.constraints.NotNull;
10 9  
11   -@ApiModel("管理后台 - 邮箱账号修改 Request VO")
  10 +@Schema(description = "管理后台 - 邮箱账号修改 Request VO")
12 11 @Data
13 12 @EqualsAndHashCode(callSuper = true)
14 13 @ToString(callSuper = true)
15 14 public class MailAccountUpdateReqVO extends MailAccountBaseVO {
16 15  
17   - @ApiModelProperty(value = "编号", required = true, example = "1024")
  16 + @Schema(description = "编号", required = true, example = "1024")
18 17 @NotNull(message = "编号不能为空")
19 18 private Long id;
20 19  
... ...
yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/mail/vo/log/MailLogBaseVO.java
1 1 package cn.iocoder.yudao.module.system.controller.admin.mail.vo.log;
2 2  
  3 +import io.swagger.v3.oas.annotations.media.Schema;
3 4 import lombok.*;
4 5 import java.util.*;
5 6 import java.time.LocalDateTime;
6   -import java.time.LocalDateTime;
7   -import java.time.LocalDateTime;
8   -import io.swagger.annotations.*;
9 7 import javax.validation.constraints.*;
10 8 import org.springframework.format.annotation.DateTimeFormat;
11 9  
... ... @@ -18,59 +16,59 @@ import static cn.iocoder.yudao.framework.common.util.date.DateUtils.FORMAT_YEAR_
18 16 @Data
19 17 public class MailLogBaseVO {
20 18  
21   - @ApiModelProperty(value = "用户编号", example = "30883")
  19 + @Schema(description = "用户编号", example = "30883")
22 20 private Long userId;
23 21  
24   - @ApiModelProperty(value = "用户类型", example = "2", notes = "参见 UserTypeEnum 枚举")
  22 + @Schema(description = "用户类型 - 参见 UserTypeEnum 枚举", example = "2")
25 23 private Byte userType;
26 24  
27   - @ApiModelProperty(value = "接收邮箱地址", required = true, example = "76854@qq.com")
  25 + @Schema(description = "接收邮箱地址", required = true, example = "76854@qq.com")
28 26 @NotNull(message = "接收邮箱地址不能为空")
29 27 private String toMail;
30 28  
31   - @ApiModelProperty(value = "邮箱账号编号", required = true, example = "18107")
  29 + @Schema(description = "邮箱账号编号", required = true, example = "18107")
32 30 @NotNull(message = "邮箱账号编号不能为空")
33 31 private Long accountId;
34 32  
35   - @ApiModelProperty(value = "发送邮箱地址", required = true, example = "85757@qq.com")
  33 + @Schema(description = "发送邮箱地址", required = true, example = "85757@qq.com")
36 34 @NotNull(message = "发送邮箱地址不能为空")
37 35 private String fromMail;
38 36  
39   - @ApiModelProperty(value = "模板编号", required = true, example = "5678")
  37 + @Schema(description = "模板编号", required = true, example = "5678")
40 38 @NotNull(message = "模板编号不能为空")
41 39 private Long templateId;
42 40  
43   - @ApiModelProperty(value = "模板编码", required = true, example = "test_01")
  41 + @Schema(description = "模板编码", required = true, example = "test_01")
44 42 @NotNull(message = "模板编码不能为空")
45 43 private String templateCode;
46 44  
47   - @ApiModelProperty(value = "模版发送人名称", example = "李四")
  45 + @Schema(description = "模版发送人名称", example = "李四")
48 46 private String templateNickname;
49 47  
50   - @ApiModelProperty(value = "邮件标题", required = true, example = "测试标题")
  48 + @Schema(description = "邮件标题", required = true, example = "测试标题")
51 49 @NotNull(message = "邮件标题不能为空")
52 50 private String templateTitle;
53 51  
54   - @ApiModelProperty(value = "邮件内容", required = true, example = "测试内容")
  52 + @Schema(description = "邮件内容", required = true, example = "测试内容")
55 53 @NotNull(message = "邮件内容不能为空")
56 54 private String templateContent;
57 55  
58   - @ApiModelProperty(value = "邮件参数", required = true)
  56 + @Schema(description = "邮件参数", required = true)
59 57 @NotNull(message = "邮件参数不能为空")
60 58 private Map<String, Object> templateParams;
61 59  
62   - @ApiModelProperty(value = "发送状态", required = true, example = "1", notes = "参见 MailSendStatusEnum 枚举")
  60 + @Schema(description = "发送状态 - 参见 MailSendStatusEnum 枚举", required = true, example = "1")
63 61 @NotNull(message = "发送状态不能为空")
64 62 private Byte sendStatus;
65 63  
66   - @ApiModelProperty(value = "发送时间")
  64 + @Schema(description = "发送时间")
67 65 @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
68 66 private LocalDateTime sendTime;
69 67  
70   - @ApiModelProperty(value = "发送返回的消息 ID", example = "28568")
  68 + @Schema(description = "发送返回的消息 ID", example = "28568")
71 69 private String sendMessageId;
72 70  
73   - @ApiModelProperty(value = "发送异常")
  71 + @Schema(description = "发送异常")
74 72 private String sendException;
75 73  
76 74 }
... ...
yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/mail/vo/log/MailLogPageReqVO.java
1 1 package cn.iocoder.yudao.module.system.controller.admin.mail.vo.log;
2 2  
3 3 import cn.iocoder.yudao.framework.common.pojo.PageParam;
4   -import io.swagger.annotations.ApiModel;
5   -import io.swagger.annotations.ApiModelProperty;
  4 +import io.swagger.v3.oas.annotations.media.Schema;
6 5 import lombok.Data;
7 6 import lombok.EqualsAndHashCode;
8 7 import lombok.ToString;
9 8 import org.springframework.format.annotation.DateTimeFormat;
10 9  
11   -import java.sql.Timestamp;
12 10 import java.time.LocalDateTime;
13 11  
14 12 import static cn.iocoder.yudao.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND;
15 13  
16   -@ApiModel("管理后台 - 邮箱日志分页 Request VO")
  14 +@Schema(description = "管理后台 - 邮箱日志分页 Request VO")
17 15 @Data
18 16 @EqualsAndHashCode(callSuper = true)
19 17 @ToString(callSuper = true)
20 18 public class MailLogPageReqVO extends PageParam {
21 19  
22   - @ApiModelProperty(value = "用户编号", example = "30883")
  20 + @Schema(description = "用户编号", example = "30883")
23 21 private Long userId;
24 22  
25   - @ApiModelProperty(value = "用户类型", example = "2", notes = "参见 UserTypeEnum 枚举")
  23 + @Schema(description = "用户类型 - 参见 UserTypeEnum 枚举", example = "2")
26 24 private Integer userType;
27 25  
28   - @ApiModelProperty(value = "接收邮箱地址", example = "76854@qq.com", notes = "模糊匹配")
  26 + @Schema(description = "接收邮箱地址 模糊匹配", example = "76854@qq.com")
29 27 private String toMail;
30 28  
31   - @ApiModelProperty(value = "邮箱账号编号", example = "18107")
  29 + @Schema(description = "邮箱账号编号", example = "18107")
32 30 private Long accountId;
33 31  
34   - @ApiModelProperty(value = "模板编号", example = "5678")
  32 + @Schema(description = "模板编号", example = "5678")
35 33 private Long templateId;
36 34  
37   - @ApiModelProperty(value = "发送状态", example = "1", notes = "参见 MailSendStatusEnum 枚举")
  35 + @Schema(description = "发送状态 - 参见 MailSendStatusEnum 枚举", example = "1")
38 36 private Integer sendStatus;
39 37  
40   - @ApiModelProperty(value = "发送时间")
  38 + @Schema(description = "发送时间")
41 39 @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
42 40 private LocalDateTime[] sendTime;
43 41  
... ...
yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/mail/vo/log/MailLogRespVO.java
1 1 package cn.iocoder.yudao.module.system.controller.admin.mail.vo.log;
2 2  
  3 +import io.swagger.v3.oas.annotations.media.Schema;
3 4 import lombok.*;
4 5 import java.time.LocalDateTime;
5   -import io.swagger.annotations.*;
6 6  
7   -@ApiModel("管理后台 - 邮件日志 Response VO")
  7 +@Schema(description = "管理后台 - 邮件日志 Response VO")
8 8 @Data
9 9 @EqualsAndHashCode(callSuper = true)
10 10 @ToString(callSuper = true)
11 11 public class MailLogRespVO extends MailLogBaseVO {
12 12  
13   - @ApiModelProperty(value = "编号", required = true, example = "31020")
  13 + @Schema(description = "编号", required = true, example = "31020")
14 14 private Long id;
15 15  
16   - @ApiModelProperty(value = "创建时间", required = true)
  16 + @Schema(description = "创建时间", required = true)
17 17 private LocalDateTime createTime;
18 18  
19 19 }
... ...
yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/mail/vo/template/MailTemplateBaseVO.java
1 1 package cn.iocoder.yudao.module.system.controller.admin.mail.vo.template;
2 2  
3   -import cn.iocoder.yudao.module.system.dal.dataobject.mail.MailAccountDO;
4   -import io.swagger.annotations.ApiModelProperty;
  3 +import io.swagger.v3.oas.annotations.media.Schema;
5 4 import lombok.Data;
6 5  
7 6 import javax.validation.constraints.NotEmpty;
... ... @@ -14,34 +13,34 @@ import javax.validation.constraints.NotNull;
14 13 @Data
15 14 public class MailTemplateBaseVO {
16 15  
17   - @ApiModelProperty(value = "模版名称", required = true, example = "测试名字")
  16 + @Schema(description = "模版名称", required = true, example = "测试名字")
18 17 @NotNull(message = "名称不能为空")
19 18 private String name;
20 19  
21   - @ApiModelProperty(value = "模版编号", required = true, example = "test")
  20 + @Schema(description = "模版编号", required = true, example = "test")
22 21 @NotNull(message = "模版编号不能为空")
23 22 private String code;
24 23  
25   - @ApiModelProperty(value = "发送的邮箱账号编号", required = true, example = "1")
  24 + @Schema(description = "发送的邮箱账号编号", required = true, example = "1")
26 25 @NotNull(message = "发送的邮箱账号编号不能为空")
27 26 private Long accountId;
28 27  
29   - @ApiModelProperty(value = "发送人名称", example = "芋头")
  28 + @Schema(description = "发送人名称", example = "芋头")
30 29 private String nickname;
31 30  
32   - @ApiModelProperty(value = "标题", required = true, example = "注册成功")
  31 + @Schema(description = "标题", required = true, example = "注册成功")
33 32 @NotEmpty(message = "标题不能为空")
34 33 private String title;
35 34  
36   - @ApiModelProperty(value = "内容", required = true, example = "你好,注册成功啦")
  35 + @Schema(description = "内容", required = true, example = "你好,注册成功啦")
37 36 @NotEmpty(message = "内容不能为空")
38 37 private String content;
39 38  
40   - @ApiModelProperty(value = "状态", required = true, example = "1", notes = "参见 CommonStatusEnum 枚举")
  39 + @Schema(description = "状态 - 参见 CommonStatusEnum 枚举", required = true, example = "1")
41 40 @NotNull(message = "状态不能为空")
42 41 private Integer status;
43 42  
44   - @ApiModelProperty(value = "备注", example = "奥特曼")
  43 + @Schema(description = "备注", example = "奥特曼")
45 44 private String remark;
46 45  
47 46 }
... ...
yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/mail/vo/template/MailTemplateCreateReqVO.java
1 1 package cn.iocoder.yudao.module.system.controller.admin.mail.vo.template;
2 2  
3   -import io.swagger.annotations.ApiModel;
  3 +import io.swagger.v3.oas.annotations.media.Schema;
4 4 import lombok.Data;
5 5 import lombok.EqualsAndHashCode;
6 6 import lombok.ToString;
7 7  
8   -@ApiModel("管理后台 - 邮件模版创建 Request VO")
  8 +@Schema(description = "管理后台 - 邮件模版创建 Request VO")
9 9 @Data
10 10 @EqualsAndHashCode(callSuper = true)
11 11 @ToString(callSuper = true)
... ...
yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/mail/vo/template/MailTemplatePageReqVO.java
1 1 package cn.iocoder.yudao.module.system.controller.admin.mail.vo.template;
2 2  
3 3 import cn.iocoder.yudao.framework.common.pojo.PageParam;
4   -import io.swagger.annotations.ApiModel;
5   -import io.swagger.annotations.ApiModelProperty;
  4 +import io.swagger.v3.oas.annotations.media.Schema;
6 5 import lombok.Data;
7 6 import lombok.EqualsAndHashCode;
8 7 import lombok.ToString;
... ... @@ -12,25 +11,25 @@ import java.time.LocalDateTime;
12 11  
13 12 import static cn.iocoder.yudao.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND;
14 13  
15   -@ApiModel("管理后台 - 邮件模版分页 Request VO")
  14 +@Schema(description = "管理后台 - 邮件模版分页 Request VO")
16 15 @Data
17 16 @EqualsAndHashCode(callSuper = true)
18 17 @ToString(callSuper = true)
19 18 public class MailTemplatePageReqVO extends PageParam {
20 19  
21   - @ApiModelProperty(value = "状态", example = "1", notes = "参见 CommonStatusEnum 枚举")
  20 + @Schema(description = "状态 - 参见 CommonStatusEnum 枚举", example = "1")
22 21 private Integer status;
23 22  
24   - @ApiModelProperty(value = "标识", example = "code_1024", notes = "模糊匹配")
  23 + @Schema(description = "标识 - 模糊匹配", example = "code_1024")
25 24 private String code;
26 25  
27   - @ApiModelProperty(value = "名称", example = "芋头", notes = "模糊匹配")
  26 + @Schema(description = "名称 - 模糊匹配", example = "芋头")
28 27 private String name;
29 28  
30   - @ApiModelProperty(value = "账号编号", example = "2048")
  29 + @Schema(description = "账号编号", example = "2048")
31 30 private Long accountId;
32 31  
33   - @ApiModelProperty(value = "创建时间")
  32 + @Schema(description = "创建时间")
34 33 @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
35 34 private LocalDateTime[] createTime;
36 35  
... ...
yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/mail/vo/template/MailTemplateRespVO.java
1 1 package cn.iocoder.yudao.module.system.controller.admin.mail.vo.template;
2 2  
3   -import io.swagger.annotations.ApiModel;
4   -import io.swagger.annotations.ApiModelProperty;
  3 +import io.swagger.v3.oas.annotations.media.Schema;
5 4 import lombok.Data;
6 5 import lombok.EqualsAndHashCode;
7 6 import lombok.ToString;
... ... @@ -9,19 +8,19 @@ import lombok.ToString;
9 8 import java.time.LocalDateTime;
10 9 import java.util.List;
11 10  
12   -@ApiModel("管理后台 - 邮件末班 Response VO")
  11 +@Schema(description = "管理后台 - 邮件末班 Response VO")
13 12 @Data
14 13 @EqualsAndHashCode(callSuper = true)
15 14 @ToString(callSuper = true)
16 15 public class MailTemplateRespVO extends MailTemplateBaseVO {
17 16  
18   - @ApiModelProperty(value = "编号", required = true, example = "1024")
  17 + @Schema(description = "编号", required = true, example = "1024")
19 18 private Long id;
20 19  
21   - @ApiModelProperty(value = "参数数组", example = "name,code")
  20 + @Schema(description = "参数数组", example = "name,code")
22 21 private List<String> params;
23 22  
24   - @ApiModelProperty(value = "创建时间", required = true)
  23 + @Schema(description = "创建时间", required = true)
25 24 private LocalDateTime createTime;
26 25  
27 26 }
... ...
yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/mail/vo/template/MailTemplateSendReqVO.java
1 1 package cn.iocoder.yudao.module.system.controller.admin.mail.vo.template;
2 2  
3   -import io.swagger.annotations.ApiModel;
4   -import io.swagger.annotations.ApiModelProperty;
  3 +import io.swagger.v3.oas.annotations.media.Schema;
5 4 import lombok.Data;
6 5  
7 6 import javax.validation.constraints.NotEmpty;
8 7 import javax.validation.constraints.NotNull;
9 8 import java.util.Map;
10 9  
11   -@ApiModel("管理后台 - 邮件发送 Req VO")
  10 +@Schema(description = "管理后台 - 邮件发送 Req VO")
12 11 @Data
13 12 public class MailTemplateSendReqVO {
14 13  
15   - @ApiModelProperty(value = "接收邮箱", required = true, example = "7685413@qq.com")
  14 + @Schema(description = "接收邮箱", required = true, example = "7685413@qq.com")
16 15 @NotEmpty(message = "接收邮箱不能为空")
17 16 private String mail;
18 17  
19   - @ApiModelProperty(value = "模板编码", required = true, example = "test_01")
  18 + @Schema(description = "模板编码", required = true, example = "test_01")
20 19 @NotNull(message = "模板编码不能为空")
21 20 private String templateCode;
22 21  
23   - @ApiModelProperty(value = "模板参数")
  22 + @Schema(description = "模板参数")
24 23 private Map<String, Object> templateParams;
25 24  
26 25 }
... ...
yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/mail/vo/template/MailTemplateSimpleRespVO.java
1 1 package cn.iocoder.yudao.module.system.controller.admin.mail.vo.template;
2 2  
3   -import io.swagger.annotations.ApiModel;
4   -import io.swagger.annotations.ApiModelProperty;
  3 +import io.swagger.v3.oas.annotations.media.Schema;
5 4 import lombok.Data;
6 5  
7   -@ApiModel("管理后台 - 邮件模版的精简 Response VO")
  6 +@Schema(description = "管理后台 - 邮件模版的精简 Response VO")
8 7 @Data
9 8 public class MailTemplateSimpleRespVO {
10 9  
11   - @ApiModelProperty(value = "模版编号", required = true, example = "1024")
  10 + @Schema(description = "模版编号", required = true, example = "1024")
12 11 private Long id;
13 12  
14   - @ApiModelProperty(value = "模版名字", required = true, example = "哒哒哒")
  13 + @Schema(description = "模版名字", required = true, example = "哒哒哒")
15 14 private String name;
16 15  
17 16 }
... ...
yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/mail/vo/template/MailTemplateUpdateReqVO.java
1 1 package cn.iocoder.yudao.module.system.controller.admin.mail.vo.template;
2 2  
3   -import io.swagger.annotations.ApiModel;
4   -import io.swagger.annotations.ApiModelProperty;
  3 +import io.swagger.v3.oas.annotations.media.Schema;
5 4 import lombok.Data;
6 5 import lombok.EqualsAndHashCode;
7 6 import lombok.ToString;
8 7  
9 8 import javax.validation.constraints.NotNull;
10 9  
11   -@ApiModel("管理后台 - 邮件模版修改 Request VO")
  10 +@Schema(description = "管理后台 - 邮件模版修改 Request VO")
12 11 @Data
13 12 @EqualsAndHashCode(callSuper = true)
14 13 @ToString(callSuper = true)
15 14 public class MailTemplateUpdateReqVO extends MailTemplateBaseVO {
16 15  
17   - @ApiModelProperty(value = "编号", required = true, example = "1024")
  16 + @Schema(description = "编号", required = true, example = "1024")
18 17 @NotNull(message = "编号不能为空")
19 18 private Long id;
20 19  
... ...