Commit fa2977ae9e36fc5f063bb6089eb8cf896ce01265
1 parent
08a4de37
适配springdoc
Showing
12 changed files
with
81 additions
and
88 deletions
yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/notify/NotifyMessageController.java
| @@ -9,9 +9,9 @@ import cn.iocoder.yudao.module.system.controller.admin.notify.vo.message.NotifyM | @@ -9,9 +9,9 @@ import cn.iocoder.yudao.module.system.controller.admin.notify.vo.message.NotifyM | ||
| 9 | import cn.iocoder.yudao.module.system.convert.notify.NotifyMessageConvert; | 9 | import cn.iocoder.yudao.module.system.convert.notify.NotifyMessageConvert; |
| 10 | import cn.iocoder.yudao.module.system.dal.dataobject.notify.NotifyMessageDO; | 10 | import cn.iocoder.yudao.module.system.dal.dataobject.notify.NotifyMessageDO; |
| 11 | import cn.iocoder.yudao.module.system.service.notify.NotifyMessageService; | 11 | import cn.iocoder.yudao.module.system.service.notify.NotifyMessageService; |
| 12 | -import io.swagger.annotations.Api; | ||
| 13 | -import io.swagger.annotations.ApiImplicitParam; | ||
| 14 | -import io.swagger.annotations.ApiOperation; | 12 | +import io.swagger.v3.oas.annotations.Operation; |
| 13 | +import io.swagger.v3.oas.annotations.Parameter; | ||
| 14 | +import io.swagger.v3.oas.annotations.tags.Tag; | ||
| 15 | import org.springframework.security.access.prepost.PreAuthorize; | 15 | import org.springframework.security.access.prepost.PreAuthorize; |
| 16 | import org.springframework.validation.annotation.Validated; | 16 | import org.springframework.validation.annotation.Validated; |
| 17 | import org.springframework.web.bind.annotation.*; | 17 | import org.springframework.web.bind.annotation.*; |
| @@ -23,7 +23,7 @@ import java.util.List; | @@ -23,7 +23,7 @@ import java.util.List; | ||
| 23 | import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success; | 23 | import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success; |
| 24 | import static cn.iocoder.yudao.framework.security.core.util.SecurityFrameworkUtils.getLoginUserId; | 24 | import static cn.iocoder.yudao.framework.security.core.util.SecurityFrameworkUtils.getLoginUserId; |
| 25 | 25 | ||
| 26 | -@Api(tags = "管理后台 - 我的站内信") | 26 | +@Tag(name = "管理后台 - 我的站内信") |
| 27 | @RestController | 27 | @RestController |
| 28 | @RequestMapping("/system/notify-message") | 28 | @RequestMapping("/system/notify-message") |
| 29 | @Validated | 29 | @Validated |
| @@ -35,8 +35,8 @@ public class NotifyMessageController { | @@ -35,8 +35,8 @@ public class NotifyMessageController { | ||
| 35 | // ========== 管理所有的站内信 ========== | 35 | // ========== 管理所有的站内信 ========== |
| 36 | 36 | ||
| 37 | @GetMapping("/get") | 37 | @GetMapping("/get") |
| 38 | - @ApiOperation("获得站内信") | ||
| 39 | - @ApiImplicitParam(name = "id", value = "编号", required = true, example = "1024", dataTypeClass = Long.class) | 38 | + @Operation(summary = "获得站内信") |
| 39 | + @Parameter(name = "id", description = "编号", required = true, example = "1024") | ||
| 40 | @PreAuthorize("@ss.hasPermission('system:notify-message:query')") | 40 | @PreAuthorize("@ss.hasPermission('system:notify-message:query')") |
| 41 | public CommonResult<NotifyMessageRespVO> getNotifyMessage(@RequestParam("id") Long id) { | 41 | public CommonResult<NotifyMessageRespVO> getNotifyMessage(@RequestParam("id") Long id) { |
| 42 | NotifyMessageDO notifyMessage = notifyMessageService.getNotifyMessage(id); | 42 | NotifyMessageDO notifyMessage = notifyMessageService.getNotifyMessage(id); |
| @@ -44,7 +44,7 @@ public class NotifyMessageController { | @@ -44,7 +44,7 @@ public class NotifyMessageController { | ||
| 44 | } | 44 | } |
| 45 | 45 | ||
| 46 | @GetMapping("/page") | 46 | @GetMapping("/page") |
| 47 | - @ApiOperation("获得站内信分页") | 47 | + @Operation(summary = "获得站内信分页") |
| 48 | @PreAuthorize("@ss.hasPermission('system:notify-message:query')") | 48 | @PreAuthorize("@ss.hasPermission('system:notify-message:query')") |
| 49 | public CommonResult<PageResult<NotifyMessageRespVO>> getNotifyMessagePage(@Valid NotifyMessagePageReqVO pageVO) { | 49 | public CommonResult<PageResult<NotifyMessageRespVO>> getNotifyMessagePage(@Valid NotifyMessagePageReqVO pageVO) { |
| 50 | PageResult<NotifyMessageDO> pageResult = notifyMessageService.getNotifyMessagePage(pageVO); | 50 | PageResult<NotifyMessageDO> pageResult = notifyMessageService.getNotifyMessagePage(pageVO); |
| @@ -54,7 +54,7 @@ public class NotifyMessageController { | @@ -54,7 +54,7 @@ public class NotifyMessageController { | ||
| 54 | // ========== 查看自己的站内信 ========== | 54 | // ========== 查看自己的站内信 ========== |
| 55 | 55 | ||
| 56 | @GetMapping("/my-page") | 56 | @GetMapping("/my-page") |
| 57 | - @ApiOperation("获得我的站内信分页") | 57 | + @Operation(summary = "获得我的站内信分页") |
| 58 | public CommonResult<PageResult<NotifyMessageRespVO>> getMyMyNotifyMessagePage(@Valid NotifyMessageMyPageReqVO pageVO) { | 58 | public CommonResult<PageResult<NotifyMessageRespVO>> getMyMyNotifyMessagePage(@Valid NotifyMessageMyPageReqVO pageVO) { |
| 59 | PageResult<NotifyMessageDO> pageResult = notifyMessageService.getMyMyNotifyMessagePage(pageVO, | 59 | PageResult<NotifyMessageDO> pageResult = notifyMessageService.getMyMyNotifyMessagePage(pageVO, |
| 60 | getLoginUserId(), UserTypeEnum.ADMIN.getValue()); | 60 | getLoginUserId(), UserTypeEnum.ADMIN.getValue()); |
| @@ -62,23 +62,23 @@ public class NotifyMessageController { | @@ -62,23 +62,23 @@ public class NotifyMessageController { | ||
| 62 | } | 62 | } |
| 63 | 63 | ||
| 64 | @PutMapping("/update-read") | 64 | @PutMapping("/update-read") |
| 65 | - @ApiOperation("标记站内信为已读") | ||
| 66 | - @ApiImplicitParam(name = "ids", value = "编号列表", required = true, example = "1024,2048", dataTypeClass = List.class) | 65 | + @Operation(summary = "标记站内信为已读") |
| 66 | + @Parameter(name = "ids", description = "编号列表", required = true, example = "1024,2048") | ||
| 67 | public CommonResult<Boolean> updateNotifyMessageRead(@RequestParam("ids") List<Long> ids) { | 67 | public CommonResult<Boolean> updateNotifyMessageRead(@RequestParam("ids") List<Long> ids) { |
| 68 | notifyMessageService.updateNotifyMessageRead(ids, getLoginUserId(), UserTypeEnum.ADMIN.getValue()); | 68 | notifyMessageService.updateNotifyMessageRead(ids, getLoginUserId(), UserTypeEnum.ADMIN.getValue()); |
| 69 | return success(Boolean.TRUE); | 69 | return success(Boolean.TRUE); |
| 70 | } | 70 | } |
| 71 | 71 | ||
| 72 | @PutMapping("/update-all-read") | 72 | @PutMapping("/update-all-read") |
| 73 | - @ApiOperation("标记所有站内信为已读") | 73 | + @Operation(summary = "标记所有站内信为已读") |
| 74 | public CommonResult<Boolean> updateAllNotifyMessageRead() { | 74 | public CommonResult<Boolean> updateAllNotifyMessageRead() { |
| 75 | notifyMessageService.updateAllNotifyMessageRead(getLoginUserId(), UserTypeEnum.ADMIN.getValue()); | 75 | notifyMessageService.updateAllNotifyMessageRead(getLoginUserId(), UserTypeEnum.ADMIN.getValue()); |
| 76 | return success(Boolean.TRUE); | 76 | return success(Boolean.TRUE); |
| 77 | } | 77 | } |
| 78 | 78 | ||
| 79 | @GetMapping("/get-unread-list") | 79 | @GetMapping("/get-unread-list") |
| 80 | - @ApiOperation("获取当前用户的最新站内信列表,默认 10 条") | ||
| 81 | - @ApiImplicitParam(name = "size", value = "10", defaultValue = "10", dataTypeClass = Integer.class) | 80 | + @Operation(summary = "获取当前用户的最新站内信列表,默认 10 条") |
| 81 | + @Parameter(name = "size", description = "10") | ||
| 82 | public CommonResult<List<NotifyMessageRespVO>> getUnreadNotifyMessageList( | 82 | public CommonResult<List<NotifyMessageRespVO>> getUnreadNotifyMessageList( |
| 83 | @RequestParam(name = "size", defaultValue = "10") Integer size) { | 83 | @RequestParam(name = "size", defaultValue = "10") Integer size) { |
| 84 | List<NotifyMessageDO> list = notifyMessageService.getUnreadNotifyMessageList( | 84 | List<NotifyMessageDO> list = notifyMessageService.getUnreadNotifyMessageList( |
| @@ -87,7 +87,7 @@ public class NotifyMessageController { | @@ -87,7 +87,7 @@ public class NotifyMessageController { | ||
| 87 | } | 87 | } |
| 88 | 88 | ||
| 89 | @GetMapping("/get-unread-count") | 89 | @GetMapping("/get-unread-count") |
| 90 | - @ApiOperation("获得当前用户的未读站内信数量") | 90 | + @Operation(summary = "获得当前用户的未读站内信数量") |
| 91 | public CommonResult<Long> getUnreadNotifyMessageCount() { | 91 | public CommonResult<Long> getUnreadNotifyMessageCount() { |
| 92 | return success(notifyMessageService.getUnreadNotifyMessageCount(getLoginUserId(), UserTypeEnum.ADMIN.getValue())); | 92 | return success(notifyMessageService.getUnreadNotifyMessageCount(getLoginUserId(), UserTypeEnum.ADMIN.getValue())); |
| 93 | } | 93 | } |
yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/notify/NotifyTemplateController.java
| @@ -7,9 +7,9 @@ import cn.iocoder.yudao.module.system.convert.notify.NotifyTemplateConvert; | @@ -7,9 +7,9 @@ import cn.iocoder.yudao.module.system.convert.notify.NotifyTemplateConvert; | ||
| 7 | import cn.iocoder.yudao.module.system.dal.dataobject.notify.NotifyTemplateDO; | 7 | import cn.iocoder.yudao.module.system.dal.dataobject.notify.NotifyTemplateDO; |
| 8 | import cn.iocoder.yudao.module.system.service.notify.NotifySendService; | 8 | import cn.iocoder.yudao.module.system.service.notify.NotifySendService; |
| 9 | import cn.iocoder.yudao.module.system.service.notify.NotifyTemplateService; | 9 | import cn.iocoder.yudao.module.system.service.notify.NotifyTemplateService; |
| 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.validation.annotation.Validated; | 14 | import org.springframework.validation.annotation.Validated; |
| 15 | import org.springframework.web.bind.annotation.*; | 15 | import org.springframework.web.bind.annotation.*; |
| @@ -19,7 +19,7 @@ import javax.validation.Valid; | @@ -19,7 +19,7 @@ import javax.validation.Valid; | ||
| 19 | 19 | ||
| 20 | import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success; | 20 | import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success; |
| 21 | 21 | ||
| 22 | -@Api(tags = "管理后台 - 站内信模版") | 22 | +@Tag(name = "管理后台 - 站内信模版") |
| 23 | @RestController | 23 | @RestController |
| 24 | @RequestMapping("/system/notify-template") | 24 | @RequestMapping("/system/notify-template") |
| 25 | @Validated | 25 | @Validated |
| @@ -32,14 +32,14 @@ public class NotifyTemplateController { | @@ -32,14 +32,14 @@ public class NotifyTemplateController { | ||
| 32 | private NotifySendService notifySendService; | 32 | private NotifySendService notifySendService; |
| 33 | 33 | ||
| 34 | @PostMapping("/create") | 34 | @PostMapping("/create") |
| 35 | - @ApiOperation("创建站内信模版") | 35 | + @Operation(summary = "创建站内信模版") |
| 36 | @PreAuthorize("@ss.hasPermission('system:notify-template:create')") | 36 | @PreAuthorize("@ss.hasPermission('system:notify-template:create')") |
| 37 | public CommonResult<Long> createNotifyTemplate(@Valid @RequestBody NotifyTemplateCreateReqVO createReqVO) { | 37 | public CommonResult<Long> createNotifyTemplate(@Valid @RequestBody NotifyTemplateCreateReqVO createReqVO) { |
| 38 | return success(notifyTemplateService.createNotifyTemplate(createReqVO)); | 38 | return success(notifyTemplateService.createNotifyTemplate(createReqVO)); |
| 39 | } | 39 | } |
| 40 | 40 | ||
| 41 | @PutMapping("/update") | 41 | @PutMapping("/update") |
| 42 | - @ApiOperation("更新站内信模版") | 42 | + @Operation(summary = "更新站内信模版") |
| 43 | @PreAuthorize("@ss.hasPermission('system:notify-template:update')") | 43 | @PreAuthorize("@ss.hasPermission('system:notify-template:update')") |
| 44 | public CommonResult<Boolean> updateNotifyTemplate(@Valid @RequestBody NotifyTemplateUpdateReqVO updateReqVO) { | 44 | public CommonResult<Boolean> updateNotifyTemplate(@Valid @RequestBody NotifyTemplateUpdateReqVO updateReqVO) { |
| 45 | notifyTemplateService.updateNotifyTemplate(updateReqVO); | 45 | notifyTemplateService.updateNotifyTemplate(updateReqVO); |
| @@ -47,8 +47,8 @@ public class NotifyTemplateController { | @@ -47,8 +47,8 @@ public class NotifyTemplateController { | ||
| 47 | } | 47 | } |
| 48 | 48 | ||
| 49 | @DeleteMapping("/delete") | 49 | @DeleteMapping("/delete") |
| 50 | - @ApiOperation("删除站内信模版") | ||
| 51 | - @ApiImplicitParam(name = "id", value = "编号", required = true, dataTypeClass = Long.class) | 50 | + @Operation(summary = "删除站内信模版") |
| 51 | + @Parameter(name = "id", description = "编号", required = true) | ||
| 52 | @PreAuthorize("@ss.hasPermission('system:notify-template:delete')") | 52 | @PreAuthorize("@ss.hasPermission('system:notify-template:delete')") |
| 53 | public CommonResult<Boolean> deleteNotifyTemplate(@RequestParam("id") Long id) { | 53 | public CommonResult<Boolean> deleteNotifyTemplate(@RequestParam("id") Long id) { |
| 54 | notifyTemplateService.deleteNotifyTemplate(id); | 54 | notifyTemplateService.deleteNotifyTemplate(id); |
| @@ -56,8 +56,8 @@ public class NotifyTemplateController { | @@ -56,8 +56,8 @@ public class NotifyTemplateController { | ||
| 56 | } | 56 | } |
| 57 | 57 | ||
| 58 | @GetMapping("/get") | 58 | @GetMapping("/get") |
| 59 | - @ApiOperation("获得站内信模版") | ||
| 60 | - @ApiImplicitParam(name = "id", value = "编号", required = true, example = "1024", dataTypeClass = Long.class) | 59 | + @Operation(summary = "获得站内信模版") |
| 60 | + @Parameter(name = "id", description = "编号", required = true, example = "1024") | ||
| 61 | @PreAuthorize("@ss.hasPermission('system:notify-template:query')") | 61 | @PreAuthorize("@ss.hasPermission('system:notify-template:query')") |
| 62 | public CommonResult<NotifyTemplateRespVO> getNotifyTemplate(@RequestParam("id") Long id) { | 62 | public CommonResult<NotifyTemplateRespVO> getNotifyTemplate(@RequestParam("id") Long id) { |
| 63 | NotifyTemplateDO notifyTemplate = notifyTemplateService.getNotifyTemplate(id); | 63 | NotifyTemplateDO notifyTemplate = notifyTemplateService.getNotifyTemplate(id); |
| @@ -65,7 +65,7 @@ public class NotifyTemplateController { | @@ -65,7 +65,7 @@ public class NotifyTemplateController { | ||
| 65 | } | 65 | } |
| 66 | 66 | ||
| 67 | @GetMapping("/page") | 67 | @GetMapping("/page") |
| 68 | - @ApiOperation("获得站内信模版分页") | 68 | + @Operation(summary = "获得站内信模版分页") |
| 69 | @PreAuthorize("@ss.hasPermission('system:notify-template:query')") | 69 | @PreAuthorize("@ss.hasPermission('system:notify-template:query')") |
| 70 | public CommonResult<PageResult<NotifyTemplateRespVO>> getNotifyTemplatePage(@Valid NotifyTemplatePageReqVO pageVO) { | 70 | public CommonResult<PageResult<NotifyTemplateRespVO>> getNotifyTemplatePage(@Valid NotifyTemplatePageReqVO pageVO) { |
| 71 | PageResult<NotifyTemplateDO> pageResult = notifyTemplateService.getNotifyTemplatePage(pageVO); | 71 | PageResult<NotifyTemplateDO> pageResult = notifyTemplateService.getNotifyTemplatePage(pageVO); |
| @@ -73,7 +73,7 @@ public class NotifyTemplateController { | @@ -73,7 +73,7 @@ public class NotifyTemplateController { | ||
| 73 | } | 73 | } |
| 74 | 74 | ||
| 75 | @PostMapping("/send-notify") | 75 | @PostMapping("/send-notify") |
| 76 | - @ApiOperation("发送站内信") | 76 | + @Operation(summary = "发送站内信") |
| 77 | @PreAuthorize("@ss.hasPermission('system:notify-template:send-notify')") | 77 | @PreAuthorize("@ss.hasPermission('system:notify-template:send-notify')") |
| 78 | public CommonResult<Long> sendNotify(@Valid @RequestBody NotifyTemplateSendReqVO sendReqVO) { | 78 | public CommonResult<Long> sendNotify(@Valid @RequestBody NotifyTemplateSendReqVO sendReqVO) { |
| 79 | return success(notifySendService.sendSingleNotifyToAdmin(sendReqVO.getUserId(), | 79 | return success(notifySendService.sendSingleNotifyToAdmin(sendReqVO.getUserId(), |
yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/notify/vo/message/NotifyMessageBaseVO.java
| 1 | package cn.iocoder.yudao.module.system.controller.admin.notify.vo.message; | 1 | package cn.iocoder.yudao.module.system.controller.admin.notify.vo.message; |
| 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 | import org.springframework.format.annotation.DateTimeFormat; | 5 | import org.springframework.format.annotation.DateTimeFormat; |
| 6 | 6 | ||
| 7 | import javax.validation.constraints.NotNull; | 7 | import javax.validation.constraints.NotNull; |
| 8 | import java.time.LocalDateTime; | 8 | import java.time.LocalDateTime; |
| 9 | -import java.util.Date; | ||
| 10 | import java.util.Map; | 9 | import java.util.Map; |
| 11 | 10 | ||
| 12 | import static cn.iocoder.yudao.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND; | 11 | import static cn.iocoder.yudao.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND; |
| @@ -18,43 +17,43 @@ import static cn.iocoder.yudao.framework.common.util.date.DateUtils.FORMAT_YEAR_ | @@ -18,43 +17,43 @@ import static cn.iocoder.yudao.framework.common.util.date.DateUtils.FORMAT_YEAR_ | ||
| 18 | @Data | 17 | @Data |
| 19 | public class NotifyMessageBaseVO { | 18 | public class NotifyMessageBaseVO { |
| 20 | 19 | ||
| 21 | - @ApiModelProperty(value = "用户编号", required = true, example = "25025") | 20 | + @Schema(description = "用户编号", required = true, example = "25025") |
| 22 | @NotNull(message = "用户编号不能为空") | 21 | @NotNull(message = "用户编号不能为空") |
| 23 | private Long userId; | 22 | private Long userId; |
| 24 | 23 | ||
| 25 | - @ApiModelProperty(value = "用户类型", required = true, example = "1", notes = "参见 UserTypeEnum 枚举") | 24 | + @Schema(description = "用户类型 - 参见 UserTypeEnum 枚举", required = true, example = "1") |
| 26 | @NotNull(message = "用户类型不能为空") | 25 | @NotNull(message = "用户类型不能为空") |
| 27 | private Byte userType; | 26 | private Byte userType; |
| 28 | 27 | ||
| 29 | - @ApiModelProperty(value = "模版编号", required = true, example = "13013") | 28 | + @Schema(description = "模版编号", required = true, example = "13013") |
| 30 | @NotNull(message = "模版编号不能为空") | 29 | @NotNull(message = "模版编号不能为空") |
| 31 | private Long templateId; | 30 | private Long templateId; |
| 32 | 31 | ||
| 33 | - @ApiModelProperty(value = "模板编码", required = true, example = "test_01") | 32 | + @Schema(description = "模板编码", required = true, example = "test_01") |
| 34 | @NotNull(message = "模板编码不能为空") | 33 | @NotNull(message = "模板编码不能为空") |
| 35 | private String templateCode; | 34 | private String templateCode; |
| 36 | 35 | ||
| 37 | - @ApiModelProperty(value = "模版发送人名称", required = true, example = "芋艿") | 36 | + @Schema(description = "模版发送人名称", required = true, example = "芋艿") |
| 38 | @NotNull(message = "模版发送人名称不能为空") | 37 | @NotNull(message = "模版发送人名称不能为空") |
| 39 | private String templateNickname; | 38 | private String templateNickname; |
| 40 | 39 | ||
| 41 | - @ApiModelProperty(value = "模版内容", required = true, example = "测试内容") | 40 | + @Schema(description = "模版内容", required = true, example = "测试内容") |
| 42 | @NotNull(message = "模版内容不能为空") | 41 | @NotNull(message = "模版内容不能为空") |
| 43 | private String templateContent; | 42 | private String templateContent; |
| 44 | 43 | ||
| 45 | - @ApiModelProperty(value = "模版类型", required = true, example = "2") | 44 | + @Schema(description = "模版类型", required = true, example = "2") |
| 46 | @NotNull(message = "模版类型不能为空") | 45 | @NotNull(message = "模版类型不能为空") |
| 47 | private Integer templateType; | 46 | private Integer templateType; |
| 48 | 47 | ||
| 49 | - @ApiModelProperty(value = "模版参数", required = true) | 48 | + @Schema(description = "模版参数", required = true) |
| 50 | @NotNull(message = "模版参数不能为空") | 49 | @NotNull(message = "模版参数不能为空") |
| 51 | private Map<String, Object> templateParams; | 50 | private Map<String, Object> templateParams; |
| 52 | 51 | ||
| 53 | - @ApiModelProperty(value = "是否已读", required = true, example = "true") | 52 | + @Schema(description = "是否已读", required = true, example = "true") |
| 54 | @NotNull(message = "是否已读不能为空") | 53 | @NotNull(message = "是否已读不能为空") |
| 55 | private Boolean readStatus; | 54 | private Boolean readStatus; |
| 56 | 55 | ||
| 57 | - @ApiModelProperty(value = "阅读时间") | 56 | + @Schema(description = "阅读时间") |
| 58 | @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND) | 57 | @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND) |
| 59 | private LocalDateTime readTime; | 58 | private LocalDateTime readTime; |
| 60 | 59 |
yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/notify/vo/message/NotifyMessageMyPageReqVO.java
| 1 | package cn.iocoder.yudao.module.system.controller.admin.notify.vo.message; | 1 | package cn.iocoder.yudao.module.system.controller.admin.notify.vo.message; |
| 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,16 +11,16 @@ import java.time.LocalDateTime; | @@ -12,16 +11,16 @@ 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 NotifyMessageMyPageReqVO extends PageParam { | 18 | public class NotifyMessageMyPageReqVO extends PageParam { |
| 20 | 19 | ||
| 21 | - @ApiModelProperty(value = "是否已读", example = "true") | 20 | + @Schema(description = "是否已读", example = "true") |
| 22 | private Boolean readStatus; | 21 | private Boolean readStatus; |
| 23 | 22 | ||
| 24 | - @ApiModelProperty(value = "创建时间") | 23 | + @Schema(description = "创建时间") |
| 25 | @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND) | 24 | @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND) |
| 26 | private LocalDateTime[] createTime; | 25 | private LocalDateTime[] createTime; |
| 27 | 26 |
yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/notify/vo/message/NotifyMessagePageReqVO.java
| 1 | package cn.iocoder.yudao.module.system.controller.admin.notify.vo.message; | 1 | package cn.iocoder.yudao.module.system.controller.admin.notify.vo.message; |
| 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.time.LocalDateTime; | 10 | import java.time.LocalDateTime; |
| 12 | -import java.util.Date; | ||
| 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 NotifyMessagePageReqVO extends PageParam { | 18 | public class NotifyMessagePageReqVO extends PageParam { |
| 21 | 19 | ||
| 22 | - @ApiModelProperty(value = "用户编号", example = "25025") | 20 | + @Schema(description = "用户编号", example = "25025") |
| 23 | private Long userId; | 21 | private Long userId; |
| 24 | 22 | ||
| 25 | - @ApiModelProperty(value = "用户类型", example = "1") | 23 | + @Schema(description = "用户类型", example = "1") |
| 26 | private Integer userType; | 24 | private Integer userType; |
| 27 | 25 | ||
| 28 | - @ApiModelProperty(value = "模板编码", example = "test_01") | 26 | + @Schema(description = "模板编码", example = "test_01") |
| 29 | private String templateCode; | 27 | private String templateCode; |
| 30 | 28 | ||
| 31 | - @ApiModelProperty(value = "模版类型", example = "2") | 29 | + @Schema(description = "模版类型", example = "2") |
| 32 | private Integer templateType; | 30 | private Integer templateType; |
| 33 | 31 | ||
| 34 | - @ApiModelProperty(value = "创建时间") | 32 | + @Schema(description = "创建时间") |
| 35 | @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND) | 33 | @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND) |
| 36 | private LocalDateTime[] createTime; | 34 | private LocalDateTime[] createTime; |
| 37 | 35 |
yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/notify/vo/message/NotifyMessageRespVO.java
| 1 | package cn.iocoder.yudao.module.system.controller.admin.notify.vo.message; | 1 | package cn.iocoder.yudao.module.system.controller.admin.notify.vo.message; |
| 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 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 NotifyMessageRespVO extends NotifyMessageBaseVO { | 11 | public class NotifyMessageRespVO extends NotifyMessageBaseVO { |
| 12 | 12 | ||
| 13 | - @ApiModelProperty(value = "ID", required = true, example = "1024") | 13 | + @Schema(description = "ID", required = true, example = "1024") |
| 14 | private Long id; | 14 | private Long id; |
| 15 | 15 | ||
| 16 | - @ApiModelProperty(value = "创建时间", required = true) | 16 | + @Schema(description = "创建时间", required = true) |
| 17 | private Date createTime; | 17 | private Date createTime; |
| 18 | 18 | ||
| 19 | } | 19 | } |
yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/notify/vo/template/NotifyTemplateBaseVO.java
| @@ -2,7 +2,7 @@ package cn.iocoder.yudao.module.system.controller.admin.notify.vo.template; | @@ -2,7 +2,7 @@ package cn.iocoder.yudao.module.system.controller.admin.notify.vo.template; | ||
| 2 | 2 | ||
| 3 | import cn.iocoder.yudao.framework.common.enums.CommonStatusEnum; | 3 | import cn.iocoder.yudao.framework.common.enums.CommonStatusEnum; |
| 4 | import cn.iocoder.yudao.framework.common.validation.InEnum; | 4 | import cn.iocoder.yudao.framework.common.validation.InEnum; |
| 5 | -import io.swagger.annotations.ApiModelProperty; | 5 | +import io.swagger.v3.oas.annotations.media.Schema; |
| 6 | import lombok.Data; | 6 | import lombok.Data; |
| 7 | 7 | ||
| 8 | import javax.validation.constraints.NotEmpty; | 8 | import javax.validation.constraints.NotEmpty; |
| @@ -15,32 +15,32 @@ import javax.validation.constraints.NotNull; | @@ -15,32 +15,32 @@ import javax.validation.constraints.NotNull; | ||
| 15 | @Data | 15 | @Data |
| 16 | public class NotifyTemplateBaseVO { | 16 | public class NotifyTemplateBaseVO { |
| 17 | 17 | ||
| 18 | - @ApiModelProperty(value = "模版名称", required = true, example = "测试模版") | 18 | + @Schema(description = "模版名称", required = true, example = "测试模版") |
| 19 | @NotEmpty(message = "模版名称不能为空") | 19 | @NotEmpty(message = "模版名称不能为空") |
| 20 | private String name; | 20 | private String name; |
| 21 | 21 | ||
| 22 | - @ApiModelProperty(value = "模版编码", required = true, example = "SEND_TEST") | 22 | + @Schema(description = "模版编码", required = true, example = "SEND_TEST") |
| 23 | @NotNull(message = "模版编码不能为空") | 23 | @NotNull(message = "模版编码不能为空") |
| 24 | private String code; | 24 | private String code; |
| 25 | 25 | ||
| 26 | - @ApiModelProperty(value = "模版类型", required = true, example = "1", notes = "对应 system_notify_template_type 字典") | 26 | + @Schema(description = "模版类型 - 对应 system_notify_template_type 字典", required = true, example = "1") |
| 27 | @NotNull(message = "模版类型不能为空") | 27 | @NotNull(message = "模版类型不能为空") |
| 28 | private Integer type; | 28 | private Integer type; |
| 29 | 29 | ||
| 30 | - @ApiModelProperty(value = "发送人名称", required = true, example = "土豆") | 30 | + @Schema(description = "发送人名称", required = true, example = "土豆") |
| 31 | @NotEmpty(message = "发送人名称不能为空") | 31 | @NotEmpty(message = "发送人名称不能为空") |
| 32 | private String nickname; | 32 | private String nickname; |
| 33 | 33 | ||
| 34 | - @ApiModelProperty(value = "模版内容", required = true, example = "我是模版内容") | 34 | + @Schema(description = "模版内容", required = true, example = "我是模版内容") |
| 35 | @NotEmpty(message = "模版内容不能为空") | 35 | @NotEmpty(message = "模版内容不能为空") |
| 36 | private String content; | 36 | private String content; |
| 37 | 37 | ||
| 38 | - @ApiModelProperty(value = "状态", required = true, example = "1", notes = "参见 CommonStatusEnum 枚举") | 38 | + @Schema(description = "状态 - 参见 CommonStatusEnum 枚举", required = true, example = "1") |
| 39 | @NotNull(message = "状态不能为空") | 39 | @NotNull(message = "状态不能为空") |
| 40 | @InEnum(value = CommonStatusEnum.class, message = "状态必须是 {value}") | 40 | @InEnum(value = CommonStatusEnum.class, message = "状态必须是 {value}") |
| 41 | private Integer status; | 41 | private Integer status; |
| 42 | 42 | ||
| 43 | - @ApiModelProperty(value = "备注", example = "我是备注") | 43 | + @Schema(description = "备注", example = "我是备注") |
| 44 | private String remark; | 44 | private String remark; |
| 45 | 45 | ||
| 46 | } | 46 | } |
yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/notify/vo/template/NotifyTemplateCreateReqVO.java
| 1 | package cn.iocoder.yudao.module.system.controller.admin.notify.vo.template; | 1 | package cn.iocoder.yudao.module.system.controller.admin.notify.vo.template; |
| 2 | 2 | ||
| 3 | +import io.swagger.v3.oas.annotations.media.Schema; | ||
| 3 | import lombok.*; | 4 | import lombok.*; |
| 4 | -import io.swagger.annotations.*; | ||
| 5 | 5 | ||
| 6 | -@ApiModel("管理后台 - 站内信模版创建 Request VO") | 6 | +@Schema(description = "管理后台 - 站内信模版创建 Request VO") |
| 7 | @Data | 7 | @Data |
| 8 | @EqualsAndHashCode(callSuper = true) | 8 | @EqualsAndHashCode(callSuper = true) |
| 9 | @ToString(callSuper = true) | 9 | @ToString(callSuper = true) |
yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/notify/vo/template/NotifyTemplatePageReqVO.java
| 1 | package cn.iocoder.yudao.module.system.controller.admin.notify.vo.template; | 1 | package cn.iocoder.yudao.module.system.controller.admin.notify.vo.template; |
| 2 | 2 | ||
| 3 | -import cn.iocoder.yudao.framework.common.util.date.LocalDateTimeUtils; | 3 | +import io.swagger.v3.oas.annotations.media.Schema; |
| 4 | import lombok.*; | 4 | import lombok.*; |
| 5 | 5 | ||
| 6 | import java.time.LocalDateTime; | 6 | import java.time.LocalDateTime; |
| 7 | -import java.util.*; | ||
| 8 | -import io.swagger.annotations.*; | ||
| 9 | import cn.iocoder.yudao.framework.common.pojo.PageParam; | 7 | import cn.iocoder.yudao.framework.common.pojo.PageParam; |
| 10 | import org.springframework.format.annotation.DateTimeFormat; | 8 | import org.springframework.format.annotation.DateTimeFormat; |
| 11 | 9 | ||
| 12 | import static cn.iocoder.yudao.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND; | 10 | import static cn.iocoder.yudao.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND; |
| 13 | 11 | ||
| 14 | -@ApiModel("管理后台 - 站内信模版分页 Request VO") | 12 | +@Schema(description = "管理后台 - 站内信模版分页 Request VO") |
| 15 | @Data | 13 | @Data |
| 16 | @EqualsAndHashCode(callSuper = true) | 14 | @EqualsAndHashCode(callSuper = true) |
| 17 | @ToString(callSuper = true) | 15 | @ToString(callSuper = true) |
| 18 | public class NotifyTemplatePageReqVO extends PageParam { | 16 | public class NotifyTemplatePageReqVO extends PageParam { |
| 19 | 17 | ||
| 20 | - @ApiModelProperty(value = "模版编码", example = "test_01") | 18 | + @Schema(description = "模版编码", example = "test_01") |
| 21 | private String code; | 19 | private String code; |
| 22 | 20 | ||
| 23 | - @ApiModelProperty(value = "模版名称", example = "我是名称") | 21 | + @Schema(description = "模版名称", example = "我是名称") |
| 24 | private String name; | 22 | private String name; |
| 25 | 23 | ||
| 26 | - @ApiModelProperty(value = "状态", example = "1", notes = "参见 CommonStatusEnum 枚举类") | 24 | + @Schema(description = "状态 - 参见 CommonStatusEnum 枚举类", example = "1") |
| 27 | private Integer status; | 25 | private Integer status; |
| 28 | 26 | ||
| 29 | - @ApiModelProperty(value = "创建时间") | 27 | + @Schema(description = "创建时间") |
| 30 | @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND) | 28 | @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND) |
| 31 | private LocalDateTime[] createTime; | 29 | private LocalDateTime[] createTime; |
| 32 | 30 |
yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/notify/vo/template/NotifyTemplateRespVO.java
| 1 | package cn.iocoder.yudao.module.system.controller.admin.notify.vo.template; | 1 | package cn.iocoder.yudao.module.system.controller.admin.notify.vo.template; |
| 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 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 NotifyTemplateRespVO extends NotifyTemplateBaseVO { | 11 | public class NotifyTemplateRespVO extends NotifyTemplateBaseVO { |
| 12 | 12 | ||
| 13 | - @ApiModelProperty(value = "ID", required = true, example = "1024") | 13 | + @Schema(description = "ID", required = true, example = "1024") |
| 14 | private Long id; | 14 | private Long id; |
| 15 | 15 | ||
| 16 | - @ApiModelProperty(value = "参数数组", example = "name,code") | 16 | + @Schema(description = "参数数组", example = "name,code") |
| 17 | private List<String> params; | 17 | private List<String> params; |
| 18 | 18 | ||
| 19 | - @ApiModelProperty(value = "创建时间", required = true) | 19 | + @Schema(description = "创建时间", required = true) |
| 20 | private Date createTime; | 20 | private Date createTime; |
| 21 | 21 | ||
| 22 | } | 22 | } |
yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/notify/vo/template/NotifyTemplateSendReqVO.java
| 1 | package cn.iocoder.yudao.module.system.controller.admin.notify.vo.template; | 1 | package cn.iocoder.yudao.module.system.controller.admin.notify.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("管理后台 - 站内信模板的发送 Request VO") | 10 | +@Schema(description = "管理后台 - 站内信模板的发送 Request VO") |
| 12 | @Data | 11 | @Data |
| 13 | public class NotifyTemplateSendReqVO { | 12 | public class NotifyTemplateSendReqVO { |
| 14 | 13 | ||
| 15 | - @ApiModelProperty(value = "用户id", required = true, example = "01") | 14 | + @Schema(description = "用户id", required = true, example = "01") |
| 16 | @NotNull(message = "用户id不能为空") | 15 | @NotNull(message = "用户id不能为空") |
| 17 | private Long userId; | 16 | private Long userId; |
| 18 | 17 | ||
| 19 | - @ApiModelProperty(value = "模板编码", required = true, example = "01") | 18 | + @Schema(description = "模板编码", required = true, example = "01") |
| 20 | @NotEmpty(message = "模板编码不能为空") | 19 | @NotEmpty(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 | } |
yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/notify/vo/template/NotifyTemplateUpdateReqVO.java
| 1 | package cn.iocoder.yudao.module.system.controller.admin.notify.vo.template; | 1 | package cn.iocoder.yudao.module.system.controller.admin.notify.vo.template; |
| 2 | 2 | ||
| 3 | +import io.swagger.v3.oas.annotations.media.Schema; | ||
| 3 | import lombok.*; | 4 | import lombok.*; |
| 4 | -import io.swagger.annotations.*; | ||
| 5 | import javax.validation.constraints.*; | 5 | import javax.validation.constraints.*; |
| 6 | 6 | ||
| 7 | -@ApiModel("管理后台 - 站内信模版更新 Request VO") | 7 | +@Schema(description = "管理后台 - 站内信模版更新 Request VO") |
| 8 | @Data | 8 | @Data |
| 9 | @EqualsAndHashCode(callSuper = true) | 9 | @EqualsAndHashCode(callSuper = true) |
| 10 | @ToString(callSuper = true) | 10 | @ToString(callSuper = true) |
| 11 | public class NotifyTemplateUpdateReqVO extends NotifyTemplateBaseVO { | 11 | public class NotifyTemplateUpdateReqVO extends NotifyTemplateBaseVO { |
| 12 | 12 | ||
| 13 | - @ApiModelProperty(value = "ID", required = true, example = "1024") | 13 | + @Schema(description = "ID", required = true, example = "1024") |
| 14 | @NotNull(message = "ID 不能为空") | 14 | @NotNull(message = "ID 不能为空") |
| 15 | private Long id; | 15 | private Long id; |
| 16 | 16 |