From 695014a6d1b6fb768058e9c3e890e9aef37eff88 Mon Sep 17 00:00:00 2001 From: gaibu <1016771049@qq.com> Date: Fri, 3 Feb 2023 22:04:48 +0800 Subject: [PATCH 01/10] =?UTF-8?q?feat:=20=E5=8D=87=E7=BA=A7=20spring=20doc?= =?UTF-8?q?=20=E4=BE=9D=E8=B5=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- yudao-dependencies/pom.xml | 23 ++++--------------- yudao-framework/yudao-common/pom.xml | 4 ++-- .../framework/common/pojo/PageParam.java | 9 ++++---- .../framework/common/pojo/PageResult.java | 9 ++++---- .../yudao-spring-boot-starter-web/pom.xml | 6 ++--- yudao-gateway/pom.xml | 6 ++--- .../yudao-module-infra-api/pom.xml | 9 +++++--- .../yudao-module-system-api/pom.xml | 9 +++++--- .../yudao/module/system/api/dept/DeptApi.java | 20 ++++++++-------- .../yudao/module/system/api/dept/PostApi.java | 12 +++++----- .../module/system/api/dict/DictDataApi.java | 4 ---- 11 files changed, 49 insertions(+), 62 deletions(-) diff --git a/yudao-dependencies/pom.xml b/yudao-dependencies/pom.xml index d117b58bb..66f6abaa9 100644 --- a/yudao-dependencies/pom.xml +++ b/yudao-dependencies/pom.xml @@ -23,6 +23,7 @@ 4.0.0 1.6.8 2.5 + 1.6.14 1.2.15 3.5.3.1 @@ -197,27 +198,13 @@ com.github.xiaoymin - knife4j-openapi2-spring-boot-starter + knife4j-openapi3-spring-boot-starter ${knife4j.version} - - - mapstruct - org.mapstruct - - - guava - com.google.guava - - - swagger-annotations - io.swagger - - - io.swagger - swagger-annotations - ${swagger-annotations.version} + org.springdoc + springdoc-openapi-ui + ${springdoc.version} diff --git a/yudao-framework/yudao-common/pom.xml b/yudao-framework/yudao-common/pom.xml index 45a0331dc..77638edd6 100644 --- a/yudao-framework/yudao-common/pom.xml +++ b/yudao-framework/yudao-common/pom.xml @@ -59,8 +59,8 @@ - io.swagger - swagger-annotations + org.springdoc + springdoc-openapi-ui provided diff --git a/yudao-framework/yudao-common/src/main/java/cn/iocoder/yudao/framework/common/pojo/PageParam.java b/yudao-framework/yudao-common/src/main/java/cn/iocoder/yudao/framework/common/pojo/PageParam.java index 80029703b..72708f8c7 100644 --- a/yudao-framework/yudao-common/src/main/java/cn/iocoder/yudao/framework/common/pojo/PageParam.java +++ b/yudao-framework/yudao-common/src/main/java/cn/iocoder/yudao/framework/common/pojo/PageParam.java @@ -1,7 +1,6 @@ package cn.iocoder.yudao.framework.common.pojo; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; +import io.swagger.v3.oas.annotations.media.Schema; import lombok.Data; import javax.validation.constraints.Min; @@ -9,19 +8,19 @@ import javax.validation.constraints.Max; import javax.validation.constraints.NotNull; import java.io.Serializable; -@ApiModel("分页参数") +@Schema(description = "分页参数") @Data public class PageParam implements Serializable { private static final Integer PAGE_NO = 1; private static final Integer PAGE_SIZE = 10; - @ApiModelProperty(value = "页码,从 1 开始", required = true,example = "1") + @Schema(description = "页码,从 1 开始", required = true, example = "1") @NotNull(message = "页码不能为空") @Min(value = 1, message = "页码最小值为 1") private Integer pageNo = PAGE_NO; - @ApiModelProperty(value = "每页条数,最大值为 100", required = true, example = "10") + @Schema(description = "每页条数,最大值为 100", required = true, example = "10") @NotNull(message = "每页条数不能为空") @Min(value = 1, message = "每页条数最小值为 1") @Max(value = 100, message = "每页条数最大值为 100") diff --git a/yudao-framework/yudao-common/src/main/java/cn/iocoder/yudao/framework/common/pojo/PageResult.java b/yudao-framework/yudao-common/src/main/java/cn/iocoder/yudao/framework/common/pojo/PageResult.java index dbdeb85ba..ff167d149 100644 --- a/yudao-framework/yudao-common/src/main/java/cn/iocoder/yudao/framework/common/pojo/PageResult.java +++ b/yudao-framework/yudao-common/src/main/java/cn/iocoder/yudao/framework/common/pojo/PageResult.java @@ -1,21 +1,20 @@ package cn.iocoder.yudao.framework.common.pojo; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; +import io.swagger.v3.oas.annotations.media.Schema; import lombok.Data; import java.io.Serializable; import java.util.ArrayList; import java.util.List; -@ApiModel("分页结果") +@Schema(description = "分页结果") @Data public final class PageResult implements Serializable { - @ApiModelProperty(value = "数据", required = true) + @Schema(description = "数据", required = true) private List list; - @ApiModelProperty(value = "总量", required = true) + @Schema(description = "总量", required = true) private Long total; public PageResult() { diff --git a/yudao-framework/yudao-spring-boot-starter-web/pom.xml b/yudao-framework/yudao-spring-boot-starter-web/pom.xml index 790dc5ebd..91a1d7c56 100644 --- a/yudao-framework/yudao-spring-boot-starter-web/pom.xml +++ b/yudao-framework/yudao-spring-boot-starter-web/pom.xml @@ -35,11 +35,11 @@ com.github.xiaoymin - knife4j-openapi2-spring-boot-starter + knife4j-openapi3-spring-boot-starter - io.swagger - swagger-annotations + org.springdoc + springdoc-openapi-ui diff --git a/yudao-gateway/pom.xml b/yudao-gateway/pom.xml index a0a03fd6d..a2e13af96 100644 --- a/yudao-gateway/pom.xml +++ b/yudao-gateway/pom.xml @@ -46,11 +46,11 @@ com.github.xiaoymin - knife4j-openapi2-spring-boot-starter + knife4j-openapi3-spring-boot-starter - io.swagger - swagger-annotations + org.springdoc + springdoc-openapi-ui diff --git a/yudao-module-infra/yudao-module-infra-api/pom.xml b/yudao-module-infra/yudao-module-infra-api/pom.xml index 003b7d7f0..86fcbd037 100644 --- a/yudao-module-infra/yudao-module-infra-api/pom.xml +++ b/yudao-module-infra/yudao-module-infra-api/pom.xml @@ -24,9 +24,12 @@ - io.swagger - swagger-annotations - true + com.github.xiaoymin + knife4j-openapi3-spring-boot-starter + + + org.springdoc + springdoc-openapi-ui diff --git a/yudao-module-system/yudao-module-system-api/pom.xml b/yudao-module-system/yudao-module-system-api/pom.xml index f125b277e..fafb194c0 100644 --- a/yudao-module-system/yudao-module-system-api/pom.xml +++ b/yudao-module-system/yudao-module-system-api/pom.xml @@ -24,9 +24,12 @@ - io.swagger - swagger-annotations - true + com.github.xiaoymin + knife4j-openapi3-spring-boot-starter + + + org.springdoc + springdoc-openapi-ui diff --git a/yudao-module-system/yudao-module-system-api/src/main/java/cn/iocoder/yudao/module/system/api/dept/DeptApi.java b/yudao-module-system/yudao-module-system-api/src/main/java/cn/iocoder/yudao/module/system/api/dept/DeptApi.java index b9e417541..affa89ea1 100644 --- a/yudao-module-system/yudao-module-system-api/src/main/java/cn/iocoder/yudao/module/system/api/dept/DeptApi.java +++ b/yudao-module-system/yudao-module-system-api/src/main/java/cn/iocoder/yudao/module/system/api/dept/DeptApi.java @@ -4,9 +4,9 @@ import cn.iocoder.yudao.framework.common.pojo.CommonResult; import cn.iocoder.yudao.framework.common.util.collection.CollectionUtils; import cn.iocoder.yudao.module.system.api.dept.dto.DeptRespDTO; import cn.iocoder.yudao.module.system.enums.ApiConstants; -import io.swagger.annotations.Api; -import io.swagger.annotations.ApiImplicitParam; -import io.swagger.annotations.ApiOperation; +import io.swagger.v3.oas.annotations.Operation; +import io.swagger.v3.oas.annotations.Parameter; +import io.swagger.v3.oas.annotations.tags.Tag; import org.springframework.cloud.openfeign.FeignClient; import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.RequestParam; @@ -17,24 +17,24 @@ import java.util.Map; import java.util.Set; @FeignClient(name = ApiConstants.NAME) // TODO 芋艿:fallbackFactory = -@Api(tags = "RPC 服务 - 部门") +@Tag(name = "RPC 服务 - 部门") public interface DeptApi { String PREFIX = ApiConstants.PREFIX + "/dept"; @GetMapping(PREFIX + "/get") - @ApiOperation("获得部门信息") - @ApiImplicitParam(name = "id", value = "部门编号", example = "1024", required = true, dataTypeClass = Long.class) + @Operation(summary = "获得部门信息") + @Parameter(name = "id", description = "部门编号", example = "1024", required = true) CommonResult getDept(@RequestParam("id") Long id); @GetMapping(PREFIX + "/list") - @ApiOperation("获得部门信息数组") - @ApiImplicitParam(name = "ids", value = "部门编号数组", example = "1,2", required = true, allowMultiple = true) + @Operation(summary = "获得部门信息数组") + @Parameter(name = "ids", description = "部门编号数组", example = "1,2", required = true) CommonResult> getDeptList(@RequestParam("ids") Collection ids); @GetMapping(PREFIX + "/valid") - @ApiOperation("校验部门是否合法") - @ApiImplicitParam(name = "ids", value = "部门编号数组", example = "1,2", required = true, allowMultiple = true) + @Operation(summary = "校验部门是否合法") + @Parameter(name = "ids", description = "部门编号数组", example = "1,2", required = true) CommonResult validateDeptList(@RequestParam("ids") Collection ids); /** diff --git a/yudao-module-system/yudao-module-system-api/src/main/java/cn/iocoder/yudao/module/system/api/dept/PostApi.java b/yudao-module-system/yudao-module-system-api/src/main/java/cn/iocoder/yudao/module/system/api/dept/PostApi.java index 1cd8fc71c..73d3d38a9 100644 --- a/yudao-module-system/yudao-module-system-api/src/main/java/cn/iocoder/yudao/module/system/api/dept/PostApi.java +++ b/yudao-module-system/yudao-module-system-api/src/main/java/cn/iocoder/yudao/module/system/api/dept/PostApi.java @@ -2,9 +2,9 @@ package cn.iocoder.yudao.module.system.api.dept; import cn.iocoder.yudao.framework.common.pojo.CommonResult; import cn.iocoder.yudao.module.system.enums.ApiConstants; -import io.swagger.annotations.Api; -import io.swagger.annotations.ApiImplicitParam; -import io.swagger.annotations.ApiOperation; +import io.swagger.v3.oas.annotations.Operation; +import io.swagger.v3.oas.annotations.Parameter; +import io.swagger.v3.oas.annotations.tags.Tag; import org.springframework.cloud.openfeign.FeignClient; import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.RequestParam; @@ -12,14 +12,14 @@ import org.springframework.web.bind.annotation.RequestParam; import java.util.Collection; @FeignClient(name = ApiConstants.NAME) // TODO 芋艿:fallbackFactory = -@Api(tags = "RPC 服务 - 岗位") +@Tag(name = "RPC 服务 - 岗位") public interface PostApi { String PREFIX = ApiConstants.PREFIX + "/post"; @GetMapping(PREFIX + "/valid") - @ApiOperation("校验岗位是否合法") - @ApiImplicitParam(name = "ids", value = "岗位编号数组", example = "1,2", required = true, allowMultiple = true) + @Operation(summary = "校验岗位是否合法") + @Parameter(name = "ids", description = "岗位编号数组", example = "1,2", required = true) CommonResult validPostList(@RequestParam("ids") Collection ids); } diff --git a/yudao-module-system/yudao-module-system-api/src/main/java/cn/iocoder/yudao/module/system/api/dict/DictDataApi.java b/yudao-module-system/yudao-module-system-api/src/main/java/cn/iocoder/yudao/module/system/api/dict/DictDataApi.java index 0b53c3137..82069db63 100644 --- a/yudao-module-system/yudao-module-system-api/src/main/java/cn/iocoder/yudao/module/system/api/dict/DictDataApi.java +++ b/yudao-module-system/yudao-module-system-api/src/main/java/cn/iocoder/yudao/module/system/api/dict/DictDataApi.java @@ -3,10 +3,6 @@ package cn.iocoder.yudao.module.system.api.dict; import cn.iocoder.yudao.framework.common.pojo.CommonResult; import cn.iocoder.yudao.module.system.api.dict.dto.DictDataRespDTO; import cn.iocoder.yudao.module.system.enums.ApiConstants; -import io.swagger.annotations.Api; -import io.swagger.annotations.ApiImplicitParam; -import io.swagger.annotations.ApiImplicitParams; -import io.swagger.annotations.ApiOperation; import org.springframework.cloud.openfeign.FeignClient; import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.RequestParam; From 6f3e026f4c718e2937b99309dc7eba1000fa75e1 Mon Sep 17 00:00:00 2001 From: gaibu <1016771049@qq.com> Date: Sat, 4 Feb 2023 00:19:40 +0800 Subject: [PATCH 02/10] =?UTF-8?q?feat:=20=E4=BF=AE=E6=94=B9=E9=83=A8?= =?UTF-8?q?=E5=88=86=20swagger=20=E6=B3=A8=E8=A7=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../core/annotations/OperateLog.java | 4 +- .../operatelog/core/aop/OperateLogAspect.java | 56 +++--- .../swagger/config/SwaggerProperties.java | 21 +- .../config/YudaoSwaggerAutoConfiguration.java | 181 ++++++++++-------- ...ngFoxHandlerProviderBeanPostProcessor.java | 84 ++++---- ...ot.autoconfigure.AutoConfiguration.imports | 3 +- .../admin/definition/BpmFormController.java | 26 +-- .../admin/definition/BpmModelController.java | 32 ++-- .../BpmProcessDefinitionController.java | 18 +- .../BpmTaskAssignRuleController.java | 24 +-- .../definition/BpmUserGroupController.java | 26 +-- .../definition/vo/form/BpmFormBaseVO.java | 8 +- .../vo/form/BpmFormCreateReqVO.java | 8 +- .../definition/vo/form/BpmFormPageReqVO.java | 10 +- .../definition/vo/form/BpmFormRespVO.java | 16 +- .../vo/form/BpmFormSimpleRespVO.java | 12 +- .../vo/form/BpmFormUpdateReqVO.java | 10 +- .../vo/group/BpmUserGroupBaseVO.java | 10 +- .../vo/group/BpmUserGroupCreateReqVO.java | 4 +- .../vo/group/BpmUserGroupPageReqVO.java | 14 +- .../vo/group/BpmUserGroupRespVO.java | 8 +- .../vo/group/BpmUserGroupSimpleRespVO.java | 12 +- .../vo/group/BpmUserGroupUpdateReqVO.java | 6 +- .../vo/model/BpmModeImportReqVO.java | 10 +- .../definition/vo/model/BpmModelBaseVO.java | 20 +- .../vo/model/BpmModelCreateReqVO.java | 14 +- .../vo/model/BpmModelPageItemRespVO.java | 24 +-- .../vo/model/BpmModelPageReqVO.java | 14 +- .../definition/vo/model/BpmModelRespVO.java | 14 +- .../vo/model/BpmModelUpdateReqVO.java | 26 +-- .../vo/model/BpmModelUpdateStateReqVO.java | 12 +- .../BpmProcessDefinitionListReqVO.java | 10 +- .../BpmProcessDefinitionPageItemRespVO.java | 12 +- .../BpmProcessDefinitionPageReqVO.java | 10 +- .../process/BpmProcessDefinitionRespVO.java | 32 ++-- .../vo/rule/BpmTaskAssignRuleBaseVO.java | 8 +- .../vo/rule/BpmTaskAssignRuleCreateReqVO.java | 12 +- .../vo/rule/BpmTaskAssignRuleRespVO.java | 18 +- .../vo/rule/BpmTaskAssignRuleUpdateReqVO.java | 10 +- .../admin/oa/BpmOALeaveController.java | 18 +- .../admin/oa/vo/BpmOALeaveBaseVO.java | 12 +- .../admin/oa/vo/BpmOALeavePageReqVO.java | 12 +- .../admin/oa/vo/BpmOALeaveRespVO.java | 12 +- .../admin/task/BpmActivityController.java | 14 +- .../task/BpmProcessInstanceController.java | 20 +- .../admin/task/BpmTaskController.java | 24 +-- .../task/vo/activity/BpmActivityRespVO.java | 18 +- .../BpmProcessInstanceCancelReqVO.java | 12 +- .../BpmProcessInstanceCreateReqVO.java | 12 +- .../BpmProcessInstanceMyPageReqVO.java | 20 +- .../BpmProcessInstancePageItemRespVO.java | 30 +-- .../vo/instance/BpmProcessInstanceRespVO.java | 54 +++--- .../task/vo/task/BpmTaskApproveReqVO.java | 12 +- .../vo/task/BpmTaskDonePageItemRespVO.java | 16 +- .../task/vo/task/BpmTaskDonePageReqVO.java | 14 +- .../task/vo/task/BpmTaskRejectReqVO.java | 12 +- .../admin/task/vo/task/BpmTaskRespVO.java | 20 +- .../vo/task/BpmTaskTodoPageItemRespVO.java | 30 +-- .../task/vo/task/BpmTaskTodoPageReqVO.java | 14 +- .../vo/task/BpmTaskUpdateAssigneeReqVO.java | 12 +- .../yudao/module/infra/api/file/FileApi.java | 10 +- .../infra/api/file/dto/FileCreateReqDTO.java | 14 +- .../infra/api/logger/ApiAccessLogApi.java | 10 +- .../infra/api/logger/ApiErrorLogApi.java | 10 +- .../logger/dto/ApiAccessLogCreateReqDTO.java | 36 ++-- .../logger/dto/ApiErrorLogCreateReqDTO.java | 44 ++--- .../admin/codegen/CodegenController.java | 48 ++--- .../codegen/vo/CodegenCreateListReqVO.java | 12 +- .../admin/codegen/vo/CodegenDetailRespVO.java | 8 +- .../codegen/vo/CodegenPreviewRespVO.java | 12 +- .../admin/codegen/vo/CodegenUpdateReqVO.java | 16 +- .../vo/column/CodegenColumnBaseVO.java | 40 ++-- .../vo/column/CodegenColumnRespVO.java | 12 +- .../codegen/vo/table/CodegenTableBaseVO.java | 26 +-- .../vo/table/CodegenTablePageReqVO.java | 14 +- .../codegen/vo/table/CodegenTableRespVO.java | 16 +- .../codegen/vo/table/DatabaseTableRespVO.java | 12 +- .../admin/config/ConfigController.java | 30 +-- .../admin/config/vo/ConfigBaseVO.java | 14 +- .../admin/config/vo/ConfigCreateReqVO.java | 10 +- .../admin/config/vo/ConfigExportReqVO.java | 16 +- .../admin/config/vo/ConfigPageReqVO.java | 16 +- .../admin/config/vo/ConfigRespVO.java | 16 +- .../admin/config/vo/ConfigUpdateReqVO.java | 10 +- .../admin/db/DataSourceConfigController.java | 24 +-- .../admin/db/DatabaseDocController.java | 22 +-- .../admin/db/vo/DataSourceConfigBaseVO.java | 8 +- .../db/vo/DataSourceConfigCreateReqVO.java | 6 +- .../admin/db/vo/DataSourceConfigRespVO.java | 8 +- .../db/vo/DataSourceConfigUpdateReqVO.java | 8 +- .../admin/file/FileConfigController.java | 28 +-- .../controller/admin/file/FileController.java | 22 +-- .../file/vo/config/FileConfigBaseVO.java | 8 +- .../file/vo/config/FileConfigCreateReqVO.java | 12 +- .../file/vo/config/FileConfigPageReqVO.java | 14 +- .../file/vo/config/FileConfigRespVO.java | 18 +- .../file/vo/config/FileConfigUpdateReqVO.java | 12 +- .../admin/file/vo/file/FilePageReqVO.java | 14 +- .../admin/file/vo/file/FileRespVO.java | 20 +- .../admin/file/vo/file/FileUploadReqVO.java | 12 +- .../admin/logger/ApiAccessLogController.java | 12 +- .../admin/logger/ApiErrorLogController.java | 24 +-- .../vo/apiaccesslog/ApiAccessLogBaseVO.java | 32 ++-- .../apiaccesslog/ApiAccessLogExportReqVO.java | 22 +-- .../apiaccesslog/ApiAccessLogPageReqVO.java | 22 +-- .../vo/apiaccesslog/ApiAccessLogRespVO.java | 12 +- .../vo/apierrorlog/ApiErrorLogBaseVO.java | 42 ++-- .../apierrorlog/ApiErrorLogExportReqVO.java | 20 +- .../vo/apierrorlog/ApiErrorLogPageReqVO.java | 20 +- .../vo/apierrorlog/ApiErrorLogRespVO.java | 16 +- .../admin/redis/RedisController.java | 30 +-- .../admin/redis/vo/RedisKeyDefineRespVO.java | 20 +- .../admin/redis/vo/RedisKeyRespVO.java | 20 +- .../admin/redis/vo/RedisKeyValueRespVO.java | 10 +- .../admin/redis/vo/RedisMonitorRespVO.java | 22 +-- .../admin/test/TestDemoController.java | 30 +-- .../admin/test/vo/TestDemoBaseVO.java | 12 +- .../admin/test/vo/TestDemoCreateReqVO.java | 4 +- .../admin/test/vo/TestDemoExcelVO.java | 2 +- .../admin/test/vo/TestDemoExportReqVO.java | 20 +- .../admin/test/vo/TestDemoPageReqVO.java | 20 +- .../admin/test/vo/TestDemoRespVO.java | 12 +- .../admin/test/vo/TestDemoUpdateReqVO.java | 6 +- .../module/system/api/dict/DictDataApi.java | 32 ++-- .../system/api/dict/dto/DictDataRespDTO.java | 16 +- .../system/api/errorcode/ErrorCodeApi.java | 22 +-- .../module/system/api/logger/LoginLogApi.java | 10 +- .../system/api/logger/OperateLogApi.java | 10 +- .../api/logger/dto/LoginLogCreateReqDTO.java | 20 +- .../logger/dto/OperateLogCreateReqDTO.java | 46 ++--- .../module/system/api/mail/MailSendApi.java | 12 +- .../mail/dto/MailSendSingleToUserReqDTO.java | 16 +- .../api/notify/NotifyMessageSendApi.java | 12 +- .../dto/NotifySendSingleToUserReqDTO.java | 14 +- .../system/api/oauth2/OAuth2TokenApi.java | 30 +-- .../dto/OAuth2AccessTokenCheckRespDTO.java | 16 +- .../dto/OAuth2AccessTokenCreateReqDTO.java | 16 +- .../oauth2/dto/OAuth2AccessTokenRespDTO.java | 18 +- .../system/api/permission/PermissionApi.java | 36 ++-- .../module/system/api/permission/RoleApi.java | 14 +- .../api/sensitiveword/SensitiveWordApi.java | 28 +-- .../module/system/api/sms/SmsCodeApi.java | 14 +- .../module/system/api/sms/SmsSendApi.java | 12 +- .../api/sms/dto/code/SmsCodeSendReqDTO.java | 14 +- .../api/sms/dto/code/SmsCodeUseReqDTO.java | 16 +- .../sms/dto/code/SmsCodeValidateReqDTO.java | 14 +- .../dto/send/SmsSendSingleToUserReqDTO.java | 16 +- .../system/api/social/SocialUserApi.java | 36 ++-- .../module/system/api/tenant/TenantApi.java | 16 +- .../module/system/api/user/AdminUserApi.java | 30 +-- .../system/api/oauth2/OAuth2TokenApiImpl.java | 4 +- .../controller/admin/auth/AuthController.java | 38 ++-- .../admin/auth/vo/AuthLoginReqVO.java | 26 +-- .../admin/auth/vo/AuthLoginRespVO.java | 16 +- .../admin/auth/vo/AuthMenuRespVO.java | 24 +-- .../auth/vo/AuthPermissionInfoRespVO.java | 22 +-- .../admin/auth/vo/AuthSmsLoginReqVO.java | 12 +- .../admin/auth/vo/AuthSmsSendReqVO.java | 12 +- .../auth/vo/AuthSocialBindLoginReqVO.java | 18 +- .../admin/auth/vo/AuthSocialLoginReqVO.java | 14 +- .../admin/captcha/CaptchaController.java | 12 +- .../controller/admin/dept/DeptController.java | 26 +-- .../controller/admin/dept/PostController.java | 26 +-- .../admin/dept/vo/dept/DeptBaseVO.java | 18 +- .../admin/dept/vo/dept/DeptCreateReqVO.java | 4 +- .../admin/dept/vo/dept/DeptListReqVO.java | 12 +- .../admin/dept/vo/dept/DeptRespVO.java | 14 +- .../admin/dept/vo/dept/DeptSimpleRespVO.java | 14 +- .../admin/dept/vo/dept/DeptUpdateReqVO.java | 10 +- .../admin/dept/vo/post/PostBaseVO.java | 14 +- .../admin/dept/vo/post/PostCreateReqVO.java | 4 +- .../admin/dept/vo/post/PostExportReqVO.java | 14 +- .../admin/dept/vo/post/PostListReqVO.java | 12 +- .../admin/dept/vo/post/PostPageReqVO.java | 14 +- .../admin/dept/vo/post/PostRespVO.java | 12 +- .../admin/dept/vo/post/PostSimpleRespVO.java | 12 +- .../admin/dept/vo/post/PostUpdateReqVO.java | 10 +- .../admin/dict/DictDataController.java | 28 +-- .../admin/dict/DictTypeController.java | 28 +-- .../admin/dict/vo/data/DictDataBaseVO.java | 20 +- .../dict/vo/data/DictDataCreateReqVO.java | 4 +- .../dict/vo/data/DictDataExportReqVO.java | 14 +- .../admin/dict/vo/data/DictDataPageReqVO.java | 14 +- .../admin/dict/vo/data/DictDataRespVO.java | 12 +- .../dict/vo/data/DictDataSimpleRespVO.java | 18 +- .../dict/vo/data/DictDataUpdateReqVO.java | 10 +- .../admin/dict/vo/type/DictTypeBaseVO.java | 10 +- .../dict/vo/type/DictTypeCreateReqVO.java | 10 +- .../dict/vo/type/DictTypeExportReqVO.java | 16 +- .../admin/dict/vo/type/DictTypePageReqVO.java | 16 +- .../admin/dict/vo/type/DictTypeRespVO.java | 14 +- .../dict/vo/type/DictTypeSimpleRespVO.java | 14 +- .../dict/vo/type/DictTypeUpdateReqVO.java | 10 +- .../admin/errorcode/ErrorCodeController.java | 26 +-- .../admin/errorcode/vo/ErrorCodeBaseVO.java | 12 +- .../errorcode/vo/ErrorCodeCreateReqVO.java | 5 +- .../errorcode/vo/ErrorCodeExportReqVO.java | 18 +- .../errorcode/vo/ErrorCodePageReqVO.java | 18 +- .../admin/errorcode/vo/ErrorCodeRespVO.java | 14 +- .../errorcode/vo/ErrorCodeUpdateReqVO.java | 10 +- .../controller/admin/ip/AreaController.java | 16 +- .../admin/ip/vo/AreaNodeRespVO.java | 12 +- .../admin/logger/LoginLogController.java | 12 +- .../admin/logger/OperateLogController.java | 12 +- .../logger/vo/loginlog/LoginLogBaseVO.java | 16 +- .../vo/loginlog/LoginLogExportReqVO.java | 16 +- .../logger/vo/loginlog/LoginLogPageReqVO.java | 16 +- .../logger/vo/loginlog/LoginLogRespVO.java | 16 +- .../vo/operatelog/OperateLogBaseVO.java | 40 ++-- .../vo/operatelog/OperateLogExportReqVO.java | 18 +- .../vo/operatelog/OperateLogPageReqVO.java | 18 +- .../vo/operatelog/OperateLogRespVO.java | 12 +- .../admin/mail/MailAccountController.java | 26 +-- .../admin/mail/MailLogController.java | 16 +- .../admin/mail/MailTemplateController.java | 28 +-- .../mail/vo/account/MailAccountBaseVO.java | 16 +- .../mail/vo/account/MailAccountPageReqVO.java | 12 +- .../mail/vo/account/MailAccountRespVO.java | 12 +- .../vo/account/MailAccountSimpleRespVO.java | 12 +- .../vo/account/MailAccountUpdateReqVO.java | 10 +- .../admin/mail/vo/log/MailLogBaseVO.java | 34 ++-- .../admin/mail/vo/log/MailLogPageReqVO.java | 22 +-- .../admin/mail/vo/log/MailLogRespVO.java | 12 +- .../mail/vo/template/MailTemplateBaseVO.java | 20 +- .../vo/template/MailTemplatePageReqVO.java | 18 +- .../mail/vo/template/MailTemplateRespVO.java | 14 +- .../vo/template/MailTemplateSendReqVO.java | 14 +- .../vo/template/MailTemplateSimpleRespVO.java | 12 +- .../vo/template/MailTemplateUpdateReqVO.java | 10 +- .../admin/notice/NoticeController.java | 24 +-- .../admin/notice/vo/NoticeBaseVO.java | 12 +- .../admin/notice/vo/NoticePageReqVO.java | 12 +- .../admin/notice/vo/NoticeRespVO.java | 12 +- .../admin/notice/vo/NoticeUpdateReqVO.java | 10 +- .../admin/notify/NotifyMessageController.java | 30 +-- .../notify/NotifyTemplateController.java | 26 +-- .../vo/message/NotifyMessageBaseVO.java | 24 +-- .../vo/message/NotifyMessageMyPageReqVO.java | 12 +- .../vo/message/NotifyMessagePageReqVO.java | 18 +- .../vo/message/NotifyMessageRespVO.java | 12 +- .../vo/template/NotifyTemplateBaseVO.java | 18 +- .../vo/template/NotifyTemplatePageReqVO.java | 16 +- .../vo/template/NotifyTemplateRespVO.java | 14 +- .../vo/template/NotifyTemplateSendReqVO.java | 14 +- .../template/NotifyTemplateUpdateReqVO.java | 10 +- .../admin/oauth2/OAuth2ClientController.java | 24 +-- .../admin/oauth2/OAuth2OpenController.java | 60 +++--- .../admin/oauth2/OAuth2TokenController.java | 16 +- .../admin/oauth2/OAuth2UserController.java | 12 +- .../oauth2/vo/client/OAuth2ClientBaseVO.java | 34 ++-- .../vo/client/OAuth2ClientCreateReqVO.java | 4 +- .../vo/client/OAuth2ClientPageReqVO.java | 8 +- .../oauth2/vo/client/OAuth2ClientRespVO.java | 12 +- .../vo/client/OAuth2ClientUpdateReqVO.java | 10 +- .../vo/open/OAuth2OpenAccessTokenRespVO.java | 18 +- .../open/OAuth2OpenAuthorizeInfoRespVO.java | 14 +- .../vo/open/OAuth2OpenCheckTokenRespVO.java | 22 +-- .../vo/token/OAuth2AccessTokenPageReqVO.java | 14 +- .../vo/token/OAuth2AccessTokenRespVO.java | 24 +-- .../oauth2/vo/user/OAuth2UserInfoRespVO.java | 34 ++-- .../oauth2/vo/user/OAuth2UserUpdateReqVO.java | 16 +- .../admin/permission/MenuController.java | 24 +-- .../permission/PermissionController.java | 24 +-- .../admin/permission/RoleController.java | 26 +-- .../admin/permission/vo/menu/MenuBaseVO.java | 26 +-- .../permission/vo/menu/MenuListReqVO.java | 12 +- .../admin/permission/vo/menu/MenuRespVO.java | 14 +- .../permission/vo/menu/MenuSimpleRespVO.java | 16 +- .../permission/vo/menu/MenuUpdateReqVO.java | 10 +- .../PermissionAssignRoleDataScopeReqVO.java | 14 +- .../PermissionAssignRoleMenuReqVO.java | 12 +- .../PermissionAssignUserRoleReqVO.java | 12 +- .../admin/permission/vo/role/RoleBaseVO.java | 12 +- .../permission/vo/role/RoleCreateReqVO.java | 5 +- .../permission/vo/role/RoleExportReqVO.java | 16 +- .../permission/vo/role/RolePageReqVO.java | 16 +- .../admin/permission/vo/role/RoleRespVO.java | 20 +- .../permission/vo/role/RoleSimpleRespVO.java | 12 +- .../permission/vo/role/RoleUpdateReqVO.java | 10 +- .../vo/role/RoleUpdateStatusReqVO.java | 12 +- .../SensitiveWordController.java | 30 +-- .../sensitiveword/vo/SensitiveWordBaseVO.java | 12 +- .../vo/SensitiveWordExportReqVO.java | 16 +- .../vo/SensitiveWordPageReqVO.java | 16 +- .../sensitiveword/vo/SensitiveWordRespVO.java | 12 +- .../vo/SensitiveWordUpdateReqVO.java | 10 +- .../admin/sms/SmsCallbackController.java | 14 +- .../admin/sms/SmsChannelController.java | 26 +-- .../admin/sms/SmsLogController.java | 12 +- .../admin/sms/SmsTemplateController.java | 28 +-- .../sms/vo/channel/SmsChannelBaseVO.java | 16 +- .../sms/vo/channel/SmsChannelCreateReqVO.java | 10 +- .../sms/vo/channel/SmsChannelPageReqVO.java | 14 +- .../sms/vo/channel/SmsChannelRespVO.java | 14 +- .../vo/channel/SmsChannelSimpleRespVO.java | 14 +- .../sms/vo/channel/SmsChannelUpdateReqVO.java | 10 +- .../admin/sms/vo/log/SmsLogExportReqVO.java | 22 +-- .../admin/sms/vo/log/SmsLogPageReqVO.java | 22 +-- .../admin/sms/vo/log/SmsLogRespVO.java | 58 +++--- .../sms/vo/template/SmsTemplateBaseVO.java | 20 +- .../vo/template/SmsTemplateExportReqVO.java | 22 +-- .../sms/vo/template/SmsTemplatePageReqVO.java | 22 +-- .../sms/vo/template/SmsTemplateRespVO.java | 16 +- .../sms/vo/template/SmsTemplateSendReqVO.java | 14 +- .../vo/template/SmsTemplateUpdateReqVO.java | 10 +- .../admin/socail/SocialUserController.java | 12 +- .../admin/socail/vo/SocialUserBindReqVO.java | 14 +- .../socail/vo/SocialUserUnbindReqVO.java | 12 +- .../admin/tenant/TenantController.java | 30 +-- .../admin/tenant/TenantPackageController.java | 26 +-- .../vo/packages/TenantPackageBaseVO.java | 12 +- .../vo/packages/TenantPackagePageReqVO.java | 16 +- .../vo/packages/TenantPackageRespVO.java | 12 +- .../packages/TenantPackageSimpleRespVO.java | 12 +- .../vo/packages/TenantPackageUpdateReqVO.java | 6 +- .../admin/tenant/vo/tenant/TenantBaseVO.java | 20 +- .../tenant/vo/tenant/TenantCreateReqVO.java | 10 +- .../tenant/vo/tenant/TenantExportReqVO.java | 18 +- .../tenant/vo/tenant/TenantPageReqVO.java | 18 +- .../admin/tenant/vo/tenant/TenantRespVO.java | 12 +- .../tenant/vo/tenant/TenantUpdateReqVO.java | 8 +- .../controller/admin/user/UserController.java | 44 ++--- .../admin/user/UserProfileController.java | 16 +- .../user/vo/profile/UserProfileRespVO.java | 42 ++-- .../UserProfileUpdatePasswordReqVO.java | 12 +- .../vo/profile/UserProfileUpdateReqVO.java | 16 +- .../admin/user/vo/user/UserBaseVO.java | 22 +-- .../admin/user/vo/user/UserCreateReqVO.java | 10 +- .../admin/user/vo/user/UserExportReqVO.java | 18 +- .../admin/user/vo/user/UserImportRespVO.java | 14 +- .../user/vo/user/UserPageItemRespVO.java | 14 +- .../admin/user/vo/user/UserPageReqVO.java | 18 +- .../admin/user/vo/user/UserRespVO.java | 18 +- .../admin/user/vo/user/UserSimpleRespVO.java | 12 +- .../user/vo/user/UserUpdatePasswordReqVO.java | 12 +- .../admin/user/vo/user/UserUpdateReqVO.java | 10 +- .../user/vo/user/UserUpdateStatusReqVO.java | 12 +- 337 files changed, 3024 insertions(+), 2971 deletions(-) diff --git a/yudao-framework/yudao-spring-boot-starter-biz-operatelog/src/main/java/cn/iocoder/yudao/framework/operatelog/core/annotations/OperateLog.java b/yudao-framework/yudao-spring-boot-starter-biz-operatelog/src/main/java/cn/iocoder/yudao/framework/operatelog/core/annotations/OperateLog.java index 2f9ecaf8f..c9a117cb4 100644 --- a/yudao-framework/yudao-spring-boot-starter-biz-operatelog/src/main/java/cn/iocoder/yudao/framework/operatelog/core/annotations/OperateLog.java +++ b/yudao-framework/yudao-spring-boot-starter-biz-operatelog/src/main/java/cn/iocoder/yudao/framework/operatelog/core/annotations/OperateLog.java @@ -1,8 +1,8 @@ package cn.iocoder.yudao.framework.operatelog.core.annotations; import cn.iocoder.yudao.framework.operatelog.core.enums.OperateTypeEnum; -import io.swagger.annotations.Api; -import io.swagger.annotations.ApiOperation; +import io.swagger.v3.oas.annotations.tags.Tag; +import io.swagger.v3.oas.annotations.Operation; import java.lang.annotation.ElementType; import java.lang.annotation.Retention; diff --git a/yudao-framework/yudao-spring-boot-starter-biz-operatelog/src/main/java/cn/iocoder/yudao/framework/operatelog/core/aop/OperateLogAspect.java b/yudao-framework/yudao-spring-boot-starter-biz-operatelog/src/main/java/cn/iocoder/yudao/framework/operatelog/core/aop/OperateLogAspect.java index 75819cbe1..5db6baae4 100644 --- a/yudao-framework/yudao-spring-boot-starter-biz-operatelog/src/main/java/cn/iocoder/yudao/framework/operatelog/core/aop/OperateLogAspect.java +++ b/yudao-framework/yudao-spring-boot-starter-biz-operatelog/src/main/java/cn/iocoder/yudao/framework/operatelog/core/aop/OperateLogAspect.java @@ -15,8 +15,8 @@ import cn.iocoder.yudao.framework.operatelog.core.service.OperateLog; import cn.iocoder.yudao.framework.operatelog.core.service.OperateLogFrameworkService; import cn.iocoder.yudao.framework.web.core.util.WebFrameworkUtils; import com.google.common.collect.Maps; -import io.swagger.annotations.Api; -import io.swagger.annotations.ApiOperation; +import io.swagger.v3.oas.annotations.tags.Tag; +import io.swagger.v3.oas.annotations.Operation; import lombok.extern.slf4j.Slf4j; import org.aspectj.lang.ProceedingJoinPoint; import org.aspectj.lang.annotation.Around; @@ -71,15 +71,15 @@ public class OperateLogAspect { @Resource private OperateLogFrameworkService operateLogFrameworkService; - @Around("@annotation(apiOperation)") - public Object around(ProceedingJoinPoint joinPoint, ApiOperation apiOperation) throws Throwable { + @Around("@annotation(operation)") + public Object around(ProceedingJoinPoint joinPoint, Operation operation) throws Throwable { // 可能也添加了 @ApiOperation 注解 cn.iocoder.yudao.framework.operatelog.core.annotations.OperateLog operateLog = getMethodAnnotation(joinPoint, cn.iocoder.yudao.framework.operatelog.core.annotations.OperateLog.class); - return around0(joinPoint, operateLog, apiOperation); + return around0(joinPoint, operateLog, operation); } - @Around("!@annotation(io.swagger.annotations.ApiOperation) && @annotation(operateLog)") + @Around("!@annotation(io.swagger.v3.oas.annotations.Operation) && @annotation(operateLog)") // 兼容处理,只添加 @OperateLog 注解的情况 public Object around(ProceedingJoinPoint joinPoint, cn.iocoder.yudao.framework.operatelog.core.annotations.OperateLog operateLog) throws Throwable { @@ -88,7 +88,7 @@ public class OperateLogAspect { private Object around0(ProceedingJoinPoint joinPoint, cn.iocoder.yudao.framework.operatelog.core.annotations.OperateLog operateLog, - ApiOperation apiOperation) throws Throwable { + Operation operation) throws Throwable { // 目前,只有管理员,才记录操作日志!所以非管理员,直接调用,不进行记录 Integer userType = WebFrameworkUtils.getLoginUserType(); if (!Objects.equals(userType, UserTypeEnum.ADMIN.getValue())) { @@ -101,10 +101,10 @@ public class OperateLogAspect { // 执行原有方法 Object result = joinPoint.proceed(); // 记录正常执行时的操作日志 - this.log(joinPoint, operateLog, apiOperation, startTime, result, null); + this.log(joinPoint, operateLog, operation, startTime, result, null); return result; } catch (Throwable exception) { - this.log(joinPoint, operateLog, apiOperation, startTime, null, exception); + this.log(joinPoint, operateLog, operation, startTime, null, exception); throw exception; } finally { clearThreadLocal(); @@ -129,7 +129,7 @@ public class OperateLogAspect { private void log(ProceedingJoinPoint joinPoint, cn.iocoder.yudao.framework.operatelog.core.annotations.OperateLog operateLog, - ApiOperation apiOperation, + Operation operation, LocalDateTime startTime, Object result, Throwable exception) { try { // 判断不记录的情况 @@ -137,16 +137,16 @@ public class OperateLogAspect { return; } // 真正记录操作日志 - this.log0(joinPoint, operateLog, apiOperation, startTime, result, exception); + this.log0(joinPoint, operateLog, operation, startTime, result, exception); } catch (Throwable ex) { log.error("[log][记录操作日志时,发生异常,其中参数是 joinPoint({}) operateLog({}) apiOperation({}) result({}) exception({}) ]", - joinPoint, operateLog, apiOperation, result, exception, ex); + joinPoint, operateLog, operation, result, exception, ex); } } private void log0(ProceedingJoinPoint joinPoint, cn.iocoder.yudao.framework.operatelog.core.annotations.OperateLog operateLog, - ApiOperation apiOperation, + Operation operation, LocalDateTime startTime, Object result, Throwable exception) { OperateLog operateLogObj = new OperateLog(); // 补全通用字段 @@ -155,7 +155,7 @@ public class OperateLogAspect { // 补充用户信息 fillUserFields(operateLogObj); // 补全模块信息 - fillModuleFields(operateLogObj, joinPoint, operateLog, apiOperation); + fillModuleFields(operateLogObj, joinPoint, operateLog, operation); // 补全请求信息 fillRequestFields(operateLogObj); // 补全方法信息 @@ -173,21 +173,21 @@ public class OperateLogAspect { private static void fillModuleFields(OperateLog operateLogObj, ProceedingJoinPoint joinPoint, cn.iocoder.yudao.framework.operatelog.core.annotations.OperateLog operateLog, - ApiOperation apiOperation) { + Operation operation) { // module 属性 if (operateLog != null) { operateLogObj.setModule(operateLog.module()); } if (StrUtil.isEmpty(operateLogObj.getModule())) { - Api api = getClassAnnotation(joinPoint, Api.class); - if (api != null) { - // 优先读取 @API 的 name 属性 - if (StrUtil.isNotEmpty(api.value())) { - operateLogObj.setModule(api.value()); + Tag tag = getClassAnnotation(joinPoint, Tag.class); + if (tag != null) { + // 优先读取 @Tag 的 name 属性 + if (StrUtil.isNotEmpty(tag.name())) { + operateLogObj.setModule(tag.name()); } - // 没有的话,读取 @API 的 tags 属性 - if (StrUtil.isEmpty(operateLogObj.getModule()) && ArrayUtil.isNotEmpty(api.tags())) { - operateLogObj.setModule(api.tags()[0]); + // 没有的话,读取 @API 的 description 属性 + if (StrUtil.isEmpty(operateLogObj.getModule()) && ArrayUtil.isNotEmpty(tag.description())) { + operateLogObj.setModule(tag.description()); } } } @@ -195,8 +195,8 @@ public class OperateLogAspect { if (operateLog != null) { operateLogObj.setName(operateLog.name()); } - if (StrUtil.isEmpty(operateLogObj.getName()) && apiOperation != null) { - operateLogObj.setName(apiOperation.value()); + if (StrUtil.isEmpty(operateLogObj.getName()) && operation != null) { + operateLogObj.setName(operation.description()); } // type 属性 if (operateLog != null && ArrayUtil.isNotEmpty(operateLog.type())) { @@ -268,9 +268,9 @@ public class OperateLogAspect { return null; } return Arrays.stream(requestMethods).filter(requestMethod -> - requestMethod == RequestMethod.POST - || requestMethod == RequestMethod.PUT - || requestMethod == RequestMethod.DELETE) + requestMethod == RequestMethod.POST + || requestMethod == RequestMethod.PUT + || requestMethod == RequestMethod.DELETE) .findFirst().orElse(null); } diff --git a/yudao-framework/yudao-spring-boot-starter-web/src/main/java/cn/iocoder/yudao/framework/swagger/config/SwaggerProperties.java b/yudao-framework/yudao-spring-boot-starter-web/src/main/java/cn/iocoder/yudao/framework/swagger/config/SwaggerProperties.java index d1008eddc..13a156881 100644 --- a/yudao-framework/yudao-spring-boot-starter-web/src/main/java/cn/iocoder/yudao/framework/swagger/config/SwaggerProperties.java +++ b/yudao-framework/yudao-spring-boot-starter-web/src/main/java/cn/iocoder/yudao/framework/swagger/config/SwaggerProperties.java @@ -35,9 +35,26 @@ public class SwaggerProperties { @NotEmpty(message = "版本不能为空") private String version; /** - * 扫描的包 + * url */ @NotEmpty(message = "扫描的 package 不能为空") - private String basePackage; + private String url; + /** + * email + */ + @NotEmpty(message = "扫描的 email 不能为空") + private String email; + + /** + * license + */ + @NotEmpty(message = "扫描的 license 不能为空") + private String license; + + /** + * license-url + */ + @NotEmpty(message = "扫描的 license-url 不能为空") + private String licenseUrl; } diff --git a/yudao-framework/yudao-spring-boot-starter-web/src/main/java/cn/iocoder/yudao/framework/swagger/config/YudaoSwaggerAutoConfiguration.java b/yudao-framework/yudao-spring-boot-starter-web/src/main/java/cn/iocoder/yudao/framework/swagger/config/YudaoSwaggerAutoConfiguration.java index 5ccbc06c4..2481d2b74 100644 --- a/yudao-framework/yudao-spring-boot-starter-web/src/main/java/cn/iocoder/yudao/framework/swagger/config/YudaoSwaggerAutoConfiguration.java +++ b/yudao-framework/yudao-spring-boot-starter-web/src/main/java/cn/iocoder/yudao/framework/swagger/config/YudaoSwaggerAutoConfiguration.java @@ -1,126 +1,155 @@ package cn.iocoder.yudao.framework.swagger.config; -import cn.iocoder.yudao.framework.swagger.core.SpringFoxHandlerProviderBeanPostProcessor; -import com.github.xiaoymin.knife4j.spring.annotations.EnableKnife4j; +import io.swagger.v3.oas.models.Components; +import io.swagger.v3.oas.models.OpenAPI; +import io.swagger.v3.oas.models.info.Contact; +import io.swagger.v3.oas.models.info.Info; +import io.swagger.v3.oas.models.info.License; +import io.swagger.v3.oas.models.media.IntegerSchema; +import io.swagger.v3.oas.models.media.StringSchema; +import io.swagger.v3.oas.models.parameters.Parameter; +import io.swagger.v3.oas.models.security.SecurityRequirement; +import io.swagger.v3.oas.models.security.SecurityScheme; +import org.springdoc.core.*; +import org.springdoc.core.customizers.OpenApiBuilderCustomizer; +import org.springdoc.core.customizers.ServerBaseUrlCustomizer; +import org.springdoc.core.providers.JavadocProvider; import org.springframework.boot.autoconfigure.AutoConfiguration; import org.springframework.boot.autoconfigure.condition.ConditionalOnClass; import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty; import org.springframework.boot.context.properties.EnableConfigurationProperties; import org.springframework.context.annotation.Bean; import org.springframework.http.HttpHeaders; -import springfox.documentation.builders.ApiInfoBuilder; -import springfox.documentation.builders.ParameterBuilder; -import springfox.documentation.builders.PathSelectors; -import springfox.documentation.schema.ModelRef; -import springfox.documentation.service.*; -import springfox.documentation.spi.DocumentationType; -import springfox.documentation.spi.service.contexts.SecurityContext; -import springfox.documentation.spring.web.plugins.Docket; -import springfox.documentation.swagger2.annotations.EnableSwagger2WebMvc; -import java.util.ArrayList; -import java.util.Collections; +import java.util.HashMap; import java.util.List; +import java.util.Map; +import java.util.Optional; import static cn.iocoder.yudao.framework.web.core.util.WebFrameworkUtils.HEADER_TENANT_ID; -import static springfox.documentation.builders.RequestHandlerSelectors.basePackage; /** - * Swagger2 自动配置类 + * Swagger 自动配置类,基于 OpenAPI + Springdoc 实现。 + * + * 友情提示: + * 1. Springdoc 文档地址:仓库 + * 2. Swagger 规范,于 2015 更名为 OpenAPI 规范,本质是一个东西 * * @author 芋道源码 */ @AutoConfiguration -@EnableSwagger2WebMvc -@EnableKnife4j -@ConditionalOnClass({Docket.class, ApiInfoBuilder.class}) -// 允许使用 swagger.enable=false 禁用 Swagger -@ConditionalOnProperty(prefix = "yudao.swagger", value = "enable", matchIfMissing = true) +@ConditionalOnClass({OpenAPI.class}) @EnableConfigurationProperties(SwaggerProperties.class) +@ConditionalOnProperty(prefix = "springdoc.api-docs", name = "enabled", havingValue = "true", matchIfMissing = true) // 设置为 false 时,禁用 public class YudaoSwaggerAutoConfiguration { - @Bean - public SpringFoxHandlerProviderBeanPostProcessor springFoxHandlerProviderBeanPostProcessor() { - return new SpringFoxHandlerProviderBeanPostProcessor(); - } + // ========== 全局 OpenAPI 配置 ========== @Bean - public Docket createRestApi(SwaggerProperties properties) { - // 创建 Docket 对象 - return new Docket(DocumentationType.SWAGGER_2) - // ① 用来创建该 API 的基本信息,展示在文档的页面中(自定义展示的信息) - .apiInfo(apiInfo(properties)) - // ② 设置扫描指定 package 包下的 - .select() - .apis(basePackage(properties.getBasePackage())) -// .apis(basePackage("cn.iocoder.yudao.module.system")) // 可用于 swagger 无法展示时使用 - .paths(PathSelectors.any()) - .build() - // ③ 安全上下文(认证) - .securitySchemes(securitySchemes()) - .securityContexts(securityContexts()) - // ④ 全局参数(多租户 header) - .globalOperationParameters(globalRequestParameters()); + public OpenAPI createApi(SwaggerProperties properties) { + Map securitySchemas = buildSecuritySchemes(); + OpenAPI openAPI = new OpenAPI() + // 接口信息 + .info(buildInfo(properties)) + // 接口安全配置 + .components(new Components().securitySchemes(securitySchemas)) + .addSecurityItem(new SecurityRequirement().addList(HttpHeaders.AUTHORIZATION)); + securitySchemas.keySet().forEach(key -> openAPI.addSecurityItem(new SecurityRequirement().addList(key))); + return openAPI; } - // ========== apiInfo ========== - /** * API 摘要信息 */ - private static ApiInfo apiInfo(SwaggerProperties properties) { - return new ApiInfoBuilder() + private Info buildInfo(SwaggerProperties properties) { + return new Info() .title(properties.getTitle()) .description(properties.getDescription()) - .contact(new Contact(properties.getAuthor(), null, null)) .version(properties.getVersion()) - .build(); + .contact(new Contact().name(properties.getAuthor()).url(properties.getUrl()).email(properties.getEmail())) + .license(new License().name(properties.getLicense()).url(properties.getLicenseUrl())); } - // ========== securitySchemes ========== - /** * 安全模式,这里配置通过请求头 Authorization 传递 token 参数 */ - private static List securitySchemes() { - return Collections.singletonList(new ApiKey(HttpHeaders.AUTHORIZATION, "Authorization", "header")); + private Map buildSecuritySchemes() { + Map securitySchemes = new HashMap<>(); + SecurityScheme securityScheme = new SecurityScheme() + .type(SecurityScheme.Type.APIKEY) // 类型 + .name(HttpHeaders.AUTHORIZATION) // 请求头的 name + .in(SecurityScheme.In.HEADER); // token 所在位置 + securitySchemes.put(HttpHeaders.AUTHORIZATION, securityScheme); + return securitySchemes; } /** - * 安全上下文 - * - * @see #securitySchemes() - * @see #authorizationScopes() + * 自定义 OpenAPI 处理器 */ - private static List securityContexts() { - return Collections.singletonList(SecurityContext.builder() - .securityReferences(securityReferences()) - // 通过 PathSelectors.regex("^(?!auth).*$"),排除包含 "auth" 的接口不需要使用securitySchemes - .forPaths(PathSelectors.regex("^(?!auth).*$")) - .build()); + @Bean + public OpenAPIService openApiBuilder(Optional openAPI, + SecurityService securityParser, + SpringDocConfigProperties springDocConfigProperties, + PropertyResolverUtils propertyResolverUtils, + Optional> openApiBuilderCustomizers, + Optional> serverBaseUrlCustomizers, + Optional javadocProvider) { + + return new OpenAPIService(openAPI, securityParser, springDocConfigProperties, + propertyResolverUtils, openApiBuilderCustomizers, serverBaseUrlCustomizers, javadocProvider); } - private static List securityReferences() { - return Collections.singletonList(new SecurityReference(HttpHeaders.AUTHORIZATION, authorizationScopes())); + // ========== 分组 OpenAPI 配置 ========== + + /** + * 所有模块的 API 分组 + */ + @Bean + public GroupedOpenApi allGroupedOpenApi() { + return buildGroupedOpenApi("all", ""); } - private static AuthorizationScope[] authorizationScopes() { - return new AuthorizationScope[]{new AuthorizationScope("global", "accessEverything")}; + public static GroupedOpenApi buildGroupedOpenApi(String group) { + return buildGroupedOpenApi(group, group); } - // ========== globalRequestParameters ========== + public static GroupedOpenApi buildGroupedOpenApi(String group, String path) { + return GroupedOpenApi.builder() + .group(group) + .pathsToMatch("/admin-api/" + path + "/**", "/app-api/" + path + "/**") + .addOperationCustomizer((operation, handlerMethod) -> operation + .addParametersItem(buildTenantHeaderParameter()) + .addParametersItem(buildSecurityHeaderParameter())) + .build(); + } - private static List globalRequestParameters() { - List tenantParameter = new ArrayList<>(); - tenantParameter.add(new ParameterBuilder() - .name(HEADER_TENANT_ID) - .description("租户编号") - .modelRef(new ModelRef("long")) - .defaultValue("1") - .parameterType("header") - .required(true) - .build()); - return tenantParameter; + /** + * 构建 Tenant 租户编号请求头参数 + * + * @return 多租户参数 + */ + private static Parameter buildTenantHeaderParameter() { + return new Parameter() + .name(HEADER_TENANT_ID) // header 名 + .description("租户编号") // 描述 + .in(String.valueOf(SecurityScheme.In.HEADER)) // 请求 header + .schema(new IntegerSchema()._default(1L).name(HEADER_TENANT_ID).description("租户编号")); // 默认:使用租户编号为 1 + } + + /** + * 构建 Authorization 认证请求头参数 + * + * 解决 Knife4j Authorize 未生效,请求header里未包含参数 + * + * @return 认证参数 + */ + private static Parameter buildSecurityHeaderParameter() { + return new Parameter() + .name(HttpHeaders.AUTHORIZATION) // header 名 + .description("认证 Token") // 描述 + .in(String.valueOf(SecurityScheme.In.HEADER)) // 请求 header + .schema(new StringSchema()._default("Bearer test1").name(HEADER_TENANT_ID).description("认证 Token")); // 默认:使用用户编号为 1 } } + diff --git a/yudao-framework/yudao-spring-boot-starter-web/src/main/java/cn/iocoder/yudao/framework/swagger/core/SpringFoxHandlerProviderBeanPostProcessor.java b/yudao-framework/yudao-spring-boot-starter-web/src/main/java/cn/iocoder/yudao/framework/swagger/core/SpringFoxHandlerProviderBeanPostProcessor.java index e43e2f0f8..38374336a 100644 --- a/yudao-framework/yudao-spring-boot-starter-web/src/main/java/cn/iocoder/yudao/framework/swagger/core/SpringFoxHandlerProviderBeanPostProcessor.java +++ b/yudao-framework/yudao-spring-boot-starter-web/src/main/java/cn/iocoder/yudao/framework/swagger/core/SpringFoxHandlerProviderBeanPostProcessor.java @@ -1,42 +1,42 @@ -package cn.iocoder.yudao.framework.swagger.core; - -import cn.hutool.core.util.ReflectUtil; -import cn.iocoder.yudao.framework.common.util.collection.CollectionUtils; -import org.springframework.beans.BeansException; -import org.springframework.beans.factory.config.BeanPostProcessor; -import org.springframework.web.servlet.mvc.method.RequestMappingInfoHandlerMapping; -import springfox.documentation.spring.web.plugins.WebMvcRequestHandlerProvider; - -import java.util.List; - -/** - * 解决 SpringFox 与 SpringBoot 2.6.x 不兼容的问题 - * 该问题对应的 issue 为 https://github.com/springfox/springfox/issues/3462 - * - * @author 芋道源码 - */ -public class SpringFoxHandlerProviderBeanPostProcessor implements BeanPostProcessor { - - @Override - public Object postProcessAfterInitialization(Object bean, String beanName) throws BeansException { - if (bean instanceof WebMvcRequestHandlerProvider) { - customizeSpringfoxHandlerMappings(getHandlerMappings(bean)); - } - return bean; - } - - private void customizeSpringfoxHandlerMappings(List mappings) { - // 移除,只保留 patternParser - List copy = CollectionUtils.filterList(mappings, mapping -> mapping.getPatternParser() == null); - // 添加到 mappings 中 - mappings.clear(); - mappings.addAll(copy); - } - - @SuppressWarnings("unchecked") - private List getHandlerMappings(Object bean) { - return (List) - ReflectUtil.getFieldValue(bean, "handlerMappings"); - } - -} +//package cn.iocoder.yudao.framework.swagger.core; +// +//import cn.hutool.core.util.ReflectUtil; +//import cn.iocoder.yudao.framework.common.util.collection.CollectionUtils; +//import org.springframework.beans.BeansException; +//import org.springframework.beans.factory.config.BeanPostProcessor; +//import org.springframework.web.servlet.mvc.method.RequestMappingInfoHandlerMapping; +//import springfox.documentation.spring.web.plugins.WebMvcRequestHandlerProvider; +// +//import java.util.List; +// +///** +// * 解决 SpringFox 与 SpringBoot 2.6.x 不兼容的问题 +// * 该问题对应的 issue 为 https://github.com/springfox/springfox/issues/3462 +// * +// * @author 芋道源码 +// */ +//public class SpringFoxHandlerProviderBeanPostProcessor implements BeanPostProcessor { +// +// @Override +// public Object postProcessAfterInitialization(Object bean, String beanName) throws BeansException { +// if (bean instanceof WebMvcRequestHandlerProvider) { +// customizeSpringfoxHandlerMappings(getHandlerMappings(bean)); +// } +// return bean; +// } +// +// private void customizeSpringfoxHandlerMappings(List mappings) { +// // 移除,只保留 patternParser +// List copy = CollectionUtils.filterList(mappings, mapping -> mapping.getPatternParser() == null); +// // 添加到 mappings 中 +// mappings.clear(); +// mappings.addAll(copy); +// } +// +// @SuppressWarnings("unchecked") +// private List getHandlerMappings(Object bean) { +// return (List) +// ReflectUtil.getFieldValue(bean, "handlerMappings"); +// } +// +//} diff --git a/yudao-framework/yudao-spring-boot-starter-web/src/main/resources/META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports b/yudao-framework/yudao-spring-boot-starter-web/src/main/resources/META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports index 314b3d807..93b2afc3a 100644 --- a/yudao-framework/yudao-spring-boot-starter-web/src/main/resources/META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports +++ b/yudao-framework/yudao-spring-boot-starter-web/src/main/resources/META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports @@ -1,5 +1,6 @@ -cn.iocoder.yudao.framework.apilog.config.YudaoApiLogRpcAutoConfiguration cn.iocoder.yudao.framework.apilog.config.YudaoApiLogAutoConfiguration cn.iocoder.yudao.framework.jackson.config.YudaoJacksonAutoConfiguration +com.github.xiaoymin.knife4j.spring.configuration.Knife4jAutoConfiguration cn.iocoder.yudao.framework.swagger.config.YudaoSwaggerAutoConfiguration cn.iocoder.yudao.framework.web.config.YudaoWebAutoConfiguration +cn.iocoder.yudao.framework.xss.config.YudaoXssAutoConfiguration diff --git a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/definition/BpmFormController.java b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/definition/BpmFormController.java index 217067f31..b1c9e4087 100644 --- a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/definition/BpmFormController.java +++ b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/definition/BpmFormController.java @@ -6,9 +6,9 @@ import cn.iocoder.yudao.module.bpm.dal.dataobject.definition.BpmFormDO; import cn.iocoder.yudao.module.bpm.service.definition.BpmFormService; import cn.iocoder.yudao.framework.common.pojo.CommonResult; import cn.iocoder.yudao.framework.common.pojo.PageResult; -import io.swagger.annotations.Api; -import io.swagger.annotations.ApiImplicitParam; -import io.swagger.annotations.ApiOperation; +import io.swagger.v3.oas.annotations.tags.Tag; +import io.swagger.v3.oas.annotations.Parameter; +import io.swagger.v3.oas.annotations.Operation; import org.springframework.security.access.prepost.PreAuthorize; import org.springframework.validation.annotation.Validated; import org.springframework.web.bind.annotation.*; @@ -19,7 +19,7 @@ import java.util.List; import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success; -@Api(tags = "管理后台 - 动态表单") +@Tag(name = "管理后台 - 动态表单") @RestController @RequestMapping("/bpm/form") @Validated @@ -29,14 +29,14 @@ public class BpmFormController { private BpmFormService formService; @PostMapping("/create") - @ApiOperation("创建动态表单") + @Operation(summary = "创建动态表单") @PreAuthorize("@ss.hasPermission('bpm:form:create')") public CommonResult createForm(@Valid @RequestBody BpmFormCreateReqVO createReqVO) { return success(formService.createForm(createReqVO)); } @PutMapping("/update") - @ApiOperation("更新动态表单") + @Operation(summary = "更新动态表单") @PreAuthorize("@ss.hasPermission('bpm:form:update')") public CommonResult updateForm(@Valid @RequestBody BpmFormUpdateReqVO updateReqVO) { formService.updateForm(updateReqVO); @@ -44,8 +44,8 @@ public class BpmFormController { } @DeleteMapping("/delete") - @ApiOperation("删除动态表单") - @ApiImplicitParam(name = "id", value = "编号", required = true, dataTypeClass = Long.class) + @Operation(summary = "删除动态表单") + @Parameter(name = "id", description = "编号", required = true) @PreAuthorize("@ss.hasPermission('bpm:form:delete')") public CommonResult deleteForm(@RequestParam("id") Long id) { formService.deleteForm(id); @@ -53,8 +53,8 @@ public class BpmFormController { } @GetMapping("/get") - @ApiOperation("获得动态表单") - @ApiImplicitParam(name = "id", value = "编号", required = true, example = "1024", dataTypeClass = Long.class) + @Operation(summary = "获得动态表单") + @Parameter(name = "id", description = "编号", required = true, example = "1024") @PreAuthorize("@ss.hasPermission('bpm:form:query')") public CommonResult getForm(@RequestParam("id") Long id) { BpmFormDO form = formService.getForm(id); @@ -62,18 +62,18 @@ public class BpmFormController { } @GetMapping("/list-all-simple") - @ApiOperation(value = "获得动态表单的精简列表", notes = "用于表单下拉框") + @Operation(summary = "获得动态表单的精简列表", description = "用于表单下拉框") public CommonResult> getSimpleForms() { List list = formService.getFormList(); return success(BpmFormConvert.INSTANCE.convertList2(list)); } @GetMapping("/page") - @ApiOperation("获得动态表单分页") + @Operation(summary = "获得动态表单分页") @PreAuthorize("@ss.hasPermission('bpm:form:query')") public CommonResult> getFormPage(@Valid BpmFormPageReqVO pageVO) { PageResult pageResult = formService.getFormPage(pageVO); return success(BpmFormConvert.INSTANCE.convertPage(pageResult)); } -} +} \ No newline at end of file diff --git a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/definition/BpmModelController.java b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/definition/BpmModelController.java index 3dd0a0a4d..d629b7546 100644 --- a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/definition/BpmModelController.java +++ b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/definition/BpmModelController.java @@ -6,9 +6,9 @@ import cn.iocoder.yudao.framework.common.util.io.IoUtils; import cn.iocoder.yudao.module.bpm.controller.admin.definition.vo.model.*; import cn.iocoder.yudao.module.bpm.convert.definition.BpmModelConvert; import cn.iocoder.yudao.module.bpm.service.definition.BpmModelService; -import io.swagger.annotations.Api; -import io.swagger.annotations.ApiImplicitParam; -import io.swagger.annotations.ApiOperation; +import io.swagger.v3.oas.annotations.tags.Tag; +import io.swagger.v3.oas.annotations.Parameter; +import io.swagger.v3.oas.annotations.Operation; import org.springframework.security.access.prepost.PreAuthorize; import org.springframework.validation.annotation.Validated; import org.springframework.web.bind.annotation.*; @@ -20,7 +20,7 @@ import java.io.IOException; import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success; -@Api(tags = "管理后台 - 流程模型") +@Tag(name = "管理后台 - 流程模型") @RestController @RequestMapping("/bpm/model") @Validated @@ -30,14 +30,14 @@ public class BpmModelController { private BpmModelService modelService; @GetMapping("/page") - @ApiOperation(value = "获得模型分页") + @Operation(summary = "获得模型分页") public CommonResult> getModelPage(BpmModelPageReqVO pageVO) { return success(modelService.getModelPage(pageVO)); } @GetMapping("/get") - @ApiOperation("获得模型") - @ApiImplicitParam(name = "id", value = "编号", required = true, example = "1024", dataTypeClass = String.class) + @Operation(summary = "获得模型") + @Parameter(name = "id", description = "编号", required = true, example = "1024") @PreAuthorize("@ss.hasPermission('bpm:model:query')") public CommonResult getModel(@RequestParam("id") String id) { BpmModelRespVO model = modelService.getModel(id); @@ -45,14 +45,14 @@ public class BpmModelController { } @PostMapping("/create") - @ApiOperation(value = "新建模型") + @Operation(summary = "新建模型") @PreAuthorize("@ss.hasPermission('bpm:model:create')") public CommonResult createModel(@Valid @RequestBody BpmModelCreateReqVO createRetVO) { return success(modelService.createModel(createRetVO, null)); } @PutMapping("/update") - @ApiOperation(value = "修改模型") + @Operation(summary = "修改模型") @PreAuthorize("@ss.hasPermission('bpm:model:update')") public CommonResult updateModel(@Valid @RequestBody BpmModelUpdateReqVO modelVO) { modelService.updateModel(modelVO); @@ -60,7 +60,7 @@ public class BpmModelController { } @PostMapping("/import") - @ApiOperation(value = "导入模型") + @Operation(summary = "导入模型") @PreAuthorize("@ss.hasPermission('bpm:model:import')") public CommonResult importModel(@Valid BpmModeImportReqVO importReqVO) throws IOException { BpmModelCreateReqVO createReqVO = BpmModelConvert.INSTANCE.convert(importReqVO); @@ -70,8 +70,8 @@ public class BpmModelController { } @PostMapping("/deploy") - @ApiOperation(value = "部署模型") - @ApiImplicitParam(name = "id", value = "编号", required = true, example = "1024", dataTypeClass = String.class) + @Operation(summary = "部署模型") + @Parameter(name = "id", description = "编号", required = true, example = "1024") @PreAuthorize("@ss.hasPermission('bpm:model:deploy')") public CommonResult deployModel(@RequestParam("id") String id) { modelService.deployModel(id); @@ -79,7 +79,7 @@ public class BpmModelController { } @PutMapping("/update-state") - @ApiOperation(value = "修改模型的状态", notes = "实际更新的部署的流程定义的状态") + @Operation(summary = "修改模型的状态", description = "实际更新的部署的流程定义的状态") @PreAuthorize("@ss.hasPermission('bpm:model:update')") public CommonResult updateModelState(@Valid @RequestBody BpmModelUpdateStateReqVO reqVO) { modelService.updateModelState(reqVO.getId(), reqVO.getState()); @@ -87,11 +87,11 @@ public class BpmModelController { } @DeleteMapping("/delete") - @ApiOperation("删除模型") - @ApiImplicitParam(name = "id", value = "编号", required = true, example = "1024", dataTypeClass = String.class) + @Operation(summary = "删除模型") + @Parameter(name = "id", description = "编号", required = true, example = "1024") @PreAuthorize("@ss.hasPermission('bpm:model:delete')") public CommonResult deleteModel(@RequestParam("id") String id) { modelService.deleteModel(id); return success(true); } -} +} \ No newline at end of file diff --git a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/definition/BpmProcessDefinitionController.java b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/definition/BpmProcessDefinitionController.java index ebcaad05b..f7035f0e8 100644 --- a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/definition/BpmProcessDefinitionController.java +++ b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/definition/BpmProcessDefinitionController.java @@ -7,9 +7,9 @@ import cn.iocoder.yudao.module.bpm.controller.admin.definition.vo.process.BpmPro import cn.iocoder.yudao.module.bpm.controller.admin.definition.vo.process.BpmProcessDefinitionPageReqVO; import cn.iocoder.yudao.module.bpm.controller.admin.definition.vo.process.BpmProcessDefinitionRespVO; import cn.iocoder.yudao.module.bpm.service.definition.BpmProcessDefinitionService; -import io.swagger.annotations.Api; -import io.swagger.annotations.ApiImplicitParam; -import io.swagger.annotations.ApiOperation; +import io.swagger.v3.oas.annotations.tags.Tag; +import io.swagger.v3.oas.annotations.Parameter; +import io.swagger.v3.oas.annotations.Operation; import org.springframework.security.access.prepost.PreAuthorize; import org.springframework.validation.annotation.Validated; import org.springframework.web.bind.annotation.GetMapping; @@ -23,7 +23,7 @@ import java.util.List; import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success; -@Api(tags = "管理后台 - 流程定义") +@Tag(name = "管理后台 - 流程定义") @RestController @RequestMapping("/bpm/process-definition") @Validated @@ -33,7 +33,7 @@ public class BpmProcessDefinitionController { private BpmProcessDefinitionService bpmDefinitionService; @GetMapping("/page") - @ApiOperation(value = "获得流程定义分页") + @Operation(summary = "获得流程定义分页") @PreAuthorize("@ss.hasPermission('bpm:process-definition:query')") public CommonResult> getProcessDefinitionPage( BpmProcessDefinitionPageReqVO pageReqVO) { @@ -41,7 +41,7 @@ public class BpmProcessDefinitionController { } @GetMapping ("/list") - @ApiOperation(value = "获得流程定义列表") + @Operation(summary = "获得流程定义列表") @PreAuthorize("@ss.hasPermission('bpm:process-definition:query')") public CommonResult> getProcessDefinitionList( BpmProcessDefinitionListReqVO listReqVO) { @@ -49,11 +49,11 @@ public class BpmProcessDefinitionController { } @GetMapping ("/get-bpmn-xml") - @ApiOperation(value = "获得流程定义的 BPMN XML") - @ApiImplicitParam(name = "id", value = "编号", required = true, example = "1024", dataTypeClass = String.class) + @Operation(summary = "获得流程定义的 BPMN XML") + @Parameter(name = "id", description = "编号", required = true, example = "1024") @PreAuthorize("@ss.hasPermission('bpm:process-definition:query')") public CommonResult getProcessDefinitionBpmnXML(@RequestParam("id") String id) { String bpmnXML = bpmDefinitionService.getProcessDefinitionBpmnXML(id); return success(bpmnXML); } -} +} \ No newline at end of file diff --git a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/definition/BpmTaskAssignRuleController.java b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/definition/BpmTaskAssignRuleController.java index 3e946707a..2933ec116 100644 --- a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/definition/BpmTaskAssignRuleController.java +++ b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/definition/BpmTaskAssignRuleController.java @@ -5,10 +5,10 @@ import cn.iocoder.yudao.module.bpm.controller.admin.definition.vo.rule.BpmTaskAs import cn.iocoder.yudao.module.bpm.controller.admin.definition.vo.rule.BpmTaskAssignRuleRespVO; import cn.iocoder.yudao.module.bpm.controller.admin.definition.vo.rule.BpmTaskAssignRuleUpdateReqVO; import cn.iocoder.yudao.module.bpm.service.definition.BpmTaskAssignRuleService; -import io.swagger.annotations.Api; -import io.swagger.annotations.ApiImplicitParam; -import io.swagger.annotations.ApiImplicitParams; -import io.swagger.annotations.ApiOperation; +import io.swagger.v3.oas.annotations.tags.Tag; +import io.swagger.v3.oas.annotations.Parameter; +import io.swagger.v3.oas.annotations.Parameters; +import io.swagger.v3.oas.annotations.Operation; import org.springframework.security.access.prepost.PreAuthorize; import org.springframework.validation.annotation.Validated; import org.springframework.web.bind.annotation.*; @@ -19,7 +19,7 @@ import java.util.List; import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success; -@Api(tags = "管理后台 - 任务分配规则") +@Tag(name = "管理后台 - 任务分配规则") @RestController @RequestMapping("/bpm/task-assign-rule") @Validated @@ -29,10 +29,10 @@ public class BpmTaskAssignRuleController { private BpmTaskAssignRuleService taskAssignRuleService; @GetMapping("/list") - @ApiOperation(value = "获得任务分配规则列表") - @ApiImplicitParams({ - @ApiImplicitParam(name = "modelId", value = "模型编号", example = "1024", dataTypeClass = String.class), - @ApiImplicitParam(name = "processDefinitionId", value = "流程定义的编号", example = "2048", dataTypeClass = String.class) + @Operation(summary = "获得任务分配规则列表") + @Parameters({ + @Parameter(name = "modelId", description = "模型编号", example = "1024"), + @Parameter(name = "processDefinitionId", description = "流程定义的编号", example = "2048") }) @PreAuthorize("@ss.hasPermission('bpm:task-assign-rule:query')") public CommonResult> getTaskAssignRuleList( @@ -42,17 +42,17 @@ public class BpmTaskAssignRuleController { } @PostMapping("/create") - @ApiOperation(value = "创建任务分配规则") + @Operation(summary = "创建任务分配规则") @PreAuthorize("@ss.hasPermission('bpm:task-assign-rule:create')") public CommonResult createTaskAssignRule(@Valid @RequestBody BpmTaskAssignRuleCreateReqVO reqVO) { return success(taskAssignRuleService.createTaskAssignRule(reqVO)); } @PutMapping("/update") - @ApiOperation(value = "更新任务分配规则") + @Operation(summary = "更新任务分配规则") @PreAuthorize("@ss.hasPermission('bpm:task-assign-rule:update')") public CommonResult updateTaskAssignRule(@Valid @RequestBody BpmTaskAssignRuleUpdateReqVO reqVO) { taskAssignRuleService.updateTaskAssignRule(reqVO); return success(true); } -} +} \ No newline at end of file diff --git a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/definition/BpmUserGroupController.java b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/definition/BpmUserGroupController.java index 4267f0902..6d86667c0 100644 --- a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/definition/BpmUserGroupController.java +++ b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/definition/BpmUserGroupController.java @@ -10,9 +10,9 @@ import cn.iocoder.yudao.module.bpm.service.definition.BpmUserGroupService; import cn.iocoder.yudao.framework.common.enums.CommonStatusEnum; import cn.iocoder.yudao.framework.common.pojo.CommonResult; import cn.iocoder.yudao.framework.common.pojo.PageResult; -import io.swagger.annotations.Api; -import io.swagger.annotations.ApiImplicitParam; -import io.swagger.annotations.ApiOperation; +import io.swagger.v3.oas.annotations.tags.Tag; +import io.swagger.v3.oas.annotations.Parameter; +import io.swagger.v3.oas.annotations.Operation; import org.springframework.security.access.prepost.PreAuthorize; import org.springframework.validation.annotation.Validated; import org.springframework.web.bind.annotation.*; @@ -23,7 +23,7 @@ import java.util.List; import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success; -@Api(tags = "管理后台 - 用户组") +@Tag(name = "管理后台 - 用户组") @RestController @RequestMapping("/bpm/user-group") @Validated @@ -33,14 +33,14 @@ public class BpmUserGroupController { private BpmUserGroupService userGroupService; @PostMapping("/create") - @ApiOperation("创建用户组") + @Operation(summary = "创建用户组") @PreAuthorize("@ss.hasPermission('bpm:user-group:create')") public CommonResult createUserGroup(@Valid @RequestBody BpmUserGroupCreateReqVO createReqVO) { return success(userGroupService.createUserGroup(createReqVO)); } @PutMapping("/update") - @ApiOperation("更新用户组") + @Operation(summary = "更新用户组") @PreAuthorize("@ss.hasPermission('bpm:user-group:update')") public CommonResult updateUserGroup(@Valid @RequestBody BpmUserGroupUpdateReqVO updateReqVO) { userGroupService.updateUserGroup(updateReqVO); @@ -48,8 +48,8 @@ public class BpmUserGroupController { } @DeleteMapping("/delete") - @ApiOperation("删除用户组") - @ApiImplicitParam(name = "id", value = "编号", required = true, dataTypeClass = Long.class) + @Operation(summary = "删除用户组") + @Parameter(name = "id", description = "编号", required = true) @PreAuthorize("@ss.hasPermission('bpm:user-group:delete')") public CommonResult deleteUserGroup(@RequestParam("id") Long id) { userGroupService.deleteUserGroup(id); @@ -57,8 +57,8 @@ public class BpmUserGroupController { } @GetMapping("/get") - @ApiOperation("获得用户组") - @ApiImplicitParam(name = "id", value = "编号", required = true, example = "1024", dataTypeClass = Long.class) + @Operation(summary = "获得用户组") + @Parameter(name = "id", description = "编号", required = true, example = "1024") @PreAuthorize("@ss.hasPermission('bpm:user-group:query')") public CommonResult getUserGroup(@RequestParam("id") Long id) { BpmUserGroupDO userGroup = userGroupService.getUserGroup(id); @@ -66,7 +66,7 @@ public class BpmUserGroupController { } @GetMapping("/page") - @ApiOperation("获得用户组分页") + @Operation(summary = "获得用户组分页") @PreAuthorize("@ss.hasPermission('bpm:user-group:query')") public CommonResult> getUserGroupPage(@Valid BpmUserGroupPageReqVO pageVO) { PageResult pageResult = userGroupService.getUserGroupPage(pageVO); @@ -74,7 +74,7 @@ public class BpmUserGroupController { } @GetMapping("/list-all-simple") - @ApiOperation(value = "获取用户组精简信息列表", notes = "只包含被开启的用户组,主要用于前端的下拉选项") + @Operation(summary = "获取用户组精简信息列表", description = "只包含被开启的用户组,主要用于前端的下拉选项") public CommonResult> getSimpleUserGroups() { // 获用户门列表,只要开启状态的 List list = userGroupService.getUserGroupListByStatus(CommonStatusEnum.ENABLE.getStatus()); @@ -82,4 +82,4 @@ public class BpmUserGroupController { return success(BpmUserGroupConvert.INSTANCE.convertList2(list)); } -} +} \ No newline at end of file diff --git a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/definition/vo/form/BpmFormBaseVO.java b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/definition/vo/form/BpmFormBaseVO.java index 11fee5c00..f42a54635 100644 --- a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/definition/vo/form/BpmFormBaseVO.java +++ b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/definition/vo/form/BpmFormBaseVO.java @@ -11,15 +11,15 @@ import javax.validation.constraints.*; @Data public class BpmFormBaseVO { - @ApiModelProperty(value = "表单名称", required = true, example = "芋道") + @Schema(description = "表单名称", required = true, example = "芋道") @NotNull(message = "表单名称不能为空") private String name; - @ApiModelProperty(value = "表单状态", required = true, notes = "参见 CommonStatusEnum 枚举", example = "1") + @Schema(description = "表单状态", required = true, notes = "参见 CommonStatusEnum 枚举", example = "1") @NotNull(message = "表单状态不能为空") private Integer status; - @ApiModelProperty(value = "备注", example = "我是备注") + @Schema(description = "备注", example = "我是备注") private String remark; -} +} \ No newline at end of file diff --git a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/definition/vo/form/BpmFormCreateReqVO.java b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/definition/vo/form/BpmFormCreateReqVO.java index d9a628125..709cc9e84 100644 --- a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/definition/vo/form/BpmFormCreateReqVO.java +++ b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/definition/vo/form/BpmFormCreateReqVO.java @@ -6,18 +6,18 @@ import io.swagger.annotations.*; import javax.validation.constraints.NotNull; import java.util.List; -@ApiModel("管理后台 - 动态表单创建 Request VO") +@Schema(description = "管理后台 - 动态表单创建 Request VO") @Data @EqualsAndHashCode(callSuper = true) @ToString(callSuper = true) public class BpmFormCreateReqVO extends BpmFormBaseVO { - @ApiModelProperty(value = "表单的配置", required = true, notes = "JSON 字符串") + @Schema(description = "表单的配置", required = true, notes = "JSON 字符串") @NotNull(message = "表单的配置不能为空") private String conf; - @ApiModelProperty(value = "表单项的数组", required = true, notes = "JSON 字符串的数组") + @Schema(description = "表单项的数组", required = true, notes = "JSON 字符串的数组") @NotNull(message = "表单项的数组不能为空") private List fields; -} +} \ No newline at end of file diff --git a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/definition/vo/form/BpmFormPageReqVO.java b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/definition/vo/form/BpmFormPageReqVO.java index a8097c437..60e5df7f6 100644 --- a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/definition/vo/form/BpmFormPageReqVO.java +++ b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/definition/vo/form/BpmFormPageReqVO.java @@ -1,19 +1,19 @@ package cn.iocoder.yudao.module.bpm.controller.admin.definition.vo.form; import cn.iocoder.yudao.framework.common.pojo.PageParam; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; +import io.swagger.v3.oas.annotations.media.Schema; +import io.swagger.v3.oas.annotations.media.Schema; import lombok.Data; import lombok.EqualsAndHashCode; import lombok.ToString; -@ApiModel("管理后台 - 动态表单分页 Request VO") +@Schema(description = "管理后台 - 动态表单分页 Request VO") @Data @EqualsAndHashCode(callSuper = true) @ToString(callSuper = true) public class BpmFormPageReqVO extends PageParam { - @ApiModelProperty(value = "表单名称", example = "芋道") + @Schema(description = "表单名称", example = "芋道") private String name; -} +} \ No newline at end of file diff --git a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/definition/vo/form/BpmFormRespVO.java b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/definition/vo/form/BpmFormRespVO.java index e49f09879..a193c64a4 100644 --- a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/definition/vo/form/BpmFormRespVO.java +++ b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/definition/vo/form/BpmFormRespVO.java @@ -1,7 +1,7 @@ package cn.iocoder.yudao.module.bpm.controller.admin.definition.vo.form; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; +import io.swagger.v3.oas.annotations.media.Schema; +import io.swagger.v3.oas.annotations.media.Schema; import lombok.Data; import lombok.EqualsAndHashCode; import lombok.ToString; @@ -10,24 +10,24 @@ import javax.validation.constraints.NotNull; import java.time.LocalDateTime; import java.util.List; -@ApiModel("管理后台 - 动态表单 Response VO") +@Schema(description = "管理后台 - 动态表单 Response VO") @Data @EqualsAndHashCode(callSuper = true) @ToString(callSuper = true) public class BpmFormRespVO extends BpmFormBaseVO { - @ApiModelProperty(value = "表单编号", required = true, example = "1024") + @Schema(description = "表单编号", required = true, example = "1024") private Long id; - @ApiModelProperty(value = "表单的配置", required = true, notes = "JSON 字符串") + @Schema(description = "表单的配置", required = true, notes = "JSON 字符串") @NotNull(message = "表单的配置不能为空") private String conf; - @ApiModelProperty(value = "表单项的数组", required = true, notes = "JSON 字符串的数组") + @Schema(description = "表单项的数组", required = true, notes = "JSON 字符串的数组") @NotNull(message = "表单项的数组不能为空") private List fields; - @ApiModelProperty(value = "创建时间", required = true) + @Schema(description = "创建时间", required = true) private LocalDateTime createTime; -} +} \ No newline at end of file diff --git a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/definition/vo/form/BpmFormSimpleRespVO.java b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/definition/vo/form/BpmFormSimpleRespVO.java index 3a6b3c093..f62d63766 100644 --- a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/definition/vo/form/BpmFormSimpleRespVO.java +++ b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/definition/vo/form/BpmFormSimpleRespVO.java @@ -1,17 +1,17 @@ package cn.iocoder.yudao.module.bpm.controller.admin.definition.vo.form; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; +import io.swagger.v3.oas.annotations.media.Schema; +import io.swagger.v3.oas.annotations.media.Schema; import lombok.Data; -@ApiModel("管理后台 - 流程表单精简 Response VO") +@Schema(description = "管理后台 - 流程表单精简 Response VO") @Data public class BpmFormSimpleRespVO { - @ApiModelProperty(value = "表单编号", required = true, example = "1024") + @Schema(description = "表单编号", required = true, example = "1024") private Long id; - @ApiModelProperty(value = "表单名称", required = true, example = "芋道") + @Schema(description = "表单名称", required = true, example = "芋道") private String name; -} +} \ No newline at end of file diff --git a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/definition/vo/form/BpmFormUpdateReqVO.java b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/definition/vo/form/BpmFormUpdateReqVO.java index 55b997679..b165937ca 100644 --- a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/definition/vo/form/BpmFormUpdateReqVO.java +++ b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/definition/vo/form/BpmFormUpdateReqVO.java @@ -5,22 +5,22 @@ import io.swagger.annotations.*; import javax.validation.constraints.*; import java.util.List; -@ApiModel("管理后台 - 动态表单更新 Request VO") +@Schema(description = "管理后台 - 动态表单更新 Request VO") @Data @EqualsAndHashCode(callSuper = true) @ToString(callSuper = true) public class BpmFormUpdateReqVO extends BpmFormBaseVO { - @ApiModelProperty(value = "表单编号", required = true, example = "1024") + @Schema(description = "表单编号", required = true, example = "1024") @NotNull(message = "表单编号不能为空") private Long id; - @ApiModelProperty(value = "表单的配置", required = true, notes = "JSON 字符串") + @Schema(description = "表单的配置", required = true, notes = "JSON 字符串") @NotNull(message = "表单的配置不能为空") private String conf; - @ApiModelProperty(value = "表单项的数组", required = true, notes = "JSON 字符串的数组") + @Schema(description = "表单项的数组", required = true, notes = "JSON 字符串的数组") @NotNull(message = "表单项的数组不能为空") private List fields; -} +} \ No newline at end of file diff --git a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/definition/vo/group/BpmUserGroupBaseVO.java b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/definition/vo/group/BpmUserGroupBaseVO.java index e0dfe568e..f8fb489cb 100644 --- a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/definition/vo/group/BpmUserGroupBaseVO.java +++ b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/definition/vo/group/BpmUserGroupBaseVO.java @@ -12,20 +12,20 @@ import javax.validation.constraints.*; @Data public class BpmUserGroupBaseVO { - @ApiModelProperty(value = "组名", required = true, example = "芋道") + @Schema(description = "组名", required = true, example = "芋道") @NotNull(message = "组名不能为空") private String name; - @ApiModelProperty(value = "描述", required = true, example = "芋道源码") + @Schema(description = "描述", required = true, example = "芋道源码") @NotNull(message = "描述不能为空") private String description; - @ApiModelProperty(value = "成员编号数组", required = true, example = "1,2,3") + @Schema(description = "成员编号数组", required = true, example = "1,2,3") @NotNull(message = "成员编号数组不能为空") private Set memberUserIds; - @ApiModelProperty(value = "状态", required = true, example = "1") + @Schema(description = "状态", required = true, example = "1") @NotNull(message = "状态不能为空") private Integer status; -} +} \ No newline at end of file diff --git a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/definition/vo/group/BpmUserGroupCreateReqVO.java b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/definition/vo/group/BpmUserGroupCreateReqVO.java index 48b44d38b..c28fa6ef2 100644 --- a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/definition/vo/group/BpmUserGroupCreateReqVO.java +++ b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/definition/vo/group/BpmUserGroupCreateReqVO.java @@ -3,10 +3,10 @@ package cn.iocoder.yudao.module.bpm.controller.admin.definition.vo.group; import lombok.*; import io.swagger.annotations.*; -@ApiModel("管理后台 - 用户组创建 Request VO") +@Schema(description = "管理后台 - 用户组创建 Request VO") @Data @EqualsAndHashCode(callSuper = true) @ToString(callSuper = true) public class BpmUserGroupCreateReqVO extends BpmUserGroupBaseVO { -} +} \ No newline at end of file diff --git a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/definition/vo/group/BpmUserGroupPageReqVO.java b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/definition/vo/group/BpmUserGroupPageReqVO.java index 2608607bf..3e60fe774 100644 --- a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/definition/vo/group/BpmUserGroupPageReqVO.java +++ b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/definition/vo/group/BpmUserGroupPageReqVO.java @@ -2,8 +2,8 @@ package cn.iocoder.yudao.module.bpm.controller.admin.definition.vo.group; import cn.iocoder.yudao.framework.common.pojo.PageParam; import cn.iocoder.yudao.framework.common.util.date.DateUtils; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; +import io.swagger.v3.oas.annotations.media.Schema; +import io.swagger.v3.oas.annotations.media.Schema; import lombok.Data; import lombok.EqualsAndHashCode; import lombok.ToString; @@ -11,20 +11,20 @@ import org.springframework.format.annotation.DateTimeFormat; import java.time.LocalDateTime; -@ApiModel("管理后台 - 用户组分页 Request VO") +@Schema(description = "管理后台 - 用户组分页 Request VO") @Data @EqualsAndHashCode(callSuper = true) @ToString(callSuper = true) public class BpmUserGroupPageReqVO extends PageParam { - @ApiModelProperty(value = "组名", example = "芋道") + @Schema(description = "组名", example = "芋道") private String name; - @ApiModelProperty(value = "状态", example = "1") + @Schema(description = "状态", example = "1") private Integer status; @DateTimeFormat(pattern = DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND) - @ApiModelProperty(value = "创建时间") + @Schema(description = "创建时间") private LocalDateTime[] createTime; -} +} \ No newline at end of file diff --git a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/definition/vo/group/BpmUserGroupRespVO.java b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/definition/vo/group/BpmUserGroupRespVO.java index f240016d6..69fb2627d 100644 --- a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/definition/vo/group/BpmUserGroupRespVO.java +++ b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/definition/vo/group/BpmUserGroupRespVO.java @@ -6,16 +6,16 @@ import java.time.LocalDateTime; import java.util.*; import io.swagger.annotations.*; -@ApiModel("管理后台 - 用户组 Response VO") +@Schema(description = "管理后台 - 用户组 Response VO") @Data @EqualsAndHashCode(callSuper = true) @ToString(callSuper = true) public class BpmUserGroupRespVO extends BpmUserGroupBaseVO { - @ApiModelProperty(value = "编号", required = true, example = "1024") + @Schema(description = "编号", required = true, example = "1024") private Long id; - @ApiModelProperty(value = "创建时间", required = true) + @Schema(description = "创建时间", required = true) private LocalDateTime createTime; -} +} \ No newline at end of file diff --git a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/definition/vo/group/BpmUserGroupSimpleRespVO.java b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/definition/vo/group/BpmUserGroupSimpleRespVO.java index 0b47f447e..5afcc5375 100644 --- a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/definition/vo/group/BpmUserGroupSimpleRespVO.java +++ b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/definition/vo/group/BpmUserGroupSimpleRespVO.java @@ -1,21 +1,21 @@ package cn.iocoder.yudao.module.bpm.controller.admin.definition.vo.group; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; +import io.swagger.v3.oas.annotations.media.Schema; +import io.swagger.v3.oas.annotations.media.Schema; import lombok.AllArgsConstructor; import lombok.Data; import lombok.NoArgsConstructor; -@ApiModel("管理后台 - 用户组精简信息 Response VO") +@Schema(description = "管理后台 - 用户组精简信息 Response VO") @Data @NoArgsConstructor @AllArgsConstructor public class BpmUserGroupSimpleRespVO { - @ApiModelProperty(value = "用户组编号", required = true, example = "1024") + @Schema(description = "用户组编号", required = true, example = "1024") private Long id; - @ApiModelProperty(value = "用户组名字", required = true, example = "芋道") + @Schema(description = "用户组名字", required = true, example = "芋道") private String name; -} +} \ No newline at end of file diff --git a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/definition/vo/group/BpmUserGroupUpdateReqVO.java b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/definition/vo/group/BpmUserGroupUpdateReqVO.java index 14aa25c5b..eae33ff7a 100644 --- a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/definition/vo/group/BpmUserGroupUpdateReqVO.java +++ b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/definition/vo/group/BpmUserGroupUpdateReqVO.java @@ -4,14 +4,14 @@ import lombok.*; import io.swagger.annotations.*; import javax.validation.constraints.*; -@ApiModel("管理后台 - 用户组更新 Request VO") +@Schema(description = "管理后台 - 用户组更新 Request VO") @Data @EqualsAndHashCode(callSuper = true) @ToString(callSuper = true) public class BpmUserGroupUpdateReqVO extends BpmUserGroupBaseVO { - @ApiModelProperty(value = "编号", required = true, example = "1024") + @Schema(description = "编号", required = true, example = "1024") @NotNull(message = "编号不能为空") private Long id; -} +} \ No newline at end of file diff --git a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/definition/vo/model/BpmModeImportReqVO.java b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/definition/vo/model/BpmModeImportReqVO.java index 7240ba15c..11ceb4cc5 100644 --- a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/definition/vo/model/BpmModeImportReqVO.java +++ b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/definition/vo/model/BpmModeImportReqVO.java @@ -1,7 +1,7 @@ package cn.iocoder.yudao.module.bpm.controller.admin.definition.vo.model; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; +import io.swagger.v3.oas.annotations.media.Schema; +import io.swagger.v3.oas.annotations.media.Schema; import lombok.Data; import lombok.EqualsAndHashCode; import lombok.ToString; @@ -9,14 +9,14 @@ import org.springframework.web.multipart.MultipartFile; import javax.validation.constraints.NotNull; -@ApiModel(value = "管理后台 - 流程模型的导入 Request VO", description = "相比流程模型的新建来说,只是多了一个 bpmnFile 文件") +@Schema(description = value = "管理后台 - 流程模型的导入 Request VO", description = "相比流程模型的新建来说,只是多了一个 bpmnFile 文件") @Data @EqualsAndHashCode(callSuper = true) @ToString(callSuper = true) public class BpmModeImportReqVO extends BpmModelCreateReqVO { - @ApiModelProperty(value = "BPMN 文件", required = true) + @Schema(description = "BPMN 文件", required = true) @NotNull(message = "BPMN 文件不能为空") private MultipartFile bpmnFile; -} +} \ No newline at end of file diff --git a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/definition/vo/model/BpmModelBaseVO.java b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/definition/vo/model/BpmModelBaseVO.java index 542a177e4..272a1a75b 100644 --- a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/definition/vo/model/BpmModelBaseVO.java +++ b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/definition/vo/model/BpmModelBaseVO.java @@ -1,6 +1,6 @@ package cn.iocoder.yudao.module.bpm.controller.admin.definition.vo.model; -import io.swagger.annotations.ApiModelProperty; +import io.swagger.v3.oas.annotations.media.Schema; import lombok.Data; import javax.validation.constraints.NotEmpty; @@ -12,30 +12,30 @@ import javax.validation.constraints.NotEmpty; @Data public class BpmModelBaseVO { - @ApiModelProperty(value = "流程标识", required = true, example = "process_yudao") + @Schema(description = "流程标识", required = true, example = "process_yudao") @NotEmpty(message = "流程标识不能为空") private String key; - @ApiModelProperty(value = "流程名称", required = true, example = "芋道") + @Schema(description = "流程名称", required = true, example = "芋道") @NotEmpty(message = "流程名称不能为空") private String name; - @ApiModelProperty(value = "流程描述", example = "我是描述") + @Schema(description = "流程描述", example = "我是描述") private String description; - @ApiModelProperty(value = "流程分类", notes = "参见 bpm_model_category 数据字典", example = "1") + @Schema(description = "流程分类", notes = "参见 bpm_model_category 数据字典", example = "1") @NotEmpty(message = "流程分类不能为空") private String category; - @ApiModelProperty(value = "表单类型", notes = "参见 bpm_model_form_type 数据字典", example = "1") + @Schema(description = "表单类型", notes = "参见 bpm_model_form_type 数据字典", example = "1") private Integer formType; - @ApiModelProperty(value = "表单编号", example = "1024", notes = "在表单类型为 {@link BpmModelFormTypeEnum#CUSTOM} 时,必须非空") + @Schema(description = "表单编号", example = "1024", notes = "在表单类型为 {@link BpmModelFormTypeEnum#CUSTOM} 时,必须非空") private Long formId; - @ApiModelProperty(value = "自定义表单的提交路径,使用 Vue 的路由地址", example = "/bpm/oa/leave/create", + @Schema(description = "自定义表单的提交路径,使用 Vue 的路由地址", example = "/bpm/oa/leave/create", notes = "在表单类型为 {@link BpmModelFormTypeEnum#CUSTOM} 时,必须非空") private String formCustomCreatePath; - @ApiModelProperty(value = "自定义表单的查看路径,使用 Vue 的路由地址", example = "/bpm/oa/leave/view", + @Schema(description = "自定义表单的查看路径,使用 Vue 的路由地址", example = "/bpm/oa/leave/view", notes = "在表单类型为 {@link BpmModelFormTypeEnum#CUSTOM} 时,必须非空") private String formCustomViewPath; -} +} \ No newline at end of file diff --git a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/definition/vo/model/BpmModelCreateReqVO.java b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/definition/vo/model/BpmModelCreateReqVO.java index c85ef3ae4..3b5605e1c 100644 --- a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/definition/vo/model/BpmModelCreateReqVO.java +++ b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/definition/vo/model/BpmModelCreateReqVO.java @@ -1,26 +1,26 @@ package cn.iocoder.yudao.module.bpm.controller.admin.definition.vo.model; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; +import io.swagger.v3.oas.annotations.media.Schema; +import io.swagger.v3.oas.annotations.media.Schema; import lombok.Data; import lombok.EqualsAndHashCode; import lombok.ToString; import javax.validation.constraints.NotEmpty; -@ApiModel("管理后台 - 流程模型的创建 Request VO") +@Schema(description = "管理后台 - 流程模型的创建 Request VO") @Data public class BpmModelCreateReqVO { - @ApiModelProperty(value = "流程标识", required = true, example = "process_yudao") + @Schema(description = "流程标识", required = true, example = "process_yudao") @NotEmpty(message = "流程标识不能为空") private String key; - @ApiModelProperty(value = "流程名称", required = true, example = "芋道") + @Schema(description = "流程名称", required = true, example = "芋道") @NotEmpty(message = "流程名称不能为空") private String name; - @ApiModelProperty(value = "流程描述", example = "我是描述") + @Schema(description = "流程描述", example = "我是描述") private String description; -} +} \ No newline at end of file diff --git a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/definition/vo/model/BpmModelPageItemRespVO.java b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/definition/vo/model/BpmModelPageItemRespVO.java index 10d23892e..3861b6e24 100644 --- a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/definition/vo/model/BpmModelPageItemRespVO.java +++ b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/definition/vo/model/BpmModelPageItemRespVO.java @@ -1,26 +1,26 @@ package cn.iocoder.yudao.module.bpm.controller.admin.definition.vo.model; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; +import io.swagger.v3.oas.annotations.media.Schema; +import io.swagger.v3.oas.annotations.media.Schema; import lombok.Data; import lombok.EqualsAndHashCode; import lombok.ToString; import java.time.LocalDateTime; -@ApiModel("管理后台 - 流程模型的分页的每一项 Response VO") +@Schema(description = "管理后台 - 流程模型的分页的每一项 Response VO") @Data @EqualsAndHashCode(callSuper = true) @ToString(callSuper = true) public class BpmModelPageItemRespVO extends BpmModelBaseVO { - @ApiModelProperty(value = "编号", required = true, example = "1024") + @Schema(description = "编号", required = true, example = "1024") private String id; - @ApiModelProperty(value = "表单名字", example = "请假表单") + @Schema(description = "表单名字", example = "请假表单") private String formName; - @ApiModelProperty(value = "创建时间", required = true) + @Schema(description = "创建时间", required = true) private LocalDateTime createTime; /** @@ -28,22 +28,22 @@ public class BpmModelPageItemRespVO extends BpmModelBaseVO { */ private ProcessDefinition processDefinition; - @ApiModel("流程定义") + @Schema(description = "流程定义") @Data public static class ProcessDefinition { - @ApiModelProperty(value = "编号", required = true, example = "1024") + @Schema(description = "编号", required = true, example = "1024") private String id; - @ApiModelProperty(value = "版本", required = true, example = "1") + @Schema(description = "版本", required = true, example = "1") private Integer version; - @ApiModelProperty(value = "部署时间", required = true) + @Schema(description = "部署时间", required = true) private LocalDateTime deploymentTime; - @ApiModelProperty(value = "中断状态", required = true, example = "1", notes = "参见 SuspensionState 枚举") + @Schema(description = "中断状态", required = true, example = "1", notes = "参见 SuspensionState 枚举") private Integer suspensionState; } -} +} \ No newline at end of file diff --git a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/definition/vo/model/BpmModelPageReqVO.java b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/definition/vo/model/BpmModelPageReqVO.java index 945da139c..b901f9cc7 100644 --- a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/definition/vo/model/BpmModelPageReqVO.java +++ b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/definition/vo/model/BpmModelPageReqVO.java @@ -1,26 +1,26 @@ package cn.iocoder.yudao.module.bpm.controller.admin.definition.vo.model; import cn.iocoder.yudao.framework.common.pojo.PageParam; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; +import io.swagger.v3.oas.annotations.media.Schema; +import io.swagger.v3.oas.annotations.media.Schema; import lombok.Data; import lombok.EqualsAndHashCode; import lombok.ToString; -@ApiModel("管理后台 - 流程模型分页 Request VO") +@Schema(description = "管理后台 - 流程模型分页 Request VO") @Data @EqualsAndHashCode(callSuper = true) @ToString(callSuper = true) public class BpmModelPageReqVO extends PageParam { - @ApiModelProperty(value = "标识", example = "process1641042089407", notes = "精准匹配") + @Schema(description = "标识", example = "process1641042089407", notes = "精准匹配") private String key; - @ApiModelProperty(value = "名字", example = "芋道", notes = "模糊匹配") + @Schema(description = "名字", example = "芋道", notes = "模糊匹配") private String name; - @ApiModelProperty(value = "流程分类", notes = "参见 bpm_model_category 数据字典", example = "1") + @Schema(description = "流程分类", notes = "参见 bpm_model_category 数据字典", example = "1") private String category; -} +} \ No newline at end of file diff --git a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/definition/vo/model/BpmModelRespVO.java b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/definition/vo/model/BpmModelRespVO.java index 571850ff0..251853bb0 100644 --- a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/definition/vo/model/BpmModelRespVO.java +++ b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/definition/vo/model/BpmModelRespVO.java @@ -1,26 +1,26 @@ package cn.iocoder.yudao.module.bpm.controller.admin.definition.vo.model; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; +import io.swagger.v3.oas.annotations.media.Schema; +import io.swagger.v3.oas.annotations.media.Schema; import lombok.Data; import lombok.EqualsAndHashCode; import lombok.ToString; import java.time.LocalDateTime; -@ApiModel("管理后台 - 流程模型的创建 Request VO") +@Schema(description = "管理后台 - 流程模型的创建 Request VO") @Data @EqualsAndHashCode(callSuper = true) @ToString(callSuper = true) public class BpmModelRespVO extends BpmModelBaseVO { - @ApiModelProperty(value = "编号", required = true, example = "1024") + @Schema(description = "编号", required = true, example = "1024") private String id; - @ApiModelProperty(value = "BPMN XML", required = true) + @Schema(description = "BPMN XML", required = true) private String bpmnXml; - @ApiModelProperty(value = "创建时间", required = true) + @Schema(description = "创建时间", required = true) private LocalDateTime createTime; -} +} \ No newline at end of file diff --git a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/definition/vo/model/BpmModelUpdateReqVO.java b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/definition/vo/model/BpmModelUpdateReqVO.java index 972aa31bb..0a4029c5f 100644 --- a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/definition/vo/model/BpmModelUpdateReqVO.java +++ b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/definition/vo/model/BpmModelUpdateReqVO.java @@ -1,40 +1,40 @@ package cn.iocoder.yudao.module.bpm.controller.admin.definition.vo.model; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; +import io.swagger.v3.oas.annotations.media.Schema; +import io.swagger.v3.oas.annotations.media.Schema; import lombok.Data; import javax.validation.constraints.NotEmpty; -@ApiModel("管理后台 - 流程模型的更新 Request VO") +@Schema(description = "管理后台 - 流程模型的更新 Request VO") @Data public class BpmModelUpdateReqVO { - @ApiModelProperty(value = "编号", required = true, example = "1024") + @Schema(description = "编号", required = true, example = "1024") @NotEmpty(message = "编号不能为空") private String id; - @ApiModelProperty(value = "流程名称", example = "芋道") + @Schema(description = "流程名称", example = "芋道") private String name; - @ApiModelProperty(value = "流程描述", example = "我是描述") + @Schema(description = "流程描述", example = "我是描述") private String description; - @ApiModelProperty(value = "流程分类", notes = "参见 bpm_model_category 数据字典", example = "1") + @Schema(description = "流程分类", notes = "参见 bpm_model_category 数据字典", example = "1") private String category; - @ApiModelProperty(value = "BPMN XML", required = true) + @Schema(description = "BPMN XML", required = true) private String bpmnXml; - @ApiModelProperty(value = "表单类型", notes = "参见 bpm_model_form_type 数据字典", example = "1") + @Schema(description = "表单类型", notes = "参见 bpm_model_form_type 数据字典", example = "1") private Integer formType; - @ApiModelProperty(value = "表单编号", example = "1024", notes = "在表单类型为 {@link BpmModelFormTypeEnum#CUSTOM} 时,必须非空") + @Schema(description = "表单编号", example = "1024", notes = "在表单类型为 {@link BpmModelFormTypeEnum#CUSTOM} 时,必须非空") private Long formId; - @ApiModelProperty(value = "自定义表单的提交路径,使用 Vue 的路由地址", example = "/bpm/oa/leave/create", + @Schema(description = "自定义表单的提交路径,使用 Vue 的路由地址", example = "/bpm/oa/leave/create", notes = "在表单类型为 {@link BpmModelFormTypeEnum#CUSTOM} 时,必须非空") private String formCustomCreatePath; - @ApiModelProperty(value = "自定义表单的查看路径,使用 Vue 的路由地址", example = "/bpm/oa/leave/view", + @Schema(description = "自定义表单的查看路径,使用 Vue 的路由地址", example = "/bpm/oa/leave/view", notes = "在表单类型为 {@link BpmModelFormTypeEnum#CUSTOM} 时,必须非空") private String formCustomViewPath; -} +} \ No newline at end of file diff --git a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/definition/vo/model/BpmModelUpdateStateReqVO.java b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/definition/vo/model/BpmModelUpdateStateReqVO.java index 9cfcebbdc..81ed1160a 100644 --- a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/definition/vo/model/BpmModelUpdateStateReqVO.java +++ b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/definition/vo/model/BpmModelUpdateStateReqVO.java @@ -1,21 +1,21 @@ package cn.iocoder.yudao.module.bpm.controller.admin.definition.vo.model; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; +import io.swagger.v3.oas.annotations.media.Schema; +import io.swagger.v3.oas.annotations.media.Schema; import lombok.Data; import javax.validation.constraints.NotNull; -@ApiModel("管理后台 - 流程模型更新状态 Request VO") +@Schema(description = "管理后台 - 流程模型更新状态 Request VO") @Data public class BpmModelUpdateStateReqVO { - @ApiModelProperty(value = "编号", required = true, example = "1024") + @Schema(description = "编号", required = true, example = "1024") @NotNull(message = "编号不能为空") private String id; - @ApiModelProperty(value = "状态", required = true, example = "1", notes = "见 SuspensionState 枚举") + @Schema(description = "状态", required = true, example = "1", notes = "见 SuspensionState 枚举") @NotNull(message = "状态不能为空") private Integer state; -} +} \ No newline at end of file diff --git a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/definition/vo/process/BpmProcessDefinitionListReqVO.java b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/definition/vo/process/BpmProcessDefinitionListReqVO.java index 5e45b8bde..ef5d90d3f 100644 --- a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/definition/vo/process/BpmProcessDefinitionListReqVO.java +++ b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/definition/vo/process/BpmProcessDefinitionListReqVO.java @@ -1,19 +1,19 @@ package cn.iocoder.yudao.module.bpm.controller.admin.definition.vo.process; import cn.iocoder.yudao.framework.common.pojo.PageParam; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; +import io.swagger.v3.oas.annotations.media.Schema; +import io.swagger.v3.oas.annotations.media.Schema; import lombok.Data; import lombok.EqualsAndHashCode; import lombok.ToString; -@ApiModel("管理后台 - 流程定义列表 Request VO") +@Schema(description = "管理后台 - 流程定义列表 Request VO") @Data @ToString(callSuper = true) @EqualsAndHashCode(callSuper = true) public class BpmProcessDefinitionListReqVO extends PageParam { - @ApiModelProperty(value = "中断状态", example = "1", notes = "参见 SuspensionState 枚举") + @Schema(description = "中断状态", example = "1", notes = "参见 SuspensionState 枚举") private Integer suspensionState; -} +} \ No newline at end of file diff --git a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/definition/vo/process/BpmProcessDefinitionPageItemRespVO.java b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/definition/vo/process/BpmProcessDefinitionPageItemRespVO.java index 1952e95a7..18f3a214e 100644 --- a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/definition/vo/process/BpmProcessDefinitionPageItemRespVO.java +++ b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/definition/vo/process/BpmProcessDefinitionPageItemRespVO.java @@ -1,23 +1,23 @@ package cn.iocoder.yudao.module.bpm.controller.admin.definition.vo.process; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; +import io.swagger.v3.oas.annotations.media.Schema; +import io.swagger.v3.oas.annotations.media.Schema; import lombok.Data; import lombok.EqualsAndHashCode; import lombok.ToString; import java.time.LocalDateTime; -@ApiModel("管理后台 - 流程定义的分页的每一项 Response VO") +@Schema(description = "管理后台 - 流程定义的分页的每一项 Response VO") @Data @EqualsAndHashCode(callSuper = true) @ToString(callSuper = true) public class BpmProcessDefinitionPageItemRespVO extends BpmProcessDefinitionRespVO { - @ApiModelProperty(value = "表单名字", example = "请假表单") + @Schema(description = "表单名字", example = "请假表单") private String formName; - @ApiModelProperty(value = "部署时间", required = true) + @Schema(description = "部署时间", required = true) private LocalDateTime deploymentTime; -} +} \ No newline at end of file diff --git a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/definition/vo/process/BpmProcessDefinitionPageReqVO.java b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/definition/vo/process/BpmProcessDefinitionPageReqVO.java index a9657e9a2..e01ec4746 100644 --- a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/definition/vo/process/BpmProcessDefinitionPageReqVO.java +++ b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/definition/vo/process/BpmProcessDefinitionPageReqVO.java @@ -1,19 +1,19 @@ package cn.iocoder.yudao.module.bpm.controller.admin.definition.vo.process; import cn.iocoder.yudao.framework.common.pojo.PageParam; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; +import io.swagger.v3.oas.annotations.media.Schema; +import io.swagger.v3.oas.annotations.media.Schema; import lombok.Data; import lombok.EqualsAndHashCode; import lombok.ToString; -@ApiModel("管理后台 - 流程定义分页 Request VO") +@Schema(description = "管理后台 - 流程定义分页 Request VO") @Data @ToString(callSuper = true) @EqualsAndHashCode(callSuper = true) public class BpmProcessDefinitionPageReqVO extends PageParam { - @ApiModelProperty(value = "标识", example = "process1641042089407", notes = "精准匹配") + @Schema(description = "标识", example = "process1641042089407", notes = "精准匹配") private String key; -} +} \ No newline at end of file diff --git a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/definition/vo/process/BpmProcessDefinitionRespVO.java b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/definition/vo/process/BpmProcessDefinitionRespVO.java index 6f8fd4e5b..6c51e40d2 100644 --- a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/definition/vo/process/BpmProcessDefinitionRespVO.java +++ b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/definition/vo/process/BpmProcessDefinitionRespVO.java @@ -1,52 +1,52 @@ package cn.iocoder.yudao.module.bpm.controller.admin.definition.vo.process; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; +import io.swagger.v3.oas.annotations.media.Schema; +import io.swagger.v3.oas.annotations.media.Schema; import lombok.Data; import javax.validation.constraints.NotEmpty; import javax.validation.constraints.NotNull; import java.util.List; -@ApiModel("管理后台 - 流程定义 Response VO") +@Schema(description = "管理后台 - 流程定义 Response VO") @Data public class BpmProcessDefinitionRespVO { - @ApiModelProperty(value = "编号", required = true, example = "1024") + @Schema(description = "编号", required = true, example = "1024") private String id; - @ApiModelProperty(value = "版本", required = true, example = "1") + @Schema(description = "版本", required = true, example = "1") private Integer version; - @ApiModelProperty(value = "流程名称", required = true, example = "芋道") + @Schema(description = "流程名称", required = true, example = "芋道") @NotEmpty(message = "流程名称不能为空") private String name; - @ApiModelProperty(value = "流程描述", example = "我是描述") + @Schema(description = "流程描述", example = "我是描述") private String description; - @ApiModelProperty(value = "流程分类", notes = "参见 bpm_model_category 数据字典", example = "1") + @Schema(description = "流程分类", notes = "参见 bpm_model_category 数据字典", example = "1") @NotEmpty(message = "流程分类不能为空") private String category; - @ApiModelProperty(value = "表单类型", notes = "参见 bpm_model_form_type 数据字典", example = "1") + @Schema(description = "表单类型", notes = "参见 bpm_model_form_type 数据字典", example = "1") private Integer formType; - @ApiModelProperty(value = "表单编号", example = "1024", notes = "在表单类型为 {@link BpmModelFormTypeEnum#CUSTOM} 时,必须非空") + @Schema(description = "表单编号", example = "1024", notes = "在表单类型为 {@link BpmModelFormTypeEnum#CUSTOM} 时,必须非空") private Long formId; - @ApiModelProperty(value = "表单的配置", required = true, + @Schema(description = "表单的配置", required = true, notes = "JSON 字符串。在表单类型为 {@link BpmModelFormTypeEnum#CUSTOM} 时,必须非空") private String formConf; - @ApiModelProperty(value = "表单项的数组", required = true, + @Schema(description = "表单项的数组", required = true, notes = "JSON 字符串的数组。在表单类型为 {@link BpmModelFormTypeEnum#CUSTOM} 时,必须非空") private List formFields; - @ApiModelProperty(value = "自定义表单的提交路径,使用 Vue 的路由地址", example = "/bpm/oa/leave/create", + @Schema(description = "自定义表单的提交路径,使用 Vue 的路由地址", example = "/bpm/oa/leave/create", notes = "在表单类型为 {@link BpmModelFormTypeEnum#CUSTOM} 时,必须非空") private String formCustomCreatePath; - @ApiModelProperty(value = "自定义表单的查看路径,使用 Vue 的路由地址", example = "/bpm/oa/leave/view", + @Schema(description = "自定义表单的查看路径,使用 Vue 的路由地址", example = "/bpm/oa/leave/view", notes = "在表单类型为 {@link BpmModelFormTypeEnum#CUSTOM} 时,必须非空") private String formCustomViewPath; - @ApiModelProperty(value = "中断状态", required = true, example = "1", notes = "参见 SuspensionState 枚举") + @Schema(description = "中断状态", required = true, example = "1", notes = "参见 SuspensionState 枚举") private Integer suspensionState; -} +} \ No newline at end of file diff --git a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/definition/vo/rule/BpmTaskAssignRuleBaseVO.java b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/definition/vo/rule/BpmTaskAssignRuleBaseVO.java index bcb9fc0f0..0ec4097d0 100644 --- a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/definition/vo/rule/BpmTaskAssignRuleBaseVO.java +++ b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/definition/vo/rule/BpmTaskAssignRuleBaseVO.java @@ -1,6 +1,6 @@ package cn.iocoder.yudao.module.bpm.controller.admin.definition.vo.rule; -import io.swagger.annotations.ApiModelProperty; +import io.swagger.v3.oas.annotations.media.Schema; import lombok.Data; import javax.validation.constraints.NotEmpty; @@ -14,12 +14,12 @@ import java.util.Set; @Data public class BpmTaskAssignRuleBaseVO { - @ApiModelProperty(value = "规则类型", required = true, example = "bpm_task_assign_rule_type") + @Schema(description = "规则类型", required = true, example = "bpm_task_assign_rule_type") @NotNull(message = "规则类型不能为空") private Integer type; - @ApiModelProperty(value = "规则值数组", required = true, example = "1,2,3") + @Schema(description = "规则值数组", required = true, example = "1,2,3") @NotNull(message = "规则值数组不能为空") private Set options; -} +} \ No newline at end of file diff --git a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/definition/vo/rule/BpmTaskAssignRuleCreateReqVO.java b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/definition/vo/rule/BpmTaskAssignRuleCreateReqVO.java index cbbc108c0..37976bafb 100644 --- a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/definition/vo/rule/BpmTaskAssignRuleCreateReqVO.java +++ b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/definition/vo/rule/BpmTaskAssignRuleCreateReqVO.java @@ -1,25 +1,25 @@ package cn.iocoder.yudao.module.bpm.controller.admin.definition.vo.rule; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; +import io.swagger.v3.oas.annotations.media.Schema; +import io.swagger.v3.oas.annotations.media.Schema; import lombok.Data; import lombok.EqualsAndHashCode; import lombok.ToString; import javax.validation.constraints.NotEmpty; -@ApiModel("管理后台 - 流程任务分配规则的创建 Request VO") +@Schema(description = "管理后台 - 流程任务分配规则的创建 Request VO") @Data @EqualsAndHashCode(callSuper = true) @ToString(callSuper = true) public class BpmTaskAssignRuleCreateReqVO extends BpmTaskAssignRuleBaseVO { - @ApiModelProperty(value = "流程模型的编号", required = true, example = "1024") + @Schema(description = "流程模型的编号", required = true, example = "1024") @NotEmpty(message = "流程模型的编号不能为空") private String modelId; - @ApiModelProperty(value = "流程任务定义的编号", required = true, example = "2048") + @Schema(description = "流程任务定义的编号", required = true, example = "2048") @NotEmpty(message = "流程任务定义的编号不能为空") private String taskDefinitionKey; -} +} \ No newline at end of file diff --git a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/definition/vo/rule/BpmTaskAssignRuleRespVO.java b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/definition/vo/rule/BpmTaskAssignRuleRespVO.java index c0786e52b..622c8b02e 100644 --- a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/definition/vo/rule/BpmTaskAssignRuleRespVO.java +++ b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/definition/vo/rule/BpmTaskAssignRuleRespVO.java @@ -1,29 +1,29 @@ package cn.iocoder.yudao.module.bpm.controller.admin.definition.vo.rule; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; +import io.swagger.v3.oas.annotations.media.Schema; +import io.swagger.v3.oas.annotations.media.Schema; import lombok.Data; import lombok.EqualsAndHashCode; import lombok.ToString; -@ApiModel("管理后台 - 流程任务分配规则的 Response VO") +@Schema(description = "管理后台 - 流程任务分配规则的 Response VO") @Data @EqualsAndHashCode(callSuper = true) @ToString(callSuper = true) public class BpmTaskAssignRuleRespVO extends BpmTaskAssignRuleBaseVO { - @ApiModelProperty(value = "任务分配规则的编号", required = true, example = "1024") + @Schema(description = "任务分配规则的编号", required = true, example = "1024") private Long id; - @ApiModelProperty(value = "流程模型的编号", required = true, example = "2048") + @Schema(description = "流程模型的编号", required = true, example = "2048") private String modelId; - @ApiModelProperty(value = "流程定义的编号", required = true, example = "4096") + @Schema(description = "流程定义的编号", required = true, example = "4096") private String processDefinitionId; - @ApiModelProperty(value = "流程任务定义的编号", required = true, example = "2048") + @Schema(description = "流程任务定义的编号", required = true, example = "2048") private String taskDefinitionKey; - @ApiModelProperty(value = "流程任务定义的名字", required = true, example = "关注芋道") + @Schema(description = "流程任务定义的名字", required = true, example = "关注芋道") private String taskDefinitionName; -} +} \ No newline at end of file diff --git a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/definition/vo/rule/BpmTaskAssignRuleUpdateReqVO.java b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/definition/vo/rule/BpmTaskAssignRuleUpdateReqVO.java index 8f1c12701..ffb5a4a88 100644 --- a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/definition/vo/rule/BpmTaskAssignRuleUpdateReqVO.java +++ b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/definition/vo/rule/BpmTaskAssignRuleUpdateReqVO.java @@ -1,21 +1,21 @@ package cn.iocoder.yudao.module.bpm.controller.admin.definition.vo.rule; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; +import io.swagger.v3.oas.annotations.media.Schema; +import io.swagger.v3.oas.annotations.media.Schema; import lombok.Data; import lombok.EqualsAndHashCode; import lombok.ToString; import javax.validation.constraints.NotNull; -@ApiModel("管理后台 - 流程任务分配规则的更新 Request VO") +@Schema(description = "管理后台 - 流程任务分配规则的更新 Request VO") @Data @EqualsAndHashCode(callSuper = true) @ToString(callSuper = true) public class BpmTaskAssignRuleUpdateReqVO extends BpmTaskAssignRuleBaseVO { - @ApiModelProperty(value = "任务分配规则的编号", required = true, example = "1024") + @Schema(description = "任务分配规则的编号", required = true, example = "1024") @NotNull(message = "任务分配规则的编号不能为空") private Long id; -} +} \ No newline at end of file diff --git a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/oa/BpmOALeaveController.java b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/oa/BpmOALeaveController.java index dd66580d3..ff4075995 100644 --- a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/oa/BpmOALeaveController.java +++ b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/oa/BpmOALeaveController.java @@ -8,9 +8,9 @@ import cn.iocoder.yudao.module.bpm.dal.dataobject.oa.BpmOALeaveDO; import cn.iocoder.yudao.framework.common.pojo.CommonResult; import cn.iocoder.yudao.framework.common.pojo.PageResult; import cn.iocoder.yudao.module.bpm.service.oa.BpmOALeaveService; -import io.swagger.annotations.Api; -import io.swagger.annotations.ApiImplicitParam; -import io.swagger.annotations.ApiOperation; +import io.swagger.v3.oas.annotations.tags.Tag; +import io.swagger.v3.oas.annotations.Parameter; +import io.swagger.v3.oas.annotations.Operation; import org.springframework.security.access.prepost.PreAuthorize; import org.springframework.validation.annotation.Validated; import org.springframework.web.bind.annotation.*; @@ -27,7 +27,7 @@ import static cn.iocoder.yudao.framework.security.core.util.SecurityFrameworkUti * @author jason * @author 芋道源码 */ -@Api(tags = "管理后台 - OA 请假申请") +@Tag(name = "管理后台 - OA 请假申请") @RestController @RequestMapping("/bpm/oa/leave") @Validated @@ -38,15 +38,15 @@ public class BpmOALeaveController { @PostMapping("/create") @PreAuthorize("@ss.hasPermission('bpm:oa-leave:create')") - @ApiOperation("创建请求申请") + @Operation(summary = "创建请求申请") public CommonResult createLeave(@Valid @RequestBody BpmOALeaveCreateReqVO createReqVO) { return success(leaveService.createLeave(getLoginUserId(), createReqVO)); } @GetMapping("/get") @PreAuthorize("@ss.hasPermission('bpm:oa-leave:query')") - @ApiOperation("获得请假申请") - @ApiImplicitParam(name = "id", value = "编号", required = true, example = "1024", dataTypeClass = Long.class) + @Operation(summary = "获得请假申请") + @Parameter(name = "id", description = "编号", required = true, example = "1024") public CommonResult getLeave(@RequestParam("id") Long id) { BpmOALeaveDO leave = leaveService.getLeave(id); return success(BpmOALeaveConvert.INSTANCE.convert(leave)); @@ -54,10 +54,10 @@ public class BpmOALeaveController { @GetMapping("/page") @PreAuthorize("@ss.hasPermission('bpm:oa-leave:query')") - @ApiOperation("获得请假申请分页") + @Operation(summary = "获得请假申请分页") public CommonResult> getLeavePage(@Valid BpmOALeavePageReqVO pageVO) { PageResult pageResult = leaveService.getLeavePage(getLoginUserId(), pageVO); return success(BpmOALeaveConvert.INSTANCE.convertPage(pageResult)); } -} +} \ No newline at end of file diff --git a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/oa/vo/BpmOALeaveBaseVO.java b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/oa/vo/BpmOALeaveBaseVO.java index be34b428d..ec84b3794 100644 --- a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/oa/vo/BpmOALeaveBaseVO.java +++ b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/oa/vo/BpmOALeaveBaseVO.java @@ -1,6 +1,6 @@ package cn.iocoder.yudao.module.bpm.controller.admin.oa.vo; -import io.swagger.annotations.ApiModelProperty; +import io.swagger.v3.oas.annotations.media.Schema; import lombok.Data; import org.springframework.format.annotation.DateTimeFormat; @@ -16,19 +16,19 @@ import static cn.iocoder.yudao.framework.common.util.date.DateUtils.FORMAT_YEAR_ @Data public class BpmOALeaveBaseVO { - @ApiModelProperty(value = "请假的开始时间", required = true) + @Schema(description = "请假的开始时间", required = true) @NotNull(message = "开始时间不能为空") @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND) private LocalDateTime startTime; - @ApiModelProperty(value = "请假的结束时间", required = true) + @Schema(description = "请假的结束时间", required = true) @NotNull(message = "结束时间不能为空") @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND) private LocalDateTime endTime; - @ApiModelProperty(value = "请假类型", required = true, example = "1", notes = "参见 bpm_oa_type 枚举") + @Schema(description = "请假类型", required = true, example = "1", notes = "参见 bpm_oa_type 枚举") private Integer type; - @ApiModelProperty(value = "原因", required = true, example = "阅读芋道源码") + @Schema(description = "原因", required = true, example = "阅读芋道源码") private String reason; -} +} \ No newline at end of file diff --git a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/oa/vo/BpmOALeavePageReqVO.java b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/oa/vo/BpmOALeavePageReqVO.java index 2e49efaa1..98ac0cd22 100644 --- a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/oa/vo/BpmOALeavePageReqVO.java +++ b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/oa/vo/BpmOALeavePageReqVO.java @@ -8,23 +8,23 @@ import org.springframework.format.annotation.DateTimeFormat; import static cn.iocoder.yudao.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND; -@ApiModel("管理后台 - 请假申请分页 Request VO") +@Schema(description = "管理后台 - 请假申请分页 Request VO") @Data @EqualsAndHashCode(callSuper = true) @ToString(callSuper = true) public class BpmOALeavePageReqVO extends PageParam { - @ApiModelProperty(value = "状态", example = "1", notes = "参见 bpm_process_instance_result 枚举") + @Schema(description = "状态", example = "1", notes = "参见 bpm_process_instance_result 枚举") private Integer result; - @ApiModelProperty(value = "请假类型", example = "1", notes = "参见 bpm_oa_type") + @Schema(description = "请假类型", example = "1", notes = "参见 bpm_oa_type") private Integer type; - @ApiModelProperty(value = "原因", example = "阅读芋道源码", notes = "模糊匹配") + @Schema(description = "原因", example = "阅读芋道源码", notes = "模糊匹配") private String reason; @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND) - @ApiModelProperty(value = "申请时间") + @Schema(description = "申请时间") private Date[] createTime; -} +} \ No newline at end of file diff --git a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/oa/vo/BpmOALeaveRespVO.java b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/oa/vo/BpmOALeaveRespVO.java index 42b3ec66c..1da373aa8 100644 --- a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/oa/vo/BpmOALeaveRespVO.java +++ b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/oa/vo/BpmOALeaveRespVO.java @@ -9,24 +9,24 @@ import java.time.LocalDateTime; import static cn.iocoder.yudao.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND; -@ApiModel("管理后台 - 请假申请 Response VO") +@Schema(description = "管理后台 - 请假申请 Response VO") @Data @EqualsAndHashCode(callSuper = true) @ToString(callSuper = true) public class BpmOALeaveRespVO extends BpmOALeaveBaseVO { - @ApiModelProperty(value = "请假表单主键", required = true, example = "1024") + @Schema(description = "请假表单主键", required = true, example = "1024") private Long id; - @ApiModelProperty(value = "状态", required = true, example = "1", notes = "参见 bpm_process_instance_result 枚举") + @Schema(description = "状态", required = true, example = "1", notes = "参见 bpm_process_instance_result 枚举") private Integer result; - @ApiModelProperty(value = "申请时间", required = true) + @Schema(description = "申请时间", required = true) @NotNull(message = "申请时间不能为空") @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND) private LocalDateTime createTime; - @ApiModelProperty(value = "流程id") + @Schema(description = "流程id") private String processInstanceId; -} +} \ No newline at end of file diff --git a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/task/BpmActivityController.java b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/task/BpmActivityController.java index 24d89cd36..718327eb8 100644 --- a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/task/BpmActivityController.java +++ b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/task/BpmActivityController.java @@ -3,9 +3,9 @@ package cn.iocoder.yudao.module.bpm.controller.admin.task; import cn.iocoder.yudao.framework.common.pojo.CommonResult; import cn.iocoder.yudao.module.bpm.controller.admin.task.vo.activity.BpmActivityRespVO; import cn.iocoder.yudao.module.bpm.service.task.BpmActivityService; -import io.swagger.annotations.Api; -import io.swagger.annotations.ApiImplicitParam; -import io.swagger.annotations.ApiOperation; +import io.swagger.v3.oas.annotations.tags.Tag; +import io.swagger.v3.oas.annotations.Parameter; +import io.swagger.v3.oas.annotations.Operation; import org.springframework.security.access.prepost.PreAuthorize; import org.springframework.validation.annotation.Validated; import org.springframework.web.bind.annotation.GetMapping; @@ -18,7 +18,7 @@ import java.util.List; import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success; -@Api(tags = "管理后台 - 流程活动实例") +@Tag(name = "管理后台 - 流程活动实例") @RestController @RequestMapping("/bpm/activity") @Validated @@ -28,12 +28,12 @@ public class BpmActivityController { private BpmActivityService activityService; @GetMapping("/list") - @ApiOperation(value = "生成指定流程实例的高亮流程图", + @Operation(summary = "生成指定流程实例的高亮流程图", notes = "只高亮进行中的任务。不过要注意,该接口暂时没用,通过前端的 ProcessViewer.vue 界面的 highlightDiagram 方法生成") - @ApiImplicitParam(name = "processInstanceId", value = "流程实例的编号", required = true, dataTypeClass = String.class) + @Parameter(name = "processInstanceId", description = "流程实例的编号", required = true) @PreAuthorize("@ss.hasPermission('bpm:task:query')") public CommonResult> getActivityList( @RequestParam("processInstanceId") String processInstanceId) { return success(activityService.getActivityListByProcessInstanceId(processInstanceId)); } -} +} \ No newline at end of file diff --git a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/task/BpmProcessInstanceController.java b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/task/BpmProcessInstanceController.java index 31abf7de1..c7d86d008 100644 --- a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/task/BpmProcessInstanceController.java +++ b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/task/BpmProcessInstanceController.java @@ -4,9 +4,9 @@ import cn.iocoder.yudao.framework.common.pojo.CommonResult; import cn.iocoder.yudao.framework.common.pojo.PageResult; import cn.iocoder.yudao.module.bpm.controller.admin.task.vo.instance.*; import cn.iocoder.yudao.module.bpm.service.task.BpmProcessInstanceService; -import io.swagger.annotations.Api; -import io.swagger.annotations.ApiImplicitParam; -import io.swagger.annotations.ApiOperation; +import io.swagger.v3.oas.annotations.tags.Tag; +import io.swagger.v3.oas.annotations.Parameter; +import io.swagger.v3.oas.annotations.Operation; import org.springframework.security.access.prepost.PreAuthorize; import org.springframework.validation.annotation.Validated; import org.springframework.web.bind.annotation.*; @@ -17,7 +17,7 @@ import javax.validation.Valid; import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success; import static cn.iocoder.yudao.framework.security.core.util.SecurityFrameworkUtils.getLoginUserId; -@Api(tags = "管理后台 - 流程实例") // 流程实例,通过流程定义创建的一次“申请” +@Tag(name = "管理后台 - 流程实例") // 流程实例,通过流程定义创建的一次“申请” @RestController @RequestMapping("/bpm/process-instance") @Validated @@ -27,7 +27,7 @@ public class BpmProcessInstanceController { private BpmProcessInstanceService processInstanceService; @GetMapping("/my-page") - @ApiOperation(value = "获得我的实例分页列表", notes = "在【我的流程】菜单中,进行调用") + @Operation(summary = "获得我的实例分页列表", description = "在【我的流程】菜单中,进行调用") @PreAuthorize("@ss.hasPermission('bpm:process-instance:query')") public CommonResult> getMyProcessInstancePage( @Valid BpmProcessInstanceMyPageReqVO pageReqVO) { @@ -35,25 +35,25 @@ public class BpmProcessInstanceController { } @PostMapping("/create") - @ApiOperation("新建流程实例") + @Operation(summary = "新建流程实例") @PreAuthorize("@ss.hasPermission('bpm:process-instance:query')") public CommonResult createProcessInstance(@Valid @RequestBody BpmProcessInstanceCreateReqVO createReqVO) { return success(processInstanceService.createProcessInstance(getLoginUserId(), createReqVO)); } @GetMapping("/get") - @ApiOperation(value = "获得指定流程实例", notes = "在【流程详细】界面中,进行调用") - @ApiImplicitParam(name = "id", value = "流程实例的编号", required = true, dataTypeClass = String.class) + @Operation(summary = "获得指定流程实例", description = "在【流程详细】界面中,进行调用") + @Parameter(name = "id", description = "流程实例的编号", required = true) @PreAuthorize("@ss.hasPermission('bpm:process-instance:query')") public CommonResult getProcessInstance(@RequestParam("id") String id) { return success(processInstanceService.getProcessInstanceVO(id)); } @DeleteMapping("/cancel") - @ApiOperation(value = "取消流程实例", notes = "撤回发起的流程") + @Operation(summary = "取消流程实例", description = "撤回发起的流程") @PreAuthorize("@ss.hasPermission('bpm:process-instance:cancel')") public CommonResult cancelProcessInstance(@Valid @RequestBody BpmProcessInstanceCancelReqVO cancelReqVO) { processInstanceService.cancelProcessInstance(getLoginUserId(), cancelReqVO); return success(true); } -} +} \ No newline at end of file diff --git a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/task/BpmTaskController.java b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/task/BpmTaskController.java index eaa991f55..e706267f1 100644 --- a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/task/BpmTaskController.java +++ b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/task/BpmTaskController.java @@ -4,9 +4,9 @@ import cn.iocoder.yudao.framework.common.pojo.CommonResult; import cn.iocoder.yudao.framework.common.pojo.PageResult; import cn.iocoder.yudao.module.bpm.controller.admin.task.vo.task.*; import cn.iocoder.yudao.module.bpm.service.task.BpmTaskService; -import io.swagger.annotations.Api; -import io.swagger.annotations.ApiImplicitParam; -import io.swagger.annotations.ApiOperation; +import io.swagger.v3.oas.annotations.tags.Tag; +import io.swagger.v3.oas.annotations.Parameter; +import io.swagger.v3.oas.annotations.Operation; import org.springframework.security.access.prepost.PreAuthorize; import org.springframework.validation.annotation.Validated; import org.springframework.web.bind.annotation.*; @@ -19,7 +19,7 @@ import java.util.List; import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success; import static cn.iocoder.yudao.framework.web.core.util.WebFrameworkUtils.getLoginUserId; -@Api(tags = "管理后台 - 流程任务实例") +@Tag(name = "管理后台 - 流程任务实例") @RestController @RequestMapping("/bpm/task") @Validated @@ -29,22 +29,22 @@ public class BpmTaskController { private BpmTaskService taskService; @GetMapping("todo-page") - @ApiOperation("获取 Todo 待办任务分页") + @Operation(summary = "获取 Todo 待办任务分页") @PreAuthorize("@ss.hasPermission('bpm:task:query')") public CommonResult> getTodoTaskPage(@Valid BpmTaskTodoPageReqVO pageVO) { return success(taskService.getTodoTaskPage(getLoginUserId(), pageVO)); } @GetMapping("done-page") - @ApiOperation("获取 Done 已办任务分页") + @Operation(summary = "获取 Done 已办任务分页") @PreAuthorize("@ss.hasPermission('bpm:task:query')") public CommonResult> getDoneTaskPage(@Valid BpmTaskDonePageReqVO pageVO) { return success(taskService.getDoneTaskPage(getLoginUserId(), pageVO)); } @GetMapping("/list-by-process-instance-id") - @ApiOperation(value = "获得指定流程实例的任务列表", notes = "包括完成的、未完成的") - @ApiImplicitParam(name = "processInstanceId", value = "流程实例的编号", required = true, dataTypeClass = String.class) + @Operation(summary = "获得指定流程实例的任务列表", description = "包括完成的、未完成的") + @Parameter(name = "processInstanceId", description = "流程实例的编号", required = true) @PreAuthorize("@ss.hasPermission('bpm:task:query')") public CommonResult> getTaskListByProcessInstanceId( @RequestParam("processInstanceId") String processInstanceId) { @@ -52,7 +52,7 @@ public class BpmTaskController { } @PutMapping("/approve") - @ApiOperation("通过任务") + @Operation(summary = "通过任务") @PreAuthorize("@ss.hasPermission('bpm:task:update')") public CommonResult approveTask(@Valid @RequestBody BpmTaskApproveReqVO reqVO) { taskService.approveTask(getLoginUserId(), reqVO); @@ -60,7 +60,7 @@ public class BpmTaskController { } @PutMapping("/reject") - @ApiOperation("不通过任务") + @Operation(summary = "不通过任务") @PreAuthorize("@ss.hasPermission('bpm:task:update')") public CommonResult rejectTask(@Valid @RequestBody BpmTaskRejectReqVO reqVO) { taskService.rejectTask(getLoginUserId(), reqVO); @@ -68,11 +68,11 @@ public class BpmTaskController { } @PutMapping("/update-assignee") - @ApiOperation(value = "更新任务的负责人", notes = "用于【流程详情】的【转派】按钮") + @Operation(summary = "更新任务的负责人", description = "用于【流程详情】的【转派】按钮") @PreAuthorize("@ss.hasPermission('bpm:task:update')") public CommonResult updateTaskAssignee(@Valid @RequestBody BpmTaskUpdateAssigneeReqVO reqVO) { taskService.updateTaskAssignee(getLoginUserId(), reqVO); return success(true); } -} +} \ No newline at end of file diff --git a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/task/vo/activity/BpmActivityRespVO.java b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/task/vo/activity/BpmActivityRespVO.java index 7f183f50c..a8fe5b7e1 100644 --- a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/task/vo/activity/BpmActivityRespVO.java +++ b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/task/vo/activity/BpmActivityRespVO.java @@ -1,26 +1,26 @@ package cn.iocoder.yudao.module.bpm.controller.admin.task.vo.activity; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; +import io.swagger.v3.oas.annotations.media.Schema; +import io.swagger.v3.oas.annotations.media.Schema; import lombok.Data; import java.time.LocalDateTime; -@ApiModel("管理后台 - 流程活动的 Response VO") +@Schema(description = "管理后台 - 流程活动的 Response VO") @Data public class BpmActivityRespVO { - @ApiModelProperty(value = "流程活动的标识", required = true, example = "1024") + @Schema(description = "流程活动的标识", required = true, example = "1024") private String key; - @ApiModelProperty(value = "流程活动的类型", required = true, example = "StartEvent") + @Schema(description = "流程活动的类型", required = true, example = "StartEvent") private String type; - @ApiModelProperty(value = "流程活动的开始时间", required = true) + @Schema(description = "流程活动的开始时间", required = true) private LocalDateTime startTime; - @ApiModelProperty(value = "流程活动的结束时间", required = true) + @Schema(description = "流程活动的结束时间", required = true) private LocalDateTime endTime; - @ApiModelProperty(value = "关联的流程任务的编号", example = "2048", notes = "关联的流程任务,只有 UserTask 等类型才有") + @Schema(description = "关联的流程任务的编号", example = "2048", notes = "关联的流程任务,只有 UserTask 等类型才有") private String taskId; -} +} \ No newline at end of file diff --git a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/task/vo/instance/BpmProcessInstanceCancelReqVO.java b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/task/vo/instance/BpmProcessInstanceCancelReqVO.java index 928f187e7..672838458 100644 --- a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/task/vo/instance/BpmProcessInstanceCancelReqVO.java +++ b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/task/vo/instance/BpmProcessInstanceCancelReqVO.java @@ -1,23 +1,23 @@ package cn.iocoder.yudao.module.bpm.controller.admin.task.vo.instance; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; +import io.swagger.v3.oas.annotations.media.Schema; +import io.swagger.v3.oas.annotations.media.Schema; import lombok.Data; import javax.validation.constraints.NotEmpty; import javax.validation.constraints.NotNull; import java.util.Map; -@ApiModel("管理后台 - 流程实例的取消 Request VO") +@Schema(description = "管理后台 - 流程实例的取消 Request VO") @Data public class BpmProcessInstanceCancelReqVO { - @ApiModelProperty(value = "流程实例的编号", required = true, example = "1024") + @Schema(description = "流程实例的编号", required = true, example = "1024") @NotEmpty(message = "流程实例的编号不能为空") private String id; - @ApiModelProperty(value = "取消原因", required = true, example = "不请假了!") + @Schema(description = "取消原因", required = true, example = "不请假了!") @NotEmpty(message = "取消原因不能为空") private String reason; -} +} \ No newline at end of file diff --git a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/task/vo/instance/BpmProcessInstanceCreateReqVO.java b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/task/vo/instance/BpmProcessInstanceCreateReqVO.java index 2085253d3..3dc8803d7 100644 --- a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/task/vo/instance/BpmProcessInstanceCreateReqVO.java +++ b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/task/vo/instance/BpmProcessInstanceCreateReqVO.java @@ -1,21 +1,21 @@ package cn.iocoder.yudao.module.bpm.controller.admin.task.vo.instance; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; +import io.swagger.v3.oas.annotations.media.Schema; +import io.swagger.v3.oas.annotations.media.Schema; import lombok.Data; import javax.validation.constraints.NotEmpty; import java.util.Map; -@ApiModel("管理后台 - 流程实例的创建 Request VO") +@Schema(description = "管理后台 - 流程实例的创建 Request VO") @Data public class BpmProcessInstanceCreateReqVO { - @ApiModelProperty(value = "流程定义的编号", required = true, example = "1024") + @Schema(description = "流程定义的编号", required = true, example = "1024") @NotEmpty(message = "流程定义编号不能为空") private String processDefinitionId; - @ApiModelProperty(value = "变量实例") + @Schema(description = "变量实例") private Map variables; -} +} \ No newline at end of file diff --git a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/task/vo/instance/BpmProcessInstanceMyPageReqVO.java b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/task/vo/instance/BpmProcessInstanceMyPageReqVO.java index e52d45f44..c20f5d24b 100644 --- a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/task/vo/instance/BpmProcessInstanceMyPageReqVO.java +++ b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/task/vo/instance/BpmProcessInstanceMyPageReqVO.java @@ -1,8 +1,8 @@ package cn.iocoder.yudao.module.bpm.controller.admin.task.vo.instance; import cn.iocoder.yudao.framework.common.pojo.PageParam; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; +import io.swagger.v3.oas.annotations.media.Schema; +import io.swagger.v3.oas.annotations.media.Schema; import lombok.Data; import lombok.EqualsAndHashCode; import lombok.ToString; @@ -12,29 +12,29 @@ import java.time.LocalDateTime; import static cn.iocoder.yudao.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND; -@ApiModel("管理后台 - 流程实例的分页 Item Response VO") +@Schema(description = "管理后台 - 流程实例的分页 Item Response VO") @Data @EqualsAndHashCode(callSuper = true) @ToString(callSuper = true) public class BpmProcessInstanceMyPageReqVO extends PageParam { - @ApiModelProperty(value = "流程名称", example = "芋道") + @Schema(description = "流程名称", example = "芋道") private String name; - @ApiModelProperty(value = "流程定义的编号", example = "2048") + @Schema(description = "流程定义的编号", example = "2048") private String processDefinitionId; - @ApiModelProperty(value = "流程实例的状态", notes = "参见 bpm_process_instance_status", example = "1") + @Schema(description = "流程实例的状态", notes = "参见 bpm_process_instance_status", example = "1") private Integer status; - @ApiModelProperty(value = "流程实例的结果", notes = "参见 bpm_process_instance_result", example = "2") + @Schema(description = "流程实例的结果", notes = "参见 bpm_process_instance_result", example = "2") private Integer result; - @ApiModelProperty(value = "流程分类", notes = "参见 bpm_model_category 数据字典", example = "1") + @Schema(description = "流程分类", notes = "参见 bpm_model_category 数据字典", example = "1") private String category; - @ApiModelProperty(value = "创建时间") + @Schema(description = "创建时间") @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND) private LocalDateTime[] createTime; -} +} \ No newline at end of file diff --git a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/task/vo/instance/BpmProcessInstancePageItemRespVO.java b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/task/vo/instance/BpmProcessInstancePageItemRespVO.java index 0d2534b53..1d3f54988 100644 --- a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/task/vo/instance/BpmProcessInstancePageItemRespVO.java +++ b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/task/vo/instance/BpmProcessInstancePageItemRespVO.java @@ -1,38 +1,38 @@ package cn.iocoder.yudao.module.bpm.controller.admin.task.vo.instance; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; +import io.swagger.v3.oas.annotations.media.Schema; +import io.swagger.v3.oas.annotations.media.Schema; import lombok.Data; import java.time.LocalDateTime; import java.util.List; -@ApiModel("管理后台 - 流程实例的分页 Item Response VO") +@Schema(description = "管理后台 - 流程实例的分页 Item Response VO") @Data public class BpmProcessInstancePageItemRespVO { - @ApiModelProperty(value = "流程实例的编号", required = true, example = "1024") + @Schema(description = "流程实例的编号", required = true, example = "1024") private String id; - @ApiModelProperty(value = "流程名称", required = true, example = "芋道") + @Schema(description = "流程名称", required = true, example = "芋道") private String name; - @ApiModelProperty(value = "流程定义的编号", required = true, example = "2048") + @Schema(description = "流程定义的编号", required = true, example = "2048") private String processDefinitionId; - @ApiModelProperty(value = "流程分类", required = true, notes = "参见 bpm_model_category 数据字典", example = "1") + @Schema(description = "流程分类", required = true, notes = "参见 bpm_model_category 数据字典", example = "1") private String category; - @ApiModelProperty(value = "流程实例的状态", required = true, notes = "参见 bpm_process_instance_status", example = "1") + @Schema(description = "流程实例的状态", required = true, notes = "参见 bpm_process_instance_status", example = "1") private Integer status; - @ApiModelProperty(value = "流程实例的结果", required = true, notes = "参见 bpm_process_instance_result", example = "2") + @Schema(description = "流程实例的结果", required = true, notes = "参见 bpm_process_instance_result", example = "2") private Integer result; - @ApiModelProperty(value = "提交时间", required = true) + @Schema(description = "提交时间", required = true) private LocalDateTime createTime; - @ApiModelProperty(value = "结束时间", required = true) + @Schema(description = "结束时间", required = true) private LocalDateTime endTime; /** @@ -40,16 +40,16 @@ public class BpmProcessInstancePageItemRespVO { */ private List tasks; - @ApiModel("流程任务") + @Schema(description = "流程任务") @Data public static class Task { - @ApiModelProperty(value = "流程任务的编号", required = true, example = "1024") + @Schema(description = "流程任务的编号", required = true, example = "1024") private String id; - @ApiModelProperty(value = "任务名称", required = true, example = "芋道") + @Schema(description = "任务名称", required = true, example = "芋道") private String name; } -} +} \ No newline at end of file diff --git a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/task/vo/instance/BpmProcessInstanceRespVO.java b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/task/vo/instance/BpmProcessInstanceRespVO.java index 58374dae2..9399da53c 100644 --- a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/task/vo/instance/BpmProcessInstanceRespVO.java +++ b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/task/vo/instance/BpmProcessInstanceRespVO.java @@ -1,42 +1,42 @@ package cn.iocoder.yudao.module.bpm.controller.admin.task.vo.instance; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; +import io.swagger.v3.oas.annotations.media.Schema; +import io.swagger.v3.oas.annotations.media.Schema; import lombok.Data; import java.time.LocalDateTime; import java.util.List; import java.util.Map; -@ApiModel("管理后台 - 流程实例的 Response VO") +@Schema(description = "管理后台 - 流程实例的 Response VO") @Data public class BpmProcessInstanceRespVO { - @ApiModelProperty(value = "流程实例的编号", required = true, example = "1024") + @Schema(description = "流程实例的编号", required = true, example = "1024") private String id; - @ApiModelProperty(value = "流程名称", required = true, example = "芋道") + @Schema(description = "流程名称", required = true, example = "芋道") private String name; - @ApiModelProperty(value = "流程分类", required = true, notes = "参见 bpm_model_category 数据字典", example = "1") + @Schema(description = "流程分类", required = true, notes = "参见 bpm_model_category 数据字典", example = "1") private String category; - @ApiModelProperty(value = "流程实例的状态", required = true, notes = "参见 bpm_process_instance_status", example = "1") + @Schema(description = "流程实例的状态", required = true, notes = "参见 bpm_process_instance_status", example = "1") private Integer status; - @ApiModelProperty(value = "流程实例的结果", required = true, notes = "参见 bpm_process_instance_result", example = "2") + @Schema(description = "流程实例的结果", required = true, notes = "参见 bpm_process_instance_result", example = "2") private Integer result; - @ApiModelProperty(value = "提交时间", required = true) + @Schema(description = "提交时间", required = true) private LocalDateTime createTime; - @ApiModelProperty(value = "结束时间", required = true) + @Schema(description = "结束时间", required = true) private LocalDateTime endTime; - @ApiModelProperty(value = "提交的表单值", required = true) + @Schema(description = "提交的表单值", required = true) private Map formVariables; - @ApiModelProperty(value = "业务的唯一标识", example = "1", notes = "例如说,请假申请的编号") + @Schema(description = "业务的唯一标识", example = "1", notes = "例如说,请假申请的编号") private String businessKey; /** @@ -49,49 +49,49 @@ public class BpmProcessInstanceRespVO { */ private ProcessDefinition processDefinition; - @ApiModel("用户信息") + @Schema(description = "用户信息") @Data public static class User { - @ApiModelProperty(value = "用户编号", required = true, example = "1") + @Schema(description = "用户编号", required = true, example = "1") private Long id; - @ApiModelProperty(value = "用户昵称", required = true, example = "芋艿") + @Schema(description = "用户昵称", required = true, example = "芋艿") private String nickname; - @ApiModelProperty(value = "部门编号", required = true, example = "1") + @Schema(description = "部门编号", required = true, example = "1") private Long deptId; - @ApiModelProperty(value = "部门名称", required = true, example = "研发部") + @Schema(description = "部门名称", required = true, example = "研发部") private String deptName; } - @ApiModel("流程定义信息") + @Schema(description = "流程定义信息") @Data public static class ProcessDefinition { - @ApiModelProperty(value = "编号", required = true, example = "1024") + @Schema(description = "编号", required = true, example = "1024") private String id; - @ApiModelProperty(value = "表单类型", notes = "参见 bpm_model_form_type 数据字典", example = "1") + @Schema(description = "表单类型", notes = "参见 bpm_model_form_type 数据字典", example = "1") private Integer formType; - @ApiModelProperty(value = "表单编号", example = "1024", notes = "在表单类型为 {@link BpmModelFormTypeEnum#CUSTOM} 时,必须非空") + @Schema(description = "表单编号", example = "1024", notes = "在表单类型为 {@link BpmModelFormTypeEnum#CUSTOM} 时,必须非空") private Long formId; - @ApiModelProperty(value = "表单的配置", required = true, + @Schema(description = "表单的配置", required = true, notes = "JSON 字符串。在表单类型为 {@link BpmModelFormTypeEnum#CUSTOM} 时,必须非空") private String formConf; - @ApiModelProperty(value = "表单项的数组", required = true, + @Schema(description = "表单项的数组", required = true, notes = "JSON 字符串的数组。在表单类型为 {@link BpmModelFormTypeEnum#CUSTOM} 时,必须非空") private List formFields; - @ApiModelProperty(value = "自定义表单的提交路径,使用 Vue 的路由地址", example = "/bpm/oa/leave/create", + @Schema(description = "自定义表单的提交路径,使用 Vue 的路由地址", example = "/bpm/oa/leave/create", notes = "在表单类型为 {@link BpmModelFormTypeEnum#CUSTOM} 时,必须非空") private String formCustomCreatePath; - @ApiModelProperty(value = "自定义表单的查看路径,使用 Vue 的路由地址", example = "/bpm/oa/leave/view", + @Schema(description = "自定义表单的查看路径,使用 Vue 的路由地址", example = "/bpm/oa/leave/view", notes = "在表单类型为 {@link BpmModelFormTypeEnum#CUSTOM} 时,必须非空") private String formCustomViewPath; - @ApiModelProperty(value = "BPMN XML", required = true) + @Schema(description = "BPMN XML", required = true) private String bpmnXml; } -} +} \ No newline at end of file diff --git a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/task/vo/task/BpmTaskApproveReqVO.java b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/task/vo/task/BpmTaskApproveReqVO.java index 1b6a69066..48de29020 100644 --- a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/task/vo/task/BpmTaskApproveReqVO.java +++ b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/task/vo/task/BpmTaskApproveReqVO.java @@ -1,21 +1,21 @@ package cn.iocoder.yudao.module.bpm.controller.admin.task.vo.task; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; +import io.swagger.v3.oas.annotations.media.Schema; +import io.swagger.v3.oas.annotations.media.Schema; import lombok.Data; import javax.validation.constraints.NotEmpty; -@ApiModel("管理后台 - 通过流程任务的 Request VO") +@Schema(description = "管理后台 - 通过流程任务的 Request VO") @Data public class BpmTaskApproveReqVO { - @ApiModelProperty(value = "任务编号", required = true, example = "1024") + @Schema(description = "任务编号", required = true, example = "1024") @NotEmpty(message = "任务编号不能为空") private String id; - @ApiModelProperty(value = "审批意见", required = true, example = "不错不错!") + @Schema(description = "审批意见", required = true, example = "不错不错!") @NotEmpty(message = "审批意见不能为空") private String reason; -} +} \ No newline at end of file diff --git a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/task/vo/task/BpmTaskDonePageItemRespVO.java b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/task/vo/task/BpmTaskDonePageItemRespVO.java index a9bb93f9e..b75d6d86f 100644 --- a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/task/vo/task/BpmTaskDonePageItemRespVO.java +++ b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/task/vo/task/BpmTaskDonePageItemRespVO.java @@ -1,27 +1,27 @@ package cn.iocoder.yudao.module.bpm.controller.admin.task.vo.task; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; +import io.swagger.v3.oas.annotations.media.Schema; +import io.swagger.v3.oas.annotations.media.Schema; import lombok.Data; import lombok.EqualsAndHashCode; import lombok.ToString; import java.time.LocalDateTime; -@ApiModel("管理后台 - 流程任务的 Done 已完成的分页项 Response VO") +@Schema(description = "管理后台 - 流程任务的 Done 已完成的分页项 Response VO") @Data @EqualsAndHashCode(callSuper = true) @ToString(callSuper = true) public class BpmTaskDonePageItemRespVO extends BpmTaskTodoPageItemRespVO { - @ApiModelProperty(value = "结束时间", required = true) + @Schema(description = "结束时间", required = true) private LocalDateTime endTime; - @ApiModelProperty(value = "持续时间", required = true, example = "1000") + @Schema(description = "持续时间", required = true, example = "1000") private Long durationInMillis; - @ApiModelProperty(value = "任务结果", required = true, notes = "参见 bpm_process_instance_result", example = "2") + @Schema(description = "任务结果", required = true, notes = "参见 bpm_process_instance_result", example = "2") private Integer result; - @ApiModelProperty(value = "审批建议", required = true, example = "不请假了!") + @Schema(description = "审批建议", required = true, example = "不请假了!") private String reason; -} +} \ No newline at end of file diff --git a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/task/vo/task/BpmTaskDonePageReqVO.java b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/task/vo/task/BpmTaskDonePageReqVO.java index a347d58fe..baf77350b 100644 --- a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/task/vo/task/BpmTaskDonePageReqVO.java +++ b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/task/vo/task/BpmTaskDonePageReqVO.java @@ -1,8 +1,8 @@ package cn.iocoder.yudao.module.bpm.controller.admin.task.vo.task; import cn.iocoder.yudao.framework.common.pojo.PageParam; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; +import io.swagger.v3.oas.annotations.media.Schema; +import io.swagger.v3.oas.annotations.media.Schema; import lombok.Data; import lombok.EqualsAndHashCode; import lombok.ToString; @@ -12,21 +12,21 @@ import java.time.LocalDateTime; import static cn.iocoder.yudao.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND; -@ApiModel("管理后台 - 流程任务的 Done 已办的分页 Request VO") +@Schema(description = "管理后台 - 流程任务的 Done 已办的分页 Request VO") @Data @EqualsAndHashCode(callSuper = true) @ToString(callSuper = true) public class BpmTaskDonePageReqVO extends PageParam { - @ApiModelProperty(value = "流程任务名", example = "芋道") + @Schema(description = "流程任务名", example = "芋道") private String name; - @ApiModelProperty(value = "开始的创建收间") + @Schema(description = "开始的创建收间") @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND) private LocalDateTime beginCreateTime; - @ApiModelProperty(value = "结束的创建时间") + @Schema(description = "结束的创建时间") @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND) private LocalDateTime endCreateTime; -} +} \ No newline at end of file diff --git a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/task/vo/task/BpmTaskRejectReqVO.java b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/task/vo/task/BpmTaskRejectReqVO.java index 596a82f77..06af07275 100644 --- a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/task/vo/task/BpmTaskRejectReqVO.java +++ b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/task/vo/task/BpmTaskRejectReqVO.java @@ -1,21 +1,21 @@ package cn.iocoder.yudao.module.bpm.controller.admin.task.vo.task; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; +import io.swagger.v3.oas.annotations.media.Schema; +import io.swagger.v3.oas.annotations.media.Schema; import lombok.Data; import javax.validation.constraints.NotEmpty; -@ApiModel("管理后台 - 不通过流程任务的 Request VO") +@Schema(description = "管理后台 - 不通过流程任务的 Request VO") @Data public class BpmTaskRejectReqVO { - @ApiModelProperty(value = "任务编号", required = true, example = "1024") + @Schema(description = "任务编号", required = true, example = "1024") @NotEmpty(message = "任务编号不能为空") private String id; - @ApiModelProperty(value = "审批意见", required = true, example = "不错不错!") + @Schema(description = "审批意见", required = true, example = "不错不错!") @NotEmpty(message = "审批意见不能为空") private String reason; -} +} \ No newline at end of file diff --git a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/task/vo/task/BpmTaskRespVO.java b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/task/vo/task/BpmTaskRespVO.java index 1f7d2c7fa..972bafa8d 100644 --- a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/task/vo/task/BpmTaskRespVO.java +++ b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/task/vo/task/BpmTaskRespVO.java @@ -1,18 +1,18 @@ package cn.iocoder.yudao.module.bpm.controller.admin.task.vo.task; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; +import io.swagger.v3.oas.annotations.media.Schema; +import io.swagger.v3.oas.annotations.media.Schema; import lombok.Data; import lombok.EqualsAndHashCode; import lombok.ToString; -@ApiModel("管理后台 - 流程任务的 Response VO") +@Schema(description = "管理后台 - 流程任务的 Response VO") @Data @EqualsAndHashCode(callSuper = true) @ToString(callSuper = true) public class BpmTaskRespVO extends BpmTaskDonePageItemRespVO { - @ApiModelProperty(value = "任务定义的标识", required = true, example = "user-001") + @Schema(description = "任务定义的标识", required = true, example = "user-001") private String definitionKey; /** @@ -20,19 +20,19 @@ public class BpmTaskRespVO extends BpmTaskDonePageItemRespVO { */ private User assigneeUser; - @ApiModel("用户信息") + @Schema(description = "用户信息") @Data public static class User { - @ApiModelProperty(value = "用户编号", required = true, example = "1") + @Schema(description = "用户编号", required = true, example = "1") private Long id; - @ApiModelProperty(value = "用户昵称", required = true, example = "芋艿") + @Schema(description = "用户昵称", required = true, example = "芋艿") private String nickname; - @ApiModelProperty(value = "部门编号", required = true, example = "1") + @Schema(description = "部门编号", required = true, example = "1") private Long deptId; - @ApiModelProperty(value = "部门名称", required = true, example = "研发部") + @Schema(description = "部门名称", required = true, example = "研发部") private String deptName; } -} +} \ No newline at end of file diff --git a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/task/vo/task/BpmTaskTodoPageItemRespVO.java b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/task/vo/task/BpmTaskTodoPageItemRespVO.java index 5c2cbf26a..ed5db34bc 100644 --- a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/task/vo/task/BpmTaskTodoPageItemRespVO.java +++ b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/task/vo/task/BpmTaskTodoPageItemRespVO.java @@ -1,28 +1,28 @@ package cn.iocoder.yudao.module.bpm.controller.admin.task.vo.task; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; +import io.swagger.v3.oas.annotations.media.Schema; +import io.swagger.v3.oas.annotations.media.Schema; import lombok.Data; import java.time.LocalDateTime; -@ApiModel("管理后台 - 流程任务的 Running 进行中的分页项 Response VO") +@Schema(description = "管理后台 - 流程任务的 Running 进行中的分页项 Response VO") @Data public class BpmTaskTodoPageItemRespVO { - @ApiModelProperty(value = "任务编号", required = true, example = "1024") + @Schema(description = "任务编号", required = true, example = "1024") private String id; - @ApiModelProperty(value = "任务名字", required = true, example = "芋道") + @Schema(description = "任务名字", required = true, example = "芋道") private String name; - @ApiModelProperty(value = "接收时间", required = true) + @Schema(description = "接收时间", required = true) private LocalDateTime claimTime; - @ApiModelProperty(value = "创建时间", required = true) + @Schema(description = "创建时间", required = true) private LocalDateTime createTime; - @ApiModelProperty(value = "激活状态", required = true, example = "1", notes = "参见 SuspensionState 枚举") + @Schema(description = "激活状态", required = true, example = "1", notes = "参见 SuspensionState 枚举") private Integer suspensionState; /** @@ -31,24 +31,24 @@ public class BpmTaskTodoPageItemRespVO { private ProcessInstance processInstance; @Data - @ApiModel("流程实例") + @Schema(description = "流程实例") public static class ProcessInstance { - @ApiModelProperty(value = "流程实例编号", required = true, example = "1024") + @Schema(description = "流程实例编号", required = true, example = "1024") private String id; - @ApiModelProperty(value = "流程实例名称", required = true, example = "芋道") + @Schema(description = "流程实例名称", required = true, example = "芋道") private String name; - @ApiModelProperty(value = "发起人的用户编号", required = true, example = "1024") + @Schema(description = "发起人的用户编号", required = true, example = "1024") private Long startUserId; - @ApiModelProperty(value = "发起人的用户昵称", required = true, example = "芋艿") + @Schema(description = "发起人的用户昵称", required = true, example = "芋艿") private String startUserNickname; - @ApiModelProperty(value = "流程定义的编号", required = true, example = "2048") + @Schema(description = "流程定义的编号", required = true, example = "2048") private String processDefinitionId; } -} +} \ No newline at end of file diff --git a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/task/vo/task/BpmTaskTodoPageReqVO.java b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/task/vo/task/BpmTaskTodoPageReqVO.java index 9d2ad18c2..24d0fc5f6 100644 --- a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/task/vo/task/BpmTaskTodoPageReqVO.java +++ b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/task/vo/task/BpmTaskTodoPageReqVO.java @@ -1,8 +1,8 @@ package cn.iocoder.yudao.module.bpm.controller.admin.task.vo.task; import cn.iocoder.yudao.framework.common.pojo.PageParam; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; +import io.swagger.v3.oas.annotations.media.Schema; +import io.swagger.v3.oas.annotations.media.Schema; import lombok.Data; import lombok.EqualsAndHashCode; import lombok.ToString; @@ -12,21 +12,21 @@ import java.time.LocalDateTime; import static cn.iocoder.yudao.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND; -@ApiModel("管理后台 - 流程任务的 TODO 待办的分页 Request VO") +@Schema(description = "管理后台 - 流程任务的 TODO 待办的分页 Request VO") @Data @EqualsAndHashCode(callSuper = true) @ToString(callSuper = true) public class BpmTaskTodoPageReqVO extends PageParam { - @ApiModelProperty(value = "流程任务名", example = "芋道") + @Schema(description = "流程任务名", example = "芋道") private String name; - @ApiModelProperty(value = "开始的创建收间") + @Schema(description = "开始的创建收间") @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND) private LocalDateTime beginCreateTime; - @ApiModelProperty(value = "结束的创建时间") + @Schema(description = "结束的创建时间") @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND) private LocalDateTime endCreateTime; -} +} \ No newline at end of file diff --git a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/task/vo/task/BpmTaskUpdateAssigneeReqVO.java b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/task/vo/task/BpmTaskUpdateAssigneeReqVO.java index 0dd0ffed4..d8bef86e6 100644 --- a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/task/vo/task/BpmTaskUpdateAssigneeReqVO.java +++ b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/task/vo/task/BpmTaskUpdateAssigneeReqVO.java @@ -1,7 +1,7 @@ package cn.iocoder.yudao.module.bpm.controller.admin.task.vo.task; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; +import io.swagger.v3.oas.annotations.media.Schema; +import io.swagger.v3.oas.annotations.media.Schema; import lombok.Data; import lombok.EqualsAndHashCode; import lombok.ToString; @@ -10,16 +10,16 @@ import net.bytebuddy.implementation.bind.annotation.Empty; import javax.validation.constraints.NotEmpty; import javax.validation.constraints.NotNull; -@ApiModel("管理后台 - 流程任务的更新负责人的 Request VO") +@Schema(description = "管理后台 - 流程任务的更新负责人的 Request VO") @Data public class BpmTaskUpdateAssigneeReqVO { - @ApiModelProperty(value = "任务编号", required = true, example = "1024") + @Schema(description = "任务编号", required = true, example = "1024") @NotEmpty(message = "任务编号不能为空") private String id; - @ApiModelProperty(value = "新审批人的用户编号", required = true, example = "2048") + @Schema(description = "新审批人的用户编号", required = true, example = "2048") @NotNull(message = "新审批人的用户编号不能为空") private Long assigneeUserId; -} +} \ No newline at end of file diff --git a/yudao-module-infra/yudao-module-infra-api/src/main/java/cn/iocoder/yudao/module/infra/api/file/FileApi.java b/yudao-module-infra/yudao-module-infra-api/src/main/java/cn/iocoder/yudao/module/infra/api/file/FileApi.java index ddb73046c..3add096d4 100644 --- a/yudao-module-infra/yudao-module-infra-api/src/main/java/cn/iocoder/yudao/module/infra/api/file/FileApi.java +++ b/yudao-module-infra/yudao-module-infra-api/src/main/java/cn/iocoder/yudao/module/infra/api/file/FileApi.java @@ -3,8 +3,8 @@ package cn.iocoder.yudao.module.infra.api.file; import cn.iocoder.yudao.framework.common.pojo.CommonResult; import cn.iocoder.yudao.module.infra.api.file.dto.FileCreateReqDTO; import cn.iocoder.yudao.module.infra.enums.ApiConstants; -import io.swagger.annotations.Api; -import io.swagger.annotations.ApiOperation; +import io.swagger.v3.oas.annotations.tags.Tag; +import io.swagger.v3.oas.annotations.Operation; import org.springframework.cloud.openfeign.FeignClient; import org.springframework.web.bind.annotation.PostMapping; import org.springframework.web.bind.annotation.RequestBody; @@ -13,7 +13,7 @@ import org.springframework.web.bind.annotation.RequestParam; import javax.validation.Valid; @FeignClient(name = ApiConstants.NAME) // TODO 芋艿:fallbackFactory = -@Api(tags = "RPC 服务 - 文件") +@Tag(name = "RPC 服务 - 文件") public interface FileApi { String PREFIX = ApiConstants.PREFIX + "/file"; @@ -54,7 +54,7 @@ public interface FileApi { } @PostMapping(PREFIX + "/create") - @ApiOperation("保存文件,并返回文件的访问路径") + @Operation(summary = "保存文件,并返回文件的访问路径") CommonResult createFile(@Valid @RequestBody FileCreateReqDTO createReqDTO); -} +} \ No newline at end of file diff --git a/yudao-module-infra/yudao-module-infra-api/src/main/java/cn/iocoder/yudao/module/infra/api/file/dto/FileCreateReqDTO.java b/yudao-module-infra/yudao-module-infra-api/src/main/java/cn/iocoder/yudao/module/infra/api/file/dto/FileCreateReqDTO.java index bc6681088..d4ef455d7 100644 --- a/yudao-module-infra/yudao-module-infra-api/src/main/java/cn/iocoder/yudao/module/infra/api/file/dto/FileCreateReqDTO.java +++ b/yudao-module-infra/yudao-module-infra-api/src/main/java/cn/iocoder/yudao/module/infra/api/file/dto/FileCreateReqDTO.java @@ -1,23 +1,23 @@ package cn.iocoder.yudao.module.infra.api.file.dto; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; +import io.swagger.v3.oas.annotations.media.Schema; +import io.swagger.v3.oas.annotations.media.Schema; import lombok.Data; import javax.validation.constraints.NotEmpty; -@ApiModel("RPC 服务 - 文件创建 Request DTO") +@Schema(description = "RPC 服务 - 文件创建 Request DTO") @Data public class FileCreateReqDTO { - @ApiModelProperty(value = "原文件名称", example = "xxx.png") + @Schema(description = "原文件名称", example = "xxx.png") private String name; - @ApiModelProperty(value = "文件路径", example = "xxx.png") + @Schema(description = "文件路径", example = "xxx.png") private String path; - @ApiModelProperty(value = "文件内容", required = true) + @Schema(description = "文件内容", required = true) @NotEmpty(message = "文件内容不能为空") private byte[] content; -} +} \ No newline at end of file diff --git a/yudao-module-infra/yudao-module-infra-api/src/main/java/cn/iocoder/yudao/module/infra/api/logger/ApiAccessLogApi.java b/yudao-module-infra/yudao-module-infra-api/src/main/java/cn/iocoder/yudao/module/infra/api/logger/ApiAccessLogApi.java index deecb78df..e9dcf9531 100644 --- a/yudao-module-infra/yudao-module-infra-api/src/main/java/cn/iocoder/yudao/module/infra/api/logger/ApiAccessLogApi.java +++ b/yudao-module-infra/yudao-module-infra-api/src/main/java/cn/iocoder/yudao/module/infra/api/logger/ApiAccessLogApi.java @@ -3,8 +3,8 @@ package cn.iocoder.yudao.module.infra.api.logger; import cn.iocoder.yudao.framework.common.pojo.CommonResult; import cn.iocoder.yudao.module.infra.api.logger.dto.ApiAccessLogCreateReqDTO; import cn.iocoder.yudao.module.infra.enums.ApiConstants; -import io.swagger.annotations.Api; -import io.swagger.annotations.ApiOperation; +import io.swagger.v3.oas.annotations.tags.Tag; +import io.swagger.v3.oas.annotations.Operation; import org.springframework.cloud.openfeign.FeignClient; import org.springframework.web.bind.annotation.PostMapping; import org.springframework.web.bind.annotation.RequestBody; @@ -12,13 +12,13 @@ import org.springframework.web.bind.annotation.RequestBody; import javax.validation.Valid; @FeignClient(name = ApiConstants.NAME) // TODO 芋艿:fallbackFactory = -@Api(tags = "RPC 服务 - API 访问日志") +@Tag(name = "RPC 服务 - API 访问日志") public interface ApiAccessLogApi { String PREFIX = ApiConstants.PREFIX + "/api-access-log"; @PostMapping(PREFIX + "/create") - @ApiOperation("创建 API 访问日志") + @Operation(summary = "创建 API 访问日志") CommonResult createApiAccessLog(@Valid @RequestBody ApiAccessLogCreateReqDTO createDTO); -} +} \ No newline at end of file diff --git a/yudao-module-infra/yudao-module-infra-api/src/main/java/cn/iocoder/yudao/module/infra/api/logger/ApiErrorLogApi.java b/yudao-module-infra/yudao-module-infra-api/src/main/java/cn/iocoder/yudao/module/infra/api/logger/ApiErrorLogApi.java index 3803f452b..8740ba4b6 100644 --- a/yudao-module-infra/yudao-module-infra-api/src/main/java/cn/iocoder/yudao/module/infra/api/logger/ApiErrorLogApi.java +++ b/yudao-module-infra/yudao-module-infra-api/src/main/java/cn/iocoder/yudao/module/infra/api/logger/ApiErrorLogApi.java @@ -3,8 +3,8 @@ package cn.iocoder.yudao.module.infra.api.logger; import cn.iocoder.yudao.framework.common.pojo.CommonResult; import cn.iocoder.yudao.module.infra.api.logger.dto.ApiErrorLogCreateReqDTO; import cn.iocoder.yudao.module.infra.enums.ApiConstants; -import io.swagger.annotations.Api; -import io.swagger.annotations.ApiOperation; +import io.swagger.v3.oas.annotations.tags.Tag; +import io.swagger.v3.oas.annotations.Operation; import org.springframework.cloud.openfeign.FeignClient; import org.springframework.web.bind.annotation.PostMapping; import org.springframework.web.bind.annotation.RequestBody; @@ -12,13 +12,13 @@ import org.springframework.web.bind.annotation.RequestBody; import javax.validation.Valid; @FeignClient(name = ApiConstants.NAME) // TODO 芋艿:fallbackFactory = -@Api(tags = "RPC 服务 - API 异常日志") +@Tag(name = "RPC 服务 - API 异常日志") public interface ApiErrorLogApi { String PREFIX = ApiConstants.PREFIX + "/api-error-log"; @PostMapping(PREFIX + "/create") - @ApiOperation("创建 API 异常日志") + @Operation(summary = "创建 API 异常日志") CommonResult createApiErrorLog(@Valid @RequestBody ApiErrorLogCreateReqDTO createDTO); -} +} \ No newline at end of file diff --git a/yudao-module-infra/yudao-module-infra-api/src/main/java/cn/iocoder/yudao/module/infra/api/logger/dto/ApiAccessLogCreateReqDTO.java b/yudao-module-infra/yudao-module-infra-api/src/main/java/cn/iocoder/yudao/module/infra/api/logger/dto/ApiAccessLogCreateReqDTO.java index f4e8e6495..e29e7b787 100644 --- a/yudao-module-infra/yudao-module-infra-api/src/main/java/cn/iocoder/yudao/module/infra/api/logger/dto/ApiAccessLogCreateReqDTO.java +++ b/yudao-module-infra/yudao-module-infra-api/src/main/java/cn/iocoder/yudao/module/infra/api/logger/dto/ApiAccessLogCreateReqDTO.java @@ -1,56 +1,56 @@ package cn.iocoder.yudao.module.infra.api.logger.dto; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; +import io.swagger.v3.oas.annotations.media.Schema; +import io.swagger.v3.oas.annotations.media.Schema; import lombok.Data; import javax.validation.constraints.NotNull; import java.time.LocalDateTime; -@ApiModel("RPC 服务 - API 访问日志创建 Request DTO") +@Schema(description = "RPC 服务 - API 访问日志创建 Request DTO") @Data public class ApiAccessLogCreateReqDTO { - @ApiModelProperty(value = "链路追踪编号", example = "89aca178-a370-411c-ae02-3f0d672be4ab") + @Schema(description = "链路追踪编号", example = "89aca178-a370-411c-ae02-3f0d672be4ab") private String traceId; - @ApiModelProperty(value = "用户编号", required = true, example = "1024") + @Schema(description = "用户编号", required = true, example = "1024") private Long userId; - @ApiModelProperty(value = "用户类型", required = true, example = "1") + @Schema(description = "用户类型", required = true, example = "1") private Integer userType; - @ApiModelProperty(value = "应用名", required = true, example = "system-server") + @Schema(description = "应用名", required = true, example = "system-server") @NotNull(message = "应用名不能为空") private String applicationName; - @ApiModelProperty(value = "请求方法名", required = true, example = "GET") + @Schema(description = "请求方法名", required = true, example = "GET") @NotNull(message = "http 请求方法不能为空") private String requestMethod; - @ApiModelProperty(value = "请求地址", required = true, example = "/xxx/yyy") + @Schema(description = "请求地址", required = true, example = "/xxx/yyy") @NotNull(message = "访问地址不能为空") private String requestUrl; - @ApiModelProperty(value = "请求参数", required = true) + @Schema(description = "请求参数", required = true) @NotNull(message = "请求参数不能为空") private String requestParams; - @ApiModelProperty(value = "用户 IP", required = true, example = "127.0.0.1") + @Schema(description = "用户 IP", required = true, example = "127.0.0.1") @NotNull(message = "ip 不能为空") private String userIp; - @ApiModelProperty(value = "浏览器 UserAgent", required = true, example = "Mozilla/5.0") + @Schema(description = "浏览器 UserAgent", required = true, example = "Mozilla/5.0") @NotNull(message = "User-Agent 不能为空") private String userAgent; - @ApiModelProperty(value = "开始时间", required = true) + @Schema(description = "开始时间", required = true) @NotNull(message = "开始请求时间不能为空") private LocalDateTime beginTime; - @ApiModelProperty(value = "结束时间", required = true) + @Schema(description = "结束时间", required = true) @NotNull(message = "结束请求时间不能为空") private LocalDateTime endTime; - @ApiModelProperty(value = "执行时长,单位:毫秒", required = true) + @Schema(description = "执行时长,单位:毫秒", required = true) @NotNull(message = "执行时长不能为空") private Integer duration; - @ApiModelProperty(value = "结果码", required = true) + @Schema(description = "结果码", required = true) @NotNull(message = "错误码不能为空") private Integer resultCode; - @ApiModelProperty(value = "结果提示") + @Schema(description = "结果提示") private String resultMsg; -} +} \ No newline at end of file diff --git a/yudao-module-infra/yudao-module-infra-api/src/main/java/cn/iocoder/yudao/module/infra/api/logger/dto/ApiErrorLogCreateReqDTO.java b/yudao-module-infra/yudao-module-infra-api/src/main/java/cn/iocoder/yudao/module/infra/api/logger/dto/ApiErrorLogCreateReqDTO.java index 06aab01b5..6973b8dd4 100644 --- a/yudao-module-infra/yudao-module-infra-api/src/main/java/cn/iocoder/yudao/module/infra/api/logger/dto/ApiErrorLogCreateReqDTO.java +++ b/yudao-module-infra/yudao-module-infra-api/src/main/java/cn/iocoder/yudao/module/infra/api/logger/dto/ApiErrorLogCreateReqDTO.java @@ -1,69 +1,69 @@ package cn.iocoder.yudao.module.infra.api.logger.dto; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; +import io.swagger.v3.oas.annotations.media.Schema; +import io.swagger.v3.oas.annotations.media.Schema; import lombok.Data; import javax.validation.constraints.NotNull; import java.time.LocalDateTime; -@ApiModel("RPC 服务 - API 错误日志创建 Request DTO") +@Schema(description = "RPC 服务 - API 错误日志创建 Request DTO") @Data public class ApiErrorLogCreateReqDTO { - @ApiModelProperty(value = "链路追踪编号", example = "89aca178-a370-411c-ae02-3f0d672be4ab") + @Schema(description = "链路追踪编号", example = "89aca178-a370-411c-ae02-3f0d672be4ab") private String traceId; - @ApiModelProperty(value = "用户编号", required = true, example = "1024") + @Schema(description = "用户编号", required = true, example = "1024") private Long userId; - @ApiModelProperty(value = "用户类型", required = true, example = "1") + @Schema(description = "用户类型", required = true, example = "1") private Integer userType; - @ApiModelProperty(value = "应用名", required = true, example = "system-server") + @Schema(description = "应用名", required = true, example = "system-server") @NotNull(message = "应用名不能为空") private String applicationName; - @ApiModelProperty(value = "请求方法名", required = true, example = "GET") + @Schema(description = "请求方法名", required = true, example = "GET") @NotNull(message = "http 请求方法不能为空") private String requestMethod; - @ApiModelProperty(value = "请求地址", required = true, example = "/xxx/yyy") + @Schema(description = "请求地址", required = true, example = "/xxx/yyy") @NotNull(message = "访问地址不能为空") private String requestUrl; - @ApiModelProperty(value = "请求参数", required = true) + @Schema(description = "请求参数", required = true) @NotNull(message = "请求参数不能为空") private String requestParams; - @ApiModelProperty(value = "用户 IP", required = true, example = "127.0.0.1") + @Schema(description = "用户 IP", required = true, example = "127.0.0.1") @NotNull(message = "ip 不能为空") private String userIp; - @ApiModelProperty(value = "浏览器 UserAgent", required = true, example = "Mozilla/5.0") + @Schema(description = "浏览器 UserAgent", required = true, example = "Mozilla/5.0") @NotNull(message = "User-Agent 不能为空") private String userAgent; - @ApiModelProperty(value = "异常时间", required = true) + @Schema(description = "异常时间", required = true) @NotNull(message = "异常时间不能为空") private LocalDateTime exceptionTime; - @ApiModelProperty(value = "异常名", required = true) + @Schema(description = "异常名", required = true) @NotNull(message = "异常名不能为空") private String exceptionName; - @ApiModelProperty(value = "异常发生的类全名", required = true) + @Schema(description = "异常发生的类全名", required = true) @NotNull(message = "异常发生的类全名不能为空") private String exceptionClassName; - @ApiModelProperty(value = "异常发生的类文件", required = true) + @Schema(description = "异常发生的类文件", required = true) @NotNull(message = "异常发生的类文件不能为空") private String exceptionFileName; - @ApiModelProperty(value = "异常发生的方法名", required = true) + @Schema(description = "异常发生的方法名", required = true) @NotNull(message = "异常发生的方法名不能为空") private String exceptionMethodName; - @ApiModelProperty(value = "异常发生的方法所在行", required = true) + @Schema(description = "异常发生的方法所在行", required = true) @NotNull(message = "异常发生的方法所在行不能为空") private Integer exceptionLineNumber; - @ApiModelProperty(value = "异常的栈轨迹异常的栈轨迹", required = true) + @Schema(description = "异常的栈轨迹异常的栈轨迹", required = true) @NotNull(message = "异常的栈轨迹不能为空") private String exceptionStackTrace; - @ApiModelProperty(value = "异常导致的根消息", required = true) + @Schema(description = "异常导致的根消息", required = true) @NotNull(message = "异常导致的根消息不能为空") private String exceptionRootCauseMessage; - @ApiModelProperty(value = "异常导致的消息", required = true) + @Schema(description = "异常导致的消息", required = true) @NotNull(message = "异常导致的消息不能为空") private String exceptionMessage; -} +} \ No newline at end of file diff --git a/yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/controller/admin/codegen/CodegenController.java b/yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/controller/admin/codegen/CodegenController.java index 9a0013b93..e7367fdad 100644 --- a/yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/controller/admin/codegen/CodegenController.java +++ b/yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/controller/admin/codegen/CodegenController.java @@ -16,10 +16,10 @@ import cn.iocoder.yudao.module.infra.convert.codegen.CodegenConvert; import cn.iocoder.yudao.module.infra.dal.dataobject.codegen.CodegenColumnDO; import cn.iocoder.yudao.module.infra.dal.dataobject.codegen.CodegenTableDO; import cn.iocoder.yudao.module.infra.service.codegen.CodegenService; -import io.swagger.annotations.Api; -import io.swagger.annotations.ApiImplicitParam; -import io.swagger.annotations.ApiImplicitParams; -import io.swagger.annotations.ApiOperation; +import io.swagger.v3.oas.annotations.tags.Tag; +import io.swagger.v3.oas.annotations.Parameter; +import io.swagger.v3.oas.annotations.Parameters; +import io.swagger.v3.oas.annotations.Operation; import org.springframework.security.access.prepost.PreAuthorize; import org.springframework.validation.annotation.Validated; import org.springframework.web.bind.annotation.*; @@ -36,7 +36,7 @@ import java.util.Map; import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success; import static cn.iocoder.yudao.framework.security.core.util.SecurityFrameworkUtils.getLoginUserId; -@Api(tags = "管理后台 - 代码生成器") +@Tag(name = "管理后台 - 代码生成器") @RestController @RequestMapping("/infra/codegen") @Validated @@ -46,11 +46,11 @@ public class CodegenController { private CodegenService codegenService; @GetMapping("/db/table/list") - @ApiOperation(value = "获得数据库自带的表定义列表", notes = "会过滤掉已经导入 Codegen 的表") - @ApiImplicitParams({ - @ApiImplicitParam(name = "dataSourceConfigId", value = "数据源配置的编号", required = true, example = "1", dataTypeClass = Long.class), - @ApiImplicitParam(name = "name", value = "表名,模糊匹配", example = "yudao", dataTypeClass = String.class), - @ApiImplicitParam(name = "comment", value = "描述,模糊匹配", example = "芋道", dataTypeClass = String.class) + @Operation(summary = "获得数据库自带的表定义列表", description = "会过滤掉已经导入 Codegen 的表") + @Parameters({ + @Parameter(name = "dataSourceConfigId", description = "数据源配置的编号", required = true, example = "1"), + @Parameter(name = "name", description = "表名,模糊匹配", example = "yudao"), + @Parameter(name = "comment", description = "描述,模糊匹配", example = "芋道") }) @PreAuthorize("@ss.hasPermission('infra:codegen:query')") public CommonResult> getDatabaseTableList( @@ -61,7 +61,7 @@ public class CodegenController { } @GetMapping("/table/page") - @ApiOperation("获得表定义分页") + @Operation(summary = "获得表定义分页") @PreAuthorize("@ss.hasPermission('infra:codegen:query')") public CommonResult> getCodeGenTablePage(@Valid CodegenTablePageReqVO pageReqVO) { PageResult pageResult = codegenService.getCodegenTablePage(pageReqVO); @@ -69,8 +69,8 @@ public class CodegenController { } @GetMapping("/detail") - @ApiOperation("获得表和字段的明细") - @ApiImplicitParam(name = "tableId", value = "表编号", required = true, example = "1024", dataTypeClass = Long.class) + @Operation(summary = "获得表和字段的明细") + @Parameter(name = "tableId", description = "表编号", required = true, example = "1024") @PreAuthorize("@ss.hasPermission('infra:codegen:query')") public CommonResult getCodegenDetail(@RequestParam("tableId") Long tableId) { CodegenTableDO table = codegenService.getCodegenTablePage(tableId); @@ -79,14 +79,14 @@ public class CodegenController { return success(CodegenConvert.INSTANCE.convert(table, columns)); } - @ApiOperation("基于数据库的表结构,创建代码生成器的表和字段定义") + @Operation(summary = "基于数据库的表结构,创建代码生成器的表和字段定义") @PostMapping("/create-list") @PreAuthorize("@ss.hasPermission('infra:codegen:create')") public CommonResult> createCodegenList(@Valid @RequestBody CodegenCreateListReqVO reqVO) { return success(codegenService.createCodegenList(getLoginUserId(), reqVO)); } - @ApiOperation("更新数据库的表和字段定义") + @Operation(summary = "更新数据库的表和字段定义") @PutMapping("/update") @PreAuthorize("@ss.hasPermission('infra:codegen:update')") public CommonResult updateCodegen(@Valid @RequestBody CodegenUpdateReqVO updateReqVO) { @@ -94,36 +94,36 @@ public class CodegenController { return success(true); } - @ApiOperation("基于数据库的表结构,同步数据库的表和字段定义") + @Operation(summary = "基于数据库的表结构,同步数据库的表和字段定义") @PutMapping("/sync-from-db") - @ApiImplicitParam(name = "tableId", value = "表编号", required = true, example = "1024", dataTypeClass = Long.class) + @Parameter(name = "tableId", description = "表编号", required = true, example = "1024") @PreAuthorize("@ss.hasPermission('infra:codegen:update')") public CommonResult syncCodegenFromDB(@RequestParam("tableId") Long tableId) { codegenService.syncCodegenFromDB(tableId); return success(true); } - @ApiOperation("删除数据库的表和字段定义") + @Operation(summary = "删除数据库的表和字段定义") @DeleteMapping("/delete") - @ApiImplicitParam(name = "tableId", value = "表编号", required = true, example = "1024", dataTypeClass = Long.class) + @Parameter(name = "tableId", description = "表编号", required = true, example = "1024") @PreAuthorize("@ss.hasPermission('infra:codegen:delete')") public CommonResult deleteCodegen(@RequestParam("tableId") Long tableId) { codegenService.deleteCodegen(tableId); return success(true); } - @ApiOperation("预览生成代码") + @Operation(summary = "预览生成代码") @GetMapping("/preview") - @ApiImplicitParam(name = "tableId", value = "表编号", required = true, example = "1024", dataTypeClass = Long.class) + @Parameter(name = "tableId", description = "表编号", required = true, example = "1024") @PreAuthorize("@ss.hasPermission('infra:codegen:preview')") public CommonResult> previewCodegen(@RequestParam("tableId") Long tableId) { Map codes = codegenService.generationCodes(tableId); return success(CodegenConvert.INSTANCE.convert(codes)); } - @ApiOperation("下载生成代码") + @Operation(summary = "下载生成代码") @GetMapping("/download") - @ApiImplicitParam(name = "tableId", value = "表编号", required = true, example = "1024", dataTypeClass = Long.class) + @Parameter(name = "tableId", description = "表编号", required = true, example = "1024") @PreAuthorize("@ss.hasPermission('infra:codegen:download')") public void downloadCodegen(@RequestParam("tableId") Long tableId, HttpServletResponse response) throws IOException { @@ -138,4 +138,4 @@ public class CodegenController { ServletUtils.writeAttachment(response, "codegen.zip", outputStream.toByteArray()); } -} +} \ No newline at end of file diff --git a/yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/controller/admin/codegen/vo/CodegenCreateListReqVO.java b/yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/controller/admin/codegen/vo/CodegenCreateListReqVO.java index 965c5d2b9..46dd711ad 100644 --- a/yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/controller/admin/codegen/vo/CodegenCreateListReqVO.java +++ b/yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/controller/admin/codegen/vo/CodegenCreateListReqVO.java @@ -1,22 +1,22 @@ package cn.iocoder.yudao.module.infra.controller.admin.codegen.vo; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; +import io.swagger.v3.oas.annotations.media.Schema; +import io.swagger.v3.oas.annotations.media.Schema; import lombok.Data; import javax.validation.constraints.NotNull; import java.util.List; -@ApiModel("管理后台 - 基于数据库的表结构,创建代码生成器的表和字段定义 Request VO") +@Schema(description = "管理后台 - 基于数据库的表结构,创建代码生成器的表和字段定义 Request VO") @Data public class CodegenCreateListReqVO { - @ApiModelProperty(value = "数据源配置的编号", required = true, example = "1") + @Schema(description = "数据源配置的编号", required = true, example = "1") @NotNull(message = "数据源配置的编号不能为空") private Long dataSourceConfigId; - @ApiModelProperty(value = "表名数组", required = true, example = "[1, 2, 3]") + @Schema(description = "表名数组", required = true, example = "[1, 2, 3]") @NotNull(message = "表名数组不能为空") private List tableNames; -} +} \ No newline at end of file diff --git a/yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/controller/admin/codegen/vo/CodegenDetailRespVO.java b/yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/controller/admin/codegen/vo/CodegenDetailRespVO.java index ad9c86812..fd2220c3c 100644 --- a/yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/controller/admin/codegen/vo/CodegenDetailRespVO.java +++ b/yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/controller/admin/codegen/vo/CodegenDetailRespVO.java @@ -2,13 +2,13 @@ package cn.iocoder.yudao.module.infra.controller.admin.codegen.vo; import cn.iocoder.yudao.module.infra.controller.admin.codegen.vo.column.CodegenColumnRespVO; import cn.iocoder.yudao.module.infra.controller.admin.codegen.vo.table.CodegenTableRespVO; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; +import io.swagger.v3.oas.annotations.media.Schema; +import io.swagger.v3.oas.annotations.media.Schema; import lombok.Data; import java.util.List; -@ApiModel("管理后台 - 代码生成表和字段的明细 Response VO") +@Schema(description = "管理后台 - 代码生成表和字段的明细 Response VO") @Data public class CodegenDetailRespVO { @@ -18,4 +18,4 @@ public class CodegenDetailRespVO { @ApiModelProperty("字段定义") private List columns; -} +} \ No newline at end of file diff --git a/yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/controller/admin/codegen/vo/CodegenPreviewRespVO.java b/yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/controller/admin/codegen/vo/CodegenPreviewRespVO.java index 662a2350c..fb1b3134e 100644 --- a/yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/controller/admin/codegen/vo/CodegenPreviewRespVO.java +++ b/yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/controller/admin/codegen/vo/CodegenPreviewRespVO.java @@ -1,17 +1,17 @@ package cn.iocoder.yudao.module.infra.controller.admin.codegen.vo; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; +import io.swagger.v3.oas.annotations.media.Schema; +import io.swagger.v3.oas.annotations.media.Schema; import lombok.Data; -@ApiModel(value = "管理后台 - 代码生成预览 Response VO", description ="注意,每个文件都是一个该对象") +@Schema(description = value = "管理后台 - 代码生成预览 Response VO", description ="注意,每个文件都是一个该对象") @Data public class CodegenPreviewRespVO { - @ApiModelProperty(value = "文件路径", required = true, example = "java/cn/iocoder/yudao/adminserver/modules/system/controller/test/SysTestDemoController.java") + @Schema(description = "文件路径", required = true, example = "java/cn/iocoder/yudao/adminserver/modules/system/controller/test/SysTestDemoController.java") private String filePath; - @ApiModelProperty(value = "代码", required = true, example = "Hello World") + @Schema(description = "代码", required = true, example = "Hello World") private String code; -} +} \ No newline at end of file diff --git a/yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/controller/admin/codegen/vo/CodegenUpdateReqVO.java b/yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/controller/admin/codegen/vo/CodegenUpdateReqVO.java index 2423da077..03df3213f 100644 --- a/yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/controller/admin/codegen/vo/CodegenUpdateReqVO.java +++ b/yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/controller/admin/codegen/vo/CodegenUpdateReqVO.java @@ -4,8 +4,8 @@ import cn.hutool.core.util.ObjectUtil; import cn.iocoder.yudao.module.infra.controller.admin.codegen.vo.column.CodegenColumnBaseVO; import cn.iocoder.yudao.module.infra.controller.admin.codegen.vo.table.CodegenTableBaseVO; import cn.iocoder.yudao.module.infra.enums.codegen.CodegenSceneEnum; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; +import io.swagger.v3.oas.annotations.media.Schema; +import io.swagger.v3.oas.annotations.media.Schema; import lombok.Data; import lombok.EqualsAndHashCode; import lombok.ToString; @@ -15,7 +15,7 @@ import javax.validation.constraints.AssertTrue; import javax.validation.constraints.NotNull; import java.util.List; -@ApiModel("管理后台 - 代码生成表和字段的修改 Request VO") +@Schema(description = "管理后台 - 代码生成表和字段的修改 Request VO") @Data public class CodegenUpdateReqVO { @@ -27,14 +27,14 @@ public class CodegenUpdateReqVO { @NotNull(message = "字段定义不能为空") private List columns; - @ApiModel("更新表定义") + @Schema(description = "更新表定义") @Data @EqualsAndHashCode(callSuper = true) @ToString(callSuper = true) @Valid public static class Table extends CodegenTableBaseVO { - @ApiModelProperty(value = "编号", required = true, example = "1") + @Schema(description = "编号", required = true, example = "1") private Long id; @AssertTrue(message = "上级菜单不能为空") @@ -46,15 +46,15 @@ public class CodegenUpdateReqVO { } - @ApiModel("更新表定义") + @Schema(description = "更新表定义") @Data @EqualsAndHashCode(callSuper = true) @ToString(callSuper = true) public static class Column extends CodegenColumnBaseVO { - @ApiModelProperty(value = "编号", required = true, example = "1") + @Schema(description = "编号", required = true, example = "1") private Long id; } -} +} \ No newline at end of file diff --git a/yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/controller/admin/codegen/vo/column/CodegenColumnBaseVO.java b/yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/controller/admin/codegen/vo/column/CodegenColumnBaseVO.java index 770255185..348e1af5a 100644 --- a/yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/controller/admin/codegen/vo/column/CodegenColumnBaseVO.java +++ b/yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/controller/admin/codegen/vo/column/CodegenColumnBaseVO.java @@ -1,6 +1,6 @@ package cn.iocoder.yudao.module.infra.controller.admin.codegen.vo.column; -import io.swagger.annotations.ApiModelProperty; +import io.swagger.v3.oas.annotations.media.Schema; import lombok.Data; import javax.validation.constraints.NotNull; @@ -12,74 +12,74 @@ import javax.validation.constraints.NotNull; @Data public class CodegenColumnBaseVO { - @ApiModelProperty(value = "表编号", required = true, example = "1") + @Schema(description = "表编号", required = true, example = "1") @NotNull(message = "表编号不能为空") private Long tableId; - @ApiModelProperty(value = "字段名", required = true, example = "user_age") + @Schema(description = "字段名", required = true, example = "user_age") @NotNull(message = "字段名不能为空") private String columnName; - @ApiModelProperty(value = "字段类型", required = true, example = "int(11)") + @Schema(description = "字段类型", required = true, example = "int(11)") @NotNull(message = "字段类型不能为空") private String dataType; - @ApiModelProperty(value = "字段描述", required = true, example = "年龄") + @Schema(description = "字段描述", required = true, example = "年龄") @NotNull(message = "字段描述不能为空") private String columnComment; - @ApiModelProperty(value = "是否允许为空", required = true, example = "true") + @Schema(description = "是否允许为空", required = true, example = "true") @NotNull(message = "是否允许为空不能为空") private Boolean nullable; - @ApiModelProperty(value = "是否主键", required = true, example = "false") + @Schema(description = "是否主键", required = true, example = "false") @NotNull(message = "是否主键不能为空") private Boolean primaryKey; - @ApiModelProperty(value = "是否自增", required = true, example = "true") + @Schema(description = "是否自增", required = true, example = "true") @NotNull(message = "是否自增不能为空") private String autoIncrement; - @ApiModelProperty(value = "排序", required = true, example = "10") + @Schema(description = "排序", required = true, example = "10") @NotNull(message = "排序不能为空") private Integer ordinalPosition; - @ApiModelProperty(value = "Java 属性类型", required = true, example = "userAge") + @Schema(description = "Java 属性类型", required = true, example = "userAge") @NotNull(message = "Java 属性类型不能为空") private String javaType; - @ApiModelProperty(value = "Java 属性名", required = true, example = "Integer") + @Schema(description = "Java 属性名", required = true, example = "Integer") @NotNull(message = "Java 属性名不能为空") private String javaField; - @ApiModelProperty(value = "字典类型", example = "sys_gender") + @Schema(description = "字典类型", example = "sys_gender") private String dictType; - @ApiModelProperty(value = "数据示例", example = "1024") + @Schema(description = "数据示例", example = "1024") private String example; - @ApiModelProperty(value = "是否为 Create 创建操作的字段", required = true, example = "true") + @Schema(description = "是否为 Create 创建操作的字段", required = true, example = "true") @NotNull(message = "是否为 Create 创建操作的字段不能为空") private Boolean createOperation; - @ApiModelProperty(value = "是否为 Update 更新操作的字段", required = true, example = "false") + @Schema(description = "是否为 Update 更新操作的字段", required = true, example = "false") @NotNull(message = "是否为 Update 更新操作的字段不能为空") private Boolean updateOperation; - @ApiModelProperty(value = "是否为 List 查询操作的字段", required = true, example = "true") + @Schema(description = "是否为 List 查询操作的字段", required = true, example = "true") @NotNull(message = "是否为 List 查询操作的字段不能为空") private Boolean listOperation; - @ApiModelProperty(value = "List 查询操作的条件类型", required = true, example = "LIKE", notes = "参见 CodegenColumnListConditionEnum 枚举") + @Schema(description = "List 查询操作的条件类型", required = true, example = "LIKE", notes = "参见 CodegenColumnListConditionEnum 枚举") @NotNull(message = "List 查询操作的条件类型不能为空") private String listOperationCondition; - @ApiModelProperty(value = "是否为 List 查询操作的返回字段", required = true, example = "true") + @Schema(description = "是否为 List 查询操作的返回字段", required = true, example = "true") @NotNull(message = "是否为 List 查询操作的返回字段不能为空") private Boolean listOperationResult; - @ApiModelProperty(value = "显示类型", required = true, example = "input") + @Schema(description = "显示类型", required = true, example = "input") @NotNull(message = "显示类型不能为空") private String htmlType; -} +} \ No newline at end of file diff --git a/yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/controller/admin/codegen/vo/column/CodegenColumnRespVO.java b/yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/controller/admin/codegen/vo/column/CodegenColumnRespVO.java index 125b71801..b0f989de7 100644 --- a/yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/controller/admin/codegen/vo/column/CodegenColumnRespVO.java +++ b/yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/controller/admin/codegen/vo/column/CodegenColumnRespVO.java @@ -1,23 +1,23 @@ package cn.iocoder.yudao.module.infra.controller.admin.codegen.vo.column; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; +import io.swagger.v3.oas.annotations.media.Schema; +import io.swagger.v3.oas.annotations.media.Schema; import lombok.Data; import lombok.EqualsAndHashCode; import lombok.ToString; import java.time.LocalDateTime; -@ApiModel("管理后台 - 代码生成字段定义 Response VO") +@Schema(description = "管理后台 - 代码生成字段定义 Response VO") @Data @EqualsAndHashCode(callSuper = true) @ToString(callSuper = true) public class CodegenColumnRespVO extends CodegenColumnBaseVO { - @ApiModelProperty(value = "编号", required = true, example = "1") + @Schema(description = "编号", required = true, example = "1") private Long id; - @ApiModelProperty(value = "创建时间", required = true) + @Schema(description = "创建时间", required = true) private LocalDateTime createTime; -} +} \ No newline at end of file diff --git a/yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/controller/admin/codegen/vo/table/CodegenTableBaseVO.java b/yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/controller/admin/codegen/vo/table/CodegenTableBaseVO.java index ad69de7dd..d58deb2d9 100644 --- a/yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/controller/admin/codegen/vo/table/CodegenTableBaseVO.java +++ b/yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/controller/admin/codegen/vo/table/CodegenTableBaseVO.java @@ -1,6 +1,6 @@ package cn.iocoder.yudao.module.infra.controller.admin.codegen.vo.table; -import io.swagger.annotations.ApiModelProperty; +import io.swagger.v3.oas.annotations.media.Schema; import lombok.Data; import javax.validation.constraints.NotNull; @@ -12,46 +12,46 @@ import javax.validation.constraints.NotNull; @Data public class CodegenTableBaseVO { - @ApiModelProperty(value = "生成场景", required = true, example = "1", notes = "参见 CodegenSceneEnum 枚举") + @Schema(description = "生成场景", required = true, example = "1", notes = "参见 CodegenSceneEnum 枚举") @NotNull(message = "导入类型不能为空") private Integer scene; - @ApiModelProperty(value = "表名称", required = true, example = "yudao") + @Schema(description = "表名称", required = true, example = "yudao") @NotNull(message = "表名称不能为空") private String tableName; - @ApiModelProperty(value = "表描述", required = true, example = "芋道") + @Schema(description = "表描述", required = true, example = "芋道") @NotNull(message = "表描述不能为空") private String tableComment; - @ApiModelProperty(value = "备注", example = "我是备注") + @Schema(description = "备注", example = "我是备注") private String remark; - @ApiModelProperty(value = "模块名", required = true, example = "system") + @Schema(description = "模块名", required = true, example = "system") @NotNull(message = "模块名不能为空") private String moduleName; - @ApiModelProperty(value = "业务名", required = true, example = "codegen") + @Schema(description = "业务名", required = true, example = "codegen") @NotNull(message = "业务名不能为空") private String businessName; - @ApiModelProperty(value = "类名称", required = true, example = "CodegenTable") + @Schema(description = "类名称", required = true, example = "CodegenTable") @NotNull(message = "类名称不能为空") private String className; - @ApiModelProperty(value = "类描述", required = true, example = "代码生成器的表定义") + @Schema(description = "类描述", required = true, example = "代码生成器的表定义") @NotNull(message = "类描述不能为空") private String classComment; - @ApiModelProperty(value = "作者", required = true, example = "芋道源码") + @Schema(description = "作者", required = true, example = "芋道源码") @NotNull(message = "作者不能为空") private String author; - @ApiModelProperty(value = "模板类型", required = true, example = "1", notes = "参见 CodegenTemplateTypeEnum 枚举") + @Schema(description = "模板类型", required = true, example = "1", notes = "参见 CodegenTemplateTypeEnum 枚举") @NotNull(message = "模板类型不能为空") private Integer templateType; - @ApiModelProperty(value = "父菜单编号", example = "1024") + @Schema(description = "父菜单编号", example = "1024") private Long parentMenuId; -} +} \ No newline at end of file diff --git a/yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/controller/admin/codegen/vo/table/CodegenTablePageReqVO.java b/yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/controller/admin/codegen/vo/table/CodegenTablePageReqVO.java index bf940c995..eed1daeb9 100644 --- a/yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/controller/admin/codegen/vo/table/CodegenTablePageReqVO.java +++ b/yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/controller/admin/codegen/vo/table/CodegenTablePageReqVO.java @@ -1,8 +1,8 @@ package cn.iocoder.yudao.module.infra.controller.admin.codegen.vo.table; import cn.iocoder.yudao.framework.common.pojo.PageParam; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; +import io.swagger.v3.oas.annotations.media.Schema; +import io.swagger.v3.oas.annotations.media.Schema; import lombok.Data; import lombok.EqualsAndHashCode; import lombok.ToString; @@ -12,20 +12,20 @@ import java.time.LocalDateTime; import static cn.iocoder.yudao.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND; -@ApiModel("管理后台 - 表定义分页 Request VO") +@Schema(description = "管理后台 - 表定义分页 Request VO") @Data @EqualsAndHashCode(callSuper = true) @ToString(callSuper = true) public class CodegenTablePageReqVO extends PageParam { - @ApiModelProperty(value = "表名称", example = "yudao", notes = "模糊匹配") + @Schema(description = "表名称", example = "yudao", notes = "模糊匹配") private String tableName; - @ApiModelProperty(value = "表描述", example = "芋道", notes = "模糊匹配") + @Schema(description = "表描述", example = "芋道", notes = "模糊匹配") private String tableComment; - @ApiModelProperty(value = "创建时间", example = "[2022-07-01 00:00:00, 2022-07-01 23:59:59]") + @Schema(description = "创建时间", example = "[2022-07-01 00:00:00, 2022-07-01 23:59:59]") @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND) private LocalDateTime[] createTime; -} +} \ No newline at end of file diff --git a/yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/controller/admin/codegen/vo/table/CodegenTableRespVO.java b/yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/controller/admin/codegen/vo/table/CodegenTableRespVO.java index 7ef96b9a8..d89d903cb 100644 --- a/yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/controller/admin/codegen/vo/table/CodegenTableRespVO.java +++ b/yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/controller/admin/codegen/vo/table/CodegenTableRespVO.java @@ -1,29 +1,29 @@ package cn.iocoder.yudao.module.infra.controller.admin.codegen.vo.table; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; +import io.swagger.v3.oas.annotations.media.Schema; +import io.swagger.v3.oas.annotations.media.Schema; import lombok.Data; import lombok.EqualsAndHashCode; import lombok.ToString; import java.time.LocalDateTime; -@ApiModel("管理后台 - 代码生成表定义 Response VO") +@Schema(description = "管理后台 - 代码生成表定义 Response VO") @Data @EqualsAndHashCode(callSuper = true) @ToString(callSuper = true) public class CodegenTableRespVO extends CodegenTableBaseVO { - @ApiModelProperty(value = "编号", required = true, example = "1") + @Schema(description = "编号", required = true, example = "1") private Long id; - @ApiModelProperty(value = "主键编号", required = true, example = "1024") + @Schema(description = "主键编号", required = true, example = "1024") private Integer dataSourceConfigId; - @ApiModelProperty(value = "创建时间", required = true) + @Schema(description = "创建时间", required = true) private LocalDateTime createTime; - @ApiModelProperty(value = "更新时间", required = true) + @Schema(description = "更新时间", required = true) private LocalDateTime updateTime; -} +} \ No newline at end of file diff --git a/yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/controller/admin/codegen/vo/table/DatabaseTableRespVO.java b/yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/controller/admin/codegen/vo/table/DatabaseTableRespVO.java index 1423d119e..2669aba74 100644 --- a/yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/controller/admin/codegen/vo/table/DatabaseTableRespVO.java +++ b/yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/controller/admin/codegen/vo/table/DatabaseTableRespVO.java @@ -1,17 +1,17 @@ package cn.iocoder.yudao.module.infra.controller.admin.codegen.vo.table; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; +import io.swagger.v3.oas.annotations.media.Schema; +import io.swagger.v3.oas.annotations.media.Schema; import lombok.Data; -@ApiModel("管理后台 - 数据库的表定义 Response VO") +@Schema(description = "管理后台 - 数据库的表定义 Response VO") @Data public class DatabaseTableRespVO { - @ApiModelProperty(value = "表名称", required = true, example = "yuanma") + @Schema(description = "表名称", required = true, example = "yuanma") private String name; - @ApiModelProperty(value = "表描述", required = true, example = "芋道源码") + @Schema(description = "表描述", required = true, example = "芋道源码") private String comment; -} +} \ No newline at end of file diff --git a/yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/controller/admin/config/ConfigController.java b/yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/controller/admin/config/ConfigController.java index 255e81fe0..cdeda3f1f 100644 --- a/yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/controller/admin/config/ConfigController.java +++ b/yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/controller/admin/config/ConfigController.java @@ -10,9 +10,9 @@ import cn.iocoder.yudao.module.infra.convert.config.ConfigConvert; import cn.iocoder.yudao.module.infra.dal.dataobject.config.ConfigDO; import cn.iocoder.yudao.module.infra.enums.ErrorCodeConstants; import cn.iocoder.yudao.module.infra.service.config.ConfigService; -import io.swagger.annotations.Api; -import io.swagger.annotations.ApiImplicitParam; -import io.swagger.annotations.ApiOperation; +import io.swagger.v3.oas.annotations.tags.Tag; +import io.swagger.v3.oas.annotations.Parameter; +import io.swagger.v3.oas.annotations.Operation; import org.springframework.security.access.prepost.PreAuthorize; import org.springframework.validation.annotation.Validated; import org.springframework.web.bind.annotation.*; @@ -26,7 +26,7 @@ import java.util.List; import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success; import static cn.iocoder.yudao.framework.operatelog.core.enums.OperateTypeEnum.EXPORT; -@Api(tags = "管理后台 - 参数配置") +@Tag(name = "管理后台 - 参数配置") @RestController @RequestMapping("/infra/config") @Validated @@ -36,14 +36,14 @@ public class ConfigController { private ConfigService configService; @PostMapping("/create") - @ApiOperation("创建参数配置") + @Operation(summary = "创建参数配置") @PreAuthorize("@ss.hasPermission('infra:config:create')") public CommonResult createConfig(@Valid @RequestBody ConfigCreateReqVO reqVO) { return success(configService.createConfig(reqVO)); } @PutMapping("/update") - @ApiOperation("修改参数配置") + @Operation(summary = "修改参数配置") @PreAuthorize("@ss.hasPermission('infra:config:update')") public CommonResult updateConfig(@Valid @RequestBody ConfigUpdateReqVO reqVO) { configService.updateConfig(reqVO); @@ -51,8 +51,8 @@ public class ConfigController { } @DeleteMapping("/delete") - @ApiOperation("删除参数配置") - @ApiImplicitParam(name = "id", value = "编号", required = true, example = "1024", dataTypeClass = Long.class) + @Operation(summary = "删除参数配置") + @Parameter(name = "id", description = "编号", required = true, example = "1024") @PreAuthorize("@ss.hasPermission('infra:config:delete')") public CommonResult deleteConfig(@RequestParam("id") Long id) { configService.deleteConfig(id); @@ -60,16 +60,16 @@ public class ConfigController { } @GetMapping(value = "/get") - @ApiOperation("获得参数配置") - @ApiImplicitParam(name = "id", value = "编号", required = true, example = "1024", dataTypeClass = Long.class) + @Operation(summary = "获得参数配置") + @Parameter(name = "id", description = "编号", required = true, example = "1024") @PreAuthorize("@ss.hasPermission('infra:config:query')") public CommonResult getConfig(@RequestParam("id") Long id) { return success(ConfigConvert.INSTANCE.convert(configService.getConfig(id))); } @GetMapping(value = "/get-value-by-key") - @ApiOperation(value = "根据参数键名查询参数值", notes = "不可见的配置,不允许返回给前端") - @ApiImplicitParam(name = "key", value = "参数键", required = true, example = "yunai.biz.username", dataTypeClass = String.class) + @Operation(summary = "根据参数键名查询参数值", description = "不可见的配置,不允许返回给前端") + @Parameter(name = "key", description = "参数键", required = true, example = "yunai.biz.username") public CommonResult getConfigKey(@RequestParam("key") String key) { ConfigDO config = configService.getConfigByKey(key); if (config == null) { @@ -82,7 +82,7 @@ public class ConfigController { } @GetMapping("/page") - @ApiOperation("获取参数配置分页") + @Operation(summary = "获取参数配置分页") @PreAuthorize("@ss.hasPermission('infra:config:query')") public CommonResult> getConfigPage(@Valid ConfigPageReqVO reqVO) { PageResult page = configService.getConfigPage(reqVO); @@ -90,7 +90,7 @@ public class ConfigController { } @GetMapping("/export") - @ApiOperation("导出参数配置") + @Operation(summary = "导出参数配置") @PreAuthorize("@ss.hasPermission('infra:config:export')") @OperateLog(type = EXPORT) public void exportSysConfig(@Valid ConfigExportReqVO reqVO, @@ -102,4 +102,4 @@ public class ConfigController { ExcelUtils.write(response, "参数配置.xls", "数据", ConfigExcelVO.class, datas); } -} +} \ No newline at end of file diff --git a/yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/controller/admin/config/vo/ConfigBaseVO.java b/yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/controller/admin/config/vo/ConfigBaseVO.java index 774b0ac81..953e06248 100644 --- a/yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/controller/admin/config/vo/ConfigBaseVO.java +++ b/yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/controller/admin/config/vo/ConfigBaseVO.java @@ -1,6 +1,6 @@ package cn.iocoder.yudao.module.infra.controller.admin.config.vo; -import io.swagger.annotations.ApiModelProperty; +import io.swagger.v3.oas.annotations.media.Schema; import lombok.Data; import javax.validation.constraints.NotBlank; @@ -15,26 +15,26 @@ import javax.validation.constraints.Size; @Data public class ConfigBaseVO { - @ApiModelProperty(value = "参数分组", required = true, example = "biz") + @Schema(description = "参数分组", required = true, example = "biz") @NotEmpty(message = "参数分组不能为空") @Size(max = 50, message = "参数名称不能超过50个字符") private String category; - @ApiModelProperty(value = "参数名称", required = true, example = "数据库名") + @Schema(description = "参数名称", required = true, example = "数据库名") @NotBlank(message = "参数名称不能为空") @Size(max = 100, message = "参数名称不能超过100个字符") private String name; - @ApiModelProperty(value = "参数键值", required = true, example = "1024") + @Schema(description = "参数键值", required = true, example = "1024") @NotBlank(message = "参数键值不能为空") @Size(max = 500, message = "参数键值长度不能超过500个字符") private String value; - @ApiModelProperty(value = "是否敏感", required = true, example = "true") + @Schema(description = "是否敏感", required = true, example = "true") @NotNull(message = "是否敏感不能为空") private Boolean visible; - @ApiModelProperty(value = "备注", example = "备注一下很帅气!") + @Schema(description = "备注", example = "备注一下很帅气!") private String remark; -} +} \ No newline at end of file diff --git a/yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/controller/admin/config/vo/ConfigCreateReqVO.java b/yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/controller/admin/config/vo/ConfigCreateReqVO.java index 7a2118ae1..97779c286 100644 --- a/yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/controller/admin/config/vo/ConfigCreateReqVO.java +++ b/yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/controller/admin/config/vo/ConfigCreateReqVO.java @@ -1,21 +1,21 @@ package cn.iocoder.yudao.module.infra.controller.admin.config.vo; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; +import io.swagger.v3.oas.annotations.media.Schema; +import io.swagger.v3.oas.annotations.media.Schema; import lombok.Data; import lombok.EqualsAndHashCode; import javax.validation.constraints.NotBlank; import javax.validation.constraints.Size; -@ApiModel("管理后台 - 参数配置创建 Request VO") +@Schema(description = "管理后台 - 参数配置创建 Request VO") @Data @EqualsAndHashCode(callSuper = true) public class ConfigCreateReqVO extends ConfigBaseVO { - @ApiModelProperty(value = "参数键名", required = true, example = "yunai.db.username") + @Schema(description = "参数键名", required = true, example = "yunai.db.username") @NotBlank(message = "参数键名长度不能为空") @Size(max = 100, message = "参数键名长度不能超过100个字符") private String key; -} +} \ No newline at end of file diff --git a/yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/controller/admin/config/vo/ConfigExportReqVO.java b/yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/controller/admin/config/vo/ConfigExportReqVO.java index 7c679e2d1..4782d7da3 100644 --- a/yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/controller/admin/config/vo/ConfigExportReqVO.java +++ b/yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/controller/admin/config/vo/ConfigExportReqVO.java @@ -1,7 +1,7 @@ package cn.iocoder.yudao.module.infra.controller.admin.config.vo; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; +import io.swagger.v3.oas.annotations.media.Schema; +import io.swagger.v3.oas.annotations.media.Schema; import lombok.Data; import org.springframework.format.annotation.DateTimeFormat; @@ -9,21 +9,21 @@ import java.time.LocalDateTime; import static cn.iocoder.yudao.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND; -@ApiModel("管理后台 - 参数配置导出 Request VO") +@Schema(description = "管理后台 - 参数配置导出 Request VO") @Data public class ConfigExportReqVO { - @ApiModelProperty(value = "参数名称", example = "模糊匹配") + @Schema(description = "参数名称", example = "模糊匹配") private String name; - @ApiModelProperty(value = "参数键名", example = "yunai.db.username", notes = "模糊匹配") + @Schema(description = "参数键名", example = "yunai.db.username", notes = "模糊匹配") private String key; - @ApiModelProperty(value = "参数类型", example = "1", notes = "参见 SysConfigTypeEnum 枚举") + @Schema(description = "参数类型", example = "1", notes = "参见 SysConfigTypeEnum 枚举") private Integer type; - @ApiModelProperty(value = "创建时间", example = "[2022-07-01 00:00:00,2022-07-01 23:59:59]") + @Schema(description = "创建时间", example = "[2022-07-01 00:00:00,2022-07-01 23:59:59]") @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND) private LocalDateTime[] createTime; -} +} \ No newline at end of file diff --git a/yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/controller/admin/config/vo/ConfigPageReqVO.java b/yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/controller/admin/config/vo/ConfigPageReqVO.java index 5ca206d46..ff2653fc3 100644 --- a/yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/controller/admin/config/vo/ConfigPageReqVO.java +++ b/yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/controller/admin/config/vo/ConfigPageReqVO.java @@ -1,8 +1,8 @@ package cn.iocoder.yudao.module.infra.controller.admin.config.vo; import cn.iocoder.yudao.framework.common.pojo.PageParam; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; +import io.swagger.v3.oas.annotations.media.Schema; +import io.swagger.v3.oas.annotations.media.Schema; import lombok.Data; import lombok.EqualsAndHashCode; import lombok.ToString; @@ -12,23 +12,23 @@ import java.time.LocalDateTime; import static cn.iocoder.yudao.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND; -@ApiModel("管理后台 - 参数配置分页 Request VO") +@Schema(description = "管理后台 - 参数配置分页 Request VO") @Data @EqualsAndHashCode(callSuper = true) @ToString(callSuper = true) public class ConfigPageReqVO extends PageParam { - @ApiModelProperty(value = "数据源名称", example = "模糊匹配") + @Schema(description = "数据源名称", example = "模糊匹配") private String name; - @ApiModelProperty(value = "参数键名", example = "yunai.db.username", notes = "模糊匹配") + @Schema(description = "参数键名", example = "yunai.db.username", notes = "模糊匹配") private String key; - @ApiModelProperty(value = "参数类型", example = "1", notes = "参见 SysConfigTypeEnum 枚举") + @Schema(description = "参数类型", example = "1", notes = "参见 SysConfigTypeEnum 枚举") private Integer type; - @ApiModelProperty(value = "创建时间", example = "[2022-07-01 00:00:00,2022-07-01 23:59:59]") + @Schema(description = "创建时间", example = "[2022-07-01 00:00:00,2022-07-01 23:59:59]") @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND) private LocalDateTime[] createTime; -} +} \ No newline at end of file diff --git a/yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/controller/admin/config/vo/ConfigRespVO.java b/yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/controller/admin/config/vo/ConfigRespVO.java index 0c952eecb..02f44f57f 100644 --- a/yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/controller/admin/config/vo/ConfigRespVO.java +++ b/yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/controller/admin/config/vo/ConfigRespVO.java @@ -1,7 +1,7 @@ package cn.iocoder.yudao.module.infra.controller.admin.config.vo; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; +import io.swagger.v3.oas.annotations.media.Schema; +import io.swagger.v3.oas.annotations.media.Schema; import lombok.Data; import lombok.EqualsAndHashCode; @@ -9,23 +9,23 @@ import javax.validation.constraints.NotBlank; import javax.validation.constraints.Size; import java.time.LocalDateTime; -@ApiModel("管理后台 - 参数配置信息 Response VO") +@Schema(description = "管理后台 - 参数配置信息 Response VO") @Data @EqualsAndHashCode(callSuper = true) public class ConfigRespVO extends ConfigBaseVO { - @ApiModelProperty(value = "参数配置序号", required = true, example = "1024") + @Schema(description = "参数配置序号", required = true, example = "1024") private Long id; - @ApiModelProperty(value = "参数键名", required = true, example = "yunai.db.username") + @Schema(description = "参数键名", required = true, example = "yunai.db.username") @NotBlank(message = "参数键名长度不能为空") @Size(max = 100, message = "参数键名长度不能超过100个字符") private String key; - @ApiModelProperty(value = "参数类型", required = true, example = "1", notes = "参见 SysConfigTypeEnum 枚举") + @Schema(description = "参数类型", required = true, example = "1", notes = "参见 SysConfigTypeEnum 枚举") private Integer type; - @ApiModelProperty(value = "创建时间", required = true, example = "时间戳格式") + @Schema(description = "创建时间", required = true, example = "时间戳格式") private LocalDateTime createTime; -} +} \ No newline at end of file diff --git a/yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/controller/admin/config/vo/ConfigUpdateReqVO.java b/yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/controller/admin/config/vo/ConfigUpdateReqVO.java index 2335d6169..e799c7348 100644 --- a/yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/controller/admin/config/vo/ConfigUpdateReqVO.java +++ b/yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/controller/admin/config/vo/ConfigUpdateReqVO.java @@ -1,21 +1,21 @@ package cn.iocoder.yudao.module.infra.controller.admin.config.vo; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; +import io.swagger.v3.oas.annotations.media.Schema; +import io.swagger.v3.oas.annotations.media.Schema; import lombok.Data; import lombok.EqualsAndHashCode; import lombok.ToString; import javax.validation.constraints.NotNull; -@ApiModel("管理后台 - 参数配置创建 Request VO") +@Schema(description = "管理后台 - 参数配置创建 Request VO") @Data @EqualsAndHashCode(callSuper = true) @ToString(callSuper = true) public class ConfigUpdateReqVO extends ConfigBaseVO { - @ApiModelProperty(value = "参数配置序号", required = true, example = "1024") + @Schema(description = "参数配置序号", required = true, example = "1024") @NotNull(message = "参数配置编号不能为空") private Long id; -} +} \ No newline at end of file diff --git a/yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/controller/admin/db/DataSourceConfigController.java b/yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/controller/admin/db/DataSourceConfigController.java index 6b535ae98..2aba1539b 100755 --- a/yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/controller/admin/db/DataSourceConfigController.java +++ b/yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/controller/admin/db/DataSourceConfigController.java @@ -7,9 +7,9 @@ import cn.iocoder.yudao.module.infra.controller.admin.db.vo.DataSourceConfigUpda import cn.iocoder.yudao.module.infra.convert.db.DataSourceConfigConvert; import cn.iocoder.yudao.module.infra.dal.dataobject.db.DataSourceConfigDO; import cn.iocoder.yudao.module.infra.service.db.DataSourceConfigService; -import io.swagger.annotations.Api; -import io.swagger.annotations.ApiImplicitParam; -import io.swagger.annotations.ApiOperation; +import io.swagger.v3.oas.annotations.tags.Tag; +import io.swagger.v3.oas.annotations.Parameter; +import io.swagger.v3.oas.annotations.Operation; import org.springframework.security.access.prepost.PreAuthorize; import org.springframework.validation.annotation.Validated; import org.springframework.web.bind.annotation.*; @@ -20,7 +20,7 @@ import java.util.List; import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success; -@Api(tags = "管理后台 - 数据源配置") +@Tag(name = "管理后台 - 数据源配置") @RestController @RequestMapping("/infra/data-source-config") @Validated @@ -30,14 +30,14 @@ public class DataSourceConfigController { private DataSourceConfigService dataSourceConfigService; @PostMapping("/create") - @ApiOperation("创建数据源配置") + @Operation(summary = "创建数据源配置") @PreAuthorize("@ss.hasPermission('infra:data-source-config:create')") public CommonResult createDataSourceConfig(@Valid @RequestBody DataSourceConfigCreateReqVO createReqVO) { return success(dataSourceConfigService.createDataSourceConfig(createReqVO)); } @PutMapping("/update") - @ApiOperation("更新数据源配置") + @Operation(summary = "更新数据源配置") @PreAuthorize("@ss.hasPermission('infra:data-source-config:update')") public CommonResult updateDataSourceConfig(@Valid @RequestBody DataSourceConfigUpdateReqVO updateReqVO) { dataSourceConfigService.updateDataSourceConfig(updateReqVO); @@ -45,8 +45,8 @@ public class DataSourceConfigController { } @DeleteMapping("/delete") - @ApiOperation("删除数据源配置") - @ApiImplicitParam(name = "id", value = "编号", required = true, dataTypeClass = Long.class) + @Operation(summary = "删除数据源配置") + @Parameter(name = "id", description = "编号", required = true) @PreAuthorize("@ss.hasPermission('infra:data-source-config:delete')") public CommonResult deleteDataSourceConfig(@RequestParam("id") Long id) { dataSourceConfigService.deleteDataSourceConfig(id); @@ -54,8 +54,8 @@ public class DataSourceConfigController { } @GetMapping("/get") - @ApiOperation("获得数据源配置") - @ApiImplicitParam(name = "id", value = "编号", required = true, example = "1024", dataTypeClass = Long.class) + @Operation(summary = "获得数据源配置") + @Parameter(name = "id", description = "编号", required = true, example = "1024") @PreAuthorize("@ss.hasPermission('infra:data-source-config:query')") public CommonResult getDataSourceConfig(@RequestParam("id") Long id) { DataSourceConfigDO dataSourceConfig = dataSourceConfigService.getDataSourceConfig(id); @@ -63,11 +63,11 @@ public class DataSourceConfigController { } @GetMapping("/list") - @ApiOperation("获得数据源配置列表") + @Operation(summary = "获得数据源配置列表") @PreAuthorize("@ss.hasPermission('infra:data-source-config:query')") public CommonResult> getDataSourceConfigList() { List list = dataSourceConfigService.getDataSourceConfigList(); return success(DataSourceConfigConvert.INSTANCE.convertList(list)); } -} +} \ No newline at end of file diff --git a/yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/controller/admin/db/DatabaseDocController.java b/yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/controller/admin/db/DatabaseDocController.java index eb35d4555..09a3eba59 100644 --- a/yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/controller/admin/db/DatabaseDocController.java +++ b/yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/controller/admin/db/DatabaseDocController.java @@ -13,9 +13,9 @@ import com.baomidou.dynamic.datasource.spring.boot.autoconfigure.DataSourcePrope import com.baomidou.dynamic.datasource.spring.boot.autoconfigure.DynamicDataSourceProperties; import com.zaxxer.hikari.HikariConfig; import com.zaxxer.hikari.HikariDataSource; -import io.swagger.annotations.Api; -import io.swagger.annotations.ApiImplicitParam; -import io.swagger.annotations.ApiOperation; +import io.swagger.v3.oas.annotations.tags.Tag; +import io.swagger.v3.oas.annotations.Parameter; +import io.swagger.v3.oas.annotations.Operation; import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestParam; @@ -27,7 +27,7 @@ import java.io.File; import java.io.IOException; import java.util.Arrays; -@Api(tags = "管理后台 - 数据库文档") +@Tag(name = "管理后台 - 数据库文档") @RestController @RequestMapping("/infra/db-doc") public class DatabaseDocController { @@ -42,8 +42,8 @@ public class DatabaseDocController { private static final String DOC_DESCRIPTION = "文档描述"; @GetMapping("/export-html") - @ApiOperation("导出 html 格式的数据文档") - @ApiImplicitParam(name = "deleteFile", value = "是否删除在服务器本地生成的数据库文档", example = "true", + @Operation(summary = "导出 html 格式的数据文档") + @Parameter(name = "deleteFile", description = "是否删除在服务器本地生成的数据库文档", example = "true", dataTypeClass = Boolean.class) public void exportHtml(@RequestParam(defaultValue = "true") Boolean deleteFile, HttpServletResponse response) throws IOException { @@ -51,8 +51,8 @@ public class DatabaseDocController { } @GetMapping("/export-word") - @ApiOperation("导出 word 格式的数据文档") - @ApiImplicitParam(name = "deleteFile", value = "是否删除在服务器本地生成的数据库文档", example = "true", + @Operation(summary = "导出 word 格式的数据文档") + @Parameter(name = "deleteFile", description = "是否删除在服务器本地生成的数据库文档", example = "true", dataTypeClass = Boolean.class) public void exportWord(@RequestParam(defaultValue = "true") Boolean deleteFile, HttpServletResponse response) throws IOException { @@ -60,8 +60,8 @@ public class DatabaseDocController { } @GetMapping("/export-markdown") - @ApiOperation("导出 markdown 格式的数据文档") - @ApiImplicitParam(name = "deleteFile", value = "是否删除在服务器本地生成的数据库文档", example = "true", + @Operation(summary = "导出 markdown 格式的数据文档") + @Parameter(name = "deleteFile", description = "是否删除在服务器本地生成的数据库文档", example = "true", dataTypeClass = Boolean.class) public void exportMarkdown(@RequestParam(defaultValue = "true") Boolean deleteFile, HttpServletResponse response) throws IOException { @@ -154,4 +154,4 @@ public class DatabaseDocController { .build(); } -} +} \ No newline at end of file diff --git a/yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/controller/admin/db/vo/DataSourceConfigBaseVO.java b/yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/controller/admin/db/vo/DataSourceConfigBaseVO.java index dbf25b75c..f16dbe9d8 100755 --- a/yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/controller/admin/db/vo/DataSourceConfigBaseVO.java +++ b/yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/controller/admin/db/vo/DataSourceConfigBaseVO.java @@ -12,16 +12,16 @@ import javax.validation.constraints.*; @Data public class DataSourceConfigBaseVO { - @ApiModelProperty(value = "数据源名称", required = true, example = "test") + @Schema(description = "数据源名称", required = true, example = "test") @NotNull(message = "数据源名称不能为空") private String name; - @ApiModelProperty(value = "数据源连接", required = true, example = "jdbc:mysql://127.0.0.1:3306/ruoyi-vue-pro") + @Schema(description = "数据源连接", required = true, example = "jdbc:mysql://127.0.0.1:3306/ruoyi-vue-pro") @NotNull(message = "数据源连接不能为空") private String url; - @ApiModelProperty(value = "用户名", required = true, example = "root") + @Schema(description = "用户名", required = true, example = "root") @NotNull(message = "用户名不能为空") private String username; -} +} \ No newline at end of file diff --git a/yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/controller/admin/db/vo/DataSourceConfigCreateReqVO.java b/yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/controller/admin/db/vo/DataSourceConfigCreateReqVO.java index 13085f9b1..4d1ea2394 100755 --- a/yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/controller/admin/db/vo/DataSourceConfigCreateReqVO.java +++ b/yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/controller/admin/db/vo/DataSourceConfigCreateReqVO.java @@ -5,14 +5,14 @@ import java.util.*; import io.swagger.annotations.*; import javax.validation.constraints.*; -@ApiModel("管理后台 - 数据源配置创建 Request VO") +@Schema(description = "管理后台 - 数据源配置创建 Request VO") @Data @EqualsAndHashCode(callSuper = true) @ToString(callSuper = true) public class DataSourceConfigCreateReqVO extends DataSourceConfigBaseVO { - @ApiModelProperty(value = "密码", required = true, example = "123456") + @Schema(description = "密码", required = true, example = "123456") @NotNull(message = "密码不能为空") private String password; -} +} \ No newline at end of file diff --git a/yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/controller/admin/db/vo/DataSourceConfigRespVO.java b/yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/controller/admin/db/vo/DataSourceConfigRespVO.java index 134b2b2f1..36f656863 100755 --- a/yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/controller/admin/db/vo/DataSourceConfigRespVO.java +++ b/yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/controller/admin/db/vo/DataSourceConfigRespVO.java @@ -6,16 +6,16 @@ import java.time.LocalDateTime; import java.util.*; import io.swagger.annotations.*; -@ApiModel("管理后台 - 数据源配置 Response VO") +@Schema(description = "管理后台 - 数据源配置 Response VO") @Data @EqualsAndHashCode(callSuper = true) @ToString(callSuper = true) public class DataSourceConfigRespVO extends DataSourceConfigBaseVO { - @ApiModelProperty(value = "主键编号", required = true, example = "1024") + @Schema(description = "主键编号", required = true, example = "1024") private Integer id; - @ApiModelProperty(value = "创建时间", required = true) + @Schema(description = "创建时间", required = true) private LocalDateTime createTime; -} +} \ No newline at end of file diff --git a/yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/controller/admin/db/vo/DataSourceConfigUpdateReqVO.java b/yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/controller/admin/db/vo/DataSourceConfigUpdateReqVO.java index 134f3e9df..4808a4552 100755 --- a/yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/controller/admin/db/vo/DataSourceConfigUpdateReqVO.java +++ b/yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/controller/admin/db/vo/DataSourceConfigUpdateReqVO.java @@ -5,18 +5,18 @@ import java.util.*; import io.swagger.annotations.*; import javax.validation.constraints.*; -@ApiModel("管理后台 - 数据源配置更新 Request VO") +@Schema(description = "管理后台 - 数据源配置更新 Request VO") @Data @EqualsAndHashCode(callSuper = true) @ToString(callSuper = true) public class DataSourceConfigUpdateReqVO extends DataSourceConfigBaseVO { - @ApiModelProperty(value = "主键编号", required = true, example = "1024") + @Schema(description = "主键编号", required = true, example = "1024") @NotNull(message = "主键编号不能为空") private Long id; - @ApiModelProperty(value = "密码", required = true, example = "123456") + @Schema(description = "密码", required = true, example = "123456") @NotNull(message = "密码不能为空") private String password; -} +} \ No newline at end of file diff --git a/yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/controller/admin/file/FileConfigController.java b/yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/controller/admin/file/FileConfigController.java index 8c355d627..1ea122e34 100755 --- a/yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/controller/admin/file/FileConfigController.java +++ b/yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/controller/admin/file/FileConfigController.java @@ -9,9 +9,9 @@ import cn.iocoder.yudao.module.infra.controller.admin.file.vo.config.FileConfigU import cn.iocoder.yudao.module.infra.convert.file.FileConfigConvert; import cn.iocoder.yudao.module.infra.dal.dataobject.file.FileConfigDO; import cn.iocoder.yudao.module.infra.service.file.FileConfigService; -import io.swagger.annotations.Api; -import io.swagger.annotations.ApiImplicitParam; -import io.swagger.annotations.ApiOperation; +import io.swagger.v3.oas.annotations.tags.Tag; +import io.swagger.v3.oas.annotations.Parameter; +import io.swagger.v3.oas.annotations.Operation; import org.springframework.security.access.prepost.PreAuthorize; import org.springframework.validation.annotation.Validated; import org.springframework.web.bind.annotation.*; @@ -21,7 +21,7 @@ import javax.validation.Valid; import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success; -@Api(tags = "管理后台 - 文件配置") +@Tag(name = "管理后台 - 文件配置") @RestController @RequestMapping("/infra/file-config") @Validated @@ -31,14 +31,14 @@ public class FileConfigController { private FileConfigService fileConfigService; @PostMapping("/create") - @ApiOperation("创建文件配置") + @Operation(summary = "创建文件配置") @PreAuthorize("@ss.hasPermission('infra:file-config:create')") public CommonResult createFileConfig(@Valid @RequestBody FileConfigCreateReqVO createReqVO) { return success(fileConfigService.createFileConfig(createReqVO)); } @PutMapping("/update") - @ApiOperation("更新文件配置") + @Operation(summary = "更新文件配置") @PreAuthorize("@ss.hasPermission('infra:file-config:update')") public CommonResult updateFileConfig(@Valid @RequestBody FileConfigUpdateReqVO updateReqVO) { fileConfigService.updateFileConfig(updateReqVO); @@ -46,7 +46,7 @@ public class FileConfigController { } @PutMapping("/update-master") - @ApiOperation("更新文件配置为 Master") + @Operation(summary = "更新文件配置为 Master") @PreAuthorize("@ss.hasPermission('infra:file-config:update')") public CommonResult updateFileConfigMaster(@RequestParam("id") Long id) { fileConfigService.updateFileConfigMaster(id); @@ -54,8 +54,8 @@ public class FileConfigController { } @DeleteMapping("/delete") - @ApiOperation("删除文件配置") - @ApiImplicitParam(name = "id", value = "编号", required = true, dataTypeClass = Long.class) + @Operation(summary = "删除文件配置") + @Parameter(name = "id", description = "编号", required = true) @PreAuthorize("@ss.hasPermission('infra:file-config:delete')") public CommonResult deleteFileConfig(@RequestParam("id") Long id) { fileConfigService.deleteFileConfig(id); @@ -63,8 +63,8 @@ public class FileConfigController { } @GetMapping("/get") - @ApiOperation("获得文件配置") - @ApiImplicitParam(name = "id", value = "编号", required = true, example = "1024", dataTypeClass = Long.class) + @Operation(summary = "获得文件配置") + @Parameter(name = "id", description = "编号", required = true, example = "1024") @PreAuthorize("@ss.hasPermission('infra:file-config:query')") public CommonResult getFileConfig(@RequestParam("id") Long id) { FileConfigDO fileConfig = fileConfigService.getFileConfig(id); @@ -72,7 +72,7 @@ public class FileConfigController { } @GetMapping("/page") - @ApiOperation("获得文件配置分页") + @Operation(summary = "获得文件配置分页") @PreAuthorize("@ss.hasPermission('infra:file-config:query')") public CommonResult> getFileConfigPage(@Valid FileConfigPageReqVO pageVO) { PageResult pageResult = fileConfigService.getFileConfigPage(pageVO); @@ -80,10 +80,10 @@ public class FileConfigController { } @GetMapping("/test") - @ApiOperation("测试文件配置是否正确") + @Operation(summary = "测试文件配置是否正确") @PreAuthorize("@ss.hasPermission('infra:file-config:query')") public CommonResult testFileConfig(@RequestParam("id") Long id) throws Exception { String url = fileConfigService.testFileConfig(id); return success(url); } -} +} \ No newline at end of file diff --git a/yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/controller/admin/file/FileController.java b/yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/controller/admin/file/FileController.java index 3719bc31b..82a9ec232 100644 --- a/yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/controller/admin/file/FileController.java +++ b/yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/controller/admin/file/FileController.java @@ -12,9 +12,9 @@ import cn.iocoder.yudao.module.infra.controller.admin.file.vo.file.FileUploadReq import cn.iocoder.yudao.module.infra.convert.file.FileConvert; import cn.iocoder.yudao.module.infra.dal.dataobject.file.FileDO; import cn.iocoder.yudao.module.infra.service.file.FileService; -import io.swagger.annotations.Api; -import io.swagger.annotations.ApiImplicitParam; -import io.swagger.annotations.ApiOperation; +import io.swagger.v3.oas.annotations.tags.Tag; +import io.swagger.v3.oas.annotations.Parameter; +import io.swagger.v3.oas.annotations.Operation; import lombok.extern.slf4j.Slf4j; import org.springframework.http.HttpStatus; import org.springframework.security.access.prepost.PreAuthorize; @@ -30,7 +30,7 @@ import javax.validation.Valid; import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success; -@Api(tags = "管理后台 - 文件存储") +@Tag(name = "管理后台 - 文件存储") @RestController @RequestMapping("/infra/file") @Validated @@ -41,7 +41,7 @@ public class FileController { private FileService fileService; @PostMapping("/upload") - @ApiOperation("上传文件") + @Operation(summary = "上传文件") @OperateLog(logArgs = false) // 上传文件,没有记录操作日志的必要 public CommonResult uploadFile(FileUploadReqVO uploadReqVO) throws Exception { MultipartFile file = uploadReqVO.getFile(); @@ -50,8 +50,8 @@ public class FileController { } @DeleteMapping("/delete") - @ApiOperation("删除文件") - @ApiImplicitParam(name = "id", value = "编号", required = true, dataTypeClass = Long.class) + @Operation(summary = "删除文件") + @Parameter(name = "id", description = "编号", required = true) @PreAuthorize("@ss.hasPermission('infra:file:delete')") public CommonResult deleteFile(@RequestParam("id") Long id) throws Exception { fileService.deleteFile(id); @@ -60,8 +60,8 @@ public class FileController { @GetMapping("/{configId}/get/**") @PermitAll - @ApiOperation("下载文件") - @ApiImplicitParam(name = "configId", value = "配置编号", required = true, dataTypeClass = Long.class) + @Operation(summary = "下载文件") + @Parameter(name = "configId", description = "配置编号", required = true) public void getFileContent(HttpServletRequest request, HttpServletResponse response, @PathVariable("configId") Long configId) throws Exception { @@ -82,11 +82,11 @@ public class FileController { } @GetMapping("/page") - @ApiOperation("获得文件分页") + @Operation(summary = "获得文件分页") @PreAuthorize("@ss.hasPermission('infra:file:query')") public CommonResult> getFilePage(@Valid FilePageReqVO pageVO) { PageResult pageResult = fileService.getFilePage(pageVO); return success(FileConvert.INSTANCE.convertPage(pageResult)); } -} +} \ No newline at end of file diff --git a/yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/controller/admin/file/vo/config/FileConfigBaseVO.java b/yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/controller/admin/file/vo/config/FileConfigBaseVO.java index 09faa645b..5520ebfec 100755 --- a/yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/controller/admin/file/vo/config/FileConfigBaseVO.java +++ b/yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/controller/admin/file/vo/config/FileConfigBaseVO.java @@ -1,6 +1,6 @@ package cn.iocoder.yudao.module.infra.controller.admin.file.vo.config; -import io.swagger.annotations.ApiModelProperty; +import io.swagger.v3.oas.annotations.media.Schema; import lombok.Data; import javax.validation.constraints.NotNull; @@ -12,11 +12,11 @@ import javax.validation.constraints.NotNull; @Data public class FileConfigBaseVO { - @ApiModelProperty(value = "配置名", required = true, example = "S3 - 阿里云") + @Schema(description = "配置名", required = true, example = "S3 - 阿里云") @NotNull(message = "配置名不能为空") private String name; - @ApiModelProperty(value = "备注", example = "我是备注") + @Schema(description = "备注", example = "我是备注") private String remark; -} +} \ No newline at end of file diff --git a/yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/controller/admin/file/vo/config/FileConfigCreateReqVO.java b/yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/controller/admin/file/vo/config/FileConfigCreateReqVO.java index 876757920..e097ce862 100755 --- a/yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/controller/admin/file/vo/config/FileConfigCreateReqVO.java +++ b/yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/controller/admin/file/vo/config/FileConfigCreateReqVO.java @@ -1,7 +1,7 @@ package cn.iocoder.yudao.module.infra.controller.admin.file.vo.config; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; +import io.swagger.v3.oas.annotations.media.Schema; +import io.swagger.v3.oas.annotations.media.Schema; import lombok.Data; import lombok.EqualsAndHashCode; import lombok.ToString; @@ -9,18 +9,18 @@ import lombok.ToString; import javax.validation.constraints.NotNull; import java.util.Map; -@ApiModel("管理后台 - 文件配置创建 Request VO") +@Schema(description = "管理后台 - 文件配置创建 Request VO") @Data @EqualsAndHashCode(callSuper = true) @ToString(callSuper = true) public class FileConfigCreateReqVO extends FileConfigBaseVO { - @ApiModelProperty(value = "存储器", required = true, example = "1", notes = "参见 FileStorageEnum 枚举类") + @Schema(description = "存储器", required = true, example = "1", notes = "参见 FileStorageEnum 枚举类") @NotNull(message = "存储器不能为空") private Integer storage; - @ApiModelProperty(value = "存储配置", required = true, notes = "配置是动态参数,所以使用 Map 接收") + @Schema(description = "存储配置", required = true, notes = "配置是动态参数,所以使用 Map 接收") @NotNull(message = "存储配置不能为空") private Map config; -} +} \ No newline at end of file diff --git a/yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/controller/admin/file/vo/config/FileConfigPageReqVO.java b/yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/controller/admin/file/vo/config/FileConfigPageReqVO.java index f8ea275f3..2b76612bb 100755 --- a/yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/controller/admin/file/vo/config/FileConfigPageReqVO.java +++ b/yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/controller/admin/file/vo/config/FileConfigPageReqVO.java @@ -1,8 +1,8 @@ package cn.iocoder.yudao.module.infra.controller.admin.file.vo.config; import cn.iocoder.yudao.framework.common.pojo.PageParam; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; +import io.swagger.v3.oas.annotations.media.Schema; +import io.swagger.v3.oas.annotations.media.Schema; import lombok.Data; import lombok.EqualsAndHashCode; import lombok.ToString; @@ -12,20 +12,20 @@ import java.time.LocalDateTime; import static cn.iocoder.yudao.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND; -@ApiModel("管理后台 - 文件配置分页 Request VO") +@Schema(description = "管理后台 - 文件配置分页 Request VO") @Data @EqualsAndHashCode(callSuper = true) @ToString(callSuper = true) public class FileConfigPageReqVO extends PageParam { - @ApiModelProperty(value = "配置名", example = "S3 - 阿里云") + @Schema(description = "配置名", example = "S3 - 阿里云") private String name; - @ApiModelProperty(value = "存储器", example = "1") + @Schema(description = "存储器", example = "1") private Integer storage; - @ApiModelProperty(value = "创建时间", example = "[2022-07-01 00:00:00, 2022-07-01 23:59:59]") + @Schema(description = "创建时间", example = "[2022-07-01 00:00:00, 2022-07-01 23:59:59]") @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND) private LocalDateTime[] createTime; -} +} \ No newline at end of file diff --git a/yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/controller/admin/file/vo/config/FileConfigRespVO.java b/yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/controller/admin/file/vo/config/FileConfigRespVO.java index c2341e486..db92744d8 100755 --- a/yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/controller/admin/file/vo/config/FileConfigRespVO.java +++ b/yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/controller/admin/file/vo/config/FileConfigRespVO.java @@ -1,8 +1,8 @@ package cn.iocoder.yudao.module.infra.controller.admin.file.vo.config; import cn.iocoder.yudao.framework.file.core.client.FileClientConfig; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; +import io.swagger.v3.oas.annotations.media.Schema; +import io.swagger.v3.oas.annotations.media.Schema; import lombok.Data; import lombok.EqualsAndHashCode; import lombok.ToString; @@ -10,27 +10,27 @@ import lombok.ToString; import javax.validation.constraints.NotNull; import java.time.LocalDateTime; -@ApiModel("管理后台 - 文件配置 Response VO") +@Schema(description = "管理后台 - 文件配置 Response VO") @Data @EqualsAndHashCode(callSuper = true) @ToString(callSuper = true) public class FileConfigRespVO extends FileConfigBaseVO { - @ApiModelProperty(value = "编号", required = true, example = "1") + @Schema(description = "编号", required = true, example = "1") private Long id; - @ApiModelProperty(value = "存储器", required = true, example = "1", notes = "参见 FileStorageEnum 枚举类") + @Schema(description = "存储器", required = true, example = "1", notes = "参见 FileStorageEnum 枚举类") @NotNull(message = "存储器不能为空") private Integer storage; - @ApiModelProperty(value = "是否为主配置", required = true, example = "true") + @Schema(description = "是否为主配置", required = true, example = "true") @NotNull(message = "是否为主配置不能为空") private Boolean master; - @ApiModelProperty(value = "存储配置", required = true) + @Schema(description = "存储配置", required = true) private FileClientConfig config; - @ApiModelProperty(value = "创建时间", required = true) + @Schema(description = "创建时间", required = true) private LocalDateTime createTime; -} +} \ No newline at end of file diff --git a/yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/controller/admin/file/vo/config/FileConfigUpdateReqVO.java b/yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/controller/admin/file/vo/config/FileConfigUpdateReqVO.java index 45f8f751a..061bc4db5 100755 --- a/yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/controller/admin/file/vo/config/FileConfigUpdateReqVO.java +++ b/yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/controller/admin/file/vo/config/FileConfigUpdateReqVO.java @@ -1,7 +1,7 @@ package cn.iocoder.yudao.module.infra.controller.admin.file.vo.config; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; +import io.swagger.v3.oas.annotations.media.Schema; +import io.swagger.v3.oas.annotations.media.Schema; import lombok.Data; import lombok.EqualsAndHashCode; import lombok.ToString; @@ -9,18 +9,18 @@ import lombok.ToString; import javax.validation.constraints.NotNull; import java.util.Map; -@ApiModel("管理后台 - 文件配置更新 Request VO") +@Schema(description = "管理后台 - 文件配置更新 Request VO") @Data @EqualsAndHashCode(callSuper = true) @ToString(callSuper = true) public class FileConfigUpdateReqVO extends FileConfigBaseVO { - @ApiModelProperty(value = "编号", required = true, example = "1") + @Schema(description = "编号", required = true, example = "1") @NotNull(message = "编号不能为空") private Long id; - @ApiModelProperty(value = "存储配置", required = true, notes = "配置是动态参数,所以使用 Map 接收") + @Schema(description = "存储配置", required = true, notes = "配置是动态参数,所以使用 Map 接收") @NotNull(message = "存储配置不能为空") private Map config; -} +} \ No newline at end of file diff --git a/yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/controller/admin/file/vo/file/FilePageReqVO.java b/yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/controller/admin/file/vo/file/FilePageReqVO.java index 774ed4f39..6e0aa90c8 100644 --- a/yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/controller/admin/file/vo/file/FilePageReqVO.java +++ b/yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/controller/admin/file/vo/file/FilePageReqVO.java @@ -1,8 +1,8 @@ package cn.iocoder.yudao.module.infra.controller.admin.file.vo.file; import cn.iocoder.yudao.framework.common.pojo.PageParam; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; +import io.swagger.v3.oas.annotations.media.Schema; +import io.swagger.v3.oas.annotations.media.Schema; import lombok.Data; import lombok.EqualsAndHashCode; import lombok.ToString; @@ -12,20 +12,20 @@ import java.time.LocalDateTime; import static cn.iocoder.yudao.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND; -@ApiModel("管理后台 - 文件分页 Request VO") +@Schema(description = "管理后台 - 文件分页 Request VO") @Data @EqualsAndHashCode(callSuper = true) @ToString(callSuper = true) public class FilePageReqVO extends PageParam { - @ApiModelProperty(value = "文件路径", example = "yudao", notes = "模糊匹配") + @Schema(description = "文件路径", example = "yudao", notes = "模糊匹配") private String path; - @ApiModelProperty(value = "文件类型", example = "jpg", notes = "模糊匹配") + @Schema(description = "文件类型", example = "jpg", notes = "模糊匹配") private String type; - @ApiModelProperty(value = "创建时间", example = "[2022-07-01 00:00:00, 2022-07-01 23:59:59]") + @Schema(description = "创建时间", example = "[2022-07-01 00:00:00, 2022-07-01 23:59:59]") @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND) private LocalDateTime[] createTime; -} +} \ No newline at end of file diff --git a/yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/controller/admin/file/vo/file/FileRespVO.java b/yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/controller/admin/file/vo/file/FileRespVO.java index ff51725bf..d54476640 100644 --- a/yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/controller/admin/file/vo/file/FileRespVO.java +++ b/yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/controller/admin/file/vo/file/FileRespVO.java @@ -1,31 +1,31 @@ package cn.iocoder.yudao.module.infra.controller.admin.file.vo.file; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; +import io.swagger.v3.oas.annotations.media.Schema; +import io.swagger.v3.oas.annotations.media.Schema; import lombok.Data; import java.time.LocalDateTime; -@ApiModel(value = "管理后台 - 文件 Response VO", description = "不返回 content 字段,太大") +@Schema(description = value = "管理后台 - 文件 Response VO", description = "不返回 content 字段,太大") @Data public class FileRespVO { - @ApiModelProperty(value = "文件编号", required = true, example = "1024") + @Schema(description = "文件编号", required = true, example = "1024") private Long id; - @ApiModelProperty(value = "文件路径", required = true, example = "yudao.jpg") + @Schema(description = "文件路径", required = true, example = "yudao.jpg") private String path; - @ApiModelProperty(value = "文件 URL", required = true, example = "https://www.iocoder.cn/yudao.jpg") + @Schema(description = "文件 URL", required = true, example = "https://www.iocoder.cn/yudao.jpg") private String url; - @ApiModelProperty(value = "文件类型", example = "jpg") + @Schema(description = "文件类型", example = "jpg") private String type; - @ApiModelProperty(value = "文件大小", example = "2048", required = true) + @Schema(description = "文件大小", example = "2048", required = true) private Integer size; - @ApiModelProperty(value = "创建时间", required = true) + @Schema(description = "创建时间", required = true) private LocalDateTime createTime; -} +} \ No newline at end of file diff --git a/yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/controller/admin/file/vo/file/FileUploadReqVO.java b/yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/controller/admin/file/vo/file/FileUploadReqVO.java index 74e00a75a..412a6ef82 100644 --- a/yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/controller/admin/file/vo/file/FileUploadReqVO.java +++ b/yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/controller/admin/file/vo/file/FileUploadReqVO.java @@ -1,21 +1,21 @@ package cn.iocoder.yudao.module.infra.controller.admin.file.vo.file; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; +import io.swagger.v3.oas.annotations.media.Schema; +import io.swagger.v3.oas.annotations.media.Schema; import lombok.Data; import org.springframework.web.multipart.MultipartFile; import javax.validation.constraints.NotNull; -@ApiModel(value = "管理后台 - 上传文件 Request VO") +@Schema(description = value = "管理后台 - 上传文件 Request VO") @Data public class FileUploadReqVO { - @ApiModelProperty(value = "文件附件", required = true) + @Schema(description = "文件附件", required = true) @NotNull(message = "文件附件不能为空") private MultipartFile file; - @ApiModelProperty(value = "文件附件", example = "yudaoyuanma.png") + @Schema(description = "文件附件", example = "yudaoyuanma.png") private String path; -} +} \ No newline at end of file diff --git a/yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/controller/admin/logger/ApiAccessLogController.java b/yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/controller/admin/logger/ApiAccessLogController.java index 5046ea5af..3533e8c0c 100644 --- a/yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/controller/admin/logger/ApiAccessLogController.java +++ b/yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/controller/admin/logger/ApiAccessLogController.java @@ -11,8 +11,8 @@ import cn.iocoder.yudao.module.infra.controller.admin.logger.vo.apiaccesslog.Api import cn.iocoder.yudao.module.infra.convert.logger.ApiAccessLogConvert; import cn.iocoder.yudao.module.infra.dal.dataobject.logger.ApiAccessLogDO; import cn.iocoder.yudao.module.infra.service.logger.ApiAccessLogService; -import io.swagger.annotations.Api; -import io.swagger.annotations.ApiOperation; +import io.swagger.v3.oas.annotations.tags.Tag; +import io.swagger.v3.oas.annotations.Operation; import org.springframework.security.access.prepost.PreAuthorize; import org.springframework.validation.annotation.Validated; import org.springframework.web.bind.annotation.GetMapping; @@ -28,7 +28,7 @@ import java.util.List; import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success; import static cn.iocoder.yudao.framework.operatelog.core.enums.OperateTypeEnum.EXPORT; -@Api(tags = "管理后台 - API 访问日志") +@Tag(name = "管理后台 - API 访问日志") @RestController @RequestMapping("/infra/api-access-log") @Validated @@ -38,7 +38,7 @@ public class ApiAccessLogController { private ApiAccessLogService apiAccessLogService; @GetMapping("/page") - @ApiOperation("获得API 访问日志分页") + @Operation(summary = "获得API 访问日志分页") @PreAuthorize("@ss.hasPermission('infra:api-access-log:query')") public CommonResult> getApiAccessLogPage(@Valid ApiAccessLogPageReqVO pageVO) { PageResult pageResult = apiAccessLogService.getApiAccessLogPage(pageVO); @@ -46,7 +46,7 @@ public class ApiAccessLogController { } @GetMapping("/export-excel") - @ApiOperation("导出API 访问日志 Excel") + @Operation(summary = "导出API 访问日志 Excel") @PreAuthorize("@ss.hasPermission('infra:api-access-log:export')") @OperateLog(type = EXPORT) public void exportApiAccessLogExcel(@Valid ApiAccessLogExportReqVO exportReqVO, @@ -57,4 +57,4 @@ public class ApiAccessLogController { ExcelUtils.write(response, "API 访问日志.xls", "数据", ApiAccessLogExcelVO.class, datas); } -} +} \ No newline at end of file diff --git a/yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/controller/admin/logger/ApiErrorLogController.java b/yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/controller/admin/logger/ApiErrorLogController.java index d592836b2..9d582670c 100644 --- a/yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/controller/admin/logger/ApiErrorLogController.java +++ b/yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/controller/admin/logger/ApiErrorLogController.java @@ -11,10 +11,10 @@ import cn.iocoder.yudao.module.infra.controller.admin.logger.vo.apierrorlog.ApiE import cn.iocoder.yudao.module.infra.convert.logger.ApiErrorLogConvert; import cn.iocoder.yudao.module.infra.dal.dataobject.logger.ApiErrorLogDO; import cn.iocoder.yudao.module.infra.service.logger.ApiErrorLogService; -import io.swagger.annotations.Api; -import io.swagger.annotations.ApiImplicitParam; -import io.swagger.annotations.ApiImplicitParams; -import io.swagger.annotations.ApiOperation; +import io.swagger.v3.oas.annotations.tags.Tag; +import io.swagger.v3.oas.annotations.Parameter; +import io.swagger.v3.oas.annotations.Parameters; +import io.swagger.v3.oas.annotations.Operation; import org.springframework.security.access.prepost.PreAuthorize; import org.springframework.validation.annotation.Validated; import org.springframework.web.bind.annotation.*; @@ -29,7 +29,7 @@ import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success; import static cn.iocoder.yudao.framework.operatelog.core.enums.OperateTypeEnum.EXPORT; import static cn.iocoder.yudao.framework.security.core.util.SecurityFrameworkUtils.getLoginUserId; -@Api(tags = "管理后台 - API 错误日志") +@Tag(name = "管理后台 - API 错误日志") @RestController @RequestMapping("/infra/api-error-log") @Validated @@ -39,10 +39,10 @@ public class ApiErrorLogController { private ApiErrorLogService apiErrorLogService; @PutMapping("/update-status") - @ApiOperation("更新 API 错误日志的状态") - @ApiImplicitParams({ - @ApiImplicitParam(name = "id", value = "编号", required = true, example = "1024", dataTypeClass = Long.class), - @ApiImplicitParam(name = "processStatus", value = "处理状态", required = true, example = "1", dataTypeClass = Integer.class) + @Operation(summary = "更新 API 错误日志的状态") + @Parameters({ + @Parameter(name = "id", description = "编号", required = true, example = "1024"), + @Parameter(name = "processStatus", description = "处理状态", required = true, example = "1") }) @PreAuthorize("@ss.hasPermission('infra:api-error-log:update-status')") public CommonResult updateApiErrorLogProcess(@RequestParam("id") Long id, @@ -52,7 +52,7 @@ public class ApiErrorLogController { } @GetMapping("/page") - @ApiOperation("获得 API 错误日志分页") + @Operation(summary = "获得 API 错误日志分页") @PreAuthorize("@ss.hasPermission('infra:api-error-log:query')") public CommonResult> getApiErrorLogPage(@Valid ApiErrorLogPageReqVO pageVO) { PageResult pageResult = apiErrorLogService.getApiErrorLogPage(pageVO); @@ -60,7 +60,7 @@ public class ApiErrorLogController { } @GetMapping("/export-excel") - @ApiOperation("导出 API 错误日志 Excel") + @Operation(summary = "导出 API 错误日志 Excel") @PreAuthorize("@ss.hasPermission('infra:api-error-log:export')") @OperateLog(type = EXPORT) public void exportApiErrorLogExcel(@Valid ApiErrorLogExportReqVO exportReqVO, @@ -71,4 +71,4 @@ public class ApiErrorLogController { ExcelUtils.write(response, "API 错误日志.xls", "数据", ApiErrorLogExcelVO.class, datas); } -} +} \ No newline at end of file diff --git a/yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/controller/admin/logger/vo/apiaccesslog/ApiAccessLogBaseVO.java b/yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/controller/admin/logger/vo/apiaccesslog/ApiAccessLogBaseVO.java index 077f26133..cf62d004e 100644 --- a/yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/controller/admin/logger/vo/apiaccesslog/ApiAccessLogBaseVO.java +++ b/yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/controller/admin/logger/vo/apiaccesslog/ApiAccessLogBaseVO.java @@ -1,6 +1,6 @@ package cn.iocoder.yudao.module.infra.controller.admin.logger.vo.apiaccesslog; -import io.swagger.annotations.ApiModelProperty; +import io.swagger.v3.oas.annotations.media.Schema; import lombok.Data; import org.springframework.format.annotation.DateTimeFormat; @@ -16,60 +16,60 @@ import static cn.iocoder.yudao.framework.common.util.date.DateUtils.FORMAT_YEAR_ @Data public class ApiAccessLogBaseVO { - @ApiModelProperty(value = "链路追踪编号", required = true, example = "66600cb6-7852-11eb-9439-0242ac130002") + @Schema(description = "链路追踪编号", required = true, example = "66600cb6-7852-11eb-9439-0242ac130002") @NotNull(message = "链路追踪编号不能为空") private String traceId; - @ApiModelProperty(value = "用户编号", required = true, example = "666") + @Schema(description = "用户编号", required = true, example = "666") @NotNull(message = "用户编号不能为空") private Long userId; - @ApiModelProperty(value = "用户类型", required = true, example = "2", notes = "参见 UserTypeEnum 枚举") + @Schema(description = "用户类型", required = true, example = "2", notes = "参见 UserTypeEnum 枚举") @NotNull(message = "用户类型不能为空") private Integer userType; - @ApiModelProperty(value = "应用名", required = true, example = "dashboard") + @Schema(description = "应用名", required = true, example = "dashboard") @NotNull(message = "应用名不能为空") private String applicationName; - @ApiModelProperty(value = "请求方法名", required = true, example = "GET") + @Schema(description = "请求方法名", required = true, example = "GET") @NotNull(message = "请求方法名不能为空") private String requestMethod; - @ApiModelProperty(value = "请求地址", required = true, example = "/xxx/yyy") + @Schema(description = "请求地址", required = true, example = "/xxx/yyy") @NotNull(message = "请求地址不能为空") private String requestUrl; - @ApiModelProperty(value = "请求参数") + @Schema(description = "请求参数") private String requestParams; - @ApiModelProperty(value = "用户 IP", required = true, example = "127.0.0.1") + @Schema(description = "用户 IP", required = true, example = "127.0.0.1") @NotNull(message = "用户 IP不能为空") private String userIp; - @ApiModelProperty(value = "浏览器 UA", required = true, example = "Mozilla/5.0") + @Schema(description = "浏览器 UA", required = true, example = "Mozilla/5.0") @NotNull(message = "浏览器 UA不能为空") private String userAgent; - @ApiModelProperty(value = "开始请求时间", required = true) + @Schema(description = "开始请求时间", required = true) @NotNull(message = "开始请求时间不能为空") @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND) private LocalDateTime beginTime; - @ApiModelProperty(value = "结束请求时间", required = true) + @Schema(description = "结束请求时间", required = true) @NotNull(message = "结束请求时间不能为空") @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND) private LocalDateTime endTime; - @ApiModelProperty(value = "执行时长", required = true, example = "100") + @Schema(description = "执行时长", required = true, example = "100") @NotNull(message = "执行时长不能为空") private Integer duration; - @ApiModelProperty(value = "结果码", required = true, example = "0") + @Schema(description = "结果码", required = true, example = "0") @NotNull(message = "结果码不能为空") private Integer resultCode; - @ApiModelProperty(value = "结果提示", example = "芋道源码,牛逼!") + @Schema(description = "结果提示", example = "芋道源码,牛逼!") private String resultMsg; -} +} \ No newline at end of file diff --git a/yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/controller/admin/logger/vo/apiaccesslog/ApiAccessLogExportReqVO.java b/yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/controller/admin/logger/vo/apiaccesslog/ApiAccessLogExportReqVO.java index 406446d98..2ab42340f 100644 --- a/yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/controller/admin/logger/vo/apiaccesslog/ApiAccessLogExportReqVO.java +++ b/yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/controller/admin/logger/vo/apiaccesslog/ApiAccessLogExportReqVO.java @@ -1,7 +1,7 @@ package cn.iocoder.yudao.module.infra.controller.admin.logger.vo.apiaccesslog; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; +import io.swagger.v3.oas.annotations.media.Schema; +import io.swagger.v3.oas.annotations.media.Schema; import lombok.Data; import org.springframework.format.annotation.DateTimeFormat; @@ -9,30 +9,30 @@ import java.time.LocalDateTime; import static cn.iocoder.yudao.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND; -@ApiModel(value = "管理后台 - API 访问日志 Excel 导出 Request VO", description = "参数和 ApiAccessLogPageReqVO 是一致的") +@Schema(description = value = "管理后台 - API 访问日志 Excel 导出 Request VO", description = "参数和 ApiAccessLogPageReqVO 是一致的") @Data public class ApiAccessLogExportReqVO { - @ApiModelProperty(value = "用户编号", example = "666") + @Schema(description = "用户编号", example = "666") private Long userId; - @ApiModelProperty(value = "用户类型", example = "2") + @Schema(description = "用户类型", example = "2") private Integer userType; - @ApiModelProperty(value = "应用名", example = "dashboard") + @Schema(description = "应用名", example = "dashboard") private String applicationName; - @ApiModelProperty(value = "请求地址", example = "/xxx/yyy", notes = "模糊匹配") + @Schema(description = "请求地址", example = "/xxx/yyy", notes = "模糊匹配") private String requestUrl; - @ApiModelProperty(value = "开始时间", example = "[2022-07-01 00:00:00, 2022-07-01 23:59:59]") + @Schema(description = "开始时间", example = "[2022-07-01 00:00:00, 2022-07-01 23:59:59]") @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND) private LocalDateTime[] beginTime; - @ApiModelProperty(value = "执行时长", example = "100", notes = "大于等于,单位:毫秒") + @Schema(description = "执行时长", example = "100", notes = "大于等于,单位:毫秒") private Integer duration; - @ApiModelProperty(value = "结果码", example = "0") + @Schema(description = "结果码", example = "0") private Integer resultCode; -} +} \ No newline at end of file diff --git a/yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/controller/admin/logger/vo/apiaccesslog/ApiAccessLogPageReqVO.java b/yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/controller/admin/logger/vo/apiaccesslog/ApiAccessLogPageReqVO.java index a141a758b..3e660ff5d 100644 --- a/yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/controller/admin/logger/vo/apiaccesslog/ApiAccessLogPageReqVO.java +++ b/yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/controller/admin/logger/vo/apiaccesslog/ApiAccessLogPageReqVO.java @@ -1,8 +1,8 @@ package cn.iocoder.yudao.module.infra.controller.admin.logger.vo.apiaccesslog; import cn.iocoder.yudao.framework.common.pojo.PageParam; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; +import io.swagger.v3.oas.annotations.media.Schema; +import io.swagger.v3.oas.annotations.media.Schema; import lombok.Data; import lombok.EqualsAndHashCode; import lombok.ToString; @@ -12,32 +12,32 @@ import java.time.LocalDateTime; import static cn.iocoder.yudao.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND; -@ApiModel("管理后台 - API 访问日志分页 Request VO") +@Schema(description = "管理后台 - API 访问日志分页 Request VO") @Data @EqualsAndHashCode(callSuper = true) @ToString(callSuper = true) public class ApiAccessLogPageReqVO extends PageParam { - @ApiModelProperty(value = "用户编号", example = "666") + @Schema(description = "用户编号", example = "666") private Long userId; - @ApiModelProperty(value = "用户类型", example = "2") + @Schema(description = "用户类型", example = "2") private Integer userType; - @ApiModelProperty(value = "应用名", example = "dashboard") + @Schema(description = "应用名", example = "dashboard") private String applicationName; - @ApiModelProperty(value = "请求地址", example = "/xxx/yyy", notes = "模糊匹配") + @Schema(description = "请求地址", example = "/xxx/yyy", notes = "模糊匹配") private String requestUrl; - @ApiModelProperty(value = "开始时间", example = "[2022-07-01 00:00:00, 2022-07-01 23:59:59]") + @Schema(description = "开始时间", example = "[2022-07-01 00:00:00, 2022-07-01 23:59:59]") @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND) private LocalDateTime[] beginTime; - @ApiModelProperty(value = "执行时长", example = "100", notes = "大于等于,单位:毫秒") + @Schema(description = "执行时长", example = "100", notes = "大于等于,单位:毫秒") private Integer duration; - @ApiModelProperty(value = "结果码", example = "0") + @Schema(description = "结果码", example = "0") private Integer resultCode; -} +} \ No newline at end of file diff --git a/yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/controller/admin/logger/vo/apiaccesslog/ApiAccessLogRespVO.java b/yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/controller/admin/logger/vo/apiaccesslog/ApiAccessLogRespVO.java index 2a6125d38..be4feb65e 100644 --- a/yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/controller/admin/logger/vo/apiaccesslog/ApiAccessLogRespVO.java +++ b/yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/controller/admin/logger/vo/apiaccesslog/ApiAccessLogRespVO.java @@ -1,23 +1,23 @@ package cn.iocoder.yudao.module.infra.controller.admin.logger.vo.apiaccesslog; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; +import io.swagger.v3.oas.annotations.media.Schema; +import io.swagger.v3.oas.annotations.media.Schema; import lombok.Data; import lombok.EqualsAndHashCode; import lombok.ToString; import java.time.LocalDateTime; -@ApiModel("管理后台 - API 访问日志 Response VO") +@Schema(description = "管理后台 - API 访问日志 Response VO") @Data @EqualsAndHashCode(callSuper = true) @ToString(callSuper = true) public class ApiAccessLogRespVO extends ApiAccessLogBaseVO { - @ApiModelProperty(value = "日志主键", required = true, example = "1024") + @Schema(description = "日志主键", required = true, example = "1024") private Long id; - @ApiModelProperty(value = "创建时间", required = true) + @Schema(description = "创建时间", required = true) private LocalDateTime createTime; -} +} \ No newline at end of file diff --git a/yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/controller/admin/logger/vo/apierrorlog/ApiErrorLogBaseVO.java b/yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/controller/admin/logger/vo/apierrorlog/ApiErrorLogBaseVO.java index ad0b44368..ae5448160 100644 --- a/yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/controller/admin/logger/vo/apierrorlog/ApiErrorLogBaseVO.java +++ b/yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/controller/admin/logger/vo/apierrorlog/ApiErrorLogBaseVO.java @@ -1,6 +1,6 @@ package cn.iocoder.yudao.module.infra.controller.admin.logger.vo.apierrorlog; -import io.swagger.annotations.ApiModelProperty; +import io.swagger.v3.oas.annotations.media.Schema; import lombok.Data; import org.springframework.format.annotation.DateTimeFormat; @@ -16,81 +16,81 @@ import static cn.iocoder.yudao.framework.common.util.date.DateUtils.FORMAT_YEAR_ @Data public class ApiErrorLogBaseVO { - @ApiModelProperty(value = "链路追踪编号", required = true, example = "66600cb6-7852-11eb-9439-0242ac130002") + @Schema(description = "链路追踪编号", required = true, example = "66600cb6-7852-11eb-9439-0242ac130002") @NotNull(message = "链路追踪编号不能为空") private String traceId; - @ApiModelProperty(value = "用户编号", required = true, example = "666") + @Schema(description = "用户编号", required = true, example = "666") @NotNull(message = "用户编号不能为空") private Integer userId; - @ApiModelProperty(value = "用户类型", required = true, example = "1") + @Schema(description = "用户类型", required = true, example = "1") @NotNull(message = "用户类型不能为空") private Integer userType; - @ApiModelProperty(value = "应用名", required = true, example = "dashboard") + @Schema(description = "应用名", required = true, example = "dashboard") @NotNull(message = "应用名不能为空") private String applicationName; - @ApiModelProperty(value = "请求方法名", required = true, example = "GET") + @Schema(description = "请求方法名", required = true, example = "GET") @NotNull(message = "请求方法名不能为空") private String requestMethod; - @ApiModelProperty(value = "请求地址", required = true, example = "/xx/yy") + @Schema(description = "请求地址", required = true, example = "/xx/yy") @NotNull(message = "请求地址不能为空") private String requestUrl; - @ApiModelProperty(value = "请求参数", required = true) + @Schema(description = "请求参数", required = true) @NotNull(message = "请求参数不能为空") private String requestParams; - @ApiModelProperty(value = "用户 IP", required = true, example = "127.0.0.1") + @Schema(description = "用户 IP", required = true, example = "127.0.0.1") @NotNull(message = "用户 IP不能为空") private String userIp; - @ApiModelProperty(value = "浏览器 UA", required = true, example = "Mozilla/5.0") + @Schema(description = "浏览器 UA", required = true, example = "Mozilla/5.0") @NotNull(message = "浏览器 UA不能为空") private String userAgent; - @ApiModelProperty(value = "异常发生时间", required = true) + @Schema(description = "异常发生时间", required = true) @NotNull(message = "异常发生时间不能为空") @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND) private LocalDateTime exceptionTime; - @ApiModelProperty(value = "异常名", required = true) + @Schema(description = "异常名", required = true) @NotNull(message = "异常名不能为空") private String exceptionName; - @ApiModelProperty(value = "异常导致的消息", required = true) + @Schema(description = "异常导致的消息", required = true) @NotNull(message = "异常导致的消息不能为空") private String exceptionMessage; - @ApiModelProperty(value = "异常导致的根消息", required = true) + @Schema(description = "异常导致的根消息", required = true) @NotNull(message = "异常导致的根消息不能为空") private String exceptionRootCauseMessage; - @ApiModelProperty(value = "异常的栈轨迹", required = true) + @Schema(description = "异常的栈轨迹", required = true) @NotNull(message = "异常的栈轨迹不能为空") private String exceptionStackTrace; - @ApiModelProperty(value = "异常发生的类全名", required = true) + @Schema(description = "异常发生的类全名", required = true) @NotNull(message = "异常发生的类全名不能为空") private String exceptionClassName; - @ApiModelProperty(value = "异常发生的类文件", required = true) + @Schema(description = "异常发生的类文件", required = true) @NotNull(message = "异常发生的类文件不能为空") private String exceptionFileName; - @ApiModelProperty(value = "异常发生的方法名", required = true) + @Schema(description = "异常发生的方法名", required = true) @NotNull(message = "异常发生的方法名不能为空") private String exceptionMethodName; - @ApiModelProperty(value = "异常发生的方法所在行", required = true) + @Schema(description = "异常发生的方法所在行", required = true) @NotNull(message = "异常发生的方法所在行不能为空") private Integer exceptionLineNumber; - @ApiModelProperty(value = "处理状态", required = true, example = "0") + @Schema(description = "处理状态", required = true, example = "0") @NotNull(message = "处理状态不能为空") private Integer processStatus; -} +} \ No newline at end of file diff --git a/yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/controller/admin/logger/vo/apierrorlog/ApiErrorLogExportReqVO.java b/yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/controller/admin/logger/vo/apierrorlog/ApiErrorLogExportReqVO.java index e2c241138..8050126e4 100644 --- a/yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/controller/admin/logger/vo/apierrorlog/ApiErrorLogExportReqVO.java +++ b/yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/controller/admin/logger/vo/apierrorlog/ApiErrorLogExportReqVO.java @@ -1,7 +1,7 @@ package cn.iocoder.yudao.module.infra.controller.admin.logger.vo.apierrorlog; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; +import io.swagger.v3.oas.annotations.media.Schema; +import io.swagger.v3.oas.annotations.media.Schema; import lombok.Data; import org.springframework.format.annotation.DateTimeFormat; @@ -9,27 +9,27 @@ import java.time.LocalDateTime; import static cn.iocoder.yudao.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND; -@ApiModel(value = "管理后台 - API 错误日志 Excel 导出 Request VO", description = "参数和 ApiErrorLogPageReqVO 是一致的") +@Schema(description = value = "管理后台 - API 错误日志 Excel 导出 Request VO", description = "参数和 ApiErrorLogPageReqVO 是一致的") @Data public class ApiErrorLogExportReqVO { - @ApiModelProperty(value = "用户编号", example = "666") + @Schema(description = "用户编号", example = "666") private Long userId; - @ApiModelProperty(value = "用户类型", example = "1") + @Schema(description = "用户类型", example = "1") private Integer userType; - @ApiModelProperty(value = "应用名", example = "dashboard") + @Schema(description = "应用名", example = "dashboard") private String applicationName; - @ApiModelProperty(value = "请求地址", example = "/xx/yy") + @Schema(description = "请求地址", example = "/xx/yy") private String requestUrl; @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND) - @ApiModelProperty(value = "异常发生时间") + @Schema(description = "异常发生时间") private LocalDateTime[] exceptionTime; - @ApiModelProperty(value = "处理状态", example = "0") + @Schema(description = "处理状态", example = "0") private Integer processStatus; -} +} \ No newline at end of file diff --git a/yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/controller/admin/logger/vo/apierrorlog/ApiErrorLogPageReqVO.java b/yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/controller/admin/logger/vo/apierrorlog/ApiErrorLogPageReqVO.java index 56496325d..e29cfdbad 100644 --- a/yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/controller/admin/logger/vo/apierrorlog/ApiErrorLogPageReqVO.java +++ b/yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/controller/admin/logger/vo/apierrorlog/ApiErrorLogPageReqVO.java @@ -1,8 +1,8 @@ package cn.iocoder.yudao.module.infra.controller.admin.logger.vo.apierrorlog; import cn.iocoder.yudao.framework.common.pojo.PageParam; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; +import io.swagger.v3.oas.annotations.media.Schema; +import io.swagger.v3.oas.annotations.media.Schema; import lombok.Data; import lombok.EqualsAndHashCode; import lombok.ToString; @@ -12,29 +12,29 @@ import java.time.LocalDateTime; import static cn.iocoder.yudao.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND; -@ApiModel("管理后台 - API 错误日志分页 Request VO") +@Schema(description = "管理后台 - API 错误日志分页 Request VO") @Data @EqualsAndHashCode(callSuper = true) @ToString(callSuper = true) public class ApiErrorLogPageReqVO extends PageParam { - @ApiModelProperty(value = "用户编号", example = "666") + @Schema(description = "用户编号", example = "666") private Long userId; - @ApiModelProperty(value = "用户类型", example = "1") + @Schema(description = "用户类型", example = "1") private Integer userType; - @ApiModelProperty(value = "应用名", example = "dashboard") + @Schema(description = "应用名", example = "dashboard") private String applicationName; - @ApiModelProperty(value = "请求地址", example = "/xx/yy") + @Schema(description = "请求地址", example = "/xx/yy") private String requestUrl; @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND) - @ApiModelProperty(value = "异常发生时间") + @Schema(description = "异常发生时间") private LocalDateTime[] exceptionTime; - @ApiModelProperty(value = "处理状态", example = "0") + @Schema(description = "处理状态", example = "0") private Integer processStatus; -} +} \ No newline at end of file diff --git a/yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/controller/admin/logger/vo/apierrorlog/ApiErrorLogRespVO.java b/yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/controller/admin/logger/vo/apierrorlog/ApiErrorLogRespVO.java index c108b548c..899d3c877 100644 --- a/yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/controller/admin/logger/vo/apierrorlog/ApiErrorLogRespVO.java +++ b/yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/controller/admin/logger/vo/apierrorlog/ApiErrorLogRespVO.java @@ -1,29 +1,29 @@ package cn.iocoder.yudao.module.infra.controller.admin.logger.vo.apierrorlog; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; +import io.swagger.v3.oas.annotations.media.Schema; +import io.swagger.v3.oas.annotations.media.Schema; import lombok.Data; import lombok.EqualsAndHashCode; import lombok.ToString; import java.time.LocalDateTime; -@ApiModel("管理后台 - API 错误日志 Response VO") +@Schema(description = "管理后台 - API 错误日志 Response VO") @Data @EqualsAndHashCode(callSuper = true) @ToString(callSuper = true) public class ApiErrorLogRespVO extends ApiErrorLogBaseVO { - @ApiModelProperty(value = "编号", required = true, example = "1024") + @Schema(description = "编号", required = true, example = "1024") private Integer id; - @ApiModelProperty(value = "创建时间", required = true) + @Schema(description = "创建时间", required = true) private LocalDateTime createTime; - @ApiModelProperty(value = "处理时间", required = true) + @Schema(description = "处理时间", required = true) private LocalDateTime processTime; - @ApiModelProperty(value = "处理用户编号", example = "233") + @Schema(description = "处理用户编号", example = "233") private Integer processUserId; -} +} \ No newline at end of file diff --git a/yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/controller/admin/redis/RedisController.java b/yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/controller/admin/redis/RedisController.java index 7d53c7332..56eec47cc 100644 --- a/yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/controller/admin/redis/RedisController.java +++ b/yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/controller/admin/redis/RedisController.java @@ -9,9 +9,9 @@ import cn.iocoder.yudao.module.infra.controller.admin.redis.vo.RedisKeyDefineRes import cn.iocoder.yudao.module.infra.controller.admin.redis.vo.RedisKeyValueRespVO; import cn.iocoder.yudao.module.infra.controller.admin.redis.vo.RedisMonitorRespVO; import cn.iocoder.yudao.module.infra.convert.redis.RedisConvert; -import io.swagger.annotations.Api; -import io.swagger.annotations.ApiImplicitParam; -import io.swagger.annotations.ApiOperation; +import io.swagger.v3.oas.annotations.tags.Tag; +import io.swagger.v3.oas.annotations.Parameter; +import io.swagger.v3.oas.annotations.Operation; import org.springframework.data.redis.connection.RedisServerCommands; import org.springframework.data.redis.core.Cursor; import org.springframework.data.redis.core.RedisCallback; @@ -28,7 +28,7 @@ import java.util.Set; import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success; -@Api(tags = "管理后台 - Redis 监控") +@Tag(name = "管理后台 - Redis 监控") @RestController @RequestMapping("/infra/redis") public class RedisController { @@ -37,7 +37,7 @@ public class RedisController { private StringRedisTemplate stringRedisTemplate; @GetMapping("/get-monitor-info") - @ApiOperation("获得 Redis 监控信息") + @Operation(summary = "获得 Redis 监控信息") @PreAuthorize("@ss.hasPermission('infra:redis:get-monitor-info')") public CommonResult getRedisMonitorInfo() { // 获得 Redis 统计信息 @@ -51,7 +51,7 @@ public class RedisController { } @GetMapping("/get-key-define-list") - @ApiOperation("获得 Redis Key 模板列表") + @Operation(summary = "获得 Redis Key 模板列表") @PreAuthorize("@ss.hasPermission('infra:redis:get-key-list')") public CommonResult> getKeyDefineList() { List keyDefines = RedisKeyRegistry.list(); @@ -59,8 +59,8 @@ public class RedisController { } @GetMapping("/get-key-list") - @ApiOperation("获得 Redis keys 键名列表") - @ApiImplicitParam(name = "keyTemplate", value = "Redis Key 定义", example = "true", dataTypeClass = String.class) + @Operation(summary = "获得 Redis keys 键名列表") + @Parameter(name = "keyTemplate", description = "Redis Key 定义", example = "true") @PreAuthorize("@ss.hasPermission('infra:redis:get-key-list')") public CommonResult> getKeyDefineList(@RequestParam("keyTemplate") String keyTemplate) { return success(getKeyDefineList0(keyTemplate)); @@ -83,8 +83,8 @@ public class RedisController { } @GetMapping("/get-key-value") - @ApiOperation("获得 Redis key 内容") - @ApiImplicitParam(name = "key", value = "Redis Key", example = "oauth2_access_token:233", dataTypeClass = String.class) + @Operation(summary = "获得 Redis key 内容") + @Parameter(name = "key", description = "Redis Key", example = "oauth2_access_token:233") @PreAuthorize("@ss.hasPermission('infra:redis:get-key-list')") public CommonResult getKeyValue(@RequestParam("key") String key) { String value = stringRedisTemplate.opsForValue().get(key); @@ -92,8 +92,8 @@ public class RedisController { } @DeleteMapping("/delete-key") - @ApiOperation("删除 Redis Key") - @ApiImplicitParam(name = "key", value = "Redis Key", example = "oauth2_access_token:233", dataTypeClass = String.class) + @Operation(summary = "删除 Redis Key") + @Parameter(name = "key", description = "Redis Key", example = "oauth2_access_token:233") @PreAuthorize("@ss.hasPermission('infra:redis:get-key-list')") public CommonResult deleteKey(@RequestParam("key") String key) { stringRedisTemplate.delete(key); @@ -101,8 +101,8 @@ public class RedisController { } @DeleteMapping("/delete-keys") - @ApiOperation("删除 Redis Key 根据模板") - @ApiImplicitParam(name = "keyTemplate", value = "Redis Key 定义", example = "true", dataTypeClass = String.class) + @Operation(summary = "删除 Redis Key 根据模板") + @Parameter(name = "keyTemplate", description = "Redis Key 定义", example = "true") @PreAuthorize("@ss.hasPermission('infra:redis:get-key-list')") public CommonResult deleteKeys(@RequestParam("keyTemplate") String keyTemplate) { Set keys = getKeyDefineList0(keyTemplate); @@ -112,4 +112,4 @@ public class RedisController { return success(Boolean.TRUE); } -} +} \ No newline at end of file diff --git a/yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/controller/admin/redis/vo/RedisKeyDefineRespVO.java b/yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/controller/admin/redis/vo/RedisKeyDefineRespVO.java index 4c1b5acd8..82e88d740 100644 --- a/yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/controller/admin/redis/vo/RedisKeyDefineRespVO.java +++ b/yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/controller/admin/redis/vo/RedisKeyDefineRespVO.java @@ -1,36 +1,36 @@ package cn.iocoder.yudao.module.infra.controller.admin.redis.vo; import cn.iocoder.yudao.framework.redis.core.RedisKeyDefine; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; +import io.swagger.v3.oas.annotations.media.Schema; +import io.swagger.v3.oas.annotations.media.Schema; import lombok.AllArgsConstructor; import lombok.Builder; import lombok.Data; import java.time.Duration; -@ApiModel("管理后台 - Redis Key 信息 Response VO") +@Schema(description = "管理后台 - Redis Key 信息 Response VO") @Data @Builder @AllArgsConstructor public class RedisKeyDefineRespVO { - @ApiModelProperty(value = "Key 模板", required = true, example = "login_user:%s") + @Schema(description = "Key 模板", required = true, example = "login_user:%s") private String keyTemplate; - @ApiModelProperty(value = "Key 类型的枚举", required = true, example = "String") + @Schema(description = "Key 类型的枚举", required = true, example = "String") private RedisKeyDefine.KeyTypeEnum keyType; - @ApiModelProperty(value = "Value 类型", required = true, example = "java.lang.String") + @Schema(description = "Value 类型", required = true, example = "java.lang.String") private Class valueType; - @ApiModelProperty(value = "超时类型", required = true, example = "1") + @Schema(description = "超时类型", required = true, example = "1") private RedisKeyDefine.TimeoutTypeEnum timeoutType; - @ApiModelProperty(value = "过期时间,单位:毫秒", required = true, example = "1024") + @Schema(description = "过期时间,单位:毫秒", required = true, example = "1024") private Duration timeout; - @ApiModelProperty(value = "备注", required = true, example = "啦啦啦啦~") + @Schema(description = "备注", required = true, example = "啦啦啦啦~") private String memo; -} +} \ No newline at end of file diff --git a/yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/controller/admin/redis/vo/RedisKeyRespVO.java b/yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/controller/admin/redis/vo/RedisKeyRespVO.java index 6fb71fe9a..bcb5b820f 100644 --- a/yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/controller/admin/redis/vo/RedisKeyRespVO.java +++ b/yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/controller/admin/redis/vo/RedisKeyRespVO.java @@ -1,36 +1,36 @@ package cn.iocoder.yudao.module.infra.controller.admin.redis.vo; import cn.iocoder.yudao.framework.redis.core.RedisKeyDefine; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; +import io.swagger.v3.oas.annotations.media.Schema; +import io.swagger.v3.oas.annotations.media.Schema; import lombok.AllArgsConstructor; import lombok.Builder; import lombok.Data; import java.time.Duration; -@ApiModel("管理后台 - Redis Key 信息 Response VO") +@Schema(description = "管理后台 - Redis Key 信息 Response VO") @Data @Builder @AllArgsConstructor public class RedisKeyRespVO { - @ApiModelProperty(value = "login_user:%s", required = true, example = "String") + @Schema(description = "login_user:%s", required = true, example = "String") private String keyTemplate; - @ApiModelProperty(value = "Key 类型的枚举", required = true, example = "String") + @Schema(description = "Key 类型的枚举", required = true, example = "String") private RedisKeyDefine.KeyTypeEnum keyType; - @ApiModelProperty(value = "Value 类型", required = true, example = "java.lang.String") + @Schema(description = "Value 类型", required = true, example = "java.lang.String") private Class valueType; - @ApiModelProperty(value = "超时类型", required = true, example = "1") + @Schema(description = "超时类型", required = true, example = "1") private RedisKeyDefine.TimeoutTypeEnum timeoutType; - @ApiModelProperty(value = "过期时间,单位:毫秒", required = true, example = "1024") + @Schema(description = "过期时间,单位:毫秒", required = true, example = "1024") private Duration timeout; - @ApiModelProperty(value = "备注", required = true, example = "啦啦啦啦~") + @Schema(description = "备注", required = true, example = "啦啦啦啦~") private String memo; -} +} \ No newline at end of file diff --git a/yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/controller/admin/redis/vo/RedisKeyValueRespVO.java b/yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/controller/admin/redis/vo/RedisKeyValueRespVO.java index 0f16f0640..23a193e85 100644 --- a/yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/controller/admin/redis/vo/RedisKeyValueRespVO.java +++ b/yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/controller/admin/redis/vo/RedisKeyValueRespVO.java @@ -1,19 +1,19 @@ package cn.iocoder.yudao.module.infra.controller.admin.redis.vo; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; +import io.swagger.v3.oas.annotations.media.Schema; +import io.swagger.v3.oas.annotations.media.Schema; import lombok.AllArgsConstructor; import lombok.Data; -@ApiModel("管理后台 - 单个 Redis Key Value Response VO") +@Schema(description = "管理后台 - 单个 Redis Key Value Response VO") @Data @AllArgsConstructor public class RedisKeyValueRespVO { - @ApiModelProperty(value = "c5f6990767804a928f4bb96ca249febf", required = true, example = "String") + @Schema(description = "c5f6990767804a928f4bb96ca249febf", required = true, example = "String") private String key; @ApiModelProperty(required = true, example = "String") private String value; -} +} \ No newline at end of file diff --git a/yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/controller/admin/redis/vo/RedisMonitorRespVO.java b/yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/controller/admin/redis/vo/RedisMonitorRespVO.java index 703a697dc..6f708ef68 100644 --- a/yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/controller/admin/redis/vo/RedisMonitorRespVO.java +++ b/yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/controller/admin/redis/vo/RedisMonitorRespVO.java @@ -1,7 +1,7 @@ package cn.iocoder.yudao.module.infra.controller.admin.redis.vo; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; +import io.swagger.v3.oas.annotations.media.Schema; +import io.swagger.v3.oas.annotations.media.Schema; import lombok.AllArgsConstructor; import lombok.Builder; import lombok.Data; @@ -9,36 +9,36 @@ import lombok.Data; import java.util.List; import java.util.Properties; -@ApiModel("管理后台 - Redis 监控信息 Response VO") +@Schema(description = "管理后台 - Redis 监控信息 Response VO") @Data @Builder @AllArgsConstructor public class RedisMonitorRespVO { - @ApiModelProperty(value = "Redis info 指令结果", required = true, notes = "具体字段,查看 Redis 文档") + @Schema(description = "Redis info 指令结果", required = true, notes = "具体字段,查看 Redis 文档") private Properties info; - @ApiModelProperty(value = "Redis key 数量", required = true, example = "1024") + @Schema(description = "Redis key 数量", required = true, example = "1024") private Long dbSize; - @ApiModelProperty(value = "CommandStat 数组", required = true) + @Schema(description = "CommandStat 数组", required = true) private List commandStats; - @ApiModel("Redis 命令统计结果") + @Schema(description = "Redis 命令统计结果") @Data @Builder @AllArgsConstructor public static class CommandStat { - @ApiModelProperty(value = "Redis 命令", required = true, example = "get") + @Schema(description = "Redis 命令", required = true, example = "get") private String command; - @ApiModelProperty(value = "调用次数", required = true, example = "1024") + @Schema(description = "调用次数", required = true, example = "1024") private Integer calls; - @ApiModelProperty(value = "消耗 CPU 秒数", required = true, example = "666") + @Schema(description = "消耗 CPU 秒数", required = true, example = "666") private Long usec; } -} +} \ No newline at end of file diff --git a/yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/controller/admin/test/TestDemoController.java b/yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/controller/admin/test/TestDemoController.java index a534b7daf..bdd32e4b0 100755 --- a/yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/controller/admin/test/TestDemoController.java +++ b/yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/controller/admin/test/TestDemoController.java @@ -8,9 +8,9 @@ import cn.iocoder.yudao.module.infra.controller.admin.test.vo.*; import cn.iocoder.yudao.module.infra.convert.test.TestDemoConvert; import cn.iocoder.yudao.module.infra.dal.dataobject.test.TestDemoDO; import cn.iocoder.yudao.module.infra.service.test.TestDemoService; -import io.swagger.annotations.Api; -import io.swagger.annotations.ApiImplicitParam; -import io.swagger.annotations.ApiOperation; +import io.swagger.v3.oas.annotations.tags.Tag; +import io.swagger.v3.oas.annotations.Parameter; +import io.swagger.v3.oas.annotations.Operation; import org.springframework.security.access.prepost.PreAuthorize; import org.springframework.validation.annotation.Validated; import org.springframework.web.bind.annotation.*; @@ -25,7 +25,7 @@ import java.util.List; import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success; import static cn.iocoder.yudao.framework.operatelog.core.enums.OperateTypeEnum.EXPORT; -@Api(tags = "管理后台 - 字典类型") +@Tag(name = "管理后台 - 字典类型") @RestController @RequestMapping("/infra/test-demo") @Validated @@ -35,14 +35,14 @@ public class TestDemoController { private TestDemoService testDemoService; @PostMapping("/create") - @ApiOperation("创建字典类型") + @Operation(summary = "创建字典类型") @PreAuthorize("@ss.hasPermission('infra:test-demo:create')") public CommonResult createTestDemo(@Valid @RequestBody TestDemoCreateReqVO createReqVO) { return success(testDemoService.createTestDemo(createReqVO)); } @PutMapping("/update") - @ApiOperation("更新字典类型") + @Operation(summary = "更新字典类型") @PreAuthorize("@ss.hasPermission('infra:test-demo:update')") public CommonResult updateTestDemo(@Valid @RequestBody TestDemoUpdateReqVO updateReqVO) { testDemoService.updateTestDemo(updateReqVO); @@ -50,8 +50,8 @@ public class TestDemoController { } @DeleteMapping("/delete") - @ApiOperation("删除字典类型") - @ApiImplicitParam(name = "id", value = "编号", required = true, dataTypeClass = Long.class) + @Operation(summary = "删除字典类型") + @Parameter(name = "id", description = "编号", required = true) @PreAuthorize("@ss.hasPermission('infra:test-demo:delete')") public CommonResult deleteTestDemo(@RequestParam("id") Long id) { testDemoService.deleteTestDemo(id); @@ -59,8 +59,8 @@ public class TestDemoController { } @GetMapping("/get") - @ApiOperation("获得字典类型") - @ApiImplicitParam(name = "id", value = "编号", required = true, example = "1024", dataTypeClass = Long.class) + @Operation(summary = "获得字典类型") + @Parameter(name = "id", description = "编号", required = true, example = "1024") @PreAuthorize("@ss.hasPermission('infra:test-demo:query')") public CommonResult getTestDemo(@RequestParam("id") Long id) { TestDemoDO testDemo = testDemoService.getTestDemo(id); @@ -68,8 +68,8 @@ public class TestDemoController { } @GetMapping("/list") - @ApiOperation("获得字典类型列表") - @ApiImplicitParam(name = "ids", value = "编号列表", required = true, example = "1024,2048", dataTypeClass = List.class) + @Operation(summary = "获得字典类型列表") + @Parameter(name = "ids", description = "编号列表", required = true, example = "1024,2048", dataTypeClass = List.class) @PreAuthorize("@ss.hasPermission('infra:test-demo:query')") public CommonResult> getTestDemoList(@RequestParam("ids") Collection ids) { List list = testDemoService.getTestDemoList(ids); @@ -77,14 +77,14 @@ public class TestDemoController { } @GetMapping("/page") - @ApiOperation("获得字典类型分页") + @Operation(summary = "获得字典类型分页") @PreAuthorize("@ss.hasPermission('infra:test-demo:query')") public CommonResult> getTestDemoPage(@Valid TestDemoPageReqVO pageVO) { PageResult pageResult = testDemoService.getTestDemoPage(pageVO); return success(TestDemoConvert.INSTANCE.convertPage(pageResult)); } @GetMapping("/export-excel") - @ApiOperation("导出字典类型 Excel") + @Operation(summary = "导出字典类型 Excel") @PreAuthorize("@ss.hasPermission('infra:test-demo:export')") @OperateLog(type = EXPORT) public void exportTestDemoExcel(@Valid TestDemoExportReqVO exportReqVO, HttpServletResponse response) throws IOException { @@ -94,4 +94,4 @@ public class TestDemoController { ExcelUtils.write(response, "字典类型.xls", "数据", TestDemoExcelVO.class, datas); } -} +} \ No newline at end of file diff --git a/yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/controller/admin/test/vo/TestDemoBaseVO.java b/yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/controller/admin/test/vo/TestDemoBaseVO.java index 1f657938e..72e3b0a39 100755 --- a/yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/controller/admin/test/vo/TestDemoBaseVO.java +++ b/yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/controller/admin/test/vo/TestDemoBaseVO.java @@ -12,23 +12,23 @@ import javax.validation.constraints.*; @Data public class TestDemoBaseVO { - @ApiModelProperty(value = "名字", required = true) + @Schema(description = "名字", required = true) @NotNull(message = "名字不能为空") private String name; - @ApiModelProperty(value = "状态", required = true) + @Schema(description = "状态", required = true) @NotNull(message = "状态不能为空") private Integer status; - @ApiModelProperty(value = "类型", required = true) + @Schema(description = "类型", required = true) @NotNull(message = "类型不能为空") private Integer type; - @ApiModelProperty(value = "分类", required = true) + @Schema(description = "分类", required = true) @NotNull(message = "分类不能为空") private Integer category; - @ApiModelProperty(value = "备注") + @Schema(description = "备注") private String remark; -} +} \ No newline at end of file diff --git a/yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/controller/admin/test/vo/TestDemoCreateReqVO.java b/yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/controller/admin/test/vo/TestDemoCreateReqVO.java index d932daac6..0432da0c1 100755 --- a/yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/controller/admin/test/vo/TestDemoCreateReqVO.java +++ b/yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/controller/admin/test/vo/TestDemoCreateReqVO.java @@ -3,10 +3,10 @@ package cn.iocoder.yudao.module.infra.controller.admin.test.vo; import lombok.*; import io.swagger.annotations.*; -@ApiModel("管理后台 - 字典类型创建 Request VO") +@Schema(description = "管理后台 - 字典类型创建 Request VO") @Data @EqualsAndHashCode(callSuper = true) @ToString(callSuper = true) public class TestDemoCreateReqVO extends TestDemoBaseVO { -} +} \ No newline at end of file diff --git a/yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/controller/admin/test/vo/TestDemoExcelVO.java b/yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/controller/admin/test/vo/TestDemoExcelVO.java index d255c86d5..27a1f21c6 100755 --- a/yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/controller/admin/test/vo/TestDemoExcelVO.java +++ b/yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/controller/admin/test/vo/TestDemoExcelVO.java @@ -37,4 +37,4 @@ public class TestDemoExcelVO { @ExcelProperty("创建时间") private LocalDateTime createTime; -} +} \ No newline at end of file diff --git a/yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/controller/admin/test/vo/TestDemoExportReqVO.java b/yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/controller/admin/test/vo/TestDemoExportReqVO.java index c685bffa7..39116010e 100755 --- a/yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/controller/admin/test/vo/TestDemoExportReqVO.java +++ b/yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/controller/admin/test/vo/TestDemoExportReqVO.java @@ -1,7 +1,7 @@ package cn.iocoder.yudao.module.infra.controller.admin.test.vo; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; +import io.swagger.v3.oas.annotations.media.Schema; +import io.swagger.v3.oas.annotations.media.Schema; import lombok.Data; import org.springframework.format.annotation.DateTimeFormat; @@ -9,27 +9,27 @@ import java.time.LocalDateTime; import static cn.iocoder.yudao.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND; -@ApiModel(value = "管理后台 - 字典类型 Excel 导出 Request VO", description = "参数和 TestDemoPageReqVO 是一致的") +@Schema(description = value = "管理后台 - 字典类型 Excel 导出 Request VO", description = "参数和 TestDemoPageReqVO 是一致的") @Data public class TestDemoExportReqVO { - @ApiModelProperty(value = "名字") + @Schema(description = "名字") private String name; - @ApiModelProperty(value = "状态") + @Schema(description = "状态") private Integer status; - @ApiModelProperty(value = "类型") + @Schema(description = "类型") private Integer type; - @ApiModelProperty(value = "分类") + @Schema(description = "分类") private Integer category; - @ApiModelProperty(value = "备注") + @Schema(description = "备注") private String remark; @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND) - @ApiModelProperty(value = "创建时间") + @Schema(description = "创建时间") private LocalDateTime[] createTime; -} +} \ No newline at end of file diff --git a/yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/controller/admin/test/vo/TestDemoPageReqVO.java b/yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/controller/admin/test/vo/TestDemoPageReqVO.java index be68e57a6..88040176f 100755 --- a/yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/controller/admin/test/vo/TestDemoPageReqVO.java +++ b/yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/controller/admin/test/vo/TestDemoPageReqVO.java @@ -1,8 +1,8 @@ package cn.iocoder.yudao.module.infra.controller.admin.test.vo; import cn.iocoder.yudao.framework.common.pojo.PageParam; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; +import io.swagger.v3.oas.annotations.media.Schema; +import io.swagger.v3.oas.annotations.media.Schema; import lombok.Data; import lombok.EqualsAndHashCode; import lombok.ToString; @@ -12,29 +12,29 @@ import java.time.LocalDateTime; import static cn.iocoder.yudao.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND; -@ApiModel("管理后台 - 字典类型分页 Request VO") +@Schema(description = "管理后台 - 字典类型分页 Request VO") @Data @EqualsAndHashCode(callSuper = true) @ToString(callSuper = true) public class TestDemoPageReqVO extends PageParam { - @ApiModelProperty(value = "名字") + @Schema(description = "名字") private String name; - @ApiModelProperty(value = "状态") + @Schema(description = "状态") private Integer status; - @ApiModelProperty(value = "类型") + @Schema(description = "类型") private Integer type; - @ApiModelProperty(value = "分类") + @Schema(description = "分类") private Integer category; - @ApiModelProperty(value = "备注") + @Schema(description = "备注") private String remark; @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND) - @ApiModelProperty(value = "创建时间") + @Schema(description = "创建时间") private LocalDateTime[] createTime; -} +} \ No newline at end of file diff --git a/yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/controller/admin/test/vo/TestDemoRespVO.java b/yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/controller/admin/test/vo/TestDemoRespVO.java index 93f5aecca..a76fdb425 100755 --- a/yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/controller/admin/test/vo/TestDemoRespVO.java +++ b/yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/controller/admin/test/vo/TestDemoRespVO.java @@ -1,23 +1,23 @@ package cn.iocoder.yudao.module.infra.controller.admin.test.vo; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; +import io.swagger.v3.oas.annotations.media.Schema; +import io.swagger.v3.oas.annotations.media.Schema; import lombok.Data; import lombok.EqualsAndHashCode; import lombok.ToString; import java.time.LocalDateTime; -@ApiModel("管理后台 - 字典类型 Response VO") +@Schema(description = "管理后台 - 字典类型 Response VO") @Data @EqualsAndHashCode(callSuper = true) @ToString(callSuper = true) public class TestDemoRespVO extends TestDemoBaseVO { - @ApiModelProperty(value = "编号", required = true) + @Schema(description = "编号", required = true) private Long id; - @ApiModelProperty(value = "创建时间", required = true) + @Schema(description = "创建时间", required = true) private LocalDateTime createTime; -} +} \ No newline at end of file diff --git a/yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/controller/admin/test/vo/TestDemoUpdateReqVO.java b/yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/controller/admin/test/vo/TestDemoUpdateReqVO.java index 59d56b4da..53660be02 100755 --- a/yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/controller/admin/test/vo/TestDemoUpdateReqVO.java +++ b/yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/controller/admin/test/vo/TestDemoUpdateReqVO.java @@ -4,14 +4,14 @@ import lombok.*; import io.swagger.annotations.*; import javax.validation.constraints.*; -@ApiModel("管理后台 - 字典类型更新 Request VO") +@Schema(description = "管理后台 - 字典类型更新 Request VO") @Data @EqualsAndHashCode(callSuper = true) @ToString(callSuper = true) public class TestDemoUpdateReqVO extends TestDemoBaseVO { - @ApiModelProperty(value = "编号", required = true) + @Schema(description = "编号", required = true) @NotNull(message = "编号不能为空") private Long id; -} +} \ No newline at end of file diff --git a/yudao-module-system/yudao-module-system-api/src/main/java/cn/iocoder/yudao/module/system/api/dict/DictDataApi.java b/yudao-module-system/yudao-module-system-api/src/main/java/cn/iocoder/yudao/module/system/api/dict/DictDataApi.java index 82069db63..246aa2db3 100644 --- a/yudao-module-system/yudao-module-system-api/src/main/java/cn/iocoder/yudao/module/system/api/dict/DictDataApi.java +++ b/yudao-module-system/yudao-module-system-api/src/main/java/cn/iocoder/yudao/module/system/api/dict/DictDataApi.java @@ -1,5 +1,9 @@ package cn.iocoder.yudao.module.system.api.dict; +import io.swagger.v3.oas.annotations.tags.Tag; +import io.swagger.v3.oas.annotations.Parameter; +import io.swagger.v3.oas.annotations.Parameters; +import io.swagger.v3.oas.annotations.Operation; import cn.iocoder.yudao.framework.common.pojo.CommonResult; import cn.iocoder.yudao.module.system.api.dict.dto.DictDataRespDTO; import cn.iocoder.yudao.module.system.enums.ApiConstants; @@ -10,36 +14,36 @@ import org.springframework.web.bind.annotation.RequestParam; import java.util.Collection; @FeignClient(name = ApiConstants.NAME) // TODO 芋艿:fallbackFactory = -@Api(tags = "RPC 服务 - 字典数据") +@Tag(name = "RPC 服务 - 字典数据") public interface DictDataApi { String PREFIX = ApiConstants.PREFIX + "/dict-data"; @GetMapping(PREFIX + "/valid") - @ApiOperation("校验字典数据们是否有效") - @ApiImplicitParams({ - @ApiImplicitParam(name = "dictType", value = "字典类型", example = "SEX", required = true, dataTypeClass = String.class), - @ApiImplicitParam(name = "values", value = "字典数据值的数组", example = "1,2", required = true, allowMultiple = true) + @Operation(summary = "校验字典数据们是否有效") + @Parameters({ + @Parameter(name = "dictType", description = "字典类型", example = "SEX", required = true), + @Parameter(name = "descriptions", description = "字典数据值的数组", example = "1,2", required = true) }) CommonResult validateDictDatas(@RequestParam("dictType") String dictType, @RequestParam("values") Collection values); @GetMapping(PREFIX + "/get") - @ApiOperation("获得指定的字典数据") - @ApiImplicitParams({ - @ApiImplicitParam(name = "dictType", value = "字典类型", example = "SEX", required = true, dataTypeClass = String.class), - @ApiImplicitParam(name = "value", value = "字典数据值", example = "1", required = true, dataTypeClass = String.class) + @Operation(summary = "获得指定的字典数据") + @Parameters({ + @Parameter(name = "dictType", description = "字典类型", example = "SEX", required = true), + @Parameter(name = "description", description = "字典数据值", example = "1", required = true) }) CommonResult getDictData(@RequestParam("dictType") String dictType, @RequestParam("value") String value); @GetMapping(PREFIX + "/parse") - @ApiOperation("解析获得指定的字典数据") - @ApiImplicitParams({ - @ApiImplicitParam(name = "dictType", value = "字典类型", example = "SEX", required = true, dataTypeClass = String.class), - @ApiImplicitParam(name = "label", value = "字典标签", example = "男", required = true, dataTypeClass = String.class) + @Operation(summary = "解析获得指定的字典数据") + @Parameters({ + @Parameter(name = "dictType", description = "字典类型", example = "SEX", required = true), + @Parameter(name = "label", description = "字典标签", example = "男", required = true) }) CommonResult parseDictData(@RequestParam("dictType") String dictType, @RequestParam("label") String label); -} +} \ No newline at end of file diff --git a/yudao-module-system/yudao-module-system-api/src/main/java/cn/iocoder/yudao/module/system/api/dict/dto/DictDataRespDTO.java b/yudao-module-system/yudao-module-system-api/src/main/java/cn/iocoder/yudao/module/system/api/dict/dto/DictDataRespDTO.java index c988ea653..45da86691 100644 --- a/yudao-module-system/yudao-module-system-api/src/main/java/cn/iocoder/yudao/module/system/api/dict/dto/DictDataRespDTO.java +++ b/yudao-module-system/yudao-module-system-api/src/main/java/cn/iocoder/yudao/module/system/api/dict/dto/DictDataRespDTO.java @@ -1,21 +1,21 @@ package cn.iocoder.yudao.module.system.api.dict.dto; import cn.iocoder.yudao.framework.common.enums.CommonStatusEnum; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; +import io.swagger.v3.oas.annotations.media.Schema; +import io.swagger.v3.oas.annotations.media.Schema; import lombok.Data; -@ApiModel("RPC 服务 - 字典数据 Response DTO") +@Schema(description = "RPC 服务 - 字典数据 Response DTO") @Data public class DictDataRespDTO { - @ApiModelProperty(value = "字典标签", required = true, example = "芋道") + @Schema(description = "字典标签", required = true, example = "芋道") private String label; - @ApiModelProperty(value = "字典值", required = true, example = "iocoder") + @Schema(description = "字典值", required = true, example = "iocoder") private String value; - @ApiModelProperty(value = "字典类型", required = true, example = "sys_common_sex") + @Schema(description = "字典类型", required = true, example = "sys_common_sex") private String dictType; - @ApiModelProperty(value = "状态", required = true, example = "1", notes = "见 CommonStatusEnum 枚举") + @Schema(description = "状态,见 CommonStatusEnum 枚举", required = true, example = "1") private Integer status; -} +} \ No newline at end of file diff --git a/yudao-module-system/yudao-module-system-api/src/main/java/cn/iocoder/yudao/module/system/api/errorcode/ErrorCodeApi.java b/yudao-module-system/yudao-module-system-api/src/main/java/cn/iocoder/yudao/module/system/api/errorcode/ErrorCodeApi.java index 88e55ded0..9280ff538 100644 --- a/yudao-module-system/yudao-module-system-api/src/main/java/cn/iocoder/yudao/module/system/api/errorcode/ErrorCodeApi.java +++ b/yudao-module-system/yudao-module-system-api/src/main/java/cn/iocoder/yudao/module/system/api/errorcode/ErrorCodeApi.java @@ -4,10 +4,10 @@ import cn.iocoder.yudao.framework.common.pojo.CommonResult; import cn.iocoder.yudao.module.system.api.errorcode.dto.ErrorCodeAutoGenerateReqDTO; import cn.iocoder.yudao.module.system.api.errorcode.dto.ErrorCodeRespDTO; import cn.iocoder.yudao.module.system.enums.ApiConstants; -import io.swagger.annotations.Api; -import io.swagger.annotations.ApiImplicitParam; -import io.swagger.annotations.ApiImplicitParams; -import io.swagger.annotations.ApiOperation; +import io.swagger.v3.oas.annotations.tags.Tag; +import io.swagger.v3.oas.annotations.Parameter; +import io.swagger.v3.oas.annotations.Parameters; +import io.swagger.v3.oas.annotations.Operation; import org.springframework.cloud.openfeign.FeignClient; import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.PostMapping; @@ -20,22 +20,22 @@ import java.util.Date; import java.util.List; @FeignClient(name = ApiConstants.NAME) // TODO 芋艿:fallbackFactory = -@Api(tags = "RPC 服务 - 错误码") +@Tag(name = "RPC 服务 - 错误码") public interface ErrorCodeApi { String PREFIX = ApiConstants.PREFIX + "/error-code"; @PostMapping(PREFIX + "/auto-generate") - @ApiOperation("自动创建错误码") + @Operation(summary = "自动创建错误码") CommonResult autoGenerateErrorCodes(@Valid @RequestBody List autoGenerateDTOs); @GetMapping(PREFIX + "/list") - @ApiOperation(value = "增量获得错误码数组", notes = "如果 minUpdateTime 为空时,则获取所有错误码") - @ApiImplicitParams({ - @ApiImplicitParam(name = "applicationName", value = "应用名", example = "system-server", required = true, dataTypeClass = String.class), - @ApiImplicitParam(name = "minUpdateTime", value = "最小更新时间", dataTypeClass = LocalDateTime.class) + @Operation(summary = "增量获得错误码数组", description = "如果 minUpdateTime 为空时,则获取所有错误码") + @Parameters({ + @Parameter(name = "applicationName", description = "应用名", example = "system-server", required = true), + @Parameter(name = "minUpdateTime", description = "最小更新时间") }) CommonResult> getErrorCodeList(@RequestParam(value = "applicationName") String applicationName, @RequestParam(value = "minUpdateTime", required = false) LocalDateTime minUpdateTime); -} +} \ No newline at end of file diff --git a/yudao-module-system/yudao-module-system-api/src/main/java/cn/iocoder/yudao/module/system/api/logger/LoginLogApi.java b/yudao-module-system/yudao-module-system-api/src/main/java/cn/iocoder/yudao/module/system/api/logger/LoginLogApi.java index dc0c0faee..f6dd7829b 100644 --- a/yudao-module-system/yudao-module-system-api/src/main/java/cn/iocoder/yudao/module/system/api/logger/LoginLogApi.java +++ b/yudao-module-system/yudao-module-system-api/src/main/java/cn/iocoder/yudao/module/system/api/logger/LoginLogApi.java @@ -3,8 +3,8 @@ package cn.iocoder.yudao.module.system.api.logger; import cn.iocoder.yudao.framework.common.pojo.CommonResult; import cn.iocoder.yudao.module.system.api.logger.dto.LoginLogCreateReqDTO; import cn.iocoder.yudao.module.system.enums.ApiConstants; -import io.swagger.annotations.Api; -import io.swagger.annotations.ApiOperation; +import io.swagger.v3.oas.annotations.tags.Tag; +import io.swagger.v3.oas.annotations.Operation; import org.springframework.cloud.openfeign.FeignClient; import org.springframework.web.bind.annotation.PostMapping; import org.springframework.web.bind.annotation.RequestBody; @@ -12,13 +12,13 @@ import org.springframework.web.bind.annotation.RequestBody; import javax.validation.Valid; @FeignClient(name = ApiConstants.NAME) // TODO 芋艿:fallbackFactory = -@Api(tags = "RPC 服务 - 登录日志") +@Tag(name = "RPC 服务 - 登录日志") public interface LoginLogApi { String PREFIX = ApiConstants.PREFIX + "/login-log"; @PostMapping(PREFIX + "/create") - @ApiOperation("创建登录日志") + @Operation(summary = "创建登录日志") CommonResult createLoginLog(@Valid @RequestBody LoginLogCreateReqDTO reqDTO); -} +} \ No newline at end of file diff --git a/yudao-module-system/yudao-module-system-api/src/main/java/cn/iocoder/yudao/module/system/api/logger/OperateLogApi.java b/yudao-module-system/yudao-module-system-api/src/main/java/cn/iocoder/yudao/module/system/api/logger/OperateLogApi.java index 95cc00826..9c28cd1f3 100644 --- a/yudao-module-system/yudao-module-system-api/src/main/java/cn/iocoder/yudao/module/system/api/logger/OperateLogApi.java +++ b/yudao-module-system/yudao-module-system-api/src/main/java/cn/iocoder/yudao/module/system/api/logger/OperateLogApi.java @@ -3,8 +3,8 @@ package cn.iocoder.yudao.module.system.api.logger; import cn.iocoder.yudao.framework.common.pojo.CommonResult; import cn.iocoder.yudao.module.system.api.logger.dto.OperateLogCreateReqDTO; import cn.iocoder.yudao.module.system.enums.ApiConstants; -import io.swagger.annotations.Api; -import io.swagger.annotations.ApiOperation; +import io.swagger.v3.oas.annotations.tags.Tag; +import io.swagger.v3.oas.annotations.Operation; import org.springframework.cloud.openfeign.FeignClient; import org.springframework.web.bind.annotation.PostMapping; import org.springframework.web.bind.annotation.RequestBody; @@ -12,13 +12,13 @@ import org.springframework.web.bind.annotation.RequestBody; import javax.validation.Valid; @FeignClient(name = ApiConstants.NAME) // TODO 芋艿:fallbackFactory = -@Api(tags = "RPC 服务 - 操作日志") +@Tag(name = "RPC 服务 - 操作日志") public interface OperateLogApi { String PREFIX = ApiConstants.PREFIX + "/operate-log"; @PostMapping(PREFIX + "/create") - @ApiOperation("创建操作日志") + @Operation(summary = "创建操作日志") CommonResult createOperateLog(@Valid @RequestBody OperateLogCreateReqDTO createReqDTO); -} +} \ No newline at end of file diff --git a/yudao-module-system/yudao-module-system-api/src/main/java/cn/iocoder/yudao/module/system/api/logger/dto/LoginLogCreateReqDTO.java b/yudao-module-system/yudao-module-system-api/src/main/java/cn/iocoder/yudao/module/system/api/logger/dto/LoginLogCreateReqDTO.java index a3b068d06..e8d380f56 100644 --- a/yudao-module-system/yudao-module-system-api/src/main/java/cn/iocoder/yudao/module/system/api/logger/dto/LoginLogCreateReqDTO.java +++ b/yudao-module-system/yudao-module-system-api/src/main/java/cn/iocoder/yudao/module/system/api/logger/dto/LoginLogCreateReqDTO.java @@ -1,6 +1,6 @@ package cn.iocoder.yudao.module.system.api.logger.dto; -import io.swagger.annotations.ApiModelProperty; +import io.swagger.v3.oas.annotations.media.Schema; import lombok.Data; import javax.validation.constraints.NotBlank; @@ -16,32 +16,32 @@ import javax.validation.constraints.Size; @Data public class LoginLogCreateReqDTO { - @ApiModelProperty(value = "日志类型", required = true, example = "1", notes = "参见 LoginLogTypeEnum 枚举类") + @Schema(description = "日志类型,参见 LoginLogTypeEnum 枚举类", required = true, example = "1" ) @NotNull(message = "日志类型不能为空") private Integer logType; - @ApiModelProperty(value = "链路追踪编号", required = true, example = "89aca178-a370-411c-ae02-3f0d672be4ab") + @Schema(description = "链路追踪编号", required = true, example = "89aca178-a370-411c-ae02-3f0d672be4ab") private String traceId; - @ApiModelProperty(value = "用户编号", example = "666") + @Schema(description = "用户编号", example = "666") private Long userId; - @ApiModelProperty(value = "用户类型", required = true, example = "2", notes = "参见 UserTypeEnum 枚举") + @Schema(description = "用户类型,参见 UserTypeEnum 枚举", required = true, example = "2" ) @NotNull(message = "用户类型不能为空") private Integer userType; - @ApiModelProperty(value = "用户账号", required = true, example = "yudao") + @Schema(description = "用户账号", required = true, example = "yudao") @NotBlank(message = "用户账号不能为空") @Size(max = 30, message = "用户账号长度不能超过30个字符") private String username; - @ApiModelProperty(value = "登录结果", required = true, example = "1", notes = "参见 LoginResultEnum 枚举类") + @Schema(description = "登录结果,参见 LoginResultEnum 枚举类", required = true, example = "1") @NotNull(message = "登录结果不能为空") private Integer result; - @ApiModelProperty(value = "用户 IP", required = true, example = "127.0.0.1") + @Schema(description = "用户 IP", required = true, example = "127.0.0.1") @NotEmpty(message = "用户 IP 不能为空") private String userIp; - @ApiModelProperty(value = "浏览器 UserAgent", required = true, example = "Mozilla/5.0") + @Schema(description = "浏览器 UserAgent", required = true, example = "Mozilla/5.0") private String userAgent; -} +} \ No newline at end of file diff --git a/yudao-module-system/yudao-module-system-api/src/main/java/cn/iocoder/yudao/module/system/api/logger/dto/OperateLogCreateReqDTO.java b/yudao-module-system/yudao-module-system-api/src/main/java/cn/iocoder/yudao/module/system/api/logger/dto/OperateLogCreateReqDTO.java index 483c4e88f..712aadfa3 100644 --- a/yudao-module-system/yudao-module-system-api/src/main/java/cn/iocoder/yudao/module/system/api/logger/dto/OperateLogCreateReqDTO.java +++ b/yudao-module-system/yudao-module-system-api/src/main/java/cn/iocoder/yudao/module/system/api/logger/dto/OperateLogCreateReqDTO.java @@ -1,7 +1,7 @@ package cn.iocoder.yudao.module.system.api.logger.dto; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; +import io.swagger.v3.oas.annotations.media.Schema; +import io.swagger.v3.oas.annotations.media.Schema; import lombok.Data; import javax.validation.constraints.NotEmpty; @@ -9,77 +9,77 @@ import javax.validation.constraints.NotNull; import java.time.LocalDateTime; import java.util.Map; -@ApiModel("RPC 服务 - 操作日志创建 Request DTO") +@Schema(description = "RPC 服务 - 操作日志创建 Request DTO") @Data public class OperateLogCreateReqDTO { - @ApiModelProperty(value = "链路追踪编号", example = "89aca178-a370-411c-ae02-3f0d672be4ab") + @Schema(description = "链路追踪编号", example = "89aca178-a370-411c-ae02-3f0d672be4ab") private String traceId; - @ApiModelProperty(value = "用户编号", required = true, example = "1024") + @Schema(description = "用户编号", required = true, example = "1024") @NotNull(message = "用户编号不能为空") private Long userId; - @ApiModelProperty(value = "用户类型", required = true, example = "1") + @Schema(description = "用户类型", required = true, example = "1") @NotNull(message = "用户类型不能为空") private Integer userType; - @ApiModelProperty(value = "操作模块", required = true, example = "订单") + @Schema(description = "操作模块", required = true, example = "订单") @NotEmpty(message = "操作模块不能为空") private String module; - @ApiModelProperty(value = "操作名", required = true, example = "创建订单") + @Schema(description = "操作名", required = true, example = "创建订单") @NotEmpty(message = "操作名") private String name; - @ApiModelProperty(value = "操作分类", required = true, example = "1", notes = "参见 SysOperateLogTypeEnum 枚举类") + @Schema(description = "操作分类,参见 SysOperateLogTypeEnum 枚举类", required = true, example = "1") @NotNull(message = "操作分类不能为空") private Integer type; - @ApiModelProperty(value = "操作明细", example = "修改编号为 1 的用户信息,将性别从男改成女,将姓名从芋道改成源码。") + @Schema(description = "操作明细", example = "修改编号为 1 的用户信息,将性别从男改成女,将姓名从芋道改成源码。") private String content; - @ApiModelProperty(value = "拓展字段", example = "{'orderId': 1}") + @Schema(description = "拓展字段", example = "{'orderId': 1}") private Map exts; - @ApiModelProperty(value = "请求方法名", required = true, example = "GET") + @Schema(description = "请求方法名", required = true, example = "GET") @NotEmpty(message = "请求方法名不能为空") private String requestMethod; - @ApiModelProperty(value = "请求地址", required = true, example = "/xxx/yyy") + @Schema(description = "请求地址", required = true, example = "/xxx/yyy") @NotEmpty(message = "请求地址不能为空") private String requestUrl; - @ApiModelProperty(value = "用户 IP", required = true, example = "127.0.0.1") + @Schema(description = "用户 IP", required = true, example = "127.0.0.1") @NotEmpty(message = "用户 IP 不能为空") private String userIp; - @ApiModelProperty(value = "浏览器 UserAgent", required = true, example = "Mozilla/5.0") + @Schema(description = "浏览器 UserAgent", required = true, example = "Mozilla/5.0") @NotEmpty(message = "浏览器 UserAgent 不能为空") private String userAgent; - @ApiModelProperty(value = "Java 方法名", required = true, example = "cn.iocoder.yudao.UserController.save(...)") + @Schema(description = "Java 方法名", required = true, example = "cn.iocoder.yudao.UserController.save(...)") @NotEmpty(message = "Java 方法名不能为空") private String javaMethod; - @ApiModelProperty(value = "Java 方法的参数") + @Schema(description = "Java 方法的参数") private String javaMethodArgs; - @ApiModelProperty(value = "开始时间", required = true) + @Schema(description = "开始时间", required = true) @NotNull(message = "开始时间不能为空") private LocalDateTime startTime; - @ApiModelProperty(value = "执行时长,单位:毫秒", required = true) + @Schema(description = "执行时长,单位:毫秒", required = true) @NotNull(message = "执行时长不能为空") private Integer duration; - @ApiModelProperty(value = "结果码", required = true) + @Schema(description = "结果码", required = true) @NotNull(message = "结果码不能为空") private Integer resultCode; - @ApiModelProperty(value = "结果提示") + @Schema(description = "结果提示") private String resultMsg; - @ApiModelProperty(value = "结果数据") + @Schema(description = "结果数据") private String resultData; -} +} \ No newline at end of file diff --git a/yudao-module-system/yudao-module-system-api/src/main/java/cn/iocoder/yudao/module/system/api/mail/MailSendApi.java b/yudao-module-system/yudao-module-system-api/src/main/java/cn/iocoder/yudao/module/system/api/mail/MailSendApi.java index ded07635a..56f9a8b56 100644 --- a/yudao-module-system/yudao-module-system-api/src/main/java/cn/iocoder/yudao/module/system/api/mail/MailSendApi.java +++ b/yudao-module-system/yudao-module-system-api/src/main/java/cn/iocoder/yudao/module/system/api/mail/MailSendApi.java @@ -3,25 +3,25 @@ package cn.iocoder.yudao.module.system.api.mail; import cn.iocoder.yudao.framework.common.pojo.CommonResult; import cn.iocoder.yudao.module.system.api.mail.dto.MailSendSingleToUserReqDTO; import cn.iocoder.yudao.module.system.enums.ApiConstants; -import io.swagger.annotations.Api; -import io.swagger.annotations.ApiOperation; +import io.swagger.v3.oas.annotations.tags.Tag; +import io.swagger.v3.oas.annotations.Operation; import org.springframework.cloud.openfeign.FeignClient; import org.springframework.web.bind.annotation.PostMapping; import javax.validation.Valid; @FeignClient(name = ApiConstants.NAME) // TODO 芋艿:fallbackFactory = -@Api(tags = "RPC 服务 - 邮件发送") +@Tag(name = "RPC 服务 - 邮件发送") public interface MailSendApi { String PREFIX = ApiConstants.PREFIX + "/mail/send"; @PostMapping(PREFIX + "/send-single-admin") - @ApiOperation(value = "发送单条邮件给 Admin 用户", notes = "在 mail 为空时,使用 userId 加载对应 Admin 的邮箱") + @Operation(summary = "发送单条邮件给 Admin 用户", description = "在 mail 为空时,使用 userId 加载对应 Admin 的邮箱") CommonResult sendSingleMailToAdmin(@Valid MailSendSingleToUserReqDTO reqDTO); @PostMapping(PREFIX + "/send-single-member") - @ApiOperation(value = "发送单条邮件给 Member 用户", notes = "在 mail 为空时,使用 userId 加载对应 Member 的邮箱") + @Operation(summary = "发送单条邮件给 Member 用户", description = "在 mail 为空时,使用 userId 加载对应 Member 的邮箱") CommonResult sendSingleMailToMember(@Valid MailSendSingleToUserReqDTO reqDTO); -} +} \ No newline at end of file diff --git a/yudao-module-system/yudao-module-system-api/src/main/java/cn/iocoder/yudao/module/system/api/mail/dto/MailSendSingleToUserReqDTO.java b/yudao-module-system/yudao-module-system-api/src/main/java/cn/iocoder/yudao/module/system/api/mail/dto/MailSendSingleToUserReqDTO.java index 57c07cef4..230fc2f86 100644 --- a/yudao-module-system/yudao-module-system-api/src/main/java/cn/iocoder/yudao/module/system/api/mail/dto/MailSendSingleToUserReqDTO.java +++ b/yudao-module-system/yudao-module-system-api/src/main/java/cn/iocoder/yudao/module/system/api/mail/dto/MailSendSingleToUserReqDTO.java @@ -1,27 +1,27 @@ package cn.iocoder.yudao.module.system.api.mail.dto; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; +import io.swagger.v3.oas.annotations.media.Schema; +import io.swagger.v3.oas.annotations.media.Schema; import lombok.Data; import javax.validation.constraints.Email; import javax.validation.constraints.NotNull; import java.util.Map; -@ApiModel("RPC 服务 - 邮件发送给 Admin 或者 Member 用户 Request DTO") +@Schema(description = "RPC 服务 - 邮件发送给 Admin 或者 Member 用户 Request DTO") @Data public class MailSendSingleToUserReqDTO { - @ApiModelProperty(value = "用户编号", example = "1024") + @Schema(description = "用户编号", example = "1024") private Long userId; - @ApiModelProperty(value = "手机号", required = true, example = "15601691300") + @Schema(description = "手机号", required = true, example = "15601691300") @Email private String mail; - @ApiModelProperty(value = "邮件模板编号", required = true, example = "USER_SEND") + @Schema(description = "邮件模板编号", required = true, example = "USER_SEND") @NotNull(message = "邮件模板编号不能为空") private String templateCode; - @ApiModelProperty(value = "邮件模板参数") + @Schema(description = "邮件模板参数") private Map templateParams; -} +} \ No newline at end of file diff --git a/yudao-module-system/yudao-module-system-api/src/main/java/cn/iocoder/yudao/module/system/api/notify/NotifyMessageSendApi.java b/yudao-module-system/yudao-module-system-api/src/main/java/cn/iocoder/yudao/module/system/api/notify/NotifyMessageSendApi.java index 781a792ad..5535d6717 100644 --- a/yudao-module-system/yudao-module-system-api/src/main/java/cn/iocoder/yudao/module/system/api/notify/NotifyMessageSendApi.java +++ b/yudao-module-system/yudao-module-system-api/src/main/java/cn/iocoder/yudao/module/system/api/notify/NotifyMessageSendApi.java @@ -3,25 +3,25 @@ package cn.iocoder.yudao.module.system.api.notify; import cn.iocoder.yudao.framework.common.pojo.CommonResult; import cn.iocoder.yudao.module.system.api.notify.dto.NotifySendSingleToUserReqDTO; import cn.iocoder.yudao.module.system.enums.ApiConstants; -import io.swagger.annotations.Api; -import io.swagger.annotations.ApiOperation; +import io.swagger.v3.oas.annotations.tags.Tag; +import io.swagger.v3.oas.annotations.Operation; import org.springframework.cloud.openfeign.FeignClient; import org.springframework.web.bind.annotation.PostMapping; import javax.validation.Valid; @FeignClient(name = ApiConstants.NAME) // TODO 芋艿:fallbackFactory = -@Api(tags = "RPC 服务 - 站内信发送") +@Tag(name = "RPC 服务 - 站内信发送") public interface NotifyMessageSendApi { String PREFIX = ApiConstants.PREFIX + "/notify/send"; @PostMapping(PREFIX + "/send-single-admin") - @ApiOperation(value = "发送单条站内信给 Admin 用户") + @Operation(summary = "发送单条站内信给 Admin 用户") CommonResult sendSingleMessageToAdmin(@Valid NotifySendSingleToUserReqDTO reqDTO); @PostMapping(PREFIX + "/send-single-member") - @ApiOperation(value = "发送单条站内信给 Member 用户") + @Operation(summary = "发送单条站内信给 Member 用户") CommonResult sendSingleMessageToMember(@Valid NotifySendSingleToUserReqDTO reqDTO); -} +} \ No newline at end of file diff --git a/yudao-module-system/yudao-module-system-api/src/main/java/cn/iocoder/yudao/module/system/api/notify/dto/NotifySendSingleToUserReqDTO.java b/yudao-module-system/yudao-module-system-api/src/main/java/cn/iocoder/yudao/module/system/api/notify/dto/NotifySendSingleToUserReqDTO.java index 124b9c74a..22e9bee44 100644 --- a/yudao-module-system/yudao-module-system-api/src/main/java/cn/iocoder/yudao/module/system/api/notify/dto/NotifySendSingleToUserReqDTO.java +++ b/yudao-module-system/yudao-module-system-api/src/main/java/cn/iocoder/yudao/module/system/api/notify/dto/NotifySendSingleToUserReqDTO.java @@ -1,24 +1,24 @@ package cn.iocoder.yudao.module.system.api.notify.dto; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; +import io.swagger.v3.oas.annotations.media.Schema; +import io.swagger.v3.oas.annotations.media.Schema; import lombok.Data; import javax.validation.constraints.NotEmpty; import javax.validation.constraints.NotNull; import java.util.Map; -@ApiModel("RPC 服务 - 站内信发送给 Admin 或者 Member 用户 Request DTO") +@Schema(description = "RPC 服务 - 站内信发送给 Admin 或者 Member 用户 Request DTO") @Data public class NotifySendSingleToUserReqDTO { - @ApiModelProperty(value = "用户编号", required = true, example = "1024") + @Schema(description = "用户编号", required = true, example = "1024") @NotNull(message = "用户编号不能为空") private Long userId; - @ApiModelProperty(value = "站内信模板编号", required = true, example = "USER_SEND") + @Schema(description = "站内信模板编号", required = true, example = "USER_SEND") @NotEmpty(message = "站内信模板编号不能为空") private String templateCode; - @ApiModelProperty(value = "邮件模板参数") + @Schema(description = "邮件模板参数") private Map templateParams; -} +} \ No newline at end of file diff --git a/yudao-module-system/yudao-module-system-api/src/main/java/cn/iocoder/yudao/module/system/api/oauth2/OAuth2TokenApi.java b/yudao-module-system/yudao-module-system-api/src/main/java/cn/iocoder/yudao/module/system/api/oauth2/OAuth2TokenApi.java index e81869a40..55d64dd1b 100644 --- a/yudao-module-system/yudao-module-system-api/src/main/java/cn/iocoder/yudao/module/system/api/oauth2/OAuth2TokenApi.java +++ b/yudao-module-system/yudao-module-system-api/src/main/java/cn/iocoder/yudao/module/system/api/oauth2/OAuth2TokenApi.java @@ -5,17 +5,17 @@ import cn.iocoder.yudao.module.system.api.oauth2.dto.OAuth2AccessTokenCheckRespD import cn.iocoder.yudao.module.system.api.oauth2.dto.OAuth2AccessTokenCreateReqDTO; import cn.iocoder.yudao.module.system.api.oauth2.dto.OAuth2AccessTokenRespDTO; import cn.iocoder.yudao.module.system.enums.ApiConstants; -import io.swagger.annotations.Api; -import io.swagger.annotations.ApiImplicitParam; -import io.swagger.annotations.ApiImplicitParams; -import io.swagger.annotations.ApiOperation; +import io.swagger.v3.oas.annotations.tags.Tag; +import io.swagger.v3.oas.annotations.Parameter; +import io.swagger.v3.oas.annotations.Parameters; +import io.swagger.v3.oas.annotations.Operation; import org.springframework.cloud.openfeign.FeignClient; import org.springframework.web.bind.annotation.*; import javax.validation.Valid; @FeignClient(name = ApiConstants.NAME) // TODO 芋艿:fallbackFactory = -@Api(tags = "RPC 服务 - OAuth2.0 令牌") +@Tag(name = "RPC 服务 - OAuth2.0 令牌") public interface OAuth2TokenApi { String PREFIX = ApiConstants.PREFIX + "/oauth2/token"; @@ -27,26 +27,26 @@ public interface OAuth2TokenApi { String URL_CHECK = "http://" + ApiConstants.NAME + PREFIX + "/check"; @PostMapping(PREFIX + "/create") - @ApiOperation("创建访问令牌") + @Operation(summary = "创建访问令牌") CommonResult createAccessToken(@Valid @RequestBody OAuth2AccessTokenCreateReqDTO reqDTO); @GetMapping(PREFIX + "/check") - @ApiOperation("校验访问令牌") - @ApiImplicitParam(name = "accessToken", value = "访问令牌", required = true, dataTypeClass = String.class, example = "tudou") + @Operation(summary = "校验访问令牌") + @Parameter(name = "accessToken", description = "访问令牌", required = true, example = "tudou") CommonResult checkAccessToken(@RequestParam("accessToken") String accessToken); @DeleteMapping(PREFIX + "/remove") - @ApiOperation("移除访问令牌") - @ApiImplicitParam(name = "accessToken", value = "访问令牌", required = true, dataTypeClass = String.class, example = "tudou") + @Operation(summary = "移除访问令牌") + @Parameter(name = "accessToken", description = "访问令牌", required = true, example = "tudou") CommonResult removeAccessToken(@RequestParam("accessToken") String accessToken); @PutMapping(PREFIX + "/refresh") - @ApiOperation("刷新访问令牌") - @ApiImplicitParams({ - @ApiImplicitParam(name = "refreshToken", value = "刷新令牌", required = true, dataTypeClass = String.class, example = "haha"), - @ApiImplicitParam(name = "clientId", value = "客户端编号", required = true, dataTypeClass = String.class, example = "yudaoyuanma") + @Operation(summary = "刷新访问令牌") + @Parameters({ + @Parameter(name = "refreshToken", description = "刷新令牌", required = true, example = "haha"), + @Parameter(name = "clientId", description = "客户端编号", required = true, example = "yudaoyuanma") }) CommonResult refreshAccessToken(@RequestParam("refreshToken") String refreshToken, @RequestParam("clientId") String clientId); -} +} \ No newline at end of file diff --git a/yudao-module-system/yudao-module-system-api/src/main/java/cn/iocoder/yudao/module/system/api/oauth2/dto/OAuth2AccessTokenCheckRespDTO.java b/yudao-module-system/yudao-module-system-api/src/main/java/cn/iocoder/yudao/module/system/api/oauth2/dto/OAuth2AccessTokenCheckRespDTO.java index 7d500293d..3478aee03 100644 --- a/yudao-module-system/yudao-module-system-api/src/main/java/cn/iocoder/yudao/module/system/api/oauth2/dto/OAuth2AccessTokenCheckRespDTO.java +++ b/yudao-module-system/yudao-module-system-api/src/main/java/cn/iocoder/yudao/module/system/api/oauth2/dto/OAuth2AccessTokenCheckRespDTO.java @@ -1,26 +1,26 @@ package cn.iocoder.yudao.module.system.api.oauth2.dto; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; +import io.swagger.v3.oas.annotations.media.Schema; +import io.swagger.v3.oas.annotations.media.Schema; import lombok.Data; import java.io.Serializable; import java.util.List; -@ApiModel("RPC 服务 - OAuth2 访问令牌的校验 Response DTO") +@Schema(description = "RPC 服务 - OAuth2 访问令牌的校验 Response DTO") @Data public class OAuth2AccessTokenCheckRespDTO implements Serializable { - @ApiModelProperty(value = "用户编号", required = true, example = "10") + @Schema(description = "用户编号", required = true, example = "10") private Long userId; - @ApiModelProperty(value = "用户类型", required = true, example = "1", notes = "参见 UserTypeEnum 枚举") + @Schema(description = "用户类型,参见 UserTypeEnum 枚举", required = true, example = "1") private Integer userType; - @ApiModelProperty(value = "租户编号", required = true, example = "1024") + @Schema(description = "租户编号", required = true, example = "1024") private Long tenantId; - @ApiModelProperty(value = "授权范围的数组", example = "user_info") + @Schema(description = "授权范围的数组", example = "user_info") private List scopes; -} +} \ No newline at end of file diff --git a/yudao-module-system/yudao-module-system-api/src/main/java/cn/iocoder/yudao/module/system/api/oauth2/dto/OAuth2AccessTokenCreateReqDTO.java b/yudao-module-system/yudao-module-system-api/src/main/java/cn/iocoder/yudao/module/system/api/oauth2/dto/OAuth2AccessTokenCreateReqDTO.java index 17b9ba456..f2264e11e 100644 --- a/yudao-module-system/yudao-module-system-api/src/main/java/cn/iocoder/yudao/module/system/api/oauth2/dto/OAuth2AccessTokenCreateReqDTO.java +++ b/yudao-module-system/yudao-module-system-api/src/main/java/cn/iocoder/yudao/module/system/api/oauth2/dto/OAuth2AccessTokenCreateReqDTO.java @@ -2,32 +2,32 @@ package cn.iocoder.yudao.module.system.api.oauth2.dto; import cn.iocoder.yudao.framework.common.enums.UserTypeEnum; import cn.iocoder.yudao.framework.common.validation.InEnum; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; +import io.swagger.v3.oas.annotations.media.Schema; +import io.swagger.v3.oas.annotations.media.Schema; import lombok.Data; import javax.validation.constraints.NotNull; import java.io.Serializable; import java.util.List; -@ApiModel("RPC 服务 - OAuth2 访问令牌创建 Request DTO") +@Schema(description = "RPC 服务 - OAuth2 访问令牌创建 Request DTO") @Data public class OAuth2AccessTokenCreateReqDTO implements Serializable { - @ApiModelProperty(value = "用户编号", required = true, example = "10") + @Schema(description = "用户编号", required = true, example = "10") @NotNull(message = "用户编号不能为空") private Long userId; - @ApiModelProperty(value = "用户类型", required = true, example = "1", notes = "参见 UserTypeEnum 枚举") + @Schema(description = "用户类型,参见 UserTypeEnum 枚举", required = true, example = "1") @NotNull(message = "用户类型不能为空") @InEnum(value = UserTypeEnum.class, message = "用户类型必须是 {value}") private Integer userType; - @ApiModelProperty(value = "客户端编号", required = true, example = "yudaoyuanma") + @Schema(description = "客户端编号", required = true, example = "yudaoyuanma") @NotNull(message = "客户端编号不能为空") private String clientId; - @ApiModelProperty(value = "授权范围的数组", example = "user_info") + @Schema(description = "授权范围的数组", example = "user_info") private List scopes; -} +} \ No newline at end of file diff --git a/yudao-module-system/yudao-module-system-api/src/main/java/cn/iocoder/yudao/module/system/api/oauth2/dto/OAuth2AccessTokenRespDTO.java b/yudao-module-system/yudao-module-system-api/src/main/java/cn/iocoder/yudao/module/system/api/oauth2/dto/OAuth2AccessTokenRespDTO.java index 0534930db..baeb97a00 100644 --- a/yudao-module-system/yudao-module-system-api/src/main/java/cn/iocoder/yudao/module/system/api/oauth2/dto/OAuth2AccessTokenRespDTO.java +++ b/yudao-module-system/yudao-module-system-api/src/main/java/cn/iocoder/yudao/module/system/api/oauth2/dto/OAuth2AccessTokenRespDTO.java @@ -1,31 +1,31 @@ package cn.iocoder.yudao.module.system.api.oauth2.dto; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; +import io.swagger.v3.oas.annotations.media.Schema; +import io.swagger.v3.oas.annotations.media.Schema; import lombok.Data; import lombok.experimental.Accessors; import java.io.Serializable; import java.time.LocalDateTime; -@ApiModel("RPC 服务 - OAuth2 访问令牌的信息 Response DTO") +@Schema(description = "RPC 服务 - OAuth2 访问令牌的信息 Response DTO") @Data @Accessors(chain = true) public class OAuth2AccessTokenRespDTO implements Serializable { - @ApiModelProperty(value = "访问令牌", required = true, example = "tudou") + @Schema(description = "访问令牌", required = true, example = "tudou") private String accessToken; - @ApiModelProperty(value = "刷新令牌", required = true, example = "haha") + @Schema(description = "刷新令牌", required = true, example = "haha") private String refreshToken; - @ApiModelProperty(value = "用户编号", required = true, example = "10") + @Schema(description = "用户编号", required = true, example = "10") private Long userId; - @ApiModelProperty(value = "用户类型", required = true, example = "1", notes = "参见 UserTypeEnum 枚举") + @Schema(description = "用户类型,参见 UserTypeEnum 枚举", required = true, example = "1" ) private Integer userType; - @ApiModelProperty(value = "过期时间", required = true) + @Schema(description = "过期时间", required = true) private LocalDateTime expiresTime; -} +} \ No newline at end of file diff --git a/yudao-module-system/yudao-module-system-api/src/main/java/cn/iocoder/yudao/module/system/api/permission/PermissionApi.java b/yudao-module-system/yudao-module-system-api/src/main/java/cn/iocoder/yudao/module/system/api/permission/PermissionApi.java index a316afc74..9b023acc4 100644 --- a/yudao-module-system/yudao-module-system-api/src/main/java/cn/iocoder/yudao/module/system/api/permission/PermissionApi.java +++ b/yudao-module-system/yudao-module-system-api/src/main/java/cn/iocoder/yudao/module/system/api/permission/PermissionApi.java @@ -3,10 +3,10 @@ package cn.iocoder.yudao.module.system.api.permission; import cn.iocoder.yudao.framework.common.pojo.CommonResult; import cn.iocoder.yudao.module.system.api.permission.dto.DeptDataPermissionRespDTO; import cn.iocoder.yudao.module.system.enums.ApiConstants; -import io.swagger.annotations.Api; -import io.swagger.annotations.ApiImplicitParam; -import io.swagger.annotations.ApiImplicitParams; -import io.swagger.annotations.ApiOperation; +import io.swagger.v3.oas.annotations.tags.Tag; +import io.swagger.v3.oas.annotations.Parameter; +import io.swagger.v3.oas.annotations.Parameters; +import io.swagger.v3.oas.annotations.Operation; import org.springframework.cloud.openfeign.FeignClient; import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.RequestParam; @@ -15,37 +15,37 @@ import java.util.Collection; import java.util.Set; @FeignClient(name = ApiConstants.NAME) // TODO 芋艿:fallbackFactory = -@Api(tags = "RPC 服务 - 权限") +@Tag(name = "RPC 服务 - 权限") public interface PermissionApi { String PREFIX = ApiConstants.PREFIX + "/permission"; @GetMapping(PREFIX + "/user-role-id-list-by-role-id") - @ApiOperation("获得拥有多个角色的用户编号集合") - @ApiImplicitParam(name = "roleIds", value = "角色编号集合", example = "1,2", required = true, allowMultiple = true) + @Operation(summary = "获得拥有多个角色的用户编号集合") + @Parameter(name = "roleIds", description = "角色编号集合", example = "1,2", required = true) CommonResult> getUserRoleIdListByRoleIds(@RequestParam("roleIds") Collection roleIds); @GetMapping(PREFIX + "/has-any-permissions") - @ApiOperation("判断是否有权限,任一一个即可") - @ApiImplicitParams({ - @ApiImplicitParam(name = "userId", value = "用户编号", example = "1", required = true, dataTypeClass = Long.class), - @ApiImplicitParam(name = "permissions", value = "权限", example = "read,write", required = true, allowMultiple = true) + @Operation(summary = "判断是否有权限,任一一个即可") + @Parameters({ + @Parameter(name = "userId", description = "用户编号", example = "1", required = true), + @Parameter(name = "permissions", description = "权限", example = "read,write", required = true) }) CommonResult hasAnyPermissions(@RequestParam("userId") Long userId, @RequestParam("permissions") String... permissions); @GetMapping(PREFIX + "/has-any-roles") - @ApiOperation("判断是否有角色,任一一个即可") - @ApiImplicitParams({ - @ApiImplicitParam(name = "userId", value = "用户编号", example = "1", required = true, dataTypeClass = Long.class), - @ApiImplicitParam(name = "roles", value = "角色数组", example = "2", required = true, allowMultiple = true) + @Operation(summary = "判断是否有角色,任一一个即可") + @Parameters({ + @Parameter(name = "userId", description = "用户编号", example = "1", required = true), + @Parameter(name = "roles", description = "角色数组", example = "2", required = true) }) CommonResult hasAnyRoles(@RequestParam("userId") Long userId, @RequestParam("roles") String... roles); @GetMapping(PREFIX + "/get-dept-data-permission") - @ApiOperation("获得登陆用户的部门数据权限") - @ApiImplicitParam(name = "userId", value = "用户编号", example = "2", required = true, dataTypeClass = Long.class) + @Operation(summary = "获得登陆用户的部门数据权限") + @Parameter(name = "userId", description = "用户编号", example = "2", required = true) CommonResult getDeptDataPermission(@RequestParam("userId") Long userId); -} +} \ No newline at end of file diff --git a/yudao-module-system/yudao-module-system-api/src/main/java/cn/iocoder/yudao/module/system/api/permission/RoleApi.java b/yudao-module-system/yudao-module-system-api/src/main/java/cn/iocoder/yudao/module/system/api/permission/RoleApi.java index 84a5b1966..33c6fa23e 100644 --- a/yudao-module-system/yudao-module-system-api/src/main/java/cn/iocoder/yudao/module/system/api/permission/RoleApi.java +++ b/yudao-module-system/yudao-module-system-api/src/main/java/cn/iocoder/yudao/module/system/api/permission/RoleApi.java @@ -2,9 +2,9 @@ package cn.iocoder.yudao.module.system.api.permission; import cn.iocoder.yudao.framework.common.pojo.CommonResult; import cn.iocoder.yudao.module.system.enums.ApiConstants; -import io.swagger.annotations.Api; -import io.swagger.annotations.ApiImplicitParam; -import io.swagger.annotations.ApiOperation; +import io.swagger.v3.oas.annotations.tags.Tag; +import io.swagger.v3.oas.annotations.Parameter; +import io.swagger.v3.oas.annotations.Operation; import org.springframework.cloud.openfeign.FeignClient; import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.RequestParam; @@ -12,14 +12,14 @@ import org.springframework.web.bind.annotation.RequestParam; import java.util.Collection; @FeignClient(name = ApiConstants.NAME) // TODO 芋艿:fallbackFactory = -@Api(tags = "RPC 服务 - 角色") +@Tag(name = "RPC 服务 - 角色") public interface RoleApi { String PREFIX = ApiConstants.PREFIX + "/role"; @GetMapping(PREFIX + "/valid") - @ApiOperation("校验角色是否合法") - @ApiImplicitParam(name = "ids", value = "角色编号数组", example = "1,2", required = true, allowMultiple = true) + @Operation(summary = "校验角色是否合法") + @Parameter(name = "ids", description = "角色编号数组", example = "1,2", required = true) CommonResult validRoleList(@RequestParam("ids") Collection ids); -} +} \ No newline at end of file diff --git a/yudao-module-system/yudao-module-system-api/src/main/java/cn/iocoder/yudao/module/system/api/sensitiveword/SensitiveWordApi.java b/yudao-module-system/yudao-module-system-api/src/main/java/cn/iocoder/yudao/module/system/api/sensitiveword/SensitiveWordApi.java index 916d09a91..35b6b3f5c 100644 --- a/yudao-module-system/yudao-module-system-api/src/main/java/cn/iocoder/yudao/module/system/api/sensitiveword/SensitiveWordApi.java +++ b/yudao-module-system/yudao-module-system-api/src/main/java/cn/iocoder/yudao/module/system/api/sensitiveword/SensitiveWordApi.java @@ -2,10 +2,10 @@ package cn.iocoder.yudao.module.system.api.sensitiveword; import cn.iocoder.yudao.framework.common.pojo.CommonResult; import cn.iocoder.yudao.module.system.enums.ApiConstants; -import io.swagger.annotations.Api; -import io.swagger.annotations.ApiImplicitParam; -import io.swagger.annotations.ApiImplicitParams; -import io.swagger.annotations.ApiOperation; +import io.swagger.v3.oas.annotations.tags.Tag; +import io.swagger.v3.oas.annotations.Parameter; +import io.swagger.v3.oas.annotations.Parameters; +import io.swagger.v3.oas.annotations.Operation; import org.springframework.cloud.openfeign.FeignClient; import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.RequestParam; @@ -13,27 +13,27 @@ import org.springframework.web.bind.annotation.RequestParam; import java.util.List; @FeignClient(name = ApiConstants.NAME) // TODO 芋艿:fallbackFacx`tory = -@Api(tags = "RPC 服务 - 敏感词") +@Tag(name = "RPC 服务 - 敏感词") public interface SensitiveWordApi { String PREFIX = ApiConstants.PREFIX + "/sensitive-word"; @GetMapping(PREFIX + "/validate-text") - @ApiOperation("获得文本所包含的不合法的敏感词数组") - @ApiImplicitParams({ - @ApiImplicitParam(name = "text", value = "文本", example = "傻瓜", required = true, dataTypeClass = String.class), - @ApiImplicitParam(name = "tags", value = "标签数组", example = "product,life", required = true, allowMultiple = true) + @Operation(summary = "获得文本所包含的不合法的敏感词数组") + @Parameters({ + @Parameter(name = "text", description = "文本", example = "傻瓜", required = true), + @Parameter(name = "tags", description = "标签数组", example = "product,life", required = true) }) CommonResult> validateText(@RequestParam("text") String text, @RequestParam("tags") List tags); @GetMapping(PREFIX + "/is-text-valid") - @ApiOperation("判断文本是否包含敏感词") - @ApiImplicitParams({ - @ApiImplicitParam(name = "text", value = "文本", example = "傻瓜", required = true, dataTypeClass = String.class), - @ApiImplicitParam(name = "tags", value = "标签数组", example = "product,life", required = true, allowMultiple = true) + @Operation(summary = "判断文本是否包含敏感词") + @Parameters({ + @Parameter(name = "text", description = "文本", example = "傻瓜", required = true), + @Parameter(name = "tags", description = "标签数组", example = "product,life", required = true) }) CommonResult isTextValid(@RequestParam("text") String text, @RequestParam("tags") List tags); -} +} \ No newline at end of file diff --git a/yudao-module-system/yudao-module-system-api/src/main/java/cn/iocoder/yudao/module/system/api/sms/SmsCodeApi.java b/yudao-module-system/yudao-module-system-api/src/main/java/cn/iocoder/yudao/module/system/api/sms/SmsCodeApi.java index ca4830ecf..a68865201 100644 --- a/yudao-module-system/yudao-module-system-api/src/main/java/cn/iocoder/yudao/module/system/api/sms/SmsCodeApi.java +++ b/yudao-module-system/yudao-module-system-api/src/main/java/cn/iocoder/yudao/module/system/api/sms/SmsCodeApi.java @@ -5,8 +5,8 @@ import cn.iocoder.yudao.module.system.api.sms.dto.code.SmsCodeValidateReqDTO; import cn.iocoder.yudao.module.system.api.sms.dto.code.SmsCodeSendReqDTO; import cn.iocoder.yudao.module.system.api.sms.dto.code.SmsCodeUseReqDTO; import cn.iocoder.yudao.module.system.enums.ApiConstants; -import io.swagger.annotations.Api; -import io.swagger.annotations.ApiOperation; +import io.swagger.v3.oas.annotations.tags.Tag; +import io.swagger.v3.oas.annotations.Operation; import org.springframework.cloud.openfeign.FeignClient; import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.PostMapping; @@ -16,21 +16,21 @@ import org.springframework.web.bind.annotation.RequestBody; import javax.validation.Valid; @FeignClient(name = ApiConstants.NAME) // TODO 芋艿:fallbackFactory = -@Api(tags = "RPC 服务 - 短信验证码") +@Tag(name = "RPC 服务 - 短信验证码") public interface SmsCodeApi { String PREFIX = ApiConstants.PREFIX + "/oauth2/sms/code"; @PostMapping(PREFIX + "/send") - @ApiOperation("创建短信验证码,并进行发送") + @Operation(summary = "创建短信验证码,并进行发送") CommonResult sendSmsCode(@Valid @RequestBody SmsCodeSendReqDTO reqDTO); @PutMapping(PREFIX + "/use") - @ApiOperation("验证短信验证码,并进行使用") + @Operation(summary = "验证短信验证码,并进行使用") CommonResult useSmsCode(@Valid @RequestBody SmsCodeUseReqDTO reqDTO); @GetMapping(PREFIX + "/validate") - @ApiOperation("检查验证码是否有效") + @Operation(summary = "检查验证码是否有效") CommonResult validateSmsCode(@Valid @RequestBody SmsCodeValidateReqDTO reqDTO); -} +} \ No newline at end of file diff --git a/yudao-module-system/yudao-module-system-api/src/main/java/cn/iocoder/yudao/module/system/api/sms/SmsSendApi.java b/yudao-module-system/yudao-module-system-api/src/main/java/cn/iocoder/yudao/module/system/api/sms/SmsSendApi.java index 59a02b9ae..93faa18f1 100644 --- a/yudao-module-system/yudao-module-system-api/src/main/java/cn/iocoder/yudao/module/system/api/sms/SmsSendApi.java +++ b/yudao-module-system/yudao-module-system-api/src/main/java/cn/iocoder/yudao/module/system/api/sms/SmsSendApi.java @@ -3,8 +3,8 @@ package cn.iocoder.yudao.module.system.api.sms; import cn.iocoder.yudao.framework.common.pojo.CommonResult; import cn.iocoder.yudao.module.system.api.sms.dto.send.SmsSendSingleToUserReqDTO; import cn.iocoder.yudao.module.system.enums.ApiConstants; -import io.swagger.annotations.Api; -import io.swagger.annotations.ApiOperation; +import io.swagger.v3.oas.annotations.tags.Tag; +import io.swagger.v3.oas.annotations.Operation; import org.springframework.cloud.openfeign.FeignClient; import org.springframework.web.bind.annotation.PostMapping; import org.springframework.web.bind.annotation.RequestBody; @@ -12,17 +12,17 @@ import org.springframework.web.bind.annotation.RequestBody; import javax.validation.Valid; @FeignClient(name = ApiConstants.NAME) // TODO 芋艿:fallbackFactory = -@Api(tags = "RPC 服务 - 短信发送") +@Tag(name = "RPC 服务 - 短信发送") public interface SmsSendApi { String PREFIX = ApiConstants.PREFIX + "/sms/send"; @PostMapping(PREFIX + "/send-single-admin") - @ApiOperation(value = "发送单条短信给 Admin 用户", notes = "在 mobile 为空时,使用 userId 加载对应 Admin 的手机号") + @Operation(summary = "发送单条短信给 Admin 用户", description = "在 mobile 为空时,使用 userId 加载对应 Admin 的手机号") CommonResult sendSingleSmsToAdmin(@Valid @RequestBody SmsSendSingleToUserReqDTO reqDTO); @PostMapping(PREFIX + "/send-single-member") - @ApiOperation(value = "发送单条短信给 Member 用户", notes = "在 mobile 为空时,使用 userId 加载对应 Member 的手机号") + @Operation(summary = "发送单条短信给 Member 用户", description = "在 mobile 为空时,使用 userId 加载对应 Member 的手机号") CommonResult sendSingleSmsToMember(@Valid @RequestBody SmsSendSingleToUserReqDTO reqDTO); -} +} \ No newline at end of file diff --git a/yudao-module-system/yudao-module-system-api/src/main/java/cn/iocoder/yudao/module/system/api/sms/dto/code/SmsCodeSendReqDTO.java b/yudao-module-system/yudao-module-system-api/src/main/java/cn/iocoder/yudao/module/system/api/sms/dto/code/SmsCodeSendReqDTO.java index 9c23f7f51..2c0779f1b 100644 --- a/yudao-module-system/yudao-module-system-api/src/main/java/cn/iocoder/yudao/module/system/api/sms/dto/code/SmsCodeSendReqDTO.java +++ b/yudao-module-system/yudao-module-system-api/src/main/java/cn/iocoder/yudao/module/system/api/sms/dto/code/SmsCodeSendReqDTO.java @@ -3,27 +3,27 @@ package cn.iocoder.yudao.module.system.api.sms.dto.code; import cn.iocoder.yudao.framework.common.validation.InEnum; import cn.iocoder.yudao.framework.common.validation.Mobile; import cn.iocoder.yudao.module.system.enums.sms.SmsSceneEnum; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; +import io.swagger.v3.oas.annotations.media.Schema; +import io.swagger.v3.oas.annotations.media.Schema; import lombok.Data; import javax.validation.constraints.NotEmpty; import javax.validation.constraints.NotNull; -@ApiModel("RPC 服务 - 短信验证码的发送 Request DTO") +@Schema(description = "RPC 服务 - 短信验证码的发送 Request DTO") @Data public class SmsCodeSendReqDTO { - @ApiModelProperty(value = "手机号", required = true, example = "15601691300") + @Schema(description = "手机号", required = true, example = "15601691300") @Mobile @NotEmpty(message = "手机号不能为空") private String mobile; - @ApiModelProperty(value = "发送场景", required = true, example = "1") + @Schema(description = "发送场景", required = true, example = "1") @NotNull(message = "发送场景不能为空") @InEnum(SmsSceneEnum.class) private Integer scene; - @ApiModelProperty(value = "发送 IP", required = true, example = "10.20.30.40") + @Schema(description = "发送 IP", required = true, example = "10.20.30.40") @NotEmpty(message = "发送 IP 不能为空") private String createIp; -} +} \ No newline at end of file diff --git a/yudao-module-system/yudao-module-system-api/src/main/java/cn/iocoder/yudao/module/system/api/sms/dto/code/SmsCodeUseReqDTO.java b/yudao-module-system/yudao-module-system-api/src/main/java/cn/iocoder/yudao/module/system/api/sms/dto/code/SmsCodeUseReqDTO.java index 40b682b79..b2641afd5 100644 --- a/yudao-module-system/yudao-module-system-api/src/main/java/cn/iocoder/yudao/module/system/api/sms/dto/code/SmsCodeUseReqDTO.java +++ b/yudao-module-system/yudao-module-system-api/src/main/java/cn/iocoder/yudao/module/system/api/sms/dto/code/SmsCodeUseReqDTO.java @@ -3,30 +3,30 @@ package cn.iocoder.yudao.module.system.api.sms.dto.code; import cn.iocoder.yudao.framework.common.validation.InEnum; import cn.iocoder.yudao.framework.common.validation.Mobile; import cn.iocoder.yudao.module.system.enums.sms.SmsSceneEnum; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; +import io.swagger.v3.oas.annotations.media.Schema; +import io.swagger.v3.oas.annotations.media.Schema; import lombok.Data; import javax.validation.constraints.NotEmpty; import javax.validation.constraints.NotNull; -@ApiModel("RPC 服务 - 短信验证码的使用 Request DTO") +@Schema(description = "RPC 服务 - 短信验证码的使用 Request DTO") @Data public class SmsCodeUseReqDTO { - @ApiModelProperty(value = "手机号", required = true, example = "15601691300") + @Schema(description = "手机号", required = true, example = "15601691300") @Mobile @NotEmpty(message = "手机号不能为空") private String mobile; - @ApiModelProperty(value = "发送场景", required = true, example = "1") + @Schema(description = "发送场景", required = true, example = "1") @NotNull(message = "发送场景不能为空") @InEnum(SmsSceneEnum.class) private Integer scene; - @ApiModelProperty(value = "验证码", required = true, example = "1024") + @Schema(description = "验证码", required = true, example = "1024") @NotEmpty(message = "验证码") private String code; - @ApiModelProperty(value = "发送 IP", required = true, example = "10.20.30.40") + @Schema(description = "发送 IP", required = true, example = "10.20.30.40") @NotEmpty(message = "使用 IP 不能为空") private String usedIp; -} +} \ No newline at end of file diff --git a/yudao-module-system/yudao-module-system-api/src/main/java/cn/iocoder/yudao/module/system/api/sms/dto/code/SmsCodeValidateReqDTO.java b/yudao-module-system/yudao-module-system-api/src/main/java/cn/iocoder/yudao/module/system/api/sms/dto/code/SmsCodeValidateReqDTO.java index c96d3fa83..9fba60262 100644 --- a/yudao-module-system/yudao-module-system-api/src/main/java/cn/iocoder/yudao/module/system/api/sms/dto/code/SmsCodeValidateReqDTO.java +++ b/yudao-module-system/yudao-module-system-api/src/main/java/cn/iocoder/yudao/module/system/api/sms/dto/code/SmsCodeValidateReqDTO.java @@ -3,27 +3,27 @@ package cn.iocoder.yudao.module.system.api.sms.dto.code; import cn.iocoder.yudao.framework.common.validation.InEnum; import cn.iocoder.yudao.framework.common.validation.Mobile; import cn.iocoder.yudao.module.system.enums.sms.SmsSceneEnum; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; +import io.swagger.v3.oas.annotations.media.Schema; +import io.swagger.v3.oas.annotations.media.Schema; import lombok.Data; import javax.validation.constraints.NotEmpty; import javax.validation.constraints.NotNull; -@ApiModel("RPC 服务 - 短信验证码的校验 Request DTO") +@Schema(description = "RPC 服务 - 短信验证码的校验 Request DTO") @Data public class SmsCodeValidateReqDTO { - @ApiModelProperty(value = "手机号", required = true, example = "15601691300") + @Schema(description = "手机号", required = true, example = "15601691300") @Mobile @NotEmpty(message = "手机号不能为空") private String mobile; - @ApiModelProperty(value = "发送场景", required = true, example = "1") + @Schema(description = "发送场景", required = true, example = "1") @NotNull(message = "发送场景不能为空") @InEnum(SmsSceneEnum.class) private Integer scene; - @ApiModelProperty(value = "验证码", required = true, example = "1024") + @Schema(description = "验证码", required = true, example = "1024") @NotEmpty(message = "验证码") private String code; -} +} \ No newline at end of file diff --git a/yudao-module-system/yudao-module-system-api/src/main/java/cn/iocoder/yudao/module/system/api/sms/dto/send/SmsSendSingleToUserReqDTO.java b/yudao-module-system/yudao-module-system-api/src/main/java/cn/iocoder/yudao/module/system/api/sms/dto/send/SmsSendSingleToUserReqDTO.java index 683e1f633..45538386b 100644 --- a/yudao-module-system/yudao-module-system-api/src/main/java/cn/iocoder/yudao/module/system/api/sms/dto/send/SmsSendSingleToUserReqDTO.java +++ b/yudao-module-system/yudao-module-system-api/src/main/java/cn/iocoder/yudao/module/system/api/sms/dto/send/SmsSendSingleToUserReqDTO.java @@ -1,28 +1,28 @@ package cn.iocoder.yudao.module.system.api.sms.dto.send; import cn.iocoder.yudao.framework.common.validation.Mobile; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; +import io.swagger.v3.oas.annotations.media.Schema; +import io.swagger.v3.oas.annotations.media.Schema; import lombok.Data; import javax.validation.constraints.NotEmpty; import javax.validation.constraints.NotNull; import java.util.Map; -@ApiModel("RPC 服务 - 短信发送给 Admin 或者 Member 用户 Request DTO") +@Schema(description = "RPC 服务 - 短信发送给 Admin 或者 Member 用户 Request DTO") @Data public class SmsSendSingleToUserReqDTO { - @ApiModelProperty(value = "用户编号", example = "1024") + @Schema(description = "用户编号", example = "1024") private Long userId; - @ApiModelProperty(value = "手机号", required = true, example = "15601691300") + @Schema(description = "手机号", required = true, example = "15601691300") @Mobile private String mobile; - @ApiModelProperty(value = "短信模板编号", required = true, example = "USER_SEND") + @Schema(description = "短信模板编号", required = true, example = "USER_SEND") @NotEmpty(message = "短信模板编号不能为空") private String templateCode; - @ApiModelProperty(value = "短信模板参数") + @Schema(description = "短信模板参数") private Map templateParams; -} +} \ No newline at end of file diff --git a/yudao-module-system/yudao-module-system-api/src/main/java/cn/iocoder/yudao/module/system/api/social/SocialUserApi.java b/yudao-module-system/yudao-module-system-api/src/main/java/cn/iocoder/yudao/module/system/api/social/SocialUserApi.java index c096ed51c..c49131ad7 100644 --- a/yudao-module-system/yudao-module-system-api/src/main/java/cn/iocoder/yudao/module/system/api/social/SocialUserApi.java +++ b/yudao-module-system/yudao-module-system-api/src/main/java/cn/iocoder/yudao/module/system/api/social/SocialUserApi.java @@ -4,49 +4,49 @@ import cn.iocoder.yudao.framework.common.pojo.CommonResult; import cn.iocoder.yudao.module.system.api.social.dto.SocialUserBindReqDTO; import cn.iocoder.yudao.module.system.api.social.dto.SocialUserUnbindReqDTO; import cn.iocoder.yudao.module.system.enums.ApiConstants; -import io.swagger.annotations.Api; -import io.swagger.annotations.ApiImplicitParam; -import io.swagger.annotations.ApiImplicitParams; -import io.swagger.annotations.ApiOperation; +import io.swagger.v3.oas.annotations.tags.Tag; +import io.swagger.v3.oas.annotations.Parameter; +import io.swagger.v3.oas.annotations.Parameters; +import io.swagger.v3.oas.annotations.Operation; import org.springframework.cloud.openfeign.FeignClient; import org.springframework.web.bind.annotation.*; import javax.validation.Valid; @FeignClient(name = ApiConstants.NAME) // TODO 芋艿:fallbackFactory = -@Api(tags = "RPC 服务 - 社交用户") +@Tag(name = "RPC 服务 - 社交用户") public interface SocialUserApi { String PREFIX = ApiConstants.PREFIX + "/social-user"; @GetMapping("/get-authorize-url") - @ApiOperation("获得社交平台的授权 URL") - @ApiImplicitParams({ - @ApiImplicitParam(name = "type", value = "社交平台的类型", example = "1", required = true, dataTypeClass = Integer.class), - @ApiImplicitParam(name = "redirectUri", value = "重定向 URL", example = "https://www.iocoder.cn",required = true, dataTypeClass = String.class) + @Operation(summary = "获得社交平台的授权 URL") + @Parameters({ + @Parameter(name = "type", description = "社交平台的类型", example = "1", required = true), + @Parameter(name = "redirectUri", description = "重定向 URL", example = "https://www.iocoder.cn",required = true) }) CommonResult getAuthorizeUrl(@RequestParam("type") Integer type, @RequestParam("redirectUri") String redirectUri); @PostMapping("/bind") - @ApiOperation("绑定社交用户") + @Operation(summary = "绑定社交用户") CommonResult bindSocialUser(@Valid @RequestBody SocialUserBindReqDTO reqDTO); @DeleteMapping("/unbind") - @ApiOperation("取消绑定社交用户") + @Operation(summary = "取消绑定社交用户") CommonResult unbindSocialUser(@Valid @RequestBody SocialUserUnbindReqDTO reqDTO); @GetMapping("/get-bind-user-id") - @ApiOperation("获得社交用户的绑定用户编号") - @ApiImplicitParams({ - @ApiImplicitParam(name = "userType", value = "用户类型", example = "2", required = true, dataTypeClass = Integer.class), - @ApiImplicitParam(name = "type", value = "社交平台的类型", example = "1", required = true, dataTypeClass = Integer.class), - @ApiImplicitParam(name = "code", value = "授权码", required = true, example = "tudou", dataTypeClass = String.class), - @ApiImplicitParam(name = "state", value = "state", required = true, example = "coke", dataTypeClass = String.class) + @Operation(summary = "获得社交用户的绑定用户编号") + @Parameters({ + @Parameter(name = "userType", description = "用户类型", example = "2", required = true), + @Parameter(name = "type", description = "社交平台的类型", example = "1", required = true), + @Parameter(name = "code", description = "授权码", required = true, example = "tudou"), + @Parameter(name = "state", description = "state", required = true, example = "coke") }) CommonResult getBindUserId(@RequestParam("userType") Integer userType, @RequestParam("type") Integer type, @RequestParam("code") String code, @RequestParam("state") String state); -} +} \ No newline at end of file diff --git a/yudao-module-system/yudao-module-system-api/src/main/java/cn/iocoder/yudao/module/system/api/tenant/TenantApi.java b/yudao-module-system/yudao-module-system-api/src/main/java/cn/iocoder/yudao/module/system/api/tenant/TenantApi.java index ef3166650..cefe6f70c 100644 --- a/yudao-module-system/yudao-module-system-api/src/main/java/cn/iocoder/yudao/module/system/api/tenant/TenantApi.java +++ b/yudao-module-system/yudao-module-system-api/src/main/java/cn/iocoder/yudao/module/system/api/tenant/TenantApi.java @@ -2,9 +2,9 @@ package cn.iocoder.yudao.module.system.api.tenant; import cn.iocoder.yudao.framework.common.pojo.CommonResult; import cn.iocoder.yudao.module.system.enums.ApiConstants; -import io.swagger.annotations.Api; -import io.swagger.annotations.ApiImplicitParam; -import io.swagger.annotations.ApiOperation; +import io.swagger.v3.oas.annotations.tags.Tag; +import io.swagger.v3.oas.annotations.Parameter; +import io.swagger.v3.oas.annotations.Operation; import org.springframework.cloud.openfeign.FeignClient; import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.RequestParam; @@ -12,18 +12,18 @@ import org.springframework.web.bind.annotation.RequestParam; import java.util.List; @FeignClient(name = ApiConstants.NAME) // TODO 芋艿:fallbackFactory = -@Api(tags = "RPC 服务 - 多租户") +@Tag(name = "RPC 服务 - 多租户") public interface TenantApi { String PREFIX = ApiConstants.PREFIX + "/tenant"; @GetMapping(PREFIX + "/id-list") - @ApiOperation("获得所有租户编号") + @Operation(summary = "获得所有租户编号") CommonResult> getTenantIds(); @GetMapping(PREFIX + "/valid") - @ApiOperation("校验租户是否合法") - @ApiImplicitParam(name = "id", value = "租户编号", required = true, example = "1024", dataTypeClass = Long.class) + @Operation(summary = "校验租户是否合法") + @Parameter(name = "id", description = "租户编号", required = true, example = "1024") CommonResult validTenant(@RequestParam("id") Long id); -} +} \ No newline at end of file diff --git a/yudao-module-system/yudao-module-system-api/src/main/java/cn/iocoder/yudao/module/system/api/user/AdminUserApi.java b/yudao-module-system/yudao-module-system-api/src/main/java/cn/iocoder/yudao/module/system/api/user/AdminUserApi.java index 86fe82c7e..1f57c3929 100644 --- a/yudao-module-system/yudao-module-system-api/src/main/java/cn/iocoder/yudao/module/system/api/user/AdminUserApi.java +++ b/yudao-module-system/yudao-module-system-api/src/main/java/cn/iocoder/yudao/module/system/api/user/AdminUserApi.java @@ -4,9 +4,9 @@ import cn.iocoder.yudao.framework.common.pojo.CommonResult; import cn.iocoder.yudao.framework.common.util.collection.CollectionUtils; import cn.iocoder.yudao.module.system.api.user.dto.AdminUserRespDTO; import cn.iocoder.yudao.module.system.enums.ApiConstants; -import io.swagger.annotations.Api; -import io.swagger.annotations.ApiImplicitParam; -import io.swagger.annotations.ApiOperation; +import io.swagger.v3.oas.annotations.tags.Tag; +import io.swagger.v3.oas.annotations.Parameter; +import io.swagger.v3.oas.annotations.Operation; import org.springframework.cloud.openfeign.FeignClient; import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.RequestParam; @@ -17,29 +17,29 @@ import java.util.Map; import java.util.Set; @FeignClient(name = ApiConstants.NAME) // TODO 芋艿:fallbackFactory = -@Api(tags = "RPC 服务 - 管理员用户") +@Tag(name = "RPC 服务 - 管理员用户") public interface AdminUserApi { String PREFIX = ApiConstants.PREFIX + "/user"; @GetMapping(PREFIX + "/get") - @ApiOperation("通过用户 ID 查询用户") - @ApiImplicitParam(name = "id", value = "用户编号", example = "1", required = true, dataTypeClass = Long.class) + @Operation(summary = "通过用户 ID 查询用户") + @Parameter(name = "id", description = "用户编号", example = "1", required = true) CommonResult getUser(@RequestParam("id") Long id); @GetMapping(PREFIX + "/list") - @ApiOperation("通过用户 ID 查询用户们") - @ApiImplicitParam(name = "ids", value = "部门编号数组", example = "1,2", required = true, allowMultiple = true) + @Operation(summary = "通过用户 ID 查询用户们") + @Parameter(name = "ids", description = "部门编号数组", example = "1,2", required = true) CommonResult> getUsers(@RequestParam("ids") Collection ids); @GetMapping(PREFIX + "/list-by-dept-id") - @ApiOperation("获得指定部门的用户数组") - @ApiImplicitParam(name = "deptIds", value = "部门编号数组", example = "1,2", required = true, allowMultiple = true) + @Operation(summary = "获得指定部门的用户数组") + @Parameter(name = "deptIds", description = "部门编号数组", example = "1,2", required = true) CommonResult> getUsersByDeptIds(@RequestParam("deptIds") Collection deptIds); @GetMapping(PREFIX + "/list-by-post-id") - @ApiOperation("获得指定岗位的用户数组") - @ApiImplicitParam(name = "postIds", value = "岗位编号数组", example = "2,3", required = true, allowMultiple = true) + @Operation(summary = "获得指定岗位的用户数组") + @Parameter(name = "postIds", description = "岗位编号数组", example = "2,3", required = true) CommonResult> getUsersByPostIds(@RequestParam("postIds") Collection postIds); /** @@ -53,8 +53,8 @@ public interface AdminUserApi { } @GetMapping(PREFIX + "/valid") - @ApiOperation("校验用户们是否有效") - @ApiImplicitParam(name = "ids", value = "用户编号数组", example = "3,5", required = true) + @Operation(summary = "校验用户们是否有效") + @Parameter(name = "ids", description = "用户编号数组", example = "3,5", required = true) CommonResult validUsers(@RequestParam("ids") Set ids); -} +} \ No newline at end of file diff --git a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/api/oauth2/OAuth2TokenApiImpl.java b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/api/oauth2/OAuth2TokenApiImpl.java index 256c9202c..3c0e11829 100644 --- a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/api/oauth2/OAuth2TokenApiImpl.java +++ b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/api/oauth2/OAuth2TokenApiImpl.java @@ -7,7 +7,7 @@ import cn.iocoder.yudao.module.system.api.oauth2.dto.OAuth2AccessTokenRespDTO; import cn.iocoder.yudao.module.system.convert.auth.OAuth2TokenConvert; import cn.iocoder.yudao.module.system.dal.dataobject.oauth2.OAuth2AccessTokenDO; import cn.iocoder.yudao.module.system.service.oauth2.OAuth2TokenService; -import io.swagger.annotations.ApiOperation; +import io.swagger.v3.oas.annotations.Operation; import org.apache.dubbo.config.annotation.DubboService; import org.springframework.validation.annotation.Validated; import org.springframework.web.bind.annotation.RestController; @@ -26,7 +26,7 @@ public class OAuth2TokenApiImpl implements OAuth2TokenApi { private OAuth2TokenService oauth2TokenService; @Override - @ApiOperation("创建访问令牌") + @Operation(description = "创建访问令牌") public CommonResult createAccessToken(OAuth2AccessTokenCreateReqDTO reqDTO) { OAuth2AccessTokenDO accessTokenDO = oauth2TokenService.createAccessToken( reqDTO.getUserId(), reqDTO.getUserType(), reqDTO.getClientId(), reqDTO.getScopes()); diff --git a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/auth/AuthController.java b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/auth/AuthController.java index 5b00f9767..d6a3832fb 100644 --- a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/auth/AuthController.java +++ b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/auth/AuthController.java @@ -18,10 +18,10 @@ import cn.iocoder.yudao.module.system.service.permission.PermissionService; import cn.iocoder.yudao.module.system.service.permission.RoleService; import cn.iocoder.yudao.module.system.service.social.SocialUserService; import cn.iocoder.yudao.module.system.service.user.AdminUserService; -import io.swagger.annotations.Api; -import io.swagger.annotations.ApiImplicitParam; -import io.swagger.annotations.ApiImplicitParams; -import io.swagger.annotations.ApiOperation; +import io.swagger.v3.oas.annotations.tags.Tag; +import io.swagger.v3.oas.annotations.Parameter; +import io.swagger.v3.oas.annotations.Parameters; +import io.swagger.v3.oas.annotations.Operation; import lombok.extern.slf4j.Slf4j; import org.springframework.validation.annotation.Validated; import org.springframework.web.bind.annotation.*; @@ -38,7 +38,7 @@ import static cn.iocoder.yudao.framework.security.core.util.SecurityFrameworkUti import static cn.iocoder.yudao.framework.security.core.util.SecurityFrameworkUtils.obtainAuthorization; import static java.util.Collections.singleton; -@Api(tags = "管理后台 - 认证") +@Tag(name = "管理后台 - 认证") @RestController @RequestMapping("/system/auth") @Validated @@ -61,7 +61,7 @@ public class AuthController { @PostMapping("/login") @PermitAll - @ApiOperation("使用账号密码登录") + @Operation(summary = "使用账号密码登录") @OperateLog(enable = false) // 避免 Post 请求被记录操作日志 public CommonResult login(@RequestBody @Valid AuthLoginReqVO reqVO) { return success(authService.login(reqVO)); @@ -69,7 +69,7 @@ public class AuthController { @PostMapping("/logout") @PermitAll - @ApiOperation("登出系统") + @Operation(summary = "登出系统") @OperateLog(enable = false) // 避免 Post 请求被记录操作日志 public CommonResult logout(HttpServletRequest request) { String token = obtainAuthorization(request, securityProperties.getTokenHeader()); @@ -81,15 +81,15 @@ public class AuthController { @PostMapping("/refresh-token") @PermitAll - @ApiOperation("刷新令牌") - @ApiImplicitParam(name = "refreshToken", value = "刷新令牌", required = true, dataTypeClass = String.class) + @Operation(summary = "刷新令牌") + @Parameter(name = "refreshToken", description = "刷新令牌", required = true) @OperateLog(enable = false) // 避免 Post 请求被记录操作日志 public CommonResult refreshToken(@RequestParam("refreshToken") String refreshToken) { return success(authService.refreshToken(refreshToken)); } @GetMapping("/get-permission-info") - @ApiOperation("获取登录用户的权限信息") + @Operation(summary = "获取登录用户的权限信息") public CommonResult getPermissionInfo() { // 获得用户信息 AdminUserDO user = userService.getUser(getLoginUserId()); @@ -108,7 +108,7 @@ public class AuthController { } @GetMapping("/list-menus") - @ApiOperation("获得登录用户的菜单列表") + @Operation(summary = "获得登录用户的菜单列表") public CommonResult> getMenus() { // 获得角色列表 Set roleIds = permissionService.getUserRoleIdsFromCache(getLoginUserId(), singleton(CommonStatusEnum.ENABLE.getStatus())); @@ -124,7 +124,7 @@ public class AuthController { @PostMapping("/sms-login") @PermitAll - @ApiOperation("使用短信验证码登录") + @Operation(summary = "使用短信验证码登录") @OperateLog(enable = false) // 避免 Post 请求被记录操作日志 public CommonResult smsLogin(@RequestBody @Valid AuthSmsLoginReqVO reqVO) { return success(authService.smsLogin(reqVO)); @@ -132,7 +132,7 @@ public class AuthController { @PostMapping("/send-sms-code") @PermitAll - @ApiOperation(value = "发送手机验证码") + @Operation(summary = "发送手机验证码") @OperateLog(enable = false) // 避免 Post 请求被记录操作日志 public CommonResult sendLoginSmsCode(@RequestBody @Valid AuthSmsSendReqVO reqVO) { authService.sendSmsCode(reqVO); @@ -143,10 +143,10 @@ public class AuthController { @GetMapping("/social-auth-redirect") @PermitAll - @ApiOperation("社交授权的跳转") - @ApiImplicitParams({ - @ApiImplicitParam(name = "type", value = "社交类型", required = true, dataTypeClass = Integer.class), - @ApiImplicitParam(name = "redirectUri", value = "回调路径", dataTypeClass = String.class) + @Operation(summary = "社交授权的跳转") + @Parameters({ + @Parameter(name = "type", description = "社交类型", required = true), + @Parameter(name = "redirectUri", description = "回调路径") }) public CommonResult socialLogin(@RequestParam("type") Integer type, @RequestParam("redirectUri") String redirectUri) { @@ -155,10 +155,10 @@ public class AuthController { @PostMapping("/social-login") @PermitAll - @ApiOperation(value = "社交快捷登录,使用 code 授权码", notes = "适合未登录的用户,但是社交账号已绑定用户") + @Operation(summary = "社交快捷登录,使用 code 授权码", description = "适合未登录的用户,但是社交账号已绑定用户") @OperateLog(enable = false) // 避免 Post 请求被记录操作日志 public CommonResult socialQuickLogin(@RequestBody @Valid AuthSocialLoginReqVO reqVO) { return success(authService.socialLogin(reqVO)); } -} +} \ No newline at end of file diff --git a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/auth/vo/AuthLoginReqVO.java b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/auth/vo/AuthLoginReqVO.java index bafc322e2..7d00a751b 100644 --- a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/auth/vo/AuthLoginReqVO.java +++ b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/auth/vo/AuthLoginReqVO.java @@ -3,8 +3,8 @@ package cn.iocoder.yudao.module.system.controller.admin.auth.vo; import cn.hutool.core.util.StrUtil; import cn.iocoder.yudao.framework.common.validation.InEnum; import cn.iocoder.yudao.module.system.enums.social.SocialTypeEnum; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; +import io.swagger.v3.oas.annotations.media.Schema; +import io.swagger.v3.oas.annotations.media.Schema; import lombok.AllArgsConstructor; import lombok.Builder; import lombok.Data; @@ -15,48 +15,48 @@ import javax.validation.constraints.AssertTrue; import javax.validation.constraints.NotEmpty; import javax.validation.constraints.Pattern; -@ApiModel(value = "管理后台 - 账号密码登录 Request VO", description = "如果登录并绑定社交用户,需要传递 social 开头的参数") +@Schema(description = "管理后台 - 账号密码登录 Request VO,如果登录并绑定社交用户,需要传递 social 开头的参数") @Data @NoArgsConstructor @AllArgsConstructor @Builder public class AuthLoginReqVO { - @ApiModelProperty(value = "账号", required = true, example = "yudaoyuanma") + @Schema(description = "账号", required = true, example = "yudaoyuanma") @NotEmpty(message = "登录账号不能为空") @Length(min = 4, max = 16, message = "账号长度为 4-16 位") @Pattern(regexp = "^[A-Za-z0-9]+$", message = "账号格式为数字以及字母") private String username; - @ApiModelProperty(value = "密码", required = true, example = "buzhidao") + @Schema(description = "密码", required = true, example = "buzhidao") @NotEmpty(message = "密码不能为空") @Length(min = 4, max = 16, message = "密码长度为 4-16 位") private String password; // ========== 图片验证码相关 ========== - @ApiModelProperty(value = "验证码", required = true, - example = "PfcH6mgr8tpXuMWFjvW6YVaqrswIuwmWI5dsVZSg7sGpWtDCUbHuDEXl3cFB1+VvCC/rAkSwK8Fad52FSuncVg==", - notes = "验证码开启时,需要传递") + @Schema(description = "验证码,验证码开启时,需要传递", required = true, + example = "PfcH6mgr8tpXuMWFjvW6YVaqrswIuwmWI5dsVZSg7sGpWtDCUbHuDEXl3cFB1+VvCC/rAkSwK8Fad52FSuncVg==") @NotEmpty(message = "验证码不能为空", groups = CodeEnableGroup.class) private String captchaVerification; // ========== 绑定社交登录时,需要传递如下参数 ========== - @ApiModelProperty(value = "社交平台的类型", required = true, example = "10", notes = "参见 SysUserSocialTypeEnum 枚举值") + @Schema(description = "社交平台的类型,参见 SysUserSocialTypeEnum 枚举值", required = true, example = "10") @InEnum(SocialTypeEnum.class) private Integer socialType; - @ApiModelProperty(value = "授权码", required = true, example = "1024") + @Schema(description = "授权码", required = true, example = "1024") private String socialCode; - @ApiModelProperty(value = "state", required = true, example = "9b2ffbc1-7425-4155-9894-9d5c08541d62") + @Schema(description = "state", required = true, example = "9b2ffbc1-7425-4155-9894-9d5c08541d62") private String socialState; /** * 开启验证码的 Group */ - public interface CodeEnableGroup {} + public interface CodeEnableGroup { + } @AssertTrue(message = "授权码不能为空") public boolean isSocialCodeValid() { @@ -68,4 +68,4 @@ public class AuthLoginReqVO { return socialType == null || StrUtil.isNotEmpty(socialState); } -} +} \ No newline at end of file diff --git a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/auth/vo/AuthLoginRespVO.java b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/auth/vo/AuthLoginRespVO.java index 6e1882887..bc78f8b80 100644 --- a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/auth/vo/AuthLoginRespVO.java +++ b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/auth/vo/AuthLoginRespVO.java @@ -1,7 +1,7 @@ package cn.iocoder.yudao.module.system.controller.admin.auth.vo; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; +import io.swagger.v3.oas.annotations.media.Schema; +import io.swagger.v3.oas.annotations.media.Schema; import lombok.AllArgsConstructor; import lombok.Builder; import lombok.Data; @@ -9,23 +9,23 @@ import lombok.NoArgsConstructor; import java.time.LocalDateTime; -@ApiModel("管理后台 - 登录 Response VO") +@Schema(description = "管理后台 - 登录 Response VO") @Data @NoArgsConstructor @AllArgsConstructor @Builder public class AuthLoginRespVO { - @ApiModelProperty(value = "用户编号", required = true, example = "1024") + @Schema(description = "用户编号", required = true, example = "1024") private Long userId; - @ApiModelProperty(value = "访问令牌", required = true, example = "happy") + @Schema(description = "访问令牌", required = true, example = "happy") private String accessToken; - @ApiModelProperty(value = "刷新令牌", required = true, example = "nice") + @Schema(description = "刷新令牌", required = true, example = "nice") private String refreshToken; - @ApiModelProperty(value = "过期时间", required = true) + @Schema(description = "过期时间", required = true) private LocalDateTime expiresTime; -} +} \ No newline at end of file diff --git a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/auth/vo/AuthMenuRespVO.java b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/auth/vo/AuthMenuRespVO.java index 2ae7eaac8..86c28fb19 100644 --- a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/auth/vo/AuthMenuRespVO.java +++ b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/auth/vo/AuthMenuRespVO.java @@ -1,7 +1,7 @@ package cn.iocoder.yudao.module.system.controller.admin.auth.vo; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; +import io.swagger.v3.oas.annotations.media.Schema; +import io.swagger.v3.oas.annotations.media.Schema; import lombok.AllArgsConstructor; import lombok.Builder; import lombok.Data; @@ -9,35 +9,35 @@ import lombok.NoArgsConstructor; import java.util.List; -@ApiModel("管理后台 - 登录用户的菜单信息 Response VO") +@Schema(description = "管理后台 - 登录用户的菜单信息 Response VO") @Data @NoArgsConstructor @AllArgsConstructor @Builder public class AuthMenuRespVO { - @ApiModelProperty(value = "菜单名称", required = true, example = "芋道") + @Schema(description = "菜单名称", required = true, example = "芋道") private Long id; - @ApiModelProperty(value = "父菜单 ID", required = true, example = "1024") + @Schema(description = "父菜单 ID", required = true, example = "1024") private Long parentId; - @ApiModelProperty(value = "菜单名称", required = true, example = "芋道") + @Schema(description = "菜单名称", required = true, example = "芋道") private String name; - @ApiModelProperty(value = "路由地址", example = "post", notes = "仅菜单类型为菜单或者目录时,才需要传") + @Schema(description = "路由地址", example = "post", notes = "仅菜单类型为菜单或者目录时,才需要传") private String path; - @ApiModelProperty(value = "组件路径", example = "system/post/index", notes = "仅菜单类型为菜单时,才需要传") + @Schema(description = "组件路径", example = "system/post/index", notes = "仅菜单类型为菜单时,才需要传") private String component; - @ApiModelProperty(value = "菜单图标", example = "/menu/list", notes = "仅菜单类型为菜单或者目录时,才需要传") + @Schema(description = "菜单图标", example = "/menu/list", notes = "仅菜单类型为菜单或者目录时,才需要传") private String icon; - @ApiModelProperty(value = "是否可见", required = true, example = "false") + @Schema(description = "是否可见", required = true, example = "false") private Boolean visible; - @ApiModelProperty(value = "是否缓存", required = true, example = "false") + @Schema(description = "是否缓存", required = true, example = "false") private Boolean keepAlive; /** @@ -45,4 +45,4 @@ public class AuthMenuRespVO { */ private List children; -} +} \ No newline at end of file diff --git a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/auth/vo/AuthPermissionInfoRespVO.java b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/auth/vo/AuthPermissionInfoRespVO.java index 0e809226c..9948a4a90 100644 --- a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/auth/vo/AuthPermissionInfoRespVO.java +++ b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/auth/vo/AuthPermissionInfoRespVO.java @@ -1,7 +1,7 @@ package cn.iocoder.yudao.module.system.controller.admin.auth.vo; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; +import io.swagger.v3.oas.annotations.media.Schema; +import io.swagger.v3.oas.annotations.media.Schema; import lombok.AllArgsConstructor; import lombok.Builder; import lombok.Data; @@ -9,38 +9,38 @@ import lombok.NoArgsConstructor; import java.util.Set; -@ApiModel(value = "管理后台 - 登录用户的权限信息 Response VO", description = "额外包括用户信息和角色列表") +@Schema(description = "管理后台 - 登录用户的权限信息 Response VO,额外包括用户信息和角色列表") @Data @NoArgsConstructor @AllArgsConstructor @Builder public class AuthPermissionInfoRespVO { - @ApiModelProperty(value = "用户信息", required = true) + @Schema(description = "用户信息", required = true) private UserVO user; - @ApiModelProperty(value = "角色标识数组", required = true) + @Schema(description = "角色标识数组", required = true) private Set roles; - @ApiModelProperty(value = "操作权限数组", required = true) + @Schema(description = "操作权限数组", required = true) private Set permissions; - @ApiModel("用户信息 VO") + @Schema(description = "用户信息 VO") @Data @NoArgsConstructor @AllArgsConstructor @Builder public static class UserVO { - @ApiModelProperty(value = "用户编号", required = true, example = "1024") + @Schema(description = "用户编号", required = true, example = "1024") private Long id; - @ApiModelProperty(value = "用户昵称", required = true, example = "芋道源码") + @Schema(description = "用户昵称", required = true, example = "芋道源码") private String nickname; - @ApiModelProperty(value = "用户头像", required = true, example = "http://www.iocoder.cn/xx.jpg") + @Schema(description = "用户头像", required = true, example = "http://www.iocoder.cn/xx.jpg") private String avatar; } -} +} \ No newline at end of file diff --git a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/auth/vo/AuthSmsLoginReqVO.java b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/auth/vo/AuthSmsLoginReqVO.java index b641bcca6..7c27b97d2 100644 --- a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/auth/vo/AuthSmsLoginReqVO.java +++ b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/auth/vo/AuthSmsLoginReqVO.java @@ -1,8 +1,8 @@ package cn.iocoder.yudao.module.system.controller.admin.auth.vo; import cn.iocoder.yudao.framework.common.validation.Mobile; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; +import io.swagger.v3.oas.annotations.media.Schema; +import io.swagger.v3.oas.annotations.media.Schema; import lombok.AllArgsConstructor; import lombok.Builder; import lombok.Data; @@ -10,20 +10,20 @@ import lombok.NoArgsConstructor; import javax.validation.constraints.NotEmpty; -@ApiModel("管理后台 - 短信验证码的登录 Request VO") +@Schema(description = "管理后台 - 短信验证码的登录 Request VO") @Data @NoArgsConstructor @AllArgsConstructor @Builder public class AuthSmsLoginReqVO { - @ApiModelProperty(value = "手机号", required = true, example = "yudaoyuanma") + @Schema(description = "手机号", required = true, example = "yudaoyuanma") @NotEmpty(message = "手机号不能为空") @Mobile private String mobile; - @ApiModelProperty(value = "短信验证码", required = true, example = "1024") + @Schema(description = "短信验证码", required = true, example = "1024") @NotEmpty(message = "验证码不能为空") private String code; -} +} \ No newline at end of file diff --git a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/auth/vo/AuthSmsSendReqVO.java b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/auth/vo/AuthSmsSendReqVO.java index 0df9a521e..914e4311d 100644 --- a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/auth/vo/AuthSmsSendReqVO.java +++ b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/auth/vo/AuthSmsSendReqVO.java @@ -3,8 +3,8 @@ package cn.iocoder.yudao.module.system.controller.admin.auth.vo; import cn.iocoder.yudao.framework.common.validation.InEnum; import cn.iocoder.yudao.framework.common.validation.Mobile; import cn.iocoder.yudao.module.system.enums.sms.SmsSceneEnum; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; +import io.swagger.v3.oas.annotations.media.Schema; +import io.swagger.v3.oas.annotations.media.Schema; import lombok.AllArgsConstructor; import lombok.Builder; import lombok.Data; @@ -13,21 +13,21 @@ import lombok.NoArgsConstructor; import javax.validation.constraints.NotEmpty; import javax.validation.constraints.NotNull; -@ApiModel("管理后台 - 发送手机验证码 Request VO") +@Schema(description = "管理后台 - 发送手机验证码 Request VO") @Data @NoArgsConstructor @AllArgsConstructor @Builder public class AuthSmsSendReqVO { - @ApiModelProperty(value = "手机号", required = true, example = "yudaoyuanma") + @Schema(description = "手机号", required = true, example = "yudaoyuanma") @NotEmpty(message = "手机号不能为空") @Mobile private String mobile; - @ApiModelProperty(value = "短信场景", required = true, example = "1") + @Schema(description = "短信场景", required = true, example = "1") @NotNull(message = "发送场景不能为空") @InEnum(SmsSceneEnum.class) private Integer scene; -} +} \ No newline at end of file diff --git a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/auth/vo/AuthSocialBindLoginReqVO.java b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/auth/vo/AuthSocialBindLoginReqVO.java index cefe40d14..6977bb819 100644 --- a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/auth/vo/AuthSocialBindLoginReqVO.java +++ b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/auth/vo/AuthSocialBindLoginReqVO.java @@ -2,8 +2,8 @@ package cn.iocoder.yudao.module.system.controller.admin.auth.vo; import cn.iocoder.yudao.framework.common.validation.InEnum; import cn.iocoder.yudao.module.system.enums.social.SocialTypeEnum; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; +import io.swagger.v3.oas.annotations.media.Schema; +import io.swagger.v3.oas.annotations.media.Schema; import lombok.AllArgsConstructor; import lombok.Builder; import lombok.Data; @@ -14,35 +14,35 @@ import javax.validation.constraints.NotEmpty; import javax.validation.constraints.NotNull; import javax.validation.constraints.Pattern; -@ApiModel("管理后台 - 社交绑定登录 Request VO,使用 code 授权码 + 账号密码") +@Schema(description = "管理后台 - 社交绑定登录 Request VO,使用 code 授权码 + 账号密码") @Data @NoArgsConstructor @AllArgsConstructor @Builder public class AuthSocialBindLoginReqVO { - @ApiModelProperty(value = "社交平台的类型", required = true, example = "10", notes = "参见 UserSocialTypeEnum 枚举值") + @Schema(description = "社交平台的类型,参见 UserSocialTypeEnum 枚举值", required = true, example = "10" ) @InEnum(SocialTypeEnum.class) @NotNull(message = "社交平台的类型不能为空") private Integer type; - @ApiModelProperty(value = "授权码", required = true, example = "1024") + @Schema(description = "授权码", required = true, example = "1024") @NotEmpty(message = "授权码不能为空") private String code; - @ApiModelProperty(value = "state", required = true, example = "9b2ffbc1-7425-4155-9894-9d5c08541d62") + @Schema(description = "state", required = true, example = "9b2ffbc1-7425-4155-9894-9d5c08541d62") @NotEmpty(message = "state 不能为空") private String state; - @ApiModelProperty(value = "账号", required = true, example = "yudaoyuanma") + @Schema(description = "账号", required = true, example = "yudaoyuanma") @NotEmpty(message = "登录账号不能为空") @Length(min = 4, max = 16, message = "账号长度为 4-16 位") @Pattern(regexp = "^[A-Za-z0-9]+$", message = "账号格式为数字以及字母") private String username; - @ApiModelProperty(value = "密码", required = true, example = "buzhidao") + @Schema(description = "密码", required = true, example = "buzhidao") @NotEmpty(message = "密码不能为空") @Length(min = 4, max = 16, message = "密码长度为 4-16 位") private String password; -} +} \ No newline at end of file diff --git a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/auth/vo/AuthSocialLoginReqVO.java b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/auth/vo/AuthSocialLoginReqVO.java index e52a49288..cd86b1778 100644 --- a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/auth/vo/AuthSocialLoginReqVO.java +++ b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/auth/vo/AuthSocialLoginReqVO.java @@ -2,8 +2,8 @@ package cn.iocoder.yudao.module.system.controller.admin.auth.vo; import cn.iocoder.yudao.framework.common.validation.InEnum; import cn.iocoder.yudao.module.system.enums.social.SocialTypeEnum; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; +import io.swagger.v3.oas.annotations.media.Schema; +import io.swagger.v3.oas.annotations.media.Schema; import lombok.AllArgsConstructor; import lombok.Builder; import lombok.Data; @@ -12,24 +12,24 @@ import lombok.NoArgsConstructor; import javax.validation.constraints.NotEmpty; import javax.validation.constraints.NotNull; -@ApiModel("管理后台 - 社交绑定登录 Request VO,使用 code 授权码 + 账号密码") +@Schema(description = "管理后台 - 社交绑定登录 Request VO,使用 code 授权码 + 账号密码") @Data @NoArgsConstructor @AllArgsConstructor @Builder public class AuthSocialLoginReqVO { - @ApiModelProperty(value = "社交平台的类型", required = true, example = "10", notes = "参见 UserSocialTypeEnum 枚举值") + @Schema(description = "社交平台的类型,参见 UserSocialTypeEnum 枚举值", required = true, example = "10") @InEnum(SocialTypeEnum.class) @NotNull(message = "社交平台的类型不能为空") private Integer type; - @ApiModelProperty(value = "授权码", required = true, example = "1024") + @Schema(description = "授权码", required = true, example = "1024") @NotEmpty(message = "授权码不能为空") private String code; - @ApiModelProperty(value = "state", required = true, example = "9b2ffbc1-7425-4155-9894-9d5c08541d62") + @Schema(description = "state", required = true, example = "9b2ffbc1-7425-4155-9894-9d5c08541d62") @NotEmpty(message = "state 不能为空") private String state; -} +} \ No newline at end of file diff --git a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/captcha/CaptchaController.java b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/captcha/CaptchaController.java index 9921c8ea8..38efeef57 100644 --- a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/captcha/CaptchaController.java +++ b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/captcha/CaptchaController.java @@ -6,8 +6,8 @@ import cn.iocoder.yudao.framework.operatelog.core.annotations.OperateLog; import com.xingyuv.captcha.model.common.ResponseModel; import com.xingyuv.captcha.model.vo.CaptchaVO; import com.xingyuv.captcha.service.CaptchaService; -import io.swagger.annotations.Api; -import io.swagger.annotations.ApiOperation; +import io.swagger.v3.oas.annotations.tags.Tag; +import io.swagger.v3.oas.annotations.Operation; import org.springframework.web.bind.annotation.PostMapping; import org.springframework.web.bind.annotation.RequestBody; import org.springframework.web.bind.annotation.RequestMapping; @@ -22,7 +22,7 @@ import javax.servlet.http.HttpServletRequest; * * @author 芋道源码 */ -@Api(tags = "管理后台 - 验证码") +@Tag(name = "管理后台 - 验证码") @RestController("adminCaptchaController") @RequestMapping("/system/captcha") public class CaptchaController { @@ -31,7 +31,7 @@ public class CaptchaController { private CaptchaService captchaService; @PostMapping({"/get"}) - @ApiOperation("获得验证码") + @Operation(summary = "获得验证码") @PermitAll @OperateLog(enable = false) // 避免 Post 请求被记录操作日志 public ResponseModel get(@RequestBody CaptchaVO data, HttpServletRequest request) { @@ -41,7 +41,7 @@ public class CaptchaController { } @PostMapping("/check") - @ApiOperation("校验验证码") + @Operation(summary = "校验验证码") @PermitAll @OperateLog(enable = false) // 避免 Post 请求被记录操作日志 public ResponseModel check(@RequestBody CaptchaVO data, HttpServletRequest request) { @@ -58,4 +58,4 @@ public class CaptchaController { return request.getRemoteAddr() + ua; } -} +} \ No newline at end of file diff --git a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/dept/DeptController.java b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/dept/DeptController.java index f60415cee..7731603e0 100644 --- a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/dept/DeptController.java +++ b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/dept/DeptController.java @@ -6,9 +6,9 @@ import cn.iocoder.yudao.module.system.controller.admin.dept.vo.dept.*; import cn.iocoder.yudao.module.system.convert.dept.DeptConvert; import cn.iocoder.yudao.module.system.dal.dataobject.dept.DeptDO; import cn.iocoder.yudao.module.system.service.dept.DeptService; -import io.swagger.annotations.Api; -import io.swagger.annotations.ApiImplicitParam; -import io.swagger.annotations.ApiOperation; +import io.swagger.v3.oas.annotations.tags.Tag; +import io.swagger.v3.oas.annotations.Parameter; +import io.swagger.v3.oas.annotations.Operation; import org.springframework.security.access.prepost.PreAuthorize; import org.springframework.validation.annotation.Validated; import org.springframework.web.bind.annotation.*; @@ -20,7 +20,7 @@ import java.util.List; import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success; -@Api(tags = "管理后台 - 部门") +@Tag(name = "管理后台 - 部门") @RestController @RequestMapping("/system/dept") @Validated @@ -30,7 +30,7 @@ public class DeptController { private DeptService deptService; @PostMapping("create") - @ApiOperation("创建部门") + @Operation(summary = "创建部门") @PreAuthorize("@ss.hasPermission('system:dept:create')") public CommonResult createDept(@Valid @RequestBody DeptCreateReqVO reqVO) { Long deptId = deptService.createDept(reqVO); @@ -38,7 +38,7 @@ public class DeptController { } @PutMapping("update") - @ApiOperation("更新部门") + @Operation(summary = "更新部门") @PreAuthorize("@ss.hasPermission('system:dept:update')") public CommonResult updateDept(@Valid @RequestBody DeptUpdateReqVO reqVO) { deptService.updateDept(reqVO); @@ -46,8 +46,8 @@ public class DeptController { } @DeleteMapping("delete") - @ApiOperation("删除部门") - @ApiImplicitParam(name = "id", value = "编号", required = true, example = "1024", dataTypeClass = Long.class) + @Operation(summary = "删除部门") + @Parameter(name = "id", description = "编号", required = true, example = "1024") @PreAuthorize("@ss.hasPermission('system:dept:delete')") public CommonResult deleteDept(@RequestParam("id") Long id) { deptService.deleteDept(id); @@ -55,7 +55,7 @@ public class DeptController { } @GetMapping("/list") - @ApiOperation("获取部门列表") + @Operation(summary = "获取部门列表") @PreAuthorize("@ss.hasPermission('system:dept:query')") public CommonResult> listDepts(DeptListReqVO reqVO) { List list = deptService.getDeptList(reqVO); @@ -64,7 +64,7 @@ public class DeptController { } @GetMapping("/list-all-simple") - @ApiOperation(value = "获取部门精简信息列表", notes = "只包含被开启的部门,主要用于前端的下拉选项") + @Operation(summary = "获取部门精简信息列表", description = "只包含被开启的部门,主要用于前端的下拉选项") public CommonResult> getSimpleDepts() { // 获得部门列表,只要开启状态的 DeptListReqVO reqVO = new DeptListReqVO(); @@ -76,11 +76,11 @@ public class DeptController { } @GetMapping("/get") - @ApiOperation("获得部门信息") - @ApiImplicitParam(name = "id", value = "编号", required = true, example = "1024", dataTypeClass = Long.class) + @Operation(summary = "获得部门信息") + @Parameter(name = "id", description = "编号", required = true, example = "1024") @PreAuthorize("@ss.hasPermission('system:dept:query')") public CommonResult getDept(@RequestParam("id") Long id) { return success(DeptConvert.INSTANCE.convert(deptService.getDept(id))); } -} +} \ No newline at end of file diff --git a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/dept/PostController.java b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/dept/PostController.java index 52fa8edb2..4f0956578 100644 --- a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/dept/PostController.java +++ b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/dept/PostController.java @@ -9,9 +9,9 @@ import cn.iocoder.yudao.module.system.controller.admin.dept.vo.post.*; import cn.iocoder.yudao.module.system.convert.dept.PostConvert; import cn.iocoder.yudao.module.system.dal.dataobject.dept.PostDO; import cn.iocoder.yudao.module.system.service.dept.PostService; -import io.swagger.annotations.Api; -import io.swagger.annotations.ApiImplicitParam; -import io.swagger.annotations.ApiOperation; +import io.swagger.v3.oas.annotations.tags.Tag; +import io.swagger.v3.oas.annotations.Parameter; +import io.swagger.v3.oas.annotations.Operation; import org.springframework.security.access.prepost.PreAuthorize; import org.springframework.validation.annotation.Validated; import org.springframework.web.bind.annotation.*; @@ -27,7 +27,7 @@ import java.util.List; import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success; import static cn.iocoder.yudao.framework.operatelog.core.enums.OperateTypeEnum.EXPORT; -@Api(tags = "管理后台 - 岗位") +@Tag(name = "管理后台 - 岗位") @RestController @RequestMapping("/system/post") @Validated @@ -37,7 +37,7 @@ public class PostController { private PostService postService; @PostMapping("/create") - @ApiOperation("创建岗位") + @Operation(summary = "创建岗位") @PreAuthorize("@ss.hasPermission('system:post:create')") public CommonResult createPost(@Valid @RequestBody PostCreateReqVO reqVO) { Long postId = postService.createPost(reqVO); @@ -45,7 +45,7 @@ public class PostController { } @PutMapping("/update") - @ApiOperation("修改岗位") + @Operation(summary = "修改岗位") @PreAuthorize("@ss.hasPermission('system:post:update')") public CommonResult updatePost(@Valid @RequestBody PostUpdateReqVO reqVO) { postService.updatePost(reqVO); @@ -53,7 +53,7 @@ public class PostController { } @DeleteMapping("/delete") - @ApiOperation("删除岗位") + @Operation(summary = "删除岗位") @PreAuthorize("@ss.hasPermission('system:post:delete')") public CommonResult deletePost(@RequestParam("id") Long id) { postService.deletePost(id); @@ -61,15 +61,15 @@ public class PostController { } @GetMapping(value = "/get") - @ApiOperation("获得岗位信息") - @ApiImplicitParam(name = "id", value = "岗位编号", required = true, example = "1024", dataTypeClass = Long.class) + @Operation(summary = "获得岗位信息") + @Parameter(name = "id", description = "岗位编号", required = true, example = "1024") @PreAuthorize("@ss.hasPermission('system:post:query')") public CommonResult getPost(@RequestParam("id") Long id) { return success(PostConvert.INSTANCE.convert(postService.getPost(id))); } @GetMapping("/list-all-simple") - @ApiOperation(value = "获取岗位精简信息列表", notes = "只包含被开启的岗位,主要用于前端的下拉选项") + @Operation(summary = "获取岗位精简信息列表", description = "只包含被开启的岗位,主要用于前端的下拉选项") public CommonResult> getSimplePosts() { // 获得岗位列表,只要开启状态的 List list = postService.getPostList(null, Collections.singleton(CommonStatusEnum.ENABLE.getStatus())); @@ -79,14 +79,14 @@ public class PostController { } @GetMapping("/page") - @ApiOperation("获得岗位分页列表") + @Operation(summary = "获得岗位分页列表") @PreAuthorize("@ss.hasPermission('system:post:query')") public CommonResult> getPostPage(@Validated PostPageReqVO reqVO) { return success(PostConvert.INSTANCE.convertPage(postService.getPostPage(reqVO))); } @GetMapping("/export") - @ApiOperation("岗位管理") + @Operation(summary = "岗位管理") @PreAuthorize("@ss.hasPermission('system:post:export')") @OperateLog(type = EXPORT) public void export(HttpServletResponse response, @Validated PostExportReqVO reqVO) throws IOException { @@ -96,4 +96,4 @@ public class PostController { ExcelUtils.write(response, "岗位数据.xls", "岗位列表", PostExcelVO.class, data); } -} +} \ No newline at end of file diff --git a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/dept/vo/dept/DeptBaseVO.java b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/dept/vo/dept/DeptBaseVO.java index 699a27694..80637158b 100644 --- a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/dept/vo/dept/DeptBaseVO.java +++ b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/dept/vo/dept/DeptBaseVO.java @@ -1,6 +1,6 @@ package cn.iocoder.yudao.module.system.controller.admin.dept.vo.dept; -import io.swagger.annotations.ApiModelProperty; +import io.swagger.v3.oas.annotations.media.Schema; import lombok.Data; import javax.validation.constraints.Email; @@ -15,33 +15,33 @@ import javax.validation.constraints.Size; @Data public class DeptBaseVO { - @ApiModelProperty(value = "菜单名称", required = true, example = "芋道") + @Schema(description = "菜单名称", required = true, example = "芋道") @NotBlank(message = "部门名称不能为空") @Size(max = 30, message = "部门名称长度不能超过30个字符") private String name; - @ApiModelProperty(value = "父菜单 ID", example = "1024") + @Schema(description = "父菜单 ID", example = "1024") private Long parentId; - @ApiModelProperty(value = "显示顺序不能为空", required = true, example = "1024") + @Schema(description = "显示顺序不能为空", required = true, example = "1024") @NotNull(message = "显示顺序不能为空") private Integer sort; - @ApiModelProperty(value = "负责人的用户编号", example = "2048") + @Schema(description = "负责人的用户编号", example = "2048") private Long leaderUserId; - @ApiModelProperty(value = "联系电话", example = "15601691000") + @Schema(description = "联系电话", example = "15601691000") @Size(max = 11, message = "联系电话长度不能超过11个字符") private String phone; - @ApiModelProperty(value = "邮箱", example = "yudao@iocoder.cn") + @Schema(description = "邮箱", example = "yudao@iocoder.cn") @Email(message = "邮箱格式不正确") @Size(max = 50, message = "邮箱长度不能超过50个字符") private String email; - @ApiModelProperty(value = "状态", required = true, example = "1", notes = "见 CommonStatusEnum 枚举") + @Schema(description = "状态,见 CommonStatusEnum 枚举", required = true, example = "1") @NotNull(message = "状态不能为空") // @InEnum(value = CommonStatusEnum.class, message = "修改状态必须是 {value}") private Integer status; -} +} \ No newline at end of file diff --git a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/dept/vo/dept/DeptCreateReqVO.java b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/dept/vo/dept/DeptCreateReqVO.java index efd6c39a3..5cf650c52 100644 --- a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/dept/vo/dept/DeptCreateReqVO.java +++ b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/dept/vo/dept/DeptCreateReqVO.java @@ -1,11 +1,11 @@ package cn.iocoder.yudao.module.system.controller.admin.dept.vo.dept; -import io.swagger.annotations.ApiModel; +import io.swagger.v3.oas.annotations.media.Schema; import lombok.Data; import lombok.EqualsAndHashCode; import lombok.ToString; -@ApiModel("管理后台 - 部门创建 Request VO") +@Schema(description = "管理后台 - 部门创建 Request VO") @Data @EqualsAndHashCode(callSuper = true) @ToString(callSuper = true) diff --git a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/dept/vo/dept/DeptListReqVO.java b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/dept/vo/dept/DeptListReqVO.java index c4ff55243..822630f5d 100644 --- a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/dept/vo/dept/DeptListReqVO.java +++ b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/dept/vo/dept/DeptListReqVO.java @@ -1,17 +1,17 @@ package cn.iocoder.yudao.module.system.controller.admin.dept.vo.dept; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; +import io.swagger.v3.oas.annotations.media.Schema; +import io.swagger.v3.oas.annotations.media.Schema; import lombok.Data; -@ApiModel("管理后台 - 部门列表 Request VO") +@Schema(description = "管理后台 - 部门列表 Request VO") @Data public class DeptListReqVO { - @ApiModelProperty(value = "部门名称", example = "芋道", notes = "模糊匹配") + @Schema(description = "部门名称", example = "芋道", notes = "模糊匹配") private String name; - @ApiModelProperty(value = "展示状态", example = "1", notes = "参见 CommonStatusEnum 枚举类") + @Schema(description = "展示状态", example = "1", notes = "参见 CommonStatusEnum 枚举类") private Integer status; -} +} \ No newline at end of file diff --git a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/dept/vo/dept/DeptRespVO.java b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/dept/vo/dept/DeptRespVO.java index a3361cdd6..e61f71a3c 100644 --- a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/dept/vo/dept/DeptRespVO.java +++ b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/dept/vo/dept/DeptRespVO.java @@ -1,24 +1,24 @@ package cn.iocoder.yudao.module.system.controller.admin.dept.vo.dept; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; +import io.swagger.v3.oas.annotations.media.Schema; +import io.swagger.v3.oas.annotations.media.Schema; import lombok.Data; import lombok.EqualsAndHashCode; import java.time.LocalDateTime; -@ApiModel("管理后台 - 部门信息 Response VO") +@Schema(description = "管理后台 - 部门信息 Response VO") @Data @EqualsAndHashCode(callSuper = true) public class DeptRespVO extends DeptBaseVO { - @ApiModelProperty(value = "部门编号", required = true, example = "1024") + @Schema(description = "部门编号", required = true, example = "1024") private Long id; - @ApiModelProperty(value = "状态", required = true, example = "1", notes = "参见 CommonStatusEnum 枚举类") + @Schema(description = "状态", required = true, example = "1", notes = "参见 CommonStatusEnum 枚举类") private Integer status; - @ApiModelProperty(value = "创建时间", required = true, example = "时间戳格式") + @Schema(description = "创建时间", required = true, example = "时间戳格式") private LocalDateTime createTime; -} +} \ No newline at end of file diff --git a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/dept/vo/dept/DeptSimpleRespVO.java b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/dept/vo/dept/DeptSimpleRespVO.java index 1a3d64f6e..3da8e14cb 100644 --- a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/dept/vo/dept/DeptSimpleRespVO.java +++ b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/dept/vo/dept/DeptSimpleRespVO.java @@ -1,24 +1,24 @@ package cn.iocoder.yudao.module.system.controller.admin.dept.vo.dept; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; +import io.swagger.v3.oas.annotations.media.Schema; +import io.swagger.v3.oas.annotations.media.Schema; import lombok.AllArgsConstructor; import lombok.Data; import lombok.NoArgsConstructor; -@ApiModel("管理后台 - 部门精简信息 Response VO") +@Schema(description = "管理后台 - 部门精简信息 Response VO") @Data @NoArgsConstructor @AllArgsConstructor public class DeptSimpleRespVO { - @ApiModelProperty(value = "部门编号", required = true, example = "1024") + @Schema(description = "部门编号", required = true, example = "1024") private Long id; - @ApiModelProperty(value = "部门名称", required = true, example = "芋道") + @Schema(description = "部门名称", required = true, example = "芋道") private String name; - @ApiModelProperty(value = "父部门 ID", required = true, example = "1024") + @Schema(description = "父部门 ID", required = true, example = "1024") private Long parentId; -} +} \ No newline at end of file diff --git a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/dept/vo/dept/DeptUpdateReqVO.java b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/dept/vo/dept/DeptUpdateReqVO.java index 3e2f13a84..bf53453b9 100644 --- a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/dept/vo/dept/DeptUpdateReqVO.java +++ b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/dept/vo/dept/DeptUpdateReqVO.java @@ -1,19 +1,19 @@ package cn.iocoder.yudao.module.system.controller.admin.dept.vo.dept; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; +import io.swagger.v3.oas.annotations.media.Schema; +import io.swagger.v3.oas.annotations.media.Schema; import lombok.Data; import lombok.EqualsAndHashCode; import javax.validation.constraints.NotNull; -@ApiModel("管理后台 - 部门更新 Request VO") +@Schema(description = "管理后台 - 部门更新 Request VO") @Data @EqualsAndHashCode(callSuper = true) public class DeptUpdateReqVO extends DeptBaseVO { - @ApiModelProperty(value = "部门编号", required = true, example = "1024") + @Schema(description = "部门编号", required = true, example = "1024") @NotNull(message = "部门编号不能为空") private Long id; -} +} \ No newline at end of file diff --git a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/dept/vo/post/PostBaseVO.java b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/dept/vo/post/PostBaseVO.java index 98c1bf212..eaad42fc7 100644 --- a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/dept/vo/post/PostBaseVO.java +++ b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/dept/vo/post/PostBaseVO.java @@ -1,6 +1,6 @@ package cn.iocoder.yudao.module.system.controller.admin.dept.vo.post; -import io.swagger.annotations.ApiModelProperty; +import io.swagger.v3.oas.annotations.media.Schema; import lombok.Data; import javax.validation.constraints.NotBlank; @@ -14,24 +14,24 @@ import javax.validation.constraints.Size; @Data public class PostBaseVO { - @ApiModelProperty(value = "岗位名称", required = true, example = "小博主") + @Schema(description = "岗位名称", required = true, example = "小博主") @NotBlank(message = "岗位名称不能为空") @Size(max = 50, message = "岗位名称长度不能超过50个字符") private String name; - @ApiModelProperty(value = "岗位编码", required = true, example = "yudao") + @Schema(description = "岗位编码", required = true, example = "yudao") @NotBlank(message = "岗位编码不能为空") @Size(max = 64, message = "岗位编码长度不能超过64个字符") private String code; - @ApiModelProperty(value = "显示顺序不能为空", required = true, example = "1024") + @Schema(description = "显示顺序不能为空", required = true, example = "1024") @NotNull(message = "显示顺序不能为空") private Integer sort; - @ApiModelProperty(value = "状态", required = true, example = "1", notes = "参见 CommonStatusEnum 枚举类") + @Schema(description = "状态,参见 CommonStatusEnum 枚举类", required = true, example = "1") private Integer status; - @ApiModelProperty(value = "备注", example = "快乐的备注") + @Schema(description = "备注", example = "快乐的备注") private String remark; -} +} \ No newline at end of file diff --git a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/dept/vo/post/PostCreateReqVO.java b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/dept/vo/post/PostCreateReqVO.java index 547739c0d..b2e52e174 100644 --- a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/dept/vo/post/PostCreateReqVO.java +++ b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/dept/vo/post/PostCreateReqVO.java @@ -1,10 +1,10 @@ package cn.iocoder.yudao.module.system.controller.admin.dept.vo.post; -import io.swagger.annotations.ApiModel; +import io.swagger.v3.oas.annotations.media.Schema; import lombok.Data; import lombok.EqualsAndHashCode; -@ApiModel("管理后台 - 岗位创建 Request VO") +@Schema(description = "管理后台 - 岗位创建 Request VO") @Data @EqualsAndHashCode(callSuper = true) public class PostCreateReqVO extends PostBaseVO { diff --git a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/dept/vo/post/PostExportReqVO.java b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/dept/vo/post/PostExportReqVO.java index 735bfcce1..071e422b1 100644 --- a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/dept/vo/post/PostExportReqVO.java +++ b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/dept/vo/post/PostExportReqVO.java @@ -1,20 +1,20 @@ package cn.iocoder.yudao.module.system.controller.admin.dept.vo.post; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; +import io.swagger.v3.oas.annotations.media.Schema; +import io.swagger.v3.oas.annotations.media.Schema; import lombok.Data; -@ApiModel(value = "管理后台 - 岗位导出 Request VO", description = "参数和 PostExcelVO 是一致的") +@Schema(description = "管理后台 - 岗位导出 Request VO,参数和 PostExcelVO 是一致的") @Data public class PostExportReqVO { - @ApiModelProperty(value = "岗位编码", example = "yudao", notes = "模糊匹配") + @Schema(description = "岗位编码,模糊匹配", example = "yudao") private String code; - @ApiModelProperty(value = "岗位名称", example = "芋道", notes = "模糊匹配") + @Schema(description = "岗位名称,模糊匹配", example = "芋道") private String name; - @ApiModelProperty(value = "展示状态", example = "1", notes = "参见 CommonStatusEnum 枚举类") + @Schema(description = "展示状态,参见 CommonStatusEnum 枚举类", example = "1") private Integer status; -} +} \ No newline at end of file diff --git a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/dept/vo/post/PostListReqVO.java b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/dept/vo/post/PostListReqVO.java index 58ba469e1..6796a1c66 100644 --- a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/dept/vo/post/PostListReqVO.java +++ b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/dept/vo/post/PostListReqVO.java @@ -1,19 +1,19 @@ package cn.iocoder.yudao.module.system.controller.admin.dept.vo.post; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; +import io.swagger.v3.oas.annotations.media.Schema; +import io.swagger.v3.oas.annotations.media.Schema; import lombok.Data; import lombok.EqualsAndHashCode; -@ApiModel("管理后台 - 岗位列表 Request VO") +@Schema(description = "管理后台 - 岗位列表 Request VO") @Data @EqualsAndHashCode(callSuper = true) public class PostListReqVO extends PostBaseVO { - @ApiModelProperty(value = "岗位名称", example = "芋道", notes = "模糊匹配") + @Schema(description = "岗位名称,模糊匹配", example = "芋道") private String name; - @ApiModelProperty(value = "展示状态", example = "1", notes = "参见 CommonStatusEnum 枚举类") + @Schema(description = "展示状态,参见 CommonStatusEnum 枚举类", example = "1") private Integer status; -} +} \ No newline at end of file diff --git a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/dept/vo/post/PostPageReqVO.java b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/dept/vo/post/PostPageReqVO.java index be9ebeab4..edfbf0610 100644 --- a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/dept/vo/post/PostPageReqVO.java +++ b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/dept/vo/post/PostPageReqVO.java @@ -1,23 +1,23 @@ package cn.iocoder.yudao.module.system.controller.admin.dept.vo.post; import cn.iocoder.yudao.framework.common.pojo.PageParam; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; +import io.swagger.v3.oas.annotations.media.Schema; +import io.swagger.v3.oas.annotations.media.Schema; import lombok.Data; import lombok.EqualsAndHashCode; -@ApiModel("管理后台 - 岗位分页 Request VO") +@Schema(description = "管理后台 - 岗位分页 Request VO") @Data @EqualsAndHashCode(callSuper = true) public class PostPageReqVO extends PageParam { - @ApiModelProperty(value = "岗位编码", example = "yudao", notes = "模糊匹配") + @Schema(description = "岗位编码,模糊匹配", example = "yudao") private String code; - @ApiModelProperty(value = "岗位名称", example = "芋道", notes = "模糊匹配") + @Schema(description = "岗位名称,模糊匹配", example = "芋道") private String name; - @ApiModelProperty(value = "展示状态", example = "1", notes = "参见 CommonStatusEnum 枚举类") + @Schema(description = "展示状态,参见 CommonStatusEnum 枚举类", example = "1") private Integer status; -} +} \ No newline at end of file diff --git a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/dept/vo/post/PostRespVO.java b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/dept/vo/post/PostRespVO.java index d6aa60d17..2604512f1 100644 --- a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/dept/vo/post/PostRespVO.java +++ b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/dept/vo/post/PostRespVO.java @@ -1,21 +1,21 @@ package cn.iocoder.yudao.module.system.controller.admin.dept.vo.post; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; +import io.swagger.v3.oas.annotations.media.Schema; +import io.swagger.v3.oas.annotations.media.Schema; import lombok.Data; import lombok.EqualsAndHashCode; import java.time.LocalDateTime; -@ApiModel("管理后台 - 岗位信息 Response VO") +@Schema(description = "管理后台 - 岗位信息 Response VO") @Data @EqualsAndHashCode(callSuper = true) public class PostRespVO extends PostBaseVO { - @ApiModelProperty(value = "岗位序号", required = true, example = "1024") + @Schema(description = "岗位序号", required = true, example = "1024") private Long id; - @ApiModelProperty(value = "创建时间", required = true, example = "时间戳格式") + @Schema(description = "创建时间", required = true, example = "时间戳格式") private LocalDateTime createTime; -} +} \ No newline at end of file diff --git a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/dept/vo/post/PostSimpleRespVO.java b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/dept/vo/post/PostSimpleRespVO.java index 0334a7652..c947fe37e 100644 --- a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/dept/vo/post/PostSimpleRespVO.java +++ b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/dept/vo/post/PostSimpleRespVO.java @@ -1,21 +1,21 @@ package cn.iocoder.yudao.module.system.controller.admin.dept.vo.post; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; +import io.swagger.v3.oas.annotations.media.Schema; +import io.swagger.v3.oas.annotations.media.Schema; import lombok.AllArgsConstructor; import lombok.Data; import lombok.NoArgsConstructor; -@ApiModel("管理后台 - 岗位精简信息 Response VO") +@Schema(description = "管理后台 - 岗位精简信息 Response VO") @Data @NoArgsConstructor @AllArgsConstructor public class PostSimpleRespVO { - @ApiModelProperty(value = "岗位编号", required = true, example = "1024") + @Schema(description = "岗位编号", required = true, example = "1024") private Long id; - @ApiModelProperty(value = "岗位名称", required = true, example = "芋道") + @Schema(description = "岗位名称", required = true, example = "芋道") private String name; -} +} \ No newline at end of file diff --git a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/dept/vo/post/PostUpdateReqVO.java b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/dept/vo/post/PostUpdateReqVO.java index aeb91998b..64defa524 100644 --- a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/dept/vo/post/PostUpdateReqVO.java +++ b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/dept/vo/post/PostUpdateReqVO.java @@ -1,19 +1,19 @@ package cn.iocoder.yudao.module.system.controller.admin.dept.vo.post; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; +import io.swagger.v3.oas.annotations.media.Schema; +import io.swagger.v3.oas.annotations.media.Schema; import lombok.Data; import lombok.EqualsAndHashCode; import javax.validation.constraints.NotNull; -@ApiModel("管理后台 - 岗位更新 Request VO") +@Schema(description = "管理后台 - 岗位更新 Request VO") @Data @EqualsAndHashCode(callSuper = true) public class PostUpdateReqVO extends PostBaseVO { - @ApiModelProperty(value = "岗位编号", required = true, example = "1024") + @Schema(description = "岗位编号", required = true, example = "1024") @NotNull(message = "岗位编号不能为空") private Long id; -} +} \ No newline at end of file diff --git a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/dict/DictDataController.java b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/dict/DictDataController.java index 4b14be80e..145520acb 100644 --- a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/dict/DictDataController.java +++ b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/dict/DictDataController.java @@ -8,9 +8,9 @@ import cn.iocoder.yudao.framework.operatelog.core.annotations.OperateLog; import cn.iocoder.yudao.module.system.controller.admin.dict.vo.data.*; import cn.iocoder.yudao.module.system.convert.dict.DictDataConvert; import cn.iocoder.yudao.module.system.service.dict.DictDataService; -import io.swagger.annotations.Api; -import io.swagger.annotations.ApiImplicitParam; -import io.swagger.annotations.ApiOperation; +import io.swagger.v3.oas.annotations.tags.Tag; +import io.swagger.v3.oas.annotations.Parameter; +import io.swagger.v3.oas.annotations.Operation; import org.springframework.security.access.prepost.PreAuthorize; import org.springframework.validation.annotation.Validated; import org.springframework.web.bind.annotation.*; @@ -24,7 +24,7 @@ import java.util.List; import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success; import static cn.iocoder.yudao.framework.operatelog.core.enums.OperateTypeEnum.EXPORT; -@Api(tags = "管理后台 - 字典数据") +@Tag(name = "管理后台 - 字典数据") @RestController @RequestMapping("/system/dict-data") @Validated @@ -34,7 +34,7 @@ public class DictDataController { private DictDataService dictDataService; @PostMapping("/create") - @ApiOperation("新增字典数据") + @Operation(summary = "新增字典数据") @PreAuthorize("@ss.hasPermission('system:dict:create')") public CommonResult createDictData(@Valid @RequestBody DictDataCreateReqVO reqVO) { Long dictDataId = dictDataService.createDictData(reqVO); @@ -42,7 +42,7 @@ public class DictDataController { } @PutMapping("update") - @ApiOperation("修改字典数据") + @Operation(summary = "修改字典数据") @PreAuthorize("@ss.hasPermission('system:dict:update')") public CommonResult updateDictData(@Valid @RequestBody DictDataUpdateReqVO reqVO) { dictDataService.updateDictData(reqVO); @@ -50,8 +50,8 @@ public class DictDataController { } @DeleteMapping("/delete") - @ApiOperation("删除字典数据") - @ApiImplicitParam(name = "id", value = "编号", required = true, example = "1024", dataTypeClass = Long.class) + @Operation(summary = "删除字典数据") + @Parameter(name = "id", description = "编号", required = true, example = "1024") @PreAuthorize("@ss.hasPermission('system:dict:delete')") public CommonResult deleteDictData(Long id) { dictDataService.deleteDictData(id); @@ -59,7 +59,7 @@ public class DictDataController { } @GetMapping("/list-all-simple") - @ApiOperation(value = "获得全部字典数据列表", notes = "一般用于管理后台缓存字典数据在本地") + @Operation(summary = "获得全部字典数据列表", description = "一般用于管理后台缓存字典数据在本地") // 无需添加权限认证,因为前端全局都需要 public CommonResult> getSimpleDictDatas() { List list = dictDataService.getDictDataList(); @@ -67,22 +67,22 @@ public class DictDataController { } @GetMapping("/page") - @ApiOperation("/获得字典类型的分页列表") + @Operation(summary = "/获得字典类型的分页列表") @PreAuthorize("@ss.hasPermission('system:dict:query')") public CommonResult> getDictTypePage(@Valid DictDataPageReqVO reqVO) { return success(DictDataConvert.INSTANCE.convertPage(dictDataService.getDictDataPage(reqVO))); } @GetMapping(value = "/get") - @ApiOperation("/查询字典数据详细") - @ApiImplicitParam(name = "id", value = "编号", required = true, example = "1024", dataTypeClass = Long.class) + @Operation(summary = "/查询字典数据详细") + @Parameter(name = "id", description = "编号", required = true, example = "1024") @PreAuthorize("@ss.hasPermission('system:dict:query')") public CommonResult getDictData(@RequestParam("id") Long id) { return success(DictDataConvert.INSTANCE.convert(dictDataService.getDictData(id))); } @GetMapping("/export") - @ApiOperation("导出字典数据") + @Operation(summary = "导出字典数据") @PreAuthorize("@ss.hasPermission('system:dict:export')") @OperateLog(type = EXPORT) public void export(HttpServletResponse response, @Valid DictDataExportReqVO reqVO) throws IOException { @@ -92,4 +92,4 @@ public class DictDataController { ExcelUtils.write(response, "字典数据.xls", "数据列表", DictDataExcelVO.class, data); } -} +} \ No newline at end of file diff --git a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/dict/DictTypeController.java b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/dict/DictTypeController.java index e7c9b8894..de0098c9a 100644 --- a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/dict/DictTypeController.java +++ b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/dict/DictTypeController.java @@ -8,9 +8,9 @@ import cn.iocoder.yudao.module.system.controller.admin.dict.vo.type.*; import cn.iocoder.yudao.module.system.convert.dict.DictTypeConvert; import cn.iocoder.yudao.module.system.dal.dataobject.dict.DictTypeDO; import cn.iocoder.yudao.module.system.service.dict.DictTypeService; -import io.swagger.annotations.Api; -import io.swagger.annotations.ApiImplicitParam; -import io.swagger.annotations.ApiOperation; +import io.swagger.v3.oas.annotations.tags.Tag; +import io.swagger.v3.oas.annotations.Parameter; +import io.swagger.v3.oas.annotations.Operation; import org.springframework.security.access.prepost.PreAuthorize; import org.springframework.validation.annotation.Validated; import org.springframework.web.bind.annotation.*; @@ -24,7 +24,7 @@ import java.util.List; import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success; import static cn.iocoder.yudao.framework.operatelog.core.enums.OperateTypeEnum.EXPORT; -@Api(tags = "管理后台 - 字典类型") +@Tag(name = "管理后台 - 字典类型") @RestController @RequestMapping("/system/dict-type") @Validated @@ -34,7 +34,7 @@ public class DictTypeController { private DictTypeService dictTypeService; @PostMapping("/create") - @ApiOperation("创建字典类型") + @Operation(summary = "创建字典类型") @PreAuthorize("@ss.hasPermission('system:dict:create')") public CommonResult createDictType(@Valid @RequestBody DictTypeCreateReqVO reqVO) { Long dictTypeId = dictTypeService.createDictType(reqVO); @@ -42,7 +42,7 @@ public class DictTypeController { } @PutMapping("/update") - @ApiOperation("修改字典类型") + @Operation(summary = "修改字典类型") @PreAuthorize("@ss.hasPermission('system:dict:update')") public CommonResult updateDictType(@Valid @RequestBody DictTypeUpdateReqVO reqVO) { dictTypeService.updateDictType(reqVO); @@ -50,23 +50,23 @@ public class DictTypeController { } @DeleteMapping("/delete") - @ApiOperation("删除字典类型") - @ApiImplicitParam(name = "id", value = "编号", required = true, example = "1024", dataTypeClass = Long.class) + @Operation(summary = "删除字典类型") + @Parameter(name = "id", description = "编号", required = true, example = "1024") @PreAuthorize("@ss.hasPermission('system:dict:delete')") public CommonResult deleteDictType(Long id) { dictTypeService.deleteDictType(id); return success(true); } - @ApiOperation("/获得字典类型的分页列表") + @Operation(summary = "/获得字典类型的分页列表") @GetMapping("/page") @PreAuthorize("@ss.hasPermission('system:dict:query')") public CommonResult> pageDictTypes(@Valid DictTypePageReqVO reqVO) { return success(DictTypeConvert.INSTANCE.convertPage(dictTypeService.getDictTypePage(reqVO))); } - @ApiOperation("/查询字典类型详细") - @ApiImplicitParam(name = "id", value = "编号", required = true, example = "1024", dataTypeClass = Long.class) + @Operation(summary = "/查询字典类型详细") + @Parameter(name = "id", description = "编号", required = true, example = "1024") @GetMapping(value = "/get") @PreAuthorize("@ss.hasPermission('system:dict:query')") public CommonResult getDictType(@RequestParam("id") Long id) { @@ -74,14 +74,14 @@ public class DictTypeController { } @GetMapping("/list-all-simple") - @ApiOperation(value = "获得全部字典类型列表", notes = "包括开启 + 禁用的字典类型,主要用于前端的下拉选项") + @Operation(summary = "获得全部字典类型列表", description = "包括开启 + 禁用的字典类型,主要用于前端的下拉选项") // 无需添加权限认证,因为前端全局都需要 public CommonResult> listSimpleDictTypes() { List list = dictTypeService.getDictTypeList(); return success(DictTypeConvert.INSTANCE.convertList(list)); } - @ApiOperation("导出数据类型") + @Operation(summary = "导出数据类型") @GetMapping("/export") @PreAuthorize("@ss.hasPermission('system:dict:query')") @OperateLog(type = EXPORT) @@ -92,4 +92,4 @@ public class DictTypeController { ExcelUtils.write(response, "字典类型.xls", "类型列表", DictTypeExcelVO.class, data); } -} +} \ No newline at end of file diff --git a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/dict/vo/data/DictDataBaseVO.java b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/dict/vo/data/DictDataBaseVO.java index 691587a17..7964b3c25 100644 --- a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/dict/vo/data/DictDataBaseVO.java +++ b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/dict/vo/data/DictDataBaseVO.java @@ -2,7 +2,7 @@ package cn.iocoder.yudao.module.system.controller.admin.dict.vo.data; import cn.iocoder.yudao.framework.common.enums.CommonStatusEnum; import cn.iocoder.yudao.framework.common.validation.InEnum; -import io.swagger.annotations.ApiModelProperty; +import io.swagger.v3.oas.annotations.media.Schema; import lombok.Data; import javax.validation.constraints.NotBlank; @@ -16,36 +16,36 @@ import javax.validation.constraints.Size; @Data public class DictDataBaseVO { - @ApiModelProperty(value = "显示顺序不能为空", required = true, example = "1024") + @Schema(description = "显示顺序不能为空", required = true, example = "1024") @NotNull(message = "显示顺序不能为空") private Integer sort; - @ApiModelProperty(value = "字典标签", required = true, example = "芋道") + @Schema(description = "字典标签", required = true, example = "芋道") @NotBlank(message = "字典标签不能为空") @Size(max = 100, message = "字典标签长度不能超过100个字符") private String label; - @ApiModelProperty(value = "字典值", required = true, example = "iocoder") + @Schema(description = "字典值", required = true, example = "iocoder") @NotBlank(message = "字典键值不能为空") @Size(max = 100, message = "字典键值长度不能超过100个字符") private String value; - @ApiModelProperty(value = "字典类型", required = true, example = "sys_common_sex") + @Schema(description = "字典类型", required = true, example = "sys_common_sex") @NotBlank(message = "字典类型不能为空") @Size(max = 100, message = "字典类型长度不能超过100个字符") private String dictType; - @ApiModelProperty(value = "状态", required = true, example = "1", notes = "见 CommonStatusEnum 枚举") + @Schema(description = "状态", required = true, example = "1", notes = "见 CommonStatusEnum 枚举") @NotNull(message = "状态不能为空") // @InEnum(value = CommonStatusEnum.class, message = "修改状态必须是 {value}") private Integer status; - @ApiModelProperty(value = "颜色类型", example = "default", notes = "default、primary、success、info、warning、danger") + @Schema(description = "颜色类型", example = "default", notes = "default、primary、success、info、warning、danger") private String colorType; - @ApiModelProperty(value = "css 样式", example = "btn-visible") + @Schema(description = "css 样式", example = "btn-visible") private String cssClass; - @ApiModelProperty(value = "备注", example = "我是一个角色") + @Schema(description = "备注", example = "我是一个角色") private String remark; -} +} \ No newline at end of file diff --git a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/dict/vo/data/DictDataCreateReqVO.java b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/dict/vo/data/DictDataCreateReqVO.java index 57dc770d0..6f225eba4 100644 --- a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/dict/vo/data/DictDataCreateReqVO.java +++ b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/dict/vo/data/DictDataCreateReqVO.java @@ -1,10 +1,10 @@ package cn.iocoder.yudao.module.system.controller.admin.dict.vo.data; -import io.swagger.annotations.ApiModel; +import io.swagger.v3.oas.annotations.media.Schema; import lombok.Data; import lombok.EqualsAndHashCode; -@ApiModel("管理后台 - 字典数据创建 Request VO") +@Schema(description = "管理后台 - 字典数据创建 Request VO") @Data @EqualsAndHashCode(callSuper = true) public class DictDataCreateReqVO extends DictDataBaseVO { diff --git a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/dict/vo/data/DictDataExportReqVO.java b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/dict/vo/data/DictDataExportReqVO.java index 90290cbdb..48b246c93 100644 --- a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/dict/vo/data/DictDataExportReqVO.java +++ b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/dict/vo/data/DictDataExportReqVO.java @@ -1,24 +1,24 @@ package cn.iocoder.yudao.module.system.controller.admin.dict.vo.data; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; +import io.swagger.v3.oas.annotations.media.Schema; +import io.swagger.v3.oas.annotations.media.Schema; import lombok.Data; import javax.validation.constraints.Size; -@ApiModel("管理后台 - 字典类型导出 Request VO") +@Schema(description = "管理后台 - 字典类型导出 Request VO") @Data public class DictDataExportReqVO { - @ApiModelProperty(value = "字典标签", example = "芋道") + @Schema(description = "字典标签", example = "芋道") @Size(max = 100, message = "字典标签长度不能超过100个字符") private String label; - @ApiModelProperty(value = "字典类型", example = "sys_common_sex", notes = "模糊匹配") + @Schema(description = "字典类型,模糊匹配", example = "sys_common_sex") @Size(max = 100, message = "字典类型类型长度不能超过100个字符") private String dictType; - @ApiModelProperty(value = "展示状态", example = "1", notes = "参见 CommonStatusEnum 枚举类") + @Schema(description = "展示状态,参见 CommonStatusEnum 枚举类", example = "1") private Integer status; -} +} \ No newline at end of file diff --git a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/dict/vo/data/DictDataPageReqVO.java b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/dict/vo/data/DictDataPageReqVO.java index 9df4605df..ab8ca9202 100644 --- a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/dict/vo/data/DictDataPageReqVO.java +++ b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/dict/vo/data/DictDataPageReqVO.java @@ -1,27 +1,27 @@ package cn.iocoder.yudao.module.system.controller.admin.dict.vo.data; import cn.iocoder.yudao.framework.common.pojo.PageParam; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; +import io.swagger.v3.oas.annotations.media.Schema; +import io.swagger.v3.oas.annotations.media.Schema; import lombok.Data; import lombok.EqualsAndHashCode; import javax.validation.constraints.Size; -@ApiModel("管理后台 - 字典类型分页列表 Request VO") +@Schema(description = "管理后台 - 字典类型分页列表 Request VO") @Data @EqualsAndHashCode(callSuper = true) public class DictDataPageReqVO extends PageParam { - @ApiModelProperty(value = "字典标签", example = "芋道") + @Schema(description = "字典标签", example = "芋道") @Size(max = 100, message = "字典标签长度不能超过100个字符") private String label; - @ApiModelProperty(value = "字典类型", example = "sys_common_sex", notes = "模糊匹配") + @Schema(description = "字典类型,模糊匹配", example = "sys_common_sex") @Size(max = 100, message = "字典类型类型长度不能超过100个字符") private String dictType; - @ApiModelProperty(value = "展示状态", example = "1", notes = "参见 CommonStatusEnum 枚举类") + @Schema(description = "展示状态,参见 CommonStatusEnum 枚举类", example = "1") private Integer status; -} +} \ No newline at end of file diff --git a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/dict/vo/data/DictDataRespVO.java b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/dict/vo/data/DictDataRespVO.java index 3cf1177d1..fe10520ed 100644 --- a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/dict/vo/data/DictDataRespVO.java +++ b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/dict/vo/data/DictDataRespVO.java @@ -1,7 +1,7 @@ package cn.iocoder.yudao.module.system.controller.admin.dict.vo.data; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; +import io.swagger.v3.oas.annotations.media.Schema; +import io.swagger.v3.oas.annotations.media.Schema; import lombok.AllArgsConstructor; import lombok.Data; import lombok.EqualsAndHashCode; @@ -9,17 +9,17 @@ import lombok.NoArgsConstructor; import java.time.LocalDateTime; -@ApiModel("管理后台 - 字典数据信息 Response VO") +@Schema(description = "管理后台 - 字典数据信息 Response VO") @Data @NoArgsConstructor @AllArgsConstructor @EqualsAndHashCode(callSuper = true) public class DictDataRespVO extends DictDataBaseVO { - @ApiModelProperty(value = "字典数据编号", required = true, example = "1024") + @Schema(description = "字典数据编号", required = true, example = "1024") private Long id; - @ApiModelProperty(value = "创建时间", required = true, example = "时间戳格式") + @Schema(description = "创建时间", required = true, example = "时间戳格式") private LocalDateTime createTime; -} +} \ No newline at end of file diff --git a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/dict/vo/data/DictDataSimpleRespVO.java b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/dict/vo/data/DictDataSimpleRespVO.java index 4ea0c5f9b..78fc3b66b 100644 --- a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/dict/vo/data/DictDataSimpleRespVO.java +++ b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/dict/vo/data/DictDataSimpleRespVO.java @@ -1,25 +1,25 @@ package cn.iocoder.yudao.module.system.controller.admin.dict.vo.data; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; +import io.swagger.v3.oas.annotations.media.Schema; +import io.swagger.v3.oas.annotations.media.Schema; import lombok.Data; -@ApiModel("管理后台 - 数据字典精简 Response VO") +@Schema(description = "管理后台 - 数据字典精简 Response VO") @Data public class DictDataSimpleRespVO { - @ApiModelProperty(value = "字典类型", required = true, example = "gender") + @Schema(description = "字典类型", required = true, example = "gender") private String dictType; - @ApiModelProperty(value = "字典键值", required = true, example = "1") + @Schema(description = "字典键值", required = true, example = "1") private String value; - @ApiModelProperty(value = "字典标签", required = true, example = "男") + @Schema(description = "字典标签", required = true, example = "男") private String label; - @ApiModelProperty(value = "颜色类型", example = "default", notes = "default、primary、success、info、warning、danger") + @Schema(description = "颜色类型,default、primary、success、info、warning、danger", example = "default" ) private String colorType; - @ApiModelProperty(value = "css 样式", example = "btn-visible") + @Schema(description = "css 样式", example = "btn-visible") private String cssClass; -} +} \ No newline at end of file diff --git a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/dict/vo/data/DictDataUpdateReqVO.java b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/dict/vo/data/DictDataUpdateReqVO.java index f6f9b81a2..b6e1c8d12 100644 --- a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/dict/vo/data/DictDataUpdateReqVO.java +++ b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/dict/vo/data/DictDataUpdateReqVO.java @@ -1,19 +1,19 @@ package cn.iocoder.yudao.module.system.controller.admin.dict.vo.data; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; +import io.swagger.v3.oas.annotations.media.Schema; +import io.swagger.v3.oas.annotations.media.Schema; import lombok.Data; import lombok.EqualsAndHashCode; import javax.validation.constraints.NotNull; -@ApiModel("管理后台 - 字典数据更新 Request VO") +@Schema(description = "管理后台 - 字典数据更新 Request VO") @Data @EqualsAndHashCode(callSuper = true) public class DictDataUpdateReqVO extends DictDataBaseVO { - @ApiModelProperty(value = "字典数据编号", required = true, example = "1024") + @Schema(description = "字典数据编号", required = true, example = "1024") @NotNull(message = "字典数据编号不能为空") private Long id; -} +} \ No newline at end of file diff --git a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/dict/vo/type/DictTypeBaseVO.java b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/dict/vo/type/DictTypeBaseVO.java index 4da6da0b3..92fd7e5d7 100644 --- a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/dict/vo/type/DictTypeBaseVO.java +++ b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/dict/vo/type/DictTypeBaseVO.java @@ -1,6 +1,6 @@ package cn.iocoder.yudao.module.system.controller.admin.dict.vo.type; -import io.swagger.annotations.ApiModelProperty; +import io.swagger.v3.oas.annotations.media.Schema; import lombok.Data; import javax.validation.constraints.NotBlank; @@ -14,16 +14,16 @@ import javax.validation.constraints.Size; @Data public class DictTypeBaseVO { - @ApiModelProperty(value = "字典名称", required = true, example = "性别") + @Schema(description = "字典名称", required = true, example = "性别") @NotBlank(message = "字典名称不能为空") @Size(max = 100, message = "字典类型名称长度不能超过100个字符") private String name; - @ApiModelProperty(value = "状态", required = true, example = "1", notes = "参见 CommonStatusEnum 枚举类") + @Schema(description = "状态", required = true, example = "1", notes = "参见 CommonStatusEnum 枚举类") @NotNull(message = "状态不能为空") private Integer status; - @ApiModelProperty(value = "备注", example = "快乐的备注") + @Schema(description = "备注", example = "快乐的备注") private String remark; -} +} \ No newline at end of file diff --git a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/dict/vo/type/DictTypeCreateReqVO.java b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/dict/vo/type/DictTypeCreateReqVO.java index ee2f45ae1..c90ae9ff7 100644 --- a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/dict/vo/type/DictTypeCreateReqVO.java +++ b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/dict/vo/type/DictTypeCreateReqVO.java @@ -1,21 +1,21 @@ package cn.iocoder.yudao.module.system.controller.admin.dict.vo.type; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; +import io.swagger.v3.oas.annotations.media.Schema; +import io.swagger.v3.oas.annotations.media.Schema; import lombok.Data; import lombok.EqualsAndHashCode; import javax.validation.constraints.NotNull; import javax.validation.constraints.Size; -@ApiModel("管理后台 - 字典类型创建 Request VO") +@Schema(description = "管理后台 - 字典类型创建 Request VO") @Data @EqualsAndHashCode(callSuper = true) public class DictTypeCreateReqVO extends DictTypeBaseVO { - @ApiModelProperty(value = "字典类型", required = true, example = "sys_common_sex") + @Schema(description = "字典类型", required = true, example = "sys_common_sex") @NotNull(message = "字典类型不能为空") @Size(max = 100, message = "字典类型类型长度不能超过100个字符") private String type; -} +} \ No newline at end of file diff --git a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/dict/vo/type/DictTypeExportReqVO.java b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/dict/vo/type/DictTypeExportReqVO.java index 4a54fb3fc..10e3f436e 100644 --- a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/dict/vo/type/DictTypeExportReqVO.java +++ b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/dict/vo/type/DictTypeExportReqVO.java @@ -1,7 +1,7 @@ package cn.iocoder.yudao.module.system.controller.admin.dict.vo.type; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; +import io.swagger.v3.oas.annotations.media.Schema; +import io.swagger.v3.oas.annotations.media.Schema; import lombok.Data; import org.springframework.format.annotation.DateTimeFormat; @@ -9,21 +9,21 @@ import java.time.LocalDateTime; import static cn.iocoder.yudao.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND; -@ApiModel("管理后台 - 字典类型分页列表 Request VO") +@Schema(description = "管理后台 - 字典类型分页列表 Request VO") @Data public class DictTypeExportReqVO { - @ApiModelProperty(value = "字典类型名称", example = "芋道", notes = "模糊匹配") + @Schema(description = "字典类型名称", example = "芋道", notes = "模糊匹配") private String name; - @ApiModelProperty(value = "字典类型", example = "sys_common_sex", notes = "模糊匹配") + @Schema(description = "字典类型", example = "sys_common_sex", notes = "模糊匹配") private String type; - @ApiModelProperty(value = "展示状态", example = "1", notes = "参见 CommonStatusEnum 枚举类") + @Schema(description = "展示状态", example = "1", notes = "参见 CommonStatusEnum 枚举类") private Integer status; @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND) - @ApiModelProperty(value = "创建时间") + @Schema(description = "创建时间") private LocalDateTime[] createTime; -} +} \ No newline at end of file diff --git a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/dict/vo/type/DictTypePageReqVO.java b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/dict/vo/type/DictTypePageReqVO.java index f32886196..06165b792 100644 --- a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/dict/vo/type/DictTypePageReqVO.java +++ b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/dict/vo/type/DictTypePageReqVO.java @@ -1,8 +1,8 @@ package cn.iocoder.yudao.module.system.controller.admin.dict.vo.type; import cn.iocoder.yudao.framework.common.pojo.PageParam; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; +import io.swagger.v3.oas.annotations.media.Schema; +import io.swagger.v3.oas.annotations.media.Schema; import lombok.Data; import lombok.EqualsAndHashCode; import org.springframework.format.annotation.DateTimeFormat; @@ -12,23 +12,23 @@ import java.time.LocalDateTime; import static cn.iocoder.yudao.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND; -@ApiModel("管理后台 - 字典类型分页列表 Request VO") +@Schema(description = "管理后台 - 字典类型分页列表 Request VO") @Data @EqualsAndHashCode(callSuper = true) public class DictTypePageReqVO extends PageParam { - @ApiModelProperty(value = "字典类型名称", example = "芋道", notes = "模糊匹配") + @Schema(description = "字典类型名称", example = "芋道", notes = "模糊匹配") private String name; - @ApiModelProperty(value = "字典类型", example = "sys_common_sex", notes = "模糊匹配") + @Schema(description = "字典类型", example = "sys_common_sex", notes = "模糊匹配") @Size(max = 100, message = "字典类型类型长度不能超过100个字符") private String type; - @ApiModelProperty(value = "展示状态", example = "1", notes = "参见 CommonStatusEnum 枚举类") + @Schema(description = "展示状态", example = "1", notes = "参见 CommonStatusEnum 枚举类") private Integer status; @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND) - @ApiModelProperty(value = "创建时间") + @Schema(description = "创建时间") private LocalDateTime[] createTime; -} +} \ No newline at end of file diff --git a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/dict/vo/type/DictTypeRespVO.java b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/dict/vo/type/DictTypeRespVO.java index c508df6af..8eacc79d3 100644 --- a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/dict/vo/type/DictTypeRespVO.java +++ b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/dict/vo/type/DictTypeRespVO.java @@ -1,7 +1,7 @@ package cn.iocoder.yudao.module.system.controller.admin.dict.vo.type; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; +import io.swagger.v3.oas.annotations.media.Schema; +import io.swagger.v3.oas.annotations.media.Schema; import lombok.AllArgsConstructor; import lombok.Data; import lombok.EqualsAndHashCode; @@ -9,20 +9,20 @@ import lombok.NoArgsConstructor; import java.time.LocalDateTime; -@ApiModel("管理后台 - 字典类型信息 Response VO") +@Schema(description = "管理后台 - 字典类型信息 Response VO") @Data @NoArgsConstructor @AllArgsConstructor @EqualsAndHashCode(callSuper = true) public class DictTypeRespVO extends DictTypeBaseVO { - @ApiModelProperty(value = "字典类型编号", required = true, example = "1024") + @Schema(description = "字典类型编号", required = true, example = "1024") private Long id; - @ApiModelProperty(value = "字典类型", required = true, example = "sys_common_sex") + @Schema(description = "字典类型", required = true, example = "sys_common_sex") private String type; - @ApiModelProperty(value = "创建时间", required = true, example = "时间戳格式") + @Schema(description = "创建时间", required = true, example = "时间戳格式") private LocalDateTime createTime; -} +} \ No newline at end of file diff --git a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/dict/vo/type/DictTypeSimpleRespVO.java b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/dict/vo/type/DictTypeSimpleRespVO.java index 8cca026a9..d848814ac 100644 --- a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/dict/vo/type/DictTypeSimpleRespVO.java +++ b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/dict/vo/type/DictTypeSimpleRespVO.java @@ -1,24 +1,24 @@ package cn.iocoder.yudao.module.system.controller.admin.dict.vo.type; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; +import io.swagger.v3.oas.annotations.media.Schema; +import io.swagger.v3.oas.annotations.media.Schema; import lombok.AllArgsConstructor; import lombok.Data; import lombok.NoArgsConstructor; -@ApiModel("管理后台 - 字典类型精简信息 Response VO") +@Schema(description = "管理后台 - 字典类型精简信息 Response VO") @Data @NoArgsConstructor @AllArgsConstructor public class DictTypeSimpleRespVO { - @ApiModelProperty(value = "字典类型编号", required = true, example = "1024") + @Schema(description = "字典类型编号", required = true, example = "1024") private Long id; - @ApiModelProperty(value = "字典类型名称", required = true, example = "芋道") + @Schema(description = "字典类型名称", required = true, example = "芋道") private String name; - @ApiModelProperty(value = "字典类型", required = true, example = "sys_common_sex") + @Schema(description = "字典类型", required = true, example = "sys_common_sex") private String type; -} +} \ No newline at end of file diff --git a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/dict/vo/type/DictTypeUpdateReqVO.java b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/dict/vo/type/DictTypeUpdateReqVO.java index 00955f4fe..4c78ce212 100644 --- a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/dict/vo/type/DictTypeUpdateReqVO.java +++ b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/dict/vo/type/DictTypeUpdateReqVO.java @@ -1,19 +1,19 @@ package cn.iocoder.yudao.module.system.controller.admin.dict.vo.type; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; +import io.swagger.v3.oas.annotations.media.Schema; +import io.swagger.v3.oas.annotations.media.Schema; import lombok.Data; import lombok.EqualsAndHashCode; import javax.validation.constraints.NotNull; -@ApiModel("管理后台 - 字典类型更新 Request VO") +@Schema(description = "管理后台 - 字典类型更新 Request VO") @Data @EqualsAndHashCode(callSuper = true) public class DictTypeUpdateReqVO extends DictTypeBaseVO { - @ApiModelProperty(value = "字典类型编号", required = true, example = "1024") + @Schema(description = "字典类型编号", required = true, example = "1024") @NotNull(message = "字典类型编号不能为空") private Long id; -} +} \ No newline at end of file diff --git a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/errorcode/ErrorCodeController.java b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/errorcode/ErrorCodeController.java index e3161b8aa..6fa19cfdb 100644 --- a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/errorcode/ErrorCodeController.java +++ b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/errorcode/ErrorCodeController.java @@ -8,9 +8,9 @@ import cn.iocoder.yudao.module.system.convert.errorcode.ErrorCodeConvert; import cn.iocoder.yudao.module.system.controller.admin.errorcode.vo.*; import cn.iocoder.yudao.module.system.dal.dataobject.errorcode.ErrorCodeDO; import cn.iocoder.yudao.module.system.service.errorcode.ErrorCodeService; -import io.swagger.annotations.Api; -import io.swagger.annotations.ApiImplicitParam; -import io.swagger.annotations.ApiOperation; +import io.swagger.v3.oas.annotations.tags.Tag; +import io.swagger.v3.oas.annotations.Parameter; +import io.swagger.v3.oas.annotations.Operation; import org.springframework.security.access.prepost.PreAuthorize; import org.springframework.validation.annotation.Validated; import org.springframework.web.bind.annotation.*; @@ -24,7 +24,7 @@ import java.util.List; import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success; import static cn.iocoder.yudao.framework.operatelog.core.enums.OperateTypeEnum.EXPORT; -@Api(tags = "管理后台 - 错误码") +@Tag(name = "管理后台 - 错误码") @RestController @RequestMapping("/system/error-code") @Validated @@ -34,14 +34,14 @@ public class ErrorCodeController { private ErrorCodeService errorCodeService; @PostMapping("/create") - @ApiOperation("创建错误码") + @Operation(summary = "创建错误码") @PreAuthorize("@ss.hasPermission('system:error-code:create')") public CommonResult createErrorCode(@Valid @RequestBody ErrorCodeCreateReqVO createReqVO) { return success(errorCodeService.createErrorCode(createReqVO)); } @PutMapping("/update") - @ApiOperation("更新错误码") + @Operation(summary = "更新错误码") @PreAuthorize("@ss.hasPermission('system:error-code:update')") public CommonResult updateErrorCode(@Valid @RequestBody ErrorCodeUpdateReqVO updateReqVO) { errorCodeService.updateErrorCode(updateReqVO); @@ -49,8 +49,8 @@ public class ErrorCodeController { } @DeleteMapping("/delete") - @ApiOperation("删除错误码") - @ApiImplicitParam(name = "id", value = "编号", required = true, dataTypeClass = Long.class) + @Operation(summary = "删除错误码") + @Parameter(name = "id", description = "编号", required = true) @PreAuthorize("@ss.hasPermission('system:error-code:delete')") public CommonResult deleteErrorCode(@RequestParam("id") Long id) { errorCodeService.deleteErrorCode(id); @@ -58,8 +58,8 @@ public class ErrorCodeController { } @GetMapping("/get") - @ApiOperation("获得错误码") - @ApiImplicitParam(name = "id", value = "编号", required = true, example = "1024", dataTypeClass = Long.class) + @Operation(summary = "获得错误码") + @Parameter(name = "id", description = "编号", required = true, example = "1024") @PreAuthorize("@ss.hasPermission('system:error-code:query')") public CommonResult getErrorCode(@RequestParam("id") Long id) { ErrorCodeDO errorCode = errorCodeService.getErrorCode(id); @@ -67,7 +67,7 @@ public class ErrorCodeController { } @GetMapping("/page") - @ApiOperation("获得错误码分页") + @Operation(summary = "获得错误码分页") @PreAuthorize("@ss.hasPermission('system:error-code:query')") public CommonResult> getErrorCodePage(@Valid ErrorCodePageReqVO pageVO) { PageResult pageResult = errorCodeService.getErrorCodePage(pageVO); @@ -75,7 +75,7 @@ public class ErrorCodeController { } @GetMapping("/export-excel") - @ApiOperation("导出错误码 Excel") + @Operation(summary = "导出错误码 Excel") @PreAuthorize("@ss.hasPermission('system:error-code:export')") @OperateLog(type = EXPORT) public void exportErrorCodeExcel(@Valid ErrorCodeExportReqVO exportReqVO, @@ -86,4 +86,4 @@ public class ErrorCodeController { ExcelUtils.write(response, "错误码.xls", "数据", ErrorCodeExcelVO.class, datas); } -} +} \ No newline at end of file diff --git a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/errorcode/vo/ErrorCodeBaseVO.java b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/errorcode/vo/ErrorCodeBaseVO.java index 150401aa3..c6aa04eb5 100644 --- a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/errorcode/vo/ErrorCodeBaseVO.java +++ b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/errorcode/vo/ErrorCodeBaseVO.java @@ -1,6 +1,6 @@ package cn.iocoder.yudao.module.system.controller.admin.errorcode.vo; -import io.swagger.annotations.ApiModelProperty; +import io.swagger.v3.oas.annotations.media.Schema; import lombok.Data; import javax.validation.constraints.NotNull; @@ -12,19 +12,19 @@ import javax.validation.constraints.NotNull; @Data public class ErrorCodeBaseVO { - @ApiModelProperty(value = "应用名", required = true, example = "dashboard") + @Schema(description = "应用名", required = true, example = "dashboard") @NotNull(message = "应用名不能为空") private String applicationName; - @ApiModelProperty(value = "错误码编码", required = true, example = "1234") + @Schema(description = "错误码编码", required = true, example = "1234") @NotNull(message = "错误码编码不能为空") private Integer code; - @ApiModelProperty(value = "错误码错误提示", required = true, example = "帅气") + @Schema(description = "错误码错误提示", required = true, example = "帅气") @NotNull(message = "错误码错误提示不能为空") private String message; - @ApiModelProperty(value = "备注", example = "哈哈哈") + @Schema(description = "备注", example = "哈哈哈") private String memo; -} +} \ No newline at end of file diff --git a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/errorcode/vo/ErrorCodeCreateReqVO.java b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/errorcode/vo/ErrorCodeCreateReqVO.java index a0f36af1a..7d5720a38 100644 --- a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/errorcode/vo/ErrorCodeCreateReqVO.java +++ b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/errorcode/vo/ErrorCodeCreateReqVO.java @@ -1,11 +1,12 @@ package cn.iocoder.yudao.module.system.controller.admin.errorcode.vo; -import io.swagger.annotations.ApiModel; + +import io.swagger.v3.oas.annotations.media.Schema; import lombok.Data; import lombok.EqualsAndHashCode; import lombok.ToString; -@ApiModel("管理后台 - 错误码创建 Request VO") +@Schema(description = "管理后台 - 错误码创建 Request VO") @Data @EqualsAndHashCode(callSuper = true) @ToString(callSuper = true) diff --git a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/errorcode/vo/ErrorCodeExportReqVO.java b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/errorcode/vo/ErrorCodeExportReqVO.java index e44858160..1bb446119 100644 --- a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/errorcode/vo/ErrorCodeExportReqVO.java +++ b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/errorcode/vo/ErrorCodeExportReqVO.java @@ -1,7 +1,7 @@ package cn.iocoder.yudao.module.system.controller.admin.errorcode.vo; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; +import io.swagger.v3.oas.annotations.media.Schema; +import io.swagger.v3.oas.annotations.media.Schema; import lombok.Data; import org.springframework.format.annotation.DateTimeFormat; @@ -9,24 +9,24 @@ import java.time.LocalDateTime; import static cn.iocoder.yudao.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND; -@ApiModel(value = "管理后台 - 错误码 Excel 导出 Request VO", description = "参数和 InfErrorCodePageReqVO 是一致的") +@Schema(description = "管理后台 - 错误码 Excel 导出 Request VO,参数和 InfErrorCodePageReqVO 是一致的") @Data public class ErrorCodeExportReqVO { - @ApiModelProperty(value = "错误码类型", example = "1") + @Schema(description = "错误码类型", example = "1") private Integer type; - @ApiModelProperty(value = "应用名", example = "dashboard") + @Schema(description = "应用名", example = "dashboard") private String applicationName; - @ApiModelProperty(value = "错误码编码", example = "1234") + @Schema(description = "错误码编码", example = "1234") private Integer code; - @ApiModelProperty(value = "错误码错误提示", example = "帅气") + @Schema(description = "错误码错误提示", example = "帅气") private String message; @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND) - @ApiModelProperty(value = "创建时间") + @Schema(description = "创建时间") private LocalDateTime[] createTime; -} +} \ No newline at end of file diff --git a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/errorcode/vo/ErrorCodePageReqVO.java b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/errorcode/vo/ErrorCodePageReqVO.java index 8c719006c..a456693e4 100644 --- a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/errorcode/vo/ErrorCodePageReqVO.java +++ b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/errorcode/vo/ErrorCodePageReqVO.java @@ -1,8 +1,8 @@ package cn.iocoder.yudao.module.system.controller.admin.errorcode.vo; import cn.iocoder.yudao.framework.common.pojo.PageParam; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; +import io.swagger.v3.oas.annotations.media.Schema; +import io.swagger.v3.oas.annotations.media.Schema; import lombok.Data; import lombok.EqualsAndHashCode; import lombok.ToString; @@ -12,26 +12,26 @@ import java.time.LocalDateTime; import static cn.iocoder.yudao.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND; -@ApiModel("管理后台 - 错误码分页 Request VO") +@Schema(description = "管理后台 - 错误码分页 Request VO") @Data @EqualsAndHashCode(callSuper = true) @ToString(callSuper = true) public class ErrorCodePageReqVO extends PageParam { - @ApiModelProperty(value = "错误码类型", example = "1", notes = "参见 ErrorCodeTypeEnum 枚举类") + @Schema(description = "错误码类型,参见 ErrorCodeTypeEnum 枚举类", example = "1") private Integer type; - @ApiModelProperty(value = "应用名", example = "dashboard") + @Schema(description = "应用名", example = "dashboard") private String applicationName; - @ApiModelProperty(value = "错误码编码", example = "1234") + @Schema(description = "错误码编码", example = "1234") private Integer code; - @ApiModelProperty(value = "错误码错误提示", example = "帅气") + @Schema(description = "错误码错误提示", example = "帅气") private String message; @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND) - @ApiModelProperty(value = "创建时间") + @Schema(description = "创建时间") private LocalDateTime[] createTime; -} +} \ No newline at end of file diff --git a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/errorcode/vo/ErrorCodeRespVO.java b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/errorcode/vo/ErrorCodeRespVO.java index 47276517c..ca7d54e44 100644 --- a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/errorcode/vo/ErrorCodeRespVO.java +++ b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/errorcode/vo/ErrorCodeRespVO.java @@ -1,26 +1,26 @@ package cn.iocoder.yudao.module.system.controller.admin.errorcode.vo; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; +import io.swagger.v3.oas.annotations.media.Schema; +import io.swagger.v3.oas.annotations.media.Schema; import lombok.Data; import lombok.EqualsAndHashCode; import lombok.ToString; import java.time.LocalDateTime; -@ApiModel("管理后台 - 错误码 Response VO") +@Schema(description = "管理后台 - 错误码 Response VO") @Data @EqualsAndHashCode(callSuper = true) @ToString(callSuper = true) public class ErrorCodeRespVO extends ErrorCodeBaseVO { - @ApiModelProperty(value = "错误码编号", required = true, example = "1024") + @Schema(description = "错误码编号", required = true, example = "1024") private Long id; - @ApiModelProperty(value = "错误码类型", required = true, example = "1", notes = "参见 ErrorCodeTypeEnum 枚举类") + @Schema(description = "错误码类型,参见 ErrorCodeTypeEnum 枚举类", required = true, example = "1") private Integer type; - @ApiModelProperty(value = "创建时间", required = true) + @Schema(description = "创建时间", required = true) private LocalDateTime createTime; -} +} \ No newline at end of file diff --git a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/errorcode/vo/ErrorCodeUpdateReqVO.java b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/errorcode/vo/ErrorCodeUpdateReqVO.java index ff16c0283..5c24ef53f 100644 --- a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/errorcode/vo/ErrorCodeUpdateReqVO.java +++ b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/errorcode/vo/ErrorCodeUpdateReqVO.java @@ -1,21 +1,21 @@ package cn.iocoder.yudao.module.system.controller.admin.errorcode.vo; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; +import io.swagger.v3.oas.annotations.media.Schema; +import io.swagger.v3.oas.annotations.media.Schema; import lombok.Data; import lombok.EqualsAndHashCode; import lombok.ToString; import javax.validation.constraints.NotNull; -@ApiModel("管理后台 - 错误码更新 Request VO") +@Schema(description = "管理后台 - 错误码更新 Request VO") @Data @EqualsAndHashCode(callSuper = true) @ToString(callSuper = true) public class ErrorCodeUpdateReqVO extends ErrorCodeBaseVO { - @ApiModelProperty(value = "错误码编号", required = true, example = "1024") + @Schema(description = "错误码编号", required = true, example = "1024") @NotNull(message = "错误码编号不能为空") private Long id; -} +} \ No newline at end of file diff --git a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/ip/AreaController.java b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/ip/AreaController.java index a7e4d3e03..25b7cfba2 100644 --- a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/ip/AreaController.java +++ b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/ip/AreaController.java @@ -7,9 +7,9 @@ import cn.iocoder.yudao.framework.ip.core.utils.AreaUtils; import cn.iocoder.yudao.framework.ip.core.utils.IPUtils; import cn.iocoder.yudao.module.system.controller.admin.ip.vo.AreaNodeRespVO; import cn.iocoder.yudao.module.system.convert.ip.AreaConvert; -import io.swagger.annotations.Api; -import io.swagger.annotations.ApiImplicitParam; -import io.swagger.annotations.ApiOperation; +import io.swagger.v3.oas.annotations.tags.Tag; +import io.swagger.v3.oas.annotations.Parameter; +import io.swagger.v3.oas.annotations.Operation; import org.springframework.validation.annotation.Validated; import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.RequestMapping; @@ -20,14 +20,14 @@ import java.util.List; import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success; -@Api(tags = "管理后台 - 地区") +@Tag(name = "管理后台 - 地区") @RestController @RequestMapping("/system/area") @Validated public class AreaController { @GetMapping("/tree") - @ApiOperation("获得地区树") + @Operation(summary = "获得地区树") public CommonResult> getAreaTree() { Area area = AreaUtils.getArea(Area.ID_CHINA); Assert.notNull(area, "获取不到中国"); @@ -35,8 +35,8 @@ public class AreaController { } @GetMapping("/get-by-ip") - @ApiOperation("获得 IP 对应的地区名") - @ApiImplicitParam(name = "ip", value = "IP", required = true, dataTypeClass = String.class) + @Operation(summary = "获得 IP 对应的地区名") + @Parameter(name = "ip", description = "IP", required = true) public CommonResult getAreaByIp(@RequestParam("ip") String ip) { // 获得城市 Area area = IPUtils.getArea(ip); @@ -47,4 +47,4 @@ public class AreaController { return success(AreaUtils.format(area.getId())); } -} +} \ No newline at end of file diff --git a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/ip/vo/AreaNodeRespVO.java b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/ip/vo/AreaNodeRespVO.java index a2416832d..f99150c02 100644 --- a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/ip/vo/AreaNodeRespVO.java +++ b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/ip/vo/AreaNodeRespVO.java @@ -1,19 +1,19 @@ package cn.iocoder.yudao.module.system.controller.admin.ip.vo; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; +import io.swagger.v3.oas.annotations.media.Schema; +import io.swagger.v3.oas.annotations.media.Schema; import lombok.Data; import java.util.List; -@ApiModel("管理后台 - 地区节点 Response VO") +@Schema(description = "管理后台 - 地区节点 Response VO") @Data public class AreaNodeRespVO { - @ApiModelProperty(value = "编号", required = true, example = "110000") + @Schema(description = "编号", required = true, example = "110000") private Integer id; - @ApiModelProperty(value = "名字", required = true, example = "北京") + @Schema(description = "名字", required = true, example = "北京") private String name; /** @@ -21,4 +21,4 @@ public class AreaNodeRespVO { */ private List children; -} +} \ No newline at end of file diff --git a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/logger/LoginLogController.java b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/logger/LoginLogController.java index 7cb3ac4b7..33099e4de 100644 --- a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/logger/LoginLogController.java +++ b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/logger/LoginLogController.java @@ -11,8 +11,8 @@ import cn.iocoder.yudao.module.system.controller.admin.logger.vo.loginlog.LoginL import cn.iocoder.yudao.module.system.controller.admin.logger.vo.loginlog.LoginLogRespVO; import cn.iocoder.yudao.module.system.convert.logger.LoginLogConvert; import cn.iocoder.yudao.module.system.service.logger.LoginLogService; -import io.swagger.annotations.Api; -import io.swagger.annotations.ApiOperation; +import io.swagger.v3.oas.annotations.tags.Tag; +import io.swagger.v3.oas.annotations.Operation; import org.springframework.security.access.prepost.PreAuthorize; import org.springframework.validation.annotation.Validated; import org.springframework.web.bind.annotation.GetMapping; @@ -27,7 +27,7 @@ import java.util.List; import static cn.iocoder.yudao.framework.operatelog.core.enums.OperateTypeEnum.EXPORT; -@Api(tags = "管理后台 - 登录日志") +@Tag(name = "管理后台 - 登录日志") @RestController @RequestMapping("/system/login-log") @Validated @@ -37,7 +37,7 @@ public class LoginLogController { private LoginLogService loginLogService; @GetMapping("/page") - @ApiOperation("获得登录日志分页列表") + @Operation(summary = "获得登录日志分页列表") @PreAuthorize("@ss.hasPermission('system:login-log:query')") public CommonResult> getLoginLogPage(@Valid LoginLogPageReqVO reqVO) { PageResult page = loginLogService.getLoginLogPage(reqVO); @@ -45,7 +45,7 @@ public class LoginLogController { } @GetMapping("/export") - @ApiOperation("导出登录日志 Excel") + @Operation(summary = "导出登录日志 Excel") @PreAuthorize("@ss.hasPermission('system:login-log:export')") @OperateLog(type = EXPORT) public void exportLoginLog(HttpServletResponse response, @Valid LoginLogExportReqVO reqVO) throws IOException { @@ -56,4 +56,4 @@ public class LoginLogController { ExcelUtils.write(response, "登录日志.xls", "数据列表", LoginLogExcelVO.class, data); } -} +} \ No newline at end of file diff --git a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/logger/OperateLogController.java b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/logger/OperateLogController.java index ca3551e64..05b879c38 100644 --- a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/logger/OperateLogController.java +++ b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/logger/OperateLogController.java @@ -15,8 +15,8 @@ import cn.iocoder.yudao.framework.common.util.collection.MapUtils; import cn.iocoder.yudao.framework.excel.core.util.ExcelUtils; import cn.iocoder.yudao.framework.operatelog.core.annotations.OperateLog; import cn.iocoder.yudao.module.system.service.user.AdminUserService; -import io.swagger.annotations.Api; -import io.swagger.annotations.ApiOperation; +import io.swagger.v3.oas.annotations.tags.Tag; +import io.swagger.v3.oas.annotations.Operation; import org.springframework.security.access.prepost.PreAuthorize; import org.springframework.validation.annotation.Validated; import org.springframework.web.bind.annotation.GetMapping; @@ -35,7 +35,7 @@ import java.util.Map; import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success; import static cn.iocoder.yudao.framework.operatelog.core.enums.OperateTypeEnum.EXPORT; -@Api(tags = "管理后台 - 操作日志") +@Tag(name = "管理后台 - 操作日志") @RestController @RequestMapping("/system/operate-log") @Validated @@ -47,7 +47,7 @@ public class OperateLogController { private AdminUserService userService; @GetMapping("/page") - @ApiOperation("查看操作日志分页列表") + @Operation(summary = "查看操作日志分页列表") @PreAuthorize("@ss.hasPermission('system:operate-log:query')") public CommonResult> pageOperateLog(@Valid OperateLogPageReqVO reqVO) { PageResult pageResult = operateLogService.getOperateLogPage(reqVO); @@ -66,7 +66,7 @@ public class OperateLogController { return success(new PageResult<>(list, pageResult.getTotal())); } - @ApiOperation("导出操作日志") + @Operation(summary = "导出操作日志") @GetMapping("/export") @PreAuthorize("@ss.hasPermission('system:operate-log:export')") @OperateLog(type = EXPORT) @@ -82,4 +82,4 @@ public class OperateLogController { ExcelUtils.write(response, "操作日志.xls", "数据列表", OperateLogExcelVO.class, excelDataList); } -} +} \ No newline at end of file diff --git a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/logger/vo/loginlog/LoginLogBaseVO.java b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/logger/vo/loginlog/LoginLogBaseVO.java index 4b5cc22bf..87e9deb02 100644 --- a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/logger/vo/loginlog/LoginLogBaseVO.java +++ b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/logger/vo/loginlog/LoginLogBaseVO.java @@ -1,6 +1,6 @@ package cn.iocoder.yudao.module.system.controller.admin.logger.vo.loginlog; -import io.swagger.annotations.ApiModelProperty; +import io.swagger.v3.oas.annotations.media.Schema; import lombok.Data; import javax.validation.constraints.NotBlank; @@ -15,28 +15,28 @@ import javax.validation.constraints.Size; @Data public class LoginLogBaseVO { - @ApiModelProperty(value = "日志类型", required = true, example = "1", notes = "参见 LoginLogTypeEnum 枚举类") + @Schema(description = "日志类型,参见 LoginLogTypeEnum 枚举类", required = true, example = "1" ) @NotNull(message = "日志类型不能为空") private Integer logType; - @ApiModelProperty(value = "链路追踪编号", example = "89aca178-a370-411c-ae02-3f0d672be4ab") + @Schema(description = "链路追踪编号", example = "89aca178-a370-411c-ae02-3f0d672be4ab") @NotEmpty(message = "链路追踪编号不能为空") private String traceId; - @ApiModelProperty(value = "用户账号", required = true, example = "yudao") + @Schema(description = "用户账号", required = true, example = "yudao") @NotBlank(message = "用户账号不能为空") @Size(max = 30, message = "用户账号长度不能超过30个字符") private String username; - @ApiModelProperty(value = "登录结果", required = true, example = "1", notes = "参见 LoginResultEnum 枚举类") + @Schema(description = "登录结果,参见 LoginLogTypeEnum 枚举类", required = true, example = "1" ) @NotNull(message = "登录结果不能为空") private Integer result; - @ApiModelProperty(value = "用户 IP", required = true, example = "127.0.0.1") + @Schema(description = "用户 IP", required = true, example = "127.0.0.1") @NotEmpty(message = "用户 IP 不能为空") private String userIp; - @ApiModelProperty(value = "浏览器 UserAgent", example = "Mozilla/5.0") + @Schema(description = "浏览器 UserAgent", example = "Mozilla/5.0") private String userAgent; -} +} \ No newline at end of file diff --git a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/logger/vo/loginlog/LoginLogExportReqVO.java b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/logger/vo/loginlog/LoginLogExportReqVO.java index 50f36edb3..40a46ff0d 100644 --- a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/logger/vo/loginlog/LoginLogExportReqVO.java +++ b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/logger/vo/loginlog/LoginLogExportReqVO.java @@ -1,7 +1,7 @@ package cn.iocoder.yudao.module.system.controller.admin.logger.vo.loginlog; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; +import io.swagger.v3.oas.annotations.media.Schema; +import io.swagger.v3.oas.annotations.media.Schema; import lombok.Data; import org.springframework.format.annotation.DateTimeFormat; @@ -9,21 +9,21 @@ import java.time.LocalDateTime; import static cn.iocoder.yudao.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND; -@ApiModel("管理后台 - 登录日志分页列表 Request VO") +@Schema(description = "管理后台 - 登录日志分页列表 Request VO") @Data public class LoginLogExportReqVO { - @ApiModelProperty(value = "用户 IP", example = "127.0.0.1", notes = "模拟匹配") + @Schema(description = "用户 IP,模拟匹配", example = "127.0.0.1" ) private String userIp; - @ApiModelProperty(value = "用户账号", example = "芋道", notes = "模拟匹配") + @Schema(description = "用户账号,模拟匹配", example = "芋道" ) private String username; - @ApiModelProperty(value = "操作状态", example = "true") + @Schema(description = "操作状态", example = "true") private Boolean status; - @ApiModelProperty(value = "登录时间", example = "[2022-07-01 00:00:00,2022-07-01 23:59:59]") + @Schema(description = "登录时间", example = "[2022-07-01 00:00:00,2022-07-01 23:59:59]") @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND) private LocalDateTime[] createTime; -} +} \ No newline at end of file diff --git a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/logger/vo/loginlog/LoginLogPageReqVO.java b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/logger/vo/loginlog/LoginLogPageReqVO.java index 51ed062e8..1f37f7198 100644 --- a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/logger/vo/loginlog/LoginLogPageReqVO.java +++ b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/logger/vo/loginlog/LoginLogPageReqVO.java @@ -1,8 +1,8 @@ package cn.iocoder.yudao.module.system.controller.admin.logger.vo.loginlog; import cn.iocoder.yudao.framework.common.pojo.PageParam; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; +import io.swagger.v3.oas.annotations.media.Schema; +import io.swagger.v3.oas.annotations.media.Schema; import lombok.Data; import lombok.EqualsAndHashCode; import org.springframework.format.annotation.DateTimeFormat; @@ -11,22 +11,22 @@ import java.time.LocalDateTime; import static cn.iocoder.yudao.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND; -@ApiModel("管理后台 - 登录日志分页列表 Request VO") +@Schema(description = "管理后台 - 登录日志分页列表 Request VO") @Data @EqualsAndHashCode(callSuper = true) public class LoginLogPageReqVO extends PageParam { - @ApiModelProperty(value = "用户 IP", example = "127.0.0.1", notes = "模拟匹配") + @Schema(description = "用户 IP,模拟匹配", example = "127.0.0.1" ) private String userIp; - @ApiModelProperty(value = "用户账号", example = "芋道", notes = "模拟匹配") + @Schema(description = "用户账号,模拟匹配", example = "芋道" ) private String username; - @ApiModelProperty(value = "操作状态", example = "true") + @Schema(description = "操作状态", example = "true") private Boolean status; - @ApiModelProperty(value = "登录时间", example = "[2022-07-01 00:00:00,2022-07-01 23:59:59]") + @Schema(description = "登录时间", example = "[2022-07-01 00:00:00,2022-07-01 23:59:59]") @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND) private LocalDateTime[] createTime; -} +} \ No newline at end of file diff --git a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/logger/vo/loginlog/LoginLogRespVO.java b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/logger/vo/loginlog/LoginLogRespVO.java index 4eb121c02..2ec1ead67 100644 --- a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/logger/vo/loginlog/LoginLogRespVO.java +++ b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/logger/vo/loginlog/LoginLogRespVO.java @@ -1,7 +1,7 @@ package cn.iocoder.yudao.module.system.controller.admin.logger.vo.loginlog; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; +import io.swagger.v3.oas.annotations.media.Schema; +import io.swagger.v3.oas.annotations.media.Schema; import lombok.Data; import lombok.EqualsAndHashCode; import lombok.ToString; @@ -9,23 +9,23 @@ import lombok.ToString; import javax.validation.constraints.NotNull; import java.time.LocalDateTime; -@ApiModel("管理后台 - 登录日志 Response VO") +@Schema(description = "管理后台 - 登录日志 Response VO") @Data @EqualsAndHashCode(callSuper = true) @ToString(callSuper = true) public class LoginLogRespVO extends LoginLogBaseVO { - @ApiModelProperty(value = "日志编号", required = true, example = "1024") + @Schema(description = "日志编号", required = true, example = "1024") private Long id; - @ApiModelProperty(value = "用户编号", example = "666") + @Schema(description = "用户编号", example = "666") private Long userId; - @ApiModelProperty(value = "用户类型", required = true, example = "2", notes = "参见 UserTypeEnum 枚举") + @Schema(description = "用户类型,参见 UserTypeEnum 枚举", required = true, example = "2") @NotNull(message = "用户类型不能为空") private Integer userType; - @ApiModelProperty(value = "登录时间", required = true) + @Schema(description = "登录时间", required = true) private LocalDateTime createTime; -} +} \ No newline at end of file diff --git a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/logger/vo/operatelog/OperateLogBaseVO.java b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/logger/vo/operatelog/OperateLogBaseVO.java index abaf41247..2677d002e 100644 --- a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/logger/vo/operatelog/OperateLogBaseVO.java +++ b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/logger/vo/operatelog/OperateLogBaseVO.java @@ -1,6 +1,6 @@ package cn.iocoder.yudao.module.system.controller.admin.logger.vo.operatelog; -import io.swagger.annotations.ApiModelProperty; +import io.swagger.v3.oas.annotations.media.Schema; import lombok.Data; import javax.validation.constraints.NotEmpty; @@ -15,71 +15,71 @@ import java.util.Map; @Data public class OperateLogBaseVO { - @ApiModelProperty(value = "链路追踪编号", required = true, example = "89aca178-a370-411c-ae02-3f0d672be4ab") + @Schema(description = "链路追踪编号", required = true, example = "89aca178-a370-411c-ae02-3f0d672be4ab") @NotEmpty(message = "链路追踪编号不能为空") private String traceId; - @ApiModelProperty(value = "用户编号", required = true, example = "1024") + @Schema(description = "用户编号", required = true, example = "1024") @NotNull(message = "用户编号不能为空") private Long userId; - @ApiModelProperty(value = "操作模块", required = true, example = "订单") + @Schema(description = "操作模块", required = true, example = "订单") @NotEmpty(message = "操作模块不能为空") private String module; - @ApiModelProperty(value = "操作名", required = true, example = "创建订单") + @Schema(description = "操作名", required = true, example = "创建订单") @NotEmpty(message = "操作名") private String name; - @ApiModelProperty(value = "操作分类", required = true, example = "1", notes = "参见 OperateLogTypeEnum 枚举类") + @Schema(description = "操作分类,参见 OperateLogTypeEnum 枚举类", required = true, example = "1" ) @NotNull(message = "操作分类不能为空") private Integer type; - @ApiModelProperty(value = "操作明细", example = "修改编号为 1 的用户信息,将性别从男改成女,将姓名从芋道改成源码。") + @Schema(description = "操作明细", example = "修改编号为 1 的用户信息,将性别从男改成女,将姓名从芋道改成源码。") private String content; - @ApiModelProperty(value = "拓展字段", example = "{'orderId': 1}") + @Schema(description = "拓展字段", example = "{'orderId': 1}") private Map exts; - @ApiModelProperty(value = "请求方法名", required = true, example = "GET") + @Schema(description = "请求方法名", required = true, example = "GET") @NotEmpty(message = "请求方法名不能为空") private String requestMethod; - @ApiModelProperty(value = "请求地址", required = true, example = "/xxx/yyy") + @Schema(description = "请求地址", required = true, example = "/xxx/yyy") @NotEmpty(message = "请求地址不能为空") private String requestUrl; - @ApiModelProperty(value = "用户 IP", required = true, example = "127.0.0.1") + @Schema(description = "用户 IP", required = true, example = "127.0.0.1") @NotEmpty(message = "用户 IP 不能为空") private String userIp; - @ApiModelProperty(value = "浏览器 UserAgent", required = true, example = "Mozilla/5.0") + @Schema(description = "浏览器 UserAgent", required = true, example = "Mozilla/5.0") @NotEmpty(message = "浏览器 UserAgent 不能为空") private String userAgent; - @ApiModelProperty(value = "Java 方法名", required = true, example = "cn.iocoder.yudao.adminserver.UserController.save(...)") + @Schema(description = "Java 方法名", required = true, example = "cn.iocoder.yudao.adminserver.UserController.save(...)") @NotEmpty(message = "Java 方法名不能为空") private String javaMethod; - @ApiModelProperty(value = "Java 方法的参数") + @Schema(description = "Java 方法的参数") private String javaMethodArgs; - @ApiModelProperty(value = "开始时间", required = true) + @Schema(description = "开始时间", required = true) @NotNull(message = "开始时间不能为空") private LocalDateTime startTime; - @ApiModelProperty(value = "执行时长,单位:毫秒", required = true) + @Schema(description = "执行时长,单位:毫秒", required = true) @NotNull(message = "执行时长不能为空") private Integer duration; - @ApiModelProperty(value = "结果码", required = true) + @Schema(description = "结果码", required = true) @NotNull(message = "结果码不能为空") private Integer resultCode; - @ApiModelProperty(value = "结果提示") + @Schema(description = "结果提示") private String resultMsg; - @ApiModelProperty(value = "结果数据") + @Schema(description = "结果数据") private String resultData; -} +} \ No newline at end of file diff --git a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/logger/vo/operatelog/OperateLogExportReqVO.java b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/logger/vo/operatelog/OperateLogExportReqVO.java index 254681250..a182dae17 100644 --- a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/logger/vo/operatelog/OperateLogExportReqVO.java +++ b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/logger/vo/operatelog/OperateLogExportReqVO.java @@ -1,7 +1,7 @@ package cn.iocoder.yudao.module.system.controller.admin.logger.vo.operatelog; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; +import io.swagger.v3.oas.annotations.media.Schema; +import io.swagger.v3.oas.annotations.media.Schema; import lombok.Data; import org.springframework.format.annotation.DateTimeFormat; @@ -9,24 +9,24 @@ import java.time.LocalDateTime; import static cn.iocoder.yudao.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND; -@ApiModel("管理后台 - 操作日志分页列表 Request VO") +@Schema(description = "管理后台 - 操作日志分页列表 Request VO") @Data public class OperateLogExportReqVO { - @ApiModelProperty(value = "操作模块", example = "订单", notes = "模拟匹配") + @Schema(description = "操作模块,模拟匹配", example = "订单" ) private String module; - @ApiModelProperty(value = "用户昵称", example = "芋道", notes = "模拟匹配") + @Schema(description = "用户昵称,模拟匹配", example = "芋道" ) private String userNickname; - @ApiModelProperty(value = "操作分类", example = "1", notes = "参见 OperateLogTypeEnum 枚举类") + @Schema(description = "操作分类,参见 OperateLogTypeEnum 枚举类", example = "1" ) private Integer type; - @ApiModelProperty(value = "操作状态", example = "true") + @Schema(description = "操作状态", example = "true") private Boolean success; - @ApiModelProperty(value = "开始时间", example = "[2022-07-01 00:00:00,2022-07-01 23:59:59]") + @Schema(description = "开始时间", example = "[2022-07-01 00:00:00,2022-07-01 23:59:59]") @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND) private LocalDateTime[] startTime; -} +} \ No newline at end of file diff --git a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/logger/vo/operatelog/OperateLogPageReqVO.java b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/logger/vo/operatelog/OperateLogPageReqVO.java index 9fa6fed66..62b7b27a3 100644 --- a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/logger/vo/operatelog/OperateLogPageReqVO.java +++ b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/logger/vo/operatelog/OperateLogPageReqVO.java @@ -1,8 +1,8 @@ package cn.iocoder.yudao.module.system.controller.admin.logger.vo.operatelog; import cn.iocoder.yudao.framework.common.pojo.PageParam; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; +import io.swagger.v3.oas.annotations.media.Schema; +import io.swagger.v3.oas.annotations.media.Schema; import lombok.Data; import org.springframework.format.annotation.DateTimeFormat; @@ -10,24 +10,24 @@ import java.time.LocalDateTime; import static cn.iocoder.yudao.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND; -@ApiModel("管理后台 - 操作日志分页列表 Request VO") +@Schema(description = "管理后台 - 操作日志分页列表 Request VO") @Data public class OperateLogPageReqVO extends PageParam { - @ApiModelProperty(value = "操作模块", example = "订单", notes = "模拟匹配") + @Schema(description = "操作模块,模拟匹配", example = "订单") private String module; - @ApiModelProperty(value = "用户昵称", example = "芋道", notes = "模拟匹配") + @Schema(description = "用户昵称,模拟匹配", example = "芋道") private String userNickname; - @ApiModelProperty(value = "操作分类", example = "1", notes = "参见 OperateLogTypeEnum 枚举类") + @Schema(description = "操作分类,参见 OperateLogTypeEnum 枚举类", example = "1") private Integer type; - @ApiModelProperty(value = "操作状态", example = "true") + @Schema(description = "操作状态", example = "true") private Boolean success; - @ApiModelProperty(value = "开始时间", example = "[2022-07-01 00:00:00,2022-07-01 23:59:59]") + @Schema(description = "开始时间", example = "[2022-07-01 00:00:00,2022-07-01 23:59:59]") @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND) private LocalDateTime[] startTime; -} +} \ No newline at end of file diff --git a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/logger/vo/operatelog/OperateLogRespVO.java b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/logger/vo/operatelog/OperateLogRespVO.java index 445b40060..e0e24595e 100644 --- a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/logger/vo/operatelog/OperateLogRespVO.java +++ b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/logger/vo/operatelog/OperateLogRespVO.java @@ -1,21 +1,21 @@ package cn.iocoder.yudao.module.system.controller.admin.logger.vo.operatelog; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; +import io.swagger.v3.oas.annotations.media.Schema; +import io.swagger.v3.oas.annotations.media.Schema; import lombok.Data; import lombok.EqualsAndHashCode; import lombok.ToString; -@ApiModel("管理后台 - 操作日志 Response VO") +@Schema(description = "管理后台 - 操作日志 Response VO") @Data @EqualsAndHashCode(callSuper = true) @ToString(callSuper = true) public class OperateLogRespVO extends OperateLogBaseVO { - @ApiModelProperty(value = "日志编号", required = true, example = "1024") + @Schema(description = "日志编号", required = true, example = "1024") private Long id; - @ApiModelProperty(value = "用户昵称", required = true, example = "芋艿") + @Schema(description = "用户昵称", required = true, example = "芋艿") private String userNickname; -} +} \ No newline at end of file diff --git a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/mail/MailAccountController.java b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/mail/MailAccountController.java index e1cf28e70..b09c2feb2 100644 --- a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/mail/MailAccountController.java +++ b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/mail/MailAccountController.java @@ -7,9 +7,9 @@ import cn.iocoder.yudao.module.system.controller.admin.mail.vo.account.*; import cn.iocoder.yudao.module.system.convert.mail.MailAccountConvert; import cn.iocoder.yudao.module.system.dal.dataobject.mail.MailAccountDO; import cn.iocoder.yudao.module.system.service.mail.MailAccountService; -import io.swagger.annotations.Api; -import io.swagger.annotations.ApiImplicitParam; -import io.swagger.annotations.ApiOperation; +import io.swagger.v3.oas.annotations.tags.Tag; +import io.swagger.v3.oas.annotations.Parameter; +import io.swagger.v3.oas.annotations.Operation; import org.springframework.security.access.prepost.PreAuthorize; import org.springframework.web.bind.annotation.*; @@ -19,7 +19,7 @@ import java.util.List; import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success; -@Api(tags = "管理后台 - 邮箱账号") +@Tag(name = "管理后台 - 邮箱账号") @RestController @RequestMapping("/system/mail-account") public class MailAccountController { @@ -28,14 +28,14 @@ public class MailAccountController { private MailAccountService mailAccountService; @PostMapping("/create") - @ApiOperation("创建邮箱账号") + @Operation(summary = "创建邮箱账号") @PreAuthorize("@ss.hasPermission('system:mail-account:create')") public CommonResult createMailAccount(@Valid @RequestBody MailAccountCreateReqVO createReqVO) { return success(mailAccountService.createMailAccount(createReqVO)); } @PutMapping("/update") - @ApiOperation("修改邮箱账号") + @Operation(summary = "修改邮箱账号") @PreAuthorize("@ss.hasPermission('system:mail-account:update')") public CommonResult updateMailAccount(@Valid @RequestBody MailAccountUpdateReqVO updateReqVO) { mailAccountService.updateMailAccount(updateReqVO); @@ -43,8 +43,8 @@ public class MailAccountController { } @DeleteMapping("/delete") - @ApiOperation("删除邮箱账号") - @ApiImplicitParam(name = "id", value = "编号", required = true, dataTypeClass = Long.class) + @Operation(summary = "删除邮箱账号") + @Parameter(name = "id", description = "编号", required = true) @PreAuthorize("@ss.hasPermission('system:mail-account:delete')") public CommonResult deleteMailAccount(@RequestParam Long id) { mailAccountService.deleteMailAccount(id); @@ -52,8 +52,8 @@ public class MailAccountController { } @GetMapping("/get") - @ApiOperation("获得邮箱账号") - @ApiImplicitParam(name = "id", value = "编号", required = true, example = "1024", dataTypeClass = Long.class) + @Operation(summary = "获得邮箱账号") + @Parameter(name = "id", description = "编号", required = true, example = "1024") @PreAuthorize("@ss.hasPermission('system:mail-account:get')") public CommonResult getMailAccount(@RequestParam("id") Long id) { MailAccountDO mailAccountDO = mailAccountService.getMailAccount(id); @@ -61,7 +61,7 @@ public class MailAccountController { } @GetMapping("/page") - @ApiOperation("获得邮箱账号分页") + @Operation(summary = "获得邮箱账号分页") @PreAuthorize("@ss.hasPermission('system:mail-account:query')") public CommonResult> getMailAccountPage(@Valid MailAccountPageReqVO pageReqVO) { PageResult pageResult = mailAccountService.getMailAccountPage(pageReqVO); @@ -69,10 +69,10 @@ public class MailAccountController { } @GetMapping("/list-all-simple") - @ApiOperation(value = "获得邮箱账号精简列表") + @Operation(summary = "获得邮箱账号精简列表") public CommonResult> getSimpleMailAccountList() { List list = mailAccountService.getMailAccountList(); return success(MailAccountConvert.INSTANCE.convertList02(list)); } -} +} \ No newline at end of file diff --git a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/mail/MailLogController.java b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/mail/MailLogController.java index 33f388b80..c87560f30 100644 --- a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/mail/MailLogController.java +++ b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/mail/MailLogController.java @@ -8,9 +8,9 @@ import cn.iocoder.yudao.module.system.controller.admin.mail.vo.log.MailLogRespVO import cn.iocoder.yudao.module.system.convert.mail.MailLogConvert; import cn.iocoder.yudao.module.system.dal.dataobject.mail.MailLogDO; import cn.iocoder.yudao.module.system.service.mail.MailLogService; -import io.swagger.annotations.Api; -import io.swagger.annotations.ApiImplicitParam; -import io.swagger.annotations.ApiOperation; +import io.swagger.v3.oas.annotations.tags.Tag; +import io.swagger.v3.oas.annotations.Parameter; +import io.swagger.v3.oas.annotations.Operation; import org.springframework.security.access.prepost.PreAuthorize; import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.RequestMapping; @@ -23,7 +23,7 @@ import javax.validation.Valid; import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success; -@Api(tags = "管理后台 - 邮件日志") +@Tag(name = "管理后台 - 邮件日志") @RestController @RequestMapping("/system/mail-log") public class MailLogController { @@ -32,7 +32,7 @@ public class MailLogController { private MailLogService mailLogService; @GetMapping("/page") - @ApiOperation("获得邮箱日志分页") + @Operation(summary = "获得邮箱日志分页") @PreAuthorize("@ss.hasPermission('system:mail-log:query')") public CommonResult> getMailLogPage(@Valid MailLogPageReqVO pageVO) { PageResult pageResult = mailLogService.getMailLogPage(pageVO); @@ -40,12 +40,12 @@ public class MailLogController { } @GetMapping("/get") - @ApiOperation("获得邮箱日志") - @ApiImplicitParam(name = "id", value = "编号", required = true, example = "1024", dataTypeClass = Long.class) + @Operation(summary = "获得邮箱日志") + @Parameter(name = "id", description = "编号", required = true, example = "1024") @PreAuthorize("@ss.hasPermission('system:mail-log:query')") public CommonResult getMailTemplate(@RequestParam("id") Long id) { MailLogDO mailLogDO = mailLogService.getMailLog(id); return success(MailLogConvert.INSTANCE.convert(mailLogDO)); } -} +} \ No newline at end of file diff --git a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/mail/MailTemplateController.java b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/mail/MailTemplateController.java index 83e0c6c53..6d83a7722 100644 --- a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/mail/MailTemplateController.java +++ b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/mail/MailTemplateController.java @@ -7,9 +7,9 @@ import cn.iocoder.yudao.module.system.convert.mail.MailTemplateConvert; import cn.iocoder.yudao.module.system.dal.dataobject.mail.MailTemplateDO; import cn.iocoder.yudao.module.system.service.mail.MailSendService; import cn.iocoder.yudao.module.system.service.mail.MailTemplateService; -import io.swagger.annotations.Api; -import io.swagger.annotations.ApiImplicitParam; -import io.swagger.annotations.ApiOperation; +import io.swagger.v3.oas.annotations.tags.Tag; +import io.swagger.v3.oas.annotations.Parameter; +import io.swagger.v3.oas.annotations.Operation; import org.springframework.security.access.prepost.PreAuthorize; import org.springframework.web.bind.annotation.*; @@ -19,7 +19,7 @@ import java.util.List; import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success; -@Api(tags = "管理后台 - 邮件模版") +@Tag(name = "管理后台 - 邮件模版") @RestController @RequestMapping("/system/mail-template") public class MailTemplateController { @@ -30,14 +30,14 @@ public class MailTemplateController { private MailSendService mailSendService; @PostMapping("/create") - @ApiOperation("创建邮件模版") + @Operation(summary = "创建邮件模版") @PreAuthorize("@ss.hasPermission('system:mail-template:create')") public CommonResult createMailTemplate(@Valid @RequestBody MailTemplateCreateReqVO createReqVO){ return success(mailTempleService.createMailTemplate(createReqVO)); } @PutMapping("/update") - @ApiOperation("修改邮件模版") + @Operation(summary = "修改邮件模版") @PreAuthorize("@ss.hasPermission('system:mail-template:update')") public CommonResult updateMailTemplate(@Valid @RequestBody MailTemplateUpdateReqVO updateReqVO){ mailTempleService.updateMailTemplate(updateReqVO); @@ -45,8 +45,8 @@ public class MailTemplateController { } @DeleteMapping("/delete") - @ApiOperation("删除邮件模版") - @ApiImplicitParam(name = "id", value = "编号", required = true, example = "1024", dataTypeClass = Long.class) + @Operation(summary = "删除邮件模版") + @Parameter(name = "id", description = "编号", required = true, example = "1024") @PreAuthorize("@ss.hasPermission('system:mail-template:delete')") public CommonResult deleteMailTemplate(@RequestParam("id") Long id) { mailTempleService.deleteMailTemplate(id); @@ -54,8 +54,8 @@ public class MailTemplateController { } @GetMapping("/get") - @ApiOperation("获得邮件模版") - @ApiImplicitParam(name = "id", value = "编号", required = true, example = "1024", dataTypeClass = Long.class) + @Operation(summary = "获得邮件模版") + @Parameter(name = "id", description = "编号", required = true, example = "1024") @PreAuthorize("@ss.hasPermission('system:mail-template:get')") public CommonResult getMailTemplate(@RequestParam("id") Long id) { MailTemplateDO mailTemplateDO = mailTempleService.getMailTemplate(id); @@ -63,7 +63,7 @@ public class MailTemplateController { } @GetMapping("/page") - @ApiOperation("获得邮件模版分页") + @Operation(summary = "获得邮件模版分页") @PreAuthorize("@ss.hasPermission('system:mail-template:query')") public CommonResult> getMailTemplatePage(@Valid MailTemplatePageReqVO pageReqVO) { PageResult pageResult = mailTempleService.getMailTemplatePage(pageReqVO); @@ -71,18 +71,18 @@ public class MailTemplateController { } @GetMapping("/list-all-simple") - @ApiOperation(value = "获得邮件模版精简列表") + @Operation(summary = "获得邮件模版精简列表") public CommonResult> getSimpleTemplateList() { List list = mailTempleService.getMailTemplateList(); return success(MailTemplateConvert.INSTANCE.convertList02(list)); } @PostMapping("/send-mail") - @ApiOperation("发送短信") + @Operation(summary = "发送短信") @PreAuthorize("@ss.hasPermission('system:mail-template:send-mail')") public CommonResult sendMail(@Valid @RequestBody MailTemplateSendReqVO sendReqVO) { return success(mailSendService.sendSingleMailToAdmin(sendReqVO.getMail(), null, sendReqVO.getTemplateCode(), sendReqVO.getTemplateParams())); } -} +} \ No newline at end of file diff --git a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/mail/vo/account/MailAccountBaseVO.java b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/mail/vo/account/MailAccountBaseVO.java index ef18cb6ac..3a1ab53f9 100644 --- a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/mail/vo/account/MailAccountBaseVO.java +++ b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/mail/vo/account/MailAccountBaseVO.java @@ -1,6 +1,6 @@ package cn.iocoder.yudao.module.system.controller.admin.mail.vo.account; -import io.swagger.annotations.ApiModelProperty; +import io.swagger.v3.oas.annotations.media.Schema; import lombok.Data; import javax.validation.constraints.Email; @@ -13,29 +13,29 @@ import javax.validation.constraints.NotNull; @Data public class MailAccountBaseVO { - @ApiModelProperty(value = "邮箱", required = true, example = "yudaoyuanma@123.com") + @Schema(description = "邮箱", required = true, example = "yudaoyuanma@123.com") @NotNull(message = "邮箱不能为空") @Email(message = "必须是 Email 格式") private String mail; - @ApiModelProperty(value = "用户名", required = true, example = "yudao") + @Schema(description = "用户名", required = true, example = "yudao") @NotNull(message = "用户名不能为空") private String username; - @ApiModelProperty(value = "密码", required = true, example = "123456") + @Schema(description = "密码", required = true, example = "123456") @NotNull(message = "密码必填") private String password; - @ApiModelProperty(value = "SMTP 服务器域名", required = true, example = "www.iocoder.cn") + @Schema(description = "SMTP 服务器域名", required = true, example = "www.iocoder.cn") @NotNull(message = "SMTP 服务器域名不能为空") private String host; - @ApiModelProperty(value = "SMTP 服务器端口", required = true, example = "80") + @Schema(description = "SMTP 服务器端口", required = true, example = "80") @NotNull(message = "SMTP 服务器端口不能为空") private Integer port; - @ApiModelProperty(value = "是否开启 ssl", required = true, example = "true") + @Schema(description = "是否开启 ssl", required = true, example = "true") @NotNull(message = "是否开启 ssl 必填") private Boolean sslEnable; -} +} \ No newline at end of file diff --git a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/mail/vo/account/MailAccountPageReqVO.java b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/mail/vo/account/MailAccountPageReqVO.java index 9e5869172..94444e227 100644 --- a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/mail/vo/account/MailAccountPageReqVO.java +++ b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/mail/vo/account/MailAccountPageReqVO.java @@ -1,22 +1,22 @@ package cn.iocoder.yudao.module.system.controller.admin.mail.vo.account; import cn.iocoder.yudao.framework.common.pojo.PageParam; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; +import io.swagger.v3.oas.annotations.media.Schema; +import io.swagger.v3.oas.annotations.media.Schema; import lombok.Data; import lombok.EqualsAndHashCode; import lombok.ToString; -@ApiModel("管理后台 - 邮箱账号分页 Request VO") +@Schema(description = "管理后台 - 邮箱账号分页 Request VO") @Data @EqualsAndHashCode(callSuper = true) @ToString(callSuper = true) public class MailAccountPageReqVO extends PageParam { - @ApiModelProperty(value = "邮箱", required = true, example = "yudaoyuanma@123.com") + @Schema(description = "邮箱", required = true, example = "yudaoyuanma@123.com") private String mail; - @ApiModelProperty(value = "用户名" , required = true , example = "yudao") + @Schema(description = "用户名" , required = true , example = "yudao") private String username; -} +} \ No newline at end of file diff --git a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/mail/vo/account/MailAccountRespVO.java b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/mail/vo/account/MailAccountRespVO.java index 9eef7281a..b62b8c382 100644 --- a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/mail/vo/account/MailAccountRespVO.java +++ b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/mail/vo/account/MailAccountRespVO.java @@ -1,7 +1,7 @@ package cn.iocoder.yudao.module.system.controller.admin.mail.vo.account; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; +import io.swagger.v3.oas.annotations.media.Schema; +import io.swagger.v3.oas.annotations.media.Schema; import lombok.Data; import lombok.EqualsAndHashCode; import lombok.ToString; @@ -9,17 +9,17 @@ import lombok.ToString; import javax.validation.constraints.NotNull; import java.time.LocalDateTime; -@ApiModel("管理后台 - 邮箱账号 Response VO") +@Schema(description = "管理后台 - 邮箱账号 Response VO") @Data @EqualsAndHashCode(callSuper = true) @ToString(callSuper = true) public class MailAccountRespVO extends MailAccountBaseVO { - @ApiModelProperty(value = "编号", required = true, example = "1024") + @Schema(description = "编号", required = true, example = "1024") @NotNull(message = "编号不能为空") private Long id; - @ApiModelProperty(value = "创建时间", required = true) + @Schema(description = "创建时间", required = true) private LocalDateTime createTime; -} +} \ No newline at end of file diff --git a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/mail/vo/account/MailAccountSimpleRespVO.java b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/mail/vo/account/MailAccountSimpleRespVO.java index 96916a715..238a64a5e 100644 --- a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/mail/vo/account/MailAccountSimpleRespVO.java +++ b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/mail/vo/account/MailAccountSimpleRespVO.java @@ -1,17 +1,17 @@ package cn.iocoder.yudao.module.system.controller.admin.mail.vo.account; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; +import io.swagger.v3.oas.annotations.media.Schema; +import io.swagger.v3.oas.annotations.media.Schema; import lombok.Data; -@ApiModel("管理后台 - 邮箱账号的精简 Response VO") +@Schema(description = "管理后台 - 邮箱账号的精简 Response VO") @Data public class MailAccountSimpleRespVO { - @ApiModelProperty(value = "邮箱编号", required = true, example = "1024") + @Schema(description = "邮箱编号", required = true, example = "1024") private Long id; - @ApiModelProperty(value = "邮箱", required = true, example = "768541388@qq.com") + @Schema(description = "邮箱", required = true, example = "768541388@qq.com") private String mail; -} +} \ No newline at end of file diff --git a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/mail/vo/account/MailAccountUpdateReqVO.java b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/mail/vo/account/MailAccountUpdateReqVO.java index 43a13ad18..92998ffd8 100644 --- a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/mail/vo/account/MailAccountUpdateReqVO.java +++ b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/mail/vo/account/MailAccountUpdateReqVO.java @@ -1,21 +1,21 @@ package cn.iocoder.yudao.module.system.controller.admin.mail.vo.account; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; +import io.swagger.v3.oas.annotations.media.Schema; +import io.swagger.v3.oas.annotations.media.Schema; import lombok.Data; import lombok.EqualsAndHashCode; import lombok.ToString; import javax.validation.constraints.NotNull; -@ApiModel("管理后台 - 邮箱账号修改 Request VO") +@Schema(description = "管理后台 - 邮箱账号修改 Request VO") @Data @EqualsAndHashCode(callSuper = true) @ToString(callSuper = true) public class MailAccountUpdateReqVO extends MailAccountBaseVO { - @ApiModelProperty(value = "编号", required = true, example = "1024") + @Schema(description = "编号", required = true, example = "1024") @NotNull(message = "编号不能为空") private Long id; -} +} \ No newline at end of file diff --git a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/mail/vo/log/MailLogBaseVO.java b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/mail/vo/log/MailLogBaseVO.java index 4a2459d47..012b7cc3e 100755 --- a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/mail/vo/log/MailLogBaseVO.java +++ b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/mail/vo/log/MailLogBaseVO.java @@ -1,6 +1,6 @@ package cn.iocoder.yudao.module.system.controller.admin.mail.vo.log; -import io.swagger.annotations.ApiModelProperty; +import io.swagger.v3.oas.annotations.media.Schema; import lombok.Data; import org.springframework.format.annotation.DateTimeFormat; @@ -17,59 +17,59 @@ import static cn.iocoder.yudao.framework.common.util.date.DateUtils.FORMAT_YEAR_ @Data public class MailLogBaseVO { - @ApiModelProperty(value = "用户编号", example = "30883") + @Schema(description = "用户编号", example = "30883") private Long userId; - @ApiModelProperty(value = "用户类型", example = "2", notes = "参见 UserTypeEnum 枚举") + @Schema(description = "用户类型", example = "2", notes = "参见 UserTypeEnum 枚举") private Byte userType; - @ApiModelProperty(value = "接收邮箱地址", required = true, example = "76854@qq.com") + @Schema(description = "接收邮箱地址", required = true, example = "76854@qq.com") @NotNull(message = "接收邮箱地址不能为空") private String toMail; - @ApiModelProperty(value = "邮箱账号编号", required = true, example = "18107") + @Schema(description = "邮箱账号编号", required = true, example = "18107") @NotNull(message = "邮箱账号编号不能为空") private Long accountId; - @ApiModelProperty(value = "发送邮箱地址", required = true, example = "85757@qq.com") + @Schema(description = "发送邮箱地址", required = true, example = "85757@qq.com") @NotNull(message = "发送邮箱地址不能为空") private String fromMail; - @ApiModelProperty(value = "模板编号", required = true, example = "5678") + @Schema(description = "模板编号", required = true, example = "5678") @NotNull(message = "模板编号不能为空") private Long templateId; - @ApiModelProperty(value = "模板编码", required = true, example = "test_01") + @Schema(description = "模板编码", required = true, example = "test_01") @NotNull(message = "模板编码不能为空") private String templateCode; - @ApiModelProperty(value = "模版发送人名称", example = "李四") + @Schema(description = "模版发送人名称", example = "李四") private String templateNickname; - @ApiModelProperty(value = "邮件标题", required = true, example = "测试标题") + @Schema(description = "邮件标题", required = true, example = "测试标题") @NotNull(message = "邮件标题不能为空") private String templateTitle; - @ApiModelProperty(value = "邮件内容", required = true, example = "测试内容") + @Schema(description = "邮件内容", required = true, example = "测试内容") @NotNull(message = "邮件内容不能为空") private String templateContent; - @ApiModelProperty(value = "邮件参数", required = true) + @Schema(description = "邮件参数", required = true) @NotNull(message = "邮件参数不能为空") private Map templateParams; - @ApiModelProperty(value = "发送状态", required = true, example = "1", notes = "参见 MailSendStatusEnum 枚举") + @Schema(description = "发送状态", required = true, example = "1", notes = "参见 MailSendStatusEnum 枚举") @NotNull(message = "发送状态不能为空") private Byte sendStatus; - @ApiModelProperty(value = "发送时间") + @Schema(description = "发送时间") @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND) private LocalDateTime sendTime; - @ApiModelProperty(value = "发送返回的消息 ID", example = "28568") + @Schema(description = "发送返回的消息 ID", example = "28568") private String sendMessageId; - @ApiModelProperty(value = "发送异常") + @Schema(description = "发送异常") private String sendException; -} +} \ No newline at end of file diff --git a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/mail/vo/log/MailLogPageReqVO.java b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/mail/vo/log/MailLogPageReqVO.java index 6173cbfce..b2780976b 100644 --- a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/mail/vo/log/MailLogPageReqVO.java +++ b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/mail/vo/log/MailLogPageReqVO.java @@ -1,8 +1,8 @@ package cn.iocoder.yudao.module.system.controller.admin.mail.vo.log; import cn.iocoder.yudao.framework.common.pojo.PageParam; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; +import io.swagger.v3.oas.annotations.media.Schema; +import io.swagger.v3.oas.annotations.media.Schema; import lombok.Data; import lombok.EqualsAndHashCode; import lombok.ToString; @@ -12,32 +12,32 @@ import java.time.LocalDateTime; import static cn.iocoder.yudao.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND; -@ApiModel("管理后台 - 邮箱日志分页 Request VO") +@Schema(description = "管理后台 - 邮箱日志分页 Request VO") @Data @EqualsAndHashCode(callSuper = true) @ToString(callSuper = true) public class MailLogPageReqVO extends PageParam { - @ApiModelProperty(value = "用户编号", example = "30883") + @Schema(description = "用户编号", example = "30883") private Long userId; - @ApiModelProperty(value = "用户类型", example = "2", notes = "参见 UserTypeEnum 枚举") + @Schema(description = "用户类型", example = "2", notes = "参见 UserTypeEnum 枚举") private Integer userType; - @ApiModelProperty(value = "接收邮箱地址", example = "76854@qq.com", notes = "模糊匹配") + @Schema(description = "接收邮箱地址", example = "76854@qq.com", notes = "模糊匹配") private String toMail; - @ApiModelProperty(value = "邮箱账号编号", example = "18107") + @Schema(description = "邮箱账号编号", example = "18107") private Long accountId; - @ApiModelProperty(value = "模板编号", example = "5678") + @Schema(description = "模板编号", example = "5678") private Long templateId; - @ApiModelProperty(value = "发送状态", example = "1", notes = "参见 MailSendStatusEnum 枚举") + @Schema(description = "发送状态", example = "1", notes = "参见 MailSendStatusEnum 枚举") private Integer sendStatus; - @ApiModelProperty(value = "发送时间") + @Schema(description = "发送时间") @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND) private LocalDateTime[] sendTime; -} +} \ No newline at end of file diff --git a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/mail/vo/log/MailLogRespVO.java b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/mail/vo/log/MailLogRespVO.java index 7a1c1440d..3fbfaa6da 100755 --- a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/mail/vo/log/MailLogRespVO.java +++ b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/mail/vo/log/MailLogRespVO.java @@ -1,23 +1,23 @@ package cn.iocoder.yudao.module.system.controller.admin.mail.vo.log; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; +import io.swagger.v3.oas.annotations.media.Schema; +import io.swagger.v3.oas.annotations.media.Schema; import lombok.Data; import lombok.EqualsAndHashCode; import lombok.ToString; import java.time.LocalDateTime; -@ApiModel("管理后台 - 邮件日志 Response VO") +@Schema(description = "管理后台 - 邮件日志 Response VO") @Data @EqualsAndHashCode(callSuper = true) @ToString(callSuper = true) public class MailLogRespVO extends MailLogBaseVO { - @ApiModelProperty(value = "编号", required = true, example = "31020") + @Schema(description = "编号", required = true, example = "31020") private Long id; - @ApiModelProperty(value = "创建时间", required = true) + @Schema(description = "创建时间", required = true) private LocalDateTime createTime; -} +} \ No newline at end of file diff --git a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/mail/vo/template/MailTemplateBaseVO.java b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/mail/vo/template/MailTemplateBaseVO.java index 136c1801c..2d2208822 100644 --- a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/mail/vo/template/MailTemplateBaseVO.java +++ b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/mail/vo/template/MailTemplateBaseVO.java @@ -1,6 +1,6 @@ package cn.iocoder.yudao.module.system.controller.admin.mail.vo.template; -import io.swagger.annotations.ApiModelProperty; +import io.swagger.v3.oas.annotations.media.Schema; import lombok.Data; import javax.validation.constraints.NotEmpty; @@ -13,34 +13,34 @@ import javax.validation.constraints.NotNull; @Data public class MailTemplateBaseVO { - @ApiModelProperty(value = "模版名称", required = true, example = "测试名字") + @Schema(description = "模版名称", required = true, example = "测试名字") @NotNull(message = "名称不能为空") private String name; - @ApiModelProperty(value = "模版编号", required = true, example = "test") + @Schema(description = "模版编号", required = true, example = "test") @NotNull(message = "模版编号不能为空") private String code; - @ApiModelProperty(value = "发送的邮箱账号编号", required = true, example = "1") + @Schema(description = "发送的邮箱账号编号", required = true, example = "1") @NotNull(message = "发送的邮箱账号编号不能为空") private Long accountId; - @ApiModelProperty(value = "发送人名称", example = "芋头") + @Schema(description = "发送人名称", example = "芋头") private String nickname; - @ApiModelProperty(value = "标题", required = true, example = "注册成功") + @Schema(description = "标题", required = true, example = "注册成功") @NotEmpty(message = "标题不能为空") private String title; - @ApiModelProperty(value = "内容", required = true, example = "你好,注册成功啦") + @Schema(description = "内容", required = true, example = "你好,注册成功啦") @NotEmpty(message = "内容不能为空") private String content; - @ApiModelProperty(value = "状态", required = true, example = "1", notes = "参见 CommonStatusEnum 枚举") + @Schema(description = "状态", required = true, example = "1", notes = "参见 CommonStatusEnum 枚举") @NotNull(message = "状态不能为空") private Integer status; - @ApiModelProperty(value = "备注", example = "奥特曼") + @Schema(description = "备注", example = "奥特曼") private String remark; -} +} \ No newline at end of file diff --git a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/mail/vo/template/MailTemplatePageReqVO.java b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/mail/vo/template/MailTemplatePageReqVO.java index f3cec08f9..95a67a125 100644 --- a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/mail/vo/template/MailTemplatePageReqVO.java +++ b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/mail/vo/template/MailTemplatePageReqVO.java @@ -1,8 +1,8 @@ package cn.iocoder.yudao.module.system.controller.admin.mail.vo.template; import cn.iocoder.yudao.framework.common.pojo.PageParam; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; +import io.swagger.v3.oas.annotations.media.Schema; +import io.swagger.v3.oas.annotations.media.Schema; import lombok.Data; import lombok.EqualsAndHashCode; import lombok.ToString; @@ -12,26 +12,26 @@ import java.time.LocalDateTime; import static cn.iocoder.yudao.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND; -@ApiModel("管理后台 - 邮件模版分页 Request VO") +@Schema(description = "管理后台 - 邮件模版分页 Request VO") @Data @EqualsAndHashCode(callSuper = true) @ToString(callSuper = true) public class MailTemplatePageReqVO extends PageParam { - @ApiModelProperty(value = "状态", example = "1", notes = "参见 CommonStatusEnum 枚举") + @Schema(description = "状态", example = "1", notes = "参见 CommonStatusEnum 枚举") private Integer status; - @ApiModelProperty(value = "标识", example = "code_1024", notes = "模糊匹配") + @Schema(description = "标识", example = "code_1024", notes = "模糊匹配") private String code; - @ApiModelProperty(value = "名称", example = "芋头", notes = "模糊匹配") + @Schema(description = "名称", example = "芋头", notes = "模糊匹配") private String name; - @ApiModelProperty(value = "账号编号", example = "2048") + @Schema(description = "账号编号", example = "2048") private Long accountId; - @ApiModelProperty(value = "创建时间") + @Schema(description = "创建时间") @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND) private LocalDateTime[] createTime; -} +} \ No newline at end of file diff --git a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/mail/vo/template/MailTemplateRespVO.java b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/mail/vo/template/MailTemplateRespVO.java index a2153f9cd..e9f7ad95a 100644 --- a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/mail/vo/template/MailTemplateRespVO.java +++ b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/mail/vo/template/MailTemplateRespVO.java @@ -1,7 +1,7 @@ package cn.iocoder.yudao.module.system.controller.admin.mail.vo.template; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; +import io.swagger.v3.oas.annotations.media.Schema; +import io.swagger.v3.oas.annotations.media.Schema; import lombok.Data; import lombok.EqualsAndHashCode; import lombok.ToString; @@ -9,19 +9,19 @@ import lombok.ToString; import java.time.LocalDateTime; import java.util.List; -@ApiModel("管理后台 - 邮件末班 Response VO") +@Schema(description = "管理后台 - 邮件末班 Response VO") @Data @EqualsAndHashCode(callSuper = true) @ToString(callSuper = true) public class MailTemplateRespVO extends MailTemplateBaseVO { - @ApiModelProperty(value = "编号", required = true, example = "1024") + @Schema(description = "编号", required = true, example = "1024") private Long id; - @ApiModelProperty(value = "参数数组", example = "name,code") + @Schema(description = "参数数组", example = "name,code") private List params; - @ApiModelProperty(value = "创建时间", required = true) + @Schema(description = "创建时间", required = true) private LocalDateTime createTime; -} +} \ No newline at end of file diff --git a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/mail/vo/template/MailTemplateSendReqVO.java b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/mail/vo/template/MailTemplateSendReqVO.java index ccef59770..c2d4ce47b 100644 --- a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/mail/vo/template/MailTemplateSendReqVO.java +++ b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/mail/vo/template/MailTemplateSendReqVO.java @@ -1,26 +1,26 @@ package cn.iocoder.yudao.module.system.controller.admin.mail.vo.template; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; +import io.swagger.v3.oas.annotations.media.Schema; +import io.swagger.v3.oas.annotations.media.Schema; import lombok.Data; import javax.validation.constraints.NotEmpty; import javax.validation.constraints.NotNull; import java.util.Map; -@ApiModel("管理后台 - 邮件发送 Req VO") +@Schema(description = "管理后台 - 邮件发送 Req VO") @Data public class MailTemplateSendReqVO { - @ApiModelProperty(value = "接收邮箱", required = true, example = "7685413@qq.com") + @Schema(description = "接收邮箱", required = true, example = "7685413@qq.com") @NotEmpty(message = "接收邮箱不能为空") private String mail; - @ApiModelProperty(value = "模板编码", required = true, example = "test_01") + @Schema(description = "模板编码", required = true, example = "test_01") @NotNull(message = "模板编码不能为空") private String templateCode; - @ApiModelProperty(value = "模板参数") + @Schema(description = "模板参数") private Map templateParams; -} +} \ No newline at end of file diff --git a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/mail/vo/template/MailTemplateSimpleRespVO.java b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/mail/vo/template/MailTemplateSimpleRespVO.java index 2ff488036..65e4f2ed2 100644 --- a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/mail/vo/template/MailTemplateSimpleRespVO.java +++ b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/mail/vo/template/MailTemplateSimpleRespVO.java @@ -1,17 +1,17 @@ package cn.iocoder.yudao.module.system.controller.admin.mail.vo.template; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; +import io.swagger.v3.oas.annotations.media.Schema; +import io.swagger.v3.oas.annotations.media.Schema; import lombok.Data; -@ApiModel("管理后台 - 邮件模版的精简 Response VO") +@Schema(description = "管理后台 - 邮件模版的精简 Response VO") @Data public class MailTemplateSimpleRespVO { - @ApiModelProperty(value = "模版编号", required = true, example = "1024") + @Schema(description = "模版编号", required = true, example = "1024") private Long id; - @ApiModelProperty(value = "模版名字", required = true, example = "哒哒哒") + @Schema(description = "模版名字", required = true, example = "哒哒哒") private String name; -} +} \ No newline at end of file diff --git a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/mail/vo/template/MailTemplateUpdateReqVO.java b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/mail/vo/template/MailTemplateUpdateReqVO.java index 5dfa377a2..9cf073788 100644 --- a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/mail/vo/template/MailTemplateUpdateReqVO.java +++ b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/mail/vo/template/MailTemplateUpdateReqVO.java @@ -1,21 +1,21 @@ package cn.iocoder.yudao.module.system.controller.admin.mail.vo.template; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; +import io.swagger.v3.oas.annotations.media.Schema; +import io.swagger.v3.oas.annotations.media.Schema; import lombok.Data; import lombok.EqualsAndHashCode; import lombok.ToString; import javax.validation.constraints.NotNull; -@ApiModel("管理后台 - 邮件模版修改 Request VO") +@Schema(description = "管理后台 - 邮件模版修改 Request VO") @Data @EqualsAndHashCode(callSuper = true) @ToString(callSuper = true) public class MailTemplateUpdateReqVO extends MailTemplateBaseVO { - @ApiModelProperty(value = "编号", required = true, example = "1024") + @Schema(description = "编号", required = true, example = "1024") @NotNull(message = "编号不能为空") private Long id; -} +} \ No newline at end of file diff --git a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/notice/NoticeController.java b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/notice/NoticeController.java index 7b5070bcd..bbb1a3573 100644 --- a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/notice/NoticeController.java +++ b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/notice/NoticeController.java @@ -8,9 +8,9 @@ import cn.iocoder.yudao.module.system.controller.admin.notice.vo.NoticeRespVO; import cn.iocoder.yudao.module.system.controller.admin.notice.vo.NoticeUpdateReqVO; import cn.iocoder.yudao.module.system.convert.notice.NoticeConvert; import cn.iocoder.yudao.module.system.service.notice.NoticeService; -import io.swagger.annotations.Api; -import io.swagger.annotations.ApiImplicitParam; -import io.swagger.annotations.ApiOperation; +import io.swagger.v3.oas.annotations.tags.Tag; +import io.swagger.v3.oas.annotations.Parameter; +import io.swagger.v3.oas.annotations.Operation; import org.springframework.security.access.prepost.PreAuthorize; import org.springframework.validation.annotation.Validated; import org.springframework.web.bind.annotation.*; @@ -20,7 +20,7 @@ import javax.validation.Valid; import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success; -@Api(tags = "管理后台 - 通知公告") +@Tag(name = "管理后台 - 通知公告") @RestController @RequestMapping("/system/notice") @Validated @@ -30,7 +30,7 @@ public class NoticeController { private NoticeService noticeService; @PostMapping("/create") - @ApiOperation("创建通知公告") + @Operation(summary = "创建通知公告") @PreAuthorize("@ss.hasPermission('system:notice:create')") public CommonResult createNotice(@Valid @RequestBody NoticeCreateReqVO reqVO) { Long noticeId = noticeService.createNotice(reqVO); @@ -38,7 +38,7 @@ public class NoticeController { } @PutMapping("/update") - @ApiOperation("修改通知公告") + @Operation(summary = "修改通知公告") @PreAuthorize("@ss.hasPermission('system:notice:update')") public CommonResult updateNotice(@Valid @RequestBody NoticeUpdateReqVO reqVO) { noticeService.updateNotice(reqVO); @@ -46,8 +46,8 @@ public class NoticeController { } @DeleteMapping("/delete") - @ApiOperation("删除通知公告") - @ApiImplicitParam(name = "id", value = "编号", required = true, example = "1024", dataTypeClass = Long.class) + @Operation(summary = "删除通知公告") + @Parameter(name = "id", description = "编号", required = true, example = "1024") @PreAuthorize("@ss.hasPermission('system:notice:delete')") public CommonResult deleteNotice(@RequestParam("id") Long id) { noticeService.deleteNotice(id); @@ -55,18 +55,18 @@ public class NoticeController { } @GetMapping("/page") - @ApiOperation("获取通知公告列表") + @Operation(summary = "获取通知公告列表") @PreAuthorize("@ss.hasPermission('system:notice:query')") public CommonResult> getNoticePage(@Validated NoticePageReqVO reqVO) { return success(NoticeConvert.INSTANCE.convertPage(noticeService.getNoticePage(reqVO))); } @GetMapping("/get") - @ApiOperation("获得通知公告") - @ApiImplicitParam(name = "id", value = "编号", required = true, example = "1024", dataTypeClass = Long.class) + @Operation(summary = "获得通知公告") + @Parameter(name = "id", description = "编号", required = true, example = "1024") @PreAuthorize("@ss.hasPermission('system:notice:query')") public CommonResult getNotice(@RequestParam("id") Long id) { return success(NoticeConvert.INSTANCE.convert(noticeService.getNotice(id))); } -} +} \ No newline at end of file diff --git a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/notice/vo/NoticeBaseVO.java b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/notice/vo/NoticeBaseVO.java index 43cacd1d5..f661318cf 100644 --- a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/notice/vo/NoticeBaseVO.java +++ b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/notice/vo/NoticeBaseVO.java @@ -1,6 +1,6 @@ package cn.iocoder.yudao.module.system.controller.admin.notice.vo; -import io.swagger.annotations.ApiModelProperty; +import io.swagger.v3.oas.annotations.media.Schema; import lombok.Data; import javax.validation.constraints.NotBlank; @@ -14,19 +14,19 @@ import javax.validation.constraints.Size; @Data public class NoticeBaseVO { - @ApiModelProperty(value = "公告标题", required = true, example = "小博主") + @Schema(description = "公告标题", required = true, example = "小博主") @NotBlank(message = "公告标题不能为空") @Size(max = 50, message = "公告标题不能超过50个字符") private String title; - @ApiModelProperty(value = "公告类型", required = true, example = "小博主") + @Schema(description = "公告类型", required = true, example = "小博主") @NotNull(message = "公告类型不能为空") private Integer type; - @ApiModelProperty(value = "公告内容", required = true, example = "半生编码") + @Schema(description = "公告内容", required = true, example = "半生编码") private String content; - @ApiModelProperty(value = "状态", required = true, example = "1", notes = "参见 CommonStatusEnum 枚举类") + @Schema(description = "状态", required = true, example = "1", notes = "参见 CommonStatusEnum 枚举类") private Integer status; -} +} \ No newline at end of file diff --git a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/notice/vo/NoticePageReqVO.java b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/notice/vo/NoticePageReqVO.java index ba1287c47..de87c4795 100644 --- a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/notice/vo/NoticePageReqVO.java +++ b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/notice/vo/NoticePageReqVO.java @@ -1,20 +1,20 @@ package cn.iocoder.yudao.module.system.controller.admin.notice.vo; import cn.iocoder.yudao.framework.common.pojo.PageParam; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; +import io.swagger.v3.oas.annotations.media.Schema; +import io.swagger.v3.oas.annotations.media.Schema; import lombok.Data; import lombok.EqualsAndHashCode; -@ApiModel("管理后台 - 通知公告分页 Request VO") +@Schema(description = "管理后台 - 通知公告分页 Request VO") @Data @EqualsAndHashCode(callSuper = true) public class NoticePageReqVO extends PageParam { - @ApiModelProperty(value = "通知公告名称", example = "芋道", notes = "模糊匹配") + @Schema(description = "通知公告名称", example = "芋道", notes = "模糊匹配") private String title; - @ApiModelProperty(value = "展示状态", example = "1", notes = "参见 CommonStatusEnum 枚举类") + @Schema(description = "展示状态", example = "1", notes = "参见 CommonStatusEnum 枚举类") private Integer status; -} +} \ No newline at end of file diff --git a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/notice/vo/NoticeRespVO.java b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/notice/vo/NoticeRespVO.java index bfa986b04..2c8e538b4 100644 --- a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/notice/vo/NoticeRespVO.java +++ b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/notice/vo/NoticeRespVO.java @@ -1,21 +1,21 @@ package cn.iocoder.yudao.module.system.controller.admin.notice.vo; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; +import io.swagger.v3.oas.annotations.media.Schema; +import io.swagger.v3.oas.annotations.media.Schema; import lombok.Data; import lombok.EqualsAndHashCode; import java.time.LocalDateTime; -@ApiModel("管理后台 - 通知公告信息 Response VO") +@Schema(description = "管理后台 - 通知公告信息 Response VO") @Data @EqualsAndHashCode(callSuper = true) public class NoticeRespVO extends NoticeBaseVO { - @ApiModelProperty(value = "通知公告序号", required = true, example = "1024") + @Schema(description = "通知公告序号", required = true, example = "1024") private Long id; - @ApiModelProperty(value = "创建时间", required = true, example = "时间戳格式") + @Schema(description = "创建时间", required = true, example = "时间戳格式") private LocalDateTime createTime; -} +} \ No newline at end of file diff --git a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/notice/vo/NoticeUpdateReqVO.java b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/notice/vo/NoticeUpdateReqVO.java index 30f4a3720..cae59e4f9 100644 --- a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/notice/vo/NoticeUpdateReqVO.java +++ b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/notice/vo/NoticeUpdateReqVO.java @@ -1,19 +1,19 @@ package cn.iocoder.yudao.module.system.controller.admin.notice.vo; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; +import io.swagger.v3.oas.annotations.media.Schema; +import io.swagger.v3.oas.annotations.media.Schema; import lombok.Data; import lombok.EqualsAndHashCode; import javax.validation.constraints.NotNull; -@ApiModel("管理后台 - 岗位公告更新 Request VO") +@Schema(description = "管理后台 - 岗位公告更新 Request VO") @Data @EqualsAndHashCode(callSuper = true) public class NoticeUpdateReqVO extends NoticeBaseVO { - @ApiModelProperty(value = "岗位公告编号", required = true, example = "1024") + @Schema(description = "岗位公告编号", required = true, example = "1024") @NotNull(message = "岗位公告编号不能为空") private Long id; -} +} \ No newline at end of file diff --git a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/notify/NotifyMessageController.java b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/notify/NotifyMessageController.java index 51d236110..e9419572f 100644 --- a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/notify/NotifyMessageController.java +++ b/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 import cn.iocoder.yudao.module.system.convert.notify.NotifyMessageConvert; import cn.iocoder.yudao.module.system.dal.dataobject.notify.NotifyMessageDO; import cn.iocoder.yudao.module.system.service.notify.NotifyMessageService; -import io.swagger.annotations.Api; -import io.swagger.annotations.ApiImplicitParam; -import io.swagger.annotations.ApiOperation; +import io.swagger.v3.oas.annotations.tags.Tag; +import io.swagger.v3.oas.annotations.Parameter; +import io.swagger.v3.oas.annotations.Operation; import org.springframework.security.access.prepost.PreAuthorize; import org.springframework.validation.annotation.Validated; import org.springframework.web.bind.annotation.*; @@ -23,7 +23,7 @@ import java.util.List; import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success; import static cn.iocoder.yudao.framework.security.core.util.SecurityFrameworkUtils.getLoginUserId; -@Api(tags = "管理后台 - 我的站内信") +@Tag(name = "管理后台 - 我的站内信") @RestController @RequestMapping("/system/notify-message") @Validated @@ -35,8 +35,8 @@ public class NotifyMessageController { // ========== 管理所有的站内信 ========== @GetMapping("/get") - @ApiOperation("获得站内信") - @ApiImplicitParam(name = "id", value = "编号", required = true, example = "1024", dataTypeClass = Long.class) + @Operation(summary = "获得站内信") + @Parameter(name = "id", description = "编号", required = true, example = "1024") @PreAuthorize("@ss.hasPermission('system:notify-message:query')") public CommonResult getNotifyMessage(@RequestParam("id") Long id) { NotifyMessageDO notifyMessage = notifyMessageService.getNotifyMessage(id); @@ -44,7 +44,7 @@ public class NotifyMessageController { } @GetMapping("/page") - @ApiOperation("获得站内信分页") + @Operation(summary = "获得站内信分页") @PreAuthorize("@ss.hasPermission('system:notify-message:query')") public CommonResult> getNotifyMessagePage(@Valid NotifyMessagePageReqVO pageVO) { PageResult pageResult = notifyMessageService.getNotifyMessagePage(pageVO); @@ -54,7 +54,7 @@ public class NotifyMessageController { // ========== 查看自己的站内信 ========== @GetMapping("/my-page") - @ApiOperation("获得我的站内信分页") + @Operation(summary = "获得我的站内信分页") public CommonResult> getMyMyNotifyMessagePage(@Valid NotifyMessageMyPageReqVO pageVO) { PageResult pageResult = notifyMessageService.getMyMyNotifyMessagePage(pageVO, getLoginUserId(), UserTypeEnum.ADMIN.getValue()); @@ -62,23 +62,23 @@ public class NotifyMessageController { } @PutMapping("/update-read") - @ApiOperation("标记站内信为已读") - @ApiImplicitParam(name = "ids", value = "编号列表", required = true, example = "1024,2048", dataTypeClass = List.class) + @Operation(summary = "标记站内信为已读") + @Parameter(name = "ids", description = "编号列表", required = true, example = "1024,2048", dataTypeClass = List.class) public CommonResult updateNotifyMessageRead(@RequestParam("ids") List ids) { notifyMessageService.updateNotifyMessageRead(ids, getLoginUserId(), UserTypeEnum.ADMIN.getValue()); return success(Boolean.TRUE); } @PutMapping("/update-all-read") - @ApiOperation("标记所有站内信为已读") + @Operation(summary = "标记所有站内信为已读") public CommonResult updateAllNotifyMessageRead() { notifyMessageService.updateAllNotifyMessageRead(getLoginUserId(), UserTypeEnum.ADMIN.getValue()); return success(Boolean.TRUE); } @GetMapping("/get-unread-list") - @ApiOperation("获取当前用户的最新站内信列表,默认 10 条") - @ApiImplicitParam(name = "size", value = "10", defaultValue = "10", dataTypeClass = Integer.class) + @Operation(summary = "获取当前用户的最新站内信列表,默认 10 条") + @Parameter(name = "size", description = "10", defaultValue = "10") public CommonResult> getUnreadNotifyMessageList( @RequestParam(name = "size", defaultValue = "10") Integer size) { List list = notifyMessageService.getUnreadNotifyMessageList( @@ -87,9 +87,9 @@ public class NotifyMessageController { } @GetMapping("/get-unread-count") - @ApiOperation("获得当前用户的未读站内信数量") + @Operation(summary = "获得当前用户的未读站内信数量") public CommonResult getUnreadNotifyMessageCount() { return success(notifyMessageService.getUnreadNotifyMessageCount(getLoginUserId(), UserTypeEnum.ADMIN.getValue())); } -} +} \ No newline at end of file diff --git a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/notify/NotifyTemplateController.java b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/notify/NotifyTemplateController.java index c90145dcd..0db19ce26 100644 --- a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/notify/NotifyTemplateController.java +++ b/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; import cn.iocoder.yudao.module.system.dal.dataobject.notify.NotifyTemplateDO; import cn.iocoder.yudao.module.system.service.notify.NotifySendService; import cn.iocoder.yudao.module.system.service.notify.NotifyTemplateService; -import io.swagger.annotations.Api; -import io.swagger.annotations.ApiImplicitParam; -import io.swagger.annotations.ApiOperation; +import io.swagger.v3.oas.annotations.tags.Tag; +import io.swagger.v3.oas.annotations.Parameter; +import io.swagger.v3.oas.annotations.Operation; import org.springframework.security.access.prepost.PreAuthorize; import org.springframework.validation.annotation.Validated; import org.springframework.web.bind.annotation.*; @@ -19,7 +19,7 @@ import javax.validation.Valid; import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success; -@Api(tags = "管理后台 - 站内信模版") +@Tag(name = "管理后台 - 站内信模版") @RestController @RequestMapping("/system/notify-template") @Validated @@ -32,14 +32,14 @@ public class NotifyTemplateController { private NotifySendService notifySendService; @PostMapping("/create") - @ApiOperation("创建站内信模版") + @Operation(summary = "创建站内信模版") @PreAuthorize("@ss.hasPermission('system:notify-template:create')") public CommonResult createNotifyTemplate(@Valid @RequestBody NotifyTemplateCreateReqVO createReqVO) { return success(notifyTemplateService.createNotifyTemplate(createReqVO)); } @PutMapping("/update") - @ApiOperation("更新站内信模版") + @Operation(summary = "更新站内信模版") @PreAuthorize("@ss.hasPermission('system:notify-template:update')") public CommonResult updateNotifyTemplate(@Valid @RequestBody NotifyTemplateUpdateReqVO updateReqVO) { notifyTemplateService.updateNotifyTemplate(updateReqVO); @@ -47,8 +47,8 @@ public class NotifyTemplateController { } @DeleteMapping("/delete") - @ApiOperation("删除站内信模版") - @ApiImplicitParam(name = "id", value = "编号", required = true, dataTypeClass = Long.class) + @Operation(summary = "删除站内信模版") + @Parameter(name = "id", description = "编号", required = true) @PreAuthorize("@ss.hasPermission('system:notify-template:delete')") public CommonResult deleteNotifyTemplate(@RequestParam("id") Long id) { notifyTemplateService.deleteNotifyTemplate(id); @@ -56,8 +56,8 @@ public class NotifyTemplateController { } @GetMapping("/get") - @ApiOperation("获得站内信模版") - @ApiImplicitParam(name = "id", value = "编号", required = true, example = "1024", dataTypeClass = Long.class) + @Operation(summary = "获得站内信模版") + @Parameter(name = "id", description = "编号", required = true, example = "1024") @PreAuthorize("@ss.hasPermission('system:notify-template:query')") public CommonResult getNotifyTemplate(@RequestParam("id") Long id) { NotifyTemplateDO notifyTemplate = notifyTemplateService.getNotifyTemplate(id); @@ -65,7 +65,7 @@ public class NotifyTemplateController { } @GetMapping("/page") - @ApiOperation("获得站内信模版分页") + @Operation(summary = "获得站内信模版分页") @PreAuthorize("@ss.hasPermission('system:notify-template:query')") public CommonResult> getNotifyTemplatePage(@Valid NotifyTemplatePageReqVO pageVO) { PageResult pageResult = notifyTemplateService.getNotifyTemplatePage(pageVO); @@ -73,11 +73,11 @@ public class NotifyTemplateController { } @PostMapping("/send-notify") - @ApiOperation("发送站内信") + @Operation(summary = "发送站内信") @PreAuthorize("@ss.hasPermission('system:notify-template:send-notify')") public CommonResult sendNotify(@Valid @RequestBody NotifyTemplateSendReqVO sendReqVO) { return success(notifySendService.sendSingleNotifyToAdmin(sendReqVO.getUserId(), sendReqVO.getTemplateCode(), sendReqVO.getTemplateParams())); } -} +} \ No newline at end of file diff --git a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/notify/vo/message/NotifyMessageBaseVO.java b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/notify/vo/message/NotifyMessageBaseVO.java index 674afcd8e..7e18ff9d4 100644 --- a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/notify/vo/message/NotifyMessageBaseVO.java +++ b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/notify/vo/message/NotifyMessageBaseVO.java @@ -1,6 +1,6 @@ package cn.iocoder.yudao.module.system.controller.admin.notify.vo.message; -import io.swagger.annotations.ApiModelProperty; +import io.swagger.v3.oas.annotations.media.Schema; import lombok.Data; import org.springframework.format.annotation.DateTimeFormat; @@ -17,44 +17,44 @@ import static cn.iocoder.yudao.framework.common.util.date.DateUtils.FORMAT_YEAR_ @Data public class NotifyMessageBaseVO { - @ApiModelProperty(value = "用户编号", required = true, example = "25025") + @Schema(description = "用户编号", required = true, example = "25025") @NotNull(message = "用户编号不能为空") private Long userId; - @ApiModelProperty(value = "用户类型", required = true, example = "1", notes = "参见 UserTypeEnum 枚举") + @Schema(description = "用户类型", required = true, example = "1", notes = "参见 UserTypeEnum 枚举") @NotNull(message = "用户类型不能为空") private Byte userType; - @ApiModelProperty(value = "模版编号", required = true, example = "13013") + @Schema(description = "模版编号", required = true, example = "13013") @NotNull(message = "模版编号不能为空") private Long templateId; - @ApiModelProperty(value = "模板编码", required = true, example = "test_01") + @Schema(description = "模板编码", required = true, example = "test_01") @NotNull(message = "模板编码不能为空") private String templateCode; - @ApiModelProperty(value = "模版发送人名称", required = true, example = "芋艿") + @Schema(description = "模版发送人名称", required = true, example = "芋艿") @NotNull(message = "模版发送人名称不能为空") private String templateNickname; - @ApiModelProperty(value = "模版内容", required = true, example = "测试内容") + @Schema(description = "模版内容", required = true, example = "测试内容") @NotNull(message = "模版内容不能为空") private String templateContent; - @ApiModelProperty(value = "模版类型", required = true, example = "2") + @Schema(description = "模版类型", required = true, example = "2") @NotNull(message = "模版类型不能为空") private Integer templateType; - @ApiModelProperty(value = "模版参数", required = true) + @Schema(description = "模版参数", required = true) @NotNull(message = "模版参数不能为空") private Map templateParams; - @ApiModelProperty(value = "是否已读", required = true, example = "true") + @Schema(description = "是否已读", required = true, example = "true") @NotNull(message = "是否已读不能为空") private Boolean readStatus; - @ApiModelProperty(value = "阅读时间") + @Schema(description = "阅读时间") @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND) private LocalDateTime readTime; -} +} \ No newline at end of file diff --git a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/notify/vo/message/NotifyMessageMyPageReqVO.java b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/notify/vo/message/NotifyMessageMyPageReqVO.java index 8d3eac162..402c4ef36 100644 --- a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/notify/vo/message/NotifyMessageMyPageReqVO.java +++ b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/notify/vo/message/NotifyMessageMyPageReqVO.java @@ -1,8 +1,8 @@ package cn.iocoder.yudao.module.system.controller.admin.notify.vo.message; import cn.iocoder.yudao.framework.common.pojo.PageParam; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; +import io.swagger.v3.oas.annotations.media.Schema; +import io.swagger.v3.oas.annotations.media.Schema; import lombok.Data; import lombok.EqualsAndHashCode; import lombok.ToString; @@ -12,17 +12,17 @@ import java.time.LocalDateTime; import static cn.iocoder.yudao.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND; -@ApiModel("管理后台 - 站内信分页 Request VO") +@Schema(description = "管理后台 - 站内信分页 Request VO") @Data @EqualsAndHashCode(callSuper = true) @ToString(callSuper = true) public class NotifyMessageMyPageReqVO extends PageParam { - @ApiModelProperty(value = "是否已读", example = "true") + @Schema(description = "是否已读", example = "true") private Boolean readStatus; - @ApiModelProperty(value = "创建时间") + @Schema(description = "创建时间") @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND) private LocalDateTime[] createTime; -} +} \ No newline at end of file diff --git a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/notify/vo/message/NotifyMessagePageReqVO.java b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/notify/vo/message/NotifyMessagePageReqVO.java index 9e7c9a1c3..79993cdcd 100644 --- a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/notify/vo/message/NotifyMessagePageReqVO.java +++ b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/notify/vo/message/NotifyMessagePageReqVO.java @@ -1,8 +1,8 @@ package cn.iocoder.yudao.module.system.controller.admin.notify.vo.message; import cn.iocoder.yudao.framework.common.pojo.PageParam; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; +import io.swagger.v3.oas.annotations.media.Schema; +import io.swagger.v3.oas.annotations.media.Schema; import lombok.Data; import lombok.EqualsAndHashCode; import lombok.ToString; @@ -12,26 +12,26 @@ import java.time.LocalDateTime; import static cn.iocoder.yudao.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND; -@ApiModel("管理后台 - 站内信分页 Request VO") +@Schema(description = "管理后台 - 站内信分页 Request VO") @Data @EqualsAndHashCode(callSuper = true) @ToString(callSuper = true) public class NotifyMessagePageReqVO extends PageParam { - @ApiModelProperty(value = "用户编号", example = "25025") + @Schema(description = "用户编号", example = "25025") private Long userId; - @ApiModelProperty(value = "用户类型", example = "1") + @Schema(description = "用户类型", example = "1") private Integer userType; - @ApiModelProperty(value = "模板编码", example = "test_01") + @Schema(description = "模板编码", example = "test_01") private String templateCode; - @ApiModelProperty(value = "模版类型", example = "2") + @Schema(description = "模版类型", example = "2") private Integer templateType; - @ApiModelProperty(value = "创建时间") + @Schema(description = "创建时间") @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND) private LocalDateTime[] createTime; -} +} \ No newline at end of file diff --git a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/notify/vo/message/NotifyMessageRespVO.java b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/notify/vo/message/NotifyMessageRespVO.java index 44e555f25..56842e193 100644 --- a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/notify/vo/message/NotifyMessageRespVO.java +++ b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/notify/vo/message/NotifyMessageRespVO.java @@ -1,23 +1,23 @@ package cn.iocoder.yudao.module.system.controller.admin.notify.vo.message; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; +import io.swagger.v3.oas.annotations.media.Schema; +import io.swagger.v3.oas.annotations.media.Schema; import lombok.Data; import lombok.EqualsAndHashCode; import lombok.ToString; import java.util.Date; -@ApiModel("管理后台 - 站内信 Response VO") +@Schema(description = "管理后台 - 站内信 Response VO") @Data @EqualsAndHashCode(callSuper = true) @ToString(callSuper = true) public class NotifyMessageRespVO extends NotifyMessageBaseVO { - @ApiModelProperty(value = "ID", required = true, example = "1024") + @Schema(description = "ID", required = true, example = "1024") private Long id; - @ApiModelProperty(value = "创建时间", required = true) + @Schema(description = "创建时间", required = true) private Date createTime; -} +} \ No newline at end of file diff --git a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/notify/vo/template/NotifyTemplateBaseVO.java b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/notify/vo/template/NotifyTemplateBaseVO.java index 118f55baf..53e04aa36 100644 --- a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/notify/vo/template/NotifyTemplateBaseVO.java +++ b/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; import cn.iocoder.yudao.framework.common.enums.CommonStatusEnum; import cn.iocoder.yudao.framework.common.validation.InEnum; -import io.swagger.annotations.ApiModelProperty; +import io.swagger.v3.oas.annotations.media.Schema; import lombok.Data; import javax.validation.constraints.NotEmpty; @@ -15,32 +15,32 @@ import javax.validation.constraints.NotNull; @Data public class NotifyTemplateBaseVO { - @ApiModelProperty(value = "模版名称", required = true, example = "测试模版") + @Schema(description = "模版名称", required = true, example = "测试模版") @NotEmpty(message = "模版名称不能为空") private String name; - @ApiModelProperty(value = "模版编码", required = true, example = "SEND_TEST") + @Schema(description = "模版编码", required = true, example = "SEND_TEST") @NotNull(message = "模版编码不能为空") private String code; - @ApiModelProperty(value = "模版类型", required = true, example = "1", notes = "对应 system_notify_template_type 字典") + @Schema(description = "模版类型", required = true, example = "1", notes = "对应 system_notify_template_type 字典") @NotNull(message = "模版类型不能为空") private Integer type; - @ApiModelProperty(value = "发送人名称", required = true, example = "土豆") + @Schema(description = "发送人名称", required = true, example = "土豆") @NotEmpty(message = "发送人名称不能为空") private String nickname; - @ApiModelProperty(value = "模版内容", required = true, example = "我是模版内容") + @Schema(description = "模版内容", required = true, example = "我是模版内容") @NotEmpty(message = "模版内容不能为空") private String content; - @ApiModelProperty(value = "状态", required = true, example = "1", notes = "参见 CommonStatusEnum 枚举") + @Schema(description = "状态", required = true, example = "1", notes = "参见 CommonStatusEnum 枚举") @NotNull(message = "状态不能为空") @InEnum(value = CommonStatusEnum.class, message = "状态必须是 {value}") private Integer status; - @ApiModelProperty(value = "备注", example = "我是备注") + @Schema(description = "备注", example = "我是备注") private String remark; -} +} \ No newline at end of file diff --git a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/notify/vo/template/NotifyTemplatePageReqVO.java b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/notify/vo/template/NotifyTemplatePageReqVO.java index 34965a792..df439432f 100644 --- a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/notify/vo/template/NotifyTemplatePageReqVO.java +++ b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/notify/vo/template/NotifyTemplatePageReqVO.java @@ -1,8 +1,8 @@ package cn.iocoder.yudao.module.system.controller.admin.notify.vo.template; import cn.iocoder.yudao.framework.common.pojo.PageParam; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; +import io.swagger.v3.oas.annotations.media.Schema; +import io.swagger.v3.oas.annotations.media.Schema; import lombok.Data; import lombok.EqualsAndHashCode; import lombok.ToString; @@ -12,23 +12,23 @@ import java.time.LocalDateTime; import static cn.iocoder.yudao.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND; -@ApiModel("管理后台 - 站内信模版分页 Request VO") +@Schema(description = "管理后台 - 站内信模版分页 Request VO") @Data @EqualsAndHashCode(callSuper = true) @ToString(callSuper = true) public class NotifyTemplatePageReqVO extends PageParam { - @ApiModelProperty(value = "模版编码", example = "test_01") + @Schema(description = "模版编码", example = "test_01") private String code; - @ApiModelProperty(value = "模版名称", example = "我是名称") + @Schema(description = "模版名称", example = "我是名称") private String name; - @ApiModelProperty(value = "状态", example = "1", notes = "参见 CommonStatusEnum 枚举类") + @Schema(description = "状态", example = "1", notes = "参见 CommonStatusEnum 枚举类") private Integer status; - @ApiModelProperty(value = "创建时间") + @Schema(description = "创建时间") @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND) private LocalDateTime[] createTime; -} +} \ No newline at end of file diff --git a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/notify/vo/template/NotifyTemplateRespVO.java b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/notify/vo/template/NotifyTemplateRespVO.java index 749d1a191..0011ca024 100644 --- a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/notify/vo/template/NotifyTemplateRespVO.java +++ b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/notify/vo/template/NotifyTemplateRespVO.java @@ -1,7 +1,7 @@ package cn.iocoder.yudao.module.system.controller.admin.notify.vo.template; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; +import io.swagger.v3.oas.annotations.media.Schema; +import io.swagger.v3.oas.annotations.media.Schema; import lombok.Data; import lombok.EqualsAndHashCode; import lombok.ToString; @@ -9,19 +9,19 @@ import lombok.ToString; import java.util.Date; import java.util.List; -@ApiModel("管理后台 - 站内信模版 Response VO") +@Schema(description = "管理后台 - 站内信模版 Response VO") @Data @EqualsAndHashCode(callSuper = true) @ToString(callSuper = true) public class NotifyTemplateRespVO extends NotifyTemplateBaseVO { - @ApiModelProperty(value = "ID", required = true, example = "1024") + @Schema(description = "ID", required = true, example = "1024") private Long id; - @ApiModelProperty(value = "参数数组", example = "name,code") + @Schema(description = "参数数组", example = "name,code") private List params; - @ApiModelProperty(value = "创建时间", required = true) + @Schema(description = "创建时间", required = true) private Date createTime; -} +} \ No newline at end of file diff --git a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/notify/vo/template/NotifyTemplateSendReqVO.java b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/notify/vo/template/NotifyTemplateSendReqVO.java index e078fd845..031e18596 100644 --- a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/notify/vo/template/NotifyTemplateSendReqVO.java +++ b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/notify/vo/template/NotifyTemplateSendReqVO.java @@ -1,25 +1,25 @@ package cn.iocoder.yudao.module.system.controller.admin.notify.vo.template; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; +import io.swagger.v3.oas.annotations.media.Schema; +import io.swagger.v3.oas.annotations.media.Schema; import lombok.Data; import javax.validation.constraints.NotEmpty; import javax.validation.constraints.NotNull; import java.util.Map; -@ApiModel("管理后台 - 站内信模板的发送 Request VO") +@Schema(description = "管理后台 - 站内信模板的发送 Request VO") @Data public class NotifyTemplateSendReqVO { - @ApiModelProperty(value = "用户id", required = true, example = "01") + @Schema(description = "用户id", required = true, example = "01") @NotNull(message = "用户id不能为空") private Long userId; - @ApiModelProperty(value = "模板编码", required = true, example = "01") + @Schema(description = "模板编码", required = true, example = "01") @NotEmpty(message = "模板编码不能为空") private String templateCode; - @ApiModelProperty(value = "模板参数") + @Schema(description = "模板参数") private Map templateParams; -} +} \ No newline at end of file diff --git a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/notify/vo/template/NotifyTemplateUpdateReqVO.java b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/notify/vo/template/NotifyTemplateUpdateReqVO.java index 691807141..b610475da 100644 --- a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/notify/vo/template/NotifyTemplateUpdateReqVO.java +++ b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/notify/vo/template/NotifyTemplateUpdateReqVO.java @@ -1,21 +1,21 @@ package cn.iocoder.yudao.module.system.controller.admin.notify.vo.template; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; +import io.swagger.v3.oas.annotations.media.Schema; +import io.swagger.v3.oas.annotations.media.Schema; import lombok.Data; import lombok.EqualsAndHashCode; import lombok.ToString; import javax.validation.constraints.NotNull; -@ApiModel("管理后台 - 站内信模版更新 Request VO") +@Schema(description = "管理后台 - 站内信模版更新 Request VO") @Data @EqualsAndHashCode(callSuper = true) @ToString(callSuper = true) public class NotifyTemplateUpdateReqVO extends NotifyTemplateBaseVO { - @ApiModelProperty(value = "ID", required = true, example = "1024") + @Schema(description = "ID", required = true, example = "1024") @NotNull(message = "ID 不能为空") private Long id; -} +} \ No newline at end of file diff --git a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/oauth2/OAuth2ClientController.java b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/oauth2/OAuth2ClientController.java index d6b927857..c4ab66787 100755 --- a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/oauth2/OAuth2ClientController.java +++ b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/oauth2/OAuth2ClientController.java @@ -9,9 +9,9 @@ import cn.iocoder.yudao.module.system.controller.admin.oauth2.vo.client.OAuth2Cl import cn.iocoder.yudao.module.system.convert.auth.OAuth2ClientConvert; import cn.iocoder.yudao.module.system.dal.dataobject.oauth2.OAuth2ClientDO; import cn.iocoder.yudao.module.system.service.oauth2.OAuth2ClientService; -import io.swagger.annotations.Api; -import io.swagger.annotations.ApiImplicitParam; -import io.swagger.annotations.ApiOperation; +import io.swagger.v3.oas.annotations.tags.Tag; +import io.swagger.v3.oas.annotations.Parameter; +import io.swagger.v3.oas.annotations.Operation; import org.springframework.security.access.prepost.PreAuthorize; import org.springframework.validation.annotation.Validated; import org.springframework.web.bind.annotation.*; @@ -21,7 +21,7 @@ import javax.validation.Valid; import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success; -@Api(tags = "管理后台 - OAuth2 客户端") +@Tag(name = "管理后台 - OAuth2 客户端") @RestController @RequestMapping("/system/oauth2-client") @Validated @@ -31,14 +31,14 @@ public class OAuth2ClientController { private OAuth2ClientService oAuth2ClientService; @PostMapping("/create") - @ApiOperation("创建 OAuth2 客户端") + @Operation(summary = "创建 OAuth2 客户端") @PreAuthorize("@ss.hasPermission('system:oauth2-client:create')") public CommonResult createOAuth2Client(@Valid @RequestBody OAuth2ClientCreateReqVO createReqVO) { return success(oAuth2ClientService.createOAuth2Client(createReqVO)); } @PutMapping("/update") - @ApiOperation("更新 OAuth2 客户端") + @Operation(summary = "更新 OAuth2 客户端") @PreAuthorize("@ss.hasPermission('system:oauth2-client:update')") public CommonResult updateOAuth2Client(@Valid @RequestBody OAuth2ClientUpdateReqVO updateReqVO) { oAuth2ClientService.updateOAuth2Client(updateReqVO); @@ -46,8 +46,8 @@ public class OAuth2ClientController { } @DeleteMapping("/delete") - @ApiOperation("删除 OAuth2 客户端") - @ApiImplicitParam(name = "id", value = "编号", required = true, dataTypeClass = Long.class) + @Operation(summary = "删除 OAuth2 客户端") + @Parameter(name = "id", description = "编号", required = true) @PreAuthorize("@ss.hasPermission('system:oauth2-client:delete')") public CommonResult deleteOAuth2Client(@RequestParam("id") Long id) { oAuth2ClientService.deleteOAuth2Client(id); @@ -55,8 +55,8 @@ public class OAuth2ClientController { } @GetMapping("/get") - @ApiOperation("获得 OAuth2 客户端") - @ApiImplicitParam(name = "id", value = "编号", required = true, example = "1024", dataTypeClass = Long.class) + @Operation(summary = "获得 OAuth2 客户端") + @Parameter(name = "id", description = "编号", required = true, example = "1024") @PreAuthorize("@ss.hasPermission('system:oauth2-client:query')") public CommonResult getOAuth2Client(@RequestParam("id") Long id) { OAuth2ClientDO oAuth2Client = oAuth2ClientService.getOAuth2Client(id); @@ -64,11 +64,11 @@ public class OAuth2ClientController { } @GetMapping("/page") - @ApiOperation("获得OAuth2 客户端分页") + @Operation(summary = "获得OAuth2 客户端分页") @PreAuthorize("@ss.hasPermission('system:oauth2-client:query')") public CommonResult> getOAuth2ClientPage(@Valid OAuth2ClientPageReqVO pageVO) { PageResult pageResult = oAuth2ClientService.getOAuth2ClientPage(pageVO); return success(OAuth2ClientConvert.INSTANCE.convertPage(pageResult)); } -} +} \ No newline at end of file diff --git a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/oauth2/OAuth2OpenController.java b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/oauth2/OAuth2OpenController.java index 8ab096587..5c4dc9ade 100644 --- a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/oauth2/OAuth2OpenController.java +++ b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/oauth2/OAuth2OpenController.java @@ -22,10 +22,10 @@ import cn.iocoder.yudao.module.system.service.oauth2.OAuth2ClientService; import cn.iocoder.yudao.module.system.service.oauth2.OAuth2GrantService; import cn.iocoder.yudao.module.system.service.oauth2.OAuth2TokenService; import cn.iocoder.yudao.module.system.util.oauth2.OAuth2Utils; -import io.swagger.annotations.Api; -import io.swagger.annotations.ApiImplicitParam; -import io.swagger.annotations.ApiImplicitParams; -import io.swagger.annotations.ApiOperation; +import io.swagger.v3.oas.annotations.tags.Tag; +import io.swagger.v3.oas.annotations.Parameter; +import io.swagger.v3.oas.annotations.Parameters; +import io.swagger.v3.oas.annotations.Operation; import lombok.extern.slf4j.Slf4j; import org.springframework.validation.annotation.Validated; import org.springframework.web.bind.annotation.*; @@ -55,7 +55,7 @@ import static cn.iocoder.yudao.framework.security.core.util.SecurityFrameworkUti * * @author 芋道源码 */ -@Api(tags = "管理后台 - OAuth2.0 授权") +@Tag(name = "管理后台 - OAuth2.0 授权") @RestController @RequestMapping("/system/oauth2") @Validated @@ -84,16 +84,16 @@ public class OAuth2OpenController { */ @PostMapping("/token") @PermitAll - @ApiOperation(value = "获得访问令牌", notes = "适合 code 授权码模式,或者 implicit 简化模式;在 sso.vue 单点登录界面被【获取】调用") - @ApiImplicitParams({ - @ApiImplicitParam(name = "grant_type", required = true, value = "授权类型", example = "code", dataTypeClass = String.class), - @ApiImplicitParam(name = "code", value = "授权范围", example = "userinfo.read", dataTypeClass = String.class), - @ApiImplicitParam(name = "redirect_uri", value = "重定向 URI", example = "https://www.iocoder.cn", dataTypeClass = String.class), - @ApiImplicitParam(name = "state", value = "状态", example = "1", dataTypeClass = String.class), - @ApiImplicitParam(name = "username", example = "tudou", dataTypeClass = String.class), - @ApiImplicitParam(name = "password", example = "cai", dataTypeClass = String.class), // 多个使用空格分隔 - @ApiImplicitParam(name = "scope", example = "user_info", dataTypeClass = String.class), - @ApiImplicitParam(name = "refresh_token", example = "123424233", dataTypeClass = String.class), + @Operation(summary = "获得访问令牌", description = "适合 code 授权码模式,或者 implicit 简化模式;在 sso.vue 单点登录界面被【获取】调用") + @Parameters({ + @Parameter(name = "grant_type", required = true, description = "授权类型", example = "code"), + @Parameter(name = "code", description = "授权范围", example = "userinfo.read"), + @Parameter(name = "redirect_uri", description = "重定向 URI", example = "https://www.iocoder.cn"), + @Parameter(name = "state", description = "状态", example = "1"), + @Parameter(name = "username", example = "tudou"), + @Parameter(name = "password", example = "cai"), // 多个使用空格分隔 + @Parameter(name = "scope", example = "user_info"), + @Parameter(name = "refresh_token", example = "123424233"), }) @OperateLog(enable = false) // 避免 Post 请求被记录操作日志 public CommonResult postAccessToken(HttpServletRequest request, @@ -144,8 +144,8 @@ public class OAuth2OpenController { @DeleteMapping("/token") @PermitAll - @ApiOperation(value = "删除访问令牌") - @ApiImplicitParam(name = "token", required = true, value = "访问令牌", example = "biu", dataTypeClass = String.class) + @Operation(summary = "删除访问令牌") + @Parameter(name = "token", required = true, description = "访问令牌", example = "biu") @OperateLog(enable = false) // 避免 Post 请求被记录操作日志 public CommonResult revokeToken(HttpServletRequest request, @RequestParam("token") String token) { @@ -163,8 +163,8 @@ public class OAuth2OpenController { */ @PostMapping("/check-token") @PermitAll - @ApiOperation(value = "校验访问令牌") - @ApiImplicitParam(name = "token", required = true, value = "访问令牌", example = "biu", dataTypeClass = String.class) + @Operation(summary = "校验访问令牌") + @Parameter(name = "token", required = true, description = "访问令牌", example = "biu") @OperateLog(enable = false) // 避免 Post 请求被记录操作日志 public CommonResult checkToken(HttpServletRequest request, @RequestParam("token") String token) { @@ -183,8 +183,8 @@ public class OAuth2OpenController { * 对应 Spring Security OAuth 的 AuthorizationEndpoint 类的 authorize 方法 */ @GetMapping("/authorize") - @ApiOperation(value = "获得授权信息", notes = "适合 code 授权码模式,或者 implicit 简化模式;在 sso.vue 单点登录界面被【获取】调用") - @ApiImplicitParam(name = "clientId", required = true, value = "客户端编号", example = "tudou", dataTypeClass = String.class) + @Operation(summary = "获得授权信息", description = "适合 code 授权码模式,或者 implicit 简化模式;在 sso.vue 单点登录界面被【获取】调用") + @Parameter(name = "clientId", required = true, description = "客户端编号", example = "tudou") public CommonResult authorize(@RequestParam("clientId") String clientId) { // 0. 校验用户已经登录。通过 Spring Security 实现 @@ -207,14 +207,14 @@ public class OAuth2OpenController { * 因为前后端分离,Axios 无法很好的处理 302 重定向,所以和 Spring Security OAuth 略有不同,返回结果是重定向的 URL,剩余交给前端处理 */ @PostMapping("/authorize") - @ApiOperation(value = "申请授权", notes = "适合 code 授权码模式,或者 implicit 简化模式;在 sso.vue 单点登录界面被【提交】调用") - @ApiImplicitParams({ - @ApiImplicitParam(name = "response_type", required = true, value = "响应类型", example = "code", dataTypeClass = String.class), - @ApiImplicitParam(name = "client_id", required = true, value = "客户端编号", example = "tudou", dataTypeClass = String.class), - @ApiImplicitParam(name = "scope", value = "授权范围", example = "userinfo.read", dataTypeClass = String.class), // 使用 Map 格式,Spring MVC 暂时不支持这么接收参数 - @ApiImplicitParam(name = "redirect_uri", required = true, value = "重定向 URI", example = "https://www.iocoder.cn", dataTypeClass = String.class), - @ApiImplicitParam(name = "auto_approve", required = true, value = "用户是否接受", example = "true", dataTypeClass = Boolean.class), - @ApiImplicitParam(name = "state", example = "1", dataTypeClass = String.class) + @Operation(summary = "申请授权", description = "适合 code 授权码模式,或者 implicit 简化模式;在 sso.vue 单点登录界面被【提交】调用") + @Parameters({ + @Parameter(name = "response_type", required = true, description = "响应类型", example = "code"), + @Parameter(name = "client_id", required = true, description = "客户端编号", example = "tudou"), + @Parameter(name = "scope", description = "授权范围", example = "userinfo.read"), // 使用 Map 格式,Spring MVC 暂时不支持这么接收参数 + @Parameter(name = "redirect_uri", required = true, description = "重定向 URI", example = "https://www.iocoder.cn"), + @Parameter(name = "auto_approve", required = true, description = "用户是否接受", example = "true", dataTypeClass = Boolean.class), + @Parameter(name = "state", example = "1") }) @OperateLog(enable = false) // 避免 Post 请求被记录操作日志 public CommonResult approveOrDeny(@RequestParam("response_type") String responseType, @@ -299,4 +299,4 @@ public class OAuth2OpenController { return clientIdAndSecret; } -} +} \ No newline at end of file diff --git a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/oauth2/OAuth2TokenController.java b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/oauth2/OAuth2TokenController.java index c055a19df..73f7e5c23 100644 --- a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/oauth2/OAuth2TokenController.java +++ b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/oauth2/OAuth2TokenController.java @@ -9,9 +9,9 @@ import cn.iocoder.yudao.module.system.dal.dataobject.oauth2.OAuth2AccessTokenDO; import cn.iocoder.yudao.module.system.enums.logger.LoginLogTypeEnum; import cn.iocoder.yudao.module.system.service.auth.AdminAuthService; import cn.iocoder.yudao.module.system.service.oauth2.OAuth2TokenService; -import io.swagger.annotations.Api; -import io.swagger.annotations.ApiImplicitParam; -import io.swagger.annotations.ApiOperation; +import io.swagger.v3.oas.annotations.tags.Tag; +import io.swagger.v3.oas.annotations.Parameter; +import io.swagger.v3.oas.annotations.Operation; import org.springframework.security.access.prepost.PreAuthorize; import org.springframework.web.bind.annotation.*; @@ -20,7 +20,7 @@ import javax.validation.Valid; import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success; -@Api(tags = "管理后台 - OAuth2.0 令牌") +@Tag(name = "管理后台 - OAuth2.0 令牌") @RestController @RequestMapping("/system/oauth2-token") public class OAuth2TokenController { @@ -31,7 +31,7 @@ public class OAuth2TokenController { private AdminAuthService authService; @GetMapping("/page") - @ApiOperation(value = "获得访问令牌分页", notes = "只返回有效期内的") + @Operation(summary = "获得访问令牌分页", description = "只返回有效期内的") @PreAuthorize("@ss.hasPermission('system:oauth2-token:page')") public CommonResult> getAccessTokenPage(@Valid OAuth2AccessTokenPageReqVO reqVO) { PageResult pageResult = oauth2TokenService.getAccessTokenPage(reqVO); @@ -39,12 +39,12 @@ public class OAuth2TokenController { } @DeleteMapping("/delete") - @ApiOperation("删除访问令牌") - @ApiImplicitParam(name = "accessToken", value = "访问令牌", required = true, dataTypeClass = String.class, example = "tudou") + @Operation(summary = "删除访问令牌") + @Parameter(name = "accessToken", description = "访问令牌", required = true, example = "tudou") @PreAuthorize("@ss.hasPermission('system:oauth2-token:delete')") public CommonResult deleteAccessToken(@RequestParam("accessToken") String accessToken) { authService.logout(accessToken, LoginLogTypeEnum.LOGOUT_DELETE.getType()); return success(true); } -} +} \ No newline at end of file diff --git a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/oauth2/OAuth2UserController.java b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/oauth2/OAuth2UserController.java index b31ea671c..c770013ea 100644 --- a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/oauth2/OAuth2UserController.java +++ b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/oauth2/OAuth2UserController.java @@ -11,8 +11,8 @@ import cn.iocoder.yudao.module.system.dal.dataobject.user.AdminUserDO; import cn.iocoder.yudao.module.system.service.dept.DeptService; import cn.iocoder.yudao.module.system.service.dept.PostService; import cn.iocoder.yudao.module.system.service.user.AdminUserService; -import io.swagger.annotations.Api; -import io.swagger.annotations.ApiOperation; +import io.swagger.v3.oas.annotations.tags.Tag; +import io.swagger.v3.oas.annotations.Operation; import lombok.extern.slf4j.Slf4j; import org.springframework.security.access.prepost.PreAuthorize; import org.springframework.validation.annotation.Validated; @@ -33,7 +33,7 @@ import static cn.iocoder.yudao.framework.security.core.util.SecurityFrameworkUti * * @author 芋道源码 */ -@Api(tags = "管理后台 - OAuth2.0 用户") +@Tag(name = "管理后台 - OAuth2.0 用户") @RestController @RequestMapping("/system/oauth2/user") @Validated @@ -48,7 +48,7 @@ public class OAuth2UserController { private PostService postService; @GetMapping("/get") - @ApiOperation("获得用户基本信息") + @Operation(summary = "获得用户基本信息") @PreAuthorize("@ss.hasScope('user.read')") // public CommonResult getUserInfo() { // 获得用户基本信息 @@ -68,7 +68,7 @@ public class OAuth2UserController { } @PutMapping("/update") - @ApiOperation("更新用户基本信息") + @Operation(summary = "更新用户基本信息") @PreAuthorize("@ss.hasScope('user.write')") public CommonResult updateUserInfo(@Valid @RequestBody OAuth2UserUpdateReqVO reqVO) { // 这里将 UserProfileUpdateReqVO =》UserProfileUpdateReqVO 对象,实现接口的复用。 @@ -77,4 +77,4 @@ public class OAuth2UserController { return success(true); } -} +} \ No newline at end of file diff --git a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/oauth2/vo/client/OAuth2ClientBaseVO.java b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/oauth2/vo/client/OAuth2ClientBaseVO.java index dbd74e552..83f81ab0d 100755 --- a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/oauth2/vo/client/OAuth2ClientBaseVO.java +++ b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/oauth2/vo/client/OAuth2ClientBaseVO.java @@ -2,7 +2,7 @@ package cn.iocoder.yudao.module.system.controller.admin.oauth2.vo.client; import cn.hutool.core.util.StrUtil; import cn.iocoder.yudao.framework.common.util.json.JsonUtils; -import io.swagger.annotations.ApiModelProperty; +import io.swagger.v3.oas.annotations.media.Schema; import lombok.Data; import org.hibernate.validator.constraints.URL; @@ -18,60 +18,60 @@ import java.util.List; @Data public class OAuth2ClientBaseVO { - @ApiModelProperty(value = "客户端编号", required = true, example = "tudou") + @Schema(description = "客户端编号", required = true, example = "tudou") @NotNull(message = "客户端编号不能为空") private String clientId; - @ApiModelProperty(value = "客户端密钥", required = true, example = "fan") + @Schema(description = "客户端密钥", required = true, example = "fan") @NotNull(message = "客户端密钥不能为空") private String secret; - @ApiModelProperty(value = "应用名", required = true, example = "土豆") + @Schema(description = "应用名", required = true, example = "土豆") @NotNull(message = "应用名不能为空") private String name; - @ApiModelProperty(value = "应用图标", required = true, example = "https://www.iocoder.cn/xx.png") + @Schema(description = "应用图标", required = true, example = "https://www.iocoder.cn/xx.png") @NotNull(message = "应用图标不能为空") @URL(message = "应用图标的地址不正确") private String logo; - @ApiModelProperty(value = "应用描述", example = "我是一个应用") + @Schema(description = "应用描述", example = "我是一个应用") private String description; - @ApiModelProperty(value = "状态", required = true, example = "1", notes = "参见 CommonStatusEnum 枚举") + @Schema(description = "状态", required = true, example = "1", notes = "参见 CommonStatusEnum 枚举") @NotNull(message = "状态不能为空") private Integer status; - @ApiModelProperty(value = "访问令牌的有效期", required = true, example = "8640") + @Schema(description = "访问令牌的有效期", required = true, example = "8640") @NotNull(message = "访问令牌的有效期不能为空") private Integer accessTokenValiditySeconds; - @ApiModelProperty(value = "刷新令牌的有效期", required = true, example = "8640000") + @Schema(description = "刷新令牌的有效期", required = true, example = "8640000") @NotNull(message = "刷新令牌的有效期不能为空") private Integer refreshTokenValiditySeconds; - @ApiModelProperty(value = "可重定向的 URI 地址", required = true, example = "https://www.iocoder.cn") + @Schema(description = "可重定向的 URI 地址", required = true, example = "https://www.iocoder.cn") @NotNull(message = "可重定向的 URI 地址不能为空") private List<@NotEmpty(message = "重定向的 URI 不能为空") @URL(message = "重定向的 URI 格式不正确") String> redirectUris; - @ApiModelProperty(value = "授权类型", required = true, example = "password", notes = "参见 OAuth2GrantTypeEnum 枚举") + @Schema(description = "授权类型", required = true, example = "password", notes = "参见 OAuth2GrantTypeEnum 枚举") @NotNull(message = "授权类型不能为空") private List authorizedGrantTypes; - @ApiModelProperty(value = "授权范围", example = "user_info") + @Schema(description = "授权范围", example = "user_info") private List scopes; - @ApiModelProperty(value = "自动通过的授权范围", example = "user_info") + @Schema(description = "自动通过的授权范围", example = "user_info") private List autoApproveScopes; - @ApiModelProperty(value = "权限", example = "system:user:query") + @Schema(description = "权限", example = "system:user:query") private List authorities; - @ApiModelProperty(value = "资源", example = "1024") + @Schema(description = "资源", example = "1024") private List resourceIds; - @ApiModelProperty(value = "附加信息", example = "{yunai: true}") + @Schema(description = "附加信息", example = "{yunai: true}") private String additionalInformation; @AssertTrue(message = "附加信息必须是 JSON 格式") @@ -79,4 +79,4 @@ public class OAuth2ClientBaseVO { return StrUtil.isEmpty(additionalInformation) || JsonUtils.isJson(additionalInformation); } -} +} \ No newline at end of file diff --git a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/oauth2/vo/client/OAuth2ClientCreateReqVO.java b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/oauth2/vo/client/OAuth2ClientCreateReqVO.java index b241277ac..bc01a1d3d 100755 --- a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/oauth2/vo/client/OAuth2ClientCreateReqVO.java +++ b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/oauth2/vo/client/OAuth2ClientCreateReqVO.java @@ -3,10 +3,10 @@ package cn.iocoder.yudao.module.system.controller.admin.oauth2.vo.client; import lombok.*; import io.swagger.annotations.*; -@ApiModel("管理后台 - OAuth2 客户端创建 Request VO") +@Schema(description = "管理后台 - OAuth2 客户端创建 Request VO") @Data @EqualsAndHashCode(callSuper = true) @ToString(callSuper = true) public class OAuth2ClientCreateReqVO extends OAuth2ClientBaseVO { -} +} \ No newline at end of file diff --git a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/oauth2/vo/client/OAuth2ClientPageReqVO.java b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/oauth2/vo/client/OAuth2ClientPageReqVO.java index 286fc73ac..296991e34 100755 --- a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/oauth2/vo/client/OAuth2ClientPageReqVO.java +++ b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/oauth2/vo/client/OAuth2ClientPageReqVO.java @@ -4,16 +4,16 @@ import lombok.*; import io.swagger.annotations.*; import cn.iocoder.yudao.framework.common.pojo.PageParam; -@ApiModel("管理后台 - OAuth2 客户端分页 Request VO") +@Schema(description = "管理后台 - OAuth2 客户端分页 Request VO") @Data @EqualsAndHashCode(callSuper = true) @ToString(callSuper = true) public class OAuth2ClientPageReqVO extends PageParam { - @ApiModelProperty(value = "应用名", example = "土豆", notes = "模糊匹配") + @Schema(description = "应用名", example = "土豆", notes = "模糊匹配") private String name; - @ApiModelProperty(value = "状态", example = "1", notes = "参见 CommonStatusEnum 枚举") + @Schema(description = "状态", example = "1", notes = "参见 CommonStatusEnum 枚举") private Integer status; -} +} \ No newline at end of file diff --git a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/oauth2/vo/client/OAuth2ClientRespVO.java b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/oauth2/vo/client/OAuth2ClientRespVO.java index f4bdf4cc7..6cec89c32 100755 --- a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/oauth2/vo/client/OAuth2ClientRespVO.java +++ b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/oauth2/vo/client/OAuth2ClientRespVO.java @@ -1,23 +1,23 @@ package cn.iocoder.yudao.module.system.controller.admin.oauth2.vo.client; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; +import io.swagger.v3.oas.annotations.media.Schema; +import io.swagger.v3.oas.annotations.media.Schema; import lombok.Data; import lombok.EqualsAndHashCode; import lombok.ToString; import java.time.LocalDateTime; -@ApiModel("管理后台 - OAuth2 客户端 Response VO") +@Schema(description = "管理后台 - OAuth2 客户端 Response VO") @Data @EqualsAndHashCode(callSuper = true) @ToString(callSuper = true) public class OAuth2ClientRespVO extends OAuth2ClientBaseVO { - @ApiModelProperty(value = "编号", required = true, example = "1024") + @Schema(description = "编号", required = true, example = "1024") private Long id; - @ApiModelProperty(value = "创建时间", required = true) + @Schema(description = "创建时间", required = true) private LocalDateTime createTime; -} +} \ No newline at end of file diff --git a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/oauth2/vo/client/OAuth2ClientUpdateReqVO.java b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/oauth2/vo/client/OAuth2ClientUpdateReqVO.java index 024a1511f..985f0d89c 100755 --- a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/oauth2/vo/client/OAuth2ClientUpdateReqVO.java +++ b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/oauth2/vo/client/OAuth2ClientUpdateReqVO.java @@ -1,21 +1,21 @@ package cn.iocoder.yudao.module.system.controller.admin.oauth2.vo.client; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; +import io.swagger.v3.oas.annotations.media.Schema; +import io.swagger.v3.oas.annotations.media.Schema; import lombok.Data; import lombok.EqualsAndHashCode; import lombok.ToString; import javax.validation.constraints.NotNull; -@ApiModel("管理后台 - OAuth2 客户端更新 Request VO") +@Schema(description = "管理后台 - OAuth2 客户端更新 Request VO") @Data @EqualsAndHashCode(callSuper = true) @ToString(callSuper = true) public class OAuth2ClientUpdateReqVO extends OAuth2ClientBaseVO { - @ApiModelProperty(value = "编号", required = true, example = "1024") + @Schema(description = "编号", required = true, example = "1024") @NotNull(message = "编号不能为空") private Long id; -} +} \ No newline at end of file diff --git a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/oauth2/vo/open/OAuth2OpenAccessTokenRespVO.java b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/oauth2/vo/open/OAuth2OpenAccessTokenRespVO.java index 4fdb4e539..d51285638 100644 --- a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/oauth2/vo/open/OAuth2OpenAccessTokenRespVO.java +++ b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/oauth2/vo/open/OAuth2OpenAccessTokenRespVO.java @@ -1,35 +1,35 @@ package cn.iocoder.yudao.module.system.controller.admin.oauth2.vo.open; import com.fasterxml.jackson.annotation.JsonProperty; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; +import io.swagger.v3.oas.annotations.media.Schema; +import io.swagger.v3.oas.annotations.media.Schema; import lombok.AllArgsConstructor; import lombok.Data; import lombok.NoArgsConstructor; -@ApiModel("管理后台 - 【开放接口】访问令牌 Response VO") +@Schema(description = "管理后台 - 【开放接口】访问令牌 Response VO") @Data @NoArgsConstructor @AllArgsConstructor public class OAuth2OpenAccessTokenRespVO { - @ApiModelProperty(value = "访问令牌", required = true, example = "tudou") + @Schema(description = "访问令牌", required = true, example = "tudou") @JsonProperty("access_token") private String accessToken; - @ApiModelProperty(value = "刷新令牌", required = true, example = "nice") + @Schema(description = "刷新令牌", required = true, example = "nice") @JsonProperty("refresh_token") private String refreshToken; - @ApiModelProperty(value = "令牌类型", required = true, example = "bearer") + @Schema(description = "令牌类型", required = true, example = "bearer") @JsonProperty("token_type") private String tokenType; - @ApiModelProperty(value = "过期时间", required = true, example = "42430", notes = "单位:秒") + @Schema(description = "过期时间", required = true, example = "42430", notes = "单位:秒") @JsonProperty("expires_in") private Long expiresIn; - @ApiModelProperty(value = "授权范围", example = "user_info", notes = "如果多个授权范围,使用空格分隔") + @Schema(description = "授权范围", example = "user_info", notes = "如果多个授权范围,使用空格分隔") private String scope; -} +} \ No newline at end of file diff --git a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/oauth2/vo/open/OAuth2OpenAuthorizeInfoRespVO.java b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/oauth2/vo/open/OAuth2OpenAuthorizeInfoRespVO.java index d2a7bb36e..dfc5e96db 100644 --- a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/oauth2/vo/open/OAuth2OpenAuthorizeInfoRespVO.java +++ b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/oauth2/vo/open/OAuth2OpenAuthorizeInfoRespVO.java @@ -1,15 +1,15 @@ package cn.iocoder.yudao.module.system.controller.admin.oauth2.vo.open; import cn.iocoder.yudao.framework.common.core.KeyValue; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; +import io.swagger.v3.oas.annotations.media.Schema; +import io.swagger.v3.oas.annotations.media.Schema; import lombok.AllArgsConstructor; import lombok.Data; import lombok.NoArgsConstructor; import java.util.List; -@ApiModel("管理后台 - 授权页的信息 Response VO") +@Schema(description = "管理后台 - 授权页的信息 Response VO") @Data @NoArgsConstructor @AllArgsConstructor @@ -20,7 +20,7 @@ public class OAuth2OpenAuthorizeInfoRespVO { */ private Client client; - @ApiModelProperty(value = "scope 的选中信息", required = true, notes = "使用 List 保证有序性,Key 是 scope,Value 为是否选中") + @Schema(description = "scope 的选中信息", required = true, notes = "使用 List 保证有序性,Key 是 scope,Value 为是否选中") private List> scopes; @Data @@ -28,12 +28,12 @@ public class OAuth2OpenAuthorizeInfoRespVO { @AllArgsConstructor public static class Client { - @ApiModelProperty(value = "应用名", required = true, example = "土豆") + @Schema(description = "应用名", required = true, example = "土豆") private String name; - @ApiModelProperty(value = "应用图标", required = true, example = "https://www.iocoder.cn/xx.png") + @Schema(description = "应用图标", required = true, example = "https://www.iocoder.cn/xx.png") private String logo; } -} +} \ No newline at end of file diff --git a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/oauth2/vo/open/OAuth2OpenCheckTokenRespVO.java b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/oauth2/vo/open/OAuth2OpenCheckTokenRespVO.java index f23838718..066f0ed5a 100644 --- a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/oauth2/vo/open/OAuth2OpenCheckTokenRespVO.java +++ b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/oauth2/vo/open/OAuth2OpenCheckTokenRespVO.java @@ -1,40 +1,40 @@ package cn.iocoder.yudao.module.system.controller.admin.oauth2.vo.open; import com.fasterxml.jackson.annotation.JsonProperty; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; +import io.swagger.v3.oas.annotations.media.Schema; +import io.swagger.v3.oas.annotations.media.Schema; import lombok.AllArgsConstructor; import lombok.Data; import lombok.NoArgsConstructor; import java.util.List; -@ApiModel("管理后台 - 【开放接口】校验令牌 Response VO") +@Schema(description = "管理后台 - 【开放接口】校验令牌 Response VO") @Data @NoArgsConstructor @AllArgsConstructor public class OAuth2OpenCheckTokenRespVO { - @ApiModelProperty(value = "用户编号", required = true, example = "666") + @Schema(description = "用户编号", required = true, example = "666") @JsonProperty("user_id") private Long userId; - @ApiModelProperty(value = "用户类型", required = true, example = "2", notes = "参见 UserTypeEnum 枚举") + @Schema(description = "用户类型", required = true, example = "2", notes = "参见 UserTypeEnum 枚举") @JsonProperty("user_type") private Integer userType; - @ApiModelProperty(value = "租户编号", required = true, example = "1024") + @Schema(description = "租户编号", required = true, example = "1024") @JsonProperty("tenant_id") private Long tenantId; - @ApiModelProperty(value = "客户端编号", required = true, example = "car") + @Schema(description = "客户端编号", required = true, example = "car") private String clientId; - @ApiModelProperty(value = "授权范围", required = true, example = "user_info") + @Schema(description = "授权范围", required = true, example = "user_info") private List scopes; - @ApiModelProperty(value = "访问令牌", required = true, example = "tudou") + @Schema(description = "访问令牌", required = true, example = "tudou") @JsonProperty("access_token") private String accessToken; - @ApiModelProperty(value = "过期时间", required = true, example = "1593092157", notes = "时间戳 / 1000,即单位:秒") + @Schema(description = "过期时间", required = true, example = "1593092157", notes = "时间戳 / 1000,即单位:秒") private Long exp; -} +} \ No newline at end of file diff --git a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/oauth2/vo/token/OAuth2AccessTokenPageReqVO.java b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/oauth2/vo/token/OAuth2AccessTokenPageReqVO.java index 65103adc6..4b03b26c4 100644 --- a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/oauth2/vo/token/OAuth2AccessTokenPageReqVO.java +++ b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/oauth2/vo/token/OAuth2AccessTokenPageReqVO.java @@ -1,23 +1,23 @@ package cn.iocoder.yudao.module.system.controller.admin.oauth2.vo.token; import cn.iocoder.yudao.framework.common.pojo.PageParam; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; +import io.swagger.v3.oas.annotations.media.Schema; +import io.swagger.v3.oas.annotations.media.Schema; import lombok.Data; import lombok.EqualsAndHashCode; -@ApiModel("管理后台 - 访问令牌分页 Request VO") +@Schema(description = "管理后台 - 访问令牌分页 Request VO") @Data @EqualsAndHashCode(callSuper = true) public class OAuth2AccessTokenPageReqVO extends PageParam { - @ApiModelProperty(value = "用户编号", required = true, example = "666") + @Schema(description = "用户编号", required = true, example = "666") private Long userId; - @ApiModelProperty(value = "用户类型", required = true, example = "2", notes = "参见 UserTypeEnum 枚举") + @Schema(description = "用户类型", required = true, example = "2", notes = "参见 UserTypeEnum 枚举") private Integer userType; - @ApiModelProperty(value = "客户端编号", required = true, example = "2") + @Schema(description = "客户端编号", required = true, example = "2") private String clientId; -} +} \ No newline at end of file diff --git a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/oauth2/vo/token/OAuth2AccessTokenRespVO.java b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/oauth2/vo/token/OAuth2AccessTokenRespVO.java index 76a2bb7d5..764da10d1 100644 --- a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/oauth2/vo/token/OAuth2AccessTokenRespVO.java +++ b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/oauth2/vo/token/OAuth2AccessTokenRespVO.java @@ -1,41 +1,41 @@ package cn.iocoder.yudao.module.system.controller.admin.oauth2.vo.token; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; +import io.swagger.v3.oas.annotations.media.Schema; +import io.swagger.v3.oas.annotations.media.Schema; import lombok.AllArgsConstructor; import lombok.Data; import lombok.NoArgsConstructor; import java.time.LocalDateTime; -@ApiModel("管理后台 - 访问令牌 Response VO") +@Schema(description = "管理后台 - 访问令牌 Response VO") @Data @NoArgsConstructor @AllArgsConstructor public class OAuth2AccessTokenRespVO { - @ApiModelProperty(value = "编号", required = true, example = "1024") + @Schema(description = "编号", required = true, example = "1024") private Long id; - @ApiModelProperty(value = "访问令牌", required = true, example = "tudou") + @Schema(description = "访问令牌", required = true, example = "tudou") private String accessToken; - @ApiModelProperty(value = "刷新令牌", required = true, example = "nice") + @Schema(description = "刷新令牌", required = true, example = "nice") private String refreshToken; - @ApiModelProperty(value = "用户编号", required = true, example = "666") + @Schema(description = "用户编号", required = true, example = "666") private Long userId; - @ApiModelProperty(value = "用户类型", required = true, example = "2", notes = "参见 UserTypeEnum 枚举") + @Schema(description = "用户类型", required = true, example = "2", notes = "参见 UserTypeEnum 枚举") private Integer userType; - @ApiModelProperty(value = "客户端编号", required = true, example = "2") + @Schema(description = "客户端编号", required = true, example = "2") private String clientId; - @ApiModelProperty(value = "创建时间", required = true) + @Schema(description = "创建时间", required = true) private LocalDateTime createTime; - @ApiModelProperty(value = "过期时间", required = true) + @Schema(description = "过期时间", required = true) private LocalDateTime expiresTime; -} +} \ No newline at end of file diff --git a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/oauth2/vo/user/OAuth2UserInfoRespVO.java b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/oauth2/vo/user/OAuth2UserInfoRespVO.java index ddd7aecc7..d25d9755a 100644 --- a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/oauth2/vo/user/OAuth2UserInfoRespVO.java +++ b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/oauth2/vo/user/OAuth2UserInfoRespVO.java @@ -1,37 +1,37 @@ package cn.iocoder.yudao.module.system.controller.admin.oauth2.vo.user; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; +import io.swagger.v3.oas.annotations.media.Schema; +import io.swagger.v3.oas.annotations.media.Schema; import lombok.AllArgsConstructor; import lombok.Data; import lombok.NoArgsConstructor; import java.util.List; -@ApiModel("管理后台 - OAuth2 获得用户基本信息 Response VO") +@Schema(description = "管理后台 - OAuth2 获得用户基本信息 Response VO") @Data @NoArgsConstructor @AllArgsConstructor public class OAuth2UserInfoRespVO { - @ApiModelProperty(value = "用户编号", required = true, example = "1") + @Schema(description = "用户编号", required = true, example = "1") private Long id; - @ApiModelProperty(value = "用户昵称", required = true, example = "芋艿") + @Schema(description = "用户昵称", required = true, example = "芋艿") private String username; - @ApiModelProperty(value = "用户昵称", required = true, example = "芋道") + @Schema(description = "用户昵称", required = true, example = "芋道") private String nickname; - @ApiModelProperty(value = "用户邮箱", example = "yudao@iocoder.cn") + @Schema(description = "用户邮箱", example = "yudao@iocoder.cn") private String email; - @ApiModelProperty(value = "手机号码", example = "15601691300") + @Schema(description = "手机号码", example = "15601691300") private String mobile; - @ApiModelProperty(value = "用户性别", example = "1", notes = "参见 SexEnum 枚举类") + @Schema(description = "用户性别", example = "1", notes = "参见 SexEnum 枚举类") private Integer sex; - @ApiModelProperty(value = "用户头像", example = "https://www.iocoder.cn/xxx.png") + @Schema(description = "用户头像", example = "https://www.iocoder.cn/xxx.png") private String avatar; /** @@ -44,28 +44,28 @@ public class OAuth2UserInfoRespVO { */ private List posts; - @ApiModel("部门") + @Schema(description = "部门") @Data public static class Dept { - @ApiModelProperty(value = "部门编号", required = true, example = "1") + @Schema(description = "部门编号", required = true, example = "1") private Long id; - @ApiModelProperty(value = "部门名称", required = true, example = "研发部") + @Schema(description = "部门名称", required = true, example = "研发部") private String name; } - @ApiModel("岗位") + @Schema(description = "岗位") @Data public static class Post { - @ApiModelProperty(value = "岗位编号", required = true, example = "1") + @Schema(description = "岗位编号", required = true, example = "1") private Long id; - @ApiModelProperty(value = "岗位名称", required = true, example = "开发") + @Schema(description = "岗位名称", required = true, example = "开发") private String name; } -} +} \ No newline at end of file diff --git a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/oauth2/vo/user/OAuth2UserUpdateReqVO.java b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/oauth2/vo/user/OAuth2UserUpdateReqVO.java index 16082a75e..042560eec 100644 --- a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/oauth2/vo/user/OAuth2UserUpdateReqVO.java +++ b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/oauth2/vo/user/OAuth2UserUpdateReqVO.java @@ -1,7 +1,7 @@ package cn.iocoder.yudao.module.system.controller.admin.oauth2.vo.user; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; +import io.swagger.v3.oas.annotations.media.Schema; +import io.swagger.v3.oas.annotations.media.Schema; import lombok.AllArgsConstructor; import lombok.Data; import lombok.NoArgsConstructor; @@ -10,26 +10,26 @@ import org.hibernate.validator.constraints.Length; import javax.validation.constraints.Email; import javax.validation.constraints.Size; -@ApiModel("管理后台 - OAuth2 更新用户基本信息 Request VO") +@Schema(description = "管理后台 - OAuth2 更新用户基本信息 Request VO") @Data @NoArgsConstructor @AllArgsConstructor public class OAuth2UserUpdateReqVO { - @ApiModelProperty(value = "用户昵称", required = true, example = "芋艿") + @Schema(description = "用户昵称", required = true, example = "芋艿") @Size(max = 30, message = "用户昵称长度不能超过 30 个字符") private String nickname; - @ApiModelProperty(value = "用户邮箱", example = "yudao@iocoder.cn") + @Schema(description = "用户邮箱", example = "yudao@iocoder.cn") @Email(message = "邮箱格式不正确") @Size(max = 50, message = "邮箱长度不能超过 50 个字符") private String email; - @ApiModelProperty(value = "手机号码", example = "15601691300") + @Schema(description = "手机号码", example = "15601691300") @Length(min = 11, max = 11, message = "手机号长度必须 11 位") private String mobile; - @ApiModelProperty(value = "用户性别", example = "1", notes = "参见 SexEnum 枚举类") + @Schema(description = "用户性别", example = "1", notes = "参见 SexEnum 枚举类") private Integer sex; -} +} \ No newline at end of file diff --git a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/permission/MenuController.java b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/permission/MenuController.java index 56b685b89..aac816e57 100644 --- a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/permission/MenuController.java +++ b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/permission/MenuController.java @@ -6,9 +6,9 @@ import cn.iocoder.yudao.module.system.controller.admin.permission.vo.menu.*; import cn.iocoder.yudao.module.system.convert.permission.MenuConvert; import cn.iocoder.yudao.module.system.dal.dataobject.permission.MenuDO; import cn.iocoder.yudao.module.system.service.permission.MenuService; -import io.swagger.annotations.Api; -import io.swagger.annotations.ApiImplicitParam; -import io.swagger.annotations.ApiOperation; +import io.swagger.v3.oas.annotations.tags.Tag; +import io.swagger.v3.oas.annotations.Parameter; +import io.swagger.v3.oas.annotations.Operation; import org.springframework.security.access.prepost.PreAuthorize; import org.springframework.validation.annotation.Validated; import org.springframework.web.bind.annotation.*; @@ -20,7 +20,7 @@ import java.util.List; import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success; -@Api(tags = "管理后台 - 菜单") +@Tag(name = "管理后台 - 菜单") @RestController @RequestMapping("/system/menu") @Validated @@ -30,7 +30,7 @@ public class MenuController { private MenuService menuService; @PostMapping("/create") - @ApiOperation("创建菜单") + @Operation(summary = "创建菜单") @PreAuthorize("@ss.hasPermission('system:menu:create')") public CommonResult createMenu(@Valid @RequestBody MenuCreateReqVO reqVO) { Long menuId = menuService.createMenu(reqVO); @@ -38,7 +38,7 @@ public class MenuController { } @PutMapping("/update") - @ApiOperation("修改菜单") + @Operation(summary = "修改菜单") @PreAuthorize("@ss.hasPermission('system:menu:update')") public CommonResult updateMenu(@Valid @RequestBody MenuUpdateReqVO reqVO) { menuService.updateMenu(reqVO); @@ -46,8 +46,8 @@ public class MenuController { } @DeleteMapping("/delete") - @ApiOperation("删除菜单") - @ApiImplicitParam(name = "id", value = "角色编号", required= true, example = "1024", dataTypeClass = Long.class) + @Operation(summary = "删除菜单") + @Parameter(name = "id", description = "角色编号", required= true, example = "1024") @PreAuthorize("@ss.hasPermission('system:menu:delete')") public CommonResult deleteMenu(@RequestParam("id") Long id) { menuService.deleteMenu(id); @@ -55,7 +55,7 @@ public class MenuController { } @GetMapping("/list") - @ApiOperation(value = "获取菜单列表", notes = "用于【菜单管理】界面") + @Operation(summary = "获取菜单列表", description = "用于【菜单管理】界面") @PreAuthorize("@ss.hasPermission('system:menu:query')") public CommonResult> getMenuList(MenuListReqVO reqVO) { List list = menuService.getMenuList(reqVO); @@ -64,7 +64,7 @@ public class MenuController { } @GetMapping("/list-all-simple") - @ApiOperation(value = "获取菜单精简信息列表", notes = "只包含被开启的菜单,用于【角色分配菜单】功能的选项。" + + @Operation(summary = "获取菜单精简信息列表", description = "只包含被开启的菜单,用于【角色分配菜单】功能的选项。" + "在多租户的场景下,会只返回租户所在套餐有的菜单") public CommonResult> getSimpleMenuList() { // 获得菜单列表,只要开启状态的 @@ -77,11 +77,11 @@ public class MenuController { } @GetMapping("/get") - @ApiOperation("获取菜单信息") + @Operation(summary = "获取菜单信息") @PreAuthorize("@ss.hasPermission('system:menu:query')") public CommonResult getMenu(Long id) { MenuDO menu = menuService.getMenu(id); return success(MenuConvert.INSTANCE.convert(menu)); } -} +} \ No newline at end of file diff --git a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/permission/PermissionController.java b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/permission/PermissionController.java index 01ae9ea7b..46d148e19 100644 --- a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/permission/PermissionController.java +++ b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/permission/PermissionController.java @@ -7,9 +7,9 @@ import cn.iocoder.yudao.module.system.controller.admin.permission.vo.permission. import cn.iocoder.yudao.module.system.controller.admin.permission.vo.permission.PermissionAssignUserRoleReqVO; import cn.iocoder.yudao.module.system.service.permission.PermissionService; import cn.iocoder.yudao.module.system.service.tenant.TenantService; -import io.swagger.annotations.Api; -import io.swagger.annotations.ApiImplicitParam; -import io.swagger.annotations.ApiOperation; +import io.swagger.v3.oas.annotations.tags.Tag; +import io.swagger.v3.oas.annotations.Parameter; +import io.swagger.v3.oas.annotations.Operation; import org.springframework.security.access.prepost.PreAuthorize; import org.springframework.validation.annotation.Validated; import org.springframework.web.bind.annotation.*; @@ -25,7 +25,7 @@ import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success; * * @author 芋道源码 */ -@Api(tags = "管理后台 - 权限") +@Tag(name = "管理后台 - 权限") @RestController @RequestMapping("/system/permission") public class PermissionController { @@ -35,8 +35,8 @@ public class PermissionController { @Resource private TenantService tenantService; - @ApiOperation("获得角色拥有的菜单编号") - @ApiImplicitParam(name = "roleId", value = "角色编号", required = true, dataTypeClass = Long.class) + @Operation(summary = "获得角色拥有的菜单编号") + @Parameter(name = "roleId", description = "角色编号", required = true) @GetMapping("/list-role-resources") @PreAuthorize("@ss.hasPermission('system:permission:assign-role-menu')") public CommonResult> listRoleMenus(Long roleId) { @@ -44,7 +44,7 @@ public class PermissionController { } @PostMapping("/assign-role-menu") - @ApiOperation("赋予角色菜单") + @Operation(summary = "赋予角色菜单") @PreAuthorize("@ss.hasPermission('system:permission:assign-role-menu')") public CommonResult assignRoleMenu(@Validated @RequestBody PermissionAssignRoleMenuReqVO reqVO) { // 开启多租户的情况下,需要过滤掉未开通的菜单 @@ -56,22 +56,22 @@ public class PermissionController { } @PostMapping("/assign-role-data-scope") - @ApiOperation("赋予角色数据权限") + @Operation(summary = "赋予角色数据权限") @PreAuthorize("@ss.hasPermission('system:permission:assign-role-data-scope')") public CommonResult assignRoleDataScope(@Valid @RequestBody PermissionAssignRoleDataScopeReqVO reqVO) { permissionService.assignRoleDataScope(reqVO.getRoleId(), reqVO.getDataScope(), reqVO.getDataScopeDeptIds()); return success(true); } - @ApiOperation("获得管理员拥有的角色编号列表") - @ApiImplicitParam(name = "userId", value = "用户编号", required = true, dataTypeClass = Long.class) + @Operation(summary = "获得管理员拥有的角色编号列表") + @Parameter(name = "userId", description = "用户编号", required = true) @GetMapping("/list-user-roles") @PreAuthorize("@ss.hasPermission('system:permission:assign-user-role')") public CommonResult> listAdminRoles(@RequestParam("userId") Long userId) { return success(permissionService.getUserRoleIdListByUserId(userId)); } - @ApiOperation("赋予用户角色") + @Operation(summary = "赋予用户角色") @PostMapping("/assign-user-role") @PreAuthorize("@ss.hasPermission('system:permission:assign-user-role')") public CommonResult assignUserRole(@Validated @RequestBody PermissionAssignUserRoleReqVO reqVO) { @@ -79,4 +79,4 @@ public class PermissionController { return success(true); } -} +} \ No newline at end of file diff --git a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/permission/RoleController.java b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/permission/RoleController.java index a8262c7d5..83853f16b 100644 --- a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/permission/RoleController.java +++ b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/permission/RoleController.java @@ -9,9 +9,9 @@ import cn.iocoder.yudao.module.system.controller.admin.permission.vo.role.*; import cn.iocoder.yudao.module.system.convert.permission.RoleConvert; import cn.iocoder.yudao.module.system.dal.dataobject.permission.RoleDO; import cn.iocoder.yudao.module.system.service.permission.RoleService; -import io.swagger.annotations.Api; -import io.swagger.annotations.ApiImplicitParam; -import io.swagger.annotations.ApiOperation; +import io.swagger.v3.oas.annotations.tags.Tag; +import io.swagger.v3.oas.annotations.Parameter; +import io.swagger.v3.oas.annotations.Operation; import org.springframework.security.access.prepost.PreAuthorize; import org.springframework.validation.annotation.Validated; import org.springframework.web.bind.annotation.*; @@ -27,7 +27,7 @@ import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success; import static cn.iocoder.yudao.framework.operatelog.core.enums.OperateTypeEnum.EXPORT; import static java.util.Collections.singleton; -@Api(tags = "管理后台 - 角色") +@Tag(name = "管理后台 - 角色") @RestController @RequestMapping("/system/role") @Validated @@ -37,14 +37,14 @@ public class RoleController { private RoleService roleService; @PostMapping("/create") - @ApiOperation("创建角色") + @Operation(summary = "创建角色") @PreAuthorize("@ss.hasPermission('system:role:create')") public CommonResult createRole(@Valid @RequestBody RoleCreateReqVO reqVO) { return success(roleService.createRole(reqVO, null)); } @PutMapping("/update") - @ApiOperation("修改角色") + @Operation(summary = "修改角色") @PreAuthorize("@ss.hasPermission('system:role:update')") public CommonResult updateRole(@Valid @RequestBody RoleUpdateReqVO reqVO) { roleService.updateRole(reqVO); @@ -52,7 +52,7 @@ public class RoleController { } @PutMapping("/update-status") - @ApiOperation("修改角色状态") + @Operation(summary = "修改角色状态") @PreAuthorize("@ss.hasPermission('system:role:update')") public CommonResult updateRoleStatus(@Valid @RequestBody RoleUpdateStatusReqVO reqVO) { roleService.updateRoleStatus(reqVO.getId(), reqVO.getStatus()); @@ -60,8 +60,8 @@ public class RoleController { } @DeleteMapping("/delete") - @ApiOperation("删除角色") - @ApiImplicitParam(name = "id", value = "角色编号", required = true, example = "1024", dataTypeClass = Long.class) + @Operation(summary = "删除角色") + @Parameter(name = "id", description = "角色编号", required = true, example = "1024") @PreAuthorize("@ss.hasPermission('system:role:delete')") public CommonResult deleteRole(@RequestParam("id") Long id) { roleService.deleteRole(id); @@ -69,7 +69,7 @@ public class RoleController { } @GetMapping("/get") - @ApiOperation("获得角色信息") + @Operation(summary = "获得角色信息") @PreAuthorize("@ss.hasPermission('system:role:query')") public CommonResult getRole(@RequestParam("id") Long id) { RoleDO role = roleService.getRole(id); @@ -77,14 +77,14 @@ public class RoleController { } @GetMapping("/page") - @ApiOperation("获得角色分页") + @Operation(summary = "获得角色分页") @PreAuthorize("@ss.hasPermission('system:role:query')") public CommonResult> getRolePage(RolePageReqVO reqVO) { return success(roleService.getRolePage(reqVO)); } @GetMapping("/list-all-simple") - @ApiOperation(value = "获取角色精简信息列表", notes = "只包含被开启的角色,主要用于前端的下拉选项") + @Operation(summary = "获取角色精简信息列表", description = "只包含被开启的角色,主要用于前端的下拉选项") public CommonResult> getSimpleRoleList() { // 获得角色列表,只要开启状态的 List list = roleService.getRoleListByStatus(singleton(CommonStatusEnum.ENABLE.getStatus())); @@ -103,4 +103,4 @@ public class RoleController { ExcelUtils.write(response, "角色数据.xls", "角色列表", RoleExcelVO.class, data); } -} +} \ No newline at end of file diff --git a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/permission/vo/menu/MenuBaseVO.java b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/permission/vo/menu/MenuBaseVO.java index 7c64dd13f..3fbbe3950 100644 --- a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/permission/vo/menu/MenuBaseVO.java +++ b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/permission/vo/menu/MenuBaseVO.java @@ -1,6 +1,6 @@ package cn.iocoder.yudao.module.system.controller.admin.permission.vo.menu; -import io.swagger.annotations.ApiModelProperty; +import io.swagger.v3.oas.annotations.media.Schema; import lombok.Data; import javax.validation.constraints.NotBlank; @@ -14,46 +14,46 @@ import javax.validation.constraints.Size; @Data public class MenuBaseVO { - @ApiModelProperty(value = "菜单名称", required = true, example = "芋道") + @Schema(description = "菜单名称", required = true, example = "芋道") @NotBlank(message = "菜单名称不能为空") @Size(max = 50, message = "菜单名称长度不能超过50个字符") private String name; - @ApiModelProperty(value = "权限标识", example = "sys:menu:add", notes = "仅菜单类型为按钮时,才需要传递") + @Schema(description = "权限标识", example = "sys:menu:add", notes = "仅菜单类型为按钮时,才需要传递") @Size(max = 100) private String permission; - @ApiModelProperty(value = "类型", required = true, example = "1", notes = "参见 MenuTypeEnum 枚举类") + @Schema(description = "类型", required = true, example = "1", notes = "参见 MenuTypeEnum 枚举类") @NotNull(message = "菜单类型不能为空") private Integer type; - @ApiModelProperty(value = "显示顺序不能为空", required = true, example = "1024") + @Schema(description = "显示顺序不能为空", required = true, example = "1024") @NotNull(message = "显示顺序不能为空") private Integer sort; - @ApiModelProperty(value = "父菜单 ID", required = true, example = "1024") + @Schema(description = "父菜单 ID", required = true, example = "1024") @NotNull(message = "父菜单 ID 不能为空") private Long parentId; - @ApiModelProperty(value = "路由地址", example = "post", notes = "仅菜单类型为菜单或者目录时,才需要传") + @Schema(description = "路由地址", example = "post", notes = "仅菜单类型为菜单或者目录时,才需要传") @Size(max = 200, message = "路由地址不能超过200个字符") private String path; - @ApiModelProperty(value = "菜单图标", example = "/menu/list", notes = "仅菜单类型为菜单或者目录时,才需要传") + @Schema(description = "菜单图标", example = "/menu/list", notes = "仅菜单类型为菜单或者目录时,才需要传") private String icon; - @ApiModelProperty(value = "组件路径", example = "system/post/index", notes = "仅菜单类型为菜单时,才需要传") + @Schema(description = "组件路径", example = "system/post/index", notes = "仅菜单类型为菜单时,才需要传") @Size(max = 200, message = "组件路径不能超过255个字符") private String component; - @ApiModelProperty(value = "状态", required = true, example = "1", notes = "见 CommonStatusEnum 枚举") + @Schema(description = "状态", required = true, example = "1", notes = "见 CommonStatusEnum 枚举") @NotNull(message = "状态不能为空") private Integer status; - @ApiModelProperty(value = "是否可见", example = "false") + @Schema(description = "是否可见", example = "false") private Boolean visible; - @ApiModelProperty(value = "是否缓存", example = "false") + @Schema(description = "是否缓存", example = "false") private Boolean keepAlive; -} +} \ No newline at end of file diff --git a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/permission/vo/menu/MenuListReqVO.java b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/permission/vo/menu/MenuListReqVO.java index 2600fb92b..1256e11ec 100644 --- a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/permission/vo/menu/MenuListReqVO.java +++ b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/permission/vo/menu/MenuListReqVO.java @@ -1,17 +1,17 @@ package cn.iocoder.yudao.module.system.controller.admin.permission.vo.menu; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; +import io.swagger.v3.oas.annotations.media.Schema; +import io.swagger.v3.oas.annotations.media.Schema; import lombok.Data; -@ApiModel("管理后台 - 菜单列表 Request VO") +@Schema(description = "管理后台 - 菜单列表 Request VO") @Data public class MenuListReqVO { - @ApiModelProperty(value = "菜单名称", example = "芋道", notes = "模糊匹配") + @Schema(description = "菜单名称", example = "芋道", notes = "模糊匹配") private String name; - @ApiModelProperty(value = "展示状态", example = "1", notes = "参见 CommonStatusEnum 枚举类") + @Schema(description = "展示状态", example = "1", notes = "参见 CommonStatusEnum 枚举类") private Integer status; -} +} \ No newline at end of file diff --git a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/permission/vo/menu/MenuRespVO.java b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/permission/vo/menu/MenuRespVO.java index c6482b296..b9cc62c42 100644 --- a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/permission/vo/menu/MenuRespVO.java +++ b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/permission/vo/menu/MenuRespVO.java @@ -1,7 +1,7 @@ package cn.iocoder.yudao.module.system.controller.admin.permission.vo.menu; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; +import io.swagger.v3.oas.annotations.media.Schema; +import io.swagger.v3.oas.annotations.media.Schema; import lombok.AllArgsConstructor; import lombok.Data; import lombok.EqualsAndHashCode; @@ -9,20 +9,20 @@ import lombok.NoArgsConstructor; import java.time.LocalDateTime; -@ApiModel("管理后台 - 菜单信息 Response VO") +@Schema(description = "管理后台 - 菜单信息 Response VO") @Data @NoArgsConstructor @AllArgsConstructor @EqualsAndHashCode(callSuper = true) public class MenuRespVO extends MenuBaseVO { - @ApiModelProperty(value = "菜单编号", required = true, example = "1024") + @Schema(description = "菜单编号", required = true, example = "1024") private Long id; - @ApiModelProperty(value = "状态", required = true, example = "1", notes = "参见 CommonStatusEnum 枚举类") + @Schema(description = "状态", required = true, example = "1", notes = "参见 CommonStatusEnum 枚举类") private Integer status; - @ApiModelProperty(value = "创建时间", required = true, example = "时间戳格式") + @Schema(description = "创建时间", required = true, example = "时间戳格式") private LocalDateTime createTime; -} +} \ No newline at end of file diff --git a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/permission/vo/menu/MenuSimpleRespVO.java b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/permission/vo/menu/MenuSimpleRespVO.java index 8f99d1e21..8154ee123 100644 --- a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/permission/vo/menu/MenuSimpleRespVO.java +++ b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/permission/vo/menu/MenuSimpleRespVO.java @@ -1,29 +1,29 @@ package cn.iocoder.yudao.module.system.controller.admin.permission.vo.menu; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; +import io.swagger.v3.oas.annotations.media.Schema; +import io.swagger.v3.oas.annotations.media.Schema; import lombok.AllArgsConstructor; import lombok.Data; import lombok.NoArgsConstructor; import javax.validation.constraints.NotNull; -@ApiModel("管理后台 - 菜单精简信息 Response VO") +@Schema(description = "管理后台 - 菜单精简信息 Response VO") @Data @NoArgsConstructor @AllArgsConstructor public class MenuSimpleRespVO { - @ApiModelProperty(value = "菜单编号", required = true, example = "1024") + @Schema(description = "菜单编号", required = true, example = "1024") private Long id; - @ApiModelProperty(value = "菜单名称", required = true, example = "芋道") + @Schema(description = "菜单名称", required = true, example = "芋道") private String name; - @ApiModelProperty(value = "父菜单 ID", required = true, example = "1024") + @Schema(description = "父菜单 ID", required = true, example = "1024") private Long parentId; - @ApiModelProperty(value = "类型", required = true, example = "1", notes = "参见 MenuTypeEnum 枚举类") + @Schema(description = "类型", required = true, example = "1", notes = "参见 MenuTypeEnum 枚举类") private Integer type; -} +} \ No newline at end of file diff --git a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/permission/vo/menu/MenuUpdateReqVO.java b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/permission/vo/menu/MenuUpdateReqVO.java index 7a1784363..52e57676d 100644 --- a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/permission/vo/menu/MenuUpdateReqVO.java +++ b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/permission/vo/menu/MenuUpdateReqVO.java @@ -1,18 +1,18 @@ package cn.iocoder.yudao.module.system.controller.admin.permission.vo.menu; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; +import io.swagger.v3.oas.annotations.media.Schema; +import io.swagger.v3.oas.annotations.media.Schema; import lombok.*; import javax.validation.constraints.NotNull; -@ApiModel("管理后台 - 菜单更新 Request VO") +@Schema(description = "管理后台 - 菜单更新 Request VO") @Data @EqualsAndHashCode(callSuper = true) public class MenuUpdateReqVO extends MenuBaseVO { - @ApiModelProperty(value = "菜单编号", required = true, example = "1024") + @Schema(description = "菜单编号", required = true, example = "1024") @NotNull(message = "菜单编号不能为空") private Long id; -} +} \ No newline at end of file diff --git a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/permission/vo/permission/PermissionAssignRoleDataScopeReqVO.java b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/permission/vo/permission/PermissionAssignRoleDataScopeReqVO.java index 6adb8c854..19120ba68 100644 --- a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/permission/vo/permission/PermissionAssignRoleDataScopeReqVO.java +++ b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/permission/vo/permission/PermissionAssignRoleDataScopeReqVO.java @@ -1,27 +1,27 @@ package cn.iocoder.yudao.module.system.controller.admin.permission.vo.permission; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; +import io.swagger.v3.oas.annotations.media.Schema; +import io.swagger.v3.oas.annotations.media.Schema; import lombok.Data; import javax.validation.constraints.NotNull; import java.util.Collections; import java.util.Set; -@ApiModel("管理后台 - 赋予角色数据权限 Request VO") +@Schema(description = "管理后台 - 赋予角色数据权限 Request VO") @Data public class PermissionAssignRoleDataScopeReqVO { - @ApiModelProperty(value = "角色编号", required = true, example = "1") + @Schema(description = "角色编号", required = true, example = "1") @NotNull(message = "角色编号不能为空") private Long roleId; - @ApiModelProperty(value = "数据范围", required = true, example = "1", notes = "参见 DataScopeEnum 枚举类") + @Schema(description = "数据范围", required = true, example = "1", notes = "参见 DataScopeEnum 枚举类") @NotNull(message = "数据范围不能为空") // TODO 这里要多一个枚举校验 private Integer dataScope; - @ApiModelProperty(value = "部门编号列表", example = "1,3,5", notes = "只有范围类型为 DEPT_CUSTOM 时,该字段才需要") + @Schema(description = "部门编号列表", example = "1,3,5", notes = "只有范围类型为 DEPT_CUSTOM 时,该字段才需要") private Set dataScopeDeptIds = Collections.emptySet(); // 兜底 -} +} \ No newline at end of file diff --git a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/permission/vo/permission/PermissionAssignRoleMenuReqVO.java b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/permission/vo/permission/PermissionAssignRoleMenuReqVO.java index 3fc4dcb2c..ea4ae52b8 100644 --- a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/permission/vo/permission/PermissionAssignRoleMenuReqVO.java +++ b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/permission/vo/permission/PermissionAssignRoleMenuReqVO.java @@ -1,22 +1,22 @@ package cn.iocoder.yudao.module.system.controller.admin.permission.vo.permission; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; +import io.swagger.v3.oas.annotations.media.Schema; +import io.swagger.v3.oas.annotations.media.Schema; import lombok.Data; import javax.validation.constraints.NotNull; import java.util.Collections; import java.util.Set; -@ApiModel("管理后台 - 赋予角色菜单 Request VO") +@Schema(description = "管理后台 - 赋予角色菜单 Request VO") @Data public class PermissionAssignRoleMenuReqVO { - @ApiModelProperty(value = "角色编号", required = true, example = "1") + @Schema(description = "角色编号", required = true, example = "1") @NotNull(message = "角色编号不能为空") private Long roleId; - @ApiModelProperty(value = "菜单编号列表", example = "1,3,5") + @Schema(description = "菜单编号列表", example = "1,3,5") private Set menuIds = Collections.emptySet(); // 兜底 -} +} \ No newline at end of file diff --git a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/permission/vo/permission/PermissionAssignUserRoleReqVO.java b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/permission/vo/permission/PermissionAssignUserRoleReqVO.java index 75671bcd2..d1b4c5f7f 100644 --- a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/permission/vo/permission/PermissionAssignUserRoleReqVO.java +++ b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/permission/vo/permission/PermissionAssignUserRoleReqVO.java @@ -1,22 +1,22 @@ package cn.iocoder.yudao.module.system.controller.admin.permission.vo.permission; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; +import io.swagger.v3.oas.annotations.media.Schema; +import io.swagger.v3.oas.annotations.media.Schema; import lombok.Data; import javax.validation.constraints.NotNull; import java.util.Collections; import java.util.Set; -@ApiModel("管理后台 - 赋予用户角色 Request VO") +@Schema(description = "管理后台 - 赋予用户角色 Request VO") @Data public class PermissionAssignUserRoleReqVO { - @ApiModelProperty(value = "角色编号", required = true, example = "1") + @Schema(description = "角色编号", required = true, example = "1") @NotNull(message = "角色编号不能为空") private Long userId; - @ApiModelProperty(value = "角色编号列表", example = "1,3,5") + @Schema(description = "角色编号列表", example = "1,3,5") private Set roleIds = Collections.emptySet(); // 兜底 -} +} \ No newline at end of file diff --git a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/permission/vo/role/RoleBaseVO.java b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/permission/vo/role/RoleBaseVO.java index 60d678aa9..2d15c80ee 100644 --- a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/permission/vo/role/RoleBaseVO.java +++ b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/permission/vo/role/RoleBaseVO.java @@ -1,6 +1,6 @@ package cn.iocoder.yudao.module.system.controller.admin.permission.vo.role; -import io.swagger.annotations.ApiModelProperty; +import io.swagger.v3.oas.annotations.media.Schema; import lombok.Data; import javax.validation.constraints.NotBlank; @@ -14,21 +14,21 @@ import javax.validation.constraints.Size; @Data public class RoleBaseVO { - @ApiModelProperty(value = "角色名称", required = true, example = "管理员") + @Schema(description = "角色名称", required = true, example = "管理员") @NotBlank(message = "角色名称不能为空") @Size(max = 30, message = "角色名称长度不能超过30个字符") private String name; @NotBlank(message = "角色标志不能为空") @Size(max = 100, message = "角色标志长度不能超过100个字符") - @ApiModelProperty(value = "角色编码", required = true, example = "ADMIN") + @Schema(description = "角色编码", required = true, example = "ADMIN") private String code; - @ApiModelProperty(value = "显示顺序不能为空", required = true, example = "1024") + @Schema(description = "显示顺序不能为空", required = true, example = "1024") @NotNull(message = "显示顺序不能为空") private Integer sort; - @ApiModelProperty(value = "备注", example = "我是一个角色") + @Schema(description = "备注", example = "我是一个角色") private String remark; -} +} \ No newline at end of file diff --git a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/permission/vo/role/RoleCreateReqVO.java b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/permission/vo/role/RoleCreateReqVO.java index 785f65815..ac4cd8a3e 100644 --- a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/permission/vo/role/RoleCreateReqVO.java +++ b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/permission/vo/role/RoleCreateReqVO.java @@ -1,10 +1,11 @@ package cn.iocoder.yudao.module.system.controller.admin.permission.vo.role; -import io.swagger.annotations.ApiModel; + +import io.swagger.v3.oas.annotations.media.Schema; import lombok.Data; import lombok.EqualsAndHashCode; -@ApiModel("管理后台 - 角色创建 Request VO") +@Schema(description = "管理后台 - 角色创建 Request VO") @Data @EqualsAndHashCode(callSuper = true) public class RoleCreateReqVO extends RoleBaseVO { diff --git a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/permission/vo/role/RoleExportReqVO.java b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/permission/vo/role/RoleExportReqVO.java index ca9bed7cd..db9b4c61e 100644 --- a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/permission/vo/role/RoleExportReqVO.java +++ b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/permission/vo/role/RoleExportReqVO.java @@ -1,7 +1,7 @@ package cn.iocoder.yudao.module.system.controller.admin.permission.vo.role; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; +import io.swagger.v3.oas.annotations.media.Schema; +import io.swagger.v3.oas.annotations.media.Schema; import lombok.Data; import org.springframework.format.annotation.DateTimeFormat; @@ -9,21 +9,21 @@ import java.time.LocalDateTime; import static cn.iocoder.yudao.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND; -@ApiModel("管理后台 - 角色分页 Request VO") +@Schema(description = "管理后台 - 角色分页 Request VO") @Data public class RoleExportReqVO { - @ApiModelProperty(value = "角色名称", example = "芋道", notes = "模糊匹配") + @Schema(description = "角色名称", example = "芋道", notes = "模糊匹配") private String name; - @ApiModelProperty(value = "角色标识", example = "yudao", notes = "模糊匹配") + @Schema(description = "角色标识", example = "yudao", notes = "模糊匹配") private String code; - @ApiModelProperty(value = "展示状态", example = "1", notes = "参见 CommonStatusEnum 枚举类") + @Schema(description = "展示状态", example = "1", notes = "参见 CommonStatusEnum 枚举类") private Integer status; - @ApiModelProperty(value = "开始时间", example = "[2022-07-01 00:00:00,2022-07-01 23:59:59]") + @Schema(description = "开始时间", example = "[2022-07-01 00:00:00,2022-07-01 23:59:59]") @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND) private LocalDateTime[] createTime; -} +} \ No newline at end of file diff --git a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/permission/vo/role/RolePageReqVO.java b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/permission/vo/role/RolePageReqVO.java index b75699f92..9f99f2b94 100644 --- a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/permission/vo/role/RolePageReqVO.java +++ b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/permission/vo/role/RolePageReqVO.java @@ -1,8 +1,8 @@ package cn.iocoder.yudao.module.system.controller.admin.permission.vo.role; import cn.iocoder.yudao.framework.common.pojo.PageParam; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; +import io.swagger.v3.oas.annotations.media.Schema; +import io.swagger.v3.oas.annotations.media.Schema; import lombok.Data; import lombok.EqualsAndHashCode; import org.springframework.format.annotation.DateTimeFormat; @@ -11,21 +11,21 @@ import java.time.LocalDateTime; import static cn.iocoder.yudao.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND; -@ApiModel("管理后台 - 角色分页 Request VO") +@Schema(description = "管理后台 - 角色分页 Request VO") @Data @EqualsAndHashCode(callSuper = true) public class RolePageReqVO extends PageParam { - @ApiModelProperty(value = "角色名称", example = "芋道", notes = "模糊匹配") + @Schema(description = "角色名称", example = "芋道", notes = "模糊匹配") private String name; - @ApiModelProperty(value = "角色标识", example = "yudao", notes = "模糊匹配") + @Schema(description = "角色标识", example = "yudao", notes = "模糊匹配") private String code; - @ApiModelProperty(value = "展示状态", example = "1", notes = "参见 CommonStatusEnum 枚举类") + @Schema(description = "展示状态", example = "1", notes = "参见 CommonStatusEnum 枚举类") private Integer status; - @ApiModelProperty(value = "开始时间", example = "[2022-07-01 00:00:00,2022-07-01 23:59:59]") + @Schema(description = "开始时间", example = "[2022-07-01 00:00:00,2022-07-01 23:59:59]") @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND) private LocalDateTime[] createTime; -} +} \ No newline at end of file diff --git a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/permission/vo/role/RoleRespVO.java b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/permission/vo/role/RoleRespVO.java index 6653820b0..accdd21ce 100644 --- a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/permission/vo/role/RoleRespVO.java +++ b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/permission/vo/role/RoleRespVO.java @@ -1,7 +1,7 @@ package cn.iocoder.yudao.module.system.controller.admin.permission.vo.role; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; +import io.swagger.v3.oas.annotations.media.Schema; +import io.swagger.v3.oas.annotations.media.Schema; import lombok.AllArgsConstructor; import lombok.Data; import lombok.EqualsAndHashCode; @@ -10,29 +10,29 @@ import lombok.NoArgsConstructor; import java.time.LocalDateTime; import java.util.Set; -@ApiModel("管理后台 - 角色信息 Response VO") +@Schema(description = "管理后台 - 角色信息 Response VO") @Data @NoArgsConstructor @AllArgsConstructor @EqualsAndHashCode(callSuper = true) public class RoleRespVO extends RoleBaseVO { - @ApiModelProperty(value = "角色编号", required = true, example = "1") + @Schema(description = "角色编号", required = true, example = "1") private Long id; - @ApiModelProperty(value = "数据范围", required = true, example = "1", notes = "参见 DataScopeEnum 枚举类") + @Schema(description = "数据范围", required = true, example = "1", notes = "参见 DataScopeEnum 枚举类") private Integer dataScope; - @ApiModelProperty(value = "数据范围(指定部门数组)", example = "1") + @Schema(description = "数据范围(指定部门数组)", example = "1") private Set dataScopeDeptIds; - @ApiModelProperty(value = "状态", required = true, example = "1", notes = "参见 CommonStatusEnum 枚举类") + @Schema(description = "状态", required = true, example = "1", notes = "参见 CommonStatusEnum 枚举类") private Integer status; - @ApiModelProperty(value = "角色类型", required = true, example = "1", notes = "参见 RoleTypeEnum 枚举类") + @Schema(description = "角色类型", required = true, example = "1", notes = "参见 RoleTypeEnum 枚举类") private Integer type; - @ApiModelProperty(value = "创建时间", required = true, example = "时间戳格式") + @Schema(description = "创建时间", required = true, example = "时间戳格式") private LocalDateTime createTime; -} +} \ No newline at end of file diff --git a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/permission/vo/role/RoleSimpleRespVO.java b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/permission/vo/role/RoleSimpleRespVO.java index c0a4c3083..8232baea6 100644 --- a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/permission/vo/role/RoleSimpleRespVO.java +++ b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/permission/vo/role/RoleSimpleRespVO.java @@ -1,21 +1,21 @@ package cn.iocoder.yudao.module.system.controller.admin.permission.vo.role; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; +import io.swagger.v3.oas.annotations.media.Schema; +import io.swagger.v3.oas.annotations.media.Schema; import lombok.AllArgsConstructor; import lombok.Data; import lombok.NoArgsConstructor; -@ApiModel("管理后台 - 角色精简信息 Response VO") +@Schema(description = "管理后台 - 角色精简信息 Response VO") @Data @NoArgsConstructor @AllArgsConstructor public class RoleSimpleRespVO { - @ApiModelProperty(value = "角色编号", required = true, example = "1024") + @Schema(description = "角色编号", required = true, example = "1024") private Long id; - @ApiModelProperty(value = "角色名称", required = true, example = "芋道") + @Schema(description = "角色名称", required = true, example = "芋道") private String name; -} +} \ No newline at end of file diff --git a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/permission/vo/role/RoleUpdateReqVO.java b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/permission/vo/role/RoleUpdateReqVO.java index 362cbb290..3f8728d1f 100644 --- a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/permission/vo/role/RoleUpdateReqVO.java +++ b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/permission/vo/role/RoleUpdateReqVO.java @@ -1,19 +1,19 @@ package cn.iocoder.yudao.module.system.controller.admin.permission.vo.role; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; +import io.swagger.v3.oas.annotations.media.Schema; +import io.swagger.v3.oas.annotations.media.Schema; import lombok.Data; import lombok.EqualsAndHashCode; import javax.validation.constraints.NotNull; -@ApiModel("管理后台 - 角色更新 Request VO") +@Schema(description = "管理后台 - 角色更新 Request VO") @Data @EqualsAndHashCode(callSuper = true) public class RoleUpdateReqVO extends RoleBaseVO { - @ApiModelProperty(value = "角色编号", required = true, example = "1024") + @Schema(description = "角色编号", required = true, example = "1024") @NotNull(message = "角色编号不能为空") private Long id; -} +} \ No newline at end of file diff --git a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/permission/vo/role/RoleUpdateStatusReqVO.java b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/permission/vo/role/RoleUpdateStatusReqVO.java index 708586b82..c4cf97df4 100644 --- a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/permission/vo/role/RoleUpdateStatusReqVO.java +++ b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/permission/vo/role/RoleUpdateStatusReqVO.java @@ -1,22 +1,22 @@ package cn.iocoder.yudao.module.system.controller.admin.permission.vo.role; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; +import io.swagger.v3.oas.annotations.media.Schema; +import io.swagger.v3.oas.annotations.media.Schema; import lombok.Data; import javax.validation.constraints.NotNull; -@ApiModel("管理后台 - 角色更新状态 Request VO") +@Schema(description = "管理后台 - 角色更新状态 Request VO") @Data public class RoleUpdateStatusReqVO { - @ApiModelProperty(value = "角色编号", required = true, example = "1024") + @Schema(description = "角色编号", required = true, example = "1024") @NotNull(message = "角色编号不能为空") private Long id; - @ApiModelProperty(value = "状态", required = true, example = "1", notes = "见 CommonStatusEnum 枚举") + @Schema(description = "状态", required = true, example = "1", notes = "见 CommonStatusEnum 枚举") @NotNull(message = "状态不能为空") // @InEnum(value = CommonStatusEnum.class, message = "修改状态必须是 {value}") private Integer status; -} +} \ No newline at end of file diff --git a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/sensitiveword/SensitiveWordController.java b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/sensitiveword/SensitiveWordController.java index e9536ad9a..ccc3dd7fc 100644 --- a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/sensitiveword/SensitiveWordController.java +++ b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/sensitiveword/SensitiveWordController.java @@ -8,9 +8,9 @@ import cn.iocoder.yudao.module.system.controller.admin.sensitiveword.vo.*; import cn.iocoder.yudao.module.system.convert.sensitiveword.SensitiveWordConvert; import cn.iocoder.yudao.module.system.dal.dataobject.sensitiveword.SensitiveWordDO; import cn.iocoder.yudao.module.system.service.sensitiveword.SensitiveWordService; -import io.swagger.annotations.Api; -import io.swagger.annotations.ApiImplicitParam; -import io.swagger.annotations.ApiOperation; +import io.swagger.v3.oas.annotations.tags.Tag; +import io.swagger.v3.oas.annotations.Parameter; +import io.swagger.v3.oas.annotations.Operation; import org.springframework.security.access.prepost.PreAuthorize; import org.springframework.validation.annotation.Validated; import org.springframework.web.bind.annotation.*; @@ -25,7 +25,7 @@ import java.util.Set; import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success; import static cn.iocoder.yudao.framework.operatelog.core.enums.OperateTypeEnum.EXPORT; -@Api(tags = "管理后台 - 敏感词") +@Tag(name = "管理后台 - 敏感词") @RestController @RequestMapping("/system/sensitive-word") @Validated @@ -35,14 +35,14 @@ public class SensitiveWordController { private SensitiveWordService sensitiveWordService; @PostMapping("/create") - @ApiOperation("创建敏感词") + @Operation(summary = "创建敏感词") @PreAuthorize("@ss.hasPermission('system:sensitive-word:create')") public CommonResult createSensitiveWord(@Valid @RequestBody SensitiveWordCreateReqVO createReqVO) { return success(sensitiveWordService.createSensitiveWord(createReqVO)); } @PutMapping("/update") - @ApiOperation("更新敏感词") + @Operation(summary = "更新敏感词") @PreAuthorize("@ss.hasPermission('system:sensitive-word:update')") public CommonResult updateSensitiveWord(@Valid @RequestBody SensitiveWordUpdateReqVO updateReqVO) { sensitiveWordService.updateSensitiveWord(updateReqVO); @@ -50,8 +50,8 @@ public class SensitiveWordController { } @DeleteMapping("/delete") - @ApiOperation("删除敏感词") - @ApiImplicitParam(name = "id", value = "编号", required = true, dataTypeClass = Long.class) + @Operation(summary = "删除敏感词") + @Parameter(name = "id", description = "编号", required = true) @PreAuthorize("@ss.hasPermission('system:sensitive-word:delete')") public CommonResult deleteSensitiveWord(@RequestParam("id") Long id) { sensitiveWordService.deleteSensitiveWord(id); @@ -59,8 +59,8 @@ public class SensitiveWordController { } @GetMapping("/get") - @ApiOperation("获得敏感词") - @ApiImplicitParam(name = "id", value = "编号", required = true, example = "1024", dataTypeClass = Long.class) + @Operation(summary = "获得敏感词") + @Parameter(name = "id", description = "编号", required = true, example = "1024") @PreAuthorize("@ss.hasPermission('system:sensitive-word:query')") public CommonResult getSensitiveWord(@RequestParam("id") Long id) { SensitiveWordDO sensitiveWord = sensitiveWordService.getSensitiveWord(id); @@ -68,7 +68,7 @@ public class SensitiveWordController { } @GetMapping("/page") - @ApiOperation("获得敏感词分页") + @Operation(summary = "获得敏感词分页") @PreAuthorize("@ss.hasPermission('system:sensitive-word:query')") public CommonResult> getSensitiveWordPage(@Valid SensitiveWordPageReqVO pageVO) { PageResult pageResult = sensitiveWordService.getSensitiveWordPage(pageVO); @@ -76,7 +76,7 @@ public class SensitiveWordController { } @GetMapping("/export-excel") - @ApiOperation("导出敏感词 Excel") + @Operation(summary = "导出敏感词 Excel") @PreAuthorize("@ss.hasPermission('system:sensitive-word:export')") @OperateLog(type = EXPORT) public void exportSensitiveWordExcel(@Valid SensitiveWordExportReqVO exportReqVO, @@ -88,17 +88,17 @@ public class SensitiveWordController { } @GetMapping("/get-tags") - @ApiOperation("获取所有敏感词的标签数组") + @Operation(summary = "获取所有敏感词的标签数组") @PreAuthorize("@ss.hasPermission('system:sensitive-word:query')") public CommonResult> getSensitiveWordTags() throws IOException { return success(sensitiveWordService.getSensitiveWordTags()); } @GetMapping("/validate-text") - @ApiOperation("获得文本所包含的不合法的敏感词数组") + @Operation(summary = "获得文本所包含的不合法的敏感词数组") public CommonResult> validateText(@RequestParam("text") String text, @RequestParam(value = "tags", required = false) List tags) { return success(sensitiveWordService.validateText(text, tags)); } -} +} \ No newline at end of file diff --git a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/sensitiveword/vo/SensitiveWordBaseVO.java b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/sensitiveword/vo/SensitiveWordBaseVO.java index 770a22b92..df8557d3d 100644 --- a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/sensitiveword/vo/SensitiveWordBaseVO.java +++ b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/sensitiveword/vo/SensitiveWordBaseVO.java @@ -1,6 +1,6 @@ package cn.iocoder.yudao.module.system.controller.admin.sensitiveword.vo; -import io.swagger.annotations.ApiModelProperty; +import io.swagger.v3.oas.annotations.media.Schema; import lombok.Data; import javax.validation.constraints.NotNull; @@ -13,19 +13,19 @@ import java.util.List; @Data public class SensitiveWordBaseVO { - @ApiModelProperty(value = "敏感词", required = true, example = "敏感词") + @Schema(description = "敏感词", required = true, example = "敏感词") @NotNull(message = "敏感词不能为空") private String name; - @ApiModelProperty(value = "标签", required = true, example = "短信,评论") + @Schema(description = "标签", required = true, example = "短信,评论") @NotNull(message = "标签不能为空") private List tags; - @ApiModelProperty(value = "状态", required = true, example = "1", notes = "参见 CommonStatusEnum 枚举类") + @Schema(description = "状态", required = true, example = "1", notes = "参见 CommonStatusEnum 枚举类") @NotNull(message = "状态不能为空") private Integer status; - @ApiModelProperty(value = "描述", example = "污言秽语") + @Schema(description = "描述", example = "污言秽语") private String description; -} +} \ No newline at end of file diff --git a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/sensitiveword/vo/SensitiveWordExportReqVO.java b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/sensitiveword/vo/SensitiveWordExportReqVO.java index 1addc4cfe..ab1036cb3 100644 --- a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/sensitiveword/vo/SensitiveWordExportReqVO.java +++ b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/sensitiveword/vo/SensitiveWordExportReqVO.java @@ -1,7 +1,7 @@ package cn.iocoder.yudao.module.system.controller.admin.sensitiveword.vo; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; +import io.swagger.v3.oas.annotations.media.Schema; +import io.swagger.v3.oas.annotations.media.Schema; import lombok.Data; import org.springframework.format.annotation.DateTimeFormat; @@ -9,21 +9,21 @@ import java.time.LocalDateTime; import static cn.iocoder.yudao.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND; -@ApiModel(value = "管理后台 - 敏感词 Excel 导出 Request VO", description = "参数和 SensitiveWordPageReqVO 是一致的") +@Schema(description = "管理后台 - 敏感词 Excel 导出 Request VO,参数和 SensitiveWordPageReqVO 是一致的") @Data public class SensitiveWordExportReqVO { - @ApiModelProperty(value = "敏感词", example = "敏感词") + @Schema(description = "敏感词", example = "敏感词") private String name; - @ApiModelProperty(value = "标签", example = "短信,评论") + @Schema(description = "标签", example = "短信,评论") private String tag; - @ApiModelProperty(value = "状态", example = "1", notes = "参见 CommonStatusEnum 枚举类") + @Schema(description = "状态,参见 CommonStatusEnum 枚举类", example = "1") private Integer status; @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND) - @ApiModelProperty(value = "创建时间") + @Schema(description = "创建时间") private LocalDateTime[] createTime; -} +} \ No newline at end of file diff --git a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/sensitiveword/vo/SensitiveWordPageReqVO.java b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/sensitiveword/vo/SensitiveWordPageReqVO.java index 087670180..5af77eab8 100644 --- a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/sensitiveword/vo/SensitiveWordPageReqVO.java +++ b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/sensitiveword/vo/SensitiveWordPageReqVO.java @@ -1,8 +1,8 @@ package cn.iocoder.yudao.module.system.controller.admin.sensitiveword.vo; import cn.iocoder.yudao.framework.common.pojo.PageParam; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; +import io.swagger.v3.oas.annotations.media.Schema; +import io.swagger.v3.oas.annotations.media.Schema; import lombok.Data; import lombok.EqualsAndHashCode; import lombok.ToString; @@ -12,23 +12,23 @@ import java.time.LocalDateTime; import static cn.iocoder.yudao.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND; -@ApiModel("管理后台 - 敏感词分页 Request VO") +@Schema(description = "管理后台 - 敏感词分页 Request VO") @Data @EqualsAndHashCode(callSuper = true) @ToString(callSuper = true) public class SensitiveWordPageReqVO extends PageParam { - @ApiModelProperty(value = "敏感词", example = "敏感词") + @Schema(description = "敏感词", example = "敏感词") private String name; - @ApiModelProperty(value = "标签", example = "短信,评论") + @Schema(description = "标签", example = "短信,评论") private String tag; - @ApiModelProperty(value = "状态", example = "1", notes = "参见 CommonStatusEnum 枚举类") + @Schema(description = "状态,参见 CommonStatusEnum 枚举类", example = "1") private Integer status; @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND) - @ApiModelProperty(value = "创建时间") + @Schema(description = "创建时间") private LocalDateTime[] createTime; -} +} \ No newline at end of file diff --git a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/sensitiveword/vo/SensitiveWordRespVO.java b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/sensitiveword/vo/SensitiveWordRespVO.java index c92a8d4e0..9f888a135 100644 --- a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/sensitiveword/vo/SensitiveWordRespVO.java +++ b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/sensitiveword/vo/SensitiveWordRespVO.java @@ -1,23 +1,23 @@ package cn.iocoder.yudao.module.system.controller.admin.sensitiveword.vo; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; +import io.swagger.v3.oas.annotations.media.Schema; +import io.swagger.v3.oas.annotations.media.Schema; import lombok.Data; import lombok.EqualsAndHashCode; import lombok.ToString; import java.time.LocalDateTime; -@ApiModel("管理后台 - 敏感词 Response VO") +@Schema(description = "管理后台 - 敏感词 Response VO") @Data @EqualsAndHashCode(callSuper = true) @ToString(callSuper = true) public class SensitiveWordRespVO extends SensitiveWordBaseVO { - @ApiModelProperty(value = "编号", required = true, example = "1") + @Schema(description = "编号", required = true, example = "1") private Long id; - @ApiModelProperty(value = "创建时间", required = true) + @Schema(description = "创建时间", required = true) private LocalDateTime createTime; -} +} \ No newline at end of file diff --git a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/sensitiveword/vo/SensitiveWordUpdateReqVO.java b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/sensitiveword/vo/SensitiveWordUpdateReqVO.java index f87aa3a62..11883f055 100644 --- a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/sensitiveword/vo/SensitiveWordUpdateReqVO.java +++ b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/sensitiveword/vo/SensitiveWordUpdateReqVO.java @@ -1,21 +1,21 @@ package cn.iocoder.yudao.module.system.controller.admin.sensitiveword.vo; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; +import io.swagger.v3.oas.annotations.media.Schema; +import io.swagger.v3.oas.annotations.media.Schema; import lombok.Data; import lombok.EqualsAndHashCode; import lombok.ToString; import javax.validation.constraints.NotNull; -@ApiModel("管理后台 - 敏感词更新 Request VO") +@Schema(description = "管理后台 - 敏感词更新 Request VO") @Data @EqualsAndHashCode(callSuper = true) @ToString(callSuper = true) public class SensitiveWordUpdateReqVO extends SensitiveWordBaseVO { - @ApiModelProperty(value = "编号", required = true, example = "1") + @Schema(description = "编号", required = true, example = "1") @NotNull(message = "编号不能为空") private Long id; -} +} \ No newline at end of file diff --git a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/sms/SmsCallbackController.java b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/sms/SmsCallbackController.java index b717eb8d9..6cf155797 100644 --- a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/sms/SmsCallbackController.java +++ b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/sms/SmsCallbackController.java @@ -6,9 +6,9 @@ import cn.iocoder.yudao.module.system.service.sms.SmsSendService; import cn.iocoder.yudao.framework.common.pojo.CommonResult; import cn.iocoder.yudao.framework.operatelog.core.annotations.OperateLog; import cn.iocoder.yudao.framework.sms.core.enums.SmsChannelEnum; -import io.swagger.annotations.Api; -import io.swagger.annotations.ApiImplicitParam; -import io.swagger.annotations.ApiOperation; +import io.swagger.v3.oas.annotations.tags.Tag; +import io.swagger.v3.oas.annotations.Parameter; +import io.swagger.v3.oas.annotations.Operation; import org.springframework.web.bind.annotation.PostMapping; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestParam; @@ -20,7 +20,7 @@ import javax.servlet.http.HttpServletRequest; import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success; -@Api(tags = "管理后台 - 短信回调") +@Tag(name = "管理后台 - 短信回调") @RestController @RequestMapping("/system/sms/callback") public class SmsCallbackController { @@ -30,7 +30,7 @@ public class SmsCallbackController { @PostMapping("/aliyun") @PermitAll - @ApiOperation(value = "阿里云短信的回调", notes = "参见 https://help.aliyun.com/document_detail/120998.html 文档") + @Operation(summary = "阿里云短信的回调", description = "参见 https://help.aliyun.com/document_detail/120998.html 文档") @OperateLog(enable = false) public CommonResult receiveAliyunSmsStatus(HttpServletRequest request) throws Throwable { String text = ServletUtil.getBody(request); @@ -40,7 +40,7 @@ public class SmsCallbackController { @PostMapping("/tencent") @PermitAll - @ApiOperation(value = "腾讯云短信的回调", notes = "参见 https://cloud.tencent.com/document/product/382/52077 文档") + @Operation(summary = "腾讯云短信的回调", description = "参见 https://cloud.tencent.com/document/product/382/52077 文档") @OperateLog(enable = false) public CommonResult receiveTencentSmsStatus(HttpServletRequest request) throws Throwable { String text = ServletUtil.getBody(request); @@ -48,4 +48,4 @@ public class SmsCallbackController { return success(true); } -} +} \ No newline at end of file diff --git a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/sms/SmsChannelController.java b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/sms/SmsChannelController.java index 57e7ed81f..a58cbe61e 100644 --- a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/sms/SmsChannelController.java +++ b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/sms/SmsChannelController.java @@ -6,9 +6,9 @@ import cn.iocoder.yudao.module.system.dal.dataobject.sms.SmsChannelDO; import cn.iocoder.yudao.module.system.service.sms.SmsChannelService; import cn.iocoder.yudao.framework.common.pojo.CommonResult; import cn.iocoder.yudao.framework.common.pojo.PageResult; -import io.swagger.annotations.Api; -import io.swagger.annotations.ApiImplicitParam; -import io.swagger.annotations.ApiOperation; +import io.swagger.v3.oas.annotations.tags.Tag; +import io.swagger.v3.oas.annotations.Parameter; +import io.swagger.v3.oas.annotations.Operation; import org.springframework.security.access.prepost.PreAuthorize; import org.springframework.web.bind.annotation.*; @@ -19,7 +19,7 @@ import java.util.List; import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success; -@Api(tags = "管理后台 - 短信渠道") +@Tag(name = "管理后台 - 短信渠道") @RestController @RequestMapping("system/sms-channel") public class SmsChannelController { @@ -28,14 +28,14 @@ public class SmsChannelController { private SmsChannelService smsChannelService; @PostMapping("/create") - @ApiOperation("创建短信渠道") + @Operation(summary = "创建短信渠道") @PreAuthorize("@ss.hasPermission('system:sms-channel:create')") public CommonResult createSmsChannel(@Valid @RequestBody SmsChannelCreateReqVO createReqVO) { return success(smsChannelService.createSmsChannel(createReqVO)); } @PutMapping("/update") - @ApiOperation("更新短信渠道") + @Operation(summary = "更新短信渠道") @PreAuthorize("@ss.hasPermission('system:sms-channel:update')") public CommonResult updateSmsChannel(@Valid @RequestBody SmsChannelUpdateReqVO updateReqVO) { smsChannelService.updateSmsChannel(updateReqVO); @@ -43,8 +43,8 @@ public class SmsChannelController { } @DeleteMapping("/delete") - @ApiOperation("删除短信渠道") - @ApiImplicitParam(name = "id", value = "编号", required = true, dataTypeClass = Long.class) + @Operation(summary = "删除短信渠道") + @Parameter(name = "id", description = "编号", required = true) @PreAuthorize("@ss.hasPermission('system:sms-channel:delete')") public CommonResult deleteSmsChannel(@RequestParam("id") Long id) { smsChannelService.deleteSmsChannel(id); @@ -52,8 +52,8 @@ public class SmsChannelController { } @GetMapping("/get") - @ApiOperation("获得短信渠道") - @ApiImplicitParam(name = "id", value = "编号", required = true, example = "1024", dataTypeClass = Long.class) + @Operation(summary = "获得短信渠道") + @Parameter(name = "id", description = "编号", required = true, example = "1024") @PreAuthorize("@ss.hasPermission('system:sms-channel:query')") public CommonResult getSmsChannel(@RequestParam("id") Long id) { SmsChannelDO smsChannel = smsChannelService.getSmsChannel(id); @@ -61,7 +61,7 @@ public class SmsChannelController { } @GetMapping("/page") - @ApiOperation("获得短信渠道分页") + @Operation(summary = "获得短信渠道分页") @PreAuthorize("@ss.hasPermission('system:sms-channel:query')") public CommonResult> getSmsChannelPage(@Valid SmsChannelPageReqVO pageVO) { PageResult pageResult = smsChannelService.getSmsChannelPage(pageVO); @@ -69,7 +69,7 @@ public class SmsChannelController { } @GetMapping("/list-all-simple") - @ApiOperation(value = "获得短信渠道精简列表", notes = "包含被禁用的短信渠道") + @Operation(summary = "获得短信渠道精简列表", description = "包含被禁用的短信渠道") public CommonResult> getSimpleSmsChannelList() { List list = smsChannelService.getSmsChannelList(); // 排序后,返回给前端 @@ -77,4 +77,4 @@ public class SmsChannelController { return success(SmsChannelConvert.INSTANCE.convertList03(list)); } -} +} \ No newline at end of file diff --git a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/sms/SmsLogController.java b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/sms/SmsLogController.java index 5fbf10e74..5345f229b 100644 --- a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/sms/SmsLogController.java +++ b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/sms/SmsLogController.java @@ -11,8 +11,8 @@ import cn.iocoder.yudao.framework.common.pojo.CommonResult; import cn.iocoder.yudao.framework.common.pojo.PageResult; import cn.iocoder.yudao.framework.excel.core.util.ExcelUtils; import cn.iocoder.yudao.framework.operatelog.core.annotations.OperateLog; -import io.swagger.annotations.Api; -import io.swagger.annotations.ApiOperation; +import io.swagger.v3.oas.annotations.tags.Tag; +import io.swagger.v3.oas.annotations.Operation; import org.springframework.security.access.prepost.PreAuthorize; import org.springframework.validation.annotation.Validated; import org.springframework.web.bind.annotation.GetMapping; @@ -28,7 +28,7 @@ import java.util.List; import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success; import static cn.iocoder.yudao.framework.operatelog.core.enums.OperateTypeEnum.EXPORT; -@Api(tags = "管理后台 - 短信日志") +@Tag(name = "管理后台 - 短信日志") @RestController @RequestMapping("/system/sms-log") @Validated @@ -38,7 +38,7 @@ public class SmsLogController { private SmsLogService smsLogService; @GetMapping("/page") - @ApiOperation("获得短信日志分页") + @Operation(summary = "获得短信日志分页") @PreAuthorize("@ss.hasPermission('system:sms-log:query')") public CommonResult> getSmsLogPage(@Valid SmsLogPageReqVO pageVO) { PageResult pageResult = smsLogService.getSmsLogPage(pageVO); @@ -46,7 +46,7 @@ public class SmsLogController { } @GetMapping("/export-excel") - @ApiOperation("导出短信日志 Excel") + @Operation(summary = "导出短信日志 Excel") @PreAuthorize("@ss.hasPermission('system:sms-log:export')") @OperateLog(type = EXPORT) public void exportSmsLogExcel(@Valid SmsLogExportReqVO exportReqVO, @@ -57,4 +57,4 @@ public class SmsLogController { ExcelUtils.write(response, "短信日志.xls", "数据", SmsLogExcelVO.class, datas); } -} +} \ No newline at end of file diff --git a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/sms/SmsTemplateController.java b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/sms/SmsTemplateController.java index 3eef58652..8be3a3250 100644 --- a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/sms/SmsTemplateController.java +++ b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/sms/SmsTemplateController.java @@ -9,9 +9,9 @@ import cn.iocoder.yudao.framework.common.pojo.CommonResult; import cn.iocoder.yudao.framework.common.pojo.PageResult; import cn.iocoder.yudao.framework.excel.core.util.ExcelUtils; import cn.iocoder.yudao.framework.operatelog.core.annotations.OperateLog; -import io.swagger.annotations.Api; -import io.swagger.annotations.ApiImplicitParam; -import io.swagger.annotations.ApiOperation; +import io.swagger.v3.oas.annotations.tags.Tag; +import io.swagger.v3.oas.annotations.Parameter; +import io.swagger.v3.oas.annotations.Operation; import org.springframework.security.access.prepost.PreAuthorize; import org.springframework.web.bind.annotation.*; @@ -24,7 +24,7 @@ import java.util.List; import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success; import static cn.iocoder.yudao.framework.operatelog.core.enums.OperateTypeEnum.EXPORT; -@Api(tags = "管理后台 - 短信模板") +@Tag(name = "管理后台 - 短信模板") @RestController @RequestMapping("/system/sms-template") public class SmsTemplateController { @@ -35,14 +35,14 @@ public class SmsTemplateController { private SmsSendService smsSendService; @PostMapping("/create") - @ApiOperation("创建短信模板") + @Operation(summary = "创建短信模板") @PreAuthorize("@ss.hasPermission('system:sms-template:create')") public CommonResult createSmsTemplate(@Valid @RequestBody SmsTemplateCreateReqVO createReqVO) { return success(smsTemplateService.createSmsTemplate(createReqVO)); } @PutMapping("/update") - @ApiOperation("更新短信模板") + @Operation(summary = "更新短信模板") @PreAuthorize("@ss.hasPermission('system:sms-template:update')") public CommonResult updateSmsTemplate(@Valid @RequestBody SmsTemplateUpdateReqVO updateReqVO) { smsTemplateService.updateSmsTemplate(updateReqVO); @@ -50,8 +50,8 @@ public class SmsTemplateController { } @DeleteMapping("/delete") - @ApiOperation("删除短信模板") - @ApiImplicitParam(name = "id", value = "编号", required = true, dataTypeClass = Long.class) + @Operation(summary = "删除短信模板") + @Parameter(name = "id", description = "编号", required = true) @PreAuthorize("@ss.hasPermission('system:sms-template:delete')") public CommonResult deleteSmsTemplate(@RequestParam("id") Long id) { smsTemplateService.deleteSmsTemplate(id); @@ -59,8 +59,8 @@ public class SmsTemplateController { } @GetMapping("/get") - @ApiOperation("获得短信模板") - @ApiImplicitParam(name = "id", value = "编号", required = true, example = "1024", dataTypeClass = Long.class) + @Operation(summary = "获得短信模板") + @Parameter(name = "id", description = "编号", required = true, example = "1024") @PreAuthorize("@ss.hasPermission('system:sms-template:query')") public CommonResult getSmsTemplate(@RequestParam("id") Long id) { SmsTemplateDO smsTemplate = smsTemplateService.getSmsTemplate(id); @@ -68,7 +68,7 @@ public class SmsTemplateController { } @GetMapping("/page") - @ApiOperation("获得短信模板分页") + @Operation(summary = "获得短信模板分页") @PreAuthorize("@ss.hasPermission('system:sms-template:query')") public CommonResult> getSmsTemplatePage(@Valid SmsTemplatePageReqVO pageVO) { PageResult pageResult = smsTemplateService.getSmsTemplatePage(pageVO); @@ -76,7 +76,7 @@ public class SmsTemplateController { } @GetMapping("/export-excel") - @ApiOperation("导出短信模板 Excel") + @Operation(summary = "导出短信模板 Excel") @PreAuthorize("@ss.hasPermission('system:sms-template:export')") @OperateLog(type = EXPORT) public void exportSmsTemplateExcel(@Valid SmsTemplateExportReqVO exportReqVO, @@ -88,11 +88,11 @@ public class SmsTemplateController { } @PostMapping("/send-sms") - @ApiOperation("发送短信") + @Operation(summary = "发送短信") @PreAuthorize("@ss.hasPermission('system:sms-template:send-sms')") public CommonResult sendSms(@Valid @RequestBody SmsTemplateSendReqVO sendReqVO) { return success(smsSendService.sendSingleSmsToAdmin(sendReqVO.getMobile(), null, sendReqVO.getTemplateCode(), sendReqVO.getTemplateParams())); } -} +} \ No newline at end of file diff --git a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/sms/vo/channel/SmsChannelBaseVO.java b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/sms/vo/channel/SmsChannelBaseVO.java index b98697d5a..1d47011fb 100644 --- a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/sms/vo/channel/SmsChannelBaseVO.java +++ b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/sms/vo/channel/SmsChannelBaseVO.java @@ -1,6 +1,6 @@ package cn.iocoder.yudao.module.system.controller.admin.sms.vo.channel; -import io.swagger.annotations.ApiModelProperty; +import io.swagger.v3.oas.annotations.media.Schema; import lombok.Data; import org.hibernate.validator.constraints.URL; @@ -13,26 +13,26 @@ import javax.validation.constraints.NotNull; @Data public class SmsChannelBaseVO { - @ApiModelProperty(value = "短信签名", required = true, example = "芋道源码") + @Schema(description = "短信签名", required = true, example = "芋道源码") @NotNull(message = "短信签名不能为空") private String signature; - @ApiModelProperty(value = "启用状态", required = true, example = "1") + @Schema(description = "启用状态", required = true, example = "1") @NotNull(message = "启用状态不能为空") private Integer status; - @ApiModelProperty(value = "备注", example = "好吃!") + @Schema(description = "备注", example = "好吃!") private String remark; - @ApiModelProperty(value = "短信 API 的账号", required = true, example = "yudao") + @Schema(description = "短信 API 的账号", required = true, example = "yudao") @NotNull(message = "短信 API 的账号不能为空") private String apiKey; - @ApiModelProperty(value = "短信 API 的密钥", example = "yuanma") + @Schema(description = "短信 API 的密钥", example = "yuanma") private String apiSecret; - @ApiModelProperty(value = "短信发送回调 URL", example = "http://www.iocoder.cn") + @Schema(description = "短信发送回调 URL", example = "http://www.iocoder.cn") @URL(message = "回调 URL 格式不正确") private String callbackUrl; -} +} \ No newline at end of file diff --git a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/sms/vo/channel/SmsChannelCreateReqVO.java b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/sms/vo/channel/SmsChannelCreateReqVO.java index edc162f47..6cb352677 100644 --- a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/sms/vo/channel/SmsChannelCreateReqVO.java +++ b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/sms/vo/channel/SmsChannelCreateReqVO.java @@ -1,21 +1,21 @@ package cn.iocoder.yudao.module.system.controller.admin.sms.vo.channel; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; +import io.swagger.v3.oas.annotations.media.Schema; +import io.swagger.v3.oas.annotations.media.Schema; import lombok.Data; import lombok.EqualsAndHashCode; import lombok.ToString; import javax.validation.constraints.NotNull; -@ApiModel("管理后台 - 短信渠道创建 Request VO") +@Schema(description = "管理后台 - 短信渠道创建 Request VO") @Data @EqualsAndHashCode(callSuper = true) @ToString(callSuper = true) public class SmsChannelCreateReqVO extends SmsChannelBaseVO { - @ApiModelProperty(value = "渠道编码", required = true, example = "YUN_PIAN", notes = "参见 SmsChannelEnum 枚举类") + @Schema(description = "渠道编码", required = true, example = "YUN_PIAN", notes = "参见 SmsChannelEnum 枚举类") @NotNull(message = "渠道编码不能为空") private String code; -} +} \ No newline at end of file diff --git a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/sms/vo/channel/SmsChannelPageReqVO.java b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/sms/vo/channel/SmsChannelPageReqVO.java index f35c5e8ac..475aebce6 100644 --- a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/sms/vo/channel/SmsChannelPageReqVO.java +++ b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/sms/vo/channel/SmsChannelPageReqVO.java @@ -1,8 +1,8 @@ package cn.iocoder.yudao.module.system.controller.admin.sms.vo.channel; import cn.iocoder.yudao.framework.common.pojo.PageParam; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; +import io.swagger.v3.oas.annotations.media.Schema; +import io.swagger.v3.oas.annotations.media.Schema; import lombok.Data; import lombok.EqualsAndHashCode; import lombok.ToString; @@ -12,20 +12,20 @@ import java.time.LocalDateTime; import static cn.iocoder.yudao.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND; -@ApiModel("管理后台 - 短信渠道分页 Request VO") +@Schema(description = "管理后台 - 短信渠道分页 Request VO") @Data @EqualsAndHashCode(callSuper = true) @ToString(callSuper = true) public class SmsChannelPageReqVO extends PageParam { - @ApiModelProperty(value = "任务状态", example = "1") + @Schema(description = "任务状态", example = "1") private Integer status; - @ApiModelProperty(value = "短信签名", example = "芋道源码", notes = "模糊匹配") + @Schema(description = "短信签名", example = "芋道源码", notes = "模糊匹配") private String signature; @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND) - @ApiModelProperty(value = "创建时间") + @Schema(description = "创建时间") private LocalDateTime[] createTime; -} +} \ No newline at end of file diff --git a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/sms/vo/channel/SmsChannelRespVO.java b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/sms/vo/channel/SmsChannelRespVO.java index d52b6d9e7..87e0bc85b 100644 --- a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/sms/vo/channel/SmsChannelRespVO.java +++ b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/sms/vo/channel/SmsChannelRespVO.java @@ -1,26 +1,26 @@ package cn.iocoder.yudao.module.system.controller.admin.sms.vo.channel; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; +import io.swagger.v3.oas.annotations.media.Schema; +import io.swagger.v3.oas.annotations.media.Schema; import lombok.Data; import lombok.EqualsAndHashCode; import lombok.ToString; import java.time.LocalDateTime; -@ApiModel("管理后台 - 短信渠道 Response VO") +@Schema(description = "管理后台 - 短信渠道 Response VO") @Data @EqualsAndHashCode(callSuper = true) @ToString(callSuper = true) public class SmsChannelRespVO extends SmsChannelBaseVO { - @ApiModelProperty(value = "编号", required = true, example = "1024") + @Schema(description = "编号", required = true, example = "1024") private Long id; - @ApiModelProperty(value = "渠道编码", required = true, example = "YUN_PIAN", notes = "参见 SmsChannelEnum 枚举类") + @Schema(description = "渠道编码", required = true, example = "YUN_PIAN", notes = "参见 SmsChannelEnum 枚举类") private String code; - @ApiModelProperty(value = "创建时间", required = true) + @Schema(description = "创建时间", required = true) private LocalDateTime createTime; -} +} \ No newline at end of file diff --git a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/sms/vo/channel/SmsChannelSimpleRespVO.java b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/sms/vo/channel/SmsChannelSimpleRespVO.java index 22b5bc1d4..cfc42e879 100644 --- a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/sms/vo/channel/SmsChannelSimpleRespVO.java +++ b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/sms/vo/channel/SmsChannelSimpleRespVO.java @@ -1,24 +1,24 @@ package cn.iocoder.yudao.module.system.controller.admin.sms.vo.channel; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; +import io.swagger.v3.oas.annotations.media.Schema; +import io.swagger.v3.oas.annotations.media.Schema; import lombok.Data; import javax.validation.constraints.NotNull; -@ApiModel("管理后台 - 短信渠道精简 Response VO") +@Schema(description = "管理后台 - 短信渠道精简 Response VO") @Data public class SmsChannelSimpleRespVO { - @ApiModelProperty(value = "编号", required = true, example = "1024") + @Schema(description = "编号", required = true, example = "1024") @NotNull(message = "编号不能为空") private Long id; - @ApiModelProperty(value = "短信签名", required = true, example = "芋道源码") + @Schema(description = "短信签名", required = true, example = "芋道源码") @NotNull(message = "短信签名不能为空") private String signature; - @ApiModelProperty(value = "渠道编码", required = true, example = "YUN_PIAN", notes = "参见 SmsChannelEnum 枚举类") + @Schema(description = "渠道编码", required = true, example = "YUN_PIAN", notes = "参见 SmsChannelEnum 枚举类") private String code; -} +} \ No newline at end of file diff --git a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/sms/vo/channel/SmsChannelUpdateReqVO.java b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/sms/vo/channel/SmsChannelUpdateReqVO.java index 683328745..0a1d451d5 100644 --- a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/sms/vo/channel/SmsChannelUpdateReqVO.java +++ b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/sms/vo/channel/SmsChannelUpdateReqVO.java @@ -1,21 +1,21 @@ package cn.iocoder.yudao.module.system.controller.admin.sms.vo.channel; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; +import io.swagger.v3.oas.annotations.media.Schema; +import io.swagger.v3.oas.annotations.media.Schema; import lombok.Data; import lombok.EqualsAndHashCode; import lombok.ToString; import javax.validation.constraints.NotNull; -@ApiModel("管理后台 - 短信渠道更新 Request VO") +@Schema(description = "管理后台 - 短信渠道更新 Request VO") @Data @EqualsAndHashCode(callSuper = true) @ToString(callSuper = true) public class SmsChannelUpdateReqVO extends SmsChannelBaseVO { - @ApiModelProperty(value = "编号", required = true, example = "1024") + @Schema(description = "编号", required = true, example = "1024") @NotNull(message = "编号不能为空") private Long id; -} +} \ No newline at end of file diff --git a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/sms/vo/log/SmsLogExportReqVO.java b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/sms/vo/log/SmsLogExportReqVO.java index 55a723a9c..dac30b278 100644 --- a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/sms/vo/log/SmsLogExportReqVO.java +++ b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/sms/vo/log/SmsLogExportReqVO.java @@ -1,7 +1,7 @@ package cn.iocoder.yudao.module.system.controller.admin.sms.vo.log; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; +import io.swagger.v3.oas.annotations.media.Schema; +import io.swagger.v3.oas.annotations.media.Schema; import lombok.Data; import org.springframework.format.annotation.DateTimeFormat; @@ -9,31 +9,31 @@ import java.time.LocalDateTime; import static cn.iocoder.yudao.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND; -@ApiModel(value = "管理后台 - 短信日志 Excel 导出 Request VO", description = "参数和 SmsLogPageReqVO 是一致的") +@Schema(description = "管理后台 - 短信日志 Excel 导出 Request VO,参数和 SmsLogPageReqVO 是一致的") @Data public class SmsLogExportReqVO { - @ApiModelProperty(value = "短信渠道编号", example = "10") + @Schema(description = "短信渠道编号", example = "10") private Long channelId; - @ApiModelProperty(value = "模板编号", example = "20") + @Schema(description = "模板编号", example = "20") private Long templateId; - @ApiModelProperty(value = "手机号", example = "15601691300") + @Schema(description = "手机号", example = "15601691300") private String mobile; - @ApiModelProperty(value = "发送状态", example = "1") + @Schema(description = "发送状态", example = "1") private Integer sendStatus; @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND) - @ApiModelProperty(value = "开始发送时间") + @Schema(description = "开始发送时间") private LocalDateTime[] sendTime; - @ApiModelProperty(value = "接收状态", example = "0") + @Schema(description = "接收状态", example = "0") private Integer receiveStatus; @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND) - @ApiModelProperty(value = "开始接收时间") + @Schema(description = "开始接收时间") private LocalDateTime[] receiveTime; -} +} \ No newline at end of file diff --git a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/sms/vo/log/SmsLogPageReqVO.java b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/sms/vo/log/SmsLogPageReqVO.java index 1ed5569c0..f81da8b14 100644 --- a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/sms/vo/log/SmsLogPageReqVO.java +++ b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/sms/vo/log/SmsLogPageReqVO.java @@ -1,8 +1,8 @@ package cn.iocoder.yudao.module.system.controller.admin.sms.vo.log; import cn.iocoder.yudao.framework.common.pojo.PageParam; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; +import io.swagger.v3.oas.annotations.media.Schema; +import io.swagger.v3.oas.annotations.media.Schema; import lombok.Data; import lombok.EqualsAndHashCode; import lombok.ToString; @@ -12,33 +12,33 @@ import java.time.LocalDateTime; import static cn.iocoder.yudao.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND; -@ApiModel("管理后台 - 短信日志分页 Request VO") +@Schema(description = "管理后台 - 短信日志分页 Request VO") @Data @EqualsAndHashCode(callSuper = true) @ToString(callSuper = true) public class SmsLogPageReqVO extends PageParam { - @ApiModelProperty(value = "短信渠道编号", example = "10") + @Schema(description = "短信渠道编号", example = "10") private Long channelId; - @ApiModelProperty(value = "模板编号", example = "20") + @Schema(description = "模板编号", example = "20") private Long templateId; - @ApiModelProperty(value = "手机号", example = "15601691300") + @Schema(description = "手机号", example = "15601691300") private String mobile; - @ApiModelProperty(value = "发送状态", example = "1", notes = "参见 SmsSendStatusEnum 枚举类") + @Schema(description = "发送状态,参见 SmsSendStatusEnum 枚举类", example = "1") private Integer sendStatus; @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND) - @ApiModelProperty(value = "开始发送时间") + @Schema(description = "开始发送时间") private LocalDateTime[] sendTime; - @ApiModelProperty(value = "接收状态", example = "0", notes = "参见 SmsReceiveStatusEnum 枚举类") + @Schema(description = "接收状态,参见 SmsSendStatusEnum 枚举类", example = "0") private Integer receiveStatus; @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND) - @ApiModelProperty(value = "开始接收时间") + @Schema(description = "开始接收时间") private LocalDateTime[] receiveTime; -} +} \ No newline at end of file diff --git a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/sms/vo/log/SmsLogRespVO.java b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/sms/vo/log/SmsLogRespVO.java index aee9657c8..124a1426c 100644 --- a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/sms/vo/log/SmsLogRespVO.java +++ b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/sms/vo/log/SmsLogRespVO.java @@ -1,89 +1,89 @@ package cn.iocoder.yudao.module.system.controller.admin.sms.vo.log; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; +import io.swagger.v3.oas.annotations.media.Schema; +import io.swagger.v3.oas.annotations.media.Schema; import lombok.Data; import java.time.LocalDateTime; import java.util.Map; -@ApiModel("管理后台 - 短信日志 Response VO") +@Schema(description = "管理后台 - 短信日志 Response VO") @Data public class SmsLogRespVO { - @ApiModelProperty(value = "编号", required = true, example = "1024") + @Schema(description = "编号", required = true, example = "1024") private Long id; - @ApiModelProperty(value = "短信渠道编号", required = true, example = "10") + @Schema(description = "短信渠道编号", required = true, example = "10") private Long channelId; - @ApiModelProperty(value = "短信渠道编码", required = true, example = "ALIYUN") + @Schema(description = "短信渠道编码", required = true, example = "ALIYUN") private String channelCode; - @ApiModelProperty(value = "模板编号", required = true, example = "20") + @Schema(description = "模板编号", required = true, example = "20") private Long templateId; - @ApiModelProperty(value = "模板编码", required = true, example = "test-01") + @Schema(description = "模板编码", required = true, example = "test-01") private String templateCode; - @ApiModelProperty(value = "短信类型", required = true, example = "1") + @Schema(description = "短信类型", required = true, example = "1") private Integer templateType; - @ApiModelProperty(value = "短信内容", required = true, example = "你好,你的验证码是 1024") + @Schema(description = "短信内容", required = true, example = "你好,你的验证码是 1024") private String templateContent; - @ApiModelProperty(value = "短信参数", required = true, example = "name,code") + @Schema(description = "短信参数", required = true, example = "name,code") private Map templateParams; - @ApiModelProperty(value = "短信 API 的模板编号", required = true, example = "SMS_207945135") + @Schema(description = "短信 API 的模板编号", required = true, example = "SMS_207945135") private String apiTemplateId; - @ApiModelProperty(value = "手机号", required = true, example = "15601691300") + @Schema(description = "手机号", required = true, example = "15601691300") private String mobile; - @ApiModelProperty(value = "用户编号", example = "10") + @Schema(description = "用户编号", example = "10") private Long userId; - @ApiModelProperty(value = "用户类型", example = "1") + @Schema(description = "用户类型", example = "1") private Integer userType; - @ApiModelProperty(value = "发送状态", required = true, example = "1") + @Schema(description = "发送状态", required = true, example = "1") private Integer sendStatus; - @ApiModelProperty(value = "发送时间") + @Schema(description = "发送时间") private LocalDateTime sendTime; - @ApiModelProperty(value = "发送结果的编码", example = "0") + @Schema(description = "发送结果的编码", example = "0") private Integer sendCode; - @ApiModelProperty(value = "发送结果的提示", example = "成功") + @Schema(description = "发送结果的提示", example = "成功") private String sendMsg; - @ApiModelProperty(value = "短信 API 发送结果的编码", example = "SUCCESS") + @Schema(description = "短信 API 发送结果的编码", example = "SUCCESS") private String apiSendCode; - @ApiModelProperty(value = "短信 API 发送失败的提示", example = "成功") + @Schema(description = "短信 API 发送失败的提示", example = "成功") private String apiSendMsg; - @ApiModelProperty(value = "短信 API 发送返回的唯一请求 ID", example = "3837C6D3-B96F-428C-BBB2-86135D4B5B99") + @Schema(description = "短信 API 发送返回的唯一请求 ID", example = "3837C6D3-B96F-428C-BBB2-86135D4B5B99") private String apiRequestId; - @ApiModelProperty(value = "短信 API 发送返回的序号", example = "62923244790") + @Schema(description = "短信 API 发送返回的序号", example = "62923244790") private String apiSerialNo; - @ApiModelProperty(value = "接收状态", required = true, example = "0") + @Schema(description = "接收状态", required = true, example = "0") private Integer receiveStatus; - @ApiModelProperty(value = "接收时间") + @Schema(description = "接收时间") private LocalDateTime receiveTime; - @ApiModelProperty(value = "API 接收结果的编码", example = "DELIVRD") + @Schema(description = "API 接收结果的编码", example = "DELIVRD") private String apiReceiveCode; - @ApiModelProperty(value = "API 接收结果的说明", example = "用户接收成功") + @Schema(description = "API 接收结果的说明", example = "用户接收成功") private String apiReceiveMsg; - @ApiModelProperty(value = "创建时间", required = true) + @Schema(description = "创建时间", required = true) private LocalDateTime createTime; -} +} \ No newline at end of file diff --git a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/sms/vo/template/SmsTemplateBaseVO.java b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/sms/vo/template/SmsTemplateBaseVO.java index ca9220f8a..01a187847 100644 --- a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/sms/vo/template/SmsTemplateBaseVO.java +++ b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/sms/vo/template/SmsTemplateBaseVO.java @@ -1,6 +1,6 @@ package cn.iocoder.yudao.module.system.controller.admin.sms.vo.template; -import io.swagger.annotations.ApiModelProperty; +import io.swagger.v3.oas.annotations.media.Schema; import lombok.Data; import javax.validation.constraints.NotNull; @@ -12,35 +12,35 @@ import javax.validation.constraints.NotNull; @Data public class SmsTemplateBaseVO { - @ApiModelProperty(value = "短信类型", required = true, example = "1", notes = "参见 SmsTemplateTypeEnum 枚举类") + @Schema(description = "短信类型", required = true, example = "1", notes = "参见 SmsTemplateTypeEnum 枚举类") @NotNull(message = "短信类型不能为空") private Integer type; - @ApiModelProperty(value = "开启状态", required = true, example = "1", notes = "参见 CommonStatusEnum 枚举类") + @Schema(description = "开启状态", required = true, example = "1", notes = "参见 CommonStatusEnum 枚举类") @NotNull(message = "开启状态不能为空") private Integer status; - @ApiModelProperty(value = "模板编码", required = true, example = "test_01") + @Schema(description = "模板编码", required = true, example = "test_01") @NotNull(message = "模板编码不能为空") private String code; - @ApiModelProperty(value = "模板名称", required = true, example = "yudao") + @Schema(description = "模板名称", required = true, example = "yudao") @NotNull(message = "模板名称不能为空") private String name; - @ApiModelProperty(value = "模板内容", required = true, example = "你好,{name}。你长的太{like}啦!") + @Schema(description = "模板内容", required = true, example = "你好,{name}。你长的太{like}啦!") @NotNull(message = "模板内容不能为空") private String content; - @ApiModelProperty(value = "备注", example = "哈哈哈") + @Schema(description = "备注", example = "哈哈哈") private String remark; - @ApiModelProperty(value = "短信 API 的模板编号", required = true, example = "4383920") + @Schema(description = "短信 API 的模板编号", required = true, example = "4383920") @NotNull(message = "短信 API 的模板编号不能为空") private String apiTemplateId; - @ApiModelProperty(value = "短信渠道编号", required = true, example = "10") + @Schema(description = "短信渠道编号", required = true, example = "10") @NotNull(message = "短信渠道编号不能为空") private Long channelId; -} +} \ No newline at end of file diff --git a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/sms/vo/template/SmsTemplateExportReqVO.java b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/sms/vo/template/SmsTemplateExportReqVO.java index df5947adc..b7657c332 100644 --- a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/sms/vo/template/SmsTemplateExportReqVO.java +++ b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/sms/vo/template/SmsTemplateExportReqVO.java @@ -1,7 +1,7 @@ package cn.iocoder.yudao.module.system.controller.admin.sms.vo.template; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; +import io.swagger.v3.oas.annotations.media.Schema; +import io.swagger.v3.oas.annotations.media.Schema; import lombok.Data; import org.springframework.format.annotation.DateTimeFormat; @@ -9,30 +9,30 @@ import java.time.LocalDateTime; import static cn.iocoder.yudao.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND; -@ApiModel(value = "管理后台 - 短信模板 Excel 导出 Request VO", description = "参数和 SmsTemplatePageReqVO 是一致的") +@Schema(description = "管理后台 - 短信模板 Excel 导出 Request VO,参数和 SmsTemplatePageReqVO 是一致的") @Data public class SmsTemplateExportReqVO { - @ApiModelProperty(value = "短信签名", example = "1") + @Schema(description = "短信签名", example = "1") private Integer type; - @ApiModelProperty(value = "开启状态", example = "1") + @Schema(description = "开启状态", example = "1") private Integer status; - @ApiModelProperty(value = "模板编码", example = "test_01", notes = "模糊匹配") + @Schema(description = "模板编码,模糊匹配", example = "test_01") private String code; - @ApiModelProperty(value = "模板内容", example = "你好,{name}。你长的太{like}啦!", notes = "模糊匹配") + @Schema(description = "模板内容,模糊匹配", example = "你好,{name}。你长的太{like}啦!") private String content; - @ApiModelProperty(value = "短信 API 的模板编号", example = "4383920", notes = "模糊匹配") + @Schema(description = "短信 API 的模板编号,模糊匹配", example = "4383920") private String apiTemplateId; - @ApiModelProperty(value = "短信渠道编号", example = "10") + @Schema(description = "短信渠道编号", example = "10") private Long channelId; @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND) - @ApiModelProperty(value = "创建时间") + @Schema(description = "创建时间") private LocalDateTime[] createTime; -} +} \ No newline at end of file diff --git a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/sms/vo/template/SmsTemplatePageReqVO.java b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/sms/vo/template/SmsTemplatePageReqVO.java index 129e0f7a8..21987f1f5 100644 --- a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/sms/vo/template/SmsTemplatePageReqVO.java +++ b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/sms/vo/template/SmsTemplatePageReqVO.java @@ -1,8 +1,8 @@ package cn.iocoder.yudao.module.system.controller.admin.sms.vo.template; import cn.iocoder.yudao.framework.common.pojo.PageParam; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; +import io.swagger.v3.oas.annotations.media.Schema; +import io.swagger.v3.oas.annotations.media.Schema; import lombok.Data; import lombok.EqualsAndHashCode; import lombok.ToString; @@ -12,32 +12,32 @@ import java.time.LocalDateTime; import static cn.iocoder.yudao.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND; -@ApiModel("管理后台 - 短信模板分页 Request VO") +@Schema(description = "管理后台 - 短信模板分页 Request VO") @Data @EqualsAndHashCode(callSuper = true) @ToString(callSuper = true) public class SmsTemplatePageReqVO extends PageParam { - @ApiModelProperty(value = "短信签名", example = "1") + @Schema(description = "短信签名", example = "1") private Integer type; - @ApiModelProperty(value = "开启状态", example = "1") + @Schema(description = "开启状态", example = "1") private Integer status; - @ApiModelProperty(value = "模板编码", example = "test_01", notes = "模糊匹配") + @Schema(description = "模板编码,模糊匹配", example = "test_01") private String code; - @ApiModelProperty(value = "模板内容", example = "你好,{name}。你长的太{like}啦!", notes = "模糊匹配") + @Schema(description = "模板内容,模糊匹配", example = "你好,{name}。你长的太{like}啦!") private String content; - @ApiModelProperty(value = "短信 API 的模板编号", example = "4383920", notes = "模糊匹配") + @Schema(description = "短信 API 的模板编号,模糊匹配", example = "4383920") private String apiTemplateId; - @ApiModelProperty(value = "短信渠道编号", example = "10") + @Schema(description = "短信渠道编号", example = "10") private Long channelId; @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND) - @ApiModelProperty(value = "创建时间") + @Schema(description = "创建时间") private LocalDateTime[] createTime; -} +} \ No newline at end of file diff --git a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/sms/vo/template/SmsTemplateRespVO.java b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/sms/vo/template/SmsTemplateRespVO.java index 8a10503cb..0ca0fde24 100644 --- a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/sms/vo/template/SmsTemplateRespVO.java +++ b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/sms/vo/template/SmsTemplateRespVO.java @@ -1,7 +1,7 @@ package cn.iocoder.yudao.module.system.controller.admin.sms.vo.template; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; +import io.swagger.v3.oas.annotations.media.Schema; +import io.swagger.v3.oas.annotations.media.Schema; import lombok.Data; import lombok.EqualsAndHashCode; import lombok.ToString; @@ -9,22 +9,22 @@ import lombok.ToString; import java.time.LocalDateTime; import java.util.List; -@ApiModel("管理后台 - 短信模板 Response VO") +@Schema(description = "管理后台 - 短信模板 Response VO") @Data @EqualsAndHashCode(callSuper = true) @ToString(callSuper = true) public class SmsTemplateRespVO extends SmsTemplateBaseVO { - @ApiModelProperty(value = "编号", required = true, example = "1024") + @Schema(description = "编号", required = true, example = "1024") private Long id; - @ApiModelProperty(value = "短信渠道编码", required = true, example = "ALIYUN") + @Schema(description = "短信渠道编码", required = true, example = "ALIYUN") private String channelCode; - @ApiModelProperty(value = "参数数组", example = "name,code") + @Schema(description = "参数数组", example = "name,code") private List params; - @ApiModelProperty(value = "创建时间", required = true) + @Schema(description = "创建时间", required = true) private LocalDateTime createTime; -} +} \ No newline at end of file diff --git a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/sms/vo/template/SmsTemplateSendReqVO.java b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/sms/vo/template/SmsTemplateSendReqVO.java index 956b4839e..93eaac275 100644 --- a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/sms/vo/template/SmsTemplateSendReqVO.java +++ b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/sms/vo/template/SmsTemplateSendReqVO.java @@ -1,25 +1,25 @@ package cn.iocoder.yudao.module.system.controller.admin.sms.vo.template; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; +import io.swagger.v3.oas.annotations.media.Schema; +import io.swagger.v3.oas.annotations.media.Schema; import lombok.Data; import javax.validation.constraints.NotNull; import java.util.Map; -@ApiModel("管理后台 - 短信模板的发送 Request VO") +@Schema(description = "管理后台 - 短信模板的发送 Request VO") @Data public class SmsTemplateSendReqVO { - @ApiModelProperty(value = "手机号", required = true, example = "15601691300") + @Schema(description = "手机号", required = true, example = "15601691300") @NotNull(message = "手机号不能为空") private String mobile; - @ApiModelProperty(value = "模板编码", required = true, example = "test_01") + @Schema(description = "模板编码", required = true, example = "test_01") @NotNull(message = "模板编码不能为空") private String templateCode; - @ApiModelProperty(value = "模板参数") + @Schema(description = "模板参数") private Map templateParams; -} +} \ No newline at end of file diff --git a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/sms/vo/template/SmsTemplateUpdateReqVO.java b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/sms/vo/template/SmsTemplateUpdateReqVO.java index 86bdbba9a..99db6b91d 100644 --- a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/sms/vo/template/SmsTemplateUpdateReqVO.java +++ b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/sms/vo/template/SmsTemplateUpdateReqVO.java @@ -1,21 +1,21 @@ package cn.iocoder.yudao.module.system.controller.admin.sms.vo.template; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; +import io.swagger.v3.oas.annotations.media.Schema; +import io.swagger.v3.oas.annotations.media.Schema; import lombok.Data; import lombok.EqualsAndHashCode; import lombok.ToString; import javax.validation.constraints.NotNull; -@ApiModel("管理后台 - 短信模板更新 Request VO") +@Schema(description = "管理后台 - 短信模板更新 Request VO") @Data @EqualsAndHashCode(callSuper = true) @ToString(callSuper = true) public class SmsTemplateUpdateReqVO extends SmsTemplateBaseVO { - @ApiModelProperty(value = "编号", required = true, example = "1024") + @Schema(description = "编号", required = true, example = "1024") @NotNull(message = "编号不能为空") private Long id; -} +} \ No newline at end of file diff --git a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/socail/SocialUserController.java b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/socail/SocialUserController.java index 85585f537..3b40b67b2 100644 --- a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/socail/SocialUserController.java +++ b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/socail/SocialUserController.java @@ -6,8 +6,8 @@ import cn.iocoder.yudao.module.system.controller.admin.socail.vo.SocialUserBindR import cn.iocoder.yudao.module.system.controller.admin.socail.vo.SocialUserUnbindReqVO; import cn.iocoder.yudao.module.system.convert.social.SocialUserConvert; import cn.iocoder.yudao.module.system.service.social.SocialUserService; -import io.swagger.annotations.Api; -import io.swagger.annotations.ApiOperation; +import io.swagger.v3.oas.annotations.tags.Tag; +import io.swagger.v3.oas.annotations.Operation; import org.springframework.validation.annotation.Validated; import org.springframework.web.bind.annotation.*; @@ -16,7 +16,7 @@ import javax.validation.Valid; import static cn.iocoder.yudao.framework.security.core.util.SecurityFrameworkUtils.getLoginUserId; -@Api(tags = "管理后台 - 社交用户") +@Tag(name = "管理后台 - 社交用户") @RestController @RequestMapping("/system/social-user") @Validated @@ -26,17 +26,17 @@ public class SocialUserController { private SocialUserService socialUserService; @PostMapping("/bind") - @ApiOperation("社交绑定,使用 code 授权码") + @Operation(summary = "社交绑定,使用 code 授权码") public CommonResult socialBind(@RequestBody @Valid SocialUserBindReqVO reqVO) { socialUserService.bindSocialUser(SocialUserConvert.INSTANCE.convert(getLoginUserId(), UserTypeEnum.ADMIN.getValue(), reqVO)); return CommonResult.success(true); } @DeleteMapping("/unbind") - @ApiOperation("取消社交绑定") + @Operation(summary = "取消社交绑定") public CommonResult socialUnbind(@RequestBody SocialUserUnbindReqVO reqVO) { socialUserService.unbindSocialUser(getLoginUserId(), UserTypeEnum.ADMIN.getValue(), reqVO.getType(), reqVO.getOpenid()); return CommonResult.success(true); } -} +} \ No newline at end of file diff --git a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/socail/vo/SocialUserBindReqVO.java b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/socail/vo/SocialUserBindReqVO.java index 27dd6b79a..5d33789d8 100644 --- a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/socail/vo/SocialUserBindReqVO.java +++ b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/socail/vo/SocialUserBindReqVO.java @@ -2,8 +2,8 @@ package cn.iocoder.yudao.module.system.controller.admin.socail.vo; import cn.iocoder.yudao.module.system.enums.social.SocialTypeEnum; import cn.iocoder.yudao.framework.common.validation.InEnum; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; +import io.swagger.v3.oas.annotations.media.Schema; +import io.swagger.v3.oas.annotations.media.Schema; import lombok.AllArgsConstructor; import lombok.Builder; import lombok.Data; @@ -12,24 +12,24 @@ import lombok.NoArgsConstructor; import javax.validation.constraints.NotEmpty; import javax.validation.constraints.NotNull; -@ApiModel("管理后台 - 社交绑定 Request VO,使用 code 授权码") +@Schema(description = "管理后台 - 社交绑定 Request VO,使用 code 授权码") @Data @NoArgsConstructor @AllArgsConstructor @Builder public class SocialUserBindReqVO { - @ApiModelProperty(value = "社交平台的类型", required = true, example = "10", notes = "参见 UserSocialTypeEnum 枚举值") + @Schema(description = "社交平台的类型", required = true, example = "10", notes = "参见 UserSocialTypeEnum 枚举值") @InEnum(SocialTypeEnum.class) @NotNull(message = "社交平台的类型不能为空") private Integer type; - @ApiModelProperty(value = "授权码", required = true, example = "1024") + @Schema(description = "授权码", required = true, example = "1024") @NotEmpty(message = "授权码不能为空") private String code; - @ApiModelProperty(value = "state", required = true, example = "9b2ffbc1-7425-4155-9894-9d5c08541d62") + @Schema(description = "state", required = true, example = "9b2ffbc1-7425-4155-9894-9d5c08541d62") @NotEmpty(message = "state 不能为空") private String state; -} +} \ No newline at end of file diff --git a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/socail/vo/SocialUserUnbindReqVO.java b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/socail/vo/SocialUserUnbindReqVO.java index 68904ce58..5c075f21f 100644 --- a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/socail/vo/SocialUserUnbindReqVO.java +++ b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/socail/vo/SocialUserUnbindReqVO.java @@ -2,8 +2,8 @@ package cn.iocoder.yudao.module.system.controller.admin.socail.vo; import cn.iocoder.yudao.framework.common.validation.InEnum; import cn.iocoder.yudao.module.system.enums.social.SocialTypeEnum; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; +import io.swagger.v3.oas.annotations.media.Schema; +import io.swagger.v3.oas.annotations.media.Schema; import lombok.AllArgsConstructor; import lombok.Builder; import lombok.Data; @@ -12,20 +12,20 @@ import lombok.NoArgsConstructor; import javax.validation.constraints.NotEmpty; import javax.validation.constraints.NotNull; -@ApiModel("管理后台 - 取消社交绑定 Request VO") +@Schema(description = "管理后台 - 取消社交绑定 Request VO") @Data @NoArgsConstructor @AllArgsConstructor @Builder public class SocialUserUnbindReqVO { - @ApiModelProperty(value = "社交平台的类型", required = true, example = "10", notes = "参见 UserSocialTypeEnum 枚举值") + @Schema(description = "社交平台的类型,参见 UserSocialTypeEnum 枚举值", required = true, example = "10") @InEnum(SocialTypeEnum.class) @NotNull(message = "社交平台的类型不能为空") private Integer type; - @ApiModelProperty(value = "社交用户的 openid", required = true, example = "IPRmJ0wvBptiPIlGEZiPewGwiEiE") + @Schema(description = "社交用户的 openid", required = true, example = "IPRmJ0wvBptiPIlGEZiPewGwiEiE") @NotEmpty(message = "社交用户的 openid 不能为空") private String openid; -} +} \ No newline at end of file diff --git a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/tenant/TenantController.java b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/tenant/TenantController.java index acc21d3fa..e040b0af5 100644 --- a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/tenant/TenantController.java +++ b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/tenant/TenantController.java @@ -8,9 +8,9 @@ import cn.iocoder.yudao.module.system.controller.admin.tenant.vo.tenant.*; import cn.iocoder.yudao.module.system.convert.tenant.TenantConvert; import cn.iocoder.yudao.module.system.dal.dataobject.tenant.TenantDO; import cn.iocoder.yudao.module.system.service.tenant.TenantService; -import io.swagger.annotations.Api; -import io.swagger.annotations.ApiImplicitParam; -import io.swagger.annotations.ApiOperation; +import io.swagger.v3.oas.annotations.tags.Tag; +import io.swagger.v3.oas.annotations.Parameter; +import io.swagger.v3.oas.annotations.Operation; import org.springframework.security.access.prepost.PreAuthorize; import org.springframework.web.bind.annotation.*; @@ -24,7 +24,7 @@ import java.util.List; import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success; import static cn.iocoder.yudao.framework.operatelog.core.enums.OperateTypeEnum.EXPORT; -@Api(tags = "管理后台 - 租户") +@Tag(name = "管理后台 - 租户") @RestController @RequestMapping("/system/tenant") public class TenantController { @@ -34,22 +34,22 @@ public class TenantController { @GetMapping("/get-id-by-name") @PermitAll - @ApiOperation(value = "使用租户名,获得租户编号", notes = "登录界面,根据用户的租户名,获得租户编号") - @ApiImplicitParam(name = "name", value = "租户名", required = true, example = "1024", dataTypeClass = Long.class) + @Operation(summary = "使用租户名,获得租户编号", description = "登录界面,根据用户的租户名,获得租户编号") + @Parameter(name = "name", description = "租户名", required = true, example = "1024") public CommonResult getTenantIdByName(@RequestParam("name") String name) { TenantDO tenantDO = tenantService.getTenantByName(name); return success(tenantDO != null ? tenantDO.getId() : null); } @PostMapping("/create") - @ApiOperation("创建租户") + @Operation(summary = "创建租户") @PreAuthorize("@ss.hasPermission('system:tenant:create')") public CommonResult createTenant(@Valid @RequestBody TenantCreateReqVO createReqVO) { return success(tenantService.createTenant(createReqVO)); } @PutMapping("/update") - @ApiOperation("更新租户") + @Operation(summary = "更新租户") @PreAuthorize("@ss.hasPermission('system:tenant:update')") public CommonResult updateTenant(@Valid @RequestBody TenantUpdateReqVO updateReqVO) { tenantService.updateTenant(updateReqVO); @@ -57,8 +57,8 @@ public class TenantController { } @DeleteMapping("/delete") - @ApiOperation("删除租户") - @ApiImplicitParam(name = "id", value = "编号", required = true, example = "1024", dataTypeClass = Long.class) + @Operation(summary = "删除租户") + @Parameter(name = "id", description = "编号", required = true, example = "1024") @PreAuthorize("@ss.hasPermission('system:tenant:delete')") public CommonResult deleteTenant(@RequestParam("id") Long id) { tenantService.deleteTenant(id); @@ -66,8 +66,8 @@ public class TenantController { } @GetMapping("/get") - @ApiOperation("获得租户") - @ApiImplicitParam(name = "id", value = "编号", required = true, example = "1024", dataTypeClass = Long.class) + @Operation(summary = "获得租户") + @Parameter(name = "id", description = "编号", required = true, example = "1024") @PreAuthorize("@ss.hasPermission('system:tenant:query')") public CommonResult getTenant(@RequestParam("id") Long id) { TenantDO tenant = tenantService.getTenant(id); @@ -75,7 +75,7 @@ public class TenantController { } @GetMapping("/page") - @ApiOperation("获得租户分页") + @Operation(summary = "获得租户分页") @PreAuthorize("@ss.hasPermission('system:tenant:query')") public CommonResult> getTenantPage(@Valid TenantPageReqVO pageVO) { PageResult pageResult = tenantService.getTenantPage(pageVO); @@ -83,7 +83,7 @@ public class TenantController { } @GetMapping("/export-excel") - @ApiOperation("导出租户 Excel") + @Operation(summary = "导出租户 Excel") @PreAuthorize("@ss.hasPermission('system:tenant:export')") @OperateLog(type = EXPORT) public void exportTenantExcel(@Valid TenantExportReqVO exportReqVO, @@ -95,4 +95,4 @@ public class TenantController { } -} +} \ No newline at end of file diff --git a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/tenant/TenantPackageController.java b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/tenant/TenantPackageController.java index b69b0dca5..602426745 100644 --- a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/tenant/TenantPackageController.java +++ b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/tenant/TenantPackageController.java @@ -7,9 +7,9 @@ import cn.iocoder.yudao.module.system.controller.admin.tenant.vo.packages.*; import cn.iocoder.yudao.module.system.convert.tenant.TenantPackageConvert; import cn.iocoder.yudao.module.system.dal.dataobject.tenant.TenantPackageDO; import cn.iocoder.yudao.module.system.service.tenant.TenantPackageService; -import io.swagger.annotations.Api; -import io.swagger.annotations.ApiImplicitParam; -import io.swagger.annotations.ApiOperation; +import io.swagger.v3.oas.annotations.tags.Tag; +import io.swagger.v3.oas.annotations.Parameter; +import io.swagger.v3.oas.annotations.Operation; import org.springframework.security.access.prepost.PreAuthorize; import org.springframework.validation.annotation.Validated; import org.springframework.web.bind.annotation.*; @@ -20,7 +20,7 @@ import java.util.List; import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success; -@Api(tags = "管理后台 - 租户套餐") +@Tag(name = "管理后台 - 租户套餐") @RestController @RequestMapping("/system/tenant-package") @Validated @@ -30,14 +30,14 @@ public class TenantPackageController { private TenantPackageService tenantPackageService; @PostMapping("/create") - @ApiOperation("创建租户套餐") + @Operation(summary = "创建租户套餐") @PreAuthorize("@ss.hasPermission('system:tenant-package:create')") public CommonResult createTenantPackage(@Valid @RequestBody TenantPackageCreateReqVO createReqVO) { return success(tenantPackageService.createTenantPackage(createReqVO)); } @PutMapping("/update") - @ApiOperation("更新租户套餐") + @Operation(summary = "更新租户套餐") @PreAuthorize("@ss.hasPermission('system:tenant-package:update')") public CommonResult updateTenantPackage(@Valid @RequestBody TenantPackageUpdateReqVO updateReqVO) { tenantPackageService.updateTenantPackage(updateReqVO); @@ -45,8 +45,8 @@ public class TenantPackageController { } @DeleteMapping("/delete") - @ApiOperation("删除租户套餐") - @ApiImplicitParam(name = "id", value = "编号", required = true, dataTypeClass = Long.class) + @Operation(summary = "删除租户套餐") + @Parameter(name = "id", description = "编号", required = true) @PreAuthorize("@ss.hasPermission('system:tenant-package:delete')") public CommonResult deleteTenantPackage(@RequestParam("id") Long id) { tenantPackageService.deleteTenantPackage(id); @@ -54,8 +54,8 @@ public class TenantPackageController { } @GetMapping("/get") - @ApiOperation("获得租户套餐") - @ApiImplicitParam(name = "id", value = "编号", required = true, example = "1024", dataTypeClass = Long.class) + @Operation(summary = "获得租户套餐") + @Parameter(name = "id", description = "编号", required = true, example = "1024") @PreAuthorize("@ss.hasPermission('system:tenant-package:query')") public CommonResult getTenantPackage(@RequestParam("id") Long id) { TenantPackageDO tenantPackage = tenantPackageService.getTenantPackage(id); @@ -63,7 +63,7 @@ public class TenantPackageController { } @GetMapping("/page") - @ApiOperation("获得租户套餐分页") + @Operation(summary = "获得租户套餐分页") @PreAuthorize("@ss.hasPermission('system:tenant-package:query')") public CommonResult> getTenantPackagePage(@Valid TenantPackagePageReqVO pageVO) { PageResult pageResult = tenantPackageService.getTenantPackagePage(pageVO); @@ -71,11 +71,11 @@ public class TenantPackageController { } @GetMapping("/get-simple-list") - @ApiOperation(value = "获取租户套餐精简信息列表", notes = "只包含被开启的租户套餐,主要用于前端的下拉选项") + @Operation(summary = "获取租户套餐精简信息列表", description = "只包含被开启的租户套餐,主要用于前端的下拉选项") public CommonResult> getTenantPackageList() { // 获得角色列表,只要开启状态的 List list = tenantPackageService.getTenantPackageListByStatus(CommonStatusEnum.ENABLE.getStatus()); return success(TenantPackageConvert.INSTANCE.convertList02(list)); } -} +} \ No newline at end of file diff --git a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/tenant/vo/packages/TenantPackageBaseVO.java b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/tenant/vo/packages/TenantPackageBaseVO.java index 36c838366..800b2f3cb 100755 --- a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/tenant/vo/packages/TenantPackageBaseVO.java +++ b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/tenant/vo/packages/TenantPackageBaseVO.java @@ -1,6 +1,6 @@ package cn.iocoder.yudao.module.system.controller.admin.tenant.vo.packages; -import io.swagger.annotations.ApiModelProperty; +import io.swagger.v3.oas.annotations.media.Schema; import lombok.Data; import javax.validation.constraints.NotNull; @@ -13,19 +13,19 @@ import java.util.Set; @Data public class TenantPackageBaseVO { - @ApiModelProperty(value = "套餐名", required = true, example = "VIP") + @Schema(description = "套餐名", required = true, example = "VIP") @NotNull(message = "套餐名不能为空") private String name; - @ApiModelProperty(value = "状态", required = true, example = "1", notes = "参见 CommonStatusEnum 枚举") + @Schema(description = "状态,参见 CommonStatusEnum 枚举", required = true, example = "1" ) @NotNull(message = "状态不能为空") private Integer status; - @ApiModelProperty(value = "备注", example = "好") + @Schema(description = "备注", example = "好") private String remark; - @ApiModelProperty(value = "关联的菜单编号", required = true) + @Schema(description = "关联的菜单编号", required = true) @NotNull(message = "关联的菜单编号不能为空") private Set menuIds; -} +} \ No newline at end of file diff --git a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/tenant/vo/packages/TenantPackagePageReqVO.java b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/tenant/vo/packages/TenantPackagePageReqVO.java index 1b093017d..969403879 100755 --- a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/tenant/vo/packages/TenantPackagePageReqVO.java +++ b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/tenant/vo/packages/TenantPackagePageReqVO.java @@ -1,8 +1,8 @@ package cn.iocoder.yudao.module.system.controller.admin.tenant.vo.packages; import cn.iocoder.yudao.framework.common.pojo.PageParam; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; +import io.swagger.v3.oas.annotations.media.Schema; +import io.swagger.v3.oas.annotations.media.Schema; import lombok.Data; import lombok.EqualsAndHashCode; import lombok.ToString; @@ -12,23 +12,23 @@ import java.time.LocalDateTime; import static cn.iocoder.yudao.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND; -@ApiModel("管理后台 - 租户套餐分页 Request VO") +@Schema(description = "管理后台 - 租户套餐分页 Request VO") @Data @EqualsAndHashCode(callSuper = true) @ToString(callSuper = true) public class TenantPackagePageReqVO extends PageParam { - @ApiModelProperty(value = "套餐名", example = "VIP") + @Schema(description = "套餐名", example = "VIP") private String name; - @ApiModelProperty(value = "状态", example = "1") + @Schema(description = "状态", example = "1") private Integer status; - @ApiModelProperty(value = "备注", example = "好") + @Schema(description = "备注", example = "好") private String remark; @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND) - @ApiModelProperty(value = "创建时间") + @Schema(description = "创建时间") private LocalDateTime[] createTime; -} +} \ No newline at end of file diff --git a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/tenant/vo/packages/TenantPackageRespVO.java b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/tenant/vo/packages/TenantPackageRespVO.java index b46772922..23a6c483b 100755 --- a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/tenant/vo/packages/TenantPackageRespVO.java +++ b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/tenant/vo/packages/TenantPackageRespVO.java @@ -1,23 +1,23 @@ package cn.iocoder.yudao.module.system.controller.admin.tenant.vo.packages; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; +import io.swagger.v3.oas.annotations.media.Schema; +import io.swagger.v3.oas.annotations.media.Schema; import lombok.Data; import lombok.EqualsAndHashCode; import lombok.ToString; import java.time.LocalDateTime; -@ApiModel("管理后台 - 租户套餐 Response VO") +@Schema(description = "管理后台 - 租户套餐 Response VO") @Data @EqualsAndHashCode(callSuper = true) @ToString(callSuper = true) public class TenantPackageRespVO extends TenantPackageBaseVO { - @ApiModelProperty(value = "套餐编号", required = true, example = "1024") + @Schema(description = "套餐编号", required = true, example = "1024") private Long id; - @ApiModelProperty(value = "创建时间", required = true) + @Schema(description = "创建时间", required = true) private LocalDateTime createTime; -} +} \ No newline at end of file diff --git a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/tenant/vo/packages/TenantPackageSimpleRespVO.java b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/tenant/vo/packages/TenantPackageSimpleRespVO.java index 4ec1c97f7..4d617225c 100644 --- a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/tenant/vo/packages/TenantPackageSimpleRespVO.java +++ b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/tenant/vo/packages/TenantPackageSimpleRespVO.java @@ -1,21 +1,21 @@ package cn.iocoder.yudao.module.system.controller.admin.tenant.vo.packages; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; +import io.swagger.v3.oas.annotations.media.Schema; +import io.swagger.v3.oas.annotations.media.Schema; import lombok.Data; import javax.validation.constraints.NotNull; -@ApiModel("管理后台 - 租户套餐精简 Response VO") +@Schema(description = "管理后台 - 租户套餐精简 Response VO") @Data public class TenantPackageSimpleRespVO { - @ApiModelProperty(value = "套餐编号", required = true, example = "1024") + @Schema(description = "套餐编号", required = true, example = "1024") @NotNull(message = "套餐编号不能为空") private Long id; - @ApiModelProperty(value = "套餐名", required = true, example = "VIP") + @Schema(description = "套餐名", required = true, example = "VIP") @NotNull(message = "套餐名不能为空") private String name; -} +} \ No newline at end of file diff --git a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/tenant/vo/packages/TenantPackageUpdateReqVO.java b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/tenant/vo/packages/TenantPackageUpdateReqVO.java index b1d269607..ec907430c 100755 --- a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/tenant/vo/packages/TenantPackageUpdateReqVO.java +++ b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/tenant/vo/packages/TenantPackageUpdateReqVO.java @@ -5,14 +5,14 @@ import java.util.*; import io.swagger.annotations.*; import javax.validation.constraints.*; -@ApiModel("管理后台 - 租户套餐更新 Request VO") +@Schema(description = "管理后台 - 租户套餐更新 Request VO") @Data @EqualsAndHashCode(callSuper = true) @ToString(callSuper = true) public class TenantPackageUpdateReqVO extends TenantPackageBaseVO { - @ApiModelProperty(value = "套餐编号", required = true, example = "1024") + @Schema(description = "套餐编号", required = true, example = "1024") @NotNull(message = "套餐编号不能为空") private Long id; -} +} \ No newline at end of file diff --git a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/tenant/vo/tenant/TenantBaseVO.java b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/tenant/vo/tenant/TenantBaseVO.java index 226c9b449..1a79fb847 100755 --- a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/tenant/vo/tenant/TenantBaseVO.java +++ b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/tenant/vo/tenant/TenantBaseVO.java @@ -1,7 +1,7 @@ package cn.iocoder.yudao.module.system.controller.admin.tenant.vo.tenant; +import io.swagger.v3.oas.annotations.media.Schema; import lombok.*; -import io.swagger.annotations.*; import org.hibernate.validator.constraints.URL; import javax.validation.constraints.*; @@ -14,35 +14,35 @@ import java.time.LocalDateTime; @Data public class TenantBaseVO { - @ApiModelProperty(value = "租户名", required = true, example = "芋道") + @Schema(description = "租户名", required = true, example = "芋道") @NotNull(message = "租户名不能为空") private String name; - @ApiModelProperty(value = "联系人", required = true, example = "芋艿") + @Schema(description = "联系人", required = true, example = "芋艿") @NotNull(message = "联系人不能为空") private String contactName; - @ApiModelProperty(value = "联系手机", example = "15601691300") + @Schema(description = "联系手机", example = "15601691300") private String contactMobile; - @ApiModelProperty(value = "租户状态", required = true, example = "1") + @Schema(description = "租户状态", required = true, example = "1") @NotNull(message = "租户状态") private Integer status; - @ApiModelProperty(value = "绑定域名", example = "https://www.iocoder.cn") + @Schema(description = "绑定域名", example = "https://www.iocoder.cn") @URL(message = "绑定域名的地址非 URL 格式") private String domain; - @ApiModelProperty(value = "租户套餐编号", required = true, example = "1024") + @Schema(description = "租户套餐编号", required = true, example = "1024") @NotNull(message = "租户套餐编号不能为空") private Long packageId; - @ApiModelProperty(value = "过期时间", required = true) + @Schema(description = "过期时间", required = true) @NotNull(message = "过期时间不能为空") private LocalDateTime expireTime; - @ApiModelProperty(value = "账号数量", required = true, example = "1024") + @Schema(description = "账号数量", required = true, example = "1024") @NotNull(message = "账号数量不能为空") private Integer accountCount; -} +} \ No newline at end of file diff --git a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/tenant/vo/tenant/TenantCreateReqVO.java b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/tenant/vo/tenant/TenantCreateReqVO.java index ff52811eb..1b27111dc 100755 --- a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/tenant/vo/tenant/TenantCreateReqVO.java +++ b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/tenant/vo/tenant/TenantCreateReqVO.java @@ -1,7 +1,7 @@ package cn.iocoder.yudao.module.system.controller.admin.tenant.vo.tenant; +import io.swagger.v3.oas.annotations.media.Schema; import lombok.*; -import io.swagger.annotations.*; import org.hibernate.validator.constraints.Length; import javax.validation.constraints.NotBlank; @@ -9,21 +9,21 @@ import javax.validation.constraints.NotEmpty; import javax.validation.constraints.Pattern; import javax.validation.constraints.Size; -@ApiModel("管理后台 - 租户创建 Request VO") +@Schema(description = "管理后台 - 租户创建 Request VO") @Data @EqualsAndHashCode(callSuper = true) @ToString(callSuper = true) public class TenantCreateReqVO extends TenantBaseVO { - @ApiModelProperty(value = "用户账号", required = true, example = "yudao") + @Schema(description = "用户账号", required = true, example = "yudao") @NotBlank(message = "用户账号不能为空") @Pattern(regexp = "^[a-zA-Z0-9]{4,30}$", message = "用户账号由 数字、字母 组成") @Size(min = 4, max = 30, message = "用户账号长度为 4-30 个字符") private String username; - @ApiModelProperty(value = "密码", required = true, example = "123456") + @Schema(description = "密码", required = true, example = "123456") @NotEmpty(message = "密码不能为空") @Length(min = 4, max = 16, message = "密码长度为 4-16 位") private String password; -} +} \ No newline at end of file diff --git a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/tenant/vo/tenant/TenantExportReqVO.java b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/tenant/vo/tenant/TenantExportReqVO.java index 6498714af..ca219b18c 100755 --- a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/tenant/vo/tenant/TenantExportReqVO.java +++ b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/tenant/vo/tenant/TenantExportReqVO.java @@ -1,7 +1,7 @@ package cn.iocoder.yudao.module.system.controller.admin.tenant.vo.tenant; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; +import io.swagger.v3.oas.annotations.media.Schema; +import io.swagger.v3.oas.annotations.media.Schema; import lombok.Data; import org.springframework.format.annotation.DateTimeFormat; @@ -9,24 +9,24 @@ import java.time.LocalDateTime; import static cn.iocoder.yudao.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND; -@ApiModel(value = "管理后台 - 租户 Excel 导出 Request VO", description = "参数和 TenantPageReqVO 是一致的") +@Schema(description = "管理后台 - 租户 Excel 导出 Request VO,参数和 TenantPageReqVO 是一致的" ) @Data public class TenantExportReqVO { - @ApiModelProperty(value = "租户名", example = "芋道") + @Schema(description = "租户名", example = "芋道") private String name; - @ApiModelProperty(value = "联系人", example = "芋艿") + @Schema(description = "联系人", example = "芋艿") private String contactName; - @ApiModelProperty(value = "联系手机", example = "15601691300") + @Schema(description = "联系手机", example = "15601691300") private String contactMobile; - @ApiModelProperty(value = "租户状态(0正常 1停用)", example = "1") + @Schema(description = "租户状态(0正常 1停用)", example = "1") private Integer status; @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND) - @ApiModelProperty(value = "创建时间") + @Schema(description = "创建时间") private LocalDateTime[] createTime; -} +} \ No newline at end of file diff --git a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/tenant/vo/tenant/TenantPageReqVO.java b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/tenant/vo/tenant/TenantPageReqVO.java index 499ecfd2f..e5704bb68 100755 --- a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/tenant/vo/tenant/TenantPageReqVO.java +++ b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/tenant/vo/tenant/TenantPageReqVO.java @@ -1,8 +1,8 @@ package cn.iocoder.yudao.module.system.controller.admin.tenant.vo.tenant; import cn.iocoder.yudao.framework.common.pojo.PageParam; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; +import io.swagger.v3.oas.annotations.media.Schema; +import io.swagger.v3.oas.annotations.media.Schema; import lombok.Data; import lombok.EqualsAndHashCode; import lombok.ToString; @@ -12,26 +12,26 @@ import java.time.LocalDateTime; import static cn.iocoder.yudao.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND; -@ApiModel("管理后台 - 租户分页 Request VO") +@Schema(description = "管理后台 - 租户分页 Request VO") @Data @EqualsAndHashCode(callSuper = true) @ToString(callSuper = true) public class TenantPageReqVO extends PageParam { - @ApiModelProperty(value = "租户名", example = "芋道") + @Schema(description = "租户名", example = "芋道") private String name; - @ApiModelProperty(value = "联系人", example = "芋艿") + @Schema(description = "联系人", example = "芋艿") private String contactName; - @ApiModelProperty(value = "联系手机", example = "15601691300") + @Schema(description = "联系手机", example = "15601691300") private String contactMobile; - @ApiModelProperty(value = "租户状态(0正常 1停用)", example = "1") + @Schema(description = "租户状态(0正常 1停用)", example = "1") private Integer status; @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND) - @ApiModelProperty(value = "创建时间") + @Schema(description = "创建时间") private LocalDateTime[] createTime; -} +} \ No newline at end of file diff --git a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/tenant/vo/tenant/TenantRespVO.java b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/tenant/vo/tenant/TenantRespVO.java index 75ddbc290..1b0c27607 100755 --- a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/tenant/vo/tenant/TenantRespVO.java +++ b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/tenant/vo/tenant/TenantRespVO.java @@ -1,23 +1,23 @@ package cn.iocoder.yudao.module.system.controller.admin.tenant.vo.tenant; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; +import io.swagger.v3.oas.annotations.media.Schema; +import io.swagger.v3.oas.annotations.media.Schema; import lombok.Data; import lombok.EqualsAndHashCode; import lombok.ToString; import java.time.LocalDateTime; -@ApiModel("管理后台 - 租户 Response VO") +@Schema(description = "管理后台 - 租户 Response VO") @Data @EqualsAndHashCode(callSuper = true) @ToString(callSuper = true) public class TenantRespVO extends TenantBaseVO { - @ApiModelProperty(value = "租户编号", required = true, example = "1024") + @Schema(description = "租户编号", required = true, example = "1024") private Long id; - @ApiModelProperty(value = "创建时间", required = true) + @Schema(description = "创建时间", required = true) private LocalDateTime createTime; -} +} \ No newline at end of file diff --git a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/tenant/vo/tenant/TenantUpdateReqVO.java b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/tenant/vo/tenant/TenantUpdateReqVO.java index 881d5fb87..ae13d8059 100755 --- a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/tenant/vo/tenant/TenantUpdateReqVO.java +++ b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/tenant/vo/tenant/TenantUpdateReqVO.java @@ -1,17 +1,17 @@ package cn.iocoder.yudao.module.system.controller.admin.tenant.vo.tenant; +import io.swagger.v3.oas.annotations.media.Schema; import lombok.*; -import io.swagger.annotations.*; import javax.validation.constraints.*; -@ApiModel("管理后台 - 租户更新 Request VO") +@Schema(description = "管理后台 - 租户更新 Request VO") @Data @EqualsAndHashCode(callSuper = true) @ToString(callSuper = true) public class TenantUpdateReqVO extends TenantBaseVO { - @ApiModelProperty(value = "租户编号", required = true, example = "1024") + @Schema(description = "租户编号", required = true, example = "1024") @NotNull(message = "租户编号不能为空") private Long id; -} +} \ No newline at end of file diff --git a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/user/UserController.java b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/user/UserController.java index 993b66dea..05a90f528 100644 --- a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/user/UserController.java +++ b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/user/UserController.java @@ -14,10 +14,10 @@ import cn.iocoder.yudao.framework.common.pojo.PageResult; import cn.iocoder.yudao.framework.common.util.collection.MapUtils; import cn.iocoder.yudao.framework.excel.core.util.ExcelUtils; import cn.iocoder.yudao.framework.operatelog.core.annotations.OperateLog; -import io.swagger.annotations.Api; -import io.swagger.annotations.ApiImplicitParam; -import io.swagger.annotations.ApiImplicitParams; -import io.swagger.annotations.ApiOperation; +import io.swagger.v3.oas.annotations.tags.Tag; +import io.swagger.v3.oas.annotations.Parameter; +import io.swagger.v3.oas.annotations.Parameters; +import io.swagger.v3.oas.annotations.Operation; import org.springframework.security.access.prepost.PreAuthorize; import org.springframework.validation.annotation.Validated; import org.springframework.web.bind.annotation.*; @@ -34,7 +34,7 @@ import static cn.iocoder.yudao.framework.common.util.collection.CollectionUtils. import static cn.iocoder.yudao.framework.common.util.collection.CollectionUtils.convertSet; import static cn.iocoder.yudao.framework.operatelog.core.enums.OperateTypeEnum.EXPORT; -@Api(tags = "管理后台 - 用户") +@Tag(name = "管理后台 - 用户") @RestController @RequestMapping("/system/user") @Validated @@ -46,7 +46,7 @@ public class UserController { private DeptService deptService; @PostMapping("/create") - @ApiOperation("新增用户") + @Operation(summary = "新增用户") @PreAuthorize("@ss.hasPermission('system:user:create')") public CommonResult createUser(@Valid @RequestBody UserCreateReqVO reqVO) { Long id = userService.createUser(reqVO); @@ -54,7 +54,7 @@ public class UserController { } @PutMapping("update") - @ApiOperation("修改用户") + @Operation(summary = "修改用户") @PreAuthorize("@ss.hasPermission('system:user:update')") public CommonResult updateUser(@Valid @RequestBody UserUpdateReqVO reqVO) { userService.updateUser(reqVO); @@ -62,8 +62,8 @@ public class UserController { } @DeleteMapping("/delete") - @ApiOperation("删除用户") - @ApiImplicitParam(name = "id", value = "编号", required = true, example = "1024", dataTypeClass = Long.class) + @Operation(summary = "删除用户") + @Parameter(name = "id", description = "编号", required = true, example = "1024") @PreAuthorize("@ss.hasPermission('system:user:delete')") public CommonResult deleteUser(@RequestParam("id") Long id) { userService.deleteUser(id); @@ -71,7 +71,7 @@ public class UserController { } @PutMapping("/update-password") - @ApiOperation("重置用户密码") + @Operation(summary = "重置用户密码") @PreAuthorize("@ss.hasPermission('system:user:update-password')") public CommonResult updateUserPassword(@Valid @RequestBody UserUpdatePasswordReqVO reqVO) { userService.updateUserPassword(reqVO.getId(), reqVO.getPassword()); @@ -79,7 +79,7 @@ public class UserController { } @PutMapping("/update-status") - @ApiOperation("修改用户状态") + @Operation(summary = "修改用户状态") @PreAuthorize("@ss.hasPermission('system:user:update')") public CommonResult updateUserStatus(@Valid @RequestBody UserUpdateStatusReqVO reqVO) { userService.updateUserStatus(reqVO.getId(), reqVO.getStatus()); @@ -87,7 +87,7 @@ public class UserController { } @GetMapping("/page") - @ApiOperation("获得用户分页列表") + @Operation(summary = "获得用户分页列表") @PreAuthorize("@ss.hasPermission('system:user:list')") public CommonResult> getUserPage(@Valid UserPageReqVO reqVO) { // 获得用户分页列表 @@ -110,7 +110,7 @@ public class UserController { } @GetMapping("/list-all-simple") - @ApiOperation(value = "获取用户精简信息列表", notes = "只包含被开启的用户,主要用于前端的下拉选项") + @Operation(summary = "获取用户精简信息列表", description = "只包含被开启的用户,主要用于前端的下拉选项") public CommonResult> getSimpleUsers() { // 获用户门列表,只要开启状态的 List list = userService.getUsersByStatus(CommonStatusEnum.ENABLE.getStatus()); @@ -119,15 +119,15 @@ public class UserController { } @GetMapping("/get") - @ApiOperation("获得用户详情") - @ApiImplicitParam(name = "id", value = "编号", required = true, example = "1024", dataTypeClass = Long.class) + @Operation(summary = "获得用户详情") + @Parameter(name = "id", description = "编号", required = true, example = "1024") @PreAuthorize("@ss.hasPermission('system:user:query')") public CommonResult getInfo(@RequestParam("id") Long id) { return success(UserConvert.INSTANCE.convert(userService.getUser(id))); } @GetMapping("/export") - @ApiOperation("导出用户") + @Operation(summary = "导出用户") @PreAuthorize("@ss.hasPermission('system:user:export')") @OperateLog(type = EXPORT) public void exportUsers(@Validated UserExportReqVO reqVO, @@ -159,7 +159,7 @@ public class UserController { } @GetMapping("/get-import-template") - @ApiOperation("获得导入用户模板") + @Operation(summary = "获得导入用户模板") public void importTemplate(HttpServletResponse response) throws IOException { // 手动创建导出 demo List list = Arrays.asList( @@ -174,10 +174,10 @@ public class UserController { } @PostMapping("/import") - @ApiOperation("导入用户") - @ApiImplicitParams({ - @ApiImplicitParam(name = "file", value = "Excel 文件", required = true, dataTypeClass = MultipartFile.class), - @ApiImplicitParam(name = "updateSupport", value = "是否支持更新,默认为 false", example = "true", dataTypeClass = Boolean.class) + @Operation(summary = "导入用户") + @Parameters({ + @Parameter(name = "file", description = "Excel 文件", required = true), + @Parameter(name = "updateSupport", description = "是否支持更新,默认为 false", example = "true") }) @PreAuthorize("@ss.hasPermission('system:user:import')") public CommonResult importExcel(@RequestParam("file") MultipartFile file, @@ -186,4 +186,4 @@ public class UserController { return success(userService.importUsers(list, updateSupport)); } -} +} \ No newline at end of file diff --git a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/user/UserProfileController.java b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/user/UserProfileController.java index 257784d10..2ea0eef0e 100644 --- a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/user/UserProfileController.java +++ b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/user/UserProfileController.java @@ -20,8 +20,8 @@ import cn.iocoder.yudao.module.system.service.permission.PermissionService; import cn.iocoder.yudao.module.system.service.permission.RoleService; import cn.iocoder.yudao.module.system.service.social.SocialUserService; import cn.iocoder.yudao.module.system.service.user.AdminUserService; -import io.swagger.annotations.Api; -import io.swagger.annotations.ApiOperation; +import io.swagger.v3.oas.annotations.tags.Tag; +import io.swagger.v3.oas.annotations.Operation; import lombok.extern.slf4j.Slf4j; import org.springframework.validation.annotation.Validated; import org.springframework.web.bind.annotation.*; @@ -35,7 +35,7 @@ import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success; import static cn.iocoder.yudao.framework.security.core.util.SecurityFrameworkUtils.getLoginUserId; import static cn.iocoder.yudao.module.infra.enums.ErrorCodeConstants.FILE_IS_EMPTY; -@Api(tags = "管理后台 - 用户个人中心") +@Tag(name = "管理后台 - 用户个人中心") @RestController @RequestMapping("/system/user/profile") @Validated @@ -56,7 +56,7 @@ public class UserProfileController { private SocialUserService socialService; @GetMapping("/get") - @ApiOperation("获得登录用户信息") + @Operation(summary = "获得登录用户信息") @DataPermission(enable = false) // 关闭数据权限,避免只查看自己时,查询不到部门。 public CommonResult profile() { // 获得用户基本信息 @@ -82,21 +82,21 @@ public class UserProfileController { } @PutMapping("/update") - @ApiOperation("修改用户个人信息") + @Operation(summary = "修改用户个人信息") public CommonResult updateUserProfile(@Valid @RequestBody UserProfileUpdateReqVO reqVO) { userService.updateUserProfile(getLoginUserId(), reqVO); return success(true); } @PutMapping("/update-password") - @ApiOperation("修改用户个人密码") + @Operation(summary = "修改用户个人密码") public CommonResult updateUserProfilePassword(@Valid @RequestBody UserProfileUpdatePasswordReqVO reqVO) { userService.updateUserPassword(getLoginUserId(), reqVO); return success(true); } @PutMapping("/update-avatar") - @ApiOperation("上传用户个人头像") + @Operation(summary = "上传用户个人头像") public CommonResult updateUserAvatar(@RequestParam("avatarFile") MultipartFile file) throws Exception { if (file.isEmpty()) { throw ServiceExceptionUtil.exception(FILE_IS_EMPTY); @@ -105,4 +105,4 @@ public class UserProfileController { return success(avatar); } -} +} \ No newline at end of file diff --git a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/user/vo/profile/UserProfileRespVO.java b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/user/vo/profile/UserProfileRespVO.java index 8767c0593..2b4c40c4b 100644 --- a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/user/vo/profile/UserProfileRespVO.java +++ b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/user/vo/profile/UserProfileRespVO.java @@ -1,8 +1,8 @@ package cn.iocoder.yudao.module.system.controller.admin.user.vo.profile; import cn.iocoder.yudao.module.system.controller.admin.user.vo.user.UserBaseVO; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; +import io.swagger.v3.oas.annotations.media.Schema; +import io.swagger.v3.oas.annotations.media.Schema; import lombok.AllArgsConstructor; import lombok.Data; import lombok.EqualsAndHashCode; @@ -16,22 +16,22 @@ import java.util.List; @EqualsAndHashCode(callSuper = true) @NoArgsConstructor @AllArgsConstructor -@ApiModel("管理后台 - 用户个人中心信息 Response VO") +@Schema(description = "管理后台 - 用户个人中心信息 Response VO") public class UserProfileRespVO extends UserBaseVO { - @ApiModelProperty(value = "用户编号", required = true, example = "1") + @Schema(description = "用户编号", required = true, example = "1") private Long id; - @ApiModelProperty(value = "状态", required = true, example = "1", notes = "参见 CommonStatusEnum 枚举类") + @Schema(description = "状态,参见 CommonStatusEnum 枚举类", required = true, example = "1") private Integer status; - @ApiModelProperty(value = "最后登录 IP", required = true, example = "192.168.1.1") + @Schema(description = "最后登录 IP", required = true, example = "192.168.1.1") private String loginIp; - @ApiModelProperty(value = "最后登录时间", required = true, example = "时间戳格式") + @Schema(description = "最后登录时间", required = true, example = "时间戳格式") private LocalDateTime loginDate; - @ApiModelProperty(value = "创建时间", required = true, example = "时间戳格式") + @Schema(description = "创建时间", required = true, example = "时间戳格式") private LocalDateTime createTime; /** @@ -53,52 +53,52 @@ public class UserProfileRespVO extends UserBaseVO { */ private List socialUsers; - @ApiModel("角色") + @Schema(description = "角色") @Data public static class Role { - @ApiModelProperty(value = "角色编号", required = true, example = "1") + @Schema(description = "角色编号", required = true, example = "1") private Long id; - @ApiModelProperty(value = "角色名称", required = true, example = "普通角色") + @Schema(description = "角色名称", required = true, example = "普通角色") private String name; } - @ApiModel("部门") + @Schema(description = "部门") @Data public static class Dept { - @ApiModelProperty(value = "部门编号", required = true, example = "1") + @Schema(description = "部门编号", required = true, example = "1") private Long id; - @ApiModelProperty(value = "部门名称", required = true, example = "研发部") + @Schema(description = "部门名称", required = true, example = "研发部") private String name; } - @ApiModel("岗位") + @Schema(description = "岗位") @Data public static class Post { - @ApiModelProperty(value = "岗位编号", required = true, example = "1") + @Schema(description = "岗位编号", required = true, example = "1") private Long id; - @ApiModelProperty(value = "岗位名称", required = true, example = "开发") + @Schema(description = "岗位名称", required = true, example = "开发") private String name; } - @ApiModel("社交用户") + @Schema(description = "社交用户") @Data public static class SocialUser { - @ApiModelProperty(value = "社交平台的类型", required = true, example = "10", notes = "参见 SocialTypeEnum 枚举类") + @Schema(description = "社交平台的类型,参见 SocialTypeEnum 枚举类", required = true, example = "10") private Integer type; - @ApiModelProperty(value = "社交用户的 openid", required = true, example = "IPRmJ0wvBptiPIlGEZiPewGwiEiE") + @Schema(description = "社交用户的 openid", required = true, example = "IPRmJ0wvBptiPIlGEZiPewGwiEiE") private String openid; } -} +} \ No newline at end of file diff --git a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/user/vo/profile/UserProfileUpdatePasswordReqVO.java b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/user/vo/profile/UserProfileUpdatePasswordReqVO.java index 2269b37df..ed6b2ca35 100644 --- a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/user/vo/profile/UserProfileUpdatePasswordReqVO.java +++ b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/user/vo/profile/UserProfileUpdatePasswordReqVO.java @@ -1,24 +1,24 @@ package cn.iocoder.yudao.module.system.controller.admin.user.vo.profile; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; +import io.swagger.v3.oas.annotations.media.Schema; +import io.swagger.v3.oas.annotations.media.Schema; import lombok.Data; import org.hibernate.validator.constraints.Length; import javax.validation.constraints.NotEmpty; -@ApiModel("管理后台 - 用户个人中心更新密码 Request VO") +@Schema(description = "管理后台 - 用户个人中心更新密码 Request VO") @Data public class UserProfileUpdatePasswordReqVO { - @ApiModelProperty(value = "旧密码", required = true, example = "123456") + @Schema(description = "旧密码", required = true, example = "123456") @NotEmpty(message = "旧密码不能为空") @Length(min = 4, max = 16, message = "密码长度为 4-16 位") private String oldPassword; - @ApiModelProperty(value = "新密码", required = true, example = "654321") + @Schema(description = "新密码", required = true, example = "654321") @NotEmpty(message = "新密码不能为空") @Length(min = 4, max = 16, message = "密码长度为 4-16 位") private String newPassword; -} +} \ No newline at end of file diff --git a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/user/vo/profile/UserProfileUpdateReqVO.java b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/user/vo/profile/UserProfileUpdateReqVO.java index 5ab28d1e7..4aea0d877 100644 --- a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/user/vo/profile/UserProfileUpdateReqVO.java +++ b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/user/vo/profile/UserProfileUpdateReqVO.java @@ -1,31 +1,31 @@ package cn.iocoder.yudao.module.system.controller.admin.user.vo.profile; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; +import io.swagger.v3.oas.annotations.media.Schema; +import io.swagger.v3.oas.annotations.media.Schema; import lombok.Data; import org.hibernate.validator.constraints.Length; import javax.validation.constraints.Email; import javax.validation.constraints.Size; -@ApiModel("管理后台 - 用户个人信息更新 Request VO") +@Schema(description = "管理后台 - 用户个人信息更新 Request VO") @Data public class UserProfileUpdateReqVO { - @ApiModelProperty(value = "用户昵称", required = true, example = "芋艿") + @Schema(description = "用户昵称", required = true, example = "芋艿") @Size(max = 30, message = "用户昵称长度不能超过 30 个字符") private String nickname; - @ApiModelProperty(value = "用户邮箱", example = "yudao@iocoder.cn") + @Schema(description = "用户邮箱", example = "yudao@iocoder.cn") @Email(message = "邮箱格式不正确") @Size(max = 50, message = "邮箱长度不能超过 50 个字符") private String email; - @ApiModelProperty(value = "手机号码", example = "15601691300") + @Schema(description = "手机号码", example = "15601691300") @Length(min = 11, max = 11, message = "手机号长度必须 11 位") private String mobile; - @ApiModelProperty(value = "用户性别", example = "1", notes = "参见 SexEnum 枚举类") + @Schema(description = "用户性别,参见 SexEnum 枚举类", example = "1") private Integer sex; -} +} \ No newline at end of file diff --git a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/user/vo/user/UserBaseVO.java b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/user/vo/user/UserBaseVO.java index 5268b10c7..fe4218bd4 100644 --- a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/user/vo/user/UserBaseVO.java +++ b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/user/vo/user/UserBaseVO.java @@ -1,7 +1,7 @@ package cn.iocoder.yudao.module.system.controller.admin.user.vo.user; import cn.iocoder.yudao.framework.common.validation.Mobile; -import io.swagger.annotations.ApiModelProperty; +import io.swagger.v3.oas.annotations.media.Schema; import lombok.Data; import javax.validation.constraints.Email; @@ -17,38 +17,38 @@ import java.util.Set; @Data public class UserBaseVO { - @ApiModelProperty(value = "用户账号", required = true, example = "yudao") + @Schema(description = "用户账号", required = true, example = "yudao") @NotBlank(message = "用户账号不能为空") @Pattern(regexp = "^[a-zA-Z0-9]{4,30}$", message = "用户账号由 数字、字母 组成") @Size(min = 4, max = 30, message = "用户账号长度为 4-30 个字符") private String username; - @ApiModelProperty(value = "用户昵称", required = true, example = "芋艿") + @Schema(description = "用户昵称", required = true, example = "芋艿") @Size(max = 30, message = "用户昵称长度不能超过30个字符") private String nickname; - @ApiModelProperty(value = "备注", example = "我是一个用户") + @Schema(description = "备注", example = "我是一个用户") private String remark; - @ApiModelProperty(value = "部门ID", example = "我是一个用户") + @Schema(description = "部门ID", example = "我是一个用户") private Long deptId; - @ApiModelProperty(value = "岗位编号数组", example = "1") + @Schema(description = "岗位编号数组", example = "1") private Set postIds; - @ApiModelProperty(value = "用户邮箱", example = "yudao@iocoder.cn") + @Schema(description = "用户邮箱", example = "yudao@iocoder.cn") @Email(message = "邮箱格式不正确") @Size(max = 50, message = "邮箱长度不能超过 50 个字符") private String email; - @ApiModelProperty(value = "手机号码", example = "15601691300") + @Schema(description = "手机号码", example = "15601691300") @Mobile private String mobile; - @ApiModelProperty(value = "用户性别", example = "1", notes = "参见 SexEnum 枚举类") + @Schema(description = "用户性别", example = "1", notes = "参见 SexEnum 枚举类") private Integer sex; - @ApiModelProperty(value = "用户头像", example = "https://www.iocoder.cn/xxx.png") + @Schema(description = "用户头像", example = "https://www.iocoder.cn/xxx.png") private String avatar; -} +} \ No newline at end of file diff --git a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/user/vo/user/UserCreateReqVO.java b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/user/vo/user/UserCreateReqVO.java index 9d0ff1988..680410129 100644 --- a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/user/vo/user/UserCreateReqVO.java +++ b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/user/vo/user/UserCreateReqVO.java @@ -1,22 +1,22 @@ package cn.iocoder.yudao.module.system.controller.admin.user.vo.user; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; +import io.swagger.v3.oas.annotations.media.Schema; +import io.swagger.v3.oas.annotations.media.Schema; import lombok.Data; import lombok.EqualsAndHashCode; import org.hibernate.validator.constraints.Length; import javax.validation.constraints.NotEmpty; -@ApiModel("管理后台 - 用户创建 Request VO") +@Schema(description = "管理后台 - 用户创建 Request VO") @Data @EqualsAndHashCode(callSuper = true) public class UserCreateReqVO extends UserBaseVO { - @ApiModelProperty(value = "密码", required = true, example = "123456") + @Schema(description = "密码", required = true, example = "123456") @NotEmpty(message = "密码不能为空") @Length(min = 4, max = 16, message = "密码长度为 4-16 位") private String password; -} +} \ No newline at end of file diff --git a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/user/vo/user/UserExportReqVO.java b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/user/vo/user/UserExportReqVO.java index 5aa18d7a6..a2433c6df 100644 --- a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/user/vo/user/UserExportReqVO.java +++ b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/user/vo/user/UserExportReqVO.java @@ -1,7 +1,7 @@ package cn.iocoder.yudao.module.system.controller.admin.user.vo.user; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; +import io.swagger.v3.oas.annotations.media.Schema; +import io.swagger.v3.oas.annotations.media.Schema; import lombok.AllArgsConstructor; import lombok.Data; import lombok.NoArgsConstructor; @@ -11,26 +11,26 @@ import java.time.LocalDateTime; import static cn.iocoder.yudao.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND; -@ApiModel(value = "管理后台 - 用户导出 Request VO", description = "参数和 UserPageReqVO 是一致的") +@Schema(description = "管理后台 - 用户导出 Request VO,参数和 UserPageReqVO 是一致的") @Data @NoArgsConstructor @AllArgsConstructor public class UserExportReqVO { - @ApiModelProperty(value = "用户账号", example = "yudao", notes = "模糊匹配") + @Schema(description = "用户账号,模糊匹配", example = "yudao") private String username; - @ApiModelProperty(value = "手机号码", example = "yudao", notes = "模糊匹配") + @Schema(description = "手机号码,模糊匹配", example = "yudao") private String mobile; - @ApiModelProperty(value = "展示状态", example = "1", notes = "参见 CommonStatusEnum 枚举类") + @Schema(description = "展示状态,参见 CommonStatusEnum 枚举类", example = "1") private Integer status; - @ApiModelProperty(value = "创建时间", example = "[2022-07-01 00:00:00, 2022-07-01 23:59:59]") + @Schema(description = "创建时间", example = "[2022-07-01 00:00:00, 2022-07-01 23:59:59]") @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND) private LocalDateTime[] createTime; - @ApiModelProperty(value = "部门编号", example = "1024", notes = "同时筛选子部门") + @Schema(description = "部门编号,同时筛选子部门", example = "1024") private Long deptId; -} +} \ No newline at end of file diff --git a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/user/vo/user/UserImportRespVO.java b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/user/vo/user/UserImportRespVO.java index 49f9b98d1..ecb619bc8 100644 --- a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/user/vo/user/UserImportRespVO.java +++ b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/user/vo/user/UserImportRespVO.java @@ -1,25 +1,25 @@ package cn.iocoder.yudao.module.system.controller.admin.user.vo.user; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; +import io.swagger.v3.oas.annotations.media.Schema; +import io.swagger.v3.oas.annotations.media.Schema; import lombok.Builder; import lombok.Data; import java.util.List; import java.util.Map; -@ApiModel("管理后台 - 用户导入 Response VO") +@Schema(description = "管理后台 - 用户导入 Response VO") @Data @Builder public class UserImportRespVO { - @ApiModelProperty(value = "创建成功的用户名数组", required = true) + @Schema(description = "创建成功的用户名数组", required = true) private List createUsernames; - @ApiModelProperty(value = "更新成功的用户名数组", required = true) + @Schema(description = "更新成功的用户名数组", required = true) private List updateUsernames; - @ApiModelProperty(value = "导入失败的用户集合", required = true, notes = "key 为用户名,value 为失败原因") + @Schema(description = "导入失败的用户集合,key 为用户名,value 为失败原因", required = true) private Map failureUsernames; -} +} \ No newline at end of file diff --git a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/user/vo/user/UserPageItemRespVO.java b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/user/vo/user/UserPageItemRespVO.java index bcfe9ea23..28e13bed3 100644 --- a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/user/vo/user/UserPageItemRespVO.java +++ b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/user/vo/user/UserPageItemRespVO.java @@ -1,13 +1,13 @@ package cn.iocoder.yudao.module.system.controller.admin.user.vo.user; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; +import io.swagger.v3.oas.annotations.media.Schema; +import io.swagger.v3.oas.annotations.media.Schema; import lombok.AllArgsConstructor; import lombok.Data; import lombok.EqualsAndHashCode; import lombok.NoArgsConstructor; -@ApiModel(value = "管理后台 - 用户分页时的信息 Response VO", description = "相比用户基本信息来说,会多部门信息") +@Schema(description = "管理后台 - 用户分页时的信息 Response VO,相比用户基本信息来说,会多部门信息") @Data @NoArgsConstructor @AllArgsConstructor @@ -19,16 +19,16 @@ public class UserPageItemRespVO extends UserRespVO { */ private Dept dept; - @ApiModel("部门") + @Schema(description = "部门") @Data public static class Dept { - @ApiModelProperty(value = "部门编号", required = true, example = "1") + @Schema(description = "部门编号", required = true, example = "1") private Long id; - @ApiModelProperty(value = "部门名称", required = true, example = "研发部") + @Schema(description = "部门名称", required = true, example = "研发部") private String name; } -} +} \ No newline at end of file diff --git a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/user/vo/user/UserPageReqVO.java b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/user/vo/user/UserPageReqVO.java index c3832002c..85d62825e 100644 --- a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/user/vo/user/UserPageReqVO.java +++ b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/user/vo/user/UserPageReqVO.java @@ -1,8 +1,8 @@ package cn.iocoder.yudao.module.system.controller.admin.user.vo.user; import cn.iocoder.yudao.framework.common.pojo.PageParam; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; +import io.swagger.v3.oas.annotations.media.Schema; +import io.swagger.v3.oas.annotations.media.Schema; import lombok.AllArgsConstructor; import lombok.Data; import lombok.EqualsAndHashCode; @@ -13,27 +13,27 @@ import java.time.LocalDateTime; import static cn.iocoder.yudao.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND; -@ApiModel("管理后台 - 用户分页 Request VO") +@Schema(description = "管理后台 - 用户分页 Request VO") @Data @NoArgsConstructor @AllArgsConstructor @EqualsAndHashCode(callSuper = true) public class UserPageReqVO extends PageParam { - @ApiModelProperty(value = "用户账号", example = "yudao", notes = "模糊匹配") + @Schema(description = "用户账号,模糊匹配", example = "yudao") private String username; - @ApiModelProperty(value = "手机号码", example = "yudao", notes = "模糊匹配") + @Schema(description = "手机号码, 模糊匹配", example = "yudao") private String mobile; - @ApiModelProperty(value = "展示状态", example = "1", notes = "参见 CommonStatusEnum 枚举类") + @Schema(description = "展示状态,参见 CommonStatusEnum 枚举类", example = "1") private Integer status; - @ApiModelProperty(value = "创建时间", example = "[2022-07-01 00:00:00, 2022-07-01 23:59:59]") + @Schema(description = "创建时间", example = "[2022-07-01 00:00:00, 2022-07-01 23:59:59]") @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND) private LocalDateTime[] createTime; - @ApiModelProperty(value = "部门编号", example = "1024", notes = "同时筛选子部门") + @Schema(description = "部门编号,同时筛选子部门", example = "1024") private Long deptId; -} +} \ No newline at end of file diff --git a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/user/vo/user/UserRespVO.java b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/user/vo/user/UserRespVO.java index 688d59286..88287d065 100644 --- a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/user/vo/user/UserRespVO.java +++ b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/user/vo/user/UserRespVO.java @@ -1,31 +1,31 @@ package cn.iocoder.yudao.module.system.controller.admin.user.vo.user; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; +import io.swagger.v3.oas.annotations.media.Schema; +import io.swagger.v3.oas.annotations.media.Schema; import lombok.*; import java.time.LocalDateTime; -@ApiModel("管理后台 - 用户信息 Response VO") +@Schema(description = "管理后台 - 用户信息 Response VO") @Data @NoArgsConstructor @AllArgsConstructor @EqualsAndHashCode(callSuper = true) public class UserRespVO extends UserBaseVO { - @ApiModelProperty(value = "用户编号", required = true, example = "1") + @Schema(description = "用户编号", required = true, example = "1") private Long id; - @ApiModelProperty(value = "状态", required = true, example = "1", notes = "参见 CommonStatusEnum 枚举类") + @Schema(description = "状态,参见 CommonStatusEnum 枚举类", required = true, example = "1" ) private Integer status; - @ApiModelProperty(value = "最后登录 IP", required = true, example = "192.168.1.1") + @Schema(description = "最后登录 IP", required = true, example = "192.168.1.1") private String loginIp; - @ApiModelProperty(value = "最后登录时间", required = true, example = "时间戳格式") + @Schema(description = "最后登录时间", required = true, example = "时间戳格式") private LocalDateTime loginDate; - @ApiModelProperty(value = "创建时间", required = true, example = "时间戳格式") + @Schema(description = "创建时间", required = true, example = "时间戳格式") private LocalDateTime createTime; -} +} \ No newline at end of file diff --git a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/user/vo/user/UserSimpleRespVO.java b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/user/vo/user/UserSimpleRespVO.java index a815253e9..25e10a6d9 100644 --- a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/user/vo/user/UserSimpleRespVO.java +++ b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/user/vo/user/UserSimpleRespVO.java @@ -1,21 +1,21 @@ package cn.iocoder.yudao.module.system.controller.admin.user.vo.user; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; +import io.swagger.v3.oas.annotations.media.Schema; +import io.swagger.v3.oas.annotations.media.Schema; import lombok.AllArgsConstructor; import lombok.Data; import lombok.NoArgsConstructor; -@ApiModel("用户精简信息 Response VO") +@Schema(description = "用户精简信息 Response VO") @Data @NoArgsConstructor @AllArgsConstructor public class UserSimpleRespVO { - @ApiModelProperty(value = "用户编号", required = true, example = "1024") + @Schema(description = "用户编号", required = true, example = "1024") private Long id; - @ApiModelProperty(value = "用户昵称", required = true, example = "芋道") + @Schema(description = "用户昵称", required = true, example = "芋道") private String nickname; -} +} \ No newline at end of file diff --git a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/user/vo/user/UserUpdatePasswordReqVO.java b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/user/vo/user/UserUpdatePasswordReqVO.java index 542fc2b0f..a1df8376e 100644 --- a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/user/vo/user/UserUpdatePasswordReqVO.java +++ b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/user/vo/user/UserUpdatePasswordReqVO.java @@ -1,24 +1,24 @@ package cn.iocoder.yudao.module.system.controller.admin.user.vo.user; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; +import io.swagger.v3.oas.annotations.media.Schema; +import io.swagger.v3.oas.annotations.media.Schema; import lombok.Data; import org.hibernate.validator.constraints.Length; import javax.validation.constraints.NotEmpty; import javax.validation.constraints.NotNull; -@ApiModel("管理后台 - 用户更新密码 Request VO") +@Schema(description = "管理后台 - 用户更新密码 Request VO") @Data public class UserUpdatePasswordReqVO { - @ApiModelProperty(value = "用户编号", required = true, example = "1024") + @Schema(description = "用户编号", required = true, example = "1024") @NotNull(message = "用户编号不能为空") private Long id; - @ApiModelProperty(value = "密码", required = true, example = "123456") + @Schema(description = "密码", required = true, example = "123456") @NotEmpty(message = "密码不能为空") @Length(min = 4, max = 16, message = "密码长度为 4-16 位") private String password; -} +} \ No newline at end of file diff --git a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/user/vo/user/UserUpdateReqVO.java b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/user/vo/user/UserUpdateReqVO.java index 84a3de60f..40761cf99 100644 --- a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/user/vo/user/UserUpdateReqVO.java +++ b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/user/vo/user/UserUpdateReqVO.java @@ -1,19 +1,19 @@ package cn.iocoder.yudao.module.system.controller.admin.user.vo.user; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; +import io.swagger.v3.oas.annotations.media.Schema; +import io.swagger.v3.oas.annotations.media.Schema; import lombok.Data; import lombok.EqualsAndHashCode; import javax.validation.constraints.NotNull; -@ApiModel("管理后台 - 用户更新 Request VO") +@Schema(description = "管理后台 - 用户更新 Request VO") @Data @EqualsAndHashCode(callSuper = true) public class UserUpdateReqVO extends UserBaseVO { - @ApiModelProperty(value = "用户编号", required = true, example = "1024") + @Schema(description = "用户编号", required = true, example = "1024") @NotNull(message = "用户编号不能为空") private Long id; -} +} \ No newline at end of file diff --git a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/user/vo/user/UserUpdateStatusReqVO.java b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/user/vo/user/UserUpdateStatusReqVO.java index 2c7a83f22..780ea8c1c 100644 --- a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/user/vo/user/UserUpdateStatusReqVO.java +++ b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/user/vo/user/UserUpdateStatusReqVO.java @@ -1,22 +1,22 @@ package cn.iocoder.yudao.module.system.controller.admin.user.vo.user; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; +import io.swagger.v3.oas.annotations.media.Schema; +import io.swagger.v3.oas.annotations.media.Schema; import lombok.Data; import javax.validation.constraints.NotNull; -@ApiModel("管理后台 - 用户更新状态 Request VO") +@Schema(description = "管理后台 - 用户更新状态 Request VO") @Data public class UserUpdateStatusReqVO { - @ApiModelProperty(value = "用户编号", required = true, example = "1024") + @Schema(description = "用户编号", required = true, example = "1024") @NotNull(message = "角色编号不能为空") private Long id; - @ApiModelProperty(value = "状态", required = true, example = "1", notes = "见 CommonStatusEnum 枚举") + @Schema(description = "状态,见 CommonStatusEnum 枚举", required = true, example = "1") @NotNull(message = "状态不能为空") // @InEnum(value = CommonStatusEnum.class, message = "修改状态必须是 {value}") private Integer status; -} +} \ No newline at end of file From 8986299feab1112f9b463114ce66d1d6a413e811 Mon Sep 17 00:00:00 2001 From: gaibu <1016771049@qq.com> Date: Sat, 4 Feb 2023 23:59:25 +0800 Subject: [PATCH 03/10] =?UTF-8?q?feat:=20=E4=BF=AE=E6=94=B9=E5=89=A9?= =?UTF-8?q?=E4=BD=99=E9=83=A8=E5=88=86=20swagger=20=E6=B3=A8=E8=A7=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../yudao/gateway/swagger/SwaggerHandler.java | 108 +++++----- .../gateway/swagger/SwaggerProvider.java | 204 +++++++++--------- .../definition/vo/form/BpmFormBaseVO.java | 4 +- .../vo/form/BpmFormCreateReqVO.java | 6 +- .../definition/vo/form/BpmFormRespVO.java | 4 +- .../vo/form/BpmFormUpdateReqVO.java | 6 +- .../vo/group/BpmUserGroupBaseVO.java | 2 +- .../vo/group/BpmUserGroupCreateReqVO.java | 2 +- .../vo/group/BpmUserGroupRespVO.java | 3 +- .../vo/group/BpmUserGroupUpdateReqVO.java | 2 +- .../vo/model/BpmModeImportReqVO.java | 2 +- .../definition/vo/model/BpmModelBaseVO.java | 12 +- .../vo/model/BpmModelPageItemRespVO.java | 2 +- .../vo/model/BpmModelPageReqVO.java | 6 +- .../vo/model/BpmModelUpdateReqVO.java | 12 +- .../vo/model/BpmModelUpdateStateReqVO.java | 2 +- .../BpmProcessDefinitionListReqVO.java | 2 +- .../BpmProcessDefinitionPageReqVO.java | 2 +- .../process/BpmProcessDefinitionRespVO.java | 20 +- .../admin/oa/vo/BpmOALeaveBaseVO.java | 2 +- .../admin/oa/vo/BpmOALeaveCreateReqVO.java | 4 +- .../admin/oa/vo/BpmOALeavePageReqVO.java | 8 +- .../admin/oa/vo/BpmOALeaveRespVO.java | 4 +- .../admin/task/BpmActivityController.java | 3 +- .../task/vo/activity/BpmActivityRespVO.java | 2 +- .../BpmProcessInstanceMyPageReqVO.java | 6 +- .../BpmProcessInstancePageItemRespVO.java | 6 +- .../vo/instance/BpmProcessInstanceRespVO.java | 24 +-- .../vo/task/BpmTaskDonePageItemRespVO.java | 2 +- .../vo/task/BpmTaskTodoPageItemRespVO.java | 2 +- .../admin/codegen/vo/CodegenDetailRespVO.java | 4 +- .../codegen/vo/CodegenPreviewRespVO.java | 2 +- .../vo/column/CodegenColumnBaseVO.java | 2 +- .../codegen/vo/table/CodegenTableBaseVO.java | 4 +- .../vo/table/CodegenTablePageReqVO.java | 4 +- .../admin/config/vo/ConfigExportReqVO.java | 4 +- .../admin/config/vo/ConfigPageReqVO.java | 4 +- .../admin/config/vo/ConfigRespVO.java | 2 +- .../admin/db/DatabaseDocController.java | 9 +- .../admin/db/vo/DataSourceConfigBaseVO.java | 3 +- .../db/vo/DataSourceConfigCreateReqVO.java | 3 +- .../admin/db/vo/DataSourceConfigRespVO.java | 3 +- .../db/vo/DataSourceConfigUpdateReqVO.java | 3 +- .../file/vo/config/FileConfigCreateReqVO.java | 4 +- .../file/vo/config/FileConfigRespVO.java | 2 +- .../file/vo/config/FileConfigUpdateReqVO.java | 2 +- .../admin/file/vo/file/FilePageReqVO.java | 4 +- .../admin/file/vo/file/FileRespVO.java | 2 +- .../admin/file/vo/file/FileUploadReqVO.java | 2 +- .../vo/apiaccesslog/ApiAccessLogBaseVO.java | 2 +- .../apiaccesslog/ApiAccessLogExportReqVO.java | 6 +- .../apiaccesslog/ApiAccessLogPageReqVO.java | 4 +- .../apierrorlog/ApiErrorLogExportReqVO.java | 2 +- .../admin/redis/vo/RedisKeyValueRespVO.java | 2 +- .../admin/redis/vo/RedisMonitorRespVO.java | 2 +- .../admin/test/TestDemoController.java | 2 +- .../admin/test/vo/TestDemoBaseVO.java | 3 +- .../admin/test/vo/TestDemoCreateReqVO.java | 2 +- .../admin/test/vo/TestDemoExcelVO.java | 2 - .../admin/test/vo/TestDemoExportReqVO.java | 2 +- .../admin/test/vo/TestDemoUpdateReqVO.java | 2 +- .../admin/auth/vo/AuthMenuRespVO.java | 6 +- .../admin/dept/vo/dept/DeptListReqVO.java | 4 +- .../admin/dept/vo/dept/DeptRespVO.java | 2 +- .../admin/dict/vo/data/DictDataBaseVO.java | 4 +- .../admin/dict/vo/type/DictTypeBaseVO.java | 2 +- .../dict/vo/type/DictTypeExportReqVO.java | 6 +- .../admin/dict/vo/type/DictTypePageReqVO.java | 6 +- .../vo/account/MailAccountCreateReqVO.java | 4 +- .../admin/mail/vo/log/MailLogBaseVO.java | 4 +- .../admin/mail/vo/log/MailLogPageReqVO.java | 6 +- .../mail/vo/template/MailTemplateBaseVO.java | 2 +- .../vo/template/MailTemplateCreateReqVO.java | 4 +- .../vo/template/MailTemplatePageReqVO.java | 6 +- .../admin/notice/vo/NoticeBaseVO.java | 2 +- .../admin/notice/vo/NoticeCreateReqVO.java | 4 +- .../admin/notice/vo/NoticePageReqVO.java | 4 +- .../admin/notify/NotifyMessageController.java | 4 +- .../vo/message/NotifyMessageBaseVO.java | 2 +- .../vo/template/NotifyTemplateBaseVO.java | 4 +- .../template/NotifyTemplateCreateReqVO.java | 4 +- .../vo/template/NotifyTemplatePageReqVO.java | 2 +- .../admin/oauth2/OAuth2OpenController.java | 2 +- .../oauth2/vo/client/OAuth2ClientBaseVO.java | 4 +- .../vo/client/OAuth2ClientCreateReqVO.java | 2 +- .../vo/client/OAuth2ClientPageReqVO.java | 6 +- .../vo/open/OAuth2OpenAccessTokenRespVO.java | 4 +- .../open/OAuth2OpenAuthorizeInfoRespVO.java | 2 +- .../vo/open/OAuth2OpenCheckTokenRespVO.java | 4 +- .../vo/token/OAuth2AccessTokenPageReqVO.java | 2 +- .../vo/token/OAuth2AccessTokenRespVO.java | 2 +- .../oauth2/vo/user/OAuth2UserInfoRespVO.java | 2 +- .../oauth2/vo/user/OAuth2UserUpdateReqVO.java | 2 +- .../admin/permission/vo/menu/MenuBaseVO.java | 12 +- .../permission/vo/menu/MenuCreateReqVO.java | 4 +- .../permission/vo/menu/MenuListReqVO.java | 4 +- .../admin/permission/vo/menu/MenuRespVO.java | 2 +- .../permission/vo/menu/MenuSimpleRespVO.java | 2 +- .../PermissionAssignRoleDataScopeReqVO.java | 4 +- .../permission/vo/role/RoleExportReqVO.java | 6 +- .../permission/vo/role/RolePageReqVO.java | 6 +- .../admin/permission/vo/role/RoleRespVO.java | 6 +- .../vo/role/RoleUpdateStatusReqVO.java | 2 +- .../sensitiveword/vo/SensitiveWordBaseVO.java | 8 +- .../vo/SensitiveWordCreateReqVO.java | 4 +- .../sms/vo/channel/SmsChannelCreateReqVO.java | 2 +- .../sms/vo/channel/SmsChannelPageReqVO.java | 2 +- .../sms/vo/channel/SmsChannelRespVO.java | 2 +- .../vo/channel/SmsChannelSimpleRespVO.java | 2 +- .../sms/vo/template/SmsTemplateBaseVO.java | 4 +- .../vo/template/SmsTemplateCreateReqVO.java | 4 +- .../admin/socail/vo/SocialUserBindReqVO.java | 2 +- .../vo/packages/TenantPackageCreateReqVO.java | 4 +- .../vo/packages/TenantPackageUpdateReqVO.java | 3 +- .../admin/user/vo/user/UserBaseVO.java | 2 +- 115 files changed, 367 insertions(+), 392 deletions(-) diff --git a/yudao-gateway/src/main/java/cn/iocoder/yudao/gateway/swagger/SwaggerHandler.java b/yudao-gateway/src/main/java/cn/iocoder/yudao/gateway/swagger/SwaggerHandler.java index 7cae3c810..3b30a4786 100644 --- a/yudao-gateway/src/main/java/cn/iocoder/yudao/gateway/swagger/SwaggerHandler.java +++ b/yudao-gateway/src/main/java/cn/iocoder/yudao/gateway/swagger/SwaggerHandler.java @@ -1,54 +1,54 @@ -package cn.iocoder.yudao.gateway.swagger; - - -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.http.HttpStatus; -import org.springframework.http.ResponseEntity; -import org.springframework.web.bind.annotation.GetMapping; -import org.springframework.web.bind.annotation.RequestMapping; -import org.springframework.web.bind.annotation.RestController; -import reactor.core.publisher.Mono; -import springfox.documentation.swagger.web.*; - -import javax.annotation.Resource; -import java.util.List; -import java.util.Optional; - -/** - * Swagger Controller - * - * @author zxliu - * @date 2022-10-25 11:24 - */ -@RestController -@RequestMapping("/swagger-resources") -public class SwaggerHandler { - - @Resource - private SwaggerResourcesProvider swaggerResources; - - @SuppressWarnings("SpringJavaAutowiredFieldsWarningInspection") // 只有 @Autowired 可以实现可选注入 - @Autowired(required = false) - private SecurityConfiguration securityConfiguration; - @SuppressWarnings("SpringJavaAutowiredFieldsWarningInspection") // 只有 @Autowired 可以实现可选注入 - @Autowired(required = false) - private UiConfiguration uiConfiguration; - - @GetMapping("") - public Mono>> swaggerResources() { - return Mono.just((new ResponseEntity<>(swaggerResources.get(), HttpStatus.OK))); - } - - @GetMapping("/configuration/security") - public Mono> securityConfiguration() { - return Mono.just(new ResponseEntity<>(Optional.ofNullable(securityConfiguration) - .orElse(SecurityConfigurationBuilder.builder().build()), HttpStatus.OK)); - } - - @GetMapping("/configuration/ui") - public Mono> uiConfiguration() { - return Mono.just(new ResponseEntity<>(Optional.ofNullable(uiConfiguration) - .orElse(UiConfigurationBuilder.builder().build()), HttpStatus.OK)); - } - -} +//package cn.iocoder.yudao.gateway.swagger; +// +// +//import org.springframework.beans.factory.annotation.Autowired; +//import org.springframework.http.HttpStatus; +//import org.springframework.http.ResponseEntity; +//import org.springframework.web.bind.annotation.GetMapping; +//import org.springframework.web.bind.annotation.RequestMapping; +//import org.springframework.web.bind.annotation.RestController; +//import reactor.core.publisher.Mono; +//import springfox.documentation.swagger.web.*; +// +//import javax.annotation.Resource; +//import java.util.List; +//import java.util.Optional; +// +///** +// * Swagger Controller +// * +// * @author zxliu +// * @date 2022-10-25 11:24 +// */ +//@RestController +//@RequestMapping("/swagger-resources") +//public class SwaggerHandler { +// +// @Resource +// private SwaggerResourcesProvider swaggerResources; +// +// @SuppressWarnings("SpringJavaAutowiredFieldsWarningInspection") // 只有 @Autowired 可以实现可选注入 +// @Autowired(required = false) +// private SecurityConfiguration securityConfiguration; +// @SuppressWarnings("SpringJavaAutowiredFieldsWarningInspection") // 只有 @Autowired 可以实现可选注入 +// @Autowired(required = false) +// private UiConfiguration uiConfiguration; +// +// @GetMapping("") +// public Mono>> swaggerResources() { +// return Mono.just((new ResponseEntity<>(swaggerResources.get(), HttpStatus.OK))); +// } +// +// @GetMapping("/configuration/security") +// public Mono> securityConfiguration() { +// return Mono.just(new ResponseEntity<>(Optional.ofNullable(securityConfiguration) +// .orElse(SecurityConfigurationBuilder.builder().build()), HttpStatus.OK)); +// } +// +// @GetMapping("/configuration/ui") +// public Mono> uiConfiguration() { +// return Mono.just(new ResponseEntity<>(Optional.ofNullable(uiConfiguration) +// .orElse(UiConfigurationBuilder.builder().build()), HttpStatus.OK)); +// } +// +//} diff --git a/yudao-gateway/src/main/java/cn/iocoder/yudao/gateway/swagger/SwaggerProvider.java b/yudao-gateway/src/main/java/cn/iocoder/yudao/gateway/swagger/SwaggerProvider.java index a67e66d70..8b1cb86a3 100644 --- a/yudao-gateway/src/main/java/cn/iocoder/yudao/gateway/swagger/SwaggerProvider.java +++ b/yudao-gateway/src/main/java/cn/iocoder/yudao/gateway/swagger/SwaggerProvider.java @@ -1,102 +1,102 @@ -package cn.iocoder.yudao.gateway.swagger; - -import cn.hutool.core.collection.CollUtil; -import cn.hutool.core.util.StrUtil; -import lombok.extern.slf4j.Slf4j; -import org.springframework.cloud.gateway.config.GatewayProperties; -import org.springframework.cloud.gateway.handler.predicate.PredicateDefinition; -import org.springframework.cloud.gateway.route.RouteDefinition; -import org.springframework.cloud.gateway.support.NameUtils; -import org.springframework.context.annotation.Primary; -import org.springframework.stereotype.Component; -import springfox.documentation.swagger.web.SwaggerResource; -import springfox.documentation.swagger.web.SwaggerResourcesProvider; - -import javax.annotation.Resource; -import java.util.ArrayList; -import java.util.HashSet; -import java.util.List; -import java.util.Set; - -/** - * Swagger 资源的 Provider 实现类 - * - * @author zxliu - * @date 2022-10-25 11:23 - */ -@Component -@Primary -@Slf4j -public class SwaggerProvider implements SwaggerResourcesProvider { - - @Resource - private GatewayProperties gatewayProperties; - - /** - * 获得 SwaggerResource 列表 - * - * @return SwaggerResource 列表 - */ - @Override - public List get() { - // 将 RouteDefinition 转换成 SwaggerResource - List resources = new ArrayList<>(); - Set serviceNames = new HashSet<>(); // 已处理的服务名,避免重复 - gatewayProperties.getRoutes().forEach(route -> { - // 已存在的服务,直接忽略 - String serviceName = route.getUri().getHost(); - if (StrUtil.isEmpty(serviceName)) { - return; - } - if (!serviceNames.add(serviceName)) { - return; - } - - // 获得 Path PredicateDefinition - String path = getRoutePath(route); - if (path == null) { - return; - } - - // 重要:构建最终的 SwaggerResource 对象 - resources.add(buildSwaggerResource(serviceName, path)); - }); - return resources; - } - - private SwaggerResource buildSwaggerResource(String name, String location) { - SwaggerResource swaggerResource = new SwaggerResource(); - swaggerResource.setName(name); - swaggerResource.setLocation(location); - swaggerResource.setSwaggerVersion("2.0"); - return swaggerResource; - } - - /** - * 获得路由的 Path - * - * ① 输入: - * predicates: - * - Path=/admin-api/system/** - * ② 输出: - * /admin-api/system/v2/api-docs - * - * @param route 路由 - * @return 路由 - */ - private String getRoutePath(RouteDefinition route) { - PredicateDefinition pathDefinition = CollUtil.findOne(route.getPredicates(), - predicateDefinition -> "Path".equals(predicateDefinition.getName())); - if (pathDefinition == null) { - log.info("[get][Route({}) 没有 Path 条件,忽略接口文档]", route.getId()); - return null; - } - String path = pathDefinition.getArgs().get(NameUtils.GENERATED_NAME_PREFIX + "0"); - if (StrUtil.isEmpty(path)) { - log.info("[get][Route({}) Path 的值为空,忽略接口文档]", route.getId()); - return null; - } - return path.replace("/**", "/v2/api-docs"); - } - -} +//package cn.iocoder.yudao.gateway.swagger; +// +//import cn.hutool.core.collection.CollUtil; +//import cn.hutool.core.util.StrUtil; +//import lombok.extern.slf4j.Slf4j; +//import org.springframework.cloud.gateway.config.GatewayProperties; +//import org.springframework.cloud.gateway.handler.predicate.PredicateDefinition; +//import org.springframework.cloud.gateway.route.RouteDefinition; +//import org.springframework.cloud.gateway.support.NameUtils; +//import org.springframework.context.annotation.Primary; +//import org.springframework.stereotype.Component; +//import springfox.documentation.swagger.web.SwaggerResource; +//import springfox.documentation.swagger.web.SwaggerResourcesProvider; +// +//import javax.annotation.Resource; +//import java.util.ArrayList; +//import java.util.HashSet; +//import java.util.List; +//import java.util.Set; +// +///** +// * Swagger 资源的 Provider 实现类 +// * +// * @author zxliu +// * @date 2022-10-25 11:23 +// */ +//@Component +//@Primary +//@Slf4j +//public class SwaggerProvider implements SwaggerResourcesProvider { +// +// @Resource +// private GatewayProperties gatewayProperties; +// +// /** +// * 获得 SwaggerResource 列表 +// * +// * @return SwaggerResource 列表 +// */ +// @Override +// public List get() { +// // 将 RouteDefinition 转换成 SwaggerResource +// List resources = new ArrayList<>(); +// Set serviceNames = new HashSet<>(); // 已处理的服务名,避免重复 +// gatewayProperties.getRoutes().forEach(route -> { +// // 已存在的服务,直接忽略 +// String serviceName = route.getUri().getHost(); +// if (StrUtil.isEmpty(serviceName)) { +// return; +// } +// if (!serviceNames.add(serviceName)) { +// return; +// } +// +// // 获得 Path PredicateDefinition +// String path = getRoutePath(route); +// if (path == null) { +// return; +// } +// +// // 重要:构建最终的 SwaggerResource 对象 +// resources.add(buildSwaggerResource(serviceName, path)); +// }); +// return resources; +// } +// +// private SwaggerResource buildSwaggerResource(String name, String location) { +// SwaggerResource swaggerResource = new SwaggerResource(); +// swaggerResource.setName(name); +// swaggerResource.setLocation(location); +// swaggerResource.setSwaggerVersion("2.0"); +// return swaggerResource; +// } +// +// /** +// * 获得路由的 Path +// * +// * ① 输入: +// * predicates: +// * - Path=/admin-api/system/** +// * ② 输出: +// * /admin-api/system/v2/api-docs +// * +// * @param route 路由 +// * @return 路由 +// */ +// private String getRoutePath(RouteDefinition route) { +// PredicateDefinition pathDefinition = CollUtil.findOne(route.getPredicates(), +// predicateDefinition -> "Path".equals(predicateDefinition.getName())); +// if (pathDefinition == null) { +// log.info("[get][Route({}) 没有 Path 条件,忽略接口文档]", route.getId()); +// return null; +// } +// String path = pathDefinition.getArgs().get(NameUtils.GENERATED_NAME_PREFIX + "0"); +// if (StrUtil.isEmpty(path)) { +// log.info("[get][Route({}) Path 的值为空,忽略接口文档]", route.getId()); +// return null; +// } +// return path.replace("/**", "/v2/api-docs"); +// } +// +//} diff --git a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/definition/vo/form/BpmFormBaseVO.java b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/definition/vo/form/BpmFormBaseVO.java index f42a54635..b094ec5a4 100644 --- a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/definition/vo/form/BpmFormBaseVO.java +++ b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/definition/vo/form/BpmFormBaseVO.java @@ -1,7 +1,7 @@ package cn.iocoder.yudao.module.bpm.controller.admin.definition.vo.form; +import io.swagger.v3.oas.annotations.media.Schema; import lombok.*; -import io.swagger.annotations.*; import javax.validation.constraints.*; /** @@ -15,7 +15,7 @@ public class BpmFormBaseVO { @NotNull(message = "表单名称不能为空") private String name; - @Schema(description = "表单状态", required = true, notes = "参见 CommonStatusEnum 枚举", example = "1") + @Schema(description = "表单状态,参见 CommonStatusEnum 枚举", required = true, example = "1") @NotNull(message = "表单状态不能为空") private Integer status; diff --git a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/definition/vo/form/BpmFormCreateReqVO.java b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/definition/vo/form/BpmFormCreateReqVO.java index 709cc9e84..ade43bc27 100644 --- a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/definition/vo/form/BpmFormCreateReqVO.java +++ b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/definition/vo/form/BpmFormCreateReqVO.java @@ -1,7 +1,7 @@ package cn.iocoder.yudao.module.bpm.controller.admin.definition.vo.form; +import io.swagger.v3.oas.annotations.media.Schema; import lombok.*; -import io.swagger.annotations.*; import javax.validation.constraints.NotNull; import java.util.List; @@ -12,11 +12,11 @@ import java.util.List; @ToString(callSuper = true) public class BpmFormCreateReqVO extends BpmFormBaseVO { - @Schema(description = "表单的配置", required = true, notes = "JSON 字符串") + @Schema(description = "表单的配置,JSON 字符串", required = true) @NotNull(message = "表单的配置不能为空") private String conf; - @Schema(description = "表单项的数组", required = true, notes = "JSON 字符串的数组") + @Schema(description = "表单项的数组,JSON 字符串的数组", required = true) @NotNull(message = "表单项的数组不能为空") private List fields; diff --git a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/definition/vo/form/BpmFormRespVO.java b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/definition/vo/form/BpmFormRespVO.java index a193c64a4..563dde569 100644 --- a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/definition/vo/form/BpmFormRespVO.java +++ b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/definition/vo/form/BpmFormRespVO.java @@ -19,11 +19,11 @@ public class BpmFormRespVO extends BpmFormBaseVO { @Schema(description = "表单编号", required = true, example = "1024") private Long id; - @Schema(description = "表单的配置", required = true, notes = "JSON 字符串") + @Schema(description = "表单的配置,JSON 字符串", required = true) @NotNull(message = "表单的配置不能为空") private String conf; - @Schema(description = "表单项的数组", required = true, notes = "JSON 字符串的数组") + @Schema(description = "表单项的数组,JSON 字符串的数组", required = true) @NotNull(message = "表单项的数组不能为空") private List fields; diff --git a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/definition/vo/form/BpmFormUpdateReqVO.java b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/definition/vo/form/BpmFormUpdateReqVO.java index b165937ca..1d8d48b46 100644 --- a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/definition/vo/form/BpmFormUpdateReqVO.java +++ b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/definition/vo/form/BpmFormUpdateReqVO.java @@ -1,7 +1,7 @@ package cn.iocoder.yudao.module.bpm.controller.admin.definition.vo.form; +import io.swagger.v3.oas.annotations.media.Schema; import lombok.*; -import io.swagger.annotations.*; import javax.validation.constraints.*; import java.util.List; @@ -15,11 +15,11 @@ public class BpmFormUpdateReqVO extends BpmFormBaseVO { @NotNull(message = "表单编号不能为空") private Long id; - @Schema(description = "表单的配置", required = true, notes = "JSON 字符串") + @Schema(description = "表单的配置,JSON 字符串", required = true) @NotNull(message = "表单的配置不能为空") private String conf; - @Schema(description = "表单项的数组", required = true, notes = "JSON 字符串的数组") + @Schema(description = "表单项的数组,JSON 字符串的数组", required = true) @NotNull(message = "表单项的数组不能为空") private List fields; diff --git a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/definition/vo/group/BpmUserGroupBaseVO.java b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/definition/vo/group/BpmUserGroupBaseVO.java index f8fb489cb..92c8e3be1 100644 --- a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/definition/vo/group/BpmUserGroupBaseVO.java +++ b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/definition/vo/group/BpmUserGroupBaseVO.java @@ -1,8 +1,8 @@ package cn.iocoder.yudao.module.bpm.controller.admin.definition.vo.group; +import io.swagger.v3.oas.annotations.media.Schema; import lombok.*; import java.util.*; -import io.swagger.annotations.*; import javax.validation.constraints.*; /** diff --git a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/definition/vo/group/BpmUserGroupCreateReqVO.java b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/definition/vo/group/BpmUserGroupCreateReqVO.java index c28fa6ef2..fbfcbe39d 100644 --- a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/definition/vo/group/BpmUserGroupCreateReqVO.java +++ b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/definition/vo/group/BpmUserGroupCreateReqVO.java @@ -1,7 +1,7 @@ package cn.iocoder.yudao.module.bpm.controller.admin.definition.vo.group; +import io.swagger.v3.oas.annotations.media.Schema; import lombok.*; -import io.swagger.annotations.*; @Schema(description = "管理后台 - 用户组创建 Request VO") @Data diff --git a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/definition/vo/group/BpmUserGroupRespVO.java b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/definition/vo/group/BpmUserGroupRespVO.java index 69fb2627d..607f56727 100644 --- a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/definition/vo/group/BpmUserGroupRespVO.java +++ b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/definition/vo/group/BpmUserGroupRespVO.java @@ -1,10 +1,9 @@ package cn.iocoder.yudao.module.bpm.controller.admin.definition.vo.group; +import io.swagger.v3.oas.annotations.media.Schema; import lombok.*; import java.time.LocalDateTime; -import java.util.*; -import io.swagger.annotations.*; @Schema(description = "管理后台 - 用户组 Response VO") @Data diff --git a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/definition/vo/group/BpmUserGroupUpdateReqVO.java b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/definition/vo/group/BpmUserGroupUpdateReqVO.java index eae33ff7a..fb011a6d3 100644 --- a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/definition/vo/group/BpmUserGroupUpdateReqVO.java +++ b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/definition/vo/group/BpmUserGroupUpdateReqVO.java @@ -1,7 +1,7 @@ package cn.iocoder.yudao.module.bpm.controller.admin.definition.vo.group; +import io.swagger.v3.oas.annotations.media.Schema; import lombok.*; -import io.swagger.annotations.*; import javax.validation.constraints.*; @Schema(description = "管理后台 - 用户组更新 Request VO") diff --git a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/definition/vo/model/BpmModeImportReqVO.java b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/definition/vo/model/BpmModeImportReqVO.java index 11ceb4cc5..acf68a3fb 100644 --- a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/definition/vo/model/BpmModeImportReqVO.java +++ b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/definition/vo/model/BpmModeImportReqVO.java @@ -9,7 +9,7 @@ import org.springframework.web.multipart.MultipartFile; import javax.validation.constraints.NotNull; -@Schema(description = value = "管理后台 - 流程模型的导入 Request VO", description = "相比流程模型的新建来说,只是多了一个 bpmnFile 文件") +@Schema(description = "管理后台 - 流程模型的导入 Request VO,相比流程模型的新建来说,只是多了一个 bpmnFile 文件") @Data @EqualsAndHashCode(callSuper = true) @ToString(callSuper = true) diff --git a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/definition/vo/model/BpmModelBaseVO.java b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/definition/vo/model/BpmModelBaseVO.java index 272a1a75b..803065282 100644 --- a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/definition/vo/model/BpmModelBaseVO.java +++ b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/definition/vo/model/BpmModelBaseVO.java @@ -23,19 +23,17 @@ public class BpmModelBaseVO { @Schema(description = "流程描述", example = "我是描述") private String description; - @Schema(description = "流程分类", notes = "参见 bpm_model_category 数据字典", example = "1") + @Schema(description = "流程分类,参见 bpm_model_category 数据字典", example = "1") @NotEmpty(message = "流程分类不能为空") private String category; - @Schema(description = "表单类型", notes = "参见 bpm_model_form_type 数据字典", example = "1") + @Schema(description = "表单类型,参见 bpm_model_form_type 数据字典", example = "1") private Integer formType; - @Schema(description = "表单编号", example = "1024", notes = "在表单类型为 {@link BpmModelFormTypeEnum#CUSTOM} 时,必须非空") + @Schema(description = "表单编号,在表单类型为 {@link BpmModelFormTypeEnum#CUSTOM} 时,必须非空", example = "1024") private Long formId; - @Schema(description = "自定义表单的提交路径,使用 Vue 的路由地址", example = "/bpm/oa/leave/create", - notes = "在表单类型为 {@link BpmModelFormTypeEnum#CUSTOM} 时,必须非空") + @Schema(description = "自定义表单的提交路径,使用 Vue 的路由地址,在表单类型为 {@link BpmModelFormTypeEnum#CUSTOM} 时,必须非空", example = "/bpm/oa/leave/create") private String formCustomCreatePath; - @Schema(description = "自定义表单的查看路径,使用 Vue 的路由地址", example = "/bpm/oa/leave/view", - notes = "在表单类型为 {@link BpmModelFormTypeEnum#CUSTOM} 时,必须非空") + @Schema(description = "自定义表单的查看路径,使用 Vue 的路由地址,在表单类型为 {@link BpmModelFormTypeEnum#CUSTOM} 时,必须非空", example = "/bpm/oa/leave/view" ) private String formCustomViewPath; } \ No newline at end of file diff --git a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/definition/vo/model/BpmModelPageItemRespVO.java b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/definition/vo/model/BpmModelPageItemRespVO.java index 3861b6e24..9c543503e 100644 --- a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/definition/vo/model/BpmModelPageItemRespVO.java +++ b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/definition/vo/model/BpmModelPageItemRespVO.java @@ -41,7 +41,7 @@ public class BpmModelPageItemRespVO extends BpmModelBaseVO { @Schema(description = "部署时间", required = true) private LocalDateTime deploymentTime; - @Schema(description = "中断状态", required = true, example = "1", notes = "参见 SuspensionState 枚举") + @Schema(description = "中断状态,参见 SuspensionState 枚举", required = true, example = "1") private Integer suspensionState; } diff --git a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/definition/vo/model/BpmModelPageReqVO.java b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/definition/vo/model/BpmModelPageReqVO.java index b901f9cc7..9e9bbde5a 100644 --- a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/definition/vo/model/BpmModelPageReqVO.java +++ b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/definition/vo/model/BpmModelPageReqVO.java @@ -14,13 +14,13 @@ import lombok.ToString; @ToString(callSuper = true) public class BpmModelPageReqVO extends PageParam { - @Schema(description = "标识", example = "process1641042089407", notes = "精准匹配") + @Schema(description = "标识,精准匹配", example = "process1641042089407") private String key; - @Schema(description = "名字", example = "芋道", notes = "模糊匹配") + @Schema(description = "名字,精准匹配", example = "芋道") private String name; - @Schema(description = "流程分类", notes = "参见 bpm_model_category 数据字典", example = "1") + @Schema(description = "流程分类,参见 bpm_model_category 数据字典", example = "1") private String category; } \ No newline at end of file diff --git a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/definition/vo/model/BpmModelUpdateReqVO.java b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/definition/vo/model/BpmModelUpdateReqVO.java index 0a4029c5f..bf20f225e 100644 --- a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/definition/vo/model/BpmModelUpdateReqVO.java +++ b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/definition/vo/model/BpmModelUpdateReqVO.java @@ -20,21 +20,19 @@ public class BpmModelUpdateReqVO { @Schema(description = "流程描述", example = "我是描述") private String description; - @Schema(description = "流程分类", notes = "参见 bpm_model_category 数据字典", example = "1") + @Schema(description = "流程分类,参见 bpm_model_category 数据字典", example = "1") private String category; @Schema(description = "BPMN XML", required = true) private String bpmnXml; - @Schema(description = "表单类型", notes = "参见 bpm_model_form_type 数据字典", example = "1") + @Schema(description = "表单类型,参见 bpm_model_form_type 数据字典", example = "1") private Integer formType; - @Schema(description = "表单编号", example = "1024", notes = "在表单类型为 {@link BpmModelFormTypeEnum#CUSTOM} 时,必须非空") + @Schema(description = "表单编号,在表单类型为 {@link BpmModelFormTypeEnum#CUSTOM} 时,必须非空", example = "1024") private Long formId; - @Schema(description = "自定义表单的提交路径,使用 Vue 的路由地址", example = "/bpm/oa/leave/create", - notes = "在表单类型为 {@link BpmModelFormTypeEnum#CUSTOM} 时,必须非空") + @Schema(description = "自定义表单的提交路径,使用 Vue 的路由地址,在表单类型为 {@link BpmModelFormTypeEnum#CUSTOM} 时,必须非空", example = "/bpm/oa/leave/create") private String formCustomCreatePath; - @Schema(description = "自定义表单的查看路径,使用 Vue 的路由地址", example = "/bpm/oa/leave/view", - notes = "在表单类型为 {@link BpmModelFormTypeEnum#CUSTOM} 时,必须非空") + @Schema(description = "自定义表单的查看路径,使用 Vue 的路由地址,在表单类型为 {@link BpmModelFormTypeEnum#CUSTOM} 时,必须非空", example = "/bpm/oa/leave/view" ) private String formCustomViewPath; } \ No newline at end of file diff --git a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/definition/vo/model/BpmModelUpdateStateReqVO.java b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/definition/vo/model/BpmModelUpdateStateReqVO.java index 81ed1160a..bc5632f3f 100644 --- a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/definition/vo/model/BpmModelUpdateStateReqVO.java +++ b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/definition/vo/model/BpmModelUpdateStateReqVO.java @@ -14,7 +14,7 @@ public class BpmModelUpdateStateReqVO { @NotNull(message = "编号不能为空") private String id; - @Schema(description = "状态", required = true, example = "1", notes = "见 SuspensionState 枚举") + @Schema(description = "状态,见 SuspensionState 枚举", required = true, example = "1") @NotNull(message = "状态不能为空") private Integer state; diff --git a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/definition/vo/process/BpmProcessDefinitionListReqVO.java b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/definition/vo/process/BpmProcessDefinitionListReqVO.java index ef5d90d3f..1a1230adb 100644 --- a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/definition/vo/process/BpmProcessDefinitionListReqVO.java +++ b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/definition/vo/process/BpmProcessDefinitionListReqVO.java @@ -13,7 +13,7 @@ import lombok.ToString; @EqualsAndHashCode(callSuper = true) public class BpmProcessDefinitionListReqVO extends PageParam { - @Schema(description = "中断状态", example = "1", notes = "参见 SuspensionState 枚举") + @Schema(description = "中断状态,参见 SuspensionState 枚举", example = "1") private Integer suspensionState; } \ No newline at end of file diff --git a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/definition/vo/process/BpmProcessDefinitionPageReqVO.java b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/definition/vo/process/BpmProcessDefinitionPageReqVO.java index e01ec4746..e197e83cc 100644 --- a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/definition/vo/process/BpmProcessDefinitionPageReqVO.java +++ b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/definition/vo/process/BpmProcessDefinitionPageReqVO.java @@ -13,7 +13,7 @@ import lombok.ToString; @EqualsAndHashCode(callSuper = true) public class BpmProcessDefinitionPageReqVO extends PageParam { - @Schema(description = "标识", example = "process1641042089407", notes = "精准匹配") + @Schema(description = "标识,精准匹配", example = "process1641042089407") private String key; } \ No newline at end of file diff --git a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/definition/vo/process/BpmProcessDefinitionRespVO.java b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/definition/vo/process/BpmProcessDefinitionRespVO.java index 6c51e40d2..84b183627 100644 --- a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/definition/vo/process/BpmProcessDefinitionRespVO.java +++ b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/definition/vo/process/BpmProcessDefinitionRespVO.java @@ -25,28 +25,24 @@ public class BpmProcessDefinitionRespVO { @Schema(description = "流程描述", example = "我是描述") private String description; - @Schema(description = "流程分类", notes = "参见 bpm_model_category 数据字典", example = "1") + @Schema(description = "流程分类,参见 bpm_model_category 数据字典", example = "1") @NotEmpty(message = "流程分类不能为空") private String category; - @Schema(description = "表单类型", notes = "参见 bpm_model_form_type 数据字典", example = "1") + @Schema(description = "表单类型,参见 bpm_model_form_type 数据字典", example = "1") private Integer formType; - @Schema(description = "表单编号", example = "1024", notes = "在表单类型为 {@link BpmModelFormTypeEnum#CUSTOM} 时,必须非空") + @Schema(description = "表单编号,在表单类型为 {@link BpmModelFormTypeEnum#CUSTOM} 时,必须非空", example = "1024") private Long formId; - @Schema(description = "表单的配置", required = true, - notes = "JSON 字符串。在表单类型为 {@link BpmModelFormTypeEnum#CUSTOM} 时,必须非空") + @Schema(description = "表单的配置,JSON 字符串。在表单类型为 {@link BpmModelFormTypeEnum#CUSTOM} 时,必须非空", required = true ) private String formConf; - @Schema(description = "表单项的数组", required = true, - notes = "JSON 字符串的数组。在表单类型为 {@link BpmModelFormTypeEnum#CUSTOM} 时,必须非空") + @Schema(description = "表单项的数组,JSON 字符串的数组。在表单类型为 {@link BpmModelFormTypeEnum#CUSTOM} 时,必须非空", required = true ) private List formFields; - @Schema(description = "自定义表单的提交路径,使用 Vue 的路由地址", example = "/bpm/oa/leave/create", - notes = "在表单类型为 {@link BpmModelFormTypeEnum#CUSTOM} 时,必须非空") + @Schema(description = "自定义表单的提交路径,使用 Vue 的路由地址,在表单类型为 {@link BpmModelFormTypeEnum#CUSTOM} 时,必须非空", example = "/bpm/oa/leave/create" ) private String formCustomCreatePath; - @Schema(description = "自定义表单的查看路径,使用 Vue 的路由地址", example = "/bpm/oa/leave/view", - notes = "在表单类型为 {@link BpmModelFormTypeEnum#CUSTOM} 时,必须非空") + @Schema(description = "自定义表单的查看路径,使用 Vue 的路由地址,在表单类型为 {@link BpmModelFormTypeEnum#CUSTOM} 时,必须非空", example = "/bpm/oa/leave/view") private String formCustomViewPath; - @Schema(description = "中断状态", required = true, example = "1", notes = "参见 SuspensionState 枚举") + @Schema(description = "中断状态,参见 SuspensionState 枚举", required = true, example = "1") private Integer suspensionState; } \ No newline at end of file diff --git a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/oa/vo/BpmOALeaveBaseVO.java b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/oa/vo/BpmOALeaveBaseVO.java index ec84b3794..e33884bba 100644 --- a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/oa/vo/BpmOALeaveBaseVO.java +++ b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/oa/vo/BpmOALeaveBaseVO.java @@ -25,7 +25,7 @@ public class BpmOALeaveBaseVO { @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND) private LocalDateTime endTime; - @Schema(description = "请假类型", required = true, example = "1", notes = "参见 bpm_oa_type 枚举") + @Schema(description = "请假类型,参见 bpm_oa_type 枚举", required = true, example = "1") private Integer type; @Schema(description = "原因", required = true, example = "阅读芋道源码") diff --git a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/oa/vo/BpmOALeaveCreateReqVO.java b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/oa/vo/BpmOALeaveCreateReqVO.java index 5230e2722..39ce08021 100644 --- a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/oa/vo/BpmOALeaveCreateReqVO.java +++ b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/oa/vo/BpmOALeaveCreateReqVO.java @@ -1,13 +1,13 @@ package cn.iocoder.yudao.module.bpm.controller.admin.oa.vo; -import io.swagger.annotations.ApiModel; +import io.swagger.v3.oas.annotations.media.Schema; import lombok.Data; import lombok.EqualsAndHashCode; import lombok.ToString; import javax.validation.constraints.AssertTrue; -@ApiModel("管理后台 - 请假申请创建 Request VO") +@Schema(description = "管理后台 - 请假申请创建 Request VO") @Data @EqualsAndHashCode(callSuper = true) @ToString(callSuper = true) diff --git a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/oa/vo/BpmOALeavePageReqVO.java b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/oa/vo/BpmOALeavePageReqVO.java index 98ac0cd22..88eb1c62f 100644 --- a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/oa/vo/BpmOALeavePageReqVO.java +++ b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/oa/vo/BpmOALeavePageReqVO.java @@ -1,8 +1,8 @@ package cn.iocoder.yudao.module.bpm.controller.admin.oa.vo; +import io.swagger.v3.oas.annotations.media.Schema; import lombok.*; import java.util.*; -import io.swagger.annotations.*; import cn.iocoder.yudao.framework.common.pojo.PageParam; import org.springframework.format.annotation.DateTimeFormat; @@ -14,13 +14,13 @@ import static cn.iocoder.yudao.framework.common.util.date.DateUtils.FORMAT_YEAR_ @ToString(callSuper = true) public class BpmOALeavePageReqVO extends PageParam { - @Schema(description = "状态", example = "1", notes = "参见 bpm_process_instance_result 枚举") + @Schema(description = "状态,参见 bpm_process_instance_result 枚举", example = "1") private Integer result; - @Schema(description = "请假类型", example = "1", notes = "参见 bpm_oa_type") + @Schema(description = "请假类型,参见 bpm_oa_type", example = "1") private Integer type; - @Schema(description = "原因", example = "阅读芋道源码", notes = "模糊匹配") + @Schema(description = "原因,模糊匹配", example = "阅读芋道源码") private String reason; @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND) diff --git a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/oa/vo/BpmOALeaveRespVO.java b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/oa/vo/BpmOALeaveRespVO.java index 1da373aa8..cf18e25ad 100644 --- a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/oa/vo/BpmOALeaveRespVO.java +++ b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/oa/vo/BpmOALeaveRespVO.java @@ -1,7 +1,7 @@ package cn.iocoder.yudao.module.bpm.controller.admin.oa.vo; +import io.swagger.v3.oas.annotations.media.Schema; import lombok.*; -import io.swagger.annotations.*; import org.springframework.format.annotation.DateTimeFormat; import javax.validation.constraints.NotNull; @@ -18,7 +18,7 @@ public class BpmOALeaveRespVO extends BpmOALeaveBaseVO { @Schema(description = "请假表单主键", required = true, example = "1024") private Long id; - @Schema(description = "状态", required = true, example = "1", notes = "参见 bpm_process_instance_result 枚举") + @Schema(description = "状态,参见 bpm_process_instance_result 枚举", required = true, example = "1") private Integer result; @Schema(description = "申请时间", required = true) diff --git a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/task/BpmActivityController.java b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/task/BpmActivityController.java index 718327eb8..966a920f3 100644 --- a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/task/BpmActivityController.java +++ b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/task/BpmActivityController.java @@ -28,8 +28,7 @@ public class BpmActivityController { private BpmActivityService activityService; @GetMapping("/list") - @Operation(summary = "生成指定流程实例的高亮流程图", - notes = "只高亮进行中的任务。不过要注意,该接口暂时没用,通过前端的 ProcessViewer.vue 界面的 highlightDiagram 方法生成") + @Operation(summary = "生成指定流程实例的高亮流程图,只高亮进行中的任务。不过要注意,该接口暂时没用,通过前端的 ProcessViewer.vue 界面的 highlightDiagram 方法生成") @Parameter(name = "processInstanceId", description = "流程实例的编号", required = true) @PreAuthorize("@ss.hasPermission('bpm:task:query')") public CommonResult> getActivityList( diff --git a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/task/vo/activity/BpmActivityRespVO.java b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/task/vo/activity/BpmActivityRespVO.java index a8fe5b7e1..f96dae69b 100644 --- a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/task/vo/activity/BpmActivityRespVO.java +++ b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/task/vo/activity/BpmActivityRespVO.java @@ -20,7 +20,7 @@ public class BpmActivityRespVO { @Schema(description = "流程活动的结束时间", required = true) private LocalDateTime endTime; - @Schema(description = "关联的流程任务的编号", example = "2048", notes = "关联的流程任务,只有 UserTask 等类型才有") + @Schema(description = "关联的流程任务的编号,关联的流程任务,只有 UserTask 等类型才有", example = "2048") private String taskId; } \ No newline at end of file diff --git a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/task/vo/instance/BpmProcessInstanceMyPageReqVO.java b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/task/vo/instance/BpmProcessInstanceMyPageReqVO.java index c20f5d24b..13bd28c6d 100644 --- a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/task/vo/instance/BpmProcessInstanceMyPageReqVO.java +++ b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/task/vo/instance/BpmProcessInstanceMyPageReqVO.java @@ -24,13 +24,13 @@ public class BpmProcessInstanceMyPageReqVO extends PageParam { @Schema(description = "流程定义的编号", example = "2048") private String processDefinitionId; - @Schema(description = "流程实例的状态", notes = "参见 bpm_process_instance_status", example = "1") + @Schema(description = "流程实例的状态,参见 bpm_process_instance_status", example = "1") private Integer status; - @Schema(description = "流程实例的结果", notes = "参见 bpm_process_instance_result", example = "2") + @Schema(description = "流程实例的结果,参见 bpm_process_instance_result", example = "2") private Integer result; - @Schema(description = "流程分类", notes = "参见 bpm_model_category 数据字典", example = "1") + @Schema(description = "流程分类,参见 bpm_model_category 数据字典", example = "1") private String category; @Schema(description = "创建时间") diff --git a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/task/vo/instance/BpmProcessInstancePageItemRespVO.java b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/task/vo/instance/BpmProcessInstancePageItemRespVO.java index 1d3f54988..5ddf82151 100644 --- a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/task/vo/instance/BpmProcessInstancePageItemRespVO.java +++ b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/task/vo/instance/BpmProcessInstancePageItemRespVO.java @@ -20,13 +20,13 @@ public class BpmProcessInstancePageItemRespVO { @Schema(description = "流程定义的编号", required = true, example = "2048") private String processDefinitionId; - @Schema(description = "流程分类", required = true, notes = "参见 bpm_model_category 数据字典", example = "1") + @Schema(description = "流程分类,参见 bpm_model_category 数据字典", required = true, example = "1") private String category; - @Schema(description = "流程实例的状态", required = true, notes = "参见 bpm_process_instance_status", example = "1") + @Schema(description = "流程实例的状态,参见 bpm_process_instance_status", required = true, example = "1") private Integer status; - @Schema(description = "流程实例的结果", required = true, notes = "参见 bpm_process_instance_result", example = "2") + @Schema(description = "流程实例的结果,参见 bpm_process_instance_result", required = true, example = "2") private Integer result; @Schema(description = "提交时间", required = true) diff --git a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/task/vo/instance/BpmProcessInstanceRespVO.java b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/task/vo/instance/BpmProcessInstanceRespVO.java index 9399da53c..526f90818 100644 --- a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/task/vo/instance/BpmProcessInstanceRespVO.java +++ b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/task/vo/instance/BpmProcessInstanceRespVO.java @@ -18,13 +18,13 @@ public class BpmProcessInstanceRespVO { @Schema(description = "流程名称", required = true, example = "芋道") private String name; - @Schema(description = "流程分类", required = true, notes = "参见 bpm_model_category 数据字典", example = "1") + @Schema(description = "流程分类,参见 bpm_model_category 数据字典", required = true, example = "1") private String category; - @Schema(description = "流程实例的状态", required = true, notes = "参见 bpm_process_instance_status", example = "1") + @Schema(description = "流程实例的状态,参见 bpm_process_instance_status", required = true, example = "1") private Integer status; - @Schema(description = "流程实例的结果", required = true, notes = "参见 bpm_process_instance_result", example = "2") + @Schema(description = "流程实例的结果,参见 bpm_process_instance_result", required = true, example = "2") private Integer result; @Schema(description = "提交时间", required = true) @@ -36,7 +36,7 @@ public class BpmProcessInstanceRespVO { @Schema(description = "提交的表单值", required = true) private Map formVariables; - @Schema(description = "业务的唯一标识", example = "1", notes = "例如说,请假申请的编号") + @Schema(description = "业务的唯一标识,例如说,请假申请的编号", example = "1") private String businessKey; /** @@ -72,21 +72,17 @@ public class BpmProcessInstanceRespVO { @Schema(description = "编号", required = true, example = "1024") private String id; - @Schema(description = "表单类型", notes = "参见 bpm_model_form_type 数据字典", example = "1") + @Schema(description = "表单类型,参见 bpm_model_form_type 数据字典", example = "1") private Integer formType; - @Schema(description = "表单编号", example = "1024", notes = "在表单类型为 {@link BpmModelFormTypeEnum#CUSTOM} 时,必须非空") + @Schema(description = "表单编号,在表单类型为 {@link BpmModelFormTypeEnum#CUSTOM} 时,必须非空", example = "1024") private Long formId; - @Schema(description = "表单的配置", required = true, - notes = "JSON 字符串。在表单类型为 {@link BpmModelFormTypeEnum#CUSTOM} 时,必须非空") + @Schema(description = "表单的配置,JSON 字符串。在表单类型为 {@link BpmModelFormTypeEnum#CUSTOM} 时,必须非空", required = true) private String formConf; - @Schema(description = "表单项的数组", required = true, - notes = "JSON 字符串的数组。在表单类型为 {@link BpmModelFormTypeEnum#CUSTOM} 时,必须非空") + @Schema(description = "表单项的数组,JSON 字符串的数组。在表单类型为 {@link BpmModelFormTypeEnum#CUSTOM} 时,必须非空", required = true) private List formFields; - @Schema(description = "自定义表单的提交路径,使用 Vue 的路由地址", example = "/bpm/oa/leave/create", - notes = "在表单类型为 {@link BpmModelFormTypeEnum#CUSTOM} 时,必须非空") + @Schema(description = "自定义表单的提交路径,使用 Vue 的路由地址,在表单类型为 {@link BpmModelFormTypeEnum#CUSTOM} 时,必须非空", example = "/bpm/oa/leave/create") private String formCustomCreatePath; - @Schema(description = "自定义表单的查看路径,使用 Vue 的路由地址", example = "/bpm/oa/leave/view", - notes = "在表单类型为 {@link BpmModelFormTypeEnum#CUSTOM} 时,必须非空") + @Schema(description = "自定义表单的查看路径,使用 Vue 的路由地址,在表单类型为 {@link BpmModelFormTypeEnum#CUSTOM} 时,必须非空", example = "/bpm/oa/leave/view") private String formCustomViewPath; @Schema(description = "BPMN XML", required = true) diff --git a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/task/vo/task/BpmTaskDonePageItemRespVO.java b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/task/vo/task/BpmTaskDonePageItemRespVO.java index b75d6d86f..cb78d1988 100644 --- a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/task/vo/task/BpmTaskDonePageItemRespVO.java +++ b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/task/vo/task/BpmTaskDonePageItemRespVO.java @@ -19,7 +19,7 @@ public class BpmTaskDonePageItemRespVO extends BpmTaskTodoPageItemRespVO { @Schema(description = "持续时间", required = true, example = "1000") private Long durationInMillis; - @Schema(description = "任务结果", required = true, notes = "参见 bpm_process_instance_result", example = "2") + @Schema(description = "任务结果,参见 bpm_process_instance_result", required = true, example = "2") private Integer result; @Schema(description = "审批建议", required = true, example = "不请假了!") private String reason; diff --git a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/task/vo/task/BpmTaskTodoPageItemRespVO.java b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/task/vo/task/BpmTaskTodoPageItemRespVO.java index ed5db34bc..811db66e7 100644 --- a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/task/vo/task/BpmTaskTodoPageItemRespVO.java +++ b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/task/vo/task/BpmTaskTodoPageItemRespVO.java @@ -22,7 +22,7 @@ public class BpmTaskTodoPageItemRespVO { @Schema(description = "创建时间", required = true) private LocalDateTime createTime; - @Schema(description = "激活状态", required = true, example = "1", notes = "参见 SuspensionState 枚举") + @Schema(description = "激活状态,参见 SuspensionState 枚举", required = true, example = "1") private Integer suspensionState; /** diff --git a/yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/controller/admin/codegen/vo/CodegenDetailRespVO.java b/yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/controller/admin/codegen/vo/CodegenDetailRespVO.java index fd2220c3c..35922c14b 100644 --- a/yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/controller/admin/codegen/vo/CodegenDetailRespVO.java +++ b/yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/controller/admin/codegen/vo/CodegenDetailRespVO.java @@ -12,10 +12,10 @@ import java.util.List; @Data public class CodegenDetailRespVO { - @ApiModelProperty("表定义") + @Schema(description = "表定义") private CodegenTableRespVO table; - @ApiModelProperty("字段定义") + @Schema(description = "字段定义") private List columns; } \ No newline at end of file diff --git a/yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/controller/admin/codegen/vo/CodegenPreviewRespVO.java b/yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/controller/admin/codegen/vo/CodegenPreviewRespVO.java index fb1b3134e..2997bcd11 100644 --- a/yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/controller/admin/codegen/vo/CodegenPreviewRespVO.java +++ b/yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/controller/admin/codegen/vo/CodegenPreviewRespVO.java @@ -4,7 +4,7 @@ import io.swagger.v3.oas.annotations.media.Schema; import io.swagger.v3.oas.annotations.media.Schema; import lombok.Data; -@Schema(description = value = "管理后台 - 代码生成预览 Response VO", description ="注意,每个文件都是一个该对象") +@Schema(description = "管理后台 - 代码生成预览 Response VO,注意,每个文件都是一个该对象") @Data public class CodegenPreviewRespVO { diff --git a/yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/controller/admin/codegen/vo/column/CodegenColumnBaseVO.java b/yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/controller/admin/codegen/vo/column/CodegenColumnBaseVO.java index 348e1af5a..0fdbc1a7a 100644 --- a/yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/controller/admin/codegen/vo/column/CodegenColumnBaseVO.java +++ b/yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/controller/admin/codegen/vo/column/CodegenColumnBaseVO.java @@ -70,7 +70,7 @@ public class CodegenColumnBaseVO { @NotNull(message = "是否为 List 查询操作的字段不能为空") private Boolean listOperation; - @Schema(description = "List 查询操作的条件类型", required = true, example = "LIKE", notes = "参见 CodegenColumnListConditionEnum 枚举") + @Schema(description = "List 查询操作的条件类型,参见 CodegenColumnListConditionEnum 枚举", required = true, example = "LIKE") @NotNull(message = "List 查询操作的条件类型不能为空") private String listOperationCondition; diff --git a/yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/controller/admin/codegen/vo/table/CodegenTableBaseVO.java b/yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/controller/admin/codegen/vo/table/CodegenTableBaseVO.java index d58deb2d9..4c05c10f2 100644 --- a/yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/controller/admin/codegen/vo/table/CodegenTableBaseVO.java +++ b/yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/controller/admin/codegen/vo/table/CodegenTableBaseVO.java @@ -12,7 +12,7 @@ import javax.validation.constraints.NotNull; @Data public class CodegenTableBaseVO { - @Schema(description = "生成场景", required = true, example = "1", notes = "参见 CodegenSceneEnum 枚举") + @Schema(description = "生成场景,参见 CodegenSceneEnum 枚举", required = true, example = "1") @NotNull(message = "导入类型不能为空") private Integer scene; @@ -47,7 +47,7 @@ public class CodegenTableBaseVO { @NotNull(message = "作者不能为空") private String author; - @Schema(description = "模板类型", required = true, example = "1", notes = "参见 CodegenTemplateTypeEnum 枚举") + @Schema(description = "模板类型,参见 CodegenTemplateTypeEnum 枚举", required = true, example = "1") @NotNull(message = "模板类型不能为空") private Integer templateType; diff --git a/yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/controller/admin/codegen/vo/table/CodegenTablePageReqVO.java b/yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/controller/admin/codegen/vo/table/CodegenTablePageReqVO.java index eed1daeb9..290f80e44 100644 --- a/yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/controller/admin/codegen/vo/table/CodegenTablePageReqVO.java +++ b/yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/controller/admin/codegen/vo/table/CodegenTablePageReqVO.java @@ -18,10 +18,10 @@ import static cn.iocoder.yudao.framework.common.util.date.DateUtils.FORMAT_YEAR_ @ToString(callSuper = true) public class CodegenTablePageReqVO extends PageParam { - @Schema(description = "表名称", example = "yudao", notes = "模糊匹配") + @Schema(description = "表名称,模糊匹配", example = "yudao") private String tableName; - @Schema(description = "表描述", example = "芋道", notes = "模糊匹配") + @Schema(description = "表描述,模糊匹配", example = "芋道") private String tableComment; @Schema(description = "创建时间", example = "[2022-07-01 00:00:00, 2022-07-01 23:59:59]") diff --git a/yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/controller/admin/config/vo/ConfigExportReqVO.java b/yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/controller/admin/config/vo/ConfigExportReqVO.java index 4782d7da3..e959346c7 100644 --- a/yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/controller/admin/config/vo/ConfigExportReqVO.java +++ b/yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/controller/admin/config/vo/ConfigExportReqVO.java @@ -16,10 +16,10 @@ public class ConfigExportReqVO { @Schema(description = "参数名称", example = "模糊匹配") private String name; - @Schema(description = "参数键名", example = "yunai.db.username", notes = "模糊匹配") + @Schema(description = "参数键名,模糊匹配", example = "yunai.db.username") private String key; - @Schema(description = "参数类型", example = "1", notes = "参见 SysConfigTypeEnum 枚举") + @Schema(description = "参数类型,参见 SysConfigTypeEnum 枚举", example = "1") private Integer type; @Schema(description = "创建时间", example = "[2022-07-01 00:00:00,2022-07-01 23:59:59]") diff --git a/yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/controller/admin/config/vo/ConfigPageReqVO.java b/yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/controller/admin/config/vo/ConfigPageReqVO.java index ff2653fc3..3219fc633 100644 --- a/yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/controller/admin/config/vo/ConfigPageReqVO.java +++ b/yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/controller/admin/config/vo/ConfigPageReqVO.java @@ -21,10 +21,10 @@ public class ConfigPageReqVO extends PageParam { @Schema(description = "数据源名称", example = "模糊匹配") private String name; - @Schema(description = "参数键名", example = "yunai.db.username", notes = "模糊匹配") + @Schema(description = "参数键名,模糊匹配", example = "yunai.db.username") private String key; - @Schema(description = "参数类型", example = "1", notes = "参见 SysConfigTypeEnum 枚举") + @Schema(description = "参数类型,参见 SysConfigTypeEnum 枚举", example = "1") private Integer type; @Schema(description = "创建时间", example = "[2022-07-01 00:00:00,2022-07-01 23:59:59]") diff --git a/yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/controller/admin/config/vo/ConfigRespVO.java b/yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/controller/admin/config/vo/ConfigRespVO.java index 02f44f57f..cbb289e5b 100644 --- a/yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/controller/admin/config/vo/ConfigRespVO.java +++ b/yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/controller/admin/config/vo/ConfigRespVO.java @@ -22,7 +22,7 @@ public class ConfigRespVO extends ConfigBaseVO { @Size(max = 100, message = "参数键名长度不能超过100个字符") private String key; - @Schema(description = "参数类型", required = true, example = "1", notes = "参见 SysConfigTypeEnum 枚举") + @Schema(description = "参数类型,参见 SysConfigTypeEnum 枚举", required = true, example = "1") private Integer type; @Schema(description = "创建时间", required = true, example = "时间戳格式") diff --git a/yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/controller/admin/db/DatabaseDocController.java b/yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/controller/admin/db/DatabaseDocController.java index 09a3eba59..8a44df1df 100644 --- a/yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/controller/admin/db/DatabaseDocController.java +++ b/yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/controller/admin/db/DatabaseDocController.java @@ -43,8 +43,7 @@ public class DatabaseDocController { @GetMapping("/export-html") @Operation(summary = "导出 html 格式的数据文档") - @Parameter(name = "deleteFile", description = "是否删除在服务器本地生成的数据库文档", example = "true", - dataTypeClass = Boolean.class) + @Parameter(name = "deleteFile", description = "是否删除在服务器本地生成的数据库文档", example = "true") public void exportHtml(@RequestParam(defaultValue = "true") Boolean deleteFile, HttpServletResponse response) throws IOException { doExportFile(EngineFileType.HTML, deleteFile, response); @@ -52,8 +51,7 @@ public class DatabaseDocController { @GetMapping("/export-word") @Operation(summary = "导出 word 格式的数据文档") - @Parameter(name = "deleteFile", description = "是否删除在服务器本地生成的数据库文档", example = "true", - dataTypeClass = Boolean.class) + @Parameter(name = "deleteFile", description = "是否删除在服务器本地生成的数据库文档", example = "true") public void exportWord(@RequestParam(defaultValue = "true") Boolean deleteFile, HttpServletResponse response) throws IOException { doExportFile(EngineFileType.WORD, deleteFile, response); @@ -61,8 +59,7 @@ public class DatabaseDocController { @GetMapping("/export-markdown") @Operation(summary = "导出 markdown 格式的数据文档") - @Parameter(name = "deleteFile", description = "是否删除在服务器本地生成的数据库文档", example = "true", - dataTypeClass = Boolean.class) + @Parameter(name = "deleteFile", description = "是否删除在服务器本地生成的数据库文档", example = "true") public void exportMarkdown(@RequestParam(defaultValue = "true") Boolean deleteFile, HttpServletResponse response) throws IOException { doExportFile(EngineFileType.MD, deleteFile, response); diff --git a/yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/controller/admin/db/vo/DataSourceConfigBaseVO.java b/yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/controller/admin/db/vo/DataSourceConfigBaseVO.java index f16dbe9d8..ff410ce65 100755 --- a/yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/controller/admin/db/vo/DataSourceConfigBaseVO.java +++ b/yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/controller/admin/db/vo/DataSourceConfigBaseVO.java @@ -1,8 +1,7 @@ package cn.iocoder.yudao.module.infra.controller.admin.db.vo; +import io.swagger.v3.oas.annotations.media.Schema; import lombok.*; -import java.util.*; -import io.swagger.annotations.*; import javax.validation.constraints.*; /** diff --git a/yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/controller/admin/db/vo/DataSourceConfigCreateReqVO.java b/yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/controller/admin/db/vo/DataSourceConfigCreateReqVO.java index 4d1ea2394..b67797baf 100755 --- a/yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/controller/admin/db/vo/DataSourceConfigCreateReqVO.java +++ b/yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/controller/admin/db/vo/DataSourceConfigCreateReqVO.java @@ -1,8 +1,7 @@ package cn.iocoder.yudao.module.infra.controller.admin.db.vo; +import io.swagger.v3.oas.annotations.media.Schema; import lombok.*; -import java.util.*; -import io.swagger.annotations.*; import javax.validation.constraints.*; @Schema(description = "管理后台 - 数据源配置创建 Request VO") diff --git a/yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/controller/admin/db/vo/DataSourceConfigRespVO.java b/yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/controller/admin/db/vo/DataSourceConfigRespVO.java index 36f656863..4002d4f06 100755 --- a/yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/controller/admin/db/vo/DataSourceConfigRespVO.java +++ b/yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/controller/admin/db/vo/DataSourceConfigRespVO.java @@ -1,10 +1,9 @@ package cn.iocoder.yudao.module.infra.controller.admin.db.vo; +import io.swagger.v3.oas.annotations.media.Schema; import lombok.*; import java.time.LocalDateTime; -import java.util.*; -import io.swagger.annotations.*; @Schema(description = "管理后台 - 数据源配置 Response VO") @Data diff --git a/yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/controller/admin/db/vo/DataSourceConfigUpdateReqVO.java b/yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/controller/admin/db/vo/DataSourceConfigUpdateReqVO.java index 4808a4552..6bf318e9a 100755 --- a/yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/controller/admin/db/vo/DataSourceConfigUpdateReqVO.java +++ b/yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/controller/admin/db/vo/DataSourceConfigUpdateReqVO.java @@ -1,8 +1,7 @@ package cn.iocoder.yudao.module.infra.controller.admin.db.vo; +import io.swagger.v3.oas.annotations.media.Schema; import lombok.*; -import java.util.*; -import io.swagger.annotations.*; import javax.validation.constraints.*; @Schema(description = "管理后台 - 数据源配置更新 Request VO") diff --git a/yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/controller/admin/file/vo/config/FileConfigCreateReqVO.java b/yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/controller/admin/file/vo/config/FileConfigCreateReqVO.java index e097ce862..1830f23a4 100755 --- a/yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/controller/admin/file/vo/config/FileConfigCreateReqVO.java +++ b/yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/controller/admin/file/vo/config/FileConfigCreateReqVO.java @@ -15,11 +15,11 @@ import java.util.Map; @ToString(callSuper = true) public class FileConfigCreateReqVO extends FileConfigBaseVO { - @Schema(description = "存储器", required = true, example = "1", notes = "参见 FileStorageEnum 枚举类") + @Schema(description = "存储器,参见 FileStorageEnum 枚举类", required = true, example = "1") @NotNull(message = "存储器不能为空") private Integer storage; - @Schema(description = "存储配置", required = true, notes = "配置是动态参数,所以使用 Map 接收") + @Schema(description = "存储配置,配置是动态参数,所以使用 Map 接收", required = true) @NotNull(message = "存储配置不能为空") private Map config; diff --git a/yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/controller/admin/file/vo/config/FileConfigRespVO.java b/yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/controller/admin/file/vo/config/FileConfigRespVO.java index db92744d8..ac0834bbd 100755 --- a/yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/controller/admin/file/vo/config/FileConfigRespVO.java +++ b/yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/controller/admin/file/vo/config/FileConfigRespVO.java @@ -19,7 +19,7 @@ public class FileConfigRespVO extends FileConfigBaseVO { @Schema(description = "编号", required = true, example = "1") private Long id; - @Schema(description = "存储器", required = true, example = "1", notes = "参见 FileStorageEnum 枚举类") + @Schema(description = "存储器,参见 FileStorageEnum 枚举类", required = true, example = "1") @NotNull(message = "存储器不能为空") private Integer storage; diff --git a/yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/controller/admin/file/vo/config/FileConfigUpdateReqVO.java b/yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/controller/admin/file/vo/config/FileConfigUpdateReqVO.java index 061bc4db5..5b5fe2224 100755 --- a/yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/controller/admin/file/vo/config/FileConfigUpdateReqVO.java +++ b/yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/controller/admin/file/vo/config/FileConfigUpdateReqVO.java @@ -19,7 +19,7 @@ public class FileConfigUpdateReqVO extends FileConfigBaseVO { @NotNull(message = "编号不能为空") private Long id; - @Schema(description = "存储配置", required = true, notes = "配置是动态参数,所以使用 Map 接收") + @Schema(description = "存储配置,配置是动态参数,所以使用 Map 接收", required = true) @NotNull(message = "存储配置不能为空") private Map config; diff --git a/yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/controller/admin/file/vo/file/FilePageReqVO.java b/yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/controller/admin/file/vo/file/FilePageReqVO.java index 6e0aa90c8..2c240d4a4 100644 --- a/yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/controller/admin/file/vo/file/FilePageReqVO.java +++ b/yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/controller/admin/file/vo/file/FilePageReqVO.java @@ -18,10 +18,10 @@ import static cn.iocoder.yudao.framework.common.util.date.DateUtils.FORMAT_YEAR_ @ToString(callSuper = true) public class FilePageReqVO extends PageParam { - @Schema(description = "文件路径", example = "yudao", notes = "模糊匹配") + @Schema(description = "文件路径,模糊匹配", example = "yudao") private String path; - @Schema(description = "文件类型", example = "jpg", notes = "模糊匹配") + @Schema(description = "文件类型,模糊匹配", example = "jpg") private String type; @Schema(description = "创建时间", example = "[2022-07-01 00:00:00, 2022-07-01 23:59:59]") diff --git a/yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/controller/admin/file/vo/file/FileRespVO.java b/yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/controller/admin/file/vo/file/FileRespVO.java index d54476640..a8344ee21 100644 --- a/yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/controller/admin/file/vo/file/FileRespVO.java +++ b/yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/controller/admin/file/vo/file/FileRespVO.java @@ -6,7 +6,7 @@ import lombok.Data; import java.time.LocalDateTime; -@Schema(description = value = "管理后台 - 文件 Response VO", description = "不返回 content 字段,太大") +@Schema(description = "管理后台 - 文件 Response VO,不返回 content 字段,太大" ) @Data public class FileRespVO { diff --git a/yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/controller/admin/file/vo/file/FileUploadReqVO.java b/yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/controller/admin/file/vo/file/FileUploadReqVO.java index 412a6ef82..83d38c81e 100644 --- a/yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/controller/admin/file/vo/file/FileUploadReqVO.java +++ b/yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/controller/admin/file/vo/file/FileUploadReqVO.java @@ -7,7 +7,7 @@ import org.springframework.web.multipart.MultipartFile; import javax.validation.constraints.NotNull; -@Schema(description = value = "管理后台 - 上传文件 Request VO") +@Schema(description = "管理后台 - 上传文件 Request VO") @Data public class FileUploadReqVO { diff --git a/yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/controller/admin/logger/vo/apiaccesslog/ApiAccessLogBaseVO.java b/yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/controller/admin/logger/vo/apiaccesslog/ApiAccessLogBaseVO.java index cf62d004e..94e17c9af 100644 --- a/yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/controller/admin/logger/vo/apiaccesslog/ApiAccessLogBaseVO.java +++ b/yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/controller/admin/logger/vo/apiaccesslog/ApiAccessLogBaseVO.java @@ -24,7 +24,7 @@ public class ApiAccessLogBaseVO { @NotNull(message = "用户编号不能为空") private Long userId; - @Schema(description = "用户类型", required = true, example = "2", notes = "参见 UserTypeEnum 枚举") + @Schema(description = "用户类型,参见 UserTypeEnum 枚举", required = true, example = "2") @NotNull(message = "用户类型不能为空") private Integer userType; diff --git a/yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/controller/admin/logger/vo/apiaccesslog/ApiAccessLogExportReqVO.java b/yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/controller/admin/logger/vo/apiaccesslog/ApiAccessLogExportReqVO.java index 2ab42340f..82ae47ef8 100644 --- a/yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/controller/admin/logger/vo/apiaccesslog/ApiAccessLogExportReqVO.java +++ b/yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/controller/admin/logger/vo/apiaccesslog/ApiAccessLogExportReqVO.java @@ -9,7 +9,7 @@ import java.time.LocalDateTime; import static cn.iocoder.yudao.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND; -@Schema(description = value = "管理后台 - API 访问日志 Excel 导出 Request VO", description = "参数和 ApiAccessLogPageReqVO 是一致的") +@Schema(description = "管理后台 - API 访问日志 Excel 导出 Request VO,参数和 ApiAccessLogPageReqVO 是一致的") @Data public class ApiAccessLogExportReqVO { @@ -22,14 +22,14 @@ public class ApiAccessLogExportReqVO { @Schema(description = "应用名", example = "dashboard") private String applicationName; - @Schema(description = "请求地址", example = "/xxx/yyy", notes = "模糊匹配") + @Schema(description = "请求地址,模糊匹配", example = "/xxx/yyy") private String requestUrl; @Schema(description = "开始时间", example = "[2022-07-01 00:00:00, 2022-07-01 23:59:59]") @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND) private LocalDateTime[] beginTime; - @Schema(description = "执行时长", example = "100", notes = "大于等于,单位:毫秒") + @Schema(description = "执行时长,大于等于,单位:毫秒", example = "100") private Integer duration; @Schema(description = "结果码", example = "0") diff --git a/yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/controller/admin/logger/vo/apiaccesslog/ApiAccessLogPageReqVO.java b/yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/controller/admin/logger/vo/apiaccesslog/ApiAccessLogPageReqVO.java index 3e660ff5d..31ca93e77 100644 --- a/yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/controller/admin/logger/vo/apiaccesslog/ApiAccessLogPageReqVO.java +++ b/yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/controller/admin/logger/vo/apiaccesslog/ApiAccessLogPageReqVO.java @@ -27,14 +27,14 @@ public class ApiAccessLogPageReqVO extends PageParam { @Schema(description = "应用名", example = "dashboard") private String applicationName; - @Schema(description = "请求地址", example = "/xxx/yyy", notes = "模糊匹配") + @Schema(description = "请求地址,模糊匹配", example = "/xxx/yyy") private String requestUrl; @Schema(description = "开始时间", example = "[2022-07-01 00:00:00, 2022-07-01 23:59:59]") @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND) private LocalDateTime[] beginTime; - @Schema(description = "执行时长", example = "100", notes = "大于等于,单位:毫秒") + @Schema(description = "执行时长,大于等于,单位:毫秒", example = "100") private Integer duration; @Schema(description = "结果码", example = "0") diff --git a/yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/controller/admin/logger/vo/apierrorlog/ApiErrorLogExportReqVO.java b/yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/controller/admin/logger/vo/apierrorlog/ApiErrorLogExportReqVO.java index 8050126e4..c618d2f5c 100644 --- a/yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/controller/admin/logger/vo/apierrorlog/ApiErrorLogExportReqVO.java +++ b/yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/controller/admin/logger/vo/apierrorlog/ApiErrorLogExportReqVO.java @@ -9,7 +9,7 @@ import java.time.LocalDateTime; import static cn.iocoder.yudao.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND; -@Schema(description = value = "管理后台 - API 错误日志 Excel 导出 Request VO", description = "参数和 ApiErrorLogPageReqVO 是一致的") +@Schema(description = "管理后台 - API 错误日志 Excel 导出 Request VO,参数和 ApiErrorLogPageReqVO 是一致的") @Data public class ApiErrorLogExportReqVO { diff --git a/yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/controller/admin/redis/vo/RedisKeyValueRespVO.java b/yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/controller/admin/redis/vo/RedisKeyValueRespVO.java index 23a193e85..52075abc1 100644 --- a/yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/controller/admin/redis/vo/RedisKeyValueRespVO.java +++ b/yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/controller/admin/redis/vo/RedisKeyValueRespVO.java @@ -13,7 +13,7 @@ public class RedisKeyValueRespVO { @Schema(description = "c5f6990767804a928f4bb96ca249febf", required = true, example = "String") private String key; - @ApiModelProperty(required = true, example = "String") + @Schema(required = true, example = "String") private String value; } \ No newline at end of file diff --git a/yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/controller/admin/redis/vo/RedisMonitorRespVO.java b/yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/controller/admin/redis/vo/RedisMonitorRespVO.java index 6f708ef68..51a91b23f 100644 --- a/yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/controller/admin/redis/vo/RedisMonitorRespVO.java +++ b/yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/controller/admin/redis/vo/RedisMonitorRespVO.java @@ -15,7 +15,7 @@ import java.util.Properties; @AllArgsConstructor public class RedisMonitorRespVO { - @Schema(description = "Redis info 指令结果", required = true, notes = "具体字段,查看 Redis 文档") + @Schema(description = "Redis info 指令结果,具体字段,查看 Redis 文档", required = true) private Properties info; @Schema(description = "Redis key 数量", required = true, example = "1024") diff --git a/yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/controller/admin/test/TestDemoController.java b/yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/controller/admin/test/TestDemoController.java index bdd32e4b0..8bf3dd3f2 100755 --- a/yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/controller/admin/test/TestDemoController.java +++ b/yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/controller/admin/test/TestDemoController.java @@ -69,7 +69,7 @@ public class TestDemoController { @GetMapping("/list") @Operation(summary = "获得字典类型列表") - @Parameter(name = "ids", description = "编号列表", required = true, example = "1024,2048", dataTypeClass = List.class) + @Parameter(name = "ids", description = "编号列表", required = true, example = "1024,2048") @PreAuthorize("@ss.hasPermission('infra:test-demo:query')") public CommonResult> getTestDemoList(@RequestParam("ids") Collection ids) { List list = testDemoService.getTestDemoList(ids); diff --git a/yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/controller/admin/test/vo/TestDemoBaseVO.java b/yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/controller/admin/test/vo/TestDemoBaseVO.java index 72e3b0a39..fcc5c0761 100755 --- a/yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/controller/admin/test/vo/TestDemoBaseVO.java +++ b/yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/controller/admin/test/vo/TestDemoBaseVO.java @@ -1,8 +1,7 @@ package cn.iocoder.yudao.module.infra.controller.admin.test.vo; +import io.swagger.v3.oas.annotations.media.Schema; import lombok.*; -import java.util.*; -import io.swagger.annotations.*; import javax.validation.constraints.*; /** diff --git a/yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/controller/admin/test/vo/TestDemoCreateReqVO.java b/yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/controller/admin/test/vo/TestDemoCreateReqVO.java index 0432da0c1..2f84f6376 100755 --- a/yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/controller/admin/test/vo/TestDemoCreateReqVO.java +++ b/yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/controller/admin/test/vo/TestDemoCreateReqVO.java @@ -1,7 +1,7 @@ package cn.iocoder.yudao.module.infra.controller.admin.test.vo; +import io.swagger.v3.oas.annotations.media.Schema; import lombok.*; -import io.swagger.annotations.*; @Schema(description = "管理后台 - 字典类型创建 Request VO") @Data diff --git a/yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/controller/admin/test/vo/TestDemoExcelVO.java b/yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/controller/admin/test/vo/TestDemoExcelVO.java index 27a1f21c6..be94c31d7 100755 --- a/yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/controller/admin/test/vo/TestDemoExcelVO.java +++ b/yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/controller/admin/test/vo/TestDemoExcelVO.java @@ -3,8 +3,6 @@ package cn.iocoder.yudao.module.infra.controller.admin.test.vo; import lombok.*; import java.time.LocalDateTime; -import java.util.*; -import io.swagger.annotations.*; import com.alibaba.excel.annotation.ExcelProperty; diff --git a/yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/controller/admin/test/vo/TestDemoExportReqVO.java b/yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/controller/admin/test/vo/TestDemoExportReqVO.java index 39116010e..115d92aef 100755 --- a/yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/controller/admin/test/vo/TestDemoExportReqVO.java +++ b/yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/controller/admin/test/vo/TestDemoExportReqVO.java @@ -9,7 +9,7 @@ import java.time.LocalDateTime; import static cn.iocoder.yudao.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND; -@Schema(description = value = "管理后台 - 字典类型 Excel 导出 Request VO", description = "参数和 TestDemoPageReqVO 是一致的") +@Schema(description = "管理后台 - 字典类型 Excel 导出 Request VO,参数和 TestDemoPageReqVO 是一致的") @Data public class TestDemoExportReqVO { diff --git a/yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/controller/admin/test/vo/TestDemoUpdateReqVO.java b/yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/controller/admin/test/vo/TestDemoUpdateReqVO.java index 53660be02..12765e561 100755 --- a/yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/controller/admin/test/vo/TestDemoUpdateReqVO.java +++ b/yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/controller/admin/test/vo/TestDemoUpdateReqVO.java @@ -1,7 +1,7 @@ package cn.iocoder.yudao.module.infra.controller.admin.test.vo; +import io.swagger.v3.oas.annotations.media.Schema; import lombok.*; -import io.swagger.annotations.*; import javax.validation.constraints.*; @Schema(description = "管理后台 - 字典类型更新 Request VO") diff --git a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/auth/vo/AuthMenuRespVO.java b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/auth/vo/AuthMenuRespVO.java index 86c28fb19..92a419bff 100644 --- a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/auth/vo/AuthMenuRespVO.java +++ b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/auth/vo/AuthMenuRespVO.java @@ -25,13 +25,13 @@ public class AuthMenuRespVO { @Schema(description = "菜单名称", required = true, example = "芋道") private String name; - @Schema(description = "路由地址", example = "post", notes = "仅菜单类型为菜单或者目录时,才需要传") + @Schema(description = "路由地址,仅菜单类型为菜单或者目录时,才需要传", example = "post") private String path; - @Schema(description = "组件路径", example = "system/post/index", notes = "仅菜单类型为菜单时,才需要传") + @Schema(description = "组件路径,仅菜单类型为菜单时,才需要传", example = "system/post/index") private String component; - @Schema(description = "菜单图标", example = "/menu/list", notes = "仅菜单类型为菜单或者目录时,才需要传") + @Schema(description = "菜单图标,仅菜单类型为菜单或者目录时,才需要传", example = "/menu/list") private String icon; @Schema(description = "是否可见", required = true, example = "false") diff --git a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/dept/vo/dept/DeptListReqVO.java b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/dept/vo/dept/DeptListReqVO.java index 822630f5d..ae20e774b 100644 --- a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/dept/vo/dept/DeptListReqVO.java +++ b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/dept/vo/dept/DeptListReqVO.java @@ -8,10 +8,10 @@ import lombok.Data; @Data public class DeptListReqVO { - @Schema(description = "部门名称", example = "芋道", notes = "模糊匹配") + @Schema(description = "部门名称,模糊匹配", example = "芋道") private String name; - @Schema(description = "展示状态", example = "1", notes = "参见 CommonStatusEnum 枚举类") + @Schema(description = "展示状态,参见 CommonStatusEnum 枚举类", example = "1") private Integer status; } \ No newline at end of file diff --git a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/dept/vo/dept/DeptRespVO.java b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/dept/vo/dept/DeptRespVO.java index e61f71a3c..36e977729 100644 --- a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/dept/vo/dept/DeptRespVO.java +++ b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/dept/vo/dept/DeptRespVO.java @@ -15,7 +15,7 @@ public class DeptRespVO extends DeptBaseVO { @Schema(description = "部门编号", required = true, example = "1024") private Long id; - @Schema(description = "状态", required = true, example = "1", notes = "参见 CommonStatusEnum 枚举类") + @Schema(description = "状态,参见 CommonStatusEnum 枚举类", required = true, example = "1") private Integer status; @Schema(description = "创建时间", required = true, example = "时间戳格式") diff --git a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/dict/vo/data/DictDataBaseVO.java b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/dict/vo/data/DictDataBaseVO.java index 7964b3c25..099f21625 100644 --- a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/dict/vo/data/DictDataBaseVO.java +++ b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/dict/vo/data/DictDataBaseVO.java @@ -35,12 +35,12 @@ public class DictDataBaseVO { @Size(max = 100, message = "字典类型长度不能超过100个字符") private String dictType; - @Schema(description = "状态", required = true, example = "1", notes = "见 CommonStatusEnum 枚举") + @Schema(description = "状态,见 CommonStatusEnum 枚举", required = true, example = "1") @NotNull(message = "状态不能为空") // @InEnum(value = CommonStatusEnum.class, message = "修改状态必须是 {value}") private Integer status; - @Schema(description = "颜色类型", example = "default", notes = "default、primary、success、info、warning、danger") + @Schema(description = "颜色类型,default、primary、success、info、warning、danger", example = "default") private String colorType; @Schema(description = "css 样式", example = "btn-visible") private String cssClass; diff --git a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/dict/vo/type/DictTypeBaseVO.java b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/dict/vo/type/DictTypeBaseVO.java index 92fd7e5d7..25c5f1b2f 100644 --- a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/dict/vo/type/DictTypeBaseVO.java +++ b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/dict/vo/type/DictTypeBaseVO.java @@ -19,7 +19,7 @@ public class DictTypeBaseVO { @Size(max = 100, message = "字典类型名称长度不能超过100个字符") private String name; - @Schema(description = "状态", required = true, example = "1", notes = "参见 CommonStatusEnum 枚举类") + @Schema(description = "状态,参见 CommonStatusEnum 枚举类", required = true, example = "1") @NotNull(message = "状态不能为空") private Integer status; diff --git a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/dict/vo/type/DictTypeExportReqVO.java b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/dict/vo/type/DictTypeExportReqVO.java index 10e3f436e..e4d043974 100644 --- a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/dict/vo/type/DictTypeExportReqVO.java +++ b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/dict/vo/type/DictTypeExportReqVO.java @@ -13,13 +13,13 @@ import static cn.iocoder.yudao.framework.common.util.date.DateUtils.FORMAT_YEAR_ @Data public class DictTypeExportReqVO { - @Schema(description = "字典类型名称", example = "芋道", notes = "模糊匹配") + @Schema(description = "字典类型名称,模糊匹配", example = "芋道") private String name; - @Schema(description = "字典类型", example = "sys_common_sex", notes = "模糊匹配") + @Schema(description = "字典类型,模糊匹配", example = "sys_common_sex") private String type; - @Schema(description = "展示状态", example = "1", notes = "参见 CommonStatusEnum 枚举类") + @Schema(description = "展示状态,参见 CommonStatusEnum 枚举类", example = "1") private Integer status; @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND) diff --git a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/dict/vo/type/DictTypePageReqVO.java b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/dict/vo/type/DictTypePageReqVO.java index 06165b792..a7ae4dccf 100644 --- a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/dict/vo/type/DictTypePageReqVO.java +++ b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/dict/vo/type/DictTypePageReqVO.java @@ -17,14 +17,14 @@ import static cn.iocoder.yudao.framework.common.util.date.DateUtils.FORMAT_YEAR_ @EqualsAndHashCode(callSuper = true) public class DictTypePageReqVO extends PageParam { - @Schema(description = "字典类型名称", example = "芋道", notes = "模糊匹配") + @Schema(description = "字典类型名称,模糊匹配", example = "芋道") private String name; - @Schema(description = "字典类型", example = "sys_common_sex", notes = "模糊匹配") + @Schema(description = "字典类型,模糊匹配", example = "sys_common_sex") @Size(max = 100, message = "字典类型类型长度不能超过100个字符") private String type; - @Schema(description = "展示状态", example = "1", notes = "参见 CommonStatusEnum 枚举类") + @Schema(description = "展示状态,参见 CommonStatusEnum 枚举类", example = "1") private Integer status; @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND) diff --git a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/mail/vo/account/MailAccountCreateReqVO.java b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/mail/vo/account/MailAccountCreateReqVO.java index 8585e9d75..6776ad9f7 100644 --- a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/mail/vo/account/MailAccountCreateReqVO.java +++ b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/mail/vo/account/MailAccountCreateReqVO.java @@ -1,11 +1,11 @@ package cn.iocoder.yudao.module.system.controller.admin.mail.vo.account; -import io.swagger.annotations.ApiModel; +import io.swagger.v3.oas.annotations.media.Schema; import lombok.Data; import lombok.EqualsAndHashCode; import lombok.ToString; -@ApiModel("管理后台 - 邮箱账号创建 Request VO") +@Schema(description = "管理后台 - 邮箱账号创建 Request VO") @Data @EqualsAndHashCode(callSuper = true) @ToString(callSuper = true) diff --git a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/mail/vo/log/MailLogBaseVO.java b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/mail/vo/log/MailLogBaseVO.java index 012b7cc3e..5d8b0f578 100755 --- a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/mail/vo/log/MailLogBaseVO.java +++ b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/mail/vo/log/MailLogBaseVO.java @@ -20,7 +20,7 @@ public class MailLogBaseVO { @Schema(description = "用户编号", example = "30883") private Long userId; - @Schema(description = "用户类型", example = "2", notes = "参见 UserTypeEnum 枚举") + @Schema(description = "用户类型,参见 UserTypeEnum 枚举", example = "2" ) private Byte userType; @Schema(description = "接收邮箱地址", required = true, example = "76854@qq.com") @@ -58,7 +58,7 @@ public class MailLogBaseVO { @NotNull(message = "邮件参数不能为空") private Map templateParams; - @Schema(description = "发送状态", required = true, example = "1", notes = "参见 MailSendStatusEnum 枚举") + @Schema(description = "发送状态,参见 MailSendStatusEnum 枚举", required = true, example = "1" ) @NotNull(message = "发送状态不能为空") private Byte sendStatus; diff --git a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/mail/vo/log/MailLogPageReqVO.java b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/mail/vo/log/MailLogPageReqVO.java index b2780976b..ad6938059 100644 --- a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/mail/vo/log/MailLogPageReqVO.java +++ b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/mail/vo/log/MailLogPageReqVO.java @@ -21,10 +21,10 @@ public class MailLogPageReqVO extends PageParam { @Schema(description = "用户编号", example = "30883") private Long userId; - @Schema(description = "用户类型", example = "2", notes = "参见 UserTypeEnum 枚举") + @Schema(description = "用户类型,参见 UserTypeEnum 枚举", example = "2" ) private Integer userType; - @Schema(description = "接收邮箱地址", example = "76854@qq.com", notes = "模糊匹配") + @Schema(description = "接收邮箱地址,模糊匹配", example = "76854@qq.com" ) private String toMail; @Schema(description = "邮箱账号编号", example = "18107") @@ -33,7 +33,7 @@ public class MailLogPageReqVO extends PageParam { @Schema(description = "模板编号", example = "5678") private Long templateId; - @Schema(description = "发送状态", example = "1", notes = "参见 MailSendStatusEnum 枚举") + @Schema(description = "发送状态,参见 MailSendStatusEnum 枚举", example = "1" ) private Integer sendStatus; @Schema(description = "发送时间") diff --git a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/mail/vo/template/MailTemplateBaseVO.java b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/mail/vo/template/MailTemplateBaseVO.java index 2d2208822..5bc0797dd 100644 --- a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/mail/vo/template/MailTemplateBaseVO.java +++ b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/mail/vo/template/MailTemplateBaseVO.java @@ -36,7 +36,7 @@ public class MailTemplateBaseVO { @NotEmpty(message = "内容不能为空") private String content; - @Schema(description = "状态", required = true, example = "1", notes = "参见 CommonStatusEnum 枚举") + @Schema(description = "状态,参见 CommonStatusEnum 枚举", required = true, example = "1" ) @NotNull(message = "状态不能为空") private Integer status; diff --git a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/mail/vo/template/MailTemplateCreateReqVO.java b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/mail/vo/template/MailTemplateCreateReqVO.java index 6eab6e9ab..b8b47e3b2 100644 --- a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/mail/vo/template/MailTemplateCreateReqVO.java +++ b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/mail/vo/template/MailTemplateCreateReqVO.java @@ -1,11 +1,11 @@ package cn.iocoder.yudao.module.system.controller.admin.mail.vo.template; -import io.swagger.annotations.ApiModel; +import io.swagger.v3.oas.annotations.media.Schema; import lombok.Data; import lombok.EqualsAndHashCode; import lombok.ToString; -@ApiModel("管理后台 - 邮件模版创建 Request VO") +@Schema(description = "管理后台 - 邮件模版创建 Request VO") @Data @EqualsAndHashCode(callSuper = true) @ToString(callSuper = true) diff --git a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/mail/vo/template/MailTemplatePageReqVO.java b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/mail/vo/template/MailTemplatePageReqVO.java index 95a67a125..037f37fa5 100644 --- a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/mail/vo/template/MailTemplatePageReqVO.java +++ b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/mail/vo/template/MailTemplatePageReqVO.java @@ -18,13 +18,13 @@ import static cn.iocoder.yudao.framework.common.util.date.DateUtils.FORMAT_YEAR_ @ToString(callSuper = true) public class MailTemplatePageReqVO extends PageParam { - @Schema(description = "状态", example = "1", notes = "参见 CommonStatusEnum 枚举") + @Schema(description = "状态,参见 CommonStatusEnum 枚举", example = "1") private Integer status; - @Schema(description = "标识", example = "code_1024", notes = "模糊匹配") + @Schema(description = "标识,模糊匹配", example = "code_1024") private String code; - @Schema(description = "名称", example = "芋头", notes = "模糊匹配") + @Schema(description = "名称,模糊匹配", example = "芋头") private String name; @Schema(description = "账号编号", example = "2048") diff --git a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/notice/vo/NoticeBaseVO.java b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/notice/vo/NoticeBaseVO.java index f661318cf..75f013764 100644 --- a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/notice/vo/NoticeBaseVO.java +++ b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/notice/vo/NoticeBaseVO.java @@ -26,7 +26,7 @@ public class NoticeBaseVO { @Schema(description = "公告内容", required = true, example = "半生编码") private String content; - @Schema(description = "状态", required = true, example = "1", notes = "参见 CommonStatusEnum 枚举类") + @Schema(description = "状态,参见 CommonStatusEnum 枚举类", required = true, example = "1") private Integer status; } \ No newline at end of file diff --git a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/notice/vo/NoticeCreateReqVO.java b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/notice/vo/NoticeCreateReqVO.java index 49e671ce1..211f4f0cf 100644 --- a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/notice/vo/NoticeCreateReqVO.java +++ b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/notice/vo/NoticeCreateReqVO.java @@ -1,10 +1,10 @@ package cn.iocoder.yudao.module.system.controller.admin.notice.vo; -import io.swagger.annotations.ApiModel; +import io.swagger.v3.oas.annotations.media.Schema; import lombok.Data; import lombok.EqualsAndHashCode; -@ApiModel("管理后台 - 通知公告创建 Request VO") +@Schema(description = "管理后台 - 通知公告创建 Request VO") @Data @EqualsAndHashCode(callSuper = true) public class NoticeCreateReqVO extends NoticeBaseVO { diff --git a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/notice/vo/NoticePageReqVO.java b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/notice/vo/NoticePageReqVO.java index de87c4795..74b11ab7d 100644 --- a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/notice/vo/NoticePageReqVO.java +++ b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/notice/vo/NoticePageReqVO.java @@ -11,10 +11,10 @@ import lombok.EqualsAndHashCode; @EqualsAndHashCode(callSuper = true) public class NoticePageReqVO extends PageParam { - @Schema(description = "通知公告名称", example = "芋道", notes = "模糊匹配") + @Schema(description = "通知公告名称,模糊匹配", example = "芋道") private String title; - @Schema(description = "展示状态", example = "1", notes = "参见 CommonStatusEnum 枚举类") + @Schema(description = "展示状态,参见 CommonStatusEnum 枚举类", example = "1") private Integer status; } \ No newline at end of file diff --git a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/notify/NotifyMessageController.java b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/notify/NotifyMessageController.java index e9419572f..e34679f37 100644 --- a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/notify/NotifyMessageController.java +++ b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/notify/NotifyMessageController.java @@ -63,7 +63,7 @@ public class NotifyMessageController { @PutMapping("/update-read") @Operation(summary = "标记站内信为已读") - @Parameter(name = "ids", description = "编号列表", required = true, example = "1024,2048", dataTypeClass = List.class) + @Parameter(name = "ids", description = "编号列表", required = true, example = "1024,2048") public CommonResult updateNotifyMessageRead(@RequestParam("ids") List ids) { notifyMessageService.updateNotifyMessageRead(ids, getLoginUserId(), UserTypeEnum.ADMIN.getValue()); return success(Boolean.TRUE); @@ -78,7 +78,7 @@ public class NotifyMessageController { @GetMapping("/get-unread-list") @Operation(summary = "获取当前用户的最新站内信列表,默认 10 条") - @Parameter(name = "size", description = "10", defaultValue = "10") + @Parameter(name = "size", description = "10") public CommonResult> getUnreadNotifyMessageList( @RequestParam(name = "size", defaultValue = "10") Integer size) { List list = notifyMessageService.getUnreadNotifyMessageList( diff --git a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/notify/vo/message/NotifyMessageBaseVO.java b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/notify/vo/message/NotifyMessageBaseVO.java index 7e18ff9d4..e5402e461 100644 --- a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/notify/vo/message/NotifyMessageBaseVO.java +++ b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/notify/vo/message/NotifyMessageBaseVO.java @@ -21,7 +21,7 @@ public class NotifyMessageBaseVO { @NotNull(message = "用户编号不能为空") private Long userId; - @Schema(description = "用户类型", required = true, example = "1", notes = "参见 UserTypeEnum 枚举") + @Schema(description = "用户类型,参见 UserTypeEnum 枚举", required = true, example = "1") @NotNull(message = "用户类型不能为空") private Byte userType; diff --git a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/notify/vo/template/NotifyTemplateBaseVO.java b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/notify/vo/template/NotifyTemplateBaseVO.java index 53e04aa36..3e591feee 100644 --- a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/notify/vo/template/NotifyTemplateBaseVO.java +++ b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/notify/vo/template/NotifyTemplateBaseVO.java @@ -23,7 +23,7 @@ public class NotifyTemplateBaseVO { @NotNull(message = "模版编码不能为空") private String code; - @Schema(description = "模版类型", required = true, example = "1", notes = "对应 system_notify_template_type 字典") + @Schema(description = "模版类型,对应 system_notify_template_type 字典", required = true, example = "1") @NotNull(message = "模版类型不能为空") private Integer type; @@ -35,7 +35,7 @@ public class NotifyTemplateBaseVO { @NotEmpty(message = "模版内容不能为空") private String content; - @Schema(description = "状态", required = true, example = "1", notes = "参见 CommonStatusEnum 枚举") + @Schema(description = "状态,参见 CommonStatusEnum 枚举", required = true, example = "1") @NotNull(message = "状态不能为空") @InEnum(value = CommonStatusEnum.class, message = "状态必须是 {value}") private Integer status; diff --git a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/notify/vo/template/NotifyTemplateCreateReqVO.java b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/notify/vo/template/NotifyTemplateCreateReqVO.java index 6cb91efa0..82572c24b 100644 --- a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/notify/vo/template/NotifyTemplateCreateReqVO.java +++ b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/notify/vo/template/NotifyTemplateCreateReqVO.java @@ -1,11 +1,11 @@ package cn.iocoder.yudao.module.system.controller.admin.notify.vo.template; -import io.swagger.annotations.ApiModel; +import io.swagger.v3.oas.annotations.media.Schema; import lombok.Data; import lombok.EqualsAndHashCode; import lombok.ToString; -@ApiModel("管理后台 - 站内信模版创建 Request VO") +@Schema(description = "管理后台 - 站内信模版创建 Request VO") @Data @EqualsAndHashCode(callSuper = true) @ToString(callSuper = true) diff --git a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/notify/vo/template/NotifyTemplatePageReqVO.java b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/notify/vo/template/NotifyTemplatePageReqVO.java index df439432f..60035474b 100644 --- a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/notify/vo/template/NotifyTemplatePageReqVO.java +++ b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/notify/vo/template/NotifyTemplatePageReqVO.java @@ -24,7 +24,7 @@ public class NotifyTemplatePageReqVO extends PageParam { @Schema(description = "模版名称", example = "我是名称") private String name; - @Schema(description = "状态", example = "1", notes = "参见 CommonStatusEnum 枚举类") + @Schema(description = "状态,参见 CommonStatusEnum 枚举类", example = "1") private Integer status; @Schema(description = "创建时间") diff --git a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/oauth2/OAuth2OpenController.java b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/oauth2/OAuth2OpenController.java index 5c4dc9ade..a94da1728 100644 --- a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/oauth2/OAuth2OpenController.java +++ b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/oauth2/OAuth2OpenController.java @@ -213,7 +213,7 @@ public class OAuth2OpenController { @Parameter(name = "client_id", required = true, description = "客户端编号", example = "tudou"), @Parameter(name = "scope", description = "授权范围", example = "userinfo.read"), // 使用 Map 格式,Spring MVC 暂时不支持这么接收参数 @Parameter(name = "redirect_uri", required = true, description = "重定向 URI", example = "https://www.iocoder.cn"), - @Parameter(name = "auto_approve", required = true, description = "用户是否接受", example = "true", dataTypeClass = Boolean.class), + @Parameter(name = "auto_approve", required = true, description = "用户是否接受", example = "true"), @Parameter(name = "state", example = "1") }) @OperateLog(enable = false) // 避免 Post 请求被记录操作日志 diff --git a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/oauth2/vo/client/OAuth2ClientBaseVO.java b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/oauth2/vo/client/OAuth2ClientBaseVO.java index 83f81ab0d..e90ccaa89 100755 --- a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/oauth2/vo/client/OAuth2ClientBaseVO.java +++ b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/oauth2/vo/client/OAuth2ClientBaseVO.java @@ -38,7 +38,7 @@ public class OAuth2ClientBaseVO { @Schema(description = "应用描述", example = "我是一个应用") private String description; - @Schema(description = "状态", required = true, example = "1", notes = "参见 CommonStatusEnum 枚举") + @Schema(description = "状态,参见 CommonStatusEnum 枚举", required = true, example = "1") @NotNull(message = "状态不能为空") private Integer status; @@ -55,7 +55,7 @@ public class OAuth2ClientBaseVO { private List<@NotEmpty(message = "重定向的 URI 不能为空") @URL(message = "重定向的 URI 格式不正确") String> redirectUris; - @Schema(description = "授权类型", required = true, example = "password", notes = "参见 OAuth2GrantTypeEnum 枚举") + @Schema(description = "授权类型,参见 OAuth2GrantTypeEnum 枚举", required = true, example = "password") @NotNull(message = "授权类型不能为空") private List authorizedGrantTypes; diff --git a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/oauth2/vo/client/OAuth2ClientCreateReqVO.java b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/oauth2/vo/client/OAuth2ClientCreateReqVO.java index bc01a1d3d..033ab9a7e 100755 --- a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/oauth2/vo/client/OAuth2ClientCreateReqVO.java +++ b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/oauth2/vo/client/OAuth2ClientCreateReqVO.java @@ -1,7 +1,7 @@ package cn.iocoder.yudao.module.system.controller.admin.oauth2.vo.client; +import io.swagger.v3.oas.annotations.media.Schema; import lombok.*; -import io.swagger.annotations.*; @Schema(description = "管理后台 - OAuth2 客户端创建 Request VO") @Data diff --git a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/oauth2/vo/client/OAuth2ClientPageReqVO.java b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/oauth2/vo/client/OAuth2ClientPageReqVO.java index 296991e34..1982abedf 100755 --- a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/oauth2/vo/client/OAuth2ClientPageReqVO.java +++ b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/oauth2/vo/client/OAuth2ClientPageReqVO.java @@ -1,7 +1,7 @@ package cn.iocoder.yudao.module.system.controller.admin.oauth2.vo.client; +import io.swagger.v3.oas.annotations.media.Schema; import lombok.*; -import io.swagger.annotations.*; import cn.iocoder.yudao.framework.common.pojo.PageParam; @Schema(description = "管理后台 - OAuth2 客户端分页 Request VO") @@ -10,10 +10,10 @@ import cn.iocoder.yudao.framework.common.pojo.PageParam; @ToString(callSuper = true) public class OAuth2ClientPageReqVO extends PageParam { - @Schema(description = "应用名", example = "土豆", notes = "模糊匹配") + @Schema(description = "应用名,模糊匹配", example = "土豆") private String name; - @Schema(description = "状态", example = "1", notes = "参见 CommonStatusEnum 枚举") + @Schema(description = "状态,参见 CommonStatusEnum 枚举", example = "1") private Integer status; } \ No newline at end of file diff --git a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/oauth2/vo/open/OAuth2OpenAccessTokenRespVO.java b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/oauth2/vo/open/OAuth2OpenAccessTokenRespVO.java index d51285638..8ddd4b2e1 100644 --- a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/oauth2/vo/open/OAuth2OpenAccessTokenRespVO.java +++ b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/oauth2/vo/open/OAuth2OpenAccessTokenRespVO.java @@ -25,11 +25,11 @@ public class OAuth2OpenAccessTokenRespVO { @JsonProperty("token_type") private String tokenType; - @Schema(description = "过期时间", required = true, example = "42430", notes = "单位:秒") + @Schema(description = "过期时间,单位:秒", required = true, example = "42430") @JsonProperty("expires_in") private Long expiresIn; - @Schema(description = "授权范围", example = "user_info", notes = "如果多个授权范围,使用空格分隔") + @Schema(description = "授权范围,如果多个授权范围,使用空格分隔", example = "user_info") private String scope; } \ No newline at end of file diff --git a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/oauth2/vo/open/OAuth2OpenAuthorizeInfoRespVO.java b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/oauth2/vo/open/OAuth2OpenAuthorizeInfoRespVO.java index dfc5e96db..c0132ff07 100644 --- a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/oauth2/vo/open/OAuth2OpenAuthorizeInfoRespVO.java +++ b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/oauth2/vo/open/OAuth2OpenAuthorizeInfoRespVO.java @@ -20,7 +20,7 @@ public class OAuth2OpenAuthorizeInfoRespVO { */ private Client client; - @Schema(description = "scope 的选中信息", required = true, notes = "使用 List 保证有序性,Key 是 scope,Value 为是否选中") + @Schema(description = "scope 的选中信息,使用 List 保证有序性,Key 是 scope,Value 为是否选中", required = true) private List> scopes; @Data diff --git a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/oauth2/vo/open/OAuth2OpenCheckTokenRespVO.java b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/oauth2/vo/open/OAuth2OpenCheckTokenRespVO.java index 066f0ed5a..5d4b0fb8a 100644 --- a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/oauth2/vo/open/OAuth2OpenCheckTokenRespVO.java +++ b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/oauth2/vo/open/OAuth2OpenCheckTokenRespVO.java @@ -18,7 +18,7 @@ public class OAuth2OpenCheckTokenRespVO { @Schema(description = "用户编号", required = true, example = "666") @JsonProperty("user_id") private Long userId; - @Schema(description = "用户类型", required = true, example = "2", notes = "参见 UserTypeEnum 枚举") + @Schema(description = "用户类型,参见 UserTypeEnum 枚举", required = true, example = "2") @JsonProperty("user_type") private Integer userType; @Schema(description = "租户编号", required = true, example = "1024") @@ -34,7 +34,7 @@ public class OAuth2OpenCheckTokenRespVO { @JsonProperty("access_token") private String accessToken; - @Schema(description = "过期时间", required = true, example = "1593092157", notes = "时间戳 / 1000,即单位:秒") + @Schema(description = "过期时间,时间戳 / 1000,即单位:秒", required = true, example = "1593092157") private Long exp; } \ No newline at end of file diff --git a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/oauth2/vo/token/OAuth2AccessTokenPageReqVO.java b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/oauth2/vo/token/OAuth2AccessTokenPageReqVO.java index 4b03b26c4..305ca78d8 100644 --- a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/oauth2/vo/token/OAuth2AccessTokenPageReqVO.java +++ b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/oauth2/vo/token/OAuth2AccessTokenPageReqVO.java @@ -14,7 +14,7 @@ public class OAuth2AccessTokenPageReqVO extends PageParam { @Schema(description = "用户编号", required = true, example = "666") private Long userId; - @Schema(description = "用户类型", required = true, example = "2", notes = "参见 UserTypeEnum 枚举") + @Schema(description = "用户类型,参见 UserTypeEnum 枚举", required = true, example = "2") private Integer userType; @Schema(description = "客户端编号", required = true, example = "2") diff --git a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/oauth2/vo/token/OAuth2AccessTokenRespVO.java b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/oauth2/vo/token/OAuth2AccessTokenRespVO.java index 764da10d1..7a1810948 100644 --- a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/oauth2/vo/token/OAuth2AccessTokenRespVO.java +++ b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/oauth2/vo/token/OAuth2AccessTokenRespVO.java @@ -26,7 +26,7 @@ public class OAuth2AccessTokenRespVO { @Schema(description = "用户编号", required = true, example = "666") private Long userId; - @Schema(description = "用户类型", required = true, example = "2", notes = "参见 UserTypeEnum 枚举") + @Schema(description = "用户类型,参见 UserTypeEnum 枚举", required = true, example = "2") private Integer userType; @Schema(description = "客户端编号", required = true, example = "2") diff --git a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/oauth2/vo/user/OAuth2UserInfoRespVO.java b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/oauth2/vo/user/OAuth2UserInfoRespVO.java index d25d9755a..b155b9341 100644 --- a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/oauth2/vo/user/OAuth2UserInfoRespVO.java +++ b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/oauth2/vo/user/OAuth2UserInfoRespVO.java @@ -28,7 +28,7 @@ public class OAuth2UserInfoRespVO { @Schema(description = "手机号码", example = "15601691300") private String mobile; - @Schema(description = "用户性别", example = "1", notes = "参见 SexEnum 枚举类") + @Schema(description = "用户性别,参见 SexEnum 枚举类", example = "1") private Integer sex; @Schema(description = "用户头像", example = "https://www.iocoder.cn/xxx.png") diff --git a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/oauth2/vo/user/OAuth2UserUpdateReqVO.java b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/oauth2/vo/user/OAuth2UserUpdateReqVO.java index 042560eec..101e0f802 100644 --- a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/oauth2/vo/user/OAuth2UserUpdateReqVO.java +++ b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/oauth2/vo/user/OAuth2UserUpdateReqVO.java @@ -29,7 +29,7 @@ public class OAuth2UserUpdateReqVO { @Length(min = 11, max = 11, message = "手机号长度必须 11 位") private String mobile; - @Schema(description = "用户性别", example = "1", notes = "参见 SexEnum 枚举类") + @Schema(description = "用户性别,参见 SexEnum 枚举类", example = "1") private Integer sex; } \ No newline at end of file diff --git a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/permission/vo/menu/MenuBaseVO.java b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/permission/vo/menu/MenuBaseVO.java index 3fbbe3950..bc7762b65 100644 --- a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/permission/vo/menu/MenuBaseVO.java +++ b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/permission/vo/menu/MenuBaseVO.java @@ -19,11 +19,11 @@ public class MenuBaseVO { @Size(max = 50, message = "菜单名称长度不能超过50个字符") private String name; - @Schema(description = "权限标识", example = "sys:menu:add", notes = "仅菜单类型为按钮时,才需要传递") + @Schema(description = "权限标识,仅菜单类型为按钮时,才需要传递", example = "sys:menu:add") @Size(max = 100) private String permission; - @Schema(description = "类型", required = true, example = "1", notes = "参见 MenuTypeEnum 枚举类") + @Schema(description = "类型,参见 MenuTypeEnum 枚举类", required = true, example = "1") @NotNull(message = "菜单类型不能为空") private Integer type; @@ -35,18 +35,18 @@ public class MenuBaseVO { @NotNull(message = "父菜单 ID 不能为空") private Long parentId; - @Schema(description = "路由地址", example = "post", notes = "仅菜单类型为菜单或者目录时,才需要传") + @Schema(description = "路由地址,仅菜单类型为菜单或者目录时,才需要传", example = "post") @Size(max = 200, message = "路由地址不能超过200个字符") private String path; - @Schema(description = "菜单图标", example = "/menu/list", notes = "仅菜单类型为菜单或者目录时,才需要传") + @Schema(description = "菜单图标,仅菜单类型为菜单或者目录时,才需要传", example = "/menu/list") private String icon; - @Schema(description = "组件路径", example = "system/post/index", notes = "仅菜单类型为菜单时,才需要传") + @Schema(description = "组件路径,仅菜单类型为菜单时,才需要传", example = "system/post/index") @Size(max = 200, message = "组件路径不能超过255个字符") private String component; - @Schema(description = "状态", required = true, example = "1", notes = "见 CommonStatusEnum 枚举") + @Schema(description = "状态,见 CommonStatusEnum 枚举", required = true, example = "1") @NotNull(message = "状态不能为空") private Integer status; diff --git a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/permission/vo/menu/MenuCreateReqVO.java b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/permission/vo/menu/MenuCreateReqVO.java index a793997ff..56721b7fe 100644 --- a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/permission/vo/menu/MenuCreateReqVO.java +++ b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/permission/vo/menu/MenuCreateReqVO.java @@ -1,9 +1,9 @@ package cn.iocoder.yudao.module.system.controller.admin.permission.vo.menu; -import io.swagger.annotations.ApiModel; +import io.swagger.v3.oas.annotations.media.Schema; import lombok.*; -@ApiModel("管理后台 - 菜单创建 Request VO") +@Schema(description = "管理后台 - 菜单创建 Request VO") @Data @EqualsAndHashCode(callSuper = true) public class MenuCreateReqVO extends MenuBaseVO { diff --git a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/permission/vo/menu/MenuListReqVO.java b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/permission/vo/menu/MenuListReqVO.java index 1256e11ec..6378320bb 100644 --- a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/permission/vo/menu/MenuListReqVO.java +++ b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/permission/vo/menu/MenuListReqVO.java @@ -8,10 +8,10 @@ import lombok.Data; @Data public class MenuListReqVO { - @Schema(description = "菜单名称", example = "芋道", notes = "模糊匹配") + @Schema(description = "菜单名称,模糊匹配", example = "芋道") private String name; - @Schema(description = "展示状态", example = "1", notes = "参见 CommonStatusEnum 枚举类") + @Schema(description = "展示状态,参见 CommonStatusEnum 枚举类", example = "1") private Integer status; } \ No newline at end of file diff --git a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/permission/vo/menu/MenuRespVO.java b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/permission/vo/menu/MenuRespVO.java index b9cc62c42..9b5c942a0 100644 --- a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/permission/vo/menu/MenuRespVO.java +++ b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/permission/vo/menu/MenuRespVO.java @@ -19,7 +19,7 @@ public class MenuRespVO extends MenuBaseVO { @Schema(description = "菜单编号", required = true, example = "1024") private Long id; - @Schema(description = "状态", required = true, example = "1", notes = "参见 CommonStatusEnum 枚举类") + @Schema(description = "状态,参见 CommonStatusEnum 枚举类", required = true, example = "1") private Integer status; @Schema(description = "创建时间", required = true, example = "时间戳格式") diff --git a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/permission/vo/menu/MenuSimpleRespVO.java b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/permission/vo/menu/MenuSimpleRespVO.java index 8154ee123..68e00180c 100644 --- a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/permission/vo/menu/MenuSimpleRespVO.java +++ b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/permission/vo/menu/MenuSimpleRespVO.java @@ -23,7 +23,7 @@ public class MenuSimpleRespVO { @Schema(description = "父菜单 ID", required = true, example = "1024") private Long parentId; - @Schema(description = "类型", required = true, example = "1", notes = "参见 MenuTypeEnum 枚举类") + @Schema(description = "类型,参见 MenuTypeEnum 枚举类", required = true, example = "1") private Integer type; } \ No newline at end of file diff --git a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/permission/vo/permission/PermissionAssignRoleDataScopeReqVO.java b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/permission/vo/permission/PermissionAssignRoleDataScopeReqVO.java index 19120ba68..55b69ccd7 100644 --- a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/permission/vo/permission/PermissionAssignRoleDataScopeReqVO.java +++ b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/permission/vo/permission/PermissionAssignRoleDataScopeReqVO.java @@ -16,12 +16,12 @@ public class PermissionAssignRoleDataScopeReqVO { @NotNull(message = "角色编号不能为空") private Long roleId; - @Schema(description = "数据范围", required = true, example = "1", notes = "参见 DataScopeEnum 枚举类") + @Schema(description = "数据范围,参见 DataScopeEnum 枚举类", required = true, example = "1") @NotNull(message = "数据范围不能为空") // TODO 这里要多一个枚举校验 private Integer dataScope; - @Schema(description = "部门编号列表", example = "1,3,5", notes = "只有范围类型为 DEPT_CUSTOM 时,该字段才需要") + @Schema(description = "部门编号列表,只有范围类型为 DEPT_CUSTOM 时,该字段才需要", example = "1,3,5") private Set dataScopeDeptIds = Collections.emptySet(); // 兜底 } \ No newline at end of file diff --git a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/permission/vo/role/RoleExportReqVO.java b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/permission/vo/role/RoleExportReqVO.java index db9b4c61e..567ed0cd6 100644 --- a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/permission/vo/role/RoleExportReqVO.java +++ b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/permission/vo/role/RoleExportReqVO.java @@ -13,13 +13,13 @@ import static cn.iocoder.yudao.framework.common.util.date.DateUtils.FORMAT_YEAR_ @Data public class RoleExportReqVO { - @Schema(description = "角色名称", example = "芋道", notes = "模糊匹配") + @Schema(description = "角色名称,模糊匹配", example = "芋道") private String name; - @Schema(description = "角色标识", example = "yudao", notes = "模糊匹配") + @Schema(description = "角色标识,模糊匹配", example = "yudao") private String code; - @Schema(description = "展示状态", example = "1", notes = "参见 CommonStatusEnum 枚举类") + @Schema(description = "展示状态,参见 CommonStatusEnum 枚举类", example = "1") private Integer status; @Schema(description = "开始时间", example = "[2022-07-01 00:00:00,2022-07-01 23:59:59]") diff --git a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/permission/vo/role/RolePageReqVO.java b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/permission/vo/role/RolePageReqVO.java index 9f99f2b94..b612ad999 100644 --- a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/permission/vo/role/RolePageReqVO.java +++ b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/permission/vo/role/RolePageReqVO.java @@ -16,13 +16,13 @@ import static cn.iocoder.yudao.framework.common.util.date.DateUtils.FORMAT_YEAR_ @EqualsAndHashCode(callSuper = true) public class RolePageReqVO extends PageParam { - @Schema(description = "角色名称", example = "芋道", notes = "模糊匹配") + @Schema(description = "角色名称,模糊匹配", example = "芋道") private String name; - @Schema(description = "角色标识", example = "yudao", notes = "模糊匹配") + @Schema(description = "角色标识,模糊匹配", example = "yudao") private String code; - @Schema(description = "展示状态", example = "1", notes = "参见 CommonStatusEnum 枚举类") + @Schema(description = "展示状态,参见 CommonStatusEnum 枚举类", example = "1") private Integer status; @Schema(description = "开始时间", example = "[2022-07-01 00:00:00,2022-07-01 23:59:59]") diff --git a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/permission/vo/role/RoleRespVO.java b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/permission/vo/role/RoleRespVO.java index accdd21ce..0afea1aed 100644 --- a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/permission/vo/role/RoleRespVO.java +++ b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/permission/vo/role/RoleRespVO.java @@ -20,16 +20,16 @@ public class RoleRespVO extends RoleBaseVO { @Schema(description = "角色编号", required = true, example = "1") private Long id; - @Schema(description = "数据范围", required = true, example = "1", notes = "参见 DataScopeEnum 枚举类") + @Schema(description = "数据范围,参见 DataScopeEnum 枚举类", required = true, example = "1") private Integer dataScope; @Schema(description = "数据范围(指定部门数组)", example = "1") private Set dataScopeDeptIds; - @Schema(description = "状态", required = true, example = "1", notes = "参见 CommonStatusEnum 枚举类") + @Schema(description = "状态,参见 CommonStatusEnum 枚举类", required = true, example = "1") private Integer status; - @Schema(description = "角色类型", required = true, example = "1", notes = "参见 RoleTypeEnum 枚举类") + @Schema(description = "角色类型,参见 RoleTypeEnum 枚举类", required = true, example = "1") private Integer type; @Schema(description = "创建时间", required = true, example = "时间戳格式") diff --git a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/permission/vo/role/RoleUpdateStatusReqVO.java b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/permission/vo/role/RoleUpdateStatusReqVO.java index c4cf97df4..3124308c0 100644 --- a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/permission/vo/role/RoleUpdateStatusReqVO.java +++ b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/permission/vo/role/RoleUpdateStatusReqVO.java @@ -14,7 +14,7 @@ public class RoleUpdateStatusReqVO { @NotNull(message = "角色编号不能为空") private Long id; - @Schema(description = "状态", required = true, example = "1", notes = "见 CommonStatusEnum 枚举") + @Schema(description = "状态,见 CommonStatusEnum 枚举", required = true, example = "1") @NotNull(message = "状态不能为空") // @InEnum(value = CommonStatusEnum.class, message = "修改状态必须是 {value}") private Integer status; diff --git a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/sensitiveword/vo/SensitiveWordBaseVO.java b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/sensitiveword/vo/SensitiveWordBaseVO.java index df8557d3d..bc5b752ba 100644 --- a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/sensitiveword/vo/SensitiveWordBaseVO.java +++ b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/sensitiveword/vo/SensitiveWordBaseVO.java @@ -7,9 +7,9 @@ import javax.validation.constraints.NotNull; import java.util.List; /** -* 敏感词 Base VO,提供给添加、修改、详细的子 VO 使用 -* 如果子 VO 存在差异的字段,请不要添加到这里,影响 Swagger 文档生成 -*/ + * 敏感词 Base VO,提供给添加、修改、详细的子 VO 使用 + * 如果子 VO 存在差异的字段,请不要添加到这里,影响 Swagger 文档生成 + */ @Data public class SensitiveWordBaseVO { @@ -21,7 +21,7 @@ public class SensitiveWordBaseVO { @NotNull(message = "标签不能为空") private List tags; - @Schema(description = "状态", required = true, example = "1", notes = "参见 CommonStatusEnum 枚举类") + @Schema(description = "状态,参见 CommonStatusEnum 枚举类", required = true, example = "1") @NotNull(message = "状态不能为空") private Integer status; diff --git a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/sensitiveword/vo/SensitiveWordCreateReqVO.java b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/sensitiveword/vo/SensitiveWordCreateReqVO.java index bb206652b..2e2e89df5 100644 --- a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/sensitiveword/vo/SensitiveWordCreateReqVO.java +++ b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/sensitiveword/vo/SensitiveWordCreateReqVO.java @@ -1,11 +1,11 @@ package cn.iocoder.yudao.module.system.controller.admin.sensitiveword.vo; -import io.swagger.annotations.ApiModel; +import io.swagger.v3.oas.annotations.media.Schema; import lombok.Data; import lombok.EqualsAndHashCode; import lombok.ToString; -@ApiModel("管理后台 - 敏感词创建 Request VO") +@Schema(description = "管理后台 - 敏感词创建 Request VO") @Data @EqualsAndHashCode(callSuper = true) @ToString(callSuper = true) diff --git a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/sms/vo/channel/SmsChannelCreateReqVO.java b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/sms/vo/channel/SmsChannelCreateReqVO.java index 6cb352677..58b42f4d9 100644 --- a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/sms/vo/channel/SmsChannelCreateReqVO.java +++ b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/sms/vo/channel/SmsChannelCreateReqVO.java @@ -14,7 +14,7 @@ import javax.validation.constraints.NotNull; @ToString(callSuper = true) public class SmsChannelCreateReqVO extends SmsChannelBaseVO { - @Schema(description = "渠道编码", required = true, example = "YUN_PIAN", notes = "参见 SmsChannelEnum 枚举类") + @Schema(description = "渠道编码,参见 SmsChannelEnum 枚举类", required = true, example = "YUN_PIAN" ) @NotNull(message = "渠道编码不能为空") private String code; diff --git a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/sms/vo/channel/SmsChannelPageReqVO.java b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/sms/vo/channel/SmsChannelPageReqVO.java index 475aebce6..18e4f96a3 100644 --- a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/sms/vo/channel/SmsChannelPageReqVO.java +++ b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/sms/vo/channel/SmsChannelPageReqVO.java @@ -21,7 +21,7 @@ public class SmsChannelPageReqVO extends PageParam { @Schema(description = "任务状态", example = "1") private Integer status; - @Schema(description = "短信签名", example = "芋道源码", notes = "模糊匹配") + @Schema(description = "短信签名,模糊匹配", example = "芋道源码" ) private String signature; @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND) diff --git a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/sms/vo/channel/SmsChannelRespVO.java b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/sms/vo/channel/SmsChannelRespVO.java index 87e0bc85b..5b9ea72f4 100644 --- a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/sms/vo/channel/SmsChannelRespVO.java +++ b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/sms/vo/channel/SmsChannelRespVO.java @@ -17,7 +17,7 @@ public class SmsChannelRespVO extends SmsChannelBaseVO { @Schema(description = "编号", required = true, example = "1024") private Long id; - @Schema(description = "渠道编码", required = true, example = "YUN_PIAN", notes = "参见 SmsChannelEnum 枚举类") + @Schema(description = "渠道编码,参见 SmsChannelEnum 枚举类", required = true, example = "YUN_PIAN" ) private String code; @Schema(description = "创建时间", required = true) diff --git a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/sms/vo/channel/SmsChannelSimpleRespVO.java b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/sms/vo/channel/SmsChannelSimpleRespVO.java index cfc42e879..4c59f2a61 100644 --- a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/sms/vo/channel/SmsChannelSimpleRespVO.java +++ b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/sms/vo/channel/SmsChannelSimpleRespVO.java @@ -18,7 +18,7 @@ public class SmsChannelSimpleRespVO { @NotNull(message = "短信签名不能为空") private String signature; - @Schema(description = "渠道编码", required = true, example = "YUN_PIAN", notes = "参见 SmsChannelEnum 枚举类") + @Schema(description = "渠道编码,参见 SmsChannelEnum 枚举类", required = true, example = "YUN_PIAN" ) private String code; } \ No newline at end of file diff --git a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/sms/vo/template/SmsTemplateBaseVO.java b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/sms/vo/template/SmsTemplateBaseVO.java index 01a187847..d3e4b0db9 100644 --- a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/sms/vo/template/SmsTemplateBaseVO.java +++ b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/sms/vo/template/SmsTemplateBaseVO.java @@ -12,11 +12,11 @@ import javax.validation.constraints.NotNull; @Data public class SmsTemplateBaseVO { - @Schema(description = "短信类型", required = true, example = "1", notes = "参见 SmsTemplateTypeEnum 枚举类") + @Schema(description = "短信类型,参见 SmsTemplateTypeEnum 枚举类", required = true, example = "1" ) @NotNull(message = "短信类型不能为空") private Integer type; - @Schema(description = "开启状态", required = true, example = "1", notes = "参见 CommonStatusEnum 枚举类") + @Schema(description = "开启状态,参见 CommonStatusEnum 枚举类", required = true, example = "1" ) @NotNull(message = "开启状态不能为空") private Integer status; diff --git a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/sms/vo/template/SmsTemplateCreateReqVO.java b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/sms/vo/template/SmsTemplateCreateReqVO.java index ab8b89ebd..069ebb127 100644 --- a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/sms/vo/template/SmsTemplateCreateReqVO.java +++ b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/sms/vo/template/SmsTemplateCreateReqVO.java @@ -1,11 +1,11 @@ package cn.iocoder.yudao.module.system.controller.admin.sms.vo.template; -import io.swagger.annotations.ApiModel; +import io.swagger.v3.oas.annotations.media.Schema; import lombok.Data; import lombok.EqualsAndHashCode; import lombok.ToString; -@ApiModel("管理后台 - 短信模板创建 Request VO") +@Schema(description = "管理后台 - 短信模板创建 Request VO") @Data @EqualsAndHashCode(callSuper = true) @ToString(callSuper = true) diff --git a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/socail/vo/SocialUserBindReqVO.java b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/socail/vo/SocialUserBindReqVO.java index 5d33789d8..5129895c5 100644 --- a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/socail/vo/SocialUserBindReqVO.java +++ b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/socail/vo/SocialUserBindReqVO.java @@ -19,7 +19,7 @@ import javax.validation.constraints.NotNull; @Builder public class SocialUserBindReqVO { - @Schema(description = "社交平台的类型", required = true, example = "10", notes = "参见 UserSocialTypeEnum 枚举值") + @Schema(description = "社交平台的类型,参见 UserSocialTypeEnum 枚举值", required = true, example = "10" ) @InEnum(SocialTypeEnum.class) @NotNull(message = "社交平台的类型不能为空") private Integer type; diff --git a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/tenant/vo/packages/TenantPackageCreateReqVO.java b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/tenant/vo/packages/TenantPackageCreateReqVO.java index 2290e5ca6..255971447 100755 --- a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/tenant/vo/packages/TenantPackageCreateReqVO.java +++ b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/tenant/vo/packages/TenantPackageCreateReqVO.java @@ -1,11 +1,11 @@ package cn.iocoder.yudao.module.system.controller.admin.tenant.vo.packages; -import io.swagger.annotations.ApiModel; +import io.swagger.v3.oas.annotations.media.Schema; import lombok.Data; import lombok.EqualsAndHashCode; import lombok.ToString; -@ApiModel("管理后台 - 租户套餐创建 Request VO") +@Schema(description = "管理后台 - 租户套餐创建 Request VO") @Data @EqualsAndHashCode(callSuper = true) @ToString(callSuper = true) diff --git a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/tenant/vo/packages/TenantPackageUpdateReqVO.java b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/tenant/vo/packages/TenantPackageUpdateReqVO.java index ec907430c..0e1f46b71 100755 --- a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/tenant/vo/packages/TenantPackageUpdateReqVO.java +++ b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/tenant/vo/packages/TenantPackageUpdateReqVO.java @@ -1,8 +1,7 @@ package cn.iocoder.yudao.module.system.controller.admin.tenant.vo.packages; +import io.swagger.v3.oas.annotations.media.Schema; import lombok.*; -import java.util.*; -import io.swagger.annotations.*; import javax.validation.constraints.*; @Schema(description = "管理后台 - 租户套餐更新 Request VO") diff --git a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/user/vo/user/UserBaseVO.java b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/user/vo/user/UserBaseVO.java index fe4218bd4..7b862e50b 100644 --- a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/user/vo/user/UserBaseVO.java +++ b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/user/vo/user/UserBaseVO.java @@ -45,7 +45,7 @@ public class UserBaseVO { @Mobile private String mobile; - @Schema(description = "用户性别", example = "1", notes = "参见 SexEnum 枚举类") + @Schema(description = "用户性别,参见 SexEnum 枚举类", example = "1") private Integer sex; @Schema(description = "用户头像", example = "https://www.iocoder.cn/xxx.png") From cca9807a4e262196b3586ab6eb0daedf1bd9ee8f Mon Sep 17 00:00:00 2001 From: gaibu <1016771049@qq.com> Date: Fri, 10 Feb 2023 10:47:43 +0800 Subject: [PATCH 04/10] =?UTF-8?q?feat:=20=E4=BB=A3=E7=A0=81=E5=90=88?= =?UTF-8?q?=E5=B9=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../yudao/module/system/api/social/SocialUserApi.java | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/yudao-module-system/yudao-module-system-api/src/main/java/cn/iocoder/yudao/module/system/api/social/SocialUserApi.java b/yudao-module-system/yudao-module-system-api/src/main/java/cn/iocoder/yudao/module/system/api/social/SocialUserApi.java index c49131ad7..00432635f 100644 --- a/yudao-module-system/yudao-module-system-api/src/main/java/cn/iocoder/yudao/module/system/api/social/SocialUserApi.java +++ b/yudao-module-system/yudao-module-system-api/src/main/java/cn/iocoder/yudao/module/system/api/social/SocialUserApi.java @@ -19,7 +19,7 @@ public interface SocialUserApi { String PREFIX = ApiConstants.PREFIX + "/social-user"; - @GetMapping("/get-authorize-url") + @GetMapping("PREFIX + /get-authorize-url") @Operation(summary = "获得社交平台的授权 URL") @Parameters({ @Parameter(name = "type", description = "社交平台的类型", example = "1", required = true), @@ -28,15 +28,15 @@ public interface SocialUserApi { CommonResult getAuthorizeUrl(@RequestParam("type") Integer type, @RequestParam("redirectUri") String redirectUri); - @PostMapping("/bind") + @PostMapping("PREFIX + /bind") @Operation(summary = "绑定社交用户") CommonResult bindSocialUser(@Valid @RequestBody SocialUserBindReqDTO reqDTO); - @DeleteMapping("/unbind") + @DeleteMapping("PREFIX + /unbind") @Operation(summary = "取消绑定社交用户") CommonResult unbindSocialUser(@Valid @RequestBody SocialUserUnbindReqDTO reqDTO); - @GetMapping("/get-bind-user-id") + @GetMapping("PREFIX + /get-bind-user-id") @Operation(summary = "获得社交用户的绑定用户编号") @Parameters({ @Parameter(name = "userType", description = "用户类型", example = "2", required = true), From e28d73a76cdd9d91d52b37d311672d27ff6c29a6 Mon Sep 17 00:00:00 2001 From: gaibu <1016771049@qq.com> Date: Fri, 10 Feb 2023 15:42:01 +0800 Subject: [PATCH 05/10] =?UTF-8?q?feat:=20=E4=B8=B4=E6=97=B6=E6=8F=90?= =?UTF-8?q?=E4=BA=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- yudao-dependencies/pom.xml | 11 +++--- yudao-framework/yudao-common/pom.xml | 4 +-- .../yudao-spring-boot-starter-web/pom.xml | 14 +++----- ...ot.autoconfigure.AutoConfiguration.imports | 3 +- yudao-gateway/pom.xml | 22 ++++++++---- .../config/SpringDocConfiguration.java | 35 +++++++++++++++++++ .../yudao-module-infra-api/pom.xml | 6 +--- .../module/infra/InfraServerApplication.java | 4 ++- .../yudao-module-system-api/pom.xml | 6 +--- .../system/api/errorcode/ErrorCodeApi.java | 2 +- .../module/system/api/tenant/TenantApi.java | 2 +- .../system/api/user/AdminUserApiImpl.java | 8 ++--- .../controller/admin/user/UserController.java | 6 ++-- 13 files changed, 78 insertions(+), 45 deletions(-) create mode 100644 yudao-gateway/src/main/java/cn/iocoder/yudao/gateway/config/SpringDocConfiguration.java diff --git a/yudao-dependencies/pom.xml b/yudao-dependencies/pom.xml index 3c3e70b1b..a8e4ec365 100644 --- a/yudao-dependencies/pom.xml +++ b/yudao-dependencies/pom.xml @@ -199,14 +199,15 @@ - com.github.xiaoymin - knife4j-openapi3-spring-boot-starter - ${knife4j.version} + org.springdoc + springdoc-openapi-webflux-ui + 1.6.14 + org.springdoc - springdoc-openapi-ui - ${springdoc.version} + springdoc-openapi-webmvc-core + 1.6.14 diff --git a/yudao-framework/yudao-common/pom.xml b/yudao-framework/yudao-common/pom.xml index 77638edd6..06a793ec8 100644 --- a/yudao-framework/yudao-common/pom.xml +++ b/yudao-framework/yudao-common/pom.xml @@ -60,8 +60,8 @@ org.springdoc - springdoc-openapi-ui - provided + springdoc-openapi-webmvc-core + compile diff --git a/yudao-framework/yudao-spring-boot-starter-web/pom.xml b/yudao-framework/yudao-spring-boot-starter-web/pom.xml index 91a1d7c56..d397a66c1 100644 --- a/yudao-framework/yudao-spring-boot-starter-web/pom.xml +++ b/yudao-framework/yudao-spring-boot-starter-web/pom.xml @@ -21,6 +21,11 @@ yudao-common + + org.springdoc + springdoc-openapi-webmvc-core + + org.springframework.boot @@ -33,15 +38,6 @@ true - - com.github.xiaoymin - knife4j-openapi3-spring-boot-starter - - - org.springdoc - springdoc-openapi-ui - - org.springframework.boot spring-boot-starter-validation diff --git a/yudao-framework/yudao-spring-boot-starter-web/src/main/resources/META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports b/yudao-framework/yudao-spring-boot-starter-web/src/main/resources/META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports index 93b2afc3a..5e14783a4 100644 --- a/yudao-framework/yudao-spring-boot-starter-web/src/main/resources/META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports +++ b/yudao-framework/yudao-spring-boot-starter-web/src/main/resources/META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports @@ -1,6 +1,5 @@ cn.iocoder.yudao.framework.apilog.config.YudaoApiLogAutoConfiguration cn.iocoder.yudao.framework.jackson.config.YudaoJacksonAutoConfiguration -com.github.xiaoymin.knife4j.spring.configuration.Knife4jAutoConfiguration cn.iocoder.yudao.framework.swagger.config.YudaoSwaggerAutoConfiguration cn.iocoder.yudao.framework.web.config.YudaoWebAutoConfiguration -cn.iocoder.yudao.framework.xss.config.YudaoXssAutoConfiguration +cn.iocoder.yudao.framework.apilog.config.YudaoApiLogRpcAutoConfiguration diff --git a/yudao-gateway/pom.xml b/yudao-gateway/pom.xml index a2e13af96..2b1b27e69 100644 --- a/yudao-gateway/pom.xml +++ b/yudao-gateway/pom.xml @@ -1,7 +1,7 @@ + xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> yudao cn.iocoder.cloud @@ -26,11 +26,23 @@ cn.iocoder.cloud yudao-spring-boot-starter-banner + + + org.springdoc + springdoc-openapi-webmvc-core + + cn.iocoder.cloud yudao-module-system-api ${revision} + + + org.springdoc + springdoc-openapi-webmvc-core + + @@ -44,13 +56,9 @@ javax.servlet-api - - com.github.xiaoymin - knife4j-openapi3-spring-boot-starter - org.springdoc - springdoc-openapi-ui + springdoc-openapi-webflux-ui diff --git a/yudao-gateway/src/main/java/cn/iocoder/yudao/gateway/config/SpringDocConfiguration.java b/yudao-gateway/src/main/java/cn/iocoder/yudao/gateway/config/SpringDocConfiguration.java new file mode 100644 index 000000000..ea54f01de --- /dev/null +++ b/yudao-gateway/src/main/java/cn/iocoder/yudao/gateway/config/SpringDocConfiguration.java @@ -0,0 +1,35 @@ +package cn.iocoder.yudao.gateway.config; + +import lombok.extern.slf4j.Slf4j; +import org.springdoc.core.GroupedOpenApi; +import org.springframework.cloud.gateway.route.RouteDefinition; +import org.springframework.cloud.gateway.route.RouteDefinitionLocator; +import org.springframework.context.annotation.Bean; +import org.springframework.context.annotation.Configuration; +import org.springframework.context.annotation.Lazy; + +import java.util.ArrayList; +import java.util.List; + +@Slf4j +@Configuration +public class SpringDocConfiguration { + private static final String SERVER_NAME_SUFFIX = "-api"; + + @Bean + @Lazy(false) + public List apis(RouteDefinitionLocator locator) { + List groups = new ArrayList<>(); + List definitions = locator.getRouteDefinitions().collectList().block(); + for (RouteDefinition definition : definitions) { + log.info("id: " + definition.getId() + " " + definition.getUri().toString()); + } + definitions.stream() + .filter(routeDefinition -> routeDefinition.getId().matches(".*"+SERVER_NAME_SUFFIX)) + .forEach(routeDefinition -> { + String name = routeDefinition.getId().replaceAll(SERVER_NAME_SUFFIX, ""); + GroupedOpenApi.builder().pathsToMatch("/" + name + "/**").group(name).build(); + }); + return groups; + } +} diff --git a/yudao-module-infra/yudao-module-infra-api/pom.xml b/yudao-module-infra/yudao-module-infra-api/pom.xml index 86fcbd037..2765503d8 100644 --- a/yudao-module-infra/yudao-module-infra-api/pom.xml +++ b/yudao-module-infra/yudao-module-infra-api/pom.xml @@ -23,13 +23,9 @@ - - com.github.xiaoymin - knife4j-openapi3-spring-boot-starter - org.springdoc - springdoc-openapi-ui + springdoc-openapi-webmvc-core diff --git a/yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/InfraServerApplication.java b/yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/InfraServerApplication.java index 6e4f4d0bc..17a1a4950 100644 --- a/yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/InfraServerApplication.java +++ b/yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/InfraServerApplication.java @@ -1,11 +1,13 @@ package cn.iocoder.yudao.module.infra; +import io.swagger.v3.oas.annotations.OpenAPIDefinition; +import io.swagger.v3.oas.annotations.info.Info; import org.springframework.boot.SpringApplication; import org.springframework.boot.autoconfigure.SpringBootApplication; /** * 项目的启动类 - * + *

* 如果你碰到启动的问题,请认真阅读 https://cloud.iocoder.cn/quick-start/ 文章 * 如果你碰到启动的问题,请认真阅读 https://cloud.iocoder.cn/quick-start/ 文章 * 如果你碰到启动的问题,请认真阅读 https://cloud.iocoder.cn/quick-start/ 文章 diff --git a/yudao-module-system/yudao-module-system-api/pom.xml b/yudao-module-system/yudao-module-system-api/pom.xml index fafb194c0..1dab1e188 100644 --- a/yudao-module-system/yudao-module-system-api/pom.xml +++ b/yudao-module-system/yudao-module-system-api/pom.xml @@ -23,13 +23,9 @@ - - com.github.xiaoymin - knife4j-openapi3-spring-boot-starter - org.springdoc - springdoc-openapi-ui + springdoc-openapi-webmvc-core diff --git a/yudao-module-system/yudao-module-system-api/src/main/java/cn/iocoder/yudao/module/system/api/errorcode/ErrorCodeApi.java b/yudao-module-system/yudao-module-system-api/src/main/java/cn/iocoder/yudao/module/system/api/errorcode/ErrorCodeApi.java index 9280ff538..202fee02a 100644 --- a/yudao-module-system/yudao-module-system-api/src/main/java/cn/iocoder/yudao/module/system/api/errorcode/ErrorCodeApi.java +++ b/yudao-module-system/yudao-module-system-api/src/main/java/cn/iocoder/yudao/module/system/api/errorcode/ErrorCodeApi.java @@ -27,7 +27,7 @@ public interface ErrorCodeApi { @PostMapping(PREFIX + "/auto-generate") @Operation(summary = "自动创建错误码") - CommonResult autoGenerateErrorCodes(@Valid @RequestBody List autoGenerateDTOs); + CommonResult autoGenerateErrorCodeList(@Valid @RequestBody List autoGenerateDTOs); @GetMapping(PREFIX + "/list") @Operation(summary = "增量获得错误码数组", description = "如果 minUpdateTime 为空时,则获取所有错误码") diff --git a/yudao-module-system/yudao-module-system-api/src/main/java/cn/iocoder/yudao/module/system/api/tenant/TenantApi.java b/yudao-module-system/yudao-module-system-api/src/main/java/cn/iocoder/yudao/module/system/api/tenant/TenantApi.java index cefe6f70c..213926392 100644 --- a/yudao-module-system/yudao-module-system-api/src/main/java/cn/iocoder/yudao/module/system/api/tenant/TenantApi.java +++ b/yudao-module-system/yudao-module-system-api/src/main/java/cn/iocoder/yudao/module/system/api/tenant/TenantApi.java @@ -19,7 +19,7 @@ public interface TenantApi { @GetMapping(PREFIX + "/id-list") @Operation(summary = "获得所有租户编号") - CommonResult> getTenantIds(); + CommonResult> getTenantIdList(); @GetMapping(PREFIX + "/valid") @Operation(summary = "校验租户是否合法") diff --git a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/api/user/AdminUserApiImpl.java b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/api/user/AdminUserApiImpl.java index eb9adba11..3745263c8 100644 --- a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/api/user/AdminUserApiImpl.java +++ b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/api/user/AdminUserApiImpl.java @@ -33,25 +33,25 @@ public class AdminUserApiImpl implements AdminUserApi { } @Override - public CommonResult> getUserList(Collection ids) { + public CommonResult> getUsers(Collection ids) { List users = userService.getUserList(ids); return success(UserConvert.INSTANCE.convertList4(users)); } @Override - public CommonResult> getUserListByDeptIds(Collection deptIds) { + public CommonResult> getUsersByDeptIds(Collection deptIds) { List users = userService.getUserListByDeptIds(deptIds); return success(UserConvert.INSTANCE.convertList4(users)); } @Override - public CommonResult> getUserListByPostIds(Collection postIds) { + public CommonResult> getUsersByPostIds(Collection postIds) { List users = userService.getUserListByPostIds(postIds); return success(UserConvert.INSTANCE.convertList4(users)); } @Override - public CommonResult validUserList(Set ids) { + public CommonResult validUsers(Set ids) { userService.validateUserList(ids); return success(true); } diff --git a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/user/UserController.java b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/user/UserController.java index 05a90f528..7cf54ac25 100644 --- a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/user/UserController.java +++ b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/user/UserController.java @@ -113,7 +113,7 @@ public class UserController { @Operation(summary = "获取用户精简信息列表", description = "只包含被开启的用户,主要用于前端的下拉选项") public CommonResult> getSimpleUsers() { // 获用户门列表,只要开启状态的 - List list = userService.getUsersByStatus(CommonStatusEnum.ENABLE.getStatus()); + List list = userService.getUserListByStatus(CommonStatusEnum.ENABLE.getStatus()); // 排序后,返回给前端 return success(UserConvert.INSTANCE.convertList04(list)); } @@ -133,7 +133,7 @@ public class UserController { public void exportUsers(@Validated UserExportReqVO reqVO, HttpServletResponse response) throws IOException { // 获得用户列表 - List users = userService.getUsers(reqVO); + List users = userService.getUserList(reqVO); // 获得拼接需要的数据 Collection deptIds = convertList(users, AdminUserDO::getDeptId); @@ -183,7 +183,7 @@ public class UserController { public CommonResult importExcel(@RequestParam("file") MultipartFile file, @RequestParam(value = "updateSupport", required = false, defaultValue = "false") Boolean updateSupport) throws Exception { List list = ExcelUtils.read(file, UserImportExcelVO.class); - return success(userService.importUsers(list, updateSupport)); + return success(userService.importUserList(list, updateSupport)); } } \ No newline at end of file From 59c6963f7c65bfced467acea9cd95611c084112b Mon Sep 17 00:00:00 2001 From: YunaiV Date: Sat, 4 Mar 2023 15:05:58 +0800 Subject: [PATCH 06/10] =?UTF-8?q?=E4=BC=98=E5=8C=96=20Swagger=20=E7=9A=84?= =?UTF-8?q?=E7=89=88=E6=9C=AC=E4=BE=9D=E8=B5=96=EF=BC=8C=E9=81=BF=E5=85=8D?= =?UTF-8?q?=E5=86=B2=E7=AA=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- yudao-dependencies/pom.xml | 47 +++++++++++++++---- yudao-framework/yudao-common/pom.xml | 6 +-- .../yudao-spring-boot-starter-web/pom.xml | 21 +++++---- .../bpm/config/BpmSecurityConfiguration.java | 28 ----------- .../config/SecurityConfiguration.java | 6 +-- .../src/main/resources/application.yaml | 15 ++++++ .../yudao-module-infra-api/pom.xml | 5 +- .../module/infra/InfraServerApplication.java | 2 - .../config/SecurityConfiguration.java | 6 +-- .../src/main/resources/application.yaml | 15 ++++++ .../config/SecurityConfiguration.java | 6 +-- .../src/main/resources/application.yaml | 15 ++++++ .../yudao-module-system-api/pom.xml | 5 +- .../module/system/api/user/AdminUserApi.java | 8 ++-- .../system/api/user/AdminUserApiImpl.java | 6 +-- .../config/SecurityConfiguration.java | 6 +-- .../src/main/resources/application.yaml | 15 ++++++ 17 files changed, 135 insertions(+), 77 deletions(-) delete mode 100644 yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/framework/bpm/config/BpmSecurityConfiguration.java diff --git a/yudao-dependencies/pom.xml b/yudao-dependencies/pom.xml index a8e4ec365..0846e47c3 100644 --- a/yudao-dependencies/pom.xml +++ b/yudao-dependencies/pom.xml @@ -16,14 +16,14 @@ 1.6.6-snapshot - 2.7.7 + 2.7.8 2021.0.5 2021.0.4.0 - 4.0.0 - 1.6.8 2.5 + 2.2.8 1.6.14 + 4.0.0 1.2.15 3.5.3.1 @@ -199,15 +199,39 @@ - org.springdoc - springdoc-openapi-webflux-ui - 1.6.14 + io.swagger.core.v3 + swagger-annotations + ${swagger.version} - - org.springdoc + io.swagger.core.v3 + swagger-models + ${swagger.version} + + + org.springdoc + springdoc-openapi-common + ${springdoc.version} + + + org.springdoc springdoc-openapi-webmvc-core - 1.6.14 + ${springdoc.version} + + + org.springdoc + springdoc-openapi-webflux-core + ${springdoc.version} + + + org.springdoc + springdoc-openapi-ui + ${springdoc.version} + + + com.github.xiaoymin + knife4j-openapi3-spring-boot-starter + ${knife4j.version} @@ -216,6 +240,11 @@ yudao-spring-boot-starter-mybatis ${revision} + + org.springdoc + springdoc-openapi-webflux-ui + ${springdoc.version} + com.alibaba diff --git a/yudao-framework/yudao-common/pom.xml b/yudao-framework/yudao-common/pom.xml index 06a793ec8..7fb4c0ac2 100644 --- a/yudao-framework/yudao-common/pom.xml +++ b/yudao-framework/yudao-common/pom.xml @@ -59,9 +59,9 @@ - org.springdoc - springdoc-openapi-webmvc-core - compile + io.swagger.core.v3 + swagger-annotations + provided diff --git a/yudao-framework/yudao-spring-boot-starter-web/pom.xml b/yudao-framework/yudao-spring-boot-starter-web/pom.xml index d397a66c1..0ee38a2b3 100644 --- a/yudao-framework/yudao-spring-boot-starter-web/pom.xml +++ b/yudao-framework/yudao-spring-boot-starter-web/pom.xml @@ -21,9 +21,11 @@ yudao-common + - org.springdoc - springdoc-openapi-webmvc-core + org.springframework.boot + spring-boot-configuration-processor + true @@ -31,12 +33,6 @@ org.springframework.boot spring-boot-starter-web - - - org.springframework.boot - spring-boot-configuration-processor - true - org.springframework.boot @@ -49,6 +45,15 @@ provided + + com.github.xiaoymin + knife4j-openapi3-spring-boot-starter + + + org.springdoc + springdoc-openapi-ui + + cn.iocoder.cloud diff --git a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/framework/bpm/config/BpmSecurityConfiguration.java b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/framework/bpm/config/BpmSecurityConfiguration.java deleted file mode 100644 index 163ecc1db..000000000 --- a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/framework/bpm/config/BpmSecurityConfiguration.java +++ /dev/null @@ -1,28 +0,0 @@ -package cn.iocoder.yudao.module.bpm.framework.bpm.config; - -import cn.iocoder.yudao.framework.security.config.AuthorizeRequestsCustomizer; -import org.springframework.context.annotation.Bean; -import org.springframework.context.annotation.Configuration; -import org.springframework.security.config.annotation.web.builders.HttpSecurity; -import org.springframework.security.config.annotation.web.configurers.ExpressionUrlAuthorizationConfigurer; - -/** - * @author kemengkai - * @create 2022-05-07 08:15 - */ -@Configuration(proxyBeanMethods = false, value = "bpmSecurityConfiguration") -public class BpmSecurityConfiguration { - - @Bean("bpmAuthorizeRequestsCustomizer") - public AuthorizeRequestsCustomizer authorizeRequestsCustomizer() { - return new AuthorizeRequestsCustomizer() { - - @Override - public void customize(ExpressionUrlAuthorizationConfigurer.ExpressionInterceptUrlRegistry registry) { - // 任务回退接口 - registry.antMatchers(buildAdminApi("/bpm/task/back")).permitAll(); - } - - }; - } -} diff --git a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/framework/security/config/SecurityConfiguration.java b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/framework/security/config/SecurityConfiguration.java index 3d4c643b9..b99be6373 100644 --- a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/framework/security/config/SecurityConfiguration.java +++ b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/framework/security/config/SecurityConfiguration.java @@ -21,10 +21,8 @@ public class SecurityConfiguration { public void customize(ExpressionUrlAuthorizationConfigurer.ExpressionInterceptUrlRegistry registry) { // TODO 芋艿:这个每个项目都需要重复配置,得捉摸有没通用的方案 // Swagger 接口文档 - registry.antMatchers("/swagger-ui.html").anonymous() - .antMatchers("/swagger-resources/**").anonymous() - .antMatchers("/webjars/**").anonymous() - .antMatchers("/*/api-docs").anonymous(); + registry.antMatchers("/v3/api-docs/**").permitAll() // 元数据 + .antMatchers("/swagger-ui.html").permitAll(); // Swagger UI // Druid 监控 registry.antMatchers("/druid/**").anonymous(); // Spring Boot Actuator 的安全配置 diff --git a/yudao-module-bpm/yudao-module-bpm-biz/src/main/resources/application.yaml b/yudao-module-bpm/yudao-module-bpm-biz/src/main/resources/application.yaml index a32bbab3d..b876259f5 100644 --- a/yudao-module-bpm/yudao-module-bpm-biz/src/main/resources/application.yaml +++ b/yudao-module-bpm/yudao-module-bpm-biz/src/main/resources/application.yaml @@ -27,6 +27,21 @@ spring: redis: time-to-live: 1h # 设置过期时间为 1 小时 +--- #################### 接口文档配置 #################### + +springdoc: + api-docs: + enabled: true # 1. 是否开启 Swagger 接文档的元数据 + path: /v3/api-docs + swagger-ui: + enabled: true # 2.1 是否开启 Swagger 文档的官方 UI 界面 + path: /swagger-ui.html + +knife4j: + enable: true # 2.2 是否开启 Swagger 文档的 Knife4j UI 界面 + setting: + language: zh_cn + # 工作流 Flowable 配置 flowable: # 1. false: 默认值,Flowable 启动时,对比数据库表中保存的版本,如果不匹配。将抛出异常 diff --git a/yudao-module-infra/yudao-module-infra-api/pom.xml b/yudao-module-infra/yudao-module-infra-api/pom.xml index 2765503d8..fcaf87a02 100644 --- a/yudao-module-infra/yudao-module-infra-api/pom.xml +++ b/yudao-module-infra/yudao-module-infra-api/pom.xml @@ -24,8 +24,9 @@ - org.springdoc - springdoc-openapi-webmvc-core + io.swagger.core.v3 + swagger-annotations + provided diff --git a/yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/InfraServerApplication.java b/yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/InfraServerApplication.java index 17a1a4950..fe3eee495 100644 --- a/yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/InfraServerApplication.java +++ b/yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/InfraServerApplication.java @@ -1,7 +1,5 @@ package cn.iocoder.yudao.module.infra; -import io.swagger.v3.oas.annotations.OpenAPIDefinition; -import io.swagger.v3.oas.annotations.info.Info; import org.springframework.boot.SpringApplication; import org.springframework.boot.autoconfigure.SpringBootApplication; diff --git a/yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/framework/security/config/SecurityConfiguration.java b/yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/framework/security/config/SecurityConfiguration.java index 01ee55124..c5b947e11 100644 --- a/yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/framework/security/config/SecurityConfiguration.java +++ b/yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/framework/security/config/SecurityConfiguration.java @@ -24,10 +24,8 @@ public class SecurityConfiguration { @Override public void customize(ExpressionUrlAuthorizationConfigurer.ExpressionInterceptUrlRegistry registry) { // Swagger 接口文档 - registry.antMatchers("/swagger-ui.html").anonymous() - .antMatchers("/swagger-resources/**").anonymous() - .antMatchers("/webjars/**").anonymous() - .antMatchers("/*/api-docs").anonymous(); + registry.antMatchers("/v3/api-docs/**").permitAll() // 元数据 + .antMatchers("/swagger-ui.html").permitAll(); // Swagger UI // Spring Boot Actuator 的安全配置 registry.antMatchers("/actuator").anonymous() .antMatchers("/actuator/**").anonymous(); diff --git a/yudao-module-infra/yudao-module-infra-biz/src/main/resources/application.yaml b/yudao-module-infra/yudao-module-infra-biz/src/main/resources/application.yaml index a996095e7..3cd28d3f3 100644 --- a/yudao-module-infra/yudao-module-infra-biz/src/main/resources/application.yaml +++ b/yudao-module-infra/yudao-module-infra-biz/src/main/resources/application.yaml @@ -27,6 +27,21 @@ spring: redis: time-to-live: 1h # 设置过期时间为 1 小时 +--- #################### 接口文档配置 #################### + +springdoc: + api-docs: + enabled: true # 1. 是否开启 Swagger 接文档的元数据 + path: /v3/api-docs + swagger-ui: + enabled: true # 2.1 是否开启 Swagger 文档的官方 UI 界面 + path: /swagger-ui.html + +knife4j: + enable: true # 2.2 是否开启 Swagger 文档的 Knife4j UI 界面 + setting: + language: zh_cn + # MyBatis Plus 的配置项 mybatis-plus: configuration: diff --git a/yudao-module-report/yudao-module-report-biz/src/main/java/cn/iocoder/yudao/module/report/framework/security/config/SecurityConfiguration.java b/yudao-module-report/yudao-module-report-biz/src/main/java/cn/iocoder/yudao/module/report/framework/security/config/SecurityConfiguration.java index e481133b8..05b009661 100644 --- a/yudao-module-report/yudao-module-report-biz/src/main/java/cn/iocoder/yudao/module/report/framework/security/config/SecurityConfiguration.java +++ b/yudao-module-report/yudao-module-report-biz/src/main/java/cn/iocoder/yudao/module/report/framework/security/config/SecurityConfiguration.java @@ -19,10 +19,8 @@ public class SecurityConfiguration { @Override public void customize(ExpressionUrlAuthorizationConfigurer.ExpressionInterceptUrlRegistry registry) { // Swagger 接口文档 - registry.antMatchers("/swagger-ui.html").anonymous() - .antMatchers("/swagger-resources/**").anonymous() - .antMatchers("/webjars/**").anonymous() - .antMatchers("/*/api-docs").anonymous(); + registry.antMatchers("/v3/api-docs/**").permitAll() // 元数据 + .antMatchers("/swagger-ui.html").permitAll(); // Swagger UI // Spring Boot Actuator 的安全配置 registry.antMatchers("/actuator").anonymous() .antMatchers("/actuator/**").anonymous(); diff --git a/yudao-module-report/yudao-module-report-biz/src/main/resources/application.yaml b/yudao-module-report/yudao-module-report-biz/src/main/resources/application.yaml index ff1e97b31..5b1e86b0e 100644 --- a/yudao-module-report/yudao-module-report-biz/src/main/resources/application.yaml +++ b/yudao-module-report/yudao-module-report-biz/src/main/resources/application.yaml @@ -27,6 +27,21 @@ spring: redis: time-to-live: 1h # 设置过期时间为 1 小时 +--- #################### 接口文档配置 #################### + +springdoc: + api-docs: + enabled: true # 1. 是否开启 Swagger 接文档的元数据 + path: /v3/api-docs + swagger-ui: + enabled: true # 2.1 是否开启 Swagger 文档的官方 UI 界面 + path: /swagger-ui.html + +knife4j: + enable: true # 2.2 是否开启 Swagger 文档的 Knife4j UI 界面 + setting: + language: zh_cn + # MyBatis Plus 的配置项 mybatis-plus: configuration: diff --git a/yudao-module-system/yudao-module-system-api/pom.xml b/yudao-module-system/yudao-module-system-api/pom.xml index 1dab1e188..dcd4132ed 100644 --- a/yudao-module-system/yudao-module-system-api/pom.xml +++ b/yudao-module-system/yudao-module-system-api/pom.xml @@ -24,8 +24,9 @@ - org.springdoc - springdoc-openapi-webmvc-core + io.swagger.core.v3 + swagger-annotations + provided diff --git a/yudao-module-system/yudao-module-system-api/src/main/java/cn/iocoder/yudao/module/system/api/user/AdminUserApi.java b/yudao-module-system/yudao-module-system-api/src/main/java/cn/iocoder/yudao/module/system/api/user/AdminUserApi.java index 1f57c3929..f84773312 100644 --- a/yudao-module-system/yudao-module-system-api/src/main/java/cn/iocoder/yudao/module/system/api/user/AdminUserApi.java +++ b/yudao-module-system/yudao-module-system-api/src/main/java/cn/iocoder/yudao/module/system/api/user/AdminUserApi.java @@ -35,12 +35,12 @@ public interface AdminUserApi { @GetMapping(PREFIX + "/list-by-dept-id") @Operation(summary = "获得指定部门的用户数组") @Parameter(name = "deptIds", description = "部门编号数组", example = "1,2", required = true) - CommonResult> getUsersByDeptIds(@RequestParam("deptIds") Collection deptIds); + CommonResult> getUserListByDeptIds(@RequestParam("deptIds") Collection deptIds); @GetMapping(PREFIX + "/list-by-post-id") @Operation(summary = "获得指定岗位的用户数组") @Parameter(name = "postIds", description = "岗位编号数组", example = "2,3", required = true) - CommonResult> getUsersByPostIds(@RequestParam("postIds") Collection postIds); + CommonResult> getUserListByPostIds(@RequestParam("postIds") Collection postIds); /** * 获得用户 Map @@ -55,6 +55,6 @@ public interface AdminUserApi { @GetMapping(PREFIX + "/valid") @Operation(summary = "校验用户们是否有效") @Parameter(name = "ids", description = "用户编号数组", example = "3,5", required = true) - CommonResult validUsers(@RequestParam("ids") Set ids); + CommonResult validUserList(@RequestParam("ids") Set ids); -} \ No newline at end of file +} diff --git a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/api/user/AdminUserApiImpl.java b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/api/user/AdminUserApiImpl.java index 3745263c8..5691c682d 100644 --- a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/api/user/AdminUserApiImpl.java +++ b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/api/user/AdminUserApiImpl.java @@ -39,19 +39,19 @@ public class AdminUserApiImpl implements AdminUserApi { } @Override - public CommonResult> getUsersByDeptIds(Collection deptIds) { + public CommonResult> getUserListByDeptIds(Collection deptIds) { List users = userService.getUserListByDeptIds(deptIds); return success(UserConvert.INSTANCE.convertList4(users)); } @Override - public CommonResult> getUsersByPostIds(Collection postIds) { + public CommonResult> getUserListByPostIds(Collection postIds) { List users = userService.getUserListByPostIds(postIds); return success(UserConvert.INSTANCE.convertList4(users)); } @Override - public CommonResult validUsers(Set ids) { + public CommonResult validUserList(Set ids) { userService.validateUserList(ids); return success(true); } diff --git a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/framework/security/config/SecurityConfiguration.java b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/framework/security/config/SecurityConfiguration.java index a3b01afc1..3f0a7ac31 100644 --- a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/framework/security/config/SecurityConfiguration.java +++ b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/framework/security/config/SecurityConfiguration.java @@ -21,10 +21,8 @@ public class SecurityConfiguration { public void customize(ExpressionUrlAuthorizationConfigurer.ExpressionInterceptUrlRegistry registry) { // TODO 芋艿:这个每个项目都需要重复配置,得捉摸有没通用的方案 // Swagger 接口文档 - registry.antMatchers("/swagger-ui.html").anonymous() - .antMatchers("/swagger-resources/**").anonymous() - .antMatchers("/webjars/**").anonymous() - .antMatchers("/*/api-docs").anonymous(); + registry.antMatchers("/v3/api-docs/**").permitAll() // 元数据 + .antMatchers("/swagger-ui.html").permitAll(); // Swagger UI // Druid 监控 registry.antMatchers("/druid/**").anonymous(); // Spring Boot Actuator 的安全配置 diff --git a/yudao-module-system/yudao-module-system-biz/src/main/resources/application.yaml b/yudao-module-system/yudao-module-system-biz/src/main/resources/application.yaml index 647ab0c17..cac51c174 100644 --- a/yudao-module-system/yudao-module-system-biz/src/main/resources/application.yaml +++ b/yudao-module-system/yudao-module-system-biz/src/main/resources/application.yaml @@ -27,6 +27,21 @@ spring: redis: time-to-live: 1h # 设置过期时间为 1 小时 +--- #################### 接口文档配置 #################### + +springdoc: + api-docs: + enabled: true # 1. 是否开启 Swagger 接文档的元数据 + path: /v3/api-docs + swagger-ui: + enabled: true # 2.1 是否开启 Swagger 文档的官方 UI 界面 + path: /swagger-ui.html + +knife4j: + enable: true # 2.2 是否开启 Swagger 文档的 Knife4j UI 界面 + setting: + language: zh_cn + # MyBatis Plus 的配置项 mybatis-plus: configuration: From ec280224a828f05753f106e31cea9c4ed0855e63 Mon Sep 17 00:00:00 2001 From: YunaiV Date: Sat, 4 Mar 2023 15:40:50 +0800 Subject: [PATCH 07/10] =?UTF-8?q?=E5=9F=BA=E4=BA=8E=E8=80=81=E7=89=88?= =?UTF-8?q?=E6=9C=AC=EF=BC=8C=E5=AE=9E=E7=8E=B0=20Spring=20Cloud=20Gateway?= =?UTF-8?q?=20=E6=96=87=E6=A1=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- yudao-gateway/pom.xml | 5 +- .../config/SpringDocConfiguration.java | 35 --- .../yudao/gateway/swagger/SwaggerHandler.java | 108 +++++----- .../gateway/swagger/SwaggerProvider.java | 204 +++++++++--------- .../src/main/resources/application.yaml | 12 +- 5 files changed, 165 insertions(+), 199 deletions(-) delete mode 100644 yudao-gateway/src/main/java/cn/iocoder/yudao/gateway/config/SpringDocConfiguration.java diff --git a/yudao-gateway/pom.xml b/yudao-gateway/pom.xml index 2b1b27e69..cef02f3d9 100644 --- a/yudao-gateway/pom.xml +++ b/yudao-gateway/pom.xml @@ -57,8 +57,9 @@ - org.springdoc - springdoc-openapi-webflux-ui + com.github.xiaoymin + knife4j-spring-boot-starter + 3.0.3 diff --git a/yudao-gateway/src/main/java/cn/iocoder/yudao/gateway/config/SpringDocConfiguration.java b/yudao-gateway/src/main/java/cn/iocoder/yudao/gateway/config/SpringDocConfiguration.java deleted file mode 100644 index ea54f01de..000000000 --- a/yudao-gateway/src/main/java/cn/iocoder/yudao/gateway/config/SpringDocConfiguration.java +++ /dev/null @@ -1,35 +0,0 @@ -package cn.iocoder.yudao.gateway.config; - -import lombok.extern.slf4j.Slf4j; -import org.springdoc.core.GroupedOpenApi; -import org.springframework.cloud.gateway.route.RouteDefinition; -import org.springframework.cloud.gateway.route.RouteDefinitionLocator; -import org.springframework.context.annotation.Bean; -import org.springframework.context.annotation.Configuration; -import org.springframework.context.annotation.Lazy; - -import java.util.ArrayList; -import java.util.List; - -@Slf4j -@Configuration -public class SpringDocConfiguration { - private static final String SERVER_NAME_SUFFIX = "-api"; - - @Bean - @Lazy(false) - public List apis(RouteDefinitionLocator locator) { - List groups = new ArrayList<>(); - List definitions = locator.getRouteDefinitions().collectList().block(); - for (RouteDefinition definition : definitions) { - log.info("id: " + definition.getId() + " " + definition.getUri().toString()); - } - definitions.stream() - .filter(routeDefinition -> routeDefinition.getId().matches(".*"+SERVER_NAME_SUFFIX)) - .forEach(routeDefinition -> { - String name = routeDefinition.getId().replaceAll(SERVER_NAME_SUFFIX, ""); - GroupedOpenApi.builder().pathsToMatch("/" + name + "/**").group(name).build(); - }); - return groups; - } -} diff --git a/yudao-gateway/src/main/java/cn/iocoder/yudao/gateway/swagger/SwaggerHandler.java b/yudao-gateway/src/main/java/cn/iocoder/yudao/gateway/swagger/SwaggerHandler.java index 3b30a4786..7cae3c810 100644 --- a/yudao-gateway/src/main/java/cn/iocoder/yudao/gateway/swagger/SwaggerHandler.java +++ b/yudao-gateway/src/main/java/cn/iocoder/yudao/gateway/swagger/SwaggerHandler.java @@ -1,54 +1,54 @@ -//package cn.iocoder.yudao.gateway.swagger; -// -// -//import org.springframework.beans.factory.annotation.Autowired; -//import org.springframework.http.HttpStatus; -//import org.springframework.http.ResponseEntity; -//import org.springframework.web.bind.annotation.GetMapping; -//import org.springframework.web.bind.annotation.RequestMapping; -//import org.springframework.web.bind.annotation.RestController; -//import reactor.core.publisher.Mono; -//import springfox.documentation.swagger.web.*; -// -//import javax.annotation.Resource; -//import java.util.List; -//import java.util.Optional; -// -///** -// * Swagger Controller -// * -// * @author zxliu -// * @date 2022-10-25 11:24 -// */ -//@RestController -//@RequestMapping("/swagger-resources") -//public class SwaggerHandler { -// -// @Resource -// private SwaggerResourcesProvider swaggerResources; -// -// @SuppressWarnings("SpringJavaAutowiredFieldsWarningInspection") // 只有 @Autowired 可以实现可选注入 -// @Autowired(required = false) -// private SecurityConfiguration securityConfiguration; -// @SuppressWarnings("SpringJavaAutowiredFieldsWarningInspection") // 只有 @Autowired 可以实现可选注入 -// @Autowired(required = false) -// private UiConfiguration uiConfiguration; -// -// @GetMapping("") -// public Mono>> swaggerResources() { -// return Mono.just((new ResponseEntity<>(swaggerResources.get(), HttpStatus.OK))); -// } -// -// @GetMapping("/configuration/security") -// public Mono> securityConfiguration() { -// return Mono.just(new ResponseEntity<>(Optional.ofNullable(securityConfiguration) -// .orElse(SecurityConfigurationBuilder.builder().build()), HttpStatus.OK)); -// } -// -// @GetMapping("/configuration/ui") -// public Mono> uiConfiguration() { -// return Mono.just(new ResponseEntity<>(Optional.ofNullable(uiConfiguration) -// .orElse(UiConfigurationBuilder.builder().build()), HttpStatus.OK)); -// } -// -//} +package cn.iocoder.yudao.gateway.swagger; + + +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.http.HttpStatus; +import org.springframework.http.ResponseEntity; +import org.springframework.web.bind.annotation.GetMapping; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RestController; +import reactor.core.publisher.Mono; +import springfox.documentation.swagger.web.*; + +import javax.annotation.Resource; +import java.util.List; +import java.util.Optional; + +/** + * Swagger Controller + * + * @author zxliu + * @date 2022-10-25 11:24 + */ +@RestController +@RequestMapping("/swagger-resources") +public class SwaggerHandler { + + @Resource + private SwaggerResourcesProvider swaggerResources; + + @SuppressWarnings("SpringJavaAutowiredFieldsWarningInspection") // 只有 @Autowired 可以实现可选注入 + @Autowired(required = false) + private SecurityConfiguration securityConfiguration; + @SuppressWarnings("SpringJavaAutowiredFieldsWarningInspection") // 只有 @Autowired 可以实现可选注入 + @Autowired(required = false) + private UiConfiguration uiConfiguration; + + @GetMapping("") + public Mono>> swaggerResources() { + return Mono.just((new ResponseEntity<>(swaggerResources.get(), HttpStatus.OK))); + } + + @GetMapping("/configuration/security") + public Mono> securityConfiguration() { + return Mono.just(new ResponseEntity<>(Optional.ofNullable(securityConfiguration) + .orElse(SecurityConfigurationBuilder.builder().build()), HttpStatus.OK)); + } + + @GetMapping("/configuration/ui") + public Mono> uiConfiguration() { + return Mono.just(new ResponseEntity<>(Optional.ofNullable(uiConfiguration) + .orElse(UiConfigurationBuilder.builder().build()), HttpStatus.OK)); + } + +} diff --git a/yudao-gateway/src/main/java/cn/iocoder/yudao/gateway/swagger/SwaggerProvider.java b/yudao-gateway/src/main/java/cn/iocoder/yudao/gateway/swagger/SwaggerProvider.java index 8b1cb86a3..03aee0fbc 100644 --- a/yudao-gateway/src/main/java/cn/iocoder/yudao/gateway/swagger/SwaggerProvider.java +++ b/yudao-gateway/src/main/java/cn/iocoder/yudao/gateway/swagger/SwaggerProvider.java @@ -1,102 +1,102 @@ -//package cn.iocoder.yudao.gateway.swagger; -// -//import cn.hutool.core.collection.CollUtil; -//import cn.hutool.core.util.StrUtil; -//import lombok.extern.slf4j.Slf4j; -//import org.springframework.cloud.gateway.config.GatewayProperties; -//import org.springframework.cloud.gateway.handler.predicate.PredicateDefinition; -//import org.springframework.cloud.gateway.route.RouteDefinition; -//import org.springframework.cloud.gateway.support.NameUtils; -//import org.springframework.context.annotation.Primary; -//import org.springframework.stereotype.Component; -//import springfox.documentation.swagger.web.SwaggerResource; -//import springfox.documentation.swagger.web.SwaggerResourcesProvider; -// -//import javax.annotation.Resource; -//import java.util.ArrayList; -//import java.util.HashSet; -//import java.util.List; -//import java.util.Set; -// -///** -// * Swagger 资源的 Provider 实现类 -// * -// * @author zxliu -// * @date 2022-10-25 11:23 -// */ -//@Component -//@Primary -//@Slf4j -//public class SwaggerProvider implements SwaggerResourcesProvider { -// -// @Resource -// private GatewayProperties gatewayProperties; -// -// /** -// * 获得 SwaggerResource 列表 -// * -// * @return SwaggerResource 列表 -// */ -// @Override -// public List get() { -// // 将 RouteDefinition 转换成 SwaggerResource -// List resources = new ArrayList<>(); -// Set serviceNames = new HashSet<>(); // 已处理的服务名,避免重复 -// gatewayProperties.getRoutes().forEach(route -> { -// // 已存在的服务,直接忽略 -// String serviceName = route.getUri().getHost(); -// if (StrUtil.isEmpty(serviceName)) { -// return; -// } -// if (!serviceNames.add(serviceName)) { -// return; -// } -// -// // 获得 Path PredicateDefinition -// String path = getRoutePath(route); -// if (path == null) { -// return; -// } -// -// // 重要:构建最终的 SwaggerResource 对象 -// resources.add(buildSwaggerResource(serviceName, path)); -// }); -// return resources; -// } -// -// private SwaggerResource buildSwaggerResource(String name, String location) { -// SwaggerResource swaggerResource = new SwaggerResource(); -// swaggerResource.setName(name); -// swaggerResource.setLocation(location); -// swaggerResource.setSwaggerVersion("2.0"); -// return swaggerResource; -// } -// -// /** -// * 获得路由的 Path -// * -// * ① 输入: -// * predicates: -// * - Path=/admin-api/system/** -// * ② 输出: -// * /admin-api/system/v2/api-docs -// * -// * @param route 路由 -// * @return 路由 -// */ -// private String getRoutePath(RouteDefinition route) { -// PredicateDefinition pathDefinition = CollUtil.findOne(route.getPredicates(), -// predicateDefinition -> "Path".equals(predicateDefinition.getName())); -// if (pathDefinition == null) { -// log.info("[get][Route({}) 没有 Path 条件,忽略接口文档]", route.getId()); -// return null; -// } -// String path = pathDefinition.getArgs().get(NameUtils.GENERATED_NAME_PREFIX + "0"); -// if (StrUtil.isEmpty(path)) { -// log.info("[get][Route({}) Path 的值为空,忽略接口文档]", route.getId()); -// return null; -// } -// return path.replace("/**", "/v2/api-docs"); -// } -// -//} +package cn.iocoder.yudao.gateway.swagger; + +import cn.hutool.core.collection.CollUtil; +import cn.hutool.core.util.StrUtil; +import lombok.extern.slf4j.Slf4j; +import org.springframework.cloud.gateway.config.GatewayProperties; +import org.springframework.cloud.gateway.handler.predicate.PredicateDefinition; +import org.springframework.cloud.gateway.route.RouteDefinition; +import org.springframework.cloud.gateway.support.NameUtils; +import org.springframework.context.annotation.Primary; +import org.springframework.stereotype.Component; +import springfox.documentation.swagger.web.SwaggerResource; +import springfox.documentation.swagger.web.SwaggerResourcesProvider; + +import javax.annotation.Resource; +import java.util.ArrayList; +import java.util.HashSet; +import java.util.List; +import java.util.Set; + +/** + * Swagger 资源的 Provider 实现类 + * + * @author zxliu + * @since 2022-10-25 11:23 + */ +@Component +@Primary +@Slf4j +public class SwaggerProvider implements SwaggerResourcesProvider { + + @Resource + private GatewayProperties gatewayProperties; + + /** + * 获得 SwaggerResource 列表 + * + * @return SwaggerResource 列表 + */ + @Override + public List get() { + // 将 RouteDefinition 转换成 SwaggerResource + List resources = new ArrayList<>(); + Set serviceNames = new HashSet<>(); // 已处理的服务名,避免重复 + gatewayProperties.getRoutes().forEach(route -> { + // 已存在的服务,直接忽略 + String serviceName = route.getUri().getHost(); + if (StrUtil.isEmpty(serviceName)) { + return; + } + if (!serviceNames.add(serviceName)) { + return; + } + + // 获得 Path PredicateDefinition + String path = getRoutePath(route); + if (path == null) { + return; + } + + // 重要:构建最终的 SwaggerResource 对象 + resources.add(buildSwaggerResource(serviceName, path)); + }); + return resources; + } + + private SwaggerResource buildSwaggerResource(String name, String location) { + SwaggerResource swaggerResource = new SwaggerResource(); + swaggerResource.setName(name); + swaggerResource.setLocation(location); + swaggerResource.setSwaggerVersion("3.0.3"); + return swaggerResource; + } + + /** + * 获得路由的 Path + * + * ① 输入: + * predicates: + * - Path=/admin-api/system/** + * ② 输出: + * /admin-api/system/v3/api-docs + * + * @param route 路由 + * @return 路由 + */ + private String getRoutePath(RouteDefinition route) { + PredicateDefinition pathDefinition = CollUtil.findOne(route.getPredicates(), + predicateDefinition -> "Path".equals(predicateDefinition.getName())); + if (pathDefinition == null) { + log.info("[get][Route({}) 没有 Path 条件,忽略接口文档]", route.getId()); + return null; + } + String path = pathDefinition.getArgs().get(NameUtils.GENERATED_NAME_PREFIX + "0"); + if (StrUtil.isEmpty(path)) { + log.info("[get][Route({}) Path 的值为空,忽略接口文档]", route.getId()); + return null; + } + return path.replace("/**", "/v3/api-docs"); + } + +} diff --git a/yudao-gateway/src/main/resources/application.yaml b/yudao-gateway/src/main/resources/application.yaml index b4be75ede..6a3a6257c 100644 --- a/yudao-gateway/src/main/resources/application.yaml +++ b/yudao-gateway/src/main/resources/application.yaml @@ -12,37 +12,37 @@ spring: predicates: # 断言,作为路由的匹配条件,对应 RouteDefinition 数组 - Path=/admin-api/system/** filters: - - RewritePath=/admin-api/system/v2/api-docs, /v2/api-docs # 配置,保证转发到 /v2/api-docs + - RewritePath=/admin-api/system/v3/api-docs, /v3/api-docs # 配置,保证转发到 /v3/api-docs - id: system-app-api # 路由的编号 uri: grayLb://system-server predicates: # 断言,作为路由的匹配条件,对应 RouteDefinition 数组 - Path=/app-api/system/** filters: - - RewritePath=/app-api/system/v2/api-docs, /v2/api-docs + - RewritePath=/app-api/system/v3/api-docs, /v3/api-docs - id: infra-admin-api # 路由的编号 uri: grayLb://infra-server predicates: # 断言,作为路由的匹配条件,对应 RouteDefinition 数组 - Path=/admin-api/infra/** filters: - - RewritePath=/admin-api/infra/v2/api-docs, /v2/api-docs + - RewritePath=/admin-api/infra/v3/api-docs, /v3/api-docs - id: infra-app-api # 路由的编号 uri: grayLb://infra-server predicates: # 断言,作为路由的匹配条件,对应 RouteDefinition 数组 - Path=/app-api/infra/** filters: - - RewritePath=/app-api/infra/v2/api-docs, /v2/api-docs + - RewritePath=/app-api/infra/v3/api-docs, /v3/api-docs - id: bpm-admin-api # 路由的编号 uri: grayLb://bpm-server predicates: # 断言,作为路由的匹配条件,对应 RouteDefinition 数组 - Path=/admin-api/bpm/** filters: - - RewritePath=/admin-api/bpm/v2/api-docs, /v2/api-docs + - RewritePath=/admin-api/bpm/v3/api-docs, /v3/api-docs - id: report-admin-api # 路由的编号 uri: grayLb://report-server predicates: # 断言,作为路由的匹配条件,对应 RouteDefinition 数组 - Path=/admin-api/report/** filters: - - RewritePath=/admin-api/report/v2/api-docs, /v2/api-docs + - RewritePath=/admin-api/report/v3/api-docs, /v3/api-docs - id: report-jmreport # 路由的编号(积木报表) uri: grayLb://report-server predicates: # 断言,作为路由的匹配条件,对应 RouteDefinition 数组 From 6f7df7e53ea988f9c7dc444c2890a5c81f59a6e1 Mon Sep 17 00:00:00 2001 From: YunaiV Date: Sat, 4 Mar 2023 17:57:58 +0800 Subject: [PATCH 08/10] =?UTF-8?q?=E7=BD=91=E5=85=B3=E6=8E=A5=E5=85=A5?= =?UTF-8?q?=E6=96=B0=E7=9A=84=20Knife4j=20=E7=89=88=E6=9C=AC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- yudao-dependencies/pom.xml | 5 ++ yudao-gateway/pom.xml | 4 +- .../yudao/gateway/swagger/SwaggerHandler.java | 54 ------------------- ...va => SwaggerResourceHandlerFunction.java} | 47 ++++++++-------- .../YudaoSwaggerAutoConfiguration.java | 42 +++++++++++++++ .../src/main/resources/application.yaml | 5 ++ 6 files changed, 79 insertions(+), 78 deletions(-) delete mode 100644 yudao-gateway/src/main/java/cn/iocoder/yudao/gateway/swagger/SwaggerHandler.java rename yudao-gateway/src/main/java/cn/iocoder/yudao/gateway/swagger/{SwaggerProvider.java => SwaggerResourceHandlerFunction.java} (66%) create mode 100644 yudao-gateway/src/main/java/cn/iocoder/yudao/gateway/swagger/YudaoSwaggerAutoConfiguration.java diff --git a/yudao-dependencies/pom.xml b/yudao-dependencies/pom.xml index 0846e47c3..228c99b2f 100644 --- a/yudao-dependencies/pom.xml +++ b/yudao-dependencies/pom.xml @@ -233,6 +233,11 @@ knife4j-openapi3-spring-boot-starter ${knife4j.version} + + com.github.xiaoymin + knife4j-gateway-spring-boot-starter + ${knife4j.version} + diff --git a/yudao-gateway/pom.xml b/yudao-gateway/pom.xml index cef02f3d9..e605770e2 100644 --- a/yudao-gateway/pom.xml +++ b/yudao-gateway/pom.xml @@ -58,8 +58,7 @@ com.github.xiaoymin - knife4j-spring-boot-starter - 3.0.3 + knife4j-gateway-spring-boot-starter @@ -85,7 +84,6 @@ cn.iocoder.cloud yudao-spring-boot-starter-monitor - diff --git a/yudao-gateway/src/main/java/cn/iocoder/yudao/gateway/swagger/SwaggerHandler.java b/yudao-gateway/src/main/java/cn/iocoder/yudao/gateway/swagger/SwaggerHandler.java deleted file mode 100644 index 7cae3c810..000000000 --- a/yudao-gateway/src/main/java/cn/iocoder/yudao/gateway/swagger/SwaggerHandler.java +++ /dev/null @@ -1,54 +0,0 @@ -package cn.iocoder.yudao.gateway.swagger; - - -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.http.HttpStatus; -import org.springframework.http.ResponseEntity; -import org.springframework.web.bind.annotation.GetMapping; -import org.springframework.web.bind.annotation.RequestMapping; -import org.springframework.web.bind.annotation.RestController; -import reactor.core.publisher.Mono; -import springfox.documentation.swagger.web.*; - -import javax.annotation.Resource; -import java.util.List; -import java.util.Optional; - -/** - * Swagger Controller - * - * @author zxliu - * @date 2022-10-25 11:24 - */ -@RestController -@RequestMapping("/swagger-resources") -public class SwaggerHandler { - - @Resource - private SwaggerResourcesProvider swaggerResources; - - @SuppressWarnings("SpringJavaAutowiredFieldsWarningInspection") // 只有 @Autowired 可以实现可选注入 - @Autowired(required = false) - private SecurityConfiguration securityConfiguration; - @SuppressWarnings("SpringJavaAutowiredFieldsWarningInspection") // 只有 @Autowired 可以实现可选注入 - @Autowired(required = false) - private UiConfiguration uiConfiguration; - - @GetMapping("") - public Mono>> swaggerResources() { - return Mono.just((new ResponseEntity<>(swaggerResources.get(), HttpStatus.OK))); - } - - @GetMapping("/configuration/security") - public Mono> securityConfiguration() { - return Mono.just(new ResponseEntity<>(Optional.ofNullable(securityConfiguration) - .orElse(SecurityConfigurationBuilder.builder().build()), HttpStatus.OK)); - } - - @GetMapping("/configuration/ui") - public Mono> uiConfiguration() { - return Mono.just(new ResponseEntity<>(Optional.ofNullable(uiConfiguration) - .orElse(UiConfigurationBuilder.builder().build()), HttpStatus.OK)); - } - -} diff --git a/yudao-gateway/src/main/java/cn/iocoder/yudao/gateway/swagger/SwaggerProvider.java b/yudao-gateway/src/main/java/cn/iocoder/yudao/gateway/swagger/SwaggerResourceHandlerFunction.java similarity index 66% rename from yudao-gateway/src/main/java/cn/iocoder/yudao/gateway/swagger/SwaggerProvider.java rename to yudao-gateway/src/main/java/cn/iocoder/yudao/gateway/swagger/SwaggerResourceHandlerFunction.java index 03aee0fbc..b88a50e2b 100644 --- a/yudao-gateway/src/main/java/cn/iocoder/yudao/gateway/swagger/SwaggerProvider.java +++ b/yudao-gateway/src/main/java/cn/iocoder/yudao/gateway/swagger/SwaggerResourceHandlerFunction.java @@ -2,45 +2,49 @@ package cn.iocoder.yudao.gateway.swagger; import cn.hutool.core.collection.CollUtil; import cn.hutool.core.util.StrUtil; +import lombok.RequiredArgsConstructor; import lombok.extern.slf4j.Slf4j; import org.springframework.cloud.gateway.config.GatewayProperties; import org.springframework.cloud.gateway.handler.predicate.PredicateDefinition; import org.springframework.cloud.gateway.route.RouteDefinition; import org.springframework.cloud.gateway.support.NameUtils; -import org.springframework.context.annotation.Primary; +import org.springframework.http.MediaType; import org.springframework.stereotype.Component; -import springfox.documentation.swagger.web.SwaggerResource; -import springfox.documentation.swagger.web.SwaggerResourcesProvider; +import org.springframework.web.reactive.function.server.HandlerFunction; +import org.springframework.web.reactive.function.server.ServerRequest; +import org.springframework.web.reactive.function.server.ServerResponse; +import reactor.core.publisher.Mono; import javax.annotation.Resource; -import java.util.ArrayList; -import java.util.HashSet; -import java.util.List; -import java.util.Set; +import java.util.*; /** - * Swagger 资源的 Provider 实现类 + * 获得 Swagger 资源的 {@link HandlerFunction} 实现类 * * @author zxliu * @since 2022-10-25 11:23 */ -@Component -@Primary +@RequiredArgsConstructor @Slf4j -public class SwaggerProvider implements SwaggerResourcesProvider { +public class SwaggerResourceHandlerFunction implements HandlerFunction { - @Resource - private GatewayProperties gatewayProperties; + private final GatewayProperties gatewayProperties; + + @Override + public Mono handle(ServerRequest request) { + return ServerResponse.ok() + .contentType(MediaType.APPLICATION_JSON) + .bodyValue(getSwaggerResourceList()); + } /** * 获得 SwaggerResource 列表 * * @return SwaggerResource 列表 */ - @Override - public List get() { + public List> getSwaggerResourceList() { // 将 RouteDefinition 转换成 SwaggerResource - List resources = new ArrayList<>(); + List> resources = new ArrayList<>(); Set serviceNames = new HashSet<>(); // 已处理的服务名,避免重复 gatewayProperties.getRoutes().forEach(route -> { // 已存在的服务,直接忽略 @@ -64,11 +68,12 @@ public class SwaggerProvider implements SwaggerResourcesProvider { return resources; } - private SwaggerResource buildSwaggerResource(String name, String location) { - SwaggerResource swaggerResource = new SwaggerResource(); - swaggerResource.setName(name); - swaggerResource.setLocation(location); - swaggerResource.setSwaggerVersion("3.0.3"); + private Map buildSwaggerResource(String name, String location) { + Map swaggerResource = new HashMap<>(); + swaggerResource.put("name", name); + swaggerResource.put("location", location); + swaggerResource.put("url", location); + swaggerResource.put("swaggerVersion", "3.0.3"); return swaggerResource; } diff --git a/yudao-gateway/src/main/java/cn/iocoder/yudao/gateway/swagger/YudaoSwaggerAutoConfiguration.java b/yudao-gateway/src/main/java/cn/iocoder/yudao/gateway/swagger/YudaoSwaggerAutoConfiguration.java new file mode 100644 index 000000000..313a956f8 --- /dev/null +++ b/yudao-gateway/src/main/java/cn/iocoder/yudao/gateway/swagger/YudaoSwaggerAutoConfiguration.java @@ -0,0 +1,42 @@ +package cn.iocoder.yudao.gateway.swagger; + +import com.github.xiaoymin.knife4j.spring.gateway.configuration.Knife4jGatewayAutoConfiguration; +import lombok.extern.slf4j.Slf4j; +import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty; +import org.springframework.cloud.gateway.config.GatewayProperties; +import org.springframework.context.annotation.Bean; +import org.springframework.context.annotation.Configuration; +import org.springframework.web.reactive.function.server.RouterFunction; +import org.springframework.web.reactive.function.server.RouterFunctions; +import org.springframework.web.reactive.function.server.ServerResponse; + +/** + * 网关 Swagger 接口文档的自动配置类 + * + * 参考 {@link Knife4jGatewayAutoConfiguration} 实现,进行功能的增强,核心实现在 {@link SwaggerResourceHandlerFunction} 类中 + * 它通过解析 spring.cloud.gateway.routes 配置,获得 Swagger 资源分组。 + * + * 另外,目前官方 Knif4j 网关的实现,不会通过注册中心加载对应的 URL 地址。等到他们完善了,就可以去掉自己的这个实现了。 + * + * @see Knife4j + Spring Cloud Gateway 网关聚合 + * + * @author 芋道源码 + */ +@Configuration +@ConditionalOnProperty(name = "knife4j.gateway.enable", havingValue = "true") +@Slf4j +public class YudaoSwaggerAutoConfiguration { + + /** + * Swagger 资源分组 URL + */ + public static final String GATEWAY_SWAGGER_GROUP_URL = "/swagger-resources"; + + @Bean + public RouterFunction swaggerResourceHandlerFunction(GatewayProperties gatewayProperties) { + log.info("[swaggerResourceHandlerFunction][初始化完成]"); + SwaggerResourceHandlerFunction handlerFunction = new SwaggerResourceHandlerFunction(gatewayProperties); + return RouterFunctions.route().GET(GATEWAY_SWAGGER_GROUP_URL, handlerFunction).build(); + } + +} diff --git a/yudao-gateway/src/main/resources/application.yaml b/yudao-gateway/src/main/resources/application.yaml index 6a3a6257c..211dfb596 100644 --- a/yudao-gateway/src/main/resources/application.yaml +++ b/yudao-gateway/src/main/resources/application.yaml @@ -49,3 +49,8 @@ spring: - Path=/jmreport/** x-forwarded: prefix-enabled: false # 避免 Swagger 重复带上额外的 /admin-api/system 前缀 + +knife4j: + # 聚合 Swagger 文档 + gateway: + enable: true From 8048ba92c2107c2dac3cba6a120ff0908283c0d7 Mon Sep 17 00:00:00 2001 From: YunaiV Date: Sat, 4 Mar 2023 21:33:37 +0800 Subject: [PATCH 09/10] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=20swagger=20=E4=B8=80?= =?UTF-8?q?=E7=9B=B4=E6=8A=A5=20favicon.ico=20=E6=89=BE=E4=B8=8D=E5=88=B0?= =?UTF-8?q?=E7=9A=84=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../swagger/SwaggerResourceHandlerFunction.java | 2 -- .../src/main/resources/static/favicon.ico | Bin 0 -> 3708 bytes 2 files changed, 2 deletions(-) create mode 100644 yudao-gateway/src/main/resources/static/favicon.ico diff --git a/yudao-gateway/src/main/java/cn/iocoder/yudao/gateway/swagger/SwaggerResourceHandlerFunction.java b/yudao-gateway/src/main/java/cn/iocoder/yudao/gateway/swagger/SwaggerResourceHandlerFunction.java index b88a50e2b..08bbf2828 100644 --- a/yudao-gateway/src/main/java/cn/iocoder/yudao/gateway/swagger/SwaggerResourceHandlerFunction.java +++ b/yudao-gateway/src/main/java/cn/iocoder/yudao/gateway/swagger/SwaggerResourceHandlerFunction.java @@ -9,13 +9,11 @@ import org.springframework.cloud.gateway.handler.predicate.PredicateDefinition; import org.springframework.cloud.gateway.route.RouteDefinition; import org.springframework.cloud.gateway.support.NameUtils; import org.springframework.http.MediaType; -import org.springframework.stereotype.Component; import org.springframework.web.reactive.function.server.HandlerFunction; import org.springframework.web.reactive.function.server.ServerRequest; import org.springframework.web.reactive.function.server.ServerResponse; import reactor.core.publisher.Mono; -import javax.annotation.Resource; import java.util.*; /** diff --git a/yudao-gateway/src/main/resources/static/favicon.ico b/yudao-gateway/src/main/resources/static/favicon.ico new file mode 100644 index 0000000000000000000000000000000000000000..30053fa0fb7c686ce54e7978243cbf2266a79cde GIT binary patch literal 3708 zcmaJ^_d6So!;DI)p!Q6yQllEHwTW7_#imA3yY{LbYOA95-m!gR(}vhvj8ZFB(V(`X zDC+I|4}9-=?(Vny?Vjf@PDfjX9K;L)0087_s!DqQ-1h(ZfasrkY@{0i01p+_l;jQk z;RogJ$c`Qml4K~hGA;nOY1OGP4w>;eZ^Tt7r(Mz5e7-X0hom1(@ z#@x!}wdAiKQg;@q6kJx!qUbtk-qO8VSLf#DWWvBeofr1u|jBki*c~4~>>I zp?=249crNSczf@G8Stz+ieEFLly@b8`NUG4LfgqiQq4E%<1bMpvT4w^m4f8*1aCT& zS;;bNTBvcxlZr?5^XlK~eK>2AQr66<5;gn(M@gFbS>~%j88g7 zE!$G{r@J<9Lh-YpOs_j#t~4~Ic}x7 zgw31tAFT+11nS~gFZb^27Mvl8@&_zDm1}p3YlLUXvsHxZ=c-x?Yxu=C(n;&g-36%U&r> zv_%xhpSt$6stzsW7q@*bkUzv%d2<(IJm74|zZMp?tFu<))1BrS`H4lteJ ziMj2Ta^PU>uocuO4F>ylx=Z#SrBA?E@S~cwhIE3?N#A796@C*>>z7g&7bTUVFwPTX z2S`k_SH~OzM_t5E=ilDHxJksll-)OgeJ=Ct>3}I+u%JF-Cy)O{L4aOQXfgt*yD7lR zoVOK!rQNn1L?GtW1#JV5rR}bM;bB&|L4z6=#$_-mp3yI-GXb$JcN1iPL%n-55YNN5 zmu|yY?9EjA$sSQqXl%nsw8SkViXGZjPwMu5y~DIiqe)ztxNWGL)&}yjSaV6AqTuWV zETI|pgh{)c2l<)5Nrrn7J^uk}2%nHjyi&a#1oJQVYl=C2KaYI>Me!^DmLZj$#K1EP zsS{d}tjXtW7hveO%q+{p7j9zZK z%5_I;!5+PjiiOwvpmJ1NI;6~sLt{|1)(--0!C7516XRxcdN)VNv#->jC_o=zzM?&7*yY!-52;(Y&>+%BS0YY4$Vjb^>ABz%S!b0CXUYN@Gy#4r$ zaY^XcdM51I^cWXuF&XJ?`*%Wq5Oyiz$EaIIBPWDvkYP+bs(WZ-MF^|dyv7FJgU$}z z>aEZW<&zy%i3j6ECG_?>W@n=GqVHe0h%jOoT>Dj0H73CF%{ydjl?)LGN7{R@Fb|@i zeXyVArj5>3D0%JGIy(K^s6j{QkSDH@5Xq#`tWn1LcbdrD6zTT;_i`cE3LPRF-Di@k z!yp-7k`3`ajbFL*{41LD&RbdEJB(av*}sv**`&iOq&*;W1qYXEAZ4heItsC7#vepw ziB|HqC*8qevRkh;JEl<8WUlOiWc`e9E>|jzV-8qJ_#B6gf?Tt*SO!21{9m@zIJjx% zw3x`2G^X1!FXshn>F{f|z1BL>(ey8fyqZpaFcUhrlX5h`j1{xwJ472ePp*d}IN88*0n(Pn+489rp=iglsZUAHge1hoVqtJ9Rl~OSS{`w zAOJT>(mL$rRl!#@gyu$8Z_mv#=m`TYg8b>4yH#*n=dYF+L2P%;E}58CyYQbty~K{K znst2O=v^iO>nqGi2^)*{P$z(-Q^k~jD^ zyGr~{SWENbo-9Z5@_4{7YK{iH|@u;^AwEUCV4C(SWc zmBInN2$G-C4@=hY<{GKH5Oe>px*ERaJ!_;ClnzmmDR5k4K(-J~Dt16%jn!ikP3lbK zg1_bR#z^jUXgr)#=gIJ%`DZ%&3S~ zu_}rpPtKgHMeZ8(y0(Ys?++;o$ID@T?wS&29E|XspE1bn@9DHDT{EA?hv(%{kjGta zS@yd*@_8aB78D7DF**APa`A958_W+Sr5sBW9bM~w1@(}1@AAsmQKvm9%c>u>BamU; z)qk-?`KtD?yMbG-YeI-#t@AbRl7+AYD}_L?c`W+KL7Bp}YL~vY?=MzT-xf{bv0nt4 zr+O$d7VIt@<+>>H-UkrlS&_m{mZ`F4gaHfIiUYyZP5r)`n{SD^v$Q$F;$j^=U`lgk z4(8lhoIaR^P4aPcG;^5?Ixm=rleHZh^$#1ov4u){=K4^}Wwf!C-FyJ-$_n9sfHtOxyM zJqV0d4eic8cT3fe)!A+r<~l@#H9<~s_k^c5$vjdtpY_pK`F%q7=CtTMT?P9)!_#-3 zU+(@n6MJtk)_)b9c7!Qn#}wVa-$lXzT_=w(Y8s);6=vv+vS8D zQ*l0i)Y9=XDsZ?>GSq~2gZZ^+rL+8u`DTD^Hc#rW#35P5$WgJ$Qqk=)k0m~%wcfiM zaOokyEDfW>51r8Nx%=&c8Xpps+_H(QYE_AqU~hX=v0+oJ4Um(GJ9m`uI?D_Pan`gc zEX#0>Ci2$ubxpKSEzTd9SRFR_pSUd@ccFVazP7MpdN^n6HEv9pEe+7Qv4L2WUFV>8 z5NB4*N0_Hph_yfO1i)Q=cE(itZ;uGkLn-ijxqG*? zGv0hHpSr@hzkqm`gmoeyIoIaT7}g!1sm~H*{fON;^da9KPi^h(IIQuyM|4|tB_3i5 zHLMCMSg%kS#)VnwP+zdRQp7byxH2WRW>|G~Er~5~_>fcXs-{}Znw;B)FnybH>*n+4 z;Lc%9D39Nq_#0eJ=`+w;tvMN$+q)=uq!TrMCtfxSw=li>19;VN86Ylz^n!mO-t+57 zcg{STpR9MWly>A^1SL!@+%3rvkp{kzel!!Qrz+_xxE51xp^*HVx~#5WGkY*vd_4^V z1Ny~y0`F(He@QQHlJ-5@kyHYQ$3THvoV+8v1)XdLr6IGd;&M{BTe}ZR`JnK z*X328lf3OuYjXnK?vPzUKcm#)%tqfy5*$!|{k!(=1tJzJEfMxcF)8K3TlNt0VSh_u z#@|$gZYn}wb)H77m!zfM z3|a@xle!W!NsEc^`}cCRW2A~<`$42g--Fqv2zs&BHz8$K(zA$?UMn=gyQUt#d)++H z%Tvwo`fH;D>Hzn8Ert$|5eCn+p?yE_Zx4%7R#0Xa z3MZ+&b|$Hy4aTVCOo|krAka}j&w{^JWaBpKc!YEIv5cgGfW*h8!hA;T&&M z$E?5WAK7EVXHJm8<>87};Pqe-->@RcP(KcNy1WmWfAJvWpwYz)%d;U7689IHIb4^j z3_G65XY9ZvG^$5I6?8u*&ZW?`_sS0Mx|?~HI1*nh+4w#oIphD+^l1F%MXj;CwcfkL z!6p{p#OE8YK$k~MClD(q|xR=W!_(!u+!wZ z+_FDskw(q~C{~!6UfoVS-znvz*>4#zfiZIqox2oefY4H8>_g+6x}F%)V-mSwKvP3? z1%u`~N6|MMP%RE*^sIjrb8<`dnd{b2&&%R7%7xqWiuqJj?+=&__02MLMq{hSlLE+3 zI7`g2{GCmR{3f6`m~^bpFWyhfJ4#=tVPH4%EzQh=tz!pdu_)|+gJbB9AQb{Q@*gQU R{r4&XYRcM5C Date: Sat, 4 Mar 2023 21:51:09 +0800 Subject: [PATCH 10/10] =?UTF-8?q?=E5=90=88=E5=B9=B6=E6=9C=80=E6=96=B0=20ma?= =?UTF-8?q?ster=20=E4=BB=A3=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../task/vo/task/BpmTaskTodoPageReqVO.java | 12 ++++---- .../admin/auth/vo/AuthMenuRespVO.java | 25 ++++++++--------- .../admin/permission/vo/menu/MenuBaseVO.java | 28 +++++++++---------- 3 files changed, 32 insertions(+), 33 deletions(-) diff --git a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/task/vo/task/BpmTaskTodoPageReqVO.java b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/task/vo/task/BpmTaskTodoPageReqVO.java index f1fb7703f..605007ef5 100644 --- a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/task/vo/task/BpmTaskTodoPageReqVO.java +++ b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/task/vo/task/BpmTaskTodoPageReqVO.java @@ -1,8 +1,8 @@ package cn.iocoder.yudao.module.bpm.controller.admin.task.vo.task; import cn.iocoder.yudao.framework.common.pojo.PageParam; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; +import cn.iocoder.yudao.framework.common.util.date.DateUtils; +import io.swagger.v3.oas.annotations.media.Schema; import lombok.Data; import lombok.EqualsAndHashCode; import lombok.ToString; @@ -12,17 +12,17 @@ import java.time.LocalDateTime; import static cn.iocoder.yudao.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND; -@ApiModel("管理后台 - 流程任务的 TODO 待办的分页 Request VO") +@Schema(description = "管理后台 - 流程任务的 TODO 待办的分页 Request VO") @Data @EqualsAndHashCode(callSuper = true) @ToString(callSuper = true) public class BpmTaskTodoPageReqVO extends PageParam { - @ApiModelProperty(value = "流程任务名", example = "芋道") + @Schema(description = "流程任务名", example = "芋道") private String name; - @ApiModelProperty(value = "创建收间") - @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND) + @Schema(description = "创建时间") + @DateTimeFormat(pattern = DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND) private LocalDateTime[] createTime; } diff --git a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/auth/vo/AuthMenuRespVO.java b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/auth/vo/AuthMenuRespVO.java index abd4f0d8d..9f681de46 100644 --- a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/auth/vo/AuthMenuRespVO.java +++ b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/auth/vo/AuthMenuRespVO.java @@ -1,7 +1,6 @@ package cn.iocoder.yudao.module.system.controller.admin.auth.vo; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; +import io.swagger.v3.oas.annotations.media.Schema; import lombok.AllArgsConstructor; import lombok.Builder; import lombok.Data; @@ -9,41 +8,41 @@ import lombok.NoArgsConstructor; import java.util.List; -@ApiModel("管理后台 - 登录用户的菜单信息 Response VO") +@Schema(description = "管理后台 - 登录用户的菜单信息 Response VO") @Data @NoArgsConstructor @AllArgsConstructor @Builder public class AuthMenuRespVO { - @ApiModelProperty(value = "菜单名称", required = true, example = "芋道") + @Schema(description = "菜单名称", required = true, example = "芋道") private Long id; - @ApiModelProperty(value = "父菜单 ID", required = true, example = "1024") + @Schema(description = "父菜单 ID", required = true, example = "1024") private Long parentId; - @ApiModelProperty(value = "菜单名称", required = true, example = "芋道") + @Schema(description = "菜单名称", required = true, example = "芋道") private String name; - @ApiModelProperty(value = "路由地址", example = "post", notes = "仅菜单类型为菜单或者目录时,才需要传") + @Schema(description = "路由地址,仅菜单类型为菜单或者目录时,才需要传", example = "post") private String path; - @ApiModelProperty(value = "组件路径", example = "system/post/index", notes = "仅菜单类型为菜单时,才需要传") + @Schema(description = "组件路径,仅菜单类型为菜单时,才需要传", example = "system/post/index") private String component; - @ApiModelProperty(value = "组件名", example = "SystemUser") + @Schema(description = "组件名", example = "SystemUser") private String componentName; - @ApiModelProperty(value = "菜单图标", example = "/menu/list", notes = "仅菜单类型为菜单或者目录时,才需要传") + @Schema(description = "菜单图标,仅菜单类型为菜单或者目录时,才需要传", example = "/menu/list") private String icon; - @ApiModelProperty(value = "是否可见", required = true, example = "false") + @Schema(description = "是否可见", required = true, example = "false") private Boolean visible; - @ApiModelProperty(value = "是否缓存", required = true, example = "false") + @Schema(description = "是否缓存", required = true, example = "false") private Boolean keepAlive; - @ApiModelProperty(value = "是否总是显示", example = "false") + @Schema(description = "是否总是显示", example = "false") private Boolean alwaysShow; /** diff --git a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/permission/vo/menu/MenuBaseVO.java b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/permission/vo/menu/MenuBaseVO.java index dc315bcc1..ddaf16c5a 100644 --- a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/permission/vo/menu/MenuBaseVO.java +++ b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/permission/vo/menu/MenuBaseVO.java @@ -1,6 +1,6 @@ package cn.iocoder.yudao.module.system.controller.admin.permission.vo.menu; -import io.swagger.annotations.ApiModelProperty; +import io.swagger.v3.oas.annotations.media.Schema; import lombok.Data; import javax.validation.constraints.NotBlank; @@ -14,52 +14,52 @@ import javax.validation.constraints.Size; @Data public class MenuBaseVO { - @ApiModelProperty(value = "菜单名称", required = true, example = "芋道") + @Schema(description = "菜单名称", required = true, example = "芋道") @NotBlank(message = "菜单名称不能为空") @Size(max = 50, message = "菜单名称长度不能超过50个字符") private String name; - @ApiModelProperty(value = "权限标识", example = "sys:menu:add", notes = "仅菜单类型为按钮时,才需要传递") + @Schema(description = "权限标识,仅菜单类型为按钮时,才需要传递", example = "sys:menu:add") @Size(max = 100) private String permission; - @ApiModelProperty(value = "类型", required = true, example = "1", notes = "参见 MenuTypeEnum 枚举类") + @Schema(description = "类型,参见 MenuTypeEnum 枚举类", required = true, example = "1") @NotNull(message = "菜单类型不能为空") private Integer type; - @ApiModelProperty(value = "显示顺序不能为空", required = true, example = "1024") + @Schema(description = "显示顺序不能为空", required = true, example = "1024") @NotNull(message = "显示顺序不能为空") private Integer sort; - @ApiModelProperty(value = "父菜单 ID", required = true, example = "1024") + @Schema(description = "父菜单 ID", required = true, example = "1024") @NotNull(message = "父菜单 ID 不能为空") private Long parentId; - @ApiModelProperty(value = "路由地址", example = "post", notes = "仅菜单类型为菜单或者目录时,才需要传") + @Schema(description = "路由地址,仅菜单类型为菜单或者目录时,才需要传", example = "post") @Size(max = 200, message = "路由地址不能超过200个字符") private String path; - @ApiModelProperty(value = "菜单图标", example = "/menu/list", notes = "仅菜单类型为菜单或者目录时,才需要传") + @Schema(description = "菜单图标,仅菜单类型为菜单或者目录时,才需要传", example = "/menu/list") private String icon; - @ApiModelProperty(value = "组件路径", example = "system/post/index", notes = "仅菜单类型为菜单时,才需要传") + @Schema(description = "组件路径,仅菜单类型为菜单时,才需要传", example = "system/post/index") @Size(max = 200, message = "组件路径不能超过255个字符") private String component; - @ApiModelProperty(value = "组件名", example = "SystemUser") + @Schema(description = "组件名", example = "SystemUser") private String componentName; - @ApiModelProperty(value = "状态", required = true, example = "1", notes = "见 CommonStatusEnum 枚举") + @Schema(description = "状态,见 CommonStatusEnum 枚举", required = true, example = "1") @NotNull(message = "状态不能为空") private Integer status; - @ApiModelProperty(value = "是否可见", example = "false") + @Schema(description = "是否可见", example = "false") private Boolean visible; - @ApiModelProperty(value = "是否缓存", example = "false") + @Schema(description = "是否缓存", example = "false") private Boolean keepAlive; - @ApiModelProperty(value = "是否总是显示", example = "false") + @Schema(description = "是否总是显示", example = "false") private Boolean alwaysShow; }