diff --git a/yudao-dependencies/pom.xml b/yudao-dependencies/pom.xml index be72292329..6390fefef3 100644 --- a/yudao-dependencies/pom.xml +++ b/yudao-dependencies/pom.xml @@ -18,8 +18,8 @@ 2.7.6 + 1.6.13 3.0.3 - 1.6.8 2.5 1.2.15 @@ -158,28 +158,21 @@ - com.github.xiaoymin - knife4j-spring-boot-starter - ${knife4j.version} - - - mapstruct - org.mapstruct - - - guava - com.google.guava - - - swagger-annotations - io.swagger - - + org.springdoc + springdoc-openapi-webmvc-core + ${springdoc.version} + - io.swagger - swagger-annotations - ${swagger-annotations.version} + org.springdoc + springdoc-openapi-javadoc + ${springdoc.version} + + + + org.springdoc + springdoc-openapi-security + ${springdoc.version} diff --git a/yudao-framework/yudao-common/pom.xml b/yudao-framework/yudao-common/pom.xml index 2ad12ad87e..699fa95280 100644 --- a/yudao-framework/yudao-common/pom.xml +++ b/yudao-framework/yudao-common/pom.xml @@ -59,9 +59,13 @@ - io.swagger - swagger-annotations - provided + org.springdoc + springdoc-openapi-webmvc-core + + + + org.springdoc + springdoc-openapi-javadoc 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 80029703bf..3cb1fc3ada 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(title="分页参数") @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(title = "页码,从 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(title = "每页条数,最大值为 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 dbdeb85baf..655dea1801 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,19 @@ 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(title = "分页结果") @Data public final class PageResult implements Serializable { - @ApiModelProperty(value = "数据", required = true) + @Schema(title = "数据", required = true) private List list; - @ApiModelProperty(value = "总量", required = true) + @Schema(title = "总量", required = true) private Long total; public PageResult() { 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 2f9ecaf8f9..c9a117cb41 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 75819cbe1e..2576a05316 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())) { diff --git a/yudao-framework/yudao-spring-boot-starter-web/pom.xml b/yudao-framework/yudao-spring-boot-starter-web/pom.xml index 8662584e3b..437503a405 100644 --- a/yudao-framework/yudao-spring-boot-starter-web/pom.xml +++ b/yudao-framework/yudao-spring-boot-starter-web/pom.xml @@ -34,17 +34,18 @@ - com.github.xiaoymin - knife4j-spring-boot-starter - - - io.swagger - swagger-annotations + org.springdoc + springdoc-openapi-webmvc-core - org.springframework.boot - spring-boot-starter-validation + org.springdoc + springdoc-openapi-javadoc + + + + org.springdoc + springdoc-openapi-security 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 240f0f284d..01fcb6ed28 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,119 +1,60 @@ 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.ExternalDocumentation; +import io.swagger.v3.oas.models.OpenAPI; +import io.swagger.v3.oas.models.info.Info; +import io.swagger.v3.oas.models.info.License; +import io.swagger.v3.oas.models.security.SecurityRequirement; +import io.swagger.v3.oas.models.security.SecurityScheme; +import org.springdoc.core.GroupedOpenApi; 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.ExampleBuilder; -import springfox.documentation.builders.PathSelectors; -import springfox.documentation.builders.RequestParameterBuilder; -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.EnableSwagger2; - -import java.util.Collections; -import java.util.List; - -import static cn.iocoder.yudao.framework.web.core.util.WebFrameworkUtils.HEADER_TENANT_ID; -import static springfox.documentation.builders.RequestHandlerSelectors.basePackage; /** - * Swagger2 自动配置类 + * Swagger3 自动配置类 * * @author 芋道源码 */ @AutoConfiguration -@EnableSwagger2 -@EnableKnife4j -@ConditionalOnClass({Docket.class, ApiInfoBuilder.class}) +@ConditionalOnClass({OpenAPI.class}) // 允许使用 swagger.enable=false 禁用 Swagger @ConditionalOnProperty(prefix = "yudao.swagger", value = "enable", matchIfMissing = true) @EnableConfigurationProperties(SwaggerProperties.class) public class YudaoSwaggerAutoConfiguration { @Bean - public SpringFoxHandlerProviderBeanPostProcessor springFoxHandlerProviderBeanPostProcessor() { - return new SpringFoxHandlerProviderBeanPostProcessor(); + public OpenAPI createRestApi(SwaggerProperties properties) { + return new OpenAPI() + .info(new Info().title(properties.getTitle()) + .description(properties.getDescription()) + .version(properties.getVersion()) + .license(new License().name("MIT").url("https://gitee.com/zhijiantianya/ruoyi-vue-pro/blob/master/LICENSE"))) + .externalDocs(new ExternalDocumentation() + .description(properties.getDescription()) + .url("https://gitee.com/zhijiantianya/ruoyi-vue-pro")); + } @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) - .globalRequestParameters(globalRequestParameters()); - } - - // ========== apiInfo ========== - - /** - * API 摘要信息 - */ - private static ApiInfo apiInfo(SwaggerProperties properties) { - return new ApiInfoBuilder() - .title(properties.getTitle()) - .description(properties.getDescription()) - .contact(new Contact(properties.getAuthor(), null, null)) - .version(properties.getVersion()) + public GroupedOpenApi publicApi() { + return GroupedOpenApi.builder() + .group("app") + .pathsToMatch("/app/**") .build(); } - // ========== securitySchemes ========== - - /** - * 安全模式,这里配置通过请求头 Authorization 传递 token 参数 - */ - private static List securitySchemes() { - return Collections.singletonList(new ApiKey(HttpHeaders.AUTHORIZATION, "Authorization", "header")); + @Bean + public GroupedOpenApi adminApi() { + return GroupedOpenApi.builder() + .group("admin") + .pathsToMatch("/admin/**") + .build(); } - /** - * 安全上下文 - * - * @see #securitySchemes() - * @see #authorizationScopes() - */ - private static List securityContexts() { - return Collections.singletonList(SecurityContext.builder() - .securityReferences(securityReferences()) - // 通过 PathSelectors.regex("^(?!auth).*$"),排除包含 "auth" 的接口不需要使用securitySchemes - .operationSelector(o -> o.requestMappingPattern().matches("^(?!auth).*$")) - .build()); - } - - private static List securityReferences() { - return Collections.singletonList(new SecurityReference(HttpHeaders.AUTHORIZATION, authorizationScopes())); - } - - private static AuthorizationScope[] authorizationScopes() { - return new AuthorizationScope[]{new AuthorizationScope("global", "accessEverything")}; - } - - // ========== globalRequestParameters ========== - - private static List globalRequestParameters() { - RequestParameterBuilder tenantParameter = new RequestParameterBuilder() - .name(HEADER_TENANT_ID).description("租户编号") - .in(ParameterType.HEADER).example(new ExampleBuilder().value(1L).build()); - return Collections.singletonList(tenantParameter.build()); - } } 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 c9d178ac8f..4eea3cc36c 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,43 +1,43 @@ -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.WebFluxRequestHandlerProvider; -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 || bean instanceof WebFluxRequestHandlerProvider) { - 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.WebFluxRequestHandlerProvider; +//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 || bean instanceof WebFluxRequestHandlerProvider) { +// 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-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 217067f313..e5b6f2ceb1 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,14 +62,14 @@ 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); 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 3dd0a0a4d2..9156c42557 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,8 +87,8 @@ 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); 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 ebcaad05b3..e77e0bd6d4 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,8 +49,8 @@ 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); 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 3e946707a5..d730626a61 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,14 +42,14 @@ 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); 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 4267f09027..5e7a54b85c 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()); 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 11fee5c00f..3345adb522 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,6 @@ 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.*; /** @@ -11,15 +10,15 @@ import javax.validation.constraints.*; @Data public class BpmFormBaseVO { - @ApiModelProperty(value = "表单名称", required = true, example = "芋道") + @Schema(title = "表单名称", required = true, example = "芋道") @NotNull(message = "表单名称不能为空") private String name; - @ApiModelProperty(value = "表单状态", required = true, notes = "参见 CommonStatusEnum 枚举", example = "1") + @Schema(title = "表单状态", required = true, description = "参见 CommonStatusEnum 枚举", example = "1") @NotNull(message = "表单状态不能为空") private Integer status; - @ApiModelProperty(value = "备注", example = "我是备注") + @Schema(title = "备注", example = "我是备注") private String remark; } 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 d9a6281258..ce3410ced2 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,22 +1,21 @@ 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; -@ApiModel("管理后台 - 动态表单创建 Request VO") +@Schema(title = "管理后台 - 动态表单创建 Request VO") @Data @EqualsAndHashCode(callSuper = true) @ToString(callSuper = true) public class BpmFormCreateReqVO extends BpmFormBaseVO { - @ApiModelProperty(value = "表单的配置", required = true, notes = "JSON 字符串") + @Schema(title = "表单的配置", required = true, description = "JSON 字符串") @NotNull(message = "表单的配置不能为空") private String conf; - @ApiModelProperty(value = "表单项的数组", required = true, notes = "JSON 字符串的数组") + @Schema(title = "表单项的数组", required = true, description = "JSON 字符串的数组") @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/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 a8097c4372..87adc3f63d 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,18 @@ 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 lombok.Data; import lombok.EqualsAndHashCode; import lombok.ToString; -@ApiModel("管理后台 - 动态表单分页 Request VO") +@Schema(title = "管理后台 - 动态表单分页 Request VO") @Data @EqualsAndHashCode(callSuper = true) @ToString(callSuper = true) public class BpmFormPageReqVO extends PageParam { - @ApiModelProperty(value = "表单名称", example = "芋道") + @Schema(title = "表单名称", example = "芋道") private String name; } 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 e49f09879d..b93b660128 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,5 @@ 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 lombok.Data; import lombok.EqualsAndHashCode; import lombok.ToString; @@ -10,24 +8,24 @@ import javax.validation.constraints.NotNull; import java.time.LocalDateTime; import java.util.List; -@ApiModel("管理后台 - 动态表单 Response VO") +@Schema(title = "管理后台 - 动态表单 Response VO") @Data @EqualsAndHashCode(callSuper = true) @ToString(callSuper = true) public class BpmFormRespVO extends BpmFormBaseVO { - @ApiModelProperty(value = "表单编号", required = true, example = "1024") + @Schema(title = "表单编号", required = true, example = "1024") private Long id; - @ApiModelProperty(value = "表单的配置", required = true, notes = "JSON 字符串") + @Schema(title = "表单的配置", required = true, description = "JSON 字符串") @NotNull(message = "表单的配置不能为空") private String conf; - @ApiModelProperty(value = "表单项的数组", required = true, notes = "JSON 字符串的数组") + @Schema(title = "表单项的数组", required = true, description = "JSON 字符串的数组") @NotNull(message = "表单项的数组不能为空") private List fields; - @ApiModelProperty(value = "创建时间", required = true) + @Schema(title = "创建时间", required = true) private LocalDateTime createTime; } 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 3a6b3c0932..9764a9835c 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,16 @@ 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 lombok.Data; -@ApiModel("管理后台 - 流程表单精简 Response VO") +@Schema(title = "管理后台 - 流程表单精简 Response VO") @Data public class BpmFormSimpleRespVO { - @ApiModelProperty(value = "表单编号", required = true, example = "1024") + @Schema(title = "表单编号", required = true, example = "1024") private Long id; - @ApiModelProperty(value = "表单名称", required = true, example = "芋道") + @Schema(title = "表单名称", required = true, example = "芋道") private String name; } 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 55b9976798..641e57617f 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,25 +1,24 @@ 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; -@ApiModel("管理后台 - 动态表单更新 Request VO") +@Schema(title = "管理后台 - 动态表单更新 Request VO") @Data @EqualsAndHashCode(callSuper = true) @ToString(callSuper = true) public class BpmFormUpdateReqVO extends BpmFormBaseVO { - @ApiModelProperty(value = "表单编号", required = true, example = "1024") + @Schema(title = "表单编号", required = true, example = "1024") @NotNull(message = "表单编号不能为空") private Long id; - @ApiModelProperty(value = "表单的配置", required = true, notes = "JSON 字符串") + @Schema(title = "表单的配置", required = true, description = "JSON 字符串") @NotNull(message = "表单的配置不能为空") private String conf; - @ApiModelProperty(value = "表单项的数组", required = true, notes = "JSON 字符串的数组") + @Schema(title = "表单项的数组", required = true, description = "JSON 字符串的数组") @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 e0dfe568e4..b82f6d1d5b 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,7 @@ 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.*; /** @@ -12,19 +11,19 @@ import javax.validation.constraints.*; @Data public class BpmUserGroupBaseVO { - @ApiModelProperty(value = "组名", required = true, example = "芋道") + @Schema(title = "组名", required = true, example = "芋道") @NotNull(message = "组名不能为空") private String name; - @ApiModelProperty(value = "描述", required = true, example = "芋道源码") + @Schema(title = "描述", required = true, example = "芋道源码") @NotNull(message = "描述不能为空") private String description; - @ApiModelProperty(value = "成员编号数组", required = true, example = "1,2,3") + @Schema(title = "成员编号数组", required = true, example = "1,2,3") @NotNull(message = "成员编号数组不能为空") private Set memberUserIds; - @ApiModelProperty(value = "状态", required = true, example = "1") + @Schema(title = "状态", 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/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 48b44d38b7..7509746a70 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,9 +1,8 @@ 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.*; -@ApiModel("管理后台 - 用户组创建 Request VO") +@Schema(title = "管理后台 - 用户组创建 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/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 2608607bfe..c5d417131e 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,7 @@ 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 lombok.Data; import lombok.EqualsAndHashCode; import lombok.ToString; @@ -11,20 +10,20 @@ import org.springframework.format.annotation.DateTimeFormat; import java.time.LocalDateTime; -@ApiModel("管理后台 - 用户组分页 Request VO") +@Schema(title = "管理后台 - 用户组分页 Request VO") @Data @EqualsAndHashCode(callSuper = true) @ToString(callSuper = true) public class BpmUserGroupPageReqVO extends PageParam { - @ApiModelProperty(value = "组名", example = "芋道") + @Schema(title = "组名", example = "芋道") private String name; - @ApiModelProperty(value = "状态", example = "1") + @Schema(title = "状态", example = "1") private Integer status; @DateTimeFormat(pattern = DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND) - @ApiModelProperty(value = "创建时间") + @Schema(title = "创建时间") private LocalDateTime[] createTime; } 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 b3d4693f3c..e7399d2284 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,21 +1,20 @@ 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 io.swagger.annotations.*; -@ApiModel("管理后台 - 用户组 Response VO") +@Schema(title = "管理后台 - 用户组 Response VO") @Data @EqualsAndHashCode(callSuper = true) @ToString(callSuper = true) public class BpmUserGroupRespVO extends BpmUserGroupBaseVO { - @ApiModelProperty(value = "编号", required = true, example = "1024") + @Schema(title = "编号", required = true, example = "1024") private Long id; - @ApiModelProperty(value = "创建时间", required = true) + @Schema(title = "创建时间", required = true) private LocalDateTime createTime; } 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 0b47f447e3..785e9e571e 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,20 @@ 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 lombok.AllArgsConstructor; import lombok.Data; import lombok.NoArgsConstructor; -@ApiModel("管理后台 - 用户组精简信息 Response VO") +@Schema(title = "管理后台 - 用户组精简信息 Response VO") @Data @NoArgsConstructor @AllArgsConstructor public class BpmUserGroupSimpleRespVO { - @ApiModelProperty(value = "用户组编号", required = true, example = "1024") + @Schema(title = "用户组编号", required = true, example = "1024") private Long id; - @ApiModelProperty(value = "用户组名字", required = true, example = "芋道") + @Schema(title = "用户组名字", required = true, example = "芋道") private String name; } 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 14aa25c5b5..88846644f9 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,16 +1,15 @@ 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.*; -@ApiModel("管理后台 - 用户组更新 Request VO") +@Schema(title = "管理后台 - 用户组更新 Request VO") @Data @EqualsAndHashCode(callSuper = true) @ToString(callSuper = true) public class BpmUserGroupUpdateReqVO extends BpmUserGroupBaseVO { - @ApiModelProperty(value = "编号", required = true, example = "1024") + @Schema(title = "编号", required = true, example = "1024") @NotNull(message = "编号不能为空") private Long id; 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 7240ba15c3..79771bfcbd 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,6 @@ 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 lombok.Data; import lombok.EqualsAndHashCode; import lombok.ToString; @@ -9,13 +8,13 @@ import org.springframework.web.multipart.MultipartFile; import javax.validation.constraints.NotNull; -@ApiModel(value = "管理后台 - 流程模型的导入 Request VO", description = "相比流程模型的新建来说,只是多了一个 bpmnFile 文件") +@Schema(title = "管理后台 - 流程模型的导入 Request VO", description = "相比流程模型的新建来说,只是多了一个 bpmnFile 文件") @Data @EqualsAndHashCode(callSuper = true) @ToString(callSuper = true) public class BpmModeImportReqVO extends BpmModelCreateReqVO { - @ApiModelProperty(value = "BPMN 文件", required = true) + @Schema(title = "BPMN 文件", required = true) @NotNull(message = "BPMN 文件不能为空") private MultipartFile bpmnFile; 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 542a177e48..639967286f 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,5 @@ 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 +11,30 @@ import javax.validation.constraints.NotEmpty; @Data public class BpmModelBaseVO { - @ApiModelProperty(value = "流程标识", required = true, example = "process_yudao") + @Schema(title = "流程标识", required = true, example = "process_yudao") @NotEmpty(message = "流程标识不能为空") private String key; - @ApiModelProperty(value = "流程名称", required = true, example = "芋道") + @Schema(title = "流程名称", required = true, example = "芋道") @NotEmpty(message = "流程名称不能为空") private String name; - @ApiModelProperty(value = "流程描述", example = "我是描述") + @Schema(title = "流程描述", example = "我是描述") private String description; - @ApiModelProperty(value = "流程分类", notes = "参见 bpm_model_category 数据字典", example = "1") + @Schema(title = "流程分类", description = "参见 bpm_model_category 数据字典", example = "1") @NotEmpty(message = "流程分类不能为空") private String category; - @ApiModelProperty(value = "表单类型", notes = "参见 bpm_model_form_type 数据字典", example = "1") + @Schema(title = "表单类型", description = "参见 bpm_model_form_type 数据字典", example = "1") private Integer formType; - @ApiModelProperty(value = "表单编号", example = "1024", notes = "在表单类型为 {@link BpmModelFormTypeEnum#CUSTOM} 时,必须非空") + @Schema(title = "表单编号", example = "1024", description = "在表单类型为 {@link BpmModelFormTypeEnum#CUSTOM} 时,必须非空") private Long formId; - @ApiModelProperty(value = "自定义表单的提交路径,使用 Vue 的路由地址", example = "/bpm/oa/leave/create", - notes = "在表单类型为 {@link BpmModelFormTypeEnum#CUSTOM} 时,必须非空") + @Schema(title = "自定义表单的提交路径,使用 Vue 的路由地址", example = "/bpm/oa/leave/create", + description = "在表单类型为 {@link BpmModelFormTypeEnum#CUSTOM} 时,必须非空") private String formCustomCreatePath; - @ApiModelProperty(value = "自定义表单的查看路径,使用 Vue 的路由地址", example = "/bpm/oa/leave/view", - notes = "在表单类型为 {@link BpmModelFormTypeEnum#CUSTOM} 时,必须非空") + @Schema(title = "自定义表单的查看路径,使用 Vue 的路由地址", example = "/bpm/oa/leave/view", + description = "在表单类型为 {@link BpmModelFormTypeEnum#CUSTOM} 时,必须非空") private String formCustomViewPath; } 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 c85ef3ae40..d100b744f4 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,25 @@ 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 lombok.Data; import lombok.EqualsAndHashCode; import lombok.ToString; import javax.validation.constraints.NotEmpty; -@ApiModel("管理后台 - 流程模型的创建 Request VO") +@Schema(title = "管理后台 - 流程模型的创建 Request VO") @Data public class BpmModelCreateReqVO { - @ApiModelProperty(value = "流程标识", required = true, example = "process_yudao") + @Schema(title = "流程标识", required = true, example = "process_yudao") @NotEmpty(message = "流程标识不能为空") private String key; - @ApiModelProperty(value = "流程名称", required = true, example = "芋道") + @Schema(title = "流程名称", required = true, example = "芋道") @NotEmpty(message = "流程名称不能为空") private String name; - @ApiModelProperty(value = "流程描述", example = "我是描述") + @Schema(title = "流程描述", example = "我是描述") private String description; } 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 10d23892ea..cfd646ebcd 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,25 @@ 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 lombok.Data; import lombok.EqualsAndHashCode; import lombok.ToString; import java.time.LocalDateTime; -@ApiModel("管理后台 - 流程模型的分页的每一项 Response VO") +@Schema(title = "管理后台 - 流程模型的分页的每一项 Response VO") @Data @EqualsAndHashCode(callSuper = true) @ToString(callSuper = true) public class BpmModelPageItemRespVO extends BpmModelBaseVO { - @ApiModelProperty(value = "编号", required = true, example = "1024") + @Schema(title = "编号", required = true, example = "1024") private String id; - @ApiModelProperty(value = "表单名字", example = "请假表单") + @Schema(title = "表单名字", example = "请假表单") private String formName; - @ApiModelProperty(value = "创建时间", required = true) + @Schema(title = "创建时间", required = true) private LocalDateTime createTime; /** @@ -28,20 +27,20 @@ public class BpmModelPageItemRespVO extends BpmModelBaseVO { */ private ProcessDefinition processDefinition; - @ApiModel("流程定义") + @Schema(title = "流程定义") @Data public static class ProcessDefinition { - @ApiModelProperty(value = "编号", required = true, example = "1024") + @Schema(title = "编号", required = true, example = "1024") private String id; - @ApiModelProperty(value = "版本", required = true, example = "1") + @Schema(title = "版本", required = true, example = "1") private Integer version; - @ApiModelProperty(value = "部署时间", required = true) + @Schema(title = "部署时间", required = true) private LocalDateTime deploymentTime; - @ApiModelProperty(value = "中断状态", required = true, example = "1", notes = "参见 SuspensionState 枚举") + @Schema(title = "中断状态", required = true, example = "1", description = "参见 SuspensionState 枚举") 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 945da139ca..ce2f4ae1c2 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,25 @@ 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 lombok.Data; import lombok.EqualsAndHashCode; import lombok.ToString; -@ApiModel("管理后台 - 流程模型分页 Request VO") +@Schema(title = "管理后台 - 流程模型分页 Request VO") @Data @EqualsAndHashCode(callSuper = true) @ToString(callSuper = true) public class BpmModelPageReqVO extends PageParam { - @ApiModelProperty(value = "标识", example = "process1641042089407", notes = "精准匹配") + @Schema(title = "标识", example = "process1641042089407", description = "精准匹配") private String key; - @ApiModelProperty(value = "名字", example = "芋道", notes = "模糊匹配") + @Schema(title = "名字", example = "芋道", description = "模糊匹配") private String name; - @ApiModelProperty(value = "流程分类", notes = "参见 bpm_model_category 数据字典", example = "1") + @Schema(title = "流程分类", description = "参见 bpm_model_category 数据字典", example = "1") private String category; } 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 571850ff09..f8e5200788 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,25 @@ 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 lombok.Data; import lombok.EqualsAndHashCode; import lombok.ToString; import java.time.LocalDateTime; -@ApiModel("管理后台 - 流程模型的创建 Request VO") +@Schema(title = "管理后台 - 流程模型的创建 Request VO") @Data @EqualsAndHashCode(callSuper = true) @ToString(callSuper = true) public class BpmModelRespVO extends BpmModelBaseVO { - @ApiModelProperty(value = "编号", required = true, example = "1024") + @Schema(title = "编号", required = true, example = "1024") private String id; - @ApiModelProperty(value = "BPMN XML", required = true) + @Schema(title = "BPMN XML", required = true) private String bpmnXml; - @ApiModelProperty(value = "创建时间", required = true) + @Schema(title = "创建时间", required = true) private LocalDateTime createTime; } 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 972aa31bbc..b480d0b1f4 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,39 @@ 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 lombok.Data; import javax.validation.constraints.NotEmpty; -@ApiModel("管理后台 - 流程模型的更新 Request VO") +@Schema(title = "管理后台 - 流程模型的更新 Request VO") @Data public class BpmModelUpdateReqVO { - @ApiModelProperty(value = "编号", required = true, example = "1024") + @Schema(title = "编号", required = true, example = "1024") @NotEmpty(message = "编号不能为空") private String id; - @ApiModelProperty(value = "流程名称", example = "芋道") + @Schema(title = "流程名称", example = "芋道") private String name; - @ApiModelProperty(value = "流程描述", example = "我是描述") + @Schema(title = "流程描述", example = "我是描述") private String description; - @ApiModelProperty(value = "流程分类", notes = "参见 bpm_model_category 数据字典", example = "1") + @Schema(title = "流程分类", description = "参见 bpm_model_category 数据字典", example = "1") private String category; - @ApiModelProperty(value = "BPMN XML", required = true) + @Schema(title = "BPMN XML", required = true) private String bpmnXml; - @ApiModelProperty(value = "表单类型", notes = "参见 bpm_model_form_type 数据字典", example = "1") + @Schema(title = "表单类型", description = "参见 bpm_model_form_type 数据字典", example = "1") private Integer formType; - @ApiModelProperty(value = "表单编号", example = "1024", notes = "在表单类型为 {@link BpmModelFormTypeEnum#CUSTOM} 时,必须非空") + @Schema(title = "表单编号", example = "1024", description = "在表单类型为 {@link BpmModelFormTypeEnum#CUSTOM} 时,必须非空") private Long formId; - @ApiModelProperty(value = "自定义表单的提交路径,使用 Vue 的路由地址", example = "/bpm/oa/leave/create", - notes = "在表单类型为 {@link BpmModelFormTypeEnum#CUSTOM} 时,必须非空") + @Schema(title = "自定义表单的提交路径,使用 Vue 的路由地址", example = "/bpm/oa/leave/create", + description = "在表单类型为 {@link BpmModelFormTypeEnum#CUSTOM} 时,必须非空") private String formCustomCreatePath; - @ApiModelProperty(value = "自定义表单的查看路径,使用 Vue 的路由地址", example = "/bpm/oa/leave/view", - notes = "在表单类型为 {@link BpmModelFormTypeEnum#CUSTOM} 时,必须非空") + @Schema(title = "自定义表单的查看路径,使用 Vue 的路由地址", example = "/bpm/oa/leave/view", + description = "在表单类型为 {@link BpmModelFormTypeEnum#CUSTOM} 时,必须非空") private String formCustomViewPath; } 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 9cfcebbdcf..d07b3b2497 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,20 +1,19 @@ 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 lombok.Data; import javax.validation.constraints.NotNull; -@ApiModel("管理后台 - 流程模型更新状态 Request VO") +@Schema(title = "管理后台 - 流程模型更新状态 Request VO") @Data public class BpmModelUpdateStateReqVO { - @ApiModelProperty(value = "编号", required = true, example = "1024") + @Schema(title = "编号", required = true, example = "1024") @NotNull(message = "编号不能为空") private String id; - @ApiModelProperty(value = "状态", required = true, example = "1", notes = "见 SuspensionState 枚举") + @Schema(title = "状态", required = true, example = "1", description = "见 SuspensionState 枚举") @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 5e45b8bde6..664d3b27b9 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,18 @@ 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 lombok.Data; import lombok.EqualsAndHashCode; import lombok.ToString; -@ApiModel("管理后台 - 流程定义列表 Request VO") +@Schema(title = "管理后台 - 流程定义列表 Request VO") @Data @ToString(callSuper = true) @EqualsAndHashCode(callSuper = true) public class BpmProcessDefinitionListReqVO extends PageParam { - @ApiModelProperty(value = "中断状态", example = "1", notes = "参见 SuspensionState 枚举") + @Schema(title = "中断状态", example = "1", description = "参见 SuspensionState 枚举") 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/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 1952e95a78..5bf9bf42ac 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,22 @@ 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 lombok.Data; import lombok.EqualsAndHashCode; import lombok.ToString; import java.time.LocalDateTime; -@ApiModel("管理后台 - 流程定义的分页的每一项 Response VO") +@Schema(title = "管理后台 - 流程定义的分页的每一项 Response VO") @Data @EqualsAndHashCode(callSuper = true) @ToString(callSuper = true) public class BpmProcessDefinitionPageItemRespVO extends BpmProcessDefinitionRespVO { - @ApiModelProperty(value = "表单名字", example = "请假表单") + @Schema(title = "表单名字", example = "请假表单") private String formName; - @ApiModelProperty(value = "部署时间", required = true) + @Schema(title = "部署时间", required = true) private LocalDateTime deploymentTime; } 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 a9657e9a24..0b92700e38 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,18 @@ 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 lombok.Data; import lombok.EqualsAndHashCode; import lombok.ToString; -@ApiModel("管理后台 - 流程定义分页 Request VO") +@Schema(title = "管理后台 - 流程定义分页 Request VO") @Data @ToString(callSuper = true) @EqualsAndHashCode(callSuper = true) public class BpmProcessDefinitionPageReqVO extends PageParam { - @ApiModelProperty(value = "标识", example = "process1641042089407", notes = "精准匹配") + @Schema(title = "标识", example = "process1641042089407", description = "精准匹配") private String key; } 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 6f8fd4e5b4..f4c540f2d0 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,51 @@ 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 lombok.Data; import javax.validation.constraints.NotEmpty; import javax.validation.constraints.NotNull; import java.util.List; -@ApiModel("管理后台 - 流程定义 Response VO") +@Schema(title = "管理后台 - 流程定义 Response VO") @Data public class BpmProcessDefinitionRespVO { - @ApiModelProperty(value = "编号", required = true, example = "1024") + @Schema(title = "编号", required = true, example = "1024") private String id; - @ApiModelProperty(value = "版本", required = true, example = "1") + @Schema(title = "版本", required = true, example = "1") private Integer version; - @ApiModelProperty(value = "流程名称", required = true, example = "芋道") + @Schema(title = "流程名称", required = true, example = "芋道") @NotEmpty(message = "流程名称不能为空") private String name; - @ApiModelProperty(value = "流程描述", example = "我是描述") + @Schema(title = "流程描述", example = "我是描述") private String description; - @ApiModelProperty(value = "流程分类", notes = "参见 bpm_model_category 数据字典", example = "1") + @Schema(title = "流程分类", description = "参见 bpm_model_category 数据字典", example = "1") @NotEmpty(message = "流程分类不能为空") private String category; - @ApiModelProperty(value = "表单类型", notes = "参见 bpm_model_form_type 数据字典", example = "1") + @Schema(title = "表单类型", description = "参见 bpm_model_form_type 数据字典", example = "1") private Integer formType; - @ApiModelProperty(value = "表单编号", example = "1024", notes = "在表单类型为 {@link BpmModelFormTypeEnum#CUSTOM} 时,必须非空") + @Schema(title = "表单编号", example = "1024", description = "在表单类型为 {@link BpmModelFormTypeEnum#CUSTOM} 时,必须非空") private Long formId; - @ApiModelProperty(value = "表单的配置", required = true, - notes = "JSON 字符串。在表单类型为 {@link BpmModelFormTypeEnum#CUSTOM} 时,必须非空") + @Schema(title = "表单的配置", required = true, + description = "JSON 字符串。在表单类型为 {@link BpmModelFormTypeEnum#CUSTOM} 时,必须非空") private String formConf; - @ApiModelProperty(value = "表单项的数组", required = true, - notes = "JSON 字符串的数组。在表单类型为 {@link BpmModelFormTypeEnum#CUSTOM} 时,必须非空") + @Schema(title = "表单项的数组", required = true, + description = "JSON 字符串的数组。在表单类型为 {@link BpmModelFormTypeEnum#CUSTOM} 时,必须非空") private List formFields; - @ApiModelProperty(value = "自定义表单的提交路径,使用 Vue 的路由地址", example = "/bpm/oa/leave/create", - notes = "在表单类型为 {@link BpmModelFormTypeEnum#CUSTOM} 时,必须非空") + @Schema(title = "自定义表单的提交路径,使用 Vue 的路由地址", example = "/bpm/oa/leave/create", + description = "在表单类型为 {@link BpmModelFormTypeEnum#CUSTOM} 时,必须非空") private String formCustomCreatePath; - @ApiModelProperty(value = "自定义表单的查看路径,使用 Vue 的路由地址", example = "/bpm/oa/leave/view", - notes = "在表单类型为 {@link BpmModelFormTypeEnum#CUSTOM} 时,必须非空") + @Schema(title = "自定义表单的查看路径,使用 Vue 的路由地址", example = "/bpm/oa/leave/view", + description = "在表单类型为 {@link BpmModelFormTypeEnum#CUSTOM} 时,必须非空") private String formCustomViewPath; - @ApiModelProperty(value = "中断状态", required = true, example = "1", notes = "参见 SuspensionState 枚举") + @Schema(title = "中断状态", required = true, example = "1", description = "参见 SuspensionState 枚举") 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/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 bcb9fc0f03..8ec779bad9 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,5 @@ 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,11 +13,11 @@ import java.util.Set; @Data public class BpmTaskAssignRuleBaseVO { - @ApiModelProperty(value = "规则类型", required = true, example = "bpm_task_assign_rule_type") + @Schema(title = "规则类型", required = true, example = "bpm_task_assign_rule_type") @NotNull(message = "规则类型不能为空") private Integer type; - @ApiModelProperty(value = "规则值数组", required = true, example = "1,2,3") + @Schema(title = "规则值数组", required = true, example = "1,2,3") @NotNull(message = "规则值数组不能为空") private Set options; 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 cbbc108c06..b1cc63c184 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,24 +1,23 @@ 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 lombok.Data; import lombok.EqualsAndHashCode; import lombok.ToString; import javax.validation.constraints.NotEmpty; -@ApiModel("管理后台 - 流程任务分配规则的创建 Request VO") +@Schema(title = "管理后台 - 流程任务分配规则的创建 Request VO") @Data @EqualsAndHashCode(callSuper = true) @ToString(callSuper = true) public class BpmTaskAssignRuleCreateReqVO extends BpmTaskAssignRuleBaseVO { - @ApiModelProperty(value = "流程模型的编号", required = true, example = "1024") + @Schema(title = "流程模型的编号", required = true, example = "1024") @NotEmpty(message = "流程模型的编号不能为空") private String modelId; - @ApiModelProperty(value = "流程任务定义的编号", required = true, example = "2048") + @Schema(title = "流程任务定义的编号", required = true, example = "2048") @NotEmpty(message = "流程任务定义的编号不能为空") private String taskDefinitionKey; 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 c0786e52b4..630952e148 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,28 @@ 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 lombok.Data; import lombok.EqualsAndHashCode; import lombok.ToString; -@ApiModel("管理后台 - 流程任务分配规则的 Response VO") +@Schema(title = "管理后台 - 流程任务分配规则的 Response VO") @Data @EqualsAndHashCode(callSuper = true) @ToString(callSuper = true) public class BpmTaskAssignRuleRespVO extends BpmTaskAssignRuleBaseVO { - @ApiModelProperty(value = "任务分配规则的编号", required = true, example = "1024") + @Schema(title = "任务分配规则的编号", required = true, example = "1024") private Long id; - @ApiModelProperty(value = "流程模型的编号", required = true, example = "2048") + @Schema(title = "流程模型的编号", required = true, example = "2048") private String modelId; - @ApiModelProperty(value = "流程定义的编号", required = true, example = "4096") + @Schema(title = "流程定义的编号", required = true, example = "4096") private String processDefinitionId; - @ApiModelProperty(value = "流程任务定义的编号", required = true, example = "2048") + @Schema(title = "流程任务定义的编号", required = true, example = "2048") private String taskDefinitionKey; - @ApiModelProperty(value = "流程任务定义的名字", required = true, example = "关注芋道") + @Schema(title = "流程任务定义的名字", required = true, example = "关注芋道") private String taskDefinitionName; } 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 8f1c12701b..bb6f443749 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,20 +1,19 @@ 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 lombok.Data; import lombok.EqualsAndHashCode; import lombok.ToString; import javax.validation.constraints.NotNull; -@ApiModel("管理后台 - 流程任务分配规则的更新 Request VO") +@Schema(title = "管理后台 - 流程任务分配规则的更新 Request VO") @Data @EqualsAndHashCode(callSuper = true) @ToString(callSuper = true) public class BpmTaskAssignRuleUpdateReqVO extends BpmTaskAssignRuleBaseVO { - @ApiModelProperty(value = "任务分配规则的编号", required = true, example = "1024") + @Schema(title = "任务分配规则的编号", required = true, example = "1024") @NotNull(message = "任务分配规则的编号不能为空") private Long id; 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 dd66580d3b..770d465b6a 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,7 +54,7 @@ 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)); 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 b8b38c6f22..9d883af85f 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,8 +1,7 @@ package cn.iocoder.yudao.module.bpm.controller.admin.oa.vo; - +import io.swagger.v3.oas.annotations.media.Schema; import lombok.*; import java.time.LocalDateTime; -import io.swagger.annotations.*; import javax.validation.constraints.*; import org.springframework.format.annotation.DateTimeFormat; @@ -15,19 +14,19 @@ import static cn.iocoder.yudao.framework.common.util.date.DateUtils.FORMAT_YEAR_ @Data public class BpmOALeaveBaseVO { - @ApiModelProperty(value = "请假的开始时间", required = true) + @Schema(title = "请假的开始时间", required = true) @NotNull(message = "开始时间不能为空") @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND) private LocalDateTime startTime; - @ApiModelProperty(value = "请假的结束时间", required = true) + @Schema(title = "请假的结束时间", 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(title = "请假类型", required = true, example = "1", description = "参见 bpm_oa_type 枚举") private Integer type; - @ApiModelProperty(value = "原因", required = true, example = "阅读芋道源码") + @Schema(title = "原因", 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/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 8ccb6807f1..e1d7d082b3 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,12 @@ 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(title = "管理后台 - 请假申请创建 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 38dc5148fd..4341bd9743 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,30 +1,29 @@ package cn.iocoder.yudao.module.bpm.controller.admin.oa.vo; - +import io.swagger.v3.oas.annotations.media.Schema; import lombok.*; import java.time.LocalDateTime; -import io.swagger.annotations.*; import cn.iocoder.yudao.framework.common.pojo.PageParam; 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(title = "管理后台 - 请假申请分页 Request VO") @Data @EqualsAndHashCode(callSuper = true) @ToString(callSuper = true) public class BpmOALeavePageReqVO extends PageParam { - @ApiModelProperty(value = "状态", example = "1", notes = "参见 bpm_process_instance_result 枚举") + @Schema(title = "状态", example = "1", description = "参见 bpm_process_instance_result 枚举") private Integer result; - @ApiModelProperty(value = "请假类型", example = "1", notes = "参见 bpm_oa_type") + @Schema(title = "请假类型", example = "1", description = "参见 bpm_oa_type") private Integer type; - @ApiModelProperty(value = "原因", example = "阅读芋道源码", notes = "模糊匹配") + @Schema(title = "原因", example = "阅读芋道源码", description = "模糊匹配") private String reason; @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND) - @ApiModelProperty(value = "申请时间") + @Schema(title = "申请时间") private LocalDateTime[] createTime; } 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 42b3ec66cd..a30c41676a 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,6 @@ 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; @@ -9,24 +8,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(title = "管理后台 - 请假申请 Response VO") @Data @EqualsAndHashCode(callSuper = true) @ToString(callSuper = true) public class BpmOALeaveRespVO extends BpmOALeaveBaseVO { - @ApiModelProperty(value = "请假表单主键", required = true, example = "1024") + @Schema(title = "请假表单主键", required = true, example = "1024") private Long id; - @ApiModelProperty(value = "状态", required = true, example = "1", notes = "参见 bpm_process_instance_result 枚举") + @Schema(title = "状态", required = true, example = "1", description = "参见 bpm_process_instance_result 枚举") private Integer result; - @ApiModelProperty(value = "申请时间", required = true) + @Schema(title = "申请时间", required = true) @NotNull(message = "申请时间不能为空") @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND) private LocalDateTime createTime; - @ApiModelProperty(value = "流程id") + @Schema(title = "流程id") private String processInstanceId; } 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 24d89cd362..44d0373f10 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,9 +28,9 @@ public class BpmActivityController { private BpmActivityService activityService; @GetMapping("/list") - @ApiOperation(value = "生成指定流程实例的高亮流程图", - notes = "只高亮进行中的任务。不过要注意,该接口暂时没用,通过前端的 ProcessViewer.vue 界面的 highlightDiagram 方法生成") - @ApiImplicitParam(name = "processInstanceId", value = "流程实例的编号", required = true, dataTypeClass = String.class) + @Operation(summary = "生成指定流程实例的高亮流程图", + description = "只高亮进行中的任务。不过要注意,该接口暂时没用,通过前端的 ProcessViewer.vue 界面的 highlightDiagram 方法生成") + @Parameter(name = "processInstanceId", description = "流程实例的编号", required = true) @PreAuthorize("@ss.hasPermission('bpm:task:query')") public CommonResult> getActivityList( @RequestParam("processInstanceId") String processInstanceId) { 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 31abf7de12..b8e8971f2f 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,22 +35,22 @@ 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); 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 eaa991f55d..885b03143e 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,7 +68,7 @@ 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); 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 7f183f50c6..997b8bce08 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,25 @@ 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 lombok.Data; import java.time.LocalDateTime; -@ApiModel("管理后台 - 流程活动的 Response VO") +@Schema(title = "管理后台 - 流程活动的 Response VO") @Data public class BpmActivityRespVO { - @ApiModelProperty(value = "流程活动的标识", required = true, example = "1024") + @Schema(title = "流程活动的标识", required = true, example = "1024") private String key; - @ApiModelProperty(value = "流程活动的类型", required = true, example = "StartEvent") + @Schema(title = "流程活动的类型", required = true, example = "StartEvent") private String type; - @ApiModelProperty(value = "流程活动的开始时间", required = true) + @Schema(title = "流程活动的开始时间", required = true) private LocalDateTime startTime; - @ApiModelProperty(value = "流程活动的结束时间", required = true) + @Schema(title = "流程活动的结束时间", required = true) private LocalDateTime endTime; - @ApiModelProperty(value = "关联的流程任务的编号", example = "2048", notes = "关联的流程任务,只有 UserTask 等类型才有") + @Schema(title = "关联的流程任务的编号", example = "2048", description = "关联的流程任务,只有 UserTask 等类型才有") private String taskId; } 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 928f187e79..3a2ea654cc 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,22 +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 lombok.Data; import javax.validation.constraints.NotEmpty; import javax.validation.constraints.NotNull; import java.util.Map; -@ApiModel("管理后台 - 流程实例的取消 Request VO") +@Schema(title = "管理后台 - 流程实例的取消 Request VO") @Data public class BpmProcessInstanceCancelReqVO { - @ApiModelProperty(value = "流程实例的编号", required = true, example = "1024") + @Schema(title = "流程实例的编号", required = true, example = "1024") @NotEmpty(message = "流程实例的编号不能为空") private String id; - @ApiModelProperty(value = "取消原因", required = true, example = "不请假了!") + @Schema(title = "取消原因", required = true, example = "不请假了!") @NotEmpty(message = "取消原因不能为空") 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/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 2085253d30..588de54fdc 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,20 @@ 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 lombok.Data; import javax.validation.constraints.NotEmpty; import java.util.Map; -@ApiModel("管理后台 - 流程实例的创建 Request VO") +@Schema(title = "管理后台 - 流程实例的创建 Request VO") @Data public class BpmProcessInstanceCreateReqVO { - @ApiModelProperty(value = "流程定义的编号", required = true, example = "1024") + @Schema(title = "流程定义的编号", required = true, example = "1024") @NotEmpty(message = "流程定义编号不能为空") private String processDefinitionId; - @ApiModelProperty(value = "变量实例") + @Schema(title = "变量实例") private Map variables; } 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 e52d45f449..111c73b5da 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,7 @@ 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 lombok.Data; import lombok.EqualsAndHashCode; import lombok.ToString; @@ -12,28 +11,28 @@ 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(title = "管理后台 - 流程实例的分页 Item Response VO") @Data @EqualsAndHashCode(callSuper = true) @ToString(callSuper = true) public class BpmProcessInstanceMyPageReqVO extends PageParam { - @ApiModelProperty(value = "流程名称", example = "芋道") + @Schema(title = "流程名称", example = "芋道") private String name; - @ApiModelProperty(value = "流程定义的编号", example = "2048") + @Schema(title = "流程定义的编号", example = "2048") private String processDefinitionId; - @ApiModelProperty(value = "流程实例的状态", notes = "参见 bpm_process_instance_status", example = "1") + @Schema(title = "流程实例的状态", description = "参见 bpm_process_instance_status", example = "1") private Integer status; - @ApiModelProperty(value = "流程实例的结果", notes = "参见 bpm_process_instance_result", example = "2") + @Schema(title = "流程实例的结果", description = "参见 bpm_process_instance_result", example = "2") private Integer result; - @ApiModelProperty(value = "流程分类", notes = "参见 bpm_model_category 数据字典", example = "1") + @Schema(title = "流程分类", description = "参见 bpm_model_category 数据字典", example = "1") private String category; - @ApiModelProperty(value = "创建时间") + @Schema(title = "创建时间") @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND) private LocalDateTime[] createTime; 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 0d2534b534..c367eaf5a7 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,37 @@ 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 lombok.Data; import java.time.LocalDateTime; import java.util.List; -@ApiModel("管理后台 - 流程实例的分页 Item Response VO") +@Schema(title = "管理后台 - 流程实例的分页 Item Response VO") @Data public class BpmProcessInstancePageItemRespVO { - @ApiModelProperty(value = "流程实例的编号", required = true, example = "1024") + @Schema(title = "流程实例的编号", required = true, example = "1024") private String id; - @ApiModelProperty(value = "流程名称", required = true, example = "芋道") + @Schema(title = "流程名称", required = true, example = "芋道") private String name; - @ApiModelProperty(value = "流程定义的编号", required = true, example = "2048") + @Schema(title = "流程定义的编号", required = true, example = "2048") private String processDefinitionId; - @ApiModelProperty(value = "流程分类", required = true, notes = "参见 bpm_model_category 数据字典", example = "1") + @Schema(title = "流程分类", required = true, description = "参见 bpm_model_category 数据字典", example = "1") private String category; - @ApiModelProperty(value = "流程实例的状态", required = true, notes = "参见 bpm_process_instance_status", example = "1") + @Schema(title = "流程实例的状态", required = true, description = "参见 bpm_process_instance_status", example = "1") private Integer status; - @ApiModelProperty(value = "流程实例的结果", required = true, notes = "参见 bpm_process_instance_result", example = "2") + @Schema(title = "流程实例的结果", required = true, description = "参见 bpm_process_instance_result", example = "2") private Integer result; - @ApiModelProperty(value = "提交时间", required = true) + @Schema(title = "提交时间", required = true) private LocalDateTime createTime; - @ApiModelProperty(value = "结束时间", required = true) + @Schema(title = "结束时间", required = true) private LocalDateTime endTime; /** @@ -40,14 +39,14 @@ public class BpmProcessInstancePageItemRespVO { */ private List tasks; - @ApiModel("流程任务") + @Schema(title = "流程任务") @Data public static class Task { - @ApiModelProperty(value = "流程任务的编号", required = true, example = "1024") + @Schema(title = "流程任务的编号", required = true, example = "1024") private String id; - @ApiModelProperty(value = "任务名称", required = true, example = "芋道") + @Schema(title = "任务名称", required = true, example = "芋道") private String name; } 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 58374dae2b..8d02aec719 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,41 @@ 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 lombok.Data; import java.time.LocalDateTime; import java.util.List; import java.util.Map; -@ApiModel("管理后台 - 流程实例的 Response VO") +@Schema(title = "管理后台 - 流程实例的 Response VO") @Data public class BpmProcessInstanceRespVO { - @ApiModelProperty(value = "流程实例的编号", required = true, example = "1024") + @Schema(title = "流程实例的编号", required = true, example = "1024") private String id; - @ApiModelProperty(value = "流程名称", required = true, example = "芋道") + @Schema(title = "流程名称", required = true, example = "芋道") private String name; - @ApiModelProperty(value = "流程分类", required = true, notes = "参见 bpm_model_category 数据字典", example = "1") + @Schema(title = "流程分类", required = true, description = "参见 bpm_model_category 数据字典", example = "1") private String category; - @ApiModelProperty(value = "流程实例的状态", required = true, notes = "参见 bpm_process_instance_status", example = "1") + @Schema(title = "流程实例的状态", required = true, description = "参见 bpm_process_instance_status", example = "1") private Integer status; - @ApiModelProperty(value = "流程实例的结果", required = true, notes = "参见 bpm_process_instance_result", example = "2") + @Schema(title = "流程实例的结果", required = true, description = "参见 bpm_process_instance_result", example = "2") private Integer result; - @ApiModelProperty(value = "提交时间", required = true) + @Schema(title = "提交时间", required = true) private LocalDateTime createTime; - @ApiModelProperty(value = "结束时间", required = true) + @Schema(title = "结束时间", required = true) private LocalDateTime endTime; - @ApiModelProperty(value = "提交的表单值", required = true) + @Schema(title = "提交的表单值", required = true) private Map formVariables; - @ApiModelProperty(value = "业务的唯一标识", example = "1", notes = "例如说,请假申请的编号") + @Schema(title = "业务的唯一标识", example = "1", description = "例如说,请假申请的编号") private String businessKey; /** @@ -49,47 +48,47 @@ public class BpmProcessInstanceRespVO { */ private ProcessDefinition processDefinition; - @ApiModel("用户信息") + @Schema(title = "用户信息") @Data public static class User { - @ApiModelProperty(value = "用户编号", required = true, example = "1") + @Schema(title = "用户编号", required = true, example = "1") private Long id; - @ApiModelProperty(value = "用户昵称", required = true, example = "芋艿") + @Schema(title = "用户昵称", required = true, example = "芋艿") private String nickname; - @ApiModelProperty(value = "部门编号", required = true, example = "1") + @Schema(title = "部门编号", required = true, example = "1") private Long deptId; - @ApiModelProperty(value = "部门名称", required = true, example = "研发部") + @Schema(title = "部门名称", required = true, example = "研发部") private String deptName; } - @ApiModel("流程定义信息") + @Schema(title = "流程定义信息") @Data public static class ProcessDefinition { - @ApiModelProperty(value = "编号", required = true, example = "1024") + @Schema(title = "编号", required = true, example = "1024") private String id; - @ApiModelProperty(value = "表单类型", notes = "参见 bpm_model_form_type 数据字典", example = "1") + @Schema(title = "表单类型", description = "参见 bpm_model_form_type 数据字典", example = "1") private Integer formType; - @ApiModelProperty(value = "表单编号", example = "1024", notes = "在表单类型为 {@link BpmModelFormTypeEnum#CUSTOM} 时,必须非空") + @Schema(title = "表单编号", example = "1024", description = "在表单类型为 {@link BpmModelFormTypeEnum#CUSTOM} 时,必须非空") private Long formId; - @ApiModelProperty(value = "表单的配置", required = true, - notes = "JSON 字符串。在表单类型为 {@link BpmModelFormTypeEnum#CUSTOM} 时,必须非空") + @Schema(title = "表单的配置", required = true, + description = "JSON 字符串。在表单类型为 {@link BpmModelFormTypeEnum#CUSTOM} 时,必须非空") private String formConf; - @ApiModelProperty(value = "表单项的数组", required = true, - notes = "JSON 字符串的数组。在表单类型为 {@link BpmModelFormTypeEnum#CUSTOM} 时,必须非空") + @Schema(title = "表单项的数组", required = true, + description = "JSON 字符串的数组。在表单类型为 {@link BpmModelFormTypeEnum#CUSTOM} 时,必须非空") private List formFields; - @ApiModelProperty(value = "自定义表单的提交路径,使用 Vue 的路由地址", example = "/bpm/oa/leave/create", - notes = "在表单类型为 {@link BpmModelFormTypeEnum#CUSTOM} 时,必须非空") + @Schema(title = "自定义表单的提交路径,使用 Vue 的路由地址", example = "/bpm/oa/leave/create", + description = "在表单类型为 {@link BpmModelFormTypeEnum#CUSTOM} 时,必须非空") private String formCustomCreatePath; - @ApiModelProperty(value = "自定义表单的查看路径,使用 Vue 的路由地址", example = "/bpm/oa/leave/view", - notes = "在表单类型为 {@link BpmModelFormTypeEnum#CUSTOM} 时,必须非空") + @Schema(title = "自定义表单的查看路径,使用 Vue 的路由地址", example = "/bpm/oa/leave/view", + description = "在表单类型为 {@link BpmModelFormTypeEnum#CUSTOM} 时,必须非空") private String formCustomViewPath; - @ApiModelProperty(value = "BPMN XML", required = true) + @Schema(title = "BPMN XML", required = true) private String bpmnXml; } 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 1b6a690667..5e023f2c14 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,20 +1,19 @@ 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 lombok.Data; import javax.validation.constraints.NotEmpty; -@ApiModel("管理后台 - 通过流程任务的 Request VO") +@Schema(title = "管理后台 - 通过流程任务的 Request VO") @Data public class BpmTaskApproveReqVO { - @ApiModelProperty(value = "任务编号", required = true, example = "1024") + @Schema(title = "任务编号", required = true, example = "1024") @NotEmpty(message = "任务编号不能为空") private String id; - @ApiModelProperty(value = "审批意见", required = true, example = "不错不错!") + @Schema(title = "审批意见", required = true, example = "不错不错!") @NotEmpty(message = "审批意见不能为空") 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/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 a9bb93f9eb..a77fb10020 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,26 @@ 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 lombok.Data; import lombok.EqualsAndHashCode; import lombok.ToString; import java.time.LocalDateTime; -@ApiModel("管理后台 - 流程任务的 Done 已完成的分页项 Response VO") +@Schema(title = "管理后台 - 流程任务的 Done 已完成的分页项 Response VO") @Data @EqualsAndHashCode(callSuper = true) @ToString(callSuper = true) public class BpmTaskDonePageItemRespVO extends BpmTaskTodoPageItemRespVO { - @ApiModelProperty(value = "结束时间", required = true) + @Schema(title = "结束时间", required = true) private LocalDateTime endTime; - @ApiModelProperty(value = "持续时间", required = true, example = "1000") + @Schema(title = "持续时间", required = true, example = "1000") private Long durationInMillis; - @ApiModelProperty(value = "任务结果", required = true, notes = "参见 bpm_process_instance_result", example = "2") + @Schema(title = "任务结果", required = true, description = "参见 bpm_process_instance_result", example = "2") private Integer result; - @ApiModelProperty(value = "审批建议", required = true, example = "不请假了!") + @Schema(title = "审批建议", 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/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 a347d58fee..fa152186c9 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,7 @@ 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 lombok.Data; import lombok.EqualsAndHashCode; import lombok.ToString; @@ -12,20 +11,20 @@ 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(title = "管理后台 - 流程任务的 Done 已办的分页 Request VO") @Data @EqualsAndHashCode(callSuper = true) @ToString(callSuper = true) public class BpmTaskDonePageReqVO extends PageParam { - @ApiModelProperty(value = "流程任务名", example = "芋道") + @Schema(title = "流程任务名", example = "芋道") private String name; - @ApiModelProperty(value = "开始的创建收间") + @Schema(title = "开始的创建收间") @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND) private LocalDateTime beginCreateTime; - @ApiModelProperty(value = "结束的创建时间") + @Schema(title = "结束的创建时间") @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND) private LocalDateTime endCreateTime; 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 596a82f77e..1b7d0d34f4 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,20 +1,19 @@ 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 lombok.Data; import javax.validation.constraints.NotEmpty; -@ApiModel("管理后台 - 不通过流程任务的 Request VO") +@Schema(title = "管理后台 - 不通过流程任务的 Request VO") @Data public class BpmTaskRejectReqVO { - @ApiModelProperty(value = "任务编号", required = true, example = "1024") + @Schema(title = "任务编号", required = true, example = "1024") @NotEmpty(message = "任务编号不能为空") private String id; - @ApiModelProperty(value = "审批意见", required = true, example = "不错不错!") + @Schema(title = "审批意见", required = true, example = "不错不错!") @NotEmpty(message = "审批意见不能为空") 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/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 1f7d2c7fa6..df1e107645 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,17 @@ 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 lombok.Data; import lombok.EqualsAndHashCode; import lombok.ToString; -@ApiModel("管理后台 - 流程任务的 Response VO") +@Schema(title = "管理后台 - 流程任务的 Response VO") @Data @EqualsAndHashCode(callSuper = true) @ToString(callSuper = true) public class BpmTaskRespVO extends BpmTaskDonePageItemRespVO { - @ApiModelProperty(value = "任务定义的标识", required = true, example = "user-001") + @Schema(title = "任务定义的标识", required = true, example = "user-001") private String definitionKey; /** @@ -20,18 +19,18 @@ public class BpmTaskRespVO extends BpmTaskDonePageItemRespVO { */ private User assigneeUser; - @ApiModel("用户信息") + @Schema(title = "用户信息") @Data public static class User { - @ApiModelProperty(value = "用户编号", required = true, example = "1") + @Schema(title = "用户编号", required = true, example = "1") private Long id; - @ApiModelProperty(value = "用户昵称", required = true, example = "芋艿") + @Schema(title = "用户昵称", required = true, example = "芋艿") private String nickname; - @ApiModelProperty(value = "部门编号", required = true, example = "1") + @Schema(title = "部门编号", required = true, example = "1") private Long deptId; - @ApiModelProperty(value = "部门名称", required = true, example = "研发部") + @Schema(title = "部门名称", required = true, example = "研发部") private String deptName; } 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 5c2cbf26af..dbcdb7c14d 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,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 lombok.Data; import java.time.LocalDateTime; -@ApiModel("管理后台 - 流程任务的 Running 进行中的分页项 Response VO") +@Schema(title = "管理后台 - 流程任务的 Running 进行中的分页项 Response VO") @Data public class BpmTaskTodoPageItemRespVO { - @ApiModelProperty(value = "任务编号", required = true, example = "1024") + @Schema(title = "任务编号", required = true, example = "1024") private String id; - @ApiModelProperty(value = "任务名字", required = true, example = "芋道") + @Schema(title = "任务名字", required = true, example = "芋道") private String name; - @ApiModelProperty(value = "接收时间", required = true) + @Schema(title = "接收时间", required = true) private LocalDateTime claimTime; - @ApiModelProperty(value = "创建时间", required = true) + @Schema(title = "创建时间", required = true) private LocalDateTime createTime; - @ApiModelProperty(value = "激活状态", required = true, example = "1", notes = "参见 SuspensionState 枚举") + @Schema(title = "激活状态", required = true, example = "1", description = "参见 SuspensionState 枚举") private Integer suspensionState; /** @@ -31,22 +30,22 @@ public class BpmTaskTodoPageItemRespVO { private ProcessInstance processInstance; @Data - @ApiModel("流程实例") + @Schema(title = "流程实例") public static class ProcessInstance { - @ApiModelProperty(value = "流程实例编号", required = true, example = "1024") + @Schema(title = "流程实例编号", required = true, example = "1024") private String id; - @ApiModelProperty(value = "流程实例名称", required = true, example = "芋道") + @Schema(title = "流程实例名称", required = true, example = "芋道") private String name; - @ApiModelProperty(value = "发起人的用户编号", required = true, example = "1024") + @Schema(title = "发起人的用户编号", required = true, example = "1024") private Long startUserId; - @ApiModelProperty(value = "发起人的用户昵称", required = true, example = "芋艿") + @Schema(title = "发起人的用户昵称", required = true, example = "芋艿") private String startUserNickname; - @ApiModelProperty(value = "流程定义的编号", required = true, example = "2048") + @Schema(title = "流程定义的编号", required = true, example = "2048") private String processDefinitionId; } 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 9d2ad18c2a..d4994e272e 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,7 @@ 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 lombok.Data; import lombok.EqualsAndHashCode; import lombok.ToString; @@ -12,20 +11,20 @@ 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(title = "管理后台 - 流程任务的 TODO 待办的分页 Request VO") @Data @EqualsAndHashCode(callSuper = true) @ToString(callSuper = true) public class BpmTaskTodoPageReqVO extends PageParam { - @ApiModelProperty(value = "流程任务名", example = "芋道") + @Schema(title = "流程任务名", example = "芋道") private String name; - @ApiModelProperty(value = "开始的创建收间") + @Schema(title = "开始的创建收间") @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND) private LocalDateTime beginCreateTime; - @ApiModelProperty(value = "结束的创建时间") + @Schema(title = "结束的创建时间") @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND) private LocalDateTime endCreateTime; 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 0dd0ffed4f..0bd364043f 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,6 @@ 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 lombok.Data; import lombok.EqualsAndHashCode; import lombok.ToString; @@ -10,15 +9,15 @@ import net.bytebuddy.implementation.bind.annotation.Empty; import javax.validation.constraints.NotEmpty; import javax.validation.constraints.NotNull; -@ApiModel("管理后台 - 流程任务的更新负责人的 Request VO") +@Schema(title = "管理后台 - 流程任务的更新负责人的 Request VO") @Data public class BpmTaskUpdateAssigneeReqVO { - @ApiModelProperty(value = "任务编号", required = true, example = "1024") + @Schema(title = "任务编号", required = true, example = "1024") @NotEmpty(message = "任务编号不能为空") private String id; - @ApiModelProperty(value = "新审批人的用户编号", required = true, example = "2048") + @Schema(title = "新审批人的用户编号", required = true, example = "2048") @NotNull(message = "新审批人的用户编号不能为空") private Long assigneeUserId; 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 9a0013b933..76e5b6a83b 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 { 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 965c5d2b95..c2a1497dfe 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,21 +1,20 @@ 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 lombok.Data; import javax.validation.constraints.NotNull; import java.util.List; -@ApiModel("管理后台 - 基于数据库的表结构,创建代码生成器的表和字段定义 Request VO") +@Schema(title = "管理后台 - 基于数据库的表结构,创建代码生成器的表和字段定义 Request VO") @Data public class CodegenCreateListReqVO { - @ApiModelProperty(value = "数据源配置的编号", required = true, example = "1") + @Schema(title = "数据源配置的编号", required = true, example = "1") @NotNull(message = "数据源配置的编号不能为空") private Long dataSourceConfigId; - @ApiModelProperty(value = "表名数组", required = true, example = "[1, 2, 3]") + @Schema(title = "表名数组", required = true, example = "[1, 2, 3]") @NotNull(message = "表名数组不能为空") private List tableNames; 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 ad9c868124..3b8e13e948 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,20 +2,19 @@ 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 lombok.Data; import java.util.List; -@ApiModel("管理后台 - 代码生成表和字段的明细 Response VO") +@Schema(title = "管理后台 - 代码生成表和字段的明细 Response VO") @Data public class CodegenDetailRespVO { - @ApiModelProperty("表定义") + @Schema(name = "表定义") private CodegenTableRespVO table; - @ApiModelProperty("字段定义") + @Schema(name = "字段定义") private List columns; } 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 662a2350cc..597d4de8ff 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,16 @@ 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 lombok.Data; -@ApiModel(value = "管理后台 - 代码生成预览 Response VO", description ="注意,每个文件都是一个该对象") +@Schema(title = "管理后台 - 代码生成预览 Response VO", description ="注意,每个文件都是一个该对象") @Data public class CodegenPreviewRespVO { - @ApiModelProperty(value = "文件路径", required = true, example = "java/cn/iocoder/yudao/adminserver/modules/system/controller/test/SysTestDemoController.java") + @Schema(title = "文件路径", 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(title = "代码", required = true, example = "Hello World") private String code; } 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 2423da0776..8ccde1284a 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,7 @@ 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 lombok.Data; import lombok.EqualsAndHashCode; import lombok.ToString; @@ -15,7 +14,7 @@ import javax.validation.constraints.AssertTrue; import javax.validation.constraints.NotNull; import java.util.List; -@ApiModel("管理后台 - 代码生成表和字段的修改 Request VO") +@Schema(title = "管理后台 - 代码生成表和字段的修改 Request VO") @Data public class CodegenUpdateReqVO { @@ -27,14 +26,14 @@ public class CodegenUpdateReqVO { @NotNull(message = "字段定义不能为空") private List columns; - @ApiModel("更新表定义") + @Schema(title = "更新表定义") @Data @EqualsAndHashCode(callSuper = true) @ToString(callSuper = true) @Valid public static class Table extends CodegenTableBaseVO { - @ApiModelProperty(value = "编号", required = true, example = "1") + @Schema(title = "编号", required = true, example = "1") private Long id; @AssertTrue(message = "上级菜单不能为空") @@ -46,13 +45,13 @@ public class CodegenUpdateReqVO { } - @ApiModel("更新表定义") + @Schema(title = "更新表定义") @Data @EqualsAndHashCode(callSuper = true) @ToString(callSuper = true) public static class Column extends CodegenColumnBaseVO { - @ApiModelProperty(value = "编号", required = true, example = "1") + @Schema(title = "编号", required = true, example = "1") private Long id; } 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 7702551850..f9a3a668b2 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,5 @@ 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,73 +11,73 @@ import javax.validation.constraints.NotNull; @Data public class CodegenColumnBaseVO { - @ApiModelProperty(value = "表编号", required = true, example = "1") + @Schema(title = "表编号", required = true, example = "1") @NotNull(message = "表编号不能为空") private Long tableId; - @ApiModelProperty(value = "字段名", required = true, example = "user_age") + @Schema(title = "字段名", required = true, example = "user_age") @NotNull(message = "字段名不能为空") private String columnName; - @ApiModelProperty(value = "字段类型", required = true, example = "int(11)") + @Schema(title = "字段类型", required = true, example = "int(11)") @NotNull(message = "字段类型不能为空") private String dataType; - @ApiModelProperty(value = "字段描述", required = true, example = "年龄") + @Schema(title = "字段描述", required = true, example = "年龄") @NotNull(message = "字段描述不能为空") private String columnComment; - @ApiModelProperty(value = "是否允许为空", required = true, example = "true") + @Schema(title = "是否允许为空", required = true, example = "true") @NotNull(message = "是否允许为空不能为空") private Boolean nullable; - @ApiModelProperty(value = "是否主键", required = true, example = "false") + @Schema(title = "是否主键", required = true, example = "false") @NotNull(message = "是否主键不能为空") private Boolean primaryKey; - @ApiModelProperty(value = "是否自增", required = true, example = "true") + @Schema(title = "是否自增", required = true, example = "true") @NotNull(message = "是否自增不能为空") private String autoIncrement; - @ApiModelProperty(value = "排序", required = true, example = "10") + @Schema(title = "排序", required = true, example = "10") @NotNull(message = "排序不能为空") private Integer ordinalPosition; - @ApiModelProperty(value = "Java 属性类型", required = true, example = "userAge") + @Schema(title = "Java 属性类型", required = true, example = "userAge") @NotNull(message = "Java 属性类型不能为空") private String javaType; - @ApiModelProperty(value = "Java 属性名", required = true, example = "Integer") + @Schema(title = "Java 属性名", required = true, example = "Integer") @NotNull(message = "Java 属性名不能为空") private String javaField; - @ApiModelProperty(value = "字典类型", example = "sys_gender") + @Schema(title = "字典类型", example = "sys_gender") private String dictType; - @ApiModelProperty(value = "数据示例", example = "1024") + @Schema(title = "数据示例", example = "1024") private String example; - @ApiModelProperty(value = "是否为 Create 创建操作的字段", required = true, example = "true") + @Schema(title = "是否为 Create 创建操作的字段", required = true, example = "true") @NotNull(message = "是否为 Create 创建操作的字段不能为空") private Boolean createOperation; - @ApiModelProperty(value = "是否为 Update 更新操作的字段", required = true, example = "false") + @Schema(title = "是否为 Update 更新操作的字段", required = true, example = "false") @NotNull(message = "是否为 Update 更新操作的字段不能为空") private Boolean updateOperation; - @ApiModelProperty(value = "是否为 List 查询操作的字段", required = true, example = "true") + @Schema(title = "是否为 List 查询操作的字段", required = true, example = "true") @NotNull(message = "是否为 List 查询操作的字段不能为空") private Boolean listOperation; - @ApiModelProperty(value = "List 查询操作的条件类型", required = true, example = "LIKE", notes = "参见 CodegenColumnListConditionEnum 枚举") + @Schema(title = "List 查询操作的条件类型", required = true, example = "LIKE", description = "参见 CodegenColumnListConditionEnum 枚举") @NotNull(message = "List 查询操作的条件类型不能为空") private String listOperationCondition; - @ApiModelProperty(value = "是否为 List 查询操作的返回字段", required = true, example = "true") + @Schema(title = "是否为 List 查询操作的返回字段", required = true, example = "true") @NotNull(message = "是否为 List 查询操作的返回字段不能为空") private Boolean listOperationResult; - @ApiModelProperty(value = "显示类型", required = true, example = "input") + @Schema(title = "显示类型", required = true, example = "input") @NotNull(message = "显示类型不能为空") private String htmlType; 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 125b71801a..c5abfa1e1e 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,22 @@ 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 lombok.Data; import lombok.EqualsAndHashCode; import lombok.ToString; import java.time.LocalDateTime; -@ApiModel("管理后台 - 代码生成字段定义 Response VO") +@Schema(title = "管理后台 - 代码生成字段定义 Response VO") @Data @EqualsAndHashCode(callSuper = true) @ToString(callSuper = true) public class CodegenColumnRespVO extends CodegenColumnBaseVO { - @ApiModelProperty(value = "编号", required = true, example = "1") + @Schema(title = "编号", required = true, example = "1") private Long id; - @ApiModelProperty(value = "创建时间", required = true) + @Schema(title = "创建时间", required = true) private LocalDateTime createTime; } 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 ad69de7dd6..01cb907f42 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,5 @@ 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 +11,46 @@ import javax.validation.constraints.NotNull; @Data public class CodegenTableBaseVO { - @ApiModelProperty(value = "生成场景", required = true, example = "1", notes = "参见 CodegenSceneEnum 枚举") + @Schema(title = "生成场景", required = true, example = "1", description = "参见 CodegenSceneEnum 枚举") @NotNull(message = "导入类型不能为空") private Integer scene; - @ApiModelProperty(value = "表名称", required = true, example = "yudao") + @Schema(title = "表名称", required = true, example = "yudao") @NotNull(message = "表名称不能为空") private String tableName; - @ApiModelProperty(value = "表描述", required = true, example = "芋道") + @Schema(title = "表描述", required = true, example = "芋道") @NotNull(message = "表描述不能为空") private String tableComment; - @ApiModelProperty(value = "备注", example = "我是备注") + @Schema(title = "备注", example = "我是备注") private String remark; - @ApiModelProperty(value = "模块名", required = true, example = "system") + @Schema(title = "模块名", required = true, example = "system") @NotNull(message = "模块名不能为空") private String moduleName; - @ApiModelProperty(value = "业务名", required = true, example = "codegen") + @Schema(title = "业务名", required = true, example = "codegen") @NotNull(message = "业务名不能为空") private String businessName; - @ApiModelProperty(value = "类名称", required = true, example = "CodegenTable") + @Schema(title = "类名称", required = true, example = "CodegenTable") @NotNull(message = "类名称不能为空") private String className; - @ApiModelProperty(value = "类描述", required = true, example = "代码生成器的表定义") + @Schema(title = "类描述", required = true, example = "代码生成器的表定义") @NotNull(message = "类描述不能为空") private String classComment; - @ApiModelProperty(value = "作者", required = true, example = "芋道源码") + @Schema(title = "作者", required = true, example = "芋道源码") @NotNull(message = "作者不能为空") private String author; - @ApiModelProperty(value = "模板类型", required = true, example = "1", notes = "参见 CodegenTemplateTypeEnum 枚举") + @Schema(title = "模板类型", required = true, example = "1", description = "参见 CodegenTemplateTypeEnum 枚举") @NotNull(message = "模板类型不能为空") private Integer templateType; - @ApiModelProperty(value = "父菜单编号", example = "1024") + @Schema(title = "父菜单编号", example = "1024") private Long parentMenuId; } 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 7a8ff7f317..648869d7b6 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,7 @@ 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 lombok.Data; import lombok.EqualsAndHashCode; import lombok.ToString; @@ -12,19 +11,19 @@ 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(title = "管理后台 - 表定义分页 Request VO") @Data @EqualsAndHashCode(callSuper = true) @ToString(callSuper = true) public class CodegenTablePageReqVO extends PageParam { - @ApiModelProperty(value = "表名称", example = "yudao", notes = "模糊匹配") + @Schema(title = "表名称", example = "yudao", description = "模糊匹配") private String tableName; - @ApiModelProperty(value = "表描述", example = "芋道", notes = "模糊匹配") + @Schema(title = "表描述", example = "芋道", description = "模糊匹配") private String tableComment; - @ApiModelProperty(value = "创建时间", example = "[2022-07-01 00:00:00,2022-07-01 23:59:59]") + @Schema(title = "创建时间", 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; 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 7ef96b9a85..4703fa4ae1 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,28 @@ 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 lombok.Data; import lombok.EqualsAndHashCode; import lombok.ToString; import java.time.LocalDateTime; -@ApiModel("管理后台 - 代码生成表定义 Response VO") +@Schema(title = "管理后台 - 代码生成表定义 Response VO") @Data @EqualsAndHashCode(callSuper = true) @ToString(callSuper = true) public class CodegenTableRespVO extends CodegenTableBaseVO { - @ApiModelProperty(value = "编号", required = true, example = "1") + @Schema(title = "编号", required = true, example = "1") private Long id; - @ApiModelProperty(value = "主键编号", required = true, example = "1024") + @Schema(title = "主键编号", required = true, example = "1024") private Integer dataSourceConfigId; - @ApiModelProperty(value = "创建时间", required = true) + @Schema(title = "创建时间", required = true) private LocalDateTime createTime; - @ApiModelProperty(value = "更新时间", required = true) + @Schema(title = "更新时间", required = true) private LocalDateTime updateTime; } 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 1423d119ed..e2541666e3 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,16 @@ 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 lombok.Data; -@ApiModel("管理后台 - 数据库的表定义 Response VO") +@Schema(title = "管理后台 - 数据库的表定义 Response VO") @Data public class DatabaseTableRespVO { - @ApiModelProperty(value = "表名称", required = true, example = "yuanma") + @Schema(title = "表名称", required = true, example = "yuanma") private String name; - @ApiModelProperty(value = "表描述", required = true, example = "芋道源码") + @Schema(title = "表描述", required = true, example = "芋道源码") private String comment; } 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 726a10498e..cfd1ece7b8 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.service.config.ConfigService; import cn.iocoder.yudao.module.infra.enums.ErrorCodeConstants; -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, 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 774b0ac813..acd680290e 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,5 @@ 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 +14,26 @@ import javax.validation.constraints.Size; @Data public class ConfigBaseVO { - @ApiModelProperty(value = "参数分组", required = true, example = "biz") + @Schema(title = "参数分组", required = true, example = "biz") @NotEmpty(message = "参数分组不能为空") @Size(max = 50, message = "参数名称不能超过50个字符") private String category; - @ApiModelProperty(value = "参数名称", required = true, example = "数据库名") + @Schema(title = "参数名称", required = true, example = "数据库名") @NotBlank(message = "参数名称不能为空") @Size(max = 100, message = "参数名称不能超过100个字符") private String name; - @ApiModelProperty(value = "参数键值", required = true, example = "1024") + @Schema(title = "参数键值", required = true, example = "1024") @NotBlank(message = "参数键值不能为空") @Size(max = 500, message = "参数键值长度不能超过500个字符") private String value; - @ApiModelProperty(value = "是否敏感", required = true, example = "true") + @Schema(title = "是否敏感", required = true, example = "true") @NotNull(message = "是否敏感不能为空") private Boolean visible; - @ApiModelProperty(value = "备注", example = "备注一下很帅气!") + @Schema(title = "备注", example = "备注一下很帅气!") private String remark; } 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 7a2118ae1c..d9d369b203 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,19 +1,18 @@ 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 lombok.Data; import lombok.EqualsAndHashCode; import javax.validation.constraints.NotBlank; import javax.validation.constraints.Size; -@ApiModel("管理后台 - 参数配置创建 Request VO") +@Schema(title = "管理后台 - 参数配置创建 Request VO") @Data @EqualsAndHashCode(callSuper = true) public class ConfigCreateReqVO extends ConfigBaseVO { - @ApiModelProperty(value = "参数键名", required = true, example = "yunai.db.username") + @Schema(title = "参数键名", required = true, example = "yunai.db.username") @NotBlank(message = "参数键名长度不能为空") @Size(max = 100, message = "参数键名长度不能超过100个字符") private String key; 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 7c679e2d1f..6bcf83a86c 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,6 @@ 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 lombok.Data; import org.springframework.format.annotation.DateTimeFormat; @@ -9,20 +8,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(title = "管理后台 - 参数配置导出 Request VO") @Data public class ConfigExportReqVO { - @ApiModelProperty(value = "参数名称", example = "模糊匹配") + @Schema(title = "参数名称", example = "模糊匹配") private String name; - @ApiModelProperty(value = "参数键名", example = "yunai.db.username", notes = "模糊匹配") + @Schema(title = "参数键名", example = "yunai.db.username", description = "模糊匹配") private String key; - @ApiModelProperty(value = "参数类型", example = "1", notes = "参见 SysConfigTypeEnum 枚举") + @Schema(title = "参数类型", example = "1", description = "参见 SysConfigTypeEnum 枚举") private Integer type; - @ApiModelProperty(value = "创建时间", example = "[2022-07-01 00:00:00,2022-07-01 23:59:59]") + @Schema(title = "创建时间", 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; 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 5ca206d46a..34d9e5d884 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,7 @@ 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 lombok.Data; import lombok.EqualsAndHashCode; import lombok.ToString; @@ -12,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(title = "管理后台 - 参数配置分页 Request VO") @Data @EqualsAndHashCode(callSuper = true) @ToString(callSuper = true) public class ConfigPageReqVO extends PageParam { - @ApiModelProperty(value = "数据源名称", example = "模糊匹配") + @Schema(title = "数据源名称", example = "模糊匹配") private String name; - @ApiModelProperty(value = "参数键名", example = "yunai.db.username", notes = "模糊匹配") + @Schema(title = "参数键名", example = "yunai.db.username", description = "模糊匹配") private String key; - @ApiModelProperty(value = "参数类型", example = "1", notes = "参见 SysConfigTypeEnum 枚举") + @Schema(title = "参数类型", example = "1", description = "参见 SysConfigTypeEnum 枚举") private Integer type; - @ApiModelProperty(value = "创建时间", example = "[2022-07-01 00:00:00,2022-07-01 23:59:59]") + @Schema(title = "创建时间", 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; 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 0c952eecb8..e9746f9a44 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,6 @@ 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 lombok.Data; import lombok.EqualsAndHashCode; @@ -9,23 +8,23 @@ import javax.validation.constraints.NotBlank; import javax.validation.constraints.Size; import java.time.LocalDateTime; -@ApiModel("管理后台 - 参数配置信息 Response VO") +@Schema(title = "管理后台 - 参数配置信息 Response VO") @Data @EqualsAndHashCode(callSuper = true) public class ConfigRespVO extends ConfigBaseVO { - @ApiModelProperty(value = "参数配置序号", required = true, example = "1024") + @Schema(title = "参数配置序号", required = true, example = "1024") private Long id; - @ApiModelProperty(value = "参数键名", required = true, example = "yunai.db.username") + @Schema(title = "参数键名", 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(title = "参数类型", required = true, example = "1", description = "参见 SysConfigTypeEnum 枚举") private Integer type; - @ApiModelProperty(value = "创建时间", required = true, example = "时间戳格式") + @Schema(title = "创建时间", required = true, example = "时间戳格式") private LocalDateTime createTime; } 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 2335d61699..175f8a4dc0 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,20 +1,19 @@ 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 lombok.Data; import lombok.EqualsAndHashCode; import lombok.ToString; import javax.validation.constraints.NotNull; -@ApiModel("管理后台 - 参数配置创建 Request VO") +@Schema(title = "管理后台 - 参数配置创建 Request VO") @Data @EqualsAndHashCode(callSuper = true) @ToString(callSuper = true) public class ConfigUpdateReqVO extends ConfigBaseVO { - @ApiModelProperty(value = "参数配置序号", required = true, example = "1024") + @Schema(title = "参数配置序号", required = true, example = "1024") @NotNull(message = "参数配置编号不能为空") private Long id; 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 6b535ae980..366f382d7a 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,7 +63,7 @@ public class DataSourceConfigController { } @GetMapping("/list") - @ApiOperation("获得数据源配置列表") + @Operation(summary = "获得数据源配置列表") @PreAuthorize("@ss.hasPermission('infra:data-source-config:query')") public CommonResult> getDataSourceConfigList() { List list = dataSourceConfigService.getDataSourceConfigList(); 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 eb35d45555..6e05844def 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,27 +42,24 @@ public class DatabaseDocController { private static final String DOC_DESCRIPTION = "文档描述"; @GetMapping("/export-html") - @ApiOperation("导出 html 格式的数据文档") - @ApiImplicitParam(name = "deleteFile", value = "是否删除在服务器本地生成的数据库文档", example = "true", - dataTypeClass = Boolean.class) + @Operation(summary = "导出 html 格式的数据文档") + @Parameter(name = "deleteFile", description = "是否删除在服务器本地生成的数据库文档", example = "true") public void exportHtml(@RequestParam(defaultValue = "true") Boolean deleteFile, HttpServletResponse response) throws IOException { doExportFile(EngineFileType.HTML, deleteFile, response); } @GetMapping("/export-word") - @ApiOperation("导出 word 格式的数据文档") - @ApiImplicitParam(name = "deleteFile", value = "是否删除在服务器本地生成的数据库文档", example = "true", - dataTypeClass = Boolean.class) + @Operation(summary = "导出 word 格式的数据文档") + @Parameter(name = "deleteFile", description = "是否删除在服务器本地生成的数据库文档", example = "true") public void exportWord(@RequestParam(defaultValue = "true") Boolean deleteFile, HttpServletResponse response) throws IOException { doExportFile(EngineFileType.WORD, deleteFile, response); } @GetMapping("/export-markdown") - @ApiOperation("导出 markdown 格式的数据文档") - @ApiImplicitParam(name = "deleteFile", value = "是否删除在服务器本地生成的数据库文档", example = "true", - dataTypeClass = Boolean.class) + @Operation(summary = "导出 markdown 格式的数据文档") + @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 dbf25b75c0..53230df01c 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,6 @@ 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.*; /** @@ -12,15 +10,15 @@ import javax.validation.constraints.*; @Data public class DataSourceConfigBaseVO { - @ApiModelProperty(value = "数据源名称", required = true, example = "test") + @Schema(title = "数据源名称", 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(title = "数据源连接", 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(title = "用户名", required = true, example = "root") @NotNull(message = "用户名不能为空") private String username; 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 13085f9b1e..9f244c817d 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,17 +1,15 @@ 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.*; -@ApiModel("管理后台 - 数据源配置创建 Request VO") +@Schema(title = "管理后台 - 数据源配置创建 Request VO") @Data @EqualsAndHashCode(callSuper = true) @ToString(callSuper = true) public class DataSourceConfigCreateReqVO extends DataSourceConfigBaseVO { - @ApiModelProperty(value = "密码", required = true, example = "123456") + @Schema(title = "密码", required = true, example = "123456") @NotNull(message = "密码不能为空") private String password; 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 dea9187648..2f3b02faf3 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,20 +1,19 @@ 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 io.swagger.annotations.*; -@ApiModel("管理后台 - 数据源配置 Response VO") +@Schema(title = "管理后台 - 数据源配置 Response VO") @Data @EqualsAndHashCode(callSuper = true) @ToString(callSuper = true) public class DataSourceConfigRespVO extends DataSourceConfigBaseVO { - @ApiModelProperty(value = "主键编号", required = true, example = "1024") + @Schema(title = "主键编号", required = true, example = "1024") private Integer id; - @ApiModelProperty(value = "创建时间", required = true) + @Schema(title = "创建时间", required = true) private LocalDateTime createTime; } 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 134f3e9df5..019ed0a203 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,21 +1,19 @@ 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.*; -@ApiModel("管理后台 - 数据源配置更新 Request VO") +@Schema(title = "管理后台 - 数据源配置更新 Request VO") @Data @EqualsAndHashCode(callSuper = true) @ToString(callSuper = true) public class DataSourceConfigUpdateReqVO extends DataSourceConfigBaseVO { - @ApiModelProperty(value = "主键编号", required = true, example = "1024") + @Schema(title = "主键编号", required = true, example = "1024") @NotNull(message = "主键编号不能为空") private Long id; - @ApiModelProperty(value = "密码", required = true, example = "123456") + @Schema(title = "密码", required = true, example = "123456") @NotNull(message = "密码不能为空") private String password; 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 8c355d6275..1fbae09310 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,7 +80,7 @@ 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); 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 3719bc31b0..acb9360b50 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,7 +82,7 @@ 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); 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 09faa645b9..c9a1f9e4d9 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,5 @@ 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 +11,11 @@ import javax.validation.constraints.NotNull; @Data public class FileConfigBaseVO { - @ApiModelProperty(value = "配置名", required = true, example = "S3 - 阿里云") + @Schema(title = "配置名", required = true, example = "S3 - 阿里云") @NotNull(message = "配置名不能为空") private String name; - @ApiModelProperty(value = "备注", example = "我是备注") + @Schema(title = "备注", example = "我是备注") private String remark; } 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 876757920f..10602bfd96 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,6 @@ 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 lombok.Data; import lombok.EqualsAndHashCode; import lombok.ToString; @@ -9,17 +8,17 @@ import lombok.ToString; import javax.validation.constraints.NotNull; import java.util.Map; -@ApiModel("管理后台 - 文件配置创建 Request VO") +@Schema(title = "管理后台 - 文件配置创建 Request VO") @Data @EqualsAndHashCode(callSuper = true) @ToString(callSuper = true) public class FileConfigCreateReqVO extends FileConfigBaseVO { - @ApiModelProperty(value = "存储器", required = true, example = "1", notes = "参见 FileStorageEnum 枚举类") + @Schema(title = "存储器", required = true, example = "1", description = "参见 FileStorageEnum 枚举类") @NotNull(message = "存储器不能为空") private Integer storage; - @ApiModelProperty(value = "存储配置", required = true, notes = "配置是动态参数,所以使用 Map 接收") + @Schema(title = "存储配置", required = true, description = "配置是动态参数,所以使用 Map 接收") @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/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 07104cba57..a8888f7884 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,7 @@ 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 lombok.Data; import lombok.EqualsAndHashCode; import lombok.ToString; @@ -12,20 +11,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(title = "管理后台 - 文件配置分页 Request VO") @Data @EqualsAndHashCode(callSuper = true) @ToString(callSuper = true) public class FileConfigPageReqVO extends PageParam { - @ApiModelProperty(value = "配置名", example = "S3 - 阿里云") + @Schema(title = "配置名", example = "S3 - 阿里云") private String name; - @ApiModelProperty(value = "存储器", example = "1") + @Schema(title = "存储器", example = "1") private Integer storage; @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND) - @ApiModelProperty(value = "创建时间") + @Schema(title = "创建时间") private LocalDateTime[] createTime; } 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 c2341e486e..25f1ebec36 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,7 @@ 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 lombok.Data; import lombok.EqualsAndHashCode; import lombok.ToString; @@ -10,27 +9,27 @@ import lombok.ToString; import javax.validation.constraints.NotNull; import java.time.LocalDateTime; -@ApiModel("管理后台 - 文件配置 Response VO") +@Schema(title = "管理后台 - 文件配置 Response VO") @Data @EqualsAndHashCode(callSuper = true) @ToString(callSuper = true) public class FileConfigRespVO extends FileConfigBaseVO { - @ApiModelProperty(value = "编号", required = true, example = "1") + @Schema(title = "编号", required = true, example = "1") private Long id; - @ApiModelProperty(value = "存储器", required = true, example = "1", notes = "参见 FileStorageEnum 枚举类") + @Schema(title = "存储器", required = true, example = "1", description = "参见 FileStorageEnum 枚举类") @NotNull(message = "存储器不能为空") private Integer storage; - @ApiModelProperty(value = "是否为主配置", required = true, example = "true") + @Schema(title = "是否为主配置", required = true, example = "true") @NotNull(message = "是否为主配置不能为空") private Boolean master; - @ApiModelProperty(value = "存储配置", required = true) + @Schema(title = "存储配置", required = true) private FileClientConfig config; - @ApiModelProperty(value = "创建时间", required = true) + @Schema(title = "创建时间", required = true) private LocalDateTime createTime; } 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 45f8f751a1..079c67dc8f 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,6 @@ 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 lombok.Data; import lombok.EqualsAndHashCode; import lombok.ToString; @@ -9,17 +8,17 @@ import lombok.ToString; import javax.validation.constraints.NotNull; import java.util.Map; -@ApiModel("管理后台 - 文件配置更新 Request VO") +@Schema(title = "管理后台 - 文件配置更新 Request VO") @Data @EqualsAndHashCode(callSuper = true) @ToString(callSuper = true) public class FileConfigUpdateReqVO extends FileConfigBaseVO { - @ApiModelProperty(value = "编号", required = true, example = "1") + @Schema(title = "编号", required = true, example = "1") @NotNull(message = "编号不能为空") private Long id; - @ApiModelProperty(value = "存储配置", required = true, notes = "配置是动态参数,所以使用 Map 接收") + @Schema(title = "存储配置", required = true, description = "配置是动态参数,所以使用 Map 接收") @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 0f44f4fc73..823a65bd5f 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,7 @@ 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 lombok.Data; import lombok.EqualsAndHashCode; import lombok.ToString; @@ -12,20 +11,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(title = "管理后台 - 文件分页 Request VO") @Data @EqualsAndHashCode(callSuper = true) @ToString(callSuper = true) public class FilePageReqVO extends PageParam { - @ApiModelProperty(value = "文件路径", example = "yudao", notes = "模糊匹配") + @Schema(title = "文件路径", example = "yudao", description = "模糊匹配") private String path; - @ApiModelProperty(value = "文件类型", example = "application/octet-stream", notes = "模糊匹配") + @Schema(title = "文件类型", example = "application/octet-stream", description = "模糊匹配") private String type; @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND) - @ApiModelProperty(value = "创建时间") + @Schema(title = "创建时间") private LocalDateTime[] createTime; } 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 4d5cecc7a9..beccb8ccd0 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,37 +1,36 @@ 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 lombok.Data; import java.time.LocalDateTime; -@ApiModel(value = "管理后台 - 文件 Response VO", description = "不返回 content 字段,太大") +@Schema(title = "管理后台 - 文件 Response VO", description = "不返回 content 字段,太大") @Data public class FileRespVO { - @ApiModelProperty(value = "文件编号", required = true, example = "1024") + @Schema(title = "文件编号", required = true, example = "1024") private Long id; - @ApiModelProperty(value = "配置编号", required = true, example = "11") + @Schema(title = "配置编号", required = true, example = "11") private Long configId; - @ApiModelProperty(value = "文件路径", required = true, example = "yudao.jpg") + @Schema(title = "文件路径", required = true, example = "yudao.jpg") private String path; - @ApiModelProperty(value = "原文件名", required = true, example = "yudao.jpg") + @Schema(title = "原文件名", required = true, example = "yudao.jpg") private String name; - @ApiModelProperty(value = "文件 URL", required = true, example = "https://www.iocoder.cn/yudao.jpg") + @Schema(title = "文件 URL", required = true, example = "https://www.iocoder.cn/yudao.jpg") private String url; - @ApiModelProperty(value = "文件MIME类型", example = "application/octet-stream") + @Schema(title = "文件MIME类型", example = "application/octet-stream") private String type; - @ApiModelProperty(value = "文件大小", example = "2048", required = true) + @Schema(title = "文件大小", example = "2048", required = true) private Integer size; - @ApiModelProperty(value = "创建时间", required = true) + @Schema(title = "创建时间", required = true) private LocalDateTime createTime; } 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 74e00a75a8..06b54a34de 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,20 @@ 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 lombok.Data; import org.springframework.web.multipart.MultipartFile; import javax.validation.constraints.NotNull; -@ApiModel(value = "管理后台 - 上传文件 Request VO") +@Schema(title = "管理后台 - 上传文件 Request VO") @Data public class FileUploadReqVO { - @ApiModelProperty(value = "文件附件", required = true) + @Schema(title = "文件附件", required = true) @NotNull(message = "文件附件不能为空") private MultipartFile file; - @ApiModelProperty(value = "文件附件", example = "yudaoyuanma.png") + @Schema(title = "文件附件", example = "yudaoyuanma.png") private String path; } diff --git a/yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/controller/admin/job/JobController.java b/yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/controller/admin/job/JobController.java index e3fd84eda0..2574db968f 100644 --- a/yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/controller/admin/job/JobController.java +++ b/yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/controller/admin/job/JobController.java @@ -9,10 +9,10 @@ import cn.iocoder.yudao.module.infra.controller.admin.job.vo.job.*; import cn.iocoder.yudao.module.infra.convert.job.JobConvert; import cn.iocoder.yudao.module.infra.dal.dataobject.job.JobDO; import cn.iocoder.yudao.module.infra.service.job.JobService; -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.quartz.SchedulerException; import org.springframework.security.access.prepost.PreAuthorize; import org.springframework.validation.annotation.Validated; @@ -30,7 +30,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/job") @Validated @@ -40,7 +40,7 @@ public class JobController { private JobService jobService; @PostMapping("/create") - @ApiOperation("创建定时任务") + @Operation(summary = "创建定时任务") @PreAuthorize("@ss.hasPermission('infra:job:create')") public CommonResult createJob(@Valid @RequestBody JobCreateReqVO createReqVO) throws SchedulerException { @@ -48,7 +48,7 @@ public class JobController { } @PutMapping("/update") - @ApiOperation("更新定时任务") + @Operation(summary = "更新定时任务") @PreAuthorize("@ss.hasPermission('infra:job:update')") public CommonResult updateJob(@Valid @RequestBody JobUpdateReqVO updateReqVO) throws SchedulerException { @@ -57,10 +57,10 @@ public class JobController { } @PutMapping("/update-status") - @ApiOperation("更新定时任务的状态") - @ApiImplicitParams({ - @ApiImplicitParam(name = "id", value = "编号", required = true, example = "1024", dataTypeClass = Long.class), - @ApiImplicitParam(name = "status", value = "状态", required = true, example = "1", dataTypeClass = Integer.class), + @Operation(summary = "更新定时任务的状态") + @Parameters({ + @Parameter(name = "id", description = "编号", required = true, example = "1024"), + @Parameter(name = "status", description = "状态", required = true, example = "1"), }) @PreAuthorize("@ss.hasPermission('infra:job:update')") public CommonResult updateJobStatus(@RequestParam(value = "id") Long id, @RequestParam("status") Integer status) @@ -70,8 +70,8 @@ public class JobController { } @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:job:delete')") public CommonResult deleteJob(@RequestParam("id") Long id) throws SchedulerException { @@ -80,8 +80,8 @@ public class JobController { } @PutMapping("/trigger") - @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:job:trigger')") public CommonResult triggerJob(@RequestParam("id") Long id) throws SchedulerException { jobService.triggerJob(id); @@ -89,8 +89,8 @@ public class JobController { } @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:job:query')") public CommonResult getJob(@RequestParam("id") Long id) { JobDO job = jobService.getJob(id); @@ -98,8 +98,8 @@ public class JobController { } @GetMapping("/list") - @ApiOperation("获得定时任务列表") - @ApiImplicitParam(name = "ids", value = "编号列表", required = true, dataTypeClass = List.class) + @Operation(summary = "获得定时任务列表") + @Parameter(name = "ids", description = "编号列表", required = true) @PreAuthorize("@ss.hasPermission('infra:job:query')") public CommonResult> getJobList(@RequestParam("ids") Collection ids) { List list = jobService.getJobList(ids); @@ -107,7 +107,7 @@ public class JobController { } @GetMapping("/page") - @ApiOperation("获得定时任务分页") + @Operation(summary = "获得定时任务分页") @PreAuthorize("@ss.hasPermission('infra:job:query')") public CommonResult> getJobPage(@Valid JobPageReqVO pageVO) { PageResult pageResult = jobService.getJobPage(pageVO); @@ -115,7 +115,7 @@ public class JobController { } @GetMapping("/export-excel") - @ApiOperation("导出定时任务 Excel") + @Operation(summary = "导出定时任务 Excel") @PreAuthorize("@ss.hasPermission('infra:job:export')") @OperateLog(type = EXPORT) public void exportJobExcel(@Valid JobExportReqVO exportReqVO, @@ -127,10 +127,10 @@ public class JobController { } @GetMapping("/get_next_times") - @ApiOperation("获得定时任务的下 n 次执行时间") - @ApiImplicitParams({ - @ApiImplicitParam(name = "id", value = "编号", required = true, example = "1024", dataTypeClass = Long.class), - @ApiImplicitParam(name = "count", value = "数量", example = "5", dataTypeClass = Long.class) + @Operation(summary = "获得定时任务的下 n 次执行时间") + @Parameters({ + @Parameter(name = "id", description = "编号", required = true, example = "1024"), + @Parameter(name = "count", description = "数量", example = "5") }) @PreAuthorize("@ss.hasPermission('infra:job:query')") public CommonResult> getJobNextTimes(@RequestParam("id") Long id, diff --git a/yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/controller/admin/job/JobLogController.java b/yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/controller/admin/job/JobLogController.java index 40de986cf9..24f1f44b77 100644 --- a/yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/controller/admin/job/JobLogController.java +++ b/yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/controller/admin/job/JobLogController.java @@ -11,9 +11,9 @@ import cn.iocoder.yudao.module.infra.controller.admin.job.vo.log.JobLogRespVO; import cn.iocoder.yudao.module.infra.convert.job.JobLogConvert; import cn.iocoder.yudao.module.infra.dal.dataobject.job.JobLogDO; import cn.iocoder.yudao.module.infra.service.job.JobLogService; -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; @@ -31,7 +31,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/job-log") @Validated @@ -41,8 +41,8 @@ public class JobLogController { private JobLogService jobLogService; @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:job:query')") public CommonResult getJobLog(@RequestParam("id") Long id) { JobLogDO jobLog = jobLogService.getJobLog(id); @@ -50,8 +50,8 @@ public class JobLogController { } @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") @PreAuthorize("@ss.hasPermission('infra:job:query')") public CommonResult> getJobLogList(@RequestParam("ids") Collection ids) { List list = jobLogService.getJobLogList(ids); @@ -59,7 +59,7 @@ public class JobLogController { } @GetMapping("/page") - @ApiOperation("获得定时任务日志分页") + @Operation(summary = "获得定时任务日志分页") @PreAuthorize("@ss.hasPermission('infra:job:query')") public CommonResult> getJobLogPage(@Valid JobLogPageReqVO pageVO) { PageResult pageResult = jobLogService.getJobLogPage(pageVO); @@ -67,7 +67,7 @@ public class JobLogController { } @GetMapping("/export-excel") - @ApiOperation("导出定时任务日志 Excel") + @Operation(summary = "导出定时任务日志 Excel") @PreAuthorize("@ss.hasPermission('infra:job:export')") @OperateLog(type = EXPORT) public void exportJobLogExcel(@Valid JobLogExportReqVO exportReqVO, diff --git a/yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/controller/admin/job/vo/job/JobBaseVO.java b/yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/controller/admin/job/vo/job/JobBaseVO.java index db3fcac1d9..9cbecd604a 100644 --- a/yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/controller/admin/job/vo/job/JobBaseVO.java +++ b/yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/controller/admin/job/vo/job/JobBaseVO.java @@ -1,6 +1,5 @@ package cn.iocoder.yudao.module.infra.controller.admin.job.vo.job; - -import io.swagger.annotations.ApiModelProperty; +import io.swagger.v3.oas.annotations.media.Schema; import lombok.Data; import javax.validation.constraints.NotNull; @@ -12,26 +11,26 @@ import javax.validation.constraints.NotNull; @Data public class JobBaseVO { - @ApiModelProperty(value = "任务名称", required = true, example = "测试任务") + @Schema(title = "任务名称", required = true, example = "测试任务") @NotNull(message = "任务名称不能为空") private String name; - @ApiModelProperty(value = "处理器的参数", example = "yudao") + @Schema(title = "处理器的参数", example = "yudao") private String handlerParam; - @ApiModelProperty(value = "CRON 表达式", required = true, example = "0/10 * * * * ? *") + @Schema(title = "CRON 表达式", required = true, example = "0/10 * * * * ? *") @NotNull(message = "CRON 表达式不能为空") private String cronExpression; - @ApiModelProperty(value = "重试次数", required = true, example = "3") + @Schema(title = "重试次数", required = true, example = "3") @NotNull(message = "重试次数不能为空") private Integer retryCount; - @ApiModelProperty(value = "重试间隔", required = true, example = "1000") + @Schema(title = "重试间隔", required = true, example = "1000") @NotNull(message = "重试间隔不能为空") private Integer retryInterval; - @ApiModelProperty(value = "监控超时时间", example = "1000") + @Schema(title = "监控超时时间", example = "1000") private Integer monitorTimeout; } diff --git a/yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/controller/admin/job/vo/job/JobCreateReqVO.java b/yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/controller/admin/job/vo/job/JobCreateReqVO.java index 0e9f457410..f4cd23a535 100644 --- a/yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/controller/admin/job/vo/job/JobCreateReqVO.java +++ b/yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/controller/admin/job/vo/job/JobCreateReqVO.java @@ -1,20 +1,19 @@ package cn.iocoder.yudao.module.infra.controller.admin.job.vo.job; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; +import io.swagger.v3.oas.annotations.media.Schema; import lombok.Data; import lombok.EqualsAndHashCode; import lombok.ToString; import javax.validation.constraints.NotNull; -@ApiModel("管理后台 - 定时任务创建 Request VO") +@Schema(title = "管理后台 - 定时任务创建 Request VO") @Data @EqualsAndHashCode(callSuper = true) @ToString(callSuper = true) public class JobCreateReqVO extends JobBaseVO { - @ApiModelProperty(value = "处理器的名字", required = true, example = "sysUserSessionTimeoutJob") + @Schema(title = "处理器的名字", required = true, example = "sysUserSessionTimeoutJob") @NotNull(message = "处理器的名字不能为空") private String handlerName; diff --git a/yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/controller/admin/job/vo/job/JobExportReqVO.java b/yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/controller/admin/job/vo/job/JobExportReqVO.java index ec393a6045..530d8fc99c 100644 --- a/yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/controller/admin/job/vo/job/JobExportReqVO.java +++ b/yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/controller/admin/job/vo/job/JobExportReqVO.java @@ -1,20 +1,19 @@ package cn.iocoder.yudao.module.infra.controller.admin.job.vo.job; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; +import io.swagger.v3.oas.annotations.media.Schema; import lombok.Data; -@ApiModel(value = "管理后台 - 定时任务 Excel 导出 Request VO", description = "参数和 JobPageReqVO 是一致的") +@Schema(title = "管理后台 - 定时任务 Excel 导出 Request VO", description = "参数和 JobPageReqVO 是一致的") @Data public class JobExportReqVO { - @ApiModelProperty(value = "任务名称", example = "测试任务", notes = "模糊匹配") + @Schema(title = "任务名称", example = "测试任务", description = "模糊匹配") private String name; - @ApiModelProperty(value = "任务状态", example = "1", notes = "参见 JobStatusEnum 枚举") + @Schema(title = "任务状态", example = "1", description = "参见 JobStatusEnum 枚举") private Integer status; - @ApiModelProperty(value = "处理器的名字", example = "UserSessionTimeoutJob", notes = "模糊匹配") + @Schema(title = "处理器的名字", example = "UserSessionTimeoutJob", description = "模糊匹配") private String handlerName; } diff --git a/yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/controller/admin/job/vo/job/JobPageReqVO.java b/yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/controller/admin/job/vo/job/JobPageReqVO.java index 02d3a7e2bb..860a145464 100644 --- a/yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/controller/admin/job/vo/job/JobPageReqVO.java +++ b/yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/controller/admin/job/vo/job/JobPageReqVO.java @@ -1,25 +1,24 @@ package cn.iocoder.yudao.module.infra.controller.admin.job.vo.job; import cn.iocoder.yudao.framework.common.pojo.PageParam; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; +import io.swagger.v3.oas.annotations.media.Schema; import lombok.Data; import lombok.EqualsAndHashCode; import lombok.ToString; -@ApiModel("管理后台 - 定时任务分页 Request VO") +@Schema(title = "管理后台 - 定时任务分页 Request VO") @Data @EqualsAndHashCode(callSuper = true) @ToString(callSuper = true) public class JobPageReqVO extends PageParam { - @ApiModelProperty(value = "任务名称", example = "测试任务", notes = "模糊匹配") + @Schema(title = "任务名称", example = "测试任务", description = "模糊匹配") private String name; - @ApiModelProperty(value = "任务状态", example = "1", notes = "参见 JobStatusEnum 枚举") + @Schema(title = "任务状态", example = "1", description = "参见 JobStatusEnum 枚举") private Integer status; - @ApiModelProperty(value = "处理器的名字", example = "sysUserSessionTimeoutJob", notes = "模糊匹配") + @Schema(title = "处理器的名字", example = "sysUserSessionTimeoutJob", description = "模糊匹配") private String handlerName; } diff --git a/yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/controller/admin/job/vo/job/JobRespVO.java b/yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/controller/admin/job/vo/job/JobRespVO.java index 26d7f8d735..fc0c4cc976 100644 --- a/yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/controller/admin/job/vo/job/JobRespVO.java +++ b/yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/controller/admin/job/vo/job/JobRespVO.java @@ -1,7 +1,6 @@ package cn.iocoder.yudao.module.infra.controller.admin.job.vo.job; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; +import io.swagger.v3.oas.annotations.media.Schema; import lombok.Data; import lombok.EqualsAndHashCode; import lombok.ToString; @@ -9,23 +8,23 @@ import lombok.ToString; import javax.validation.constraints.NotNull; import java.time.LocalDateTime; -@ApiModel("管理后台 - 定时任务 Response VO") +@Schema(title = "管理后台 - 定时任务 Response VO") @Data @EqualsAndHashCode(callSuper = true) @ToString(callSuper = true) public class JobRespVO extends JobBaseVO { - @ApiModelProperty(value = "任务编号", required = true, example = "1024") + @Schema(title = "任务编号", required = true, example = "1024") private Long id; - @ApiModelProperty(value = "任务状态", required = true, example = "1") + @Schema(title = "任务状态", required = true, example = "1") private Integer status; - @ApiModelProperty(value = "处理器的名字", required = true, example = "sysUserSessionTimeoutJob") + @Schema(title = "处理器的名字", required = true, example = "sysUserSessionTimeoutJob") @NotNull(message = "处理器的名字不能为空") private String handlerName; - @ApiModelProperty(value = "创建时间", required = true) + @Schema(title = "创建时间", required = true) private LocalDateTime createTime; } diff --git a/yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/controller/admin/job/vo/job/JobUpdateReqVO.java b/yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/controller/admin/job/vo/job/JobUpdateReqVO.java index f26cd226ca..013522be14 100644 --- a/yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/controller/admin/job/vo/job/JobUpdateReqVO.java +++ b/yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/controller/admin/job/vo/job/JobUpdateReqVO.java @@ -1,20 +1,19 @@ package cn.iocoder.yudao.module.infra.controller.admin.job.vo.job; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; +import io.swagger.v3.oas.annotations.media.Schema; import lombok.Data; import lombok.EqualsAndHashCode; import lombok.ToString; import javax.validation.constraints.NotNull; -@ApiModel("管理后台 - 定时任务更新 Request VO") +@Schema(title = "管理后台 - 定时任务更新 Request VO") @Data @EqualsAndHashCode(callSuper = true) @ToString(callSuper = true) public class JobUpdateReqVO extends JobBaseVO { - @ApiModelProperty(value = "任务编号", required = true, example = "1024") + @Schema(title = "任务编号", required = true, example = "1024") @NotNull(message = "任务编号不能为空") private Long id; diff --git a/yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/controller/admin/job/vo/log/JobLogBaseVO.java b/yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/controller/admin/job/vo/log/JobLogBaseVO.java index 591c7a6990..03863815fd 100644 --- a/yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/controller/admin/job/vo/log/JobLogBaseVO.java +++ b/yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/controller/admin/job/vo/log/JobLogBaseVO.java @@ -1,6 +1,5 @@ package cn.iocoder.yudao.module.infra.controller.admin.job.vo.log; - -import io.swagger.annotations.ApiModelProperty; +import io.swagger.v3.oas.annotations.media.Schema; import lombok.Data; import org.springframework.format.annotation.DateTimeFormat; @@ -16,38 +15,38 @@ import static cn.iocoder.yudao.framework.common.util.date.DateUtils.FORMAT_YEAR_ @Data public class JobLogBaseVO { - @ApiModelProperty(value = "任务编号", required = true, example = "1024") + @Schema(title = "任务编号", required = true, example = "1024") @NotNull(message = "任务编号不能为空") private Long jobId; - @ApiModelProperty(value = "处理器的名字", required = true, example = "sysUserSessionTimeoutJob") + @Schema(title = "处理器的名字", required = true, example = "sysUserSessionTimeoutJob") @NotNull(message = "处理器的名字不能为空") private String handlerName; - @ApiModelProperty(value = "处理器的参数", example = "yudao") + @Schema(title = "处理器的参数", example = "yudao") private String handlerParam; - @ApiModelProperty(value = "第几次执行", required = true, example = "1") + @Schema(title = "第几次执行", required = true, example = "1") @NotNull(message = "第几次执行不能为空") private Integer executeIndex; - @ApiModelProperty(value = "开始执行时间", required = true) + @Schema(title = "开始执行时间", required = true) @NotNull(message = "开始执行时间不能为空") @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND) private LocalDateTime beginTime; - @ApiModelProperty(value = "结束执行时间") + @Schema(title = "结束执行时间") @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND) private LocalDateTime endTime; - @ApiModelProperty(value = "执行时长", example = "123") + @Schema(title = "执行时长", example = "123") private Integer duration; - @ApiModelProperty(value = "任务状态", required = true, example = "1", notes = "参见 JobLogStatusEnum 枚举") + @Schema(title = "任务状态", required = true, example = "1", description = "参见 JobLogStatusEnum 枚举") @NotNull(message = "任务状态不能为空") private Integer status; - @ApiModelProperty(value = "结果数据", example = "执行成功") + @Schema(title = "结果数据", example = "执行成功") private String result; } diff --git a/yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/controller/admin/job/vo/log/JobLogExportReqVO.java b/yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/controller/admin/job/vo/log/JobLogExportReqVO.java index 62824739fa..8a4c468a49 100644 --- a/yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/controller/admin/job/vo/log/JobLogExportReqVO.java +++ b/yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/controller/admin/job/vo/log/JobLogExportReqVO.java @@ -1,7 +1,6 @@ package cn.iocoder.yudao.module.infra.controller.admin.job.vo.log; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; +import io.swagger.v3.oas.annotations.media.Schema; import lombok.Data; import org.springframework.format.annotation.DateTimeFormat; @@ -9,25 +8,25 @@ 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 = "参数和 JobLogPageReqVO 是一致的") +@Schema(title = "管理后台 - 定时任务 Excel 导出 Request VO", description = "参数和 JobLogPageReqVO 是一致的") @Data public class JobLogExportReqVO { - @ApiModelProperty(value = "任务编号", example = "10") + @Schema(title = "任务编号", example = "10") private Long jobId; - @ApiModelProperty(value = "处理器的名字", notes = "模糊匹配") + @Schema(title = "处理器的名字", description = "模糊匹配") private String handlerName; @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND) - @ApiModelProperty(value = "开始执行时间") + @Schema(title = "开始执行时间") private LocalDateTime beginTime; @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND) - @ApiModelProperty(value = "结束执行时间") + @Schema(title = "结束执行时间") private LocalDateTime endTime; - @ApiModelProperty(value = "任务状态", notes = "参见 JobLogStatusEnum 枚举") + @Schema(title = "任务状态", description = "参见 JobLogStatusEnum 枚举") private Integer status; } diff --git a/yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/controller/admin/job/vo/log/JobLogPageReqVO.java b/yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/controller/admin/job/vo/log/JobLogPageReqVO.java index 6a71c4d3e3..6be08ce523 100644 --- a/yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/controller/admin/job/vo/log/JobLogPageReqVO.java +++ b/yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/controller/admin/job/vo/log/JobLogPageReqVO.java @@ -1,8 +1,7 @@ package cn.iocoder.yudao.module.infra.controller.admin.job.vo.log; import cn.iocoder.yudao.framework.common.pojo.PageParam; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; +import io.swagger.v3.oas.annotations.media.Schema; import lombok.Data; import lombok.EqualsAndHashCode; import lombok.ToString; @@ -12,27 +11,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(title = "管理后台 - 定时任务日志分页 Request VO") @Data @EqualsAndHashCode(callSuper = true) @ToString(callSuper = true) public class JobLogPageReqVO extends PageParam { - @ApiModelProperty(value = "任务编号", example = "10") + @Schema(title = "任务编号", example = "10") private Long jobId; - @ApiModelProperty(value = "处理器的名字", notes = "模糊匹配") + @Schema(title = "处理器的名字", description = "模糊匹配") private String handlerName; @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND) - @ApiModelProperty(value = "开始执行时间") + @Schema(title = "开始执行时间") private LocalDateTime beginTime; @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND) - @ApiModelProperty(value = "结束执行时间") + @Schema(title = "结束执行时间") private LocalDateTime endTime; - @ApiModelProperty(value = "任务状态", notes = "参见 JobLogStatusEnum 枚举") + @Schema(title = "任务状态", description = "参见 JobLogStatusEnum 枚举") private Integer status; } diff --git a/yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/controller/admin/job/vo/log/JobLogRespVO.java b/yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/controller/admin/job/vo/log/JobLogRespVO.java index 611c87b581..e0412950b7 100644 --- a/yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/controller/admin/job/vo/log/JobLogRespVO.java +++ b/yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/controller/admin/job/vo/log/JobLogRespVO.java @@ -1,23 +1,22 @@ package cn.iocoder.yudao.module.infra.controller.admin.job.vo.log; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; +import io.swagger.v3.oas.annotations.media.Schema; import lombok.Data; import lombok.EqualsAndHashCode; import lombok.ToString; import java.time.LocalDateTime; -@ApiModel("管理后台 - 定时任务日志 Response VO") +@Schema(title = "管理后台 - 定时任务日志 Response VO") @Data @EqualsAndHashCode(callSuper = true) @ToString(callSuper = true) public class JobLogRespVO extends JobLogBaseVO { - @ApiModelProperty(value = "日志编号", required = true, example = "1024") + @Schema(title = "日志编号", required = true, example = "1024") private Long id; - @ApiModelProperty(value = "创建时间", required = true) + @Schema(title = "创建时间", required = true) private LocalDateTime createTime; } 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 5046ea5af6..641e1c23b5 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, 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 d592836b2e..191bd94d0d 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, 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 077f26133c..e819c3d817 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,5 @@ 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 +15,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(title = "链路追踪编号", required = true, example = "66600cb6-7852-11eb-9439-0242ac130002") @NotNull(message = "链路追踪编号不能为空") private String traceId; - @ApiModelProperty(value = "用户编号", required = true, example = "666") + @Schema(title = "用户编号", required = true, example = "666") @NotNull(message = "用户编号不能为空") private Long userId; - @ApiModelProperty(value = "用户类型", required = true, example = "2", notes = "参见 UserTypeEnum 枚举") + @Schema(title = "用户类型", required = true, example = "2", description = "参见 UserTypeEnum 枚举") @NotNull(message = "用户类型不能为空") private Integer userType; - @ApiModelProperty(value = "应用名", required = true, example = "dashboard") + @Schema(title = "应用名", required = true, example = "dashboard") @NotNull(message = "应用名不能为空") private String applicationName; - @ApiModelProperty(value = "请求方法名", required = true, example = "GET") + @Schema(title = "请求方法名", required = true, example = "GET") @NotNull(message = "请求方法名不能为空") private String requestMethod; - @ApiModelProperty(value = "请求地址", required = true, example = "/xxx/yyy") + @Schema(title = "请求地址", required = true, example = "/xxx/yyy") @NotNull(message = "请求地址不能为空") private String requestUrl; - @ApiModelProperty(value = "请求参数") + @Schema(title = "请求参数") private String requestParams; - @ApiModelProperty(value = "用户 IP", required = true, example = "127.0.0.1") + @Schema(title = "用户 IP", required = true, example = "127.0.0.1") @NotNull(message = "用户 IP不能为空") private String userIp; - @ApiModelProperty(value = "浏览器 UA", required = true, example = "Mozilla/5.0") + @Schema(title = "浏览器 UA", required = true, example = "Mozilla/5.0") @NotNull(message = "浏览器 UA不能为空") private String userAgent; - @ApiModelProperty(value = "开始请求时间", required = true) + @Schema(title = "开始请求时间", required = true) @NotNull(message = "开始请求时间不能为空") @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND) private LocalDateTime beginTime; - @ApiModelProperty(value = "结束请求时间", required = true) + @Schema(title = "结束请求时间", required = true) @NotNull(message = "结束请求时间不能为空") @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND) private LocalDateTime endTime; - @ApiModelProperty(value = "执行时长", required = true, example = "100") + @Schema(title = "执行时长", required = true, example = "100") @NotNull(message = "执行时长不能为空") private Integer duration; - @ApiModelProperty(value = "结果码", required = true, example = "0") + @Schema(title = "结果码", required = true, example = "0") @NotNull(message = "结果码不能为空") private Integer resultCode; - @ApiModelProperty(value = "结果提示", example = "芋道源码,牛逼!") + @Schema(title = "结果提示", example = "芋道源码,牛逼!") private String resultMsg; } 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 228ac3c86a..70cd57afe4 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,6 @@ 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 lombok.Data; import org.springframework.format.annotation.DateTimeFormat; @@ -9,30 +8,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(title = "管理后台 - API 访问日志 Excel 导出 Request VO", description = "参数和 ApiAccessLogPageReqVO 是一致的") @Data public class ApiAccessLogExportReqVO { - @ApiModelProperty(value = "用户编号", example = "666") + @Schema(title = "用户编号", example = "666") private Long userId; - @ApiModelProperty(value = "用户类型", example = "2") + @Schema(title = "用户类型", example = "2") private Integer userType; - @ApiModelProperty(value = "应用名", example = "dashboard") + @Schema(title = "应用名", example = "dashboard") private String applicationName; - @ApiModelProperty(value = "请求地址", example = "/xxx/yyy", notes = "模糊匹配") + @Schema(title = "请求地址", example = "/xxx/yyy", description = "模糊匹配") private String requestUrl; @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND) - @ApiModelProperty(value = "开始请求时间") + @Schema(title = "开始请求时间") private LocalDateTime[] beginTime; - @ApiModelProperty(value = "执行时长", example = "100", notes = "大于等于,单位:毫秒") + @Schema(title = "执行时长", example = "100", description = "大于等于,单位:毫秒") private Integer duration; - @ApiModelProperty(value = "结果码", example = "0") + @Schema(title = "结果码", example = "0") private Integer resultCode; } 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 62b4eeea84..ca10744508 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,7 @@ 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 lombok.Data; import lombok.EqualsAndHashCode; import lombok.ToString; @@ -12,32 +11,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(title = "管理后台 - API 访问日志分页 Request VO") @Data @EqualsAndHashCode(callSuper = true) @ToString(callSuper = true) public class ApiAccessLogPageReqVO extends PageParam { - @ApiModelProperty(value = "用户编号", example = "666") + @Schema(title = "用户编号", example = "666") private Long userId; - @ApiModelProperty(value = "用户类型", example = "2") + @Schema(title = "用户类型", example = "2") private Integer userType; - @ApiModelProperty(value = "应用名", example = "dashboard") + @Schema(title = "应用名", example = "dashboard") private String applicationName; - @ApiModelProperty(value = "请求地址", example = "/xxx/yyy", notes = "模糊匹配") + @Schema(title = "请求地址", example = "/xxx/yyy", description = "模糊匹配") private String requestUrl; @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND) - @ApiModelProperty(value = "开始请求时间") + @Schema(title = "开始请求时间") private LocalDateTime[] beginTime; - @ApiModelProperty(value = "执行时长", example = "100", notes = "大于等于,单位:毫秒") + @Schema(title = "执行时长", example = "100", description = "大于等于,单位:毫秒") private Integer duration; - @ApiModelProperty(value = "结果码", example = "0") + @Schema(title = "结果码", example = "0") private Integer resultCode; } 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 2a6125d38a..9ab73751e4 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,22 @@ 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 lombok.Data; import lombok.EqualsAndHashCode; import lombok.ToString; import java.time.LocalDateTime; -@ApiModel("管理后台 - API 访问日志 Response VO") +@Schema(title = "管理后台 - API 访问日志 Response VO") @Data @EqualsAndHashCode(callSuper = true) @ToString(callSuper = true) public class ApiAccessLogRespVO extends ApiAccessLogBaseVO { - @ApiModelProperty(value = "日志主键", required = true, example = "1024") + @Schema(title = "日志主键", required = true, example = "1024") private Long id; - @ApiModelProperty(value = "创建时间", required = true) + @Schema(title = "创建时间", required = true) private LocalDateTime createTime; } 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 ad0b44368f..c05b0f2e7b 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,5 @@ 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,80 +15,80 @@ 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(title = "链路追踪编号", required = true, example = "66600cb6-7852-11eb-9439-0242ac130002") @NotNull(message = "链路追踪编号不能为空") private String traceId; - @ApiModelProperty(value = "用户编号", required = true, example = "666") + @Schema(title = "用户编号", required = true, example = "666") @NotNull(message = "用户编号不能为空") private Integer userId; - @ApiModelProperty(value = "用户类型", required = true, example = "1") + @Schema(title = "用户类型", required = true, example = "1") @NotNull(message = "用户类型不能为空") private Integer userType; - @ApiModelProperty(value = "应用名", required = true, example = "dashboard") + @Schema(title = "应用名", required = true, example = "dashboard") @NotNull(message = "应用名不能为空") private String applicationName; - @ApiModelProperty(value = "请求方法名", required = true, example = "GET") + @Schema(title = "请求方法名", required = true, example = "GET") @NotNull(message = "请求方法名不能为空") private String requestMethod; - @ApiModelProperty(value = "请求地址", required = true, example = "/xx/yy") + @Schema(title = "请求地址", required = true, example = "/xx/yy") @NotNull(message = "请求地址不能为空") private String requestUrl; - @ApiModelProperty(value = "请求参数", required = true) + @Schema(title = "请求参数", required = true) @NotNull(message = "请求参数不能为空") private String requestParams; - @ApiModelProperty(value = "用户 IP", required = true, example = "127.0.0.1") + @Schema(title = "用户 IP", required = true, example = "127.0.0.1") @NotNull(message = "用户 IP不能为空") private String userIp; - @ApiModelProperty(value = "浏览器 UA", required = true, example = "Mozilla/5.0") + @Schema(title = "浏览器 UA", required = true, example = "Mozilla/5.0") @NotNull(message = "浏览器 UA不能为空") private String userAgent; - @ApiModelProperty(value = "异常发生时间", required = true) + @Schema(title = "异常发生时间", required = true) @NotNull(message = "异常发生时间不能为空") @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND) private LocalDateTime exceptionTime; - @ApiModelProperty(value = "异常名", required = true) + @Schema(title = "异常名", required = true) @NotNull(message = "异常名不能为空") private String exceptionName; - @ApiModelProperty(value = "异常导致的消息", required = true) + @Schema(title = "异常导致的消息", required = true) @NotNull(message = "异常导致的消息不能为空") private String exceptionMessage; - @ApiModelProperty(value = "异常导致的根消息", required = true) + @Schema(title = "异常导致的根消息", required = true) @NotNull(message = "异常导致的根消息不能为空") private String exceptionRootCauseMessage; - @ApiModelProperty(value = "异常的栈轨迹", required = true) + @Schema(title = "异常的栈轨迹", required = true) @NotNull(message = "异常的栈轨迹不能为空") private String exceptionStackTrace; - @ApiModelProperty(value = "异常发生的类全名", required = true) + @Schema(title = "异常发生的类全名", required = true) @NotNull(message = "异常发生的类全名不能为空") private String exceptionClassName; - @ApiModelProperty(value = "异常发生的类文件", required = true) + @Schema(title = "异常发生的类文件", required = true) @NotNull(message = "异常发生的类文件不能为空") private String exceptionFileName; - @ApiModelProperty(value = "异常发生的方法名", required = true) + @Schema(title = "异常发生的方法名", required = true) @NotNull(message = "异常发生的方法名不能为空") private String exceptionMethodName; - @ApiModelProperty(value = "异常发生的方法所在行", required = true) + @Schema(title = "异常发生的方法所在行", required = true) @NotNull(message = "异常发生的方法所在行不能为空") private Integer exceptionLineNumber; - @ApiModelProperty(value = "处理状态", required = true, example = "0") + @Schema(title = "处理状态", required = true, example = "0") @NotNull(message = "处理状态不能为空") private Integer processStatus; 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 e2c2411383..a5b1698ced 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,6 @@ 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 lombok.Data; import org.springframework.format.annotation.DateTimeFormat; @@ -9,27 +8,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(title = "管理后台 - API 错误日志 Excel 导出 Request VO", description = "参数和 ApiErrorLogPageReqVO 是一致的") @Data public class ApiErrorLogExportReqVO { - @ApiModelProperty(value = "用户编号", example = "666") + @Schema(title = "用户编号", example = "666") private Long userId; - @ApiModelProperty(value = "用户类型", example = "1") + @Schema(title = "用户类型", example = "1") private Integer userType; - @ApiModelProperty(value = "应用名", example = "dashboard") + @Schema(title = "应用名", example = "dashboard") private String applicationName; - @ApiModelProperty(value = "请求地址", example = "/xx/yy") + @Schema(title = "请求地址", example = "/xx/yy") private String requestUrl; @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND) - @ApiModelProperty(value = "异常发生时间") + @Schema(title = "异常发生时间") private LocalDateTime[] exceptionTime; - @ApiModelProperty(value = "处理状态", example = "0") + @Schema(title = "处理状态", example = "0") private Integer processStatus; } 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 56496325d9..eb759c6806 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,7 @@ 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 lombok.Data; import lombok.EqualsAndHashCode; import lombok.ToString; @@ -12,29 +11,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(title = "管理后台 - API 错误日志分页 Request VO") @Data @EqualsAndHashCode(callSuper = true) @ToString(callSuper = true) public class ApiErrorLogPageReqVO extends PageParam { - @ApiModelProperty(value = "用户编号", example = "666") + @Schema(title = "用户编号", example = "666") private Long userId; - @ApiModelProperty(value = "用户类型", example = "1") + @Schema(title = "用户类型", example = "1") private Integer userType; - @ApiModelProperty(value = "应用名", example = "dashboard") + @Schema(title = "应用名", example = "dashboard") private String applicationName; - @ApiModelProperty(value = "请求地址", example = "/xx/yy") + @Schema(title = "请求地址", example = "/xx/yy") private String requestUrl; @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND) - @ApiModelProperty(value = "异常发生时间") + @Schema(title = "异常发生时间") private LocalDateTime[] exceptionTime; - @ApiModelProperty(value = "处理状态", example = "0") + @Schema(title = "处理状态", example = "0") private Integer processStatus; } 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 c108b548c0..d0a93f2a9c 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,28 @@ 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 lombok.Data; import lombok.EqualsAndHashCode; import lombok.ToString; import java.time.LocalDateTime; -@ApiModel("管理后台 - API 错误日志 Response VO") +@Schema(title = "管理后台 - API 错误日志 Response VO") @Data @EqualsAndHashCode(callSuper = true) @ToString(callSuper = true) public class ApiErrorLogRespVO extends ApiErrorLogBaseVO { - @ApiModelProperty(value = "编号", required = true, example = "1024") + @Schema(title = "编号", required = true, example = "1024") private Integer id; - @ApiModelProperty(value = "创建时间", required = true) + @Schema(title = "创建时间", required = true) private LocalDateTime createTime; - @ApiModelProperty(value = "处理时间", required = true) + @Schema(title = "处理时间", required = true) private LocalDateTime processTime; - @ApiModelProperty(value = "处理用户编号", example = "233") + @Schema(title = "处理用户编号", example = "233") private Integer processUserId; } 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 3e66b3348e..c82b21cda4 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; @@ -25,7 +25,7 @@ import java.util.*; import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success; -@Api(tags = "管理后台 - Redis 监控") +@Tag(name = "管理后台 - Redis 监控") @RestController @RequestMapping("/infra/redis") public class RedisController { @@ -34,7 +34,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 统计信息 @@ -48,7 +48,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(); @@ -56,8 +56,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)); @@ -80,8 +80,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); @@ -89,8 +89,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); @@ -98,8 +98,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); 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 4c1b5acd8c..c2b7836a81 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,35 @@ 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 lombok.AllArgsConstructor; import lombok.Builder; import lombok.Data; import java.time.Duration; -@ApiModel("管理后台 - Redis Key 信息 Response VO") +@Schema(title = "管理后台 - Redis Key 信息 Response VO") @Data @Builder @AllArgsConstructor public class RedisKeyDefineRespVO { - @ApiModelProperty(value = "Key 模板", required = true, example = "login_user:%s") + @Schema(title = "Key 模板", required = true, example = "login_user:%s") private String keyTemplate; - @ApiModelProperty(value = "Key 类型的枚举", required = true, example = "String") + @Schema(title = "Key 类型的枚举", required = true, example = "String") private RedisKeyDefine.KeyTypeEnum keyType; - @ApiModelProperty(value = "Value 类型", required = true, example = "java.lang.String") + @Schema(title = "Value 类型", required = true, example = "java.lang.String") private Class valueType; - @ApiModelProperty(value = "超时类型", required = true, example = "1") + @Schema(title = "超时类型", required = true, example = "1") private RedisKeyDefine.TimeoutTypeEnum timeoutType; - @ApiModelProperty(value = "过期时间,单位:毫秒", required = true, example = "1024") + @Schema(title = "过期时间,单位:毫秒", required = true, example = "1024") private Duration timeout; - @ApiModelProperty(value = "备注", required = true, example = "啦啦啦啦~") + @Schema(title = "备注", required = true, example = "啦啦啦啦~") private String memo; } 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 0f16f0640a..71d4c1ec23 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,18 @@ 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 lombok.AllArgsConstructor; import lombok.Data; -@ApiModel("管理后台 - 单个 Redis Key Value Response VO") +@Schema(title = "管理后台 - 单个 Redis Key Value Response VO") @Data @AllArgsConstructor public class RedisKeyValueRespVO { - @ApiModelProperty(value = "c5f6990767804a928f4bb96ca249febf", required = true, example = "String") + @Schema(title = "c5f6990767804a928f4bb96ca249febf", required = true, example = "String") private String key; - @ApiModelProperty(required = true, example = "String") + @Schema(required = true, example = "String") private String value; } 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 73b0cfc9fe..42b8419eac 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,6 @@ 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 lombok.AllArgsConstructor; import lombok.Builder; import lombok.Data; @@ -9,34 +8,34 @@ import lombok.Data; import java.util.List; import java.util.Properties; -@ApiModel("管理后台 - Redis 监控信息 Response VO") +@Schema(title = "管理后台 - Redis 监控信息 Response VO") @Data @Builder @AllArgsConstructor public class RedisMonitorRespVO { - @ApiModelProperty(value = "Redis info 指令结果", required = true, notes = "具体字段,查看 Redis 文档") + @Schema(title = "Redis info 指令结果", required = true, description = "具体字段,查看 Redis 文档") private Properties info; - @ApiModelProperty(value = "Redis key 数量", required = true, example = "1024") + @Schema(title = "Redis key 数量", required = true, example = "1024") private Long dbSize; - @ApiModelProperty(value = "CommandStat 数组", required = true) + @Schema(title = "CommandStat 数组", required = true) private List commandStats; - @ApiModel("Redis 命令统计结果") + @Schema(title = "Redis 命令统计结果") @Data @Builder @AllArgsConstructor public static class CommandStat { - @ApiModelProperty(value = "Redis 命令", required = true, example = "get") + @Schema(title = "Redis 命令", required = true, example = "get") private String command; - @ApiModelProperty(value = "调用次数", required = true, example = "1024") + @Schema(title = "调用次数", required = true, example = "1024") private Long calls; - @ApiModelProperty(value = "消耗 CPU 秒数", required = true, example = "666") + @Schema(title = "消耗 CPU 秒数", required = true, example = "666") private Long usec; } 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 a534b7dafd..b64b491782 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") @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 { 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 1f657938e7..5f78f48f71 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,6 @@ 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.*; /** @@ -12,23 +10,23 @@ import javax.validation.constraints.*; @Data public class TestDemoBaseVO { - @ApiModelProperty(value = "名字", required = true) + @Schema(title = "名字", required = true) @NotNull(message = "名字不能为空") private String name; - @ApiModelProperty(value = "状态", required = true) + @Schema(title = "状态", required = true) @NotNull(message = "状态不能为空") private Integer status; - @ApiModelProperty(value = "类型", required = true) + @Schema(title = "类型", required = true) @NotNull(message = "类型不能为空") private Integer type; - @ApiModelProperty(value = "分类", required = true) + @Schema(title = "分类", required = true) @NotNull(message = "分类不能为空") private Integer category; - @ApiModelProperty(value = "备注") + @Schema(title = "备注") private String remark; } 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 d932daac61..f2b2786e51 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,9 +1,8 @@ package cn.iocoder.yudao.module.infra.controller.admin.test.vo; - +import io.swagger.v3.oas.annotations.media.Schema; import lombok.*; -import io.swagger.annotations.*; -@ApiModel("管理后台 - 字典类型创建 Request VO") +@Schema(title = "管理后台 - 字典类型创建 Request VO") @Data @EqualsAndHashCode(callSuper = true) @ToString(callSuper = true) 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 8c386d4c1c..e12d753d4a 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,34 +1,33 @@ package cn.iocoder.yudao.module.infra.controller.admin.test.vo; - +import io.swagger.v3.oas.annotations.media.Schema; import lombok.*; import java.time.LocalDateTime; -import io.swagger.annotations.*; import org.springframework.format.annotation.DateTimeFormat; 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(title = "管理后台 - 字典类型 Excel 导出 Request VO", description = "参数和 TestDemoPageReqVO 是一致的") @Data public class TestDemoExportReqVO { - @ApiModelProperty(value = "名字") + @Schema(title = "名字") private String name; - @ApiModelProperty(value = "状态") + @Schema(title = "状态") private Integer status; - @ApiModelProperty(value = "类型") + @Schema(title = "类型") private Integer type; - @ApiModelProperty(value = "分类") + @Schema(title = "分类") private Integer category; - @ApiModelProperty(value = "备注") + @Schema(title = "备注") private String remark; @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND) - @ApiModelProperty(value = "创建时间") + @Schema(title = "创建时间") private LocalDateTime[] createTime; } 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 56b14c3d46..6881e17e21 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,37 +1,36 @@ package cn.iocoder.yudao.module.infra.controller.admin.test.vo; - +import io.swagger.v3.oas.annotations.media.Schema; import lombok.*; import java.time.LocalDateTime; -import io.swagger.annotations.*; import cn.iocoder.yudao.framework.common.pojo.PageParam; 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(title = "管理后台 - 字典类型分页 Request VO") @Data @EqualsAndHashCode(callSuper = true) @ToString(callSuper = true) public class TestDemoPageReqVO extends PageParam { - @ApiModelProperty(value = "名字") + @Schema(title = "名字") private String name; - @ApiModelProperty(value = "状态") + @Schema(title = "状态") private Integer status; - @ApiModelProperty(value = "类型") + @Schema(title = "类型") private Integer type; - @ApiModelProperty(value = "分类") + @Schema(title = "分类") private Integer category; - @ApiModelProperty(value = "备注") + @Schema(title = "备注") private String remark; @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND) - @ApiModelProperty(value = "创建时间") + @Schema(title = "创建时间") private LocalDateTime[] createTime; } 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 4b38ee401a..95af5b4b4a 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,20 +1,19 @@ package cn.iocoder.yudao.module.infra.controller.admin.test.vo; - +import io.swagger.v3.oas.annotations.media.Schema; import lombok.*; import java.time.LocalDateTime; -import io.swagger.annotations.*; -@ApiModel("管理后台 - 字典类型 Response VO") +@Schema(title = "管理后台 - 字典类型 Response VO") @Data @EqualsAndHashCode(callSuper = true) @ToString(callSuper = true) public class TestDemoRespVO extends TestDemoBaseVO { - @ApiModelProperty(value = "编号", required = true) + @Schema(title = "编号", required = true) private Long id; - @ApiModelProperty(value = "创建时间", required = true) + @Schema(title = "创建时间", required = true) private LocalDateTime createTime; } 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 59d56b4da0..7c8315381d 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,16 +1,15 @@ 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.*; -@ApiModel("管理后台 - 字典类型更新 Request VO") +@Schema(title = "管理后台 - 字典类型更新 Request VO") @Data @EqualsAndHashCode(callSuper = true) @ToString(callSuper = true) public class TestDemoUpdateReqVO extends TestDemoBaseVO { - @ApiModelProperty(value = "编号", required = true) + @Schema(title = "编号", required = true) @NotNull(message = "编号不能为空") private Long id; 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 c99cc1a8d6..01b5714ba1 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 @@ -23,7 +23,9 @@ public class SecurityConfiguration { @Override public void customize(ExpressionUrlAuthorizationConfigurer.ExpressionInterceptUrlRegistry registry) { // Swagger 接口文档 - registry.antMatchers("/swagger-ui.html").anonymous() + registry.antMatchers("/v3/api-docs/**").permitAll() + .antMatchers("/swagger-ui.html").permitAll() + .antMatchers("/swagger-ui/**").permitAll() .antMatchers("/swagger-resources/**").anonymous() .antMatchers("/webjars/**").anonymous() .antMatchers("/*/api-docs").anonymous(); diff --git a/yudao-module-infra/yudao-module-infra-biz/src/main/resources/codegen/java/controller/controller.vm b/yudao-module-infra/yudao-module-infra-biz/src/main/resources/codegen/java/controller/controller.vm index 5b05467774..0296df771e 100644 --- a/yudao-module-infra/yudao-module-infra-biz/src/main/resources/codegen/java/controller/controller.vm +++ b/yudao-module-infra/yudao-module-infra-biz/src/main/resources/codegen/java/controller/controller.vm @@ -27,7 +27,7 @@ import ${basePackage}.module.${table.moduleName}.dal.dataobject.${table.business import ${basePackage}.module.${table.moduleName}.convert.${table.businessName}.${table.className}Convert; import ${basePackage}.module.${table.moduleName}.service.${table.businessName}.${table.className}Service; -@Api(tags = "${sceneEnum.name} - ${table.classComment}") +@Tag(name = "${sceneEnum.name} - ${table.classComment}") @RestController ##二级的 businessName 暂时不算在 HTTP 路径上,可以根据需要写 @RequestMapping("/${table.moduleName}/${simpleClassName_strikeCase}") @@ -38,7 +38,7 @@ public class ${sceneEnum.prefixClass}${table.className}Controller { private ${table.className}Service ${classNameVar}Service; @PostMapping("/create") - @ApiOperation("创建${table.classComment}") + @Operation(summary = "创建${table.classComment}") #if ($sceneEnum.scene == 1) @PreAuthorize("@ss.hasPermission('${permissionPrefix}:create')")#end public CommonResult<${primaryColumn.javaType}> create${simpleClassName}(@Valid @RequestBody ${sceneEnum.prefixClass}${table.className}CreateReqVO createReqVO) { @@ -46,7 +46,7 @@ public class ${sceneEnum.prefixClass}${table.className}Controller { } @PutMapping("/update") - @ApiOperation("更新${table.classComment}") + @Operation(summary = "更新${table.classComment}") #if ($sceneEnum.scene == 1) @PreAuthorize("@ss.hasPermission('${permissionPrefix}:update')")#end public CommonResult update${simpleClassName}(@Valid @RequestBody ${sceneEnum.prefixClass}${table.className}UpdateReqVO updateReqVO) { @@ -55,8 +55,8 @@ public class ${sceneEnum.prefixClass}${table.className}Controller { } @DeleteMapping("/delete") - @ApiOperation("删除${table.classComment}") - @ApiImplicitParam(name = "id", value = "编号", required = true, dataTypeClass = ${primaryColumn.javaType}.class) + @Operation(summary = "删除${table.classComment}") + @Parameter(name = "id", description = "编号", required = true) #if ($sceneEnum.scene == 1) @PreAuthorize("@ss.hasPermission('${permissionPrefix}:delete')")#end public CommonResult delete${simpleClassName}(@RequestParam("id") ${primaryColumn.javaType} id) { @@ -65,8 +65,8 @@ public class ${sceneEnum.prefixClass}${table.className}Controller { } @GetMapping("/get") - @ApiOperation("获得${table.classComment}") - @ApiImplicitParam(name = "id", value = "编号", required = true, example = "1024", dataTypeClass = ${primaryColumn.javaType}.class) + @Operation(summary = "获得${table.classComment}") + @Parameter(name = "id", description = "编号", required = true, example = "1024") #if ($sceneEnum.scene == 1) @PreAuthorize("@ss.hasPermission('${permissionPrefix}:query')")#end public CommonResult<${sceneEnum.prefixClass}${table.className}RespVO> get${simpleClassName}(@RequestParam("id") ${primaryColumn.javaType} id) { @@ -75,8 +75,8 @@ public class ${sceneEnum.prefixClass}${table.className}Controller { } @GetMapping("/list") - @ApiOperation("获得${table.classComment}列表") - @ApiImplicitParam(name = "ids", value = "编号列表", required = true, example = "1024,2048", dataTypeClass = List.class) + @Operation(summary = "获得${table.classComment}列表") + @Parameter(name = "ids", description = "编号列表", required = true, example = "1024,2048") #if ($sceneEnum.scene == 1) @PreAuthorize("@ss.hasPermission('${permissionPrefix}:query')")#end public CommonResult> get${simpleClassName}List(@RequestParam("ids") Collection<${primaryColumn.javaType}> ids) { @@ -85,7 +85,7 @@ public class ${sceneEnum.prefixClass}${table.className}Controller { } @GetMapping("/page") - @ApiOperation("获得${table.classComment}分页") + @Operation(summary = "获得${table.classComment}分页") #if ($sceneEnum.scene == 1) @PreAuthorize("@ss.hasPermission('${permissionPrefix}:query')")#end public CommonResult> get${simpleClassName}Page(@Valid ${sceneEnum.prefixClass}${table.className}PageReqVO pageVO) { @@ -94,7 +94,7 @@ public class ${sceneEnum.prefixClass}${table.className}Controller { } @GetMapping("/export-excel") - @ApiOperation("导出${table.classComment} Excel") + @Operation(summary = "导出${table.classComment} Excel") #if ($sceneEnum.scene == 1) @PreAuthorize("@ss.hasPermission('${permissionPrefix}:export')")#end @OperateLog(type = EXPORT) diff --git a/yudao-module-infra/yudao-module-infra-biz/src/main/resources/codegen/java/controller/vo/_column.vm b/yudao-module-infra/yudao-module-infra-biz/src/main/resources/codegen/java/controller/vo/_column.vm index 69477d433b..71c4eebf8c 100644 --- a/yudao-module-infra/yudao-module-infra-biz/src/main/resources/codegen/java/controller/vo/_column.vm +++ b/yudao-module-infra/yudao-module-infra-biz/src/main/resources/codegen/java/controller/vo/_column.vm @@ -1,5 +1,5 @@ ## 提供给 baseVO、createVO、updateVO 生成字段 - @ApiModelProperty(value = "${column.columnComment}"#if (!${column.nullable}), required = true#end#if ("$!column.example" != ""), example = "${column.example}"#end) + @Schema(title = "${column.columnComment}"#if (!${column.nullable}), required = true#end#if ("$!column.example" != ""), example = "${column.example}"#end) #if (!${column.nullable})## 判断 @NotEmpty 和 @NotNull 注解 #if (${field.fieldType} == 'String') @NotEmpty(message = "${column.columnComment}不能为空") diff --git a/yudao-module-infra/yudao-module-infra-biz/src/main/resources/codegen/java/controller/vo/createReqVO.vm b/yudao-module-infra/yudao-module-infra-biz/src/main/resources/codegen/java/controller/vo/createReqVO.vm index bf6408c9c5..315faf7fc6 100644 --- a/yudao-module-infra/yudao-module-infra-biz/src/main/resources/codegen/java/controller/vo/createReqVO.vm +++ b/yudao-module-infra/yudao-module-infra-biz/src/main/resources/codegen/java/controller/vo/createReqVO.vm @@ -15,7 +15,7 @@ import static ${DateUtilsClassName}.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND; #end #end -@ApiModel("${sceneEnum.name} - ${table.classComment}创建 Request VO") +@Schema(title = "${sceneEnum.name} - ${table.classComment}创建 Request VO") @Data @EqualsAndHashCode(callSuper = true) @ToString(callSuper = true) diff --git a/yudao-module-infra/yudao-module-infra-biz/src/main/resources/codegen/java/controller/vo/exportReqVO.vm b/yudao-module-infra/yudao-module-infra-biz/src/main/resources/codegen/java/controller/vo/exportReqVO.vm index cd68dd82e4..749a43e255 100644 --- a/yudao-module-infra/yudao-module-infra-biz/src/main/resources/codegen/java/controller/vo/exportReqVO.vm +++ b/yudao-module-infra/yudao-module-infra-biz/src/main/resources/codegen/java/controller/vo/exportReqVO.vm @@ -16,18 +16,18 @@ import static ${DateUtilsClassName}.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND; #end ## 字段模板 #macro(columnTpl $prefix $prefixStr) - @ApiModelProperty(value = "${prefixStr}${column.columnComment}"#if ("$!column.example" != ""), example = "${column.example}"#end) + @Schema(title = "${prefixStr}${column.columnComment}"#if ("$!column.example" != ""), example = "${column.example}"#end) private ${column.javaType}#if ("$!prefix" != "") ${prefix}${JavaField}#else ${column.javaField}#end; #end -@ApiModel(value = "${sceneEnum.name} - ${table.classComment} Excel 导出 Request VO", description = "参数和 ${table.className}PageReqVO 是一致的") +@Schema(title = "${sceneEnum.name} - ${table.classComment} Excel 导出 Request VO", description = "参数和 ${table.className}PageReqVO 是一致的") @Data public class ${sceneEnum.prefixClass}${table.className}ExportReqVO { #foreach ($column in $columns) #if (${column.listOperation})##查询操作 #if (${column.listOperationCondition} == "BETWEEN")## 情况一,Between 的时候 - @ApiModelProperty(value = "${column.columnComment}"#if ("$!column.example" != ""), example = "${column.example}"#end) + @Schema(title = "${column.columnComment}"#if ("$!column.example" != ""), example = "${column.example}"#end) @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND) private ${column.javaType}[] ${column.javaField}; #else##情况二,非 Between 的时间 diff --git a/yudao-module-infra/yudao-module-infra-biz/src/main/resources/codegen/java/controller/vo/pageReqVO.vm b/yudao-module-infra/yudao-module-infra-biz/src/main/resources/codegen/java/controller/vo/pageReqVO.vm index f2664390a8..44a5307ea2 100644 --- a/yudao-module-infra/yudao-module-infra-biz/src/main/resources/codegen/java/controller/vo/pageReqVO.vm +++ b/yudao-module-infra/yudao-module-infra-biz/src/main/resources/codegen/java/controller/vo/pageReqVO.vm @@ -16,11 +16,11 @@ import static ${DateUtilsClassName}.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND; #end ## 字段模板 #macro(columnTpl $prefix $prefixStr) - @ApiModelProperty(value = "${prefixStr}${column.columnComment}"#if ("$!column.example" != ""), example = "${column.example}"#end) + @Schema(title = "${prefixStr}${column.columnComment}"#if ("$!column.example" != ""), example = "${column.example}"#end) private ${column.javaType}#if ("$!prefix" != "") ${prefix}${JavaField}#else ${column.javaField}#end; #end -@ApiModel("${sceneEnum.name} - ${table.classComment}分页 Request VO") +@Schema(title = "${sceneEnum.name} - ${table.classComment}分页 Request VO") @Data @EqualsAndHashCode(callSuper = true) @ToString(callSuper = true) @@ -29,7 +29,7 @@ public class ${sceneEnum.prefixClass}${table.className}PageReqVO extends PagePar #foreach ($column in $columns) #if (${column.listOperation})##查询操作 #if (${column.listOperationCondition} == "BETWEEN")## 情况一,Between 的时候 - @ApiModelProperty(value = "${column.columnComment}"#if ("$!column.example" != ""), example = "${column.example}"#end) + @Schema(title = "${column.columnComment}"#if ("$!column.example" != ""), example = "${column.example}"#end) @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND) private ${column.javaType}[] ${column.javaField}; #else##情况二,非 Between 的时间 diff --git a/yudao-module-infra/yudao-module-infra-biz/src/main/resources/codegen/java/controller/vo/respVO.vm b/yudao-module-infra/yudao-module-infra-biz/src/main/resources/codegen/java/controller/vo/respVO.vm index dd6e16e10b..f0dd7bbf5a 100644 --- a/yudao-module-infra/yudao-module-infra-biz/src/main/resources/codegen/java/controller/vo/respVO.vm +++ b/yudao-module-infra/yudao-module-infra-biz/src/main/resources/codegen/java/controller/vo/respVO.vm @@ -8,7 +8,7 @@ import java.time.LocalDateTime; #end import io.swagger.annotations.*; -@ApiModel("${sceneEnum.name} - ${table.classComment} Response VO") +@Schema(title = "${sceneEnum.name} - ${table.classComment} Response VO") @Data @EqualsAndHashCode(callSuper = true) @ToString(callSuper = true) @@ -16,7 +16,7 @@ public class ${sceneEnum.prefixClass}${table.className}RespVO extends ${sceneEnu #foreach ($column in $columns) #if (${column.listOperationResult} && (!${column.createOperation} || !${column.updateOperation}))##不是通用字段 - @ApiModelProperty(value = "${column.columnComment}"#if (!${column.nullable}), required = true#end#if ("$!column.example" != ""), example = "${column.example}"#end) + @Schema(title = "${column.columnComment}"#if (!${column.nullable}), required = true#end#if ("$!column.example" != ""), example = "${column.example}"#end) private ${column.javaType} ${column.javaField}; #end diff --git a/yudao-module-infra/yudao-module-infra-biz/src/main/resources/codegen/java/controller/vo/updateReqVO.vm b/yudao-module-infra/yudao-module-infra-biz/src/main/resources/codegen/java/controller/vo/updateReqVO.vm index 6369915085..fb9b42f00d 100644 --- a/yudao-module-infra/yudao-module-infra-biz/src/main/resources/codegen/java/controller/vo/updateReqVO.vm +++ b/yudao-module-infra/yudao-module-infra-biz/src/main/resources/codegen/java/controller/vo/updateReqVO.vm @@ -15,7 +15,7 @@ import static ${DateUtilsClassName}.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND; #end #end -@ApiModel("${sceneEnum.name} - ${table.classComment}更新 Request VO") +@Schema(title = "${sceneEnum.name} - ${table.classComment}更新 Request VO") @Data @EqualsAndHashCode(callSuper = true) @ToString(callSuper = true) diff --git a/yudao-module-mall/yudao-module-product-biz/src/main/java/cn/iocoder/yudao/module/product/controller/admin/brand/ProductBrandController.java b/yudao-module-mall/yudao-module-product-biz/src/main/java/cn/iocoder/yudao/module/product/controller/admin/brand/ProductBrandController.java index 2227afeafa..8427449f78 100644 --- a/yudao-module-mall/yudao-module-product-biz/src/main/java/cn/iocoder/yudao/module/product/controller/admin/brand/ProductBrandController.java +++ b/yudao-module-mall/yudao-module-product-biz/src/main/java/cn/iocoder/yudao/module/product/controller/admin/brand/ProductBrandController.java @@ -6,9 +6,9 @@ import cn.iocoder.yudao.module.product.controller.admin.brand.vo.*; import cn.iocoder.yudao.module.product.convert.brand.ProductBrandConvert; import cn.iocoder.yudao.module.product.dal.dataobject.brand.ProductBrandDO; import cn.iocoder.yudao.module.product.service.brand.ProductBrandService; -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("/product/brand") @Validated @@ -30,14 +30,14 @@ public class ProductBrandController { private ProductBrandService brandService; @PostMapping("/create") - @ApiOperation("创建品牌") + @Operation(summary = "创建品牌") @PreAuthorize("@ss.hasPermission('product:brand:create')") public CommonResult createBrand(@Valid @RequestBody ProductBrandCreateReqVO createReqVO) { return success(brandService.createBrand(createReqVO)); } @PutMapping("/update") - @ApiOperation("更新品牌") + @Operation(summary = "更新品牌") @PreAuthorize("@ss.hasPermission('product:brand:update')") public CommonResult updateBrand(@Valid @RequestBody ProductBrandUpdateReqVO updateReqVO) { brandService.updateBrand(updateReqVO); @@ -45,8 +45,8 @@ public class ProductBrandController { } @DeleteMapping("/delete") - @ApiOperation("删除品牌") - @ApiImplicitParam(name = "id", value = "编号", required = true, dataTypeClass = Long.class) + @Operation(summary = "删除品牌") + @Parameter(name = "id", description = "编号", required = true) @PreAuthorize("@ss.hasPermission('product:brand:delete')") public CommonResult deleteBrand(@RequestParam("id") Long id) { brandService.deleteBrand(id); @@ -54,8 +54,8 @@ public class ProductBrandController { } @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('product:brand:query')") public CommonResult getBrand(@RequestParam("id") Long id) { ProductBrandDO brand = brandService.getBrand(id); @@ -63,7 +63,7 @@ public class ProductBrandController { } @GetMapping("/page") - @ApiOperation("获得品牌分页") + @Operation(summary = "获得品牌分页") @PreAuthorize("@ss.hasPermission('product:brand:query')") public CommonResult> getBrandPage(@Valid ProductBrandPageReqVO pageVO) { PageResult pageResult = brandService.getBrandPage(pageVO); @@ -71,7 +71,7 @@ public class ProductBrandController { } @GetMapping("/list") - @ApiOperation("获得品牌列表") + @Operation(summary = "获得品牌列表") @PreAuthorize("@ss.hasPermission('product:brand:query')") public CommonResult> getBrandList(@Valid ProductBrandListReqVO listVO) { List list = brandService.getBrandList(listVO); diff --git a/yudao-module-mall/yudao-module-product-biz/src/main/java/cn/iocoder/yudao/module/product/controller/admin/brand/vo/ProductBrandBaseVO.java b/yudao-module-mall/yudao-module-product-biz/src/main/java/cn/iocoder/yudao/module/product/controller/admin/brand/vo/ProductBrandBaseVO.java index fa5ecd2d1c..f586e74151 100644 --- a/yudao-module-mall/yudao-module-product-biz/src/main/java/cn/iocoder/yudao/module/product/controller/admin/brand/vo/ProductBrandBaseVO.java +++ b/yudao-module-mall/yudao-module-product-biz/src/main/java/cn/iocoder/yudao/module/product/controller/admin/brand/vo/ProductBrandBaseVO.java @@ -1,6 +1,5 @@ package cn.iocoder.yudao.module.product.controller.admin.brand.vo; - -import io.swagger.annotations.ApiModelProperty; +import io.swagger.v3.oas.annotations.media.Schema; import lombok.Data; import javax.validation.constraints.NotNull; @@ -12,22 +11,22 @@ import javax.validation.constraints.NotNull; @Data public class ProductBrandBaseVO { - @ApiModelProperty(value = "品牌名称", required = true, example = "芋道") + @Schema(title = "品牌名称", required = true, example = "芋道") @NotNull(message = "品牌名称不能为空") private String name; - @ApiModelProperty(value = "品牌图片", required = true) + @Schema(title = "品牌图片", required = true) @NotNull(message = "品牌图片不能为空") private String picUrl; - @ApiModelProperty(value = "品牌排序", required = true, example = "1") + @Schema(title = "品牌排序", required = true, example = "1") @NotNull(message = "品牌排序不能为空") private Integer sort; - @ApiModelProperty(value = "品牌描述", example = "描述") + @Schema(title = "品牌描述", example = "描述") private String description; - @ApiModelProperty(value = "状态", required = true, example = "0") + @Schema(title = "状态", required = true, example = "0") @NotNull(message = "状态不能为空") private Integer status; diff --git a/yudao-module-mall/yudao-module-product-biz/src/main/java/cn/iocoder/yudao/module/product/controller/admin/brand/vo/ProductBrandCreateReqVO.java b/yudao-module-mall/yudao-module-product-biz/src/main/java/cn/iocoder/yudao/module/product/controller/admin/brand/vo/ProductBrandCreateReqVO.java index 74024929f2..1ea83e2598 100644 --- a/yudao-module-mall/yudao-module-product-biz/src/main/java/cn/iocoder/yudao/module/product/controller/admin/brand/vo/ProductBrandCreateReqVO.java +++ b/yudao-module-mall/yudao-module-product-biz/src/main/java/cn/iocoder/yudao/module/product/controller/admin/brand/vo/ProductBrandCreateReqVO.java @@ -1,9 +1,8 @@ package cn.iocoder.yudao.module.product.controller.admin.brand.vo; - +import io.swagger.v3.oas.annotations.media.Schema; import lombok.*; -import io.swagger.annotations.*; -@ApiModel("管理后台 - 商品品牌创建 Request VO") +@Schema(title = "管理后台 - 商品品牌创建 Request VO") @Data @EqualsAndHashCode(callSuper = true) @ToString(callSuper = true) diff --git a/yudao-module-mall/yudao-module-product-biz/src/main/java/cn/iocoder/yudao/module/product/controller/admin/brand/vo/ProductBrandListReqVO.java b/yudao-module-mall/yudao-module-product-biz/src/main/java/cn/iocoder/yudao/module/product/controller/admin/brand/vo/ProductBrandListReqVO.java index 5367e2dfec..a1ea87ad84 100644 --- a/yudao-module-mall/yudao-module-product-biz/src/main/java/cn/iocoder/yudao/module/product/controller/admin/brand/vo/ProductBrandListReqVO.java +++ b/yudao-module-mall/yudao-module-product-biz/src/main/java/cn/iocoder/yudao/module/product/controller/admin/brand/vo/ProductBrandListReqVO.java @@ -1,14 +1,13 @@ package cn.iocoder.yudao.module.product.controller.admin.brand.vo; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; +import io.swagger.v3.oas.annotations.media.Schema; import lombok.Data; -@ApiModel(value = "管理后台 - 商品品牌分页 Request VO") +@Schema(title = "管理后台 - 商品品牌分页 Request VO") @Data public class ProductBrandListReqVO { - @ApiModelProperty(value = "品牌名称", example = "芋道") + @Schema(title = "品牌名称", example = "芋道") private String name; } diff --git a/yudao-module-mall/yudao-module-product-biz/src/main/java/cn/iocoder/yudao/module/product/controller/admin/brand/vo/ProductBrandPageReqVO.java b/yudao-module-mall/yudao-module-product-biz/src/main/java/cn/iocoder/yudao/module/product/controller/admin/brand/vo/ProductBrandPageReqVO.java index c5a7b0047a..b19a9a711d 100644 --- a/yudao-module-mall/yudao-module-product-biz/src/main/java/cn/iocoder/yudao/module/product/controller/admin/brand/vo/ProductBrandPageReqVO.java +++ b/yudao-module-mall/yudao-module-product-biz/src/main/java/cn/iocoder/yudao/module/product/controller/admin/brand/vo/ProductBrandPageReqVO.java @@ -1,8 +1,7 @@ package cn.iocoder.yudao.module.product.controller.admin.brand.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 lombok.Data; import lombok.EqualsAndHashCode; import lombok.ToString; @@ -12,20 +11,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(title = "管理后台 - 商品品牌分页 Request VO") @Data @EqualsAndHashCode(callSuper = true) @ToString(callSuper = true) public class ProductBrandPageReqVO extends PageParam { - @ApiModelProperty(value = "品牌名称", example = "芋道") + @Schema(title = "品牌名称", example = "芋道") private String name; - @ApiModelProperty(value = "状态", example = "0", notes = "参考 CommonStatusEnum 枚举") + @Schema(title = "状态", example = "0", description = "参考 CommonStatusEnum 枚举") private Integer status; @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND) - @ApiModelProperty(value = "创建时间") + @Schema(title = "创建时间") private LocalDateTime[] createTime; } diff --git a/yudao-module-mall/yudao-module-product-biz/src/main/java/cn/iocoder/yudao/module/product/controller/admin/brand/vo/ProductBrandRespVO.java b/yudao-module-mall/yudao-module-product-biz/src/main/java/cn/iocoder/yudao/module/product/controller/admin/brand/vo/ProductBrandRespVO.java index fb4ce09546..a61cf52353 100644 --- a/yudao-module-mall/yudao-module-product-biz/src/main/java/cn/iocoder/yudao/module/product/controller/admin/brand/vo/ProductBrandRespVO.java +++ b/yudao-module-mall/yudao-module-product-biz/src/main/java/cn/iocoder/yudao/module/product/controller/admin/brand/vo/ProductBrandRespVO.java @@ -1,23 +1,22 @@ package cn.iocoder.yudao.module.product.controller.admin.brand.vo; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; +import io.swagger.v3.oas.annotations.media.Schema; import lombok.Data; import lombok.EqualsAndHashCode; import lombok.ToString; import java.time.LocalDateTime; -@ApiModel("管理后台 - 品牌 Response VO") +@Schema(title = "管理后台 - 品牌 Response VO") @Data @EqualsAndHashCode(callSuper = true) @ToString(callSuper = true) public class ProductBrandRespVO extends ProductBrandBaseVO { - @ApiModelProperty(value = "品牌编号", required = true, example = "1") + @Schema(title = "品牌编号", required = true, example = "1") private Long id; - @ApiModelProperty(value = "创建时间", required = true) + @Schema(title = "创建时间", required = true) private LocalDateTime createTime; } diff --git a/yudao-module-mall/yudao-module-product-biz/src/main/java/cn/iocoder/yudao/module/product/controller/admin/brand/vo/ProductBrandUpdateReqVO.java b/yudao-module-mall/yudao-module-product-biz/src/main/java/cn/iocoder/yudao/module/product/controller/admin/brand/vo/ProductBrandUpdateReqVO.java index 54d6102079..e86112c922 100644 --- a/yudao-module-mall/yudao-module-product-biz/src/main/java/cn/iocoder/yudao/module/product/controller/admin/brand/vo/ProductBrandUpdateReqVO.java +++ b/yudao-module-mall/yudao-module-product-biz/src/main/java/cn/iocoder/yudao/module/product/controller/admin/brand/vo/ProductBrandUpdateReqVO.java @@ -1,16 +1,15 @@ package cn.iocoder.yudao.module.product.controller.admin.brand.vo; - +import io.swagger.v3.oas.annotations.media.Schema; import lombok.*; -import io.swagger.annotations.*; import javax.validation.constraints.*; -@ApiModel("管理后台 - 商品品牌更新 Request VO") +@Schema(title = "管理后台 - 商品品牌更新 Request VO") @Data @EqualsAndHashCode(callSuper = true) @ToString(callSuper = true) public class ProductBrandUpdateReqVO extends ProductBrandBaseVO { - @ApiModelProperty(value = "品牌编号", required = true, example = "1") + @Schema(title = "品牌编号", required = true, example = "1") @NotNull(message = "品牌编号不能为空") private Long id; diff --git a/yudao-module-mall/yudao-module-product-biz/src/main/java/cn/iocoder/yudao/module/product/controller/admin/category/ProductCategoryController.java b/yudao-module-mall/yudao-module-product-biz/src/main/java/cn/iocoder/yudao/module/product/controller/admin/category/ProductCategoryController.java index 4144e6a57d..c51498d3b5 100644 --- a/yudao-module-mall/yudao-module-product-biz/src/main/java/cn/iocoder/yudao/module/product/controller/admin/category/ProductCategoryController.java +++ b/yudao-module-mall/yudao-module-product-biz/src/main/java/cn/iocoder/yudao/module/product/controller/admin/category/ProductCategoryController.java @@ -8,9 +8,9 @@ import cn.iocoder.yudao.module.product.controller.admin.category.vo.ProductCateg import cn.iocoder.yudao.module.product.convert.category.ProductCategoryConvert; import cn.iocoder.yudao.module.product.dal.dataobject.category.ProductCategoryDO; import cn.iocoder.yudao.module.product.service.category.ProductCategoryService; -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.*; @@ -22,7 +22,7 @@ import java.util.List; import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success; -@Api(tags = "管理后台 - 商品分类") +@Tag(name = "管理后台 - 商品分类") @RestController @RequestMapping("/product/category") @Validated @@ -32,14 +32,14 @@ public class ProductCategoryController { private ProductCategoryService categoryService; @PostMapping("/create") - @ApiOperation("创建商品分类") + @Operation(summary = "创建商品分类") @PreAuthorize("@ss.hasPermission('product:category:create')") public CommonResult createCategory(@Valid @RequestBody ProductCategoryCreateReqVO createReqVO) { return success(categoryService.createCategory(createReqVO)); } @PutMapping("/update") - @ApiOperation("更新商品分类") + @Operation(summary = "更新商品分类") @PreAuthorize("@ss.hasPermission('product:category:update')") public CommonResult updateCategory(@Valid @RequestBody ProductCategoryUpdateReqVO updateReqVO) { categoryService.updateCategory(updateReqVO); @@ -47,8 +47,8 @@ public class ProductCategoryController { } @DeleteMapping("/delete") - @ApiOperation("删除商品分类") - @ApiImplicitParam(name = "id", value = "编号", required = true, dataTypeClass = Long.class) + @Operation(summary = "删除商品分类") + @Parameter(name = "id", description = "编号", required = true) @PreAuthorize("@ss.hasPermission('product:category:delete')") public CommonResult deleteCategory(@RequestParam("id") Long id) { categoryService.deleteCategory(id); @@ -56,8 +56,8 @@ public class ProductCategoryController { } @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('product:category:query')") public CommonResult getCategory(@RequestParam("id") Long id) { ProductCategoryDO category = categoryService.getCategory(id); @@ -65,7 +65,7 @@ public class ProductCategoryController { } @GetMapping("/list") - @ApiOperation("获得商品分类列表") + @Operation(summary = "获得商品分类列表") @PreAuthorize("@ss.hasPermission('product:category:query')") public CommonResult> getCategoryList(@Valid ProductCategoryListReqVO treeListReqVO) { List list = categoryService.getEnableCategoryList(treeListReqVO); diff --git a/yudao-module-mall/yudao-module-product-biz/src/main/java/cn/iocoder/yudao/module/product/controller/admin/category/vo/ProductCategoryBaseVO.java b/yudao-module-mall/yudao-module-product-biz/src/main/java/cn/iocoder/yudao/module/product/controller/admin/category/vo/ProductCategoryBaseVO.java index 9b9c77a084..922ab321b4 100644 --- a/yudao-module-mall/yudao-module-product-biz/src/main/java/cn/iocoder/yudao/module/product/controller/admin/category/vo/ProductCategoryBaseVO.java +++ b/yudao-module-mall/yudao-module-product-biz/src/main/java/cn/iocoder/yudao/module/product/controller/admin/category/vo/ProductCategoryBaseVO.java @@ -1,6 +1,5 @@ package cn.iocoder.yudao.module.product.controller.admin.category.vo; - -import io.swagger.annotations.ApiModelProperty; +import io.swagger.v3.oas.annotations.media.Schema; import lombok.Data; import javax.validation.constraints.NotBlank; @@ -13,25 +12,25 @@ import javax.validation.constraints.NotNull; @Data public class ProductCategoryBaseVO { - @ApiModelProperty(value = "父分类编号", required = true, example = "1") + @Schema(title = "父分类编号", required = true, example = "1") @NotNull(message = "父分类编号不能为空") private Long parentId; - @ApiModelProperty(value = "分类名称", required = true, example = "办公文具") + @Schema(title = "分类名称", required = true, example = "办公文具") @NotBlank(message = "分类名称不能为空") private String name; - @ApiModelProperty(value = "分类图片", required = true) + @Schema(title = "分类图片", required = true) @NotBlank(message = "分类图片不能为空") private String picUrl; - @ApiModelProperty(value = "分类排序", required = true, example = "1") + @Schema(title = "分类排序", required = true, example = "1") private Integer sort; - @ApiModelProperty(value = "分类描述", required = true, example = "描述") + @Schema(title = "分类描述", required = true, example = "描述") private String description; - @ApiModelProperty(value = "开启状态", required = true, example = "0") + @Schema(title = "开启状态", required = true, example = "0") @NotNull(message = "开启状态不能为空") private Integer status; diff --git a/yudao-module-mall/yudao-module-product-biz/src/main/java/cn/iocoder/yudao/module/product/controller/admin/category/vo/ProductCategoryCreateReqVO.java b/yudao-module-mall/yudao-module-product-biz/src/main/java/cn/iocoder/yudao/module/product/controller/admin/category/vo/ProductCategoryCreateReqVO.java index d35e1ad3c6..32e5e67193 100644 --- a/yudao-module-mall/yudao-module-product-biz/src/main/java/cn/iocoder/yudao/module/product/controller/admin/category/vo/ProductCategoryCreateReqVO.java +++ b/yudao-module-mall/yudao-module-product-biz/src/main/java/cn/iocoder/yudao/module/product/controller/admin/category/vo/ProductCategoryCreateReqVO.java @@ -1,9 +1,8 @@ package cn.iocoder.yudao.module.product.controller.admin.category.vo; - +import io.swagger.v3.oas.annotations.media.Schema; import lombok.*; -import io.swagger.annotations.*; -@ApiModel("管理后台 - 商品分类创建 Request VO") +@Schema(title = "管理后台 - 商品分类创建 Request VO") @Data @EqualsAndHashCode(callSuper = true) @ToString(callSuper = true) diff --git a/yudao-module-mall/yudao-module-product-biz/src/main/java/cn/iocoder/yudao/module/product/controller/admin/category/vo/ProductCategoryListReqVO.java b/yudao-module-mall/yudao-module-product-biz/src/main/java/cn/iocoder/yudao/module/product/controller/admin/category/vo/ProductCategoryListReqVO.java index a487c16a40..3a8e831060 100644 --- a/yudao-module-mall/yudao-module-product-biz/src/main/java/cn/iocoder/yudao/module/product/controller/admin/category/vo/ProductCategoryListReqVO.java +++ b/yudao-module-mall/yudao-module-product-biz/src/main/java/cn/iocoder/yudao/module/product/controller/admin/category/vo/ProductCategoryListReqVO.java @@ -1,14 +1,13 @@ package cn.iocoder.yudao.module.product.controller.admin.category.vo; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; +import io.swagger.v3.oas.annotations.media.Schema; import lombok.Data; -@ApiModel(value = "管理后台 - 商品分类列表查询 Request VO") +@Schema(title = "管理后台 - 商品分类列表查询 Request VO") @Data public class ProductCategoryListReqVO { - @ApiModelProperty(value = "分类名称", example = "办公文具") + @Schema(title = "分类名称", example = "办公文具") private String name; } diff --git a/yudao-module-mall/yudao-module-product-biz/src/main/java/cn/iocoder/yudao/module/product/controller/admin/category/vo/ProductCategoryRespVO.java b/yudao-module-mall/yudao-module-product-biz/src/main/java/cn/iocoder/yudao/module/product/controller/admin/category/vo/ProductCategoryRespVO.java index c6fdfcfe1b..32298487b9 100644 --- a/yudao-module-mall/yudao-module-product-biz/src/main/java/cn/iocoder/yudao/module/product/controller/admin/category/vo/ProductCategoryRespVO.java +++ b/yudao-module-mall/yudao-module-product-biz/src/main/java/cn/iocoder/yudao/module/product/controller/admin/category/vo/ProductCategoryRespVO.java @@ -1,20 +1,19 @@ package cn.iocoder.yudao.module.product.controller.admin.category.vo; - +import io.swagger.v3.oas.annotations.media.Schema; import lombok.*; import java.time.LocalDateTime; -import io.swagger.annotations.*; -@ApiModel("管理后台 - 商品分类 Response VO") +@Schema(title = "管理后台 - 商品分类 Response VO") @Data @EqualsAndHashCode(callSuper = true) @ToString(callSuper = true) public class ProductCategoryRespVO extends ProductCategoryBaseVO { - @ApiModelProperty(value = "分类编号", required = true, example = "2") + @Schema(title = "分类编号", required = true, example = "2") private Long id; - @ApiModelProperty(value = "创建时间", required = true) + @Schema(title = "创建时间", required = true) private LocalDateTime createTime; } diff --git a/yudao-module-mall/yudao-module-product-biz/src/main/java/cn/iocoder/yudao/module/product/controller/admin/category/vo/ProductCategoryUpdateReqVO.java b/yudao-module-mall/yudao-module-product-biz/src/main/java/cn/iocoder/yudao/module/product/controller/admin/category/vo/ProductCategoryUpdateReqVO.java index b0c8fe57d5..1b8357f963 100644 --- a/yudao-module-mall/yudao-module-product-biz/src/main/java/cn/iocoder/yudao/module/product/controller/admin/category/vo/ProductCategoryUpdateReqVO.java +++ b/yudao-module-mall/yudao-module-product-biz/src/main/java/cn/iocoder/yudao/module/product/controller/admin/category/vo/ProductCategoryUpdateReqVO.java @@ -1,16 +1,15 @@ package cn.iocoder.yudao.module.product.controller.admin.category.vo; - +import io.swagger.v3.oas.annotations.media.Schema; import lombok.*; -import io.swagger.annotations.*; import javax.validation.constraints.*; -@ApiModel("管理后台 - 商品分类更新 Request VO") +@Schema(title = "管理后台 - 商品分类更新 Request VO") @Data @EqualsAndHashCode(callSuper = true) @ToString(callSuper = true) public class ProductCategoryUpdateReqVO extends ProductCategoryBaseVO { - @ApiModelProperty(value = "分类编号", required = true, example = "2") + @Schema(title = "分类编号", required = true, example = "2") @NotNull(message = "分类编号不能为空") private Long id; diff --git a/yudao-module-mall/yudao-module-product-biz/src/main/java/cn/iocoder/yudao/module/product/controller/admin/property/ProductPropertyController.java b/yudao-module-mall/yudao-module-product-biz/src/main/java/cn/iocoder/yudao/module/product/controller/admin/property/ProductPropertyController.java index 9a4c20c58c..54ee1fbbd7 100644 --- a/yudao-module-mall/yudao-module-product-biz/src/main/java/cn/iocoder/yudao/module/product/controller/admin/property/ProductPropertyController.java +++ b/yudao-module-mall/yudao-module-product-biz/src/main/java/cn/iocoder/yudao/module/product/controller/admin/property/ProductPropertyController.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.product.controller.admin.property.vo.property.*; import cn.iocoder.yudao.module.product.service.property.ProductPropertyService; -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.*; @@ -18,7 +18,7 @@ import java.util.List; import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success; -@Api(tags = "管理后台 - 规格名称") +@Tag(name = "管理后台 - 规格名称") @RestController @RequestMapping("/product/property") @Validated @@ -28,14 +28,14 @@ public class ProductPropertyController { private ProductPropertyService productPropertyService; @PostMapping("/create") - @ApiOperation("创建规格名称") + @Operation(summary = "创建规格名称") @PreAuthorize("@ss.hasPermission('product:property:create')") public CommonResult createProperty(@Valid @RequestBody ProductPropertyCreateReqVO createReqVO) { return success(productPropertyService.createProperty(createReqVO)); } @PutMapping("/update") - @ApiOperation("更新规格名称") + @Operation(summary = "更新规格名称") @PreAuthorize("@ss.hasPermission('product:property:update')") public CommonResult updateProperty(@Valid @RequestBody ProductPropertyUpdateReqVO updateReqVO) { productPropertyService.updateProperty(updateReqVO); @@ -43,8 +43,8 @@ public class ProductPropertyController { } @DeleteMapping("/delete") - @ApiOperation("删除规格名称") - @ApiImplicitParam(name = "id", value = "编号", required = true, dataTypeClass = Long.class) + @Operation(summary = "删除规格名称") + @Parameter(name = "id", description = "编号", required = true) @PreAuthorize("@ss.hasPermission('product:property:delete')") public CommonResult deleteProperty(@RequestParam("id") Long id) { productPropertyService.deleteProperty(id); @@ -52,29 +52,29 @@ public class ProductPropertyController { } @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('product:property:query')") public CommonResult getProperty(@RequestParam("id") Long id) { return success(productPropertyService.getProperty(id)); } @GetMapping("/list") - @ApiOperation("获得规格名称列表") + @Operation(summary = "获得规格名称列表") @PreAuthorize("@ss.hasPermission('product:property:query')") public CommonResult> getPropertyList(@Valid ProductPropertyListReqVO listReqVO) { return success(productPropertyService.getPropertyList(listReqVO)); } @GetMapping("/page") - @ApiOperation("获得规格名称分页") + @Operation(summary = "获得规格名称分页") @PreAuthorize("@ss.hasPermission('product:property:query')") public CommonResult> getPropertyPage(@Valid ProductPropertyPageReqVO pageVO) { return success(productPropertyService.getPropertyPage(pageVO)); } @GetMapping("/listAndValue") - @ApiOperation("获得规格名称列表") + @Operation(summary = "获得规格名称列表") @PreAuthorize("@ss.hasPermission('product:property:query')") public CommonResult> getPropertyAndValueList(@Valid ProductPropertyListReqVO listReqVO) { return success(productPropertyService.getPropertyAndValueList(listReqVO)); diff --git a/yudao-module-mall/yudao-module-product-biz/src/main/java/cn/iocoder/yudao/module/product/controller/admin/property/ProductPropertyValueController.java b/yudao-module-mall/yudao-module-product-biz/src/main/java/cn/iocoder/yudao/module/product/controller/admin/property/ProductPropertyValueController.java index e88c914150..cdcd1f7a3e 100644 --- a/yudao-module-mall/yudao-module-product-biz/src/main/java/cn/iocoder/yudao/module/product/controller/admin/property/ProductPropertyValueController.java +++ b/yudao-module-mall/yudao-module-product-biz/src/main/java/cn/iocoder/yudao/module/product/controller/admin/property/ProductPropertyValueController.java @@ -8,9 +8,9 @@ import cn.iocoder.yudao.module.product.controller.admin.property.vo.value.Produc import cn.iocoder.yudao.module.product.controller.admin.property.vo.value.ProductPropertyValueRespVO; import cn.iocoder.yudao.module.product.controller.admin.property.vo.value.ProductPropertyValueUpdateReqVO; import cn.iocoder.yudao.module.product.service.property.ProductPropertyValueService; -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("/product/property/value") @Validated @@ -30,14 +30,14 @@ public class ProductPropertyValueController { private ProductPropertyValueService productPropertyValueService; @PostMapping("/create") - @ApiOperation("创建规格名称") + @Operation(summary = "创建规格名称") @PreAuthorize("@ss.hasPermission('product:property:create')") public CommonResult createProperty(@Valid @RequestBody ProductPropertyValueCreateReqVO createReqVO) { return success(productPropertyValueService.createPropertyValue(createReqVO)); } @PutMapping("/update") - @ApiOperation("更新规格名称") + @Operation(summary = "更新规格名称") @PreAuthorize("@ss.hasPermission('product:property:update')") public CommonResult updateProperty(@Valid @RequestBody ProductPropertyValueUpdateReqVO updateReqVO) { productPropertyValueService.updatePropertyValue(updateReqVO); @@ -45,8 +45,8 @@ public class ProductPropertyValueController { } @DeleteMapping("/delete") - @ApiOperation("删除规格名称") - @ApiImplicitParam(name = "id", value = "编号", required = true, dataTypeClass = Long.class) + @Operation(summary = "删除规格名称") + @Parameter(name = "id", description = "编号", required = true) @PreAuthorize("@ss.hasPermission('product:property:delete')") public CommonResult deleteProperty(@RequestParam("id") Long id) { productPropertyValueService.deletePropertyValue(id); @@ -54,15 +54,15 @@ public class ProductPropertyValueController { } @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('product:property:query')") public CommonResult getProperty(@RequestParam("id") Long id) { return success(productPropertyValueService.getPropertyValue(id)); } @GetMapping("/page") - @ApiOperation("获得规格名称分页") + @Operation(summary = "获得规格名称分页") @PreAuthorize("@ss.hasPermission('product:property:query')") public CommonResult> getPropertyValuePage(@Valid ProductPropertyValuePageReqVO pageVO) { return success(productPropertyValueService.getPropertyValueListPage(pageVO)); diff --git a/yudao-module-mall/yudao-module-product-biz/src/main/java/cn/iocoder/yudao/module/product/controller/admin/property/vo/ProductPropertyViewRespVO.java b/yudao-module-mall/yudao-module-product-biz/src/main/java/cn/iocoder/yudao/module/product/controller/admin/property/vo/ProductPropertyViewRespVO.java index 9bdc70bd72..7ef873264d 100644 --- a/yudao-module-mall/yudao-module-product-biz/src/main/java/cn/iocoder/yudao/module/product/controller/admin/property/vo/ProductPropertyViewRespVO.java +++ b/yudao-module-mall/yudao-module-product-biz/src/main/java/cn/iocoder/yudao/module/product/controller/admin/property/vo/ProductPropertyViewRespVO.java @@ -1,7 +1,6 @@ package cn.iocoder.yudao.module.product.controller.admin.property.vo; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; +import io.swagger.v3.oas.annotations.media.Schema; import lombok.Data; import lombok.ToString; @@ -13,22 +12,22 @@ import java.util.List; * @CreateDate: 2022/7/5 21:29 * @Version: 1.0.0 */ -@ApiModel("管理后台 - 规格名称详情展示 Request VO") +@Schema(title = "管理后台 - 规格名称详情展示 Request VO") @Data @ToString(callSuper = true) public class ProductPropertyViewRespVO { - @ApiModelProperty(value = "规格名称id", example = "1") + @Schema(title = "规格名称id", example = "1") public Long propertyId; - @ApiModelProperty(value = "规格名称", example = "内存") + @Schema(title = "规格名称", example = "内存") public String name; - @ApiModelProperty(value = "规格属性值集合", example = "[{\"v1\":11,\"v2\":\"64G\"},{\"v1\":10,\"v2\":\"32G\"}]") + @Schema(title = "规格属性值集合", example = "[{\"v1\":11,\"v2\":\"64G\"},{\"v1\":10,\"v2\":\"32G\"}]") public List propertyValues; @Data - @ApiModel(value = "规格属性值元组") + @Schema(title = "规格属性值元组") public static class Tuple2 { private final long id; private final String name; diff --git a/yudao-module-mall/yudao-module-product-biz/src/main/java/cn/iocoder/yudao/module/product/controller/admin/property/vo/property/ProductPropertyAndValueRespVO.java b/yudao-module-mall/yudao-module-product-biz/src/main/java/cn/iocoder/yudao/module/product/controller/admin/property/vo/property/ProductPropertyAndValueRespVO.java index e7b3c352f9..7c75830bb5 100644 --- a/yudao-module-mall/yudao-module-product-biz/src/main/java/cn/iocoder/yudao/module/product/controller/admin/property/vo/property/ProductPropertyAndValueRespVO.java +++ b/yudao-module-mall/yudao-module-product-biz/src/main/java/cn/iocoder/yudao/module/product/controller/admin/property/vo/property/ProductPropertyAndValueRespVO.java @@ -1,8 +1,7 @@ package cn.iocoder.yudao.module.product.controller.admin.property.vo.property; import cn.iocoder.yudao.module.product.controller.admin.property.vo.value.ProductPropertyValueRespVO; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; +import io.swagger.v3.oas.annotations.media.Schema; import lombok.Data; import lombok.EqualsAndHashCode; import lombok.ToString; @@ -10,16 +9,16 @@ import lombok.ToString; import java.time.LocalDateTime; import java.util.List; -@ApiModel("管理后台 - 规格 + 规格值 Response VO") +@Schema(title = "管理后台 - 规格 + 规格值 Response VO") @Data @EqualsAndHashCode(callSuper = true) @ToString(callSuper = true) public class ProductPropertyAndValueRespVO extends ProductPropertyBaseVO { - @ApiModelProperty(value = "规格的编号", required = true, example = "1024") + @Schema(title = "规格的编号", required = true, example = "1024") private Long id; - @ApiModelProperty(value = "创建时间", required = true) + @Schema(title = "创建时间", required = true) private LocalDateTime createTime; /** diff --git a/yudao-module-mall/yudao-module-product-biz/src/main/java/cn/iocoder/yudao/module/product/controller/admin/property/vo/property/ProductPropertyBaseVO.java b/yudao-module-mall/yudao-module-product-biz/src/main/java/cn/iocoder/yudao/module/product/controller/admin/property/vo/property/ProductPropertyBaseVO.java index 25fc4c01ac..22f92ebb81 100644 --- a/yudao-module-mall/yudao-module-product-biz/src/main/java/cn/iocoder/yudao/module/product/controller/admin/property/vo/property/ProductPropertyBaseVO.java +++ b/yudao-module-mall/yudao-module-product-biz/src/main/java/cn/iocoder/yudao/module/product/controller/admin/property/vo/property/ProductPropertyBaseVO.java @@ -1,6 +1,5 @@ package cn.iocoder.yudao.module.product.controller.admin.property.vo.property; - -import io.swagger.annotations.ApiModelProperty; +import io.swagger.v3.oas.annotations.media.Schema; import lombok.Data; import javax.validation.constraints.NotBlank; @@ -13,14 +12,14 @@ import javax.validation.constraints.NotNull; @Data public class ProductPropertyBaseVO { - @ApiModelProperty(value = "规格名称", required = true, example = "颜色") + @Schema(title = "规格名称", required = true, example = "颜色") @NotBlank(message = "规格名称不能为空") private String name; - @ApiModelProperty(value = "备注", example = "颜色") + @Schema(title = "备注", example = "颜色") private String remark; - @ApiModelProperty(value = "状态", required = true, example = "1", notes = "参见 CommonStatusEnum 枚举") + @Schema(title = "状态", required = true, example = "1", description = "参见 CommonStatusEnum 枚举") @NotNull(message = "状态不能为空") private Integer status; diff --git a/yudao-module-mall/yudao-module-product-biz/src/main/java/cn/iocoder/yudao/module/product/controller/admin/property/vo/property/ProductPropertyCreateReqVO.java b/yudao-module-mall/yudao-module-product-biz/src/main/java/cn/iocoder/yudao/module/product/controller/admin/property/vo/property/ProductPropertyCreateReqVO.java index 8dfd58a5d7..28b93d5162 100644 --- a/yudao-module-mall/yudao-module-product-biz/src/main/java/cn/iocoder/yudao/module/product/controller/admin/property/vo/property/ProductPropertyCreateReqVO.java +++ b/yudao-module-mall/yudao-module-product-biz/src/main/java/cn/iocoder/yudao/module/product/controller/admin/property/vo/property/ProductPropertyCreateReqVO.java @@ -1,11 +1,10 @@ package cn.iocoder.yudao.module.product.controller.admin.property.vo.property; - -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(title = "管理后台 - 规格名称创建 Request VO") @Data @EqualsAndHashCode(callSuper = true) @ToString(callSuper = true) diff --git a/yudao-module-mall/yudao-module-product-biz/src/main/java/cn/iocoder/yudao/module/product/controller/admin/property/vo/property/ProductPropertyListReqVO.java b/yudao-module-mall/yudao-module-product-biz/src/main/java/cn/iocoder/yudao/module/product/controller/admin/property/vo/property/ProductPropertyListReqVO.java index 314288ffb9..49b2e7a2f2 100644 --- a/yudao-module-mall/yudao-module-product-biz/src/main/java/cn/iocoder/yudao/module/product/controller/admin/property/vo/property/ProductPropertyListReqVO.java +++ b/yudao-module-mall/yudao-module-product-biz/src/main/java/cn/iocoder/yudao/module/product/controller/admin/property/vo/property/ProductPropertyListReqVO.java @@ -1,19 +1,18 @@ package cn.iocoder.yudao.module.product.controller.admin.property.vo.property; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; +import io.swagger.v3.oas.annotations.media.Schema; import lombok.Data; import lombok.ToString; -@ApiModel("管理后台 - 规格名称 List Request VO") +@Schema(title = "管理后台 - 规格名称 List Request VO") @Data @ToString(callSuper = true) public class ProductPropertyListReqVO { - @ApiModelProperty(value = "规格名称", example = "颜色") + @Schema(title = "规格名称", example = "颜色") private String name; - @ApiModelProperty(value = "状态", required = true, example = "1", notes = "参见 CommonStatusEnum 枚举") + @Schema(title = "状态", required = true, example = "1", description = "参见 CommonStatusEnum 枚举") private Integer status; } diff --git a/yudao-module-mall/yudao-module-product-biz/src/main/java/cn/iocoder/yudao/module/product/controller/admin/property/vo/property/ProductPropertyPageReqVO.java b/yudao-module-mall/yudao-module-product-biz/src/main/java/cn/iocoder/yudao/module/product/controller/admin/property/vo/property/ProductPropertyPageReqVO.java index 05a67e874a..96551fd84b 100644 --- a/yudao-module-mall/yudao-module-product-biz/src/main/java/cn/iocoder/yudao/module/product/controller/admin/property/vo/property/ProductPropertyPageReqVO.java +++ b/yudao-module-mall/yudao-module-product-biz/src/main/java/cn/iocoder/yudao/module/product/controller/admin/property/vo/property/ProductPropertyPageReqVO.java @@ -1,8 +1,7 @@ package cn.iocoder.yudao.module.product.controller.admin.property.vo.property; import cn.iocoder.yudao.framework.common.pojo.PageParam; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; +import io.swagger.v3.oas.annotations.media.Schema; import lombok.Data; import lombok.EqualsAndHashCode; import lombok.ToString; @@ -12,20 +11,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(title = "管理后台 - 规格名称分页 Request VO") @Data @EqualsAndHashCode(callSuper = true) @ToString(callSuper = true) public class ProductPropertyPageReqVO extends PageParam { - @ApiModelProperty(value = "规格名称", example = "颜色") + @Schema(title = "规格名称", example = "颜色") private String name; - @ApiModelProperty(value = "状态", required = true, example = "1", notes = "参见 CommonStatusEnum 枚举") + @Schema(title = "状态", required = true, example = "1", description = "参见 CommonStatusEnum 枚举") private Integer status; @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND) - @ApiModelProperty(value = "创建时间") + @Schema(title = "创建时间") private LocalDateTime[] createTime; } diff --git a/yudao-module-mall/yudao-module-product-biz/src/main/java/cn/iocoder/yudao/module/product/controller/admin/property/vo/property/ProductPropertyRespVO.java b/yudao-module-mall/yudao-module-product-biz/src/main/java/cn/iocoder/yudao/module/product/controller/admin/property/vo/property/ProductPropertyRespVO.java index 75a9a5eea1..fc7e03911b 100644 --- a/yudao-module-mall/yudao-module-product-biz/src/main/java/cn/iocoder/yudao/module/product/controller/admin/property/vo/property/ProductPropertyRespVO.java +++ b/yudao-module-mall/yudao-module-product-biz/src/main/java/cn/iocoder/yudao/module/product/controller/admin/property/vo/property/ProductPropertyRespVO.java @@ -1,23 +1,22 @@ package cn.iocoder.yudao.module.product.controller.admin.property.vo.property; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; +import io.swagger.v3.oas.annotations.media.Schema; import lombok.Data; import lombok.EqualsAndHashCode; import lombok.ToString; import java.time.LocalDateTime; -@ApiModel("管理后台 - 规格 + 规格值 Response VO") +@Schema(title = "管理后台 - 规格 + 规格值 Response VO") @Data @EqualsAndHashCode(callSuper = true) @ToString(callSuper = true) public class ProductPropertyRespVO extends ProductPropertyBaseVO { - @ApiModelProperty(value = "规格的编号", required = true, example = "1024") + @Schema(title = "规格的编号", required = true, example = "1024") private Long id; - @ApiModelProperty(value = "创建时间", required = true) + @Schema(title = "创建时间", required = true) private LocalDateTime createTime; } diff --git a/yudao-module-mall/yudao-module-product-biz/src/main/java/cn/iocoder/yudao/module/product/controller/admin/property/vo/property/ProductPropertyUpdateReqVO.java b/yudao-module-mall/yudao-module-product-biz/src/main/java/cn/iocoder/yudao/module/product/controller/admin/property/vo/property/ProductPropertyUpdateReqVO.java index f4630d8747..bde40c9c09 100644 --- a/yudao-module-mall/yudao-module-product-biz/src/main/java/cn/iocoder/yudao/module/product/controller/admin/property/vo/property/ProductPropertyUpdateReqVO.java +++ b/yudao-module-mall/yudao-module-product-biz/src/main/java/cn/iocoder/yudao/module/product/controller/admin/property/vo/property/ProductPropertyUpdateReqVO.java @@ -1,18 +1,15 @@ package cn.iocoder.yudao.module.product.controller.admin.property.vo.property; - -import cn.iocoder.yudao.module.product.controller.admin.property.vo.value.ProductPropertyValueCreateReqVO; +import io.swagger.v3.oas.annotations.media.Schema; import lombok.*; -import io.swagger.annotations.*; import javax.validation.constraints.*; -import java.util.List; -@ApiModel("管理后台 - 规格名称更新 Request VO") +@Schema(title = "管理后台 - 规格名称更新 Request VO") @Data @EqualsAndHashCode(callSuper = true) @ToString(callSuper = true) public class ProductPropertyUpdateReqVO extends ProductPropertyBaseVO { - @ApiModelProperty(value = "主键", required = true, example = "1") + @Schema(title = "主键", required = true, example = "1") @NotNull(message = "主键不能为空") private Long id; diff --git a/yudao-module-mall/yudao-module-product-biz/src/main/java/cn/iocoder/yudao/module/product/controller/admin/property/vo/value/ProductPropertyValueBaseVO.java b/yudao-module-mall/yudao-module-product-biz/src/main/java/cn/iocoder/yudao/module/product/controller/admin/property/vo/value/ProductPropertyValueBaseVO.java index 142a8e6e22..b4a526c47a 100644 --- a/yudao-module-mall/yudao-module-product-biz/src/main/java/cn/iocoder/yudao/module/product/controller/admin/property/vo/value/ProductPropertyValueBaseVO.java +++ b/yudao-module-mall/yudao-module-product-biz/src/main/java/cn/iocoder/yudao/module/product/controller/admin/property/vo/value/ProductPropertyValueBaseVO.java @@ -1,6 +1,5 @@ package cn.iocoder.yudao.module.product.controller.admin.property.vo.value; - -import io.swagger.annotations.ApiModelProperty; +import io.swagger.v3.oas.annotations.media.Schema; import lombok.Data; import javax.validation.constraints.NotEmpty; @@ -13,19 +12,19 @@ import javax.validation.constraints.NotNull; @Data public class ProductPropertyValueBaseVO { - @ApiModelProperty(value = "规格编号", required = true, example = "1024") + @Schema(title = "规格编号", required = true, example = "1024") @NotNull(message = "规格编号不能为空") private Long propertyId; - @ApiModelProperty(value = "规格值名字", required = true, example = "红色") + @Schema(title = "规格值名字", required = true, example = "红色") @NotEmpty(message = "规格值名字不能为空") private String name; - @ApiModelProperty(value = "状态", required = true, example = "1", notes = "参见 CommonStatusEnum 枚举") + @Schema(title = "状态", required = true, example = "1", description = "参见 CommonStatusEnum 枚举") @NotNull(message = "状态不能为空") private Integer status; - @ApiModelProperty(value = "备注", example = "颜色") + @Schema(title = "备注", example = "颜色") private String remark; } diff --git a/yudao-module-mall/yudao-module-product-biz/src/main/java/cn/iocoder/yudao/module/product/controller/admin/property/vo/value/ProductPropertyValueCreateReqVO.java b/yudao-module-mall/yudao-module-product-biz/src/main/java/cn/iocoder/yudao/module/product/controller/admin/property/vo/value/ProductPropertyValueCreateReqVO.java index f7237f9cd4..6477b70919 100644 --- a/yudao-module-mall/yudao-module-product-biz/src/main/java/cn/iocoder/yudao/module/product/controller/admin/property/vo/value/ProductPropertyValueCreateReqVO.java +++ b/yudao-module-mall/yudao-module-product-biz/src/main/java/cn/iocoder/yudao/module/product/controller/admin/property/vo/value/ProductPropertyValueCreateReqVO.java @@ -1,9 +1,8 @@ package cn.iocoder.yudao.module.product.controller.admin.property.vo.value; - +import io.swagger.v3.oas.annotations.media.Schema; import lombok.*; -import io.swagger.annotations.*; -@ApiModel("管理后台 - 规格值创建 Request VO") +@Schema(title = "管理后台 - 规格值创建 Request VO") @Data @EqualsAndHashCode(callSuper = true) @ToString(callSuper = true) diff --git a/yudao-module-mall/yudao-module-product-biz/src/main/java/cn/iocoder/yudao/module/product/controller/admin/property/vo/value/ProductPropertyValuePageReqVO.java b/yudao-module-mall/yudao-module-product-biz/src/main/java/cn/iocoder/yudao/module/product/controller/admin/property/vo/value/ProductPropertyValuePageReqVO.java index ae77d822b9..bcada51545 100644 --- a/yudao-module-mall/yudao-module-product-biz/src/main/java/cn/iocoder/yudao/module/product/controller/admin/property/vo/value/ProductPropertyValuePageReqVO.java +++ b/yudao-module-mall/yudao-module-product-biz/src/main/java/cn/iocoder/yudao/module/product/controller/admin/property/vo/value/ProductPropertyValuePageReqVO.java @@ -1,8 +1,7 @@ package cn.iocoder.yudao.module.product.controller.admin.property.vo.value; import cn.iocoder.yudao.framework.common.pojo.PageParam; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; +import io.swagger.v3.oas.annotations.media.Schema; import lombok.Data; import lombok.EqualsAndHashCode; import lombok.ToString; @@ -13,19 +12,19 @@ import java.util.Date; import static cn.iocoder.yudao.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND; -@ApiModel("管理后台 - 规格名称值分页 Request VO") +@Schema(title = "管理后台 - 规格名称值分页 Request VO") @Data @EqualsAndHashCode(callSuper = true) @ToString(callSuper = true) public class ProductPropertyValuePageReqVO extends PageParam { - @ApiModelProperty(value = "规格id", example = "1024") + @Schema(title = "规格id", example = "1024") private String propertyId; - @ApiModelProperty(value = "规格值", example = "红色") + @Schema(title = "规格值", example = "红色") private String name; - @ApiModelProperty(value = "状态", required = true, example = "1", notes = "参见 CommonStatusEnum 枚举") + @Schema(title = "状态", required = true, example = "1", description = "参见 CommonStatusEnum 枚举") private Integer status; } diff --git a/yudao-module-mall/yudao-module-product-biz/src/main/java/cn/iocoder/yudao/module/product/controller/admin/property/vo/value/ProductPropertyValueRespVO.java b/yudao-module-mall/yudao-module-product-biz/src/main/java/cn/iocoder/yudao/module/product/controller/admin/property/vo/value/ProductPropertyValueRespVO.java index 501afd752b..2a40e0056d 100644 --- a/yudao-module-mall/yudao-module-product-biz/src/main/java/cn/iocoder/yudao/module/product/controller/admin/property/vo/value/ProductPropertyValueRespVO.java +++ b/yudao-module-mall/yudao-module-product-biz/src/main/java/cn/iocoder/yudao/module/product/controller/admin/property/vo/value/ProductPropertyValueRespVO.java @@ -1,23 +1,22 @@ package cn.iocoder.yudao.module.product.controller.admin.property.vo.value; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; +import io.swagger.v3.oas.annotations.media.Schema; import lombok.Data; import lombok.EqualsAndHashCode; import lombok.ToString; import java.time.LocalDateTime; -@ApiModel("管理后台 - 规格值 Response VO") +@Schema(title = "管理后台 - 规格值 Response VO") @Data @EqualsAndHashCode(callSuper = true) @ToString(callSuper = true) public class ProductPropertyValueRespVO extends ProductPropertyValueBaseVO { - @ApiModelProperty(value = "主键", required = true, example = "10") + @Schema(title = "主键", required = true, example = "10") private Long id; - @ApiModelProperty(value = "创建时间") + @Schema(title = "创建时间") private LocalDateTime createTime; } diff --git a/yudao-module-mall/yudao-module-product-biz/src/main/java/cn/iocoder/yudao/module/product/controller/admin/property/vo/value/ProductPropertyValueUpdateReqVO.java b/yudao-module-mall/yudao-module-product-biz/src/main/java/cn/iocoder/yudao/module/product/controller/admin/property/vo/value/ProductPropertyValueUpdateReqVO.java index 2437600a83..cb346c27cb 100644 --- a/yudao-module-mall/yudao-module-product-biz/src/main/java/cn/iocoder/yudao/module/product/controller/admin/property/vo/value/ProductPropertyValueUpdateReqVO.java +++ b/yudao-module-mall/yudao-module-product-biz/src/main/java/cn/iocoder/yudao/module/product/controller/admin/property/vo/value/ProductPropertyValueUpdateReqVO.java @@ -1,16 +1,15 @@ package cn.iocoder.yudao.module.product.controller.admin.property.vo.value; - +import io.swagger.v3.oas.annotations.media.Schema; import lombok.*; -import io.swagger.annotations.*; import javax.validation.constraints.*; -@ApiModel("管理后台 - 规格值更新 Request VO") +@Schema(title = "管理后台 - 规格值更新 Request VO") @Data @EqualsAndHashCode(callSuper = true) @ToString(callSuper = true) public class ProductPropertyValueUpdateReqVO extends ProductPropertyValueBaseVO { - @ApiModelProperty(value = "主键", required = true, example = "1024") + @Schema(title = "主键", required = true, example = "1024") @NotNull(message = "主键不能为空") private Long id; diff --git a/yudao-module-mall/yudao-module-product-biz/src/main/java/cn/iocoder/yudao/module/product/controller/admin/sku/ProductSkuController.java b/yudao-module-mall/yudao-module-product-biz/src/main/java/cn/iocoder/yudao/module/product/controller/admin/sku/ProductSkuController.java index ac9713423d..6c86017821 100755 --- a/yudao-module-mall/yudao-module-product-biz/src/main/java/cn/iocoder/yudao/module/product/controller/admin/sku/ProductSkuController.java +++ b/yudao-module-mall/yudao-module-product-biz/src/main/java/cn/iocoder/yudao/module/product/controller/admin/sku/ProductSkuController.java @@ -9,8 +9,8 @@ import cn.iocoder.yudao.module.product.dal.dataobject.sku.ProductSkuDO; import cn.iocoder.yudao.module.product.dal.dataobject.spu.ProductSpuDO; import cn.iocoder.yudao.module.product.service.sku.ProductSkuService; import cn.iocoder.yudao.module.product.service.spu.ProductSpuService; -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.GetMapping; import org.springframework.web.bind.annotation.RequestMapping; @@ -24,7 +24,7 @@ import java.util.Map; import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success; import static cn.iocoder.yudao.framework.common.util.collection.CollectionUtils.convertSet; -@Api(tags = "管理后台 - 商品 sku") +@Tag(name = "管理后台 - 商品 sku") @RestController @RequestMapping("/product/sku") @Validated @@ -36,7 +36,7 @@ public class ProductSkuController { private ProductSpuService productSpuService; @GetMapping("/get-option-list") - @ApiOperation("获得商品 SKU 选项的列表") + @Operation(summary = "获得商品 SKU 选项的列表") // @PreAuthorize("@ss.hasPermission('product:sku:query')") public CommonResult> getSkuOptionList() { // 获得 SKU 列表 diff --git a/yudao-module-mall/yudao-module-product-biz/src/main/java/cn/iocoder/yudao/module/product/controller/admin/sku/vo/ProductSkuBaseVO.java b/yudao-module-mall/yudao-module-product-biz/src/main/java/cn/iocoder/yudao/module/product/controller/admin/sku/vo/ProductSkuBaseVO.java index 45cb447b80..8ae8c8a5ab 100755 --- a/yudao-module-mall/yudao-module-product-biz/src/main/java/cn/iocoder/yudao/module/product/controller/admin/sku/vo/ProductSkuBaseVO.java +++ b/yudao-module-mall/yudao-module-product-biz/src/main/java/cn/iocoder/yudao/module/product/controller/admin/sku/vo/ProductSkuBaseVO.java @@ -2,8 +2,7 @@ package cn.iocoder.yudao.module.product.controller.admin.sku.vo; import cn.iocoder.yudao.framework.common.enums.CommonStatusEnum; 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 lombok.Data; import javax.validation.constraints.NotEmpty; @@ -16,54 +15,54 @@ import javax.validation.constraints.NotNull; @Data public class ProductSkuBaseVO { - @ApiModelProperty(value = "商品 SKU 名字", required = true, example = "芋道") + @Schema(title = "商品 SKU 名字", required = true, example = "芋道") @NotEmpty(message = "商品 SKU 名字不能为空") private String name; - @ApiModelProperty(value = "销售价格,单位:分", required = true, example = "1024", notes = "单位:分") + @Schema(title = "销售价格,单位:分", required = true, example = "1024", description = "单位:分") @NotNull(message = "销售价格,单位:分不能为空") private Integer price; - @ApiModelProperty(value = "市场价", example = "1024", notes = "单位:分") + @Schema(title = "市场价", example = "1024", description = "单位:分") private Integer marketPrice; - @ApiModelProperty(value = "成本价", example = "1024", notes = "单位:分") + @Schema(title = "成本价", example = "1024", description = "单位:分") private Integer costPrice; - @ApiModelProperty(value = "条形码", example = "haha") + @Schema(title = "条形码", example = "haha") private String barCode; - @ApiModelProperty(value = "图片地址", required = true, example = "https://www.iocoder.cn/xx.png") + @Schema(title = "图片地址", required = true, example = "https://www.iocoder.cn/xx.png") @NotNull(message = "图片地址不能为空") private String picUrl; - @ApiModelProperty(value = "SKU 状态", required = true, example = "1", notes = "参见 CommonStatusEnum 枚举") + @Schema(title = "SKU 状态", required = true, example = "1", description = "参见 CommonStatusEnum 枚举") @NotNull(message = "SKU 状态不能为空") @InEnum(CommonStatusEnum.class) private Integer status; - @ApiModelProperty(value = "库存", required = true, example = "1") + @Schema(title = "库存", required = true, example = "1") @NotNull(message = "库存不能为空") private Integer stock; - @ApiModelProperty(value = "预警预存", example = "1") + @Schema(title = "预警预存", example = "1") private Integer warnStock; - @ApiModelProperty(value = "商品重量", example = "1", notes = "单位:kg 千克") + @Schema(title = "商品重量", example = "1", description = "单位:kg 千克") private Double weight; - @ApiModelProperty(value = "商品体积", example = "1024", notes = "单位:m^3 平米") + @Schema(title = "商品体积", example = "1024", description = "单位:m^3 平米") private Double volume; - @ApiModel("规格值") + @Schema(title = "规格值") @Data public static class Property { - @ApiModelProperty(value = "属性编号", required = true, example = "1") + @Schema(title = "属性编号", required = true, example = "1") @NotNull(message = "属性编号不能为空") private Long propertyId; - @ApiModelProperty(value = "属性值编号", required = true, example = "1024") + @Schema(title = "属性值编号", required = true, example = "1024") @NotNull(message = "属性值编号不能为空") private Long valueId; diff --git a/yudao-module-mall/yudao-module-product-biz/src/main/java/cn/iocoder/yudao/module/product/controller/admin/sku/vo/ProductSkuCreateOrUpdateReqVO.java b/yudao-module-mall/yudao-module-product-biz/src/main/java/cn/iocoder/yudao/module/product/controller/admin/sku/vo/ProductSkuCreateOrUpdateReqVO.java index 6d5ce024d3..3648f3159a 100755 --- a/yudao-module-mall/yudao-module-product-biz/src/main/java/cn/iocoder/yudao/module/product/controller/admin/sku/vo/ProductSkuCreateOrUpdateReqVO.java +++ b/yudao-module-mall/yudao-module-product-biz/src/main/java/cn/iocoder/yudao/module/product/controller/admin/sku/vo/ProductSkuCreateOrUpdateReqVO.java @@ -1,20 +1,19 @@ package cn.iocoder.yudao.module.product.controller.admin.sku.vo; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; +import io.swagger.v3.oas.annotations.media.Schema; import lombok.Data; import lombok.EqualsAndHashCode; import lombok.ToString; import java.util.List; -@ApiModel("管理后台 - 商品 SKU 创建/更新 Request VO") +@Schema(title = "管理后台 - 商品 SKU 创建/更新 Request VO") @Data @EqualsAndHashCode(callSuper = true) @ToString(callSuper = true) public class ProductSkuCreateOrUpdateReqVO extends ProductSkuBaseVO { - @ApiModelProperty(value = "商品 SKU 编号", example = "1") + @Schema(title = "商品 SKU 编号", example = "1") private Long id; /** diff --git a/yudao-module-mall/yudao-module-product-biz/src/main/java/cn/iocoder/yudao/module/product/controller/admin/sku/vo/ProductSkuOptionRespVO.java b/yudao-module-mall/yudao-module-product-biz/src/main/java/cn/iocoder/yudao/module/product/controller/admin/sku/vo/ProductSkuOptionRespVO.java index 0324bdc8d0..dd71d69544 100644 --- a/yudao-module-mall/yudao-module-product-biz/src/main/java/cn/iocoder/yudao/module/product/controller/admin/sku/vo/ProductSkuOptionRespVO.java +++ b/yudao-module-mall/yudao-module-product-biz/src/main/java/cn/iocoder/yudao/module/product/controller/admin/sku/vo/ProductSkuOptionRespVO.java @@ -1,31 +1,30 @@ package cn.iocoder.yudao.module.product.controller.admin.sku.vo; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; +import io.swagger.v3.oas.annotations.media.Schema; import lombok.Data; -@ApiModel(value = "管理后台 - 商品 SKU 选项 Response VO", description = "用于前端 SELECT 选项") +@Schema(title = "管理后台 - 商品 SKU 选项 Response VO", description = "用于前端 SELECT 选项") @Data public class ProductSkuOptionRespVO { - @ApiModelProperty(value = "主键", required = true, example = "1024") + @Schema(title = "主键", required = true, example = "1024") private Long id; - @ApiModelProperty(value = "商品 SKU 名字", example = "红色") + @Schema(title = "商品 SKU 名字", example = "红色") private String name; - @ApiModelProperty(value = "销售价格", required = true, example = "100", notes = "单位:分") + @Schema(title = "销售价格", required = true, example = "100", description = "单位:分") private String price; - @ApiModelProperty(value = "库存", required = true, example = "100") + @Schema(title = "库存", required = true, example = "100") private Integer stock; // ========== 商品 SPU 信息 ========== - @ApiModelProperty(value = "商品 SPU 编号", required = true, example = "1") + @Schema(title = "商品 SPU 编号", required = true, example = "1") private Long spuId; - @ApiModelProperty(value = "商品 SPU 名字", required = true, example = "iPhone 11") + @Schema(title = "商品 SPU 名字", required = true, example = "iPhone 11") private String spuName; } diff --git a/yudao-module-mall/yudao-module-product-biz/src/main/java/cn/iocoder/yudao/module/product/controller/admin/sku/vo/ProductSkuRespVO.java b/yudao-module-mall/yudao-module-product-biz/src/main/java/cn/iocoder/yudao/module/product/controller/admin/sku/vo/ProductSkuRespVO.java index 1ac29724b1..62e4ec9cc0 100755 --- a/yudao-module-mall/yudao-module-product-biz/src/main/java/cn/iocoder/yudao/module/product/controller/admin/sku/vo/ProductSkuRespVO.java +++ b/yudao-module-mall/yudao-module-product-biz/src/main/java/cn/iocoder/yudao/module/product/controller/admin/sku/vo/ProductSkuRespVO.java @@ -1,7 +1,6 @@ package cn.iocoder.yudao.module.product.controller.admin.sku.vo; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; +import io.swagger.v3.oas.annotations.media.Schema; import lombok.Data; import lombok.EqualsAndHashCode; import lombok.ToString; @@ -9,16 +8,16 @@ import lombok.ToString; import java.time.LocalDateTime; import java.util.List; -@ApiModel("管理后台 - 商品 SKU Response VO") +@Schema(title = "管理后台 - 商品 SKU Response VO") @Data @EqualsAndHashCode(callSuper = true) @ToString(callSuper = true) public class ProductSkuRespVO extends ProductSkuBaseVO { - @ApiModelProperty(value = "主键", required = true, example = "1024") + @Schema(title = "主键", required = true, example = "1024") private Long id; - @ApiModelProperty(value = "创建时间") + @Schema(title = "创建时间") private LocalDateTime createTime; /** diff --git a/yudao-module-mall/yudao-module-product-biz/src/main/java/cn/iocoder/yudao/module/product/controller/admin/spu/ProductSpuController.java b/yudao-module-mall/yudao-module-product-biz/src/main/java/cn/iocoder/yudao/module/product/controller/admin/spu/ProductSpuController.java index 155fd02653..0801da438e 100755 --- a/yudao-module-mall/yudao-module-product-biz/src/main/java/cn/iocoder/yudao/module/product/controller/admin/spu/ProductSpuController.java +++ b/yudao-module-mall/yudao-module-product-biz/src/main/java/cn/iocoder/yudao/module/product/controller/admin/spu/ProductSpuController.java @@ -6,9 +6,9 @@ import cn.iocoder.yudao.module.product.controller.admin.spu.vo.*; import cn.iocoder.yudao.module.product.convert.spu.ProductSpuConvert; import cn.iocoder.yudao.module.product.dal.dataobject.spu.ProductSpuDO; import cn.iocoder.yudao.module.product.service.spu.ProductSpuService; -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 = "管理后台 - 商品 SPU") +@Tag(name = "管理后台 - 商品 SPU") @RestController @RequestMapping("/product/spu") @Validated @@ -30,14 +30,14 @@ public class ProductSpuController { private ProductSpuService spuService; @PostMapping("/create") - @ApiOperation("创建商品 SPU") + @Operation(summary = "创建商品 SPU") @PreAuthorize("@ss.hasPermission('product:spu:create')") public CommonResult createProductSpu(@Valid @RequestBody ProductSpuCreateReqVO createReqVO) { return success(spuService.createSpu(createReqVO)); } @PutMapping("/update") - @ApiOperation("更新商品 SPU") + @Operation(summary = "更新商品 SPU") @PreAuthorize("@ss.hasPermission('product:spu:update')") public CommonResult updateSpu(@Valid @RequestBody ProductSpuUpdateReqVO updateReqVO) { spuService.updateSpu(updateReqVO); @@ -45,8 +45,8 @@ public class ProductSpuController { } @DeleteMapping("/delete") - @ApiOperation("删除商品 SPU") - @ApiImplicitParam(name = "id", value = "编号", required = true, dataTypeClass = Long.class) + @Operation(summary = "删除商品 SPU") + @Parameter(name = "id", description = "编号", required = true) @PreAuthorize("@ss.hasPermission('product:spu:delete')") public CommonResult deleteSpu(@RequestParam("id") Long id) { spuService.deleteSpu(id); @@ -55,16 +55,16 @@ public class ProductSpuController { // TODO 芋艿:修改接口 @GetMapping("/get/detail") - @ApiOperation("获得商品 SPU") - @ApiImplicitParam(name = "id", value = "编号", required = true, example = "1024", dataTypeClass = Long.class) + @Operation(summary = "获得商品 SPU") + @Parameter(name = "id", description = "编号", required = true, example = "1024") @PreAuthorize("@ss.hasPermission('product:spu:query')") public CommonResult getSpuDetail(@RequestParam("id") Long id) { return success(spuService.getSpuDetail(id)); } @GetMapping("/get") - @ApiOperation("获得商品 SPU") - @ApiImplicitParam(name = "id", value = "编号", required = true, example = "1024", dataTypeClass = Long.class) + @Operation(summary = "获得商品 SPU") + @Parameter(name = "id", description = "编号", required = true, example = "1024") @PreAuthorize("@ss.hasPermission('product:spu:query')") public CommonResult getSpu(@RequestParam("id") Long id) { return success(spuService.getSpu(id)); @@ -72,8 +72,8 @@ public class ProductSpuController { @GetMapping("/list") - @ApiOperation("获得商品 SPU 列表") - @ApiImplicitParam(name = "ids", value = "编号列表", required = true, example = "1024,2048", dataTypeClass = List.class) + @Operation(summary = "获得商品 SPU 列表") + @Parameter(name = "ids", description = "编号列表", required = true, example = "1024,2048") @PreAuthorize("@ss.hasPermission('product:spu:query')") public CommonResult> getSpuList(@RequestParam("ids") Collection ids) { List list = spuService.getSpuList(ids); @@ -81,7 +81,7 @@ public class ProductSpuController { } @GetMapping("/get-simple-list") - @ApiOperation("获得商品 SPU 精简列表") + @Operation(summary = "获得商品 SPU 精简列表") @PreAuthorize("@ss.hasPermission('product:spu:query')") public CommonResult> getSpuSimpleList() { List list = spuService.getSpuList(); @@ -89,7 +89,7 @@ public class ProductSpuController { } @GetMapping("/page") - @ApiOperation("获得商品 SPU 分页") + @Operation(summary = "获得商品 SPU 分页") @PreAuthorize("@ss.hasPermission('product:spu:query')") public CommonResult> getSpuPage(@Valid ProductSpuPageReqVO pageVO) { return success(spuService.getSpuPage(pageVO)); diff --git a/yudao-module-mall/yudao-module-product-biz/src/main/java/cn/iocoder/yudao/module/product/controller/admin/spu/vo/ProductSpuBaseVO.java b/yudao-module-mall/yudao-module-product-biz/src/main/java/cn/iocoder/yudao/module/product/controller/admin/spu/vo/ProductSpuBaseVO.java index 54f0986dd8..fa7e2717d3 100755 --- a/yudao-module-mall/yudao-module-product-biz/src/main/java/cn/iocoder/yudao/module/product/controller/admin/spu/vo/ProductSpuBaseVO.java +++ b/yudao-module-mall/yudao-module-product-biz/src/main/java/cn/iocoder/yudao/module/product/controller/admin/spu/vo/ProductSpuBaseVO.java @@ -3,7 +3,7 @@ package cn.iocoder.yudao.module.product.controller.admin.spu.vo; import cn.iocoder.yudao.framework.common.validation.InEnum; import cn.iocoder.yudao.module.product.enums.spu.ProductSpuSpecTypeEnum; import cn.iocoder.yudao.module.product.enums.spu.ProductSpuStatusEnum; -import io.swagger.annotations.ApiModelProperty; +import io.swagger.v3.oas.annotations.media.Schema; import lombok.Data; import javax.validation.constraints.NotEmpty; @@ -17,75 +17,75 @@ import java.util.List; @Data public class ProductSpuBaseVO { - @ApiModelProperty(value = "商品名称", required = true, example = "芋道") + @Schema(title = "商品名称", required = true, example = "芋道") @NotEmpty(message = "商品名称不能为空") private String name; - @ApiModelProperty(value = "商品编码", example = "yudaoyuanma") + @Schema(title = "商品编码", example = "yudaoyuanma") private String code; - @ApiModelProperty(value = "促销语", example = "好吃!") + @Schema(title = "促销语", example = "好吃!") private String sellPoint; - @ApiModelProperty(value = "商品详情", required = true, example = "我是商品描述") + @Schema(title = "商品详情", required = true, example = "我是商品描述") @NotNull(message = "商品详情不能为空") private String description; - @ApiModelProperty(value = "商品分类编号", required = true, example = "1") + @Schema(title = "商品分类编号", required = true, example = "1") @NotNull(message = "商品分类编号不能为空") private Long categoryId; - @ApiModelProperty(value = "商品品牌编号", example = "1") + @Schema(title = "商品品牌编号", example = "1") private Long brandId; - @ApiModelProperty(value = "商品图片的数组", required = true) + @Schema(title = "商品图片的数组", required = true) @NotNull(message = "商品图片的数组不能为空") private List picUrls; - @ApiModelProperty(value = "商品视频", required = true) + @Schema(title = "商品视频", required = true) private String videoUrl; - @ApiModelProperty(value = "排序字段", required = true, example = "1") + @Schema(title = "排序字段", required = true, example = "1") private Integer sort; - @ApiModelProperty(value = "商品状态", required = true, example = "1", notes = "参见 ProductSpuStatusEnum 枚举类") + @Schema(title = "商品状态", required = true, example = "1", description = "参见 ProductSpuStatusEnum 枚举类") @NotNull(message = "商品状态不能为空") @InEnum(ProductSpuStatusEnum.class) private Integer status; // ========== SKU 相关字段 ========= - @ApiModelProperty(value = "规格类型", required = true, example = "1", notes = "参见 ProductSpuSpecTypeEnum 枚举类") + @Schema(title = "规格类型", required = true, example = "1", description = "参见 ProductSpuSpecTypeEnum 枚举类") @NotNull(message = "规格类型不能为空") @InEnum(ProductSpuSpecTypeEnum.class) private Integer specType; - @ApiModelProperty(value = "是否展示库存", required = true, example = "true") + @Schema(title = "是否展示库存", required = true, example = "true") @NotNull(message = "是否展示库存不能为空") private Boolean showStock; - @ApiModelProperty(value = "库存", required = true, example = "true") + @Schema(title = "库存", required = true, example = "true") private Integer totalStock; - @ApiModelProperty(value = "市场价", example = "1024") + @Schema(title = "市场价", example = "1024") private Integer marketPrice; - @ApiModelProperty(value = " 最小价格,单位使用:分", required = true, example = "1024") + @Schema(title = " 最小价格,单位使用:分", required = true, example = "1024") private Integer minPrice; - @ApiModelProperty(value = "最大价格,单位使用:分", required = true, example = "1024") + @Schema(title = "最大价格,单位使用:分", required = true, example = "1024") private Integer maxPrice; // ========== 统计相关字段 ========= - @ApiModelProperty(value = "商品销量", example = "1024") + @Schema(title = "商品销量", example = "1024") private Integer salesCount; - @ApiModelProperty(value = "虚拟销量", required = true, example = "1024") + @Schema(title = "虚拟销量", required = true, example = "1024") @NotNull(message = "虚拟销量不能为空") private Integer virtualSalesCount; - @ApiModelProperty(value = "点击量", example = "1024") + @Schema(title = "点击量", example = "1024") private Integer clickCount; } diff --git a/yudao-module-mall/yudao-module-product-biz/src/main/java/cn/iocoder/yudao/module/product/controller/admin/spu/vo/ProductSpuCreateReqVO.java b/yudao-module-mall/yudao-module-product-biz/src/main/java/cn/iocoder/yudao/module/product/controller/admin/spu/vo/ProductSpuCreateReqVO.java index 87b0dd0b66..50aef85704 100755 --- a/yudao-module-mall/yudao-module-product-biz/src/main/java/cn/iocoder/yudao/module/product/controller/admin/spu/vo/ProductSpuCreateReqVO.java +++ b/yudao-module-mall/yudao-module-product-biz/src/main/java/cn/iocoder/yudao/module/product/controller/admin/spu/vo/ProductSpuCreateReqVO.java @@ -1,7 +1,7 @@ package cn.iocoder.yudao.module.product.controller.admin.spu.vo; import cn.iocoder.yudao.module.product.controller.admin.sku.vo.ProductSkuCreateOrUpdateReqVO; -import io.swagger.annotations.ApiModel; +import io.swagger.v3.oas.annotations.media.Schema; import lombok.Data; import lombok.EqualsAndHashCode; import lombok.ToString; @@ -9,7 +9,7 @@ import lombok.ToString; import javax.validation.Valid; import java.util.List; -@ApiModel("管理后台 - 商品 SPU 创建 Request VO") +@Schema(title = "管理后台 - 商品 SPU 创建 Request VO") @Data @EqualsAndHashCode(callSuper = true) @ToString(callSuper = true) diff --git a/yudao-module-mall/yudao-module-product-biz/src/main/java/cn/iocoder/yudao/module/product/controller/admin/spu/vo/ProductSpuDetailRespVO.java b/yudao-module-mall/yudao-module-product-biz/src/main/java/cn/iocoder/yudao/module/product/controller/admin/spu/vo/ProductSpuDetailRespVO.java index de41d14169..622d9eecd6 100644 --- a/yudao-module-mall/yudao-module-product-biz/src/main/java/cn/iocoder/yudao/module/product/controller/admin/spu/vo/ProductSpuDetailRespVO.java +++ b/yudao-module-mall/yudao-module-product-biz/src/main/java/cn/iocoder/yudao/module/product/controller/admin/spu/vo/ProductSpuDetailRespVO.java @@ -2,8 +2,7 @@ package cn.iocoder.yudao.module.product.controller.admin.spu.vo; import cn.iocoder.yudao.module.product.controller.admin.property.vo.ProductPropertyViewRespVO; import cn.iocoder.yudao.module.product.controller.admin.sku.vo.ProductSkuBaseVO; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; +import io.swagger.v3.oas.annotations.media.Schema; import lombok.Data; import lombok.EqualsAndHashCode; import lombok.ToString; @@ -11,16 +10,16 @@ import lombok.ToString; import java.time.LocalDateTime; import java.util.List; -@ApiModel(value = "管理后台 - 商品 SPU 详细 Response VO", description = "包括关联的 SKU 等信息") +@Schema(title = "管理后台 - 商品 SPU 详细 Response VO", description = "包括关联的 SKU 等信息") @Data @EqualsAndHashCode(callSuper = true) @ToString(callSuper = true) public class ProductSpuDetailRespVO extends ProductSpuBaseVO { - @ApiModelProperty(value = "主键", required = true, example = "1") + @Schema(title = "主键", required = true, example = "1") private Long id; - @ApiModelProperty(value = "创建时间") + @Schema(title = "创建时间") private LocalDateTime createTime; /** @@ -28,7 +27,7 @@ public class ProductSpuDetailRespVO extends ProductSpuBaseVO { */ private List skus; - @ApiModel(value = "管理后台 - 商品 SKU 详细 Response VO") + @Schema(title = "管理后台 - 商品 SKU 详细 Response VO") @Data @EqualsAndHashCode(callSuper = true) @ToString(callSuper = true) @@ -41,25 +40,25 @@ public class ProductSpuDetailRespVO extends ProductSpuBaseVO { } - @ApiModel(value = "管理后台 - 商品规格的详细 Response VO") + @Schema(title = "管理后台 - 商品规格的详细 Response VO") @Data @EqualsAndHashCode(callSuper = true) @ToString(callSuper = true) public static class Property extends ProductSkuBaseVO.Property { - @ApiModelProperty(value = "规格的名字", required = true, example = "颜色") + @Schema(title = "规格的名字", required = true, example = "颜色") private String propertyName; - @ApiModelProperty(value = "规格值的名字", required = true, example = "蓝色") + @Schema(title = "规格值的名字", required = true, example = "蓝色") private String valueName; } - @ApiModelProperty(value = "分类 id 数组,一直递归到一级父节点", example = "4") + @Schema(title = "分类 id 数组,一直递归到一级父节点", example = "4") private Long categoryId; // TODO @芋艿:在瞅瞅~ - @ApiModelProperty(value = "规格属性修改和详情展示组合", example = "[{\"propertyId\":2,\"name\":\"内存\",\"propertyValues\":[{\"v1\":11,\"v2\":\"64G\"},{\"v1\":10,\"v2\":\"32G\"}]},{\"propertyId\":3,\"name\":\"尺寸\",\"propertyValues\":[{\"v1\":16,\"v2\":\"6.1\"},{\"v1\":15,\"v2\":\"5.7\"}]}]") + @Schema(title = "规格属性修改和详情展示组合", example = "[{\"propertyId\":2,\"name\":\"内存\",\"propertyValues\":[{\"v1\":11,\"v2\":\"64G\"},{\"v1\":10,\"v2\":\"32G\"}]},{\"propertyId\":3,\"name\":\"尺寸\",\"propertyValues\":[{\"v1\":16,\"v2\":\"6.1\"},{\"v1\":15,\"v2\":\"5.7\"}]}]") private List productPropertyViews; } diff --git a/yudao-module-mall/yudao-module-product-biz/src/main/java/cn/iocoder/yudao/module/product/controller/admin/spu/vo/ProductSpuPageReqVO.java b/yudao-module-mall/yudao-module-product-biz/src/main/java/cn/iocoder/yudao/module/product/controller/admin/spu/vo/ProductSpuPageReqVO.java index 8d1bbee5fe..47ba5f2131 100755 --- a/yudao-module-mall/yudao-module-product-biz/src/main/java/cn/iocoder/yudao/module/product/controller/admin/spu/vo/ProductSpuPageReqVO.java +++ b/yudao-module-mall/yudao-module-product-biz/src/main/java/cn/iocoder/yudao/module/product/controller/admin/spu/vo/ProductSpuPageReqVO.java @@ -1,46 +1,45 @@ package cn.iocoder.yudao.module.product.controller.admin.spu.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 lombok.Data; import lombok.EqualsAndHashCode; import lombok.ToString; -@ApiModel("管理后台 - 商品 SPU 分页 Request VO") +@Schema(title = "管理后台 - 商品 SPU 分页 Request VO") @Data @EqualsAndHashCode(callSuper = true) @ToString(callSuper = true) public class ProductSpuPageReqVO extends PageParam { - @ApiModelProperty(value = "商品名称", example = "yutou") + @Schema(title = "商品名称", example = "yutou") private String name; - @ApiModelProperty(value = "商品编码", example = "yudaoyuanma") + @Schema(title = "商品编码", example = "yudaoyuanma") private String code; - @ApiModelProperty(value = "分类id", example = "1") + @Schema(title = "分类id", example = "1") private Long categoryId; - @ApiModelProperty(value = "商品品牌编号", example = "1") + @Schema(title = "商品品牌编号", example = "1") private Long brandId; - @ApiModelProperty(value = "上下架状态", example = "1", notes = "参见 ProductSpuStatusEnum 枚举值") + @Schema(title = "上下架状态", example = "1", description = "参见 ProductSpuStatusEnum 枚举值") private Integer status; - @ApiModelProperty(value = "销量最小值", example = "1") + @Schema(title = "销量最小值", example = "1") private Integer salesCountMin; - @ApiModelProperty(value = "销量最大值", example = "1024") + @Schema(title = "销量最大值", example = "1024") private Integer salesCountMax; - @ApiModelProperty(value = "市场价最小值", example = "1") + @Schema(title = "市场价最小值", example = "1") private Integer marketPriceMin; - @ApiModelProperty(value = "市场价最大值", example = "1024") + @Schema(title = "市场价最大值", example = "1024") private Integer marketPriceMax; - @ApiModelProperty(value = "是否库存告警", example = "true") + @Schema(title = "是否库存告警", example = "true") private Boolean alarmStock; } diff --git a/yudao-module-mall/yudao-module-product-biz/src/main/java/cn/iocoder/yudao/module/product/controller/admin/spu/vo/ProductSpuRespVO.java b/yudao-module-mall/yudao-module-product-biz/src/main/java/cn/iocoder/yudao/module/product/controller/admin/spu/vo/ProductSpuRespVO.java index a8dca328b6..46a1639ade 100755 --- a/yudao-module-mall/yudao-module-product-biz/src/main/java/cn/iocoder/yudao/module/product/controller/admin/spu/vo/ProductSpuRespVO.java +++ b/yudao-module-mall/yudao-module-product-biz/src/main/java/cn/iocoder/yudao/module/product/controller/admin/spu/vo/ProductSpuRespVO.java @@ -1,7 +1,6 @@ package cn.iocoder.yudao.module.product.controller.admin.spu.vo; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; +import io.swagger.v3.oas.annotations.media.Schema; import lombok.Data; import lombok.EqualsAndHashCode; import lombok.ToString; @@ -9,16 +8,16 @@ import lombok.ToString; import java.time.LocalDateTime; import java.util.List; -@ApiModel("管理后台 - 商品 SPU Response VO") +@Schema(title = "管理后台 - 商品 SPU Response VO") @Data @EqualsAndHashCode(callSuper = true) @ToString(callSuper = true) public class ProductSpuRespVO extends ProductSpuBaseVO { - @ApiModelProperty(value = "主键", required = true, example = "1") + @Schema(title = "主键", required = true, example = "1") private Long id; - @ApiModelProperty(value = "创建时间") + @Schema(title = "创建时间") private LocalDateTime createTime; } diff --git a/yudao-module-mall/yudao-module-product-biz/src/main/java/cn/iocoder/yudao/module/product/controller/admin/spu/vo/ProductSpuSimpleRespVO.java b/yudao-module-mall/yudao-module-product-biz/src/main/java/cn/iocoder/yudao/module/product/controller/admin/spu/vo/ProductSpuSimpleRespVO.java index ea2811f8b8..fe8e9a1c03 100755 --- a/yudao-module-mall/yudao-module-product-biz/src/main/java/cn/iocoder/yudao/module/product/controller/admin/spu/vo/ProductSpuSimpleRespVO.java +++ b/yudao-module-mall/yudao-module-product-biz/src/main/java/cn/iocoder/yudao/module/product/controller/admin/spu/vo/ProductSpuSimpleRespVO.java @@ -1,27 +1,26 @@ package cn.iocoder.yudao.module.product.controller.admin.spu.vo; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; +import io.swagger.v3.oas.annotations.media.Schema; import lombok.Data; import lombok.EqualsAndHashCode; import lombok.ToString; -@ApiModel("管理后台 - 商品 SPU 精简 Response VO") +@Schema(title = "管理后台 - 商品 SPU 精简 Response VO") @Data @EqualsAndHashCode(callSuper = true) @ToString(callSuper = true) public class ProductSpuSimpleRespVO extends ProductSpuBaseVO { - @ApiModelProperty(value = "主键", required = true, example = "1") + @Schema(title = "主键", required = true, example = "1") private Long id; - @ApiModelProperty(value = "商品名称", required = true, example = "芋道") + @Schema(title = "商品名称", required = true, example = "芋道") private String name; - @ApiModelProperty(value = " 最小价格,单位使用:分", required = true, example = "1024") + @Schema(title = " 最小价格,单位使用:分", required = true, example = "1024") private Integer minPrice; - @ApiModelProperty(value = "最大价格,单位使用:分", required = true, example = "1024") + @Schema(title = "最大价格,单位使用:分", required = true, example = "1024") private Integer maxPrice; } diff --git a/yudao-module-mall/yudao-module-product-biz/src/main/java/cn/iocoder/yudao/module/product/controller/admin/spu/vo/ProductSpuUpdateReqVO.java b/yudao-module-mall/yudao-module-product-biz/src/main/java/cn/iocoder/yudao/module/product/controller/admin/spu/vo/ProductSpuUpdateReqVO.java index 378a98dc66..5c988a3a29 100755 --- a/yudao-module-mall/yudao-module-product-biz/src/main/java/cn/iocoder/yudao/module/product/controller/admin/spu/vo/ProductSpuUpdateReqVO.java +++ b/yudao-module-mall/yudao-module-product-biz/src/main/java/cn/iocoder/yudao/module/product/controller/admin/spu/vo/ProductSpuUpdateReqVO.java @@ -1,8 +1,7 @@ package cn.iocoder.yudao.module.product.controller.admin.spu.vo; import cn.iocoder.yudao.module.product.controller.admin.sku.vo.ProductSkuCreateOrUpdateReqVO; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; +import io.swagger.v3.oas.annotations.media.Schema; import lombok.Data; import lombok.EqualsAndHashCode; import lombok.ToString; @@ -11,13 +10,13 @@ import javax.validation.Valid; import javax.validation.constraints.NotNull; import java.util.List; -@ApiModel("管理后台 - 商品 SPU 更新 Request VO") +@Schema(title = "管理后台 - 商品 SPU 更新 Request VO") @Data @EqualsAndHashCode(callSuper = true) @ToString(callSuper = true) public class ProductSpuUpdateReqVO extends ProductSpuBaseVO { - @ApiModelProperty(value = "商品编号", required = true, example = "1") + @Schema(title = "商品编号", required = true, example = "1") @NotNull(message = "商品编号不能为空") private Long id; diff --git a/yudao-module-mall/yudao-module-product-biz/src/main/java/cn/iocoder/yudao/module/product/controller/app/category/AppCategoryController.java b/yudao-module-mall/yudao-module-product-biz/src/main/java/cn/iocoder/yudao/module/product/controller/app/category/AppCategoryController.java index fec882c487..79f066de4e 100644 --- a/yudao-module-mall/yudao-module-product-biz/src/main/java/cn/iocoder/yudao/module/product/controller/app/category/AppCategoryController.java +++ b/yudao-module-mall/yudao-module-product-biz/src/main/java/cn/iocoder/yudao/module/product/controller/app/category/AppCategoryController.java @@ -5,8 +5,8 @@ import cn.iocoder.yudao.module.product.controller.app.category.vo.AppCategoryRes import cn.iocoder.yudao.module.product.convert.category.ProductCategoryConvert; import cn.iocoder.yudao.module.product.dal.dataobject.category.ProductCategoryDO; import cn.iocoder.yudao.module.product.service.category.ProductCategoryService; -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.GetMapping; import org.springframework.web.bind.annotation.RequestMapping; @@ -18,7 +18,7 @@ import java.util.List; import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success; -@Api(tags = "用户 APP - 商品分类") +@Tag(name = "用户 APP - 商品分类") @RestController @RequestMapping("/product/category") @Validated @@ -28,7 +28,7 @@ public class AppCategoryController { private ProductCategoryService categoryService; @GetMapping("/list") - @ApiOperation("获得商品分类列表") + @Operation(summary = "获得商品分类列表") public CommonResult> getProductCategoryList() { List list = categoryService.getEnableCategoryList(); list.sort(Comparator.comparing(ProductCategoryDO::getSort)); diff --git a/yudao-module-mall/yudao-module-product-biz/src/main/java/cn/iocoder/yudao/module/product/controller/app/category/vo/AppCategoryRespVO.java b/yudao-module-mall/yudao-module-product-biz/src/main/java/cn/iocoder/yudao/module/product/controller/app/category/vo/AppCategoryRespVO.java index e46a50cd3f..555677b9a1 100644 --- a/yudao-module-mall/yudao-module-product-biz/src/main/java/cn/iocoder/yudao/module/product/controller/app/category/vo/AppCategoryRespVO.java +++ b/yudao-module-mall/yudao-module-product-biz/src/main/java/cn/iocoder/yudao/module/product/controller/app/category/vo/AppCategoryRespVO.java @@ -1,28 +1,27 @@ package cn.iocoder.yudao.module.product.controller.app.category.vo; -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.NotBlank; import javax.validation.constraints.NotNull; @Data -@ApiModel(value = "用户 APP - 商品分类 Response VO") +@Schema(title = "用户 APP - 商品分类 Response VO") public class AppCategoryRespVO { - @ApiModelProperty(value = "分类编号", required = true, example = "2") + @Schema(title = "分类编号", required = true, example = "2") private Long id; - @ApiModelProperty(value = "父分类编号", required = true, example = "1") + @Schema(title = "父分类编号", required = true, example = "1") @NotNull(message = "父分类编号不能为空") private Long parentId; - @ApiModelProperty(value = "分类名称", required = true, example = "办公文具") + @Schema(title = "分类名称", required = true, example = "办公文具") @NotBlank(message = "分类名称不能为空") private String name; - @ApiModelProperty(value = "分类图片", required = true) + @Schema(title = "分类图片", required = true) @NotBlank(message = "分类图片不能为空") private String picUrl; diff --git a/yudao-module-mall/yudao-module-product-biz/src/main/java/cn/iocoder/yudao/module/product/controller/app/spu/AppProductSpuController.java b/yudao-module-mall/yudao-module-product-biz/src/main/java/cn/iocoder/yudao/module/product/controller/app/spu/AppProductSpuController.java index 7e0f912b4d..289b89e1d5 100644 --- a/yudao-module-mall/yudao-module-product-biz/src/main/java/cn/iocoder/yudao/module/product/controller/app/spu/AppProductSpuController.java +++ b/yudao-module-mall/yudao-module-product-biz/src/main/java/cn/iocoder/yudao/module/product/controller/app/spu/AppProductSpuController.java @@ -7,8 +7,8 @@ import cn.iocoder.yudao.module.product.controller.app.spu.vo.AppSpuPageReqVO; import cn.iocoder.yudao.module.product.controller.app.spu.vo.AppSpuPageRespVO; import cn.iocoder.yudao.module.product.controller.app.spu.vo.AppSpuRespVO; import cn.iocoder.yudao.module.product.service.spu.ProductSpuService; -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.GetMapping; import org.springframework.web.bind.annotation.RequestMapping; @@ -20,7 +20,7 @@ import javax.validation.Valid; import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success; -@Api(tags = "用户 APP - 商品spu") +@Tag(name = "用户 APP - 商品spu") @RestController @RequestMapping("/product/spu") @Validated @@ -30,13 +30,13 @@ public class AppProductSpuController { private ProductSpuService spuService; @GetMapping("/page") - @ApiOperation("获得商品spu分页") + @Operation(summary = "获得商品spu分页") public CommonResult> getSpuPage(@Valid AppSpuPageReqVO pageVO) { return success(spuService.getSpuPage(pageVO)); } @GetMapping("/") - @ApiOperation("获取商品 - 通过商品id") + @Operation(summary = "获取商品 - 通过商品id") public CommonResult getSpu(@RequestParam("spuId") Long spuId) { AppSpuRespVO appSpuRespVO = BeanUtil.toBean(spuService.getSpu(spuId), AppSpuRespVO.class); return success(appSpuRespVO); diff --git a/yudao-module-mall/yudao-module-product-biz/src/main/java/cn/iocoder/yudao/module/product/controller/app/spu/vo/AppSpuPageReqVO.java b/yudao-module-mall/yudao-module-product-biz/src/main/java/cn/iocoder/yudao/module/product/controller/app/spu/vo/AppSpuPageReqVO.java index 38ed4975ef..facabfa882 100644 --- a/yudao-module-mall/yudao-module-product-biz/src/main/java/cn/iocoder/yudao/module/product/controller/app/spu/vo/AppSpuPageReqVO.java +++ b/yudao-module-mall/yudao-module-product-biz/src/main/java/cn/iocoder/yudao/module/product/controller/app/spu/vo/AppSpuPageReqVO.java @@ -1,18 +1,17 @@ package cn.iocoder.yudao.module.product.controller.app.spu.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 lombok.Data; import lombok.EqualsAndHashCode; import lombok.ToString; -@ApiModel("App - 商品spu分页 Request VO") +@Schema(title = "App - 商品spu分页 Request VO") @Data @EqualsAndHashCode(callSuper = true) @ToString(callSuper = true) public class AppSpuPageReqVO extends PageParam { - @ApiModelProperty(value = "分类id") + @Schema(title = "分类id") private Long categoryId; } diff --git a/yudao-module-mall/yudao-module-product-biz/src/main/java/cn/iocoder/yudao/module/product/controller/app/spu/vo/AppSpuPageRespVO.java b/yudao-module-mall/yudao-module-product-biz/src/main/java/cn/iocoder/yudao/module/product/controller/app/spu/vo/AppSpuPageRespVO.java index c0a0f0eb8e..074058cb45 100644 --- a/yudao-module-mall/yudao-module-product-biz/src/main/java/cn/iocoder/yudao/module/product/controller/app/spu/vo/AppSpuPageRespVO.java +++ b/yudao-module-mall/yudao-module-product-biz/src/main/java/cn/iocoder/yudao/module/product/controller/app/spu/vo/AppSpuPageRespVO.java @@ -1,52 +1,51 @@ package cn.iocoder.yudao.module.product.controller.app.spu.vo; -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.NotNull; import java.util.List; -@ApiModel("App - 商品spu分页 Request VO") +@Schema(title = "App - 商品spu分页 Request VO") @Data public class AppSpuPageRespVO { - @ApiModelProperty(value = "主键", required = true, example = "1") + @Schema(title = "主键", required = true, example = "1") private Long id; - @ApiModelProperty(value = "商品名称") + @Schema(title = "商品名称") private String name; - @ApiModelProperty(value = "卖点", required = true) + @Schema(title = "卖点", required = true) @NotNull(message = "卖点不能为空") private String sellPoint; - @ApiModelProperty(value = "描述", required = true) + @Schema(title = "描述", required = true) @NotNull(message = "描述不能为空") private String description; - @ApiModelProperty(value = "分类id", required = true) + @Schema(title = "分类id", required = true) @NotNull(message = "分类id不能为空") private Long categoryId; - @ApiModelProperty(value = "商品主图地址,* 数组,以逗号分隔,最多上传15张", required = true) + @Schema(title = "商品主图地址,* 数组,以逗号分隔,最多上传15张", required = true) @NotNull(message = "商品主图地址,* 数组,以逗号分隔,最多上传15张不能为空") private List picUrls; - @ApiModelProperty(value = "排序字段", required = true) + @Schema(title = "排序字段", required = true) @NotNull(message = "排序字段不能为空") private Integer sort; - @ApiModelProperty(value = "点赞初始人数") + @Schema(title = "点赞初始人数") private Integer likeCount; - @ApiModelProperty(value = "价格 单位使用:分") + @Schema(title = "价格 单位使用:分") private Integer price; - @ApiModelProperty(value = "库存数量") + @Schema(title = "库存数量") private Integer quantity; - @ApiModelProperty(value = "上下架状态: 0 上架(开启) 1 下架(禁用)") + @Schema(title = "上下架状态: 0 上架(开启) 1 下架(禁用)") private Integer status; } diff --git a/yudao-module-mall/yudao-module-product-biz/src/main/java/cn/iocoder/yudao/module/product/controller/app/spu/vo/AppSpuRespVO.java b/yudao-module-mall/yudao-module-product-biz/src/main/java/cn/iocoder/yudao/module/product/controller/app/spu/vo/AppSpuRespVO.java index b459873700..b63a78a521 100644 --- a/yudao-module-mall/yudao-module-product-biz/src/main/java/cn/iocoder/yudao/module/product/controller/app/spu/vo/AppSpuRespVO.java +++ b/yudao-module-mall/yudao-module-product-biz/src/main/java/cn/iocoder/yudao/module/product/controller/app/spu/vo/AppSpuRespVO.java @@ -1,7 +1,7 @@ package cn.iocoder.yudao.module.product.controller.app.spu.vo; import cn.iocoder.yudao.module.product.controller.admin.spu.vo.ProductSpuRespVO; -import io.swagger.annotations.ApiModel; +import io.swagger.v3.oas.annotations.media.Schema; import lombok.Data; import lombok.EqualsAndHashCode; @@ -12,7 +12,7 @@ import lombok.EqualsAndHashCode; * * @author LuoWenFeng */ -@ApiModel("App - 商品spu Response VO") +@Schema(title = "App - 商品spu Response VO") @Data @EqualsAndHashCode(callSuper = true) public class AppSpuRespVO extends ProductSpuRespVO { diff --git a/yudao-module-mall/yudao-module-promotion-biz/src/main/java/cn/iocoder/yudao/module/promotion/controller/admin/banner/BannerController.java b/yudao-module-mall/yudao-module-promotion-biz/src/main/java/cn/iocoder/yudao/module/promotion/controller/admin/banner/BannerController.java index 0fbef12d58..f052a3349c 100644 --- a/yudao-module-mall/yudao-module-promotion-biz/src/main/java/cn/iocoder/yudao/module/promotion/controller/admin/banner/BannerController.java +++ b/yudao-module-mall/yudao-module-promotion-biz/src/main/java/cn/iocoder/yudao/module/promotion/controller/admin/banner/BannerController.java @@ -6,9 +6,9 @@ import cn.iocoder.yudao.module.promotion.controller.admin.banner.vo.*; import cn.iocoder.yudao.module.promotion.convert.banner.BannerConvert; import cn.iocoder.yudao.module.promotion.dal.dataobject.banner.BannerDO; import cn.iocoder.yudao.module.promotion.service.banner.BannerService; -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.*; @@ -18,7 +18,7 @@ import javax.validation.Valid; import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success; -@Api(tags = "管理后台 - Banner 管理") +@Tag(name = "管理后台 - Banner 管理") @RestController @RequestMapping("/market/banner") @Validated @@ -28,14 +28,14 @@ public class BannerController { private BannerService bannerService; @PostMapping("/create") - @ApiOperation("创建 Banner") + @Operation(summary = "创建 Banner") @PreAuthorize("@ss.hasPermission('market:banner:create')") public CommonResult createBanner(@Valid @RequestBody BannerCreateReqVO createReqVO) { return success(bannerService.createBanner(createReqVO)); } @PutMapping("/update") - @ApiOperation("更新 Banner") + @Operation(summary = "更新 Banner") @PreAuthorize("@ss.hasPermission('market:banner:update')") public CommonResult updateBanner(@Valid @RequestBody BannerUpdateReqVO updateReqVO) { bannerService.updateBanner(updateReqVO); @@ -43,8 +43,8 @@ public class BannerController { } @DeleteMapping("/delete") - @ApiOperation("删除 Banner") - @ApiImplicitParam(name = "id", value = "编号", required = true, dataTypeClass = Long.class) + @Operation(summary = "删除 Banner") + @Parameter(name = "id", description = "编号", required = true) @PreAuthorize("@ss.hasPermission('market:banner:delete')") public CommonResult deleteBanner(@RequestParam("id") Long id) { bannerService.deleteBanner(id); @@ -52,8 +52,8 @@ public class BannerController { } @GetMapping("/get") - @ApiOperation("获得 Banner") - @ApiImplicitParam(name = "id", value = "编号", required = true, example = "1024", dataTypeClass = Long.class) + @Operation(summary = "获得 Banner") + @Parameter(name = "id", description = "编号", required = true, example = "1024") @PreAuthorize("@ss.hasPermission('market:banner:query')") public CommonResult getBanner(@RequestParam("id") Long id) { BannerDO banner = bannerService.getBanner(id); @@ -61,7 +61,7 @@ public class BannerController { } @GetMapping("/page") - @ApiOperation("获得 Banner 分页") + @Operation(summary = "获得 Banner 分页") @PreAuthorize("@ss.hasPermission('market:banner:query')") public CommonResult> getBannerPage(@Valid BannerPageReqVO pageVO) { PageResult pageResult = bannerService.getBannerPage(pageVO); diff --git a/yudao-module-mall/yudao-module-promotion-biz/src/main/java/cn/iocoder/yudao/module/promotion/controller/admin/banner/vo/BannerBaseVO.java b/yudao-module-mall/yudao-module-promotion-biz/src/main/java/cn/iocoder/yudao/module/promotion/controller/admin/banner/vo/BannerBaseVO.java index 3083856f57..75109ff121 100644 --- a/yudao-module-mall/yudao-module-promotion-biz/src/main/java/cn/iocoder/yudao/module/promotion/controller/admin/banner/vo/BannerBaseVO.java +++ b/yudao-module-mall/yudao-module-promotion-biz/src/main/java/cn/iocoder/yudao/module/promotion/controller/admin/banner/vo/BannerBaseVO.java @@ -2,7 +2,7 @@ package cn.iocoder.yudao.module.promotion.controller.admin.banner.vo; 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.NotNull; @@ -15,28 +15,28 @@ import javax.validation.constraints.NotNull; @Data public class BannerBaseVO { - @ApiModelProperty(value = "标题", required = true) + @Schema(title = "标题", required = true) @NotNull(message = "标题不能为空") private String title; - @ApiModelProperty(value = "跳转链接", required = true) + @Schema(title = "跳转链接", required = true) @NotNull(message = "跳转链接不能为空") private String url; - @ApiModelProperty(value = "图片地址", required = true) + @Schema(title = "图片地址", required = true) @NotNull(message = "图片地址不能为空") private String picUrl; - @ApiModelProperty(value = "排序", required = true) + @Schema(title = "排序", required = true) @NotNull(message = "排序不能为空") private Integer sort; - @ApiModelProperty(value = "状态", required = true) + @Schema(title = "状态", required = true) @NotNull(message = "状态不能为空") @InEnum(CommonStatusEnum.class) private Integer status; - @ApiModelProperty(value = "备注") + @Schema(title = "备注") private String memo; } diff --git a/yudao-module-mall/yudao-module-promotion-biz/src/main/java/cn/iocoder/yudao/module/promotion/controller/admin/banner/vo/BannerCreateReqVO.java b/yudao-module-mall/yudao-module-promotion-biz/src/main/java/cn/iocoder/yudao/module/promotion/controller/admin/banner/vo/BannerCreateReqVO.java index c058fd8c29..488dc9aa33 100644 --- a/yudao-module-mall/yudao-module-promotion-biz/src/main/java/cn/iocoder/yudao/module/promotion/controller/admin/banner/vo/BannerCreateReqVO.java +++ b/yudao-module-mall/yudao-module-promotion-biz/src/main/java/cn/iocoder/yudao/module/promotion/controller/admin/banner/vo/BannerCreateReqVO.java @@ -1,6 +1,5 @@ package cn.iocoder.yudao.module.promotion.controller.admin.banner.vo; - -import io.swagger.annotations.ApiModel; +import io.swagger.v3.oas.annotations.media.Schema; import lombok.Data; import lombok.EqualsAndHashCode; import lombok.ToString; @@ -8,7 +7,7 @@ import lombok.ToString; /** * @author xia */ -@ApiModel("管理后台 - Banner 创建 Request VO") +@Schema(title = "管理后台 - Banner 创建 Request VO") @Data @EqualsAndHashCode(callSuper = true) @ToString(callSuper = true) diff --git a/yudao-module-mall/yudao-module-promotion-biz/src/main/java/cn/iocoder/yudao/module/promotion/controller/admin/banner/vo/BannerPageReqVO.java b/yudao-module-mall/yudao-module-promotion-biz/src/main/java/cn/iocoder/yudao/module/promotion/controller/admin/banner/vo/BannerPageReqVO.java index 5b7bd5f31a..99729038ec 100644 --- a/yudao-module-mall/yudao-module-promotion-biz/src/main/java/cn/iocoder/yudao/module/promotion/controller/admin/banner/vo/BannerPageReqVO.java +++ b/yudao-module-mall/yudao-module-promotion-biz/src/main/java/cn/iocoder/yudao/module/promotion/controller/admin/banner/vo/BannerPageReqVO.java @@ -3,8 +3,7 @@ package cn.iocoder.yudao.module.promotion.controller.admin.banner.vo; import cn.iocoder.yudao.framework.common.enums.CommonStatusEnum; import cn.iocoder.yudao.framework.common.pojo.PageParam; 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 lombok.Data; import lombok.EqualsAndHashCode; import lombok.ToString; @@ -17,22 +16,22 @@ import static cn.iocoder.yudao.framework.common.util.date.DateUtils.FORMAT_YEAR_ /** * @author xia */ -@ApiModel("管理后台 - Banner 分页 Request VO") +@Schema(title = "管理后台 - Banner 分页 Request VO") @Data @EqualsAndHashCode(callSuper = true) @ToString(callSuper = true) public class BannerPageReqVO extends PageParam { - @ApiModelProperty(value = "标题") + @Schema(title = "标题") private String title; - @ApiModelProperty(value = "状态") + @Schema(title = "状态") @InEnum(CommonStatusEnum.class) private Integer status; @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND) - @ApiModelProperty(value = "创建时间") + @Schema(title = "创建时间") private LocalDateTime[] createTime; } diff --git a/yudao-module-mall/yudao-module-promotion-biz/src/main/java/cn/iocoder/yudao/module/promotion/controller/admin/banner/vo/BannerRespVO.java b/yudao-module-mall/yudao-module-promotion-biz/src/main/java/cn/iocoder/yudao/module/promotion/controller/admin/banner/vo/BannerRespVO.java index 6b50110e84..792585c7d4 100644 --- a/yudao-module-mall/yudao-module-promotion-biz/src/main/java/cn/iocoder/yudao/module/promotion/controller/admin/banner/vo/BannerRespVO.java +++ b/yudao-module-mall/yudao-module-promotion-biz/src/main/java/cn/iocoder/yudao/module/promotion/controller/admin/banner/vo/BannerRespVO.java @@ -1,7 +1,6 @@ package cn.iocoder.yudao.module.promotion.controller.admin.banner.vo; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; +import io.swagger.v3.oas.annotations.media.Schema; import lombok.Data; import lombok.ToString; @@ -11,16 +10,16 @@ import java.time.LocalDateTime; /** * @author xia */ -@ApiModel("管理后台 - Banner Response VO") +@Schema(title = "管理后台 - Banner Response VO") @Data @ToString(callSuper = true) public class BannerRespVO extends BannerBaseVO { - @ApiModelProperty(value = "banner编号", required = true) + @Schema(title = "banner编号", required = true) @NotNull(message = "banner编号不能为空") private Long id; - @ApiModelProperty(value = "创建时间", required = true) + @Schema(title = "创建时间", required = true) private LocalDateTime createTime; } diff --git a/yudao-module-mall/yudao-module-promotion-biz/src/main/java/cn/iocoder/yudao/module/promotion/controller/admin/banner/vo/BannerUpdateReqVO.java b/yudao-module-mall/yudao-module-promotion-biz/src/main/java/cn/iocoder/yudao/module/promotion/controller/admin/banner/vo/BannerUpdateReqVO.java index 971a873531..db4b28709a 100644 --- a/yudao-module-mall/yudao-module-promotion-biz/src/main/java/cn/iocoder/yudao/module/promotion/controller/admin/banner/vo/BannerUpdateReqVO.java +++ b/yudao-module-mall/yudao-module-promotion-biz/src/main/java/cn/iocoder/yudao/module/promotion/controller/admin/banner/vo/BannerUpdateReqVO.java @@ -1,7 +1,6 @@ package cn.iocoder.yudao.module.promotion.controller.admin.banner.vo; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; +import io.swagger.v3.oas.annotations.media.Schema; import lombok.Data; import lombok.EqualsAndHashCode; import lombok.ToString; @@ -11,13 +10,13 @@ import javax.validation.constraints.NotNull; /** * @author xia */ -@ApiModel("管理后台 - Banner更新 Request VO") +@Schema(title = "管理后台 - Banner更新 Request VO") @Data @EqualsAndHashCode(callSuper = true) @ToString(callSuper = true) public class BannerUpdateReqVO extends BannerBaseVO { - @ApiModelProperty(value = "banner 编号", required = true) + @Schema(title = "banner 编号", required = true) @NotNull(message = "banner 编号不能为空") private Long id; diff --git a/yudao-module-mall/yudao-module-promotion-biz/src/main/java/cn/iocoder/yudao/module/promotion/controller/admin/coupon/CouponController.java b/yudao-module-mall/yudao-module-promotion-biz/src/main/java/cn/iocoder/yudao/module/promotion/controller/admin/coupon/CouponController.java index 0a6facbc9e..5f7bff151c 100755 --- a/yudao-module-mall/yudao-module-promotion-biz/src/main/java/cn/iocoder/yudao/module/promotion/controller/admin/coupon/CouponController.java +++ b/yudao-module-mall/yudao-module-promotion-biz/src/main/java/cn/iocoder/yudao/module/promotion/controller/admin/coupon/CouponController.java @@ -11,9 +11,9 @@ import cn.iocoder.yudao.module.promotion.controller.admin.coupon.vo.coupon.Coupo import cn.iocoder.yudao.module.promotion.convert.coupon.CouponConvert; import cn.iocoder.yudao.module.promotion.dal.dataobject.coupon.CouponDO; import cn.iocoder.yudao.module.promotion.service.coupon.CouponService; -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.Set; import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success; import static cn.iocoder.yudao.framework.common.util.collection.CollectionUtils.convertSet; -@Api(tags = "管理后台 - 优惠劵") +@Tag(name = "管理后台 - 优惠劵") @RestController @RequestMapping("/promotion/coupon") @Validated @@ -38,8 +38,8 @@ public class CouponController { private MemberUserApi memberUserApi; // @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('promotion:coupon:query')") // public CommonResult getCoupon(@RequestParam("id") Long id) { // CouponDO coupon = couponService.getCoupon(id); @@ -47,8 +47,8 @@ public class CouponController { // } @DeleteMapping("/delete") - @ApiOperation("回收优惠劵") - @ApiImplicitParam(name = "id", value = "编号", required = true, dataTypeClass = Long.class) + @Operation(summary = "回收优惠劵") + @Parameter(name = "id", description = "编号", required = true) @PreAuthorize("@ss.hasPermission('promotion:coupon:delete')") public CommonResult deleteCoupon(@RequestParam("id") Long id) { couponService.deleteCoupon(id); @@ -56,7 +56,7 @@ public class CouponController { } @GetMapping("/page") - @ApiOperation("获得优惠劵分页") + @Operation(summary = "获得优惠劵分页") @PreAuthorize("@ss.hasPermission('promotion:coupon:query')") public CommonResult> getCouponPage(@Valid CouponPageReqVO pageVO) { PageResult pageResult = couponService.getCouponPage(pageVO); diff --git a/yudao-module-mall/yudao-module-promotion-biz/src/main/java/cn/iocoder/yudao/module/promotion/controller/admin/coupon/CouponTemplateController.java b/yudao-module-mall/yudao-module-promotion-biz/src/main/java/cn/iocoder/yudao/module/promotion/controller/admin/coupon/CouponTemplateController.java index 76efd2daaf..df5b16986d 100755 --- a/yudao-module-mall/yudao-module-promotion-biz/src/main/java/cn/iocoder/yudao/module/promotion/controller/admin/coupon/CouponTemplateController.java +++ b/yudao-module-mall/yudao-module-promotion-biz/src/main/java/cn/iocoder/yudao/module/promotion/controller/admin/coupon/CouponTemplateController.java @@ -6,9 +6,9 @@ import cn.iocoder.yudao.module.promotion.controller.admin.coupon.vo.template.*; import cn.iocoder.yudao.module.promotion.convert.coupon.CouponTemplateConvert; import cn.iocoder.yudao.module.promotion.dal.dataobject.coupon.CouponTemplateDO; import cn.iocoder.yudao.module.promotion.service.coupon.CouponTemplateService; -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.*; @@ -18,7 +18,7 @@ import javax.validation.Valid; import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success; -@Api(tags = "管理后台 - 优惠劵模板") +@Tag(name = "管理后台 - 优惠劵模板") @RestController @RequestMapping("/promotion/coupon-template") @Validated @@ -28,14 +28,14 @@ public class CouponTemplateController { private CouponTemplateService couponTemplateService; @PostMapping("/create") - @ApiOperation("创建优惠劵模板") + @Operation(summary = "创建优惠劵模板") @PreAuthorize("@ss.hasPermission('promotion:coupon-template:create')") public CommonResult createCouponTemplate(@Valid @RequestBody CouponTemplateCreateReqVO createReqVO) { return success(couponTemplateService.createCouponTemplate(createReqVO)); } @PutMapping("/update") - @ApiOperation("更新优惠劵模板") + @Operation(summary = "更新优惠劵模板") @PreAuthorize("@ss.hasPermission('promotion:coupon-template:update')") public CommonResult updateCouponTemplate(@Valid @RequestBody CouponTemplateUpdateReqVO updateReqVO) { couponTemplateService.updateCouponTemplate(updateReqVO); @@ -43,7 +43,7 @@ public class CouponTemplateController { } @PutMapping("/update-status") - @ApiOperation("更新优惠劵模板状态") + @Operation(summary = "更新优惠劵模板状态") @PreAuthorize("@ss.hasPermission('promotion:coupon-template:update')") public CommonResult updateCouponTemplateStatus(@Valid @RequestBody CouponTemplateUpdateStatusReqVO reqVO) { couponTemplateService.updateCouponTemplateStatus(reqVO.getId(), reqVO.getStatus()); @@ -51,8 +51,8 @@ public class CouponTemplateController { } @DeleteMapping("/delete") - @ApiOperation("删除优惠劵模板") - @ApiImplicitParam(name = "id", value = "编号", required = true, dataTypeClass = Long.class) + @Operation(summary = "删除优惠劵模板") + @Parameter(name = "id", description = "编号", required = true) @PreAuthorize("@ss.hasPermission('promotion:coupon-template:delete')") public CommonResult deleteCouponTemplate(@RequestParam("id") Long id) { couponTemplateService.deleteCouponTemplate(id); @@ -60,8 +60,8 @@ public class CouponTemplateController { } @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('promotion:coupon-template:query')") public CommonResult getCouponTemplate(@RequestParam("id") Long id) { CouponTemplateDO couponTemplate = couponTemplateService.getCouponTemplate(id); @@ -69,7 +69,7 @@ public class CouponTemplateController { } @GetMapping("/page") - @ApiOperation("获得优惠劵模板分页") + @Operation(summary = "获得优惠劵模板分页") @PreAuthorize("@ss.hasPermission('promotion:coupon-template:query')") public CommonResult> getCouponTemplatePage(@Valid CouponTemplatePageReqVO pageVO) { PageResult pageResult = couponTemplateService.getCouponTemplatePage(pageVO); diff --git a/yudao-module-mall/yudao-module-promotion-biz/src/main/java/cn/iocoder/yudao/module/promotion/controller/admin/coupon/vo/coupon/CouponBaseVO.java b/yudao-module-mall/yudao-module-promotion-biz/src/main/java/cn/iocoder/yudao/module/promotion/controller/admin/coupon/vo/coupon/CouponBaseVO.java index 269b2b2caa..90f4c72780 100755 --- a/yudao-module-mall/yudao-module-promotion-biz/src/main/java/cn/iocoder/yudao/module/promotion/controller/admin/coupon/vo/coupon/CouponBaseVO.java +++ b/yudao-module-mall/yudao-module-promotion-biz/src/main/java/cn/iocoder/yudao/module/promotion/controller/admin/coupon/vo/coupon/CouponBaseVO.java @@ -4,7 +4,7 @@ import cn.iocoder.yudao.framework.common.validation.InEnum; import cn.iocoder.yudao.module.promotion.enums.common.PromotionDiscountTypeEnum; import cn.iocoder.yudao.module.promotion.enums.common.PromotionProductScopeEnum; import com.fasterxml.jackson.annotation.JsonFormat; -import io.swagger.annotations.ApiModelProperty; +import io.swagger.v3.oas.annotations.media.Schema; import lombok.Data; import org.springframework.format.annotation.DateTimeFormat; @@ -24,76 +24,76 @@ import static cn.iocoder.yudao.framework.common.util.date.DateUtils.TIME_ZONE_DE public class CouponBaseVO { // ========== 基本信息 BEGIN ========== - @ApiModelProperty(value = "优惠劵模板编号", required = true, example = "1024") + @Schema(title = "优惠劵模板编号", required = true, example = "1024") @NotNull(message = "优惠劵模板编号不能为空") private Integer templateId; - @ApiModelProperty(value = "优惠劵名", required = true, example = "春节送送送") + @Schema(title = "优惠劵名", required = true, example = "春节送送送") @NotNull(message = "优惠劵名不能为空") private String name; - @ApiModelProperty(value = "优惠码状态", required = true, example = "1", notes = "参见 CouponStatusEnum 枚举") + @Schema(title = "优惠码状态", required = true, example = "1", description = "参见 CouponStatusEnum 枚举") private Integer status; // ========== 基本信息 END ========== // ========== 领取情况 BEGIN ========== - @ApiModelProperty(value = "用户编号", required = true, example = "1") + @Schema(title = "用户编号", required = true, example = "1") @NotNull(message = "用户编号不能为空") private Long userId; - @ApiModelProperty(value = "领取方式", required = true, example = "1", notes = "参见 CouponTakeTypeEnum 枚举类") + @Schema(title = "领取方式", required = true, example = "1", description = "参见 CouponTakeTypeEnum 枚举类") @NotNull(message = "领取方式不能为空") private Integer takeType; // ========== 领取情况 END ========== // ========== 使用规则 BEGIN ========== - @ApiModelProperty(value = "是否设置满多少金额可用", required = true, example = "100", notes = "单位:分;0 - 不限制") + @Schema(title = "是否设置满多少金额可用", required = true, example = "100", description = "单位:分;0 - 不限制") @NotNull(message = "是否设置满多少金额可用不能为空") private Integer usePrice; - @ApiModelProperty(value = "固定日期 - 生效开始时间") + @Schema(title = "固定日期 - 生效开始时间") @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND) @JsonFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND, timezone = TIME_ZONE_DEFAULT) private LocalDateTime validStartTime; - @ApiModelProperty(value = "固定日期 - 生效结束时间") + @Schema(title = "固定日期 - 生效结束时间") @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND) @JsonFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND, timezone = TIME_ZONE_DEFAULT) private LocalDateTime validEndTime; - @ApiModelProperty(value = "商品范围", required = true, example = "1", notes = "参见 PromotionProductScopeEnum 枚举类") + @Schema(title = "商品范围", required = true, example = "1", description = "参见 PromotionProductScopeEnum 枚举类") @NotNull(message = "商品范围不能为空") @InEnum(PromotionProductScopeEnum.class) private Integer productScope; - @ApiModelProperty(value = "商品 SPU 编号的数组", example = "1,3") + @Schema(title = "商品 SPU 编号的数组", example = "1,3") private List productSpuIds; // ========== 使用规则 END ========== // ========== 使用效果 BEGIN ========== - @ApiModelProperty(value = "优惠类型", required = true, example = "1", notes = "参见 PromotionDiscountTypeEnum 枚举") + @Schema(title = "优惠类型", required = true, example = "1", description = "参见 PromotionDiscountTypeEnum 枚举") @NotNull(message = "优惠类型不能为空") @InEnum(PromotionDiscountTypeEnum.class) private Integer discountType; - @ApiModelProperty(value = "折扣百分比", example = "80", notes = "例如说,80% 为 80") + @Schema(title = "折扣百分比", example = "80", description = "例如说,80% 为 80") private Integer discountPercent; - @ApiModelProperty(value = "优惠金额", example = "10", notes = "单位:分") + @Schema(title = "优惠金额", example = "10", description = "单位:分") @Min(value = 0, message = "优惠金额需要大于等于 0") private Integer discountPrice; - @ApiModelProperty(value = "折扣上限", example = "100", notes = "单位:分,仅在 discountType 为 PERCENT 使用") + @Schema(title = "折扣上限", example = "100", description = "单位:分,仅在 discountType 为 PERCENT 使用") private Integer discountLimitPrice; // ========== 使用效果 END ========== // ========== 使用情况 BEGIN ========== - @ApiModelProperty(value = "使用订单号", example = "4096") + @Schema(title = "使用订单号", example = "4096") private Long useOrderId; - @ApiModelProperty(value = "使用时间") + @Schema(title = "使用时间") @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND) @JsonFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND, timezone = TIME_ZONE_DEFAULT) private LocalDateTime useTime; diff --git a/yudao-module-mall/yudao-module-promotion-biz/src/main/java/cn/iocoder/yudao/module/promotion/controller/admin/coupon/vo/coupon/CouponPageItemRespVO.java b/yudao-module-mall/yudao-module-promotion-biz/src/main/java/cn/iocoder/yudao/module/promotion/controller/admin/coupon/vo/coupon/CouponPageItemRespVO.java index 88bc364bd3..7529ee62b0 100755 --- a/yudao-module-mall/yudao-module-promotion-biz/src/main/java/cn/iocoder/yudao/module/promotion/controller/admin/coupon/vo/coupon/CouponPageItemRespVO.java +++ b/yudao-module-mall/yudao-module-promotion-biz/src/main/java/cn/iocoder/yudao/module/promotion/controller/admin/coupon/vo/coupon/CouponPageItemRespVO.java @@ -1,18 +1,17 @@ package cn.iocoder.yudao.module.promotion.controller.admin.coupon.vo.coupon; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; +import io.swagger.v3.oas.annotations.media.Schema; import lombok.Data; import lombok.EqualsAndHashCode; import lombok.ToString; -@ApiModel("管理后台 - 优惠劵分页的每一项 Response VO") +@Schema(title = "管理后台 - 优惠劵分页的每一项 Response VO") @Data @EqualsAndHashCode(callSuper = true) @ToString(callSuper = true) public class CouponPageItemRespVO extends CouponRespVO { - @ApiModelProperty(value = "用户昵称", example = "老芋艿") + @Schema(title = "用户昵称", example = "老芋艿") private String nickname; } diff --git a/yudao-module-mall/yudao-module-promotion-biz/src/main/java/cn/iocoder/yudao/module/promotion/controller/admin/coupon/vo/coupon/CouponPageReqVO.java b/yudao-module-mall/yudao-module-promotion-biz/src/main/java/cn/iocoder/yudao/module/promotion/controller/admin/coupon/vo/coupon/CouponPageReqVO.java index 78ef1039fe..ba81ca1d41 100755 --- a/yudao-module-mall/yudao-module-promotion-biz/src/main/java/cn/iocoder/yudao/module/promotion/controller/admin/coupon/vo/coupon/CouponPageReqVO.java +++ b/yudao-module-mall/yudao-module-promotion-biz/src/main/java/cn/iocoder/yudao/module/promotion/controller/admin/coupon/vo/coupon/CouponPageReqVO.java @@ -1,8 +1,7 @@ package cn.iocoder.yudao.module.promotion.controller.admin.coupon.vo.coupon; import cn.iocoder.yudao.framework.common.pojo.PageParam; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; +import io.swagger.v3.oas.annotations.media.Schema; import lombok.Data; import lombok.EqualsAndHashCode; import lombok.ToString; @@ -12,23 +11,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(title = "管理后台 - 优惠劵分页 Request VO") @Data @EqualsAndHashCode(callSuper = true) @ToString(callSuper = true) public class CouponPageReqVO extends PageParam { - @ApiModelProperty(value = "优惠劵模板编号", example = "2048") + @Schema(title = "优惠劵模板编号", example = "2048") private Long templateId; - @ApiModelProperty(value = "优惠码状态", example = "1", notes = "参见 CouponStatusEnum 枚举") + @Schema(title = "优惠码状态", example = "1", description = "参见 CouponStatusEnum 枚举") private Integer status; - @ApiModelProperty(value = "创建时间") + @Schema(title = "创建时间") @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND) private LocalDateTime[] createTime; - @ApiModelProperty(value = "用户昵称", example = "芋艿", notes = "模糊匹配") + @Schema(title = "用户昵称", example = "芋艿", description = "模糊匹配") private String nickname; } diff --git a/yudao-module-mall/yudao-module-promotion-biz/src/main/java/cn/iocoder/yudao/module/promotion/controller/admin/coupon/vo/coupon/CouponRespVO.java b/yudao-module-mall/yudao-module-promotion-biz/src/main/java/cn/iocoder/yudao/module/promotion/controller/admin/coupon/vo/coupon/CouponRespVO.java index 76e075883e..8a07e28dce 100755 --- a/yudao-module-mall/yudao-module-promotion-biz/src/main/java/cn/iocoder/yudao/module/promotion/controller/admin/coupon/vo/coupon/CouponRespVO.java +++ b/yudao-module-mall/yudao-module-promotion-biz/src/main/java/cn/iocoder/yudao/module/promotion/controller/admin/coupon/vo/coupon/CouponRespVO.java @@ -1,23 +1,22 @@ package cn.iocoder.yudao.module.promotion.controller.admin.coupon.vo.coupon; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; +import io.swagger.v3.oas.annotations.media.Schema; import lombok.Data; import lombok.EqualsAndHashCode; import lombok.ToString; import java.time.LocalDateTime; -@ApiModel("管理后台 - 优惠劵 Response VO") +@Schema(title = "管理后台 - 优惠劵 Response VO") @Data @EqualsAndHashCode(callSuper = true) @ToString(callSuper = true) public class CouponRespVO extends CouponBaseVO { - @ApiModelProperty(value = "优惠劵编号", required = true, example = "1024") + @Schema(title = "优惠劵编号", required = true, example = "1024") private Long id; - @ApiModelProperty(value = "创建时间", required = true) + @Schema(title = "创建时间", required = true) private LocalDateTime createTime; } diff --git a/yudao-module-mall/yudao-module-promotion-biz/src/main/java/cn/iocoder/yudao/module/promotion/controller/admin/coupon/vo/template/CouponTemplateBaseVO.java b/yudao-module-mall/yudao-module-promotion-biz/src/main/java/cn/iocoder/yudao/module/promotion/controller/admin/coupon/vo/template/CouponTemplateBaseVO.java index e54a33ce03..4c69a443e9 100755 --- a/yudao-module-mall/yudao-module-promotion-biz/src/main/java/cn/iocoder/yudao/module/promotion/controller/admin/coupon/vo/template/CouponTemplateBaseVO.java +++ b/yudao-module-mall/yudao-module-promotion-biz/src/main/java/cn/iocoder/yudao/module/promotion/controller/admin/coupon/vo/template/CouponTemplateBaseVO.java @@ -8,7 +8,7 @@ import cn.iocoder.yudao.module.promotion.enums.common.PromotionProductScopeEnum; import cn.iocoder.yudao.module.promotion.enums.coupon.CouponTemplateValidityTypeEnum; import com.fasterxml.jackson.annotation.JsonFormat; import com.fasterxml.jackson.annotation.JsonIgnore; -import io.swagger.annotations.ApiModelProperty; +import io.swagger.v3.oas.annotations.media.Schema; import lombok.Data; import org.springframework.format.annotation.DateTimeFormat; @@ -29,70 +29,70 @@ import static cn.iocoder.yudao.framework.common.util.date.DateUtils.TIME_ZONE_DE @Data public class CouponTemplateBaseVO { - @ApiModelProperty(value = "优惠劵名", required = true, example = "春节送送送") + @Schema(title = "优惠劵名", required = true, example = "春节送送送") @NotNull(message = "优惠劵名不能为空") private String name; - @ApiModelProperty(value = "发行总量", required = true, example = "1024", notes = "-1 - 则表示不限制发放数量") + @Schema(title = "发行总量", required = true, example = "1024", description = "-1 - 则表示不限制发放数量") @NotNull(message = "发行总量不能为空") private Integer totalCount; - @ApiModelProperty(value = "每人限领个数", required = true, example = "66", notes = "-1 - 则表示不限制") + @Schema(title = "每人限领个数", required = true, example = "66", description = "-1 - 则表示不限制") @NotNull(message = "每人限领个数不能为空") private Integer takeLimitCount; - @ApiModelProperty(value = "领取方式", required = true, example = "1", notes = "参见 CouponTakeTypeEnum 枚举类") + @Schema(title = "领取方式", required = true, example = "1", description = "参见 CouponTakeTypeEnum 枚举类") @NotNull(message = "领取方式不能为空") private Integer takeType; - @ApiModelProperty(value = "是否设置满多少金额可用", required = true, example = "100", notes = "单位:分;0 - 不限制") + @Schema(title = "是否设置满多少金额可用", required = true, example = "100", description = "单位:分;0 - 不限制") @NotNull(message = "是否设置满多少金额可用不能为空") private Integer usePrice; - @ApiModelProperty(value = "商品范围", required = true, example = "1", notes = "参见 PromotionProductScopeEnum 枚举类") + @Schema(title = "商品范围", required = true, example = "1", description = "参见 PromotionProductScopeEnum 枚举类") @NotNull(message = "商品范围不能为空") @InEnum(PromotionProductScopeEnum.class) private Integer productScope; - @ApiModelProperty(value = "商品 SPU 编号的数组", example = "1,3") + @Schema(title = "商品 SPU 编号的数组", example = "1,3") private List productSpuIds; - @ApiModelProperty(value = "生效日期类型", required = true, example = "1") + @Schema(title = "生效日期类型", required = true, example = "1") @NotNull(message = "生效日期类型不能为空") @InEnum(CouponTemplateValidityTypeEnum.class) private Integer validityType; - @ApiModelProperty(value = "固定日期 - 生效开始时间") + @Schema(title = "固定日期 - 生效开始时间") @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND) @JsonFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND, timezone = TIME_ZONE_DEFAULT) private LocalDateTime validStartTime; - @ApiModelProperty(value = "固定日期 - 生效结束时间") + @Schema(title = "固定日期 - 生效结束时间") @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND) @JsonFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND, timezone = TIME_ZONE_DEFAULT) private LocalDateTime validEndTime; - @ApiModelProperty(value = "领取日期 - 开始天数") + @Schema(title = "领取日期 - 开始天数") @Min(value = 0L, message = "开始天数必须大于 0") private Integer fixedStartTerm; - @ApiModelProperty(value = "领取日期 - 结束天数") + @Schema(title = "领取日期 - 结束天数") @Min(value = 1L, message = "开始天数必须大于 1") private Integer fixedEndTerm; - @ApiModelProperty(value = "优惠类型", required = true, example = "1", notes = "参见 PromotionDiscountTypeEnum 枚举") + @Schema(title = "优惠类型", required = true, example = "1", description = "参见 PromotionDiscountTypeEnum 枚举") @NotNull(message = "优惠类型不能为空") @InEnum(PromotionDiscountTypeEnum.class) private Integer discountType; - @ApiModelProperty(value = "折扣百分比", example = "80", notes = "例如说,80% 为 80") + @Schema(title = "折扣百分比", example = "80", description = "例如说,80% 为 80") private Integer discountPercent; - @ApiModelProperty(value = "优惠金额", example = "10", notes = "单位:分") + @Schema(title = "优惠金额", example = "10", description = "单位:分") @Min(value = 0, message = "优惠金额需要大于等于 0") private Integer discountPrice; - @ApiModelProperty(value = "折扣上限", example = "100", notes = "单位:分,仅在 discountType 为 PERCENT 使用") + @Schema(title = "折扣上限", example = "100", description = "单位:分,仅在 discountType 为 PERCENT 使用") private Integer discountLimitPrice; @AssertTrue(message = "商品 SPU 编号的数组不能为空") diff --git a/yudao-module-mall/yudao-module-promotion-biz/src/main/java/cn/iocoder/yudao/module/promotion/controller/admin/coupon/vo/template/CouponTemplateCreateReqVO.java b/yudao-module-mall/yudao-module-promotion-biz/src/main/java/cn/iocoder/yudao/module/promotion/controller/admin/coupon/vo/template/CouponTemplateCreateReqVO.java index 91bfb0a5fb..60c37ee0dd 100755 --- a/yudao-module-mall/yudao-module-promotion-biz/src/main/java/cn/iocoder/yudao/module/promotion/controller/admin/coupon/vo/template/CouponTemplateCreateReqVO.java +++ b/yudao-module-mall/yudao-module-promotion-biz/src/main/java/cn/iocoder/yudao/module/promotion/controller/admin/coupon/vo/template/CouponTemplateCreateReqVO.java @@ -1,11 +1,10 @@ package cn.iocoder.yudao.module.promotion.controller.admin.coupon.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(title = "管理后台 - 优惠劵模板创建 Request VO") @Data @EqualsAndHashCode(callSuper = true) @ToString(callSuper = true) diff --git a/yudao-module-mall/yudao-module-promotion-biz/src/main/java/cn/iocoder/yudao/module/promotion/controller/admin/coupon/vo/template/CouponTemplatePageReqVO.java b/yudao-module-mall/yudao-module-promotion-biz/src/main/java/cn/iocoder/yudao/module/promotion/controller/admin/coupon/vo/template/CouponTemplatePageReqVO.java index 8fffe4db0e..6efb227ccc 100755 --- a/yudao-module-mall/yudao-module-promotion-biz/src/main/java/cn/iocoder/yudao/module/promotion/controller/admin/coupon/vo/template/CouponTemplatePageReqVO.java +++ b/yudao-module-mall/yudao-module-promotion-biz/src/main/java/cn/iocoder/yudao/module/promotion/controller/admin/coupon/vo/template/CouponTemplatePageReqVO.java @@ -1,8 +1,7 @@ package cn.iocoder.yudao.module.promotion.controller.admin.coupon.vo.template; import cn.iocoder.yudao.framework.common.pojo.PageParam; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; +import io.swagger.v3.oas.annotations.media.Schema; import lombok.Data; import lombok.EqualsAndHashCode; import lombok.ToString; @@ -12,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(title = "管理后台 - 优惠劵模板分页 Request VO") @Data @EqualsAndHashCode(callSuper = true) @ToString(callSuper = true) public class CouponTemplatePageReqVO extends PageParam { - @ApiModelProperty(value = "优惠劵名", example = "你好") + @Schema(title = "优惠劵名", example = "你好") private String name; - @ApiModelProperty(value = "状态", example = "1", notes = "参见 CommonStatusEnum 枚举类") + @Schema(title = "状态", example = "1", description = "参见 CommonStatusEnum 枚举类") private Integer status; - @ApiModelProperty(value = "优惠类型", example = "1", notes = "参见 PromotionDiscountTypeEnum 枚举") + @Schema(title = "优惠类型", example = "1", description = "参见 PromotionDiscountTypeEnum 枚举") private Integer discountType; - @ApiModelProperty(value = "创建时间") + @Schema(title = "创建时间") @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND) private LocalDateTime[] createTime; diff --git a/yudao-module-mall/yudao-module-promotion-biz/src/main/java/cn/iocoder/yudao/module/promotion/controller/admin/coupon/vo/template/CouponTemplateRespVO.java b/yudao-module-mall/yudao-module-promotion-biz/src/main/java/cn/iocoder/yudao/module/promotion/controller/admin/coupon/vo/template/CouponTemplateRespVO.java index 7182733e70..d3d71696b9 100755 --- a/yudao-module-mall/yudao-module-promotion-biz/src/main/java/cn/iocoder/yudao/module/promotion/controller/admin/coupon/vo/template/CouponTemplateRespVO.java +++ b/yudao-module-mall/yudao-module-promotion-biz/src/main/java/cn/iocoder/yudao/module/promotion/controller/admin/coupon/vo/template/CouponTemplateRespVO.java @@ -2,34 +2,33 @@ package cn.iocoder.yudao.module.promotion.controller.admin.coupon.vo.template; import cn.iocoder.yudao.framework.common.enums.CommonStatusEnum; 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 lombok.Data; import lombok.EqualsAndHashCode; import lombok.ToString; import java.time.LocalDateTime; -@ApiModel("管理后台 - 优惠劵模板 Response VO") +@Schema(title = "管理后台 - 优惠劵模板 Response VO") @Data @EqualsAndHashCode(callSuper = true) @ToString(callSuper = true) public class CouponTemplateRespVO extends CouponTemplateBaseVO { - @ApiModelProperty(value = "模板编号", required = true, example = "1024") + @Schema(title = "模板编号", required = true, example = "1024") private Long id; - @ApiModelProperty(value = "状态", required = true, example = "1") + @Schema(title = "状态", required = true, example = "1") @InEnum(CommonStatusEnum.class) private Integer status; - @ApiModelProperty(value = "领取优惠券的数量", required = true, example = "1024") + @Schema(title = "领取优惠券的数量", required = true, example = "1024") private Integer takeCount; - @ApiModelProperty(value = "使用优惠券的次数", required = true, example = "2048") + @Schema(title = "使用优惠券的次数", required = true, example = "2048") private Integer useCount; - @ApiModelProperty(value = "创建时间", required = true) + @Schema(title = "创建时间", required = true) private LocalDateTime createTime; } diff --git a/yudao-module-mall/yudao-module-promotion-biz/src/main/java/cn/iocoder/yudao/module/promotion/controller/admin/coupon/vo/template/CouponTemplateUpdateReqVO.java b/yudao-module-mall/yudao-module-promotion-biz/src/main/java/cn/iocoder/yudao/module/promotion/controller/admin/coupon/vo/template/CouponTemplateUpdateReqVO.java index 8e5e8723a0..054ddbf6a9 100755 --- a/yudao-module-mall/yudao-module-promotion-biz/src/main/java/cn/iocoder/yudao/module/promotion/controller/admin/coupon/vo/template/CouponTemplateUpdateReqVO.java +++ b/yudao-module-mall/yudao-module-promotion-biz/src/main/java/cn/iocoder/yudao/module/promotion/controller/admin/coupon/vo/template/CouponTemplateUpdateReqVO.java @@ -1,20 +1,19 @@ package cn.iocoder.yudao.module.promotion.controller.admin.coupon.vo.template; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; +import io.swagger.v3.oas.annotations.media.Schema; import lombok.Data; import lombok.EqualsAndHashCode; import lombok.ToString; import javax.validation.constraints.NotNull; -@ApiModel("管理后台 - 优惠劵模板更新 Request VO") +@Schema(title = "管理后台 - 优惠劵模板更新 Request VO") @Data @EqualsAndHashCode(callSuper = true) @ToString(callSuper = true) public class CouponTemplateUpdateReqVO extends CouponTemplateBaseVO { - @ApiModelProperty(value = "模板编号", required = true, example = "1024") + @Schema(title = "模板编号", required = true, example = "1024") @NotNull(message = "模板编号不能为空") private Long id; diff --git a/yudao-module-mall/yudao-module-promotion-biz/src/main/java/cn/iocoder/yudao/module/promotion/controller/admin/coupon/vo/template/CouponTemplateUpdateStatusReqVO.java b/yudao-module-mall/yudao-module-promotion-biz/src/main/java/cn/iocoder/yudao/module/promotion/controller/admin/coupon/vo/template/CouponTemplateUpdateStatusReqVO.java index 32e0206378..9d6c48c418 100644 --- a/yudao-module-mall/yudao-module-promotion-biz/src/main/java/cn/iocoder/yudao/module/promotion/controller/admin/coupon/vo/template/CouponTemplateUpdateStatusReqVO.java +++ b/yudao-module-mall/yudao-module-promotion-biz/src/main/java/cn/iocoder/yudao/module/promotion/controller/admin/coupon/vo/template/CouponTemplateUpdateStatusReqVO.java @@ -2,21 +2,20 @@ package cn.iocoder.yudao.module.promotion.controller.admin.coupon.vo.template; import cn.iocoder.yudao.framework.common.enums.CommonStatusEnum; 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 lombok.Data; import javax.validation.constraints.NotNull; -@ApiModel("管理后台 - 优惠劵模板更新状态 Request VO") +@Schema(title = "管理后台 - 优惠劵模板更新状态 Request VO") @Data public class CouponTemplateUpdateStatusReqVO { - @ApiModelProperty(value = "优惠劵模板编号", required = true, example = "1024") + @Schema(title = "优惠劵模板编号", required = true, example = "1024") @NotNull(message = "优惠劵模板编号不能为空") private Long id; - @ApiModelProperty(value = "状态", required = true, example = "1", notes = "见 CommonStatusEnum 枚举") + @Schema(title = "状态", required = true, example = "1", description = "见 CommonStatusEnum 枚举") @NotNull(message = "状态不能为空") @InEnum(value = CommonStatusEnum.class, message = "修改状态必须是 {value}") private Integer status; diff --git a/yudao-module-mall/yudao-module-promotion-biz/src/main/java/cn/iocoder/yudao/module/promotion/controller/admin/discount/DiscountActivityController.java b/yudao-module-mall/yudao-module-promotion-biz/src/main/java/cn/iocoder/yudao/module/promotion/controller/admin/discount/DiscountActivityController.java index 332a1b8225..08d4dc10e7 100755 --- a/yudao-module-mall/yudao-module-promotion-biz/src/main/java/cn/iocoder/yudao/module/promotion/controller/admin/discount/DiscountActivityController.java +++ b/yudao-module-mall/yudao-module-promotion-biz/src/main/java/cn/iocoder/yudao/module/promotion/controller/admin/discount/DiscountActivityController.java @@ -7,9 +7,9 @@ import cn.iocoder.yudao.module.promotion.convert.discount.DiscountActivityConver import cn.iocoder.yudao.module.promotion.dal.dataobject.discount.DiscountActivityDO; import cn.iocoder.yudao.module.promotion.dal.dataobject.discount.DiscountProductDO; import cn.iocoder.yudao.module.promotion.service.discount.DiscountActivityService; -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("/promotion/discount-activity") @Validated @@ -30,14 +30,14 @@ public class DiscountActivityController { private DiscountActivityService discountActivityService; @PostMapping("/create") - @ApiOperation("创建限时折扣活动") + @Operation(summary = "创建限时折扣活动") @PreAuthorize("@ss.hasPermission('promotion:discount-activity:create')") public CommonResult createDiscountActivity(@Valid @RequestBody DiscountActivityCreateReqVO createReqVO) { return success(discountActivityService.createDiscountActivity(createReqVO)); } @PutMapping("/update") - @ApiOperation("更新限时折扣活动") + @Operation(summary = "更新限时折扣活动") @PreAuthorize("@ss.hasPermission('promotion:discount-activity:update')") public CommonResult updateDiscountActivity(@Valid @RequestBody DiscountActivityUpdateReqVO updateReqVO) { discountActivityService.updateDiscountActivity(updateReqVO); @@ -45,8 +45,8 @@ public class DiscountActivityController { } @PutMapping("/close") - @ApiOperation("关闭限时折扣活动") - @ApiImplicitParam(name = "id", value = "编号", required = true, dataTypeClass = Long.class) + @Operation(summary = "关闭限时折扣活动") + @Parameter(name = "id", description = "编号", required = true) @PreAuthorize("@ss.hasPermission('promotion:discount-activity:close')") public CommonResult closeRewardActivity(@RequestParam("id") Long id) { discountActivityService.closeRewardActivity(id); @@ -54,8 +54,8 @@ public class DiscountActivityController { } @DeleteMapping("/delete") - @ApiOperation("删除限时折扣活动") - @ApiImplicitParam(name = "id", value = "编号", required = true, dataTypeClass = Long.class) + @Operation(summary = "删除限时折扣活动") + @Parameter(name = "id", description = "编号", required = true) @PreAuthorize("@ss.hasPermission('promotion:discount-activity:delete')") public CommonResult deleteDiscountActivity(@RequestParam("id") Long id) { discountActivityService.deleteDiscountActivity(id); @@ -63,8 +63,8 @@ public class DiscountActivityController { } @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('promotion:discount-activity:query')") public CommonResult getDiscountActivity(@RequestParam("id") Long id) { DiscountActivityDO discountActivity = discountActivityService.getDiscountActivity(id); @@ -77,7 +77,7 @@ public class DiscountActivityController { } @GetMapping("/page") - @ApiOperation("获得限时折扣活动分页") + @Operation(summary = "获得限时折扣活动分页") @PreAuthorize("@ss.hasPermission('promotion:discount-activity:query')") public CommonResult> getDiscountActivityPage(@Valid DiscountActivityPageReqVO pageVO) { PageResult pageResult = discountActivityService.getDiscountActivityPage(pageVO); diff --git a/yudao-module-mall/yudao-module-promotion-biz/src/main/java/cn/iocoder/yudao/module/promotion/controller/admin/discount/vo/DiscountActivityBaseVO.java b/yudao-module-mall/yudao-module-promotion-biz/src/main/java/cn/iocoder/yudao/module/promotion/controller/admin/discount/vo/DiscountActivityBaseVO.java index 60a65ec59c..35f3da2ada 100755 --- a/yudao-module-mall/yudao-module-promotion-biz/src/main/java/cn/iocoder/yudao/module/promotion/controller/admin/discount/vo/DiscountActivityBaseVO.java +++ b/yudao-module-mall/yudao-module-promotion-biz/src/main/java/cn/iocoder/yudao/module/promotion/controller/admin/discount/vo/DiscountActivityBaseVO.java @@ -4,8 +4,7 @@ import cn.hutool.core.util.ObjectUtil; import cn.iocoder.yudao.framework.common.validation.InEnum; import cn.iocoder.yudao.module.promotion.enums.common.PromotionDiscountTypeEnum; import com.fasterxml.jackson.annotation.JsonIgnore; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; +import io.swagger.v3.oas.annotations.media.Schema; import lombok.Data; import org.springframework.format.annotation.DateTimeFormat; @@ -23,44 +22,44 @@ import static cn.iocoder.yudao.framework.common.util.date.DateUtils.FORMAT_YEAR_ @Data public class DiscountActivityBaseVO { - @ApiModelProperty(value = "活动标题", required = true, example = "一个标题") + @Schema(title = "活动标题", required = true, example = "一个标题") @NotNull(message = "活动标题不能为空") private String name; - @ApiModelProperty(value = "开始时间", required = true) + @Schema(title = "开始时间", required = true) @NotNull(message = "开始时间不能为空") @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND) private LocalDateTime startTime; - @ApiModelProperty(value = "结束时间", required = true) + @Schema(title = "结束时间", required = true) @NotNull(message = "结束时间不能为空") @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND) private LocalDateTime endTime; - @ApiModelProperty(value = "备注", example = "我是备注") + @Schema(title = "备注", example = "我是备注") private String remark; - @ApiModel("商品") + @Schema(title = "商品") @Data public static class Product { - @ApiModelProperty(value = "商品 SPU 编号", required = true, example = "1") + @Schema(title = "商品 SPU 编号", required = true, example = "1") @NotNull(message = "商品 SPU 编号不能为空") private Long spuId; - @ApiModelProperty(value = "商品 SKU 编号", required = true, example = "1") + @Schema(title = "商品 SKU 编号", required = true, example = "1") @NotNull(message = "商品 SKU 编号不能为空") private Long skuId; - @ApiModelProperty(value = "优惠类型", required = true, example = "1", notes = "参见 PromotionDiscountTypeEnum 枚举") + @Schema(title = "优惠类型", required = true, example = "1", description = "参见 PromotionDiscountTypeEnum 枚举") @NotNull(message = "优惠类型不能为空") @InEnum(PromotionDiscountTypeEnum.class) private Integer discountType; - @ApiModelProperty(value = "折扣百分比", example = "80", notes = "例如说,80% 为 80") + @Schema(title = "折扣百分比", example = "80", description = "例如说,80% 为 80") private Integer discountPercent; - @ApiModelProperty(value = "优惠金额", example = "10", notes = "单位:分") + @Schema(title = "优惠金额", example = "10", description = "单位:分") @Min(value = 0, message = "优惠金额需要大于等于 0") private Integer discountPrice; diff --git a/yudao-module-mall/yudao-module-promotion-biz/src/main/java/cn/iocoder/yudao/module/promotion/controller/admin/discount/vo/DiscountActivityCreateReqVO.java b/yudao-module-mall/yudao-module-promotion-biz/src/main/java/cn/iocoder/yudao/module/promotion/controller/admin/discount/vo/DiscountActivityCreateReqVO.java index 35de6faf20..86eedc799a 100755 --- a/yudao-module-mall/yudao-module-promotion-biz/src/main/java/cn/iocoder/yudao/module/promotion/controller/admin/discount/vo/DiscountActivityCreateReqVO.java +++ b/yudao-module-mall/yudao-module-promotion-biz/src/main/java/cn/iocoder/yudao/module/promotion/controller/admin/discount/vo/DiscountActivityCreateReqVO.java @@ -1,6 +1,5 @@ package cn.iocoder.yudao.module.promotion.controller.admin.discount.vo; - -import io.swagger.annotations.ApiModel; +import io.swagger.v3.oas.annotations.media.Schema; import lombok.Data; import lombok.EqualsAndHashCode; import lombok.ToString; @@ -9,7 +8,7 @@ import javax.validation.Valid; import javax.validation.constraints.NotEmpty; import java.util.List; -@ApiModel("管理后台 - 限时折扣活动创建 Request VO") +@Schema(title = "管理后台 - 限时折扣活动创建 Request VO") @Data @EqualsAndHashCode(callSuper = true) @ToString(callSuper = true) diff --git a/yudao-module-mall/yudao-module-promotion-biz/src/main/java/cn/iocoder/yudao/module/promotion/controller/admin/discount/vo/DiscountActivityDetailRespVO.java b/yudao-module-mall/yudao-module-promotion-biz/src/main/java/cn/iocoder/yudao/module/promotion/controller/admin/discount/vo/DiscountActivityDetailRespVO.java index 1dfdeec188..44cc1965cf 100755 --- a/yudao-module-mall/yudao-module-promotion-biz/src/main/java/cn/iocoder/yudao/module/promotion/controller/admin/discount/vo/DiscountActivityDetailRespVO.java +++ b/yudao-module-mall/yudao-module-promotion-biz/src/main/java/cn/iocoder/yudao/module/promotion/controller/admin/discount/vo/DiscountActivityDetailRespVO.java @@ -1,13 +1,12 @@ package cn.iocoder.yudao.module.promotion.controller.admin.discount.vo; - -import io.swagger.annotations.ApiModel; +import io.swagger.v3.oas.annotations.media.Schema; import lombok.Data; import lombok.EqualsAndHashCode; import lombok.ToString; import java.util.List; -@ApiModel("管理后台 - 限时折扣活动的详细 Response VO") +@Schema(title = "管理后台 - 限时折扣活动的详细 Response VO") @Data @EqualsAndHashCode(callSuper = true) @ToString(callSuper = true) diff --git a/yudao-module-mall/yudao-module-promotion-biz/src/main/java/cn/iocoder/yudao/module/promotion/controller/admin/discount/vo/DiscountActivityPageReqVO.java b/yudao-module-mall/yudao-module-promotion-biz/src/main/java/cn/iocoder/yudao/module/promotion/controller/admin/discount/vo/DiscountActivityPageReqVO.java index 0e3406f076..2c86795662 100755 --- a/yudao-module-mall/yudao-module-promotion-biz/src/main/java/cn/iocoder/yudao/module/promotion/controller/admin/discount/vo/DiscountActivityPageReqVO.java +++ b/yudao-module-mall/yudao-module-promotion-biz/src/main/java/cn/iocoder/yudao/module/promotion/controller/admin/discount/vo/DiscountActivityPageReqVO.java @@ -1,8 +1,7 @@ package cn.iocoder.yudao.module.promotion.controller.admin.discount.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 lombok.Data; import lombok.EqualsAndHashCode; import lombok.ToString; @@ -12,19 +11,19 @@ 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(title = "管理后台 - 限时折扣活动分页 Request VO") @Data @EqualsAndHashCode(callSuper = true) @ToString(callSuper = true) public class DiscountActivityPageReqVO extends PageParam { - @ApiModelProperty(value = "活动标题", example = "一个标题") + @Schema(title = "活动标题", example = "一个标题") private String name; - @ApiModelProperty(value = "活动状态", example = "1") + @Schema(title = "活动状态", example = "1") private Integer status; - @ApiModelProperty(value = "创建时间") + @Schema(title = "创建时间") @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND) private LocalDateTime[] createTime; diff --git a/yudao-module-mall/yudao-module-promotion-biz/src/main/java/cn/iocoder/yudao/module/promotion/controller/admin/discount/vo/DiscountActivityRespVO.java b/yudao-module-mall/yudao-module-promotion-biz/src/main/java/cn/iocoder/yudao/module/promotion/controller/admin/discount/vo/DiscountActivityRespVO.java index 0422908b59..d46918edfe 100755 --- a/yudao-module-mall/yudao-module-promotion-biz/src/main/java/cn/iocoder/yudao/module/promotion/controller/admin/discount/vo/DiscountActivityRespVO.java +++ b/yudao-module-mall/yudao-module-promotion-biz/src/main/java/cn/iocoder/yudao/module/promotion/controller/admin/discount/vo/DiscountActivityRespVO.java @@ -1,7 +1,6 @@ package cn.iocoder.yudao.module.promotion.controller.admin.discount.vo; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; +import io.swagger.v3.oas.annotations.media.Schema; import lombok.Data; import lombok.EqualsAndHashCode; import lombok.ToString; @@ -9,20 +8,20 @@ import lombok.ToString; import javax.validation.constraints.NotNull; import java.time.LocalDateTime; -@ApiModel("管理后台 - 限时折扣活动 Response VO") +@Schema(title = "管理后台 - 限时折扣活动 Response VO") @Data @EqualsAndHashCode(callSuper = true) @ToString(callSuper = true) public class DiscountActivityRespVO extends DiscountActivityBaseVO { - @ApiModelProperty(value = "活动编号", required = true, example = "1024") + @Schema(title = "活动编号", required = true, example = "1024") private Long id; - @ApiModelProperty(value = "活动状态", required = true, example = "1") + @Schema(title = "活动状态", required = true, example = "1") @NotNull(message = "活动状态不能为空") private Integer status; - @ApiModelProperty(value = "创建时间", required = true) + @Schema(title = "创建时间", required = true) private LocalDateTime createTime; } diff --git a/yudao-module-mall/yudao-module-promotion-biz/src/main/java/cn/iocoder/yudao/module/promotion/controller/admin/discount/vo/DiscountActivityUpdateReqVO.java b/yudao-module-mall/yudao-module-promotion-biz/src/main/java/cn/iocoder/yudao/module/promotion/controller/admin/discount/vo/DiscountActivityUpdateReqVO.java index 0f3b6e435a..ff9aa27b37 100755 --- a/yudao-module-mall/yudao-module-promotion-biz/src/main/java/cn/iocoder/yudao/module/promotion/controller/admin/discount/vo/DiscountActivityUpdateReqVO.java +++ b/yudao-module-mall/yudao-module-promotion-biz/src/main/java/cn/iocoder/yudao/module/promotion/controller/admin/discount/vo/DiscountActivityUpdateReqVO.java @@ -1,7 +1,6 @@ package cn.iocoder.yudao.module.promotion.controller.admin.discount.vo; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; +import io.swagger.v3.oas.annotations.media.Schema; import lombok.Data; import lombok.EqualsAndHashCode; import lombok.ToString; @@ -11,13 +10,13 @@ import javax.validation.constraints.NotEmpty; import javax.validation.constraints.NotNull; import java.util.List; -@ApiModel("管理后台 - 限时折扣活动更新 Request VO") +@Schema(title = "管理后台 - 限时折扣活动更新 Request VO") @Data @EqualsAndHashCode(callSuper = true) @ToString(callSuper = true) public class DiscountActivityUpdateReqVO extends DiscountActivityBaseVO { - @ApiModelProperty(value = "活动编号", required = true, example = "1024") + @Schema(title = "活动编号", required = true, example = "1024") @NotNull(message = "活动编号不能为空") private Long id; diff --git a/yudao-module-mall/yudao-module-promotion-biz/src/main/java/cn/iocoder/yudao/module/promotion/controller/admin/reward/RewardActivityController.java b/yudao-module-mall/yudao-module-promotion-biz/src/main/java/cn/iocoder/yudao/module/promotion/controller/admin/reward/RewardActivityController.java index 043571e5e8..c8c13ccf05 100755 --- a/yudao-module-mall/yudao-module-promotion-biz/src/main/java/cn/iocoder/yudao/module/promotion/controller/admin/reward/RewardActivityController.java +++ b/yudao-module-mall/yudao-module-promotion-biz/src/main/java/cn/iocoder/yudao/module/promotion/controller/admin/reward/RewardActivityController.java @@ -9,9 +9,9 @@ import cn.iocoder.yudao.module.promotion.controller.admin.reward.vo.RewardActivi import cn.iocoder.yudao.module.promotion.convert.reward.RewardActivityConvert; import cn.iocoder.yudao.module.promotion.dal.dataobject.reward.RewardActivityDO; import cn.iocoder.yudao.module.promotion.service.reward.RewardActivityService; -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("/promotion/reward-activity") @Validated @@ -31,14 +31,14 @@ public class RewardActivityController { private RewardActivityService rewardActivityService; @PostMapping("/create") - @ApiOperation("创建满减送活动") + @Operation(summary = "创建满减送活动") @PreAuthorize("@ss.hasPermission('promotion:reward-activity:create')") public CommonResult createRewardActivity(@Valid @RequestBody RewardActivityCreateReqVO createReqVO) { return success(rewardActivityService.createRewardActivity(createReqVO)); } @PutMapping("/update") - @ApiOperation("更新满减送活动") + @Operation(summary = "更新满减送活动") @PreAuthorize("@ss.hasPermission('promotion:reward-activity:update')") public CommonResult updateRewardActivity(@Valid @RequestBody RewardActivityUpdateReqVO updateReqVO) { rewardActivityService.updateRewardActivity(updateReqVO); @@ -46,8 +46,8 @@ public class RewardActivityController { } @PutMapping("/close") - @ApiOperation("关闭满减送活动") - @ApiImplicitParam(name = "id", value = "编号", required = true, dataTypeClass = Long.class) + @Operation(summary = "关闭满减送活动") + @Parameter(name = "id", description = "编号", required = true) @PreAuthorize("@ss.hasPermission('promotion:reward-activity:close')") public CommonResult closeRewardActivity(@RequestParam("id") Long id) { rewardActivityService.closeRewardActivity(id); @@ -55,8 +55,8 @@ public class RewardActivityController { } @DeleteMapping("/delete") - @ApiOperation("删除满减送活动") - @ApiImplicitParam(name = "id", value = "编号", required = true, dataTypeClass = Long.class) + @Operation(summary = "删除满减送活动") + @Parameter(name = "id", description = "编号", required = true) @PreAuthorize("@ss.hasPermission('promotion:reward-activity:delete')") public CommonResult deleteRewardActivity(@RequestParam("id") Long id) { rewardActivityService.deleteRewardActivity(id); @@ -64,8 +64,8 @@ public class RewardActivityController { } @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('promotion:reward-activity:query')") public CommonResult getRewardActivity(@RequestParam("id") Long id) { RewardActivityDO rewardActivity = rewardActivityService.getRewardActivity(id); @@ -73,7 +73,7 @@ public class RewardActivityController { } @GetMapping("/page") - @ApiOperation("获得满减送活动分页") + @Operation(summary = "获得满减送活动分页") @PreAuthorize("@ss.hasPermission('promotion:reward-activity:query')") public CommonResult> getRewardActivityPage(@Valid RewardActivityPageReqVO pageVO) { PageResult pageResult = rewardActivityService.getRewardActivityPage(pageVO); diff --git a/yudao-module-mall/yudao-module-promotion-biz/src/main/java/cn/iocoder/yudao/module/promotion/controller/admin/reward/vo/RewardActivityBaseVO.java b/yudao-module-mall/yudao-module-promotion-biz/src/main/java/cn/iocoder/yudao/module/promotion/controller/admin/reward/vo/RewardActivityBaseVO.java index ed28021245..75ab536de0 100755 --- a/yudao-module-mall/yudao-module-promotion-biz/src/main/java/cn/iocoder/yudao/module/promotion/controller/admin/reward/vo/RewardActivityBaseVO.java +++ b/yudao-module-mall/yudao-module-promotion-biz/src/main/java/cn/iocoder/yudao/module/promotion/controller/admin/reward/vo/RewardActivityBaseVO.java @@ -4,8 +4,7 @@ import cn.hutool.core.collection.CollUtil; import cn.iocoder.yudao.framework.common.validation.InEnum; import cn.iocoder.yudao.module.promotion.enums.common.PromotionConditionTypeEnum; import com.fasterxml.jackson.annotation.JsonIgnore; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; +import io.swagger.v3.oas.annotations.media.Schema; import lombok.Data; import org.springframework.format.annotation.DateTimeFormat; @@ -26,35 +25,35 @@ import static cn.iocoder.yudao.framework.common.util.date.DateUtils.FORMAT_YEAR_ @Data public class RewardActivityBaseVO { - @ApiModelProperty(value = "活动标题", required = true, example = "满啦满啦") + @Schema(title = "活动标题", required = true, example = "满啦满啦") @NotNull(message = "活动标题不能为空") private String name; - @ApiModelProperty(value = "开始时间", required = true) + @Schema(title = "开始时间", required = true) @NotNull(message = "开始时间不能为空") @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND) private LocalDateTime startTime; - @ApiModelProperty(value = "结束时间", required = true) + @Schema(title = "结束时间", required = true) @NotNull(message = "结束时间不能为空") @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND) @Future(message = "结束时间必须大于当前时间") private LocalDateTime endTime; - @ApiModelProperty(value = "备注", example = "biubiubiu") + @Schema(title = "备注", example = "biubiubiu") private String remark; - @ApiModelProperty(value = "条件类型", required = true, example = "1") + @Schema(title = "条件类型", required = true, example = "1") @NotNull(message = "条件类型不能为空") @InEnum(value = PromotionConditionTypeEnum.class, message = "条件类型必须是 {value}") private Integer conditionType; - @ApiModelProperty(value = "商品范围", required = true, example = "1") + @Schema(title = "商品范围", required = true, example = "1") @NotNull(message = "商品范围不能为空") @InEnum(value = PromotionConditionTypeEnum.class, message = "商品范围必须是 {value}") private Integer productScope; - @ApiModelProperty(value = "商品 SPU 编号的数组", example = "1,2,3") + @Schema(title = "商品 SPU 编号的数组", example = "1,2,3") private List productSpuIds; /** @@ -63,29 +62,29 @@ public class RewardActivityBaseVO { @Valid // 校验下子对象 private List rules; - @ApiModel("优惠规则") + @Schema(title = "优惠规则") @Data public static class Rule { - @ApiModelProperty(value = "优惠门槛", required = true, example = "100", notes = "1. 满 N 元,单位:分; 2. 满 N 件") + @Schema(title = "优惠门槛", required = true, example = "100", description = "1. 满 N 元,单位:分; 2. 满 N 件") @Min(value = 1L, message = "优惠门槛必须大于等于 1") private Integer limit; - @ApiModelProperty(value = "优惠价格", required = true, example = "100", notes = "单位:分") + @Schema(title = "优惠价格", required = true, example = "100", description = "单位:分") @Min(value = 1L, message = "优惠价格必须大于等于 1") private Integer discountPrice; - @ApiModelProperty(value = "是否包邮", required = true, example = "true") + @Schema(title = "是否包邮", required = true, example = "true") private Boolean freeDelivery; - @ApiModelProperty(value = "赠送的积分", required = true, example = "100") + @Schema(title = "赠送的积分", required = true, example = "100") @Min(value = 1L, message = "赠送的积分必须大于等于 1") private Integer point; - @ApiModelProperty(value = "赠送的优惠劵编号的数组", example = "1,2,3") + @Schema(title = "赠送的优惠劵编号的数组", example = "1,2,3") private List couponIds; - @ApiModelProperty(value = "赠送的优惠卷数量的数组", example = "1,2,3") + @Schema(title = "赠送的优惠卷数量的数组", example = "1,2,3") private List couponCounts; @AssertTrue(message = "优惠劵和数量必须一一对应") diff --git a/yudao-module-mall/yudao-module-promotion-biz/src/main/java/cn/iocoder/yudao/module/promotion/controller/admin/reward/vo/RewardActivityCreateReqVO.java b/yudao-module-mall/yudao-module-promotion-biz/src/main/java/cn/iocoder/yudao/module/promotion/controller/admin/reward/vo/RewardActivityCreateReqVO.java index 6a7251021e..222a704c6e 100755 --- a/yudao-module-mall/yudao-module-promotion-biz/src/main/java/cn/iocoder/yudao/module/promotion/controller/admin/reward/vo/RewardActivityCreateReqVO.java +++ b/yudao-module-mall/yudao-module-promotion-biz/src/main/java/cn/iocoder/yudao/module/promotion/controller/admin/reward/vo/RewardActivityCreateReqVO.java @@ -1,9 +1,8 @@ package cn.iocoder.yudao.module.promotion.controller.admin.reward.vo; - +import io.swagger.v3.oas.annotations.media.Schema; import lombok.*; -import io.swagger.annotations.*; -@ApiModel("管理后台 - 满减送活动创建 Request VO") +@Schema(title = "管理后台 - 满减送活动创建 Request VO") @Data @EqualsAndHashCode(callSuper = true) @ToString(callSuper = true) diff --git a/yudao-module-mall/yudao-module-promotion-biz/src/main/java/cn/iocoder/yudao/module/promotion/controller/admin/reward/vo/RewardActivityPageReqVO.java b/yudao-module-mall/yudao-module-promotion-biz/src/main/java/cn/iocoder/yudao/module/promotion/controller/admin/reward/vo/RewardActivityPageReqVO.java index 5a8d2ba6db..980f92bfc0 100755 --- a/yudao-module-mall/yudao-module-promotion-biz/src/main/java/cn/iocoder/yudao/module/promotion/controller/admin/reward/vo/RewardActivityPageReqVO.java +++ b/yudao-module-mall/yudao-module-promotion-biz/src/main/java/cn/iocoder/yudao/module/promotion/controller/admin/reward/vo/RewardActivityPageReqVO.java @@ -1,19 +1,18 @@ package cn.iocoder.yudao.module.promotion.controller.admin.reward.vo; - +import io.swagger.v3.oas.annotations.media.Schema; import lombok.*; -import io.swagger.annotations.*; import cn.iocoder.yudao.framework.common.pojo.PageParam; -@ApiModel("管理后台 - 满减送活动分页 Request VO") +@Schema(title = "管理后台 - 满减送活动分页 Request VO") @Data @EqualsAndHashCode(callSuper = true) @ToString(callSuper = true) public class RewardActivityPageReqVO extends PageParam { - @ApiModelProperty(value = "活动标题", example = "满啦满啦") + @Schema(title = "活动标题", example = "满啦满啦") private String name; - @ApiModelProperty(value = "活动状态", example = "1") + @Schema(title = "活动状态", example = "1") private Integer status; } diff --git a/yudao-module-mall/yudao-module-promotion-biz/src/main/java/cn/iocoder/yudao/module/promotion/controller/admin/reward/vo/RewardActivityRespVO.java b/yudao-module-mall/yudao-module-promotion-biz/src/main/java/cn/iocoder/yudao/module/promotion/controller/admin/reward/vo/RewardActivityRespVO.java index cb90e21cb3..2eede11e2b 100755 --- a/yudao-module-mall/yudao-module-promotion-biz/src/main/java/cn/iocoder/yudao/module/promotion/controller/admin/reward/vo/RewardActivityRespVO.java +++ b/yudao-module-mall/yudao-module-promotion-biz/src/main/java/cn/iocoder/yudao/module/promotion/controller/admin/reward/vo/RewardActivityRespVO.java @@ -1,26 +1,25 @@ package cn.iocoder.yudao.module.promotion.controller.admin.reward.vo; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; +import io.swagger.v3.oas.annotations.media.Schema; import lombok.Data; import lombok.EqualsAndHashCode; import lombok.ToString; import java.time.LocalDateTime; -@ApiModel("管理后台 - 满减送活动 Response VO") +@Schema(title = "管理后台 - 满减送活动 Response VO") @Data @EqualsAndHashCode(callSuper = true) @ToString(callSuper = true) public class RewardActivityRespVO extends RewardActivityBaseVO { - @ApiModelProperty(value = "活动编号", required = true, example = "1024") + @Schema(title = "活动编号", required = true, example = "1024") private Integer id; - @ApiModelProperty(value = "活动状态", required = true, example = "1") + @Schema(title = "活动状态", required = true, example = "1") private Integer status; - @ApiModelProperty(value = "创建时间", required = true) + @Schema(title = "创建时间", required = true) private LocalDateTime createTime; } diff --git a/yudao-module-mall/yudao-module-promotion-biz/src/main/java/cn/iocoder/yudao/module/promotion/controller/admin/reward/vo/RewardActivityUpdateReqVO.java b/yudao-module-mall/yudao-module-promotion-biz/src/main/java/cn/iocoder/yudao/module/promotion/controller/admin/reward/vo/RewardActivityUpdateReqVO.java index 659deee3d6..9580868c68 100755 --- a/yudao-module-mall/yudao-module-promotion-biz/src/main/java/cn/iocoder/yudao/module/promotion/controller/admin/reward/vo/RewardActivityUpdateReqVO.java +++ b/yudao-module-mall/yudao-module-promotion-biz/src/main/java/cn/iocoder/yudao/module/promotion/controller/admin/reward/vo/RewardActivityUpdateReqVO.java @@ -1,16 +1,15 @@ package cn.iocoder.yudao.module.promotion.controller.admin.reward.vo; - +import io.swagger.v3.oas.annotations.media.Schema; import lombok.*; -import io.swagger.annotations.*; import javax.validation.constraints.*; -@ApiModel("管理后台 - 满减送活动更新 Request VO") +@Schema(title = "管理后台 - 满减送活动更新 Request VO") @Data @EqualsAndHashCode(callSuper = true) @ToString(callSuper = true) public class RewardActivityUpdateReqVO extends RewardActivityBaseVO { - @ApiModelProperty(value = "活动编号", required = true, example = "1024") + @Schema(title = "活动编号", required = true, example = "1024") @NotNull(message = "活动编号不能为空") private Long id; diff --git a/yudao-module-mall/yudao-module-promotion-biz/src/main/java/cn/iocoder/yudao/module/promotion/controller/app/AppMarketTestController.java b/yudao-module-mall/yudao-module-promotion-biz/src/main/java/cn/iocoder/yudao/module/promotion/controller/app/AppMarketTestController.java index d6d6689efc..510889f9cd 100644 --- a/yudao-module-mall/yudao-module-promotion-biz/src/main/java/cn/iocoder/yudao/module/promotion/controller/app/AppMarketTestController.java +++ b/yudao-module-mall/yudao-module-promotion-biz/src/main/java/cn/iocoder/yudao/module/promotion/controller/app/AppMarketTestController.java @@ -1,8 +1,8 @@ package cn.iocoder.yudao.module.promotion.controller.app; import cn.iocoder.yudao.framework.common.pojo.CommonResult; -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.GetMapping; import org.springframework.web.bind.annotation.RequestMapping; @@ -10,14 +10,14 @@ import org.springframework.web.bind.annotation.RestController; import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success; -@Api(tags = "用户 App - 营销") +@Tag(name = "用户 App - 营销") @RestController @RequestMapping("/market/test") @Validated public class AppMarketTestController { @GetMapping("/get") - @ApiOperation("获取 market 信息") + @Operation(summary = "获取 market 信息") public CommonResult get() { return success("true"); } diff --git a/yudao-module-mall/yudao-module-promotion-biz/src/main/java/cn/iocoder/yudao/module/promotion/controller/app/banner/AppBannerController.java b/yudao-module-mall/yudao-module-promotion-biz/src/main/java/cn/iocoder/yudao/module/promotion/controller/app/banner/AppBannerController.java index 4edd1ed04f..1a7f148ff6 100644 --- a/yudao-module-mall/yudao-module-promotion-biz/src/main/java/cn/iocoder/yudao/module/promotion/controller/app/banner/AppBannerController.java +++ b/yudao-module-mall/yudao-module-promotion-biz/src/main/java/cn/iocoder/yudao/module/promotion/controller/app/banner/AppBannerController.java @@ -5,8 +5,8 @@ import cn.iocoder.yudao.module.promotion.controller.admin.banner.vo.BannerRespVO import cn.iocoder.yudao.module.promotion.convert.banner.BannerConvert; import cn.iocoder.yudao.module.promotion.dal.dataobject.banner.BannerDO; import cn.iocoder.yudao.module.promotion.service.banner.BannerService; -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; @@ -23,7 +23,7 @@ import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success; */ @RestController @RequestMapping("/market/banner") -@Api(tags = "用户APP- 首页Banner") +@Tag(name = "用户APP- 首页Banner") @Validated public class AppBannerController { @@ -32,7 +32,7 @@ public class AppBannerController { // TODO @xia:新建一个 AppBannerRespVO,只返回必要的字段。status 要过滤下。然后 sort 下结果 @GetMapping("/list") - @ApiOperation("获得banner列表") + @Operation(summary = "获得banner列表") @PreAuthorize("@ss.hasPermission('market:banner:query')") public CommonResult> getBannerList() { List list = bannerService.getBannerList(); diff --git a/yudao-module-mall/yudao-module-trade-biz/src/main/java/cn/iocoder/yudao/module/trade/controller/app/base/property/AppProductPropertyValueDetailRespVO.java b/yudao-module-mall/yudao-module-trade-biz/src/main/java/cn/iocoder/yudao/module/trade/controller/app/base/property/AppProductPropertyValueDetailRespVO.java index e116f5888f..c4ec055c8f 100644 --- a/yudao-module-mall/yudao-module-trade-biz/src/main/java/cn/iocoder/yudao/module/trade/controller/app/base/property/AppProductPropertyValueDetailRespVO.java +++ b/yudao-module-mall/yudao-module-trade-biz/src/main/java/cn/iocoder/yudao/module/trade/controller/app/base/property/AppProductPropertyValueDetailRespVO.java @@ -1,23 +1,22 @@ package cn.iocoder.yudao.module.trade.controller.app.base.property; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; +import io.swagger.v3.oas.annotations.media.Schema; import lombok.Data; -@ApiModel("用户 App - 规格 + 规格值 Response VO") +@Schema(title = "用户 App - 规格 + 规格值 Response VO") @Data public class AppProductPropertyValueDetailRespVO { - @ApiModelProperty(value = "属性的编号", required = true, example = "1") + @Schema(title = "属性的编号", required = true, example = "1") private Long propertyId; - @ApiModelProperty(value = "属性的名称", required = true, example = "颜色") + @Schema(title = "属性的名称", required = true, example = "颜色") private String propertyName; - @ApiModelProperty(value = "属性值的编号", required = true, example = "1024") + @Schema(title = "属性值的编号", required = true, example = "1024") private Long valueId; - @ApiModelProperty(value = "属性值的名称", required = true, example = "红色") + @Schema(title = "属性值的名称", required = true, example = "红色") private String valueName; } diff --git a/yudao-module-mall/yudao-module-trade-biz/src/main/java/cn/iocoder/yudao/module/trade/controller/app/base/sku/AppProductSkuBaseRespVO.java b/yudao-module-mall/yudao-module-trade-biz/src/main/java/cn/iocoder/yudao/module/trade/controller/app/base/sku/AppProductSkuBaseRespVO.java index ed666a9c89..5d6499517f 100644 --- a/yudao-module-mall/yudao-module-trade-biz/src/main/java/cn/iocoder/yudao/module/trade/controller/app/base/sku/AppProductSkuBaseRespVO.java +++ b/yudao-module-mall/yudao-module-trade-biz/src/main/java/cn/iocoder/yudao/module/trade/controller/app/base/sku/AppProductSkuBaseRespVO.java @@ -1,7 +1,7 @@ package cn.iocoder.yudao.module.trade.controller.app.base.sku; import cn.iocoder.yudao.module.trade.controller.app.base.property.AppProductPropertyValueDetailRespVO; -import io.swagger.annotations.ApiModelProperty; +import io.swagger.v3.oas.annotations.media.Schema; import lombok.Data; import java.util.List; @@ -14,16 +14,16 @@ import java.util.List; @Data public class AppProductSkuBaseRespVO { - @ApiModelProperty(value = "主键", required = true, example = "1024") + @Schema(title = "主键", required = true, example = "1024") private Long id; - @ApiModelProperty(value = "商品 SKU 名字", required = true, example = "芋道") + @Schema(title = "商品 SKU 名字", required = true, example = "芋道") private String name; - @ApiModelProperty(value = "图片地址", example = "https://www.iocoder.cn/xx.png") + @Schema(title = "图片地址", example = "https://www.iocoder.cn/xx.png") private String picUrl; - @ApiModelProperty(value = "库存", required = true, example = "1") + @Schema(title = "库存", required = true, example = "1") private Integer stock; /** diff --git a/yudao-module-mall/yudao-module-trade-biz/src/main/java/cn/iocoder/yudao/module/trade/controller/app/base/spu/AppProductSpuBaseRespVO.java b/yudao-module-mall/yudao-module-trade-biz/src/main/java/cn/iocoder/yudao/module/trade/controller/app/base/spu/AppProductSpuBaseRespVO.java index c7d9f236ff..a3ebf3fe82 100644 --- a/yudao-module-mall/yudao-module-trade-biz/src/main/java/cn/iocoder/yudao/module/trade/controller/app/base/spu/AppProductSpuBaseRespVO.java +++ b/yudao-module-mall/yudao-module-trade-biz/src/main/java/cn/iocoder/yudao/module/trade/controller/app/base/spu/AppProductSpuBaseRespVO.java @@ -1,6 +1,5 @@ package cn.iocoder.yudao.module.trade.controller.app.base.spu; - -import io.swagger.annotations.ApiModelProperty; +import io.swagger.v3.oas.annotations.media.Schema; import lombok.Data; import java.util.List; @@ -13,13 +12,13 @@ import java.util.List; @Data public class AppProductSpuBaseRespVO { - @ApiModelProperty(value = "主键", required = true, example = "1024") + @Schema(title = "主键", required = true, example = "1024") private Long id; - @ApiModelProperty(value = "商品 SPU 名字", required = true, example = "芋道") + @Schema(title = "商品 SPU 名字", required = true, example = "芋道") private String name; - @ApiModelProperty(value = "商品主图地址", example = "https://www.iocoder.cn/xx.png") + @Schema(title = "商品主图地址", example = "https://www.iocoder.cn/xx.png") private List picUrls; } diff --git a/yudao-module-mall/yudao-module-trade-biz/src/main/java/cn/iocoder/yudao/module/trade/controller/app/cart/TradeCartController.java b/yudao-module-mall/yudao-module-trade-biz/src/main/java/cn/iocoder/yudao/module/trade/controller/app/cart/TradeCartController.java index e3688d1554..96f55d9a33 100644 --- a/yudao-module-mall/yudao-module-trade-biz/src/main/java/cn/iocoder/yudao/module/trade/controller/app/cart/TradeCartController.java +++ b/yudao-module-mall/yudao-module-trade-biz/src/main/java/cn/iocoder/yudao/module/trade/controller/app/cart/TradeCartController.java @@ -7,9 +7,9 @@ import cn.iocoder.yudao.module.trade.controller.app.cart.vo.AppTradeCartItemAddC import cn.iocoder.yudao.module.trade.controller.app.cart.vo.AppTradeCartItemUpdateCountReqVO; import cn.iocoder.yudao.module.trade.controller.app.cart.vo.AppTradeCartItemUpdateSelectedReqVO; import cn.iocoder.yudao.module.trade.service.cart.TradeCartService; -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.RequiredArgsConstructor; import lombok.extern.slf4j.Slf4j; import org.springframework.validation.annotation.Validated; @@ -22,7 +22,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 = "用户 App - 购物车") +@Tag(name = "用户 App - 购物车") @RestController @RequestMapping("/trade/cart") @RequiredArgsConstructor @@ -34,7 +34,7 @@ public class TradeCartController { private TradeCartService cartService; @PostMapping("/add-count") - @ApiOperation("添加商品到购物车") + @Operation(summary = "添加商品到购物车") @PreAuthenticated public CommonResult addCartItemCount(@Valid @RequestBody AppTradeCartItemAddCountReqVO addCountReqVO) { cartService.addCartItemCount(getLoginUserId(), addCountReqVO); @@ -42,7 +42,7 @@ public class TradeCartController { } @PutMapping("update-count") - @ApiOperation("更新购物车商品数量") + @Operation(summary = "更新购物车商品数量") @PreAuthenticated public CommonResult updateCartItemQuantity(@Valid @RequestBody AppTradeCartItemUpdateCountReqVO updateCountReqVO) { cartService.updateCartItemCount(getLoginUserId(), updateCountReqVO); @@ -50,7 +50,7 @@ public class TradeCartController { } @PutMapping("update-selected") - @ApiOperation("更新购物车商品是否选中") + @Operation(summary = "更新购物车商品是否选中") @PreAuthenticated public CommonResult updateCartItemSelected(@Valid @RequestBody AppTradeCartItemUpdateSelectedReqVO updateSelectedReqVO) { cartService.updateCartItemSelected(getLoginUserId(), updateSelectedReqVO); @@ -59,8 +59,8 @@ public class TradeCartController { } @DeleteMapping("/delete") - @ApiOperation("删除购物车商品") - @ApiImplicitParam(name = "skuIds", value = "商品 SKU 编号的数组", required = true, example = "1024,2048", dataTypeClass = List.class) + @Operation(summary = "删除购物车商品") + @Parameter(name = "skuIds", description = "商品 SKU 编号的数组", required = true, example = "1024,2048") @PreAuthenticated public CommonResult deleteCartItem(@RequestParam("skuIds") List skuIds) { cartService.deleteCartItems(getLoginUserId(), skuIds); @@ -68,14 +68,14 @@ public class TradeCartController { } @GetMapping("get-count") - @ApiOperation("查询用户在购物车中的商品数量") + @Operation(summary = "查询用户在购物车中的商品数量") @PreAuthenticated public CommonResult getCartCount() { return success(cartService.getCartCount(getLoginUserId())); } @GetMapping("/get-detail") - @ApiOperation("查询用户的购物车的详情") + @Operation(summary = "查询用户的购物车的详情") @PreAuthenticated public CommonResult getCartDetail() { return success(cartService.getCartDetail(getLoginUserId())); diff --git a/yudao-module-mall/yudao-module-trade-biz/src/main/java/cn/iocoder/yudao/module/trade/controller/app/cart/vo/AppTradeCartDetailRespVO.java b/yudao-module-mall/yudao-module-trade-biz/src/main/java/cn/iocoder/yudao/module/trade/controller/app/cart/vo/AppTradeCartDetailRespVO.java index 5656c3d69d..3599178871 100644 --- a/yudao-module-mall/yudao-module-trade-biz/src/main/java/cn/iocoder/yudao/module/trade/controller/app/cart/vo/AppTradeCartDetailRespVO.java +++ b/yudao-module-mall/yudao-module-trade-biz/src/main/java/cn/iocoder/yudao/module/trade/controller/app/cart/vo/AppTradeCartDetailRespVO.java @@ -1,13 +1,12 @@ package cn.iocoder.yudao.module.trade.controller.app.cart.vo; import cn.iocoder.yudao.module.trade.controller.app.base.sku.AppProductSkuBaseRespVO; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; +import io.swagger.v3.oas.annotations.media.Schema; import lombok.Data; import java.util.List; -@ApiModel(value = "用户 App - 用户的购物车明细 Response VO") +@Schema(title = "用户 App - 用户的购物车明细 Response VO") @Data public class AppTradeCartDetailRespVO { @@ -21,7 +20,7 @@ public class AppTradeCartDetailRespVO { */ private Order order; - @ApiModel(value = "商品分组", description = "多个商品,参加同一个活动,从而形成分组") + @Schema(title = "商品分组", description = "多个商品,参加同一个活动,从而形成分组") @Data public static class ItemGroup { @@ -36,7 +35,7 @@ public class AppTradeCartDetailRespVO { } - @ApiModel(value = "商品 SKU") + @Schema(title = "商品 SKU") @Data public static class Sku extends AppProductSkuBaseRespVO { @@ -47,26 +46,26 @@ public class AppTradeCartDetailRespVO { // ========== 购物车相关的字段 ========== - @ApiModelProperty(value = "商品数量", required = true, example = "1") + @Schema(title = "商品数量", required = true, example = "1") private Integer count; - @ApiModelProperty(value = "是否选中", required = true, example = "true") + @Schema(title = "是否选中", required = true, example = "true") private Boolean selected; // ========== 价格相关的字段,对应 PriceCalculateRespDTO.OrderItem 的属性 ========== // TODO 芋艿:后续可以去除一些无用的字段 - @ApiModelProperty(value = "商品原价(单)", required = true, example = "100") + @Schema(title = "商品原价(单)", required = true, example = "100") private Integer originalPrice; - @ApiModelProperty(value = "商品原价(总)", required = true, example = "200") + @Schema(title = "商品原价(总)", required = true, example = "200") private Integer totalOriginalPrice; - @ApiModelProperty(value = "商品级优惠(总)", required = true, example = "300") + @Schema(title = "商品级优惠(总)", required = true, example = "300") private Integer totalPromotionPrice; - @ApiModelProperty(value = "最终购买金额(总)", required = true, example = "400") + @Schema(title = "最终购买金额(总)", required = true, example = "400") private Integer totalPresentPrice; - @ApiModelProperty(value = "最终购买金额(单)", required = true, example = "500") + @Schema(title = "最终购买金额(单)", required = true, example = "500") private Integer presentPrice; - @ApiModelProperty(value = "应付金额(总)", required = true, example = "600") + @Schema(title = "应付金额(总)", required = true, example = "600") private Integer totalPayPrice; // ========== 营销相关的字段 ========== @@ -77,40 +76,40 @@ public class AppTradeCartDetailRespVO { } - @ApiModel(value = "订单", description = "对应 PriceCalculateRespDTO.Order 类,用于费用(合计)") + @Schema(title = "订单", description = "对应 PriceCalculateRespDTO.Order 类,用于费用(合计)") @Data public static class Order { // TODO 芋艿:后续可以去除一些无用的字段 - @ApiModelProperty(value = "商品原价(总)", required = true, example = "100") + @Schema(title = "商品原价(总)", required = true, example = "100") private Integer skuOriginalPrice; - @ApiModelProperty(value = "商品优惠(总)", required = true, example = "200") + @Schema(title = "商品优惠(总)", required = true, example = "200") private Integer skuPromotionPrice; - @ApiModelProperty(value = "订单优惠(总)", required = true, example = "300") + @Schema(title = "订单优惠(总)", required = true, example = "300") private Integer orderPromotionPrice; - @ApiModelProperty(value = "运费金额", required = true, example = "400") + @Schema(title = "运费金额", required = true, example = "400") private Integer deliveryPrice; - @ApiModelProperty(value = "应付金额(总)", required = true, example = "500") + @Schema(title = "应付金额(总)", required = true, example = "500") private Integer payPrice; } - @ApiModel(value = "营销活动", description = "对应 PriceCalculateRespDTO.Promotion 类的属性") + @Schema(title = "营销活动", description = "对应 PriceCalculateRespDTO.Promotion 类的属性") @Data public static class Promotion { - @ApiModelProperty(value = "营销编号", required = true, example = "1024", notes = "营销活动的编号、优惠劵的编号") + @Schema(title = "营销编号", required = true, example = "1024", description = "营销活动的编号、优惠劵的编号") private Long id; - @ApiModelProperty(value = "营销名字", required = true, example = "xx 活动") + @Schema(title = "营销名字", required = true, example = "xx 活动") private String name; - @ApiModelProperty(value = "营销类型", required = true, example = "1", notes = "参见 PromotionTypeEnum 枚举类") + @Schema(title = "营销类型", required = true, example = "1", description = "参见 PromotionTypeEnum 枚举类") private Integer type; // ========== 匹配情况 ========== - @ApiModelProperty(value = "是否满足优惠条件", required = true, example = "true") + @Schema(title = "是否满足优惠条件", required = true, example = "true") private Boolean meet; - @ApiModelProperty(value = "满足条件的提示", required = true, example = "圣诞价:省 150.00 元") + @Schema(title = "满足条件的提示", required = true, example = "圣诞价:省 150.00 元") private String meetTip; } diff --git a/yudao-module-mall/yudao-module-trade-biz/src/main/java/cn/iocoder/yudao/module/trade/controller/app/cart/vo/AppTradeCartItemAddCountReqVO.java b/yudao-module-mall/yudao-module-trade-biz/src/main/java/cn/iocoder/yudao/module/trade/controller/app/cart/vo/AppTradeCartItemAddCountReqVO.java index c3103dcce5..20c1e9e8b9 100644 --- a/yudao-module-mall/yudao-module-trade-biz/src/main/java/cn/iocoder/yudao/module/trade/controller/app/cart/vo/AppTradeCartItemAddCountReqVO.java +++ b/yudao-module-mall/yudao-module-trade-biz/src/main/java/cn/iocoder/yudao/module/trade/controller/app/cart/vo/AppTradeCartItemAddCountReqVO.java @@ -1,21 +1,20 @@ package cn.iocoder.yudao.module.trade.controller.app.cart.vo; -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; import javax.validation.constraints.NotNull; -@ApiModel(value = "用户 App - 购物车添加购物项 Request VO") +@Schema(title = "用户 App - 购物车添加购物项 Request VO") @Data public class AppTradeCartItemAddCountReqVO { - @ApiModelProperty(value = "商品 SKU 编号", required = true,example = "1024") + @Schema(title = "商品 SKU 编号", required = true,example = "1024") @NotNull(message = "商品 SKU 编号不能为空") private Long skuId; - @ApiModelProperty(value = "商品数量", required = true, example = "1", notes = "注意,这是新增数量") + @Schema(title = "商品数量", required = true, example = "1", description = "注意,这是新增数量") @NotNull(message = "数量不能为空") @Min(message = "数量必须大于 0", value = 1L) private Integer count; diff --git a/yudao-module-mall/yudao-module-trade-biz/src/main/java/cn/iocoder/yudao/module/trade/controller/app/cart/vo/AppTradeCartItemUpdateCountReqVO.java b/yudao-module-mall/yudao-module-trade-biz/src/main/java/cn/iocoder/yudao/module/trade/controller/app/cart/vo/AppTradeCartItemUpdateCountReqVO.java index 6beb093799..3854b1bec8 100644 --- a/yudao-module-mall/yudao-module-trade-biz/src/main/java/cn/iocoder/yudao/module/trade/controller/app/cart/vo/AppTradeCartItemUpdateCountReqVO.java +++ b/yudao-module-mall/yudao-module-trade-biz/src/main/java/cn/iocoder/yudao/module/trade/controller/app/cart/vo/AppTradeCartItemUpdateCountReqVO.java @@ -1,21 +1,20 @@ package cn.iocoder.yudao.module.trade.controller.app.cart.vo; -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; import javax.validation.constraints.NotNull; -@ApiModel(value = "用户 App - 购物车更新数量 Request VO") +@Schema(title = "用户 App - 购物车更新数量 Request VO") @Data public class AppTradeCartItemUpdateCountReqVO { - @ApiModelProperty(value = "商品 SKU 编号", required = true, example = "1024") + @Schema(title = "商品 SKU 编号", required = true, example = "1024") @NotNull(message = "商品 SKU 编号不能为空") private Long skuId; - @ApiModelProperty(value = "商品数量", required = true, example = "1") + @Schema(title = "商品数量", required = true, example = "1") @NotNull(message = "数量不能为空") @Min(message = "数量必须大于 0", value = 1L) private Integer count; diff --git a/yudao-module-mall/yudao-module-trade-biz/src/main/java/cn/iocoder/yudao/module/trade/controller/app/cart/vo/AppTradeCartItemUpdateSelectedReqVO.java b/yudao-module-mall/yudao-module-trade-biz/src/main/java/cn/iocoder/yudao/module/trade/controller/app/cart/vo/AppTradeCartItemUpdateSelectedReqVO.java index cc7bf6f030..f126ed41b6 100644 --- a/yudao-module-mall/yudao-module-trade-biz/src/main/java/cn/iocoder/yudao/module/trade/controller/app/cart/vo/AppTradeCartItemUpdateSelectedReqVO.java +++ b/yudao-module-mall/yudao-module-trade-biz/src/main/java/cn/iocoder/yudao/module/trade/controller/app/cart/vo/AppTradeCartItemUpdateSelectedReqVO.java @@ -1,21 +1,20 @@ package cn.iocoder.yudao.module.trade.controller.app.cart.vo; -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.NotNull; import java.util.Collection; -@ApiModel(value = "用户 App - 购物车更新是否选中 Request VO") +@Schema(title = "用户 App - 购物车更新是否选中 Request VO") @Data public class AppTradeCartItemUpdateSelectedReqVO { - @ApiModelProperty(value = "商品 SKU 编号列表", required = true, example = "1024,2048") + @Schema(title = "商品 SKU 编号列表", required = true, example = "1024,2048") @NotNull(message = "商品 SKU 编号列表不能为空") private Collection skuIds; - @ApiModelProperty(value = "是否选中", required = true, example = "true") + @Schema(title = "是否选中", required = true, example = "true") @NotNull(message = "是否选中不能为空") private Boolean selected; diff --git a/yudao-module-mall/yudao-module-trade-biz/src/main/java/cn/iocoder/yudao/module/trade/controller/app/order/AppTradeOrderController.java b/yudao-module-mall/yudao-module-trade-biz/src/main/java/cn/iocoder/yudao/module/trade/controller/app/order/AppTradeOrderController.java index 4233867e13..1ddb602b19 100644 --- a/yudao-module-mall/yudao-module-trade-biz/src/main/java/cn/iocoder/yudao/module/trade/controller/app/order/AppTradeOrderController.java +++ b/yudao-module-mall/yudao-module-trade-biz/src/main/java/cn/iocoder/yudao/module/trade/controller/app/order/AppTradeOrderController.java @@ -10,9 +10,9 @@ import cn.iocoder.yudao.module.trade.controller.app.order.vo.AppTradeOrderGetCre import cn.iocoder.yudao.module.trade.controller.app.order.vo.TradeOrderPageReqVO; import cn.iocoder.yudao.module.trade.controller.app.order.vo.TradeOrderRespVO; import cn.iocoder.yudao.module.trade.service.order.TradeOrderService; -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.RequiredArgsConstructor; import lombok.extern.slf4j.Slf4j; import org.springframework.validation.annotation.Validated; @@ -20,7 +20,7 @@ import org.springframework.web.bind.annotation.*; import javax.servlet.http.HttpServletRequest; -@Api(tags = "用户 App - 交易订单") +@Tag(name = "用户 App - 交易订单") @RestController @RequestMapping("/trade/order") @RequiredArgsConstructor // TODO @LeeYan9: 先统一使用 @Resource 注入哈; 项目只有三层, 依赖注入会存在, 所以使用 @Resource; 也因此, 最好全局保持一致 @@ -31,7 +31,7 @@ public class AppTradeOrderController { private final TradeOrderService tradeOrderService; @GetMapping("/get-create-info") - @ApiOperation("基于商品,确认创建订单") + @Operation(summary = "基于商品,确认创建订单") @PreAuthenticated public CommonResult getTradeOrderCreateInfo(AppTradeOrderCreateReqVO createReqVO) { // return success(tradeOrderService.getOrderConfirmCreateInfo(UserSecurityContextHolder.getUserId(), skuId, quantity, couponCardId)); @@ -39,7 +39,7 @@ public class AppTradeOrderController { } @PostMapping("/create") - @ApiOperation("创建订单") + @Operation(summary = "创建订单") @PreAuthenticated public CommonResult createTradeOrder(@RequestBody AppTradeOrderCreateReqVO createReqVO, HttpServletRequest servletRequest) { @@ -52,15 +52,15 @@ public class AppTradeOrderController { } @GetMapping("/get") - @ApiOperation("获得交易订单") - @ApiImplicitParam(name = "tradeOrderId", value = "交易订单编号", required = true, dataTypeClass = Long.class) + @Operation(summary = "获得交易订单") + @Parameter(name = "tradeOrderId", description = "交易订单编号", required = true) public CommonResult getTradeOrder(@RequestParam("tradeOrderId") Integer tradeOrderId) { // return success(tradeOrderService.getTradeOrder(tradeOrderId)); return null; } @GetMapping("/page") - @ApiOperation("获得订单交易分页") + @Operation(summary = "获得订单交易分页") public CommonResult> pageTradeOrder(TradeOrderPageReqVO pageVO) { // return success(tradeOrderService.pageTradeOrder(UserSecurityContextHolder.getUserId(), pageVO)); return null; diff --git a/yudao-module-mall/yudao-module-trade-biz/src/main/java/cn/iocoder/yudao/module/trade/controller/app/order/vo/AppTradeOrderCreateReqVO.java b/yudao-module-mall/yudao-module-trade-biz/src/main/java/cn/iocoder/yudao/module/trade/controller/app/order/vo/AppTradeOrderCreateReqVO.java index 5126de4a51..99700d2e72 100644 --- a/yudao-module-mall/yudao-module-trade-biz/src/main/java/cn/iocoder/yudao/module/trade/controller/app/order/vo/AppTradeOrderCreateReqVO.java +++ b/yudao-module-mall/yudao-module-trade-biz/src/main/java/cn/iocoder/yudao/module/trade/controller/app/order/vo/AppTradeOrderCreateReqVO.java @@ -1,7 +1,6 @@ package cn.iocoder.yudao.module.trade.controller.app.order.vo; -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,21 +8,21 @@ import javax.validation.constraints.NotEmpty; import javax.validation.constraints.NotNull; import java.util.List; -@ApiModel(value = "用户 App - 交易订单创建 Request VO") +@Schema(title = "用户 App - 交易订单创建 Request VO") @Data public class AppTradeOrderCreateReqVO { - @ApiModelProperty(name = "收件地址编号", required = true, example = "1") + @Schema(name = "收件地址编号", required = true, example = "1") @NotNull(message = "收件地址不能为空") private Long addressId; - @ApiModelProperty(name = "优惠劵编号", example = "1024") + @Schema(name = "优惠劵编号", example = "1024") private Long couponId; - @ApiModelProperty(name = "备注", example = "这个是我的订单哟") + @Schema(name = "备注", example = "这个是我的订单哟") private String remark; - @ApiModelProperty(name = "是否来自购物车", required = true, example = "true", notes = "true - 来自购物车;false - 立即购买") + @Schema(name = "是否来自购物车", required = true, example = "true", description = "true - 来自购物车;false - 立即购买") @NotNull(message = "是否来自购物车不能为空") private Boolean fromCart; @@ -33,15 +32,15 @@ public class AppTradeOrderCreateReqVO { @NotEmpty(message = "必须选择购买的商品") private List items; - @ApiModel(value = "订单商品项") + @Schema(title = "订单商品项") @Data public static class Item { - @ApiModelProperty(name = "商品 SKU 编号", required = true, example = "111") + @Schema(name = "商品 SKU 编号", required = true, example = "111") @NotNull(message = "商品 SKU 编号不能为空") private Long skuId; - @ApiModelProperty(name = "商品 SKU 购买数量", required = true, example = "1024") + @Schema(name = "商品 SKU 购买数量", required = true, example = "1024") @NotNull(message = "商品 SKU 购买数量不能为空") @Min(value = 1, message = "商品 SKU 购买数量必须大于 0") private Integer count; diff --git a/yudao-module-mall/yudao-module-trade-biz/src/main/java/cn/iocoder/yudao/module/trade/controller/app/order/vo/AppTradeOrderGetCreateInfoRespVO.java b/yudao-module-mall/yudao-module-trade-biz/src/main/java/cn/iocoder/yudao/module/trade/controller/app/order/vo/AppTradeOrderGetCreateInfoRespVO.java index d0bf595f69..ee73df0989 100644 --- a/yudao-module-mall/yudao-module-trade-biz/src/main/java/cn/iocoder/yudao/module/trade/controller/app/order/vo/AppTradeOrderGetCreateInfoRespVO.java +++ b/yudao-module-mall/yudao-module-trade-biz/src/main/java/cn/iocoder/yudao/module/trade/controller/app/order/vo/AppTradeOrderGetCreateInfoRespVO.java @@ -1,13 +1,12 @@ package cn.iocoder.yudao.module.trade.controller.app.order.vo; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; +import io.swagger.v3.oas.annotations.media.Schema; import lombok.AllArgsConstructor; import lombok.Data; import java.util.List; -@ApiModel(value = "用户 App - 订单获得创建信息 Response VO") +@Schema(title = "用户 App - 订单获得创建信息 Response VO") @Data public class AppTradeOrderGetCreateInfoRespVO { @@ -25,7 +24,7 @@ public class AppTradeOrderGetCreateInfoRespVO { // */ // private List coupons; - @ApiModel(value = "商品分组", description = "多个商品,参加同一个活动,从而形成分组") + @Schema(title = "商品分组", description = "多个商品,参加同一个活动,从而形成分组") @Data public static class ItemGroup { @@ -40,12 +39,12 @@ public class AppTradeOrderGetCreateInfoRespVO { } - @ApiModel("商品 SKU") + @Schema(title = "商品 SKU") @Data public static class Sku { // SKU 自带信息 - @ApiModelProperty(value = "SKU 编号", required = true, example = "1024") + @Schema(title = "SKU 编号", required = true, example = "1024") private Integer id; /** * SPU 信息 @@ -140,12 +139,12 @@ public class AppTradeOrderGetCreateInfoRespVO { } - @ApiModel("费用(合计)") + @Schema(title = "费用(合计)") @Data @AllArgsConstructor public static class Fee { - @ApiModelProperty(value = "购买总价", required = true, example = "1024") + @Schema(title = "购买总价", required = true, example = "1024") private Integer buyPrice; /** * 优惠总价 diff --git a/yudao-module-mall/yudao-module-trade-biz/src/main/java/cn/iocoder/yudao/module/trade/controller/app/order/vo/TradeOrderItemRespVO.java b/yudao-module-mall/yudao-module-trade-biz/src/main/java/cn/iocoder/yudao/module/trade/controller/app/order/vo/TradeOrderItemRespVO.java index 354d8386ad..a792c756ed 100644 --- a/yudao-module-mall/yudao-module-trade-biz/src/main/java/cn/iocoder/yudao/module/trade/controller/app/order/vo/TradeOrderItemRespVO.java +++ b/yudao-module-mall/yudao-module-trade-biz/src/main/java/cn/iocoder/yudao/module/trade/controller/app/order/vo/TradeOrderItemRespVO.java @@ -1,52 +1,51 @@ package cn.iocoder.yudao.module.trade.controller.app.order.vo; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; +import io.swagger.v3.oas.annotations.media.Schema; import lombok.Data; import java.time.LocalDateTime; -@ApiModel("交易订单项 Response VO") +@Schema(title = "交易订单项 Response VO") @Data public class TradeOrderItemRespVO { - @ApiModelProperty(value = "id自增长", required = true) + @Schema(title = "id自增长", required = true) private Integer id; - @ApiModelProperty(value = "订单编号", required = true) + @Schema(title = "订单编号", required = true) private Integer orderId; - @ApiModelProperty(value = "订单项状态", required = true) + @Schema(title = "订单项状态", required = true) private Integer status; - @ApiModelProperty(value = "商品 SKU 编号", required = true) + @Schema(title = "商品 SKU 编号", required = true) private Integer skuId; - @ApiModelProperty(value = "商品 SPU 编号", required = true) + @Schema(title = "商品 SPU 编号", required = true) private Integer spuId; - @ApiModelProperty(value = "商品名字", required = true) + @Schema(title = "商品名字", required = true) private String skuName; - @ApiModelProperty(value = "图片名字", required = true) + @Schema(title = "图片名字", required = true) private String skuImage; - @ApiModelProperty(value = "商品数量", required = true) + @Schema(title = "商品数量", required = true) private Integer quantity; - @ApiModelProperty(value = "原始单价,单位:分", required = true) + @Schema(title = "原始单价,单位:分", required = true) private Integer originPrice; - @ApiModelProperty(value = "购买单价,单位:分", required = true) + @Schema(title = "购买单价,单位:分", required = true) private Integer buyPrice; - @ApiModelProperty(value = "最终价格,单位:分", required = true) + @Schema(title = "最终价格,单位:分", required = true) private Integer presentPrice; - @ApiModelProperty(value = "购买总金额,单位:分", required = true) + @Schema(title = "购买总金额,单位:分", required = true) private Integer buyTotal; - @ApiModelProperty(value = "优惠总金额,单位:分", required = true) + @Schema(title = "优惠总金额,单位:分", required = true) private Integer discountTotal; - @ApiModelProperty(value = "最终总金额,单位:分", required = true) + @Schema(title = "最终总金额,单位:分", required = true) private Integer presentTotal; - @ApiModelProperty(value = "退款总金额,单位:分", required = true) + @Schema(title = "退款总金额,单位:分", required = true) private Integer refundTotal; - @ApiModelProperty(value = "物流id") + @Schema(title = "物流id") private Integer logisticsId; - @ApiModelProperty(value = "售后状态", required = true) + @Schema(title = "售后状态", required = true) private Integer afterSaleStatus; - @ApiModelProperty(value = "售后订单编号") + @Schema(title = "售后订单编号") private Integer afterSaleOrderId; - @ApiModelProperty(value = "创建时间", required = true) + @Schema(title = "创建时间", required = true) private LocalDateTime createTime; diff --git a/yudao-module-mall/yudao-module-trade-biz/src/main/java/cn/iocoder/yudao/module/trade/controller/app/order/vo/TradeOrderPageReqVO.java b/yudao-module-mall/yudao-module-trade-biz/src/main/java/cn/iocoder/yudao/module/trade/controller/app/order/vo/TradeOrderPageReqVO.java index 5c8b6c8729..23b5e9d477 100644 --- a/yudao-module-mall/yudao-module-trade-biz/src/main/java/cn/iocoder/yudao/module/trade/controller/app/order/vo/TradeOrderPageReqVO.java +++ b/yudao-module-mall/yudao-module-trade-biz/src/main/java/cn/iocoder/yudao/module/trade/controller/app/order/vo/TradeOrderPageReqVO.java @@ -1,17 +1,16 @@ package cn.iocoder.yudao.module.trade.controller.app.order.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 lombok.Data; import lombok.EqualsAndHashCode; -@ApiModel("交易订单分页 Request VO") +@Schema(title = "交易订单分页 Request VO") @Data @EqualsAndHashCode(callSuper = true) public class TradeOrderPageReqVO extends PageParam { - @ApiModelProperty(value = "订单状态", example = "1", notes = "参见 TradeOrderStatusEnum 枚举") + @Schema(title = "订单状态", example = "1", description = "参见 TradeOrderStatusEnum 枚举") private Integer orderStatus; } diff --git a/yudao-module-mall/yudao-module-trade-biz/src/main/java/cn/iocoder/yudao/module/trade/controller/app/order/vo/TradeOrderRespVO.java b/yudao-module-mall/yudao-module-trade-biz/src/main/java/cn/iocoder/yudao/module/trade/controller/app/order/vo/TradeOrderRespVO.java index 583edbabca..c8630416d4 100644 --- a/yudao-module-mall/yudao-module-trade-biz/src/main/java/cn/iocoder/yudao/module/trade/controller/app/order/vo/TradeOrderRespVO.java +++ b/yudao-module-mall/yudao-module-trade-biz/src/main/java/cn/iocoder/yudao/module/trade/controller/app/order/vo/TradeOrderRespVO.java @@ -1,64 +1,63 @@ package cn.iocoder.yudao.module.trade.controller.app.order.vo; - +import io.swagger.v3.oas.annotations.media.Schema; import lombok.*; -import io.swagger.annotations.*; import java.time.LocalDateTime; import java.util.*; -@ApiModel("订单交易 Response VO") +@Schema(title = "订单交易 Response VO") @Data public class TradeOrderRespVO { - @ApiModelProperty(value = "订单编号", required = true) + @Schema(title = "订单编号", required = true) private Integer id; - @ApiModelProperty(value = "用户编号", required = true) + @Schema(title = "用户编号", required = true) private Integer userId; - @ApiModelProperty(value = "订单单号", required = true) + @Schema(title = "订单单号", required = true) private String orderNo; - @ApiModelProperty(value = "订单状态", required = true) + @Schema(title = "订单状态", required = true) private Integer orderStatus; - @ApiModelProperty(value = "备注") + @Schema(title = "备注") private String remark; - @ApiModelProperty(value = "订单结束时间") + @Schema(title = "订单结束时间") private LocalDateTime endTime; - @ApiModelProperty(value = "订单金额(总金额),单位:分", required = true) + @Schema(title = "订单金额(总金额),单位:分", required = true) private Integer buyPrice; - @ApiModelProperty(value = "优惠总金额,单位:分", required = true) + @Schema(title = "优惠总金额,单位:分", required = true) private Integer discountPrice; - @ApiModelProperty(value = "物流金额,单位:分", required = true) + @Schema(title = "物流金额,单位:分", required = true) private Integer logisticsPrice; - @ApiModelProperty(value = "最终金额,单位:分", required = true) + @Schema(title = "最终金额,单位:分", required = true) private Integer presentPrice; - @ApiModelProperty(value = "支付金额,单位:分", required = true) + @Schema(title = "支付金额,单位:分", required = true) private Integer payPrice; - @ApiModelProperty(value = "退款金额,单位:分", required = true) + @Schema(title = "退款金额,单位:分", required = true) private Integer refundPrice; - @ApiModelProperty(value = "付款时间") + @Schema(title = "付款时间") private LocalDateTime payTime; - @ApiModelProperty(value = "支付订单编号") + @Schema(title = "支付订单编号") private Integer payTransactionId; - @ApiModelProperty(value = "支付渠道") + @Schema(title = "支付渠道") private Integer payChannel; - @ApiModelProperty(value = "配送类型", required = true) + @Schema(title = "配送类型", required = true) private Integer deliveryType; - @ApiModelProperty(value = "发货时间") + @Schema(title = "发货时间") private LocalDateTime deliveryTime; - @ApiModelProperty(value = "收货时间") + @Schema(title = "收货时间") private LocalDateTime receiveTime; - @ApiModelProperty(value = "收件人名称", required = true) + @Schema(title = "收件人名称", required = true) private String receiverName; - @ApiModelProperty(value = "手机号", required = true) + @Schema(title = "手机号", required = true) private String receiverMobile; - @ApiModelProperty(value = "地区编码", required = true) + @Schema(title = "地区编码", required = true) private Integer receiverAreaCode; - @ApiModelProperty(value = "收件详细地址", required = true) + @Schema(title = "收件详细地址", required = true) private String receiverDetailAddress; - @ApiModelProperty(value = "售后状态", required = true) + @Schema(title = "售后状态", required = true) private Integer afterSaleStatus; - @ApiModelProperty(value = "优惠劵编号") + @Schema(title = "优惠劵编号") private Integer couponCardId; - @ApiModelProperty(value = "创建时间", required = true) + @Schema(title = "创建时间", required = true) private LocalDateTime createTime; /** diff --git a/yudao-module-member/yudao-module-member-biz/pom.xml b/yudao-module-member/yudao-module-member-biz/pom.xml index 11780b8a04..839ac3a889 100644 --- a/yudao-module-member/yudao-module-member-biz/pom.xml +++ b/yudao-module-member/yudao-module-member-biz/pom.xml @@ -54,6 +54,11 @@ yudao-spring-boot-starter-security + + org.springframework.boot + spring-boot-starter-validation + + cn.iocoder.boot diff --git a/yudao-module-member/yudao-module-member-biz/src/main/java/cn/iocoder/yudao/module/member/controller/app/address/AppAddressController.java b/yudao-module-member/yudao-module-member-biz/src/main/java/cn/iocoder/yudao/module/member/controller/app/address/AppAddressController.java index ee75982fac..bd65bddfd5 100644 --- a/yudao-module-member/yudao-module-member-biz/src/main/java/cn/iocoder/yudao/module/member/controller/app/address/AppAddressController.java +++ b/yudao-module-member/yudao-module-member-biz/src/main/java/cn/iocoder/yudao/module/member/controller/app/address/AppAddressController.java @@ -7,9 +7,9 @@ import cn.iocoder.yudao.module.member.controller.app.address.vo.AppAddressUpdate import cn.iocoder.yudao.module.member.convert.address.AddressConvert; import cn.iocoder.yudao.module.member.dal.dataobject.address.AddressDO; import cn.iocoder.yudao.module.member.service.address.AddressService; -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.*; @@ -20,7 +20,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 = "用户 APP - 用户收件地址") +@Tag(name = "用户 APP - 用户收件地址") @RestController @RequestMapping("/member/address") @Validated @@ -30,43 +30,43 @@ public class AppAddressController { private AddressService addressService; @PostMapping("/create") - @ApiOperation("创建用户收件地址") + @Operation(summary = "创建用户收件地址") public CommonResult createAddress(@Valid @RequestBody AppAddressCreateReqVO createReqVO) { return success(addressService.createAddress(getLoginUserId(), createReqVO)); } @PutMapping("/update") - @ApiOperation("更新用户收件地址") + @Operation(summary = "更新用户收件地址") public CommonResult updateAddress(@Valid @RequestBody AppAddressUpdateReqVO updateReqVO) { addressService.updateAddress(getLoginUserId(), updateReqVO); return success(true); } @DeleteMapping("/delete") - @ApiOperation("删除用户收件地址") - @ApiImplicitParam(name = "id", value = "编号", required = true, dataTypeClass = Long.class) + @Operation(summary = "删除用户收件地址") + @Parameter(name = "id", description = "编号", required = true) public CommonResult deleteAddress(@RequestParam("id") Long id) { addressService.deleteAddress(getLoginUserId(), id); return success(true); } @GetMapping("/get") - @ApiOperation("获得用户收件地址") - @ApiImplicitParam(name = "id", value = "编号", required = true, example = "1024", dataTypeClass = Long.class) + @Operation(summary = "获得用户收件地址") + @Parameter(name = "id", description = "编号", required = true, example = "1024") public CommonResult getAddress(@RequestParam("id") Long id) { AddressDO address = addressService.getAddress(getLoginUserId(), id); return success(AddressConvert.INSTANCE.convert(address)); } @GetMapping("/get-default") - @ApiOperation("获得默认的用户收件地址") + @Operation(summary = "获得默认的用户收件地址") public CommonResult getDefaultUserAddress() { AddressDO address = addressService.getDefaultUserAddress(getLoginUserId()); return success(AddressConvert.INSTANCE.convert(address)); } @GetMapping("/list") - @ApiOperation("获得用户收件地址列表") + @Operation(summary = "获得用户收件地址列表") public CommonResult> getAddressList() { List list = addressService.getAddressList(getLoginUserId()); return success(AddressConvert.INSTANCE.convertList(list)); diff --git a/yudao-module-member/yudao-module-member-biz/src/main/java/cn/iocoder/yudao/module/member/controller/app/address/vo/AppAddressBaseVO.java b/yudao-module-member/yudao-module-member-biz/src/main/java/cn/iocoder/yudao/module/member/controller/app/address/vo/AppAddressBaseVO.java index 8cfbac7d24..e82f78ea32 100644 --- a/yudao-module-member/yudao-module-member-biz/src/main/java/cn/iocoder/yudao/module/member/controller/app/address/vo/AppAddressBaseVO.java +++ b/yudao-module-member/yudao-module-member-biz/src/main/java/cn/iocoder/yudao/module/member/controller/app/address/vo/AppAddressBaseVO.java @@ -1,6 +1,5 @@ package cn.iocoder.yudao.module.member.controller.app.address.vo; - -import io.swagger.annotations.ApiModelProperty; +import io.swagger.v3.oas.annotations.media.Schema; import lombok.Data; import javax.validation.constraints.NotEmpty; @@ -13,27 +12,27 @@ import javax.validation.constraints.NotNull; @Data public class AppAddressBaseVO { - @ApiModelProperty(value = "收件人名称", required = true) + @Schema(title = "收件人名称", required = true) @NotNull(message = "收件人名称不能为空") private String name; - @ApiModelProperty(value = "手机号", required = true) + @Schema(title = "手机号", required = true) @NotNull(message = "手机号不能为空") private String mobile; - @ApiModelProperty(value = "地区编号", required = true) + @Schema(title = "地区编号", required = true) @NotNull(message = "地区编号不能为空") private Long areaId; - @ApiModelProperty(value = "邮编", required = true) + @Schema(title = "邮编", required = true) @NotEmpty(message = "邮编不能为空") private String postCode; - @ApiModelProperty(value = "收件详细地址", required = true) + @Schema(title = "收件详细地址", required = true) @NotNull(message = "收件详细地址不能为空") private String detailAddress; - @ApiModelProperty(value = "是否默认地址", required = true) + @Schema(title = "是否默认地址", required = true) @NotNull(message = "是否默认地址不能为空") private Boolean defaulted; diff --git a/yudao-module-member/yudao-module-member-biz/src/main/java/cn/iocoder/yudao/module/member/controller/app/address/vo/AppAddressCreateReqVO.java b/yudao-module-member/yudao-module-member-biz/src/main/java/cn/iocoder/yudao/module/member/controller/app/address/vo/AppAddressCreateReqVO.java index 31fd89fa34..deaa7da872 100644 --- a/yudao-module-member/yudao-module-member-biz/src/main/java/cn/iocoder/yudao/module/member/controller/app/address/vo/AppAddressCreateReqVO.java +++ b/yudao-module-member/yudao-module-member-biz/src/main/java/cn/iocoder/yudao/module/member/controller/app/address/vo/AppAddressCreateReqVO.java @@ -1,11 +1,8 @@ package cn.iocoder.yudao.module.member.controller.app.address.vo; - +import io.swagger.v3.oas.annotations.media.Schema; import lombok.*; -import java.util.*; -import io.swagger.annotations.*; -import javax.validation.constraints.*; -@ApiModel("用户 APP - 用户收件地址创建 Request VO") +@Schema(title = "用户 APP - 用户收件地址创建 Request VO") @Data @EqualsAndHashCode(callSuper = true) @ToString(callSuper = true) diff --git a/yudao-module-member/yudao-module-member-biz/src/main/java/cn/iocoder/yudao/module/member/controller/app/address/vo/AppAddressRespVO.java b/yudao-module-member/yudao-module-member-biz/src/main/java/cn/iocoder/yudao/module/member/controller/app/address/vo/AppAddressRespVO.java index 0ba231e9f3..0acc49b7ba 100644 --- a/yudao-module-member/yudao-module-member-biz/src/main/java/cn/iocoder/yudao/module/member/controller/app/address/vo/AppAddressRespVO.java +++ b/yudao-module-member/yudao-module-member-biz/src/main/java/cn/iocoder/yudao/module/member/controller/app/address/vo/AppAddressRespVO.java @@ -1,19 +1,18 @@ package cn.iocoder.yudao.module.member.controller.app.address.vo; - +import io.swagger.v3.oas.annotations.media.Schema; import lombok.*; import java.time.LocalDateTime; -import io.swagger.annotations.*; -@ApiModel("用户 APP - 用户收件地址 Response VO") +@Schema(title = "用户 APP - 用户收件地址 Response VO") @Data @EqualsAndHashCode(callSuper = true) @ToString(callSuper = true) public class AppAddressRespVO extends AppAddressBaseVO { - @ApiModelProperty(value = "编号", required = true) + @Schema(title = "编号", required = true) private Long id; - @ApiModelProperty(value = "创建时间", required = true) + @Schema(title = "创建时间", required = true) private LocalDateTime createTime; } diff --git a/yudao-module-member/yudao-module-member-biz/src/main/java/cn/iocoder/yudao/module/member/controller/app/address/vo/AppAddressUpdateReqVO.java b/yudao-module-member/yudao-module-member-biz/src/main/java/cn/iocoder/yudao/module/member/controller/app/address/vo/AppAddressUpdateReqVO.java index b4100c76a9..c93d1dbc2a 100644 --- a/yudao-module-member/yudao-module-member-biz/src/main/java/cn/iocoder/yudao/module/member/controller/app/address/vo/AppAddressUpdateReqVO.java +++ b/yudao-module-member/yudao-module-member-biz/src/main/java/cn/iocoder/yudao/module/member/controller/app/address/vo/AppAddressUpdateReqVO.java @@ -1,17 +1,15 @@ package cn.iocoder.yudao.module.member.controller.app.address.vo; - +import io.swagger.v3.oas.annotations.media.Schema; import lombok.*; -import java.util.*; -import io.swagger.annotations.*; import javax.validation.constraints.*; -@ApiModel("用户 APP - 用户收件地址更新 Request VO") +@Schema(title = "用户 APP - 用户收件地址更新 Request VO") @Data @EqualsAndHashCode(callSuper = true) @ToString(callSuper = true) public class AppAddressUpdateReqVO extends AppAddressBaseVO { - @ApiModelProperty(value = "编号", required = true) + @Schema(title = "编号", required = true) @NotNull(message = "编号不能为空") private Long id; diff --git a/yudao-module-member/yudao-module-member-biz/src/main/java/cn/iocoder/yudao/module/member/controller/app/auth/AppAuthController.java b/yudao-module-member/yudao-module-member-biz/src/main/java/cn/iocoder/yudao/module/member/controller/app/auth/AppAuthController.java index fadd207337..0a9f69bc93 100644 --- a/yudao-module-member/yudao-module-member-biz/src/main/java/cn/iocoder/yudao/module/member/controller/app/auth/AppAuthController.java +++ b/yudao-module-member/yudao-module-member-biz/src/main/java/cn/iocoder/yudao/module/member/controller/app/auth/AppAuthController.java @@ -8,10 +8,10 @@ import cn.iocoder.yudao.framework.security.core.annotations.PreAuthenticated; import cn.iocoder.yudao.framework.security.core.util.SecurityFrameworkUtils; import cn.iocoder.yudao.module.member.controller.app.auth.vo.*; import cn.iocoder.yudao.module.member.service.auth.MemberAuthService; -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.*; @@ -24,7 +24,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 = "用户 APP - 认证") +@Tag(name = "用户 APP - 认证") @RestController @RequestMapping("/member/auth") @Validated @@ -38,14 +38,14 @@ public class AppAuthController { private SecurityProperties securityProperties; @PostMapping("/login") - @ApiOperation("使用手机 + 密码登录") + @Operation(summary = "使用手机 + 密码登录") public CommonResult login(@RequestBody @Valid AppAuthLoginReqVO reqVO) { return success(authService.login(reqVO)); } @PostMapping("/logout") @PermitAll - @ApiOperation("登出系统") + @Operation(summary = "登出系统") public CommonResult logout(HttpServletRequest request) { String token = SecurityFrameworkUtils.obtainAuthorization(request, securityProperties.getTokenHeader()); if (StrUtil.isNotBlank(token)) { @@ -55,8 +55,8 @@ public class AppAuthController { } @PostMapping("/refresh-token") - @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)); @@ -65,20 +65,20 @@ public class AppAuthController { // ========== 短信登录相关 ========== @PostMapping("/sms-login") - @ApiOperation("使用手机 + 验证码登录") + @Operation(summary = "使用手机 + 验证码登录") public CommonResult smsLogin(@RequestBody @Valid AppAuthSmsLoginReqVO reqVO) { return success(authService.smsLogin(reqVO)); } @PostMapping("/send-sms-code") - @ApiOperation(value = "发送手机验证码") + @Operation(summary = "发送手机验证码") public CommonResult sendSmsCode(@RequestBody @Valid AppAuthSmsSendReqVO reqVO) { authService.sendSmsCode(getLoginUserId(), reqVO); return success(true); } @PostMapping("/reset-password") - @ApiOperation(value = "重置密码", notes = "用户忘记密码时使用") + @Operation(summary = "重置密码", description = "用户忘记密码时使用") @PreAuthenticated public CommonResult resetPassword(@RequestBody @Valid AppAuthResetPasswordReqVO reqVO) { authService.resetPassword(reqVO); @@ -86,7 +86,7 @@ public class AppAuthController { } @PostMapping("/update-password") - @ApiOperation(value = "修改用户密码",notes = "用户修改密码时使用") + @Operation(summary = "修改用户密码",description = "用户修改密码时使用") @PreAuthenticated public CommonResult updatePassword(@RequestBody @Valid AppAuthUpdatePasswordReqVO reqVO) { authService.updatePassword(getLoginUserId(), reqVO); @@ -96,10 +96,10 @@ public class AppAuthController { // ========== 社交登录相关 ========== @GetMapping("/social-auth-redirect") - @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 socialAuthRedirect(@RequestParam("type") Integer type, @RequestParam("redirectUri") String redirectUri) { @@ -107,13 +107,13 @@ public class AppAuthController { } @PostMapping("/social-login") - @ApiOperation(value = "社交快捷登录,使用 code 授权码", notes = "适合未登录的用户,但是社交账号已绑定用户") + @Operation(summary = "社交快捷登录,使用 code 授权码", description = "适合未登录的用户,但是社交账号已绑定用户") public CommonResult socialLogin(@RequestBody @Valid AppAuthSocialLoginReqVO reqVO) { return success(authService.socialLogin(reqVO)); } @PostMapping("/weixin-mini-app-login") - @ApiOperation("微信小程序的一键登录") + @Operation(summary = "微信小程序的一键登录") public CommonResult weixinMiniAppLogin(@RequestBody @Valid AppAuthWeixinMiniAppLoginReqVO reqVO) { return success(authService.weixinMiniAppLogin(reqVO)); } diff --git a/yudao-module-member/yudao-module-member-biz/src/main/java/cn/iocoder/yudao/module/member/controller/app/auth/vo/AppAuthCheckCodeReqVO.java b/yudao-module-member/yudao-module-member-biz/src/main/java/cn/iocoder/yudao/module/member/controller/app/auth/vo/AppAuthCheckCodeReqVO.java index dd050147e4..8cdd0fcd6a 100644 --- a/yudao-module-member/yudao-module-member-biz/src/main/java/cn/iocoder/yudao/module/member/controller/app/auth/vo/AppAuthCheckCodeReqVO.java +++ b/yudao-module-member/yudao-module-member-biz/src/main/java/cn/iocoder/yudao/module/member/controller/app/auth/vo/AppAuthCheckCodeReqVO.java @@ -3,8 +3,7 @@ package cn.iocoder.yudao.module.member.controller.app.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 lombok.AllArgsConstructor; import lombok.Builder; import lombok.Data; @@ -16,25 +15,25 @@ import javax.validation.constraints.NotNull; import javax.validation.constraints.Pattern; // TODO 芋艿:code review 相关逻辑 -@ApiModel("用户 APP - 校验验证码 Request VO") +@Schema(title = "用户 APP - 校验验证码 Request VO") @Data @NoArgsConstructor @AllArgsConstructor @Builder public class AppAuthCheckCodeReqVO { - @ApiModelProperty(value = "手机号", example = "15601691234") + @Schema(title = "手机号", example = "15601691234") @NotBlank(message = "手机号不能为空") @Mobile private String mobile; - @ApiModelProperty(value = "手机验证码", required = true, example = "1024") + @Schema(title = "手机验证码", required = true, example = "1024") @NotBlank(message = "手机验证码不能为空") @Length(min = 4, max = 6, message = "手机验证码长度为 4-6 位") @Pattern(regexp = "^[0-9]+$", message = "手机验证码必须都是数字") private String code; - @ApiModelProperty(value = "发送场景", example = "1", notes = "对应 SmsSceneEnum 枚举") + @Schema(title = "发送场景", example = "1", description = "对应 SmsSceneEnum 枚举") @NotNull(message = "发送场景不能为空") @InEnum(SmsSceneEnum.class) private Integer scene; diff --git a/yudao-module-member/yudao-module-member-biz/src/main/java/cn/iocoder/yudao/module/member/controller/app/auth/vo/AppAuthLoginReqVO.java b/yudao-module-member/yudao-module-member-biz/src/main/java/cn/iocoder/yudao/module/member/controller/app/auth/vo/AppAuthLoginReqVO.java index d8fe3940f9..9c347b9907 100644 --- a/yudao-module-member/yudao-module-member-biz/src/main/java/cn/iocoder/yudao/module/member/controller/app/auth/vo/AppAuthLoginReqVO.java +++ b/yudao-module-member/yudao-module-member-biz/src/main/java/cn/iocoder/yudao/module/member/controller/app/auth/vo/AppAuthLoginReqVO.java @@ -4,8 +4,7 @@ import cn.hutool.core.util.StrUtil; import cn.iocoder.yudao.framework.common.validation.InEnum; import cn.iocoder.yudao.framework.common.validation.Mobile; 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 lombok.AllArgsConstructor; import lombok.Builder; import lombok.Data; @@ -15,33 +14,33 @@ import org.hibernate.validator.constraints.Length; import javax.validation.constraints.AssertTrue; import javax.validation.constraints.NotEmpty; -@ApiModel(value = "用户 APP - 手机 + 密码登录 Request VO", description = "如果登录并绑定社交用户,需要传递 social 开头的参数") +@Schema(title = "用户 APP - 手机 + 密码登录 Request VO", description = "如果登录并绑定社交用户,需要传递 social 开头的参数") @Data @NoArgsConstructor @AllArgsConstructor @Builder public class AppAuthLoginReqVO { - @ApiModelProperty(value = "手机号", required = true, example = "15601691300") + @Schema(title = "手机号", required = true, example = "15601691300") @NotEmpty(message = "手机号不能为空") @Mobile private String mobile; - @ApiModelProperty(value = "密码", required = true, example = "buzhidao") + @Schema(title = "密码", required = true, example = "buzhidao") @NotEmpty(message = "密码不能为空") @Length(min = 4, max = 16, message = "密码长度为 4-16 位") private String password; // ========== 绑定社交登录时,需要传递如下参数 ========== - @ApiModelProperty(value = "社交平台的类型", required = true, example = "10", notes = "参见 SysUserSocialTypeEnum 枚举值") + @Schema(title = "社交平台的类型", required = true, example = "10", description = "参见 SysUserSocialTypeEnum 枚举值") @InEnum(SocialTypeEnum.class) private Integer socialType; - @ApiModelProperty(value = "授权码", required = true, example = "1024") + @Schema(title = "授权码", required = true, example = "1024") private String socialCode; - @ApiModelProperty(value = "state", required = true, example = "9b2ffbc1-7425-4155-9894-9d5c08541d62") + @Schema(title = "state", required = true, example = "9b2ffbc1-7425-4155-9894-9d5c08541d62") private String socialState; @AssertTrue(message = "授权码不能为空") diff --git a/yudao-module-member/yudao-module-member-biz/src/main/java/cn/iocoder/yudao/module/member/controller/app/auth/vo/AppAuthLoginRespVO.java b/yudao-module-member/yudao-module-member-biz/src/main/java/cn/iocoder/yudao/module/member/controller/app/auth/vo/AppAuthLoginRespVO.java index ebd1ea35cd..734c015918 100644 --- a/yudao-module-member/yudao-module-member-biz/src/main/java/cn/iocoder/yudao/module/member/controller/app/auth/vo/AppAuthLoginRespVO.java +++ b/yudao-module-member/yudao-module-member-biz/src/main/java/cn/iocoder/yudao/module/member/controller/app/auth/vo/AppAuthLoginRespVO.java @@ -1,7 +1,6 @@ package cn.iocoder.yudao.module.member.controller.app.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,23 +8,23 @@ import lombok.NoArgsConstructor; import java.time.LocalDateTime; -@ApiModel("用户 APP - 登录 Response VO") +@Schema(title = "用户 APP - 登录 Response VO") @Data @NoArgsConstructor @AllArgsConstructor @Builder public class AppAuthLoginRespVO { - @ApiModelProperty(value = "用户编号", required = true, example = "1024") + @Schema(title = "用户编号", required = true, example = "1024") private Long userId; - @ApiModelProperty(value = "访问令牌", required = true, example = "happy") + @Schema(title = "访问令牌", required = true, example = "happy") private String accessToken; - @ApiModelProperty(value = "刷新令牌", required = true, example = "nice") + @Schema(title = "刷新令牌", required = true, example = "nice") private String refreshToken; - @ApiModelProperty(value = "过期时间", required = true) + @Schema(title = "过期时间", required = true) private LocalDateTime expiresTime; } diff --git a/yudao-module-member/yudao-module-member-biz/src/main/java/cn/iocoder/yudao/module/member/controller/app/auth/vo/AppAuthResetPasswordReqVO.java b/yudao-module-member/yudao-module-member-biz/src/main/java/cn/iocoder/yudao/module/member/controller/app/auth/vo/AppAuthResetPasswordReqVO.java index a6d6ebea4f..0be071a84b 100644 --- a/yudao-module-member/yudao-module-member-biz/src/main/java/cn/iocoder/yudao/module/member/controller/app/auth/vo/AppAuthResetPasswordReqVO.java +++ b/yudao-module-member/yudao-module-member-biz/src/main/java/cn/iocoder/yudao/module/member/controller/app/auth/vo/AppAuthResetPasswordReqVO.java @@ -1,8 +1,7 @@ package cn.iocoder.yudao.module.member.controller.app.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 lombok.AllArgsConstructor; import lombok.Builder; import lombok.Data; @@ -14,25 +13,25 @@ import javax.validation.constraints.NotEmpty; import javax.validation.constraints.Pattern; // TODO 芋艿:code review 相关逻辑 -@ApiModel("用户 APP - 重置密码 Request VO") +@Schema(title = "用户 APP - 重置密码 Request VO") @Data @NoArgsConstructor @AllArgsConstructor @Builder public class AppAuthResetPasswordReqVO { - @ApiModelProperty(value = "新密码", required = true, example = "buzhidao") + @Schema(title = "新密码", required = true, example = "buzhidao") @NotEmpty(message = "新密码不能为空") @Length(min = 4, max = 16, message = "密码长度为 4-16 位") private String password; - @ApiModelProperty(value = "手机验证码", required = true, example = "1024") + @Schema(title = "手机验证码", required = true, example = "1024") @NotEmpty(message = "手机验证码不能为空") @Length(min = 4, max = 6, message = "手机验证码长度为 4-6 位") @Pattern(regexp = "^[0-9]+$", message = "手机验证码必须都是数字") private String code; - @ApiModelProperty(value = "手机号",required = true,example = "15878962356") + @Schema(title = "手机号",required = true,example = "15878962356") @NotBlank(message = "手机号不能为空") @Mobile private String mobile; diff --git a/yudao-module-member/yudao-module-member-biz/src/main/java/cn/iocoder/yudao/module/member/controller/app/auth/vo/AppAuthSmsLoginReqVO.java b/yudao-module-member/yudao-module-member-biz/src/main/java/cn/iocoder/yudao/module/member/controller/app/auth/vo/AppAuthSmsLoginReqVO.java index dd6de5d591..256a594520 100644 --- a/yudao-module-member/yudao-module-member-biz/src/main/java/cn/iocoder/yudao/module/member/controller/app/auth/vo/AppAuthSmsLoginReqVO.java +++ b/yudao-module-member/yudao-module-member-biz/src/main/java/cn/iocoder/yudao/module/member/controller/app/auth/vo/AppAuthSmsLoginReqVO.java @@ -4,8 +4,7 @@ import cn.hutool.core.util.StrUtil; import cn.iocoder.yudao.framework.common.validation.InEnum; import cn.iocoder.yudao.framework.common.validation.Mobile; 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 lombok.AllArgsConstructor; import lombok.Builder; import lombok.Data; @@ -16,19 +15,19 @@ import javax.validation.constraints.AssertTrue; import javax.validation.constraints.NotEmpty; import javax.validation.constraints.Pattern; -@ApiModel(value = "用户 APP - 手机 + 验证码登录 Request VO", description = "如果登录并绑定社交用户,需要传递 social 开头的参数") +@Schema(title = "用户 APP - 手机 + 验证码登录 Request VO", description = "如果登录并绑定社交用户,需要传递 social 开头的参数") @Data @NoArgsConstructor @AllArgsConstructor @Builder public class AppAuthSmsLoginReqVO { - @ApiModelProperty(value = "手机号", required = true, example = "15601691300") + @Schema(title = "手机号", required = true, example = "15601691300") @NotEmpty(message = "手机号不能为空") @Mobile private String mobile; - @ApiModelProperty(value = "手机验证码", required = true, example = "1024") + @Schema(title = "手机验证码", required = true, example = "1024") @NotEmpty(message = "手机验证码不能为空") @Length(min = 4, max = 6, message = "手机验证码长度为 4-6 位") @Pattern(regexp = "^[0-9]+$", message = "手机验证码必须都是数字") @@ -36,14 +35,14 @@ public class AppAuthSmsLoginReqVO { // ========== 绑定社交登录时,需要传递如下参数 ========== - @ApiModelProperty(value = "社交平台的类型", required = true, example = "10", notes = "参见 SysUserSocialTypeEnum 枚举值") + @Schema(title = "社交平台的类型", required = true, example = "10", description = "参见 SysUserSocialTypeEnum 枚举值") @InEnum(SocialTypeEnum.class) private Integer socialType; - @ApiModelProperty(value = "授权码", required = true, example = "1024") + @Schema(title = "授权码", required = true, example = "1024") private String socialCode; - @ApiModelProperty(value = "state", required = true, example = "9b2ffbc1-7425-4155-9894-9d5c08541d62") + @Schema(title = "state", required = true, example = "9b2ffbc1-7425-4155-9894-9d5c08541d62") private String socialState; @AssertTrue(message = "授权码不能为空") diff --git a/yudao-module-member/yudao-module-member-biz/src/main/java/cn/iocoder/yudao/module/member/controller/app/auth/vo/AppAuthSmsSendReqVO.java b/yudao-module-member/yudao-module-member-biz/src/main/java/cn/iocoder/yudao/module/member/controller/app/auth/vo/AppAuthSmsSendReqVO.java index cd051f8c33..aaf4e30c76 100644 --- a/yudao-module-member/yudao-module-member-biz/src/main/java/cn/iocoder/yudao/module/member/controller/app/auth/vo/AppAuthSmsSendReqVO.java +++ b/yudao-module-member/yudao-module-member-biz/src/main/java/cn/iocoder/yudao/module/member/controller/app/auth/vo/AppAuthSmsSendReqVO.java @@ -3,23 +3,22 @@ package cn.iocoder.yudao.module.member.controller.app.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 lombok.Data; import lombok.experimental.Accessors; import javax.validation.constraints.NotNull; -@ApiModel("用户 APP - 发送手机验证码 Request VO") +@Schema(title = "用户 APP - 发送手机验证码 Request VO") @Data @Accessors(chain = true) public class AppAuthSmsSendReqVO { - @ApiModelProperty(value = "手机号", example = "15601691234") + @Schema(title = "手机号", example = "15601691234") @Mobile private String mobile; - @ApiModelProperty(value = "发送场景", example = "1", notes = "对应 SmsSceneEnum 枚举") + @Schema(title = "发送场景", example = "1", description = "对应 SmsSceneEnum 枚举") @NotNull(message = "发送场景不能为空") @InEnum(SmsSceneEnum.class) private Integer scene; diff --git a/yudao-module-member/yudao-module-member-biz/src/main/java/cn/iocoder/yudao/module/member/controller/app/auth/vo/AppAuthSocialLoginReqVO.java b/yudao-module-member/yudao-module-member-biz/src/main/java/cn/iocoder/yudao/module/member/controller/app/auth/vo/AppAuthSocialLoginReqVO.java index 7a5856d671..2370179622 100644 --- a/yudao-module-member/yudao-module-member-biz/src/main/java/cn/iocoder/yudao/module/member/controller/app/auth/vo/AppAuthSocialLoginReqVO.java +++ b/yudao-module-member/yudao-module-member-biz/src/main/java/cn/iocoder/yudao/module/member/controller/app/auth/vo/AppAuthSocialLoginReqVO.java @@ -2,8 +2,7 @@ package cn.iocoder.yudao.module.member.controller.app.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 lombok.AllArgsConstructor; import lombok.Builder; import lombok.Data; @@ -12,23 +11,23 @@ import lombok.NoArgsConstructor; import javax.validation.constraints.NotEmpty; import javax.validation.constraints.NotNull; -@ApiModel("用户 APP - 社交快捷登录 Request VO,使用 code 授权码") +@Schema(title = "用户 APP - 社交快捷登录 Request VO,使用 code 授权码") @Data @NoArgsConstructor @AllArgsConstructor @Builder public class AppAuthSocialLoginReqVO { - @ApiModelProperty(value = "社交平台的类型", required = true, example = "10", notes = "参见 SysUserSocialTypeEnum 枚举值") + @Schema(title = "社交平台的类型", required = true, example = "10", description = "参见 SysUserSocialTypeEnum 枚举值") @InEnum(SocialTypeEnum.class) @NotNull(message = "社交平台的类型不能为空") private Integer type; - @ApiModelProperty(value = "授权码", required = true, example = "1024") + @Schema(title = "授权码", required = true, example = "1024") @NotEmpty(message = "授权码不能为空") private String code; - @ApiModelProperty(value = "state", required = true, example = "9b2ffbc1-7425-4155-9894-9d5c08541d62") + @Schema(title = "state", required = true, example = "9b2ffbc1-7425-4155-9894-9d5c08541d62") @NotEmpty(message = "state 不能为空") private String state; diff --git a/yudao-module-member/yudao-module-member-biz/src/main/java/cn/iocoder/yudao/module/member/controller/app/auth/vo/AppAuthUpdatePasswordReqVO.java b/yudao-module-member/yudao-module-member-biz/src/main/java/cn/iocoder/yudao/module/member/controller/app/auth/vo/AppAuthUpdatePasswordReqVO.java index 9addb10460..d1926c9bbe 100644 --- a/yudao-module-member/yudao-module-member-biz/src/main/java/cn/iocoder/yudao/module/member/controller/app/auth/vo/AppAuthUpdatePasswordReqVO.java +++ b/yudao-module-member/yudao-module-member-biz/src/main/java/cn/iocoder/yudao/module/member/controller/app/auth/vo/AppAuthUpdatePasswordReqVO.java @@ -1,7 +1,6 @@ package cn.iocoder.yudao.module.member.controller.app.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; @@ -12,19 +11,19 @@ import javax.validation.constraints.NotBlank; import javax.validation.constraints.NotEmpty; // TODO 芋艿:code review 相关逻辑 -@ApiModel("用户 APP - 修改密码 Request VO") +@Schema(title = "用户 APP - 修改密码 Request VO") @Data @NoArgsConstructor @AllArgsConstructor @Builder public class AppAuthUpdatePasswordReqVO { - @ApiModelProperty(value = "用户旧密码", required = true, example = "123456") + @Schema(title = "用户旧密码", required = true, example = "123456") @NotBlank(message = "旧密码不能为空") @Length(min = 4, max = 16, message = "密码长度为 4-16 位") private String oldPassword; - @ApiModelProperty(value = "新密码", required = true, example = "buzhidao") + @Schema(title = "新密码", required = true, example = "buzhidao") @NotEmpty(message = "新密码不能为空") @Length(min = 4, max = 16, message = "密码长度为 4-16 位") private String password; diff --git a/yudao-module-member/yudao-module-member-biz/src/main/java/cn/iocoder/yudao/module/member/controller/app/auth/vo/AppAuthWeixinMiniAppLoginReqVO.java b/yudao-module-member/yudao-module-member-biz/src/main/java/cn/iocoder/yudao/module/member/controller/app/auth/vo/AppAuthWeixinMiniAppLoginReqVO.java index bd34085b2a..5245507a67 100644 --- a/yudao-module-member/yudao-module-member-biz/src/main/java/cn/iocoder/yudao/module/member/controller/app/auth/vo/AppAuthWeixinMiniAppLoginReqVO.java +++ b/yudao-module-member/yudao-module-member-biz/src/main/java/cn/iocoder/yudao/module/member/controller/app/auth/vo/AppAuthWeixinMiniAppLoginReqVO.java @@ -1,7 +1,6 @@ package cn.iocoder.yudao.module.member.controller.app.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,18 +8,18 @@ import lombok.NoArgsConstructor; import javax.validation.constraints.NotEmpty; -@ApiModel("用户 APP - 微信小程序手机登录 Request VO") +@Schema(title = "用户 APP - 微信小程序手机登录 Request VO") @Data @NoArgsConstructor @AllArgsConstructor @Builder public class AppAuthWeixinMiniAppLoginReqVO { - @ApiModelProperty(value = "手机 code", required = true, example = "hello", notes = "小程序通过 wx.getPhoneNumber 方法获得") + @Schema(title = "手机 code", required = true, example = "hello", description = "小程序通过 wx.getPhoneNumber 方法获得") @NotEmpty(message = "手机 code 不能为空") private String phoneCode; - @ApiModelProperty(value = "登录 code", required = true, example = "word", notes = "小程序通过 wx.login 方法获得") + @Schema(title = "登录 code", required = true, example = "word", description = "小程序通过 wx.login 方法获得") @NotEmpty(message = "登录 code 不能为空") private String loginCode; diff --git a/yudao-module-member/yudao-module-member-biz/src/main/java/cn/iocoder/yudao/module/member/controller/app/social/AppSocialUserController.java b/yudao-module-member/yudao-module-member-biz/src/main/java/cn/iocoder/yudao/module/member/controller/app/social/AppSocialUserController.java index d5dac93e67..fb22a4224e 100644 --- a/yudao-module-member/yudao-module-member-biz/src/main/java/cn/iocoder/yudao/module/member/controller/app/social/AppSocialUserController.java +++ b/yudao-module-member/yudao-module-member-biz/src/main/java/cn/iocoder/yudao/module/member/controller/app/social/AppSocialUserController.java @@ -6,8 +6,8 @@ import cn.iocoder.yudao.module.member.controller.app.social.vo.AppSocialUserBind import cn.iocoder.yudao.module.member.controller.app.social.vo.AppSocialUserUnbindReqVO; import cn.iocoder.yudao.module.member.convert.social.SocialUserConvert; import cn.iocoder.yudao.module.system.api.social.SocialUserApi; -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 = "用户 App - 社交用户") +@Tag(name = "用户 App - 社交用户") @RestController @RequestMapping("/system/social-user") @Validated @@ -26,14 +26,14 @@ public class AppSocialUserController { private SocialUserApi socialUserApi; @PostMapping("/bind") - @ApiOperation("社交绑定,使用 code 授权码") + @Operation(summary = "社交绑定,使用 code 授权码") public CommonResult socialBind(@RequestBody @Valid AppSocialUserBindReqVO reqVO) { socialUserApi.bindSocialUser(SocialUserConvert.INSTANCE.convert(getLoginUserId(), UserTypeEnum.MEMBER.getValue(), reqVO)); return CommonResult.success(true); } @DeleteMapping("/unbind") - @ApiOperation("取消社交绑定") + @Operation(summary = "取消社交绑定") public CommonResult socialUnbind(@RequestBody AppSocialUserUnbindReqVO reqVO) { socialUserApi.unbindSocialUser(SocialUserConvert.INSTANCE.convert(getLoginUserId(), UserTypeEnum.MEMBER.getValue(), reqVO)); return CommonResult.success(true); diff --git a/yudao-module-member/yudao-module-member-biz/src/main/java/cn/iocoder/yudao/module/member/controller/app/social/vo/AppSocialUserBindReqVO.java b/yudao-module-member/yudao-module-member-biz/src/main/java/cn/iocoder/yudao/module/member/controller/app/social/vo/AppSocialUserBindReqVO.java index f3fcd0bb08..d1fde4e565 100644 --- a/yudao-module-member/yudao-module-member-biz/src/main/java/cn/iocoder/yudao/module/member/controller/app/social/vo/AppSocialUserBindReqVO.java +++ b/yudao-module-member/yudao-module-member-biz/src/main/java/cn/iocoder/yudao/module/member/controller/app/social/vo/AppSocialUserBindReqVO.java @@ -2,8 +2,7 @@ package cn.iocoder.yudao.module.member.controller.app.social.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 lombok.AllArgsConstructor; import lombok.Builder; import lombok.Data; @@ -12,23 +11,23 @@ import lombok.NoArgsConstructor; import javax.validation.constraints.NotEmpty; import javax.validation.constraints.NotNull; -@ApiModel("用户 APP - 社交绑定 Request VO,使用 code 授权码") +@Schema(title = "用户 APP - 社交绑定 Request VO,使用 code 授权码") @Data @NoArgsConstructor @AllArgsConstructor @Builder public class AppSocialUserBindReqVO { - @ApiModelProperty(value = "社交平台的类型", required = true, example = "10", notes = "参见 SysUserSocialTypeEnum 枚举值") + @Schema(title = "社交平台的类型", required = true, example = "10", description = "参见 SysUserSocialTypeEnum 枚举值") @InEnum(SocialTypeEnum.class) @NotNull(message = "社交平台的类型不能为空") private Integer type; - @ApiModelProperty(value = "授权码", required = true, example = "1024") + @Schema(title = "授权码", required = true, example = "1024") @NotEmpty(message = "授权码不能为空") private String code; - @ApiModelProperty(value = "state", required = true, example = "9b2ffbc1-7425-4155-9894-9d5c08541d62") + @Schema(title = "state", required = true, example = "9b2ffbc1-7425-4155-9894-9d5c08541d62") @NotEmpty(message = "state 不能为空") private String state; diff --git a/yudao-module-member/yudao-module-member-biz/src/main/java/cn/iocoder/yudao/module/member/controller/app/social/vo/AppSocialUserUnbindReqVO.java b/yudao-module-member/yudao-module-member-biz/src/main/java/cn/iocoder/yudao/module/member/controller/app/social/vo/AppSocialUserUnbindReqVO.java index 195238adc2..5783983fe7 100644 --- a/yudao-module-member/yudao-module-member-biz/src/main/java/cn/iocoder/yudao/module/member/controller/app/social/vo/AppSocialUserUnbindReqVO.java +++ b/yudao-module-member/yudao-module-member-biz/src/main/java/cn/iocoder/yudao/module/member/controller/app/social/vo/AppSocialUserUnbindReqVO.java @@ -2,8 +2,7 @@ package cn.iocoder.yudao.module.member.controller.app.social.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 lombok.AllArgsConstructor; import lombok.Builder; import lombok.Data; @@ -12,19 +11,19 @@ import lombok.NoArgsConstructor; import javax.validation.constraints.NotEmpty; import javax.validation.constraints.NotNull; -@ApiModel("用户 APP - 取消社交绑定 Request VO") +@Schema(title = "用户 APP - 取消社交绑定 Request VO") @Data @NoArgsConstructor @AllArgsConstructor @Builder public class AppSocialUserUnbindReqVO { - @ApiModelProperty(value = "社交平台的类型", required = true, example = "10", notes = "参见 SysUserSocialTypeEnum 枚举值") + @Schema(title = "社交平台的类型", required = true, example = "10", description = "参见 SysUserSocialTypeEnum 枚举值") @InEnum(SocialTypeEnum.class) @NotNull(message = "社交平台的类型不能为空") private Integer type; - @ApiModelProperty(value = "社交用户的 openid", required = true, example = "IPRmJ0wvBptiPIlGEZiPewGwiEiE") + @Schema(title = "社交用户的 openid", required = true, example = "IPRmJ0wvBptiPIlGEZiPewGwiEiE") @NotEmpty(message = "社交用户的 openid 不能为空") private String openid; diff --git a/yudao-module-member/yudao-module-member-biz/src/main/java/cn/iocoder/yudao/module/member/controller/app/user/AppUserController.java b/yudao-module-member/yudao-module-member-biz/src/main/java/cn/iocoder/yudao/module/member/controller/app/user/AppUserController.java index 4eec2893f8..95b1a227a4 100644 --- a/yudao-module-member/yudao-module-member-biz/src/main/java/cn/iocoder/yudao/module/member/controller/app/user/AppUserController.java +++ b/yudao-module-member/yudao-module-member-biz/src/main/java/cn/iocoder/yudao/module/member/controller/app/user/AppUserController.java @@ -7,8 +7,8 @@ import cn.iocoder.yudao.module.member.controller.app.user.vo.AppUserUpdateMobile import cn.iocoder.yudao.module.member.convert.user.UserConvert; import cn.iocoder.yudao.module.member.dal.dataobject.user.MemberUserDO; import cn.iocoder.yudao.module.member.service.user.MemberUserService; -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.*; @@ -22,7 +22,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 = "用户 APP - 用户个人中心") +@Tag(name = "用户 APP - 用户个人中心") @RestController @RequestMapping("/member/user") @Validated @@ -33,7 +33,7 @@ public class AppUserController { private MemberUserService userService; @PutMapping("/update-nickname") - @ApiOperation("修改用户昵称") + @Operation(summary = "修改用户昵称") @PreAuthenticated public CommonResult updateUserNickname(@RequestParam("nickname") String nickname) { userService.updateUserNickname(getLoginUserId(), nickname); @@ -41,7 +41,7 @@ public class AppUserController { } @PostMapping("/update-avatar") - @ApiOperation("修改用户头像") + @Operation(summary = "修改用户头像") @PreAuthenticated public CommonResult updateUserAvatar(@RequestParam("avatarFile") MultipartFile file) throws Exception { if (file.isEmpty()) { @@ -52,7 +52,7 @@ public class AppUserController { } @GetMapping("/get") - @ApiOperation("获得基本信息") + @Operation(summary = "获得基本信息") @PreAuthenticated public CommonResult getUserInfo() { MemberUserDO user = userService.getUser(getLoginUserId()); @@ -60,7 +60,7 @@ public class AppUserController { } @PostMapping("/update-mobile") - @ApiOperation(value = "修改用户手机") + @Operation(summary = "修改用户手机") @PreAuthenticated public CommonResult updateMobile(@RequestBody @Valid AppUserUpdateMobileReqVO reqVO) { userService.updateUserMobile(getLoginUserId(), reqVO); diff --git a/yudao-module-member/yudao-module-member-biz/src/main/java/cn/iocoder/yudao/module/member/controller/app/user/vo/AppUserInfoRespVO.java b/yudao-module-member/yudao-module-member-biz/src/main/java/cn/iocoder/yudao/module/member/controller/app/user/vo/AppUserInfoRespVO.java index 0a79b08861..7b09af358b 100644 --- a/yudao-module-member/yudao-module-member-biz/src/main/java/cn/iocoder/yudao/module/member/controller/app/user/vo/AppUserInfoRespVO.java +++ b/yudao-module-member/yudao-module-member-biz/src/main/java/cn/iocoder/yudao/module/member/controller/app/user/vo/AppUserInfoRespVO.java @@ -1,23 +1,22 @@ package cn.iocoder.yudao.module.member.controller.app.user.vo; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; +import io.swagger.v3.oas.annotations.media.Schema; import lombok.AllArgsConstructor; import lombok.Data; import lombok.NoArgsConstructor; -@ApiModel("用户 APP - 用户个人信息 Response VO") +@Schema(title = "用户 APP - 用户个人信息 Response VO") @Data @NoArgsConstructor @AllArgsConstructor public class AppUserInfoRespVO { - @ApiModelProperty(value = "用户昵称", required = true, example = "芋艿") + @Schema(title = "用户昵称", required = true, example = "芋艿") private String nickname; - @ApiModelProperty(value = "用户头像", required = true, example = "/infra/file/get/35a12e57-4297-4faa-bf7d-7ed2f211c952") + @Schema(title = "用户头像", required = true, example = "/infra/file/get/35a12e57-4297-4faa-bf7d-7ed2f211c952") private String avatar; - @ApiModelProperty(value = "用户手机号", required = true, example = "15601691300") + @Schema(title = "用户手机号", required = true, example = "15601691300") private String mobile; } diff --git a/yudao-module-member/yudao-module-member-biz/src/main/java/cn/iocoder/yudao/module/member/controller/app/user/vo/AppUserUpdateMobileReqVO.java b/yudao-module-member/yudao-module-member-biz/src/main/java/cn/iocoder/yudao/module/member/controller/app/user/vo/AppUserUpdateMobileReqVO.java index 1ab6e7c843..e3c9021b13 100644 --- a/yudao-module-member/yudao-module-member-biz/src/main/java/cn/iocoder/yudao/module/member/controller/app/user/vo/AppUserUpdateMobileReqVO.java +++ b/yudao-module-member/yudao-module-member-biz/src/main/java/cn/iocoder/yudao/module/member/controller/app/user/vo/AppUserUpdateMobileReqVO.java @@ -1,8 +1,7 @@ package cn.iocoder.yudao.module.member.controller.app.user.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 lombok.AllArgsConstructor; import lombok.Builder; import lombok.Data; @@ -13,26 +12,26 @@ import javax.validation.constraints.NotBlank; import javax.validation.constraints.NotEmpty; import javax.validation.constraints.Pattern; -@ApiModel("用户 APP - 修改手机 Request VO") +@Schema(title = "用户 APP - 修改手机 Request VO") @Data @NoArgsConstructor @AllArgsConstructor @Builder public class AppUserUpdateMobileReqVO { - @ApiModelProperty(value = "手机验证码", required = true, example = "1024") + @Schema(title = "手机验证码", required = true, example = "1024") @NotEmpty(message = "手机验证码不能为空") @Length(min = 4, max = 6, message = "手机验证码长度为 4-6 位") @Pattern(regexp = "^[0-9]+$", message = "手机验证码必须都是数字") private String code; - @ApiModelProperty(value = "手机号",required = true,example = "15823654487") + @Schema(title = "手机号",required = true,example = "15823654487") @NotBlank(message = "手机号不能为空") @Length(min = 8, max = 11, message = "手机号码长度为 8-11 位") @Mobile private String mobile; - @ApiModelProperty(value = "原手机验证码", required = true, example = "1024") + @Schema(title = "原手机验证码", required = true, example = "1024") @NotEmpty(message = "原手机验证码不能为空") @Length(min = 4, max = 6, message = "手机验证码长度为 4-6 位") @Pattern(regexp = "^[0-9]+$", message = "手机验证码必须都是数字") @@ -40,7 +39,7 @@ public class AppUserUpdateMobileReqVO { // TODO @芋艿:oldMobile 应该不用传递 - @ApiModelProperty(value = "原手机号",required = true,example = "15823654487") + @Schema(title = "原手机号",required = true,example = "15823654487") @NotBlank(message = "手机号不能为空") @Length(min = 8, max = 11, message = "手机号码长度为 8-11 位") @Mobile diff --git a/yudao-module-member/yudao-module-member-biz/src/main/java/cn/iocoder/yudao/module/member/controller/app/weixin/AppWxMpController.java b/yudao-module-member/yudao-module-member-biz/src/main/java/cn/iocoder/yudao/module/member/controller/app/weixin/AppWxMpController.java index 5b33d44e6d..7a2413ee30 100644 --- a/yudao-module-member/yudao-module-member-biz/src/main/java/cn/iocoder/yudao/module/member/controller/app/weixin/AppWxMpController.java +++ b/yudao-module-member/yudao-module-member-biz/src/main/java/cn/iocoder/yudao/module/member/controller/app/weixin/AppWxMpController.java @@ -1,8 +1,8 @@ package cn.iocoder.yudao.module.member.controller.app.weixin; import cn.iocoder.yudao.framework.common.pojo.CommonResult; -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 me.chanjar.weixin.common.bean.WxJsapiSignature; import me.chanjar.weixin.common.error.WxErrorException; @@ -17,7 +17,7 @@ import javax.annotation.Resource; import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success; -@Api(tags = "微信公众号") +@Tag(name = "微信公众号") @RestController @RequestMapping("/member/wx-mp") @Validated @@ -28,8 +28,8 @@ public class AppWxMpController { private WxMpService mpService; @PostMapping("/create-jsapi-signature") - @ApiOperation(value = "创建微信 JS SDK 初始化所需的签名", - notes = "参考 https://developers.weixin.qq.com/doc/offiaccount/OA_Web_Apps/JS-SDK.html 文档") + @Operation(summary = "创建微信 JS SDK 初始化所需的签名", + description = "参考 https://developers.weixin.qq.com/doc/offiaccount/OA_Web_Apps/JS-SDK.html 文档") public CommonResult createJsapiSignature(@RequestParam("url") String url) throws WxErrorException { return success(mpService.createJsapiSignature(url)); } diff --git a/yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/controller/admin/merchant/PayAppController.java b/yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/controller/admin/merchant/PayAppController.java index 47cc3a4db1..4d746cf898 100644 --- a/yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/controller/admin/merchant/PayAppController.java +++ b/yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/controller/admin/merchant/PayAppController.java @@ -15,9 +15,9 @@ import cn.iocoder.yudao.module.pay.dal.dataobject.merchant.PayMerchantDO; import cn.iocoder.yudao.module.pay.service.merchant.PayAppService; import cn.iocoder.yudao.module.pay.service.merchant.PayChannelService; import cn.iocoder.yudao.module.pay.service.merchant.PayMerchantService; -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.security.access.prepost.PreAuthorize; import org.springframework.validation.annotation.Validated; @@ -33,7 +33,7 @@ import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success; import static cn.iocoder.yudao.framework.operatelog.core.enums.OperateTypeEnum.EXPORT; @Slf4j -@Api(tags = "管理后台 - 支付应用信息") +@Tag(name = "管理后台 - 支付应用信息") @RestController @RequestMapping("/pay/app") @Validated @@ -47,14 +47,14 @@ public class PayAppController { private PayMerchantService merchantService; @PostMapping("/create") - @ApiOperation("创建支付应用信息") + @Operation(summary = "创建支付应用信息") @PreAuthorize("@ss.hasPermission('pay:app:create')") public CommonResult createApp(@Valid @RequestBody PayAppCreateReqVO createReqVO) { return success(appService.createApp(createReqVO)); } @PutMapping("/update") - @ApiOperation("更新支付应用信息") + @Operation(summary = "更新支付应用信息") @PreAuthorize("@ss.hasPermission('pay:app:update')") public CommonResult updateApp(@Valid @RequestBody PayAppUpdateReqVO updateReqVO) { appService.updateApp(updateReqVO); @@ -62,7 +62,7 @@ public class PayAppController { } @PutMapping("/update-status") - @ApiOperation("更新支付应用状态") + @Operation(summary = "更新支付应用状态") @PreAuthorize("@ss.hasPermission('pay:app:update')") public CommonResult updateAppStatus(@Valid @RequestBody PayAppUpdateStatusReqVO updateReqVO) { appService.updateAppStatus(updateReqVO.getId(), updateReqVO.getStatus()); @@ -70,8 +70,8 @@ public class PayAppController { } @DeleteMapping("/delete") - @ApiOperation("删除支付应用信息") - @ApiImplicitParam(name = "id", value = "编号", required = true, dataTypeClass = Long.class) + @Operation(summary = "删除支付应用信息") + @Parameter(name = "id", description = "编号", required = true) @PreAuthorize("@ss.hasPermission('pay:app:delete')") public CommonResult deleteApp(@RequestParam("id") Long id) { appService.deleteApp(id); @@ -79,8 +79,8 @@ public class PayAppController { } @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('pay:app:query')") public CommonResult getApp(@RequestParam("id") Long id) { PayAppDO app = appService.getApp(id); @@ -88,8 +88,8 @@ public class PayAppController { } @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") @PreAuthorize("@ss.hasPermission('pay:app:query')") public CommonResult> getAppList(@RequestParam("ids") Collection ids) { List list = appService.getAppList(ids); @@ -97,7 +97,7 @@ public class PayAppController { } @GetMapping("/page") - @ApiOperation("获得支付应用信息分页") + @Operation(summary = "获得支付应用信息分页") @PreAuthorize("@ss.hasPermission('pay:app:query')") public CommonResult> getAppPage(@Valid PayAppPageReqVO pageVO) { // 得到应用分页列表 @@ -140,7 +140,7 @@ public class PayAppController { } @GetMapping("/export-excel") - @ApiOperation("导出支付应用信息 Excel") + @Operation(summary = "导出支付应用信息 Excel") @PreAuthorize("@ss.hasPermission('pay:app:export')") @OperateLog(type = EXPORT) public void exportAppExcel(@Valid PayAppExportReqVO exportReqVO, @@ -152,8 +152,8 @@ public class PayAppController { } @GetMapping("/list-merchant-id") - @ApiOperation("根据商户 ID 查询支付应用信息") - @ApiImplicitParam(name = "merchantId", value = "商户ID", required = true, example = "1", dataTypeClass = Long.class) + @Operation(summary = "根据商户 ID 查询支付应用信息") + @Parameter(name = "merchantId", description = "商户ID", required = true, example = "1") @PreAuthorize("@ss.hasPermission('pay:merchant:query')") public CommonResult> getMerchantListByName(@RequestParam Long merchantId) { List appListDO = appService.getListByMerchantId(merchantId); diff --git a/yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/controller/admin/merchant/PayChannelController.java b/yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/controller/admin/merchant/PayChannelController.java index 82d3a354e3..6ef6f5712f 100644 --- a/yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/controller/admin/merchant/PayChannelController.java +++ b/yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/controller/admin/merchant/PayChannelController.java @@ -8,10 +8,10 @@ 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.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.*; @@ -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("/pay/channel") @Validated @@ -36,14 +36,14 @@ public class PayChannelController { private PayChannelService channelService; @PostMapping("/create") - @ApiOperation("创建支付渠道 ") + @Operation(summary = "创建支付渠道 ") @PreAuthorize("@ss.hasPermission('pay:channel:create')") public CommonResult createChannel(@Valid @RequestBody PayChannelCreateReqVO createReqVO) { return success(channelService.createChannel(createReqVO)); } @PutMapping("/update") - @ApiOperation("更新支付渠道 ") + @Operation(summary = "更新支付渠道 ") @PreAuthorize("@ss.hasPermission('pay:channel:update')") public CommonResult updateChannel(@Valid @RequestBody PayChannelUpdateReqVO updateReqVO) { channelService.updateChannel(updateReqVO); @@ -51,8 +51,8 @@ public class PayChannelController { } @DeleteMapping("/delete") - @ApiOperation("删除支付渠道 ") - @ApiImplicitParam(name = "id", value = "编号", required = true, dataTypeClass = Long.class) + @Operation(summary = "删除支付渠道 ") + @Parameter(name = "id", description = "编号", required = true) @PreAuthorize("@ss.hasPermission('pay:channel:delete')") public CommonResult deleteChannel(@RequestParam("id") Long id) { channelService.deleteChannel(id); @@ -60,8 +60,8 @@ public class PayChannelController { } @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('pay:channel:query')") public CommonResult getChannel(@RequestParam("id") Long id) { PayChannelDO channel = channelService.getChannel(id); @@ -69,9 +69,9 @@ public class PayChannelController { } @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") @PreAuthorize("@ss.hasPermission('pay:channel:query')") public CommonResult> getChannelList(@RequestParam("ids") Collection ids) { List list = channelService.getChannelList(ids); @@ -79,7 +79,7 @@ public class PayChannelController { } @GetMapping("/page") - @ApiOperation("获得支付渠道分页") + @Operation(summary = "获得支付渠道分页") @PreAuthorize("@ss.hasPermission('pay:channel:query')") public CommonResult> getChannelPage(@Valid PayChannelPageReqVO pageVO) { PageResult pageResult = channelService.getChannelPage(pageVO); @@ -87,7 +87,7 @@ public class PayChannelController { } @GetMapping("/export-excel") - @ApiOperation("导出支付渠道Excel") + @Operation(summary = "导出支付渠道Excel") @PreAuthorize("@ss.hasPermission('pay:channel:export')") @OperateLog(type = EXPORT) public void exportChannelExcel(@Valid PayChannelExportReqVO exportReqVO, @@ -99,14 +99,14 @@ public class PayChannelController { } @GetMapping("/get-channel") - @ApiOperation("根据条件查询微信支付渠道") - @ApiImplicitParams({ - @ApiImplicitParam(name = "merchantId", value = "商户编号", - required = true, example = "1", dataTypeClass = Long.class), - @ApiImplicitParam(name = "appId", value = "应用编号", - required = true, example = "1", dataTypeClass = Long.class), - @ApiImplicitParam(name = "code", value = "支付渠道编码", - required = true, example = "wx_pub", dataTypeClass = String.class) + @Operation(summary = "根据条件查询微信支付渠道") + @Parameters({ + @Parameter(name = "merchantId", description = "商户编号", + required = true, example = "1"), + @Parameter(name = "appId", description = "应用编号", + required = true, example = "1"), + @Parameter(name = "code", description = "支付渠道编码", + required = true, example = "wx_pub") }) @PreAuthorize("@ss.hasPermission('pay:channel:query')") public CommonResult getChannel( diff --git a/yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/controller/admin/merchant/PayMerchantController.java b/yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/controller/admin/merchant/PayMerchantController.java index 19bdfc86d2..2af7fa5286 100644 --- a/yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/controller/admin/merchant/PayMerchantController.java +++ b/yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/controller/admin/merchant/PayMerchantController.java @@ -8,9 +8,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.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("/pay/merchant") @Validated @@ -35,14 +35,14 @@ public class PayMerchantController { private PayMerchantService merchantService; @PostMapping("/create") - @ApiOperation("创建支付商户信息") + @Operation(summary = "创建支付商户信息") @PreAuthorize("@ss.hasPermission('pay:merchant:create')") public CommonResult createMerchant(@Valid @RequestBody PayMerchantCreateReqVO createReqVO) { return success(merchantService.createMerchant(createReqVO)); } @PutMapping("/update") - @ApiOperation("更新支付商户信息") + @Operation(summary = "更新支付商户信息") @PreAuthorize("@ss.hasPermission('pay:merchant:update')") public CommonResult updateMerchant(@Valid @RequestBody PayMerchantUpdateReqVO updateReqVO) { merchantService.updateMerchant(updateReqVO); @@ -50,7 +50,7 @@ public class PayMerchantController { } @PutMapping("/update-status") - @ApiOperation("修改支付商户状态") + @Operation(summary = "修改支付商户状态") @PreAuthorize("@ss.hasPermission('pay:merchant:update')") public CommonResult updateMerchantStatus(@Valid @RequestBody PayMerchantUpdateStatusReqVO reqVO) { merchantService.updateMerchantStatus(reqVO.getId(), reqVO.getStatus()); @@ -58,8 +58,8 @@ public class PayMerchantController { } @DeleteMapping("/delete") - @ApiOperation("删除支付商户信息") - @ApiImplicitParam(name = "id", value = "编号", required = true, dataTypeClass = Long.class) + @Operation(summary = "删除支付商户信息") + @Parameter(name = "id", description = "编号", required = true) @PreAuthorize("@ss.hasPermission('pay:merchant:delete')") public CommonResult deleteMerchant(@RequestParam("id") Long id) { merchantService.deleteMerchant(id); @@ -67,8 +67,8 @@ public class PayMerchantController { } @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('pay:merchant:query')") public CommonResult getMerchant(@RequestParam("id") Long id) { PayMerchantDO merchant = merchantService.getMerchant(id); @@ -76,8 +76,8 @@ public class PayMerchantController { } @GetMapping("/list-by-name") - @ApiOperation("根据商户名称获得支付商户信息列表") - @ApiImplicitParam(name = "name", value = "商户名称", example = "芋道", dataTypeClass = String.class) + @Operation(summary = "根据商户名称获得支付商户信息列表") + @Parameter(name = "name", description = "商户名称", example = "芋道") @PreAuthorize("@ss.hasPermission('pay:merchant:query')") public CommonResult> getMerchantListByName(@RequestParam(required = false) String name) { List merchantListDO = merchantService.getMerchantListByName(name); @@ -85,8 +85,8 @@ public class PayMerchantController { } @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") @PreAuthorize("@ss.hasPermission('pay:merchant:query')") public CommonResult> getMerchantList(@RequestParam("ids") Collection ids) { List list = merchantService.getMerchantList(ids); @@ -94,7 +94,7 @@ public class PayMerchantController { } @GetMapping("/page") - @ApiOperation("获得支付商户信息分页") + @Operation(summary = "获得支付商户信息分页") @PreAuthorize("@ss.hasPermission('pay:merchant:query')") public CommonResult> getMerchantPage(@Valid PayMerchantPageReqVO pageVO) { PageResult pageResult = merchantService.getMerchantPage(pageVO); @@ -102,7 +102,7 @@ public class PayMerchantController { } @GetMapping("/export-excel") - @ApiOperation("导出支付商户信息 Excel") + @Operation(summary = "导出支付商户信息 Excel") @PreAuthorize("@ss.hasPermission('pay:merchant:export')") @OperateLog(type = EXPORT) public void exportMerchantExcel(@Valid PayMerchantExportReqVO exportReqVO, diff --git a/yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/controller/admin/merchant/vo/app/PayAppBaseVO.java b/yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/controller/admin/merchant/vo/app/PayAppBaseVO.java index 795b3c6438..5ddbce5165 100644 --- a/yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/controller/admin/merchant/vo/app/PayAppBaseVO.java +++ b/yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/controller/admin/merchant/vo/app/PayAppBaseVO.java @@ -1,7 +1,6 @@ package cn.iocoder.yudao.module.pay.controller.admin.merchant.vo.app; - +import io.swagger.v3.oas.annotations.media.Schema; import lombok.*; -import io.swagger.annotations.*; import javax.validation.constraints.*; /** @@ -11,26 +10,26 @@ import javax.validation.constraints.*; @Data public class PayAppBaseVO { - @ApiModelProperty(value = "应用名", required = true) + @Schema(title = "应用名", required = true) @NotNull(message = "应用名不能为空") private String name; - @ApiModelProperty(value = "开启状态", required = true) + @Schema(title = "开启状态", required = true) @NotNull(message = "开启状态不能为空") private Integer status; - @ApiModelProperty(value = "备注") + @Schema(title = "备注") private String remark; - @ApiModelProperty(value = "支付结果的回调地址", required = true) + @Schema(title = "支付结果的回调地址", required = true) @NotNull(message = "支付结果的回调地址不能为空") private String payNotifyUrl; - @ApiModelProperty(value = "退款结果的回调地址", required = true) + @Schema(title = "退款结果的回调地址", required = true) @NotNull(message = "退款结果的回调地址不能为空") private String refundNotifyUrl; - @ApiModelProperty(value = "商户编号", required = true) + @Schema(title = "商户编号", required = true) @NotNull(message = "商户编号不能为空") private Long merchantId; diff --git a/yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/controller/admin/merchant/vo/app/PayAppCreateReqVO.java b/yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/controller/admin/merchant/vo/app/PayAppCreateReqVO.java index a66a719632..4c1086390d 100644 --- a/yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/controller/admin/merchant/vo/app/PayAppCreateReqVO.java +++ b/yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/controller/admin/merchant/vo/app/PayAppCreateReqVO.java @@ -1,9 +1,8 @@ package cn.iocoder.yudao.module.pay.controller.admin.merchant.vo.app; - +import io.swagger.v3.oas.annotations.media.Schema; import lombok.*; -import io.swagger.annotations.*; -@ApiModel("管理后台 - 支付应用信息创建 Request VO") +@Schema(title = "管理后台 - 支付应用信息创建 Request VO") @Data @EqualsAndHashCode(callSuper = true) @ToString(callSuper = true) diff --git a/yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/controller/admin/merchant/vo/app/PayAppExportReqVO.java b/yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/controller/admin/merchant/vo/app/PayAppExportReqVO.java index 3ea1f3e2ec..f4cc07f409 100644 --- a/yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/controller/admin/merchant/vo/app/PayAppExportReqVO.java +++ b/yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/controller/admin/merchant/vo/app/PayAppExportReqVO.java @@ -1,37 +1,36 @@ package cn.iocoder.yudao.module.pay.controller.admin.merchant.vo.app; - +import io.swagger.v3.oas.annotations.media.Schema; import lombok.*; import java.time.LocalDateTime; -import io.swagger.annotations.*; import org.springframework.format.annotation.DateTimeFormat; import static cn.iocoder.yudao.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND; -@ApiModel(value = "管理后台 - 支付应用信息 Excel 导出 Request VO", description = "参数和 PayAppPageReqVO 是一致的") +@Schema(title = "管理后台 - 支付应用信息 Excel 导出 Request VO", description = "参数和 PayAppPageReqVO 是一致的") @Data public class PayAppExportReqVO { - @ApiModelProperty(value = "应用名") + @Schema(title = "应用名") private String name; - @ApiModelProperty(value = "开启状态") + @Schema(title = "开启状态") private Integer status; - @ApiModelProperty(value = "备注") + @Schema(title = "备注") private String remark; - @ApiModelProperty(value = "支付结果的回调地址") + @Schema(title = "支付结果的回调地址") private String payNotifyUrl; - @ApiModelProperty(value = "退款结果的回调地址") + @Schema(title = "退款结果的回调地址") private String refundNotifyUrl; - @ApiModelProperty(value = "商户名称") + @Schema(title = "商户名称") private String merchantName; @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND) - @ApiModelProperty(value = "创建时间") + @Schema(title = "创建时间") private LocalDateTime[] createTime; } diff --git a/yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/controller/admin/merchant/vo/app/PayAppPageItemRespVO.java b/yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/controller/admin/merchant/vo/app/PayAppPageItemRespVO.java index f0e06b0d0d..214d87ee84 100644 --- a/yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/controller/admin/merchant/vo/app/PayAppPageItemRespVO.java +++ b/yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/controller/admin/merchant/vo/app/PayAppPageItemRespVO.java @@ -1,7 +1,6 @@ package cn.iocoder.yudao.module.pay.controller.admin.merchant.vo.app; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; +import io.swagger.v3.oas.annotations.media.Schema; import lombok.Data; import lombok.EqualsAndHashCode; import lombok.ToString; @@ -9,16 +8,16 @@ import lombok.ToString; import java.time.LocalDateTime; import java.util.Set; -@ApiModel(value = "管理后台 - 支付应用信息分页查询 Response VO", description = "相比于支付信息,还会多出应用渠道的开关信息") +@Schema(title = "管理后台 - 支付应用信息分页查询 Response VO", description = "相比于支付信息,还会多出应用渠道的开关信息") @Data @EqualsAndHashCode(callSuper = true) @ToString(callSuper = true) public class PayAppPageItemRespVO extends PayAppBaseVO { - @ApiModelProperty(value = "应用编号", required = true) + @Schema(title = "应用编号", required = true) private Long id; - @ApiModelProperty(value = "创建时间", required = true) + @Schema(title = "创建时间", required = true) private LocalDateTime createTime; /** @@ -26,19 +25,19 @@ public class PayAppPageItemRespVO extends PayAppBaseVO { */ private PayMerchant payMerchant; - @ApiModel("商户") + @Schema(title = "商户") @Data public static class PayMerchant { - @ApiModelProperty(value = "商户编号", required = true, example = "1") + @Schema(title = "商户编号", required = true, example = "1") private Long id; - @ApiModelProperty(value = "商户名称", required = true, example = "研发部") + @Schema(title = "商户名称", required = true, example = "研发部") private String name; } - @ApiModelProperty(value = "渠道编码集合", required = true, example = "alipay_pc,alipay_wap...") + @Schema(title = "渠道编码集合", required = true, example = "alipay_pc,alipay_wap...") private Set channelCodes; diff --git a/yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/controller/admin/merchant/vo/app/PayAppPageReqVO.java b/yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/controller/admin/merchant/vo/app/PayAppPageReqVO.java index c743a88221..04312cb1ba 100644 --- a/yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/controller/admin/merchant/vo/app/PayAppPageReqVO.java +++ b/yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/controller/admin/merchant/vo/app/PayAppPageReqVO.java @@ -1,40 +1,39 @@ package cn.iocoder.yudao.module.pay.controller.admin.merchant.vo.app; - +import io.swagger.v3.oas.annotations.media.Schema; import lombok.*; import java.time.LocalDateTime; -import io.swagger.annotations.*; import cn.iocoder.yudao.framework.common.pojo.PageParam; 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(title = "管理后台 - 支付应用信息分页 Request VO") @Data @EqualsAndHashCode(callSuper = true) @ToString(callSuper = true) public class PayAppPageReqVO extends PageParam { - @ApiModelProperty(value = "应用名") + @Schema(title = "应用名") private String name; - @ApiModelProperty(value = "开启状态") + @Schema(title = "开启状态") private Integer status; - @ApiModelProperty(value = "备注") + @Schema(title = "备注") private String remark; - @ApiModelProperty(value = "支付结果的回调地址") + @Schema(title = "支付结果的回调地址") private String payNotifyUrl; - @ApiModelProperty(value = "退款结果的回调地址") + @Schema(title = "退款结果的回调地址") private String refundNotifyUrl; - @ApiModelProperty(value = "商户名称") + @Schema(title = "商户名称") private String merchantName; @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND) - @ApiModelProperty(value = "创建时间") + @Schema(title = "创建时间") private LocalDateTime[] createTime; } diff --git a/yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/controller/admin/merchant/vo/app/PayAppRespVO.java b/yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/controller/admin/merchant/vo/app/PayAppRespVO.java index 17d4961a1d..c5fc4fb77b 100644 --- a/yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/controller/admin/merchant/vo/app/PayAppRespVO.java +++ b/yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/controller/admin/merchant/vo/app/PayAppRespVO.java @@ -1,20 +1,19 @@ package cn.iocoder.yudao.module.pay.controller.admin.merchant.vo.app; - +import io.swagger.v3.oas.annotations.media.Schema; import lombok.*; import java.time.LocalDateTime; -import io.swagger.annotations.*; -@ApiModel("管理后台 - 支付应用信息 Response VO") +@Schema(title = "管理后台 - 支付应用信息 Response VO") @Data @EqualsAndHashCode(callSuper = true) @ToString(callSuper = true) public class PayAppRespVO extends PayAppBaseVO { - @ApiModelProperty(value = "应用编号", required = true) + @Schema(title = "应用编号", required = true) private Long id; - @ApiModelProperty(value = "创建时间", required = true) + @Schema(title = "创建时间", required = true) private LocalDateTime createTime; } diff --git a/yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/controller/admin/merchant/vo/app/PayAppUpdateReqVO.java b/yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/controller/admin/merchant/vo/app/PayAppUpdateReqVO.java index 9bdd042543..e55e86efb9 100644 --- a/yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/controller/admin/merchant/vo/app/PayAppUpdateReqVO.java +++ b/yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/controller/admin/merchant/vo/app/PayAppUpdateReqVO.java @@ -1,16 +1,15 @@ package cn.iocoder.yudao.module.pay.controller.admin.merchant.vo.app; - +import io.swagger.v3.oas.annotations.media.Schema; import lombok.*; -import io.swagger.annotations.*; import javax.validation.constraints.*; -@ApiModel("管理后台 - 支付应用信息更新 Request VO") +@Schema(title = "管理后台 - 支付应用信息更新 Request VO") @Data @EqualsAndHashCode(callSuper = true) @ToString(callSuper = true) public class PayAppUpdateReqVO extends PayAppBaseVO { - @ApiModelProperty(value = "应用编号", required = true) + @Schema(title = "应用编号", required = true) @NotNull(message = "应用编号不能为空") private Long id; diff --git a/yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/controller/admin/merchant/vo/app/PayAppUpdateStatusReqVO.java b/yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/controller/admin/merchant/vo/app/PayAppUpdateStatusReqVO.java index 2ccce684cb..c5d2578290 100644 --- a/yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/controller/admin/merchant/vo/app/PayAppUpdateStatusReqVO.java +++ b/yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/controller/admin/merchant/vo/app/PayAppUpdateStatusReqVO.java @@ -1,20 +1,19 @@ package cn.iocoder.yudao.module.pay.controller.admin.merchant.vo.app; -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.NotNull; -@ApiModel("管理后台 - 应用更新状态 Request VO") +@Schema(title = "管理后台 - 应用更新状态 Request VO") @Data public class PayAppUpdateStatusReqVO { - @ApiModelProperty(value = "商户编号", required = true, example = "1024") + @Schema(title = "商户编号", required = true, example = "1024") @NotNull(message = "商户编号不能为空") private Long id; - @ApiModelProperty(value = "状态", required = true, example = "1", notes = "见 SysCommonStatusEnum 枚举") + @Schema(title = "状态", required = true, example = "1", description = "见 SysCommonStatusEnum 枚举") @NotNull(message = "状态不能为空") private Integer status; diff --git a/yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/controller/admin/merchant/vo/channel/PayChannelBaseVO.java b/yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/controller/admin/merchant/vo/channel/PayChannelBaseVO.java index 8b9f534904..3ff9f69b90 100644 --- a/yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/controller/admin/merchant/vo/channel/PayChannelBaseVO.java +++ b/yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/controller/admin/merchant/vo/channel/PayChannelBaseVO.java @@ -1,7 +1,6 @@ package cn.iocoder.yudao.module.pay.controller.admin.merchant.vo.channel; - +import io.swagger.v3.oas.annotations.media.Schema; import lombok.*; -import io.swagger.annotations.*; import javax.validation.constraints.*; /** @@ -11,26 +10,26 @@ import javax.validation.constraints.*; @Data public class PayChannelBaseVO { - @ApiModelProperty(value = "渠道编码", required = true) + @Schema(title = "渠道编码", required = true) @NotNull(message = "渠道编码不能为空") private String code; - @ApiModelProperty(value = "开启状态", required = true) + @Schema(title = "开启状态", required = true) @NotNull(message = "开启状态不能为空") private Integer status; - @ApiModelProperty(value = "备注") + @Schema(title = "备注") private String remark; - @ApiModelProperty(value = "渠道费率,单位:百分比", required = true) + @Schema(title = "渠道费率,单位:百分比", required = true) @NotNull(message = "渠道费率,单位:百分比不能为空") private Double feeRate; - @ApiModelProperty(value = "商户编号", required = true) + @Schema(title = "商户编号", required = true) @NotNull(message = "商户编号不能为空") private Long merchantId; - @ApiModelProperty(value = "应用编号", required = true) + @Schema(title = "应用编号", required = true) @NotNull(message = "应用编号不能为空") private Long appId; diff --git a/yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/controller/admin/merchant/vo/channel/PayChannelCreateReqVO.java b/yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/controller/admin/merchant/vo/channel/PayChannelCreateReqVO.java index 5852f9bb17..f2bda63faa 100644 --- a/yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/controller/admin/merchant/vo/channel/PayChannelCreateReqVO.java +++ b/yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/controller/admin/merchant/vo/channel/PayChannelCreateReqVO.java @@ -1,20 +1,19 @@ package cn.iocoder.yudao.module.pay.controller.admin.merchant.vo.channel; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; +import io.swagger.v3.oas.annotations.media.Schema; import lombok.Data; import lombok.EqualsAndHashCode; import lombok.ToString; import javax.validation.constraints.NotBlank; -@ApiModel("管理后台 - 支付渠道 创建 Request VO") +@Schema(title = "管理后台 - 支付渠道 创建 Request VO") @Data @EqualsAndHashCode(callSuper = true) @ToString(callSuper = true) public class PayChannelCreateReqVO extends PayChannelBaseVO { - @ApiModelProperty(value = "渠道配置的 json 字符串") + @Schema(title = "渠道配置的 json 字符串") @NotBlank(message = "渠道配置不能为空") private String config; diff --git a/yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/controller/admin/merchant/vo/channel/PayChannelExportReqVO.java b/yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/controller/admin/merchant/vo/channel/PayChannelExportReqVO.java index 263d1b8e94..091afc14e3 100644 --- a/yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/controller/admin/merchant/vo/channel/PayChannelExportReqVO.java +++ b/yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/controller/admin/merchant/vo/channel/PayChannelExportReqVO.java @@ -1,40 +1,39 @@ package cn.iocoder.yudao.module.pay.controller.admin.merchant.vo.channel; - +import io.swagger.v3.oas.annotations.media.Schema; import lombok.*; import java.time.LocalDateTime; -import io.swagger.annotations.*; import org.springframework.format.annotation.DateTimeFormat; import static cn.iocoder.yudao.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND; -@ApiModel(value = "管理后台 - 支付渠道 Excel 导出 Request VO", description = "参数和 PayChannelPageReqVO 是一致的") +@Schema(title = "管理后台 - 支付渠道 Excel 导出 Request VO", description = "参数和 PayChannelPageReqVO 是一致的") @Data public class PayChannelExportReqVO { - @ApiModelProperty(value = "渠道编码") + @Schema(title = "渠道编码") private String code; - @ApiModelProperty(value = "开启状态") + @Schema(title = "开启状态") private Integer status; - @ApiModelProperty(value = "备注") + @Schema(title = "备注") private String remark; - @ApiModelProperty(value = "渠道费率,单位:百分比") + @Schema(title = "渠道费率,单位:百分比") private Double feeRate; - @ApiModelProperty(value = "商户编号") + @Schema(title = "商户编号") private Long merchantId; - @ApiModelProperty(value = "应用编号") + @Schema(title = "应用编号") private Long appId; - @ApiModelProperty(value = "支付渠道配置") + @Schema(title = "支付渠道配置") private String config; @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND) - @ApiModelProperty(value = "创建时间") + @Schema(title = "创建时间") private LocalDateTime[] createTime; } diff --git a/yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/controller/admin/merchant/vo/channel/PayChannelPageReqVO.java b/yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/controller/admin/merchant/vo/channel/PayChannelPageReqVO.java index 4d8e7729c8..dd30097c59 100644 --- a/yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/controller/admin/merchant/vo/channel/PayChannelPageReqVO.java +++ b/yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/controller/admin/merchant/vo/channel/PayChannelPageReqVO.java @@ -1,43 +1,42 @@ package cn.iocoder.yudao.module.pay.controller.admin.merchant.vo.channel; - +import io.swagger.v3.oas.annotations.media.Schema; import lombok.*; import java.time.LocalDateTime; -import io.swagger.annotations.*; import cn.iocoder.yudao.framework.common.pojo.PageParam; 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(title = "管理后台 - 支付渠道 分页 Request VO") @Data @EqualsAndHashCode(callSuper = true) @ToString(callSuper = true) public class PayChannelPageReqVO extends PageParam { - @ApiModelProperty(value = "渠道编码") + @Schema(title = "渠道编码") private String code; - @ApiModelProperty(value = "开启状态") + @Schema(title = "开启状态") private Integer status; - @ApiModelProperty(value = "备注") + @Schema(title = "备注") private String remark; - @ApiModelProperty(value = "渠道费率,单位:百分比") + @Schema(title = "渠道费率,单位:百分比") private Double feeRate; - @ApiModelProperty(value = "商户编号") + @Schema(title = "商户编号") private Long merchantId; - @ApiModelProperty(value = "应用编号") + @Schema(title = "应用编号") private Long appId; - @ApiModelProperty(value = "支付渠道配置") + @Schema(title = "支付渠道配置") private String config; @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND) - @ApiModelProperty(value = "创建时间") + @Schema(title = "创建时间") private LocalDateTime[] createTime; } diff --git a/yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/controller/admin/merchant/vo/channel/PayChannelRespVO.java b/yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/controller/admin/merchant/vo/channel/PayChannelRespVO.java index e3e53d3f9c..92c8f57144 100644 --- a/yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/controller/admin/merchant/vo/channel/PayChannelRespVO.java +++ b/yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/controller/admin/merchant/vo/channel/PayChannelRespVO.java @@ -1,22 +1,21 @@ package cn.iocoder.yudao.module.pay.controller.admin.merchant.vo.channel; - +import io.swagger.v3.oas.annotations.media.Schema; import lombok.*; import java.time.LocalDateTime; -import io.swagger.annotations.*; -@ApiModel("管理后台 - 支付渠道 Response VO") +@Schema(title = "管理后台 - 支付渠道 Response VO") @Data @EqualsAndHashCode(callSuper = true) @ToString(callSuper = true) public class PayChannelRespVO extends PayChannelBaseVO { - @ApiModelProperty(value = "商户编号", required = true) + @Schema(title = "商户编号", required = true) private Long id; - @ApiModelProperty(value = "创建时间", required = true) + @Schema(title = "创建时间", required = true) private LocalDateTime createTime; - @ApiModelProperty(value = "配置", required = true) + @Schema(title = "配置", required = true) private String config; } diff --git a/yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/controller/admin/merchant/vo/channel/PayChannelUpdateReqVO.java b/yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/controller/admin/merchant/vo/channel/PayChannelUpdateReqVO.java index c216de9aea..94c322270e 100644 --- a/yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/controller/admin/merchant/vo/channel/PayChannelUpdateReqVO.java +++ b/yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/controller/admin/merchant/vo/channel/PayChannelUpdateReqVO.java @@ -1,20 +1,19 @@ package cn.iocoder.yudao.module.pay.controller.admin.merchant.vo.channel; - +import io.swagger.v3.oas.annotations.media.Schema; import lombok.*; -import io.swagger.annotations.*; import javax.validation.constraints.*; -@ApiModel("管理后台 - 支付渠道 更新 Request VO") +@Schema(title = "管理后台 - 支付渠道 更新 Request VO") @Data @EqualsAndHashCode(callSuper = true) @ToString(callSuper = true) public class PayChannelUpdateReqVO extends PayChannelBaseVO { - @ApiModelProperty(value = "商户编号", required = true) + @Schema(title = "商户编号", required = true) @NotNull(message = "商户编号不能为空") private Long id; - @ApiModelProperty(value = "渠道配置的json字符串") + @Schema(title = "渠道配置的json字符串") @NotBlank(message = "渠道配置不能为空") private String config; } diff --git a/yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/controller/admin/merchant/vo/merchant/PayMerchantBaseVO.java b/yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/controller/admin/merchant/vo/merchant/PayMerchantBaseVO.java index 1052fdd03e..71f8d0e616 100644 --- a/yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/controller/admin/merchant/vo/merchant/PayMerchantBaseVO.java +++ b/yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/controller/admin/merchant/vo/merchant/PayMerchantBaseVO.java @@ -1,6 +1,5 @@ package cn.iocoder.yudao.module.pay.controller.admin.merchant.vo.merchant; - -import io.swagger.annotations.ApiModelProperty; +import io.swagger.v3.oas.annotations.media.Schema; import lombok.Data; import javax.validation.constraints.NotNull; @@ -12,19 +11,19 @@ import javax.validation.constraints.NotNull; @Data public class PayMerchantBaseVO { - @ApiModelProperty(value = "商户全称", required = true) + @Schema(title = "商户全称", required = true) @NotNull(message = "商户全称不能为空") private String name; - @ApiModelProperty(value = "商户简称", required = true) + @Schema(title = "商户简称", required = true) @NotNull(message = "商户简称不能为空") private String shortName; - @ApiModelProperty(value = "开启状态", required = true) + @Schema(title = "开启状态", required = true) @NotNull(message = "开启状态不能为空") private Integer status; - @ApiModelProperty(value = "备注") + @Schema(title = "备注") private String remark; } diff --git a/yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/controller/admin/merchant/vo/merchant/PayMerchantCreateReqVO.java b/yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/controller/admin/merchant/vo/merchant/PayMerchantCreateReqVO.java index 018db180be..a61f728ab4 100644 --- a/yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/controller/admin/merchant/vo/merchant/PayMerchantCreateReqVO.java +++ b/yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/controller/admin/merchant/vo/merchant/PayMerchantCreateReqVO.java @@ -1,9 +1,8 @@ package cn.iocoder.yudao.module.pay.controller.admin.merchant.vo.merchant; - +import io.swagger.v3.oas.annotations.media.Schema; import lombok.*; -import io.swagger.annotations.*; -@ApiModel("管理后台 - 支付商户信息创建 Request VO") +@Schema(title = "管理后台 - 支付商户信息创建 Request VO") @Data @EqualsAndHashCode(callSuper = true) @ToString(callSuper = true) diff --git a/yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/controller/admin/merchant/vo/merchant/PayMerchantExportReqVO.java b/yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/controller/admin/merchant/vo/merchant/PayMerchantExportReqVO.java index 6a41d3afcb..1a04a077dd 100644 --- a/yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/controller/admin/merchant/vo/merchant/PayMerchantExportReqVO.java +++ b/yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/controller/admin/merchant/vo/merchant/PayMerchantExportReqVO.java @@ -1,34 +1,33 @@ package cn.iocoder.yudao.module.pay.controller.admin.merchant.vo.merchant; - +import io.swagger.v3.oas.annotations.media.Schema; import lombok.*; import java.time.LocalDateTime; -import io.swagger.annotations.*; import org.springframework.format.annotation.DateTimeFormat; import static cn.iocoder.yudao.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND; -@ApiModel(value = "管理后台 - 支付商户信息 Excel 导出 Request VO", description = "参数和 PayMerchantPageReqVO 是一致的") +@Schema(title = "管理后台 - 支付商户信息 Excel 导出 Request VO", description = "参数和 PayMerchantPageReqVO 是一致的") @Data public class PayMerchantExportReqVO { - @ApiModelProperty(value = "商户号") + @Schema(title = "商户号") private String no; - @ApiModelProperty(value = "商户全称") + @Schema(title = "商户全称") private String name; - @ApiModelProperty(value = "商户简称") + @Schema(title = "商户简称") private String shortName; - @ApiModelProperty(value = "开启状态") + @Schema(title = "开启状态") private Integer status; - @ApiModelProperty(value = "备注") + @Schema(title = "备注") private String remark; @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND) - @ApiModelProperty(value = "创建时间") + @Schema(title = "创建时间") private LocalDateTime[] createTime; } diff --git a/yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/controller/admin/merchant/vo/merchant/PayMerchantPageReqVO.java b/yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/controller/admin/merchant/vo/merchant/PayMerchantPageReqVO.java index 756299f5f6..ec01270a56 100644 --- a/yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/controller/admin/merchant/vo/merchant/PayMerchantPageReqVO.java +++ b/yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/controller/admin/merchant/vo/merchant/PayMerchantPageReqVO.java @@ -1,37 +1,36 @@ package cn.iocoder.yudao.module.pay.controller.admin.merchant.vo.merchant; - +import io.swagger.v3.oas.annotations.media.Schema; import lombok.*; import java.time.LocalDateTime; -import io.swagger.annotations.*; import cn.iocoder.yudao.framework.common.pojo.PageParam; 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(title = "管理后台 - 支付商户信息分页 Request VO") @Data @EqualsAndHashCode(callSuper = true) @ToString(callSuper = true) public class PayMerchantPageReqVO extends PageParam { - @ApiModelProperty(value = "商户号") + @Schema(title = "商户号") private String no; - @ApiModelProperty(value = "商户全称") + @Schema(title = "商户全称") private String name; - @ApiModelProperty(value = "商户简称") + @Schema(title = "商户简称") private String shortName; - @ApiModelProperty(value = "开启状态") + @Schema(title = "开启状态") private Integer status; - @ApiModelProperty(value = "备注") + @Schema(title = "备注") private String remark; @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND) - @ApiModelProperty(value = "创建时间") + @Schema(title = "创建时间") private LocalDateTime[] createTime; } diff --git a/yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/controller/admin/merchant/vo/merchant/PayMerchantRespVO.java b/yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/controller/admin/merchant/vo/merchant/PayMerchantRespVO.java index f4003b7a4a..54561c1162 100644 --- a/yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/controller/admin/merchant/vo/merchant/PayMerchantRespVO.java +++ b/yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/controller/admin/merchant/vo/merchant/PayMerchantRespVO.java @@ -1,26 +1,25 @@ package cn.iocoder.yudao.module.pay.controller.admin.merchant.vo.merchant; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; +import io.swagger.v3.oas.annotations.media.Schema; import lombok.Data; import lombok.EqualsAndHashCode; import lombok.ToString; import java.time.LocalDateTime; -@ApiModel("管理后台 - 支付商户信息 Response VO") +@Schema(title = "管理后台 - 支付商户信息 Response VO") @Data @EqualsAndHashCode(callSuper = true) @ToString(callSuper = true) public class PayMerchantRespVO extends PayMerchantBaseVO { - @ApiModelProperty(value = "商户编号", required = true) + @Schema(title = "商户编号", required = true) private Long id; - @ApiModelProperty(value = "创建时间", required = true) + @Schema(title = "创建时间", required = true) private LocalDateTime createTime; - @ApiModelProperty(value = "商户号", required = true, example = "M233666999") + @Schema(title = "商户号", required = true, example = "M233666999") private String no; } diff --git a/yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/controller/admin/merchant/vo/merchant/PayMerchantUpdateReqVO.java b/yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/controller/admin/merchant/vo/merchant/PayMerchantUpdateReqVO.java index d270a3d845..f6c509764c 100644 --- a/yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/controller/admin/merchant/vo/merchant/PayMerchantUpdateReqVO.java +++ b/yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/controller/admin/merchant/vo/merchant/PayMerchantUpdateReqVO.java @@ -1,16 +1,15 @@ package cn.iocoder.yudao.module.pay.controller.admin.merchant.vo.merchant; - +import io.swagger.v3.oas.annotations.media.Schema; import lombok.*; -import io.swagger.annotations.*; import javax.validation.constraints.*; -@ApiModel("管理后台 - 支付商户信息更新 Request VO") +@Schema(title = "管理后台 - 支付商户信息更新 Request VO") @Data @EqualsAndHashCode(callSuper = true) @ToString(callSuper = true) public class PayMerchantUpdateReqVO extends PayMerchantBaseVO { - @ApiModelProperty(value = "商户编号", required = true) + @Schema(title = "商户编号", required = true) @NotNull(message = "商户编号不能为空") private Long id; diff --git a/yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/controller/admin/merchant/vo/merchant/PayMerchantUpdateStatusReqVO.java b/yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/controller/admin/merchant/vo/merchant/PayMerchantUpdateStatusReqVO.java index 39e26b8b74..6fa637e7e6 100644 --- a/yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/controller/admin/merchant/vo/merchant/PayMerchantUpdateStatusReqVO.java +++ b/yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/controller/admin/merchant/vo/merchant/PayMerchantUpdateStatusReqVO.java @@ -1,20 +1,19 @@ package cn.iocoder.yudao.module.pay.controller.admin.merchant.vo.merchant; -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.NotNull; -@ApiModel("管理后台 - 商户更新状态 Request VO") +@Schema(title = "管理后台 - 商户更新状态 Request VO") @Data public class PayMerchantUpdateStatusReqVO { - @ApiModelProperty(value = "商户编号", required = true, example = "1024") + @Schema(title = "商户编号", required = true, example = "1024") @NotNull(message = "商户编号不能为空") private Long id; - @ApiModelProperty(value = "状态", required = true, example = "1", notes = "见 SysCommonStatusEnum 枚举") + @Schema(title = "状态", required = true, example = "1", description = "见 SysCommonStatusEnum 枚举") @NotNull(message = "状态不能为空") private Integer status; diff --git a/yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/controller/admin/order/PayOrderController.java b/yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/controller/admin/order/PayOrderController.java index 2219204c43..1be5e379e9 100755 --- a/yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/controller/admin/order/PayOrderController.java +++ b/yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/controller/admin/order/PayOrderController.java @@ -18,9 +18,9 @@ import cn.iocoder.yudao.framework.common.util.collection.CollectionUtils; import cn.iocoder.yudao.framework.excel.core.util.ExcelUtils; import cn.iocoder.yudao.framework.operatelog.core.annotations.OperateLog; import cn.iocoder.yudao.framework.pay.core.enums.PayChannelEnum; -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; @@ -39,7 +39,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("/pay/order") @Validated @@ -55,8 +55,8 @@ public class PayOrderController { private PayAppService appService; @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('pay:order:query')") public CommonResult getOrder(@RequestParam("id") Long id) { PayOrderDO order = orderService.getOrder(id); @@ -83,7 +83,7 @@ public class PayOrderController { } @GetMapping("/page") - @ApiOperation("获得支付订单分页") + @Operation(summary = "获得支付订单分页") @PreAuthorize("@ss.hasPermission('pay:order:query')") public CommonResult> getOrderPage(@Valid PayOrderPageReqVO pageVO) { PageResult pageResult = orderService.getOrderPage(pageVO); @@ -114,7 +114,7 @@ public class PayOrderController { } @GetMapping("/export-excel") - @ApiOperation("导出支付订单Excel") + @Operation(summary = "导出支付订单Excel") @PreAuthorize("@ss.hasPermission('pay:order:export')") @OperateLog(type = EXPORT) public void exportOrderExcel(@Valid PayOrderExportReqVO exportReqVO, diff --git a/yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/controller/admin/order/vo/PayOrderBaseVO.java b/yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/controller/admin/order/vo/PayOrderBaseVO.java index 6928ca3c8a..ebf07630f7 100755 --- a/yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/controller/admin/order/vo/PayOrderBaseVO.java +++ b/yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/controller/admin/order/vo/PayOrderBaseVO.java @@ -1,6 +1,5 @@ package cn.iocoder.yudao.module.pay.controller.admin.order.vo; - -import io.swagger.annotations.ApiModelProperty; +import io.swagger.v3.oas.annotations.media.Schema; import lombok.Data; import org.springframework.format.annotation.DateTimeFormat; @@ -18,90 +17,90 @@ import static cn.iocoder.yudao.framework.common.util.date.DateUtils.FORMAT_YEAR_ @Data public class PayOrderBaseVO { - @ApiModelProperty(value = "商户编号", required = true) + @Schema(title = "商户编号", required = true) @NotNull(message = "商户编号不能为空") private Long merchantId; - @ApiModelProperty(value = "应用编号", required = true) + @Schema(title = "应用编号", required = true) @NotNull(message = "应用编号不能为空") private Long appId; - @ApiModelProperty(value = "渠道编号") + @Schema(title = "渠道编号") private Long channelId; - @ApiModelProperty(value = "渠道编码") + @Schema(title = "渠道编码") private String channelCode; - @ApiModelProperty(value = "商户订单编号", required = true) + @Schema(title = "商户订单编号", required = true) @NotNull(message = "商户订单编号不能为空") private String merchantOrderId; - @ApiModelProperty(value = "商品标题", required = true) + @Schema(title = "商品标题", required = true) @NotNull(message = "商品标题不能为空") private String subject; - @ApiModelProperty(value = "商品描述", required = true) + @Schema(title = "商品描述", required = true) @NotNull(message = "商品描述不能为空") private String body; - @ApiModelProperty(value = "异步通知地址", required = true) + @Schema(title = "异步通知地址", required = true) @NotNull(message = "异步通知地址不能为空") private String notifyUrl; - @ApiModelProperty(value = "通知商户支付结果的回调状态", required = true) + @Schema(title = "通知商户支付结果的回调状态", required = true) @NotNull(message = "通知商户支付结果的回调状态不能为空") private Integer notifyStatus; - @ApiModelProperty(value = "支付金额,单位:分", required = true) + @Schema(title = "支付金额,单位:分", required = true) @NotNull(message = "支付金额,单位:分不能为空") private Long amount; - @ApiModelProperty(value = "渠道手续费,单位:百分比") + @Schema(title = "渠道手续费,单位:百分比") private Double channelFeeRate; - @ApiModelProperty(value = "渠道手续金额,单位:分") + @Schema(title = "渠道手续金额,单位:分") private Long channelFeeAmount; - @ApiModelProperty(value = "支付状态", required = true) + @Schema(title = "支付状态", required = true) @NotNull(message = "支付状态不能为空") private Integer status; - @ApiModelProperty(value = "用户 IP", required = true) + @Schema(title = "用户 IP", required = true) @NotNull(message = "用户 IP不能为空") private String userIp; - @ApiModelProperty(value = "订单失效时间", required = true) + @Schema(title = "订单失效时间", required = true) @NotNull(message = "订单失效时间不能为空") @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND) private LocalDateTime expireTime; - @ApiModelProperty(value = "订单支付成功时间") + @Schema(title = "订单支付成功时间") @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND) private LocalDateTime successTime; - @ApiModelProperty(value = "订单支付通知时间") + @Schema(title = "订单支付通知时间") @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND) private LocalDateTime notifyTime; - @ApiModelProperty(value = "支付成功的订单拓展单编号") + @Schema(title = "支付成功的订单拓展单编号") private Long successExtensionId; - @ApiModelProperty(value = "退款状态", required = true) + @Schema(title = "退款状态", required = true) @NotNull(message = "退款状态不能为空") private Integer refundStatus; - @ApiModelProperty(value = "退款次数", required = true) + @Schema(title = "退款次数", required = true) @NotNull(message = "退款次数不能为空") private Integer refundTimes; - @ApiModelProperty(value = "退款总金额,单位:分", required = true) + @Schema(title = "退款总金额,单位:分", required = true) @NotNull(message = "退款总金额,单位:分不能为空") private Long refundAmount; - @ApiModelProperty(value = "渠道用户编号") + @Schema(title = "渠道用户编号") private String channelUserId; - @ApiModelProperty(value = "渠道订单号") + @Schema(title = "渠道订单号") private String channelOrderNo; } diff --git a/yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/controller/admin/order/vo/PayOrderDetailsRespVO.java b/yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/controller/admin/order/vo/PayOrderDetailsRespVO.java index 8c35a0f8fa..25ec3c9dcf 100644 --- a/yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/controller/admin/order/vo/PayOrderDetailsRespVO.java +++ b/yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/controller/admin/order/vo/PayOrderDetailsRespVO.java @@ -1,32 +1,31 @@ package cn.iocoder.yudao.module.pay.controller.admin.order.vo; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; +import io.swagger.v3.oas.annotations.media.Schema; import lombok.Data; import lombok.EqualsAndHashCode; import lombok.ToString; import java.time.LocalDateTime; -@ApiModel("管理后台 - 支付订单详细信息 Response VO") +@Schema(title = "管理后台 - 支付订单详细信息 Response VO") @Data @EqualsAndHashCode(callSuper = true) @ToString(callSuper = true) public class PayOrderDetailsRespVO extends PayOrderBaseVO { - @ApiModelProperty(value = "支付订单编号") + @Schema(title = "支付订单编号") private Long id; - @ApiModelProperty(value = "商户名称") + @Schema(title = "商户名称") private String merchantName; - @ApiModelProperty(value = "应用名称") + @Schema(title = "应用名称") private String appName; - @ApiModelProperty(value = "渠道编号名称") + @Schema(title = "渠道编号名称") private String channelCodeName; - @ApiModelProperty(value = "创建时间") + @Schema(title = "创建时间") private LocalDateTime createTime; /** @@ -35,13 +34,13 @@ public class PayOrderDetailsRespVO extends PayOrderBaseVO { private PayOrderExtension payOrderExtension; @Data - @ApiModel("支付订单扩展") + @Schema(title = "支付订单扩展") public static class PayOrderExtension { - @ApiModelProperty(value = "支付订单号") + @Schema(title = "支付订单号") private String no; - @ApiModelProperty(value = "支付异步通知的内容") + @Schema(title = "支付异步通知的内容") private String channelNotifyData; } diff --git a/yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/controller/admin/order/vo/PayOrderExportReqVO.java b/yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/controller/admin/order/vo/PayOrderExportReqVO.java index 955b5787e2..cb08e04d4f 100755 --- a/yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/controller/admin/order/vo/PayOrderExportReqVO.java +++ b/yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/controller/admin/order/vo/PayOrderExportReqVO.java @@ -1,7 +1,6 @@ package cn.iocoder.yudao.module.pay.controller.admin.order.vo; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; +import io.swagger.v3.oas.annotations.media.Schema; import lombok.Data; import org.springframework.format.annotation.DateTimeFormat; @@ -9,84 +8,84 @@ 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 = "参数和 PayOrderPageReqVO 是一致的") +@Schema(title = "管理后台 - 支付订单 Excel 导出 Request VO", description = "参数和 PayOrderPageReqVO 是一致的") @Data public class PayOrderExportReqVO { - @ApiModelProperty(value = "商户编号") + @Schema(title = "商户编号") private Long merchantId; - @ApiModelProperty(value = "应用编号") + @Schema(title = "应用编号") private Long appId; - @ApiModelProperty(value = "渠道编号") + @Schema(title = "渠道编号") private Long channelId; - @ApiModelProperty(value = "渠道编码") + @Schema(title = "渠道编码") private String channelCode; - @ApiModelProperty(value = "商户订单编号") + @Schema(title = "商户订单编号") private String merchantOrderId; - @ApiModelProperty(value = "商品标题") + @Schema(title = "商品标题") private String subject; - @ApiModelProperty(value = "商品描述") + @Schema(title = "商品描述") private String body; - @ApiModelProperty(value = "异步通知地址") + @Schema(title = "异步通知地址") private String notifyUrl; - @ApiModelProperty(value = "通知商户支付结果的回调状态") + @Schema(title = "通知商户支付结果的回调状态") private Integer notifyStatus; - @ApiModelProperty(value = "支付金额,单位:分") + @Schema(title = "支付金额,单位:分") private Long amount; - @ApiModelProperty(value = "渠道手续费,单位:百分比") + @Schema(title = "渠道手续费,单位:百分比") private Double channelFeeRate; - @ApiModelProperty(value = "渠道手续金额,单位:分") + @Schema(title = "渠道手续金额,单位:分") private Long channelFeeAmount; - @ApiModelProperty(value = "支付状态") + @Schema(title = "支付状态") private Integer status; - @ApiModelProperty(value = "用户 IP") + @Schema(title = "用户 IP") private String userIp; @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND) - @ApiModelProperty(value = "订单失效时间") + @Schema(title = "订单失效时间") private LocalDateTime[] expireTime; @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND) - @ApiModelProperty(value = "开始订单支付成功时间") + @Schema(title = "开始订单支付成功时间") private LocalDateTime[] successTime; @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND) - @ApiModelProperty(value = "开始订单支付通知时间") + @Schema(title = "开始订单支付通知时间") private LocalDateTime[] notifyTime; - @ApiModelProperty(value = "支付成功的订单拓展单编号") + @Schema(title = "支付成功的订单拓展单编号") private Long successExtensionId; - @ApiModelProperty(value = "退款状态") + @Schema(title = "退款状态") private Integer refundStatus; - @ApiModelProperty(value = "退款次数") + @Schema(title = "退款次数") private Integer refundTimes; - @ApiModelProperty(value = "退款总金额,单位:分") + @Schema(title = "退款总金额,单位:分") private Long refundAmount; - @ApiModelProperty(value = "渠道用户编号") + @Schema(title = "渠道用户编号") private String channelUserId; - @ApiModelProperty(value = "渠道订单号") + @Schema(title = "渠道订单号") private String channelOrderNo; @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND) - @ApiModelProperty(value = "创建时间") + @Schema(title = "创建时间") private LocalDateTime[] createTime; } diff --git a/yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/controller/admin/order/vo/PayOrderPageItemRespVO.java b/yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/controller/admin/order/vo/PayOrderPageItemRespVO.java index ec1e405a73..795d2f804d 100755 --- a/yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/controller/admin/order/vo/PayOrderPageItemRespVO.java +++ b/yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/controller/admin/order/vo/PayOrderPageItemRespVO.java @@ -1,35 +1,34 @@ package cn.iocoder.yudao.module.pay.controller.admin.order.vo; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; +import io.swagger.v3.oas.annotations.media.Schema; import lombok.Data; import lombok.EqualsAndHashCode; import lombok.ToString; import java.time.LocalDateTime; -@ApiModel("管理后台 - 支付订单分页 Request VO") +@Schema(title = "管理后台 - 支付订单分页 Request VO") @Data @EqualsAndHashCode(callSuper = true) @ToString(callSuper = true) public class PayOrderPageItemRespVO extends PayOrderBaseVO { - @ApiModelProperty(value = "支付订单编号", required = true) + @Schema(title = "支付订单编号", required = true) private Long id; - @ApiModelProperty(value = "创建时间", required = true) + @Schema(title = "创建时间", required = true) private LocalDateTime createTime; - @ApiModelProperty(value = "商户名称") + @Schema(title = "商户名称") private String merchantName; - @ApiModelProperty(value = "应用名称") + @Schema(title = "应用名称") private String appName; - @ApiModelProperty(value = "渠道名称") + @Schema(title = "渠道名称") private String channelCodeName; - @ApiModelProperty(value = "支付订单号") + @Schema(title = "支付订单号") private String no; diff --git a/yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/controller/admin/order/vo/PayOrderPageReqVO.java b/yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/controller/admin/order/vo/PayOrderPageReqVO.java index 2ae90322a4..61d0ab250a 100755 --- a/yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/controller/admin/order/vo/PayOrderPageReqVO.java +++ b/yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/controller/admin/order/vo/PayOrderPageReqVO.java @@ -1,8 +1,7 @@ package cn.iocoder.yudao.module.pay.controller.admin.order.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 lombok.Data; import lombok.EqualsAndHashCode; import lombok.ToString; @@ -12,86 +11,86 @@ 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(title = "管理后台 - 支付订单分页 Request VO") @Data @EqualsAndHashCode(callSuper = true) @ToString(callSuper = true) public class PayOrderPageReqVO extends PageParam { - @ApiModelProperty(value = "商户编号") + @Schema(title = "商户编号") private Long merchantId; - @ApiModelProperty(value = "应用编号") + @Schema(title = "应用编号") private Long appId; - @ApiModelProperty(value = "渠道编号") + @Schema(title = "渠道编号") private Long channelId; - @ApiModelProperty(value = "渠道编码") + @Schema(title = "渠道编码") private String channelCode; - @ApiModelProperty(value = "商户订单编号") + @Schema(title = "商户订单编号") private String merchantOrderId; - @ApiModelProperty(value = "商品标题") + @Schema(title = "商品标题") private String subject; - @ApiModelProperty(value = "商品描述") + @Schema(title = "商品描述") private String body; - @ApiModelProperty(value = "异步通知地址") + @Schema(title = "异步通知地址") private String notifyUrl; - @ApiModelProperty(value = "通知商户支付结果的回调状态") + @Schema(title = "通知商户支付结果的回调状态") private Integer notifyStatus; - @ApiModelProperty(value = "支付金额,单位:分") + @Schema(title = "支付金额,单位:分") private Long amount; - @ApiModelProperty(value = "渠道手续费,单位:百分比") + @Schema(title = "渠道手续费,单位:百分比") private Double channelFeeRate; - @ApiModelProperty(value = "渠道手续金额,单位:分") + @Schema(title = "渠道手续金额,单位:分") private Long channelFeeAmount; - @ApiModelProperty(value = "支付状态") + @Schema(title = "支付状态") private Integer status; - @ApiModelProperty(value = "用户 IP") + @Schema(title = "用户 IP") private String userIp; @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND) - @ApiModelProperty(value = "订单失效时间") + @Schema(title = "订单失效时间") private LocalDateTime[] expireTime; @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND) - @ApiModelProperty(value = "订单支付成功时间") + @Schema(title = "订单支付成功时间") private LocalDateTime[] successTime; @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND) - @ApiModelProperty(value = "订单支付通知时间") + @Schema(title = "订单支付通知时间") private LocalDateTime[] notifyTime; - @ApiModelProperty(value = "支付成功的订单拓展单编号") + @Schema(title = "支付成功的订单拓展单编号") private Long successExtensionId; - @ApiModelProperty(value = "退款状态") + @Schema(title = "退款状态") private Integer refundStatus; - @ApiModelProperty(value = "退款次数") + @Schema(title = "退款次数") private Integer refundTimes; - @ApiModelProperty(value = "退款总金额,单位:分") + @Schema(title = "退款总金额,单位:分") private Long refundAmount; - @ApiModelProperty(value = "渠道用户编号") + @Schema(title = "渠道用户编号") private String channelUserId; - @ApiModelProperty(value = "渠道订单号") + @Schema(title = "渠道订单号") private String channelOrderNo; @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND) - @ApiModelProperty(value = "创建时间") + @Schema(title = "创建时间") private LocalDateTime[] createTime; } diff --git a/yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/controller/admin/order/vo/PayOrderRespVO.java b/yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/controller/admin/order/vo/PayOrderRespVO.java index a22c1d7097..09c71e0550 100755 --- a/yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/controller/admin/order/vo/PayOrderRespVO.java +++ b/yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/controller/admin/order/vo/PayOrderRespVO.java @@ -1,23 +1,22 @@ package cn.iocoder.yudao.module.pay.controller.admin.order.vo; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; +import io.swagger.v3.oas.annotations.media.Schema; import lombok.Data; import lombok.EqualsAndHashCode; import lombok.ToString; import java.time.LocalDateTime; -@ApiModel("管理后台 - 支付订单 Response VO") +@Schema(title = "管理后台 - 支付订单 Response VO") @Data @EqualsAndHashCode(callSuper = true) @ToString(callSuper = true) public class PayOrderRespVO extends PayOrderBaseVO { - @ApiModelProperty(value = "支付订单编号", required = true) + @Schema(title = "支付订单编号", required = true) private Long id; - @ApiModelProperty(value = "创建时间", required = true) + @Schema(title = "创建时间", required = true) private LocalDateTime createTime; } diff --git a/yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/controller/admin/refund/PayRefundController.java b/yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/controller/admin/refund/PayRefundController.java index 58cb24fa3a..e16e511150 100755 --- a/yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/controller/admin/refund/PayRefundController.java +++ b/yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/controller/admin/refund/PayRefundController.java @@ -18,9 +18,9 @@ import cn.iocoder.yudao.framework.common.util.collection.CollectionUtils; import cn.iocoder.yudao.framework.excel.core.util.ExcelUtils; import cn.iocoder.yudao.framework.operatelog.core.annotations.OperateLog; import cn.iocoder.yudao.framework.pay.core.enums.PayChannelEnum; -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; @@ -39,7 +39,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("/pay/refund") @Validated @@ -55,8 +55,8 @@ public class PayRefundController { private PayOrderService orderService; @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('pay:refund:query')") public CommonResult getRefund(@RequestParam("id") Long id) { PayRefundDO refund = refundService.getRefund(id); @@ -79,7 +79,7 @@ public class PayRefundController { } @GetMapping("/page") - @ApiOperation("获得退款订单分页") + @Operation(summary = "获得退款订单分页") @PreAuthorize("@ss.hasPermission('pay:refund:query')") public CommonResult> getRefundPage(@Valid PayRefundPageReqVO pageVO) { PageResult pageResult = refundService.getRefundPage(pageVO); @@ -111,7 +111,7 @@ public class PayRefundController { } @GetMapping("/export-excel") - @ApiOperation("导出退款订单 Excel") + @Operation(summary = "导出退款订单 Excel") @PreAuthorize("@ss.hasPermission('pay:refund:export')") @OperateLog(type = EXPORT) public void exportRefundExcel(@Valid PayRefundExportReqVO exportReqVO, diff --git a/yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/controller/admin/refund/vo/PayRefundBaseVO.java b/yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/controller/admin/refund/vo/PayRefundBaseVO.java index f797806838..5df3ffa066 100755 --- a/yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/controller/admin/refund/vo/PayRefundBaseVO.java +++ b/yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/controller/admin/refund/vo/PayRefundBaseVO.java @@ -1,6 +1,5 @@ package cn.iocoder.yudao.module.pay.controller.admin.refund.vo; - -import io.swagger.annotations.ApiModelProperty; +import io.swagger.v3.oas.annotations.media.Schema; import lombok.Data; import org.springframework.format.annotation.DateTimeFormat; @@ -16,94 +15,94 @@ import static cn.iocoder.yudao.framework.common.util.date.DateUtils.FORMAT_YEAR_ @Data public class PayRefundBaseVO { - @ApiModelProperty(value = "商户编号", required = true) + @Schema(title = "商户编号", required = true) @NotNull(message = "商户编号不能为空") private Long merchantId; - @ApiModelProperty(value = "应用编号", required = true) + @Schema(title = "应用编号", required = true) @NotNull(message = "应用编号不能为空") private Long appId; - @ApiModelProperty(value = "渠道编号", required = true) + @Schema(title = "渠道编号", required = true) @NotNull(message = "渠道编号不能为空") private Long channelId; - @ApiModelProperty(value = "渠道编码", required = true) + @Schema(title = "渠道编码", required = true) @NotNull(message = "渠道编码不能为空") private String channelCode; - @ApiModelProperty(value = "支付订单编号 pay_order 表id", required = true) + @Schema(title = "支付订单编号 pay_order 表id", required = true) @NotNull(message = "支付订单编号 pay_order 表id不能为空") private Long orderId; - @ApiModelProperty(value = "交易订单号 pay_extension 表no 字段", required = true) + @Schema(title = "交易订单号 pay_extension 表no 字段", required = true) @NotNull(message = "交易订单号 pay_extension 表no 字段不能为空") private String tradeNo; - @ApiModelProperty(value = "商户订单编号(商户系统生成)", required = true) + @Schema(title = "商户订单编号(商户系统生成)", required = true) @NotNull(message = "商户订单编号(商户系统生成)不能为空") private String merchantOrderId; - @ApiModelProperty(value = "商户退款订单号(商户系统生成)", required = true) + @Schema(title = "商户退款订单号(商户系统生成)", required = true) @NotNull(message = "商户退款订单号(商户系统生成)不能为空") private String merchantRefundNo; - @ApiModelProperty(value = "异步通知商户地址", required = true) + @Schema(title = "异步通知商户地址", required = true) @NotNull(message = "异步通知商户地址不能为空") private String notifyUrl; - @ApiModelProperty(value = "通知商户退款结果的回调状态", required = true) + @Schema(title = "通知商户退款结果的回调状态", required = true) @NotNull(message = "通知商户退款结果的回调状态不能为空") private Integer notifyStatus; - @ApiModelProperty(value = "退款状态", required = true) + @Schema(title = "退款状态", required = true) @NotNull(message = "退款状态不能为空") private Integer status; - @ApiModelProperty(value = "退款类型(部分退款,全部退款)", required = true) + @Schema(title = "退款类型(部分退款,全部退款)", required = true) @NotNull(message = "退款类型(部分退款,全部退款)不能为空") private Integer type; - @ApiModelProperty(value = "支付金额,单位分", required = true) + @Schema(title = "支付金额,单位分", required = true) @NotNull(message = "支付金额,单位分不能为空") private Long payAmount; - @ApiModelProperty(value = "退款金额,单位分", required = true) + @Schema(title = "退款金额,单位分", required = true) @NotNull(message = "退款金额,单位分不能为空") private Long refundAmount; - @ApiModelProperty(value = "退款原因", required = true) + @Schema(title = "退款原因", required = true) @NotNull(message = "退款原因不能为空") private String reason; - @ApiModelProperty(value = "用户 IP") + @Schema(title = "用户 IP") private String userIp; - @ApiModelProperty(value = "渠道订单号,pay_order 中的channel_order_no 对应", required = true) + @Schema(title = "渠道订单号,pay_order 中的channel_order_no 对应", required = true) @NotNull(message = "渠道订单号,pay_order 中的channel_order_no 对应不能为空") private String channelOrderNo; - @ApiModelProperty(value = "渠道退款单号,渠道返回") + @Schema(title = "渠道退款单号,渠道返回") private String channelRefundNo; - @ApiModelProperty(value = "渠道调用报错时,错误码") + @Schema(title = "渠道调用报错时,错误码") private String channelErrorCode; - @ApiModelProperty(value = "渠道调用报错时,错误信息") + @Schema(title = "渠道调用报错时,错误信息") private String channelErrorMsg; - @ApiModelProperty(value = "支付渠道的额外参数") + @Schema(title = "支付渠道的额外参数") private String channelExtras; - @ApiModelProperty(value = "退款失效时间") + @Schema(title = "退款失效时间") @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND) private LocalDateTime expireTime; - @ApiModelProperty(value = "退款成功时间") + @Schema(title = "退款成功时间") @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND) private LocalDateTime successTime; - @ApiModelProperty(value = "退款通知时间") + @Schema(title = "退款通知时间") @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND) private LocalDateTime notifyTime; diff --git a/yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/controller/admin/refund/vo/PayRefundCreateReqVO.java b/yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/controller/admin/refund/vo/PayRefundCreateReqVO.java index cc09111ef0..7f100464e7 100755 --- a/yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/controller/admin/refund/vo/PayRefundCreateReqVO.java +++ b/yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/controller/admin/refund/vo/PayRefundCreateReqVO.java @@ -1,9 +1,8 @@ package cn.iocoder.yudao.module.pay.controller.admin.refund.vo; - +import io.swagger.v3.oas.annotations.media.Schema; import lombok.*; -import io.swagger.annotations.*; -@ApiModel("管理后台 - 退款订单创建 Request VO") +@Schema(title = "管理后台 - 退款订单创建 Request VO") @Data @EqualsAndHashCode(callSuper = true) @ToString(callSuper = true) diff --git a/yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/controller/admin/refund/vo/PayRefundDetailsRespVO.java b/yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/controller/admin/refund/vo/PayRefundDetailsRespVO.java index dcabd031dc..9ad9fbd207 100755 --- a/yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/controller/admin/refund/vo/PayRefundDetailsRespVO.java +++ b/yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/controller/admin/refund/vo/PayRefundDetailsRespVO.java @@ -1,7 +1,6 @@ package cn.iocoder.yudao.module.pay.controller.admin.refund.vo; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; +import io.swagger.v3.oas.annotations.media.Schema; import lombok.Data; import lombok.EqualsAndHashCode; import lombok.ToString; @@ -9,31 +8,31 @@ import lombok.ToString; import javax.validation.constraints.NotNull; import java.time.LocalDateTime; -@ApiModel("管理后台 - 退款订单详情 Response VO") +@Schema(title = "管理后台 - 退款订单详情 Response VO") @Data @EqualsAndHashCode(callSuper = true) @ToString(callSuper = true) public class PayRefundDetailsRespVO extends PayRefundBaseVO { - @ApiModelProperty(value = "支付退款编号", required = true) + @Schema(title = "支付退款编号", required = true) private Long id; - @ApiModelProperty(value = "商户名称") + @Schema(title = "商户名称") private String merchantName; - @ApiModelProperty(value = "应用名称") + @Schema(title = "应用名称") private String appName; - @ApiModelProperty(value = "渠道编号名称") + @Schema(title = "渠道编号名称") private String channelCodeName; @NotNull(message = "商品标题不能为空") private String subject; - @ApiModelProperty(value = "创建时间") + @Schema(title = "创建时间") private LocalDateTime createTime; - @ApiModelProperty(value = "更新时间") + @Schema(title = "更新时间") private LocalDateTime updateTime; } diff --git a/yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/controller/admin/refund/vo/PayRefundExportReqVO.java b/yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/controller/admin/refund/vo/PayRefundExportReqVO.java index b39f82dd35..bb1a25f914 100755 --- a/yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/controller/admin/refund/vo/PayRefundExportReqVO.java +++ b/yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/controller/admin/refund/vo/PayRefundExportReqVO.java @@ -1,7 +1,6 @@ package cn.iocoder.yudao.module.pay.controller.admin.refund.vo; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; +import io.swagger.v3.oas.annotations.media.Schema; import lombok.Data; import org.springframework.format.annotation.DateTimeFormat; @@ -9,87 +8,87 @@ 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 = "参数和 PayRefundPageReqVO 是一致的") +@Schema(title = "管理后台 - 退款订单 Excel 导出 Request VO", description = "参数和 PayRefundPageReqVO 是一致的") @Data public class PayRefundExportReqVO { - @ApiModelProperty(value = "商户编号") + @Schema(title = "商户编号") private Long merchantId; - @ApiModelProperty(value = "应用编号") + @Schema(title = "应用编号") private Long appId; - @ApiModelProperty(value = "渠道编号") + @Schema(title = "渠道编号") private Long channelId; - @ApiModelProperty(value = "渠道编码") + @Schema(title = "渠道编码") private String channelCode; - @ApiModelProperty(value = "支付订单编号 pay_order 表id") + @Schema(title = "支付订单编号 pay_order 表id") private Long orderId; - @ApiModelProperty(value = "交易订单号 pay_extension 表no 字段") + @Schema(title = "交易订单号 pay_extension 表no 字段") private String tradeNo; - @ApiModelProperty(value = "商户订单编号(商户系统生成)") + @Schema(title = "商户订单编号(商户系统生成)") private String merchantOrderId; - @ApiModelProperty(value = "商户退款订单号(商户系统生成)") + @Schema(title = "商户退款订单号(商户系统生成)") private String merchantRefundNo; - @ApiModelProperty(value = "异步通知商户地址") + @Schema(title = "异步通知商户地址") private String notifyUrl; - @ApiModelProperty(value = "通知商户退款结果的回调状态") + @Schema(title = "通知商户退款结果的回调状态") private Integer notifyStatus; - @ApiModelProperty(value = "退款状态") + @Schema(title = "退款状态") private Integer status; - @ApiModelProperty(value = "退款类型(部分退款,全部退款)") + @Schema(title = "退款类型(部分退款,全部退款)") private Integer type; - @ApiModelProperty(value = "支付金额,单位分") + @Schema(title = "支付金额,单位分") private Long payAmount; - @ApiModelProperty(value = "退款金额,单位分") + @Schema(title = "退款金额,单位分") private Long refundAmount; - @ApiModelProperty(value = "退款原因") + @Schema(title = "退款原因") private String reason; - @ApiModelProperty(value = "用户 IP") + @Schema(title = "用户 IP") private String userIp; - @ApiModelProperty(value = "渠道订单号,pay_order 中的channel_order_no 对应") + @Schema(title = "渠道订单号,pay_order 中的channel_order_no 对应") private String channelOrderNo; - @ApiModelProperty(value = "渠道退款单号,渠道返回") + @Schema(title = "渠道退款单号,渠道返回") private String channelRefundNo; - @ApiModelProperty(value = "渠道调用报错时,错误码") + @Schema(title = "渠道调用报错时,错误码") private String channelErrorCode; - @ApiModelProperty(value = "渠道调用报错时,错误信息") + @Schema(title = "渠道调用报错时,错误信息") private String channelErrorMsg; - @ApiModelProperty(value = "支付渠道的额外参数") + @Schema(title = "支付渠道的额外参数") private String channelExtras; @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND) - @ApiModelProperty(value = "退款失效时间") + @Schema(title = "退款失效时间") private LocalDateTime[] expireTime; @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND) - @ApiModelProperty(value = "退款成功时间") + @Schema(title = "退款成功时间") private LocalDateTime[] successTime; @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND) - @ApiModelProperty(value = "退款通知时间") + @Schema(title = "退款通知时间") private LocalDateTime[] notifyTime; @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND) - @ApiModelProperty(value = "创建时间") + @Schema(title = "创建时间") private LocalDateTime[] createTime; } diff --git a/yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/controller/admin/refund/vo/PayRefundPageItemRespVO.java b/yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/controller/admin/refund/vo/PayRefundPageItemRespVO.java index b57a34c068..192a11c44b 100755 --- a/yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/controller/admin/refund/vo/PayRefundPageItemRespVO.java +++ b/yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/controller/admin/refund/vo/PayRefundPageItemRespVO.java @@ -1,32 +1,31 @@ package cn.iocoder.yudao.module.pay.controller.admin.refund.vo; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; +import io.swagger.v3.oas.annotations.media.Schema; import lombok.Data; import lombok.EqualsAndHashCode; import lombok.ToString; import java.time.LocalDateTime; -@ApiModel("管理后台 - 退款订单分页查询 Response VO") +@Schema(title = "管理后台 - 退款订单分页查询 Response VO") @Data @EqualsAndHashCode(callSuper = true) @ToString(callSuper = true) public class PayRefundPageItemRespVO extends PayRefundBaseVO { - @ApiModelProperty(value = "支付订单编号", required = true) + @Schema(title = "支付订单编号", required = true) private Long id; - @ApiModelProperty(value = "商户名称") + @Schema(title = "商户名称") private String merchantName; - @ApiModelProperty(value = "应用名称") + @Schema(title = "应用名称") private String appName; - @ApiModelProperty(value = "渠道名称") + @Schema(title = "渠道名称") private String channelCodeName; - @ApiModelProperty(value = "创建时间", required = true) + @Schema(title = "创建时间", required = true) private LocalDateTime createTime; } diff --git a/yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/controller/admin/refund/vo/PayRefundPageReqVO.java b/yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/controller/admin/refund/vo/PayRefundPageReqVO.java index 141e2a77fb..c126cfe0f4 100755 --- a/yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/controller/admin/refund/vo/PayRefundPageReqVO.java +++ b/yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/controller/admin/refund/vo/PayRefundPageReqVO.java @@ -1,8 +1,7 @@ package cn.iocoder.yudao.module.pay.controller.admin.refund.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 lombok.Data; import lombok.EqualsAndHashCode; import lombok.ToString; @@ -12,89 +11,89 @@ 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(title = "管理后台 - 退款订单分页 Request VO") @Data @EqualsAndHashCode(callSuper = true) @ToString(callSuper = true) public class PayRefundPageReqVO extends PageParam { - @ApiModelProperty(value = "商户编号") + @Schema(title = "商户编号") private Long merchantId; - @ApiModelProperty(value = "应用编号") + @Schema(title = "应用编号") private Long appId; - @ApiModelProperty(value = "渠道编号") + @Schema(title = "渠道编号") private Long channelId; - @ApiModelProperty(value = "渠道编码") + @Schema(title = "渠道编码") private String channelCode; - @ApiModelProperty(value = "支付订单编号 pay_order 表id") + @Schema(title = "支付订单编号 pay_order 表id") private Long orderId; - @ApiModelProperty(value = "交易订单号 pay_extension 表no 字段") + @Schema(title = "交易订单号 pay_extension 表no 字段") private String tradeNo; - @ApiModelProperty(value = "商户订单编号(商户系统生成)") + @Schema(title = "商户订单编号(商户系统生成)") private String merchantOrderId; - @ApiModelProperty(value = "商户退款订单号(商户系统生成)") + @Schema(title = "商户退款订单号(商户系统生成)") private String merchantRefundNo; - @ApiModelProperty(value = "异步通知商户地址") + @Schema(title = "异步通知商户地址") private String notifyUrl; - @ApiModelProperty(value = "通知商户退款结果的回调状态") + @Schema(title = "通知商户退款结果的回调状态") private Integer notifyStatus; - @ApiModelProperty(value = "退款状态") + @Schema(title = "退款状态") private Integer status; - @ApiModelProperty(value = "退款类型(部分退款,全部退款)") + @Schema(title = "退款类型(部分退款,全部退款)") private Integer type; - @ApiModelProperty(value = "支付金额,单位分") + @Schema(title = "支付金额,单位分") private Long payAmount; - @ApiModelProperty(value = "退款金额,单位分") + @Schema(title = "退款金额,单位分") private Long refundAmount; - @ApiModelProperty(value = "退款原因") + @Schema(title = "退款原因") private String reason; - @ApiModelProperty(value = "用户 IP") + @Schema(title = "用户 IP") private String userIp; - @ApiModelProperty(value = "渠道订单号,pay_order 中的channel_order_no 对应") + @Schema(title = "渠道订单号,pay_order 中的channel_order_no 对应") private String channelOrderNo; - @ApiModelProperty(value = "渠道退款单号,渠道返回") + @Schema(title = "渠道退款单号,渠道返回") private String channelRefundNo; - @ApiModelProperty(value = "渠道调用报错时,错误码") + @Schema(title = "渠道调用报错时,错误码") private String channelErrorCode; - @ApiModelProperty(value = "渠道调用报错时,错误信息") + @Schema(title = "渠道调用报错时,错误信息") private String channelErrorMsg; - @ApiModelProperty(value = "支付渠道的额外参数") + @Schema(title = "支付渠道的额外参数") private String channelExtras; @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND) - @ApiModelProperty(value = "退款失效时间") + @Schema(title = "退款失效时间") private LocalDateTime[] expireTime; @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND) - @ApiModelProperty(value = "退款成功时间") + @Schema(title = "退款成功时间") private LocalDateTime[] successTime; @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND) - @ApiModelProperty(value = "退款通知时间") + @Schema(title = "退款通知时间") private LocalDateTime[] notifyTime; @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND) - @ApiModelProperty(value = "创建时间") + @Schema(title = "创建时间") private LocalDateTime[] createTime; } diff --git a/yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/controller/admin/refund/vo/PayRefundRespVO.java b/yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/controller/admin/refund/vo/PayRefundRespVO.java index e5453fbd41..6f040aafc5 100755 --- a/yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/controller/admin/refund/vo/PayRefundRespVO.java +++ b/yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/controller/admin/refund/vo/PayRefundRespVO.java @@ -1,23 +1,22 @@ package cn.iocoder.yudao.module.pay.controller.admin.refund.vo; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; +import io.swagger.v3.oas.annotations.media.Schema; import lombok.Data; import lombok.EqualsAndHashCode; import lombok.ToString; import java.time.LocalDateTime; -@ApiModel("管理后台 - 退款订单 Response VO") +@Schema(title = "管理后台 - 退款订单 Response VO") @Data @EqualsAndHashCode(callSuper = true) @ToString(callSuper = true) public class PayRefundRespVO extends PayRefundBaseVO { - @ApiModelProperty(value = "支付退款编号", required = true) + @Schema(title = "支付退款编号", required = true) private Long id; - @ApiModelProperty(value = "创建时间", required = true) + @Schema(title = "创建时间", required = true) private LocalDateTime createTime; } diff --git a/yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/controller/admin/refund/vo/PayRefundUpdateReqVO.java b/yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/controller/admin/refund/vo/PayRefundUpdateReqVO.java index b7d5555637..1cb8c75068 100755 --- a/yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/controller/admin/refund/vo/PayRefundUpdateReqVO.java +++ b/yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/controller/admin/refund/vo/PayRefundUpdateReqVO.java @@ -1,16 +1,15 @@ package cn.iocoder.yudao.module.pay.controller.admin.refund.vo; - +import io.swagger.v3.oas.annotations.media.Schema; import lombok.*; -import io.swagger.annotations.*; import javax.validation.constraints.*; -@ApiModel("管理后台 - 退款订单更新 Request VO") +@Schema(title = "管理后台 - 退款订单更新 Request VO") @Data @EqualsAndHashCode(callSuper = true) @ToString(callSuper = true) public class PayRefundUpdateReqVO extends PayRefundBaseVO { - @ApiModelProperty(value = "支付退款编号", required = true) + @Schema(title = "支付退款编号", required = true) @NotNull(message = "支付退款编号不能为空") private Long id; diff --git a/yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/controller/app/order/AppPayOrderController.java b/yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/controller/app/order/AppPayOrderController.java index e01f7f4f48..8d99bc6a47 100644 --- a/yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/controller/app/order/AppPayOrderController.java +++ b/yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/controller/app/order/AppPayOrderController.java @@ -12,8 +12,8 @@ import cn.iocoder.yudao.module.pay.service.order.PayOrderService; import cn.iocoder.yudao.module.pay.service.order.dto.PayOrderSubmitReqDTO; import cn.iocoder.yudao.module.pay.service.order.dto.PayOrderSubmitRespDTO; import cn.iocoder.yudao.module.pay.service.refund.PayRefundService; -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.*; @@ -26,7 +26,7 @@ import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success; import static cn.iocoder.yudao.framework.common.util.servlet.ServletUtils.getClientIP; import static cn.iocoder.yudao.module.pay.enums.ErrorCodeConstants.*; -@Api(tags = "用户 APP - 支付订单") +@Tag(name = "用户 APP - 支付订单") @RestController @RequestMapping("/pay/order") @Validated @@ -42,7 +42,7 @@ public class AppPayOrderController { private PayClientFactory payClientFactory; @PostMapping("/submit") - @ApiOperation("提交支付订单") + @Operation(summary = "提交支付订单") // @PreAuthenticated // TODO 暂时不加登陆验证,前端暂时没做好 public CommonResult submitPayOrder(@RequestBody AppPayOrderSubmitReqVO reqVO) { // 获得订单 @@ -63,7 +63,7 @@ public class AppPayOrderController { // TODO @芋艿:是不是放到 notify 模块更合适 //TODO 芋道源码 换成了统一的地址了 /notify/{channelId},测试通过可以删除 @PostMapping("/notify/wx-pub/{channelId}") - @ApiOperation("通知微信公众号支付的结果") + @Operation(summary = "通知微信公众号支付的结果") public String notifyWxPayOrder(@PathVariable("channelId") Long channelId, @RequestBody String xmlData) throws Exception { orderService.notifyPayOrder(channelId, PayNotifyDataDTO.builder().body(xmlData).build()); @@ -77,7 +77,7 @@ public class AppPayOrderController { * @return 返回跳转页面 */ @GetMapping(value = "/return/{channelId}") - @ApiOperation("渠道统一的支付成功返回地址") + @Operation(summary = "渠道统一的支付成功返回地址") public String returnAliPayOrder(@PathVariable("channelId") Long channelId, @RequestParam Map params){ //TODO 可以根据渠道和 app_id 返回不同的页面 log.info("app_id is {}", params.get("app_id")); @@ -93,7 +93,7 @@ public class AppPayOrderController { * @return 成功返回 "success" */ @PostMapping(value = "/notify/{channelId}") - @ApiOperation("渠道统一的支付成功,或退款成功 通知url") + @Operation(summary = "渠道统一的支付成功,或退款成功 通知url") public String notifyChannelPay(@PathVariable("channelId") Long channelId, @RequestParam Map params, @RequestBody String originData) throws Exception { diff --git a/yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/controller/app/order/vo/AppPayOrderSubmitReqVO.java b/yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/controller/app/order/vo/AppPayOrderSubmitReqVO.java index 6834c3838e..e2275f6e49 100644 --- a/yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/controller/app/order/vo/AppPayOrderSubmitReqVO.java +++ b/yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/controller/app/order/vo/AppPayOrderSubmitReqVO.java @@ -1,7 +1,6 @@ package cn.iocoder.yudao.module.pay.controller.app.order.vo; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; +import io.swagger.v3.oas.annotations.media.Schema; import lombok.Data; import lombok.experimental.Accessors; @@ -9,20 +8,20 @@ import javax.validation.constraints.NotEmpty; import javax.validation.constraints.NotNull; import java.util.Map; -@ApiModel("用户 APP - 支付订单提交 Request VO") +@Schema(title = "用户 APP - 支付订单提交 Request VO") @Data @Accessors(chain = true) public class AppPayOrderSubmitReqVO { - @ApiModelProperty(value = "支付单编号", required = true, example = "1024") + @Schema(title = "支付单编号", required = true, example = "1024") @NotNull(message = "支付单编号不能为空") private Long id; - @ApiModelProperty(value = "支付渠道", required = true, example = "wx_pub") + @Schema(title = "支付渠道", required = true, example = "wx_pub") @NotEmpty(message = "支付渠道不能为空") private String channelCode; - @ApiModelProperty(value = "支付渠道的额外参数", notes = "例如说,微信公众号需要传递 openid 参数") + @Schema(title = "支付渠道的额外参数", description = "例如说,微信公众号需要传递 openid 参数") private Map channelExtras; } diff --git a/yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/controller/app/order/vo/AppPayOrderSubmitRespVO.java b/yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/controller/app/order/vo/AppPayOrderSubmitRespVO.java index 7fcffd0975..ee33ef6ac3 100644 --- a/yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/controller/app/order/vo/AppPayOrderSubmitRespVO.java +++ b/yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/controller/app/order/vo/AppPayOrderSubmitRespVO.java @@ -1,13 +1,13 @@ package cn.iocoder.yudao.module.pay.controller.app.order.vo; -import io.swagger.annotations.ApiModel; +import io.swagger.v3.oas.annotations.media.Schema; import lombok.AllArgsConstructor; import lombok.Builder; import lombok.Data; import lombok.NoArgsConstructor; import lombok.experimental.Accessors; -@ApiModel("用户 APP - 支付订单提交 Response VO") +@Schema(title = "用户 APP - 支付订单提交 Response VO") @Data @Accessors(chain = true) @Builder diff --git a/yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/controller/app/refund/AppPayRefundController.java b/yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/controller/app/refund/AppPayRefundController.java index 42fdc5dcb9..855687c04f 100644 --- a/yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/controller/app/refund/AppPayRefundController.java +++ b/yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/controller/app/refund/AppPayRefundController.java @@ -8,8 +8,8 @@ import cn.iocoder.yudao.module.pay.convert.refund.PayRefundConvert; import cn.iocoder.yudao.module.pay.service.order.dto.PayRefundReqDTO; import cn.iocoder.yudao.module.pay.service.refund.PayRefundService; import cn.iocoder.yudao.module.pay.util.PaySeqUtils; -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.PostMapping; @@ -22,7 +22,7 @@ import javax.annotation.Resource; import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success; import static cn.iocoder.yudao.framework.common.util.servlet.ServletUtils.getClientIP; -@Api(tags = "用户 APP - 退款订单") +@Tag(name = "用户 APP - 退款订单") @RestController @RequestMapping("/pay/refund") @Validated @@ -33,7 +33,7 @@ public class AppPayRefundController { private PayRefundService refundService; @PostMapping("/refund") - @ApiOperation("提交退款订单") + @Operation(summary = "提交退款订单") public CommonResult submitRefundOrder(@RequestBody AppPayRefundReqVO reqVO){ PayRefundReqDTO req = PayRefundConvert.INSTANCE.convert(reqVO); req.setUserIp(getClientIP()); diff --git a/yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/controller/app/refund/vo/AppPayRefundReqVO.java b/yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/controller/app/refund/vo/AppPayRefundReqVO.java index 627874561d..6ea1528f18 100644 --- a/yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/controller/app/refund/vo/AppPayRefundReqVO.java +++ b/yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/controller/app/refund/vo/AppPayRefundReqVO.java @@ -1,7 +1,6 @@ package cn.iocoder.yudao.module.pay.controller.app.refund.vo; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; +import io.swagger.v3.oas.annotations.media.Schema; import lombok.AllArgsConstructor; import lombok.Data; import lombok.NoArgsConstructor; @@ -9,25 +8,25 @@ import lombok.NoArgsConstructor; import javax.validation.constraints.NotEmpty; import javax.validation.constraints.NotNull; -@ApiModel("用户 APP - 退款订单 Req VO") +@Schema(title = "用户 APP - 退款订单 Req VO") @Data @NoArgsConstructor @AllArgsConstructor public class AppPayRefundReqVO { - @ApiModelProperty(value = "支付订单编号自增", required = true, example = "10") + @Schema(title = "支付订单编号自增", required = true, example = "10") @NotNull(message = "支付订单编号自增") private Long payOrderId; - @ApiModelProperty(value = "退款金额", required = true, example = "1") + @Schema(title = "退款金额", required = true, example = "1") @NotNull(message = "退款金额") private Long amount; - @ApiModelProperty(value = "退款原因", required = true, example = "不喜欢") + @Schema(title = "退款原因", required = true, example = "不喜欢") @NotEmpty(message = "退款原因") private String reason; - @ApiModelProperty(value = "商户退款订单号", required = true, example = "MR202111180000000001") + @Schema(title = "商户退款订单号", required = true, example = "MR202111180000000001") //TODO 测试暂时模拟生成 //@NotEmpty(message = "商户退款订单号") private String merchantRefundId; diff --git a/yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/controller/app/refund/vo/AppPayRefundRespVO.java b/yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/controller/app/refund/vo/AppPayRefundRespVO.java index 5342432812..21466c05d7 100644 --- a/yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/controller/app/refund/vo/AppPayRefundRespVO.java +++ b/yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/controller/app/refund/vo/AppPayRefundRespVO.java @@ -1,14 +1,13 @@ package cn.iocoder.yudao.module.pay.controller.app.refund.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; import lombok.NoArgsConstructor; import lombok.experimental.Accessors; -@ApiModel("用户 APP - 提交退款订单 Response VO") +@Schema(title = "用户 APP - 提交退款订单 Response VO") @Data @Accessors(chain = true) @Builder @@ -16,7 +15,7 @@ import lombok.experimental.Accessors; @AllArgsConstructor public class AppPayRefundRespVO { - @ApiModelProperty(value = "退款订单编号", required = true, example = "10") + @Schema(title = "退款订单编号", required = true, example = "10") private Long refundId; } diff --git a/yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/service/notify/vo/PayNotifyOrderReqVO.java b/yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/service/notify/vo/PayNotifyOrderReqVO.java index d4f6c1eaec..c9e753c67d 100644 --- a/yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/service/notify/vo/PayNotifyOrderReqVO.java +++ b/yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/service/notify/vo/PayNotifyOrderReqVO.java @@ -1,7 +1,6 @@ package cn.iocoder.yudao.module.pay.service.notify.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; @@ -10,18 +9,18 @@ import lombok.NoArgsConstructor; import javax.validation.constraints.NotEmpty; import javax.validation.constraints.NotNull; -@ApiModel(value = "支付单的通知 Request VO", description = "业务方接入支付回调时,使用该 VO 对象") +@Schema(title = "支付单的通知 Request VO", description = "业务方接入支付回调时,使用该 VO 对象") @Data @Builder @NoArgsConstructor @AllArgsConstructor public class PayNotifyOrderReqVO { - @ApiModelProperty(value = "商户订单编号", required = true, example = "10") + @Schema(title = "商户订单编号", required = true, example = "10") @NotEmpty(message = "商户订单号不能为空") private String merchantOrderId; - @ApiModelProperty(value = "支付订单编号", required = true, example = "20") + @Schema(title = "支付订单编号", required = true, example = "20") @NotNull(message = "支付订单编号不能为空") private Long payOrderId; diff --git a/yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/service/notify/vo/PayRefundOrderReqVO.java b/yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/service/notify/vo/PayRefundOrderReqVO.java index 978283d1b4..ab7d6ea03e 100644 --- a/yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/service/notify/vo/PayRefundOrderReqVO.java +++ b/yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/service/notify/vo/PayRefundOrderReqVO.java @@ -1,7 +1,6 @@ package cn.iocoder.yudao.module.pay.service.notify.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; @@ -10,22 +9,22 @@ import lombok.NoArgsConstructor; import javax.validation.constraints.NotEmpty; import javax.validation.constraints.NotNull; -@ApiModel(value = "退款单的通知 Request VO", description = "业务方接入退款回调时,使用该 VO 对象") +@Schema(title = "退款单的通知 Request VO", description = "业务方接入退款回调时,使用该 VO 对象") @Data @Builder @NoArgsConstructor @AllArgsConstructor public class PayRefundOrderReqVO { - @ApiModelProperty(value = "商户退款单编号", required = true, example = "10") + @Schema(title = "商户退款单编号", required = true, example = "10") @NotEmpty(message = "商户退款单编号不能为空") private String merchantOrderId; - @ApiModelProperty(value = "支付退款编号", required = true, example = "20") + @Schema(title = "支付退款编号", required = true, example = "20") @NotNull(message = "支付退款编号不能为空") private Long payRefundId; - @ApiModelProperty(value = "退款状态(成功,失败)", required = true, example = "10") + @Schema(title = "退款状态(成功,失败)", required = true, example = "10") private Integer status; } diff --git a/yudao-module-system/yudao-module-system-biz/pom.xml b/yudao-module-system/yudao-module-system-biz/pom.xml index ecac34aa57..cf8cf5e589 100644 --- a/yudao-module-system/yudao-module-system-biz/pom.xml +++ b/yudao-module-system/yudao-module-system-biz/pom.xml @@ -61,6 +61,11 @@ yudao-spring-boot-starter-security + + org.springframework.boot + spring-boot-starter-validation + + cn.iocoder.boot 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 9a9c0a95ed..6acceae523 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 @@ -60,7 +60,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)); @@ -68,7 +68,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()); @@ -80,15 +80,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()); @@ -107,7 +107,7 @@ public class AuthController { } @GetMapping("/list-menus") - @ApiOperation("获得登录用户的菜单列表") + @Operation(summary = "获得登录用户的菜单列表") public CommonResult> getMenus() { // 获得角色列表 Set roleIds = permissionService.getUserRoleIdsFromCache(getLoginUserId(), singleton(CommonStatusEnum.ENABLE.getStatus())); @@ -123,7 +123,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)); @@ -131,7 +131,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); @@ -142,10 +142,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) { @@ -154,7 +154,7 @@ 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)); 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 bafc322e26..2f8ab7f362 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,7 @@ 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 lombok.AllArgsConstructor; import lombok.Builder; import lombok.Data; @@ -15,42 +14,42 @@ import javax.validation.constraints.AssertTrue; import javax.validation.constraints.NotEmpty; import javax.validation.constraints.Pattern; -@ApiModel(value = "管理后台 - 账号密码登录 Request VO", description = "如果登录并绑定社交用户,需要传递 social 开头的参数") +@Schema(title = "管理后台 - 账号密码登录 Request VO", description = "如果登录并绑定社交用户,需要传递 social 开头的参数") @Data @NoArgsConstructor @AllArgsConstructor @Builder public class AuthLoginReqVO { - @ApiModelProperty(value = "账号", required = true, example = "yudaoyuanma") + @Schema(title = "账号", 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(title = "密码", required = true, example = "buzhidao") @NotEmpty(message = "密码不能为空") @Length(min = 4, max = 16, message = "密码长度为 4-16 位") private String password; // ========== 图片验证码相关 ========== - @ApiModelProperty(value = "验证码", required = true, + @Schema(title = "验证码", required = true, example = "PfcH6mgr8tpXuMWFjvW6YVaqrswIuwmWI5dsVZSg7sGpWtDCUbHuDEXl3cFB1+VvCC/rAkSwK8Fad52FSuncVg==", - notes = "验证码开启时,需要传递") + description = "验证码开启时,需要传递") @NotEmpty(message = "验证码不能为空", groups = CodeEnableGroup.class) private String captchaVerification; // ========== 绑定社交登录时,需要传递如下参数 ========== - @ApiModelProperty(value = "社交平台的类型", required = true, example = "10", notes = "参见 SysUserSocialTypeEnum 枚举值") + @Schema(title = "社交平台的类型", required = true, example = "10", description = "参见 SysUserSocialTypeEnum 枚举值") @InEnum(SocialTypeEnum.class) private Integer socialType; - @ApiModelProperty(value = "授权码", required = true, example = "1024") + @Schema(title = "授权码", required = true, example = "1024") private String socialCode; - @ApiModelProperty(value = "state", required = true, example = "9b2ffbc1-7425-4155-9894-9d5c08541d62") + @Schema(title = "state", required = true, example = "9b2ffbc1-7425-4155-9894-9d5c08541d62") private String socialState; /** 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 6e1882887f..2faf84567a 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,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,23 +8,23 @@ import lombok.NoArgsConstructor; import java.time.LocalDateTime; -@ApiModel("管理后台 - 登录 Response VO") +@Schema(title = "管理后台 - 登录 Response VO") @Data @NoArgsConstructor @AllArgsConstructor @Builder public class AuthLoginRespVO { - @ApiModelProperty(value = "用户编号", required = true, example = "1024") + @Schema(title = "用户编号", required = true, example = "1024") private Long userId; - @ApiModelProperty(value = "访问令牌", required = true, example = "happy") + @Schema(title = "访问令牌", required = true, example = "happy") private String accessToken; - @ApiModelProperty(value = "刷新令牌", required = true, example = "nice") + @Schema(title = "刷新令牌", required = true, example = "nice") private String refreshToken; - @ApiModelProperty(value = "过期时间", required = true) + @Schema(title = "过期时间", required = true) private LocalDateTime expiresTime; } 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 2ae7eaac81..9af118f70b 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,35 +8,35 @@ import lombok.NoArgsConstructor; import java.util.List; -@ApiModel("管理后台 - 登录用户的菜单信息 Response VO") +@Schema(title = "管理后台 - 登录用户的菜单信息 Response VO") @Data @NoArgsConstructor @AllArgsConstructor @Builder public class AuthMenuRespVO { - @ApiModelProperty(value = "菜单名称", required = true, example = "芋道") + @Schema(title = "菜单名称", required = true, example = "芋道") private Long id; - @ApiModelProperty(value = "父菜单 ID", required = true, example = "1024") + @Schema(title = "父菜单 ID", required = true, example = "1024") private Long parentId; - @ApiModelProperty(value = "菜单名称", required = true, example = "芋道") + @Schema(title = "菜单名称", required = true, example = "芋道") private String name; - @ApiModelProperty(value = "路由地址", example = "post", notes = "仅菜单类型为菜单或者目录时,才需要传") + @Schema(title = "路由地址", example = "post", description = "仅菜单类型为菜单或者目录时,才需要传") private String path; - @ApiModelProperty(value = "组件路径", example = "system/post/index", notes = "仅菜单类型为菜单时,才需要传") + @Schema(title = "组件路径", example = "system/post/index", description = "仅菜单类型为菜单时,才需要传") private String component; - @ApiModelProperty(value = "菜单图标", example = "/menu/list", notes = "仅菜单类型为菜单或者目录时,才需要传") + @Schema(title = "菜单图标", example = "/menu/list", description = "仅菜单类型为菜单或者目录时,才需要传") private String icon; - @ApiModelProperty(value = "是否可见", required = true, example = "false") + @Schema(title = "是否可见", required = true, example = "false") private Boolean visible; - @ApiModelProperty(value = "是否缓存", required = true, example = "false") + @Schema(title = "是否缓存", required = true, example = "false") private Boolean keepAlive; /** 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 0e809226cc..cfe8725b0e 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,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,36 +8,36 @@ import lombok.NoArgsConstructor; import java.util.Set; -@ApiModel(value = "管理后台 - 登录用户的权限信息 Response VO", description = "额外包括用户信息和角色列表") +@Schema(title = "管理后台 - 登录用户的权限信息 Response VO", description = "额外包括用户信息和角色列表") @Data @NoArgsConstructor @AllArgsConstructor @Builder public class AuthPermissionInfoRespVO { - @ApiModelProperty(value = "用户信息", required = true) + @Schema(title = "用户信息", required = true) private UserVO user; - @ApiModelProperty(value = "角色标识数组", required = true) + @Schema(title = "角色标识数组", required = true) private Set roles; - @ApiModelProperty(value = "操作权限数组", required = true) + @Schema(title = "操作权限数组", required = true) private Set permissions; - @ApiModel("用户信息 VO") + @Schema(title = "用户信息 VO") @Data @NoArgsConstructor @AllArgsConstructor @Builder public static class UserVO { - @ApiModelProperty(value = "用户编号", required = true, example = "1024") + @Schema(title = "用户编号", required = true, example = "1024") private Long id; - @ApiModelProperty(value = "用户昵称", required = true, example = "芋道源码") + @Schema(title = "用户昵称", required = true, example = "芋道源码") private String nickname; - @ApiModelProperty(value = "用户头像", required = true, example = "http://www.iocoder.cn/xx.jpg") + @Schema(title = "用户头像", required = true, example = "http://www.iocoder.cn/xx.jpg") private String avatar; } 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 b641bcca64..61e084254c 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,7 @@ 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 lombok.AllArgsConstructor; import lombok.Builder; import lombok.Data; @@ -10,19 +9,19 @@ import lombok.NoArgsConstructor; import javax.validation.constraints.NotEmpty; -@ApiModel("管理后台 - 短信验证码的登录 Request VO") +@Schema(title = "管理后台 - 短信验证码的登录 Request VO") @Data @NoArgsConstructor @AllArgsConstructor @Builder public class AuthSmsLoginReqVO { - @ApiModelProperty(value = "手机号", required = true, example = "yudaoyuanma") + @Schema(title = "手机号", required = true, example = "yudaoyuanma") @NotEmpty(message = "手机号不能为空") @Mobile private String mobile; - @ApiModelProperty(value = "短信验证码", required = true, example = "1024") + @Schema(title = "短信验证码", required = true, example = "1024") @NotEmpty(message = "验证码不能为空") private String code; 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 0df9a521ec..89b4cb97d7 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,7 @@ 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 lombok.AllArgsConstructor; import lombok.Builder; import lombok.Data; @@ -13,19 +12,19 @@ import lombok.NoArgsConstructor; import javax.validation.constraints.NotEmpty; import javax.validation.constraints.NotNull; -@ApiModel("管理后台 - 发送手机验证码 Request VO") +@Schema(title = "管理后台 - 发送手机验证码 Request VO") @Data @NoArgsConstructor @AllArgsConstructor @Builder public class AuthSmsSendReqVO { - @ApiModelProperty(value = "手机号", required = true, example = "yudaoyuanma") + @Schema(title = "手机号", required = true, example = "yudaoyuanma") @NotEmpty(message = "手机号不能为空") @Mobile private String mobile; - @ApiModelProperty(value = "短信场景", required = true, example = "1") + @Schema(title = "短信场景", required = true, example = "1") @NotNull(message = "发送场景不能为空") @InEnum(SmsSceneEnum.class) private Integer scene; 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 e52a49288b..10648edd34 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,7 @@ 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 lombok.AllArgsConstructor; import lombok.Builder; import lombok.Data; @@ -12,23 +11,23 @@ import lombok.NoArgsConstructor; import javax.validation.constraints.NotEmpty; import javax.validation.constraints.NotNull; -@ApiModel("管理后台 - 社交绑定登录 Request VO,使用 code 授权码 + 账号密码") +@Schema(title = "管理后台 - 社交绑定登录 Request VO,使用 code 授权码 + 账号密码") @Data @NoArgsConstructor @AllArgsConstructor @Builder public class AuthSocialLoginReqVO { - @ApiModelProperty(value = "社交平台的类型", required = true, example = "10", notes = "参见 UserSocialTypeEnum 枚举值") + @Schema(title = "社交平台的类型", required = true, example = "10", description = "参见 UserSocialTypeEnum 枚举值") @InEnum(SocialTypeEnum.class) @NotNull(message = "社交平台的类型不能为空") private Integer type; - @ApiModelProperty(value = "授权码", required = true, example = "1024") + @Schema(title = "授权码", required = true, example = "1024") @NotEmpty(message = "授权码不能为空") private String code; - @ApiModelProperty(value = "state", required = true, example = "9b2ffbc1-7425-4155-9894-9d5c08541d62") + @Schema(title = "state", required = true, example = "9b2ffbc1-7425-4155-9894-9d5c08541d62") @NotEmpty(message = "state 不能为空") private String state; 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 fbdd665e83..4d6bcee28b 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 @@ -3,8 +3,8 @@ package cn.iocoder.yudao.module.system.controller.admin.captcha; import cn.iocoder.yudao.framework.operatelog.core.annotations.OperateLog; import com.anji.captcha.model.common.ResponseModel; import com.anji.captcha.model.vo.CaptchaVO; -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; @@ -21,13 +21,13 @@ import javax.servlet.http.HttpServletRequest; * * @author 芋道源码 */ -@Api(tags = "管理后台 - 验证码") +@Tag(name = "管理后台 - 验证码") @RestController("adminCaptchaController") @RequestMapping("/system/captcha") public class CaptchaController extends com.anji.captcha.controller.CaptchaController { @PostMapping({"/get"}) - @ApiOperation("获得验证码") + @Operation(summary = "获得验证码") @PermitAll @OperateLog(enable = false) // 避免 Post 请求被记录操作日志 @Override @@ -36,7 +36,7 @@ public class CaptchaController extends com.anji.captcha.controller.CaptchaContro } @PostMapping("/check") - @ApiOperation("校验验证码") + @Operation(summary = "校验验证码") @PermitAll @OperateLog(enable = false) // 避免 Post 请求被记录操作日志 @Override 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 0a292e243c..7c9338c405 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.getSimpleDepts(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,8 +76,8 @@ 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))); 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 5275dc0c43..79cd44d3ae 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.getPosts(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 { 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 699a276941..c07c45ffca 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,5 @@ 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,31 +14,31 @@ import javax.validation.constraints.Size; @Data public class DeptBaseVO { - @ApiModelProperty(value = "菜单名称", required = true, example = "芋道") + @Schema(title = "菜单名称", required = true, example = "芋道") @NotBlank(message = "部门名称不能为空") @Size(max = 30, message = "部门名称长度不能超过30个字符") private String name; - @ApiModelProperty(value = "父菜单 ID", example = "1024") + @Schema(title = "父菜单 ID", example = "1024") private Long parentId; - @ApiModelProperty(value = "显示顺序不能为空", required = true, example = "1024") + @Schema(title = "显示顺序不能为空", required = true, example = "1024") @NotNull(message = "显示顺序不能为空") private Integer sort; - @ApiModelProperty(value = "负责人的用户编号", example = "2048") + @Schema(title = "负责人的用户编号", example = "2048") private Long leaderUserId; - @ApiModelProperty(value = "联系电话", example = "15601691000") + @Schema(title = "联系电话", example = "15601691000") @Size(max = 11, message = "联系电话长度不能超过11个字符") private String phone; - @ApiModelProperty(value = "邮箱", example = "yudao@iocoder.cn") + @Schema(title = "邮箱", example = "yudao@iocoder.cn") @Email(message = "邮箱格式不正确") @Size(max = 50, message = "邮箱长度不能超过50个字符") private String email; - @ApiModelProperty(value = "状态", required = true, example = "1", notes = "见 CommonStatusEnum 枚举") + @Schema(title = "状态", required = true, example = "1", description = "见 CommonStatusEnum 枚举") @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/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 efd6c39a3e..8db5621e09 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,10 @@ 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(title = "管理后台 - 部门创建 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 c4ff552438..75de37bf18 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,16 @@ 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 lombok.Data; -@ApiModel("管理后台 - 部门列表 Request VO") +@Schema(title = "管理后台 - 部门列表 Request VO") @Data public class DeptListReqVO { - @ApiModelProperty(value = "部门名称", example = "芋道", notes = "模糊匹配") + @Schema(title = "部门名称", example = "芋道", description = "模糊匹配") private String name; - @ApiModelProperty(value = "展示状态", example = "1", notes = "参见 CommonStatusEnum 枚举类") + @Schema(title = "展示状态", example = "1", description = "参见 CommonStatusEnum 枚举类") private Integer status; } 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 a3361cdd6d..bbc55e91cb 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,23 @@ 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 lombok.Data; import lombok.EqualsAndHashCode; import java.time.LocalDateTime; -@ApiModel("管理后台 - 部门信息 Response VO") +@Schema(title = "管理后台 - 部门信息 Response VO") @Data @EqualsAndHashCode(callSuper = true) public class DeptRespVO extends DeptBaseVO { - @ApiModelProperty(value = "部门编号", required = true, example = "1024") + @Schema(title = "部门编号", required = true, example = "1024") private Long id; - @ApiModelProperty(value = "状态", required = true, example = "1", notes = "参见 CommonStatusEnum 枚举类") + @Schema(title = "状态", required = true, example = "1", description = "参见 CommonStatusEnum 枚举类") private Integer status; - @ApiModelProperty(value = "创建时间", required = true, example = "时间戳格式") + @Schema(title = "创建时间", required = true, example = "时间戳格式") private LocalDateTime createTime; } 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 1a3d64f6e5..ad353fdd89 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,23 @@ 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 lombok.AllArgsConstructor; import lombok.Data; import lombok.NoArgsConstructor; -@ApiModel("管理后台 - 部门精简信息 Response VO") +@Schema(title = "管理后台 - 部门精简信息 Response VO") @Data @NoArgsConstructor @AllArgsConstructor public class DeptSimpleRespVO { - @ApiModelProperty(value = "部门编号", required = true, example = "1024") + @Schema(title = "部门编号", required = true, example = "1024") private Long id; - @ApiModelProperty(value = "部门名称", required = true, example = "芋道") + @Schema(title = "部门名称", required = true, example = "芋道") private String name; - @ApiModelProperty(value = "父部门 ID", required = true, example = "1024") + @Schema(title = "父部门 ID", required = true, example = "1024") private Long parentId; } 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 3e2f13a849..ec40b6e7bf 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,18 +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 lombok.Data; import lombok.EqualsAndHashCode; import javax.validation.constraints.NotNull; -@ApiModel("管理后台 - 部门更新 Request VO") +@Schema(title = "管理后台 - 部门更新 Request VO") @Data @EqualsAndHashCode(callSuper = true) public class DeptUpdateReqVO extends DeptBaseVO { - @ApiModelProperty(value = "部门编号", required = true, example = "1024") + @Schema(title = "部门编号", required = true, example = "1024") @NotNull(message = "部门编号不能为空") private Long id; 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 98c1bf212e..2504f21e52 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,5 @@ 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 +13,24 @@ import javax.validation.constraints.Size; @Data public class PostBaseVO { - @ApiModelProperty(value = "岗位名称", required = true, example = "小博主") + @Schema(title = "岗位名称", required = true, example = "小博主") @NotBlank(message = "岗位名称不能为空") @Size(max = 50, message = "岗位名称长度不能超过50个字符") private String name; - @ApiModelProperty(value = "岗位编码", required = true, example = "yudao") + @Schema(title = "岗位编码", required = true, example = "yudao") @NotBlank(message = "岗位编码不能为空") @Size(max = 64, message = "岗位编码长度不能超过64个字符") private String code; - @ApiModelProperty(value = "显示顺序不能为空", required = true, example = "1024") + @Schema(title = "显示顺序不能为空", required = true, example = "1024") @NotNull(message = "显示顺序不能为空") private Integer sort; - @ApiModelProperty(value = "状态", required = true, example = "1", notes = "参见 CommonStatusEnum 枚举类") + @Schema(title = "状态", required = true, example = "1", description = "参见 CommonStatusEnum 枚举类") private Integer status; - @ApiModelProperty(value = "备注", example = "快乐的备注") + @Schema(title = "备注", example = "快乐的备注") private String remark; } 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 547739c0d0..807454840d 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(title = "管理后台 - 岗位创建 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 735bfcce19..9e349ce12f 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,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 lombok.Data; -@ApiModel(value = "管理后台 - 岗位导出 Request VO", description = "参数和 PostExcelVO 是一致的") +@Schema(title = "管理后台 - 岗位导出 Request VO", description = "参数和 PostExcelVO 是一致的") @Data public class PostExportReqVO { - @ApiModelProperty(value = "岗位编码", example = "yudao", notes = "模糊匹配") + @Schema(title = "岗位编码", example = "yudao", description = "模糊匹配") private String code; - @ApiModelProperty(value = "岗位名称", example = "芋道", notes = "模糊匹配") + @Schema(title = "岗位名称", example = "芋道", description = "模糊匹配") private String name; - @ApiModelProperty(value = "展示状态", example = "1", notes = "参见 CommonStatusEnum 枚举类") + @Schema(title = "展示状态", example = "1", description = "参见 CommonStatusEnum 枚举类") private Integer status; } 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 58ba469e12..2450c39ee5 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,18 @@ 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 lombok.Data; import lombok.EqualsAndHashCode; -@ApiModel("管理后台 - 岗位列表 Request VO") +@Schema(title = "管理后台 - 岗位列表 Request VO") @Data @EqualsAndHashCode(callSuper = true) public class PostListReqVO extends PostBaseVO { - @ApiModelProperty(value = "岗位名称", example = "芋道", notes = "模糊匹配") + @Schema(title = "岗位名称", example = "芋道", description = "模糊匹配") private String name; - @ApiModelProperty(value = "展示状态", example = "1", notes = "参见 CommonStatusEnum 枚举类") + @Schema(title = "展示状态", example = "1", description = "参见 CommonStatusEnum 枚举类") private Integer status; } 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 be9ebeab49..3a027ea297 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,22 @@ 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 lombok.Data; import lombok.EqualsAndHashCode; -@ApiModel("管理后台 - 岗位分页 Request VO") +@Schema(title = "管理后台 - 岗位分页 Request VO") @Data @EqualsAndHashCode(callSuper = true) public class PostPageReqVO extends PageParam { - @ApiModelProperty(value = "岗位编码", example = "yudao", notes = "模糊匹配") + @Schema(title = "岗位编码", example = "yudao", description = "模糊匹配") private String code; - @ApiModelProperty(value = "岗位名称", example = "芋道", notes = "模糊匹配") + @Schema(title = "岗位名称", example = "芋道", description = "模糊匹配") private String name; - @ApiModelProperty(value = "展示状态", example = "1", notes = "参见 CommonStatusEnum 枚举类") + @Schema(title = "展示状态", example = "1", description = "参见 CommonStatusEnum 枚举类") private Integer status; } 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 d6aa60d17b..acd66af5e4 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,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 lombok.Data; import lombok.EqualsAndHashCode; import java.time.LocalDateTime; -@ApiModel("管理后台 - 岗位信息 Response VO") +@Schema(title = "管理后台 - 岗位信息 Response VO") @Data @EqualsAndHashCode(callSuper = true) public class PostRespVO extends PostBaseVO { - @ApiModelProperty(value = "岗位序号", required = true, example = "1024") + @Schema(title = "岗位序号", required = true, example = "1024") private Long id; - @ApiModelProperty(value = "创建时间", required = true, example = "时间戳格式") + @Schema(title = "创建时间", required = true, example = "时间戳格式") private LocalDateTime createTime; } 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 0334a7652a..b943980078 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,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 lombok.AllArgsConstructor; import lombok.Data; import lombok.NoArgsConstructor; -@ApiModel("管理后台 - 岗位精简信息 Response VO") +@Schema(title = "管理后台 - 岗位精简信息 Response VO") @Data @NoArgsConstructor @AllArgsConstructor public class PostSimpleRespVO { - @ApiModelProperty(value = "岗位编号", required = true, example = "1024") + @Schema(title = "岗位编号", required = true, example = "1024") private Long id; - @ApiModelProperty(value = "岗位名称", required = true, example = "芋道") + @Schema(title = "岗位名称", required = true, example = "芋道") private String name; } 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 aeb91998b2..d32c8e8fa8 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,18 +1,17 @@ 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 lombok.Data; import lombok.EqualsAndHashCode; import javax.validation.constraints.NotNull; -@ApiModel("管理后台 - 岗位更新 Request VO") +@Schema(title = "管理后台 - 岗位更新 Request VO") @Data @EqualsAndHashCode(callSuper = true) public class PostUpdateReqVO extends PostBaseVO { - @ApiModelProperty(value = "岗位编号", required = true, example = "1024") + @Schema(title = "岗位编号", required = true, example = "1024") @NotNull(message = "岗位编号不能为空") private Long id; 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 124e5fd054..37793a9048 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.getDictDatas(); @@ -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 { 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 e7c9b88948..d78c62e9a2 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) 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 b3e14e8b4e..79c32b9a8e 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 @@ -1,6 +1,6 @@ package cn.iocoder.yudao.module.system.controller.admin.dict.vo.data; -import io.swagger.annotations.ApiModelProperty; +import io.swagger.v3.oas.annotations.media.Schema; import lombok.Data; import javax.validation.constraints.NotBlank; @@ -14,36 +14,36 @@ import javax.validation.constraints.Size; @Data public class DictDataBaseVO { - @ApiModelProperty(value = "显示顺序不能为空", required = true, example = "1024") + @Schema(title = "显示顺序不能为空", required = true, example = "1024") @NotNull(message = "显示顺序不能为空") private Integer sort; - @ApiModelProperty(value = "字典标签", required = true, example = "芋道") + @Schema(title = "字典标签", required = true, example = "芋道") @NotBlank(message = "字典标签不能为空") @Size(max = 100, message = "字典标签长度不能超过100个字符") private String label; - @ApiModelProperty(value = "字典值", required = true, example = "iocoder") + @Schema(title = "字典值", required = true, example = "iocoder") @NotBlank(message = "字典键值不能为空") @Size(max = 100, message = "字典键值长度不能超过100个字符") private String value; - @ApiModelProperty(value = "字典类型", required = true, example = "sys_common_sex") + @Schema(title = "字典类型", 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(title = "状态", required = true, example = "1", description = "见 CommonStatusEnum 枚举") @NotNull(message = "状态不能为空") // @InEnum(value = CommonStatusEnum.class, message = "修改状态必须是 {value}") private Integer status; - @ApiModelProperty(value = "颜色类型", example = "default", notes = "default、primary、success、info、warning、danger") + @Schema(title = "颜色类型", example = "default", description = "default、primary、success、info、warning、danger") private String colorType; - @ApiModelProperty(value = "css 样式", example = "btn-visible") + @Schema(title = "css 样式", example = "btn-visible") private String cssClass; - @ApiModelProperty(value = "备注", example = "我是一个角色") + @Schema(title = "备注", example = "我是一个角色") private String remark; } 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 57dc770d09..b4fe37ba9b 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(title = "管理后台 - 字典数据创建 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 90290cbdbc..94f1a4ffb0 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,23 @@ 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 lombok.Data; import javax.validation.constraints.Size; -@ApiModel("管理后台 - 字典类型导出 Request VO") +@Schema(title = "管理后台 - 字典类型导出 Request VO") @Data public class DictDataExportReqVO { - @ApiModelProperty(value = "字典标签", example = "芋道") + @Schema(title = "字典标签", example = "芋道") @Size(max = 100, message = "字典标签长度不能超过100个字符") private String label; - @ApiModelProperty(value = "字典类型", example = "sys_common_sex", notes = "模糊匹配") + @Schema(title = "字典类型", example = "sys_common_sex", description = "模糊匹配") @Size(max = 100, message = "字典类型类型长度不能超过100个字符") private String dictType; - @ApiModelProperty(value = "展示状态", example = "1", notes = "参见 CommonStatusEnum 枚举类") + @Schema(title = "展示状态", example = "1", description = "参见 CommonStatusEnum 枚举类") 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/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 9df4605df6..a883c80486 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,26 @@ 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 lombok.Data; import lombok.EqualsAndHashCode; import javax.validation.constraints.Size; -@ApiModel("管理后台 - 字典类型分页列表 Request VO") +@Schema(title = "管理后台 - 字典类型分页列表 Request VO") @Data @EqualsAndHashCode(callSuper = true) public class DictDataPageReqVO extends PageParam { - @ApiModelProperty(value = "字典标签", example = "芋道") + @Schema(title = "字典标签", example = "芋道") @Size(max = 100, message = "字典标签长度不能超过100个字符") private String label; - @ApiModelProperty(value = "字典类型", example = "sys_common_sex", notes = "模糊匹配") + @Schema(title = "字典类型", example = "sys_common_sex", description = "模糊匹配") @Size(max = 100, message = "字典类型类型长度不能超过100个字符") private String dictType; - @ApiModelProperty(value = "展示状态", example = "1", notes = "参见 CommonStatusEnum 枚举类") + @Schema(title = "展示状态", example = "1", description = "参见 CommonStatusEnum 枚举类") 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/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 3cf1177d17..72cb23cf78 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,6 @@ 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 lombok.AllArgsConstructor; import lombok.Data; import lombok.EqualsAndHashCode; @@ -9,17 +8,17 @@ import lombok.NoArgsConstructor; import java.time.LocalDateTime; -@ApiModel("管理后台 - 字典数据信息 Response VO") +@Schema(title = "管理后台 - 字典数据信息 Response VO") @Data @NoArgsConstructor @AllArgsConstructor @EqualsAndHashCode(callSuper = true) public class DictDataRespVO extends DictDataBaseVO { - @ApiModelProperty(value = "字典数据编号", required = true, example = "1024") + @Schema(title = "字典数据编号", required = true, example = "1024") private Long id; - @ApiModelProperty(value = "创建时间", required = true, example = "时间戳格式") + @Schema(title = "创建时间", required = true, example = "时间戳格式") private LocalDateTime createTime; } 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 4ea0c5f9b8..d614584464 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,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 lombok.Data; -@ApiModel("管理后台 - 数据字典精简 Response VO") +@Schema(title = "管理后台 - 数据字典精简 Response VO") @Data public class DictDataSimpleRespVO { - @ApiModelProperty(value = "字典类型", required = true, example = "gender") + @Schema(title = "字典类型", required = true, example = "gender") private String dictType; - @ApiModelProperty(value = "字典键值", required = true, example = "1") + @Schema(title = "字典键值", required = true, example = "1") private String value; - @ApiModelProperty(value = "字典标签", required = true, example = "男") + @Schema(title = "字典标签", required = true, example = "男") private String label; - @ApiModelProperty(value = "颜色类型", example = "default", notes = "default、primary、success、info、warning、danger") + @Schema(title = "颜色类型", example = "default", description = "default、primary、success、info、warning、danger") private String colorType; - @ApiModelProperty(value = "css 样式", example = "btn-visible") + @Schema(title = "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/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 f6f9b81a23..9481ab1b45 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,18 +1,17 @@ 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 lombok.Data; import lombok.EqualsAndHashCode; import javax.validation.constraints.NotNull; -@ApiModel("管理后台 - 字典数据更新 Request VO") +@Schema(title = "管理后台 - 字典数据更新 Request VO") @Data @EqualsAndHashCode(callSuper = true) public class DictDataUpdateReqVO extends DictDataBaseVO { - @ApiModelProperty(value = "字典数据编号", required = true, example = "1024") + @Schema(title = "字典数据编号", required = true, example = "1024") @NotNull(message = "字典数据编号不能为空") private Long id; 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 4da6da0b31..d4e28e043a 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(title = "字典名称", required = true, example = "性别") @NotBlank(message = "字典名称不能为空") @Size(max = 100, message = "字典类型名称长度不能超过100个字符") private String name; - @ApiModelProperty(value = "状态", required = true, example = "1", notes = "参见 CommonStatusEnum 枚举类") + @Schema(title = "状态", required = true, example = "1", description = "参见 CommonStatusEnum 枚举类") @NotNull(message = "状态不能为空") private Integer status; - @ApiModelProperty(value = "备注", example = "快乐的备注") + @Schema(title = "备注", example = "快乐的备注") private String remark; } 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 ee2f45ae19..f7c1585038 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,19 +1,18 @@ 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 lombok.Data; import lombok.EqualsAndHashCode; import javax.validation.constraints.NotNull; import javax.validation.constraints.Size; -@ApiModel("管理后台 - 字典类型创建 Request VO") +@Schema(title = "管理后台 - 字典类型创建 Request VO") @Data @EqualsAndHashCode(callSuper = true) public class DictTypeCreateReqVO extends DictTypeBaseVO { - @ApiModelProperty(value = "字典类型", required = true, example = "sys_common_sex") + @Schema(title = "字典类型", required = true, example = "sys_common_sex") @NotNull(message = "字典类型不能为空") @Size(max = 100, message = "字典类型类型长度不能超过100个字符") private String type; 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 4a54fb3fc5..73d7093e6d 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,6 @@ 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 lombok.Data; import org.springframework.format.annotation.DateTimeFormat; @@ -9,21 +8,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(title = "管理后台 - 字典类型分页列表 Request VO") @Data public class DictTypeExportReqVO { - @ApiModelProperty(value = "字典类型名称", example = "芋道", notes = "模糊匹配") + @Schema(title = "字典类型名称", example = "芋道", description = "模糊匹配") private String name; - @ApiModelProperty(value = "字典类型", example = "sys_common_sex", notes = "模糊匹配") + @Schema(title = "字典类型", example = "sys_common_sex", description = "模糊匹配") private String type; - @ApiModelProperty(value = "展示状态", example = "1", notes = "参见 CommonStatusEnum 枚举类") + @Schema(title = "展示状态", example = "1", description = "参见 CommonStatusEnum 枚举类") private Integer status; @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND) - @ApiModelProperty(value = "创建时间") + @Schema(title = "创建时间") private LocalDateTime[] createTime; } 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 f32886196e..1c7b48a910 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,7 @@ 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 lombok.Data; import lombok.EqualsAndHashCode; import org.springframework.format.annotation.DateTimeFormat; @@ -12,23 +11,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(title = "管理后台 - 字典类型分页列表 Request VO") @Data @EqualsAndHashCode(callSuper = true) public class DictTypePageReqVO extends PageParam { - @ApiModelProperty(value = "字典类型名称", example = "芋道", notes = "模糊匹配") + @Schema(title = "字典类型名称", example = "芋道", description = "模糊匹配") private String name; - @ApiModelProperty(value = "字典类型", example = "sys_common_sex", notes = "模糊匹配") + @Schema(title = "字典类型", example = "sys_common_sex", description = "模糊匹配") @Size(max = 100, message = "字典类型类型长度不能超过100个字符") private String type; - @ApiModelProperty(value = "展示状态", example = "1", notes = "参见 CommonStatusEnum 枚举类") + @Schema(title = "展示状态", example = "1", description = "参见 CommonStatusEnum 枚举类") private Integer status; @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND) - @ApiModelProperty(value = "创建时间") + @Schema(title = "创建时间") private LocalDateTime[] createTime; } 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 c508df6af6..cb39b1acf7 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,6 @@ 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 lombok.AllArgsConstructor; import lombok.Data; import lombok.EqualsAndHashCode; @@ -9,20 +8,20 @@ import lombok.NoArgsConstructor; import java.time.LocalDateTime; -@ApiModel("管理后台 - 字典类型信息 Response VO") +@Schema(title = "管理后台 - 字典类型信息 Response VO") @Data @NoArgsConstructor @AllArgsConstructor @EqualsAndHashCode(callSuper = true) public class DictTypeRespVO extends DictTypeBaseVO { - @ApiModelProperty(value = "字典类型编号", required = true, example = "1024") + @Schema(title = "字典类型编号", required = true, example = "1024") private Long id; - @ApiModelProperty(value = "字典类型", required = true, example = "sys_common_sex") + @Schema(title = "字典类型", required = true, example = "sys_common_sex") private String type; - @ApiModelProperty(value = "创建时间", required = true, example = "时间戳格式") + @Schema(title = "创建时间", required = true, example = "时间戳格式") private LocalDateTime createTime; } 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 8cca026a9f..b68f5ebf18 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,23 @@ 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 lombok.AllArgsConstructor; import lombok.Data; import lombok.NoArgsConstructor; -@ApiModel("管理后台 - 字典类型精简信息 Response VO") +@Schema(title = "管理后台 - 字典类型精简信息 Response VO") @Data @NoArgsConstructor @AllArgsConstructor public class DictTypeSimpleRespVO { - @ApiModelProperty(value = "字典类型编号", required = true, example = "1024") + @Schema(title = "字典类型编号", required = true, example = "1024") private Long id; - @ApiModelProperty(value = "字典类型名称", required = true, example = "芋道") + @Schema(title = "字典类型名称", required = true, example = "芋道") private String name; - @ApiModelProperty(value = "字典类型", required = true, example = "sys_common_sex") + @Schema(title = "字典类型", required = true, example = "sys_common_sex") private String type; } 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 00955f4fe3..579108d23c 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,18 +1,17 @@ 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 lombok.Data; import lombok.EqualsAndHashCode; import javax.validation.constraints.NotNull; -@ApiModel("管理后台 - 字典类型更新 Request VO") +@Schema(title = "管理后台 - 字典类型更新 Request VO") @Data @EqualsAndHashCode(callSuper = true) public class DictTypeUpdateReqVO extends DictTypeBaseVO { - @ApiModelProperty(value = "字典类型编号", required = true, example = "1024") + @Schema(title = "字典类型编号", required = true, example = "1024") @NotNull(message = "字典类型编号不能为空") private Long id; 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 e3161b8aa1..90879472ba 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, 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 150401aa32..ac5c7445fd 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(title = "应用名", required = true, example = "dashboard") @NotNull(message = "应用名不能为空") private String applicationName; - @ApiModelProperty(value = "错误码编码", required = true, example = "1234") + @Schema(title = "错误码编码", required = true, example = "1234") @NotNull(message = "错误码编码不能为空") private Integer code; - @ApiModelProperty(value = "错误码错误提示", required = true, example = "帅气") + @Schema(title = "错误码错误提示", required = true, example = "帅气") @NotNull(message = "错误码错误提示不能为空") private String message; - @ApiModelProperty(value = "备注", example = "哈哈哈") + @Schema(title = "备注", example = "哈哈哈") private String memo; } 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 a0f36af1a9..7d85826d11 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,11 @@ 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(title = "管理后台 - 错误码创建 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 e44858160c..90f5e739a2 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,6 @@ 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 lombok.Data; import org.springframework.format.annotation.DateTimeFormat; @@ -9,24 +8,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(title = "管理后台 - 错误码 Excel 导出 Request VO", description = "参数和 InfErrorCodePageReqVO 是一致的") @Data public class ErrorCodeExportReqVO { - @ApiModelProperty(value = "错误码类型", example = "1") + @Schema(title = "错误码类型", example = "1") private Integer type; - @ApiModelProperty(value = "应用名", example = "dashboard") + @Schema(title = "应用名", example = "dashboard") private String applicationName; - @ApiModelProperty(value = "错误码编码", example = "1234") + @Schema(title = "错误码编码", example = "1234") private Integer code; - @ApiModelProperty(value = "错误码错误提示", example = "帅气") + @Schema(title = "错误码错误提示", example = "帅气") private String message; @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND) - @ApiModelProperty(value = "创建时间") + @Schema(title = "创建时间") private LocalDateTime[] createTime; } 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 8c719006c3..baeb1e203a 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,7 @@ 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 lombok.Data; import lombok.EqualsAndHashCode; import lombok.ToString; @@ -12,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("管理后台 - 错误码分页 Request VO") +@Schema(title = "管理后台 - 错误码分页 Request VO") @Data @EqualsAndHashCode(callSuper = true) @ToString(callSuper = true) public class ErrorCodePageReqVO extends PageParam { - @ApiModelProperty(value = "错误码类型", example = "1", notes = "参见 ErrorCodeTypeEnum 枚举类") + @Schema(title = "错误码类型", example = "1", description = "参见 ErrorCodeTypeEnum 枚举类") private Integer type; - @ApiModelProperty(value = "应用名", example = "dashboard") + @Schema(title = "应用名", example = "dashboard") private String applicationName; - @ApiModelProperty(value = "错误码编码", example = "1234") + @Schema(title = "错误码编码", example = "1234") private Integer code; - @ApiModelProperty(value = "错误码错误提示", example = "帅气") + @Schema(title = "错误码错误提示", example = "帅气") private String message; @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND) - @ApiModelProperty(value = "创建时间") + @Schema(title = "创建时间") private LocalDateTime[] createTime; } 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 47276517c2..35712ad763 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,25 @@ 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 lombok.Data; import lombok.EqualsAndHashCode; import lombok.ToString; import java.time.LocalDateTime; -@ApiModel("管理后台 - 错误码 Response VO") +@Schema(title = "管理后台 - 错误码 Response VO") @Data @EqualsAndHashCode(callSuper = true) @ToString(callSuper = true) public class ErrorCodeRespVO extends ErrorCodeBaseVO { - @ApiModelProperty(value = "错误码编号", required = true, example = "1024") + @Schema(title = "错误码编号", required = true, example = "1024") private Long id; - @ApiModelProperty(value = "错误码类型", required = true, example = "1", notes = "参见 ErrorCodeTypeEnum 枚举类") + @Schema(title = "错误码类型", required = true, example = "1", description = "参见 ErrorCodeTypeEnum 枚举类") private Integer type; - @ApiModelProperty(value = "创建时间", required = true) + @Schema(title = "创建时间", required = true) private LocalDateTime createTime; } 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 ff16c02834..cb0bb2055d 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,20 +1,19 @@ 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 lombok.Data; import lombok.EqualsAndHashCode; import lombok.ToString; import javax.validation.constraints.NotNull; -@ApiModel("管理后台 - 错误码更新 Request VO") +@Schema(title = "管理后台 - 错误码更新 Request VO") @Data @EqualsAndHashCode(callSuper = true) @ToString(callSuper = true) public class ErrorCodeUpdateReqVO extends ErrorCodeBaseVO { - @ApiModelProperty(value = "错误码编号", required = true, example = "1024") + @Schema(title = "错误码编号", required = true, example = "1024") @NotNull(message = "错误码编号不能为空") private Long id; 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 7cb3ac4b7a..f5262697a5 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 { 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 d23477eb82..c794f0ca88 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) 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 4b5cc22bf4..0e749c5447 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(title = "日志类型", required = true, example = "1", description = "参见 LoginLogTypeEnum 枚举类") @NotNull(message = "日志类型不能为空") private Integer logType; - @ApiModelProperty(value = "链路追踪编号", example = "89aca178-a370-411c-ae02-3f0d672be4ab") + @Schema(title = "链路追踪编号", example = "89aca178-a370-411c-ae02-3f0d672be4ab") @NotEmpty(message = "链路追踪编号不能为空") private String traceId; - @ApiModelProperty(value = "用户账号", required = true, example = "yudao") + @Schema(title = "用户账号", required = true, example = "yudao") @NotBlank(message = "用户账号不能为空") @Size(max = 30, message = "用户账号长度不能超过30个字符") private String username; - @ApiModelProperty(value = "登录结果", required = true, example = "1", notes = "参见 LoginResultEnum 枚举类") + @Schema(title = "登录结果", required = true, example = "1", description = "参见 LoginResultEnum 枚举类") @NotNull(message = "登录结果不能为空") private Integer result; - @ApiModelProperty(value = "用户 IP", required = true, example = "127.0.0.1") + @Schema(title = "用户 IP", required = true, example = "127.0.0.1") @NotEmpty(message = "用户 IP 不能为空") private String userIp; - @ApiModelProperty(value = "浏览器 UserAgent", example = "Mozilla/5.0") + @Schema(title = "浏览器 UserAgent", example = "Mozilla/5.0") private String userAgent; } 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 50f36edb36..c95be8148c 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,6 @@ 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 lombok.Data; import org.springframework.format.annotation.DateTimeFormat; @@ -9,20 +8,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(title = "管理后台 - 登录日志分页列表 Request VO") @Data public class LoginLogExportReqVO { - @ApiModelProperty(value = "用户 IP", example = "127.0.0.1", notes = "模拟匹配") + @Schema(title = "用户 IP", example = "127.0.0.1", description = "模拟匹配") private String userIp; - @ApiModelProperty(value = "用户账号", example = "芋道", notes = "模拟匹配") + @Schema(title = "用户账号", example = "芋道", description = "模拟匹配") private String username; - @ApiModelProperty(value = "操作状态", example = "true") + @Schema(title = "操作状态", example = "true") private Boolean status; - @ApiModelProperty(value = "登录时间", example = "[2022-07-01 00:00:00,2022-07-01 23:59:59]") + @Schema(title = "登录时间", 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; 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 51ed062e88..1767fd2980 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,7 @@ 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 lombok.Data; import lombok.EqualsAndHashCode; import org.springframework.format.annotation.DateTimeFormat; @@ -11,21 +10,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(title = "管理后台 - 登录日志分页列表 Request VO") @Data @EqualsAndHashCode(callSuper = true) public class LoginLogPageReqVO extends PageParam { - @ApiModelProperty(value = "用户 IP", example = "127.0.0.1", notes = "模拟匹配") + @Schema(title = "用户 IP", example = "127.0.0.1", description = "模拟匹配") private String userIp; - @ApiModelProperty(value = "用户账号", example = "芋道", notes = "模拟匹配") + @Schema(title = "用户账号", example = "芋道", description = "模拟匹配") private String username; - @ApiModelProperty(value = "操作状态", example = "true") + @Schema(title = "操作状态", example = "true") private Boolean status; - @ApiModelProperty(value = "登录时间", example = "[2022-07-01 00:00:00,2022-07-01 23:59:59]") + @Schema(title = "登录时间", 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; 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 4eb121c02a..4c57e0d59e 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,6 @@ 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 lombok.Data; import lombok.EqualsAndHashCode; import lombok.ToString; @@ -9,23 +8,23 @@ import lombok.ToString; import javax.validation.constraints.NotNull; import java.time.LocalDateTime; -@ApiModel("管理后台 - 登录日志 Response VO") +@Schema(title = "管理后台 - 登录日志 Response VO") @Data @EqualsAndHashCode(callSuper = true) @ToString(callSuper = true) public class LoginLogRespVO extends LoginLogBaseVO { - @ApiModelProperty(value = "日志编号", required = true, example = "1024") + @Schema(title = "日志编号", required = true, example = "1024") private Long id; - @ApiModelProperty(value = "用户编号", example = "666") + @Schema(title = "用户编号", example = "666") private Long userId; - @ApiModelProperty(value = "用户类型", required = true, example = "2", notes = "参见 UserTypeEnum 枚举") + @Schema(title = "用户类型", required = true, example = "2", description = "参见 UserTypeEnum 枚举") @NotNull(message = "用户类型不能为空") private Integer userType; - @ApiModelProperty(value = "登录时间", required = true) + @Schema(title = "登录时间", required = true) private LocalDateTime createTime; } 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 abaf412475..e36da5c07e 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(title = "链路追踪编号", required = true, example = "89aca178-a370-411c-ae02-3f0d672be4ab") @NotEmpty(message = "链路追踪编号不能为空") private String traceId; - @ApiModelProperty(value = "用户编号", required = true, example = "1024") + @Schema(title = "用户编号", required = true, example = "1024") @NotNull(message = "用户编号不能为空") private Long userId; - @ApiModelProperty(value = "操作模块", required = true, example = "订单") + @Schema(title = "操作模块", required = true, example = "订单") @NotEmpty(message = "操作模块不能为空") private String module; - @ApiModelProperty(value = "操作名", required = true, example = "创建订单") + @Schema(title = "操作名", required = true, example = "创建订单") @NotEmpty(message = "操作名") private String name; - @ApiModelProperty(value = "操作分类", required = true, example = "1", notes = "参见 OperateLogTypeEnum 枚举类") + @Schema(title = "操作分类", required = true, example = "1", description = "参见 OperateLogTypeEnum 枚举类") @NotNull(message = "操作分类不能为空") private Integer type; - @ApiModelProperty(value = "操作明细", example = "修改编号为 1 的用户信息,将性别从男改成女,将姓名从芋道改成源码。") + @Schema(title = "操作明细", example = "修改编号为 1 的用户信息,将性别从男改成女,将姓名从芋道改成源码。") private String content; - @ApiModelProperty(value = "拓展字段", example = "{'orderId': 1}") + @Schema(title = "拓展字段", example = "{'orderId': 1}") private Map exts; - @ApiModelProperty(value = "请求方法名", required = true, example = "GET") + @Schema(title = "请求方法名", required = true, example = "GET") @NotEmpty(message = "请求方法名不能为空") private String requestMethod; - @ApiModelProperty(value = "请求地址", required = true, example = "/xxx/yyy") + @Schema(title = "请求地址", required = true, example = "/xxx/yyy") @NotEmpty(message = "请求地址不能为空") private String requestUrl; - @ApiModelProperty(value = "用户 IP", required = true, example = "127.0.0.1") + @Schema(title = "用户 IP", required = true, example = "127.0.0.1") @NotEmpty(message = "用户 IP 不能为空") private String userIp; - @ApiModelProperty(value = "浏览器 UserAgent", required = true, example = "Mozilla/5.0") + @Schema(title = "浏览器 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(title = "Java 方法名", required = true, example = "cn.iocoder.yudao.adminserver.UserController.save(...)") @NotEmpty(message = "Java 方法名不能为空") private String javaMethod; - @ApiModelProperty(value = "Java 方法的参数") + @Schema(title = "Java 方法的参数") private String javaMethodArgs; - @ApiModelProperty(value = "开始时间", required = true) + @Schema(title = "开始时间", required = true) @NotNull(message = "开始时间不能为空") private LocalDateTime startTime; - @ApiModelProperty(value = "执行时长,单位:毫秒", required = true) + @Schema(title = "执行时长,单位:毫秒", required = true) @NotNull(message = "执行时长不能为空") private Integer duration; - @ApiModelProperty(value = "结果码", required = true) + @Schema(title = "结果码", required = true) @NotNull(message = "结果码不能为空") private Integer resultCode; - @ApiModelProperty(value = "结果提示") + @Schema(title = "结果提示") private String resultMsg; - @ApiModelProperty(value = "结果数据") + @Schema(title = "结果数据") private String resultData; } 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 2546812509..c323b2cb60 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,6 @@ 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 lombok.Data; import org.springframework.format.annotation.DateTimeFormat; @@ -9,23 +8,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(title = "管理后台 - 操作日志分页列表 Request VO") @Data public class OperateLogExportReqVO { - @ApiModelProperty(value = "操作模块", example = "订单", notes = "模拟匹配") + @Schema(title = "操作模块", example = "订单", description = "模拟匹配") private String module; - @ApiModelProperty(value = "用户昵称", example = "芋道", notes = "模拟匹配") + @Schema(title = "用户昵称", example = "芋道", description = "模拟匹配") private String userNickname; - @ApiModelProperty(value = "操作分类", example = "1", notes = "参见 OperateLogTypeEnum 枚举类") + @Schema(title = "操作分类", example = "1", description = "参见 OperateLogTypeEnum 枚举类") private Integer type; - @ApiModelProperty(value = "操作状态", example = "true") + @Schema(title = "操作状态", example = "true") private Boolean success; - @ApiModelProperty(value = "开始时间", example = "[2022-07-01 00:00:00,2022-07-01 23:59:59]") + @Schema(title = "开始时间", 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; 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 9fa6fed665..c6eed986e2 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,7 @@ 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 lombok.Data; import org.springframework.format.annotation.DateTimeFormat; @@ -10,23 +9,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(title = "管理后台 - 操作日志分页列表 Request VO") @Data public class OperateLogPageReqVO extends PageParam { - @ApiModelProperty(value = "操作模块", example = "订单", notes = "模拟匹配") + @Schema(title = "操作模块", example = "订单", description = "模拟匹配") private String module; - @ApiModelProperty(value = "用户昵称", example = "芋道", notes = "模拟匹配") + @Schema(title = "用户昵称", example = "芋道", description = "模拟匹配") private String userNickname; - @ApiModelProperty(value = "操作分类", example = "1", notes = "参见 OperateLogTypeEnum 枚举类") + @Schema(title = "操作分类", example = "1", description = "参见 OperateLogTypeEnum 枚举类") private Integer type; - @ApiModelProperty(value = "操作状态", example = "true") + @Schema(title = "操作状态", example = "true") private Boolean success; - @ApiModelProperty(value = "开始时间", example = "[2022-07-01 00:00:00,2022-07-01 23:59:59]") + @Schema(title = "开始时间", 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; 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 445b400603..139f1b20ef 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,20 @@ 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 lombok.Data; import lombok.EqualsAndHashCode; import lombok.ToString; -@ApiModel("管理后台 - 操作日志 Response VO") +@Schema(title = "管理后台 - 操作日志 Response VO") @Data @EqualsAndHashCode(callSuper = true) @ToString(callSuper = true) public class OperateLogRespVO extends OperateLogBaseVO { - @ApiModelProperty(value = "日志编号", required = true, example = "1024") + @Schema(title = "日志编号", required = true, example = "1024") private Long id; - @ApiModelProperty(value = "用户昵称", required = true, example = "芋艿") + @Schema(title = "用户昵称", required = true, example = "芋艿") private String userNickname; } 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 d14cfb7333..7143b934ea 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,10 @@ 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 io.swagger.v3.oas.annotations.Parameter; import org.springframework.security.access.prepost.PreAuthorize; import org.springframework.validation.annotation.Validated; import org.springframework.web.bind.annotation.*; @@ -20,7 +21,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 +31,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 +39,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 +47,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,15 +56,15 @@ public class NoticeController { } @GetMapping("/page") - @ApiOperation("获取通知公告列表") + @Operation(summary = "获取通知公告列表") @PreAuthorize("@ss.hasPermission('system:notice:query')") public CommonResult> pageNotices(@Validated NoticePageReqVO reqVO) { return success(NoticeConvert.INSTANCE.convertPage(noticeService.pageNotices(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))); 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 43cacd1d57..2188126569 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(title = "公告标题", required = true, example = "小博主") @NotBlank(message = "公告标题不能为空") @Size(max = 50, message = "公告标题不能超过50个字符") private String title; - @ApiModelProperty(value = "公告类型", required = true, example = "小博主") + @Schema(title = "公告类型", required = true, example = "小博主") @NotNull(message = "公告类型不能为空") private Integer type; - @ApiModelProperty(value = "公告内容", required = true, example = "半生编码") + @Schema(title = "公告内容", required = true, example = "半生编码") private String content; - @ApiModelProperty(value = "状态", required = true, example = "1", notes = "参见 CommonStatusEnum 枚举类") + @Schema(title = "状态", required = true, example = "1", description = "参见 CommonStatusEnum 枚举类") private Integer status; } 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 49e671ce14..ceb8343062 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(title = "管理后台 - 通知公告创建 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 ba1287c47d..1939e288e4 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,19 @@ 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 lombok.Data; import lombok.EqualsAndHashCode; -@ApiModel("管理后台 - 通知公告分页 Request VO") +@Schema(title = "管理后台 - 通知公告分页 Request VO") @Data @EqualsAndHashCode(callSuper = true) public class NoticePageReqVO extends PageParam { - @ApiModelProperty(value = "通知公告名称", example = "芋道", notes = "模糊匹配") + @Schema(title = "通知公告名称", example = "芋道", description = "模糊匹配") private String title; - @ApiModelProperty(value = "展示状态", example = "1", notes = "参见 CommonStatusEnum 枚举类") + @Schema(title = "展示状态", example = "1", description = "参见 CommonStatusEnum 枚举类") private Integer status; } 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 bfa986b04e..0e84852d0e 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,20 @@ 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 lombok.Data; import lombok.EqualsAndHashCode; import java.time.LocalDateTime; -@ApiModel("管理后台 - 通知公告信息 Response VO") +@Schema(title = "管理后台 - 通知公告信息 Response VO") @Data @EqualsAndHashCode(callSuper = true) public class NoticeRespVO extends NoticeBaseVO { - @ApiModelProperty(value = "通知公告序号", required = true, example = "1024") + @Schema(title = "通知公告序号", required = true, example = "1024") private Long id; - @ApiModelProperty(value = "创建时间", required = true, example = "时间戳格式") + @Schema(title = "创建时间", required = true, example = "时间戳格式") private LocalDateTime createTime; } 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 30f4a3720b..89f80173d7 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,18 +1,17 @@ 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 lombok.Data; import lombok.EqualsAndHashCode; import javax.validation.constraints.NotNull; -@ApiModel("管理后台 - 岗位公告更新 Request VO") +@Schema(title = "管理后台 - 岗位公告更新 Request VO") @Data @EqualsAndHashCode(callSuper = true) public class NoticeUpdateReqVO extends NoticeBaseVO { - @ApiModelProperty(value = "岗位公告编号", required = true, example = "1024") + @Schema(title = "岗位公告编号", required = true, example = "1024") @NotNull(message = "岗位公告编号不能为空") private Long id; 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 d6b9278576..358f94678d 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.Operation; +import io.swagger.v3.oas.annotations.Parameter; 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,7 +64,7 @@ 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); 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 608f5341ae..2ff359235c 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"), + @Parameter(name = "state", example = "1") }) @OperateLog(enable = false) // 避免 Post 请求被记录操作日志 public CommonResult approveOrDeny(@RequestParam("response_type") String responseType, 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 c055a19df3..d1e0364dc4 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,8 +39,8 @@ 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()); 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 39b6125ab1..8656468010 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 对象,实现接口的复用。 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 dbd74e5529..aea3e059bf 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(title = "客户端编号", required = true, example = "tudou") @NotNull(message = "客户端编号不能为空") private String clientId; - @ApiModelProperty(value = "客户端密钥", required = true, example = "fan") + @Schema(title = "客户端密钥", required = true, example = "fan") @NotNull(message = "客户端密钥不能为空") private String secret; - @ApiModelProperty(value = "应用名", required = true, example = "土豆") + @Schema(title = "应用名", required = true, example = "土豆") @NotNull(message = "应用名不能为空") private String name; - @ApiModelProperty(value = "应用图标", required = true, example = "https://www.iocoder.cn/xx.png") + @Schema(title = "应用图标", required = true, example = "https://www.iocoder.cn/xx.png") @NotNull(message = "应用图标不能为空") @URL(message = "应用图标的地址不正确") private String logo; - @ApiModelProperty(value = "应用描述", example = "我是一个应用") + @Schema(title = "应用描述", example = "我是一个应用") private String description; - @ApiModelProperty(value = "状态", required = true, example = "1", notes = "参见 CommonStatusEnum 枚举") + @Schema(title = "状态", required = true, example = "1", description = "参见 CommonStatusEnum 枚举") @NotNull(message = "状态不能为空") private Integer status; - @ApiModelProperty(value = "访问令牌的有效期", required = true, example = "8640") + @Schema(title = "访问令牌的有效期", required = true, example = "8640") @NotNull(message = "访问令牌的有效期不能为空") private Integer accessTokenValiditySeconds; - @ApiModelProperty(value = "刷新令牌的有效期", required = true, example = "8640000") + @Schema(title = "刷新令牌的有效期", required = true, example = "8640000") @NotNull(message = "刷新令牌的有效期不能为空") private Integer refreshTokenValiditySeconds; - @ApiModelProperty(value = "可重定向的 URI 地址", required = true, example = "https://www.iocoder.cn") + @Schema(title = "可重定向的 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(title = "授权类型", required = true, example = "password", description = "参见 OAuth2GrantTypeEnum 枚举") @NotNull(message = "授权类型不能为空") private List authorizedGrantTypes; - @ApiModelProperty(value = "授权范围", example = "user_info") + @Schema(title = "授权范围", example = "user_info") private List scopes; - @ApiModelProperty(value = "自动通过的授权范围", example = "user_info") + @Schema(title = "自动通过的授权范围", example = "user_info") private List autoApproveScopes; - @ApiModelProperty(value = "权限", example = "system:user:query") + @Schema(title = "权限", example = "system:user:query") private List authorities; - @ApiModelProperty(value = "资源", example = "1024") + @Schema(title = "资源", example = "1024") private List resourceIds; - @ApiModelProperty(value = "附加信息", example = "{yunai: true}") + @Schema(title = "附加信息", example = "{yunai: true}") private String additionalInformation; @AssertTrue(message = "附加信息必须是 JSON 格式") 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 b241277ac2..34c4350ba3 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,9 +1,9 @@ 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.*; -@ApiModel("管理后台 - OAuth2 客户端创建 Request VO") +@Schema(title = "管理后台 - OAuth2 客户端创建 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/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 286fc73ac2..c815331e9d 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,19 +1,19 @@ 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; -@ApiModel("管理后台 - OAuth2 客户端分页 Request VO") +@Schema(title = "管理后台 - OAuth2 客户端分页 Request VO") @Data @EqualsAndHashCode(callSuper = true) @ToString(callSuper = true) public class OAuth2ClientPageReqVO extends PageParam { - @ApiModelProperty(value = "应用名", example = "土豆", notes = "模糊匹配") + @Schema(title = "应用名", example = "土豆", description = "模糊匹配") private String name; - @ApiModelProperty(value = "状态", example = "1", notes = "参见 CommonStatusEnum 枚举") + @Schema(title = "状态", example = "1", description = "参见 CommonStatusEnum 枚举") private Integer status; } 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 f4bdf4cc72..dc39d7c2ab 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,22 @@ 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 lombok.Data; import lombok.EqualsAndHashCode; import lombok.ToString; import java.time.LocalDateTime; -@ApiModel("管理后台 - OAuth2 客户端 Response VO") +@Schema(title = "管理后台 - OAuth2 客户端 Response VO") @Data @EqualsAndHashCode(callSuper = true) @ToString(callSuper = true) public class OAuth2ClientRespVO extends OAuth2ClientBaseVO { - @ApiModelProperty(value = "编号", required = true, example = "1024") + @Schema(title = "编号", required = true, example = "1024") private Long id; - @ApiModelProperty(value = "创建时间", required = true) + @Schema(title = "创建时间", required = true) private LocalDateTime createTime; } 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 024a1511fb..32968b4cd8 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,20 +1,19 @@ 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 lombok.Data; import lombok.EqualsAndHashCode; import lombok.ToString; import javax.validation.constraints.NotNull; -@ApiModel("管理后台 - OAuth2 客户端更新 Request VO") +@Schema(title = "管理后台 - OAuth2 客户端更新 Request VO") @Data @EqualsAndHashCode(callSuper = true) @ToString(callSuper = true) public class OAuth2ClientUpdateReqVO extends OAuth2ClientBaseVO { - @ApiModelProperty(value = "编号", required = true, example = "1024") + @Schema(title = "编号", required = true, example = "1024") @NotNull(message = "编号不能为空") private Long id; 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 4fdb4e5397..3c6412ae09 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,34 @@ 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 lombok.AllArgsConstructor; import lombok.Data; import lombok.NoArgsConstructor; -@ApiModel("管理后台 - 【开放接口】访问令牌 Response VO") +@Schema(title = "管理后台 - 【开放接口】访问令牌 Response VO") @Data @NoArgsConstructor @AllArgsConstructor public class OAuth2OpenAccessTokenRespVO { - @ApiModelProperty(value = "访问令牌", required = true, example = "tudou") + @Schema(title = "访问令牌", required = true, example = "tudou") @JsonProperty("access_token") private String accessToken; - @ApiModelProperty(value = "刷新令牌", required = true, example = "nice") + @Schema(title = "刷新令牌", required = true, example = "nice") @JsonProperty("refresh_token") private String refreshToken; - @ApiModelProperty(value = "令牌类型", required = true, example = "bearer") + @Schema(title = "令牌类型", required = true, example = "bearer") @JsonProperty("token_type") private String tokenType; - @ApiModelProperty(value = "过期时间", required = true, example = "42430", notes = "单位:秒") + @Schema(title = "过期时间", required = true, example = "42430", description = "单位:秒") @JsonProperty("expires_in") private Long expiresIn; - @ApiModelProperty(value = "授权范围", example = "user_info", notes = "如果多个授权范围,使用空格分隔") + @Schema(title = "授权范围", example = "user_info", description = "如果多个授权范围,使用空格分隔") private String scope; } 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 d2a7bb36e8..73a89817fd 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,14 @@ 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 lombok.AllArgsConstructor; import lombok.Data; import lombok.NoArgsConstructor; import java.util.List; -@ApiModel("管理后台 - 授权页的信息 Response VO") +@Schema(title = "管理后台 - 授权页的信息 Response VO") @Data @NoArgsConstructor @AllArgsConstructor @@ -20,7 +19,7 @@ public class OAuth2OpenAuthorizeInfoRespVO { */ private Client client; - @ApiModelProperty(value = "scope 的选中信息", required = true, notes = "使用 List 保证有序性,Key 是 scope,Value 为是否选中") + @Schema(title = "scope 的选中信息", required = true, description = "使用 List 保证有序性,Key 是 scope,Value 为是否选中") private List> scopes; @Data @@ -28,10 +27,10 @@ public class OAuth2OpenAuthorizeInfoRespVO { @AllArgsConstructor public static class Client { - @ApiModelProperty(value = "应用名", required = true, example = "土豆") + @Schema(title = "应用名", required = true, example = "土豆") private String name; - @ApiModelProperty(value = "应用图标", required = true, example = "https://www.iocoder.cn/xx.png") + @Schema(title = "应用图标", required = true, example = "https://www.iocoder.cn/xx.png") private String logo; } 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 e1639e9acf..3cf843f4f3 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,41 +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 lombok.AllArgsConstructor; import lombok.Data; import lombok.NoArgsConstructor; import java.util.List; -@ApiModel("管理后台 - 【开放接口】校验令牌 Response VO") +@Schema(title = "管理后台 - 【开放接口】校验令牌 Response VO") @Data @NoArgsConstructor @AllArgsConstructor public class OAuth2OpenCheckTokenRespVO { - @ApiModelProperty(value = "用户编号", required = true, example = "666") + @Schema(title = "用户编号", required = true, example = "666") @JsonProperty("user_id") private Long userId; - @ApiModelProperty(value = "用户类型", required = true, example = "2", notes = "参见 UserTypeEnum 枚举") + @Schema(title = "用户类型", required = true, example = "2", description = "参见 UserTypeEnum 枚举") @JsonProperty("user_type") private Integer userType; - @ApiModelProperty(value = "租户编号", required = true, example = "1024") + @Schema(title = "租户编号", required = true, example = "1024") @JsonProperty("tenant_id") private Long tenantId; - @ApiModelProperty(value = "客户端编号", required = true, example = "car") + @Schema(title = "客户端编号", required = true, example = "car") @JsonProperty("client_id") private String clientId; - @ApiModelProperty(value = "授权范围", required = true, example = "user_info") + @Schema(title = "授权范围", required = true, example = "user_info") private List scopes; - @ApiModelProperty(value = "访问令牌", required = true, example = "tudou") + @Schema(title = "访问令牌", required = true, example = "tudou") @JsonProperty("access_token") private String accessToken; - @ApiModelProperty(value = "过期时间", required = true, example = "1593092157", notes = "时间戳 / 1000,即单位:秒") + @Schema(title = "过期时间", required = true, example = "1593092157", description = "时间戳 / 1000,即单位:秒") private Long exp; } 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 65103adc61..7bd1fa5d32 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,22 @@ 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 lombok.Data; import lombok.EqualsAndHashCode; -@ApiModel("管理后台 - 访问令牌分页 Request VO") +@Schema(title = "管理后台 - 访问令牌分页 Request VO") @Data @EqualsAndHashCode(callSuper = true) public class OAuth2AccessTokenPageReqVO extends PageParam { - @ApiModelProperty(value = "用户编号", required = true, example = "666") + @Schema(title = "用户编号", required = true, example = "666") private Long userId; - @ApiModelProperty(value = "用户类型", required = true, example = "2", notes = "参见 UserTypeEnum 枚举") + @Schema(title = "用户类型", required = true, example = "2", description = "参见 UserTypeEnum 枚举") private Integer userType; - @ApiModelProperty(value = "客户端编号", required = true, example = "2") + @Schema(title = "客户端编号", required = true, example = "2") private String clientId; } 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 76a2bb7d55..b7b258ca25 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,40 @@ 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 lombok.AllArgsConstructor; import lombok.Data; import lombok.NoArgsConstructor; import java.time.LocalDateTime; -@ApiModel("管理后台 - 访问令牌 Response VO") +@Schema(title = "管理后台 - 访问令牌 Response VO") @Data @NoArgsConstructor @AllArgsConstructor public class OAuth2AccessTokenRespVO { - @ApiModelProperty(value = "编号", required = true, example = "1024") + @Schema(title = "编号", required = true, example = "1024") private Long id; - @ApiModelProperty(value = "访问令牌", required = true, example = "tudou") + @Schema(title = "访问令牌", required = true, example = "tudou") private String accessToken; - @ApiModelProperty(value = "刷新令牌", required = true, example = "nice") + @Schema(title = "刷新令牌", required = true, example = "nice") private String refreshToken; - @ApiModelProperty(value = "用户编号", required = true, example = "666") + @Schema(title = "用户编号", required = true, example = "666") private Long userId; - @ApiModelProperty(value = "用户类型", required = true, example = "2", notes = "参见 UserTypeEnum 枚举") + @Schema(title = "用户类型", required = true, example = "2", description = "参见 UserTypeEnum 枚举") private Integer userType; - @ApiModelProperty(value = "客户端编号", required = true, example = "2") + @Schema(title = "客户端编号", required = true, example = "2") private String clientId; - @ApiModelProperty(value = "创建时间", required = true) + @Schema(title = "创建时间", required = true) private LocalDateTime createTime; - @ApiModelProperty(value = "过期时间", required = true) + @Schema(title = "过期时间", required = true) private LocalDateTime expiresTime; } 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 f22c14a9fd..ab561607bb 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,36 @@ 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 lombok.AllArgsConstructor; import lombok.Data; import lombok.NoArgsConstructor; import java.util.List; -@ApiModel("管理后台 - OAuth2 获得用户基本信息 Response VO") +@Schema(title = "管理后台 - OAuth2 获得用户基本信息 Response VO") @Data @NoArgsConstructor @AllArgsConstructor public class OAuth2UserInfoRespVO { - @ApiModelProperty(value = "用户编号", required = true, example = "1") + @Schema(title = "用户编号", required = true, example = "1") private Long id; - @ApiModelProperty(value = "用户账号", required = true, example = "芋艿") + @Schema(title = "用户账号", required = true, example = "芋艿") private String username; - @ApiModelProperty(value = "用户昵称", required = true, example = "芋道") + @Schema(title = "用户昵称", required = true, example = "芋道") private String nickname; - @ApiModelProperty(value = "用户邮箱", example = "yudao@iocoder.cn") + @Schema(title = "用户邮箱", example = "yudao@iocoder.cn") private String email; - @ApiModelProperty(value = "手机号码", example = "15601691300") + @Schema(title = "手机号码", example = "15601691300") private String mobile; - @ApiModelProperty(value = "用户性别", example = "1", notes = "参见 SexEnum 枚举类") + @Schema(title = "用户性别", example = "1", description = "参见 SexEnum 枚举类") private Integer sex; - @ApiModelProperty(value = "用户头像", example = "https://www.iocoder.cn/xxx.png") + @Schema(title = "用户头像", example = "https://www.iocoder.cn/xxx.png") private String avatar; /** @@ -44,26 +43,26 @@ public class OAuth2UserInfoRespVO { */ private List posts; - @ApiModel("部门") + @Schema(title = "部门") @Data public static class Dept { - @ApiModelProperty(value = "部门编号", required = true, example = "1") + @Schema(title = "部门编号", required = true, example = "1") private Long id; - @ApiModelProperty(value = "部门名称", required = true, example = "研发部") + @Schema(title = "部门名称", required = true, example = "研发部") private String name; } - @ApiModel("岗位") + @Schema(title = "岗位") @Data public static class Post { - @ApiModelProperty(value = "岗位编号", required = true, example = "1") + @Schema(title = "岗位编号", required = true, example = "1") private Long id; - @ApiModelProperty(value = "岗位名称", required = true, example = "开发") + @Schema(title = "岗位名称", required = true, example = "开发") private String name; } 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 16082a75e8..5d7c9c2678 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,6 @@ 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 lombok.AllArgsConstructor; import lombok.Data; import lombok.NoArgsConstructor; @@ -10,26 +9,26 @@ import org.hibernate.validator.constraints.Length; import javax.validation.constraints.Email; import javax.validation.constraints.Size; -@ApiModel("管理后台 - OAuth2 更新用户基本信息 Request VO") +@Schema(title = "管理后台 - OAuth2 更新用户基本信息 Request VO") @Data @NoArgsConstructor @AllArgsConstructor public class OAuth2UserUpdateReqVO { - @ApiModelProperty(value = "用户昵称", required = true, example = "芋艿") + @Schema(title = "用户昵称", required = true, example = "芋艿") @Size(max = 30, message = "用户昵称长度不能超过 30 个字符") private String nickname; - @ApiModelProperty(value = "用户邮箱", example = "yudao@iocoder.cn") + @Schema(title = "用户邮箱", example = "yudao@iocoder.cn") @Email(message = "邮箱格式不正确") @Size(max = 50, message = "邮箱长度不能超过 50 个字符") private String email; - @ApiModelProperty(value = "手机号码", example = "15601691300") + @Schema(title = "手机号码", example = "15601691300") @Length(min = 11, max = 11, message = "手机号长度必须 11 位") private String mobile; - @ApiModelProperty(value = "用户性别", example = "1", notes = "参见 SexEnum 枚举类") + @Schema(title = "用户性别", example = "1", description = "参见 SexEnum 枚举类") private Integer sex; } 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 9813d8c0a9..ad7b14c29b 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> getMenus(MenuListReqVO reqVO) { List list = menuService.getMenus(reqVO); @@ -64,7 +64,7 @@ public class MenuController { } @GetMapping("/list-all-simple") - @ApiOperation(value = "获取菜单精简信息列表", notes = "只包含被开启的菜单,用于【角色分配菜单】功能的选项。" + + @Operation(summary = "获取菜单精简信息列表", description = "只包含被开启的菜单,用于【角色分配菜单】功能的选项。" + "在多租户的场景下,会只返回租户所在套餐有的菜单") public CommonResult> getSimpleMenus() { // 获得菜单列表,只要开启状态的 @@ -77,7 +77,7 @@ public class MenuController { } @GetMapping("/get") - @ApiOperation("获取菜单信息") + @Operation(summary = "获取菜单信息") @PreAuthorize("@ss.hasPermission('system:menu:query')") public CommonResult getMenu(Long id) { MenuDO menu = menuService.getMenu(id); 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 01ae9ea7b6..ca768d14fc 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) { 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 3716c8e7c8..cde85f9e42 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 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/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> getSimpleRoles() { // 获得角色列表,只要开启状态的 List list = roleService.getRoles(Collections.singleton(CommonStatusEnum.ENABLE.getStatus())); 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 7c64dd13fa..a316ad5778 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(title = "菜单名称", required = true, example = "芋道") @NotBlank(message = "菜单名称不能为空") @Size(max = 50, message = "菜单名称长度不能超过50个字符") private String name; - @ApiModelProperty(value = "权限标识", example = "sys:menu:add", notes = "仅菜单类型为按钮时,才需要传递") + @Schema(title = "权限标识", example = "sys:menu:add", description = "仅菜单类型为按钮时,才需要传递") @Size(max = 100) private String permission; - @ApiModelProperty(value = "类型", required = true, example = "1", notes = "参见 MenuTypeEnum 枚举类") + @Schema(title = "类型", required = true, example = "1", description = "参见 MenuTypeEnum 枚举类") @NotNull(message = "菜单类型不能为空") private Integer type; - @ApiModelProperty(value = "显示顺序不能为空", required = true, example = "1024") + @Schema(title = "显示顺序不能为空", required = true, example = "1024") @NotNull(message = "显示顺序不能为空") private Integer sort; - @ApiModelProperty(value = "父菜单 ID", required = true, example = "1024") + @Schema(title = "父菜单 ID", required = true, example = "1024") @NotNull(message = "父菜单 ID 不能为空") private Long parentId; - @ApiModelProperty(value = "路由地址", example = "post", notes = "仅菜单类型为菜单或者目录时,才需要传") + @Schema(title = "路由地址", example = "post", description = "仅菜单类型为菜单或者目录时,才需要传") @Size(max = 200, message = "路由地址不能超过200个字符") private String path; - @ApiModelProperty(value = "菜单图标", example = "/menu/list", notes = "仅菜单类型为菜单或者目录时,才需要传") + @Schema(title = "菜单图标", example = "/menu/list", description = "仅菜单类型为菜单或者目录时,才需要传") private String icon; - @ApiModelProperty(value = "组件路径", example = "system/post/index", notes = "仅菜单类型为菜单时,才需要传") + @Schema(title = "组件路径", example = "system/post/index", description = "仅菜单类型为菜单时,才需要传") @Size(max = 200, message = "组件路径不能超过255个字符") private String component; - @ApiModelProperty(value = "状态", required = true, example = "1", notes = "见 CommonStatusEnum 枚举") + @Schema(title = "状态", required = true, example = "1", description = "见 CommonStatusEnum 枚举") @NotNull(message = "状态不能为空") private Integer status; - @ApiModelProperty(value = "是否可见", example = "false") + @Schema(title = "是否可见", example = "false") private Boolean visible; - @ApiModelProperty(value = "是否缓存", example = "false") + @Schema(title = "是否缓存", example = "false") private Boolean keepAlive; } 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 a793997ff0..3930c8116c 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(title = "管理后台 - 菜单创建 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 2600fb92b9..0f14108787 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,16 @@ 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 lombok.Data; -@ApiModel("管理后台 - 菜单列表 Request VO") +@Schema(title = "管理后台 - 菜单列表 Request VO") @Data public class MenuListReqVO { - @ApiModelProperty(value = "菜单名称", example = "芋道", notes = "模糊匹配") + @Schema(title = "菜单名称", example = "芋道", description = "模糊匹配") private String name; - @ApiModelProperty(value = "展示状态", example = "1", notes = "参见 CommonStatusEnum 枚举类") + @Schema(title = "展示状态", example = "1", description = "参见 CommonStatusEnum 枚举类") 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/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 c6482b296c..0d5e9b2e1d 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,6 @@ 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 lombok.AllArgsConstructor; import lombok.Data; import lombok.EqualsAndHashCode; @@ -9,20 +8,20 @@ import lombok.NoArgsConstructor; import java.time.LocalDateTime; -@ApiModel("管理后台 - 菜单信息 Response VO") +@Schema(title = "管理后台 - 菜单信息 Response VO") @Data @NoArgsConstructor @AllArgsConstructor @EqualsAndHashCode(callSuper = true) public class MenuRespVO extends MenuBaseVO { - @ApiModelProperty(value = "菜单编号", required = true, example = "1024") + @Schema(title = "菜单编号", required = true, example = "1024") private Long id; - @ApiModelProperty(value = "状态", required = true, example = "1", notes = "参见 CommonStatusEnum 枚举类") + @Schema(title = "状态", required = true, example = "1", description = "参见 CommonStatusEnum 枚举类") private Integer status; - @ApiModelProperty(value = "创建时间", required = true, example = "时间戳格式") + @Schema(title = "创建时间", required = true, example = "时间戳格式") private LocalDateTime createTime; } 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 8f99d1e21f..53a10ed2bf 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,28 @@ 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 lombok.AllArgsConstructor; import lombok.Data; import lombok.NoArgsConstructor; import javax.validation.constraints.NotNull; -@ApiModel("管理后台 - 菜单精简信息 Response VO") +@Schema(title = "管理后台 - 菜单精简信息 Response VO") @Data @NoArgsConstructor @AllArgsConstructor public class MenuSimpleRespVO { - @ApiModelProperty(value = "菜单编号", required = true, example = "1024") + @Schema(title = "菜单编号", required = true, example = "1024") private Long id; - @ApiModelProperty(value = "菜单名称", required = true, example = "芋道") + @Schema(title = "菜单名称", required = true, example = "芋道") private String name; - @ApiModelProperty(value = "父菜单 ID", required = true, example = "1024") + @Schema(title = "父菜单 ID", required = true, example = "1024") private Long parentId; - @ApiModelProperty(value = "类型", required = true, example = "1", notes = "参见 MenuTypeEnum 枚举类") + @Schema(title = "类型", required = true, example = "1", description = "参见 MenuTypeEnum 枚举类") private Integer type; } 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 7a17843631..01783beffe 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,17 +1,16 @@ 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 lombok.*; import javax.validation.constraints.NotNull; -@ApiModel("管理后台 - 菜单更新 Request VO") +@Schema(title = "管理后台 - 菜单更新 Request VO") @Data @EqualsAndHashCode(callSuper = true) public class MenuUpdateReqVO extends MenuBaseVO { - @ApiModelProperty(value = "菜单编号", required = true, example = "1024") + @Schema(title = "菜单编号", required = true, example = "1024") @NotNull(message = "菜单编号不能为空") private Long id; 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 6adb8c8548..9d3c126dfb 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,26 @@ 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 lombok.Data; import javax.validation.constraints.NotNull; import java.util.Collections; import java.util.Set; -@ApiModel("管理后台 - 赋予角色数据权限 Request VO") +@Schema(title = "管理后台 - 赋予角色数据权限 Request VO") @Data public class PermissionAssignRoleDataScopeReqVO { - @ApiModelProperty(value = "角色编号", required = true, example = "1") + @Schema(title = "角色编号", required = true, example = "1") @NotNull(message = "角色编号不能为空") private Long roleId; - @ApiModelProperty(value = "数据范围", required = true, example = "1", notes = "参见 DataScopeEnum 枚举类") + @Schema(title = "数据范围", required = true, example = "1", description = "参见 DataScopeEnum 枚举类") @NotNull(message = "数据范围不能为空") // TODO 这里要多一个枚举校验 private Integer dataScope; - @ApiModelProperty(value = "部门编号列表", example = "1,3,5", notes = "只有范围类型为 DEPT_CUSTOM 时,该字段才需要") + @Schema(title = "部门编号列表", example = "1,3,5", description = "只有范围类型为 DEPT_CUSTOM 时,该字段才需要") private Set dataScopeDeptIds = Collections.emptySet(); // 兜底 } 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 3fc4dcb2c0..70a33591d0 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,21 @@ 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 lombok.Data; import javax.validation.constraints.NotNull; import java.util.Collections; import java.util.Set; -@ApiModel("管理后台 - 赋予角色菜单 Request VO") +@Schema(title = "管理后台 - 赋予角色菜单 Request VO") @Data public class PermissionAssignRoleMenuReqVO { - @ApiModelProperty(value = "角色编号", required = true, example = "1") + @Schema(title = "角色编号", required = true, example = "1") @NotNull(message = "角色编号不能为空") private Long roleId; - @ApiModelProperty(value = "菜单编号列表", example = "1,3,5") + @Schema(title = "菜单编号列表", example = "1,3,5") private Set menuIds = Collections.emptySet(); // 兜底 } 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 93cc8ffa27..bcb4d46bf7 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,21 @@ 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 lombok.Data; import javax.validation.constraints.NotNull; import java.util.Collections; import java.util.Set; -@ApiModel("管理后台 - 赋予用户角色 Request VO") +@Schema(title = "管理后台 - 赋予用户角色 Request VO") @Data public class PermissionAssignUserRoleReqVO { - @ApiModelProperty(value = "用户编号", required = true, example = "1") + @Schema(title = "用户编号", required = true, example = "1") @NotNull(message = "用户编号不能为空") private Long userId; - @ApiModelProperty(value = "角色编号列表", example = "1,3,5") + @Schema(title = "角色编号列表", example = "1,3,5") private Set roleIds = Collections.emptySet(); // 兜底 } 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 60d678aa9d..ee320c01be 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(title = "角色名称", 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(title = "角色编码", required = true, example = "ADMIN") private String code; - @ApiModelProperty(value = "显示顺序不能为空", required = true, example = "1024") + @Schema(title = "显示顺序不能为空", required = true, example = "1024") @NotNull(message = "显示顺序不能为空") private Integer sort; - @ApiModelProperty(value = "备注", example = "我是一个角色") + @Schema(title = "备注", example = "我是一个角色") private String remark; } 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 785f658158..0f21c3c2fe 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,10 @@ 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(title = "管理后台 - 角色创建 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 ca9bed7cdb..a16deff7af 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,6 @@ 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 lombok.Data; import org.springframework.format.annotation.DateTimeFormat; @@ -9,20 +8,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(title = "管理后台 - 角色分页 Request VO") @Data public class RoleExportReqVO { - @ApiModelProperty(value = "角色名称", example = "芋道", notes = "模糊匹配") + @Schema(title = "角色名称", example = "芋道", description = "模糊匹配") private String name; - @ApiModelProperty(value = "角色标识", example = "yudao", notes = "模糊匹配") + @Schema(title = "角色标识", example = "yudao", description = "模糊匹配") private String code; - @ApiModelProperty(value = "展示状态", example = "1", notes = "参见 CommonStatusEnum 枚举类") + @Schema(title = "展示状态", example = "1", description = "参见 CommonStatusEnum 枚举类") private Integer status; - @ApiModelProperty(value = "开始时间", example = "[2022-07-01 00:00:00,2022-07-01 23:59:59]") + @Schema(title = "开始时间", 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; 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 040462a6f6..b37cdb4857 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,7 @@ 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 lombok.Data; import lombok.EqualsAndHashCode; import org.springframework.format.annotation.DateTimeFormat; @@ -11,21 +10,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(title = "管理后台 - 角色分页 Request VO") @Data @EqualsAndHashCode(callSuper = true) public class RolePageReqVO extends PageParam { - @ApiModelProperty(value = "角色名称", example = "芋道", notes = "模糊匹配") + @Schema(title = "角色名称", example = "芋道", description = "模糊匹配") private String name; - @ApiModelProperty(value = "角色标识", example = "yudao", notes = "模糊匹配") + @Schema(title = "角色标识", example = "yudao", description = "模糊匹配") private String code; - @ApiModelProperty(value = "展示状态", example = "1", notes = "参见 CommonStatusEnum 枚举类") + @Schema(title = "展示状态", example = "1", description = "参见 CommonStatusEnum 枚举类") private Integer status; - @ApiModelProperty(value = "创建时间", example = "[2022-07-01 00:00:00,2022-07-01 23:59:59]") + @Schema(title = "创建时间", 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; 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 6653820b0c..654eff898f 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,6 @@ 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 lombok.AllArgsConstructor; import lombok.Data; import lombok.EqualsAndHashCode; @@ -10,29 +9,29 @@ import lombok.NoArgsConstructor; import java.time.LocalDateTime; import java.util.Set; -@ApiModel("管理后台 - 角色信息 Response VO") +@Schema(title = "管理后台 - 角色信息 Response VO") @Data @NoArgsConstructor @AllArgsConstructor @EqualsAndHashCode(callSuper = true) public class RoleRespVO extends RoleBaseVO { - @ApiModelProperty(value = "角色编号", required = true, example = "1") + @Schema(title = "角色编号", required = true, example = "1") private Long id; - @ApiModelProperty(value = "数据范围", required = true, example = "1", notes = "参见 DataScopeEnum 枚举类") + @Schema(title = "数据范围", required = true, example = "1", description = "参见 DataScopeEnum 枚举类") private Integer dataScope; - @ApiModelProperty(value = "数据范围(指定部门数组)", example = "1") + @Schema(title = "数据范围(指定部门数组)", example = "1") private Set dataScopeDeptIds; - @ApiModelProperty(value = "状态", required = true, example = "1", notes = "参见 CommonStatusEnum 枚举类") + @Schema(title = "状态", required = true, example = "1", description = "参见 CommonStatusEnum 枚举类") private Integer status; - @ApiModelProperty(value = "角色类型", required = true, example = "1", notes = "参见 RoleTypeEnum 枚举类") + @Schema(title = "角色类型", required = true, example = "1", description = "参见 RoleTypeEnum 枚举类") private Integer type; - @ApiModelProperty(value = "创建时间", required = true, example = "时间戳格式") + @Schema(title = "创建时间", required = true, example = "时间戳格式") private LocalDateTime createTime; } 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 c0a4c30838..a7fced888d 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,20 @@ 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 lombok.AllArgsConstructor; import lombok.Data; import lombok.NoArgsConstructor; -@ApiModel("管理后台 - 角色精简信息 Response VO") +@Schema(title = "管理后台 - 角色精简信息 Response VO") @Data @NoArgsConstructor @AllArgsConstructor public class RoleSimpleRespVO { - @ApiModelProperty(value = "角色编号", required = true, example = "1024") + @Schema(title = "角色编号", required = true, example = "1024") private Long id; - @ApiModelProperty(value = "角色名称", required = true, example = "芋道") + @Schema(title = "角色名称", required = true, example = "芋道") private String name; } 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 362cbb2904..5c02ff2d96 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,18 +1,17 @@ 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 lombok.Data; import lombok.EqualsAndHashCode; import javax.validation.constraints.NotNull; -@ApiModel("管理后台 - 角色更新 Request VO") +@Schema(title = "管理后台 - 角色更新 Request VO") @Data @EqualsAndHashCode(callSuper = true) public class RoleUpdateReqVO extends RoleBaseVO { - @ApiModelProperty(value = "角色编号", required = true, example = "1024") + @Schema(title = "角色编号", required = true, example = "1024") @NotNull(message = "角色编号不能为空") private Long id; 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 790accd92b..ed4a726045 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 @@ -2,21 +2,20 @@ package cn.iocoder.yudao.module.system.controller.admin.permission.vo.role; import cn.iocoder.yudao.framework.common.enums.CommonStatusEnum; 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 lombok.Data; import javax.validation.constraints.NotNull; -@ApiModel("管理后台 - 角色更新状态 Request VO") +@Schema(title = "管理后台 - 角色更新状态 Request VO") @Data public class RoleUpdateStatusReqVO { - @ApiModelProperty(value = "角色编号", required = true, example = "1024") + @Schema(title = "角色编号", required = true, example = "1024") @NotNull(message = "角色编号不能为空") private Long id; - @ApiModelProperty(value = "状态", required = true, example = "1", notes = "见 CommonStatusEnum 枚举") + @Schema(title = "状态", required = true, example = "1", description = "见 CommonStatusEnum 枚举") @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/SensitiveWordController.java b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/sensitiveword/SensitiveWordController.java index e9536ad9a7..684480be69 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,14 +88,14 @@ 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)); 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 770a22b923..f7539f944a 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(title = "敏感词", required = true, example = "敏感词") @NotNull(message = "敏感词不能为空") private String name; - @ApiModelProperty(value = "标签", required = true, example = "短信,评论") + @Schema(title = "标签", required = true, example = "短信,评论") @NotNull(message = "标签不能为空") private List tags; - @ApiModelProperty(value = "状态", required = true, example = "1", notes = "参见 CommonStatusEnum 枚举类") + @Schema(title = "状态", required = true, example = "1", description = "参见 CommonStatusEnum 枚举类") @NotNull(message = "状态不能为空") private Integer status; - @ApiModelProperty(value = "描述", example = "污言秽语") + @Schema(title = "描述", example = "污言秽语") private String description; } 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 bb206652bf..bc833d2766 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(title = "管理后台 - 敏感词创建 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/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 1addc4cfec..7df2b7aa73 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,6 @@ 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 lombok.Data; import org.springframework.format.annotation.DateTimeFormat; @@ -9,21 +8,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(title = "管理后台 - 敏感词 Excel 导出 Request VO", description = "参数和 SensitiveWordPageReqVO 是一致的") @Data public class SensitiveWordExportReqVO { - @ApiModelProperty(value = "敏感词", example = "敏感词") + @Schema(title = "敏感词", example = "敏感词") private String name; - @ApiModelProperty(value = "标签", example = "短信,评论") + @Schema(title = "标签", example = "短信,评论") private String tag; - @ApiModelProperty(value = "状态", example = "1", notes = "参见 CommonStatusEnum 枚举类") + @Schema(title = "状态", example = "1", description = "参见 CommonStatusEnum 枚举类") private Integer status; @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND) - @ApiModelProperty(value = "创建时间") + @Schema(title = "创建时间") private LocalDateTime[] createTime; } 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 0876701803..f913b92701 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,7 @@ 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 lombok.Data; import lombok.EqualsAndHashCode; import lombok.ToString; @@ -12,23 +11,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(title = "管理后台 - 敏感词分页 Request VO") @Data @EqualsAndHashCode(callSuper = true) @ToString(callSuper = true) public class SensitiveWordPageReqVO extends PageParam { - @ApiModelProperty(value = "敏感词", example = "敏感词") + @Schema(title = "敏感词", example = "敏感词") private String name; - @ApiModelProperty(value = "标签", example = "短信,评论") + @Schema(title = "标签", example = "短信,评论") private String tag; - @ApiModelProperty(value = "状态", example = "1", notes = "参见 CommonStatusEnum 枚举类") + @Schema(title = "状态", example = "1", description = "参见 CommonStatusEnum 枚举类") private Integer status; @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND) - @ApiModelProperty(value = "创建时间") + @Schema(title = "创建时间") private LocalDateTime[] createTime; } 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 c92a8d4e0e..f97333f58a 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,22 @@ 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 lombok.Data; import lombok.EqualsAndHashCode; import lombok.ToString; import java.time.LocalDateTime; -@ApiModel("管理后台 - 敏感词 Response VO") +@Schema(title = "管理后台 - 敏感词 Response VO") @Data @EqualsAndHashCode(callSuper = true) @ToString(callSuper = true) public class SensitiveWordRespVO extends SensitiveWordBaseVO { - @ApiModelProperty(value = "编号", required = true, example = "1") + @Schema(title = "编号", required = true, example = "1") private Long id; - @ApiModelProperty(value = "创建时间", required = true) + @Schema(title = "创建时间", required = true) private LocalDateTime createTime; } 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 f87aa3a622..2dc0ad37ba 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,20 +1,19 @@ 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 lombok.Data; import lombok.EqualsAndHashCode; import lombok.ToString; import javax.validation.constraints.NotNull; -@ApiModel("管理后台 - 敏感词更新 Request VO") +@Schema(title = "管理后台 - 敏感词更新 Request VO") @Data @EqualsAndHashCode(callSuper = true) @ToString(callSuper = true) public class SensitiveWordUpdateReqVO extends SensitiveWordBaseVO { - @ApiModelProperty(value = "编号", required = true, example = "1") + @Schema(title = "编号", required = true, example = "1") @NotNull(message = "编号不能为空") private Long id; 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 8a07676526..05f13d257f 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 @@ -5,8 +5,8 @@ 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 cn.iocoder.yudao.module.system.service.sms.SmsSendService; -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.RequestMapping; import org.springframework.web.bind.annotation.RestController; @@ -17,7 +17,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 { @@ -27,7 +27,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); @@ -37,7 +37,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); 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 638140d210..73057a090b 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> getSimpleSmsChannels() { List list = smsChannelService.getSmsChannelList(); // 排序后,返回给前端 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 5fbf10e741..27b957bd6c 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, 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 3eef58652f..173d8f6438 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,7 +88,7 @@ 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, 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 b98697d5a2..c63d4545e1 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,5 @@ 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,25 +12,25 @@ import javax.validation.constraints.NotNull; @Data public class SmsChannelBaseVO { - @ApiModelProperty(value = "短信签名", required = true, example = "芋道源码") + @Schema(title = "短信签名", required = true, example = "芋道源码") @NotNull(message = "短信签名不能为空") private String signature; - @ApiModelProperty(value = "启用状态", required = true, example = "1") + @Schema(title = "启用状态", required = true, example = "1") @NotNull(message = "启用状态不能为空") private Integer status; - @ApiModelProperty(value = "备注", example = "好吃!") + @Schema(title = "备注", example = "好吃!") private String remark; - @ApiModelProperty(value = "短信 API 的账号", required = true, example = "yudao") + @Schema(title = "短信 API 的账号", required = true, example = "yudao") @NotNull(message = "短信 API 的账号不能为空") private String apiKey; - @ApiModelProperty(value = "短信 API 的密钥", example = "yuanma") + @Schema(title = "短信 API 的密钥", example = "yuanma") private String apiSecret; - @ApiModelProperty(value = "短信发送回调 URL", example = "http://www.iocoder.cn") + @Schema(title = "短信发送回调 URL", example = "http://www.iocoder.cn") @URL(message = "回调 URL 格式不正确") private String callbackUrl; 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 edc162f474..b8940af404 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,20 +1,19 @@ 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 lombok.Data; import lombok.EqualsAndHashCode; import lombok.ToString; import javax.validation.constraints.NotNull; -@ApiModel("管理后台 - 短信渠道创建 Request VO") +@Schema(title = "管理后台 - 短信渠道创建 Request VO") @Data @EqualsAndHashCode(callSuper = true) @ToString(callSuper = true) public class SmsChannelCreateReqVO extends SmsChannelBaseVO { - @ApiModelProperty(value = "渠道编码", required = true, example = "YUN_PIAN", notes = "参见 SmsChannelEnum 枚举类") + @Schema(title = "渠道编码", required = true, example = "YUN_PIAN", description = "参见 SmsChannelEnum 枚举类") @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 f35c5e8ac4..9b79a31702 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,7 @@ 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 lombok.Data; import lombok.EqualsAndHashCode; import lombok.ToString; @@ -12,20 +11,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(title = "管理后台 - 短信渠道分页 Request VO") @Data @EqualsAndHashCode(callSuper = true) @ToString(callSuper = true) public class SmsChannelPageReqVO extends PageParam { - @ApiModelProperty(value = "任务状态", example = "1") + @Schema(title = "任务状态", example = "1") private Integer status; - @ApiModelProperty(value = "短信签名", example = "芋道源码", notes = "模糊匹配") + @Schema(title = "短信签名", example = "芋道源码", description = "模糊匹配") private String signature; @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND) - @ApiModelProperty(value = "创建时间") + @Schema(title = "创建时间") private LocalDateTime[] createTime; } 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 d52b6d9e70..04b8d95e14 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,25 @@ 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 lombok.Data; import lombok.EqualsAndHashCode; import lombok.ToString; import java.time.LocalDateTime; -@ApiModel("管理后台 - 短信渠道 Response VO") +@Schema(title = "管理后台 - 短信渠道 Response VO") @Data @EqualsAndHashCode(callSuper = true) @ToString(callSuper = true) public class SmsChannelRespVO extends SmsChannelBaseVO { - @ApiModelProperty(value = "编号", required = true, example = "1024") + @Schema(title = "编号", required = true, example = "1024") private Long id; - @ApiModelProperty(value = "渠道编码", required = true, example = "YUN_PIAN", notes = "参见 SmsChannelEnum 枚举类") + @Schema(title = "渠道编码", required = true, example = "YUN_PIAN", description = "参见 SmsChannelEnum 枚举类") private String code; - @ApiModelProperty(value = "创建时间", required = true) + @Schema(title = "创建时间", required = true) private LocalDateTime createTime; } 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 22b5bc1d48..57c4c3fb92 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,23 @@ 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 lombok.Data; import javax.validation.constraints.NotNull; -@ApiModel("管理后台 - 短信渠道精简 Response VO") +@Schema(title = "管理后台 - 短信渠道精简 Response VO") @Data public class SmsChannelSimpleRespVO { - @ApiModelProperty(value = "编号", required = true, example = "1024") + @Schema(title = "编号", required = true, example = "1024") @NotNull(message = "编号不能为空") private Long id; - @ApiModelProperty(value = "短信签名", required = true, example = "芋道源码") + @Schema(title = "短信签名", required = true, example = "芋道源码") @NotNull(message = "短信签名不能为空") private String signature; - @ApiModelProperty(value = "渠道编码", required = true, example = "YUN_PIAN", notes = "参见 SmsChannelEnum 枚举类") + @Schema(title = "渠道编码", required = true, example = "YUN_PIAN", description = "参见 SmsChannelEnum 枚举类") 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/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 6833287459..0d46068212 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,20 +1,19 @@ 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 lombok.Data; import lombok.EqualsAndHashCode; import lombok.ToString; import javax.validation.constraints.NotNull; -@ApiModel("管理后台 - 短信渠道更新 Request VO") +@Schema(title = "管理后台 - 短信渠道更新 Request VO") @Data @EqualsAndHashCode(callSuper = true) @ToString(callSuper = true) public class SmsChannelUpdateReqVO extends SmsChannelBaseVO { - @ApiModelProperty(value = "编号", required = true, example = "1024") + @Schema(title = "编号", required = true, example = "1024") @NotNull(message = "编号不能为空") private Long id; 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 55a723a9c0..57093888d0 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,6 @@ 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 lombok.Data; import org.springframework.format.annotation.DateTimeFormat; @@ -9,31 +8,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(title = "管理后台 - 短信日志 Excel 导出 Request VO", description = "参数和 SmsLogPageReqVO 是一致的") @Data public class SmsLogExportReqVO { - @ApiModelProperty(value = "短信渠道编号", example = "10") + @Schema(title = "短信渠道编号", example = "10") private Long channelId; - @ApiModelProperty(value = "模板编号", example = "20") + @Schema(title = "模板编号", example = "20") private Long templateId; - @ApiModelProperty(value = "手机号", example = "15601691300") + @Schema(title = "手机号", example = "15601691300") private String mobile; - @ApiModelProperty(value = "发送状态", example = "1") + @Schema(title = "发送状态", example = "1") private Integer sendStatus; @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND) - @ApiModelProperty(value = "开始发送时间") + @Schema(title = "开始发送时间") private LocalDateTime[] sendTime; - @ApiModelProperty(value = "接收状态", example = "0") + @Schema(title = "接收状态", example = "0") private Integer receiveStatus; @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND) - @ApiModelProperty(value = "开始接收时间") + @Schema(title = "开始接收时间") private LocalDateTime[] receiveTime; } 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 87e804796c..ce00897dd7 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,7 @@ 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 lombok.Data; import lombok.EqualsAndHashCode; import lombok.ToString; @@ -12,33 +11,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(title = "管理后台 - 短信日志分页 Request VO") @Data @EqualsAndHashCode(callSuper = true) @ToString(callSuper = true) public class SmsLogPageReqVO extends PageParam { - @ApiModelProperty(value = "短信渠道编号", example = "10") + @Schema(title = "短信渠道编号", example = "10") private Long channelId; - @ApiModelProperty(value = "模板编号", example = "20") + @Schema(title = "模板编号", example = "20") private Long templateId; - @ApiModelProperty(value = "手机号", example = "15601691300") + @Schema(title = "手机号", example = "15601691300") private String mobile; - @ApiModelProperty(value = "发送状态", example = "1", notes = "参见 SmsSendStatusEnum 枚举类") + @Schema(title = "发送状态", example = "1", description = "参见 SmsSendStatusEnum 枚举类") private Integer sendStatus; @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND) - @ApiModelProperty(value = "发送时间") + @Schema(title = "发送时间") private LocalDateTime[] sendTime; - @ApiModelProperty(value = "接收状态", example = "0", notes = "参见 SmsReceiveStatusEnum 枚举类") + @Schema(title = "接收状态", example = "0", description = "参见 SmsReceiveStatusEnum 枚举类") private Integer receiveStatus; @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND) - @ApiModelProperty(value = "接收时间") + @Schema(title = "接收时间") private LocalDateTime[] receiveTime; } 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 aee9657c80..98ec37f94e 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,88 @@ 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 lombok.Data; import java.time.LocalDateTime; import java.util.Map; -@ApiModel("管理后台 - 短信日志 Response VO") +@Schema(title = "管理后台 - 短信日志 Response VO") @Data public class SmsLogRespVO { - @ApiModelProperty(value = "编号", required = true, example = "1024") + @Schema(title = "编号", required = true, example = "1024") private Long id; - @ApiModelProperty(value = "短信渠道编号", required = true, example = "10") + @Schema(title = "短信渠道编号", required = true, example = "10") private Long channelId; - @ApiModelProperty(value = "短信渠道编码", required = true, example = "ALIYUN") + @Schema(title = "短信渠道编码", required = true, example = "ALIYUN") private String channelCode; - @ApiModelProperty(value = "模板编号", required = true, example = "20") + @Schema(title = "模板编号", required = true, example = "20") private Long templateId; - @ApiModelProperty(value = "模板编码", required = true, example = "test-01") + @Schema(title = "模板编码", required = true, example = "test-01") private String templateCode; - @ApiModelProperty(value = "短信类型", required = true, example = "1") + @Schema(title = "短信类型", required = true, example = "1") private Integer templateType; - @ApiModelProperty(value = "短信内容", required = true, example = "你好,你的验证码是 1024") + @Schema(title = "短信内容", required = true, example = "你好,你的验证码是 1024") private String templateContent; - @ApiModelProperty(value = "短信参数", required = true, example = "name,code") + @Schema(title = "短信参数", required = true, example = "name,code") private Map templateParams; - @ApiModelProperty(value = "短信 API 的模板编号", required = true, example = "SMS_207945135") + @Schema(title = "短信 API 的模板编号", required = true, example = "SMS_207945135") private String apiTemplateId; - @ApiModelProperty(value = "手机号", required = true, example = "15601691300") + @Schema(title = "手机号", required = true, example = "15601691300") private String mobile; - @ApiModelProperty(value = "用户编号", example = "10") + @Schema(title = "用户编号", example = "10") private Long userId; - @ApiModelProperty(value = "用户类型", example = "1") + @Schema(title = "用户类型", example = "1") private Integer userType; - @ApiModelProperty(value = "发送状态", required = true, example = "1") + @Schema(title = "发送状态", required = true, example = "1") private Integer sendStatus; - @ApiModelProperty(value = "发送时间") + @Schema(title = "发送时间") private LocalDateTime sendTime; - @ApiModelProperty(value = "发送结果的编码", example = "0") + @Schema(title = "发送结果的编码", example = "0") private Integer sendCode; - @ApiModelProperty(value = "发送结果的提示", example = "成功") + @Schema(title = "发送结果的提示", example = "成功") private String sendMsg; - @ApiModelProperty(value = "短信 API 发送结果的编码", example = "SUCCESS") + @Schema(title = "短信 API 发送结果的编码", example = "SUCCESS") private String apiSendCode; - @ApiModelProperty(value = "短信 API 发送失败的提示", example = "成功") + @Schema(title = "短信 API 发送失败的提示", example = "成功") private String apiSendMsg; - @ApiModelProperty(value = "短信 API 发送返回的唯一请求 ID", example = "3837C6D3-B96F-428C-BBB2-86135D4B5B99") + @Schema(title = "短信 API 发送返回的唯一请求 ID", example = "3837C6D3-B96F-428C-BBB2-86135D4B5B99") private String apiRequestId; - @ApiModelProperty(value = "短信 API 发送返回的序号", example = "62923244790") + @Schema(title = "短信 API 发送返回的序号", example = "62923244790") private String apiSerialNo; - @ApiModelProperty(value = "接收状态", required = true, example = "0") + @Schema(title = "接收状态", required = true, example = "0") private Integer receiveStatus; - @ApiModelProperty(value = "接收时间") + @Schema(title = "接收时间") private LocalDateTime receiveTime; - @ApiModelProperty(value = "API 接收结果的编码", example = "DELIVRD") + @Schema(title = "API 接收结果的编码", example = "DELIVRD") private String apiReceiveCode; - @ApiModelProperty(value = "API 接收结果的说明", example = "用户接收成功") + @Schema(title = "API 接收结果的说明", example = "用户接收成功") private String apiReceiveMsg; - @ApiModelProperty(value = "创建时间", required = true) + @Schema(title = "创建时间", required = true) private LocalDateTime createTime; } 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 ca9220f8a0..664d52948e 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,5 @@ 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,34 +11,34 @@ import javax.validation.constraints.NotNull; @Data public class SmsTemplateBaseVO { - @ApiModelProperty(value = "短信类型", required = true, example = "1", notes = "参见 SmsTemplateTypeEnum 枚举类") + @Schema(title = "短信类型", required = true, example = "1", description = "参见 SmsTemplateTypeEnum 枚举类") @NotNull(message = "短信类型不能为空") private Integer type; - @ApiModelProperty(value = "开启状态", required = true, example = "1", notes = "参见 CommonStatusEnum 枚举类") + @Schema(title = "开启状态", required = true, example = "1", description = "参见 CommonStatusEnum 枚举类") @NotNull(message = "开启状态不能为空") private Integer status; - @ApiModelProperty(value = "模板编码", required = true, example = "test_01") + @Schema(title = "模板编码", required = true, example = "test_01") @NotNull(message = "模板编码不能为空") private String code; - @ApiModelProperty(value = "模板名称", required = true, example = "yudao") + @Schema(title = "模板名称", required = true, example = "yudao") @NotNull(message = "模板名称不能为空") private String name; - @ApiModelProperty(value = "模板内容", required = true, example = "你好,{name}。你长的太{like}啦!") + @Schema(title = "模板内容", required = true, example = "你好,{name}。你长的太{like}啦!") @NotNull(message = "模板内容不能为空") private String content; - @ApiModelProperty(value = "备注", example = "哈哈哈") + @Schema(title = "备注", example = "哈哈哈") private String remark; - @ApiModelProperty(value = "短信 API 的模板编号", required = true, example = "4383920") + @Schema(title = "短信 API 的模板编号", required = true, example = "4383920") @NotNull(message = "短信 API 的模板编号不能为空") private String apiTemplateId; - @ApiModelProperty(value = "短信渠道编号", required = true, example = "10") + @Schema(title = "短信渠道编号", required = true, example = "10") @NotNull(message = "短信渠道编号不能为空") private Long channelId; 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 ab8b89ebd9..9546b83e7e 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,10 @@ 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(title = "管理后台 - 短信模板创建 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/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 df5947adca..0f84463af2 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,6 @@ 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 lombok.Data; import org.springframework.format.annotation.DateTimeFormat; @@ -9,30 +8,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(title = "管理后台 - 短信模板 Excel 导出 Request VO", description = "参数和 SmsTemplatePageReqVO 是一致的") @Data public class SmsTemplateExportReqVO { - @ApiModelProperty(value = "短信签名", example = "1") + @Schema(title = "短信签名", example = "1") private Integer type; - @ApiModelProperty(value = "开启状态", example = "1") + @Schema(title = "开启状态", example = "1") private Integer status; - @ApiModelProperty(value = "模板编码", example = "test_01", notes = "模糊匹配") + @Schema(title = "模板编码", example = "test_01", description = "模糊匹配") private String code; - @ApiModelProperty(value = "模板内容", example = "你好,{name}。你长的太{like}啦!", notes = "模糊匹配") + @Schema(title = "模板内容", example = "你好,{name}。你长的太{like}啦!", description = "模糊匹配") private String content; - @ApiModelProperty(value = "短信 API 的模板编号", example = "4383920", notes = "模糊匹配") + @Schema(title = "短信 API 的模板编号", example = "4383920", description = "模糊匹配") private String apiTemplateId; - @ApiModelProperty(value = "短信渠道编号", example = "10") + @Schema(title = "短信渠道编号", example = "10") private Long channelId; @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND) - @ApiModelProperty(value = "创建时间") + @Schema(title = "创建时间") private LocalDateTime[] createTime; } 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 129e0f7a86..3cb26d2280 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,7 @@ 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 lombok.Data; import lombok.EqualsAndHashCode; import lombok.ToString; @@ -12,32 +11,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(title = "管理后台 - 短信模板分页 Request VO") @Data @EqualsAndHashCode(callSuper = true) @ToString(callSuper = true) public class SmsTemplatePageReqVO extends PageParam { - @ApiModelProperty(value = "短信签名", example = "1") + @Schema(title = "短信签名", example = "1") private Integer type; - @ApiModelProperty(value = "开启状态", example = "1") + @Schema(title = "开启状态", example = "1") private Integer status; - @ApiModelProperty(value = "模板编码", example = "test_01", notes = "模糊匹配") + @Schema(title = "模板编码", example = "test_01", description = "模糊匹配") private String code; - @ApiModelProperty(value = "模板内容", example = "你好,{name}。你长的太{like}啦!", notes = "模糊匹配") + @Schema(title = "模板内容", example = "你好,{name}。你长的太{like}啦!", description = "模糊匹配") private String content; - @ApiModelProperty(value = "短信 API 的模板编号", example = "4383920", notes = "模糊匹配") + @Schema(title = "短信 API 的模板编号", example = "4383920", description = "模糊匹配") private String apiTemplateId; - @ApiModelProperty(value = "短信渠道编号", example = "10") + @Schema(title = "短信渠道编号", example = "10") private Long channelId; @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND) - @ApiModelProperty(value = "创建时间") + @Schema(title = "创建时间") private LocalDateTime[] createTime; } 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 8a10503cb5..853056b160 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,6 @@ 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 lombok.Data; import lombok.EqualsAndHashCode; import lombok.ToString; @@ -9,22 +8,22 @@ import lombok.ToString; import java.time.LocalDateTime; import java.util.List; -@ApiModel("管理后台 - 短信模板 Response VO") +@Schema(title = "管理后台 - 短信模板 Response VO") @Data @EqualsAndHashCode(callSuper = true) @ToString(callSuper = true) public class SmsTemplateRespVO extends SmsTemplateBaseVO { - @ApiModelProperty(value = "编号", required = true, example = "1024") + @Schema(title = "编号", required = true, example = "1024") private Long id; - @ApiModelProperty(value = "短信渠道编码", required = true, example = "ALIYUN") + @Schema(title = "短信渠道编码", required = true, example = "ALIYUN") private String channelCode; - @ApiModelProperty(value = "参数数组", example = "name,code") + @Schema(title = "参数数组", example = "name,code") private List params; - @ApiModelProperty(value = "创建时间", required = true) + @Schema(title = "创建时间", required = true) private LocalDateTime createTime; } 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 956b4839eb..f8ca2a0e0c 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,24 @@ 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 lombok.Data; import javax.validation.constraints.NotNull; import java.util.Map; -@ApiModel("管理后台 - 短信模板的发送 Request VO") +@Schema(title = "管理后台 - 短信模板的发送 Request VO") @Data public class SmsTemplateSendReqVO { - @ApiModelProperty(value = "手机号", required = true, example = "15601691300") + @Schema(title = "手机号", required = true, example = "15601691300") @NotNull(message = "手机号不能为空") private String mobile; - @ApiModelProperty(value = "模板编码", required = true, example = "test_01") + @Schema(title = "模板编码", required = true, example = "test_01") @NotNull(message = "模板编码不能为空") private String templateCode; - @ApiModelProperty(value = "模板参数") + @Schema(title = "模板参数") private Map templateParams; } 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 86bdbba9a3..44531e7997 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,20 +1,19 @@ 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 lombok.Data; import lombok.EqualsAndHashCode; import lombok.ToString; import javax.validation.constraints.NotNull; -@ApiModel("管理后台 - 短信模板更新 Request VO") +@Schema(title = "管理后台 - 短信模板更新 Request VO") @Data @EqualsAndHashCode(callSuper = true) @ToString(callSuper = true) public class SmsTemplateUpdateReqVO extends SmsTemplateBaseVO { - @ApiModelProperty(value = "编号", required = true, example = "1024") + @Schema(title = "编号", required = true, example = "1024") @NotNull(message = "编号不能为空") private Long id; 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 85585f5376..0a0682f692 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,14 +26,14 @@ 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); 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 27dd6b79ae..54d52e1f09 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,7 @@ 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 lombok.AllArgsConstructor; import lombok.Builder; import lombok.Data; @@ -12,23 +11,23 @@ import lombok.NoArgsConstructor; import javax.validation.constraints.NotEmpty; import javax.validation.constraints.NotNull; -@ApiModel("管理后台 - 社交绑定 Request VO,使用 code 授权码") +@Schema(title = "管理后台 - 社交绑定 Request VO,使用 code 授权码") @Data @NoArgsConstructor @AllArgsConstructor @Builder public class SocialUserBindReqVO { - @ApiModelProperty(value = "社交平台的类型", required = true, example = "10", notes = "参见 UserSocialTypeEnum 枚举值") + @Schema(title = "社交平台的类型", required = true, example = "10", description = "参见 UserSocialTypeEnum 枚举值") @InEnum(SocialTypeEnum.class) @NotNull(message = "社交平台的类型不能为空") private Integer type; - @ApiModelProperty(value = "授权码", required = true, example = "1024") + @Schema(title = "授权码", required = true, example = "1024") @NotEmpty(message = "授权码不能为空") private String code; - @ApiModelProperty(value = "state", required = true, example = "9b2ffbc1-7425-4155-9894-9d5c08541d62") + @Schema(title = "state", required = true, example = "9b2ffbc1-7425-4155-9894-9d5c08541d62") @NotEmpty(message = "state 不能为空") private String state; 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 68904ce584..933e06d9b6 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,7 @@ 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 lombok.AllArgsConstructor; import lombok.Builder; import lombok.Data; @@ -12,19 +11,19 @@ import lombok.NoArgsConstructor; import javax.validation.constraints.NotEmpty; import javax.validation.constraints.NotNull; -@ApiModel("管理后台 - 取消社交绑定 Request VO") +@Schema(title = "管理后台 - 取消社交绑定 Request VO") @Data @NoArgsConstructor @AllArgsConstructor @Builder public class SocialUserUnbindReqVO { - @ApiModelProperty(value = "社交平台的类型", required = true, example = "10", notes = "参见 UserSocialTypeEnum 枚举值") + @Schema(title = "社交平台的类型", required = true, example = "10", description = "参见 UserSocialTypeEnum 枚举值") @InEnum(SocialTypeEnum.class) @NotNull(message = "社交平台的类型不能为空") private Integer type; - @ApiModelProperty(value = "社交用户的 openid", required = true, example = "IPRmJ0wvBptiPIlGEZiPewGwiEiE") + @Schema(title = "社交用户的 openid", required = true, example = "IPRmJ0wvBptiPIlGEZiPewGwiEiE") @NotEmpty(message = "社交用户的 openid 不能为空") private String openid; 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 acc21d3fa6..0020c92803 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, 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 b69b0dca56..ec47823881 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,7 +71,7 @@ public class TenantPackageController { } @GetMapping("/get-simple-list") - @ApiOperation(value = "获取租户套餐精简信息列表", notes = "只包含被开启的租户套餐,主要用于前端的下拉选项") + @Operation(summary = "获取租户套餐精简信息列表", description = "只包含被开启的租户套餐,主要用于前端的下拉选项") public CommonResult> getTenantPackageList() { // 获得角色列表,只要开启状态的 List list = tenantPackageService.getTenantPackageListByStatus(CommonStatusEnum.ENABLE.getStatus()); 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 36c838366c..d4ff85926c 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,18 +13,18 @@ import java.util.Set; @Data public class TenantPackageBaseVO { - @ApiModelProperty(value = "套餐名", required = true, example = "VIP") + @Schema(title = "套餐名", required = true, example = "VIP") @NotNull(message = "套餐名不能为空") private String name; - @ApiModelProperty(value = "状态", required = true, example = "1", notes = "参见 CommonStatusEnum 枚举") + @Schema(title = "状态", required = true, example = "1", description = "参见 CommonStatusEnum 枚举") @NotNull(message = "状态不能为空") private Integer status; - @ApiModelProperty(value = "备注", example = "好") + @Schema(title = "备注", example = "好") private String remark; - @ApiModelProperty(value = "关联的菜单编号", required = true) + @Schema(title = "关联的菜单编号", required = true) @NotNull(message = "关联的菜单编号不能为空") private Set menuIds; 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 2290e5ca66..46f544fa62 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(title = "管理后台 - 租户套餐创建 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/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 7a2fd2493b..984dafb39a 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,7 @@ 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 lombok.Data; import lombok.EqualsAndHashCode; import lombok.ToString; @@ -12,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(title = "管理后台 - 租户套餐分页 Request VO") @Data @EqualsAndHashCode(callSuper = true) @ToString(callSuper = true) public class TenantPackagePageReqVO extends PageParam { - @ApiModelProperty(value = "套餐名", example = "VIP") + @Schema(title = "套餐名", example = "VIP") private String name; - @ApiModelProperty(value = "状态", example = "1") + @Schema(title = "状态", example = "1") private Integer status; - @ApiModelProperty(value = "备注", example = "好") + @Schema(title = "备注", example = "好") private String remark; @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND) - @ApiModelProperty(value = "创建时间") + @Schema(title = "创建时间") private LocalDateTime[] createTime; } 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 b46772922c..e1734cd7b2 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,22 @@ 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 lombok.Data; import lombok.EqualsAndHashCode; import lombok.ToString; import java.time.LocalDateTime; -@ApiModel("管理后台 - 租户套餐 Response VO") +@Schema(title = "管理后台 - 租户套餐 Response VO") @Data @EqualsAndHashCode(callSuper = true) @ToString(callSuper = true) public class TenantPackageRespVO extends TenantPackageBaseVO { - @ApiModelProperty(value = "套餐编号", required = true, example = "1024") + @Schema(title = "套餐编号", required = true, example = "1024") private Long id; - @ApiModelProperty(value = "创建时间", required = true) + @Schema(title = "创建时间", required = true) private LocalDateTime createTime; } 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 4ec1c97f79..112495807c 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,20 +1,19 @@ 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 lombok.Data; import javax.validation.constraints.NotNull; -@ApiModel("管理后台 - 租户套餐精简 Response VO") +@Schema(title = "管理后台 - 租户套餐精简 Response VO") @Data public class TenantPackageSimpleRespVO { - @ApiModelProperty(value = "套餐编号", required = true, example = "1024") + @Schema(title = "套餐编号", required = true, example = "1024") @NotNull(message = "套餐编号不能为空") private Long id; - @ApiModelProperty(value = "套餐名", required = true, example = "VIP") + @Schema(title = "套餐名", required = true, example = "VIP") @NotNull(message = "套餐名不能为空") private String name; 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 b1d2696079..4e4a9cdfc6 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,17 +1,16 @@ 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.*; -@ApiModel("管理后台 - 租户套餐更新 Request VO") +@Schema(title = "管理后台 - 租户套餐更新 Request VO") @Data @EqualsAndHashCode(callSuper = true) @ToString(callSuper = true) public class TenantPackageUpdateReqVO extends TenantPackageBaseVO { - @ApiModelProperty(value = "套餐编号", required = true, example = "1024") + @Schema(title = "套餐编号", required = true, example = "1024") @NotNull(message = "套餐编号不能为空") private Long id; 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 226c9b4499..4a1570135a 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,8 +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.*; import java.time.LocalDateTime; @@ -14,34 +13,33 @@ import java.time.LocalDateTime; @Data public class TenantBaseVO { - @ApiModelProperty(value = "租户名", required = true, example = "芋道") + @Schema(title = "租户名", required = true, example = "芋道") @NotNull(message = "租户名不能为空") private String name; - @ApiModelProperty(value = "联系人", required = true, example = "芋艿") + @Schema(title = "联系人", required = true, example = "芋艿") @NotNull(message = "联系人不能为空") private String contactName; - @ApiModelProperty(value = "联系手机", example = "15601691300") + @Schema(title = "联系手机", example = "15601691300") private String contactMobile; - @ApiModelProperty(value = "租户状态", required = true, example = "1") + @Schema(title = "租户状态", required = true, example = "1") @NotNull(message = "租户状态") private Integer status; - @ApiModelProperty(value = "绑定域名", example = "https://www.iocoder.cn") - @URL(message = "绑定域名的地址非 URL 格式") + @Schema(title = "绑定域名", example = "https://www.iocoder.cn") private String domain; - @ApiModelProperty(value = "租户套餐编号", required = true, example = "1024") + @Schema(title = "租户套餐编号", required = true, example = "1024") @NotNull(message = "租户套餐编号不能为空") private Long packageId; - @ApiModelProperty(value = "过期时间", required = true) + @Schema(title = "过期时间", required = true) @NotNull(message = "过期时间不能为空") private LocalDateTime expireTime; - @ApiModelProperty(value = "账号数量", required = true, example = "1024") + @Schema(title = "账号数量", required = true, example = "1024") @NotNull(message = "账号数量不能为空") private Integer accountCount; 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 ff52811eb6..209643ceab 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,19 +9,19 @@ import javax.validation.constraints.NotEmpty; import javax.validation.constraints.Pattern; import javax.validation.constraints.Size; -@ApiModel("管理后台 - 租户创建 Request VO") +@Schema(title = "管理后台 - 租户创建 Request VO") @Data @EqualsAndHashCode(callSuper = true) @ToString(callSuper = true) public class TenantCreateReqVO extends TenantBaseVO { - @ApiModelProperty(value = "用户账号", required = true, example = "yudao") + @Schema(title = "用户账号", 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(title = "密码", required = true, example = "123456") @NotEmpty(message = "密码不能为空") @Length(min = 4, max = 16, message = "密码长度为 4-16 位") private String password; 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 6498714aff..92e3659123 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,6 @@ 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 lombok.Data; import org.springframework.format.annotation.DateTimeFormat; @@ -9,24 +8,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(title = "管理后台 - 租户 Excel 导出 Request VO", description = "参数和 TenantPageReqVO 是一致的") @Data public class TenantExportReqVO { - @ApiModelProperty(value = "租户名", example = "芋道") + @Schema(title = "租户名", example = "芋道") private String name; - @ApiModelProperty(value = "联系人", example = "芋艿") + @Schema(title = "联系人", example = "芋艿") private String contactName; - @ApiModelProperty(value = "联系手机", example = "15601691300") + @Schema(title = "联系手机", example = "15601691300") private String contactMobile; - @ApiModelProperty(value = "租户状态(0正常 1停用)", example = "1") + @Schema(title = "租户状态(0正常 1停用)", example = "1") private Integer status; @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND) - @ApiModelProperty(value = "创建时间") + @Schema(title = "创建时间") private LocalDateTime[] createTime; } 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 499ecfd2f0..501d75a774 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,7 @@ 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 lombok.Data; import lombok.EqualsAndHashCode; import lombok.ToString; @@ -12,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("管理后台 - 租户分页 Request VO") +@Schema(title = "管理后台 - 租户分页 Request VO") @Data @EqualsAndHashCode(callSuper = true) @ToString(callSuper = true) public class TenantPageReqVO extends PageParam { - @ApiModelProperty(value = "租户名", example = "芋道") + @Schema(title = "租户名", example = "芋道") private String name; - @ApiModelProperty(value = "联系人", example = "芋艿") + @Schema(title = "联系人", example = "芋艿") private String contactName; - @ApiModelProperty(value = "联系手机", example = "15601691300") + @Schema(title = "联系手机", example = "15601691300") private String contactMobile; - @ApiModelProperty(value = "租户状态(0正常 1停用)", example = "1") + @Schema(title = "租户状态(0正常 1停用)", example = "1") private Integer status; @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND) - @ApiModelProperty(value = "创建时间") + @Schema(title = "创建时间") private LocalDateTime[] createTime; } 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 b2345d1676..bbd3932c9d 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,20 +1,20 @@ 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 java.time.LocalDateTime; -@ApiModel("管理后台 - 租户 Response VO") +@Schema(title = "管理后台 - 租户 Response VO") @Data @EqualsAndHashCode(callSuper = true) @ToString(callSuper = true) public class TenantRespVO extends TenantBaseVO { - @ApiModelProperty(value = "租户编号", required = true, example = "1024") + @Schema(title = "租户编号", required = true, example = "1024") private Long id; - @ApiModelProperty(value = "创建时间", required = true) + @Schema(title = "创建时间", required = true) private LocalDateTime createTime; } 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 881d5fb874..dd8be96597 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,16 +1,16 @@ 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(title = "管理后台 - 租户更新 Request VO") @Data @EqualsAndHashCode(callSuper = true) @ToString(callSuper = true) public class TenantUpdateReqVO extends TenantBaseVO { - @ApiModelProperty(value = "租户编号", required = true, example = "1024") + @Schema(title = "租户编号", required = true, example = "1024") @NotNull(message = "租户编号不能为空") private Long id; 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 993b66deac..82fc0acd4b 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, 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 d659943793..50e1ef0cdc 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); } @RequestMapping(value = "/update-avatar", method = {RequestMethod.POST, RequestMethod.PUT}) // 解决 uni-app 不支持 Put 上传文件的问题 - @ApiOperation("上传用户个人头像") + @Operation(summary = "上传用户个人头像") public CommonResult updateUserAvatar(@RequestParam("avatarFile") MultipartFile file) throws Exception { if (file.isEmpty()) { throw ServiceExceptionUtil.exception(FILE_IS_EMPTY); 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 8767c05931..4a0dd9b9dc 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,7 @@ 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 lombok.AllArgsConstructor; import lombok.Data; import lombok.EqualsAndHashCode; @@ -16,22 +15,22 @@ import java.util.List; @EqualsAndHashCode(callSuper = true) @NoArgsConstructor @AllArgsConstructor -@ApiModel("管理后台 - 用户个人中心信息 Response VO") +@Schema(title = "管理后台 - 用户个人中心信息 Response VO") public class UserProfileRespVO extends UserBaseVO { - @ApiModelProperty(value = "用户编号", required = true, example = "1") + @Schema(title = "用户编号", required = true, example = "1") private Long id; - @ApiModelProperty(value = "状态", required = true, example = "1", notes = "参见 CommonStatusEnum 枚举类") + @Schema(title = "状态", required = true, example = "1", description = "参见 CommonStatusEnum 枚举类") private Integer status; - @ApiModelProperty(value = "最后登录 IP", required = true, example = "192.168.1.1") + @Schema(title = "最后登录 IP", required = true, example = "192.168.1.1") private String loginIp; - @ApiModelProperty(value = "最后登录时间", required = true, example = "时间戳格式") + @Schema(title = "最后登录时间", required = true, example = "时间戳格式") private LocalDateTime loginDate; - @ApiModelProperty(value = "创建时间", required = true, example = "时间戳格式") + @Schema(title = "创建时间", required = true, example = "时间戳格式") private LocalDateTime createTime; /** @@ -53,50 +52,50 @@ public class UserProfileRespVO extends UserBaseVO { */ private List socialUsers; - @ApiModel("角色") + @Schema(title = "角色") @Data public static class Role { - @ApiModelProperty(value = "角色编号", required = true, example = "1") + @Schema(title = "角色编号", required = true, example = "1") private Long id; - @ApiModelProperty(value = "角色名称", required = true, example = "普通角色") + @Schema(title = "角色名称", required = true, example = "普通角色") private String name; } - @ApiModel("部门") + @Schema(title = "部门") @Data public static class Dept { - @ApiModelProperty(value = "部门编号", required = true, example = "1") + @Schema(title = "部门编号", required = true, example = "1") private Long id; - @ApiModelProperty(value = "部门名称", required = true, example = "研发部") + @Schema(title = "部门名称", required = true, example = "研发部") private String name; } - @ApiModel("岗位") + @Schema(title = "岗位") @Data public static class Post { - @ApiModelProperty(value = "岗位编号", required = true, example = "1") + @Schema(title = "岗位编号", required = true, example = "1") private Long id; - @ApiModelProperty(value = "岗位名称", required = true, example = "开发") + @Schema(title = "岗位名称", required = true, example = "开发") private String name; } - @ApiModel("社交用户") + @Schema(title = "社交用户") @Data public static class SocialUser { - @ApiModelProperty(value = "社交平台的类型", required = true, example = "10", notes = "参见 SocialTypeEnum 枚举类") + @Schema(title = "社交平台的类型", required = true, example = "10", description = "参见 SocialTypeEnum 枚举类") private Integer type; - @ApiModelProperty(value = "社交用户的 openid", required = true, example = "IPRmJ0wvBptiPIlGEZiPewGwiEiE") + @Schema(title = "社交用户的 openid", required = true, example = "IPRmJ0wvBptiPIlGEZiPewGwiEiE") private String openid; } 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 2269b37df5..94684ce6cf 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,22 +1,21 @@ 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 lombok.Data; import org.hibernate.validator.constraints.Length; import javax.validation.constraints.NotEmpty; -@ApiModel("管理后台 - 用户个人中心更新密码 Request VO") +@Schema(title = "管理后台 - 用户个人中心更新密码 Request VO") @Data public class UserProfileUpdatePasswordReqVO { - @ApiModelProperty(value = "旧密码", required = true, example = "123456") + @Schema(title = "旧密码", required = true, example = "123456") @NotEmpty(message = "旧密码不能为空") @Length(min = 4, max = 16, message = "密码长度为 4-16 位") private String oldPassword; - @ApiModelProperty(value = "新密码", required = true, example = "654321") + @Schema(title = "新密码", required = true, example = "654321") @NotEmpty(message = "新密码不能为空") @Length(min = 4, max = 16, message = "密码长度为 4-16 位") private String newPassword; 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 5ab28d1e7f..e9696add51 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,29 @@ 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 lombok.Data; -import org.hibernate.validator.constraints.Length; import javax.validation.constraints.Email; import javax.validation.constraints.Size; -@ApiModel("管理后台 - 用户个人信息更新 Request VO") + +@Schema(title = "管理后台 - 用户个人信息更新 Request VO") @Data public class UserProfileUpdateReqVO { - @ApiModelProperty(value = "用户昵称", required = true, example = "芋艿") + @Schema(title = "用户昵称", required = true, example = "芋艿") @Size(max = 30, message = "用户昵称长度不能超过 30 个字符") private String nickname; - @ApiModelProperty(value = "用户邮箱", example = "yudao@iocoder.cn") + @Schema(title = "用户邮箱", example = "yudao@iocoder.cn") @Email(message = "邮箱格式不正确") @Size(max = 50, message = "邮箱长度不能超过 50 个字符") private String email; - @ApiModelProperty(value = "手机号码", example = "15601691300") - @Length(min = 11, max = 11, message = "手机号长度必须 11 位") + @Schema(title = "手机号码", example = "15601691300") private String mobile; - @ApiModelProperty(value = "用户性别", example = "1", notes = "参见 SexEnum 枚举类") + @Schema(title = "用户性别", example = "1", description = "参见 SexEnum 枚举类") private Integer sex; } 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 5268b10c78..ea9fff93b0 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(title = "用户账号", 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(title = "用户昵称", required = true, example = "芋艿") @Size(max = 30, message = "用户昵称长度不能超过30个字符") private String nickname; - @ApiModelProperty(value = "备注", example = "我是一个用户") + @Schema(title = "备注", example = "我是一个用户") private String remark; - @ApiModelProperty(value = "部门ID", example = "我是一个用户") + @Schema(title = "部门ID", example = "我是一个用户") private Long deptId; - @ApiModelProperty(value = "岗位编号数组", example = "1") + @Schema(title = "岗位编号数组", example = "1") private Set postIds; - @ApiModelProperty(value = "用户邮箱", example = "yudao@iocoder.cn") + @Schema(title = "用户邮箱", example = "yudao@iocoder.cn") @Email(message = "邮箱格式不正确") @Size(max = 50, message = "邮箱长度不能超过 50 个字符") private String email; - @ApiModelProperty(value = "手机号码", example = "15601691300") + @Schema(title = "手机号码", example = "15601691300") @Mobile private String mobile; - @ApiModelProperty(value = "用户性别", example = "1", notes = "参见 SexEnum 枚举类") + @Schema(title = "用户性别", example = "1", description = "参见 SexEnum 枚举类") private Integer sex; - @ApiModelProperty(value = "用户头像", example = "https://www.iocoder.cn/xxx.png") + @Schema(title = "用户头像", example = "https://www.iocoder.cn/xxx.png") private String avatar; } 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 9d0ff1988d..940ad80a36 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,20 +1,18 @@ 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 lombok.Data; import lombok.EqualsAndHashCode; import org.hibernate.validator.constraints.Length; import javax.validation.constraints.NotEmpty; -@ApiModel("管理后台 - 用户创建 Request VO") +@Schema(title = "管理后台 - 用户创建 Request VO") @Data @EqualsAndHashCode(callSuper = true) public class UserCreateReqVO extends UserBaseVO { - @ApiModelProperty(value = "密码", required = true, example = "123456") + @Schema(title = "密码", required = true, example = "123456") @NotEmpty(message = "密码不能为空") @Length(min = 4, max = 16, message = "密码长度为 4-16 位") private String password; 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 387ad784ad..356db6444f 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,6 @@ 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 lombok.AllArgsConstructor; import lombok.Data; import lombok.NoArgsConstructor; @@ -11,26 +10,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(title = "管理后台 - 用户导出 Request VO", description = "参数和 UserPageReqVO 是一致的") @Data @NoArgsConstructor @AllArgsConstructor public class UserExportReqVO { - @ApiModelProperty(value = "用户账号", example = "yudao", notes = "模糊匹配") + @Schema(title = "用户账号", example = "yudao", description = "模糊匹配") private String username; - @ApiModelProperty(value = "手机号码", example = "yudao", notes = "模糊匹配") + @Schema(title = "手机号码", example = "yudao", description = "模糊匹配") private String mobile; - @ApiModelProperty(value = "展示状态", example = "1", notes = "参见 CommonStatusEnum 枚举类") + @Schema(title = "展示状态", example = "1", description = "参见 CommonStatusEnum 枚举类") private Integer status; - @ApiModelProperty(value = "创建时间", example = "[2022-07-01 00:00:00,2022-07-01 23:59:59]") + @Schema(title = "创建时间", 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(title = "部门编号", example = "1024", description = "同时筛选子部门") private Long deptId; } 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 49f9b98d1e..36ffa2f710 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,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 lombok.Builder; import lombok.Data; import java.util.List; import java.util.Map; -@ApiModel("管理后台 - 用户导入 Response VO") +@Schema(title = "管理后台 - 用户导入 Response VO") @Data @Builder public class UserImportRespVO { - @ApiModelProperty(value = "创建成功的用户名数组", required = true) + @Schema(title = "创建成功的用户名数组", required = true) private List createUsernames; - @ApiModelProperty(value = "更新成功的用户名数组", required = true) + @Schema(title = "更新成功的用户名数组", required = true) private List updateUsernames; - @ApiModelProperty(value = "导入失败的用户集合", required = true, notes = "key 为用户名,value 为失败原因") + @Schema(title = "导入失败的用户集合", required = true, description = "key 为用户名,value 为失败原因") private Map failureUsernames; } 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 bcfe9ea23b..21f72b0903 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,12 @@ 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 lombok.AllArgsConstructor; import lombok.Data; import lombok.EqualsAndHashCode; import lombok.NoArgsConstructor; -@ApiModel(value = "管理后台 - 用户分页时的信息 Response VO", description = "相比用户基本信息来说,会多部门信息") +@Schema(title = "管理后台 - 用户分页时的信息 Response VO", description = "相比用户基本信息来说,会多部门信息") @Data @NoArgsConstructor @AllArgsConstructor @@ -19,14 +18,14 @@ public class UserPageItemRespVO extends UserRespVO { */ private Dept dept; - @ApiModel("部门") + @Schema(title = "部门") @Data public static class Dept { - @ApiModelProperty(value = "部门编号", required = true, example = "1") + @Schema(title = "部门编号", required = true, example = "1") private Long id; - @ApiModelProperty(value = "部门名称", required = true, example = "研发部") + @Schema(title = "部门名称", required = true, example = "研发部") private String name; } 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 cbac2d9a59..193a74807f 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,7 @@ 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 lombok.AllArgsConstructor; import lombok.Data; import lombok.EqualsAndHashCode; @@ -13,27 +12,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(title = "管理后台 - 用户分页 Request VO") @Data @NoArgsConstructor @AllArgsConstructor @EqualsAndHashCode(callSuper = true) public class UserPageReqVO extends PageParam { - @ApiModelProperty(value = "用户账号", example = "yudao", notes = "模糊匹配") + @Schema(title = "用户账号", example = "yudao", description = "模糊匹配") private String username; - @ApiModelProperty(value = "手机号码", example = "yudao", notes = "模糊匹配") + @Schema(title = "手机号码", example = "yudao", description = "模糊匹配") private String mobile; - @ApiModelProperty(value = "展示状态", example = "1", notes = "参见 CommonStatusEnum 枚举类") + @Schema(title = "展示状态", example = "1", description = "参见 CommonStatusEnum 枚举类") private Integer status; - @ApiModelProperty(value = "创建时间", example = "[2022-07-01 00:00:00,2022-07-01 23:59:59]") + @Schema(title = "创建时间", 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(title = "部门编号", example = "1024", description = "同时筛选子部门") private Long deptId; } 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 972b3818b7..68208729c3 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,32 +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 lombok.*; import java.time.LocalDateTime; -@ApiModel("管理后台 - 用户信息 Response VO") +@Schema(title = "管理后台 - 用户信息 Response VO") @Data @NoArgsConstructor @AllArgsConstructor @EqualsAndHashCode(callSuper = true) public class UserRespVO extends UserBaseVO { - @ApiModelProperty(value = "用户编号", required = true, example = "1") + @Schema(title = "用户编号", required = true, example = "1") private Long id; - @ApiModelProperty(value = "状态", required = true, example = "1", notes = "参见 CommonStatusEnum 枚举类") + @Schema(title = "状态", required = true, example = "1", description = "参见 CommonStatusEnum 枚举类") private Integer status; - @ApiModelProperty(value = "最后登录 IP", required = true, example = "192.168.1.1") + @Schema(title = "最后登录 IP", required = true, example = "192.168.1.1") private String loginIp; - @ApiModelProperty(value = "最后登录时间", required = true, example = "时间戳格式") + @Schema(title = "最后登录时间", required = true, example = "时间戳格式") private LocalDateTime loginDate; - @ApiModelProperty(value = "创建时间", required = true, example = "时间戳格式") + @Schema(title = "创建时间", required = true, example = "时间戳格式") private LocalDateTime createTime; } 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 a815253e94..0a2daaf6f9 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,20 @@ 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 lombok.AllArgsConstructor; import lombok.Data; import lombok.NoArgsConstructor; -@ApiModel("用户精简信息 Response VO") +@Schema(title = "用户精简信息 Response VO") @Data @NoArgsConstructor @AllArgsConstructor public class UserSimpleRespVO { - @ApiModelProperty(value = "用户编号", required = true, example = "1024") + @Schema(title = "用户编号", required = true, example = "1024") private Long id; - @ApiModelProperty(value = "用户昵称", required = true, example = "芋道") + @Schema(title = "用户昵称", required = true, example = "芋道") private String nickname; } 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 542fc2b0f2..44e5eb3f7b 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,22 +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 lombok.Data; import org.hibernate.validator.constraints.Length; import javax.validation.constraints.NotEmpty; import javax.validation.constraints.NotNull; -@ApiModel("管理后台 - 用户更新密码 Request VO") +@Schema(title = "管理后台 - 用户更新密码 Request VO") @Data public class UserUpdatePasswordReqVO { - @ApiModelProperty(value = "用户编号", required = true, example = "1024") + @Schema(title = "用户编号", required = true, example = "1024") @NotNull(message = "用户编号不能为空") private Long id; - @ApiModelProperty(value = "密码", required = true, example = "123456") + @Schema(title = "密码", required = true, example = "123456") @NotEmpty(message = "密码不能为空") @Length(min = 4, max = 16, message = "密码长度为 4-16 位") private String password; 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 84a3de60fe..f5d4cc92f1 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,18 +1,17 @@ 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 lombok.Data; import lombok.EqualsAndHashCode; import javax.validation.constraints.NotNull; -@ApiModel("管理后台 - 用户更新 Request VO") +@Schema(title = "管理后台 - 用户更新 Request VO") @Data @EqualsAndHashCode(callSuper = true) public class UserUpdateReqVO extends UserBaseVO { - @ApiModelProperty(value = "用户编号", required = true, example = "1024") + @Schema(title = "用户编号", required = true, example = "1024") @NotNull(message = "用户编号不能为空") private Long id; 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 2c7a83f22d..11b9afd2f5 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,20 +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 lombok.Data; import javax.validation.constraints.NotNull; -@ApiModel("管理后台 - 用户更新状态 Request VO") +@Schema(title = "管理后台 - 用户更新状态 Request VO") @Data public class UserUpdateStatusReqVO { - @ApiModelProperty(value = "用户编号", required = true, example = "1024") + @Schema(title = "用户编号", required = true, example = "1024") @NotNull(message = "角色编号不能为空") private Long id; - @ApiModelProperty(value = "状态", required = true, example = "1", notes = "见 CommonStatusEnum 枚举") + @Schema(title = "状态", required = true, example = "1", description = "见 CommonStatusEnum 枚举") @NotNull(message = "状态不能为空") // @InEnum(value = CommonStatusEnum.class, message = "修改状态必须是 {value}") private Integer status; diff --git a/yudao-server/pom.xml b/yudao-server/pom.xml index 3b64dc858d..86dd6baaee 100644 --- a/yudao-server/pom.xml +++ b/yudao-server/pom.xml @@ -57,17 +57,17 @@ ${revision} - - - - - + + cn.iocoder.boot + yudao-module-visualization-biz + ${revision} + - - - - - + + cn.iocoder.boot + yudao-module-bpm-biz + ${revision} + cn.iocoder.boot yudao-spring-boot-starter-biz-error-code diff --git a/yudao-server/src/main/java/cn/iocoder/yudao/module/shop/controller/app/AppShopOrderController.java b/yudao-server/src/main/java/cn/iocoder/yudao/module/shop/controller/app/AppShopOrderController.java index 2753b711b4..210c6a560a 100644 --- a/yudao-server/src/main/java/cn/iocoder/yudao/module/shop/controller/app/AppShopOrderController.java +++ b/yudao-server/src/main/java/cn/iocoder/yudao/module/shop/controller/app/AppShopOrderController.java @@ -7,8 +7,8 @@ import cn.iocoder.yudao.module.pay.service.order.PayOrderService; import cn.iocoder.yudao.module.pay.service.order.dto.PayOrderCreateReqDTO; import cn.iocoder.yudao.module.pay.util.PaySeqUtils; import cn.iocoder.yudao.module.shop.controller.app.vo.AppShopOrderCreateRespVO; -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.PostMapping; @@ -23,7 +23,7 @@ import java.time.LocalDateTime; import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success; import static cn.iocoder.yudao.framework.common.util.servlet.ServletUtils.getClientIP; -@Api(tags = "用户 APP - 商城订单") +@Tag(name = "用户 APP - 商城订单") @RestController @RequestMapping("/shop/order") @Validated @@ -34,7 +34,7 @@ public class AppShopOrderController { private PayOrderService payOrderService; @PostMapping("/create") - @ApiOperation("创建商城订单") + @Operation(summary = "创建商城订单") // @PreAuthenticated // TODO 暂时不加登陆验证,前端暂时没做好 public CommonResult create() { // 假装创建商城订单 @@ -57,14 +57,14 @@ public class AppShopOrderController { } @PostMapping("/pay-notify") - @ApiOperation("支付回调") + @Operation(summary = "支付回调") public CommonResult payNotify(@RequestBody @Valid PayNotifyOrderReqVO reqVO) { log.info("[payNotify][回调成功]"); return success(true); } @PostMapping("/refund-notify") - @ApiOperation("退款回调") + @Operation(summary = "退款回调") public CommonResult refundNotify(@RequestBody @Valid PayRefundOrderReqVO reqVO) { log.info("[refundNotify][回调成功]"); return success(true); diff --git a/yudao-server/src/main/java/cn/iocoder/yudao/module/shop/controller/app/vo/AppShopOrderCreateRespVO.java b/yudao-server/src/main/java/cn/iocoder/yudao/module/shop/controller/app/vo/AppShopOrderCreateRespVO.java index 06a677dbb5..6879beab4a 100644 --- a/yudao-server/src/main/java/cn/iocoder/yudao/module/shop/controller/app/vo/AppShopOrderCreateRespVO.java +++ b/yudao-server/src/main/java/cn/iocoder/yudao/module/shop/controller/app/vo/AppShopOrderCreateRespVO.java @@ -1,21 +1,20 @@ package cn.iocoder.yudao.module.shop.controller.app.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; -@ApiModel("用户 APP - 商城订单创建 Response VO") +@Schema(title = "用户 APP - 商城订单创建 Response VO") @Data @Builder @AllArgsConstructor public class AppShopOrderCreateRespVO { - @ApiModelProperty(value = "商城订单编号", required = true, example = "1024") + @Schema(title = "商城订单编号", required = true, example = "1024") private Long id; - @ApiModelProperty(value = "支付订单编号", required = true, example = "2048") + @Schema(title = "支付订单编号", required = true, example = "2048") private Long payOrderId; } diff --git a/yudao-ui-admin-vue3/src/views/infra/swagger/index.vue b/yudao-ui-admin-vue3/src/views/infra/swagger/index.vue index 5d4697c1af..574e9ddd2e 100644 --- a/yudao-ui-admin-vue3/src/views/infra/swagger/index.vue +++ b/yudao-ui-admin-vue3/src/views/infra/swagger/index.vue @@ -8,5 +8,5 @@ import { ref } from 'vue' import { IFrame } from '@/components/IFrame' const BASE_URL = import.meta.env.VITE_BASE_URL -const src = ref(BASE_URL + '/doc.html') +const src = ref(BASE_URL + '/swagger-ui')