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