Commit 9fc6e0f00b7f795e7843e8613f161f84d4a1d528
1 parent
02174383
refactor: springdoc 替换 springfox
Showing
469 changed files
with
3315 additions
and
3719 deletions
Too many changes.
To preserve performance only 100 of 469 files are displayed.
yudao-dependencies/pom.xml
| @@ -18,8 +18,8 @@ | @@ -18,8 +18,8 @@ | ||
| 18 | <!-- 统一依赖管理 --> | 18 | <!-- 统一依赖管理 --> |
| 19 | <spring.boot.version>2.7.6</spring.boot.version> | 19 | <spring.boot.version>2.7.6</spring.boot.version> |
| 20 | <!-- Web 相关 --> | 20 | <!-- Web 相关 --> |
| 21 | + <springdoc.version>1.6.13</springdoc.version> | ||
| 21 | <knife4j.version>3.0.3</knife4j.version> | 22 | <knife4j.version>3.0.3</knife4j.version> |
| 22 | - <swagger-annotations.version>1.6.8</swagger-annotations.version> | ||
| 23 | <servlet.versoin>2.5</servlet.versoin> | 23 | <servlet.versoin>2.5</servlet.versoin> |
| 24 | <!-- DB 相关 --> | 24 | <!-- DB 相关 --> |
| 25 | <druid.version>1.2.15</druid.version> | 25 | <druid.version>1.2.15</druid.version> |
| @@ -158,28 +158,21 @@ | @@ -158,28 +158,21 @@ | ||
| 158 | </dependency> | 158 | </dependency> |
| 159 | 159 | ||
| 160 | <dependency> | 160 | <dependency> |
| 161 | - <groupId>com.github.xiaoymin</groupId> | ||
| 162 | - <artifactId>knife4j-spring-boot-starter</artifactId> | ||
| 163 | - <version>${knife4j.version}</version> | ||
| 164 | - <exclusions> | ||
| 165 | - <exclusion> | ||
| 166 | - <artifactId>mapstruct</artifactId> | ||
| 167 | - <groupId>org.mapstruct</groupId> <!-- 避免冲突 --> | ||
| 168 | - </exclusion> | ||
| 169 | - <exclusion> | ||
| 170 | - <artifactId>guava</artifactId> | ||
| 171 | - <groupId>com.google.guava</groupId> | ||
| 172 | - </exclusion> | ||
| 173 | - <exclusion> | ||
| 174 | - <artifactId>swagger-annotations</artifactId> | ||
| 175 | - <groupId>io.swagger</groupId> | ||
| 176 | - </exclusion> | ||
| 177 | - </exclusions> | 161 | + <groupId>org.springdoc</groupId> |
| 162 | + <artifactId>springdoc-openapi-webmvc-core</artifactId> | ||
| 163 | + <version>${springdoc.version}</version> | ||
| 164 | + </dependency> | ||
| 165 | + | ||
| 166 | + <dependency> | ||
| 167 | + <groupId>org.springdoc</groupId> | ||
| 168 | + <artifactId>springdoc-openapi-javadoc</artifactId> | ||
| 169 | + <version>${springdoc.version}</version> | ||
| 178 | </dependency> | 170 | </dependency> |
| 171 | + | ||
| 179 | <dependency> | 172 | <dependency> |
| 180 | - <groupId>io.swagger</groupId> | ||
| 181 | - <artifactId>swagger-annotations</artifactId> | ||
| 182 | - <version>${swagger-annotations.version}</version> | 173 | + <groupId>org.springdoc</groupId> |
| 174 | + <artifactId>springdoc-openapi-security</artifactId> | ||
| 175 | + <version>${springdoc.version}</version> | ||
| 183 | </dependency> | 176 | </dependency> |
| 184 | 177 | ||
| 185 | <!-- DB 相关 --> | 178 | <!-- DB 相关 --> |
yudao-framework/yudao-common/pom.xml
| @@ -59,9 +59,13 @@ | @@ -59,9 +59,13 @@ | ||
| 59 | </dependency> | 59 | </dependency> |
| 60 | 60 | ||
| 61 | <dependency> | 61 | <dependency> |
| 62 | - <groupId>io.swagger</groupId> | ||
| 63 | - <artifactId>swagger-annotations</artifactId> | ||
| 64 | - <scope>provided</scope> <!-- 设置为 provided,主要是 PageParam 使用到 --> | 62 | + <groupId>org.springdoc</groupId> |
| 63 | + <artifactId>springdoc-openapi-webmvc-core</artifactId> | ||
| 64 | + </dependency> | ||
| 65 | + | ||
| 66 | + <dependency> | ||
| 67 | + <groupId>org.springdoc</groupId> | ||
| 68 | + <artifactId>springdoc-openapi-javadoc</artifactId> | ||
| 65 | </dependency> | 69 | </dependency> |
| 66 | 70 | ||
| 67 | <!-- 监控相关 --> | 71 | <!-- 监控相关 --> |
yudao-framework/yudao-common/src/main/java/cn/iocoder/yudao/framework/common/pojo/PageParam.java
| 1 | package cn.iocoder.yudao.framework.common.pojo; | 1 | package cn.iocoder.yudao.framework.common.pojo; |
| 2 | 2 | ||
| 3 | -import io.swagger.annotations.ApiModel; | ||
| 4 | -import io.swagger.annotations.ApiModelProperty; | 3 | +import io.swagger.v3.oas.annotations.media.Schema; |
| 5 | import lombok.Data; | 4 | import lombok.Data; |
| 6 | 5 | ||
| 7 | import javax.validation.constraints.Min; | 6 | import javax.validation.constraints.Min; |
| @@ -9,19 +8,19 @@ import javax.validation.constraints.Max; | @@ -9,19 +8,19 @@ import javax.validation.constraints.Max; | ||
| 9 | import javax.validation.constraints.NotNull; | 8 | import javax.validation.constraints.NotNull; |
| 10 | import java.io.Serializable; | 9 | import java.io.Serializable; |
| 11 | 10 | ||
| 12 | -@ApiModel("分页参数") | 11 | +@Schema(title="分页参数") |
| 13 | @Data | 12 | @Data |
| 14 | public class PageParam implements Serializable { | 13 | public class PageParam implements Serializable { |
| 15 | 14 | ||
| 16 | private static final Integer PAGE_NO = 1; | 15 | private static final Integer PAGE_NO = 1; |
| 17 | private static final Integer PAGE_SIZE = 10; | 16 | private static final Integer PAGE_SIZE = 10; |
| 18 | 17 | ||
| 19 | - @ApiModelProperty(value = "页码,从 1 开始", required = true,example = "1") | 18 | + @Schema(title = "页码,从 1 开始", required = true,example = "1") |
| 20 | @NotNull(message = "页码不能为空") | 19 | @NotNull(message = "页码不能为空") |
| 21 | @Min(value = 1, message = "页码最小值为 1") | 20 | @Min(value = 1, message = "页码最小值为 1") |
| 22 | private Integer pageNo = PAGE_NO; | 21 | private Integer pageNo = PAGE_NO; |
| 23 | 22 | ||
| 24 | - @ApiModelProperty(value = "每页条数,最大值为 100", required = true, example = "10") | 23 | + @Schema(title = "每页条数,最大值为 100", required = true, example = "10") |
| 25 | @NotNull(message = "每页条数不能为空") | 24 | @NotNull(message = "每页条数不能为空") |
| 26 | @Min(value = 1, message = "每页条数最小值为 1") | 25 | @Min(value = 1, message = "每页条数最小值为 1") |
| 27 | @Max(value = 100, message = "每页条数最大值为 100") | 26 | @Max(value = 100, message = "每页条数最大值为 100") |
yudao-framework/yudao-common/src/main/java/cn/iocoder/yudao/framework/common/pojo/PageResult.java
| 1 | package cn.iocoder.yudao.framework.common.pojo; | 1 | package cn.iocoder.yudao.framework.common.pojo; |
| 2 | - | ||
| 3 | -import io.swagger.annotations.ApiModel; | ||
| 4 | -import io.swagger.annotations.ApiModelProperty; | 2 | +import io.swagger.v3.oas.annotations.media.Schema; |
| 5 | import lombok.Data; | 3 | import lombok.Data; |
| 6 | 4 | ||
| 7 | import java.io.Serializable; | 5 | import java.io.Serializable; |
| 8 | import java.util.ArrayList; | 6 | import java.util.ArrayList; |
| 9 | import java.util.List; | 7 | import java.util.List; |
| 10 | 8 | ||
| 11 | -@ApiModel("分页结果") | 9 | +@Schema(title = "分页结果") |
| 12 | @Data | 10 | @Data |
| 13 | public final class PageResult<T> implements Serializable { | 11 | public final class PageResult<T> implements Serializable { |
| 14 | 12 | ||
| 15 | - @ApiModelProperty(value = "数据", required = true) | 13 | + @Schema(title = "数据", required = true) |
| 16 | private List<T> list; | 14 | private List<T> list; |
| 17 | 15 | ||
| 18 | - @ApiModelProperty(value = "总量", required = true) | 16 | + @Schema(title = "总量", required = true) |
| 19 | private Long total; | 17 | private Long total; |
| 20 | 18 | ||
| 21 | public PageResult() { | 19 | public PageResult() { |
yudao-framework/yudao-spring-boot-starter-biz-operatelog/src/main/java/cn/iocoder/yudao/framework/operatelog/core/annotations/OperateLog.java
| 1 | package cn.iocoder.yudao.framework.operatelog.core.annotations; | 1 | package cn.iocoder.yudao.framework.operatelog.core.annotations; |
| 2 | 2 | ||
| 3 | import cn.iocoder.yudao.framework.operatelog.core.enums.OperateTypeEnum; | 3 | import cn.iocoder.yudao.framework.operatelog.core.enums.OperateTypeEnum; |
| 4 | -import io.swagger.annotations.Api; | ||
| 5 | -import io.swagger.annotations.ApiOperation; | 4 | +import io.swagger.v3.oas.annotations.tags.Tag; |
| 5 | +import io.swagger.v3.oas.annotations.Operation; | ||
| 6 | 6 | ||
| 7 | import java.lang.annotation.ElementType; | 7 | import java.lang.annotation.ElementType; |
| 8 | import java.lang.annotation.Retention; | 8 | import java.lang.annotation.Retention; |
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; | @@ -15,8 +15,8 @@ import cn.iocoder.yudao.framework.operatelog.core.service.OperateLog; | ||
| 15 | import cn.iocoder.yudao.framework.operatelog.core.service.OperateLogFrameworkService; | 15 | import cn.iocoder.yudao.framework.operatelog.core.service.OperateLogFrameworkService; |
| 16 | import cn.iocoder.yudao.framework.web.core.util.WebFrameworkUtils; | 16 | import cn.iocoder.yudao.framework.web.core.util.WebFrameworkUtils; |
| 17 | import com.google.common.collect.Maps; | 17 | import com.google.common.collect.Maps; |
| 18 | -import io.swagger.annotations.Api; | ||
| 19 | -import io.swagger.annotations.ApiOperation; | 18 | +import io.swagger.v3.oas.annotations.tags.Tag; |
| 19 | +import io.swagger.v3.oas.annotations.Operation; | ||
| 20 | import lombok.extern.slf4j.Slf4j; | 20 | import lombok.extern.slf4j.Slf4j; |
| 21 | import org.aspectj.lang.ProceedingJoinPoint; | 21 | import org.aspectj.lang.ProceedingJoinPoint; |
| 22 | import org.aspectj.lang.annotation.Around; | 22 | import org.aspectj.lang.annotation.Around; |
| @@ -71,15 +71,15 @@ public class OperateLogAspect { | @@ -71,15 +71,15 @@ public class OperateLogAspect { | ||
| 71 | @Resource | 71 | @Resource |
| 72 | private OperateLogFrameworkService operateLogFrameworkService; | 72 | private OperateLogFrameworkService operateLogFrameworkService; |
| 73 | 73 | ||
| 74 | - @Around("@annotation(apiOperation)") | ||
| 75 | - public Object around(ProceedingJoinPoint joinPoint, ApiOperation apiOperation) throws Throwable { | 74 | + @Around("@annotation(operation)") |
| 75 | + public Object around(ProceedingJoinPoint joinPoint, Operation operation) throws Throwable { | ||
| 76 | // 可能也添加了 @ApiOperation 注解 | 76 | // 可能也添加了 @ApiOperation 注解 |
| 77 | cn.iocoder.yudao.framework.operatelog.core.annotations.OperateLog operateLog = getMethodAnnotation(joinPoint, | 77 | cn.iocoder.yudao.framework.operatelog.core.annotations.OperateLog operateLog = getMethodAnnotation(joinPoint, |
| 78 | cn.iocoder.yudao.framework.operatelog.core.annotations.OperateLog.class); | 78 | cn.iocoder.yudao.framework.operatelog.core.annotations.OperateLog.class); |
| 79 | - return around0(joinPoint, operateLog, apiOperation); | 79 | + return around0(joinPoint, operateLog, operation); |
| 80 | } | 80 | } |
| 81 | 81 | ||
| 82 | - @Around("!@annotation(io.swagger.annotations.ApiOperation) && @annotation(operateLog)") | 82 | + @Around("!@annotation(io.swagger.v3.oas.annotations.Operation) && @annotation(operateLog)") |
| 83 | // 兼容处理,只添加 @OperateLog 注解的情况 | 83 | // 兼容处理,只添加 @OperateLog 注解的情况 |
| 84 | public Object around(ProceedingJoinPoint joinPoint, | 84 | public Object around(ProceedingJoinPoint joinPoint, |
| 85 | cn.iocoder.yudao.framework.operatelog.core.annotations.OperateLog operateLog) throws Throwable { | 85 | cn.iocoder.yudao.framework.operatelog.core.annotations.OperateLog operateLog) throws Throwable { |
| @@ -88,7 +88,7 @@ public class OperateLogAspect { | @@ -88,7 +88,7 @@ public class OperateLogAspect { | ||
| 88 | 88 | ||
| 89 | private Object around0(ProceedingJoinPoint joinPoint, | 89 | private Object around0(ProceedingJoinPoint joinPoint, |
| 90 | cn.iocoder.yudao.framework.operatelog.core.annotations.OperateLog operateLog, | 90 | cn.iocoder.yudao.framework.operatelog.core.annotations.OperateLog operateLog, |
| 91 | - ApiOperation apiOperation) throws Throwable { | 91 | + Operation operation) throws Throwable { |
| 92 | // 目前,只有管理员,才记录操作日志!所以非管理员,直接调用,不进行记录 | 92 | // 目前,只有管理员,才记录操作日志!所以非管理员,直接调用,不进行记录 |
| 93 | Integer userType = WebFrameworkUtils.getLoginUserType(); | 93 | Integer userType = WebFrameworkUtils.getLoginUserType(); |
| 94 | if (!Objects.equals(userType, UserTypeEnum.ADMIN.getValue())) { | 94 | if (!Objects.equals(userType, UserTypeEnum.ADMIN.getValue())) { |
| @@ -101,10 +101,10 @@ public class OperateLogAspect { | @@ -101,10 +101,10 @@ public class OperateLogAspect { | ||
| 101 | // 执行原有方法 | 101 | // 执行原有方法 |
| 102 | Object result = joinPoint.proceed(); | 102 | Object result = joinPoint.proceed(); |
| 103 | // 记录正常执行时的操作日志 | 103 | // 记录正常执行时的操作日志 |
| 104 | - this.log(joinPoint, operateLog, apiOperation, startTime, result, null); | 104 | + this.log(joinPoint, operateLog, operation, startTime, result, null); |
| 105 | return result; | 105 | return result; |
| 106 | } catch (Throwable exception) { | 106 | } catch (Throwable exception) { |
| 107 | - this.log(joinPoint, operateLog, apiOperation, startTime, null, exception); | 107 | + this.log(joinPoint, operateLog, operation, startTime, null, exception); |
| 108 | throw exception; | 108 | throw exception; |
| 109 | } finally { | 109 | } finally { |
| 110 | clearThreadLocal(); | 110 | clearThreadLocal(); |
| @@ -129,7 +129,7 @@ public class OperateLogAspect { | @@ -129,7 +129,7 @@ public class OperateLogAspect { | ||
| 129 | 129 | ||
| 130 | private void log(ProceedingJoinPoint joinPoint, | 130 | private void log(ProceedingJoinPoint joinPoint, |
| 131 | cn.iocoder.yudao.framework.operatelog.core.annotations.OperateLog operateLog, | 131 | cn.iocoder.yudao.framework.operatelog.core.annotations.OperateLog operateLog, |
| 132 | - ApiOperation apiOperation, | 132 | + Operation operation, |
| 133 | LocalDateTime startTime, Object result, Throwable exception) { | 133 | LocalDateTime startTime, Object result, Throwable exception) { |
| 134 | try { | 134 | try { |
| 135 | // 判断不记录的情况 | 135 | // 判断不记录的情况 |
| @@ -137,16 +137,16 @@ public class OperateLogAspect { | @@ -137,16 +137,16 @@ public class OperateLogAspect { | ||
| 137 | return; | 137 | return; |
| 138 | } | 138 | } |
| 139 | // 真正记录操作日志 | 139 | // 真正记录操作日志 |
| 140 | - this.log0(joinPoint, operateLog, apiOperation, startTime, result, exception); | 140 | + this.log0(joinPoint, operateLog, operation, startTime, result, exception); |
| 141 | } catch (Throwable ex) { | 141 | } catch (Throwable ex) { |
| 142 | log.error("[log][记录操作日志时,发生异常,其中参数是 joinPoint({}) operateLog({}) apiOperation({}) result({}) exception({}) ]", | 142 | log.error("[log][记录操作日志时,发生异常,其中参数是 joinPoint({}) operateLog({}) apiOperation({}) result({}) exception({}) ]", |
| 143 | - joinPoint, operateLog, apiOperation, result, exception, ex); | 143 | + joinPoint, operateLog, operation, result, exception, ex); |
| 144 | } | 144 | } |
| 145 | } | 145 | } |
| 146 | 146 | ||
| 147 | private void log0(ProceedingJoinPoint joinPoint, | 147 | private void log0(ProceedingJoinPoint joinPoint, |
| 148 | cn.iocoder.yudao.framework.operatelog.core.annotations.OperateLog operateLog, | 148 | cn.iocoder.yudao.framework.operatelog.core.annotations.OperateLog operateLog, |
| 149 | - ApiOperation apiOperation, | 149 | + Operation operation, |
| 150 | LocalDateTime startTime, Object result, Throwable exception) { | 150 | LocalDateTime startTime, Object result, Throwable exception) { |
| 151 | OperateLog operateLogObj = new OperateLog(); | 151 | OperateLog operateLogObj = new OperateLog(); |
| 152 | // 补全通用字段 | 152 | // 补全通用字段 |
| @@ -155,7 +155,7 @@ public class OperateLogAspect { | @@ -155,7 +155,7 @@ public class OperateLogAspect { | ||
| 155 | // 补充用户信息 | 155 | // 补充用户信息 |
| 156 | fillUserFields(operateLogObj); | 156 | fillUserFields(operateLogObj); |
| 157 | // 补全模块信息 | 157 | // 补全模块信息 |
| 158 | - fillModuleFields(operateLogObj, joinPoint, operateLog, apiOperation); | 158 | + fillModuleFields(operateLogObj, joinPoint, operateLog, operation); |
| 159 | // 补全请求信息 | 159 | // 补全请求信息 |
| 160 | fillRequestFields(operateLogObj); | 160 | fillRequestFields(operateLogObj); |
| 161 | // 补全方法信息 | 161 | // 补全方法信息 |
| @@ -173,21 +173,21 @@ public class OperateLogAspect { | @@ -173,21 +173,21 @@ public class OperateLogAspect { | ||
| 173 | private static void fillModuleFields(OperateLog operateLogObj, | 173 | private static void fillModuleFields(OperateLog operateLogObj, |
| 174 | ProceedingJoinPoint joinPoint, | 174 | ProceedingJoinPoint joinPoint, |
| 175 | cn.iocoder.yudao.framework.operatelog.core.annotations.OperateLog operateLog, | 175 | cn.iocoder.yudao.framework.operatelog.core.annotations.OperateLog operateLog, |
| 176 | - ApiOperation apiOperation) { | 176 | + Operation operation) { |
| 177 | // module 属性 | 177 | // module 属性 |
| 178 | if (operateLog != null) { | 178 | if (operateLog != null) { |
| 179 | operateLogObj.setModule(operateLog.module()); | 179 | operateLogObj.setModule(operateLog.module()); |
| 180 | } | 180 | } |
| 181 | if (StrUtil.isEmpty(operateLogObj.getModule())) { | 181 | if (StrUtil.isEmpty(operateLogObj.getModule())) { |
| 182 | - Api api = getClassAnnotation(joinPoint, Api.class); | ||
| 183 | - if (api != null) { | ||
| 184 | - // 优先读取 @API 的 name 属性 | ||
| 185 | - if (StrUtil.isNotEmpty(api.value())) { | ||
| 186 | - operateLogObj.setModule(api.value()); | 182 | + Tag tag = getClassAnnotation(joinPoint, Tag.class); |
| 183 | + if (tag != null) { | ||
| 184 | + // 优先读取 @Tag 的 name 属性 | ||
| 185 | + if (StrUtil.isNotEmpty(tag.name())) { | ||
| 186 | + operateLogObj.setModule(tag.name()); | ||
| 187 | } | 187 | } |
| 188 | - // 没有的话,读取 @API 的 tags 属性 | ||
| 189 | - if (StrUtil.isEmpty(operateLogObj.getModule()) && ArrayUtil.isNotEmpty(api.tags())) { | ||
| 190 | - operateLogObj.setModule(api.tags()[0]); | 188 | + // 没有的话,读取 @API 的 description 属性 |
| 189 | + if (StrUtil.isEmpty(operateLogObj.getModule()) && ArrayUtil.isNotEmpty(tag.description())) { | ||
| 190 | + operateLogObj.setModule(tag.description()); | ||
| 191 | } | 191 | } |
| 192 | } | 192 | } |
| 193 | } | 193 | } |
| @@ -195,8 +195,8 @@ public class OperateLogAspect { | @@ -195,8 +195,8 @@ public class OperateLogAspect { | ||
| 195 | if (operateLog != null) { | 195 | if (operateLog != null) { |
| 196 | operateLogObj.setName(operateLog.name()); | 196 | operateLogObj.setName(operateLog.name()); |
| 197 | } | 197 | } |
| 198 | - if (StrUtil.isEmpty(operateLogObj.getName()) && apiOperation != null) { | ||
| 199 | - operateLogObj.setName(apiOperation.value()); | 198 | + if (StrUtil.isEmpty(operateLogObj.getName()) && operation != null) { |
| 199 | + operateLogObj.setName(operation.description()); | ||
| 200 | } | 200 | } |
| 201 | // type 属性 | 201 | // type 属性 |
| 202 | if (operateLog != null && ArrayUtil.isNotEmpty(operateLog.type())) { | 202 | if (operateLog != null && ArrayUtil.isNotEmpty(operateLog.type())) { |
yudao-framework/yudao-spring-boot-starter-web/pom.xml
| @@ -34,17 +34,18 @@ | @@ -34,17 +34,18 @@ | ||
| 34 | </dependency> | 34 | </dependency> |
| 35 | 35 | ||
| 36 | <dependency> | 36 | <dependency> |
| 37 | - <groupId>com.github.xiaoymin</groupId> | ||
| 38 | - <artifactId>knife4j-spring-boot-starter</artifactId> | 37 | + <groupId>org.springdoc</groupId> |
| 38 | + <artifactId>springdoc-openapi-webmvc-core</artifactId> | ||
| 39 | </dependency> | 39 | </dependency> |
| 40 | + | ||
| 40 | <dependency> | 41 | <dependency> |
| 41 | - <groupId>io.swagger</groupId> | ||
| 42 | - <artifactId>swagger-annotations</artifactId> | 42 | + <groupId>org.springdoc</groupId> |
| 43 | + <artifactId>springdoc-openapi-javadoc</artifactId> | ||
| 43 | </dependency> | 44 | </dependency> |
| 44 | 45 | ||
| 45 | <dependency> | 46 | <dependency> |
| 46 | - <groupId>org.springframework.boot</groupId> | ||
| 47 | - <artifactId>spring-boot-starter-validation</artifactId> | 47 | + <groupId>org.springdoc</groupId> |
| 48 | + <artifactId>springdoc-openapi-security</artifactId> | ||
| 48 | </dependency> | 49 | </dependency> |
| 49 | 50 | ||
| 50 | <dependency> | 51 | <dependency> |
yudao-framework/yudao-spring-boot-starter-web/src/main/java/cn/iocoder/yudao/framework/swagger/config/YudaoSwaggerAutoConfiguration.java
| 1 | package cn.iocoder.yudao.framework.swagger.config; | 1 | package cn.iocoder.yudao.framework.swagger.config; |
| 2 | 2 | ||
| 3 | -import cn.iocoder.yudao.framework.swagger.core.SpringFoxHandlerProviderBeanPostProcessor; | ||
| 4 | -import com.github.xiaoymin.knife4j.spring.annotations.EnableKnife4j; | 3 | +import io.swagger.v3.oas.models.Components; |
| 4 | +import io.swagger.v3.oas.models.ExternalDocumentation; | ||
| 5 | +import io.swagger.v3.oas.models.OpenAPI; | ||
| 6 | +import io.swagger.v3.oas.models.info.Info; | ||
| 7 | +import io.swagger.v3.oas.models.info.License; | ||
| 8 | +import io.swagger.v3.oas.models.security.SecurityRequirement; | ||
| 9 | +import io.swagger.v3.oas.models.security.SecurityScheme; | ||
| 10 | +import org.springdoc.core.GroupedOpenApi; | ||
| 5 | import org.springframework.boot.autoconfigure.AutoConfiguration; | 11 | import org.springframework.boot.autoconfigure.AutoConfiguration; |
| 6 | import org.springframework.boot.autoconfigure.condition.ConditionalOnClass; | 12 | import org.springframework.boot.autoconfigure.condition.ConditionalOnClass; |
| 7 | import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty; | 13 | import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty; |
| 8 | import org.springframework.boot.context.properties.EnableConfigurationProperties; | 14 | import org.springframework.boot.context.properties.EnableConfigurationProperties; |
| 9 | import org.springframework.context.annotation.Bean; | 15 | import org.springframework.context.annotation.Bean; |
| 10 | import org.springframework.http.HttpHeaders; | 16 | import org.springframework.http.HttpHeaders; |
| 11 | -import springfox.documentation.builders.ApiInfoBuilder; | ||
| 12 | -import springfox.documentation.builders.ExampleBuilder; | ||
| 13 | -import springfox.documentation.builders.PathSelectors; | ||
| 14 | -import springfox.documentation.builders.RequestParameterBuilder; | ||
| 15 | -import springfox.documentation.service.*; | ||
| 16 | -import springfox.documentation.spi.DocumentationType; | ||
| 17 | -import springfox.documentation.spi.service.contexts.SecurityContext; | ||
| 18 | -import springfox.documentation.spring.web.plugins.Docket; | ||
| 19 | -import springfox.documentation.swagger2.annotations.EnableSwagger2; | ||
| 20 | - | ||
| 21 | -import java.util.Collections; | ||
| 22 | -import java.util.List; | ||
| 23 | - | ||
| 24 | -import static cn.iocoder.yudao.framework.web.core.util.WebFrameworkUtils.HEADER_TENANT_ID; | ||
| 25 | -import static springfox.documentation.builders.RequestHandlerSelectors.basePackage; | ||
| 26 | 17 | ||
| 27 | /** | 18 | /** |
| 28 | - * Swagger2 自动配置类 | 19 | + * Swagger3 自动配置类 |
| 29 | * | 20 | * |
| 30 | * @author 芋道源码 | 21 | * @author 芋道源码 |
| 31 | */ | 22 | */ |
| 32 | @AutoConfiguration | 23 | @AutoConfiguration |
| 33 | -@EnableSwagger2 | ||
| 34 | -@EnableKnife4j | ||
| 35 | -@ConditionalOnClass({Docket.class, ApiInfoBuilder.class}) | 24 | +@ConditionalOnClass({OpenAPI.class}) |
| 36 | // 允许使用 swagger.enable=false 禁用 Swagger | 25 | // 允许使用 swagger.enable=false 禁用 Swagger |
| 37 | @ConditionalOnProperty(prefix = "yudao.swagger", value = "enable", matchIfMissing = true) | 26 | @ConditionalOnProperty(prefix = "yudao.swagger", value = "enable", matchIfMissing = true) |
| 38 | @EnableConfigurationProperties(SwaggerProperties.class) | 27 | @EnableConfigurationProperties(SwaggerProperties.class) |
| 39 | public class YudaoSwaggerAutoConfiguration { | 28 | public class YudaoSwaggerAutoConfiguration { |
| 40 | 29 | ||
| 41 | @Bean | 30 | @Bean |
| 42 | - public SpringFoxHandlerProviderBeanPostProcessor springFoxHandlerProviderBeanPostProcessor() { | ||
| 43 | - return new SpringFoxHandlerProviderBeanPostProcessor(); | ||
| 44 | - } | 31 | + public OpenAPI createRestApi(SwaggerProperties properties) { |
| 32 | + return new OpenAPI() | ||
| 33 | + .info(new Info().title(properties.getTitle()) | ||
| 34 | + .description(properties.getDescription()) | ||
| 35 | + .version(properties.getVersion()) | ||
| 36 | + .license(new License().name("MIT").url("https://gitee.com/zhijiantianya/ruoyi-vue-pro/blob/master/LICENSE"))) | ||
| 37 | + .externalDocs(new ExternalDocumentation() | ||
| 38 | + .description(properties.getDescription()) | ||
| 39 | + .url("https://gitee.com/zhijiantianya/ruoyi-vue-pro")); | ||
| 45 | 40 | ||
| 46 | - @Bean | ||
| 47 | - public Docket createRestApi(SwaggerProperties properties) { | ||
| 48 | - // 创建 Docket 对象 | ||
| 49 | - return new Docket(DocumentationType.SWAGGER_2) | ||
| 50 | - // ① 用来创建该 API 的基本信息,展示在文档的页面中(自定义展示的信息) | ||
| 51 | - .apiInfo(apiInfo(properties)) | ||
| 52 | - // ② 设置扫描指定 package 包下的 | ||
| 53 | - .select() | ||
| 54 | - .apis(basePackage(properties.getBasePackage())) | ||
| 55 | -// .apis(basePackage("cn.iocoder.yudao.module.system")) // 可用于 swagger 无法展示时使用 | ||
| 56 | - .paths(PathSelectors.any()) | ||
| 57 | - .build() | ||
| 58 | - // ③ 安全上下文(认证) | ||
| 59 | - .securitySchemes(securitySchemes()) | ||
| 60 | - .securityContexts(securityContexts()) | ||
| 61 | - // ④ 全局参数(多租户 header) | ||
| 62 | - .globalRequestParameters(globalRequestParameters()); | ||
| 63 | } | 41 | } |
| 64 | 42 | ||
| 65 | - // ========== apiInfo ========== | ||
| 66 | - | ||
| 67 | - /** | ||
| 68 | - * API 摘要信息 | ||
| 69 | - */ | ||
| 70 | - private static ApiInfo apiInfo(SwaggerProperties properties) { | ||
| 71 | - return new ApiInfoBuilder() | ||
| 72 | - .title(properties.getTitle()) | ||
| 73 | - .description(properties.getDescription()) | ||
| 74 | - .contact(new Contact(properties.getAuthor(), null, null)) | ||
| 75 | - .version(properties.getVersion()) | 43 | + @Bean |
| 44 | + public GroupedOpenApi publicApi() { | ||
| 45 | + return GroupedOpenApi.builder() | ||
| 46 | + .group("app") | ||
| 47 | + .pathsToMatch("/app/**") | ||
| 76 | .build(); | 48 | .build(); |
| 77 | } | 49 | } |
| 78 | 50 | ||
| 79 | - // ========== securitySchemes ========== | ||
| 80 | - | ||
| 81 | - /** | ||
| 82 | - * 安全模式,这里配置通过请求头 Authorization 传递 token 参数 | ||
| 83 | - */ | ||
| 84 | - private static List<SecurityScheme> securitySchemes() { | ||
| 85 | - return Collections.singletonList(new ApiKey(HttpHeaders.AUTHORIZATION, "Authorization", "header")); | ||
| 86 | - } | ||
| 87 | - | ||
| 88 | - /** | ||
| 89 | - * 安全上下文 | ||
| 90 | - * | ||
| 91 | - * @see #securitySchemes() | ||
| 92 | - * @see #authorizationScopes() | ||
| 93 | - */ | ||
| 94 | - private static List<SecurityContext> securityContexts() { | ||
| 95 | - return Collections.singletonList(SecurityContext.builder() | ||
| 96 | - .securityReferences(securityReferences()) | ||
| 97 | - // 通过 PathSelectors.regex("^(?!auth).*$"),排除包含 "auth" 的接口不需要使用securitySchemes | ||
| 98 | - .operationSelector(o -> o.requestMappingPattern().matches("^(?!auth).*$")) | ||
| 99 | - .build()); | ||
| 100 | - } | ||
| 101 | - | ||
| 102 | - private static List<SecurityReference> securityReferences() { | ||
| 103 | - return Collections.singletonList(new SecurityReference(HttpHeaders.AUTHORIZATION, authorizationScopes())); | ||
| 104 | - } | ||
| 105 | - | ||
| 106 | - private static AuthorizationScope[] authorizationScopes() { | ||
| 107 | - return new AuthorizationScope[]{new AuthorizationScope("global", "accessEverything")}; | 51 | + @Bean |
| 52 | + public GroupedOpenApi adminApi() { | ||
| 53 | + return GroupedOpenApi.builder() | ||
| 54 | + .group("admin") | ||
| 55 | + .pathsToMatch("/admin/**") | ||
| 56 | + .build(); | ||
| 108 | } | 57 | } |
| 109 | 58 | ||
| 110 | - // ========== globalRequestParameters ========== | ||
| 111 | - | ||
| 112 | - private static List<RequestParameter> globalRequestParameters() { | ||
| 113 | - RequestParameterBuilder tenantParameter = new RequestParameterBuilder() | ||
| 114 | - .name(HEADER_TENANT_ID).description("租户编号") | ||
| 115 | - .in(ParameterType.HEADER).example(new ExampleBuilder().value(1L).build()); | ||
| 116 | - return Collections.singletonList(tenantParameter.build()); | ||
| 117 | - } | ||
| 118 | 59 | ||
| 119 | } | 60 | } |
yudao-framework/yudao-spring-boot-starter-web/src/main/java/cn/iocoder/yudao/framework/swagger/core/SpringFoxHandlerProviderBeanPostProcessor.java
| 1 | -package cn.iocoder.yudao.framework.swagger.core; | ||
| 2 | - | ||
| 3 | -import cn.hutool.core.util.ReflectUtil; | ||
| 4 | -import cn.iocoder.yudao.framework.common.util.collection.CollectionUtils; | ||
| 5 | -import org.springframework.beans.BeansException; | ||
| 6 | -import org.springframework.beans.factory.config.BeanPostProcessor; | ||
| 7 | -import org.springframework.web.servlet.mvc.method.RequestMappingInfoHandlerMapping; | ||
| 8 | -import springfox.documentation.spring.web.plugins.WebFluxRequestHandlerProvider; | ||
| 9 | -import springfox.documentation.spring.web.plugins.WebMvcRequestHandlerProvider; | ||
| 10 | - | ||
| 11 | -import java.util.List; | ||
| 12 | - | ||
| 13 | -/** | ||
| 14 | - * 解决 SpringFox 与 SpringBoot 2.6.x 不兼容的问题 | ||
| 15 | - * 该问题对应的 issue 为 https://github.com/springfox/springfox/issues/3462 | ||
| 16 | - * | ||
| 17 | - * @author 芋道源码 | ||
| 18 | - */ | ||
| 19 | -public class SpringFoxHandlerProviderBeanPostProcessor implements BeanPostProcessor { | ||
| 20 | - | ||
| 21 | - @Override | ||
| 22 | - public Object postProcessAfterInitialization(Object bean, String beanName) throws BeansException { | ||
| 23 | - if (bean instanceof WebMvcRequestHandlerProvider || bean instanceof WebFluxRequestHandlerProvider) { | ||
| 24 | - customizeSpringfoxHandlerMappings(getHandlerMappings(bean)); | ||
| 25 | - } | ||
| 26 | - return bean; | ||
| 27 | - } | ||
| 28 | - | ||
| 29 | - private <T extends RequestMappingInfoHandlerMapping> void customizeSpringfoxHandlerMappings(List<T> mappings) { | ||
| 30 | - // 移除,只保留 patternParser | ||
| 31 | - List<T> copy = CollectionUtils.filterList(mappings, mapping -> mapping.getPatternParser() == null); | ||
| 32 | - // 添加到 mappings 中 | ||
| 33 | - mappings.clear(); | ||
| 34 | - mappings.addAll(copy); | ||
| 35 | - } | ||
| 36 | - | ||
| 37 | - @SuppressWarnings("unchecked") | ||
| 38 | - private List<RequestMappingInfoHandlerMapping> getHandlerMappings(Object bean) { | ||
| 39 | - return (List<RequestMappingInfoHandlerMapping>) | ||
| 40 | - ReflectUtil.getFieldValue(bean, "handlerMappings"); | ||
| 41 | - } | ||
| 42 | - | ||
| 43 | -} | 1 | +//package cn.iocoder.yudao.framework.swagger.core; |
| 2 | +// | ||
| 3 | +//import cn.hutool.core.util.ReflectUtil; | ||
| 4 | +//import cn.iocoder.yudao.framework.common.util.collection.CollectionUtils; | ||
| 5 | +//import org.springframework.beans.BeansException; | ||
| 6 | +//import org.springframework.beans.factory.config.BeanPostProcessor; | ||
| 7 | +//import org.springframework.web.servlet.mvc.method.RequestMappingInfoHandlerMapping; | ||
| 8 | +//import springfox.documentation.spring.web.plugins.WebFluxRequestHandlerProvider; | ||
| 9 | +//import springfox.documentation.spring.web.plugins.WebMvcRequestHandlerProvider; | ||
| 10 | +// | ||
| 11 | +//import java.util.List; | ||
| 12 | +// | ||
| 13 | +///** | ||
| 14 | +// * 解决 SpringFox 与 SpringBoot 2.6.x 不兼容的问题 | ||
| 15 | +// * 该问题对应的 issue 为 https://github.com/springfox/springfox/issues/3462 | ||
| 16 | +// * | ||
| 17 | +// * @author 芋道源码 | ||
| 18 | +// */ | ||
| 19 | +//public class SpringFoxHandlerProviderBeanPostProcessor implements BeanPostProcessor { | ||
| 20 | +// | ||
| 21 | +// @Override | ||
| 22 | +// public Object postProcessAfterInitialization(Object bean, String beanName) throws BeansException { | ||
| 23 | +// if (bean instanceof WebMvcRequestHandlerProvider || bean instanceof WebFluxRequestHandlerProvider) { | ||
| 24 | +// customizeSpringfoxHandlerMappings(getHandlerMappings(bean)); | ||
| 25 | +// } | ||
| 26 | +// return bean; | ||
| 27 | +// } | ||
| 28 | +// | ||
| 29 | +// private <T extends RequestMappingInfoHandlerMapping> void customizeSpringfoxHandlerMappings(List<T> mappings) { | ||
| 30 | +// // 移除,只保留 patternParser | ||
| 31 | +// List<T> copy = CollectionUtils.filterList(mappings, mapping -> mapping.getPatternParser() == null); | ||
| 32 | +// // 添加到 mappings 中 | ||
| 33 | +// mappings.clear(); | ||
| 34 | +// mappings.addAll(copy); | ||
| 35 | +// } | ||
| 36 | +// | ||
| 37 | +// @SuppressWarnings("unchecked") | ||
| 38 | +// private List<RequestMappingInfoHandlerMapping> getHandlerMappings(Object bean) { | ||
| 39 | +// return (List<RequestMappingInfoHandlerMapping>) | ||
| 40 | +// ReflectUtil.getFieldValue(bean, "handlerMappings"); | ||
| 41 | +// } | ||
| 42 | +// | ||
| 43 | +//} |
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; | @@ -6,9 +6,9 @@ import cn.iocoder.yudao.module.bpm.dal.dataobject.definition.BpmFormDO; | ||
| 6 | import cn.iocoder.yudao.module.bpm.service.definition.BpmFormService; | 6 | import cn.iocoder.yudao.module.bpm.service.definition.BpmFormService; |
| 7 | import cn.iocoder.yudao.framework.common.pojo.CommonResult; | 7 | import cn.iocoder.yudao.framework.common.pojo.CommonResult; |
| 8 | import cn.iocoder.yudao.framework.common.pojo.PageResult; | 8 | import cn.iocoder.yudao.framework.common.pojo.PageResult; |
| 9 | -import io.swagger.annotations.Api; | ||
| 10 | -import io.swagger.annotations.ApiImplicitParam; | ||
| 11 | -import io.swagger.annotations.ApiOperation; | 9 | +import io.swagger.v3.oas.annotations.tags.Tag; |
| 10 | +import io.swagger.v3.oas.annotations.Parameter; | ||
| 11 | +import io.swagger.v3.oas.annotations.Operation; | ||
| 12 | import org.springframework.security.access.prepost.PreAuthorize; | 12 | import org.springframework.security.access.prepost.PreAuthorize; |
| 13 | import org.springframework.validation.annotation.Validated; | 13 | import org.springframework.validation.annotation.Validated; |
| 14 | import org.springframework.web.bind.annotation.*; | 14 | import org.springframework.web.bind.annotation.*; |
| @@ -19,7 +19,7 @@ import java.util.List; | @@ -19,7 +19,7 @@ import java.util.List; | ||
| 19 | 19 | ||
| 20 | import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success; | 20 | import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success; |
| 21 | 21 | ||
| 22 | -@Api(tags = "管理后台 - 动态表单") | 22 | +@Tag(name = "管理后台 - 动态表单") |
| 23 | @RestController | 23 | @RestController |
| 24 | @RequestMapping("/bpm/form") | 24 | @RequestMapping("/bpm/form") |
| 25 | @Validated | 25 | @Validated |
| @@ -29,14 +29,14 @@ public class BpmFormController { | @@ -29,14 +29,14 @@ public class BpmFormController { | ||
| 29 | private BpmFormService formService; | 29 | private BpmFormService formService; |
| 30 | 30 | ||
| 31 | @PostMapping("/create") | 31 | @PostMapping("/create") |
| 32 | - @ApiOperation("创建动态表单") | 32 | + @Operation(summary = "创建动态表单") |
| 33 | @PreAuthorize("@ss.hasPermission('bpm:form:create')") | 33 | @PreAuthorize("@ss.hasPermission('bpm:form:create')") |
| 34 | public CommonResult<Long> createForm(@Valid @RequestBody BpmFormCreateReqVO createReqVO) { | 34 | public CommonResult<Long> createForm(@Valid @RequestBody BpmFormCreateReqVO createReqVO) { |
| 35 | return success(formService.createForm(createReqVO)); | 35 | return success(formService.createForm(createReqVO)); |
| 36 | } | 36 | } |
| 37 | 37 | ||
| 38 | @PutMapping("/update") | 38 | @PutMapping("/update") |
| 39 | - @ApiOperation("更新动态表单") | 39 | + @Operation(summary = "更新动态表单") |
| 40 | @PreAuthorize("@ss.hasPermission('bpm:form:update')") | 40 | @PreAuthorize("@ss.hasPermission('bpm:form:update')") |
| 41 | public CommonResult<Boolean> updateForm(@Valid @RequestBody BpmFormUpdateReqVO updateReqVO) { | 41 | public CommonResult<Boolean> updateForm(@Valid @RequestBody BpmFormUpdateReqVO updateReqVO) { |
| 42 | formService.updateForm(updateReqVO); | 42 | formService.updateForm(updateReqVO); |
| @@ -44,8 +44,8 @@ public class BpmFormController { | @@ -44,8 +44,8 @@ public class BpmFormController { | ||
| 44 | } | 44 | } |
| 45 | 45 | ||
| 46 | @DeleteMapping("/delete") | 46 | @DeleteMapping("/delete") |
| 47 | - @ApiOperation("删除动态表单") | ||
| 48 | - @ApiImplicitParam(name = "id", value = "编号", required = true, dataTypeClass = Long.class) | 47 | + @Operation(summary = "删除动态表单") |
| 48 | + @Parameter(name = "id", description = "编号", required = true) | ||
| 49 | @PreAuthorize("@ss.hasPermission('bpm:form:delete')") | 49 | @PreAuthorize("@ss.hasPermission('bpm:form:delete')") |
| 50 | public CommonResult<Boolean> deleteForm(@RequestParam("id") Long id) { | 50 | public CommonResult<Boolean> deleteForm(@RequestParam("id") Long id) { |
| 51 | formService.deleteForm(id); | 51 | formService.deleteForm(id); |
| @@ -53,8 +53,8 @@ public class BpmFormController { | @@ -53,8 +53,8 @@ public class BpmFormController { | ||
| 53 | } | 53 | } |
| 54 | 54 | ||
| 55 | @GetMapping("/get") | 55 | @GetMapping("/get") |
| 56 | - @ApiOperation("获得动态表单") | ||
| 57 | - @ApiImplicitParam(name = "id", value = "编号", required = true, example = "1024", dataTypeClass = Long.class) | 56 | + @Operation(summary = "获得动态表单") |
| 57 | + @Parameter(name = "id", description = "编号", required = true, example = "1024") | ||
| 58 | @PreAuthorize("@ss.hasPermission('bpm:form:query')") | 58 | @PreAuthorize("@ss.hasPermission('bpm:form:query')") |
| 59 | public CommonResult<BpmFormRespVO> getForm(@RequestParam("id") Long id) { | 59 | public CommonResult<BpmFormRespVO> getForm(@RequestParam("id") Long id) { |
| 60 | BpmFormDO form = formService.getForm(id); | 60 | BpmFormDO form = formService.getForm(id); |
| @@ -62,14 +62,14 @@ public class BpmFormController { | @@ -62,14 +62,14 @@ public class BpmFormController { | ||
| 62 | } | 62 | } |
| 63 | 63 | ||
| 64 | @GetMapping("/list-all-simple") | 64 | @GetMapping("/list-all-simple") |
| 65 | - @ApiOperation(value = "获得动态表单的精简列表", notes = "用于表单下拉框") | 65 | + @Operation(summary = "获得动态表单的精简列表", description = "用于表单下拉框") |
| 66 | public CommonResult<List<BpmFormSimpleRespVO>> getSimpleForms() { | 66 | public CommonResult<List<BpmFormSimpleRespVO>> getSimpleForms() { |
| 67 | List<BpmFormDO> list = formService.getFormList(); | 67 | List<BpmFormDO> list = formService.getFormList(); |
| 68 | return success(BpmFormConvert.INSTANCE.convertList2(list)); | 68 | return success(BpmFormConvert.INSTANCE.convertList2(list)); |
| 69 | } | 69 | } |
| 70 | 70 | ||
| 71 | @GetMapping("/page") | 71 | @GetMapping("/page") |
| 72 | - @ApiOperation("获得动态表单分页") | 72 | + @Operation(summary = "获得动态表单分页") |
| 73 | @PreAuthorize("@ss.hasPermission('bpm:form:query')") | 73 | @PreAuthorize("@ss.hasPermission('bpm:form:query')") |
| 74 | public CommonResult<PageResult<BpmFormRespVO>> getFormPage(@Valid BpmFormPageReqVO pageVO) { | 74 | public CommonResult<PageResult<BpmFormRespVO>> getFormPage(@Valid BpmFormPageReqVO pageVO) { |
| 75 | PageResult<BpmFormDO> pageResult = formService.getFormPage(pageVO); | 75 | PageResult<BpmFormDO> pageResult = formService.getFormPage(pageVO); |
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; | @@ -6,9 +6,9 @@ import cn.iocoder.yudao.framework.common.util.io.IoUtils; | ||
| 6 | import cn.iocoder.yudao.module.bpm.controller.admin.definition.vo.model.*; | 6 | import cn.iocoder.yudao.module.bpm.controller.admin.definition.vo.model.*; |
| 7 | import cn.iocoder.yudao.module.bpm.convert.definition.BpmModelConvert; | 7 | import cn.iocoder.yudao.module.bpm.convert.definition.BpmModelConvert; |
| 8 | import cn.iocoder.yudao.module.bpm.service.definition.BpmModelService; | 8 | import cn.iocoder.yudao.module.bpm.service.definition.BpmModelService; |
| 9 | -import io.swagger.annotations.Api; | ||
| 10 | -import io.swagger.annotations.ApiImplicitParam; | ||
| 11 | -import io.swagger.annotations.ApiOperation; | 9 | +import io.swagger.v3.oas.annotations.tags.Tag; |
| 10 | +import io.swagger.v3.oas.annotations.Parameter; | ||
| 11 | +import io.swagger.v3.oas.annotations.Operation; | ||
| 12 | import org.springframework.security.access.prepost.PreAuthorize; | 12 | import org.springframework.security.access.prepost.PreAuthorize; |
| 13 | import org.springframework.validation.annotation.Validated; | 13 | import org.springframework.validation.annotation.Validated; |
| 14 | import org.springframework.web.bind.annotation.*; | 14 | import org.springframework.web.bind.annotation.*; |
| @@ -20,7 +20,7 @@ import java.io.IOException; | @@ -20,7 +20,7 @@ import java.io.IOException; | ||
| 20 | 20 | ||
| 21 | import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success; | 21 | import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success; |
| 22 | 22 | ||
| 23 | -@Api(tags = "管理后台 - 流程模型") | 23 | +@Tag(name = "管理后台 - 流程模型") |
| 24 | @RestController | 24 | @RestController |
| 25 | @RequestMapping("/bpm/model") | 25 | @RequestMapping("/bpm/model") |
| 26 | @Validated | 26 | @Validated |
| @@ -30,14 +30,14 @@ public class BpmModelController { | @@ -30,14 +30,14 @@ public class BpmModelController { | ||
| 30 | private BpmModelService modelService; | 30 | private BpmModelService modelService; |
| 31 | 31 | ||
| 32 | @GetMapping("/page") | 32 | @GetMapping("/page") |
| 33 | - @ApiOperation(value = "获得模型分页") | 33 | + @Operation(summary = "获得模型分页") |
| 34 | public CommonResult<PageResult<BpmModelPageItemRespVO>> getModelPage(BpmModelPageReqVO pageVO) { | 34 | public CommonResult<PageResult<BpmModelPageItemRespVO>> getModelPage(BpmModelPageReqVO pageVO) { |
| 35 | return success(modelService.getModelPage(pageVO)); | 35 | return success(modelService.getModelPage(pageVO)); |
| 36 | } | 36 | } |
| 37 | 37 | ||
| 38 | @GetMapping("/get") | 38 | @GetMapping("/get") |
| 39 | - @ApiOperation("获得模型") | ||
| 40 | - @ApiImplicitParam(name = "id", value = "编号", required = true, example = "1024", dataTypeClass = String.class) | 39 | + @Operation(summary = "获得模型") |
| 40 | + @Parameter(name = "id", description = "编号", required = true, example = "1024") | ||
| 41 | @PreAuthorize("@ss.hasPermission('bpm:model:query')") | 41 | @PreAuthorize("@ss.hasPermission('bpm:model:query')") |
| 42 | public CommonResult<BpmModelRespVO> getModel(@RequestParam("id") String id) { | 42 | public CommonResult<BpmModelRespVO> getModel(@RequestParam("id") String id) { |
| 43 | BpmModelRespVO model = modelService.getModel(id); | 43 | BpmModelRespVO model = modelService.getModel(id); |
| @@ -45,14 +45,14 @@ public class BpmModelController { | @@ -45,14 +45,14 @@ public class BpmModelController { | ||
| 45 | } | 45 | } |
| 46 | 46 | ||
| 47 | @PostMapping("/create") | 47 | @PostMapping("/create") |
| 48 | - @ApiOperation(value = "新建模型") | 48 | + @Operation(summary = "新建模型") |
| 49 | @PreAuthorize("@ss.hasPermission('bpm:model:create')") | 49 | @PreAuthorize("@ss.hasPermission('bpm:model:create')") |
| 50 | public CommonResult<String> createModel(@Valid @RequestBody BpmModelCreateReqVO createRetVO) { | 50 | public CommonResult<String> createModel(@Valid @RequestBody BpmModelCreateReqVO createRetVO) { |
| 51 | return success(modelService.createModel(createRetVO, null)); | 51 | return success(modelService.createModel(createRetVO, null)); |
| 52 | } | 52 | } |
| 53 | 53 | ||
| 54 | @PutMapping("/update") | 54 | @PutMapping("/update") |
| 55 | - @ApiOperation(value = "修改模型") | 55 | + @Operation(summary = "修改模型") |
| 56 | @PreAuthorize("@ss.hasPermission('bpm:model:update')") | 56 | @PreAuthorize("@ss.hasPermission('bpm:model:update')") |
| 57 | public CommonResult<Boolean> updateModel(@Valid @RequestBody BpmModelUpdateReqVO modelVO) { | 57 | public CommonResult<Boolean> updateModel(@Valid @RequestBody BpmModelUpdateReqVO modelVO) { |
| 58 | modelService.updateModel(modelVO); | 58 | modelService.updateModel(modelVO); |
| @@ -60,7 +60,7 @@ public class BpmModelController { | @@ -60,7 +60,7 @@ public class BpmModelController { | ||
| 60 | } | 60 | } |
| 61 | 61 | ||
| 62 | @PostMapping("/import") | 62 | @PostMapping("/import") |
| 63 | - @ApiOperation(value = "导入模型") | 63 | + @Operation(summary = "导入模型") |
| 64 | @PreAuthorize("@ss.hasPermission('bpm:model:import')") | 64 | @PreAuthorize("@ss.hasPermission('bpm:model:import')") |
| 65 | public CommonResult<String> importModel(@Valid BpmModeImportReqVO importReqVO) throws IOException { | 65 | public CommonResult<String> importModel(@Valid BpmModeImportReqVO importReqVO) throws IOException { |
| 66 | BpmModelCreateReqVO createReqVO = BpmModelConvert.INSTANCE.convert(importReqVO); | 66 | BpmModelCreateReqVO createReqVO = BpmModelConvert.INSTANCE.convert(importReqVO); |
| @@ -70,8 +70,8 @@ public class BpmModelController { | @@ -70,8 +70,8 @@ public class BpmModelController { | ||
| 70 | } | 70 | } |
| 71 | 71 | ||
| 72 | @PostMapping("/deploy") | 72 | @PostMapping("/deploy") |
| 73 | - @ApiOperation(value = "部署模型") | ||
| 74 | - @ApiImplicitParam(name = "id", value = "编号", required = true, example = "1024", dataTypeClass = String.class) | 73 | + @Operation(summary = "部署模型") |
| 74 | + @Parameter(name = "id", description = "编号", required = true, example = "1024") | ||
| 75 | @PreAuthorize("@ss.hasPermission('bpm:model:deploy')") | 75 | @PreAuthorize("@ss.hasPermission('bpm:model:deploy')") |
| 76 | public CommonResult<Boolean> deployModel(@RequestParam("id") String id) { | 76 | public CommonResult<Boolean> deployModel(@RequestParam("id") String id) { |
| 77 | modelService.deployModel(id); | 77 | modelService.deployModel(id); |
| @@ -79,7 +79,7 @@ public class BpmModelController { | @@ -79,7 +79,7 @@ public class BpmModelController { | ||
| 79 | } | 79 | } |
| 80 | 80 | ||
| 81 | @PutMapping("/update-state") | 81 | @PutMapping("/update-state") |
| 82 | - @ApiOperation(value = "修改模型的状态", notes = "实际更新的部署的流程定义的状态") | 82 | + @Operation(summary = "修改模型的状态", description = "实际更新的部署的流程定义的状态") |
| 83 | @PreAuthorize("@ss.hasPermission('bpm:model:update')") | 83 | @PreAuthorize("@ss.hasPermission('bpm:model:update')") |
| 84 | public CommonResult<Boolean> updateModelState(@Valid @RequestBody BpmModelUpdateStateReqVO reqVO) { | 84 | public CommonResult<Boolean> updateModelState(@Valid @RequestBody BpmModelUpdateStateReqVO reqVO) { |
| 85 | modelService.updateModelState(reqVO.getId(), reqVO.getState()); | 85 | modelService.updateModelState(reqVO.getId(), reqVO.getState()); |
| @@ -87,8 +87,8 @@ public class BpmModelController { | @@ -87,8 +87,8 @@ public class BpmModelController { | ||
| 87 | } | 87 | } |
| 88 | 88 | ||
| 89 | @DeleteMapping("/delete") | 89 | @DeleteMapping("/delete") |
| 90 | - @ApiOperation("删除模型") | ||
| 91 | - @ApiImplicitParam(name = "id", value = "编号", required = true, example = "1024", dataTypeClass = String.class) | 90 | + @Operation(summary = "删除模型") |
| 91 | + @Parameter(name = "id", description = "编号", required = true, example = "1024") | ||
| 92 | @PreAuthorize("@ss.hasPermission('bpm:model:delete')") | 92 | @PreAuthorize("@ss.hasPermission('bpm:model:delete')") |
| 93 | public CommonResult<Boolean> deleteModel(@RequestParam("id") String id) { | 93 | public CommonResult<Boolean> deleteModel(@RequestParam("id") String id) { |
| 94 | modelService.deleteModel(id); | 94 | modelService.deleteModel(id); |
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 | @@ -7,9 +7,9 @@ import cn.iocoder.yudao.module.bpm.controller.admin.definition.vo.process.BpmPro | ||
| 7 | import cn.iocoder.yudao.module.bpm.controller.admin.definition.vo.process.BpmProcessDefinitionPageReqVO; | 7 | import cn.iocoder.yudao.module.bpm.controller.admin.definition.vo.process.BpmProcessDefinitionPageReqVO; |
| 8 | import cn.iocoder.yudao.module.bpm.controller.admin.definition.vo.process.BpmProcessDefinitionRespVO; | 8 | import cn.iocoder.yudao.module.bpm.controller.admin.definition.vo.process.BpmProcessDefinitionRespVO; |
| 9 | import cn.iocoder.yudao.module.bpm.service.definition.BpmProcessDefinitionService; | 9 | import cn.iocoder.yudao.module.bpm.service.definition.BpmProcessDefinitionService; |
| 10 | -import io.swagger.annotations.Api; | ||
| 11 | -import io.swagger.annotations.ApiImplicitParam; | ||
| 12 | -import io.swagger.annotations.ApiOperation; | 10 | +import io.swagger.v3.oas.annotations.tags.Tag; |
| 11 | +import io.swagger.v3.oas.annotations.Parameter; | ||
| 12 | +import io.swagger.v3.oas.annotations.Operation; | ||
| 13 | import org.springframework.security.access.prepost.PreAuthorize; | 13 | import org.springframework.security.access.prepost.PreAuthorize; |
| 14 | import org.springframework.validation.annotation.Validated; | 14 | import org.springframework.validation.annotation.Validated; |
| 15 | import org.springframework.web.bind.annotation.GetMapping; | 15 | import org.springframework.web.bind.annotation.GetMapping; |
| @@ -23,7 +23,7 @@ import java.util.List; | @@ -23,7 +23,7 @@ import java.util.List; | ||
| 23 | 23 | ||
| 24 | import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success; | 24 | import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success; |
| 25 | 25 | ||
| 26 | -@Api(tags = "管理后台 - 流程定义") | 26 | +@Tag(name = "管理后台 - 流程定义") |
| 27 | @RestController | 27 | @RestController |
| 28 | @RequestMapping("/bpm/process-definition") | 28 | @RequestMapping("/bpm/process-definition") |
| 29 | @Validated | 29 | @Validated |
| @@ -33,7 +33,7 @@ public class BpmProcessDefinitionController { | @@ -33,7 +33,7 @@ public class BpmProcessDefinitionController { | ||
| 33 | private BpmProcessDefinitionService bpmDefinitionService; | 33 | private BpmProcessDefinitionService bpmDefinitionService; |
| 34 | 34 | ||
| 35 | @GetMapping("/page") | 35 | @GetMapping("/page") |
| 36 | - @ApiOperation(value = "获得流程定义分页") | 36 | + @Operation(summary = "获得流程定义分页") |
| 37 | @PreAuthorize("@ss.hasPermission('bpm:process-definition:query')") | 37 | @PreAuthorize("@ss.hasPermission('bpm:process-definition:query')") |
| 38 | public CommonResult<PageResult<BpmProcessDefinitionPageItemRespVO>> getProcessDefinitionPage( | 38 | public CommonResult<PageResult<BpmProcessDefinitionPageItemRespVO>> getProcessDefinitionPage( |
| 39 | BpmProcessDefinitionPageReqVO pageReqVO) { | 39 | BpmProcessDefinitionPageReqVO pageReqVO) { |
| @@ -41,7 +41,7 @@ public class BpmProcessDefinitionController { | @@ -41,7 +41,7 @@ public class BpmProcessDefinitionController { | ||
| 41 | } | 41 | } |
| 42 | 42 | ||
| 43 | @GetMapping ("/list") | 43 | @GetMapping ("/list") |
| 44 | - @ApiOperation(value = "获得流程定义列表") | 44 | + @Operation(summary = "获得流程定义列表") |
| 45 | @PreAuthorize("@ss.hasPermission('bpm:process-definition:query')") | 45 | @PreAuthorize("@ss.hasPermission('bpm:process-definition:query')") |
| 46 | public CommonResult<List<BpmProcessDefinitionRespVO>> getProcessDefinitionList( | 46 | public CommonResult<List<BpmProcessDefinitionRespVO>> getProcessDefinitionList( |
| 47 | BpmProcessDefinitionListReqVO listReqVO) { | 47 | BpmProcessDefinitionListReqVO listReqVO) { |
| @@ -49,8 +49,8 @@ public class BpmProcessDefinitionController { | @@ -49,8 +49,8 @@ public class BpmProcessDefinitionController { | ||
| 49 | } | 49 | } |
| 50 | 50 | ||
| 51 | @GetMapping ("/get-bpmn-xml") | 51 | @GetMapping ("/get-bpmn-xml") |
| 52 | - @ApiOperation(value = "获得流程定义的 BPMN XML") | ||
| 53 | - @ApiImplicitParam(name = "id", value = "编号", required = true, example = "1024", dataTypeClass = String.class) | 52 | + @Operation(summary = "获得流程定义的 BPMN XML") |
| 53 | + @Parameter(name = "id", description = "编号", required = true, example = "1024") | ||
| 54 | @PreAuthorize("@ss.hasPermission('bpm:process-definition:query')") | 54 | @PreAuthorize("@ss.hasPermission('bpm:process-definition:query')") |
| 55 | public CommonResult<String> getProcessDefinitionBpmnXML(@RequestParam("id") String id) { | 55 | public CommonResult<String> getProcessDefinitionBpmnXML(@RequestParam("id") String id) { |
| 56 | String bpmnXML = bpmDefinitionService.getProcessDefinitionBpmnXML(id); | 56 | String bpmnXML = bpmDefinitionService.getProcessDefinitionBpmnXML(id); |
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 | @@ -5,10 +5,10 @@ import cn.iocoder.yudao.module.bpm.controller.admin.definition.vo.rule.BpmTaskAs | ||
| 5 | import cn.iocoder.yudao.module.bpm.controller.admin.definition.vo.rule.BpmTaskAssignRuleRespVO; | 5 | import cn.iocoder.yudao.module.bpm.controller.admin.definition.vo.rule.BpmTaskAssignRuleRespVO; |
| 6 | import cn.iocoder.yudao.module.bpm.controller.admin.definition.vo.rule.BpmTaskAssignRuleUpdateReqVO; | 6 | import cn.iocoder.yudao.module.bpm.controller.admin.definition.vo.rule.BpmTaskAssignRuleUpdateReqVO; |
| 7 | import cn.iocoder.yudao.module.bpm.service.definition.BpmTaskAssignRuleService; | 7 | import cn.iocoder.yudao.module.bpm.service.definition.BpmTaskAssignRuleService; |
| 8 | -import io.swagger.annotations.Api; | ||
| 9 | -import io.swagger.annotations.ApiImplicitParam; | ||
| 10 | -import io.swagger.annotations.ApiImplicitParams; | ||
| 11 | -import io.swagger.annotations.ApiOperation; | 8 | +import io.swagger.v3.oas.annotations.tags.Tag; |
| 9 | +import io.swagger.v3.oas.annotations.Parameter; | ||
| 10 | +import io.swagger.v3.oas.annotations.Parameters; | ||
| 11 | +import io.swagger.v3.oas.annotations.Operation; | ||
| 12 | import org.springframework.security.access.prepost.PreAuthorize; | 12 | import org.springframework.security.access.prepost.PreAuthorize; |
| 13 | import org.springframework.validation.annotation.Validated; | 13 | import org.springframework.validation.annotation.Validated; |
| 14 | import org.springframework.web.bind.annotation.*; | 14 | import org.springframework.web.bind.annotation.*; |
| @@ -19,7 +19,7 @@ import java.util.List; | @@ -19,7 +19,7 @@ import java.util.List; | ||
| 19 | 19 | ||
| 20 | import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success; | 20 | import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success; |
| 21 | 21 | ||
| 22 | -@Api(tags = "管理后台 - 任务分配规则") | 22 | +@Tag(name = "管理后台 - 任务分配规则") |
| 23 | @RestController | 23 | @RestController |
| 24 | @RequestMapping("/bpm/task-assign-rule") | 24 | @RequestMapping("/bpm/task-assign-rule") |
| 25 | @Validated | 25 | @Validated |
| @@ -29,10 +29,10 @@ public class BpmTaskAssignRuleController { | @@ -29,10 +29,10 @@ public class BpmTaskAssignRuleController { | ||
| 29 | private BpmTaskAssignRuleService taskAssignRuleService; | 29 | private BpmTaskAssignRuleService taskAssignRuleService; |
| 30 | 30 | ||
| 31 | @GetMapping("/list") | 31 | @GetMapping("/list") |
| 32 | - @ApiOperation(value = "获得任务分配规则列表") | ||
| 33 | - @ApiImplicitParams({ | ||
| 34 | - @ApiImplicitParam(name = "modelId", value = "模型编号", example = "1024", dataTypeClass = String.class), | ||
| 35 | - @ApiImplicitParam(name = "processDefinitionId", value = "流程定义的编号", example = "2048", dataTypeClass = String.class) | 32 | + @Operation(summary = "获得任务分配规则列表") |
| 33 | + @Parameters({ | ||
| 34 | + @Parameter(name = "modelId", description = "模型编号", example = "1024"), | ||
| 35 | + @Parameter(name = "processDefinitionId", description = "流程定义的编号", example = "2048") | ||
| 36 | }) | 36 | }) |
| 37 | @PreAuthorize("@ss.hasPermission('bpm:task-assign-rule:query')") | 37 | @PreAuthorize("@ss.hasPermission('bpm:task-assign-rule:query')") |
| 38 | public CommonResult<List<BpmTaskAssignRuleRespVO>> getTaskAssignRuleList( | 38 | public CommonResult<List<BpmTaskAssignRuleRespVO>> getTaskAssignRuleList( |
| @@ -42,14 +42,14 @@ public class BpmTaskAssignRuleController { | @@ -42,14 +42,14 @@ public class BpmTaskAssignRuleController { | ||
| 42 | } | 42 | } |
| 43 | 43 | ||
| 44 | @PostMapping("/create") | 44 | @PostMapping("/create") |
| 45 | - @ApiOperation(value = "创建任务分配规则") | 45 | + @Operation(summary = "创建任务分配规则") |
| 46 | @PreAuthorize("@ss.hasPermission('bpm:task-assign-rule:create')") | 46 | @PreAuthorize("@ss.hasPermission('bpm:task-assign-rule:create')") |
| 47 | public CommonResult<Long> createTaskAssignRule(@Valid @RequestBody BpmTaskAssignRuleCreateReqVO reqVO) { | 47 | public CommonResult<Long> createTaskAssignRule(@Valid @RequestBody BpmTaskAssignRuleCreateReqVO reqVO) { |
| 48 | return success(taskAssignRuleService.createTaskAssignRule(reqVO)); | 48 | return success(taskAssignRuleService.createTaskAssignRule(reqVO)); |
| 49 | } | 49 | } |
| 50 | 50 | ||
| 51 | @PutMapping("/update") | 51 | @PutMapping("/update") |
| 52 | - @ApiOperation(value = "更新任务分配规则") | 52 | + @Operation(summary = "更新任务分配规则") |
| 53 | @PreAuthorize("@ss.hasPermission('bpm:task-assign-rule:update')") | 53 | @PreAuthorize("@ss.hasPermission('bpm:task-assign-rule:update')") |
| 54 | public CommonResult<Boolean> updateTaskAssignRule(@Valid @RequestBody BpmTaskAssignRuleUpdateReqVO reqVO) { | 54 | public CommonResult<Boolean> updateTaskAssignRule(@Valid @RequestBody BpmTaskAssignRuleUpdateReqVO reqVO) { |
| 55 | taskAssignRuleService.updateTaskAssignRule(reqVO); | 55 | taskAssignRuleService.updateTaskAssignRule(reqVO); |
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; | @@ -10,9 +10,9 @@ import cn.iocoder.yudao.module.bpm.service.definition.BpmUserGroupService; | ||
| 10 | import cn.iocoder.yudao.framework.common.enums.CommonStatusEnum; | 10 | import cn.iocoder.yudao.framework.common.enums.CommonStatusEnum; |
| 11 | import cn.iocoder.yudao.framework.common.pojo.CommonResult; | 11 | import cn.iocoder.yudao.framework.common.pojo.CommonResult; |
| 12 | import cn.iocoder.yudao.framework.common.pojo.PageResult; | 12 | import cn.iocoder.yudao.framework.common.pojo.PageResult; |
| 13 | -import io.swagger.annotations.Api; | ||
| 14 | -import io.swagger.annotations.ApiImplicitParam; | ||
| 15 | -import io.swagger.annotations.ApiOperation; | 13 | +import io.swagger.v3.oas.annotations.tags.Tag; |
| 14 | +import io.swagger.v3.oas.annotations.Parameter; | ||
| 15 | +import io.swagger.v3.oas.annotations.Operation; | ||
| 16 | import org.springframework.security.access.prepost.PreAuthorize; | 16 | import org.springframework.security.access.prepost.PreAuthorize; |
| 17 | import org.springframework.validation.annotation.Validated; | 17 | import org.springframework.validation.annotation.Validated; |
| 18 | import org.springframework.web.bind.annotation.*; | 18 | import org.springframework.web.bind.annotation.*; |
| @@ -23,7 +23,7 @@ import java.util.List; | @@ -23,7 +23,7 @@ import java.util.List; | ||
| 23 | 23 | ||
| 24 | import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success; | 24 | import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success; |
| 25 | 25 | ||
| 26 | -@Api(tags = "管理后台 - 用户组") | 26 | +@Tag(name = "管理后台 - 用户组") |
| 27 | @RestController | 27 | @RestController |
| 28 | @RequestMapping("/bpm/user-group") | 28 | @RequestMapping("/bpm/user-group") |
| 29 | @Validated | 29 | @Validated |
| @@ -33,14 +33,14 @@ public class BpmUserGroupController { | @@ -33,14 +33,14 @@ public class BpmUserGroupController { | ||
| 33 | private BpmUserGroupService userGroupService; | 33 | private BpmUserGroupService userGroupService; |
| 34 | 34 | ||
| 35 | @PostMapping("/create") | 35 | @PostMapping("/create") |
| 36 | - @ApiOperation("创建用户组") | 36 | + @Operation(summary = "创建用户组") |
| 37 | @PreAuthorize("@ss.hasPermission('bpm:user-group:create')") | 37 | @PreAuthorize("@ss.hasPermission('bpm:user-group:create')") |
| 38 | public CommonResult<Long> createUserGroup(@Valid @RequestBody BpmUserGroupCreateReqVO createReqVO) { | 38 | public CommonResult<Long> createUserGroup(@Valid @RequestBody BpmUserGroupCreateReqVO createReqVO) { |
| 39 | return success(userGroupService.createUserGroup(createReqVO)); | 39 | return success(userGroupService.createUserGroup(createReqVO)); |
| 40 | } | 40 | } |
| 41 | 41 | ||
| 42 | @PutMapping("/update") | 42 | @PutMapping("/update") |
| 43 | - @ApiOperation("更新用户组") | 43 | + @Operation(summary = "更新用户组") |
| 44 | @PreAuthorize("@ss.hasPermission('bpm:user-group:update')") | 44 | @PreAuthorize("@ss.hasPermission('bpm:user-group:update')") |
| 45 | public CommonResult<Boolean> updateUserGroup(@Valid @RequestBody BpmUserGroupUpdateReqVO updateReqVO) { | 45 | public CommonResult<Boolean> updateUserGroup(@Valid @RequestBody BpmUserGroupUpdateReqVO updateReqVO) { |
| 46 | userGroupService.updateUserGroup(updateReqVO); | 46 | userGroupService.updateUserGroup(updateReqVO); |
| @@ -48,8 +48,8 @@ public class BpmUserGroupController { | @@ -48,8 +48,8 @@ public class BpmUserGroupController { | ||
| 48 | } | 48 | } |
| 49 | 49 | ||
| 50 | @DeleteMapping("/delete") | 50 | @DeleteMapping("/delete") |
| 51 | - @ApiOperation("删除用户组") | ||
| 52 | - @ApiImplicitParam(name = "id", value = "编号", required = true, dataTypeClass = Long.class) | 51 | + @Operation(summary = "删除用户组") |
| 52 | + @Parameter(name = "id", description = "编号", required = true) | ||
| 53 | @PreAuthorize("@ss.hasPermission('bpm:user-group:delete')") | 53 | @PreAuthorize("@ss.hasPermission('bpm:user-group:delete')") |
| 54 | public CommonResult<Boolean> deleteUserGroup(@RequestParam("id") Long id) { | 54 | public CommonResult<Boolean> deleteUserGroup(@RequestParam("id") Long id) { |
| 55 | userGroupService.deleteUserGroup(id); | 55 | userGroupService.deleteUserGroup(id); |
| @@ -57,8 +57,8 @@ public class BpmUserGroupController { | @@ -57,8 +57,8 @@ public class BpmUserGroupController { | ||
| 57 | } | 57 | } |
| 58 | 58 | ||
| 59 | @GetMapping("/get") | 59 | @GetMapping("/get") |
| 60 | - @ApiOperation("获得用户组") | ||
| 61 | - @ApiImplicitParam(name = "id", value = "编号", required = true, example = "1024", dataTypeClass = Long.class) | 60 | + @Operation(summary = "获得用户组") |
| 61 | + @Parameter(name = "id", description = "编号", required = true, example = "1024") | ||
| 62 | @PreAuthorize("@ss.hasPermission('bpm:user-group:query')") | 62 | @PreAuthorize("@ss.hasPermission('bpm:user-group:query')") |
| 63 | public CommonResult<BpmUserGroupRespVO> getUserGroup(@RequestParam("id") Long id) { | 63 | public CommonResult<BpmUserGroupRespVO> getUserGroup(@RequestParam("id") Long id) { |
| 64 | BpmUserGroupDO userGroup = userGroupService.getUserGroup(id); | 64 | BpmUserGroupDO userGroup = userGroupService.getUserGroup(id); |
| @@ -66,7 +66,7 @@ public class BpmUserGroupController { | @@ -66,7 +66,7 @@ public class BpmUserGroupController { | ||
| 66 | } | 66 | } |
| 67 | 67 | ||
| 68 | @GetMapping("/page") | 68 | @GetMapping("/page") |
| 69 | - @ApiOperation("获得用户组分页") | 69 | + @Operation(summary = "获得用户组分页") |
| 70 | @PreAuthorize("@ss.hasPermission('bpm:user-group:query')") | 70 | @PreAuthorize("@ss.hasPermission('bpm:user-group:query')") |
| 71 | public CommonResult<PageResult<BpmUserGroupRespVO>> getUserGroupPage(@Valid BpmUserGroupPageReqVO pageVO) { | 71 | public CommonResult<PageResult<BpmUserGroupRespVO>> getUserGroupPage(@Valid BpmUserGroupPageReqVO pageVO) { |
| 72 | PageResult<BpmUserGroupDO> pageResult = userGroupService.getUserGroupPage(pageVO); | 72 | PageResult<BpmUserGroupDO> pageResult = userGroupService.getUserGroupPage(pageVO); |
| @@ -74,7 +74,7 @@ public class BpmUserGroupController { | @@ -74,7 +74,7 @@ public class BpmUserGroupController { | ||
| 74 | } | 74 | } |
| 75 | 75 | ||
| 76 | @GetMapping("/list-all-simple") | 76 | @GetMapping("/list-all-simple") |
| 77 | - @ApiOperation(value = "获取用户组精简信息列表", notes = "只包含被开启的用户组,主要用于前端的下拉选项") | 77 | + @Operation(summary = "获取用户组精简信息列表", description = "只包含被开启的用户组,主要用于前端的下拉选项") |
| 78 | public CommonResult<List<BpmUserGroupRespVO>> getSimpleUserGroups() { | 78 | public CommonResult<List<BpmUserGroupRespVO>> getSimpleUserGroups() { |
| 79 | // 获用户门列表,只要开启状态的 | 79 | // 获用户门列表,只要开启状态的 |
| 80 | List<BpmUserGroupDO> list = userGroupService.getUserGroupListByStatus(CommonStatusEnum.ENABLE.getStatus()); | 80 | List<BpmUserGroupDO> list = userGroupService.getUserGroupListByStatus(CommonStatusEnum.ENABLE.getStatus()); |
yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/definition/vo/form/BpmFormBaseVO.java
| 1 | package cn.iocoder.yudao.module.bpm.controller.admin.definition.vo.form; | 1 | package cn.iocoder.yudao.module.bpm.controller.admin.definition.vo.form; |
| 2 | - | 2 | +import io.swagger.v3.oas.annotations.media.Schema; |
| 3 | import lombok.*; | 3 | import lombok.*; |
| 4 | -import io.swagger.annotations.*; | ||
| 5 | import javax.validation.constraints.*; | 4 | import javax.validation.constraints.*; |
| 6 | 5 | ||
| 7 | /** | 6 | /** |
| @@ -11,15 +10,15 @@ import javax.validation.constraints.*; | @@ -11,15 +10,15 @@ import javax.validation.constraints.*; | ||
| 11 | @Data | 10 | @Data |
| 12 | public class BpmFormBaseVO { | 11 | public class BpmFormBaseVO { |
| 13 | 12 | ||
| 14 | - @ApiModelProperty(value = "表单名称", required = true, example = "芋道") | 13 | + @Schema(title = "表单名称", required = true, example = "芋道") |
| 15 | @NotNull(message = "表单名称不能为空") | 14 | @NotNull(message = "表单名称不能为空") |
| 16 | private String name; | 15 | private String name; |
| 17 | 16 | ||
| 18 | - @ApiModelProperty(value = "表单状态", required = true, notes = "参见 CommonStatusEnum 枚举", example = "1") | 17 | + @Schema(title = "表单状态", required = true, description = "参见 CommonStatusEnum 枚举", example = "1") |
| 19 | @NotNull(message = "表单状态不能为空") | 18 | @NotNull(message = "表单状态不能为空") |
| 20 | private Integer status; | 19 | private Integer status; |
| 21 | 20 | ||
| 22 | - @ApiModelProperty(value = "备注", example = "我是备注") | 21 | + @Schema(title = "备注", example = "我是备注") |
| 23 | private String remark; | 22 | private String remark; |
| 24 | 23 | ||
| 25 | } | 24 | } |
yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/definition/vo/form/BpmFormCreateReqVO.java
| 1 | package cn.iocoder.yudao.module.bpm.controller.admin.definition.vo.form; | 1 | package cn.iocoder.yudao.module.bpm.controller.admin.definition.vo.form; |
| 2 | - | 2 | +import io.swagger.v3.oas.annotations.media.Schema; |
| 3 | import lombok.*; | 3 | import lombok.*; |
| 4 | -import io.swagger.annotations.*; | ||
| 5 | 4 | ||
| 6 | import javax.validation.constraints.NotNull; | 5 | import javax.validation.constraints.NotNull; |
| 7 | import java.util.List; | 6 | import java.util.List; |
| 8 | 7 | ||
| 9 | -@ApiModel("管理后台 - 动态表单创建 Request VO") | 8 | +@Schema(title = "管理后台 - 动态表单创建 Request VO") |
| 10 | @Data | 9 | @Data |
| 11 | @EqualsAndHashCode(callSuper = true) | 10 | @EqualsAndHashCode(callSuper = true) |
| 12 | @ToString(callSuper = true) | 11 | @ToString(callSuper = true) |
| 13 | public class BpmFormCreateReqVO extends BpmFormBaseVO { | 12 | public class BpmFormCreateReqVO extends BpmFormBaseVO { |
| 14 | 13 | ||
| 15 | - @ApiModelProperty(value = "表单的配置", required = true, notes = "JSON 字符串") | 14 | + @Schema(title = "表单的配置", required = true, description = "JSON 字符串") |
| 16 | @NotNull(message = "表单的配置不能为空") | 15 | @NotNull(message = "表单的配置不能为空") |
| 17 | private String conf; | 16 | private String conf; |
| 18 | 17 | ||
| 19 | - @ApiModelProperty(value = "表单项的数组", required = true, notes = "JSON 字符串的数组") | 18 | + @Schema(title = "表单项的数组", required = true, description = "JSON 字符串的数组") |
| 20 | @NotNull(message = "表单项的数组不能为空") | 19 | @NotNull(message = "表单项的数组不能为空") |
| 21 | private List<String> fields; | 20 | private List<String> fields; |
| 22 | 21 |
yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/definition/vo/form/BpmFormPageReqVO.java
| 1 | package cn.iocoder.yudao.module.bpm.controller.admin.definition.vo.form; | 1 | package cn.iocoder.yudao.module.bpm.controller.admin.definition.vo.form; |
| 2 | 2 | ||
| 3 | import cn.iocoder.yudao.framework.common.pojo.PageParam; | 3 | import cn.iocoder.yudao.framework.common.pojo.PageParam; |
| 4 | -import io.swagger.annotations.ApiModel; | ||
| 5 | -import io.swagger.annotations.ApiModelProperty; | 4 | +import io.swagger.v3.oas.annotations.media.Schema; |
| 6 | import lombok.Data; | 5 | import lombok.Data; |
| 7 | import lombok.EqualsAndHashCode; | 6 | import lombok.EqualsAndHashCode; |
| 8 | import lombok.ToString; | 7 | import lombok.ToString; |
| 9 | 8 | ||
| 10 | -@ApiModel("管理后台 - 动态表单分页 Request VO") | 9 | +@Schema(title = "管理后台 - 动态表单分页 Request VO") |
| 11 | @Data | 10 | @Data |
| 12 | @EqualsAndHashCode(callSuper = true) | 11 | @EqualsAndHashCode(callSuper = true) |
| 13 | @ToString(callSuper = true) | 12 | @ToString(callSuper = true) |
| 14 | public class BpmFormPageReqVO extends PageParam { | 13 | public class BpmFormPageReqVO extends PageParam { |
| 15 | 14 | ||
| 16 | - @ApiModelProperty(value = "表单名称", example = "芋道") | 15 | + @Schema(title = "表单名称", example = "芋道") |
| 17 | private String name; | 16 | private String name; |
| 18 | 17 | ||
| 19 | } | 18 | } |
yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/definition/vo/form/BpmFormRespVO.java
| 1 | package cn.iocoder.yudao.module.bpm.controller.admin.definition.vo.form; | 1 | package cn.iocoder.yudao.module.bpm.controller.admin.definition.vo.form; |
| 2 | - | ||
| 3 | -import io.swagger.annotations.ApiModel; | ||
| 4 | -import io.swagger.annotations.ApiModelProperty; | 2 | +import io.swagger.v3.oas.annotations.media.Schema; |
| 5 | import lombok.Data; | 3 | import lombok.Data; |
| 6 | import lombok.EqualsAndHashCode; | 4 | import lombok.EqualsAndHashCode; |
| 7 | import lombok.ToString; | 5 | import lombok.ToString; |
| @@ -10,24 +8,24 @@ import javax.validation.constraints.NotNull; | @@ -10,24 +8,24 @@ import javax.validation.constraints.NotNull; | ||
| 10 | import java.time.LocalDateTime; | 8 | import java.time.LocalDateTime; |
| 11 | import java.util.List; | 9 | import java.util.List; |
| 12 | 10 | ||
| 13 | -@ApiModel("管理后台 - 动态表单 Response VO") | 11 | +@Schema(title = "管理后台 - 动态表单 Response VO") |
| 14 | @Data | 12 | @Data |
| 15 | @EqualsAndHashCode(callSuper = true) | 13 | @EqualsAndHashCode(callSuper = true) |
| 16 | @ToString(callSuper = true) | 14 | @ToString(callSuper = true) |
| 17 | public class BpmFormRespVO extends BpmFormBaseVO { | 15 | public class BpmFormRespVO extends BpmFormBaseVO { |
| 18 | 16 | ||
| 19 | - @ApiModelProperty(value = "表单编号", required = true, example = "1024") | 17 | + @Schema(title = "表单编号", required = true, example = "1024") |
| 20 | private Long id; | 18 | private Long id; |
| 21 | 19 | ||
| 22 | - @ApiModelProperty(value = "表单的配置", required = true, notes = "JSON 字符串") | 20 | + @Schema(title = "表单的配置", required = true, description = "JSON 字符串") |
| 23 | @NotNull(message = "表单的配置不能为空") | 21 | @NotNull(message = "表单的配置不能为空") |
| 24 | private String conf; | 22 | private String conf; |
| 25 | 23 | ||
| 26 | - @ApiModelProperty(value = "表单项的数组", required = true, notes = "JSON 字符串的数组") | 24 | + @Schema(title = "表单项的数组", required = true, description = "JSON 字符串的数组") |
| 27 | @NotNull(message = "表单项的数组不能为空") | 25 | @NotNull(message = "表单项的数组不能为空") |
| 28 | private List<String> fields; | 26 | private List<String> fields; |
| 29 | 27 | ||
| 30 | - @ApiModelProperty(value = "创建时间", required = true) | 28 | + @Schema(title = "创建时间", required = true) |
| 31 | private LocalDateTime createTime; | 29 | private LocalDateTime createTime; |
| 32 | 30 | ||
| 33 | } | 31 | } |
yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/definition/vo/form/BpmFormSimpleRespVO.java
| 1 | package cn.iocoder.yudao.module.bpm.controller.admin.definition.vo.form; | 1 | package cn.iocoder.yudao.module.bpm.controller.admin.definition.vo.form; |
| 2 | 2 | ||
| 3 | -import io.swagger.annotations.ApiModel; | ||
| 4 | -import io.swagger.annotations.ApiModelProperty; | 3 | +import io.swagger.v3.oas.annotations.media.Schema; |
| 5 | import lombok.Data; | 4 | import lombok.Data; |
| 6 | 5 | ||
| 7 | -@ApiModel("管理后台 - 流程表单精简 Response VO") | 6 | +@Schema(title = "管理后台 - 流程表单精简 Response VO") |
| 8 | @Data | 7 | @Data |
| 9 | public class BpmFormSimpleRespVO { | 8 | public class BpmFormSimpleRespVO { |
| 10 | 9 | ||
| 11 | - @ApiModelProperty(value = "表单编号", required = true, example = "1024") | 10 | + @Schema(title = "表单编号", required = true, example = "1024") |
| 12 | private Long id; | 11 | private Long id; |
| 13 | 12 | ||
| 14 | - @ApiModelProperty(value = "表单名称", required = true, example = "芋道") | 13 | + @Schema(title = "表单名称", required = true, example = "芋道") |
| 15 | private String name; | 14 | private String name; |
| 16 | 15 | ||
| 17 | } | 16 | } |
yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/definition/vo/form/BpmFormUpdateReqVO.java
| 1 | package cn.iocoder.yudao.module.bpm.controller.admin.definition.vo.form; | 1 | package cn.iocoder.yudao.module.bpm.controller.admin.definition.vo.form; |
| 2 | - | 2 | +import io.swagger.v3.oas.annotations.media.Schema; |
| 3 | import lombok.*; | 3 | import lombok.*; |
| 4 | -import io.swagger.annotations.*; | ||
| 5 | import javax.validation.constraints.*; | 4 | import javax.validation.constraints.*; |
| 6 | import java.util.List; | 5 | import java.util.List; |
| 7 | 6 | ||
| 8 | -@ApiModel("管理后台 - 动态表单更新 Request VO") | 7 | +@Schema(title = "管理后台 - 动态表单更新 Request VO") |
| 9 | @Data | 8 | @Data |
| 10 | @EqualsAndHashCode(callSuper = true) | 9 | @EqualsAndHashCode(callSuper = true) |
| 11 | @ToString(callSuper = true) | 10 | @ToString(callSuper = true) |
| 12 | public class BpmFormUpdateReqVO extends BpmFormBaseVO { | 11 | public class BpmFormUpdateReqVO extends BpmFormBaseVO { |
| 13 | 12 | ||
| 14 | - @ApiModelProperty(value = "表单编号", required = true, example = "1024") | 13 | + @Schema(title = "表单编号", required = true, example = "1024") |
| 15 | @NotNull(message = "表单编号不能为空") | 14 | @NotNull(message = "表单编号不能为空") |
| 16 | private Long id; | 15 | private Long id; |
| 17 | 16 | ||
| 18 | - @ApiModelProperty(value = "表单的配置", required = true, notes = "JSON 字符串") | 17 | + @Schema(title = "表单的配置", required = true, description = "JSON 字符串") |
| 19 | @NotNull(message = "表单的配置不能为空") | 18 | @NotNull(message = "表单的配置不能为空") |
| 20 | private String conf; | 19 | private String conf; |
| 21 | 20 | ||
| 22 | - @ApiModelProperty(value = "表单项的数组", required = true, notes = "JSON 字符串的数组") | 21 | + @Schema(title = "表单项的数组", required = true, description = "JSON 字符串的数组") |
| 23 | @NotNull(message = "表单项的数组不能为空") | 22 | @NotNull(message = "表单项的数组不能为空") |
| 24 | private List<String> fields; | 23 | private List<String> fields; |
| 25 | 24 |
yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/definition/vo/group/BpmUserGroupBaseVO.java
| 1 | package cn.iocoder.yudao.module.bpm.controller.admin.definition.vo.group; | 1 | package cn.iocoder.yudao.module.bpm.controller.admin.definition.vo.group; |
| 2 | - | 2 | +import io.swagger.v3.oas.annotations.media.Schema; |
| 3 | import lombok.*; | 3 | import lombok.*; |
| 4 | import java.util.*; | 4 | import java.util.*; |
| 5 | -import io.swagger.annotations.*; | ||
| 6 | import javax.validation.constraints.*; | 5 | import javax.validation.constraints.*; |
| 7 | 6 | ||
| 8 | /** | 7 | /** |
| @@ -12,19 +11,19 @@ import javax.validation.constraints.*; | @@ -12,19 +11,19 @@ import javax.validation.constraints.*; | ||
| 12 | @Data | 11 | @Data |
| 13 | public class BpmUserGroupBaseVO { | 12 | public class BpmUserGroupBaseVO { |
| 14 | 13 | ||
| 15 | - @ApiModelProperty(value = "组名", required = true, example = "芋道") | 14 | + @Schema(title = "组名", required = true, example = "芋道") |
| 16 | @NotNull(message = "组名不能为空") | 15 | @NotNull(message = "组名不能为空") |
| 17 | private String name; | 16 | private String name; |
| 18 | 17 | ||
| 19 | - @ApiModelProperty(value = "描述", required = true, example = "芋道源码") | 18 | + @Schema(title = "描述", required = true, example = "芋道源码") |
| 20 | @NotNull(message = "描述不能为空") | 19 | @NotNull(message = "描述不能为空") |
| 21 | private String description; | 20 | private String description; |
| 22 | 21 | ||
| 23 | - @ApiModelProperty(value = "成员编号数组", required = true, example = "1,2,3") | 22 | + @Schema(title = "成员编号数组", required = true, example = "1,2,3") |
| 24 | @NotNull(message = "成员编号数组不能为空") | 23 | @NotNull(message = "成员编号数组不能为空") |
| 25 | private Set<Long> memberUserIds; | 24 | private Set<Long> memberUserIds; |
| 26 | 25 | ||
| 27 | - @ApiModelProperty(value = "状态", required = true, example = "1") | 26 | + @Schema(title = "状态", required = true, example = "1") |
| 28 | @NotNull(message = "状态不能为空") | 27 | @NotNull(message = "状态不能为空") |
| 29 | private Integer status; | 28 | private Integer status; |
| 30 | 29 |
yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/definition/vo/group/BpmUserGroupCreateReqVO.java
| 1 | package cn.iocoder.yudao.module.bpm.controller.admin.definition.vo.group; | 1 | package cn.iocoder.yudao.module.bpm.controller.admin.definition.vo.group; |
| 2 | - | 2 | +import io.swagger.v3.oas.annotations.media.Schema; |
| 3 | import lombok.*; | 3 | import lombok.*; |
| 4 | -import io.swagger.annotations.*; | ||
| 5 | 4 | ||
| 6 | -@ApiModel("管理后台 - 用户组创建 Request VO") | 5 | +@Schema(title = "管理后台 - 用户组创建 Request VO") |
| 7 | @Data | 6 | @Data |
| 8 | @EqualsAndHashCode(callSuper = true) | 7 | @EqualsAndHashCode(callSuper = true) |
| 9 | @ToString(callSuper = true) | 8 | @ToString(callSuper = true) |
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; | @@ -2,8 +2,7 @@ package cn.iocoder.yudao.module.bpm.controller.admin.definition.vo.group; | ||
| 2 | 2 | ||
| 3 | import cn.iocoder.yudao.framework.common.pojo.PageParam; | 3 | import cn.iocoder.yudao.framework.common.pojo.PageParam; |
| 4 | import cn.iocoder.yudao.framework.common.util.date.DateUtils; | 4 | import cn.iocoder.yudao.framework.common.util.date.DateUtils; |
| 5 | -import io.swagger.annotations.ApiModel; | ||
| 6 | -import io.swagger.annotations.ApiModelProperty; | 5 | +import io.swagger.v3.oas.annotations.media.Schema; |
| 7 | import lombok.Data; | 6 | import lombok.Data; |
| 8 | import lombok.EqualsAndHashCode; | 7 | import lombok.EqualsAndHashCode; |
| 9 | import lombok.ToString; | 8 | import lombok.ToString; |
| @@ -11,20 +10,20 @@ import org.springframework.format.annotation.DateTimeFormat; | @@ -11,20 +10,20 @@ import org.springframework.format.annotation.DateTimeFormat; | ||
| 11 | 10 | ||
| 12 | import java.time.LocalDateTime; | 11 | import java.time.LocalDateTime; |
| 13 | 12 | ||
| 14 | -@ApiModel("管理后台 - 用户组分页 Request VO") | 13 | +@Schema(title = "管理后台 - 用户组分页 Request VO") |
| 15 | @Data | 14 | @Data |
| 16 | @EqualsAndHashCode(callSuper = true) | 15 | @EqualsAndHashCode(callSuper = true) |
| 17 | @ToString(callSuper = true) | 16 | @ToString(callSuper = true) |
| 18 | public class BpmUserGroupPageReqVO extends PageParam { | 17 | public class BpmUserGroupPageReqVO extends PageParam { |
| 19 | 18 | ||
| 20 | - @ApiModelProperty(value = "组名", example = "芋道") | 19 | + @Schema(title = "组名", example = "芋道") |
| 21 | private String name; | 20 | private String name; |
| 22 | 21 | ||
| 23 | - @ApiModelProperty(value = "状态", example = "1") | 22 | + @Schema(title = "状态", example = "1") |
| 24 | private Integer status; | 23 | private Integer status; |
| 25 | 24 | ||
| 26 | @DateTimeFormat(pattern = DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND) | 25 | @DateTimeFormat(pattern = DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND) |
| 27 | - @ApiModelProperty(value = "创建时间") | 26 | + @Schema(title = "创建时间") |
| 28 | private LocalDateTime[] createTime; | 27 | private LocalDateTime[] createTime; |
| 29 | 28 | ||
| 30 | } | 29 | } |
yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/definition/vo/group/BpmUserGroupRespVO.java
| 1 | package cn.iocoder.yudao.module.bpm.controller.admin.definition.vo.group; | 1 | package cn.iocoder.yudao.module.bpm.controller.admin.definition.vo.group; |
| 2 | - | 2 | +import io.swagger.v3.oas.annotations.media.Schema; |
| 3 | import lombok.*; | 3 | import lombok.*; |
| 4 | 4 | ||
| 5 | import java.time.LocalDateTime; | 5 | import java.time.LocalDateTime; |
| 6 | 6 | ||
| 7 | -import io.swagger.annotations.*; | ||
| 8 | 7 | ||
| 9 | -@ApiModel("管理后台 - 用户组 Response VO") | 8 | +@Schema(title = "管理后台 - 用户组 Response VO") |
| 10 | @Data | 9 | @Data |
| 11 | @EqualsAndHashCode(callSuper = true) | 10 | @EqualsAndHashCode(callSuper = true) |
| 12 | @ToString(callSuper = true) | 11 | @ToString(callSuper = true) |
| 13 | public class BpmUserGroupRespVO extends BpmUserGroupBaseVO { | 12 | public class BpmUserGroupRespVO extends BpmUserGroupBaseVO { |
| 14 | 13 | ||
| 15 | - @ApiModelProperty(value = "编号", required = true, example = "1024") | 14 | + @Schema(title = "编号", required = true, example = "1024") |
| 16 | private Long id; | 15 | private Long id; |
| 17 | 16 | ||
| 18 | - @ApiModelProperty(value = "创建时间", required = true) | 17 | + @Schema(title = "创建时间", required = true) |
| 19 | private LocalDateTime createTime; | 18 | private LocalDateTime createTime; |
| 20 | 19 | ||
| 21 | } | 20 | } |
yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/definition/vo/group/BpmUserGroupSimpleRespVO.java
| 1 | package cn.iocoder.yudao.module.bpm.controller.admin.definition.vo.group; | 1 | package cn.iocoder.yudao.module.bpm.controller.admin.definition.vo.group; |
| 2 | 2 | ||
| 3 | -import io.swagger.annotations.ApiModel; | ||
| 4 | -import io.swagger.annotations.ApiModelProperty; | 3 | +import io.swagger.v3.oas.annotations.media.Schema; |
| 5 | import lombok.AllArgsConstructor; | 4 | import lombok.AllArgsConstructor; |
| 6 | import lombok.Data; | 5 | import lombok.Data; |
| 7 | import lombok.NoArgsConstructor; | 6 | import lombok.NoArgsConstructor; |
| 8 | 7 | ||
| 9 | -@ApiModel("管理后台 - 用户组精简信息 Response VO") | 8 | +@Schema(title = "管理后台 - 用户组精简信息 Response VO") |
| 10 | @Data | 9 | @Data |
| 11 | @NoArgsConstructor | 10 | @NoArgsConstructor |
| 12 | @AllArgsConstructor | 11 | @AllArgsConstructor |
| 13 | public class BpmUserGroupSimpleRespVO { | 12 | public class BpmUserGroupSimpleRespVO { |
| 14 | 13 | ||
| 15 | - @ApiModelProperty(value = "用户组编号", required = true, example = "1024") | 14 | + @Schema(title = "用户组编号", required = true, example = "1024") |
| 16 | private Long id; | 15 | private Long id; |
| 17 | 16 | ||
| 18 | - @ApiModelProperty(value = "用户组名字", required = true, example = "芋道") | 17 | + @Schema(title = "用户组名字", required = true, example = "芋道") |
| 19 | private String name; | 18 | private String name; |
| 20 | 19 | ||
| 21 | } | 20 | } |
yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/definition/vo/group/BpmUserGroupUpdateReqVO.java
| 1 | package cn.iocoder.yudao.module.bpm.controller.admin.definition.vo.group; | 1 | package cn.iocoder.yudao.module.bpm.controller.admin.definition.vo.group; |
| 2 | - | 2 | +import io.swagger.v3.oas.annotations.media.Schema; |
| 3 | import lombok.*; | 3 | import lombok.*; |
| 4 | -import io.swagger.annotations.*; | ||
| 5 | import javax.validation.constraints.*; | 4 | import javax.validation.constraints.*; |
| 6 | 5 | ||
| 7 | -@ApiModel("管理后台 - 用户组更新 Request VO") | 6 | +@Schema(title = "管理后台 - 用户组更新 Request VO") |
| 8 | @Data | 7 | @Data |
| 9 | @EqualsAndHashCode(callSuper = true) | 8 | @EqualsAndHashCode(callSuper = true) |
| 10 | @ToString(callSuper = true) | 9 | @ToString(callSuper = true) |
| 11 | public class BpmUserGroupUpdateReqVO extends BpmUserGroupBaseVO { | 10 | public class BpmUserGroupUpdateReqVO extends BpmUserGroupBaseVO { |
| 12 | 11 | ||
| 13 | - @ApiModelProperty(value = "编号", required = true, example = "1024") | 12 | + @Schema(title = "编号", required = true, example = "1024") |
| 14 | @NotNull(message = "编号不能为空") | 13 | @NotNull(message = "编号不能为空") |
| 15 | private Long id; | 14 | private Long id; |
| 16 | 15 |
yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/definition/vo/model/BpmModeImportReqVO.java
| 1 | package cn.iocoder.yudao.module.bpm.controller.admin.definition.vo.model; | 1 | package cn.iocoder.yudao.module.bpm.controller.admin.definition.vo.model; |
| 2 | 2 | ||
| 3 | -import io.swagger.annotations.ApiModel; | ||
| 4 | -import io.swagger.annotations.ApiModelProperty; | 3 | +import io.swagger.v3.oas.annotations.media.Schema; |
| 5 | import lombok.Data; | 4 | import lombok.Data; |
| 6 | import lombok.EqualsAndHashCode; | 5 | import lombok.EqualsAndHashCode; |
| 7 | import lombok.ToString; | 6 | import lombok.ToString; |
| @@ -9,13 +8,13 @@ import org.springframework.web.multipart.MultipartFile; | @@ -9,13 +8,13 @@ import org.springframework.web.multipart.MultipartFile; | ||
| 9 | 8 | ||
| 10 | import javax.validation.constraints.NotNull; | 9 | import javax.validation.constraints.NotNull; |
| 11 | 10 | ||
| 12 | -@ApiModel(value = "管理后台 - 流程模型的导入 Request VO", description = "相比流程模型的新建来说,只是多了一个 bpmnFile 文件") | 11 | +@Schema(title = "管理后台 - 流程模型的导入 Request VO", description = "相比流程模型的新建来说,只是多了一个 bpmnFile 文件") |
| 13 | @Data | 12 | @Data |
| 14 | @EqualsAndHashCode(callSuper = true) | 13 | @EqualsAndHashCode(callSuper = true) |
| 15 | @ToString(callSuper = true) | 14 | @ToString(callSuper = true) |
| 16 | public class BpmModeImportReqVO extends BpmModelCreateReqVO { | 15 | public class BpmModeImportReqVO extends BpmModelCreateReqVO { |
| 17 | 16 | ||
| 18 | - @ApiModelProperty(value = "BPMN 文件", required = true) | 17 | + @Schema(title = "BPMN 文件", required = true) |
| 19 | @NotNull(message = "BPMN 文件不能为空") | 18 | @NotNull(message = "BPMN 文件不能为空") |
| 20 | private MultipartFile bpmnFile; | 19 | private MultipartFile bpmnFile; |
| 21 | 20 |
yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/definition/vo/model/BpmModelBaseVO.java
| 1 | package cn.iocoder.yudao.module.bpm.controller.admin.definition.vo.model; | 1 | package cn.iocoder.yudao.module.bpm.controller.admin.definition.vo.model; |
| 2 | - | ||
| 3 | -import io.swagger.annotations.ApiModelProperty; | 2 | +import io.swagger.v3.oas.annotations.media.Schema; |
| 4 | import lombok.Data; | 3 | import lombok.Data; |
| 5 | 4 | ||
| 6 | import javax.validation.constraints.NotEmpty; | 5 | import javax.validation.constraints.NotEmpty; |
| @@ -12,30 +11,30 @@ import javax.validation.constraints.NotEmpty; | @@ -12,30 +11,30 @@ import javax.validation.constraints.NotEmpty; | ||
| 12 | @Data | 11 | @Data |
| 13 | public class BpmModelBaseVO { | 12 | public class BpmModelBaseVO { |
| 14 | 13 | ||
| 15 | - @ApiModelProperty(value = "流程标识", required = true, example = "process_yudao") | 14 | + @Schema(title = "流程标识", required = true, example = "process_yudao") |
| 16 | @NotEmpty(message = "流程标识不能为空") | 15 | @NotEmpty(message = "流程标识不能为空") |
| 17 | private String key; | 16 | private String key; |
| 18 | 17 | ||
| 19 | - @ApiModelProperty(value = "流程名称", required = true, example = "芋道") | 18 | + @Schema(title = "流程名称", required = true, example = "芋道") |
| 20 | @NotEmpty(message = "流程名称不能为空") | 19 | @NotEmpty(message = "流程名称不能为空") |
| 21 | private String name; | 20 | private String name; |
| 22 | 21 | ||
| 23 | - @ApiModelProperty(value = "流程描述", example = "我是描述") | 22 | + @Schema(title = "流程描述", example = "我是描述") |
| 24 | private String description; | 23 | private String description; |
| 25 | 24 | ||
| 26 | - @ApiModelProperty(value = "流程分类", notes = "参见 bpm_model_category 数据字典", example = "1") | 25 | + @Schema(title = "流程分类", description = "参见 bpm_model_category 数据字典", example = "1") |
| 27 | @NotEmpty(message = "流程分类不能为空") | 26 | @NotEmpty(message = "流程分类不能为空") |
| 28 | private String category; | 27 | private String category; |
| 29 | 28 | ||
| 30 | - @ApiModelProperty(value = "表单类型", notes = "参见 bpm_model_form_type 数据字典", example = "1") | 29 | + @Schema(title = "表单类型", description = "参见 bpm_model_form_type 数据字典", example = "1") |
| 31 | private Integer formType; | 30 | private Integer formType; |
| 32 | - @ApiModelProperty(value = "表单编号", example = "1024", notes = "在表单类型为 {@link BpmModelFormTypeEnum#CUSTOM} 时,必须非空") | 31 | + @Schema(title = "表单编号", example = "1024", description = "在表单类型为 {@link BpmModelFormTypeEnum#CUSTOM} 时,必须非空") |
| 33 | private Long formId; | 32 | private Long formId; |
| 34 | - @ApiModelProperty(value = "自定义表单的提交路径,使用 Vue 的路由地址", example = "/bpm/oa/leave/create", | ||
| 35 | - notes = "在表单类型为 {@link BpmModelFormTypeEnum#CUSTOM} 时,必须非空") | 33 | + @Schema(title = "自定义表单的提交路径,使用 Vue 的路由地址", example = "/bpm/oa/leave/create", |
| 34 | + description = "在表单类型为 {@link BpmModelFormTypeEnum#CUSTOM} 时,必须非空") | ||
| 36 | private String formCustomCreatePath; | 35 | private String formCustomCreatePath; |
| 37 | - @ApiModelProperty(value = "自定义表单的查看路径,使用 Vue 的路由地址", example = "/bpm/oa/leave/view", | ||
| 38 | - notes = "在表单类型为 {@link BpmModelFormTypeEnum#CUSTOM} 时,必须非空") | 36 | + @Schema(title = "自定义表单的查看路径,使用 Vue 的路由地址", example = "/bpm/oa/leave/view", |
| 37 | + description = "在表单类型为 {@link BpmModelFormTypeEnum#CUSTOM} 时,必须非空") | ||
| 39 | private String formCustomViewPath; | 38 | private String formCustomViewPath; |
| 40 | 39 | ||
| 41 | } | 40 | } |
yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/definition/vo/model/BpmModelCreateReqVO.java
| 1 | package cn.iocoder.yudao.module.bpm.controller.admin.definition.vo.model; | 1 | package cn.iocoder.yudao.module.bpm.controller.admin.definition.vo.model; |
| 2 | 2 | ||
| 3 | -import io.swagger.annotations.ApiModel; | ||
| 4 | -import io.swagger.annotations.ApiModelProperty; | 3 | +import io.swagger.v3.oas.annotations.media.Schema; |
| 5 | import lombok.Data; | 4 | import lombok.Data; |
| 6 | import lombok.EqualsAndHashCode; | 5 | import lombok.EqualsAndHashCode; |
| 7 | import lombok.ToString; | 6 | import lombok.ToString; |
| 8 | 7 | ||
| 9 | import javax.validation.constraints.NotEmpty; | 8 | import javax.validation.constraints.NotEmpty; |
| 10 | 9 | ||
| 11 | -@ApiModel("管理后台 - 流程模型的创建 Request VO") | 10 | +@Schema(title = "管理后台 - 流程模型的创建 Request VO") |
| 12 | @Data | 11 | @Data |
| 13 | public class BpmModelCreateReqVO { | 12 | public class BpmModelCreateReqVO { |
| 14 | 13 | ||
| 15 | - @ApiModelProperty(value = "流程标识", required = true, example = "process_yudao") | 14 | + @Schema(title = "流程标识", required = true, example = "process_yudao") |
| 16 | @NotEmpty(message = "流程标识不能为空") | 15 | @NotEmpty(message = "流程标识不能为空") |
| 17 | private String key; | 16 | private String key; |
| 18 | 17 | ||
| 19 | - @ApiModelProperty(value = "流程名称", required = true, example = "芋道") | 18 | + @Schema(title = "流程名称", required = true, example = "芋道") |
| 20 | @NotEmpty(message = "流程名称不能为空") | 19 | @NotEmpty(message = "流程名称不能为空") |
| 21 | private String name; | 20 | private String name; |
| 22 | 21 | ||
| 23 | - @ApiModelProperty(value = "流程描述", example = "我是描述") | 22 | + @Schema(title = "流程描述", example = "我是描述") |
| 24 | private String description; | 23 | private String description; |
| 25 | 24 | ||
| 26 | } | 25 | } |
yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/definition/vo/model/BpmModelPageItemRespVO.java
| 1 | package cn.iocoder.yudao.module.bpm.controller.admin.definition.vo.model; | 1 | package cn.iocoder.yudao.module.bpm.controller.admin.definition.vo.model; |
| 2 | 2 | ||
| 3 | -import io.swagger.annotations.ApiModel; | ||
| 4 | -import io.swagger.annotations.ApiModelProperty; | 3 | +import io.swagger.v3.oas.annotations.media.Schema; |
| 5 | import lombok.Data; | 4 | import lombok.Data; |
| 6 | import lombok.EqualsAndHashCode; | 5 | import lombok.EqualsAndHashCode; |
| 7 | import lombok.ToString; | 6 | import lombok.ToString; |
| 8 | 7 | ||
| 9 | import java.time.LocalDateTime; | 8 | import java.time.LocalDateTime; |
| 10 | 9 | ||
| 11 | -@ApiModel("管理后台 - 流程模型的分页的每一项 Response VO") | 10 | +@Schema(title = "管理后台 - 流程模型的分页的每一项 Response VO") |
| 12 | @Data | 11 | @Data |
| 13 | @EqualsAndHashCode(callSuper = true) | 12 | @EqualsAndHashCode(callSuper = true) |
| 14 | @ToString(callSuper = true) | 13 | @ToString(callSuper = true) |
| 15 | public class BpmModelPageItemRespVO extends BpmModelBaseVO { | 14 | public class BpmModelPageItemRespVO extends BpmModelBaseVO { |
| 16 | 15 | ||
| 17 | - @ApiModelProperty(value = "编号", required = true, example = "1024") | 16 | + @Schema(title = "编号", required = true, example = "1024") |
| 18 | private String id; | 17 | private String id; |
| 19 | 18 | ||
| 20 | - @ApiModelProperty(value = "表单名字", example = "请假表单") | 19 | + @Schema(title = "表单名字", example = "请假表单") |
| 21 | private String formName; | 20 | private String formName; |
| 22 | 21 | ||
| 23 | - @ApiModelProperty(value = "创建时间", required = true) | 22 | + @Schema(title = "创建时间", required = true) |
| 24 | private LocalDateTime createTime; | 23 | private LocalDateTime createTime; |
| 25 | 24 | ||
| 26 | /** | 25 | /** |
| @@ -28,20 +27,20 @@ public class BpmModelPageItemRespVO extends BpmModelBaseVO { | @@ -28,20 +27,20 @@ public class BpmModelPageItemRespVO extends BpmModelBaseVO { | ||
| 28 | */ | 27 | */ |
| 29 | private ProcessDefinition processDefinition; | 28 | private ProcessDefinition processDefinition; |
| 30 | 29 | ||
| 31 | - @ApiModel("流程定义") | 30 | + @Schema(title = "流程定义") |
| 32 | @Data | 31 | @Data |
| 33 | public static class ProcessDefinition { | 32 | public static class ProcessDefinition { |
| 34 | 33 | ||
| 35 | - @ApiModelProperty(value = "编号", required = true, example = "1024") | 34 | + @Schema(title = "编号", required = true, example = "1024") |
| 36 | private String id; | 35 | private String id; |
| 37 | 36 | ||
| 38 | - @ApiModelProperty(value = "版本", required = true, example = "1") | 37 | + @Schema(title = "版本", required = true, example = "1") |
| 39 | private Integer version; | 38 | private Integer version; |
| 40 | 39 | ||
| 41 | - @ApiModelProperty(value = "部署时间", required = true) | 40 | + @Schema(title = "部署时间", required = true) |
| 42 | private LocalDateTime deploymentTime; | 41 | private LocalDateTime deploymentTime; |
| 43 | 42 | ||
| 44 | - @ApiModelProperty(value = "中断状态", required = true, example = "1", notes = "参见 SuspensionState 枚举") | 43 | + @Schema(title = "中断状态", required = true, example = "1", description = "参见 SuspensionState 枚举") |
| 45 | private Integer suspensionState; | 44 | private Integer suspensionState; |
| 46 | 45 | ||
| 47 | } | 46 | } |
yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/definition/vo/model/BpmModelPageReqVO.java
| 1 | package cn.iocoder.yudao.module.bpm.controller.admin.definition.vo.model; | 1 | package cn.iocoder.yudao.module.bpm.controller.admin.definition.vo.model; |
| 2 | 2 | ||
| 3 | import cn.iocoder.yudao.framework.common.pojo.PageParam; | 3 | import cn.iocoder.yudao.framework.common.pojo.PageParam; |
| 4 | -import io.swagger.annotations.ApiModel; | ||
| 5 | -import io.swagger.annotations.ApiModelProperty; | 4 | +import io.swagger.v3.oas.annotations.media.Schema; |
| 6 | import lombok.Data; | 5 | import lombok.Data; |
| 7 | import lombok.EqualsAndHashCode; | 6 | import lombok.EqualsAndHashCode; |
| 8 | import lombok.ToString; | 7 | import lombok.ToString; |
| 9 | 8 | ||
| 10 | 9 | ||
| 11 | -@ApiModel("管理后台 - 流程模型分页 Request VO") | 10 | +@Schema(title = "管理后台 - 流程模型分页 Request VO") |
| 12 | @Data | 11 | @Data |
| 13 | @EqualsAndHashCode(callSuper = true) | 12 | @EqualsAndHashCode(callSuper = true) |
| 14 | @ToString(callSuper = true) | 13 | @ToString(callSuper = true) |
| 15 | public class BpmModelPageReqVO extends PageParam { | 14 | public class BpmModelPageReqVO extends PageParam { |
| 16 | 15 | ||
| 17 | - @ApiModelProperty(value = "标识", example = "process1641042089407", notes = "精准匹配") | 16 | + @Schema(title = "标识", example = "process1641042089407", description = "精准匹配") |
| 18 | private String key; | 17 | private String key; |
| 19 | 18 | ||
| 20 | - @ApiModelProperty(value = "名字", example = "芋道", notes = "模糊匹配") | 19 | + @Schema(title = "名字", example = "芋道", description = "模糊匹配") |
| 21 | private String name; | 20 | private String name; |
| 22 | 21 | ||
| 23 | - @ApiModelProperty(value = "流程分类", notes = "参见 bpm_model_category 数据字典", example = "1") | 22 | + @Schema(title = "流程分类", description = "参见 bpm_model_category 数据字典", example = "1") |
| 24 | private String category; | 23 | private String category; |
| 25 | 24 | ||
| 26 | } | 25 | } |
yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/definition/vo/model/BpmModelRespVO.java
| 1 | package cn.iocoder.yudao.module.bpm.controller.admin.definition.vo.model; | 1 | package cn.iocoder.yudao.module.bpm.controller.admin.definition.vo.model; |
| 2 | 2 | ||
| 3 | -import io.swagger.annotations.ApiModel; | ||
| 4 | -import io.swagger.annotations.ApiModelProperty; | 3 | +import io.swagger.v3.oas.annotations.media.Schema; |
| 5 | import lombok.Data; | 4 | import lombok.Data; |
| 6 | import lombok.EqualsAndHashCode; | 5 | import lombok.EqualsAndHashCode; |
| 7 | import lombok.ToString; | 6 | import lombok.ToString; |
| 8 | 7 | ||
| 9 | import java.time.LocalDateTime; | 8 | import java.time.LocalDateTime; |
| 10 | 9 | ||
| 11 | -@ApiModel("管理后台 - 流程模型的创建 Request VO") | 10 | +@Schema(title = "管理后台 - 流程模型的创建 Request VO") |
| 12 | @Data | 11 | @Data |
| 13 | @EqualsAndHashCode(callSuper = true) | 12 | @EqualsAndHashCode(callSuper = true) |
| 14 | @ToString(callSuper = true) | 13 | @ToString(callSuper = true) |
| 15 | public class BpmModelRespVO extends BpmModelBaseVO { | 14 | public class BpmModelRespVO extends BpmModelBaseVO { |
| 16 | 15 | ||
| 17 | - @ApiModelProperty(value = "编号", required = true, example = "1024") | 16 | + @Schema(title = "编号", required = true, example = "1024") |
| 18 | private String id; | 17 | private String id; |
| 19 | 18 | ||
| 20 | - @ApiModelProperty(value = "BPMN XML", required = true) | 19 | + @Schema(title = "BPMN XML", required = true) |
| 21 | private String bpmnXml; | 20 | private String bpmnXml; |
| 22 | 21 | ||
| 23 | - @ApiModelProperty(value = "创建时间", required = true) | 22 | + @Schema(title = "创建时间", required = true) |
| 24 | private LocalDateTime createTime; | 23 | private LocalDateTime createTime; |
| 25 | 24 | ||
| 26 | } | 25 | } |
yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/definition/vo/model/BpmModelUpdateReqVO.java
| 1 | package cn.iocoder.yudao.module.bpm.controller.admin.definition.vo.model; | 1 | package cn.iocoder.yudao.module.bpm.controller.admin.definition.vo.model; |
| 2 | 2 | ||
| 3 | -import io.swagger.annotations.ApiModel; | ||
| 4 | -import io.swagger.annotations.ApiModelProperty; | 3 | +import io.swagger.v3.oas.annotations.media.Schema; |
| 5 | import lombok.Data; | 4 | import lombok.Data; |
| 6 | 5 | ||
| 7 | import javax.validation.constraints.NotEmpty; | 6 | import javax.validation.constraints.NotEmpty; |
| 8 | 7 | ||
| 9 | -@ApiModel("管理后台 - 流程模型的更新 Request VO") | 8 | +@Schema(title = "管理后台 - 流程模型的更新 Request VO") |
| 10 | @Data | 9 | @Data |
| 11 | public class BpmModelUpdateReqVO { | 10 | public class BpmModelUpdateReqVO { |
| 12 | 11 | ||
| 13 | - @ApiModelProperty(value = "编号", required = true, example = "1024") | 12 | + @Schema(title = "编号", required = true, example = "1024") |
| 14 | @NotEmpty(message = "编号不能为空") | 13 | @NotEmpty(message = "编号不能为空") |
| 15 | private String id; | 14 | private String id; |
| 16 | 15 | ||
| 17 | - @ApiModelProperty(value = "流程名称", example = "芋道") | 16 | + @Schema(title = "流程名称", example = "芋道") |
| 18 | private String name; | 17 | private String name; |
| 19 | 18 | ||
| 20 | - @ApiModelProperty(value = "流程描述", example = "我是描述") | 19 | + @Schema(title = "流程描述", example = "我是描述") |
| 21 | private String description; | 20 | private String description; |
| 22 | 21 | ||
| 23 | - @ApiModelProperty(value = "流程分类", notes = "参见 bpm_model_category 数据字典", example = "1") | 22 | + @Schema(title = "流程分类", description = "参见 bpm_model_category 数据字典", example = "1") |
| 24 | private String category; | 23 | private String category; |
| 25 | 24 | ||
| 26 | - @ApiModelProperty(value = "BPMN XML", required = true) | 25 | + @Schema(title = "BPMN XML", required = true) |
| 27 | private String bpmnXml; | 26 | private String bpmnXml; |
| 28 | 27 | ||
| 29 | - @ApiModelProperty(value = "表单类型", notes = "参见 bpm_model_form_type 数据字典", example = "1") | 28 | + @Schema(title = "表单类型", description = "参见 bpm_model_form_type 数据字典", example = "1") |
| 30 | private Integer formType; | 29 | private Integer formType; |
| 31 | - @ApiModelProperty(value = "表单编号", example = "1024", notes = "在表单类型为 {@link BpmModelFormTypeEnum#CUSTOM} 时,必须非空") | 30 | + @Schema(title = "表单编号", example = "1024", description = "在表单类型为 {@link BpmModelFormTypeEnum#CUSTOM} 时,必须非空") |
| 32 | private Long formId; | 31 | private Long formId; |
| 33 | - @ApiModelProperty(value = "自定义表单的提交路径,使用 Vue 的路由地址", example = "/bpm/oa/leave/create", | ||
| 34 | - notes = "在表单类型为 {@link BpmModelFormTypeEnum#CUSTOM} 时,必须非空") | 32 | + @Schema(title = "自定义表单的提交路径,使用 Vue 的路由地址", example = "/bpm/oa/leave/create", |
| 33 | + description = "在表单类型为 {@link BpmModelFormTypeEnum#CUSTOM} 时,必须非空") | ||
| 35 | private String formCustomCreatePath; | 34 | private String formCustomCreatePath; |
| 36 | - @ApiModelProperty(value = "自定义表单的查看路径,使用 Vue 的路由地址", example = "/bpm/oa/leave/view", | ||
| 37 | - notes = "在表单类型为 {@link BpmModelFormTypeEnum#CUSTOM} 时,必须非空") | 35 | + @Schema(title = "自定义表单的查看路径,使用 Vue 的路由地址", example = "/bpm/oa/leave/view", |
| 36 | + description = "在表单类型为 {@link BpmModelFormTypeEnum#CUSTOM} 时,必须非空") | ||
| 38 | private String formCustomViewPath; | 37 | private String formCustomViewPath; |
| 39 | 38 | ||
| 40 | } | 39 | } |
yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/definition/vo/model/BpmModelUpdateStateReqVO.java
| 1 | package cn.iocoder.yudao.module.bpm.controller.admin.definition.vo.model; | 1 | package cn.iocoder.yudao.module.bpm.controller.admin.definition.vo.model; |
| 2 | 2 | ||
| 3 | -import io.swagger.annotations.ApiModel; | ||
| 4 | -import io.swagger.annotations.ApiModelProperty; | 3 | +import io.swagger.v3.oas.annotations.media.Schema; |
| 5 | import lombok.Data; | 4 | import lombok.Data; |
| 6 | 5 | ||
| 7 | import javax.validation.constraints.NotNull; | 6 | import javax.validation.constraints.NotNull; |
| 8 | 7 | ||
| 9 | -@ApiModel("管理后台 - 流程模型更新状态 Request VO") | 8 | +@Schema(title = "管理后台 - 流程模型更新状态 Request VO") |
| 10 | @Data | 9 | @Data |
| 11 | public class BpmModelUpdateStateReqVO { | 10 | public class BpmModelUpdateStateReqVO { |
| 12 | 11 | ||
| 13 | - @ApiModelProperty(value = "编号", required = true, example = "1024") | 12 | + @Schema(title = "编号", required = true, example = "1024") |
| 14 | @NotNull(message = "编号不能为空") | 13 | @NotNull(message = "编号不能为空") |
| 15 | private String id; | 14 | private String id; |
| 16 | 15 | ||
| 17 | - @ApiModelProperty(value = "状态", required = true, example = "1", notes = "见 SuspensionState 枚举") | 16 | + @Schema(title = "状态", required = true, example = "1", description = "见 SuspensionState 枚举") |
| 18 | @NotNull(message = "状态不能为空") | 17 | @NotNull(message = "状态不能为空") |
| 19 | private Integer state; | 18 | private Integer state; |
| 20 | 19 |
yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/definition/vo/process/BpmProcessDefinitionListReqVO.java
| 1 | package cn.iocoder.yudao.module.bpm.controller.admin.definition.vo.process; | 1 | package cn.iocoder.yudao.module.bpm.controller.admin.definition.vo.process; |
| 2 | 2 | ||
| 3 | import cn.iocoder.yudao.framework.common.pojo.PageParam; | 3 | import cn.iocoder.yudao.framework.common.pojo.PageParam; |
| 4 | -import io.swagger.annotations.ApiModel; | ||
| 5 | -import io.swagger.annotations.ApiModelProperty; | 4 | +import io.swagger.v3.oas.annotations.media.Schema; |
| 6 | import lombok.Data; | 5 | import lombok.Data; |
| 7 | import lombok.EqualsAndHashCode; | 6 | import lombok.EqualsAndHashCode; |
| 8 | import lombok.ToString; | 7 | import lombok.ToString; |
| 9 | 8 | ||
| 10 | -@ApiModel("管理后台 - 流程定义列表 Request VO") | 9 | +@Schema(title = "管理后台 - 流程定义列表 Request VO") |
| 11 | @Data | 10 | @Data |
| 12 | @ToString(callSuper = true) | 11 | @ToString(callSuper = true) |
| 13 | @EqualsAndHashCode(callSuper = true) | 12 | @EqualsAndHashCode(callSuper = true) |
| 14 | public class BpmProcessDefinitionListReqVO extends PageParam { | 13 | public class BpmProcessDefinitionListReqVO extends PageParam { |
| 15 | 14 | ||
| 16 | - @ApiModelProperty(value = "中断状态", example = "1", notes = "参见 SuspensionState 枚举") | 15 | + @Schema(title = "中断状态", example = "1", description = "参见 SuspensionState 枚举") |
| 17 | private Integer suspensionState; | 16 | private Integer suspensionState; |
| 18 | 17 | ||
| 19 | } | 18 | } |
yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/definition/vo/process/BpmProcessDefinitionPageItemRespVO.java
| 1 | package cn.iocoder.yudao.module.bpm.controller.admin.definition.vo.process; | 1 | package cn.iocoder.yudao.module.bpm.controller.admin.definition.vo.process; |
| 2 | 2 | ||
| 3 | -import io.swagger.annotations.ApiModel; | ||
| 4 | -import io.swagger.annotations.ApiModelProperty; | 3 | +import io.swagger.v3.oas.annotations.media.Schema; |
| 5 | import lombok.Data; | 4 | import lombok.Data; |
| 6 | import lombok.EqualsAndHashCode; | 5 | import lombok.EqualsAndHashCode; |
| 7 | import lombok.ToString; | 6 | import lombok.ToString; |
| 8 | 7 | ||
| 9 | import java.time.LocalDateTime; | 8 | import java.time.LocalDateTime; |
| 10 | 9 | ||
| 11 | -@ApiModel("管理后台 - 流程定义的分页的每一项 Response VO") | 10 | +@Schema(title = "管理后台 - 流程定义的分页的每一项 Response VO") |
| 12 | @Data | 11 | @Data |
| 13 | @EqualsAndHashCode(callSuper = true) | 12 | @EqualsAndHashCode(callSuper = true) |
| 14 | @ToString(callSuper = true) | 13 | @ToString(callSuper = true) |
| 15 | public class BpmProcessDefinitionPageItemRespVO extends BpmProcessDefinitionRespVO { | 14 | public class BpmProcessDefinitionPageItemRespVO extends BpmProcessDefinitionRespVO { |
| 16 | 15 | ||
| 17 | - @ApiModelProperty(value = "表单名字", example = "请假表单") | 16 | + @Schema(title = "表单名字", example = "请假表单") |
| 18 | private String formName; | 17 | private String formName; |
| 19 | 18 | ||
| 20 | - @ApiModelProperty(value = "部署时间", required = true) | 19 | + @Schema(title = "部署时间", required = true) |
| 21 | private LocalDateTime deploymentTime; | 20 | private LocalDateTime deploymentTime; |
| 22 | 21 | ||
| 23 | } | 22 | } |
yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/definition/vo/process/BpmProcessDefinitionPageReqVO.java
| 1 | package cn.iocoder.yudao.module.bpm.controller.admin.definition.vo.process; | 1 | package cn.iocoder.yudao.module.bpm.controller.admin.definition.vo.process; |
| 2 | 2 | ||
| 3 | import cn.iocoder.yudao.framework.common.pojo.PageParam; | 3 | import cn.iocoder.yudao.framework.common.pojo.PageParam; |
| 4 | -import io.swagger.annotations.ApiModel; | ||
| 5 | -import io.swagger.annotations.ApiModelProperty; | 4 | +import io.swagger.v3.oas.annotations.media.Schema; |
| 6 | import lombok.Data; | 5 | import lombok.Data; |
| 7 | import lombok.EqualsAndHashCode; | 6 | import lombok.EqualsAndHashCode; |
| 8 | import lombok.ToString; | 7 | import lombok.ToString; |
| 9 | 8 | ||
| 10 | -@ApiModel("管理后台 - 流程定义分页 Request VO") | 9 | +@Schema(title = "管理后台 - 流程定义分页 Request VO") |
| 11 | @Data | 10 | @Data |
| 12 | @ToString(callSuper = true) | 11 | @ToString(callSuper = true) |
| 13 | @EqualsAndHashCode(callSuper = true) | 12 | @EqualsAndHashCode(callSuper = true) |
| 14 | public class BpmProcessDefinitionPageReqVO extends PageParam { | 13 | public class BpmProcessDefinitionPageReqVO extends PageParam { |
| 15 | 14 | ||
| 16 | - @ApiModelProperty(value = "标识", example = "process1641042089407", notes = "精准匹配") | 15 | + @Schema(title = "标识", example = "process1641042089407", description = "精准匹配") |
| 17 | private String key; | 16 | private String key; |
| 18 | 17 | ||
| 19 | } | 18 | } |
yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/definition/vo/process/BpmProcessDefinitionRespVO.java
| 1 | package cn.iocoder.yudao.module.bpm.controller.admin.definition.vo.process; | 1 | package cn.iocoder.yudao.module.bpm.controller.admin.definition.vo.process; |
| 2 | 2 | ||
| 3 | -import io.swagger.annotations.ApiModel; | ||
| 4 | -import io.swagger.annotations.ApiModelProperty; | 3 | +import io.swagger.v3.oas.annotations.media.Schema; |
| 5 | import lombok.Data; | 4 | import lombok.Data; |
| 6 | 5 | ||
| 7 | import javax.validation.constraints.NotEmpty; | 6 | import javax.validation.constraints.NotEmpty; |
| 8 | import javax.validation.constraints.NotNull; | 7 | import javax.validation.constraints.NotNull; |
| 9 | import java.util.List; | 8 | import java.util.List; |
| 10 | 9 | ||
| 11 | -@ApiModel("管理后台 - 流程定义 Response VO") | 10 | +@Schema(title = "管理后台 - 流程定义 Response VO") |
| 12 | @Data | 11 | @Data |
| 13 | public class BpmProcessDefinitionRespVO { | 12 | public class BpmProcessDefinitionRespVO { |
| 14 | 13 | ||
| 15 | - @ApiModelProperty(value = "编号", required = true, example = "1024") | 14 | + @Schema(title = "编号", required = true, example = "1024") |
| 16 | private String id; | 15 | private String id; |
| 17 | 16 | ||
| 18 | - @ApiModelProperty(value = "版本", required = true, example = "1") | 17 | + @Schema(title = "版本", required = true, example = "1") |
| 19 | private Integer version; | 18 | private Integer version; |
| 20 | 19 | ||
| 21 | - @ApiModelProperty(value = "流程名称", required = true, example = "芋道") | 20 | + @Schema(title = "流程名称", required = true, example = "芋道") |
| 22 | @NotEmpty(message = "流程名称不能为空") | 21 | @NotEmpty(message = "流程名称不能为空") |
| 23 | private String name; | 22 | private String name; |
| 24 | 23 | ||
| 25 | - @ApiModelProperty(value = "流程描述", example = "我是描述") | 24 | + @Schema(title = "流程描述", example = "我是描述") |
| 26 | private String description; | 25 | private String description; |
| 27 | 26 | ||
| 28 | - @ApiModelProperty(value = "流程分类", notes = "参见 bpm_model_category 数据字典", example = "1") | 27 | + @Schema(title = "流程分类", description = "参见 bpm_model_category 数据字典", example = "1") |
| 29 | @NotEmpty(message = "流程分类不能为空") | 28 | @NotEmpty(message = "流程分类不能为空") |
| 30 | private String category; | 29 | private String category; |
| 31 | 30 | ||
| 32 | - @ApiModelProperty(value = "表单类型", notes = "参见 bpm_model_form_type 数据字典", example = "1") | 31 | + @Schema(title = "表单类型", description = "参见 bpm_model_form_type 数据字典", example = "1") |
| 33 | private Integer formType; | 32 | private Integer formType; |
| 34 | - @ApiModelProperty(value = "表单编号", example = "1024", notes = "在表单类型为 {@link BpmModelFormTypeEnum#CUSTOM} 时,必须非空") | 33 | + @Schema(title = "表单编号", example = "1024", description = "在表单类型为 {@link BpmModelFormTypeEnum#CUSTOM} 时,必须非空") |
| 35 | private Long formId; | 34 | private Long formId; |
| 36 | - @ApiModelProperty(value = "表单的配置", required = true, | ||
| 37 | - notes = "JSON 字符串。在表单类型为 {@link BpmModelFormTypeEnum#CUSTOM} 时,必须非空") | 35 | + @Schema(title = "表单的配置", required = true, |
| 36 | + description = "JSON 字符串。在表单类型为 {@link BpmModelFormTypeEnum#CUSTOM} 时,必须非空") | ||
| 38 | private String formConf; | 37 | private String formConf; |
| 39 | - @ApiModelProperty(value = "表单项的数组", required = true, | ||
| 40 | - notes = "JSON 字符串的数组。在表单类型为 {@link BpmModelFormTypeEnum#CUSTOM} 时,必须非空") | 38 | + @Schema(title = "表单项的数组", required = true, |
| 39 | + description = "JSON 字符串的数组。在表单类型为 {@link BpmModelFormTypeEnum#CUSTOM} 时,必须非空") | ||
| 41 | private List<String> formFields; | 40 | private List<String> formFields; |
| 42 | - @ApiModelProperty(value = "自定义表单的提交路径,使用 Vue 的路由地址", example = "/bpm/oa/leave/create", | ||
| 43 | - notes = "在表单类型为 {@link BpmModelFormTypeEnum#CUSTOM} 时,必须非空") | 41 | + @Schema(title = "自定义表单的提交路径,使用 Vue 的路由地址", example = "/bpm/oa/leave/create", |
| 42 | + description = "在表单类型为 {@link BpmModelFormTypeEnum#CUSTOM} 时,必须非空") | ||
| 44 | private String formCustomCreatePath; | 43 | private String formCustomCreatePath; |
| 45 | - @ApiModelProperty(value = "自定义表单的查看路径,使用 Vue 的路由地址", example = "/bpm/oa/leave/view", | ||
| 46 | - notes = "在表单类型为 {@link BpmModelFormTypeEnum#CUSTOM} 时,必须非空") | 44 | + @Schema(title = "自定义表单的查看路径,使用 Vue 的路由地址", example = "/bpm/oa/leave/view", |
| 45 | + description = "在表单类型为 {@link BpmModelFormTypeEnum#CUSTOM} 时,必须非空") | ||
| 47 | private String formCustomViewPath; | 46 | private String formCustomViewPath; |
| 48 | 47 | ||
| 49 | - @ApiModelProperty(value = "中断状态", required = true, example = "1", notes = "参见 SuspensionState 枚举") | 48 | + @Schema(title = "中断状态", required = true, example = "1", description = "参见 SuspensionState 枚举") |
| 50 | private Integer suspensionState; | 49 | private Integer suspensionState; |
| 51 | 50 | ||
| 52 | } | 51 | } |
yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/definition/vo/rule/BpmTaskAssignRuleBaseVO.java
| 1 | package cn.iocoder.yudao.module.bpm.controller.admin.definition.vo.rule; | 1 | package cn.iocoder.yudao.module.bpm.controller.admin.definition.vo.rule; |
| 2 | - | ||
| 3 | -import io.swagger.annotations.ApiModelProperty; | 2 | +import io.swagger.v3.oas.annotations.media.Schema; |
| 4 | import lombok.Data; | 3 | import lombok.Data; |
| 5 | 4 | ||
| 6 | import javax.validation.constraints.NotEmpty; | 5 | import javax.validation.constraints.NotEmpty; |
| @@ -14,11 +13,11 @@ import java.util.Set; | @@ -14,11 +13,11 @@ import java.util.Set; | ||
| 14 | @Data | 13 | @Data |
| 15 | public class BpmTaskAssignRuleBaseVO { | 14 | public class BpmTaskAssignRuleBaseVO { |
| 16 | 15 | ||
| 17 | - @ApiModelProperty(value = "规则类型", required = true, example = "bpm_task_assign_rule_type") | 16 | + @Schema(title = "规则类型", required = true, example = "bpm_task_assign_rule_type") |
| 18 | @NotNull(message = "规则类型不能为空") | 17 | @NotNull(message = "规则类型不能为空") |
| 19 | private Integer type; | 18 | private Integer type; |
| 20 | 19 | ||
| 21 | - @ApiModelProperty(value = "规则值数组", required = true, example = "1,2,3") | 20 | + @Schema(title = "规则值数组", required = true, example = "1,2,3") |
| 22 | @NotNull(message = "规则值数组不能为空") | 21 | @NotNull(message = "规则值数组不能为空") |
| 23 | private Set<Long> options; | 22 | private Set<Long> options; |
| 24 | 23 |
yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/definition/vo/rule/BpmTaskAssignRuleCreateReqVO.java
| 1 | package cn.iocoder.yudao.module.bpm.controller.admin.definition.vo.rule; | 1 | package cn.iocoder.yudao.module.bpm.controller.admin.definition.vo.rule; |
| 2 | 2 | ||
| 3 | -import io.swagger.annotations.ApiModel; | ||
| 4 | -import io.swagger.annotations.ApiModelProperty; | 3 | +import io.swagger.v3.oas.annotations.media.Schema; |
| 5 | import lombok.Data; | 4 | import lombok.Data; |
| 6 | import lombok.EqualsAndHashCode; | 5 | import lombok.EqualsAndHashCode; |
| 7 | import lombok.ToString; | 6 | import lombok.ToString; |
| 8 | 7 | ||
| 9 | import javax.validation.constraints.NotEmpty; | 8 | import javax.validation.constraints.NotEmpty; |
| 10 | 9 | ||
| 11 | -@ApiModel("管理后台 - 流程任务分配规则的创建 Request VO") | 10 | +@Schema(title = "管理后台 - 流程任务分配规则的创建 Request VO") |
| 12 | @Data | 11 | @Data |
| 13 | @EqualsAndHashCode(callSuper = true) | 12 | @EqualsAndHashCode(callSuper = true) |
| 14 | @ToString(callSuper = true) | 13 | @ToString(callSuper = true) |
| 15 | public class BpmTaskAssignRuleCreateReqVO extends BpmTaskAssignRuleBaseVO { | 14 | public class BpmTaskAssignRuleCreateReqVO extends BpmTaskAssignRuleBaseVO { |
| 16 | 15 | ||
| 17 | - @ApiModelProperty(value = "流程模型的编号", required = true, example = "1024") | 16 | + @Schema(title = "流程模型的编号", required = true, example = "1024") |
| 18 | @NotEmpty(message = "流程模型的编号不能为空") | 17 | @NotEmpty(message = "流程模型的编号不能为空") |
| 19 | private String modelId; | 18 | private String modelId; |
| 20 | 19 | ||
| 21 | - @ApiModelProperty(value = "流程任务定义的编号", required = true, example = "2048") | 20 | + @Schema(title = "流程任务定义的编号", required = true, example = "2048") |
| 22 | @NotEmpty(message = "流程任务定义的编号不能为空") | 21 | @NotEmpty(message = "流程任务定义的编号不能为空") |
| 23 | private String taskDefinitionKey; | 22 | private String taskDefinitionKey; |
| 24 | 23 |
yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/definition/vo/rule/BpmTaskAssignRuleRespVO.java
| 1 | package cn.iocoder.yudao.module.bpm.controller.admin.definition.vo.rule; | 1 | package cn.iocoder.yudao.module.bpm.controller.admin.definition.vo.rule; |
| 2 | 2 | ||
| 3 | -import io.swagger.annotations.ApiModel; | ||
| 4 | -import io.swagger.annotations.ApiModelProperty; | 3 | +import io.swagger.v3.oas.annotations.media.Schema; |
| 5 | import lombok.Data; | 4 | import lombok.Data; |
| 6 | import lombok.EqualsAndHashCode; | 5 | import lombok.EqualsAndHashCode; |
| 7 | import lombok.ToString; | 6 | import lombok.ToString; |
| 8 | 7 | ||
| 9 | -@ApiModel("管理后台 - 流程任务分配规则的 Response VO") | 8 | +@Schema(title = "管理后台 - 流程任务分配规则的 Response VO") |
| 10 | @Data | 9 | @Data |
| 11 | @EqualsAndHashCode(callSuper = true) | 10 | @EqualsAndHashCode(callSuper = true) |
| 12 | @ToString(callSuper = true) | 11 | @ToString(callSuper = true) |
| 13 | public class BpmTaskAssignRuleRespVO extends BpmTaskAssignRuleBaseVO { | 12 | public class BpmTaskAssignRuleRespVO extends BpmTaskAssignRuleBaseVO { |
| 14 | 13 | ||
| 15 | - @ApiModelProperty(value = "任务分配规则的编号", required = true, example = "1024") | 14 | + @Schema(title = "任务分配规则的编号", required = true, example = "1024") |
| 16 | private Long id; | 15 | private Long id; |
| 17 | 16 | ||
| 18 | - @ApiModelProperty(value = "流程模型的编号", required = true, example = "2048") | 17 | + @Schema(title = "流程模型的编号", required = true, example = "2048") |
| 19 | private String modelId; | 18 | private String modelId; |
| 20 | 19 | ||
| 21 | - @ApiModelProperty(value = "流程定义的编号", required = true, example = "4096") | 20 | + @Schema(title = "流程定义的编号", required = true, example = "4096") |
| 22 | private String processDefinitionId; | 21 | private String processDefinitionId; |
| 23 | 22 | ||
| 24 | - @ApiModelProperty(value = "流程任务定义的编号", required = true, example = "2048") | 23 | + @Schema(title = "流程任务定义的编号", required = true, example = "2048") |
| 25 | private String taskDefinitionKey; | 24 | private String taskDefinitionKey; |
| 26 | - @ApiModelProperty(value = "流程任务定义的名字", required = true, example = "关注芋道") | 25 | + @Schema(title = "流程任务定义的名字", required = true, example = "关注芋道") |
| 27 | private String taskDefinitionName; | 26 | private String taskDefinitionName; |
| 28 | 27 | ||
| 29 | } | 28 | } |
yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/definition/vo/rule/BpmTaskAssignRuleUpdateReqVO.java
| 1 | package cn.iocoder.yudao.module.bpm.controller.admin.definition.vo.rule; | 1 | package cn.iocoder.yudao.module.bpm.controller.admin.definition.vo.rule; |
| 2 | 2 | ||
| 3 | -import io.swagger.annotations.ApiModel; | ||
| 4 | -import io.swagger.annotations.ApiModelProperty; | 3 | +import io.swagger.v3.oas.annotations.media.Schema; |
| 5 | import lombok.Data; | 4 | import lombok.Data; |
| 6 | import lombok.EqualsAndHashCode; | 5 | import lombok.EqualsAndHashCode; |
| 7 | import lombok.ToString; | 6 | import lombok.ToString; |
| 8 | 7 | ||
| 9 | import javax.validation.constraints.NotNull; | 8 | import javax.validation.constraints.NotNull; |
| 10 | 9 | ||
| 11 | -@ApiModel("管理后台 - 流程任务分配规则的更新 Request VO") | 10 | +@Schema(title = "管理后台 - 流程任务分配规则的更新 Request VO") |
| 12 | @Data | 11 | @Data |
| 13 | @EqualsAndHashCode(callSuper = true) | 12 | @EqualsAndHashCode(callSuper = true) |
| 14 | @ToString(callSuper = true) | 13 | @ToString(callSuper = true) |
| 15 | public class BpmTaskAssignRuleUpdateReqVO extends BpmTaskAssignRuleBaseVO { | 14 | public class BpmTaskAssignRuleUpdateReqVO extends BpmTaskAssignRuleBaseVO { |
| 16 | 15 | ||
| 17 | - @ApiModelProperty(value = "任务分配规则的编号", required = true, example = "1024") | 16 | + @Schema(title = "任务分配规则的编号", required = true, example = "1024") |
| 18 | @NotNull(message = "任务分配规则的编号不能为空") | 17 | @NotNull(message = "任务分配规则的编号不能为空") |
| 19 | private Long id; | 18 | private Long id; |
| 20 | 19 |
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; | @@ -8,9 +8,9 @@ import cn.iocoder.yudao.module.bpm.dal.dataobject.oa.BpmOALeaveDO; | ||
| 8 | import cn.iocoder.yudao.framework.common.pojo.CommonResult; | 8 | import cn.iocoder.yudao.framework.common.pojo.CommonResult; |
| 9 | import cn.iocoder.yudao.framework.common.pojo.PageResult; | 9 | import cn.iocoder.yudao.framework.common.pojo.PageResult; |
| 10 | import cn.iocoder.yudao.module.bpm.service.oa.BpmOALeaveService; | 10 | import cn.iocoder.yudao.module.bpm.service.oa.BpmOALeaveService; |
| 11 | -import io.swagger.annotations.Api; | ||
| 12 | -import io.swagger.annotations.ApiImplicitParam; | ||
| 13 | -import io.swagger.annotations.ApiOperation; | 11 | +import io.swagger.v3.oas.annotations.tags.Tag; |
| 12 | +import io.swagger.v3.oas.annotations.Parameter; | ||
| 13 | +import io.swagger.v3.oas.annotations.Operation; | ||
| 14 | import org.springframework.security.access.prepost.PreAuthorize; | 14 | import org.springframework.security.access.prepost.PreAuthorize; |
| 15 | import org.springframework.validation.annotation.Validated; | 15 | import org.springframework.validation.annotation.Validated; |
| 16 | import org.springframework.web.bind.annotation.*; | 16 | import org.springframework.web.bind.annotation.*; |
| @@ -27,7 +27,7 @@ import static cn.iocoder.yudao.framework.security.core.util.SecurityFrameworkUti | @@ -27,7 +27,7 @@ import static cn.iocoder.yudao.framework.security.core.util.SecurityFrameworkUti | ||
| 27 | * @author jason | 27 | * @author jason |
| 28 | * @author 芋道源码 | 28 | * @author 芋道源码 |
| 29 | */ | 29 | */ |
| 30 | -@Api(tags = "管理后台 - OA 请假申请") | 30 | +@Tag(name = "管理后台 - OA 请假申请") |
| 31 | @RestController | 31 | @RestController |
| 32 | @RequestMapping("/bpm/oa/leave") | 32 | @RequestMapping("/bpm/oa/leave") |
| 33 | @Validated | 33 | @Validated |
| @@ -38,15 +38,15 @@ public class BpmOALeaveController { | @@ -38,15 +38,15 @@ public class BpmOALeaveController { | ||
| 38 | 38 | ||
| 39 | @PostMapping("/create") | 39 | @PostMapping("/create") |
| 40 | @PreAuthorize("@ss.hasPermission('bpm:oa-leave:create')") | 40 | @PreAuthorize("@ss.hasPermission('bpm:oa-leave:create')") |
| 41 | - @ApiOperation("创建请求申请") | 41 | + @Operation(summary = "创建请求申请") |
| 42 | public CommonResult<Long> createLeave(@Valid @RequestBody BpmOALeaveCreateReqVO createReqVO) { | 42 | public CommonResult<Long> createLeave(@Valid @RequestBody BpmOALeaveCreateReqVO createReqVO) { |
| 43 | return success(leaveService.createLeave(getLoginUserId(), createReqVO)); | 43 | return success(leaveService.createLeave(getLoginUserId(), createReqVO)); |
| 44 | } | 44 | } |
| 45 | 45 | ||
| 46 | @GetMapping("/get") | 46 | @GetMapping("/get") |
| 47 | @PreAuthorize("@ss.hasPermission('bpm:oa-leave:query')") | 47 | @PreAuthorize("@ss.hasPermission('bpm:oa-leave:query')") |
| 48 | - @ApiOperation("获得请假申请") | ||
| 49 | - @ApiImplicitParam(name = "id", value = "编号", required = true, example = "1024", dataTypeClass = Long.class) | 48 | + @Operation(summary = "获得请假申请") |
| 49 | + @Parameter(name = "id", description = "编号", required = true, example = "1024") | ||
| 50 | public CommonResult<BpmOALeaveRespVO> getLeave(@RequestParam("id") Long id) { | 50 | public CommonResult<BpmOALeaveRespVO> getLeave(@RequestParam("id") Long id) { |
| 51 | BpmOALeaveDO leave = leaveService.getLeave(id); | 51 | BpmOALeaveDO leave = leaveService.getLeave(id); |
| 52 | return success(BpmOALeaveConvert.INSTANCE.convert(leave)); | 52 | return success(BpmOALeaveConvert.INSTANCE.convert(leave)); |
| @@ -54,7 +54,7 @@ public class BpmOALeaveController { | @@ -54,7 +54,7 @@ public class BpmOALeaveController { | ||
| 54 | 54 | ||
| 55 | @GetMapping("/page") | 55 | @GetMapping("/page") |
| 56 | @PreAuthorize("@ss.hasPermission('bpm:oa-leave:query')") | 56 | @PreAuthorize("@ss.hasPermission('bpm:oa-leave:query')") |
| 57 | - @ApiOperation("获得请假申请分页") | 57 | + @Operation(summary = "获得请假申请分页") |
| 58 | public CommonResult<PageResult<BpmOALeaveRespVO>> getLeavePage(@Valid BpmOALeavePageReqVO pageVO) { | 58 | public CommonResult<PageResult<BpmOALeaveRespVO>> getLeavePage(@Valid BpmOALeavePageReqVO pageVO) { |
| 59 | PageResult<BpmOALeaveDO> pageResult = leaveService.getLeavePage(getLoginUserId(), pageVO); | 59 | PageResult<BpmOALeaveDO> pageResult = leaveService.getLeavePage(getLoginUserId(), pageVO); |
| 60 | return success(BpmOALeaveConvert.INSTANCE.convertPage(pageResult)); | 60 | return success(BpmOALeaveConvert.INSTANCE.convertPage(pageResult)); |
yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/oa/vo/BpmOALeaveBaseVO.java
| 1 | package cn.iocoder.yudao.module.bpm.controller.admin.oa.vo; | 1 | package cn.iocoder.yudao.module.bpm.controller.admin.oa.vo; |
| 2 | - | 2 | +import io.swagger.v3.oas.annotations.media.Schema; |
| 3 | import lombok.*; | 3 | import lombok.*; |
| 4 | import java.time.LocalDateTime; | 4 | import java.time.LocalDateTime; |
| 5 | -import io.swagger.annotations.*; | ||
| 6 | import javax.validation.constraints.*; | 5 | import javax.validation.constraints.*; |
| 7 | import org.springframework.format.annotation.DateTimeFormat; | 6 | import org.springframework.format.annotation.DateTimeFormat; |
| 8 | 7 | ||
| @@ -15,19 +14,19 @@ import static cn.iocoder.yudao.framework.common.util.date.DateUtils.FORMAT_YEAR_ | @@ -15,19 +14,19 @@ import static cn.iocoder.yudao.framework.common.util.date.DateUtils.FORMAT_YEAR_ | ||
| 15 | @Data | 14 | @Data |
| 16 | public class BpmOALeaveBaseVO { | 15 | public class BpmOALeaveBaseVO { |
| 17 | 16 | ||
| 18 | - @ApiModelProperty(value = "请假的开始时间", required = true) | 17 | + @Schema(title = "请假的开始时间", required = true) |
| 19 | @NotNull(message = "开始时间不能为空") | 18 | @NotNull(message = "开始时间不能为空") |
| 20 | @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND) | 19 | @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND) |
| 21 | private LocalDateTime startTime; | 20 | private LocalDateTime startTime; |
| 22 | - @ApiModelProperty(value = "请假的结束时间", required = true) | 21 | + @Schema(title = "请假的结束时间", required = true) |
| 23 | @NotNull(message = "结束时间不能为空") | 22 | @NotNull(message = "结束时间不能为空") |
| 24 | @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND) | 23 | @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND) |
| 25 | private LocalDateTime endTime; | 24 | private LocalDateTime endTime; |
| 26 | 25 | ||
| 27 | - @ApiModelProperty(value = "请假类型", required = true, example = "1", notes = "参见 bpm_oa_type 枚举") | 26 | + @Schema(title = "请假类型", required = true, example = "1", description = "参见 bpm_oa_type 枚举") |
| 28 | private Integer type; | 27 | private Integer type; |
| 29 | 28 | ||
| 30 | - @ApiModelProperty(value = "原因", required = true, example = "阅读芋道源码") | 29 | + @Schema(title = "原因", required = true, example = "阅读芋道源码") |
| 31 | private String reason; | 30 | private String reason; |
| 32 | 31 | ||
| 33 | } | 32 | } |
yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/oa/vo/BpmOALeaveCreateReqVO.java
| 1 | package cn.iocoder.yudao.module.bpm.controller.admin.oa.vo; | 1 | package cn.iocoder.yudao.module.bpm.controller.admin.oa.vo; |
| 2 | - | ||
| 3 | -import io.swagger.annotations.ApiModel; | 2 | +import io.swagger.v3.oas.annotations.media.Schema; |
| 4 | import lombok.Data; | 3 | import lombok.Data; |
| 5 | import lombok.EqualsAndHashCode; | 4 | import lombok.EqualsAndHashCode; |
| 6 | import lombok.ToString; | 5 | import lombok.ToString; |
| 7 | 6 | ||
| 8 | import javax.validation.constraints.AssertTrue; | 7 | import javax.validation.constraints.AssertTrue; |
| 9 | 8 | ||
| 10 | -@ApiModel("管理后台 - 请假申请创建 Request VO") | 9 | +@Schema(title = "管理后台 - 请假申请创建 Request VO") |
| 11 | @Data | 10 | @Data |
| 12 | @EqualsAndHashCode(callSuper = true) | 11 | @EqualsAndHashCode(callSuper = true) |
| 13 | @ToString(callSuper = true) | 12 | @ToString(callSuper = true) |
yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/oa/vo/BpmOALeavePageReqVO.java
| 1 | package cn.iocoder.yudao.module.bpm.controller.admin.oa.vo; | 1 | package cn.iocoder.yudao.module.bpm.controller.admin.oa.vo; |
| 2 | - | 2 | +import io.swagger.v3.oas.annotations.media.Schema; |
| 3 | import lombok.*; | 3 | import lombok.*; |
| 4 | import java.time.LocalDateTime; | 4 | import java.time.LocalDateTime; |
| 5 | -import io.swagger.annotations.*; | ||
| 6 | import cn.iocoder.yudao.framework.common.pojo.PageParam; | 5 | import cn.iocoder.yudao.framework.common.pojo.PageParam; |
| 7 | import org.springframework.format.annotation.DateTimeFormat; | 6 | import org.springframework.format.annotation.DateTimeFormat; |
| 8 | 7 | ||
| 9 | import static cn.iocoder.yudao.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND; | 8 | import static cn.iocoder.yudao.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND; |
| 10 | 9 | ||
| 11 | -@ApiModel("管理后台 - 请假申请分页 Request VO") | 10 | +@Schema(title = "管理后台 - 请假申请分页 Request VO") |
| 12 | @Data | 11 | @Data |
| 13 | @EqualsAndHashCode(callSuper = true) | 12 | @EqualsAndHashCode(callSuper = true) |
| 14 | @ToString(callSuper = true) | 13 | @ToString(callSuper = true) |
| 15 | public class BpmOALeavePageReqVO extends PageParam { | 14 | public class BpmOALeavePageReqVO extends PageParam { |
| 16 | 15 | ||
| 17 | - @ApiModelProperty(value = "状态", example = "1", notes = "参见 bpm_process_instance_result 枚举") | 16 | + @Schema(title = "状态", example = "1", description = "参见 bpm_process_instance_result 枚举") |
| 18 | private Integer result; | 17 | private Integer result; |
| 19 | 18 | ||
| 20 | - @ApiModelProperty(value = "请假类型", example = "1", notes = "参见 bpm_oa_type") | 19 | + @Schema(title = "请假类型", example = "1", description = "参见 bpm_oa_type") |
| 21 | private Integer type; | 20 | private Integer type; |
| 22 | 21 | ||
| 23 | - @ApiModelProperty(value = "原因", example = "阅读芋道源码", notes = "模糊匹配") | 22 | + @Schema(title = "原因", example = "阅读芋道源码", description = "模糊匹配") |
| 24 | private String reason; | 23 | private String reason; |
| 25 | 24 | ||
| 26 | @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND) | 25 | @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND) |
| 27 | - @ApiModelProperty(value = "申请时间") | 26 | + @Schema(title = "申请时间") |
| 28 | private LocalDateTime[] createTime; | 27 | private LocalDateTime[] createTime; |
| 29 | 28 | ||
| 30 | } | 29 | } |
yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/oa/vo/BpmOALeaveRespVO.java
| 1 | package cn.iocoder.yudao.module.bpm.controller.admin.oa.vo; | 1 | package cn.iocoder.yudao.module.bpm.controller.admin.oa.vo; |
| 2 | - | 2 | +import io.swagger.v3.oas.annotations.media.Schema; |
| 3 | import lombok.*; | 3 | import lombok.*; |
| 4 | -import io.swagger.annotations.*; | ||
| 5 | import org.springframework.format.annotation.DateTimeFormat; | 4 | import org.springframework.format.annotation.DateTimeFormat; |
| 6 | 5 | ||
| 7 | import javax.validation.constraints.NotNull; | 6 | import javax.validation.constraints.NotNull; |
| @@ -9,24 +8,24 @@ import java.time.LocalDateTime; | @@ -9,24 +8,24 @@ import java.time.LocalDateTime; | ||
| 9 | 8 | ||
| 10 | import static cn.iocoder.yudao.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND; | 9 | import static cn.iocoder.yudao.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND; |
| 11 | 10 | ||
| 12 | -@ApiModel("管理后台 - 请假申请 Response VO") | 11 | +@Schema(title = "管理后台 - 请假申请 Response VO") |
| 13 | @Data | 12 | @Data |
| 14 | @EqualsAndHashCode(callSuper = true) | 13 | @EqualsAndHashCode(callSuper = true) |
| 15 | @ToString(callSuper = true) | 14 | @ToString(callSuper = true) |
| 16 | public class BpmOALeaveRespVO extends BpmOALeaveBaseVO { | 15 | public class BpmOALeaveRespVO extends BpmOALeaveBaseVO { |
| 17 | 16 | ||
| 18 | - @ApiModelProperty(value = "请假表单主键", required = true, example = "1024") | 17 | + @Schema(title = "请假表单主键", required = true, example = "1024") |
| 19 | private Long id; | 18 | private Long id; |
| 20 | 19 | ||
| 21 | - @ApiModelProperty(value = "状态", required = true, example = "1", notes = "参见 bpm_process_instance_result 枚举") | 20 | + @Schema(title = "状态", required = true, example = "1", description = "参见 bpm_process_instance_result 枚举") |
| 22 | private Integer result; | 21 | private Integer result; |
| 23 | 22 | ||
| 24 | - @ApiModelProperty(value = "申请时间", required = true) | 23 | + @Schema(title = "申请时间", required = true) |
| 25 | @NotNull(message = "申请时间不能为空") | 24 | @NotNull(message = "申请时间不能为空") |
| 26 | @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND) | 25 | @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND) |
| 27 | private LocalDateTime createTime; | 26 | private LocalDateTime createTime; |
| 28 | 27 | ||
| 29 | - @ApiModelProperty(value = "流程id") | 28 | + @Schema(title = "流程id") |
| 30 | private String processInstanceId; | 29 | private String processInstanceId; |
| 31 | 30 | ||
| 32 | } | 31 | } |
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; | @@ -3,9 +3,9 @@ package cn.iocoder.yudao.module.bpm.controller.admin.task; | ||
| 3 | import cn.iocoder.yudao.framework.common.pojo.CommonResult; | 3 | import cn.iocoder.yudao.framework.common.pojo.CommonResult; |
| 4 | import cn.iocoder.yudao.module.bpm.controller.admin.task.vo.activity.BpmActivityRespVO; | 4 | import cn.iocoder.yudao.module.bpm.controller.admin.task.vo.activity.BpmActivityRespVO; |
| 5 | import cn.iocoder.yudao.module.bpm.service.task.BpmActivityService; | 5 | import cn.iocoder.yudao.module.bpm.service.task.BpmActivityService; |
| 6 | -import io.swagger.annotations.Api; | ||
| 7 | -import io.swagger.annotations.ApiImplicitParam; | ||
| 8 | -import io.swagger.annotations.ApiOperation; | 6 | +import io.swagger.v3.oas.annotations.tags.Tag; |
| 7 | +import io.swagger.v3.oas.annotations.Parameter; | ||
| 8 | +import io.swagger.v3.oas.annotations.Operation; | ||
| 9 | import org.springframework.security.access.prepost.PreAuthorize; | 9 | import org.springframework.security.access.prepost.PreAuthorize; |
| 10 | import org.springframework.validation.annotation.Validated; | 10 | import org.springframework.validation.annotation.Validated; |
| 11 | import org.springframework.web.bind.annotation.GetMapping; | 11 | import org.springframework.web.bind.annotation.GetMapping; |
| @@ -18,7 +18,7 @@ import java.util.List; | @@ -18,7 +18,7 @@ import java.util.List; | ||
| 18 | 18 | ||
| 19 | import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success; | 19 | import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success; |
| 20 | 20 | ||
| 21 | -@Api(tags = "管理后台 - 流程活动实例") | 21 | +@Tag(name = "管理后台 - 流程活动实例") |
| 22 | @RestController | 22 | @RestController |
| 23 | @RequestMapping("/bpm/activity") | 23 | @RequestMapping("/bpm/activity") |
| 24 | @Validated | 24 | @Validated |
| @@ -28,9 +28,9 @@ public class BpmActivityController { | @@ -28,9 +28,9 @@ public class BpmActivityController { | ||
| 28 | private BpmActivityService activityService; | 28 | private BpmActivityService activityService; |
| 29 | 29 | ||
| 30 | @GetMapping("/list") | 30 | @GetMapping("/list") |
| 31 | - @ApiOperation(value = "生成指定流程实例的高亮流程图", | ||
| 32 | - notes = "只高亮进行中的任务。不过要注意,该接口暂时没用,通过前端的 ProcessViewer.vue 界面的 highlightDiagram 方法生成") | ||
| 33 | - @ApiImplicitParam(name = "processInstanceId", value = "流程实例的编号", required = true, dataTypeClass = String.class) | 31 | + @Operation(summary = "生成指定流程实例的高亮流程图", |
| 32 | + description = "只高亮进行中的任务。不过要注意,该接口暂时没用,通过前端的 ProcessViewer.vue 界面的 highlightDiagram 方法生成") | ||
| 33 | + @Parameter(name = "processInstanceId", description = "流程实例的编号", required = true) | ||
| 34 | @PreAuthorize("@ss.hasPermission('bpm:task:query')") | 34 | @PreAuthorize("@ss.hasPermission('bpm:task:query')") |
| 35 | public CommonResult<List<BpmActivityRespVO>> getActivityList( | 35 | public CommonResult<List<BpmActivityRespVO>> getActivityList( |
| 36 | @RequestParam("processInstanceId") String processInstanceId) { | 36 | @RequestParam("processInstanceId") String processInstanceId) { |
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; | @@ -4,9 +4,9 @@ import cn.iocoder.yudao.framework.common.pojo.CommonResult; | ||
| 4 | import cn.iocoder.yudao.framework.common.pojo.PageResult; | 4 | import cn.iocoder.yudao.framework.common.pojo.PageResult; |
| 5 | import cn.iocoder.yudao.module.bpm.controller.admin.task.vo.instance.*; | 5 | import cn.iocoder.yudao.module.bpm.controller.admin.task.vo.instance.*; |
| 6 | import cn.iocoder.yudao.module.bpm.service.task.BpmProcessInstanceService; | 6 | import cn.iocoder.yudao.module.bpm.service.task.BpmProcessInstanceService; |
| 7 | -import io.swagger.annotations.Api; | ||
| 8 | -import io.swagger.annotations.ApiImplicitParam; | ||
| 9 | -import io.swagger.annotations.ApiOperation; | 7 | +import io.swagger.v3.oas.annotations.tags.Tag; |
| 8 | +import io.swagger.v3.oas.annotations.Parameter; | ||
| 9 | +import io.swagger.v3.oas.annotations.Operation; | ||
| 10 | import org.springframework.security.access.prepost.PreAuthorize; | 10 | import org.springframework.security.access.prepost.PreAuthorize; |
| 11 | import org.springframework.validation.annotation.Validated; | 11 | import org.springframework.validation.annotation.Validated; |
| 12 | import org.springframework.web.bind.annotation.*; | 12 | import org.springframework.web.bind.annotation.*; |
| @@ -17,7 +17,7 @@ import javax.validation.Valid; | @@ -17,7 +17,7 @@ import javax.validation.Valid; | ||
| 17 | import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success; | 17 | import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success; |
| 18 | import static cn.iocoder.yudao.framework.security.core.util.SecurityFrameworkUtils.getLoginUserId; | 18 | import static cn.iocoder.yudao.framework.security.core.util.SecurityFrameworkUtils.getLoginUserId; |
| 19 | 19 | ||
| 20 | -@Api(tags = "管理后台 - 流程实例") // 流程实例,通过流程定义创建的一次“申请” | 20 | +@Tag(name = "管理后台 - 流程实例") // 流程实例,通过流程定义创建的一次“申请” |
| 21 | @RestController | 21 | @RestController |
| 22 | @RequestMapping("/bpm/process-instance") | 22 | @RequestMapping("/bpm/process-instance") |
| 23 | @Validated | 23 | @Validated |
| @@ -27,7 +27,7 @@ public class BpmProcessInstanceController { | @@ -27,7 +27,7 @@ public class BpmProcessInstanceController { | ||
| 27 | private BpmProcessInstanceService processInstanceService; | 27 | private BpmProcessInstanceService processInstanceService; |
| 28 | 28 | ||
| 29 | @GetMapping("/my-page") | 29 | @GetMapping("/my-page") |
| 30 | - @ApiOperation(value = "获得我的实例分页列表", notes = "在【我的流程】菜单中,进行调用") | 30 | + @Operation(summary = "获得我的实例分页列表", description = "在【我的流程】菜单中,进行调用") |
| 31 | @PreAuthorize("@ss.hasPermission('bpm:process-instance:query')") | 31 | @PreAuthorize("@ss.hasPermission('bpm:process-instance:query')") |
| 32 | public CommonResult<PageResult<BpmProcessInstancePageItemRespVO>> getMyProcessInstancePage( | 32 | public CommonResult<PageResult<BpmProcessInstancePageItemRespVO>> getMyProcessInstancePage( |
| 33 | @Valid BpmProcessInstanceMyPageReqVO pageReqVO) { | 33 | @Valid BpmProcessInstanceMyPageReqVO pageReqVO) { |
| @@ -35,22 +35,22 @@ public class BpmProcessInstanceController { | @@ -35,22 +35,22 @@ public class BpmProcessInstanceController { | ||
| 35 | } | 35 | } |
| 36 | 36 | ||
| 37 | @PostMapping("/create") | 37 | @PostMapping("/create") |
| 38 | - @ApiOperation("新建流程实例") | 38 | + @Operation(summary = "新建流程实例") |
| 39 | @PreAuthorize("@ss.hasPermission('bpm:process-instance:query')") | 39 | @PreAuthorize("@ss.hasPermission('bpm:process-instance:query')") |
| 40 | public CommonResult<String> createProcessInstance(@Valid @RequestBody BpmProcessInstanceCreateReqVO createReqVO) { | 40 | public CommonResult<String> createProcessInstance(@Valid @RequestBody BpmProcessInstanceCreateReqVO createReqVO) { |
| 41 | return success(processInstanceService.createProcessInstance(getLoginUserId(), createReqVO)); | 41 | return success(processInstanceService.createProcessInstance(getLoginUserId(), createReqVO)); |
| 42 | } | 42 | } |
| 43 | 43 | ||
| 44 | @GetMapping("/get") | 44 | @GetMapping("/get") |
| 45 | - @ApiOperation(value = "获得指定流程实例", notes = "在【流程详细】界面中,进行调用") | ||
| 46 | - @ApiImplicitParam(name = "id", value = "流程实例的编号", required = true, dataTypeClass = String.class) | 45 | + @Operation(summary = "获得指定流程实例", description = "在【流程详细】界面中,进行调用") |
| 46 | + @Parameter(name = "id", description = "流程实例的编号", required = true) | ||
| 47 | @PreAuthorize("@ss.hasPermission('bpm:process-instance:query')") | 47 | @PreAuthorize("@ss.hasPermission('bpm:process-instance:query')") |
| 48 | public CommonResult<BpmProcessInstanceRespVO> getProcessInstance(@RequestParam("id") String id) { | 48 | public CommonResult<BpmProcessInstanceRespVO> getProcessInstance(@RequestParam("id") String id) { |
| 49 | return success(processInstanceService.getProcessInstanceVO(id)); | 49 | return success(processInstanceService.getProcessInstanceVO(id)); |
| 50 | } | 50 | } |
| 51 | 51 | ||
| 52 | @DeleteMapping("/cancel") | 52 | @DeleteMapping("/cancel") |
| 53 | - @ApiOperation(value = "取消流程实例", notes = "撤回发起的流程") | 53 | + @Operation(summary = "取消流程实例", description = "撤回发起的流程") |
| 54 | @PreAuthorize("@ss.hasPermission('bpm:process-instance:cancel')") | 54 | @PreAuthorize("@ss.hasPermission('bpm:process-instance:cancel')") |
| 55 | public CommonResult<Boolean> cancelProcessInstance(@Valid @RequestBody BpmProcessInstanceCancelReqVO cancelReqVO) { | 55 | public CommonResult<Boolean> cancelProcessInstance(@Valid @RequestBody BpmProcessInstanceCancelReqVO cancelReqVO) { |
| 56 | processInstanceService.cancelProcessInstance(getLoginUserId(), cancelReqVO); | 56 | processInstanceService.cancelProcessInstance(getLoginUserId(), cancelReqVO); |
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; | @@ -4,9 +4,9 @@ import cn.iocoder.yudao.framework.common.pojo.CommonResult; | ||
| 4 | import cn.iocoder.yudao.framework.common.pojo.PageResult; | 4 | import cn.iocoder.yudao.framework.common.pojo.PageResult; |
| 5 | import cn.iocoder.yudao.module.bpm.controller.admin.task.vo.task.*; | 5 | import cn.iocoder.yudao.module.bpm.controller.admin.task.vo.task.*; |
| 6 | import cn.iocoder.yudao.module.bpm.service.task.BpmTaskService; | 6 | import cn.iocoder.yudao.module.bpm.service.task.BpmTaskService; |
| 7 | -import io.swagger.annotations.Api; | ||
| 8 | -import io.swagger.annotations.ApiImplicitParam; | ||
| 9 | -import io.swagger.annotations.ApiOperation; | 7 | +import io.swagger.v3.oas.annotations.tags.Tag; |
| 8 | +import io.swagger.v3.oas.annotations.Parameter; | ||
| 9 | +import io.swagger.v3.oas.annotations.Operation; | ||
| 10 | import org.springframework.security.access.prepost.PreAuthorize; | 10 | import org.springframework.security.access.prepost.PreAuthorize; |
| 11 | import org.springframework.validation.annotation.Validated; | 11 | import org.springframework.validation.annotation.Validated; |
| 12 | import org.springframework.web.bind.annotation.*; | 12 | import org.springframework.web.bind.annotation.*; |
| @@ -19,7 +19,7 @@ import java.util.List; | @@ -19,7 +19,7 @@ import java.util.List; | ||
| 19 | import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success; | 19 | import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success; |
| 20 | import static cn.iocoder.yudao.framework.web.core.util.WebFrameworkUtils.getLoginUserId; | 20 | import static cn.iocoder.yudao.framework.web.core.util.WebFrameworkUtils.getLoginUserId; |
| 21 | 21 | ||
| 22 | -@Api(tags = "管理后台 - 流程任务实例") | 22 | +@Tag(name = "管理后台 - 流程任务实例") |
| 23 | @RestController | 23 | @RestController |
| 24 | @RequestMapping("/bpm/task") | 24 | @RequestMapping("/bpm/task") |
| 25 | @Validated | 25 | @Validated |
| @@ -29,22 +29,22 @@ public class BpmTaskController { | @@ -29,22 +29,22 @@ public class BpmTaskController { | ||
| 29 | private BpmTaskService taskService; | 29 | private BpmTaskService taskService; |
| 30 | 30 | ||
| 31 | @GetMapping("todo-page") | 31 | @GetMapping("todo-page") |
| 32 | - @ApiOperation("获取 Todo 待办任务分页") | 32 | + @Operation(summary = "获取 Todo 待办任务分页") |
| 33 | @PreAuthorize("@ss.hasPermission('bpm:task:query')") | 33 | @PreAuthorize("@ss.hasPermission('bpm:task:query')") |
| 34 | public CommonResult<PageResult<BpmTaskTodoPageItemRespVO>> getTodoTaskPage(@Valid BpmTaskTodoPageReqVO pageVO) { | 34 | public CommonResult<PageResult<BpmTaskTodoPageItemRespVO>> getTodoTaskPage(@Valid BpmTaskTodoPageReqVO pageVO) { |
| 35 | return success(taskService.getTodoTaskPage(getLoginUserId(), pageVO)); | 35 | return success(taskService.getTodoTaskPage(getLoginUserId(), pageVO)); |
| 36 | } | 36 | } |
| 37 | 37 | ||
| 38 | @GetMapping("done-page") | 38 | @GetMapping("done-page") |
| 39 | - @ApiOperation("获取 Done 已办任务分页") | 39 | + @Operation(summary = "获取 Done 已办任务分页") |
| 40 | @PreAuthorize("@ss.hasPermission('bpm:task:query')") | 40 | @PreAuthorize("@ss.hasPermission('bpm:task:query')") |
| 41 | public CommonResult<PageResult<BpmTaskDonePageItemRespVO>> getDoneTaskPage(@Valid BpmTaskDonePageReqVO pageVO) { | 41 | public CommonResult<PageResult<BpmTaskDonePageItemRespVO>> getDoneTaskPage(@Valid BpmTaskDonePageReqVO pageVO) { |
| 42 | return success(taskService.getDoneTaskPage(getLoginUserId(), pageVO)); | 42 | return success(taskService.getDoneTaskPage(getLoginUserId(), pageVO)); |
| 43 | } | 43 | } |
| 44 | 44 | ||
| 45 | @GetMapping("/list-by-process-instance-id") | 45 | @GetMapping("/list-by-process-instance-id") |
| 46 | - @ApiOperation(value = "获得指定流程实例的任务列表", notes = "包括完成的、未完成的") | ||
| 47 | - @ApiImplicitParam(name = "processInstanceId", value = "流程实例的编号", required = true, dataTypeClass = String.class) | 46 | + @Operation(summary = "获得指定流程实例的任务列表", description = "包括完成的、未完成的") |
| 47 | + @Parameter(name = "processInstanceId", description = "流程实例的编号", required = true) | ||
| 48 | @PreAuthorize("@ss.hasPermission('bpm:task:query')") | 48 | @PreAuthorize("@ss.hasPermission('bpm:task:query')") |
| 49 | public CommonResult<List<BpmTaskRespVO>> getTaskListByProcessInstanceId( | 49 | public CommonResult<List<BpmTaskRespVO>> getTaskListByProcessInstanceId( |
| 50 | @RequestParam("processInstanceId") String processInstanceId) { | 50 | @RequestParam("processInstanceId") String processInstanceId) { |
| @@ -52,7 +52,7 @@ public class BpmTaskController { | @@ -52,7 +52,7 @@ public class BpmTaskController { | ||
| 52 | } | 52 | } |
| 53 | 53 | ||
| 54 | @PutMapping("/approve") | 54 | @PutMapping("/approve") |
| 55 | - @ApiOperation("通过任务") | 55 | + @Operation(summary = "通过任务") |
| 56 | @PreAuthorize("@ss.hasPermission('bpm:task:update')") | 56 | @PreAuthorize("@ss.hasPermission('bpm:task:update')") |
| 57 | public CommonResult<Boolean> approveTask(@Valid @RequestBody BpmTaskApproveReqVO reqVO) { | 57 | public CommonResult<Boolean> approveTask(@Valid @RequestBody BpmTaskApproveReqVO reqVO) { |
| 58 | taskService.approveTask(getLoginUserId(), reqVO); | 58 | taskService.approveTask(getLoginUserId(), reqVO); |
| @@ -60,7 +60,7 @@ public class BpmTaskController { | @@ -60,7 +60,7 @@ public class BpmTaskController { | ||
| 60 | } | 60 | } |
| 61 | 61 | ||
| 62 | @PutMapping("/reject") | 62 | @PutMapping("/reject") |
| 63 | - @ApiOperation("不通过任务") | 63 | + @Operation(summary = "不通过任务") |
| 64 | @PreAuthorize("@ss.hasPermission('bpm:task:update')") | 64 | @PreAuthorize("@ss.hasPermission('bpm:task:update')") |
| 65 | public CommonResult<Boolean> rejectTask(@Valid @RequestBody BpmTaskRejectReqVO reqVO) { | 65 | public CommonResult<Boolean> rejectTask(@Valid @RequestBody BpmTaskRejectReqVO reqVO) { |
| 66 | taskService.rejectTask(getLoginUserId(), reqVO); | 66 | taskService.rejectTask(getLoginUserId(), reqVO); |
| @@ -68,7 +68,7 @@ public class BpmTaskController { | @@ -68,7 +68,7 @@ public class BpmTaskController { | ||
| 68 | } | 68 | } |
| 69 | 69 | ||
| 70 | @PutMapping("/update-assignee") | 70 | @PutMapping("/update-assignee") |
| 71 | - @ApiOperation(value = "更新任务的负责人", notes = "用于【流程详情】的【转派】按钮") | 71 | + @Operation(summary = "更新任务的负责人", description = "用于【流程详情】的【转派】按钮") |
| 72 | @PreAuthorize("@ss.hasPermission('bpm:task:update')") | 72 | @PreAuthorize("@ss.hasPermission('bpm:task:update')") |
| 73 | public CommonResult<Boolean> updateTaskAssignee(@Valid @RequestBody BpmTaskUpdateAssigneeReqVO reqVO) { | 73 | public CommonResult<Boolean> updateTaskAssignee(@Valid @RequestBody BpmTaskUpdateAssigneeReqVO reqVO) { |
| 74 | taskService.updateTaskAssignee(getLoginUserId(), reqVO); | 74 | taskService.updateTaskAssignee(getLoginUserId(), reqVO); |
yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/task/vo/activity/BpmActivityRespVO.java
| 1 | package cn.iocoder.yudao.module.bpm.controller.admin.task.vo.activity; | 1 | package cn.iocoder.yudao.module.bpm.controller.admin.task.vo.activity; |
| 2 | 2 | ||
| 3 | -import io.swagger.annotations.ApiModel; | ||
| 4 | -import io.swagger.annotations.ApiModelProperty; | 3 | +import io.swagger.v3.oas.annotations.media.Schema; |
| 5 | import lombok.Data; | 4 | import lombok.Data; |
| 6 | 5 | ||
| 7 | import java.time.LocalDateTime; | 6 | import java.time.LocalDateTime; |
| 8 | 7 | ||
| 9 | -@ApiModel("管理后台 - 流程活动的 Response VO") | 8 | +@Schema(title = "管理后台 - 流程活动的 Response VO") |
| 10 | @Data | 9 | @Data |
| 11 | public class BpmActivityRespVO { | 10 | public class BpmActivityRespVO { |
| 12 | 11 | ||
| 13 | - @ApiModelProperty(value = "流程活动的标识", required = true, example = "1024") | 12 | + @Schema(title = "流程活动的标识", required = true, example = "1024") |
| 14 | private String key; | 13 | private String key; |
| 15 | - @ApiModelProperty(value = "流程活动的类型", required = true, example = "StartEvent") | 14 | + @Schema(title = "流程活动的类型", required = true, example = "StartEvent") |
| 16 | private String type; | 15 | private String type; |
| 17 | 16 | ||
| 18 | - @ApiModelProperty(value = "流程活动的开始时间", required = true) | 17 | + @Schema(title = "流程活动的开始时间", required = true) |
| 19 | private LocalDateTime startTime; | 18 | private LocalDateTime startTime; |
| 20 | - @ApiModelProperty(value = "流程活动的结束时间", required = true) | 19 | + @Schema(title = "流程活动的结束时间", required = true) |
| 21 | private LocalDateTime endTime; | 20 | private LocalDateTime endTime; |
| 22 | 21 | ||
| 23 | - @ApiModelProperty(value = "关联的流程任务的编号", example = "2048", notes = "关联的流程任务,只有 UserTask 等类型才有") | 22 | + @Schema(title = "关联的流程任务的编号", example = "2048", description = "关联的流程任务,只有 UserTask 等类型才有") |
| 24 | private String taskId; | 23 | private String taskId; |
| 25 | 24 | ||
| 26 | } | 25 | } |
yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/task/vo/instance/BpmProcessInstanceCancelReqVO.java
| 1 | package cn.iocoder.yudao.module.bpm.controller.admin.task.vo.instance; | 1 | package cn.iocoder.yudao.module.bpm.controller.admin.task.vo.instance; |
| 2 | 2 | ||
| 3 | -import io.swagger.annotations.ApiModel; | ||
| 4 | -import io.swagger.annotations.ApiModelProperty; | 3 | +import io.swagger.v3.oas.annotations.media.Schema; |
| 5 | import lombok.Data; | 4 | import lombok.Data; |
| 6 | 5 | ||
| 7 | import javax.validation.constraints.NotEmpty; | 6 | import javax.validation.constraints.NotEmpty; |
| 8 | import javax.validation.constraints.NotNull; | 7 | import javax.validation.constraints.NotNull; |
| 9 | import java.util.Map; | 8 | import java.util.Map; |
| 10 | 9 | ||
| 11 | -@ApiModel("管理后台 - 流程实例的取消 Request VO") | 10 | +@Schema(title = "管理后台 - 流程实例的取消 Request VO") |
| 12 | @Data | 11 | @Data |
| 13 | public class BpmProcessInstanceCancelReqVO { | 12 | public class BpmProcessInstanceCancelReqVO { |
| 14 | 13 | ||
| 15 | - @ApiModelProperty(value = "流程实例的编号", required = true, example = "1024") | 14 | + @Schema(title = "流程实例的编号", required = true, example = "1024") |
| 16 | @NotEmpty(message = "流程实例的编号不能为空") | 15 | @NotEmpty(message = "流程实例的编号不能为空") |
| 17 | private String id; | 16 | private String id; |
| 18 | 17 | ||
| 19 | - @ApiModelProperty(value = "取消原因", required = true, example = "不请假了!") | 18 | + @Schema(title = "取消原因", required = true, example = "不请假了!") |
| 20 | @NotEmpty(message = "取消原因不能为空") | 19 | @NotEmpty(message = "取消原因不能为空") |
| 21 | private String reason; | 20 | private String reason; |
| 22 | 21 |
yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/task/vo/instance/BpmProcessInstanceCreateReqVO.java
| 1 | package cn.iocoder.yudao.module.bpm.controller.admin.task.vo.instance; | 1 | package cn.iocoder.yudao.module.bpm.controller.admin.task.vo.instance; |
| 2 | 2 | ||
| 3 | -import io.swagger.annotations.ApiModel; | ||
| 4 | -import io.swagger.annotations.ApiModelProperty; | 3 | +import io.swagger.v3.oas.annotations.media.Schema; |
| 5 | import lombok.Data; | 4 | import lombok.Data; |
| 6 | 5 | ||
| 7 | import javax.validation.constraints.NotEmpty; | 6 | import javax.validation.constraints.NotEmpty; |
| 8 | import java.util.Map; | 7 | import java.util.Map; |
| 9 | 8 | ||
| 10 | -@ApiModel("管理后台 - 流程实例的创建 Request VO") | 9 | +@Schema(title = "管理后台 - 流程实例的创建 Request VO") |
| 11 | @Data | 10 | @Data |
| 12 | public class BpmProcessInstanceCreateReqVO { | 11 | public class BpmProcessInstanceCreateReqVO { |
| 13 | 12 | ||
| 14 | - @ApiModelProperty(value = "流程定义的编号", required = true, example = "1024") | 13 | + @Schema(title = "流程定义的编号", required = true, example = "1024") |
| 15 | @NotEmpty(message = "流程定义编号不能为空") | 14 | @NotEmpty(message = "流程定义编号不能为空") |
| 16 | private String processDefinitionId; | 15 | private String processDefinitionId; |
| 17 | 16 | ||
| 18 | - @ApiModelProperty(value = "变量实例") | 17 | + @Schema(title = "变量实例") |
| 19 | private Map<String, Object> variables; | 18 | private Map<String, Object> variables; |
| 20 | 19 | ||
| 21 | } | 20 | } |
yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/task/vo/instance/BpmProcessInstanceMyPageReqVO.java
| 1 | package cn.iocoder.yudao.module.bpm.controller.admin.task.vo.instance; | 1 | package cn.iocoder.yudao.module.bpm.controller.admin.task.vo.instance; |
| 2 | 2 | ||
| 3 | import cn.iocoder.yudao.framework.common.pojo.PageParam; | 3 | import cn.iocoder.yudao.framework.common.pojo.PageParam; |
| 4 | -import io.swagger.annotations.ApiModel; | ||
| 5 | -import io.swagger.annotations.ApiModelProperty; | 4 | +import io.swagger.v3.oas.annotations.media.Schema; |
| 6 | import lombok.Data; | 5 | import lombok.Data; |
| 7 | import lombok.EqualsAndHashCode; | 6 | import lombok.EqualsAndHashCode; |
| 8 | import lombok.ToString; | 7 | import lombok.ToString; |
| @@ -12,28 +11,28 @@ import java.time.LocalDateTime; | @@ -12,28 +11,28 @@ import java.time.LocalDateTime; | ||
| 12 | 11 | ||
| 13 | import static cn.iocoder.yudao.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND; | 12 | import static cn.iocoder.yudao.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND; |
| 14 | 13 | ||
| 15 | -@ApiModel("管理后台 - 流程实例的分页 Item Response VO") | 14 | +@Schema(title = "管理后台 - 流程实例的分页 Item Response VO") |
| 16 | @Data | 15 | @Data |
| 17 | @EqualsAndHashCode(callSuper = true) | 16 | @EqualsAndHashCode(callSuper = true) |
| 18 | @ToString(callSuper = true) | 17 | @ToString(callSuper = true) |
| 19 | public class BpmProcessInstanceMyPageReqVO extends PageParam { | 18 | public class BpmProcessInstanceMyPageReqVO extends PageParam { |
| 20 | 19 | ||
| 21 | - @ApiModelProperty(value = "流程名称", example = "芋道") | 20 | + @Schema(title = "流程名称", example = "芋道") |
| 22 | private String name; | 21 | private String name; |
| 23 | 22 | ||
| 24 | - @ApiModelProperty(value = "流程定义的编号", example = "2048") | 23 | + @Schema(title = "流程定义的编号", example = "2048") |
| 25 | private String processDefinitionId; | 24 | private String processDefinitionId; |
| 26 | 25 | ||
| 27 | - @ApiModelProperty(value = "流程实例的状态", notes = "参见 bpm_process_instance_status", example = "1") | 26 | + @Schema(title = "流程实例的状态", description = "参见 bpm_process_instance_status", example = "1") |
| 28 | private Integer status; | 27 | private Integer status; |
| 29 | 28 | ||
| 30 | - @ApiModelProperty(value = "流程实例的结果", notes = "参见 bpm_process_instance_result", example = "2") | 29 | + @Schema(title = "流程实例的结果", description = "参见 bpm_process_instance_result", example = "2") |
| 31 | private Integer result; | 30 | private Integer result; |
| 32 | 31 | ||
| 33 | - @ApiModelProperty(value = "流程分类", notes = "参见 bpm_model_category 数据字典", example = "1") | 32 | + @Schema(title = "流程分类", description = "参见 bpm_model_category 数据字典", example = "1") |
| 34 | private String category; | 33 | private String category; |
| 35 | 34 | ||
| 36 | - @ApiModelProperty(value = "创建时间") | 35 | + @Schema(title = "创建时间") |
| 37 | @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND) | 36 | @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND) |
| 38 | private LocalDateTime[] createTime; | 37 | private LocalDateTime[] createTime; |
| 39 | 38 |
yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/task/vo/instance/BpmProcessInstancePageItemRespVO.java
| 1 | package cn.iocoder.yudao.module.bpm.controller.admin.task.vo.instance; | 1 | package cn.iocoder.yudao.module.bpm.controller.admin.task.vo.instance; |
| 2 | 2 | ||
| 3 | -import io.swagger.annotations.ApiModel; | ||
| 4 | -import io.swagger.annotations.ApiModelProperty; | 3 | +import io.swagger.v3.oas.annotations.media.Schema; |
| 5 | import lombok.Data; | 4 | import lombok.Data; |
| 6 | 5 | ||
| 7 | import java.time.LocalDateTime; | 6 | import java.time.LocalDateTime; |
| 8 | import java.util.List; | 7 | import java.util.List; |
| 9 | 8 | ||
| 10 | -@ApiModel("管理后台 - 流程实例的分页 Item Response VO") | 9 | +@Schema(title = "管理后台 - 流程实例的分页 Item Response VO") |
| 11 | @Data | 10 | @Data |
| 12 | public class BpmProcessInstancePageItemRespVO { | 11 | public class BpmProcessInstancePageItemRespVO { |
| 13 | 12 | ||
| 14 | - @ApiModelProperty(value = "流程实例的编号", required = true, example = "1024") | 13 | + @Schema(title = "流程实例的编号", required = true, example = "1024") |
| 15 | private String id; | 14 | private String id; |
| 16 | 15 | ||
| 17 | - @ApiModelProperty(value = "流程名称", required = true, example = "芋道") | 16 | + @Schema(title = "流程名称", required = true, example = "芋道") |
| 18 | private String name; | 17 | private String name; |
| 19 | 18 | ||
| 20 | - @ApiModelProperty(value = "流程定义的编号", required = true, example = "2048") | 19 | + @Schema(title = "流程定义的编号", required = true, example = "2048") |
| 21 | private String processDefinitionId; | 20 | private String processDefinitionId; |
| 22 | 21 | ||
| 23 | - @ApiModelProperty(value = "流程分类", required = true, notes = "参见 bpm_model_category 数据字典", example = "1") | 22 | + @Schema(title = "流程分类", required = true, description = "参见 bpm_model_category 数据字典", example = "1") |
| 24 | private String category; | 23 | private String category; |
| 25 | 24 | ||
| 26 | - @ApiModelProperty(value = "流程实例的状态", required = true, notes = "参见 bpm_process_instance_status", example = "1") | 25 | + @Schema(title = "流程实例的状态", required = true, description = "参见 bpm_process_instance_status", example = "1") |
| 27 | private Integer status; | 26 | private Integer status; |
| 28 | 27 | ||
| 29 | - @ApiModelProperty(value = "流程实例的结果", required = true, notes = "参见 bpm_process_instance_result", example = "2") | 28 | + @Schema(title = "流程实例的结果", required = true, description = "参见 bpm_process_instance_result", example = "2") |
| 30 | private Integer result; | 29 | private Integer result; |
| 31 | 30 | ||
| 32 | - @ApiModelProperty(value = "提交时间", required = true) | 31 | + @Schema(title = "提交时间", required = true) |
| 33 | private LocalDateTime createTime; | 32 | private LocalDateTime createTime; |
| 34 | 33 | ||
| 35 | - @ApiModelProperty(value = "结束时间", required = true) | 34 | + @Schema(title = "结束时间", required = true) |
| 36 | private LocalDateTime endTime; | 35 | private LocalDateTime endTime; |
| 37 | 36 | ||
| 38 | /** | 37 | /** |
| @@ -40,14 +39,14 @@ public class BpmProcessInstancePageItemRespVO { | @@ -40,14 +39,14 @@ public class BpmProcessInstancePageItemRespVO { | ||
| 40 | */ | 39 | */ |
| 41 | private List<Task> tasks; | 40 | private List<Task> tasks; |
| 42 | 41 | ||
| 43 | - @ApiModel("流程任务") | 42 | + @Schema(title = "流程任务") |
| 44 | @Data | 43 | @Data |
| 45 | public static class Task { | 44 | public static class Task { |
| 46 | 45 | ||
| 47 | - @ApiModelProperty(value = "流程任务的编号", required = true, example = "1024") | 46 | + @Schema(title = "流程任务的编号", required = true, example = "1024") |
| 48 | private String id; | 47 | private String id; |
| 49 | 48 | ||
| 50 | - @ApiModelProperty(value = "任务名称", required = true, example = "芋道") | 49 | + @Schema(title = "任务名称", required = true, example = "芋道") |
| 51 | private String name; | 50 | private String name; |
| 52 | 51 | ||
| 53 | } | 52 | } |
yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/task/vo/instance/BpmProcessInstanceRespVO.java
| 1 | package cn.iocoder.yudao.module.bpm.controller.admin.task.vo.instance; | 1 | package cn.iocoder.yudao.module.bpm.controller.admin.task.vo.instance; |
| 2 | 2 | ||
| 3 | -import io.swagger.annotations.ApiModel; | ||
| 4 | -import io.swagger.annotations.ApiModelProperty; | 3 | +import io.swagger.v3.oas.annotations.media.Schema; |
| 5 | import lombok.Data; | 4 | import lombok.Data; |
| 6 | 5 | ||
| 7 | import java.time.LocalDateTime; | 6 | import java.time.LocalDateTime; |
| 8 | import java.util.List; | 7 | import java.util.List; |
| 9 | import java.util.Map; | 8 | import java.util.Map; |
| 10 | 9 | ||
| 11 | -@ApiModel("管理后台 - 流程实例的 Response VO") | 10 | +@Schema(title = "管理后台 - 流程实例的 Response VO") |
| 12 | @Data | 11 | @Data |
| 13 | public class BpmProcessInstanceRespVO { | 12 | public class BpmProcessInstanceRespVO { |
| 14 | 13 | ||
| 15 | - @ApiModelProperty(value = "流程实例的编号", required = true, example = "1024") | 14 | + @Schema(title = "流程实例的编号", required = true, example = "1024") |
| 16 | private String id; | 15 | private String id; |
| 17 | 16 | ||
| 18 | - @ApiModelProperty(value = "流程名称", required = true, example = "芋道") | 17 | + @Schema(title = "流程名称", required = true, example = "芋道") |
| 19 | private String name; | 18 | private String name; |
| 20 | 19 | ||
| 21 | - @ApiModelProperty(value = "流程分类", required = true, notes = "参见 bpm_model_category 数据字典", example = "1") | 20 | + @Schema(title = "流程分类", required = true, description = "参见 bpm_model_category 数据字典", example = "1") |
| 22 | private String category; | 21 | private String category; |
| 23 | 22 | ||
| 24 | - @ApiModelProperty(value = "流程实例的状态", required = true, notes = "参见 bpm_process_instance_status", example = "1") | 23 | + @Schema(title = "流程实例的状态", required = true, description = "参见 bpm_process_instance_status", example = "1") |
| 25 | private Integer status; | 24 | private Integer status; |
| 26 | 25 | ||
| 27 | - @ApiModelProperty(value = "流程实例的结果", required = true, notes = "参见 bpm_process_instance_result", example = "2") | 26 | + @Schema(title = "流程实例的结果", required = true, description = "参见 bpm_process_instance_result", example = "2") |
| 28 | private Integer result; | 27 | private Integer result; |
| 29 | 28 | ||
| 30 | - @ApiModelProperty(value = "提交时间", required = true) | 29 | + @Schema(title = "提交时间", required = true) |
| 31 | private LocalDateTime createTime; | 30 | private LocalDateTime createTime; |
| 32 | 31 | ||
| 33 | - @ApiModelProperty(value = "结束时间", required = true) | 32 | + @Schema(title = "结束时间", required = true) |
| 34 | private LocalDateTime endTime; | 33 | private LocalDateTime endTime; |
| 35 | 34 | ||
| 36 | - @ApiModelProperty(value = "提交的表单值", required = true) | 35 | + @Schema(title = "提交的表单值", required = true) |
| 37 | private Map<String, Object> formVariables; | 36 | private Map<String, Object> formVariables; |
| 38 | 37 | ||
| 39 | - @ApiModelProperty(value = "业务的唯一标识", example = "1", notes = "例如说,请假申请的编号") | 38 | + @Schema(title = "业务的唯一标识", example = "1", description = "例如说,请假申请的编号") |
| 40 | private String businessKey; | 39 | private String businessKey; |
| 41 | 40 | ||
| 42 | /** | 41 | /** |
| @@ -49,47 +48,47 @@ public class BpmProcessInstanceRespVO { | @@ -49,47 +48,47 @@ public class BpmProcessInstanceRespVO { | ||
| 49 | */ | 48 | */ |
| 50 | private ProcessDefinition processDefinition; | 49 | private ProcessDefinition processDefinition; |
| 51 | 50 | ||
| 52 | - @ApiModel("用户信息") | 51 | + @Schema(title = "用户信息") |
| 53 | @Data | 52 | @Data |
| 54 | public static class User { | 53 | public static class User { |
| 55 | 54 | ||
| 56 | - @ApiModelProperty(value = "用户编号", required = true, example = "1") | 55 | + @Schema(title = "用户编号", required = true, example = "1") |
| 57 | private Long id; | 56 | private Long id; |
| 58 | - @ApiModelProperty(value = "用户昵称", required = true, example = "芋艿") | 57 | + @Schema(title = "用户昵称", required = true, example = "芋艿") |
| 59 | private String nickname; | 58 | private String nickname; |
| 60 | 59 | ||
| 61 | - @ApiModelProperty(value = "部门编号", required = true, example = "1") | 60 | + @Schema(title = "部门编号", required = true, example = "1") |
| 62 | private Long deptId; | 61 | private Long deptId; |
| 63 | - @ApiModelProperty(value = "部门名称", required = true, example = "研发部") | 62 | + @Schema(title = "部门名称", required = true, example = "研发部") |
| 64 | private String deptName; | 63 | private String deptName; |
| 65 | 64 | ||
| 66 | } | 65 | } |
| 67 | 66 | ||
| 68 | - @ApiModel("流程定义信息") | 67 | + @Schema(title = "流程定义信息") |
| 69 | @Data | 68 | @Data |
| 70 | public static class ProcessDefinition { | 69 | public static class ProcessDefinition { |
| 71 | 70 | ||
| 72 | - @ApiModelProperty(value = "编号", required = true, example = "1024") | 71 | + @Schema(title = "编号", required = true, example = "1024") |
| 73 | private String id; | 72 | private String id; |
| 74 | 73 | ||
| 75 | - @ApiModelProperty(value = "表单类型", notes = "参见 bpm_model_form_type 数据字典", example = "1") | 74 | + @Schema(title = "表单类型", description = "参见 bpm_model_form_type 数据字典", example = "1") |
| 76 | private Integer formType; | 75 | private Integer formType; |
| 77 | - @ApiModelProperty(value = "表单编号", example = "1024", notes = "在表单类型为 {@link BpmModelFormTypeEnum#CUSTOM} 时,必须非空") | 76 | + @Schema(title = "表单编号", example = "1024", description = "在表单类型为 {@link BpmModelFormTypeEnum#CUSTOM} 时,必须非空") |
| 78 | private Long formId; | 77 | private Long formId; |
| 79 | - @ApiModelProperty(value = "表单的配置", required = true, | ||
| 80 | - notes = "JSON 字符串。在表单类型为 {@link BpmModelFormTypeEnum#CUSTOM} 时,必须非空") | 78 | + @Schema(title = "表单的配置", required = true, |
| 79 | + description = "JSON 字符串。在表单类型为 {@link BpmModelFormTypeEnum#CUSTOM} 时,必须非空") | ||
| 81 | private String formConf; | 80 | private String formConf; |
| 82 | - @ApiModelProperty(value = "表单项的数组", required = true, | ||
| 83 | - notes = "JSON 字符串的数组。在表单类型为 {@link BpmModelFormTypeEnum#CUSTOM} 时,必须非空") | 81 | + @Schema(title = "表单项的数组", required = true, |
| 82 | + description = "JSON 字符串的数组。在表单类型为 {@link BpmModelFormTypeEnum#CUSTOM} 时,必须非空") | ||
| 84 | private List<String> formFields; | 83 | private List<String> formFields; |
| 85 | - @ApiModelProperty(value = "自定义表单的提交路径,使用 Vue 的路由地址", example = "/bpm/oa/leave/create", | ||
| 86 | - notes = "在表单类型为 {@link BpmModelFormTypeEnum#CUSTOM} 时,必须非空") | 84 | + @Schema(title = "自定义表单的提交路径,使用 Vue 的路由地址", example = "/bpm/oa/leave/create", |
| 85 | + description = "在表单类型为 {@link BpmModelFormTypeEnum#CUSTOM} 时,必须非空") | ||
| 87 | private String formCustomCreatePath; | 86 | private String formCustomCreatePath; |
| 88 | - @ApiModelProperty(value = "自定义表单的查看路径,使用 Vue 的路由地址", example = "/bpm/oa/leave/view", | ||
| 89 | - notes = "在表单类型为 {@link BpmModelFormTypeEnum#CUSTOM} 时,必须非空") | 87 | + @Schema(title = "自定义表单的查看路径,使用 Vue 的路由地址", example = "/bpm/oa/leave/view", |
| 88 | + description = "在表单类型为 {@link BpmModelFormTypeEnum#CUSTOM} 时,必须非空") | ||
| 90 | private String formCustomViewPath; | 89 | private String formCustomViewPath; |
| 91 | 90 | ||
| 92 | - @ApiModelProperty(value = "BPMN XML", required = true) | 91 | + @Schema(title = "BPMN XML", required = true) |
| 93 | private String bpmnXml; | 92 | private String bpmnXml; |
| 94 | 93 | ||
| 95 | } | 94 | } |
yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/task/vo/task/BpmTaskApproveReqVO.java
| 1 | package cn.iocoder.yudao.module.bpm.controller.admin.task.vo.task; | 1 | package cn.iocoder.yudao.module.bpm.controller.admin.task.vo.task; |
| 2 | 2 | ||
| 3 | -import io.swagger.annotations.ApiModel; | ||
| 4 | -import io.swagger.annotations.ApiModelProperty; | 3 | +import io.swagger.v3.oas.annotations.media.Schema; |
| 5 | import lombok.Data; | 4 | import lombok.Data; |
| 6 | 5 | ||
| 7 | import javax.validation.constraints.NotEmpty; | 6 | import javax.validation.constraints.NotEmpty; |
| 8 | 7 | ||
| 9 | -@ApiModel("管理后台 - 通过流程任务的 Request VO") | 8 | +@Schema(title = "管理后台 - 通过流程任务的 Request VO") |
| 10 | @Data | 9 | @Data |
| 11 | public class BpmTaskApproveReqVO { | 10 | public class BpmTaskApproveReqVO { |
| 12 | 11 | ||
| 13 | - @ApiModelProperty(value = "任务编号", required = true, example = "1024") | 12 | + @Schema(title = "任务编号", required = true, example = "1024") |
| 14 | @NotEmpty(message = "任务编号不能为空") | 13 | @NotEmpty(message = "任务编号不能为空") |
| 15 | private String id; | 14 | private String id; |
| 16 | 15 | ||
| 17 | - @ApiModelProperty(value = "审批意见", required = true, example = "不错不错!") | 16 | + @Schema(title = "审批意见", required = true, example = "不错不错!") |
| 18 | @NotEmpty(message = "审批意见不能为空") | 17 | @NotEmpty(message = "审批意见不能为空") |
| 19 | private String reason; | 18 | private String reason; |
| 20 | 19 |
yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/task/vo/task/BpmTaskDonePageItemRespVO.java
| 1 | package cn.iocoder.yudao.module.bpm.controller.admin.task.vo.task; | 1 | package cn.iocoder.yudao.module.bpm.controller.admin.task.vo.task; |
| 2 | 2 | ||
| 3 | -import io.swagger.annotations.ApiModel; | ||
| 4 | -import io.swagger.annotations.ApiModelProperty; | 3 | +import io.swagger.v3.oas.annotations.media.Schema; |
| 5 | import lombok.Data; | 4 | import lombok.Data; |
| 6 | import lombok.EqualsAndHashCode; | 5 | import lombok.EqualsAndHashCode; |
| 7 | import lombok.ToString; | 6 | import lombok.ToString; |
| 8 | 7 | ||
| 9 | import java.time.LocalDateTime; | 8 | import java.time.LocalDateTime; |
| 10 | 9 | ||
| 11 | -@ApiModel("管理后台 - 流程任务的 Done 已完成的分页项 Response VO") | 10 | +@Schema(title = "管理后台 - 流程任务的 Done 已完成的分页项 Response VO") |
| 12 | @Data | 11 | @Data |
| 13 | @EqualsAndHashCode(callSuper = true) | 12 | @EqualsAndHashCode(callSuper = true) |
| 14 | @ToString(callSuper = true) | 13 | @ToString(callSuper = true) |
| 15 | public class BpmTaskDonePageItemRespVO extends BpmTaskTodoPageItemRespVO { | 14 | public class BpmTaskDonePageItemRespVO extends BpmTaskTodoPageItemRespVO { |
| 16 | 15 | ||
| 17 | - @ApiModelProperty(value = "结束时间", required = true) | 16 | + @Schema(title = "结束时间", required = true) |
| 18 | private LocalDateTime endTime; | 17 | private LocalDateTime endTime; |
| 19 | - @ApiModelProperty(value = "持续时间", required = true, example = "1000") | 18 | + @Schema(title = "持续时间", required = true, example = "1000") |
| 20 | private Long durationInMillis; | 19 | private Long durationInMillis; |
| 21 | 20 | ||
| 22 | - @ApiModelProperty(value = "任务结果", required = true, notes = "参见 bpm_process_instance_result", example = "2") | 21 | + @Schema(title = "任务结果", required = true, description = "参见 bpm_process_instance_result", example = "2") |
| 23 | private Integer result; | 22 | private Integer result; |
| 24 | - @ApiModelProperty(value = "审批建议", required = true, example = "不请假了!") | 23 | + @Schema(title = "审批建议", required = true, example = "不请假了!") |
| 25 | private String reason; | 24 | private String reason; |
| 26 | 25 | ||
| 27 | } | 26 | } |
yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/task/vo/task/BpmTaskDonePageReqVO.java
| 1 | package cn.iocoder.yudao.module.bpm.controller.admin.task.vo.task; | 1 | package cn.iocoder.yudao.module.bpm.controller.admin.task.vo.task; |
| 2 | 2 | ||
| 3 | import cn.iocoder.yudao.framework.common.pojo.PageParam; | 3 | import cn.iocoder.yudao.framework.common.pojo.PageParam; |
| 4 | -import io.swagger.annotations.ApiModel; | ||
| 5 | -import io.swagger.annotations.ApiModelProperty; | 4 | +import io.swagger.v3.oas.annotations.media.Schema; |
| 6 | import lombok.Data; | 5 | import lombok.Data; |
| 7 | import lombok.EqualsAndHashCode; | 6 | import lombok.EqualsAndHashCode; |
| 8 | import lombok.ToString; | 7 | import lombok.ToString; |
| @@ -12,20 +11,20 @@ import java.time.LocalDateTime; | @@ -12,20 +11,20 @@ import java.time.LocalDateTime; | ||
| 12 | 11 | ||
| 13 | import static cn.iocoder.yudao.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND; | 12 | import static cn.iocoder.yudao.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND; |
| 14 | 13 | ||
| 15 | -@ApiModel("管理后台 - 流程任务的 Done 已办的分页 Request VO") | 14 | +@Schema(title = "管理后台 - 流程任务的 Done 已办的分页 Request VO") |
| 16 | @Data | 15 | @Data |
| 17 | @EqualsAndHashCode(callSuper = true) | 16 | @EqualsAndHashCode(callSuper = true) |
| 18 | @ToString(callSuper = true) | 17 | @ToString(callSuper = true) |
| 19 | public class BpmTaskDonePageReqVO extends PageParam { | 18 | public class BpmTaskDonePageReqVO extends PageParam { |
| 20 | 19 | ||
| 21 | - @ApiModelProperty(value = "流程任务名", example = "芋道") | 20 | + @Schema(title = "流程任务名", example = "芋道") |
| 22 | private String name; | 21 | private String name; |
| 23 | 22 | ||
| 24 | - @ApiModelProperty(value = "开始的创建收间") | 23 | + @Schema(title = "开始的创建收间") |
| 25 | @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND) | 24 | @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND) |
| 26 | private LocalDateTime beginCreateTime; | 25 | private LocalDateTime beginCreateTime; |
| 27 | 26 | ||
| 28 | - @ApiModelProperty(value = "结束的创建时间") | 27 | + @Schema(title = "结束的创建时间") |
| 29 | @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND) | 28 | @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND) |
| 30 | private LocalDateTime endCreateTime; | 29 | private LocalDateTime endCreateTime; |
| 31 | 30 |
yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/task/vo/task/BpmTaskRejectReqVO.java
| 1 | package cn.iocoder.yudao.module.bpm.controller.admin.task.vo.task; | 1 | package cn.iocoder.yudao.module.bpm.controller.admin.task.vo.task; |
| 2 | 2 | ||
| 3 | -import io.swagger.annotations.ApiModel; | ||
| 4 | -import io.swagger.annotations.ApiModelProperty; | 3 | +import io.swagger.v3.oas.annotations.media.Schema; |
| 5 | import lombok.Data; | 4 | import lombok.Data; |
| 6 | 5 | ||
| 7 | import javax.validation.constraints.NotEmpty; | 6 | import javax.validation.constraints.NotEmpty; |
| 8 | 7 | ||
| 9 | -@ApiModel("管理后台 - 不通过流程任务的 Request VO") | 8 | +@Schema(title = "管理后台 - 不通过流程任务的 Request VO") |
| 10 | @Data | 9 | @Data |
| 11 | public class BpmTaskRejectReqVO { | 10 | public class BpmTaskRejectReqVO { |
| 12 | 11 | ||
| 13 | - @ApiModelProperty(value = "任务编号", required = true, example = "1024") | 12 | + @Schema(title = "任务编号", required = true, example = "1024") |
| 14 | @NotEmpty(message = "任务编号不能为空") | 13 | @NotEmpty(message = "任务编号不能为空") |
| 15 | private String id; | 14 | private String id; |
| 16 | 15 | ||
| 17 | - @ApiModelProperty(value = "审批意见", required = true, example = "不错不错!") | 16 | + @Schema(title = "审批意见", required = true, example = "不错不错!") |
| 18 | @NotEmpty(message = "审批意见不能为空") | 17 | @NotEmpty(message = "审批意见不能为空") |
| 19 | private String reason; | 18 | private String reason; |
| 20 | 19 |
yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/task/vo/task/BpmTaskRespVO.java
| 1 | package cn.iocoder.yudao.module.bpm.controller.admin.task.vo.task; | 1 | package cn.iocoder.yudao.module.bpm.controller.admin.task.vo.task; |
| 2 | 2 | ||
| 3 | -import io.swagger.annotations.ApiModel; | ||
| 4 | -import io.swagger.annotations.ApiModelProperty; | 3 | +import io.swagger.v3.oas.annotations.media.Schema; |
| 5 | import lombok.Data; | 4 | import lombok.Data; |
| 6 | import lombok.EqualsAndHashCode; | 5 | import lombok.EqualsAndHashCode; |
| 7 | import lombok.ToString; | 6 | import lombok.ToString; |
| 8 | 7 | ||
| 9 | -@ApiModel("管理后台 - 流程任务的 Response VO") | 8 | +@Schema(title = "管理后台 - 流程任务的 Response VO") |
| 10 | @Data | 9 | @Data |
| 11 | @EqualsAndHashCode(callSuper = true) | 10 | @EqualsAndHashCode(callSuper = true) |
| 12 | @ToString(callSuper = true) | 11 | @ToString(callSuper = true) |
| 13 | public class BpmTaskRespVO extends BpmTaskDonePageItemRespVO { | 12 | public class BpmTaskRespVO extends BpmTaskDonePageItemRespVO { |
| 14 | 13 | ||
| 15 | - @ApiModelProperty(value = "任务定义的标识", required = true, example = "user-001") | 14 | + @Schema(title = "任务定义的标识", required = true, example = "user-001") |
| 16 | private String definitionKey; | 15 | private String definitionKey; |
| 17 | 16 | ||
| 18 | /** | 17 | /** |
| @@ -20,18 +19,18 @@ public class BpmTaskRespVO extends BpmTaskDonePageItemRespVO { | @@ -20,18 +19,18 @@ public class BpmTaskRespVO extends BpmTaskDonePageItemRespVO { | ||
| 20 | */ | 19 | */ |
| 21 | private User assigneeUser; | 20 | private User assigneeUser; |
| 22 | 21 | ||
| 23 | - @ApiModel("用户信息") | 22 | + @Schema(title = "用户信息") |
| 24 | @Data | 23 | @Data |
| 25 | public static class User { | 24 | public static class User { |
| 26 | 25 | ||
| 27 | - @ApiModelProperty(value = "用户编号", required = true, example = "1") | 26 | + @Schema(title = "用户编号", required = true, example = "1") |
| 28 | private Long id; | 27 | private Long id; |
| 29 | - @ApiModelProperty(value = "用户昵称", required = true, example = "芋艿") | 28 | + @Schema(title = "用户昵称", required = true, example = "芋艿") |
| 30 | private String nickname; | 29 | private String nickname; |
| 31 | 30 | ||
| 32 | - @ApiModelProperty(value = "部门编号", required = true, example = "1") | 31 | + @Schema(title = "部门编号", required = true, example = "1") |
| 33 | private Long deptId; | 32 | private Long deptId; |
| 34 | - @ApiModelProperty(value = "部门名称", required = true, example = "研发部") | 33 | + @Schema(title = "部门名称", required = true, example = "研发部") |
| 35 | private String deptName; | 34 | private String deptName; |
| 36 | 35 | ||
| 37 | } | 36 | } |
yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/task/vo/task/BpmTaskTodoPageItemRespVO.java
| 1 | package cn.iocoder.yudao.module.bpm.controller.admin.task.vo.task; | 1 | package cn.iocoder.yudao.module.bpm.controller.admin.task.vo.task; |
| 2 | 2 | ||
| 3 | -import io.swagger.annotations.ApiModel; | ||
| 4 | -import io.swagger.annotations.ApiModelProperty; | 3 | +import io.swagger.v3.oas.annotations.media.Schema; |
| 5 | import lombok.Data; | 4 | import lombok.Data; |
| 6 | 5 | ||
| 7 | import java.time.LocalDateTime; | 6 | import java.time.LocalDateTime; |
| 8 | 7 | ||
| 9 | -@ApiModel("管理后台 - 流程任务的 Running 进行中的分页项 Response VO") | 8 | +@Schema(title = "管理后台 - 流程任务的 Running 进行中的分页项 Response VO") |
| 10 | @Data | 9 | @Data |
| 11 | public class BpmTaskTodoPageItemRespVO { | 10 | public class BpmTaskTodoPageItemRespVO { |
| 12 | 11 | ||
| 13 | - @ApiModelProperty(value = "任务编号", required = true, example = "1024") | 12 | + @Schema(title = "任务编号", required = true, example = "1024") |
| 14 | private String id; | 13 | private String id; |
| 15 | 14 | ||
| 16 | - @ApiModelProperty(value = "任务名字", required = true, example = "芋道") | 15 | + @Schema(title = "任务名字", required = true, example = "芋道") |
| 17 | private String name; | 16 | private String name; |
| 18 | 17 | ||
| 19 | - @ApiModelProperty(value = "接收时间", required = true) | 18 | + @Schema(title = "接收时间", required = true) |
| 20 | private LocalDateTime claimTime; | 19 | private LocalDateTime claimTime; |
| 21 | 20 | ||
| 22 | - @ApiModelProperty(value = "创建时间", required = true) | 21 | + @Schema(title = "创建时间", required = true) |
| 23 | private LocalDateTime createTime; | 22 | private LocalDateTime createTime; |
| 24 | 23 | ||
| 25 | - @ApiModelProperty(value = "激活状态", required = true, example = "1", notes = "参见 SuspensionState 枚举") | 24 | + @Schema(title = "激活状态", required = true, example = "1", description = "参见 SuspensionState 枚举") |
| 26 | private Integer suspensionState; | 25 | private Integer suspensionState; |
| 27 | 26 | ||
| 28 | /** | 27 | /** |
| @@ -31,22 +30,22 @@ public class BpmTaskTodoPageItemRespVO { | @@ -31,22 +30,22 @@ public class BpmTaskTodoPageItemRespVO { | ||
| 31 | private ProcessInstance processInstance; | 30 | private ProcessInstance processInstance; |
| 32 | 31 | ||
| 33 | @Data | 32 | @Data |
| 34 | - @ApiModel("流程实例") | 33 | + @Schema(title = "流程实例") |
| 35 | public static class ProcessInstance { | 34 | public static class ProcessInstance { |
| 36 | 35 | ||
| 37 | - @ApiModelProperty(value = "流程实例编号", required = true, example = "1024") | 36 | + @Schema(title = "流程实例编号", required = true, example = "1024") |
| 38 | private String id; | 37 | private String id; |
| 39 | 38 | ||
| 40 | - @ApiModelProperty(value = "流程实例名称", required = true, example = "芋道") | 39 | + @Schema(title = "流程实例名称", required = true, example = "芋道") |
| 41 | private String name; | 40 | private String name; |
| 42 | 41 | ||
| 43 | - @ApiModelProperty(value = "发起人的用户编号", required = true, example = "1024") | 42 | + @Schema(title = "发起人的用户编号", required = true, example = "1024") |
| 44 | private Long startUserId; | 43 | private Long startUserId; |
| 45 | 44 | ||
| 46 | - @ApiModelProperty(value = "发起人的用户昵称", required = true, example = "芋艿") | 45 | + @Schema(title = "发起人的用户昵称", required = true, example = "芋艿") |
| 47 | private String startUserNickname; | 46 | private String startUserNickname; |
| 48 | 47 | ||
| 49 | - @ApiModelProperty(value = "流程定义的编号", required = true, example = "2048") | 48 | + @Schema(title = "流程定义的编号", required = true, example = "2048") |
| 50 | private String processDefinitionId; | 49 | private String processDefinitionId; |
| 51 | 50 | ||
| 52 | } | 51 | } |
yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/task/vo/task/BpmTaskTodoPageReqVO.java
| 1 | package cn.iocoder.yudao.module.bpm.controller.admin.task.vo.task; | 1 | package cn.iocoder.yudao.module.bpm.controller.admin.task.vo.task; |
| 2 | 2 | ||
| 3 | import cn.iocoder.yudao.framework.common.pojo.PageParam; | 3 | import cn.iocoder.yudao.framework.common.pojo.PageParam; |
| 4 | -import io.swagger.annotations.ApiModel; | ||
| 5 | -import io.swagger.annotations.ApiModelProperty; | 4 | +import io.swagger.v3.oas.annotations.media.Schema; |
| 6 | import lombok.Data; | 5 | import lombok.Data; |
| 7 | import lombok.EqualsAndHashCode; | 6 | import lombok.EqualsAndHashCode; |
| 8 | import lombok.ToString; | 7 | import lombok.ToString; |
| @@ -12,20 +11,20 @@ import java.time.LocalDateTime; | @@ -12,20 +11,20 @@ import java.time.LocalDateTime; | ||
| 12 | 11 | ||
| 13 | import static cn.iocoder.yudao.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND; | 12 | import static cn.iocoder.yudao.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND; |
| 14 | 13 | ||
| 15 | -@ApiModel("管理后台 - 流程任务的 TODO 待办的分页 Request VO") | 14 | +@Schema(title = "管理后台 - 流程任务的 TODO 待办的分页 Request VO") |
| 16 | @Data | 15 | @Data |
| 17 | @EqualsAndHashCode(callSuper = true) | 16 | @EqualsAndHashCode(callSuper = true) |
| 18 | @ToString(callSuper = true) | 17 | @ToString(callSuper = true) |
| 19 | public class BpmTaskTodoPageReqVO extends PageParam { | 18 | public class BpmTaskTodoPageReqVO extends PageParam { |
| 20 | 19 | ||
| 21 | - @ApiModelProperty(value = "流程任务名", example = "芋道") | 20 | + @Schema(title = "流程任务名", example = "芋道") |
| 22 | private String name; | 21 | private String name; |
| 23 | 22 | ||
| 24 | - @ApiModelProperty(value = "开始的创建收间") | 23 | + @Schema(title = "开始的创建收间") |
| 25 | @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND) | 24 | @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND) |
| 26 | private LocalDateTime beginCreateTime; | 25 | private LocalDateTime beginCreateTime; |
| 27 | 26 | ||
| 28 | - @ApiModelProperty(value = "结束的创建时间") | 27 | + @Schema(title = "结束的创建时间") |
| 29 | @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND) | 28 | @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND) |
| 30 | private LocalDateTime endCreateTime; | 29 | private LocalDateTime endCreateTime; |
| 31 | 30 |
yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/task/vo/task/BpmTaskUpdateAssigneeReqVO.java
| 1 | package cn.iocoder.yudao.module.bpm.controller.admin.task.vo.task; | 1 | package cn.iocoder.yudao.module.bpm.controller.admin.task.vo.task; |
| 2 | 2 | ||
| 3 | -import io.swagger.annotations.ApiModel; | ||
| 4 | -import io.swagger.annotations.ApiModelProperty; | 3 | +import io.swagger.v3.oas.annotations.media.Schema; |
| 5 | import lombok.Data; | 4 | import lombok.Data; |
| 6 | import lombok.EqualsAndHashCode; | 5 | import lombok.EqualsAndHashCode; |
| 7 | import lombok.ToString; | 6 | import lombok.ToString; |
| @@ -10,15 +9,15 @@ import net.bytebuddy.implementation.bind.annotation.Empty; | @@ -10,15 +9,15 @@ import net.bytebuddy.implementation.bind.annotation.Empty; | ||
| 10 | import javax.validation.constraints.NotEmpty; | 9 | import javax.validation.constraints.NotEmpty; |
| 11 | import javax.validation.constraints.NotNull; | 10 | import javax.validation.constraints.NotNull; |
| 12 | 11 | ||
| 13 | -@ApiModel("管理后台 - 流程任务的更新负责人的 Request VO") | 12 | +@Schema(title = "管理后台 - 流程任务的更新负责人的 Request VO") |
| 14 | @Data | 13 | @Data |
| 15 | public class BpmTaskUpdateAssigneeReqVO { | 14 | public class BpmTaskUpdateAssigneeReqVO { |
| 16 | 15 | ||
| 17 | - @ApiModelProperty(value = "任务编号", required = true, example = "1024") | 16 | + @Schema(title = "任务编号", required = true, example = "1024") |
| 18 | @NotEmpty(message = "任务编号不能为空") | 17 | @NotEmpty(message = "任务编号不能为空") |
| 19 | private String id; | 18 | private String id; |
| 20 | 19 | ||
| 21 | - @ApiModelProperty(value = "新审批人的用户编号", required = true, example = "2048") | 20 | + @Schema(title = "新审批人的用户编号", required = true, example = "2048") |
| 22 | @NotNull(message = "新审批人的用户编号不能为空") | 21 | @NotNull(message = "新审批人的用户编号不能为空") |
| 23 | private Long assigneeUserId; | 22 | private Long assigneeUserId; |
| 24 | 23 |
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; | @@ -16,10 +16,10 @@ import cn.iocoder.yudao.module.infra.convert.codegen.CodegenConvert; | ||
| 16 | import cn.iocoder.yudao.module.infra.dal.dataobject.codegen.CodegenColumnDO; | 16 | import cn.iocoder.yudao.module.infra.dal.dataobject.codegen.CodegenColumnDO; |
| 17 | import cn.iocoder.yudao.module.infra.dal.dataobject.codegen.CodegenTableDO; | 17 | import cn.iocoder.yudao.module.infra.dal.dataobject.codegen.CodegenTableDO; |
| 18 | import cn.iocoder.yudao.module.infra.service.codegen.CodegenService; | 18 | import cn.iocoder.yudao.module.infra.service.codegen.CodegenService; |
| 19 | -import io.swagger.annotations.Api; | ||
| 20 | -import io.swagger.annotations.ApiImplicitParam; | ||
| 21 | -import io.swagger.annotations.ApiImplicitParams; | ||
| 22 | -import io.swagger.annotations.ApiOperation; | 19 | +import io.swagger.v3.oas.annotations.tags.Tag; |
| 20 | +import io.swagger.v3.oas.annotations.Parameter; | ||
| 21 | +import io.swagger.v3.oas.annotations.Parameters; | ||
| 22 | +import io.swagger.v3.oas.annotations.Operation; | ||
| 23 | import org.springframework.security.access.prepost.PreAuthorize; | 23 | import org.springframework.security.access.prepost.PreAuthorize; |
| 24 | import org.springframework.validation.annotation.Validated; | 24 | import org.springframework.validation.annotation.Validated; |
| 25 | import org.springframework.web.bind.annotation.*; | 25 | import org.springframework.web.bind.annotation.*; |
| @@ -36,7 +36,7 @@ import java.util.Map; | @@ -36,7 +36,7 @@ import java.util.Map; | ||
| 36 | import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success; | 36 | import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success; |
| 37 | import static cn.iocoder.yudao.framework.security.core.util.SecurityFrameworkUtils.getLoginUserId; | 37 | import static cn.iocoder.yudao.framework.security.core.util.SecurityFrameworkUtils.getLoginUserId; |
| 38 | 38 | ||
| 39 | -@Api(tags = "管理后台 - 代码生成器") | 39 | +@Tag(name = "管理后台 - 代码生成器") |
| 40 | @RestController | 40 | @RestController |
| 41 | @RequestMapping("/infra/codegen") | 41 | @RequestMapping("/infra/codegen") |
| 42 | @Validated | 42 | @Validated |
| @@ -46,11 +46,11 @@ public class CodegenController { | @@ -46,11 +46,11 @@ public class CodegenController { | ||
| 46 | private CodegenService codegenService; | 46 | private CodegenService codegenService; |
| 47 | 47 | ||
| 48 | @GetMapping("/db/table/list") | 48 | @GetMapping("/db/table/list") |
| 49 | - @ApiOperation(value = "获得数据库自带的表定义列表", notes = "会过滤掉已经导入 Codegen 的表") | ||
| 50 | - @ApiImplicitParams({ | ||
| 51 | - @ApiImplicitParam(name = "dataSourceConfigId", value = "数据源配置的编号", required = true, example = "1", dataTypeClass = Long.class), | ||
| 52 | - @ApiImplicitParam(name = "name", value = "表名,模糊匹配", example = "yudao", dataTypeClass = String.class), | ||
| 53 | - @ApiImplicitParam(name = "comment", value = "描述,模糊匹配", example = "芋道", dataTypeClass = String.class) | 49 | + @Operation(summary = "获得数据库自带的表定义列表", description = "会过滤掉已经导入 Codegen 的表") |
| 50 | + @Parameters({ | ||
| 51 | + @Parameter(name = "dataSourceConfigId", description = "数据源配置的编号", required = true, example = "1"), | ||
| 52 | + @Parameter(name = "name", description = "表名,模糊匹配", example = "yudao"), | ||
| 53 | + @Parameter(name = "comment", description = "描述,模糊匹配", example = "芋道") | ||
| 54 | }) | 54 | }) |
| 55 | @PreAuthorize("@ss.hasPermission('infra:codegen:query')") | 55 | @PreAuthorize("@ss.hasPermission('infra:codegen:query')") |
| 56 | public CommonResult<List<DatabaseTableRespVO>> getDatabaseTableList( | 56 | public CommonResult<List<DatabaseTableRespVO>> getDatabaseTableList( |
| @@ -61,7 +61,7 @@ public class CodegenController { | @@ -61,7 +61,7 @@ public class CodegenController { | ||
| 61 | } | 61 | } |
| 62 | 62 | ||
| 63 | @GetMapping("/table/page") | 63 | @GetMapping("/table/page") |
| 64 | - @ApiOperation("获得表定义分页") | 64 | + @Operation(summary = "获得表定义分页") |
| 65 | @PreAuthorize("@ss.hasPermission('infra:codegen:query')") | 65 | @PreAuthorize("@ss.hasPermission('infra:codegen:query')") |
| 66 | public CommonResult<PageResult<CodegenTableRespVO>> getCodeGenTablePage(@Valid CodegenTablePageReqVO pageReqVO) { | 66 | public CommonResult<PageResult<CodegenTableRespVO>> getCodeGenTablePage(@Valid CodegenTablePageReqVO pageReqVO) { |
| 67 | PageResult<CodegenTableDO> pageResult = codegenService.getCodegenTablePage(pageReqVO); | 67 | PageResult<CodegenTableDO> pageResult = codegenService.getCodegenTablePage(pageReqVO); |
| @@ -69,8 +69,8 @@ public class CodegenController { | @@ -69,8 +69,8 @@ public class CodegenController { | ||
| 69 | } | 69 | } |
| 70 | 70 | ||
| 71 | @GetMapping("/detail") | 71 | @GetMapping("/detail") |
| 72 | - @ApiOperation("获得表和字段的明细") | ||
| 73 | - @ApiImplicitParam(name = "tableId", value = "表编号", required = true, example = "1024", dataTypeClass = Long.class) | 72 | + @Operation(summary = "获得表和字段的明细") |
| 73 | + @Parameter(name = "tableId", description = "表编号", required = true, example = "1024") | ||
| 74 | @PreAuthorize("@ss.hasPermission('infra:codegen:query')") | 74 | @PreAuthorize("@ss.hasPermission('infra:codegen:query')") |
| 75 | public CommonResult<CodegenDetailRespVO> getCodegenDetail(@RequestParam("tableId") Long tableId) { | 75 | public CommonResult<CodegenDetailRespVO> getCodegenDetail(@RequestParam("tableId") Long tableId) { |
| 76 | CodegenTableDO table = codegenService.getCodegenTablePage(tableId); | 76 | CodegenTableDO table = codegenService.getCodegenTablePage(tableId); |
| @@ -79,14 +79,14 @@ public class CodegenController { | @@ -79,14 +79,14 @@ public class CodegenController { | ||
| 79 | return success(CodegenConvert.INSTANCE.convert(table, columns)); | 79 | return success(CodegenConvert.INSTANCE.convert(table, columns)); |
| 80 | } | 80 | } |
| 81 | 81 | ||
| 82 | - @ApiOperation("基于数据库的表结构,创建代码生成器的表和字段定义") | 82 | + @Operation(summary = "基于数据库的表结构,创建代码生成器的表和字段定义") |
| 83 | @PostMapping("/create-list") | 83 | @PostMapping("/create-list") |
| 84 | @PreAuthorize("@ss.hasPermission('infra:codegen:create')") | 84 | @PreAuthorize("@ss.hasPermission('infra:codegen:create')") |
| 85 | public CommonResult<List<Long>> createCodegenList(@Valid @RequestBody CodegenCreateListReqVO reqVO) { | 85 | public CommonResult<List<Long>> createCodegenList(@Valid @RequestBody CodegenCreateListReqVO reqVO) { |
| 86 | return success(codegenService.createCodegenList(getLoginUserId(), reqVO)); | 86 | return success(codegenService.createCodegenList(getLoginUserId(), reqVO)); |
| 87 | } | 87 | } |
| 88 | 88 | ||
| 89 | - @ApiOperation("更新数据库的表和字段定义") | 89 | + @Operation(summary = "更新数据库的表和字段定义") |
| 90 | @PutMapping("/update") | 90 | @PutMapping("/update") |
| 91 | @PreAuthorize("@ss.hasPermission('infra:codegen:update')") | 91 | @PreAuthorize("@ss.hasPermission('infra:codegen:update')") |
| 92 | public CommonResult<Boolean> updateCodegen(@Valid @RequestBody CodegenUpdateReqVO updateReqVO) { | 92 | public CommonResult<Boolean> updateCodegen(@Valid @RequestBody CodegenUpdateReqVO updateReqVO) { |
| @@ -94,36 +94,36 @@ public class CodegenController { | @@ -94,36 +94,36 @@ public class CodegenController { | ||
| 94 | return success(true); | 94 | return success(true); |
| 95 | } | 95 | } |
| 96 | 96 | ||
| 97 | - @ApiOperation("基于数据库的表结构,同步数据库的表和字段定义") | 97 | + @Operation(summary = "基于数据库的表结构,同步数据库的表和字段定义") |
| 98 | @PutMapping("/sync-from-db") | 98 | @PutMapping("/sync-from-db") |
| 99 | - @ApiImplicitParam(name = "tableId", value = "表编号", required = true, example = "1024", dataTypeClass = Long.class) | 99 | + @Parameter(name = "tableId", description = "表编号", required = true, example = "1024") |
| 100 | @PreAuthorize("@ss.hasPermission('infra:codegen:update')") | 100 | @PreAuthorize("@ss.hasPermission('infra:codegen:update')") |
| 101 | public CommonResult<Boolean> syncCodegenFromDB(@RequestParam("tableId") Long tableId) { | 101 | public CommonResult<Boolean> syncCodegenFromDB(@RequestParam("tableId") Long tableId) { |
| 102 | codegenService.syncCodegenFromDB(tableId); | 102 | codegenService.syncCodegenFromDB(tableId); |
| 103 | return success(true); | 103 | return success(true); |
| 104 | } | 104 | } |
| 105 | 105 | ||
| 106 | - @ApiOperation("删除数据库的表和字段定义") | 106 | + @Operation(summary = "删除数据库的表和字段定义") |
| 107 | @DeleteMapping("/delete") | 107 | @DeleteMapping("/delete") |
| 108 | - @ApiImplicitParam(name = "tableId", value = "表编号", required = true, example = "1024", dataTypeClass = Long.class) | 108 | + @Parameter(name = "tableId", description = "表编号", required = true, example = "1024") |
| 109 | @PreAuthorize("@ss.hasPermission('infra:codegen:delete')") | 109 | @PreAuthorize("@ss.hasPermission('infra:codegen:delete')") |
| 110 | public CommonResult<Boolean> deleteCodegen(@RequestParam("tableId") Long tableId) { | 110 | public CommonResult<Boolean> deleteCodegen(@RequestParam("tableId") Long tableId) { |
| 111 | codegenService.deleteCodegen(tableId); | 111 | codegenService.deleteCodegen(tableId); |
| 112 | return success(true); | 112 | return success(true); |
| 113 | } | 113 | } |
| 114 | 114 | ||
| 115 | - @ApiOperation("预览生成代码") | 115 | + @Operation(summary = "预览生成代码") |
| 116 | @GetMapping("/preview") | 116 | @GetMapping("/preview") |
| 117 | - @ApiImplicitParam(name = "tableId", value = "表编号", required = true, example = "1024", dataTypeClass = Long.class) | 117 | + @Parameter(name = "tableId", description = "表编号", required = true, example = "1024") |
| 118 | @PreAuthorize("@ss.hasPermission('infra:codegen:preview')") | 118 | @PreAuthorize("@ss.hasPermission('infra:codegen:preview')") |
| 119 | public CommonResult<List<CodegenPreviewRespVO>> previewCodegen(@RequestParam("tableId") Long tableId) { | 119 | public CommonResult<List<CodegenPreviewRespVO>> previewCodegen(@RequestParam("tableId") Long tableId) { |
| 120 | Map<String, String> codes = codegenService.generationCodes(tableId); | 120 | Map<String, String> codes = codegenService.generationCodes(tableId); |
| 121 | return success(CodegenConvert.INSTANCE.convert(codes)); | 121 | return success(CodegenConvert.INSTANCE.convert(codes)); |
| 122 | } | 122 | } |
| 123 | 123 | ||
| 124 | - @ApiOperation("下载生成代码") | 124 | + @Operation(summary = "下载生成代码") |
| 125 | @GetMapping("/download") | 125 | @GetMapping("/download") |
| 126 | - @ApiImplicitParam(name = "tableId", value = "表编号", required = true, example = "1024", dataTypeClass = Long.class) | 126 | + @Parameter(name = "tableId", description = "表编号", required = true, example = "1024") |
| 127 | @PreAuthorize("@ss.hasPermission('infra:codegen:download')") | 127 | @PreAuthorize("@ss.hasPermission('infra:codegen:download')") |
| 128 | public void downloadCodegen(@RequestParam("tableId") Long tableId, | 128 | public void downloadCodegen(@RequestParam("tableId") Long tableId, |
| 129 | HttpServletResponse response) throws IOException { | 129 | HttpServletResponse response) throws IOException { |
yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/controller/admin/codegen/vo/CodegenCreateListReqVO.java
| 1 | package cn.iocoder.yudao.module.infra.controller.admin.codegen.vo; | 1 | package cn.iocoder.yudao.module.infra.controller.admin.codegen.vo; |
| 2 | 2 | ||
| 3 | -import io.swagger.annotations.ApiModel; | ||
| 4 | -import io.swagger.annotations.ApiModelProperty; | 3 | +import io.swagger.v3.oas.annotations.media.Schema; |
| 5 | import lombok.Data; | 4 | import lombok.Data; |
| 6 | 5 | ||
| 7 | import javax.validation.constraints.NotNull; | 6 | import javax.validation.constraints.NotNull; |
| 8 | import java.util.List; | 7 | import java.util.List; |
| 9 | 8 | ||
| 10 | -@ApiModel("管理后台 - 基于数据库的表结构,创建代码生成器的表和字段定义 Request VO") | 9 | +@Schema(title = "管理后台 - 基于数据库的表结构,创建代码生成器的表和字段定义 Request VO") |
| 11 | @Data | 10 | @Data |
| 12 | public class CodegenCreateListReqVO { | 11 | public class CodegenCreateListReqVO { |
| 13 | 12 | ||
| 14 | - @ApiModelProperty(value = "数据源配置的编号", required = true, example = "1") | 13 | + @Schema(title = "数据源配置的编号", required = true, example = "1") |
| 15 | @NotNull(message = "数据源配置的编号不能为空") | 14 | @NotNull(message = "数据源配置的编号不能为空") |
| 16 | private Long dataSourceConfigId; | 15 | private Long dataSourceConfigId; |
| 17 | 16 | ||
| 18 | - @ApiModelProperty(value = "表名数组", required = true, example = "[1, 2, 3]") | 17 | + @Schema(title = "表名数组", required = true, example = "[1, 2, 3]") |
| 19 | @NotNull(message = "表名数组不能为空") | 18 | @NotNull(message = "表名数组不能为空") |
| 20 | private List<String> tableNames; | 19 | private List<String> tableNames; |
| 21 | 20 |
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; | @@ -2,20 +2,19 @@ package cn.iocoder.yudao.module.infra.controller.admin.codegen.vo; | ||
| 2 | 2 | ||
| 3 | import cn.iocoder.yudao.module.infra.controller.admin.codegen.vo.column.CodegenColumnRespVO; | 3 | import cn.iocoder.yudao.module.infra.controller.admin.codegen.vo.column.CodegenColumnRespVO; |
| 4 | import cn.iocoder.yudao.module.infra.controller.admin.codegen.vo.table.CodegenTableRespVO; | 4 | import cn.iocoder.yudao.module.infra.controller.admin.codegen.vo.table.CodegenTableRespVO; |
| 5 | -import io.swagger.annotations.ApiModel; | ||
| 6 | -import io.swagger.annotations.ApiModelProperty; | 5 | +import io.swagger.v3.oas.annotations.media.Schema; |
| 7 | import lombok.Data; | 6 | import lombok.Data; |
| 8 | 7 | ||
| 9 | import java.util.List; | 8 | import java.util.List; |
| 10 | 9 | ||
| 11 | -@ApiModel("管理后台 - 代码生成表和字段的明细 Response VO") | 10 | +@Schema(title = "管理后台 - 代码生成表和字段的明细 Response VO") |
| 12 | @Data | 11 | @Data |
| 13 | public class CodegenDetailRespVO { | 12 | public class CodegenDetailRespVO { |
| 14 | 13 | ||
| 15 | - @ApiModelProperty("表定义") | 14 | + @Schema(name = "表定义") |
| 16 | private CodegenTableRespVO table; | 15 | private CodegenTableRespVO table; |
| 17 | 16 | ||
| 18 | - @ApiModelProperty("字段定义") | 17 | + @Schema(name = "字段定义") |
| 19 | private List<CodegenColumnRespVO> columns; | 18 | private List<CodegenColumnRespVO> columns; |
| 20 | 19 | ||
| 21 | } | 20 | } |
yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/controller/admin/codegen/vo/CodegenPreviewRespVO.java
| 1 | package cn.iocoder.yudao.module.infra.controller.admin.codegen.vo; | 1 | package cn.iocoder.yudao.module.infra.controller.admin.codegen.vo; |
| 2 | 2 | ||
| 3 | -import io.swagger.annotations.ApiModel; | ||
| 4 | -import io.swagger.annotations.ApiModelProperty; | 3 | +import io.swagger.v3.oas.annotations.media.Schema; |
| 5 | import lombok.Data; | 4 | import lombok.Data; |
| 6 | 5 | ||
| 7 | -@ApiModel(value = "管理后台 - 代码生成预览 Response VO", description ="注意,每个文件都是一个该对象") | 6 | +@Schema(title = "管理后台 - 代码生成预览 Response VO", description ="注意,每个文件都是一个该对象") |
| 8 | @Data | 7 | @Data |
| 9 | public class CodegenPreviewRespVO { | 8 | public class CodegenPreviewRespVO { |
| 10 | 9 | ||
| 11 | - @ApiModelProperty(value = "文件路径", required = true, example = "java/cn/iocoder/yudao/adminserver/modules/system/controller/test/SysTestDemoController.java") | 10 | + @Schema(title = "文件路径", required = true, example = "java/cn/iocoder/yudao/adminserver/modules/system/controller/test/SysTestDemoController.java") |
| 12 | private String filePath; | 11 | private String filePath; |
| 13 | 12 | ||
| 14 | - @ApiModelProperty(value = "代码", required = true, example = "Hello World") | 13 | + @Schema(title = "代码", required = true, example = "Hello World") |
| 15 | private String code; | 14 | private String code; |
| 16 | 15 | ||
| 17 | } | 16 | } |
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; | @@ -4,8 +4,7 @@ import cn.hutool.core.util.ObjectUtil; | ||
| 4 | import cn.iocoder.yudao.module.infra.controller.admin.codegen.vo.column.CodegenColumnBaseVO; | 4 | import cn.iocoder.yudao.module.infra.controller.admin.codegen.vo.column.CodegenColumnBaseVO; |
| 5 | import cn.iocoder.yudao.module.infra.controller.admin.codegen.vo.table.CodegenTableBaseVO; | 5 | import cn.iocoder.yudao.module.infra.controller.admin.codegen.vo.table.CodegenTableBaseVO; |
| 6 | import cn.iocoder.yudao.module.infra.enums.codegen.CodegenSceneEnum; | 6 | import cn.iocoder.yudao.module.infra.enums.codegen.CodegenSceneEnum; |
| 7 | -import io.swagger.annotations.ApiModel; | ||
| 8 | -import io.swagger.annotations.ApiModelProperty; | 7 | +import io.swagger.v3.oas.annotations.media.Schema; |
| 9 | import lombok.Data; | 8 | import lombok.Data; |
| 10 | import lombok.EqualsAndHashCode; | 9 | import lombok.EqualsAndHashCode; |
| 11 | import lombok.ToString; | 10 | import lombok.ToString; |
| @@ -15,7 +14,7 @@ import javax.validation.constraints.AssertTrue; | @@ -15,7 +14,7 @@ import javax.validation.constraints.AssertTrue; | ||
| 15 | import javax.validation.constraints.NotNull; | 14 | import javax.validation.constraints.NotNull; |
| 16 | import java.util.List; | 15 | import java.util.List; |
| 17 | 16 | ||
| 18 | -@ApiModel("管理后台 - 代码生成表和字段的修改 Request VO") | 17 | +@Schema(title = "管理后台 - 代码生成表和字段的修改 Request VO") |
| 19 | @Data | 18 | @Data |
| 20 | public class CodegenUpdateReqVO { | 19 | public class CodegenUpdateReqVO { |
| 21 | 20 | ||
| @@ -27,14 +26,14 @@ public class CodegenUpdateReqVO { | @@ -27,14 +26,14 @@ public class CodegenUpdateReqVO { | ||
| 27 | @NotNull(message = "字段定义不能为空") | 26 | @NotNull(message = "字段定义不能为空") |
| 28 | private List<Column> columns; | 27 | private List<Column> columns; |
| 29 | 28 | ||
| 30 | - @ApiModel("更新表定义") | 29 | + @Schema(title = "更新表定义") |
| 31 | @Data | 30 | @Data |
| 32 | @EqualsAndHashCode(callSuper = true) | 31 | @EqualsAndHashCode(callSuper = true) |
| 33 | @ToString(callSuper = true) | 32 | @ToString(callSuper = true) |
| 34 | @Valid | 33 | @Valid |
| 35 | public static class Table extends CodegenTableBaseVO { | 34 | public static class Table extends CodegenTableBaseVO { |
| 36 | 35 | ||
| 37 | - @ApiModelProperty(value = "编号", required = true, example = "1") | 36 | + @Schema(title = "编号", required = true, example = "1") |
| 38 | private Long id; | 37 | private Long id; |
| 39 | 38 | ||
| 40 | @AssertTrue(message = "上级菜单不能为空") | 39 | @AssertTrue(message = "上级菜单不能为空") |
| @@ -46,13 +45,13 @@ public class CodegenUpdateReqVO { | @@ -46,13 +45,13 @@ public class CodegenUpdateReqVO { | ||
| 46 | 45 | ||
| 47 | } | 46 | } |
| 48 | 47 | ||
| 49 | - @ApiModel("更新表定义") | 48 | + @Schema(title = "更新表定义") |
| 50 | @Data | 49 | @Data |
| 51 | @EqualsAndHashCode(callSuper = true) | 50 | @EqualsAndHashCode(callSuper = true) |
| 52 | @ToString(callSuper = true) | 51 | @ToString(callSuper = true) |
| 53 | public static class Column extends CodegenColumnBaseVO { | 52 | public static class Column extends CodegenColumnBaseVO { |
| 54 | 53 | ||
| 55 | - @ApiModelProperty(value = "编号", required = true, example = "1") | 54 | + @Schema(title = "编号", required = true, example = "1") |
| 56 | private Long id; | 55 | private Long id; |
| 57 | 56 | ||
| 58 | } | 57 | } |
yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/controller/admin/codegen/vo/column/CodegenColumnBaseVO.java
| 1 | package cn.iocoder.yudao.module.infra.controller.admin.codegen.vo.column; | 1 | package cn.iocoder.yudao.module.infra.controller.admin.codegen.vo.column; |
| 2 | - | ||
| 3 | -import io.swagger.annotations.ApiModelProperty; | 2 | +import io.swagger.v3.oas.annotations.media.Schema; |
| 4 | import lombok.Data; | 3 | import lombok.Data; |
| 5 | 4 | ||
| 6 | import javax.validation.constraints.NotNull; | 5 | import javax.validation.constraints.NotNull; |
| @@ -12,73 +11,73 @@ import javax.validation.constraints.NotNull; | @@ -12,73 +11,73 @@ import javax.validation.constraints.NotNull; | ||
| 12 | @Data | 11 | @Data |
| 13 | public class CodegenColumnBaseVO { | 12 | public class CodegenColumnBaseVO { |
| 14 | 13 | ||
| 15 | - @ApiModelProperty(value = "表编号", required = true, example = "1") | 14 | + @Schema(title = "表编号", required = true, example = "1") |
| 16 | @NotNull(message = "表编号不能为空") | 15 | @NotNull(message = "表编号不能为空") |
| 17 | private Long tableId; | 16 | private Long tableId; |
| 18 | 17 | ||
| 19 | - @ApiModelProperty(value = "字段名", required = true, example = "user_age") | 18 | + @Schema(title = "字段名", required = true, example = "user_age") |
| 20 | @NotNull(message = "字段名不能为空") | 19 | @NotNull(message = "字段名不能为空") |
| 21 | private String columnName; | 20 | private String columnName; |
| 22 | 21 | ||
| 23 | - @ApiModelProperty(value = "字段类型", required = true, example = "int(11)") | 22 | + @Schema(title = "字段类型", required = true, example = "int(11)") |
| 24 | @NotNull(message = "字段类型不能为空") | 23 | @NotNull(message = "字段类型不能为空") |
| 25 | private String dataType; | 24 | private String dataType; |
| 26 | 25 | ||
| 27 | - @ApiModelProperty(value = "字段描述", required = true, example = "年龄") | 26 | + @Schema(title = "字段描述", required = true, example = "年龄") |
| 28 | @NotNull(message = "字段描述不能为空") | 27 | @NotNull(message = "字段描述不能为空") |
| 29 | private String columnComment; | 28 | private String columnComment; |
| 30 | 29 | ||
| 31 | - @ApiModelProperty(value = "是否允许为空", required = true, example = "true") | 30 | + @Schema(title = "是否允许为空", required = true, example = "true") |
| 32 | @NotNull(message = "是否允许为空不能为空") | 31 | @NotNull(message = "是否允许为空不能为空") |
| 33 | private Boolean nullable; | 32 | private Boolean nullable; |
| 34 | 33 | ||
| 35 | - @ApiModelProperty(value = "是否主键", required = true, example = "false") | 34 | + @Schema(title = "是否主键", required = true, example = "false") |
| 36 | @NotNull(message = "是否主键不能为空") | 35 | @NotNull(message = "是否主键不能为空") |
| 37 | private Boolean primaryKey; | 36 | private Boolean primaryKey; |
| 38 | 37 | ||
| 39 | - @ApiModelProperty(value = "是否自增", required = true, example = "true") | 38 | + @Schema(title = "是否自增", required = true, example = "true") |
| 40 | @NotNull(message = "是否自增不能为空") | 39 | @NotNull(message = "是否自增不能为空") |
| 41 | private String autoIncrement; | 40 | private String autoIncrement; |
| 42 | 41 | ||
| 43 | - @ApiModelProperty(value = "排序", required = true, example = "10") | 42 | + @Schema(title = "排序", required = true, example = "10") |
| 44 | @NotNull(message = "排序不能为空") | 43 | @NotNull(message = "排序不能为空") |
| 45 | private Integer ordinalPosition; | 44 | private Integer ordinalPosition; |
| 46 | 45 | ||
| 47 | - @ApiModelProperty(value = "Java 属性类型", required = true, example = "userAge") | 46 | + @Schema(title = "Java 属性类型", required = true, example = "userAge") |
| 48 | @NotNull(message = "Java 属性类型不能为空") | 47 | @NotNull(message = "Java 属性类型不能为空") |
| 49 | private String javaType; | 48 | private String javaType; |
| 50 | 49 | ||
| 51 | - @ApiModelProperty(value = "Java 属性名", required = true, example = "Integer") | 50 | + @Schema(title = "Java 属性名", required = true, example = "Integer") |
| 52 | @NotNull(message = "Java 属性名不能为空") | 51 | @NotNull(message = "Java 属性名不能为空") |
| 53 | private String javaField; | 52 | private String javaField; |
| 54 | 53 | ||
| 55 | - @ApiModelProperty(value = "字典类型", example = "sys_gender") | 54 | + @Schema(title = "字典类型", example = "sys_gender") |
| 56 | private String dictType; | 55 | private String dictType; |
| 57 | 56 | ||
| 58 | - @ApiModelProperty(value = "数据示例", example = "1024") | 57 | + @Schema(title = "数据示例", example = "1024") |
| 59 | private String example; | 58 | private String example; |
| 60 | 59 | ||
| 61 | - @ApiModelProperty(value = "是否为 Create 创建操作的字段", required = true, example = "true") | 60 | + @Schema(title = "是否为 Create 创建操作的字段", required = true, example = "true") |
| 62 | @NotNull(message = "是否为 Create 创建操作的字段不能为空") | 61 | @NotNull(message = "是否为 Create 创建操作的字段不能为空") |
| 63 | private Boolean createOperation; | 62 | private Boolean createOperation; |
| 64 | 63 | ||
| 65 | - @ApiModelProperty(value = "是否为 Update 更新操作的字段", required = true, example = "false") | 64 | + @Schema(title = "是否为 Update 更新操作的字段", required = true, example = "false") |
| 66 | @NotNull(message = "是否为 Update 更新操作的字段不能为空") | 65 | @NotNull(message = "是否为 Update 更新操作的字段不能为空") |
| 67 | private Boolean updateOperation; | 66 | private Boolean updateOperation; |
| 68 | 67 | ||
| 69 | - @ApiModelProperty(value = "是否为 List 查询操作的字段", required = true, example = "true") | 68 | + @Schema(title = "是否为 List 查询操作的字段", required = true, example = "true") |
| 70 | @NotNull(message = "是否为 List 查询操作的字段不能为空") | 69 | @NotNull(message = "是否为 List 查询操作的字段不能为空") |
| 71 | private Boolean listOperation; | 70 | private Boolean listOperation; |
| 72 | 71 | ||
| 73 | - @ApiModelProperty(value = "List 查询操作的条件类型", required = true, example = "LIKE", notes = "参见 CodegenColumnListConditionEnum 枚举") | 72 | + @Schema(title = "List 查询操作的条件类型", required = true, example = "LIKE", description = "参见 CodegenColumnListConditionEnum 枚举") |
| 74 | @NotNull(message = "List 查询操作的条件类型不能为空") | 73 | @NotNull(message = "List 查询操作的条件类型不能为空") |
| 75 | private String listOperationCondition; | 74 | private String listOperationCondition; |
| 76 | 75 | ||
| 77 | - @ApiModelProperty(value = "是否为 List 查询操作的返回字段", required = true, example = "true") | 76 | + @Schema(title = "是否为 List 查询操作的返回字段", required = true, example = "true") |
| 78 | @NotNull(message = "是否为 List 查询操作的返回字段不能为空") | 77 | @NotNull(message = "是否为 List 查询操作的返回字段不能为空") |
| 79 | private Boolean listOperationResult; | 78 | private Boolean listOperationResult; |
| 80 | 79 | ||
| 81 | - @ApiModelProperty(value = "显示类型", required = true, example = "input") | 80 | + @Schema(title = "显示类型", required = true, example = "input") |
| 82 | @NotNull(message = "显示类型不能为空") | 81 | @NotNull(message = "显示类型不能为空") |
| 83 | private String htmlType; | 82 | private String htmlType; |
| 84 | 83 |
yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/controller/admin/codegen/vo/column/CodegenColumnRespVO.java
| 1 | package cn.iocoder.yudao.module.infra.controller.admin.codegen.vo.column; | 1 | package cn.iocoder.yudao.module.infra.controller.admin.codegen.vo.column; |
| 2 | 2 | ||
| 3 | -import io.swagger.annotations.ApiModel; | ||
| 4 | -import io.swagger.annotations.ApiModelProperty; | 3 | +import io.swagger.v3.oas.annotations.media.Schema; |
| 5 | import lombok.Data; | 4 | import lombok.Data; |
| 6 | import lombok.EqualsAndHashCode; | 5 | import lombok.EqualsAndHashCode; |
| 7 | import lombok.ToString; | 6 | import lombok.ToString; |
| 8 | 7 | ||
| 9 | import java.time.LocalDateTime; | 8 | import java.time.LocalDateTime; |
| 10 | 9 | ||
| 11 | -@ApiModel("管理后台 - 代码生成字段定义 Response VO") | 10 | +@Schema(title = "管理后台 - 代码生成字段定义 Response VO") |
| 12 | @Data | 11 | @Data |
| 13 | @EqualsAndHashCode(callSuper = true) | 12 | @EqualsAndHashCode(callSuper = true) |
| 14 | @ToString(callSuper = true) | 13 | @ToString(callSuper = true) |
| 15 | public class CodegenColumnRespVO extends CodegenColumnBaseVO { | 14 | public class CodegenColumnRespVO extends CodegenColumnBaseVO { |
| 16 | 15 | ||
| 17 | - @ApiModelProperty(value = "编号", required = true, example = "1") | 16 | + @Schema(title = "编号", required = true, example = "1") |
| 18 | private Long id; | 17 | private Long id; |
| 19 | 18 | ||
| 20 | - @ApiModelProperty(value = "创建时间", required = true) | 19 | + @Schema(title = "创建时间", required = true) |
| 21 | private LocalDateTime createTime; | 20 | private LocalDateTime createTime; |
| 22 | 21 | ||
| 23 | } | 22 | } |
yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/controller/admin/codegen/vo/table/CodegenTableBaseVO.java
| 1 | package cn.iocoder.yudao.module.infra.controller.admin.codegen.vo.table; | 1 | package cn.iocoder.yudao.module.infra.controller.admin.codegen.vo.table; |
| 2 | - | ||
| 3 | -import io.swagger.annotations.ApiModelProperty; | 2 | +import io.swagger.v3.oas.annotations.media.Schema; |
| 4 | import lombok.Data; | 3 | import lombok.Data; |
| 5 | 4 | ||
| 6 | import javax.validation.constraints.NotNull; | 5 | import javax.validation.constraints.NotNull; |
| @@ -12,46 +11,46 @@ import javax.validation.constraints.NotNull; | @@ -12,46 +11,46 @@ import javax.validation.constraints.NotNull; | ||
| 12 | @Data | 11 | @Data |
| 13 | public class CodegenTableBaseVO { | 12 | public class CodegenTableBaseVO { |
| 14 | 13 | ||
| 15 | - @ApiModelProperty(value = "生成场景", required = true, example = "1", notes = "参见 CodegenSceneEnum 枚举") | 14 | + @Schema(title = "生成场景", required = true, example = "1", description = "参见 CodegenSceneEnum 枚举") |
| 16 | @NotNull(message = "导入类型不能为空") | 15 | @NotNull(message = "导入类型不能为空") |
| 17 | private Integer scene; | 16 | private Integer scene; |
| 18 | 17 | ||
| 19 | - @ApiModelProperty(value = "表名称", required = true, example = "yudao") | 18 | + @Schema(title = "表名称", required = true, example = "yudao") |
| 20 | @NotNull(message = "表名称不能为空") | 19 | @NotNull(message = "表名称不能为空") |
| 21 | private String tableName; | 20 | private String tableName; |
| 22 | 21 | ||
| 23 | - @ApiModelProperty(value = "表描述", required = true, example = "芋道") | 22 | + @Schema(title = "表描述", required = true, example = "芋道") |
| 24 | @NotNull(message = "表描述不能为空") | 23 | @NotNull(message = "表描述不能为空") |
| 25 | private String tableComment; | 24 | private String tableComment; |
| 26 | 25 | ||
| 27 | - @ApiModelProperty(value = "备注", example = "我是备注") | 26 | + @Schema(title = "备注", example = "我是备注") |
| 28 | private String remark; | 27 | private String remark; |
| 29 | 28 | ||
| 30 | - @ApiModelProperty(value = "模块名", required = true, example = "system") | 29 | + @Schema(title = "模块名", required = true, example = "system") |
| 31 | @NotNull(message = "模块名不能为空") | 30 | @NotNull(message = "模块名不能为空") |
| 32 | private String moduleName; | 31 | private String moduleName; |
| 33 | 32 | ||
| 34 | - @ApiModelProperty(value = "业务名", required = true, example = "codegen") | 33 | + @Schema(title = "业务名", required = true, example = "codegen") |
| 35 | @NotNull(message = "业务名不能为空") | 34 | @NotNull(message = "业务名不能为空") |
| 36 | private String businessName; | 35 | private String businessName; |
| 37 | 36 | ||
| 38 | - @ApiModelProperty(value = "类名称", required = true, example = "CodegenTable") | 37 | + @Schema(title = "类名称", required = true, example = "CodegenTable") |
| 39 | @NotNull(message = "类名称不能为空") | 38 | @NotNull(message = "类名称不能为空") |
| 40 | private String className; | 39 | private String className; |
| 41 | 40 | ||
| 42 | - @ApiModelProperty(value = "类描述", required = true, example = "代码生成器的表定义") | 41 | + @Schema(title = "类描述", required = true, example = "代码生成器的表定义") |
| 43 | @NotNull(message = "类描述不能为空") | 42 | @NotNull(message = "类描述不能为空") |
| 44 | private String classComment; | 43 | private String classComment; |
| 45 | 44 | ||
| 46 | - @ApiModelProperty(value = "作者", required = true, example = "芋道源码") | 45 | + @Schema(title = "作者", required = true, example = "芋道源码") |
| 47 | @NotNull(message = "作者不能为空") | 46 | @NotNull(message = "作者不能为空") |
| 48 | private String author; | 47 | private String author; |
| 49 | 48 | ||
| 50 | - @ApiModelProperty(value = "模板类型", required = true, example = "1", notes = "参见 CodegenTemplateTypeEnum 枚举") | 49 | + @Schema(title = "模板类型", required = true, example = "1", description = "参见 CodegenTemplateTypeEnum 枚举") |
| 51 | @NotNull(message = "模板类型不能为空") | 50 | @NotNull(message = "模板类型不能为空") |
| 52 | private Integer templateType; | 51 | private Integer templateType; |
| 53 | 52 | ||
| 54 | - @ApiModelProperty(value = "父菜单编号", example = "1024") | 53 | + @Schema(title = "父菜单编号", example = "1024") |
| 55 | private Long parentMenuId; | 54 | private Long parentMenuId; |
| 56 | 55 | ||
| 57 | } | 56 | } |
yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/controller/admin/codegen/vo/table/CodegenTablePageReqVO.java
| 1 | package cn.iocoder.yudao.module.infra.controller.admin.codegen.vo.table; | 1 | package cn.iocoder.yudao.module.infra.controller.admin.codegen.vo.table; |
| 2 | 2 | ||
| 3 | import cn.iocoder.yudao.framework.common.pojo.PageParam; | 3 | import cn.iocoder.yudao.framework.common.pojo.PageParam; |
| 4 | -import io.swagger.annotations.ApiModel; | ||
| 5 | -import io.swagger.annotations.ApiModelProperty; | 4 | +import io.swagger.v3.oas.annotations.media.Schema; |
| 6 | import lombok.Data; | 5 | import lombok.Data; |
| 7 | import lombok.EqualsAndHashCode; | 6 | import lombok.EqualsAndHashCode; |
| 8 | import lombok.ToString; | 7 | import lombok.ToString; |
| @@ -12,19 +11,19 @@ import java.time.LocalDateTime; | @@ -12,19 +11,19 @@ import java.time.LocalDateTime; | ||
| 12 | 11 | ||
| 13 | import static cn.iocoder.yudao.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND; | 12 | import static cn.iocoder.yudao.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND; |
| 14 | 13 | ||
| 15 | -@ApiModel("管理后台 - 表定义分页 Request VO") | 14 | +@Schema(title = "管理后台 - 表定义分页 Request VO") |
| 16 | @Data | 15 | @Data |
| 17 | @EqualsAndHashCode(callSuper = true) | 16 | @EqualsAndHashCode(callSuper = true) |
| 18 | @ToString(callSuper = true) | 17 | @ToString(callSuper = true) |
| 19 | public class CodegenTablePageReqVO extends PageParam { | 18 | public class CodegenTablePageReqVO extends PageParam { |
| 20 | 19 | ||
| 21 | - @ApiModelProperty(value = "表名称", example = "yudao", notes = "模糊匹配") | 20 | + @Schema(title = "表名称", example = "yudao", description = "模糊匹配") |
| 22 | private String tableName; | 21 | private String tableName; |
| 23 | 22 | ||
| 24 | - @ApiModelProperty(value = "表描述", example = "芋道", notes = "模糊匹配") | 23 | + @Schema(title = "表描述", example = "芋道", description = "模糊匹配") |
| 25 | private String tableComment; | 24 | private String tableComment; |
| 26 | 25 | ||
| 27 | - @ApiModelProperty(value = "创建时间", example = "[2022-07-01 00:00:00,2022-07-01 23:59:59]") | 26 | + @Schema(title = "创建时间", example = "[2022-07-01 00:00:00,2022-07-01 23:59:59]") |
| 28 | @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND) | 27 | @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND) |
| 29 | private LocalDateTime[] createTime; | 28 | private LocalDateTime[] createTime; |
| 30 | 29 |
yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/controller/admin/codegen/vo/table/CodegenTableRespVO.java
| 1 | package cn.iocoder.yudao.module.infra.controller.admin.codegen.vo.table; | 1 | package cn.iocoder.yudao.module.infra.controller.admin.codegen.vo.table; |
| 2 | 2 | ||
| 3 | -import io.swagger.annotations.ApiModel; | ||
| 4 | -import io.swagger.annotations.ApiModelProperty; | 3 | +import io.swagger.v3.oas.annotations.media.Schema; |
| 5 | import lombok.Data; | 4 | import lombok.Data; |
| 6 | import lombok.EqualsAndHashCode; | 5 | import lombok.EqualsAndHashCode; |
| 7 | import lombok.ToString; | 6 | import lombok.ToString; |
| 8 | 7 | ||
| 9 | import java.time.LocalDateTime; | 8 | import java.time.LocalDateTime; |
| 10 | 9 | ||
| 11 | -@ApiModel("管理后台 - 代码生成表定义 Response VO") | 10 | +@Schema(title = "管理后台 - 代码生成表定义 Response VO") |
| 12 | @Data | 11 | @Data |
| 13 | @EqualsAndHashCode(callSuper = true) | 12 | @EqualsAndHashCode(callSuper = true) |
| 14 | @ToString(callSuper = true) | 13 | @ToString(callSuper = true) |
| 15 | public class CodegenTableRespVO extends CodegenTableBaseVO { | 14 | public class CodegenTableRespVO extends CodegenTableBaseVO { |
| 16 | 15 | ||
| 17 | - @ApiModelProperty(value = "编号", required = true, example = "1") | 16 | + @Schema(title = "编号", required = true, example = "1") |
| 18 | private Long id; | 17 | private Long id; |
| 19 | 18 | ||
| 20 | - @ApiModelProperty(value = "主键编号", required = true, example = "1024") | 19 | + @Schema(title = "主键编号", required = true, example = "1024") |
| 21 | private Integer dataSourceConfigId; | 20 | private Integer dataSourceConfigId; |
| 22 | 21 | ||
| 23 | - @ApiModelProperty(value = "创建时间", required = true) | 22 | + @Schema(title = "创建时间", required = true) |
| 24 | private LocalDateTime createTime; | 23 | private LocalDateTime createTime; |
| 25 | 24 | ||
| 26 | - @ApiModelProperty(value = "更新时间", required = true) | 25 | + @Schema(title = "更新时间", required = true) |
| 27 | private LocalDateTime updateTime; | 26 | private LocalDateTime updateTime; |
| 28 | 27 | ||
| 29 | } | 28 | } |
yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/controller/admin/codegen/vo/table/DatabaseTableRespVO.java
| 1 | package cn.iocoder.yudao.module.infra.controller.admin.codegen.vo.table; | 1 | package cn.iocoder.yudao.module.infra.controller.admin.codegen.vo.table; |
| 2 | 2 | ||
| 3 | -import io.swagger.annotations.ApiModel; | ||
| 4 | -import io.swagger.annotations.ApiModelProperty; | 3 | +import io.swagger.v3.oas.annotations.media.Schema; |
| 5 | import lombok.Data; | 4 | import lombok.Data; |
| 6 | 5 | ||
| 7 | -@ApiModel("管理后台 - 数据库的表定义 Response VO") | 6 | +@Schema(title = "管理后台 - 数据库的表定义 Response VO") |
| 8 | @Data | 7 | @Data |
| 9 | public class DatabaseTableRespVO { | 8 | public class DatabaseTableRespVO { |
| 10 | 9 | ||
| 11 | - @ApiModelProperty(value = "表名称", required = true, example = "yuanma") | 10 | + @Schema(title = "表名称", required = true, example = "yuanma") |
| 12 | private String name; | 11 | private String name; |
| 13 | 12 | ||
| 14 | - @ApiModelProperty(value = "表描述", required = true, example = "芋道源码") | 13 | + @Schema(title = "表描述", required = true, example = "芋道源码") |
| 15 | private String comment; | 14 | private String comment; |
| 16 | 15 | ||
| 17 | } | 16 | } |
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; | @@ -10,9 +10,9 @@ import cn.iocoder.yudao.module.infra.convert.config.ConfigConvert; | ||
| 10 | import cn.iocoder.yudao.module.infra.dal.dataobject.config.ConfigDO; | 10 | import cn.iocoder.yudao.module.infra.dal.dataobject.config.ConfigDO; |
| 11 | import cn.iocoder.yudao.module.infra.service.config.ConfigService; | 11 | import cn.iocoder.yudao.module.infra.service.config.ConfigService; |
| 12 | import cn.iocoder.yudao.module.infra.enums.ErrorCodeConstants; | 12 | import cn.iocoder.yudao.module.infra.enums.ErrorCodeConstants; |
| 13 | -import io.swagger.annotations.Api; | ||
| 14 | -import io.swagger.annotations.ApiImplicitParam; | ||
| 15 | -import io.swagger.annotations.ApiOperation; | 13 | +import io.swagger.v3.oas.annotations.tags.Tag; |
| 14 | +import io.swagger.v3.oas.annotations.Parameter; | ||
| 15 | +import io.swagger.v3.oas.annotations.Operation; | ||
| 16 | import org.springframework.security.access.prepost.PreAuthorize; | 16 | import org.springframework.security.access.prepost.PreAuthorize; |
| 17 | import org.springframework.validation.annotation.Validated; | 17 | import org.springframework.validation.annotation.Validated; |
| 18 | import org.springframework.web.bind.annotation.*; | 18 | import org.springframework.web.bind.annotation.*; |
| @@ -26,7 +26,7 @@ import java.util.List; | @@ -26,7 +26,7 @@ import java.util.List; | ||
| 26 | import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success; | 26 | import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success; |
| 27 | import static cn.iocoder.yudao.framework.operatelog.core.enums.OperateTypeEnum.EXPORT; | 27 | import static cn.iocoder.yudao.framework.operatelog.core.enums.OperateTypeEnum.EXPORT; |
| 28 | 28 | ||
| 29 | -@Api(tags = "管理后台 - 参数配置") | 29 | +@Tag(name = "管理后台 - 参数配置") |
| 30 | @RestController | 30 | @RestController |
| 31 | @RequestMapping("/infra/config") | 31 | @RequestMapping("/infra/config") |
| 32 | @Validated | 32 | @Validated |
| @@ -36,14 +36,14 @@ public class ConfigController { | @@ -36,14 +36,14 @@ public class ConfigController { | ||
| 36 | private ConfigService configService; | 36 | private ConfigService configService; |
| 37 | 37 | ||
| 38 | @PostMapping("/create") | 38 | @PostMapping("/create") |
| 39 | - @ApiOperation("创建参数配置") | 39 | + @Operation(summary = "创建参数配置") |
| 40 | @PreAuthorize("@ss.hasPermission('infra:config:create')") | 40 | @PreAuthorize("@ss.hasPermission('infra:config:create')") |
| 41 | public CommonResult<Long> createConfig(@Valid @RequestBody ConfigCreateReqVO reqVO) { | 41 | public CommonResult<Long> createConfig(@Valid @RequestBody ConfigCreateReqVO reqVO) { |
| 42 | return success(configService.createConfig(reqVO)); | 42 | return success(configService.createConfig(reqVO)); |
| 43 | } | 43 | } |
| 44 | 44 | ||
| 45 | @PutMapping("/update") | 45 | @PutMapping("/update") |
| 46 | - @ApiOperation("修改参数配置") | 46 | + @Operation(summary = "修改参数配置") |
| 47 | @PreAuthorize("@ss.hasPermission('infra:config:update')") | 47 | @PreAuthorize("@ss.hasPermission('infra:config:update')") |
| 48 | public CommonResult<Boolean> updateConfig(@Valid @RequestBody ConfigUpdateReqVO reqVO) { | 48 | public CommonResult<Boolean> updateConfig(@Valid @RequestBody ConfigUpdateReqVO reqVO) { |
| 49 | configService.updateConfig(reqVO); | 49 | configService.updateConfig(reqVO); |
| @@ -51,8 +51,8 @@ public class ConfigController { | @@ -51,8 +51,8 @@ public class ConfigController { | ||
| 51 | } | 51 | } |
| 52 | 52 | ||
| 53 | @DeleteMapping("/delete") | 53 | @DeleteMapping("/delete") |
| 54 | - @ApiOperation("删除参数配置") | ||
| 55 | - @ApiImplicitParam(name = "id", value = "编号", required = true, example = "1024", dataTypeClass = Long.class) | 54 | + @Operation(summary = "删除参数配置") |
| 55 | + @Parameter(name = "id", description = "编号", required = true, example = "1024") | ||
| 56 | @PreAuthorize("@ss.hasPermission('infra:config:delete')") | 56 | @PreAuthorize("@ss.hasPermission('infra:config:delete')") |
| 57 | public CommonResult<Boolean> deleteConfig(@RequestParam("id") Long id) { | 57 | public CommonResult<Boolean> deleteConfig(@RequestParam("id") Long id) { |
| 58 | configService.deleteConfig(id); | 58 | configService.deleteConfig(id); |
| @@ -60,16 +60,16 @@ public class ConfigController { | @@ -60,16 +60,16 @@ public class ConfigController { | ||
| 60 | } | 60 | } |
| 61 | 61 | ||
| 62 | @GetMapping(value = "/get") | 62 | @GetMapping(value = "/get") |
| 63 | - @ApiOperation("获得参数配置") | ||
| 64 | - @ApiImplicitParam(name = "id", value = "编号", required = true, example = "1024", dataTypeClass = Long.class) | 63 | + @Operation(summary = "获得参数配置") |
| 64 | + @Parameter(name = "id", description = "编号", required = true, example = "1024") | ||
| 65 | @PreAuthorize("@ss.hasPermission('infra:config:query')") | 65 | @PreAuthorize("@ss.hasPermission('infra:config:query')") |
| 66 | public CommonResult<ConfigRespVO> getConfig(@RequestParam("id") Long id) { | 66 | public CommonResult<ConfigRespVO> getConfig(@RequestParam("id") Long id) { |
| 67 | return success(ConfigConvert.INSTANCE.convert(configService.getConfig(id))); | 67 | return success(ConfigConvert.INSTANCE.convert(configService.getConfig(id))); |
| 68 | } | 68 | } |
| 69 | 69 | ||
| 70 | @GetMapping(value = "/get-value-by-key") | 70 | @GetMapping(value = "/get-value-by-key") |
| 71 | - @ApiOperation(value = "根据参数键名查询参数值", notes = "不可见的配置,不允许返回给前端") | ||
| 72 | - @ApiImplicitParam(name = "key", value = "参数键", required = true, example = "yunai.biz.username", dataTypeClass = String.class) | 71 | + @Operation(summary = "根据参数键名查询参数值", description = "不可见的配置,不允许返回给前端") |
| 72 | + @Parameter(name = "key", description = "参数键", required = true, example = "yunai.biz.username") | ||
| 73 | public CommonResult<String> getConfigKey(@RequestParam("key") String key) { | 73 | public CommonResult<String> getConfigKey(@RequestParam("key") String key) { |
| 74 | ConfigDO config = configService.getConfigByKey(key); | 74 | ConfigDO config = configService.getConfigByKey(key); |
| 75 | if (config == null) { | 75 | if (config == null) { |
| @@ -82,7 +82,7 @@ public class ConfigController { | @@ -82,7 +82,7 @@ public class ConfigController { | ||
| 82 | } | 82 | } |
| 83 | 83 | ||
| 84 | @GetMapping("/page") | 84 | @GetMapping("/page") |
| 85 | - @ApiOperation("获取参数配置分页") | 85 | + @Operation(summary = "获取参数配置分页") |
| 86 | @PreAuthorize("@ss.hasPermission('infra:config:query')") | 86 | @PreAuthorize("@ss.hasPermission('infra:config:query')") |
| 87 | public CommonResult<PageResult<ConfigRespVO>> getConfigPage(@Valid ConfigPageReqVO reqVO) { | 87 | public CommonResult<PageResult<ConfigRespVO>> getConfigPage(@Valid ConfigPageReqVO reqVO) { |
| 88 | PageResult<ConfigDO> page = configService.getConfigPage(reqVO); | 88 | PageResult<ConfigDO> page = configService.getConfigPage(reqVO); |
| @@ -90,7 +90,7 @@ public class ConfigController { | @@ -90,7 +90,7 @@ public class ConfigController { | ||
| 90 | } | 90 | } |
| 91 | 91 | ||
| 92 | @GetMapping("/export") | 92 | @GetMapping("/export") |
| 93 | - @ApiOperation("导出参数配置") | 93 | + @Operation(summary = "导出参数配置") |
| 94 | @PreAuthorize("@ss.hasPermission('infra:config:export')") | 94 | @PreAuthorize("@ss.hasPermission('infra:config:export')") |
| 95 | @OperateLog(type = EXPORT) | 95 | @OperateLog(type = EXPORT) |
| 96 | public void exportSysConfig(@Valid ConfigExportReqVO reqVO, | 96 | public void exportSysConfig(@Valid ConfigExportReqVO reqVO, |
yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/controller/admin/config/vo/ConfigBaseVO.java
| 1 | package cn.iocoder.yudao.module.infra.controller.admin.config.vo; | 1 | package cn.iocoder.yudao.module.infra.controller.admin.config.vo; |
| 2 | - | ||
| 3 | -import io.swagger.annotations.ApiModelProperty; | 2 | +import io.swagger.v3.oas.annotations.media.Schema; |
| 4 | import lombok.Data; | 3 | import lombok.Data; |
| 5 | 4 | ||
| 6 | import javax.validation.constraints.NotBlank; | 5 | import javax.validation.constraints.NotBlank; |
| @@ -15,26 +14,26 @@ import javax.validation.constraints.Size; | @@ -15,26 +14,26 @@ import javax.validation.constraints.Size; | ||
| 15 | @Data | 14 | @Data |
| 16 | public class ConfigBaseVO { | 15 | public class ConfigBaseVO { |
| 17 | 16 | ||
| 18 | - @ApiModelProperty(value = "参数分组", required = true, example = "biz") | 17 | + @Schema(title = "参数分组", required = true, example = "biz") |
| 19 | @NotEmpty(message = "参数分组不能为空") | 18 | @NotEmpty(message = "参数分组不能为空") |
| 20 | @Size(max = 50, message = "参数名称不能超过50个字符") | 19 | @Size(max = 50, message = "参数名称不能超过50个字符") |
| 21 | private String category; | 20 | private String category; |
| 22 | 21 | ||
| 23 | - @ApiModelProperty(value = "参数名称", required = true, example = "数据库名") | 22 | + @Schema(title = "参数名称", required = true, example = "数据库名") |
| 24 | @NotBlank(message = "参数名称不能为空") | 23 | @NotBlank(message = "参数名称不能为空") |
| 25 | @Size(max = 100, message = "参数名称不能超过100个字符") | 24 | @Size(max = 100, message = "参数名称不能超过100个字符") |
| 26 | private String name; | 25 | private String name; |
| 27 | 26 | ||
| 28 | - @ApiModelProperty(value = "参数键值", required = true, example = "1024") | 27 | + @Schema(title = "参数键值", required = true, example = "1024") |
| 29 | @NotBlank(message = "参数键值不能为空") | 28 | @NotBlank(message = "参数键值不能为空") |
| 30 | @Size(max = 500, message = "参数键值长度不能超过500个字符") | 29 | @Size(max = 500, message = "参数键值长度不能超过500个字符") |
| 31 | private String value; | 30 | private String value; |
| 32 | 31 | ||
| 33 | - @ApiModelProperty(value = "是否敏感", required = true, example = "true") | 32 | + @Schema(title = "是否敏感", required = true, example = "true") |
| 34 | @NotNull(message = "是否敏感不能为空") | 33 | @NotNull(message = "是否敏感不能为空") |
| 35 | private Boolean visible; | 34 | private Boolean visible; |
| 36 | 35 | ||
| 37 | - @ApiModelProperty(value = "备注", example = "备注一下很帅气!") | 36 | + @Schema(title = "备注", example = "备注一下很帅气!") |
| 38 | private String remark; | 37 | private String remark; |
| 39 | 38 | ||
| 40 | } | 39 | } |
yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/controller/admin/config/vo/ConfigCreateReqVO.java
| 1 | package cn.iocoder.yudao.module.infra.controller.admin.config.vo; | 1 | package cn.iocoder.yudao.module.infra.controller.admin.config.vo; |
| 2 | 2 | ||
| 3 | -import io.swagger.annotations.ApiModel; | ||
| 4 | -import io.swagger.annotations.ApiModelProperty; | 3 | +import io.swagger.v3.oas.annotations.media.Schema; |
| 5 | import lombok.Data; | 4 | import lombok.Data; |
| 6 | import lombok.EqualsAndHashCode; | 5 | import lombok.EqualsAndHashCode; |
| 7 | 6 | ||
| 8 | import javax.validation.constraints.NotBlank; | 7 | import javax.validation.constraints.NotBlank; |
| 9 | import javax.validation.constraints.Size; | 8 | import javax.validation.constraints.Size; |
| 10 | 9 | ||
| 11 | -@ApiModel("管理后台 - 参数配置创建 Request VO") | 10 | +@Schema(title = "管理后台 - 参数配置创建 Request VO") |
| 12 | @Data | 11 | @Data |
| 13 | @EqualsAndHashCode(callSuper = true) | 12 | @EqualsAndHashCode(callSuper = true) |
| 14 | public class ConfigCreateReqVO extends ConfigBaseVO { | 13 | public class ConfigCreateReqVO extends ConfigBaseVO { |
| 15 | 14 | ||
| 16 | - @ApiModelProperty(value = "参数键名", required = true, example = "yunai.db.username") | 15 | + @Schema(title = "参数键名", required = true, example = "yunai.db.username") |
| 17 | @NotBlank(message = "参数键名长度不能为空") | 16 | @NotBlank(message = "参数键名长度不能为空") |
| 18 | @Size(max = 100, message = "参数键名长度不能超过100个字符") | 17 | @Size(max = 100, message = "参数键名长度不能超过100个字符") |
| 19 | private String key; | 18 | private String key; |
yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/controller/admin/config/vo/ConfigExportReqVO.java
| 1 | package cn.iocoder.yudao.module.infra.controller.admin.config.vo; | 1 | package cn.iocoder.yudao.module.infra.controller.admin.config.vo; |
| 2 | 2 | ||
| 3 | -import io.swagger.annotations.ApiModel; | ||
| 4 | -import io.swagger.annotations.ApiModelProperty; | 3 | +import io.swagger.v3.oas.annotations.media.Schema; |
| 5 | import lombok.Data; | 4 | import lombok.Data; |
| 6 | import org.springframework.format.annotation.DateTimeFormat; | 5 | import org.springframework.format.annotation.DateTimeFormat; |
| 7 | 6 | ||
| @@ -9,20 +8,20 @@ import java.time.LocalDateTime; | @@ -9,20 +8,20 @@ import java.time.LocalDateTime; | ||
| 9 | 8 | ||
| 10 | import static cn.iocoder.yudao.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND; | 9 | import static cn.iocoder.yudao.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND; |
| 11 | 10 | ||
| 12 | -@ApiModel("管理后台 - 参数配置导出 Request VO") | 11 | +@Schema(title = "管理后台 - 参数配置导出 Request VO") |
| 13 | @Data | 12 | @Data |
| 14 | public class ConfigExportReqVO { | 13 | public class ConfigExportReqVO { |
| 15 | 14 | ||
| 16 | - @ApiModelProperty(value = "参数名称", example = "模糊匹配") | 15 | + @Schema(title = "参数名称", example = "模糊匹配") |
| 17 | private String name; | 16 | private String name; |
| 18 | 17 | ||
| 19 | - @ApiModelProperty(value = "参数键名", example = "yunai.db.username", notes = "模糊匹配") | 18 | + @Schema(title = "参数键名", example = "yunai.db.username", description = "模糊匹配") |
| 20 | private String key; | 19 | private String key; |
| 21 | 20 | ||
| 22 | - @ApiModelProperty(value = "参数类型", example = "1", notes = "参见 SysConfigTypeEnum 枚举") | 21 | + @Schema(title = "参数类型", example = "1", description = "参见 SysConfigTypeEnum 枚举") |
| 23 | private Integer type; | 22 | private Integer type; |
| 24 | 23 | ||
| 25 | - @ApiModelProperty(value = "创建时间", example = "[2022-07-01 00:00:00,2022-07-01 23:59:59]") | 24 | + @Schema(title = "创建时间", example = "[2022-07-01 00:00:00,2022-07-01 23:59:59]") |
| 26 | @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND) | 25 | @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND) |
| 27 | private LocalDateTime[] createTime; | 26 | private LocalDateTime[] createTime; |
| 28 | 27 |
yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/controller/admin/config/vo/ConfigPageReqVO.java
| 1 | package cn.iocoder.yudao.module.infra.controller.admin.config.vo; | 1 | package cn.iocoder.yudao.module.infra.controller.admin.config.vo; |
| 2 | 2 | ||
| 3 | import cn.iocoder.yudao.framework.common.pojo.PageParam; | 3 | import cn.iocoder.yudao.framework.common.pojo.PageParam; |
| 4 | -import io.swagger.annotations.ApiModel; | ||
| 5 | -import io.swagger.annotations.ApiModelProperty; | 4 | +import io.swagger.v3.oas.annotations.media.Schema; |
| 6 | import lombok.Data; | 5 | import lombok.Data; |
| 7 | import lombok.EqualsAndHashCode; | 6 | import lombok.EqualsAndHashCode; |
| 8 | import lombok.ToString; | 7 | import lombok.ToString; |
| @@ -12,22 +11,22 @@ import java.time.LocalDateTime; | @@ -12,22 +11,22 @@ import java.time.LocalDateTime; | ||
| 12 | 11 | ||
| 13 | import static cn.iocoder.yudao.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND; | 12 | import static cn.iocoder.yudao.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND; |
| 14 | 13 | ||
| 15 | -@ApiModel("管理后台 - 参数配置分页 Request VO") | 14 | +@Schema(title = "管理后台 - 参数配置分页 Request VO") |
| 16 | @Data | 15 | @Data |
| 17 | @EqualsAndHashCode(callSuper = true) | 16 | @EqualsAndHashCode(callSuper = true) |
| 18 | @ToString(callSuper = true) | 17 | @ToString(callSuper = true) |
| 19 | public class ConfigPageReqVO extends PageParam { | 18 | public class ConfigPageReqVO extends PageParam { |
| 20 | 19 | ||
| 21 | - @ApiModelProperty(value = "数据源名称", example = "模糊匹配") | 20 | + @Schema(title = "数据源名称", example = "模糊匹配") |
| 22 | private String name; | 21 | private String name; |
| 23 | 22 | ||
| 24 | - @ApiModelProperty(value = "参数键名", example = "yunai.db.username", notes = "模糊匹配") | 23 | + @Schema(title = "参数键名", example = "yunai.db.username", description = "模糊匹配") |
| 25 | private String key; | 24 | private String key; |
| 26 | 25 | ||
| 27 | - @ApiModelProperty(value = "参数类型", example = "1", notes = "参见 SysConfigTypeEnum 枚举") | 26 | + @Schema(title = "参数类型", example = "1", description = "参见 SysConfigTypeEnum 枚举") |
| 28 | private Integer type; | 27 | private Integer type; |
| 29 | 28 | ||
| 30 | - @ApiModelProperty(value = "创建时间", example = "[2022-07-01 00:00:00,2022-07-01 23:59:59]") | 29 | + @Schema(title = "创建时间", example = "[2022-07-01 00:00:00,2022-07-01 23:59:59]") |
| 31 | @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND) | 30 | @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND) |
| 32 | private LocalDateTime[] createTime; | 31 | private LocalDateTime[] createTime; |
| 33 | 32 |
yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/controller/admin/config/vo/ConfigRespVO.java
| 1 | package cn.iocoder.yudao.module.infra.controller.admin.config.vo; | 1 | package cn.iocoder.yudao.module.infra.controller.admin.config.vo; |
| 2 | 2 | ||
| 3 | -import io.swagger.annotations.ApiModel; | ||
| 4 | -import io.swagger.annotations.ApiModelProperty; | 3 | +import io.swagger.v3.oas.annotations.media.Schema; |
| 5 | import lombok.Data; | 4 | import lombok.Data; |
| 6 | import lombok.EqualsAndHashCode; | 5 | import lombok.EqualsAndHashCode; |
| 7 | 6 | ||
| @@ -9,23 +8,23 @@ import javax.validation.constraints.NotBlank; | @@ -9,23 +8,23 @@ import javax.validation.constraints.NotBlank; | ||
| 9 | import javax.validation.constraints.Size; | 8 | import javax.validation.constraints.Size; |
| 10 | import java.time.LocalDateTime; | 9 | import java.time.LocalDateTime; |
| 11 | 10 | ||
| 12 | -@ApiModel("管理后台 - 参数配置信息 Response VO") | 11 | +@Schema(title = "管理后台 - 参数配置信息 Response VO") |
| 13 | @Data | 12 | @Data |
| 14 | @EqualsAndHashCode(callSuper = true) | 13 | @EqualsAndHashCode(callSuper = true) |
| 15 | public class ConfigRespVO extends ConfigBaseVO { | 14 | public class ConfigRespVO extends ConfigBaseVO { |
| 16 | 15 | ||
| 17 | - @ApiModelProperty(value = "参数配置序号", required = true, example = "1024") | 16 | + @Schema(title = "参数配置序号", required = true, example = "1024") |
| 18 | private Long id; | 17 | private Long id; |
| 19 | 18 | ||
| 20 | - @ApiModelProperty(value = "参数键名", required = true, example = "yunai.db.username") | 19 | + @Schema(title = "参数键名", required = true, example = "yunai.db.username") |
| 21 | @NotBlank(message = "参数键名长度不能为空") | 20 | @NotBlank(message = "参数键名长度不能为空") |
| 22 | @Size(max = 100, message = "参数键名长度不能超过100个字符") | 21 | @Size(max = 100, message = "参数键名长度不能超过100个字符") |
| 23 | private String key; | 22 | private String key; |
| 24 | 23 | ||
| 25 | - @ApiModelProperty(value = "参数类型", required = true, example = "1", notes = "参见 SysConfigTypeEnum 枚举") | 24 | + @Schema(title = "参数类型", required = true, example = "1", description = "参见 SysConfigTypeEnum 枚举") |
| 26 | private Integer type; | 25 | private Integer type; |
| 27 | 26 | ||
| 28 | - @ApiModelProperty(value = "创建时间", required = true, example = "时间戳格式") | 27 | + @Schema(title = "创建时间", required = true, example = "时间戳格式") |
| 29 | private LocalDateTime createTime; | 28 | private LocalDateTime createTime; |
| 30 | 29 | ||
| 31 | } | 30 | } |
yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/controller/admin/config/vo/ConfigUpdateReqVO.java
| 1 | package cn.iocoder.yudao.module.infra.controller.admin.config.vo; | 1 | package cn.iocoder.yudao.module.infra.controller.admin.config.vo; |
| 2 | 2 | ||
| 3 | -import io.swagger.annotations.ApiModel; | ||
| 4 | -import io.swagger.annotations.ApiModelProperty; | 3 | +import io.swagger.v3.oas.annotations.media.Schema; |
| 5 | import lombok.Data; | 4 | import lombok.Data; |
| 6 | import lombok.EqualsAndHashCode; | 5 | import lombok.EqualsAndHashCode; |
| 7 | import lombok.ToString; | 6 | import lombok.ToString; |
| 8 | 7 | ||
| 9 | import javax.validation.constraints.NotNull; | 8 | import javax.validation.constraints.NotNull; |
| 10 | 9 | ||
| 11 | -@ApiModel("管理后台 - 参数配置创建 Request VO") | 10 | +@Schema(title = "管理后台 - 参数配置创建 Request VO") |
| 12 | @Data | 11 | @Data |
| 13 | @EqualsAndHashCode(callSuper = true) | 12 | @EqualsAndHashCode(callSuper = true) |
| 14 | @ToString(callSuper = true) | 13 | @ToString(callSuper = true) |
| 15 | public class ConfigUpdateReqVO extends ConfigBaseVO { | 14 | public class ConfigUpdateReqVO extends ConfigBaseVO { |
| 16 | 15 | ||
| 17 | - @ApiModelProperty(value = "参数配置序号", required = true, example = "1024") | 16 | + @Schema(title = "参数配置序号", required = true, example = "1024") |
| 18 | @NotNull(message = "参数配置编号不能为空") | 17 | @NotNull(message = "参数配置编号不能为空") |
| 19 | private Long id; | 18 | private Long id; |
| 20 | 19 |
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 | @@ -7,9 +7,9 @@ import cn.iocoder.yudao.module.infra.controller.admin.db.vo.DataSourceConfigUpda | ||
| 7 | import cn.iocoder.yudao.module.infra.convert.db.DataSourceConfigConvert; | 7 | import cn.iocoder.yudao.module.infra.convert.db.DataSourceConfigConvert; |
| 8 | import cn.iocoder.yudao.module.infra.dal.dataobject.db.DataSourceConfigDO; | 8 | import cn.iocoder.yudao.module.infra.dal.dataobject.db.DataSourceConfigDO; |
| 9 | import cn.iocoder.yudao.module.infra.service.db.DataSourceConfigService; | 9 | import cn.iocoder.yudao.module.infra.service.db.DataSourceConfigService; |
| 10 | -import io.swagger.annotations.Api; | ||
| 11 | -import io.swagger.annotations.ApiImplicitParam; | ||
| 12 | -import io.swagger.annotations.ApiOperation; | 10 | +import io.swagger.v3.oas.annotations.tags.Tag; |
| 11 | +import io.swagger.v3.oas.annotations.Parameter; | ||
| 12 | +import io.swagger.v3.oas.annotations.Operation; | ||
| 13 | import org.springframework.security.access.prepost.PreAuthorize; | 13 | import org.springframework.security.access.prepost.PreAuthorize; |
| 14 | import org.springframework.validation.annotation.Validated; | 14 | import org.springframework.validation.annotation.Validated; |
| 15 | import org.springframework.web.bind.annotation.*; | 15 | import org.springframework.web.bind.annotation.*; |
| @@ -20,7 +20,7 @@ import java.util.List; | @@ -20,7 +20,7 @@ import java.util.List; | ||
| 20 | 20 | ||
| 21 | import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success; | 21 | import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success; |
| 22 | 22 | ||
| 23 | -@Api(tags = "管理后台 - 数据源配置") | 23 | +@Tag(name = "管理后台 - 数据源配置") |
| 24 | @RestController | 24 | @RestController |
| 25 | @RequestMapping("/infra/data-source-config") | 25 | @RequestMapping("/infra/data-source-config") |
| 26 | @Validated | 26 | @Validated |
| @@ -30,14 +30,14 @@ public class DataSourceConfigController { | @@ -30,14 +30,14 @@ public class DataSourceConfigController { | ||
| 30 | private DataSourceConfigService dataSourceConfigService; | 30 | private DataSourceConfigService dataSourceConfigService; |
| 31 | 31 | ||
| 32 | @PostMapping("/create") | 32 | @PostMapping("/create") |
| 33 | - @ApiOperation("创建数据源配置") | 33 | + @Operation(summary = "创建数据源配置") |
| 34 | @PreAuthorize("@ss.hasPermission('infra:data-source-config:create')") | 34 | @PreAuthorize("@ss.hasPermission('infra:data-source-config:create')") |
| 35 | public CommonResult<Long> createDataSourceConfig(@Valid @RequestBody DataSourceConfigCreateReqVO createReqVO) { | 35 | public CommonResult<Long> createDataSourceConfig(@Valid @RequestBody DataSourceConfigCreateReqVO createReqVO) { |
| 36 | return success(dataSourceConfigService.createDataSourceConfig(createReqVO)); | 36 | return success(dataSourceConfigService.createDataSourceConfig(createReqVO)); |
| 37 | } | 37 | } |
| 38 | 38 | ||
| 39 | @PutMapping("/update") | 39 | @PutMapping("/update") |
| 40 | - @ApiOperation("更新数据源配置") | 40 | + @Operation(summary = "更新数据源配置") |
| 41 | @PreAuthorize("@ss.hasPermission('infra:data-source-config:update')") | 41 | @PreAuthorize("@ss.hasPermission('infra:data-source-config:update')") |
| 42 | public CommonResult<Boolean> updateDataSourceConfig(@Valid @RequestBody DataSourceConfigUpdateReqVO updateReqVO) { | 42 | public CommonResult<Boolean> updateDataSourceConfig(@Valid @RequestBody DataSourceConfigUpdateReqVO updateReqVO) { |
| 43 | dataSourceConfigService.updateDataSourceConfig(updateReqVO); | 43 | dataSourceConfigService.updateDataSourceConfig(updateReqVO); |
| @@ -45,8 +45,8 @@ public class DataSourceConfigController { | @@ -45,8 +45,8 @@ public class DataSourceConfigController { | ||
| 45 | } | 45 | } |
| 46 | 46 | ||
| 47 | @DeleteMapping("/delete") | 47 | @DeleteMapping("/delete") |
| 48 | - @ApiOperation("删除数据源配置") | ||
| 49 | - @ApiImplicitParam(name = "id", value = "编号", required = true, dataTypeClass = Long.class) | 48 | + @Operation(summary = "删除数据源配置") |
| 49 | + @Parameter(name = "id", description = "编号", required = true) | ||
| 50 | @PreAuthorize("@ss.hasPermission('infra:data-source-config:delete')") | 50 | @PreAuthorize("@ss.hasPermission('infra:data-source-config:delete')") |
| 51 | public CommonResult<Boolean> deleteDataSourceConfig(@RequestParam("id") Long id) { | 51 | public CommonResult<Boolean> deleteDataSourceConfig(@RequestParam("id") Long id) { |
| 52 | dataSourceConfigService.deleteDataSourceConfig(id); | 52 | dataSourceConfigService.deleteDataSourceConfig(id); |
| @@ -54,8 +54,8 @@ public class DataSourceConfigController { | @@ -54,8 +54,8 @@ public class DataSourceConfigController { | ||
| 54 | } | 54 | } |
| 55 | 55 | ||
| 56 | @GetMapping("/get") | 56 | @GetMapping("/get") |
| 57 | - @ApiOperation("获得数据源配置") | ||
| 58 | - @ApiImplicitParam(name = "id", value = "编号", required = true, example = "1024", dataTypeClass = Long.class) | 57 | + @Operation(summary = "获得数据源配置") |
| 58 | + @Parameter(name = "id", description = "编号", required = true, example = "1024") | ||
| 59 | @PreAuthorize("@ss.hasPermission('infra:data-source-config:query')") | 59 | @PreAuthorize("@ss.hasPermission('infra:data-source-config:query')") |
| 60 | public CommonResult<DataSourceConfigRespVO> getDataSourceConfig(@RequestParam("id") Long id) { | 60 | public CommonResult<DataSourceConfigRespVO> getDataSourceConfig(@RequestParam("id") Long id) { |
| 61 | DataSourceConfigDO dataSourceConfig = dataSourceConfigService.getDataSourceConfig(id); | 61 | DataSourceConfigDO dataSourceConfig = dataSourceConfigService.getDataSourceConfig(id); |
| @@ -63,7 +63,7 @@ public class DataSourceConfigController { | @@ -63,7 +63,7 @@ public class DataSourceConfigController { | ||
| 63 | } | 63 | } |
| 64 | 64 | ||
| 65 | @GetMapping("/list") | 65 | @GetMapping("/list") |
| 66 | - @ApiOperation("获得数据源配置列表") | 66 | + @Operation(summary = "获得数据源配置列表") |
| 67 | @PreAuthorize("@ss.hasPermission('infra:data-source-config:query')") | 67 | @PreAuthorize("@ss.hasPermission('infra:data-source-config:query')") |
| 68 | public CommonResult<List<DataSourceConfigRespVO>> getDataSourceConfigList() { | 68 | public CommonResult<List<DataSourceConfigRespVO>> getDataSourceConfigList() { |
| 69 | List<DataSourceConfigDO> list = dataSourceConfigService.getDataSourceConfigList(); | 69 | List<DataSourceConfigDO> list = dataSourceConfigService.getDataSourceConfigList(); |
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 | @@ -13,9 +13,9 @@ import com.baomidou.dynamic.datasource.spring.boot.autoconfigure.DataSourcePrope | ||
| 13 | import com.baomidou.dynamic.datasource.spring.boot.autoconfigure.DynamicDataSourceProperties; | 13 | import com.baomidou.dynamic.datasource.spring.boot.autoconfigure.DynamicDataSourceProperties; |
| 14 | import com.zaxxer.hikari.HikariConfig; | 14 | import com.zaxxer.hikari.HikariConfig; |
| 15 | import com.zaxxer.hikari.HikariDataSource; | 15 | import com.zaxxer.hikari.HikariDataSource; |
| 16 | -import io.swagger.annotations.Api; | ||
| 17 | -import io.swagger.annotations.ApiImplicitParam; | ||
| 18 | -import io.swagger.annotations.ApiOperation; | 16 | +import io.swagger.v3.oas.annotations.tags.Tag; |
| 17 | +import io.swagger.v3.oas.annotations.Parameter; | ||
| 18 | +import io.swagger.v3.oas.annotations.Operation; | ||
| 19 | import org.springframework.web.bind.annotation.GetMapping; | 19 | import org.springframework.web.bind.annotation.GetMapping; |
| 20 | import org.springframework.web.bind.annotation.RequestMapping; | 20 | import org.springframework.web.bind.annotation.RequestMapping; |
| 21 | import org.springframework.web.bind.annotation.RequestParam; | 21 | import org.springframework.web.bind.annotation.RequestParam; |
| @@ -27,7 +27,7 @@ import java.io.File; | @@ -27,7 +27,7 @@ import java.io.File; | ||
| 27 | import java.io.IOException; | 27 | import java.io.IOException; |
| 28 | import java.util.Arrays; | 28 | import java.util.Arrays; |
| 29 | 29 | ||
| 30 | -@Api(tags = "管理后台 - 数据库文档") | 30 | +@Tag(name = "管理后台 - 数据库文档") |
| 31 | @RestController | 31 | @RestController |
| 32 | @RequestMapping("/infra/db-doc") | 32 | @RequestMapping("/infra/db-doc") |
| 33 | public class DatabaseDocController { | 33 | public class DatabaseDocController { |
| @@ -42,27 +42,24 @@ public class DatabaseDocController { | @@ -42,27 +42,24 @@ public class DatabaseDocController { | ||
| 42 | private static final String DOC_DESCRIPTION = "文档描述"; | 42 | private static final String DOC_DESCRIPTION = "文档描述"; |
| 43 | 43 | ||
| 44 | @GetMapping("/export-html") | 44 | @GetMapping("/export-html") |
| 45 | - @ApiOperation("导出 html 格式的数据文档") | ||
| 46 | - @ApiImplicitParam(name = "deleteFile", value = "是否删除在服务器本地生成的数据库文档", example = "true", | ||
| 47 | - dataTypeClass = Boolean.class) | 45 | + @Operation(summary = "导出 html 格式的数据文档") |
| 46 | + @Parameter(name = "deleteFile", description = "是否删除在服务器本地生成的数据库文档", example = "true") | ||
| 48 | public void exportHtml(@RequestParam(defaultValue = "true") Boolean deleteFile, | 47 | public void exportHtml(@RequestParam(defaultValue = "true") Boolean deleteFile, |
| 49 | HttpServletResponse response) throws IOException { | 48 | HttpServletResponse response) throws IOException { |
| 50 | doExportFile(EngineFileType.HTML, deleteFile, response); | 49 | doExportFile(EngineFileType.HTML, deleteFile, response); |
| 51 | } | 50 | } |
| 52 | 51 | ||
| 53 | @GetMapping("/export-word") | 52 | @GetMapping("/export-word") |
| 54 | - @ApiOperation("导出 word 格式的数据文档") | ||
| 55 | - @ApiImplicitParam(name = "deleteFile", value = "是否删除在服务器本地生成的数据库文档", example = "true", | ||
| 56 | - dataTypeClass = Boolean.class) | 53 | + @Operation(summary = "导出 word 格式的数据文档") |
| 54 | + @Parameter(name = "deleteFile", description = "是否删除在服务器本地生成的数据库文档", example = "true") | ||
| 57 | public void exportWord(@RequestParam(defaultValue = "true") Boolean deleteFile, | 55 | public void exportWord(@RequestParam(defaultValue = "true") Boolean deleteFile, |
| 58 | HttpServletResponse response) throws IOException { | 56 | HttpServletResponse response) throws IOException { |
| 59 | doExportFile(EngineFileType.WORD, deleteFile, response); | 57 | doExportFile(EngineFileType.WORD, deleteFile, response); |
| 60 | } | 58 | } |
| 61 | 59 | ||
| 62 | @GetMapping("/export-markdown") | 60 | @GetMapping("/export-markdown") |
| 63 | - @ApiOperation("导出 markdown 格式的数据文档") | ||
| 64 | - @ApiImplicitParam(name = "deleteFile", value = "是否删除在服务器本地生成的数据库文档", example = "true", | ||
| 65 | - dataTypeClass = Boolean.class) | 61 | + @Operation(summary = "导出 markdown 格式的数据文档") |
| 62 | + @Parameter(name = "deleteFile", description = "是否删除在服务器本地生成的数据库文档", example = "true") | ||
| 66 | public void exportMarkdown(@RequestParam(defaultValue = "true") Boolean deleteFile, | 63 | public void exportMarkdown(@RequestParam(defaultValue = "true") Boolean deleteFile, |
| 67 | HttpServletResponse response) throws IOException { | 64 | HttpServletResponse response) throws IOException { |
| 68 | doExportFile(EngineFileType.MD, deleteFile, response); | 65 | doExportFile(EngineFileType.MD, deleteFile, response); |
yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/controller/admin/db/vo/DataSourceConfigBaseVO.java
| 1 | package cn.iocoder.yudao.module.infra.controller.admin.db.vo; | 1 | package cn.iocoder.yudao.module.infra.controller.admin.db.vo; |
| 2 | - | 2 | +import io.swagger.v3.oas.annotations.media.Schema; |
| 3 | import lombok.*; | 3 | import lombok.*; |
| 4 | -import java.util.*; | ||
| 5 | -import io.swagger.annotations.*; | ||
| 6 | import javax.validation.constraints.*; | 4 | import javax.validation.constraints.*; |
| 7 | 5 | ||
| 8 | /** | 6 | /** |
| @@ -12,15 +10,15 @@ import javax.validation.constraints.*; | @@ -12,15 +10,15 @@ import javax.validation.constraints.*; | ||
| 12 | @Data | 10 | @Data |
| 13 | public class DataSourceConfigBaseVO { | 11 | public class DataSourceConfigBaseVO { |
| 14 | 12 | ||
| 15 | - @ApiModelProperty(value = "数据源名称", required = true, example = "test") | 13 | + @Schema(title = "数据源名称", required = true, example = "test") |
| 16 | @NotNull(message = "数据源名称不能为空") | 14 | @NotNull(message = "数据源名称不能为空") |
| 17 | private String name; | 15 | private String name; |
| 18 | 16 | ||
| 19 | - @ApiModelProperty(value = "数据源连接", required = true, example = "jdbc:mysql://127.0.0.1:3306/ruoyi-vue-pro") | 17 | + @Schema(title = "数据源连接", required = true, example = "jdbc:mysql://127.0.0.1:3306/ruoyi-vue-pro") |
| 20 | @NotNull(message = "数据源连接不能为空") | 18 | @NotNull(message = "数据源连接不能为空") |
| 21 | private String url; | 19 | private String url; |
| 22 | 20 | ||
| 23 | - @ApiModelProperty(value = "用户名", required = true, example = "root") | 21 | + @Schema(title = "用户名", required = true, example = "root") |
| 24 | @NotNull(message = "用户名不能为空") | 22 | @NotNull(message = "用户名不能为空") |
| 25 | private String username; | 23 | private String username; |
| 26 | 24 |
yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/controller/admin/db/vo/DataSourceConfigCreateReqVO.java
| 1 | package cn.iocoder.yudao.module.infra.controller.admin.db.vo; | 1 | package cn.iocoder.yudao.module.infra.controller.admin.db.vo; |
| 2 | - | 2 | +import io.swagger.v3.oas.annotations.media.Schema; |
| 3 | import lombok.*; | 3 | import lombok.*; |
| 4 | -import java.util.*; | ||
| 5 | -import io.swagger.annotations.*; | ||
| 6 | import javax.validation.constraints.*; | 4 | import javax.validation.constraints.*; |
| 7 | 5 | ||
| 8 | -@ApiModel("管理后台 - 数据源配置创建 Request VO") | 6 | +@Schema(title = "管理后台 - 数据源配置创建 Request VO") |
| 9 | @Data | 7 | @Data |
| 10 | @EqualsAndHashCode(callSuper = true) | 8 | @EqualsAndHashCode(callSuper = true) |
| 11 | @ToString(callSuper = true) | 9 | @ToString(callSuper = true) |
| 12 | public class DataSourceConfigCreateReqVO extends DataSourceConfigBaseVO { | 10 | public class DataSourceConfigCreateReqVO extends DataSourceConfigBaseVO { |
| 13 | 11 | ||
| 14 | - @ApiModelProperty(value = "密码", required = true, example = "123456") | 12 | + @Schema(title = "密码", required = true, example = "123456") |
| 15 | @NotNull(message = "密码不能为空") | 13 | @NotNull(message = "密码不能为空") |
| 16 | private String password; | 14 | private String password; |
| 17 | 15 |
yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/controller/admin/db/vo/DataSourceConfigRespVO.java
| 1 | package cn.iocoder.yudao.module.infra.controller.admin.db.vo; | 1 | package cn.iocoder.yudao.module.infra.controller.admin.db.vo; |
| 2 | - | 2 | +import io.swagger.v3.oas.annotations.media.Schema; |
| 3 | import lombok.*; | 3 | import lombok.*; |
| 4 | 4 | ||
| 5 | import java.time.LocalDateTime; | 5 | import java.time.LocalDateTime; |
| 6 | -import io.swagger.annotations.*; | ||
| 7 | 6 | ||
| 8 | -@ApiModel("管理后台 - 数据源配置 Response VO") | 7 | +@Schema(title = "管理后台 - 数据源配置 Response VO") |
| 9 | @Data | 8 | @Data |
| 10 | @EqualsAndHashCode(callSuper = true) | 9 | @EqualsAndHashCode(callSuper = true) |
| 11 | @ToString(callSuper = true) | 10 | @ToString(callSuper = true) |
| 12 | public class DataSourceConfigRespVO extends DataSourceConfigBaseVO { | 11 | public class DataSourceConfigRespVO extends DataSourceConfigBaseVO { |
| 13 | 12 | ||
| 14 | - @ApiModelProperty(value = "主键编号", required = true, example = "1024") | 13 | + @Schema(title = "主键编号", required = true, example = "1024") |
| 15 | private Integer id; | 14 | private Integer id; |
| 16 | 15 | ||
| 17 | - @ApiModelProperty(value = "创建时间", required = true) | 16 | + @Schema(title = "创建时间", required = true) |
| 18 | private LocalDateTime createTime; | 17 | private LocalDateTime createTime; |
| 19 | 18 | ||
| 20 | } | 19 | } |
yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/controller/admin/db/vo/DataSourceConfigUpdateReqVO.java
| 1 | package cn.iocoder.yudao.module.infra.controller.admin.db.vo; | 1 | package cn.iocoder.yudao.module.infra.controller.admin.db.vo; |
| 2 | - | 2 | +import io.swagger.v3.oas.annotations.media.Schema; |
| 3 | import lombok.*; | 3 | import lombok.*; |
| 4 | -import java.util.*; | ||
| 5 | -import io.swagger.annotations.*; | ||
| 6 | import javax.validation.constraints.*; | 4 | import javax.validation.constraints.*; |
| 7 | 5 | ||
| 8 | -@ApiModel("管理后台 - 数据源配置更新 Request VO") | 6 | +@Schema(title = "管理后台 - 数据源配置更新 Request VO") |
| 9 | @Data | 7 | @Data |
| 10 | @EqualsAndHashCode(callSuper = true) | 8 | @EqualsAndHashCode(callSuper = true) |
| 11 | @ToString(callSuper = true) | 9 | @ToString(callSuper = true) |
| 12 | public class DataSourceConfigUpdateReqVO extends DataSourceConfigBaseVO { | 10 | public class DataSourceConfigUpdateReqVO extends DataSourceConfigBaseVO { |
| 13 | 11 | ||
| 14 | - @ApiModelProperty(value = "主键编号", required = true, example = "1024") | 12 | + @Schema(title = "主键编号", required = true, example = "1024") |
| 15 | @NotNull(message = "主键编号不能为空") | 13 | @NotNull(message = "主键编号不能为空") |
| 16 | private Long id; | 14 | private Long id; |
| 17 | 15 | ||
| 18 | - @ApiModelProperty(value = "密码", required = true, example = "123456") | 16 | + @Schema(title = "密码", required = true, example = "123456") |
| 19 | @NotNull(message = "密码不能为空") | 17 | @NotNull(message = "密码不能为空") |
| 20 | private String password; | 18 | private String password; |
| 21 | 19 |
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 | @@ -9,9 +9,9 @@ import cn.iocoder.yudao.module.infra.controller.admin.file.vo.config.FileConfigU | ||
| 9 | import cn.iocoder.yudao.module.infra.convert.file.FileConfigConvert; | 9 | import cn.iocoder.yudao.module.infra.convert.file.FileConfigConvert; |
| 10 | import cn.iocoder.yudao.module.infra.dal.dataobject.file.FileConfigDO; | 10 | import cn.iocoder.yudao.module.infra.dal.dataobject.file.FileConfigDO; |
| 11 | import cn.iocoder.yudao.module.infra.service.file.FileConfigService; | 11 | import cn.iocoder.yudao.module.infra.service.file.FileConfigService; |
| 12 | -import io.swagger.annotations.Api; | ||
| 13 | -import io.swagger.annotations.ApiImplicitParam; | ||
| 14 | -import io.swagger.annotations.ApiOperation; | 12 | +import io.swagger.v3.oas.annotations.tags.Tag; |
| 13 | +import io.swagger.v3.oas.annotations.Parameter; | ||
| 14 | +import io.swagger.v3.oas.annotations.Operation; | ||
| 15 | import org.springframework.security.access.prepost.PreAuthorize; | 15 | import org.springframework.security.access.prepost.PreAuthorize; |
| 16 | import org.springframework.validation.annotation.Validated; | 16 | import org.springframework.validation.annotation.Validated; |
| 17 | import org.springframework.web.bind.annotation.*; | 17 | import org.springframework.web.bind.annotation.*; |
| @@ -21,7 +21,7 @@ import javax.validation.Valid; | @@ -21,7 +21,7 @@ import javax.validation.Valid; | ||
| 21 | 21 | ||
| 22 | import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success; | 22 | import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success; |
| 23 | 23 | ||
| 24 | -@Api(tags = "管理后台 - 文件配置") | 24 | +@Tag(name = "管理后台 - 文件配置") |
| 25 | @RestController | 25 | @RestController |
| 26 | @RequestMapping("/infra/file-config") | 26 | @RequestMapping("/infra/file-config") |
| 27 | @Validated | 27 | @Validated |
| @@ -31,14 +31,14 @@ public class FileConfigController { | @@ -31,14 +31,14 @@ public class FileConfigController { | ||
| 31 | private FileConfigService fileConfigService; | 31 | private FileConfigService fileConfigService; |
| 32 | 32 | ||
| 33 | @PostMapping("/create") | 33 | @PostMapping("/create") |
| 34 | - @ApiOperation("创建文件配置") | 34 | + @Operation(summary = "创建文件配置") |
| 35 | @PreAuthorize("@ss.hasPermission('infra:file-config:create')") | 35 | @PreAuthorize("@ss.hasPermission('infra:file-config:create')") |
| 36 | public CommonResult<Long> createFileConfig(@Valid @RequestBody FileConfigCreateReqVO createReqVO) { | 36 | public CommonResult<Long> createFileConfig(@Valid @RequestBody FileConfigCreateReqVO createReqVO) { |
| 37 | return success(fileConfigService.createFileConfig(createReqVO)); | 37 | return success(fileConfigService.createFileConfig(createReqVO)); |
| 38 | } | 38 | } |
| 39 | 39 | ||
| 40 | @PutMapping("/update") | 40 | @PutMapping("/update") |
| 41 | - @ApiOperation("更新文件配置") | 41 | + @Operation(summary = "更新文件配置") |
| 42 | @PreAuthorize("@ss.hasPermission('infra:file-config:update')") | 42 | @PreAuthorize("@ss.hasPermission('infra:file-config:update')") |
| 43 | public CommonResult<Boolean> updateFileConfig(@Valid @RequestBody FileConfigUpdateReqVO updateReqVO) { | 43 | public CommonResult<Boolean> updateFileConfig(@Valid @RequestBody FileConfigUpdateReqVO updateReqVO) { |
| 44 | fileConfigService.updateFileConfig(updateReqVO); | 44 | fileConfigService.updateFileConfig(updateReqVO); |
| @@ -46,7 +46,7 @@ public class FileConfigController { | @@ -46,7 +46,7 @@ public class FileConfigController { | ||
| 46 | } | 46 | } |
| 47 | 47 | ||
| 48 | @PutMapping("/update-master") | 48 | @PutMapping("/update-master") |
| 49 | - @ApiOperation("更新文件配置为 Master") | 49 | + @Operation(summary = "更新文件配置为 Master") |
| 50 | @PreAuthorize("@ss.hasPermission('infra:file-config:update')") | 50 | @PreAuthorize("@ss.hasPermission('infra:file-config:update')") |
| 51 | public CommonResult<Boolean> updateFileConfigMaster(@RequestParam("id") Long id) { | 51 | public CommonResult<Boolean> updateFileConfigMaster(@RequestParam("id") Long id) { |
| 52 | fileConfigService.updateFileConfigMaster(id); | 52 | fileConfigService.updateFileConfigMaster(id); |
| @@ -54,8 +54,8 @@ public class FileConfigController { | @@ -54,8 +54,8 @@ public class FileConfigController { | ||
| 54 | } | 54 | } |
| 55 | 55 | ||
| 56 | @DeleteMapping("/delete") | 56 | @DeleteMapping("/delete") |
| 57 | - @ApiOperation("删除文件配置") | ||
| 58 | - @ApiImplicitParam(name = "id", value = "编号", required = true, dataTypeClass = Long.class) | 57 | + @Operation(summary = "删除文件配置") |
| 58 | + @Parameter(name = "id", description = "编号", required = true) | ||
| 59 | @PreAuthorize("@ss.hasPermission('infra:file-config:delete')") | 59 | @PreAuthorize("@ss.hasPermission('infra:file-config:delete')") |
| 60 | public CommonResult<Boolean> deleteFileConfig(@RequestParam("id") Long id) { | 60 | public CommonResult<Boolean> deleteFileConfig(@RequestParam("id") Long id) { |
| 61 | fileConfigService.deleteFileConfig(id); | 61 | fileConfigService.deleteFileConfig(id); |
| @@ -63,8 +63,8 @@ public class FileConfigController { | @@ -63,8 +63,8 @@ public class FileConfigController { | ||
| 63 | } | 63 | } |
| 64 | 64 | ||
| 65 | @GetMapping("/get") | 65 | @GetMapping("/get") |
| 66 | - @ApiOperation("获得文件配置") | ||
| 67 | - @ApiImplicitParam(name = "id", value = "编号", required = true, example = "1024", dataTypeClass = Long.class) | 66 | + @Operation(summary = "获得文件配置") |
| 67 | + @Parameter(name = "id", description = "编号", required = true, example = "1024") | ||
| 68 | @PreAuthorize("@ss.hasPermission('infra:file-config:query')") | 68 | @PreAuthorize("@ss.hasPermission('infra:file-config:query')") |
| 69 | public CommonResult<FileConfigRespVO> getFileConfig(@RequestParam("id") Long id) { | 69 | public CommonResult<FileConfigRespVO> getFileConfig(@RequestParam("id") Long id) { |
| 70 | FileConfigDO fileConfig = fileConfigService.getFileConfig(id); | 70 | FileConfigDO fileConfig = fileConfigService.getFileConfig(id); |
| @@ -72,7 +72,7 @@ public class FileConfigController { | @@ -72,7 +72,7 @@ public class FileConfigController { | ||
| 72 | } | 72 | } |
| 73 | 73 | ||
| 74 | @GetMapping("/page") | 74 | @GetMapping("/page") |
| 75 | - @ApiOperation("获得文件配置分页") | 75 | + @Operation(summary = "获得文件配置分页") |
| 76 | @PreAuthorize("@ss.hasPermission('infra:file-config:query')") | 76 | @PreAuthorize("@ss.hasPermission('infra:file-config:query')") |
| 77 | public CommonResult<PageResult<FileConfigRespVO>> getFileConfigPage(@Valid FileConfigPageReqVO pageVO) { | 77 | public CommonResult<PageResult<FileConfigRespVO>> getFileConfigPage(@Valid FileConfigPageReqVO pageVO) { |
| 78 | PageResult<FileConfigDO> pageResult = fileConfigService.getFileConfigPage(pageVO); | 78 | PageResult<FileConfigDO> pageResult = fileConfigService.getFileConfigPage(pageVO); |
| @@ -80,7 +80,7 @@ public class FileConfigController { | @@ -80,7 +80,7 @@ public class FileConfigController { | ||
| 80 | } | 80 | } |
| 81 | 81 | ||
| 82 | @GetMapping("/test") | 82 | @GetMapping("/test") |
| 83 | - @ApiOperation("测试文件配置是否正确") | 83 | + @Operation(summary = "测试文件配置是否正确") |
| 84 | @PreAuthorize("@ss.hasPermission('infra:file-config:query')") | 84 | @PreAuthorize("@ss.hasPermission('infra:file-config:query')") |
| 85 | public CommonResult<String> testFileConfig(@RequestParam("id") Long id) throws Exception { | 85 | public CommonResult<String> testFileConfig(@RequestParam("id") Long id) throws Exception { |
| 86 | String url = fileConfigService.testFileConfig(id); | 86 | String url = fileConfigService.testFileConfig(id); |
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 | @@ -12,9 +12,9 @@ import cn.iocoder.yudao.module.infra.controller.admin.file.vo.file.FileUploadReq | ||
| 12 | import cn.iocoder.yudao.module.infra.convert.file.FileConvert; | 12 | import cn.iocoder.yudao.module.infra.convert.file.FileConvert; |
| 13 | import cn.iocoder.yudao.module.infra.dal.dataobject.file.FileDO; | 13 | import cn.iocoder.yudao.module.infra.dal.dataobject.file.FileDO; |
| 14 | import cn.iocoder.yudao.module.infra.service.file.FileService; | 14 | import cn.iocoder.yudao.module.infra.service.file.FileService; |
| 15 | -import io.swagger.annotations.Api; | ||
| 16 | -import io.swagger.annotations.ApiImplicitParam; | ||
| 17 | -import io.swagger.annotations.ApiOperation; | 15 | +import io.swagger.v3.oas.annotations.tags.Tag; |
| 16 | +import io.swagger.v3.oas.annotations.Parameter; | ||
| 17 | +import io.swagger.v3.oas.annotations.Operation; | ||
| 18 | import lombok.extern.slf4j.Slf4j; | 18 | import lombok.extern.slf4j.Slf4j; |
| 19 | import org.springframework.http.HttpStatus; | 19 | import org.springframework.http.HttpStatus; |
| 20 | import org.springframework.security.access.prepost.PreAuthorize; | 20 | import org.springframework.security.access.prepost.PreAuthorize; |
| @@ -30,7 +30,7 @@ import javax.validation.Valid; | @@ -30,7 +30,7 @@ import javax.validation.Valid; | ||
| 30 | 30 | ||
| 31 | import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success; | 31 | import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success; |
| 32 | 32 | ||
| 33 | -@Api(tags = "管理后台 - 文件存储") | 33 | +@Tag(name = "管理后台 - 文件存储") |
| 34 | @RestController | 34 | @RestController |
| 35 | @RequestMapping("/infra/file") | 35 | @RequestMapping("/infra/file") |
| 36 | @Validated | 36 | @Validated |
| @@ -41,7 +41,7 @@ public class FileController { | @@ -41,7 +41,7 @@ public class FileController { | ||
| 41 | private FileService fileService; | 41 | private FileService fileService; |
| 42 | 42 | ||
| 43 | @PostMapping("/upload") | 43 | @PostMapping("/upload") |
| 44 | - @ApiOperation("上传文件") | 44 | + @Operation(summary = "上传文件") |
| 45 | @OperateLog(logArgs = false) // 上传文件,没有记录操作日志的必要 | 45 | @OperateLog(logArgs = false) // 上传文件,没有记录操作日志的必要 |
| 46 | public CommonResult<String> uploadFile(FileUploadReqVO uploadReqVO) throws Exception { | 46 | public CommonResult<String> uploadFile(FileUploadReqVO uploadReqVO) throws Exception { |
| 47 | MultipartFile file = uploadReqVO.getFile(); | 47 | MultipartFile file = uploadReqVO.getFile(); |
| @@ -50,8 +50,8 @@ public class FileController { | @@ -50,8 +50,8 @@ public class FileController { | ||
| 50 | } | 50 | } |
| 51 | 51 | ||
| 52 | @DeleteMapping("/delete") | 52 | @DeleteMapping("/delete") |
| 53 | - @ApiOperation("删除文件") | ||
| 54 | - @ApiImplicitParam(name = "id", value = "编号", required = true, dataTypeClass = Long.class) | 53 | + @Operation(summary = "删除文件") |
| 54 | + @Parameter(name = "id", description = "编号", required = true) | ||
| 55 | @PreAuthorize("@ss.hasPermission('infra:file:delete')") | 55 | @PreAuthorize("@ss.hasPermission('infra:file:delete')") |
| 56 | public CommonResult<Boolean> deleteFile(@RequestParam("id") Long id) throws Exception { | 56 | public CommonResult<Boolean> deleteFile(@RequestParam("id") Long id) throws Exception { |
| 57 | fileService.deleteFile(id); | 57 | fileService.deleteFile(id); |
| @@ -60,8 +60,8 @@ public class FileController { | @@ -60,8 +60,8 @@ public class FileController { | ||
| 60 | 60 | ||
| 61 | @GetMapping("/{configId}/get/**") | 61 | @GetMapping("/{configId}/get/**") |
| 62 | @PermitAll | 62 | @PermitAll |
| 63 | - @ApiOperation("下载文件") | ||
| 64 | - @ApiImplicitParam(name = "configId", value = "配置编号", required = true, dataTypeClass = Long.class) | 63 | + @Operation(summary = "下载文件") |
| 64 | + @Parameter(name = "configId", description = "配置编号", required = true) | ||
| 65 | public void getFileContent(HttpServletRequest request, | 65 | public void getFileContent(HttpServletRequest request, |
| 66 | HttpServletResponse response, | 66 | HttpServletResponse response, |
| 67 | @PathVariable("configId") Long configId) throws Exception { | 67 | @PathVariable("configId") Long configId) throws Exception { |
| @@ -82,7 +82,7 @@ public class FileController { | @@ -82,7 +82,7 @@ public class FileController { | ||
| 82 | } | 82 | } |
| 83 | 83 | ||
| 84 | @GetMapping("/page") | 84 | @GetMapping("/page") |
| 85 | - @ApiOperation("获得文件分页") | 85 | + @Operation(summary = "获得文件分页") |
| 86 | @PreAuthorize("@ss.hasPermission('infra:file:query')") | 86 | @PreAuthorize("@ss.hasPermission('infra:file:query')") |
| 87 | public CommonResult<PageResult<FileRespVO>> getFilePage(@Valid FilePageReqVO pageVO) { | 87 | public CommonResult<PageResult<FileRespVO>> getFilePage(@Valid FilePageReqVO pageVO) { |
| 88 | PageResult<FileDO> pageResult = fileService.getFilePage(pageVO); | 88 | PageResult<FileDO> pageResult = fileService.getFilePage(pageVO); |
yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/controller/admin/file/vo/config/FileConfigBaseVO.java
| 1 | package cn.iocoder.yudao.module.infra.controller.admin.file.vo.config; | 1 | package cn.iocoder.yudao.module.infra.controller.admin.file.vo.config; |
| 2 | - | ||
| 3 | -import io.swagger.annotations.ApiModelProperty; | 2 | +import io.swagger.v3.oas.annotations.media.Schema; |
| 4 | import lombok.Data; | 3 | import lombok.Data; |
| 5 | 4 | ||
| 6 | import javax.validation.constraints.NotNull; | 5 | import javax.validation.constraints.NotNull; |
| @@ -12,11 +11,11 @@ import javax.validation.constraints.NotNull; | @@ -12,11 +11,11 @@ import javax.validation.constraints.NotNull; | ||
| 12 | @Data | 11 | @Data |
| 13 | public class FileConfigBaseVO { | 12 | public class FileConfigBaseVO { |
| 14 | 13 | ||
| 15 | - @ApiModelProperty(value = "配置名", required = true, example = "S3 - 阿里云") | 14 | + @Schema(title = "配置名", required = true, example = "S3 - 阿里云") |
| 16 | @NotNull(message = "配置名不能为空") | 15 | @NotNull(message = "配置名不能为空") |
| 17 | private String name; | 16 | private String name; |
| 18 | 17 | ||
| 19 | - @ApiModelProperty(value = "备注", example = "我是备注") | 18 | + @Schema(title = "备注", example = "我是备注") |
| 20 | private String remark; | 19 | private String remark; |
| 21 | 20 | ||
| 22 | } | 21 | } |
yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/controller/admin/file/vo/config/FileConfigCreateReqVO.java
| 1 | package cn.iocoder.yudao.module.infra.controller.admin.file.vo.config; | 1 | package cn.iocoder.yudao.module.infra.controller.admin.file.vo.config; |
| 2 | 2 | ||
| 3 | -import io.swagger.annotations.ApiModel; | ||
| 4 | -import io.swagger.annotations.ApiModelProperty; | 3 | +import io.swagger.v3.oas.annotations.media.Schema; |
| 5 | import lombok.Data; | 4 | import lombok.Data; |
| 6 | import lombok.EqualsAndHashCode; | 5 | import lombok.EqualsAndHashCode; |
| 7 | import lombok.ToString; | 6 | import lombok.ToString; |
| @@ -9,17 +8,17 @@ import lombok.ToString; | @@ -9,17 +8,17 @@ import lombok.ToString; | ||
| 9 | import javax.validation.constraints.NotNull; | 8 | import javax.validation.constraints.NotNull; |
| 10 | import java.util.Map; | 9 | import java.util.Map; |
| 11 | 10 | ||
| 12 | -@ApiModel("管理后台 - 文件配置创建 Request VO") | 11 | +@Schema(title = "管理后台 - 文件配置创建 Request VO") |
| 13 | @Data | 12 | @Data |
| 14 | @EqualsAndHashCode(callSuper = true) | 13 | @EqualsAndHashCode(callSuper = true) |
| 15 | @ToString(callSuper = true) | 14 | @ToString(callSuper = true) |
| 16 | public class FileConfigCreateReqVO extends FileConfigBaseVO { | 15 | public class FileConfigCreateReqVO extends FileConfigBaseVO { |
| 17 | 16 | ||
| 18 | - @ApiModelProperty(value = "存储器", required = true, example = "1", notes = "参见 FileStorageEnum 枚举类") | 17 | + @Schema(title = "存储器", required = true, example = "1", description = "参见 FileStorageEnum 枚举类") |
| 19 | @NotNull(message = "存储器不能为空") | 18 | @NotNull(message = "存储器不能为空") |
| 20 | private Integer storage; | 19 | private Integer storage; |
| 21 | 20 | ||
| 22 | - @ApiModelProperty(value = "存储配置", required = true, notes = "配置是动态参数,所以使用 Map 接收") | 21 | + @Schema(title = "存储配置", required = true, description = "配置是动态参数,所以使用 Map 接收") |
| 23 | @NotNull(message = "存储配置不能为空") | 22 | @NotNull(message = "存储配置不能为空") |
| 24 | private Map<String, Object> config; | 23 | private Map<String, Object> config; |
| 25 | 24 |
yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/controller/admin/file/vo/config/FileConfigPageReqVO.java
| 1 | package cn.iocoder.yudao.module.infra.controller.admin.file.vo.config; | 1 | package cn.iocoder.yudao.module.infra.controller.admin.file.vo.config; |
| 2 | 2 | ||
| 3 | import cn.iocoder.yudao.framework.common.pojo.PageParam; | 3 | import cn.iocoder.yudao.framework.common.pojo.PageParam; |
| 4 | -import io.swagger.annotations.ApiModel; | ||
| 5 | -import io.swagger.annotations.ApiModelProperty; | 4 | +import io.swagger.v3.oas.annotations.media.Schema; |
| 6 | import lombok.Data; | 5 | import lombok.Data; |
| 7 | import lombok.EqualsAndHashCode; | 6 | import lombok.EqualsAndHashCode; |
| 8 | import lombok.ToString; | 7 | import lombok.ToString; |
| @@ -12,20 +11,20 @@ import java.time.LocalDateTime; | @@ -12,20 +11,20 @@ import java.time.LocalDateTime; | ||
| 12 | 11 | ||
| 13 | import static cn.iocoder.yudao.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND; | 12 | import static cn.iocoder.yudao.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND; |
| 14 | 13 | ||
| 15 | -@ApiModel("管理后台 - 文件配置分页 Request VO") | 14 | +@Schema(title = "管理后台 - 文件配置分页 Request VO") |
| 16 | @Data | 15 | @Data |
| 17 | @EqualsAndHashCode(callSuper = true) | 16 | @EqualsAndHashCode(callSuper = true) |
| 18 | @ToString(callSuper = true) | 17 | @ToString(callSuper = true) |
| 19 | public class FileConfigPageReqVO extends PageParam { | 18 | public class FileConfigPageReqVO extends PageParam { |
| 20 | 19 | ||
| 21 | - @ApiModelProperty(value = "配置名", example = "S3 - 阿里云") | 20 | + @Schema(title = "配置名", example = "S3 - 阿里云") |
| 22 | private String name; | 21 | private String name; |
| 23 | 22 | ||
| 24 | - @ApiModelProperty(value = "存储器", example = "1") | 23 | + @Schema(title = "存储器", example = "1") |
| 25 | private Integer storage; | 24 | private Integer storage; |
| 26 | 25 | ||
| 27 | @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND) | 26 | @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND) |
| 28 | - @ApiModelProperty(value = "创建时间") | 27 | + @Schema(title = "创建时间") |
| 29 | private LocalDateTime[] createTime; | 28 | private LocalDateTime[] createTime; |
| 30 | 29 | ||
| 31 | } | 30 | } |
yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/controller/admin/file/vo/config/FileConfigRespVO.java
| 1 | package cn.iocoder.yudao.module.infra.controller.admin.file.vo.config; | 1 | package cn.iocoder.yudao.module.infra.controller.admin.file.vo.config; |
| 2 | 2 | ||
| 3 | import cn.iocoder.yudao.framework.file.core.client.FileClientConfig; | 3 | import cn.iocoder.yudao.framework.file.core.client.FileClientConfig; |
| 4 | -import io.swagger.annotations.ApiModel; | ||
| 5 | -import io.swagger.annotations.ApiModelProperty; | 4 | +import io.swagger.v3.oas.annotations.media.Schema; |
| 6 | import lombok.Data; | 5 | import lombok.Data; |
| 7 | import lombok.EqualsAndHashCode; | 6 | import lombok.EqualsAndHashCode; |
| 8 | import lombok.ToString; | 7 | import lombok.ToString; |
| @@ -10,27 +9,27 @@ import lombok.ToString; | @@ -10,27 +9,27 @@ import lombok.ToString; | ||
| 10 | import javax.validation.constraints.NotNull; | 9 | import javax.validation.constraints.NotNull; |
| 11 | import java.time.LocalDateTime; | 10 | import java.time.LocalDateTime; |
| 12 | 11 | ||
| 13 | -@ApiModel("管理后台 - 文件配置 Response VO") | 12 | +@Schema(title = "管理后台 - 文件配置 Response VO") |
| 14 | @Data | 13 | @Data |
| 15 | @EqualsAndHashCode(callSuper = true) | 14 | @EqualsAndHashCode(callSuper = true) |
| 16 | @ToString(callSuper = true) | 15 | @ToString(callSuper = true) |
| 17 | public class FileConfigRespVO extends FileConfigBaseVO { | 16 | public class FileConfigRespVO extends FileConfigBaseVO { |
| 18 | 17 | ||
| 19 | - @ApiModelProperty(value = "编号", required = true, example = "1") | 18 | + @Schema(title = "编号", required = true, example = "1") |
| 20 | private Long id; | 19 | private Long id; |
| 21 | 20 | ||
| 22 | - @ApiModelProperty(value = "存储器", required = true, example = "1", notes = "参见 FileStorageEnum 枚举类") | 21 | + @Schema(title = "存储器", required = true, example = "1", description = "参见 FileStorageEnum 枚举类") |
| 23 | @NotNull(message = "存储器不能为空") | 22 | @NotNull(message = "存储器不能为空") |
| 24 | private Integer storage; | 23 | private Integer storage; |
| 25 | 24 | ||
| 26 | - @ApiModelProperty(value = "是否为主配置", required = true, example = "true") | 25 | + @Schema(title = "是否为主配置", required = true, example = "true") |
| 27 | @NotNull(message = "是否为主配置不能为空") | 26 | @NotNull(message = "是否为主配置不能为空") |
| 28 | private Boolean master; | 27 | private Boolean master; |
| 29 | 28 | ||
| 30 | - @ApiModelProperty(value = "存储配置", required = true) | 29 | + @Schema(title = "存储配置", required = true) |
| 31 | private FileClientConfig config; | 30 | private FileClientConfig config; |
| 32 | 31 | ||
| 33 | - @ApiModelProperty(value = "创建时间", required = true) | 32 | + @Schema(title = "创建时间", required = true) |
| 34 | private LocalDateTime createTime; | 33 | private LocalDateTime createTime; |
| 35 | 34 | ||
| 36 | } | 35 | } |
yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/controller/admin/file/vo/config/FileConfigUpdateReqVO.java
| 1 | package cn.iocoder.yudao.module.infra.controller.admin.file.vo.config; | 1 | package cn.iocoder.yudao.module.infra.controller.admin.file.vo.config; |
| 2 | 2 | ||
| 3 | -import io.swagger.annotations.ApiModel; | ||
| 4 | -import io.swagger.annotations.ApiModelProperty; | 3 | +import io.swagger.v3.oas.annotations.media.Schema; |
| 5 | import lombok.Data; | 4 | import lombok.Data; |
| 6 | import lombok.EqualsAndHashCode; | 5 | import lombok.EqualsAndHashCode; |
| 7 | import lombok.ToString; | 6 | import lombok.ToString; |
| @@ -9,17 +8,17 @@ import lombok.ToString; | @@ -9,17 +8,17 @@ import lombok.ToString; | ||
| 9 | import javax.validation.constraints.NotNull; | 8 | import javax.validation.constraints.NotNull; |
| 10 | import java.util.Map; | 9 | import java.util.Map; |
| 11 | 10 | ||
| 12 | -@ApiModel("管理后台 - 文件配置更新 Request VO") | 11 | +@Schema(title = "管理后台 - 文件配置更新 Request VO") |
| 13 | @Data | 12 | @Data |
| 14 | @EqualsAndHashCode(callSuper = true) | 13 | @EqualsAndHashCode(callSuper = true) |
| 15 | @ToString(callSuper = true) | 14 | @ToString(callSuper = true) |
| 16 | public class FileConfigUpdateReqVO extends FileConfigBaseVO { | 15 | public class FileConfigUpdateReqVO extends FileConfigBaseVO { |
| 17 | 16 | ||
| 18 | - @ApiModelProperty(value = "编号", required = true, example = "1") | 17 | + @Schema(title = "编号", required = true, example = "1") |
| 19 | @NotNull(message = "编号不能为空") | 18 | @NotNull(message = "编号不能为空") |
| 20 | private Long id; | 19 | private Long id; |
| 21 | 20 | ||
| 22 | - @ApiModelProperty(value = "存储配置", required = true, notes = "配置是动态参数,所以使用 Map 接收") | 21 | + @Schema(title = "存储配置", required = true, description = "配置是动态参数,所以使用 Map 接收") |
| 23 | @NotNull(message = "存储配置不能为空") | 22 | @NotNull(message = "存储配置不能为空") |
| 24 | private Map<String, Object> config; | 23 | private Map<String, Object> config; |
| 25 | 24 |
yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/controller/admin/file/vo/file/FilePageReqVO.java
| 1 | package cn.iocoder.yudao.module.infra.controller.admin.file.vo.file; | 1 | package cn.iocoder.yudao.module.infra.controller.admin.file.vo.file; |
| 2 | 2 | ||
| 3 | import cn.iocoder.yudao.framework.common.pojo.PageParam; | 3 | import cn.iocoder.yudao.framework.common.pojo.PageParam; |
| 4 | -import io.swagger.annotations.ApiModel; | ||
| 5 | -import io.swagger.annotations.ApiModelProperty; | 4 | +import io.swagger.v3.oas.annotations.media.Schema; |
| 6 | import lombok.Data; | 5 | import lombok.Data; |
| 7 | import lombok.EqualsAndHashCode; | 6 | import lombok.EqualsAndHashCode; |
| 8 | import lombok.ToString; | 7 | import lombok.ToString; |
| @@ -12,20 +11,20 @@ import java.time.LocalDateTime; | @@ -12,20 +11,20 @@ import java.time.LocalDateTime; | ||
| 12 | 11 | ||
| 13 | import static cn.iocoder.yudao.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND; | 12 | import static cn.iocoder.yudao.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND; |
| 14 | 13 | ||
| 15 | -@ApiModel("管理后台 - 文件分页 Request VO") | 14 | +@Schema(title = "管理后台 - 文件分页 Request VO") |
| 16 | @Data | 15 | @Data |
| 17 | @EqualsAndHashCode(callSuper = true) | 16 | @EqualsAndHashCode(callSuper = true) |
| 18 | @ToString(callSuper = true) | 17 | @ToString(callSuper = true) |
| 19 | public class FilePageReqVO extends PageParam { | 18 | public class FilePageReqVO extends PageParam { |
| 20 | 19 | ||
| 21 | - @ApiModelProperty(value = "文件路径", example = "yudao", notes = "模糊匹配") | 20 | + @Schema(title = "文件路径", example = "yudao", description = "模糊匹配") |
| 22 | private String path; | 21 | private String path; |
| 23 | 22 | ||
| 24 | - @ApiModelProperty(value = "文件类型", example = "application/octet-stream", notes = "模糊匹配") | 23 | + @Schema(title = "文件类型", example = "application/octet-stream", description = "模糊匹配") |
| 25 | private String type; | 24 | private String type; |
| 26 | 25 | ||
| 27 | @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND) | 26 | @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND) |
| 28 | - @ApiModelProperty(value = "创建时间") | 27 | + @Schema(title = "创建时间") |
| 29 | private LocalDateTime[] createTime; | 28 | private LocalDateTime[] createTime; |
| 30 | 29 | ||
| 31 | } | 30 | } |
yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/controller/admin/file/vo/file/FileRespVO.java
| 1 | package cn.iocoder.yudao.module.infra.controller.admin.file.vo.file; | 1 | package cn.iocoder.yudao.module.infra.controller.admin.file.vo.file; |
| 2 | 2 | ||
| 3 | -import io.swagger.annotations.ApiModel; | ||
| 4 | -import io.swagger.annotations.ApiModelProperty; | 3 | +import io.swagger.v3.oas.annotations.media.Schema; |
| 5 | import lombok.Data; | 4 | import lombok.Data; |
| 6 | 5 | ||
| 7 | import java.time.LocalDateTime; | 6 | import java.time.LocalDateTime; |
| 8 | 7 | ||
| 9 | -@ApiModel(value = "管理后台 - 文件 Response VO", description = "不返回 content 字段,太大") | 8 | +@Schema(title = "管理后台 - 文件 Response VO", description = "不返回 content 字段,太大") |
| 10 | @Data | 9 | @Data |
| 11 | public class FileRespVO { | 10 | public class FileRespVO { |
| 12 | 11 | ||
| 13 | - @ApiModelProperty(value = "文件编号", required = true, example = "1024") | 12 | + @Schema(title = "文件编号", required = true, example = "1024") |
| 14 | private Long id; | 13 | private Long id; |
| 15 | 14 | ||
| 16 | - @ApiModelProperty(value = "配置编号", required = true, example = "11") | 15 | + @Schema(title = "配置编号", required = true, example = "11") |
| 17 | private Long configId; | 16 | private Long configId; |
| 18 | 17 | ||
| 19 | - @ApiModelProperty(value = "文件路径", required = true, example = "yudao.jpg") | 18 | + @Schema(title = "文件路径", required = true, example = "yudao.jpg") |
| 20 | private String path; | 19 | private String path; |
| 21 | 20 | ||
| 22 | - @ApiModelProperty(value = "原文件名", required = true, example = "yudao.jpg") | 21 | + @Schema(title = "原文件名", required = true, example = "yudao.jpg") |
| 23 | private String name; | 22 | private String name; |
| 24 | 23 | ||
| 25 | - @ApiModelProperty(value = "文件 URL", required = true, example = "https://www.iocoder.cn/yudao.jpg") | 24 | + @Schema(title = "文件 URL", required = true, example = "https://www.iocoder.cn/yudao.jpg") |
| 26 | private String url; | 25 | private String url; |
| 27 | 26 | ||
| 28 | - @ApiModelProperty(value = "文件MIME类型", example = "application/octet-stream") | 27 | + @Schema(title = "文件MIME类型", example = "application/octet-stream") |
| 29 | private String type; | 28 | private String type; |
| 30 | 29 | ||
| 31 | - @ApiModelProperty(value = "文件大小", example = "2048", required = true) | 30 | + @Schema(title = "文件大小", example = "2048", required = true) |
| 32 | private Integer size; | 31 | private Integer size; |
| 33 | 32 | ||
| 34 | - @ApiModelProperty(value = "创建时间", required = true) | 33 | + @Schema(title = "创建时间", required = true) |
| 35 | private LocalDateTime createTime; | 34 | private LocalDateTime createTime; |
| 36 | 35 | ||
| 37 | } | 36 | } |
yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/controller/admin/file/vo/file/FileUploadReqVO.java
| 1 | package cn.iocoder.yudao.module.infra.controller.admin.file.vo.file; | 1 | package cn.iocoder.yudao.module.infra.controller.admin.file.vo.file; |
| 2 | 2 | ||
| 3 | -import io.swagger.annotations.ApiModel; | ||
| 4 | -import io.swagger.annotations.ApiModelProperty; | 3 | +import io.swagger.v3.oas.annotations.media.Schema; |
| 5 | import lombok.Data; | 4 | import lombok.Data; |
| 6 | import org.springframework.web.multipart.MultipartFile; | 5 | import org.springframework.web.multipart.MultipartFile; |
| 7 | 6 | ||
| 8 | import javax.validation.constraints.NotNull; | 7 | import javax.validation.constraints.NotNull; |
| 9 | 8 | ||
| 10 | -@ApiModel(value = "管理后台 - 上传文件 Request VO") | 9 | +@Schema(title = "管理后台 - 上传文件 Request VO") |
| 11 | @Data | 10 | @Data |
| 12 | public class FileUploadReqVO { | 11 | public class FileUploadReqVO { |
| 13 | 12 | ||
| 14 | - @ApiModelProperty(value = "文件附件", required = true) | 13 | + @Schema(title = "文件附件", required = true) |
| 15 | @NotNull(message = "文件附件不能为空") | 14 | @NotNull(message = "文件附件不能为空") |
| 16 | private MultipartFile file; | 15 | private MultipartFile file; |
| 17 | 16 | ||
| 18 | - @ApiModelProperty(value = "文件附件", example = "yudaoyuanma.png") | 17 | + @Schema(title = "文件附件", example = "yudaoyuanma.png") |
| 19 | private String path; | 18 | private String path; |
| 20 | 19 | ||
| 21 | } | 20 | } |
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.*; | @@ -9,10 +9,10 @@ import cn.iocoder.yudao.module.infra.controller.admin.job.vo.job.*; | ||
| 9 | import cn.iocoder.yudao.module.infra.convert.job.JobConvert; | 9 | import cn.iocoder.yudao.module.infra.convert.job.JobConvert; |
| 10 | import cn.iocoder.yudao.module.infra.dal.dataobject.job.JobDO; | 10 | import cn.iocoder.yudao.module.infra.dal.dataobject.job.JobDO; |
| 11 | import cn.iocoder.yudao.module.infra.service.job.JobService; | 11 | import cn.iocoder.yudao.module.infra.service.job.JobService; |
| 12 | -import io.swagger.annotations.Api; | ||
| 13 | -import io.swagger.annotations.ApiImplicitParam; | ||
| 14 | -import io.swagger.annotations.ApiImplicitParams; | ||
| 15 | -import io.swagger.annotations.ApiOperation; | 12 | +import io.swagger.v3.oas.annotations.tags.Tag; |
| 13 | +import io.swagger.v3.oas.annotations.Parameter; | ||
| 14 | +import io.swagger.v3.oas.annotations.Parameters; | ||
| 15 | +import io.swagger.v3.oas.annotations.Operation; | ||
| 16 | import org.quartz.SchedulerException; | 16 | import org.quartz.SchedulerException; |
| 17 | import org.springframework.security.access.prepost.PreAuthorize; | 17 | import org.springframework.security.access.prepost.PreAuthorize; |
| 18 | import org.springframework.validation.annotation.Validated; | 18 | import org.springframework.validation.annotation.Validated; |
| @@ -30,7 +30,7 @@ import java.util.List; | @@ -30,7 +30,7 @@ import java.util.List; | ||
| 30 | import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success; | 30 | import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success; |
| 31 | import static cn.iocoder.yudao.framework.operatelog.core.enums.OperateTypeEnum.EXPORT; | 31 | import static cn.iocoder.yudao.framework.operatelog.core.enums.OperateTypeEnum.EXPORT; |
| 32 | 32 | ||
| 33 | -@Api(tags = "管理后台 - 定时任务") | 33 | +@Tag(name = "管理后台 - 定时任务") |
| 34 | @RestController | 34 | @RestController |
| 35 | @RequestMapping("/infra/job") | 35 | @RequestMapping("/infra/job") |
| 36 | @Validated | 36 | @Validated |
| @@ -40,7 +40,7 @@ public class JobController { | @@ -40,7 +40,7 @@ public class JobController { | ||
| 40 | private JobService jobService; | 40 | private JobService jobService; |
| 41 | 41 | ||
| 42 | @PostMapping("/create") | 42 | @PostMapping("/create") |
| 43 | - @ApiOperation("创建定时任务") | 43 | + @Operation(summary = "创建定时任务") |
| 44 | @PreAuthorize("@ss.hasPermission('infra:job:create')") | 44 | @PreAuthorize("@ss.hasPermission('infra:job:create')") |
| 45 | public CommonResult<Long> createJob(@Valid @RequestBody JobCreateReqVO createReqVO) | 45 | public CommonResult<Long> createJob(@Valid @RequestBody JobCreateReqVO createReqVO) |
| 46 | throws SchedulerException { | 46 | throws SchedulerException { |
| @@ -48,7 +48,7 @@ public class JobController { | @@ -48,7 +48,7 @@ public class JobController { | ||
| 48 | } | 48 | } |
| 49 | 49 | ||
| 50 | @PutMapping("/update") | 50 | @PutMapping("/update") |
| 51 | - @ApiOperation("更新定时任务") | 51 | + @Operation(summary = "更新定时任务") |
| 52 | @PreAuthorize("@ss.hasPermission('infra:job:update')") | 52 | @PreAuthorize("@ss.hasPermission('infra:job:update')") |
| 53 | public CommonResult<Boolean> updateJob(@Valid @RequestBody JobUpdateReqVO updateReqVO) | 53 | public CommonResult<Boolean> updateJob(@Valid @RequestBody JobUpdateReqVO updateReqVO) |
| 54 | throws SchedulerException { | 54 | throws SchedulerException { |
| @@ -57,10 +57,10 @@ public class JobController { | @@ -57,10 +57,10 @@ public class JobController { | ||
| 57 | } | 57 | } |
| 58 | 58 | ||
| 59 | @PutMapping("/update-status") | 59 | @PutMapping("/update-status") |
| 60 | - @ApiOperation("更新定时任务的状态") | ||
| 61 | - @ApiImplicitParams({ | ||
| 62 | - @ApiImplicitParam(name = "id", value = "编号", required = true, example = "1024", dataTypeClass = Long.class), | ||
| 63 | - @ApiImplicitParam(name = "status", value = "状态", required = true, example = "1", dataTypeClass = Integer.class), | 60 | + @Operation(summary = "更新定时任务的状态") |
| 61 | + @Parameters({ | ||
| 62 | + @Parameter(name = "id", description = "编号", required = true, example = "1024"), | ||
| 63 | + @Parameter(name = "status", description = "状态", required = true, example = "1"), | ||
| 64 | }) | 64 | }) |
| 65 | @PreAuthorize("@ss.hasPermission('infra:job:update')") | 65 | @PreAuthorize("@ss.hasPermission('infra:job:update')") |
| 66 | public CommonResult<Boolean> updateJobStatus(@RequestParam(value = "id") Long id, @RequestParam("status") Integer status) | 66 | public CommonResult<Boolean> updateJobStatus(@RequestParam(value = "id") Long id, @RequestParam("status") Integer status) |
| @@ -70,8 +70,8 @@ public class JobController { | @@ -70,8 +70,8 @@ public class JobController { | ||
| 70 | } | 70 | } |
| 71 | 71 | ||
| 72 | @DeleteMapping("/delete") | 72 | @DeleteMapping("/delete") |
| 73 | - @ApiOperation("删除定时任务") | ||
| 74 | - @ApiImplicitParam(name = "id", value = "编号", required = true, example = "1024", dataTypeClass = Long.class) | 73 | + @Operation(summary = "删除定时任务") |
| 74 | + @Parameter(name = "id", description = "编号", required = true, example = "1024") | ||
| 75 | @PreAuthorize("@ss.hasPermission('infra:job:delete')") | 75 | @PreAuthorize("@ss.hasPermission('infra:job:delete')") |
| 76 | public CommonResult<Boolean> deleteJob(@RequestParam("id") Long id) | 76 | public CommonResult<Boolean> deleteJob(@RequestParam("id") Long id) |
| 77 | throws SchedulerException { | 77 | throws SchedulerException { |
| @@ -80,8 +80,8 @@ public class JobController { | @@ -80,8 +80,8 @@ public class JobController { | ||
| 80 | } | 80 | } |
| 81 | 81 | ||
| 82 | @PutMapping("/trigger") | 82 | @PutMapping("/trigger") |
| 83 | - @ApiOperation("触发定时任务") | ||
| 84 | - @ApiImplicitParam(name = "id", value = "编号", required = true, example = "1024", dataTypeClass = Long.class) | 83 | + @Operation(summary = "触发定时任务") |
| 84 | + @Parameter(name = "id", description = "编号", required = true, example = "1024") | ||
| 85 | @PreAuthorize("@ss.hasPermission('infra:job:trigger')") | 85 | @PreAuthorize("@ss.hasPermission('infra:job:trigger')") |
| 86 | public CommonResult<Boolean> triggerJob(@RequestParam("id") Long id) throws SchedulerException { | 86 | public CommonResult<Boolean> triggerJob(@RequestParam("id") Long id) throws SchedulerException { |
| 87 | jobService.triggerJob(id); | 87 | jobService.triggerJob(id); |
| @@ -89,8 +89,8 @@ public class JobController { | @@ -89,8 +89,8 @@ public class JobController { | ||
| 89 | } | 89 | } |
| 90 | 90 | ||
| 91 | @GetMapping("/get") | 91 | @GetMapping("/get") |
| 92 | - @ApiOperation("获得定时任务") | ||
| 93 | - @ApiImplicitParam(name = "id", value = "编号", required = true, example = "1024", dataTypeClass = Long.class) | 92 | + @Operation(summary = "获得定时任务") |
| 93 | + @Parameter(name = "id", description = "编号", required = true, example = "1024") | ||
| 94 | @PreAuthorize("@ss.hasPermission('infra:job:query')") | 94 | @PreAuthorize("@ss.hasPermission('infra:job:query')") |
| 95 | public CommonResult<JobRespVO> getJob(@RequestParam("id") Long id) { | 95 | public CommonResult<JobRespVO> getJob(@RequestParam("id") Long id) { |
| 96 | JobDO job = jobService.getJob(id); | 96 | JobDO job = jobService.getJob(id); |
| @@ -98,8 +98,8 @@ public class JobController { | @@ -98,8 +98,8 @@ public class JobController { | ||
| 98 | } | 98 | } |
| 99 | 99 | ||
| 100 | @GetMapping("/list") | 100 | @GetMapping("/list") |
| 101 | - @ApiOperation("获得定时任务列表") | ||
| 102 | - @ApiImplicitParam(name = "ids", value = "编号列表", required = true, dataTypeClass = List.class) | 101 | + @Operation(summary = "获得定时任务列表") |
| 102 | + @Parameter(name = "ids", description = "编号列表", required = true) | ||
| 103 | @PreAuthorize("@ss.hasPermission('infra:job:query')") | 103 | @PreAuthorize("@ss.hasPermission('infra:job:query')") |
| 104 | public CommonResult<List<JobRespVO>> getJobList(@RequestParam("ids") Collection<Long> ids) { | 104 | public CommonResult<List<JobRespVO>> getJobList(@RequestParam("ids") Collection<Long> ids) { |
| 105 | List<JobDO> list = jobService.getJobList(ids); | 105 | List<JobDO> list = jobService.getJobList(ids); |
| @@ -107,7 +107,7 @@ public class JobController { | @@ -107,7 +107,7 @@ public class JobController { | ||
| 107 | } | 107 | } |
| 108 | 108 | ||
| 109 | @GetMapping("/page") | 109 | @GetMapping("/page") |
| 110 | - @ApiOperation("获得定时任务分页") | 110 | + @Operation(summary = "获得定时任务分页") |
| 111 | @PreAuthorize("@ss.hasPermission('infra:job:query')") | 111 | @PreAuthorize("@ss.hasPermission('infra:job:query')") |
| 112 | public CommonResult<PageResult<JobRespVO>> getJobPage(@Valid JobPageReqVO pageVO) { | 112 | public CommonResult<PageResult<JobRespVO>> getJobPage(@Valid JobPageReqVO pageVO) { |
| 113 | PageResult<JobDO> pageResult = jobService.getJobPage(pageVO); | 113 | PageResult<JobDO> pageResult = jobService.getJobPage(pageVO); |
| @@ -115,7 +115,7 @@ public class JobController { | @@ -115,7 +115,7 @@ public class JobController { | ||
| 115 | } | 115 | } |
| 116 | 116 | ||
| 117 | @GetMapping("/export-excel") | 117 | @GetMapping("/export-excel") |
| 118 | - @ApiOperation("导出定时任务 Excel") | 118 | + @Operation(summary = "导出定时任务 Excel") |
| 119 | @PreAuthorize("@ss.hasPermission('infra:job:export')") | 119 | @PreAuthorize("@ss.hasPermission('infra:job:export')") |
| 120 | @OperateLog(type = EXPORT) | 120 | @OperateLog(type = EXPORT) |
| 121 | public void exportJobExcel(@Valid JobExportReqVO exportReqVO, | 121 | public void exportJobExcel(@Valid JobExportReqVO exportReqVO, |
| @@ -127,10 +127,10 @@ public class JobController { | @@ -127,10 +127,10 @@ public class JobController { | ||
| 127 | } | 127 | } |
| 128 | 128 | ||
| 129 | @GetMapping("/get_next_times") | 129 | @GetMapping("/get_next_times") |
| 130 | - @ApiOperation("获得定时任务的下 n 次执行时间") | ||
| 131 | - @ApiImplicitParams({ | ||
| 132 | - @ApiImplicitParam(name = "id", value = "编号", required = true, example = "1024", dataTypeClass = Long.class), | ||
| 133 | - @ApiImplicitParam(name = "count", value = "数量", example = "5", dataTypeClass = Long.class) | 130 | + @Operation(summary = "获得定时任务的下 n 次执行时间") |
| 131 | + @Parameters({ | ||
| 132 | + @Parameter(name = "id", description = "编号", required = true, example = "1024"), | ||
| 133 | + @Parameter(name = "count", description = "数量", example = "5") | ||
| 134 | }) | 134 | }) |
| 135 | @PreAuthorize("@ss.hasPermission('infra:job:query')") | 135 | @PreAuthorize("@ss.hasPermission('infra:job:query')") |
| 136 | public CommonResult<List<LocalDateTime>> getJobNextTimes(@RequestParam("id") Long id, | 136 | public CommonResult<List<LocalDateTime>> getJobNextTimes(@RequestParam("id") Long id, |
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; | @@ -11,9 +11,9 @@ import cn.iocoder.yudao.module.infra.controller.admin.job.vo.log.JobLogRespVO; | ||
| 11 | import cn.iocoder.yudao.module.infra.convert.job.JobLogConvert; | 11 | import cn.iocoder.yudao.module.infra.convert.job.JobLogConvert; |
| 12 | import cn.iocoder.yudao.module.infra.dal.dataobject.job.JobLogDO; | 12 | import cn.iocoder.yudao.module.infra.dal.dataobject.job.JobLogDO; |
| 13 | import cn.iocoder.yudao.module.infra.service.job.JobLogService; | 13 | import cn.iocoder.yudao.module.infra.service.job.JobLogService; |
| 14 | -import io.swagger.annotations.Api; | ||
| 15 | -import io.swagger.annotations.ApiImplicitParam; | ||
| 16 | -import io.swagger.annotations.ApiOperation; | 14 | +import io.swagger.v3.oas.annotations.tags.Tag; |
| 15 | +import io.swagger.v3.oas.annotations.Parameter; | ||
| 16 | +import io.swagger.v3.oas.annotations.Operation; | ||
| 17 | import org.springframework.security.access.prepost.PreAuthorize; | 17 | import org.springframework.security.access.prepost.PreAuthorize; |
| 18 | import org.springframework.validation.annotation.Validated; | 18 | import org.springframework.validation.annotation.Validated; |
| 19 | import org.springframework.web.bind.annotation.GetMapping; | 19 | import org.springframework.web.bind.annotation.GetMapping; |
| @@ -31,7 +31,7 @@ import java.util.List; | @@ -31,7 +31,7 @@ import java.util.List; | ||
| 31 | import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success; | 31 | import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success; |
| 32 | import static cn.iocoder.yudao.framework.operatelog.core.enums.OperateTypeEnum.EXPORT; | 32 | import static cn.iocoder.yudao.framework.operatelog.core.enums.OperateTypeEnum.EXPORT; |
| 33 | 33 | ||
| 34 | -@Api(tags = "管理后台 - 定时任务日志") | 34 | +@Tag(name = "管理后台 - 定时任务日志") |
| 35 | @RestController | 35 | @RestController |
| 36 | @RequestMapping("/infra/job-log") | 36 | @RequestMapping("/infra/job-log") |
| 37 | @Validated | 37 | @Validated |
| @@ -41,8 +41,8 @@ public class JobLogController { | @@ -41,8 +41,8 @@ public class JobLogController { | ||
| 41 | private JobLogService jobLogService; | 41 | private JobLogService jobLogService; |
| 42 | 42 | ||
| 43 | @GetMapping("/get") | 43 | @GetMapping("/get") |
| 44 | - @ApiOperation("获得定时任务日志") | ||
| 45 | - @ApiImplicitParam(name = "id", value = "编号", required = true, example = "1024", dataTypeClass = Long.class) | 44 | + @Operation(summary = "获得定时任务日志") |
| 45 | + @Parameter(name = "id", description = "编号", required = true, example = "1024") | ||
| 46 | @PreAuthorize("@ss.hasPermission('infra:job:query')") | 46 | @PreAuthorize("@ss.hasPermission('infra:job:query')") |
| 47 | public CommonResult<JobLogRespVO> getJobLog(@RequestParam("id") Long id) { | 47 | public CommonResult<JobLogRespVO> getJobLog(@RequestParam("id") Long id) { |
| 48 | JobLogDO jobLog = jobLogService.getJobLog(id); | 48 | JobLogDO jobLog = jobLogService.getJobLog(id); |
| @@ -50,8 +50,8 @@ public class JobLogController { | @@ -50,8 +50,8 @@ public class JobLogController { | ||
| 50 | } | 50 | } |
| 51 | 51 | ||
| 52 | @GetMapping("/list") | 52 | @GetMapping("/list") |
| 53 | - @ApiOperation("获得定时任务日志列表") | ||
| 54 | - @ApiImplicitParam(name = "ids", value = "编号列表", required = true, example = "1024,2048", dataTypeClass = List.class) | 53 | + @Operation(summary = "获得定时任务日志列表") |
| 54 | + @Parameter(name = "ids", description = "编号列表", required = true, example = "1024,2048") | ||
| 55 | @PreAuthorize("@ss.hasPermission('infra:job:query')") | 55 | @PreAuthorize("@ss.hasPermission('infra:job:query')") |
| 56 | public CommonResult<List<JobLogRespVO>> getJobLogList(@RequestParam("ids") Collection<Long> ids) { | 56 | public CommonResult<List<JobLogRespVO>> getJobLogList(@RequestParam("ids") Collection<Long> ids) { |
| 57 | List<JobLogDO> list = jobLogService.getJobLogList(ids); | 57 | List<JobLogDO> list = jobLogService.getJobLogList(ids); |
| @@ -59,7 +59,7 @@ public class JobLogController { | @@ -59,7 +59,7 @@ public class JobLogController { | ||
| 59 | } | 59 | } |
| 60 | 60 | ||
| 61 | @GetMapping("/page") | 61 | @GetMapping("/page") |
| 62 | - @ApiOperation("获得定时任务日志分页") | 62 | + @Operation(summary = "获得定时任务日志分页") |
| 63 | @PreAuthorize("@ss.hasPermission('infra:job:query')") | 63 | @PreAuthorize("@ss.hasPermission('infra:job:query')") |
| 64 | public CommonResult<PageResult<JobLogRespVO>> getJobLogPage(@Valid JobLogPageReqVO pageVO) { | 64 | public CommonResult<PageResult<JobLogRespVO>> getJobLogPage(@Valid JobLogPageReqVO pageVO) { |
| 65 | PageResult<JobLogDO> pageResult = jobLogService.getJobLogPage(pageVO); | 65 | PageResult<JobLogDO> pageResult = jobLogService.getJobLogPage(pageVO); |
| @@ -67,7 +67,7 @@ public class JobLogController { | @@ -67,7 +67,7 @@ public class JobLogController { | ||
| 67 | } | 67 | } |
| 68 | 68 | ||
| 69 | @GetMapping("/export-excel") | 69 | @GetMapping("/export-excel") |
| 70 | - @ApiOperation("导出定时任务日志 Excel") | 70 | + @Operation(summary = "导出定时任务日志 Excel") |
| 71 | @PreAuthorize("@ss.hasPermission('infra:job:export')") | 71 | @PreAuthorize("@ss.hasPermission('infra:job:export')") |
| 72 | @OperateLog(type = EXPORT) | 72 | @OperateLog(type = EXPORT) |
| 73 | public void exportJobLogExcel(@Valid JobLogExportReqVO exportReqVO, | 73 | public void exportJobLogExcel(@Valid JobLogExportReqVO exportReqVO, |