Commit bc75ad7a4040b712fbc16ea3ece9f2a2ab8a40a8

Authored by xingyuv
2 parents 9ebff278 111e944d

Merge branch 'master' into 1.X-dev

Showing 759 changed files with 8484 additions and 7020 deletions

Too many changes.

To preserve performance only 100 of 759 files are displayed.

README.md
1 -**严肃声明:现在、未来都不会有商业版本,所有代码全部开源!** 1 +**严肃声明:现在、未来都不会有商业版本,所有代码全部开源!!**
2 2
3 **「我喜欢写代码,乐此不疲」** 3 **「我喜欢写代码,乐此不疲」**
4 **「我喜欢做开源,以此为乐」** 4 **「我喜欢做开源,以此为乐」**
@@ -241,7 +241,7 @@ ps:核心功能已经实现,正在对接微信小程序中... @@ -241,7 +241,7 @@ ps:核心功能已经实现,正在对接微信小程序中...
241 | [Hibernate Validator](https://github.com/hibernate/hibernate-validator) | 参数校验组件 | 6.2.5 | [文档](http://www.iocoder.cn/Spring-Boot/Validation/?yudao) | 241 | [Hibernate Validator](https://github.com/hibernate/hibernate-validator) | 参数校验组件 | 6.2.5 | [文档](http://www.iocoder.cn/Spring-Boot/Validation/?yudao) |
242 | [Flowable](https://github.com/flowable/flowable-engine) | 工作流引擎 | 6.8.0 | [文档](https://doc.iocoder.cn/bpm/) | 242 | [Flowable](https://github.com/flowable/flowable-engine) | 工作流引擎 | 6.8.0 | [文档](https://doc.iocoder.cn/bpm/) |
243 | [Quartz](https://github.com/quartz-scheduler) | 任务调度组件 | 2.3.2 | [文档](http://www.iocoder.cn/Spring-Boot/Job/?yudao) | 243 | [Quartz](https://github.com/quartz-scheduler) | 任务调度组件 | 2.3.2 | [文档](http://www.iocoder.cn/Spring-Boot/Job/?yudao) |
244 -| [Knife4j](https://gitee.com/xiaoym/knife4j) | Swagger 增强 UI 实现 | 3.0.3 | [文档](http://www.iocoder.cn/Spring-Boot/Swagger/?yudao) | 244 +| [Knife4j](https://gitee.com/xiaoym/knife4j) | Swagger 增强 UI 实现 | 4.0.0 | [文档](http://www.iocoder.cn/Spring-Boot/Swagger/?yudao) |
245 | [Resilience4j](https://github.com/resilience4j/resilience4j) | 服务保障组件 | 1.7.1 | [文档](http://www.iocoder.cn/Spring-Boot/Resilience4j/?yudao) | 245 | [Resilience4j](https://github.com/resilience4j/resilience4j) | 服务保障组件 | 1.7.1 | [文档](http://www.iocoder.cn/Spring-Boot/Resilience4j/?yudao) |
246 | [SkyWalking](https://skywalking.apache.org/) | 分布式应用追踪系统 | 8.12.0 | [文档](http://www.iocoder.cn/Spring-Boot/SkyWalking/?yudao) | 246 | [SkyWalking](https://skywalking.apache.org/) | 分布式应用追踪系统 | 8.12.0 | [文档](http://www.iocoder.cn/Spring-Boot/SkyWalking/?yudao) |
247 | [Spring Boot Admin](https://github.com/codecentric/spring-boot-admin) | Spring Boot 监控平台 | 2.7.10 | [文档](http://www.iocoder.cn/Spring-Boot/Admin/?yudao) | 247 | [Spring Boot Admin](https://github.com/codecentric/spring-boot-admin) | Spring Boot 监控平台 | 2.7.10 | [文档](http://www.iocoder.cn/Spring-Boot/Admin/?yudao) |
@@ -20,7 +20,7 @@ @@ -20,7 +20,7 @@
20 <!-- <module>yudao-module-bpm</module>--> 20 <!-- <module>yudao-module-bpm</module>-->
21 <!-- <module>yudao-module-visualization</module>--> 21 <!-- <module>yudao-module-visualization</module>-->
22 <!-- <module>yudao-module-mp</module>--> 22 <!-- <module>yudao-module-mp</module>-->
23 - <!-- <module>yudao-module-mall</module>--> 23 +<!-- <module>yudao-module-mall</module>-->
24 <!-- 示例项目 --> 24 <!-- 示例项目 -->
25 <module>yudao-example</module> 25 <module>yudao-example</module>
26 </modules> 26 </modules>
sql/mysql/ruoyi-vue-pro.sql
@@ -3251,7 +3251,7 @@ CREATE TABLE `system_tenant` ( @@ -3251,7 +3251,7 @@ CREATE TABLE `system_tenant` (
3251 `package_id` bigint NOT NULL COMMENT '租户套餐编号', 3251 `package_id` bigint NOT NULL COMMENT '租户套餐编号',
3252 `expire_time` datetime NOT NULL COMMENT '过期时间', 3252 `expire_time` datetime NOT NULL COMMENT '过期时间',
3253 `account_count` int NOT NULL COMMENT '账号数量', 3253 `account_count` int NOT NULL COMMENT '账号数量',
3254 - `creator` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '' COMMENT '创建者', 3254 + `creator` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT '' COMMENT '创建者',
3255 `create_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间', 3255 `create_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
3256 `updater` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT '' COMMENT '更新者', 3256 `updater` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT '' COMMENT '更新者',
3257 `update_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间', 3257 `update_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间',
@@ -3282,7 +3282,7 @@ CREATE TABLE `system_tenant_package` ( @@ -3282,7 +3282,7 @@ CREATE TABLE `system_tenant_package` (
3282 `status` tinyint NOT NULL DEFAULT 0 COMMENT '租户状态(0正常 1停用)', 3282 `status` tinyint NOT NULL DEFAULT 0 COMMENT '租户状态(0正常 1停用)',
3283 `remark` varchar(256) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT '' COMMENT '备注', 3283 `remark` varchar(256) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT '' COMMENT '备注',
3284 `menu_ids` varchar(2048) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL COMMENT '关联的菜单编号', 3284 `menu_ids` varchar(2048) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL COMMENT '关联的菜单编号',
3285 - `creator` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '' COMMENT '创建者', 3285 + `creator` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT '' COMMENT '创建者',
3286 `create_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间', 3286 `create_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
3287 `updater` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT '' COMMENT '更新者', 3287 `updater` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT '' COMMENT '更新者',
3288 `update_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间', 3288 `update_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间',
sql/postgresql/ruoyi-vue-pro.sql
@@ -3817,7 +3817,7 @@ CREATE TABLE &quot;system_tenant&quot; ( @@ -3817,7 +3817,7 @@ CREATE TABLE &quot;system_tenant&quot; (
3817 "package_id" int8 NOT NULL, 3817 "package_id" int8 NOT NULL,
3818 "expire_time" timestamp(6) NOT NULL, 3818 "expire_time" timestamp(6) NOT NULL,
3819 "account_count" int4 NOT NULL, 3819 "account_count" int4 NOT NULL,
3820 - "creator" varchar(64) COLLATE "pg_catalog"."default" NOT NULL, 3820 + "creator" varchar(64) COLLATE "pg_catalog"."default",
3821 "create_time" timestamp(6) NOT NULL, 3821 "create_time" timestamp(6) NOT NULL,
3822 "updater" varchar(64) COLLATE "pg_catalog"."default", 3822 "updater" varchar(64) COLLATE "pg_catalog"."default",
3823 "update_time" timestamp(6) NOT NULL, 3823 "update_time" timestamp(6) NOT NULL,
@@ -3860,7 +3860,7 @@ CREATE TABLE &quot;system_tenant_package&quot; ( @@ -3860,7 +3860,7 @@ CREATE TABLE &quot;system_tenant_package&quot; (
3860 "status" int2 NOT NULL, 3860 "status" int2 NOT NULL,
3861 "remark" varchar(256) COLLATE "pg_catalog"."default", 3861 "remark" varchar(256) COLLATE "pg_catalog"."default",
3862 "menu_ids" varchar(2048) COLLATE "pg_catalog"."default" NOT NULL, 3862 "menu_ids" varchar(2048) COLLATE "pg_catalog"."default" NOT NULL,
3863 - "creator" varchar(64) COLLATE "pg_catalog"."default" NOT NULL, 3863 + "creator" varchar(64) COLLATE "pg_catalog"."default",
3864 "create_time" timestamp(6) NOT NULL, 3864 "create_time" timestamp(6) NOT NULL,
3865 "updater" varchar(64) COLLATE "pg_catalog"."default", 3865 "updater" varchar(64) COLLATE "pg_catalog"."default",
3866 "update_time" timestamp(6) NOT NULL, 3866 "update_time" timestamp(6) NOT NULL,
sql/sqlserver/ruoyi-vue-pro.sql
@@ -10600,7 +10600,7 @@ CREATE TABLE [dbo].[system_tenant] ( @@ -10600,7 +10600,7 @@ CREATE TABLE [dbo].[system_tenant] (
10600 [package_id] bigint NOT NULL, 10600 [package_id] bigint NOT NULL,
10601 [expire_time] datetime2(7) NOT NULL, 10601 [expire_time] datetime2(7) NOT NULL,
10602 [account_count] int NOT NULL, 10602 [account_count] int NOT NULL,
10603 - [creator] nvarchar(64) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL, 10603 + [creator] nvarchar(64) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
10604 [create_time] datetime2(7) NOT NULL, 10604 [create_time] datetime2(7) NOT NULL,
10605 [updater] nvarchar(64) COLLATE SQL_Latin1_General_CP1_CI_AS NULL, 10605 [updater] nvarchar(64) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
10606 [update_time] datetime2(7) NOT NULL, 10606 [update_time] datetime2(7) NOT NULL,
@@ -10761,7 +10761,7 @@ CREATE TABLE [dbo].[system_tenant_package] ( @@ -10761,7 +10761,7 @@ CREATE TABLE [dbo].[system_tenant_package] (
10761 [status] tinyint NOT NULL, 10761 [status] tinyint NOT NULL,
10762 [remark] nvarchar(256) COLLATE SQL_Latin1_General_CP1_CI_AS NULL, 10762 [remark] nvarchar(256) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
10763 [menu_ids] nvarchar(2048) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL, 10763 [menu_ids] nvarchar(2048) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL,
10764 - [creator] nvarchar(64) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL, 10764 + [creator] nvarchar(64) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
10765 [create_time] datetime2(7) NOT NULL, 10765 [create_time] datetime2(7) NOT NULL,
10766 [updater] nvarchar(64) COLLATE SQL_Latin1_General_CP1_CI_AS NULL, 10766 [updater] nvarchar(64) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
10767 [update_time] datetime2(7) NOT NULL, 10767 [update_time] datetime2(7) NOT NULL,
yudao-dependencies/pom.xml
@@ -18,8 +18,8 @@ @@ -18,8 +18,8 @@
18 <!-- 统一依赖管理 --> 18 <!-- 统一依赖管理 -->
19 <spring.boot.version>2.7.8</spring.boot.version> 19 <spring.boot.version>2.7.8</spring.boot.version>
20 <!-- Web 相关 --> 20 <!-- Web 相关 -->
  21 + <springdoc.version>1.6.14</springdoc.version>
21 <knife4j.version>4.0.0</knife4j.version> 22 <knife4j.version>4.0.0</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>
@@ -172,27 +172,13 @@ @@ -172,27 +172,13 @@
172 172
173 <dependency> 173 <dependency>
174 <groupId>com.github.xiaoymin</groupId> 174 <groupId>com.github.xiaoymin</groupId>
175 - <artifactId>knife4j-openapi2-spring-boot-starter</artifactId> 175 + <artifactId>knife4j-openapi3-spring-boot-starter</artifactId>
176 <version>${knife4j.version}</version> 176 <version>${knife4j.version}</version>
177 - <exclusions>  
178 - <exclusion>  
179 - <artifactId>mapstruct</artifactId>  
180 - <groupId>org.mapstruct</groupId> <!-- 避免冲突 -->  
181 - </exclusion>  
182 - <exclusion>  
183 - <artifactId>guava</artifactId>  
184 - <groupId>com.google.guava</groupId>  
185 - </exclusion>  
186 - <exclusion>  
187 - <artifactId>swagger-annotations</artifactId>  
188 - <groupId>io.swagger</groupId>  
189 - </exclusion>  
190 - </exclusions>  
191 </dependency> 177 </dependency>
192 <dependency> 178 <dependency>
193 - <groupId>io.swagger</groupId>  
194 - <artifactId>swagger-annotations</artifactId>  
195 - <version>${swagger-annotations.version}</version> 179 + <groupId>org.springdoc</groupId>
  180 + <artifactId>springdoc-openapi-ui</artifactId>
  181 + <version>${springdoc.version}</version>
196 </dependency> 182 </dependency>
197 183
198 <!-- DB 相关 --> 184 <!-- DB 相关 -->
@@ -302,16 +288,16 @@ @@ -302,16 +288,16 @@
302 <groupId>org.apache.skywalking</groupId> 288 <groupId>org.apache.skywalking</groupId>
303 <artifactId>apm-toolkit-opentracing</artifactId> 289 <artifactId>apm-toolkit-opentracing</artifactId>
304 <version>${skywalking.version}</version> 290 <version>${skywalking.version}</version>
305 -<!-- <exclusions>-->  
306 -<!-- <exclusion>-->  
307 -<!-- <artifactId>opentracing-api</artifactId>-->  
308 -<!-- <groupId>io.opentracing</groupId>-->  
309 -<!-- </exclusion>-->  
310 -<!-- <exclusion>-->  
311 -<!-- <artifactId>opentracing-util</artifactId>-->  
312 -<!-- <groupId>io.opentracing</groupId>-->  
313 -<!-- </exclusion>-->  
314 -<!-- </exclusions>--> 291 + <!-- <exclusions>-->
  292 + <!-- <exclusion>-->
  293 + <!-- <artifactId>opentracing-api</artifactId>-->
  294 + <!-- <groupId>io.opentracing</groupId>-->
  295 + <!-- </exclusion>-->
  296 + <!-- <exclusion>-->
  297 + <!-- <artifactId>opentracing-util</artifactId>-->
  298 + <!-- <groupId>io.opentracing</groupId>-->
  299 + <!-- </exclusion>-->
  300 + <!-- </exclusions>-->
315 </dependency> 301 </dependency>
316 <dependency> 302 <dependency>
317 <groupId>io.opentracing</groupId> 303 <groupId>io.opentracing</groupId>
@@ -474,7 +460,7 @@ @@ -474,7 +460,7 @@
474 <groupId>org.freemarker</groupId> 460 <groupId>org.freemarker</groupId>
475 <artifactId>freemarker</artifactId> <!-- 移除 Freemarker 依赖,采用 Velocity 作为模板引擎 --> 461 <artifactId>freemarker</artifactId> <!-- 移除 Freemarker 依赖,采用 Velocity 作为模板引擎 -->
476 </exclusion> 462 </exclusion>
477 - <exclusion> 463 + <exclusion>
478 <groupId>com.alibaba</groupId> 464 <groupId>com.alibaba</groupId>
479 <artifactId>fastjson</artifactId> <!-- 最新版screw-core1.0.5依赖fastjson1.2.73存在漏洞,移除。 --> 465 <artifactId>fastjson</artifactId> <!-- 最新版screw-core1.0.5依赖fastjson1.2.73存在漏洞,移除。 -->
480 </exclusion> 466 </exclusion>
yudao-framework/yudao-common/pom.xml
@@ -59,8 +59,8 @@ @@ -59,8 +59,8 @@
59 </dependency> 59 </dependency>
60 60
61 <dependency> 61 <dependency>
62 - <groupId>io.swagger</groupId>  
63 - <artifactId>swagger-annotations</artifactId> 62 + <groupId>org.springdoc</groupId>
  63 + <artifactId>springdoc-openapi-ui</artifactId>
64 <scope>provided</scope> <!-- 设置为 provided,主要是 PageParam 使用到 --> 64 <scope>provided</scope> <!-- 设置为 provided,主要是 PageParam 使用到 -->
65 </dependency> 65 </dependency>
66 66
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(description="分页参数")
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(description = "页码,从 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(description = "每页条数,最大值为 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 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.io.Serializable; 6 import java.io.Serializable;
8 import java.util.ArrayList; 7 import java.util.ArrayList;
9 import java.util.List; 8 import java.util.List;
10 9
11 -@ApiModel("分页结果") 10 +@Schema(description = "分页结果")
12 @Data 11 @Data
13 public final class PageResult<T> implements Serializable { 12 public final class PageResult<T> implements Serializable {
14 13
15 - @ApiModelProperty(value = "数据", required = true) 14 + @Schema(description = "数据", required = true)
16 private List<T> list; 15 private List<T> list;
17 16
18 - @ApiModelProperty(value = "总量", required = true) 17 + @Schema(description = "总量", required = true)
19 private Long total; 18 private Long total;
20 19
21 public PageResult() { 20 public PageResult() {
yudao-framework/yudao-spring-boot-starter-biz-data-permission/src/main/java/cn/iocoder/yudao/framework/datapermission/core/util/DataPermissionUtils.java 0 → 100644
  1 +package cn.iocoder.yudao.framework.datapermission.core.util;
  2 +
  3 +import cn.iocoder.yudao.framework.datapermission.core.annotation.DataPermission;
  4 +import cn.iocoder.yudao.framework.datapermission.core.aop.DataPermissionContextHolder;
  5 +import lombok.SneakyThrows;
  6 +
  7 +/**
  8 + * 数据权限 Util
  9 + *
  10 + * @author 芋道源码
  11 + */
  12 +public class DataPermissionUtils {
  13 +
  14 + private static DataPermission DATA_PERMISSION_DISABLE;
  15 +
  16 + @DataPermission(enable = false)
  17 + @SneakyThrows
  18 + private static DataPermission getDisableDataPermissionDisable() {
  19 + if (DATA_PERMISSION_DISABLE == null) {
  20 + DATA_PERMISSION_DISABLE = DataPermissionUtils.class
  21 + .getDeclaredMethod("getDisableDataPermissionDisable")
  22 + .getAnnotation(DataPermission.class);
  23 + }
  24 + return DATA_PERMISSION_DISABLE;
  25 + }
  26 +
  27 + /**
  28 + * 忽略数据权限,执行对应的逻辑
  29 + *
  30 + * @param runnable 逻辑
  31 + */
  32 + public static void executeIgnore(Runnable runnable) {
  33 + DataPermission dataPermission = getDisableDataPermissionDisable();
  34 + DataPermissionContextHolder.add(dataPermission);
  35 + try {
  36 + // 执行 runnable
  37 + runnable.run();
  38 + } finally {
  39 + DataPermissionContextHolder.remove();
  40 + }
  41 + }
  42 +
  43 +}
yudao-framework/yudao-spring-boot-starter-biz-data-permission/src/test/java/cn/iocoder/yudao/framework/datapermission/core/util/DataPermissionUtilsTest.java 0 → 100644
  1 +package cn.iocoder.yudao.framework.datapermission.core.util;
  2 +
  3 +import cn.iocoder.yudao.framework.datapermission.core.aop.DataPermissionContextHolder;
  4 +import org.junit.jupiter.api.Test;
  5 +
  6 +import static org.junit.jupiter.api.Assertions.*;
  7 +
  8 +public class DataPermissionUtilsTest {
  9 +
  10 + @Test
  11 + public void testExecuteIgnore() {
  12 + DataPermissionUtils.executeIgnore(() -> assertFalse(DataPermissionContextHolder.get().enable()));
  13 + }
  14 +
  15 +}
yudao-framework/yudao-spring-boot-starter-biz-error-code/src/main/java/cn/iocoder/yudao/framework/errorcode/core/generator/ErrorCodeAutoGeneratorImpl.java
@@ -49,7 +49,7 @@ public class ErrorCodeAutoGeneratorImpl implements ErrorCodeAutoGenerator { @@ -49,7 +49,7 @@ public class ErrorCodeAutoGeneratorImpl implements ErrorCodeAutoGenerator {
49 log.info("[execute][解析到错误码数量为 ({}) 个]", autoGenerateDTOs.size()); 49 log.info("[execute][解析到错误码数量为 ({}) 个]", autoGenerateDTOs.size());
50 50
51 // 第二步,写入到 system 服务 51 // 第二步,写入到 system 服务
52 - errorCodeApi.autoGenerateErrorCodes(autoGenerateDTOs); 52 + errorCodeApi.autoGenerateErrorCodeList(autoGenerateDTOs);
53 log.info("[execute][写入到 system 组件完成]"); 53 log.info("[execute][写入到 system 组件完成]");
54 } 54 }
55 55
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-biz-tenant/src/main/java/cn/iocoder/yudao/framework/tenant/core/service/TenantFrameworkServiceImpl.java
@@ -32,7 +32,7 @@ public class TenantFrameworkServiceImpl implements TenantFrameworkService { @@ -32,7 +32,7 @@ public class TenantFrameworkServiceImpl implements TenantFrameworkService {
32 32
33 @Override 33 @Override
34 public List<Long> load(Object key) { 34 public List<Long> load(Object key) {
35 - return tenantApi.getTenantIds(); 35 + return tenantApi.getTenantIdList();
36 } 36 }
37 37
38 }); 38 });
@@ -47,7 +47,7 @@ public class TenantFrameworkServiceImpl implements TenantFrameworkService { @@ -47,7 +47,7 @@ public class TenantFrameworkServiceImpl implements TenantFrameworkService {
47 @Override 47 @Override
48 public ServiceException load(Long id) { 48 public ServiceException load(Long id) {
49 try { 49 try {
50 - tenantApi.validTenant(id); 50 + tenantApi.validateTenant(id);
51 return SERVICE_EXCEPTION_NULL; 51 return SERVICE_EXCEPTION_NULL;
52 } catch (ServiceException ex) { 52 } catch (ServiceException ex) {
53 return ex; 53 return ex;
yudao-framework/yudao-spring-boot-starter-test/src/main/java/cn/iocoder/yudao/framework/test/core/util/RandomUtils.java
@@ -50,7 +50,7 @@ public class RandomUtils { @@ -50,7 +50,7 @@ public class RandomUtils {
50 } 50 }
51 // 如果是 type、status 结尾的字段,返回 tinyint 范围 51 // 如果是 type、status 结尾的字段,返回 tinyint 范围
52 if (StrUtil.endWithAnyIgnoreCase(attributeMetadata.getAttributeName(), 52 if (StrUtil.endWithAnyIgnoreCase(attributeMetadata.getAttributeName(),
53 - "type", "status", "category", "scope")) { 53 + "type", "status", "category", "scope", "result")) {
54 return RandomUtil.randomInt(0, TINYINT_MAX + 1); 54 return RandomUtil.randomInt(0, TINYINT_MAX + 1);
55 } 55 }
56 return RandomUtil.randomInt(); 56 return RandomUtil.randomInt();
yudao-framework/yudao-spring-boot-starter-web/pom.xml
@@ -21,12 +21,6 @@ @@ -21,12 +21,6 @@
21 <artifactId>yudao-common</artifactId> 21 <artifactId>yudao-common</artifactId>
22 </dependency> 22 </dependency>
23 23
24 - <dependency>  
25 - <groupId>org.apache.commons</groupId>  
26 - <artifactId>commons-lang3</artifactId>  
27 - <scope>provided</scope>  
28 - </dependency>  
29 -  
30 <!-- Web 相关 --> 24 <!-- Web 相关 -->
31 <dependency> 25 <dependency>
32 <groupId>org.springframework.boot</groupId> 26 <groupId>org.springframework.boot</groupId>
@@ -41,16 +35,11 @@ @@ -41,16 +35,11 @@
41 35
42 <dependency> 36 <dependency>
43 <groupId>com.github.xiaoymin</groupId> 37 <groupId>com.github.xiaoymin</groupId>
44 - <artifactId>knife4j-openapi2-spring-boot-starter</artifactId> 38 + <artifactId>knife4j-openapi3-spring-boot-starter</artifactId>
45 </dependency> 39 </dependency>
46 <dependency> 40 <dependency>
47 - <groupId>io.swagger</groupId>  
48 - <artifactId>swagger-annotations</artifactId>  
49 - </dependency>  
50 -  
51 - <dependency>  
52 - <groupId>org.springframework.boot</groupId>  
53 - <artifactId>spring-boot-starter-validation</artifactId> 41 + <groupId>org.springdoc</groupId>
  42 + <artifactId>springdoc-openapi-ui</artifactId>
54 </dependency> 43 </dependency>
55 44
56 <dependency> 45 <dependency>
yudao-framework/yudao-spring-boot-starter-web/src/main/java/cn/iocoder/yudao/framework/swagger/config/SwaggerProperties.java
@@ -35,9 +35,26 @@ public class SwaggerProperties { @@ -35,9 +35,26 @@ public class SwaggerProperties {
35 @NotEmpty(message = "版本不能为空") 35 @NotEmpty(message = "版本不能为空")
36 private String version; 36 private String version;
37 /** 37 /**
38 - * 扫描的包 38 + * url
39 */ 39 */
40 @NotEmpty(message = "扫描的 package 不能为空") 40 @NotEmpty(message = "扫描的 package 不能为空")
41 - private String basePackage; 41 + private String url;
  42 + /**
  43 + * email
  44 + */
  45 + @NotEmpty(message = "扫描的 email 不能为空")
  46 + private String email;
  47 +
  48 + /**
  49 + * license
  50 + */
  51 + @NotEmpty(message = "扫描的 license 不能为空")
  52 + private String license;
  53 +
  54 + /**
  55 + * license-url
  56 + */
  57 + @NotEmpty(message = "扫描的 license-url 不能为空")
  58 + private String licenseUrl;
42 59
43 } 60 }
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.OpenAPI;
  5 +import io.swagger.v3.oas.models.info.Contact;
  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.media.IntegerSchema;
  9 +import io.swagger.v3.oas.models.media.StringSchema;
  10 +import io.swagger.v3.oas.models.parameters.Parameter;
  11 +import io.swagger.v3.oas.models.security.SecurityRequirement;
  12 +import io.swagger.v3.oas.models.security.SecurityScheme;
  13 +import org.springdoc.core.*;
  14 +import org.springdoc.core.customizers.OpenApiBuilderCustomizer;
  15 +import org.springdoc.core.customizers.ServerBaseUrlCustomizer;
  16 +import org.springdoc.core.providers.JavadocProvider;
5 import org.springframework.boot.autoconfigure.AutoConfiguration; 17 import org.springframework.boot.autoconfigure.AutoConfiguration;
6 import org.springframework.boot.autoconfigure.condition.ConditionalOnClass; 18 import org.springframework.boot.autoconfigure.condition.ConditionalOnClass;
7 import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty; 19 import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty;
8 import org.springframework.boot.context.properties.EnableConfigurationProperties; 20 import org.springframework.boot.context.properties.EnableConfigurationProperties;
9 import org.springframework.context.annotation.Bean; 21 import org.springframework.context.annotation.Bean;
10 import org.springframework.http.HttpHeaders; 22 import org.springframework.http.HttpHeaders;
11 -import springfox.documentation.builders.ApiInfoBuilder;  
12 -import springfox.documentation.builders.ParameterBuilder;  
13 -import springfox.documentation.builders.PathSelectors;  
14 -import springfox.documentation.schema.ModelRef;  
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.EnableSwagger2WebMvc;  
20 -  
21 -import java.util.ArrayList;  
22 -import java.util.Collections; 23 +
  24 +import java.util.HashMap;
23 import java.util.List; 25 import java.util.List;
  26 +import java.util.Map;
  27 +import java.util.Optional;
24 28
25 import static cn.iocoder.yudao.framework.web.core.util.WebFrameworkUtils.HEADER_TENANT_ID; 29 import static cn.iocoder.yudao.framework.web.core.util.WebFrameworkUtils.HEADER_TENANT_ID;
26 -import static springfox.documentation.builders.RequestHandlerSelectors.basePackage;  
27 30
28 /** 31 /**
29 - * Swagger2 自动配置类 32 + * Swagger 自动配置类,基于 OpenAPI + Springdoc 实现。
  33 + *
  34 + * 友情提示:
  35 + * 1. Springdoc 文档地址:<a href="https://github.com/springdoc/springdoc-openapi">仓库</a>
  36 + * 2. Swagger 规范,于 2015 更名为 OpenAPI 规范,本质是一个东西
30 * 37 *
31 * @author 芋道源码 38 * @author 芋道源码
32 */ 39 */
33 @AutoConfiguration 40 @AutoConfiguration
34 -@EnableSwagger2WebMvc  
35 -@EnableKnife4j  
36 -@ConditionalOnClass({Docket.class, ApiInfoBuilder.class})  
37 -// 允许使用 swagger.enable=false 禁用 Swagger  
38 -@ConditionalOnProperty(prefix = "yudao.swagger", value = "enable", matchIfMissing = true) 41 +@ConditionalOnClass({OpenAPI.class})
39 @EnableConfigurationProperties(SwaggerProperties.class) 42 @EnableConfigurationProperties(SwaggerProperties.class)
  43 +@ConditionalOnProperty(prefix = "springdoc.api-docs", name = "enabled", havingValue = "true", matchIfMissing = true) // 设置为 false 时,禁用
40 public class YudaoSwaggerAutoConfiguration { 44 public class YudaoSwaggerAutoConfiguration {
41 45
42 - @Bean  
43 - public SpringFoxHandlerProviderBeanPostProcessor springFoxHandlerProviderBeanPostProcessor() {  
44 - return new SpringFoxHandlerProviderBeanPostProcessor();  
45 - } 46 + // ========== 全局 OpenAPI 配置 ==========
46 47
47 @Bean 48 @Bean
48 - public Docket createRestApi(SwaggerProperties properties) {  
49 - // 创建 Docket 对象  
50 - return new Docket(DocumentationType.SWAGGER_2)  
51 - // ① 用来创建该 API 的基本信息,展示在文档的页面中(自定义展示的信息)  
52 - .apiInfo(apiInfo(properties))  
53 - // ② 设置扫描指定 package 包下的  
54 - .select()  
55 - .apis(basePackage(properties.getBasePackage()))  
56 -// .apis(basePackage("cn.iocoder.yudao.module.system")) // 可用于 swagger 无法展示时使用  
57 - .paths(PathSelectors.any())  
58 - .build()  
59 - // ③ 安全上下文(认证)  
60 - .securitySchemes(securitySchemes())  
61 - .securityContexts(securityContexts())  
62 - // ④ 全局参数(多租户 header)  
63 - .globalOperationParameters(globalRequestParameters()); 49 + public OpenAPI createApi(SwaggerProperties properties) {
  50 + Map<String, SecurityScheme> securitySchemas = buildSecuritySchemes();
  51 + OpenAPI openAPI = new OpenAPI()
  52 + // 接口信息
  53 + .info(buildInfo(properties))
  54 + // 接口安全配置
  55 + .components(new Components().securitySchemes(securitySchemas))
  56 + .addSecurityItem(new SecurityRequirement().addList(HttpHeaders.AUTHORIZATION));
  57 + securitySchemas.keySet().forEach(key -> openAPI.addSecurityItem(new SecurityRequirement().addList(key)));
  58 + return openAPI;
64 } 59 }
65 60
66 - // ========== apiInfo ==========  
67 -  
68 /** 61 /**
69 * API 摘要信息 62 * API 摘要信息
70 */ 63 */
71 - private static ApiInfo apiInfo(SwaggerProperties properties) {  
72 - return new ApiInfoBuilder() 64 + private Info buildInfo(SwaggerProperties properties) {
  65 + return new Info()
73 .title(properties.getTitle()) 66 .title(properties.getTitle())
74 .description(properties.getDescription()) 67 .description(properties.getDescription())
75 - .contact(new Contact(properties.getAuthor(), null, null))  
76 .version(properties.getVersion()) 68 .version(properties.getVersion())
77 - .build(); 69 + .contact(new Contact().name(properties.getAuthor()).url(properties.getUrl()).email(properties.getEmail()))
  70 + .license(new License().name(properties.getLicense()).url(properties.getLicenseUrl()));
78 } 71 }
79 72
80 - // ========== securitySchemes ==========  
81 -  
82 /** 73 /**
83 * 安全模式,这里配置通过请求头 Authorization 传递 token 参数 74 * 安全模式,这里配置通过请求头 Authorization 传递 token 参数
84 */ 75 */
85 - private static List<SecurityScheme> securitySchemes() {  
86 - return Collections.singletonList(new ApiKey(HttpHeaders.AUTHORIZATION, "Authorization", "header")); 76 + private Map<String, SecurityScheme> buildSecuritySchemes() {
  77 + Map<String, SecurityScheme> securitySchemes = new HashMap<>();
  78 + SecurityScheme securityScheme = new SecurityScheme()
  79 + .type(SecurityScheme.Type.APIKEY) // 类型
  80 + .name(HttpHeaders.AUTHORIZATION) // 请求头的 name
  81 + .in(SecurityScheme.In.HEADER); // token 所在位置
  82 + securitySchemes.put(HttpHeaders.AUTHORIZATION, securityScheme);
  83 + return securitySchemes;
87 } 84 }
88 85
89 /** 86 /**
90 - * 安全上下文  
91 - *  
92 - * @see #securitySchemes()  
93 - * @see #authorizationScopes() 87 + * 自定义 OpenAPI 处理器
  88 + */
  89 + @Bean
  90 + public OpenAPIService openApiBuilder(Optional<OpenAPI> openAPI,
  91 + SecurityService securityParser,
  92 + SpringDocConfigProperties springDocConfigProperties,
  93 + PropertyResolverUtils propertyResolverUtils,
  94 + Optional<List<OpenApiBuilderCustomizer>> openApiBuilderCustomizers,
  95 + Optional<List<ServerBaseUrlCustomizer>> serverBaseUrlCustomizers,
  96 + Optional<JavadocProvider> javadocProvider) {
  97 +
  98 + return new OpenAPIService(openAPI, securityParser, springDocConfigProperties,
  99 + propertyResolverUtils, openApiBuilderCustomizers, serverBaseUrlCustomizers, javadocProvider);
  100 + }
  101 +
  102 + // ========== 分组 OpenAPI 配置 ==========
  103 +
  104 + /**
  105 + * 所有模块的 API 分组
94 */ 106 */
95 - private static List<SecurityContext> securityContexts() {  
96 - return Collections.singletonList(SecurityContext.builder()  
97 - .securityReferences(securityReferences())  
98 - // 通过 PathSelectors.regex("^(?!auth).*$"),排除包含 "auth" 的接口不需要使用securitySchemes  
99 - .forPaths(PathSelectors.regex("^(?!auth).*$"))  
100 - .build()); 107 + @Bean
  108 + public GroupedOpenApi allGroupedOpenApi() {
  109 + return buildGroupedOpenApi("all", "");
101 } 110 }
102 111
103 - private static List<SecurityReference> securityReferences() {  
104 - return Collections.singletonList(new SecurityReference(HttpHeaders.AUTHORIZATION, authorizationScopes())); 112 + public static GroupedOpenApi buildGroupedOpenApi(String group) {
  113 + return buildGroupedOpenApi(group, group);
105 } 114 }
106 115
107 - private static AuthorizationScope[] authorizationScopes() {  
108 - return new AuthorizationScope[]{new AuthorizationScope("global", "accessEverything")}; 116 + public static GroupedOpenApi buildGroupedOpenApi(String group, String path) {
  117 + return GroupedOpenApi.builder()
  118 + .group(group)
  119 + .pathsToMatch("/admin-api/" + path + "/**", "/app-api/" + path + "/**")
  120 + .addOperationCustomizer((operation, handlerMethod) -> operation
  121 + .addParametersItem(buildTenantHeaderParameter())
  122 + .addParametersItem(buildSecurityHeaderParameter()))
  123 + .build();
109 } 124 }
110 125
111 - // ========== globalRequestParameters ==========  
112 -  
113 - private static List<Parameter> globalRequestParameters() {  
114 - List<Parameter> tenantParameter = new ArrayList<>();  
115 - tenantParameter.add(new ParameterBuilder()  
116 - .name(HEADER_TENANT_ID)  
117 - .description("租户编号")  
118 - .modelRef(new ModelRef("long"))  
119 - .defaultValue("1")  
120 - .parameterType("header")  
121 - .required(true)  
122 - .build());  
123 - return tenantParameter; 126 + /**
  127 + * 构建 Tenant 租户编号请求头参数
  128 + *
  129 + * @return 多租户参数
  130 + */
  131 + private static Parameter buildTenantHeaderParameter() {
  132 + return new Parameter()
  133 + .name(HEADER_TENANT_ID) // header 名
  134 + .description("租户编号") // 描述
  135 + .in(String.valueOf(SecurityScheme.In.HEADER)) // 请求 header
  136 + .schema(new IntegerSchema()._default(1L).name(HEADER_TENANT_ID).description("租户编号")); // 默认:使用租户编号为 1
  137 + }
  138 +
  139 + /**
  140 + * 构建 Authorization 认证请求头参数
  141 + *
  142 + * 解决 Knife4j <a href="https://gitee.com/xiaoym/knife4j/issues/I69QBU">Authorize 未生效,请求header里未包含参数</a>
  143 + *
  144 + * @return 认证参数
  145 + */
  146 + private static Parameter buildSecurityHeaderParameter() {
  147 + return new Parameter()
  148 + .name(HttpHeaders.AUTHORIZATION) // header 名
  149 + .description("认证 Token") // 描述
  150 + .in(String.valueOf(SecurityScheme.In.HEADER)) // 请求 header
  151 + .schema(new StringSchema()._default("Bearer test1").name(HEADER_TENANT_ID).description("认证 Token")); // 默认:使用用户编号为 1
124 } 152 }
125 153
126 } 154 }
  155 +
yudao-framework/yudao-spring-boot-starter-web/src/main/java/cn/iocoder/yudao/framework/swagger/core/SpringFoxHandlerProviderBeanPostProcessor.java deleted
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.WebMvcRequestHandlerProvider;  
9 -  
10 -import java.util.List;  
11 -  
12 -/**  
13 - * 解决 SpringFox 与 SpringBoot 2.6.x 不兼容的问题  
14 - * 该问题对应的 issue 为 https://github.com/springfox/springfox/issues/3462  
15 - *  
16 - * @author 芋道源码  
17 - */  
18 -public class SpringFoxHandlerProviderBeanPostProcessor implements BeanPostProcessor {  
19 -  
20 - @Override  
21 - public Object postProcessAfterInitialization(Object bean, String beanName) throws BeansException {  
22 - if (bean instanceof WebMvcRequestHandlerProvider) {  
23 - customizeSpringfoxHandlerMappings(getHandlerMappings(bean));  
24 - }  
25 - return bean;  
26 - }  
27 -  
28 - private <T extends RequestMappingInfoHandlerMapping> void customizeSpringfoxHandlerMappings(List<T> mappings) {  
29 - // 移除,只保留 patternParser  
30 - List<T> copy = CollectionUtils.filterList(mappings, mapping -> mapping.getPatternParser() == null);  
31 - // 添加到 mappings 中  
32 - mappings.clear();  
33 - mappings.addAll(copy);  
34 - }  
35 -  
36 - @SuppressWarnings("unchecked")  
37 - private List<RequestMappingInfoHandlerMapping> getHandlerMappings(Object bean) {  
38 - return (List<RequestMappingInfoHandlerMapping>)  
39 - ReflectUtil.getFieldValue(bean, "handlerMappings");  
40 - }  
41 -  
42 -}  
yudao-framework/yudao-spring-boot-starter-web/src/main/resources/META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports
1 cn.iocoder.yudao.framework.apilog.config.YudaoApiLogAutoConfiguration 1 cn.iocoder.yudao.framework.apilog.config.YudaoApiLogAutoConfiguration
2 cn.iocoder.yudao.framework.jackson.config.YudaoJacksonAutoConfiguration 2 cn.iocoder.yudao.framework.jackson.config.YudaoJacksonAutoConfiguration
  3 +com.github.xiaoymin.knife4j.spring.configuration.Knife4jAutoConfiguration
3 cn.iocoder.yudao.framework.swagger.config.YudaoSwaggerAutoConfiguration 4 cn.iocoder.yudao.framework.swagger.config.YudaoSwaggerAutoConfiguration
4 cn.iocoder.yudao.framework.web.config.YudaoWebAutoConfiguration 5 cn.iocoder.yudao.framework.web.config.YudaoWebAutoConfiguration
5 cn.iocoder.yudao.framework.xss.config.YudaoXssAutoConfiguration 6 cn.iocoder.yudao.framework.xss.config.YudaoXssAutoConfiguration
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(description = "表单名称", 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(description = "表单状态-参见 CommonStatusEnum 枚举", required = true, example = "1")
19 @NotNull(message = "表单状态不能为空") 18 @NotNull(message = "表单状态不能为空")
20 private Integer status; 19 private Integer status;
21 20
22 - @ApiModelProperty(value = "备注", example = "我是备注") 21 + @Schema(description = "备注", 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(description = "管理后台 - 动态表单创建 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(description = "表单的配置-JSON 字符串", required = true)
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(description = "表单项的数组-JSON 字符串的数组", required = true)
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(description = "管理后台 - 动态表单分页 Request VO")
11 @Data 10 @Data
12 @EqualsAndHashCode(callSuper = true) 11 @EqualsAndHashCode(callSuper = true)
13 @ToString(callSuper = true) 12 @ToString(callSuper = true)
14 public class BpmFormPageReqVO extends PageParam { 13 public class BpmFormPageReqVO extends PageParam {
15 14
16 - @ApiModelProperty(value = "表单名称", example = "芋道") 15 + @Schema(description = "表单名称", 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(description = "管理后台 - 动态表单 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(description = "表单编号", required = true, example = "1024")
20 private Long id; 18 private Long id;
21 19
22 - @ApiModelProperty(value = "表单的配置", required = true, notes = "JSON 字符串") 20 + @Schema(description = "表单的配置-JSON 字符串", required = true)
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(description = "表单项的数组-JSON 字符串的数组", required = true)
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(description = "创建时间", 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(description = "管理后台 - 流程表单精简 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(description = "表单编号", required = true, example = "1024")
12 private Long id; 11 private Long id;
13 12
14 - @ApiModelProperty(value = "表单名称", required = true, example = "芋道") 13 + @Schema(description = "表单名称", required = true, example = "芋道")
15 private String name; 14 private String name;
16 15
17 } 16 }
yudao-module-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(description = "管理后台 - 动态表单更新 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(description = "表单编号", 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(description = "表单的配置-JSON 字符串", required = true)
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(description = "表单项的数组-JSON 字符串的数组", required = true)
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(description = "组名", 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(description = "描述", 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(description = "成员编号数组", 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(description = "状态", 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(description = "管理后台 - 用户组创建 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(description = "管理后台 - 用户组分页 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(description = "组名", example = "芋道")
21 private String name; 20 private String name;
22 21
23 - @ApiModelProperty(value = "状态", example = "1") 22 + @Schema(description = "状态", 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(description = "创建时间")
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(description = "管理后台 - 用户组 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(description = "编号", required = true, example = "1024")
16 private Long id; 15 private Long id;
17 16
18 - @ApiModelProperty(value = "创建时间", required = true) 17 + @Schema(description = "创建时间", 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(description = "管理后台 - 用户组精简信息 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(description = "用户组编号", required = true, example = "1024")
16 private Long id; 15 private Long id;
17 16
18 - @ApiModelProperty(value = "用户组名字", required = true, example = "芋道") 17 + @Schema(description = "用户组名字", 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(description = "管理后台 - 用户组更新 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(description = "编号", 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(description = "管理后台 - 流程模型的导入 Request VO 相比流程模型的新建来说,只是多了一个 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(description = "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(description = "流程标识", 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(description = "流程名称", 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(description = "流程描述", example = "我是描述")
24 private String description; 23 private String description;
25 24
26 - @ApiModelProperty(value = "流程分类", notes = "参见 bpm_model_category 数据字典", example = "1") 25 + @Schema(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(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(description = "表单编号-在表单类型为 {@link BpmModelFormTypeEnum#CUSTOM} 时,必须非空", example = "1024")
33 private Long formId; 32 private Long formId;
34 - @ApiModelProperty(value = "自定义表单的提交路径,使用 Vue 的路由地址", example = "/bpm/oa/leave/create",  
35 - notes = "在表单类型为 {@link BpmModelFormTypeEnum#CUSTOM} 时,必须非空") 33 + @Schema(description = "自定义表单的提交路径,使用 Vue 的路由地址-在表单类型为 {@link BpmModelFormTypeEnum#CUSTOM} 时,必须非空",
  34 + example = "/bpm/oa/leave/create")
36 private String formCustomCreatePath; 35 private String formCustomCreatePath;
37 - @ApiModelProperty(value = "自定义表单的查看路径,使用 Vue 的路由地址", example = "/bpm/oa/leave/view",  
38 - notes = "在表单类型为 {@link BpmModelFormTypeEnum#CUSTOM} 时,必须非空") 36 + @Schema(description = "自定义表单的查看路径,使用 Vue 的路由地址-在表单类型为 {@link BpmModelFormTypeEnum#CUSTOM} 时,必须非空",
  37 + example = "/bpm/oa/leave/view")
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(description = "管理后台 - 流程模型的创建 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(description = "流程标识", 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(description = "流程名称", 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(description = "流程描述", 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(description = "管理后台 - 流程模型的分页的每一项 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(description = "编号", required = true, example = "1024")
18 private String id; 17 private String id;
19 18
20 - @ApiModelProperty(value = "表单名字", example = "请假表单") 19 + @Schema(description = "表单名字", example = "请假表单")
21 private String formName; 20 private String formName;
22 21
23 - @ApiModelProperty(value = "创建时间", required = true) 22 + @Schema(description = "创建时间", 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(description = "流程定义")
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(description = "编号", required = true, example = "1024")
36 private String id; 35 private String id;
37 36
38 - @ApiModelProperty(value = "版本", required = true, example = "1") 37 + @Schema(description = "版本", required = true, example = "1")
39 private Integer version; 38 private Integer version;
40 39
41 - @ApiModelProperty(value = "部署时间", required = true) 40 + @Schema(description = "部署时间", required = true)
42 private LocalDateTime deploymentTime; 41 private LocalDateTime deploymentTime;
43 42
44 - @ApiModelProperty(value = "中断状态", required = true, example = "1", notes = "参见 SuspensionState 枚举") 43 + @Schema(description = "中断状态-参见 SuspensionState 枚举", required = true, example = "1")
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(description = "管理后台 - 流程模型分页 Request VO")
12 @Data 11 @Data
13 @EqualsAndHashCode(callSuper = true) 12 @EqualsAndHashCode(callSuper = true)
14 @ToString(callSuper = true) 13 @ToString(callSuper = true)
15 public class BpmModelPageReqVO extends PageParam { 14 public class BpmModelPageReqVO extends PageParam {
16 15
17 - @ApiModelProperty(value = "标识", example = "process1641042089407", notes = "精准匹配") 16 + @Schema(description = "标识-精准匹配", example = "process1641042089407")
18 private String key; 17 private String key;
19 18
20 - @ApiModelProperty(value = "名字", example = "芋道", notes = "模糊匹配") 19 + @Schema(description = "名字-模糊匹配", example = "芋道")
21 private String name; 20 private String name;
22 21
23 - @ApiModelProperty(value = "流程分类", notes = "参见 bpm_model_category 数据字典", example = "1") 22 + @Schema(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(description = "管理后台 - 流程模型的创建 Request VO")
12 @Data 11 @Data
13 @EqualsAndHashCode(callSuper = true) 12 @EqualsAndHashCode(callSuper = true)
14 @ToString(callSuper = true) 13 @ToString(callSuper = true)
15 public class BpmModelRespVO extends BpmModelBaseVO { 14 public class BpmModelRespVO extends BpmModelBaseVO {
16 15
17 - @ApiModelProperty(value = "编号", required = true, example = "1024") 16 + @Schema(description = "编号", required = true, example = "1024")
18 private String id; 17 private String id;
19 18
20 - @ApiModelProperty(value = "BPMN XML", required = true) 19 + @Schema(description = "BPMN XML", required = true)
21 private String bpmnXml; 20 private String bpmnXml;
22 21
23 - @ApiModelProperty(value = "创建时间", required = true) 22 + @Schema(description = "创建时间", 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(description = "管理后台 - 流程模型的更新 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(description = "编号", 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(description = "流程名称", example = "芋道")
18 private String name; 17 private String name;
19 18
20 - @ApiModelProperty(value = "流程描述", example = "我是描述") 19 + @Schema(description = "流程描述", example = "我是描述")
21 private String description; 20 private String description;
22 21
23 - @ApiModelProperty(value = "流程分类", notes = "参见 bpm_model_category 数据字典", example = "1") 22 + @Schema(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(description = "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(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(description = "表单编号-在表单类型为 {@link BpmModelFormTypeEnum#CUSTOM} 时,必须非空", example = "1024")
32 private Long formId; 31 private Long formId;
33 - @ApiModelProperty(value = "自定义表单的提交路径,使用 Vue 的路由地址", example = "/bpm/oa/leave/create",  
34 - notes = "在表单类型为 {@link BpmModelFormTypeEnum#CUSTOM} 时,必须非空") 32 + @Schema(description = "自定义表单的提交路径,使用 Vue 的路由地址-在表单类型为 {@link BpmModelFormTypeEnum#CUSTOM} 时,必须非空",
  33 + example = "/bpm/oa/leave/create")
35 private String formCustomCreatePath; 34 private String formCustomCreatePath;
36 - @ApiModelProperty(value = "自定义表单的查看路径,使用 Vue 的路由地址", example = "/bpm/oa/leave/view",  
37 - notes = "在表单类型为 {@link BpmModelFormTypeEnum#CUSTOM} 时,必须非空") 35 + @Schema(description = "自定义表单的查看路径,使用 Vue 的路由地址-在表单类型为 {@link BpmModelFormTypeEnum#CUSTOM} 时,必须非空",
  36 + example = "/bpm/oa/leave/view")
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(description = "管理后台 - 流程模型更新状态 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(description = "编号", 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(description = "状态-见 SuspensionState 枚举", required = true, example = "1")
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(description = "管理后台 - 流程定义列表 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(description = "中断状态-参见 SuspensionState 枚举", example = "1")
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(description = "管理后台 - 流程定义的分页的每一项 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(description = "表单名字", example = "请假表单")
18 private String formName; 17 private String formName;
19 18
20 - @ApiModelProperty(value = "部署时间", required = true) 19 + @Schema(description = "部署时间", 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(description = "管理后台 - 流程定义分页 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(description = "标识-精准匹配", example = "process1641042089407")
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(description = "管理后台 - 流程定义 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(description = "编号", required = true, example = "1024")
16 private String id; 15 private String id;
17 16
18 - @ApiModelProperty(value = "版本", required = true, example = "1") 17 + @Schema(description = "版本", required = true, example = "1")
19 private Integer version; 18 private Integer version;
20 19
21 - @ApiModelProperty(value = "流程名称", required = true, example = "芋道") 20 + @Schema(description = "流程名称", 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(description = "流程描述", example = "我是描述")
26 private String description; 25 private String description;
27 26
28 - @ApiModelProperty(value = "流程分类", notes = "参见 bpm_model_category 数据字典", example = "1") 27 + @Schema(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(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(description = "表单编号-在表单类型为 {@link BpmModelFormTypeEnum#CUSTOM} 时,必须非空", example = "1024")
35 private Long formId; 34 private Long formId;
36 - @ApiModelProperty(value = "表单的配置", required = true,  
37 - notes = "JSON 字符串。在表单类型为 {@link BpmModelFormTypeEnum#CUSTOM} 时,必须非空") 35 + @Schema(description = "表单的配置-JSON 字符串。在表单类型为 {@link BpmModelFormTypeEnum#CUSTOM} 时,必须非空", required = true)
38 private String formConf; 36 private String formConf;
39 - @ApiModelProperty(value = "表单项的数组", required = true,  
40 - notes = "JSON 字符串的数组。在表单类型为 {@link BpmModelFormTypeEnum#CUSTOM} 时,必须非空") 37 + @Schema(description = "表单项的数组-JSON 字符串的数组。在表单类型为 {@link BpmModelFormTypeEnum#CUSTOM} 时,必须非空", required = true)
41 private List<String> formFields; 38 private List<String> formFields;
42 - @ApiModelProperty(value = "自定义表单的提交路径,使用 Vue 的路由地址", example = "/bpm/oa/leave/create",  
43 - notes = "在表单类型为 {@link BpmModelFormTypeEnum#CUSTOM} 时,必须非空") 39 + @Schema(description = "自定义表单的提交路径,使用 Vue 的路由地址-在表单类型为 {@link BpmModelFormTypeEnum#CUSTOM} 时,必须非空",
  40 + example = "/bpm/oa/leave/create")
44 private String formCustomCreatePath; 41 private String formCustomCreatePath;
45 - @ApiModelProperty(value = "自定义表单的查看路径,使用 Vue 的路由地址", example = "/bpm/oa/leave/view",  
46 - notes = "在表单类型为 {@link BpmModelFormTypeEnum#CUSTOM} 时,必须非空") 42 + @Schema(description = "自定义表单的查看路径,使用 Vue 的路由地址-在表单类型为 {@link BpmModelFormTypeEnum#CUSTOM} 时,必须非空",
  43 + example = "/bpm/oa/leave/view")
47 private String formCustomViewPath; 44 private String formCustomViewPath;
48 45
49 - @ApiModelProperty(value = "中断状态", required = true, example = "1", notes = "参见 SuspensionState 枚举") 46 + @Schema(description = "中断状态-参见 SuspensionState 枚举", required = true, example = "1")
50 private Integer suspensionState; 47 private Integer suspensionState;
51 48
52 } 49 }
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(description = "规则类型", 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(description = "规则值数组", 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(description = "管理后台 - 流程任务分配规则的创建 Request VO")
12 @Data 11 @Data
13 @EqualsAndHashCode(callSuper = true) 12 @EqualsAndHashCode(callSuper = true)
14 @ToString(callSuper = true) 13 @ToString(callSuper = true)
15 public class BpmTaskAssignRuleCreateReqVO extends BpmTaskAssignRuleBaseVO { 14 public class BpmTaskAssignRuleCreateReqVO extends BpmTaskAssignRuleBaseVO {
16 15
17 - @ApiModelProperty(value = "流程模型的编号", required = true, example = "1024") 16 + @Schema(description = "流程模型的编号", 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(description = "流程任务定义的编号", 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(description = "管理后台 - 流程任务分配规则的 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(description = "任务分配规则的编号", required = true, example = "1024")
16 private Long id; 15 private Long id;
17 16
18 - @ApiModelProperty(value = "流程模型的编号", required = true, example = "2048") 17 + @Schema(description = "流程模型的编号", required = true, example = "2048")
19 private String modelId; 18 private String modelId;
20 19
21 - @ApiModelProperty(value = "流程定义的编号", required = true, example = "4096") 20 + @Schema(description = "流程定义的编号", required = true, example = "4096")
22 private String processDefinitionId; 21 private String processDefinitionId;
23 22
24 - @ApiModelProperty(value = "流程任务定义的编号", required = true, example = "2048") 23 + @Schema(description = "流程任务定义的编号", required = true, example = "2048")
25 private String taskDefinitionKey; 24 private String taskDefinitionKey;
26 - @ApiModelProperty(value = "流程任务定义的名字", required = true, example = "关注芋道") 25 + @Schema(description = "流程任务定义的名字", 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(description = "管理后台 - 流程任务分配规则的更新 Request VO")
12 @Data 11 @Data
13 @EqualsAndHashCode(callSuper = true) 12 @EqualsAndHashCode(callSuper = true)
14 @ToString(callSuper = true) 13 @ToString(callSuper = true)
15 public class BpmTaskAssignRuleUpdateReqVO extends BpmTaskAssignRuleBaseVO { 14 public class BpmTaskAssignRuleUpdateReqVO extends BpmTaskAssignRuleBaseVO {
16 15
17 - @ApiModelProperty(value = "任务分配规则的编号", required = true, example = "1024") 16 + @Schema(description = "任务分配规则的编号", required = true, example = "1024")
18 @NotNull(message = "任务分配规则的编号不能为空") 17 @NotNull(message = "任务分配规则的编号不能为空")
19 private Long id; 18 private Long id;
20 19
yudao-module-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(description = "请假的开始时间", 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(description = "请假的结束时间", 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(description = "请假类型-参见 bpm_oa_type 枚举", required = true, example = "1")
28 private Integer type; 27 private Integer type;
29 28
30 - @ApiModelProperty(value = "原因", required = true, example = "阅读芋道源码") 29 + @Schema(description = "原因", 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(description = "管理后台 - 请假申请创建 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(description = "管理后台 - 请假申请分页 Request VO")
12 @Data 11 @Data
13 @EqualsAndHashCode(callSuper = true) 12 @EqualsAndHashCode(callSuper = true)
14 @ToString(callSuper = true) 13 @ToString(callSuper = true)
15 public class BpmOALeavePageReqVO extends PageParam { 14 public class BpmOALeavePageReqVO extends PageParam {
16 15
17 - @ApiModelProperty(value = "状态", example = "1", notes = "参见 bpm_process_instance_result 枚举") 16 + @Schema(description = "状态-参见 bpm_process_instance_result 枚举", example = "1")
18 private Integer result; 17 private Integer result;
19 18
20 - @ApiModelProperty(value = "请假类型", example = "1", notes = "参见 bpm_oa_type") 19 + @Schema(description = "请假类型-参见 bpm_oa_type", example = "1")
21 private Integer type; 20 private Integer type;
22 21
23 - @ApiModelProperty(value = "原因", example = "阅读芋道源码", notes = "模糊匹配") 22 + @Schema(description = "原因-模糊匹配", example = "阅读芋道源码")
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(description = "申请时间")
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(description = "管理后台 - 请假申请 Response VO")
13 @Data 12 @Data
14 @EqualsAndHashCode(callSuper = true) 13 @EqualsAndHashCode(callSuper = true)
15 @ToString(callSuper = true) 14 @ToString(callSuper = true)
16 public class BpmOALeaveRespVO extends BpmOALeaveBaseVO { 15 public class BpmOALeaveRespVO extends BpmOALeaveBaseVO {
17 16
18 - @ApiModelProperty(value = "请假表单主键", required = true, example = "1024") 17 + @Schema(description = "请假表单主键", required = true, example = "1024")
19 private Long id; 18 private Long id;
20 19
21 - @ApiModelProperty(value = "状态", required = true, example = "1", notes = "参见 bpm_process_instance_result 枚举") 20 + @Schema(description = "状态-参见 bpm_process_instance_result 枚举", required = true, example = "1")
22 private Integer result; 21 private Integer result;
23 22
24 - @ApiModelProperty(value = "申请时间", required = true) 23 + @Schema(description = "申请时间", 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(description = "流程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(description = "管理后台 - 流程活动的 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(description = "流程活动的标识", required = true, example = "1024")
14 private String key; 13 private String key;
15 - @ApiModelProperty(value = "流程活动的类型", required = true, example = "StartEvent") 14 + @Schema(description = "流程活动的类型", required = true, example = "StartEvent")
16 private String type; 15 private String type;
17 16
18 - @ApiModelProperty(value = "流程活动的开始时间", required = true) 17 + @Schema(description = "流程活动的开始时间", required = true)
19 private LocalDateTime startTime; 18 private LocalDateTime startTime;
20 - @ApiModelProperty(value = "流程活动的结束时间", required = true) 19 + @Schema(description = "流程活动的结束时间", required = true)
21 private LocalDateTime endTime; 20 private LocalDateTime endTime;
22 21
23 - @ApiModelProperty(value = "关联的流程任务的编号", example = "2048", notes = "关联的流程任务,只有 UserTask 等类型才有") 22 + @Schema(description = "关联的流程任务的编号-关联的流程任务,只有 UserTask 等类型才有", example = "2048")
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(description = "管理后台 - 流程实例的取消 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(description = "流程实例的编号", 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(description = "取消原因", 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(description = "管理后台 - 流程实例的创建 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(description = "流程定义的编号", 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(description = "变量实例")
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(description = "管理后台 - 流程实例的分页 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(description = "流程名称", example = "芋道")
22 private String name; 21 private String name;
23 22
24 - @ApiModelProperty(value = "流程定义的编号", example = "2048") 23 + @Schema(description = "流程定义的编号", example = "2048")
25 private String processDefinitionId; 24 private String processDefinitionId;
26 25
27 - @ApiModelProperty(value = "流程实例的状态", notes = "参见 bpm_process_instance_status", example = "1") 26 + @Schema(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(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(description = "流程分类-参见 bpm_model_category 数据字典", example = "1")
34 private String category; 33 private String category;
35 34
36 - @ApiModelProperty(value = "创建时间") 35 + @Schema(description = "创建时间")
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(description = "管理后台 - 流程实例的分页 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(description = "流程实例的编号", required = true, example = "1024")
15 private String id; 14 private String id;
16 15
17 - @ApiModelProperty(value = "流程名称", required = true, example = "芋道") 16 + @Schema(description = "流程名称", required = true, example = "芋道")
18 private String name; 17 private String name;
19 18
20 - @ApiModelProperty(value = "流程定义的编号", required = true, example = "2048") 19 + @Schema(description = "流程定义的编号", 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(description = "流程分类-参见 bpm_model_category 数据字典", required = true, 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(description = "流程实例的状态-参见 bpm_process_instance_status", required = true, 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(description = "流程实例的结果-参见 bpm_process_instance_result", required = true, example = "2")
30 private Integer result; 29 private Integer result;
31 30
32 - @ApiModelProperty(value = "提交时间", required = true) 31 + @Schema(description = "提交时间", required = true)
33 private LocalDateTime createTime; 32 private LocalDateTime createTime;
34 33
35 - @ApiModelProperty(value = "结束时间", required = true) 34 + @Schema(description = "结束时间", 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(description = "流程任务")
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(description = "流程任务的编号", required = true, example = "1024")
48 private String id; 47 private String id;
49 48
50 - @ApiModelProperty(value = "任务名称", required = true, example = "芋道") 49 + @Schema(description = "任务名称", 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(description = "管理后台 - 流程实例的 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(description = "流程实例的编号", required = true, example = "1024")
16 private String id; 15 private String id;
17 16
18 - @ApiModelProperty(value = "流程名称", required = true, example = "芋道") 17 + @Schema(description = "流程名称", 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(description = "流程分类-参见 bpm_model_category 数据字典", required = true, 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(description = "流程实例的状态-参见 bpm_process_instance_status", required = true, 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(description = "流程实例的结果-参见 bpm_process_instance_result", required = true, example = "2")
28 private Integer result; 27 private Integer result;
29 28
30 - @ApiModelProperty(value = "提交时间", required = true) 29 + @Schema(description = "提交时间", required = true)
31 private LocalDateTime createTime; 30 private LocalDateTime createTime;
32 31
33 - @ApiModelProperty(value = "结束时间", required = true) 32 + @Schema(description = "结束时间", required = true)
34 private LocalDateTime endTime; 33 private LocalDateTime endTime;
35 34
36 - @ApiModelProperty(value = "提交的表单值", required = true) 35 + @Schema(description = "提交的表单值", required = true)
37 private Map<String, Object> formVariables; 36 private Map<String, Object> formVariables;
38 37
39 - @ApiModelProperty(value = "业务的唯一标识", example = "1", notes = "例如说,请假申请的编号") 38 + @Schema(description = "业务的唯一标识-例如说,请假申请的编号", example = "1")
40 private String businessKey; 39 private String businessKey;
41 40
42 /** 41 /**
@@ -49,47 +48,45 @@ public class BpmProcessInstanceRespVO { @@ -49,47 +48,45 @@ public class BpmProcessInstanceRespVO {
49 */ 48 */
50 private ProcessDefinition processDefinition; 49 private ProcessDefinition processDefinition;
51 50
52 - @ApiModel("用户信息") 51 + @Schema(description = "用户信息")
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(description = "用户编号", required = true, example = "1")
57 private Long id; 56 private Long id;
58 - @ApiModelProperty(value = "用户昵称", required = true, example = "芋艿") 57 + @Schema(description = "用户昵称", required = true, example = "芋艿")
59 private String nickname; 58 private String nickname;
60 59
61 - @ApiModelProperty(value = "部门编号", required = true, example = "1") 60 + @Schema(description = "部门编号", required = true, example = "1")
62 private Long deptId; 61 private Long deptId;
63 - @ApiModelProperty(value = "部门名称", required = true, example = "研发部") 62 + @Schema(description = "部门名称", required = true, example = "研发部")
64 private String deptName; 63 private String deptName;
65 64
66 } 65 }
67 66
68 - @ApiModel("流程定义信息") 67 + @Schema(description = "流程定义信息")
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(description = "编号", 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(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(description = "表单编号-在表单类型为 {@link BpmModelFormTypeEnum#CUSTOM} 时,必须非空", example = "1024")
78 private Long formId; 77 private Long formId;
79 - @ApiModelProperty(value = "表单的配置", required = true,  
80 - notes = "JSON 字符串。在表单类型为 {@link BpmModelFormTypeEnum#CUSTOM} 时,必须非空") 78 + @Schema(description = "表单的配置-JSON 字符串。在表单类型为 {@link BpmModelFormTypeEnum#CUSTOM} 时,必须非空", required = true)
81 private String formConf; 79 private String formConf;
82 - @ApiModelProperty(value = "表单项的数组", required = true,  
83 - notes = "JSON 字符串的数组。在表单类型为 {@link BpmModelFormTypeEnum#CUSTOM} 时,必须非空") 80 + @Schema(description = "表单项的数组-JSON 字符串的数组。在表单类型为 {@link BpmModelFormTypeEnum#CUSTOM} 时,必须非空", required = true)
84 private List<String> formFields; 81 private List<String> formFields;
85 - @ApiModelProperty(value = "自定义表单的提交路径,使用 Vue 的路由地址", example = "/bpm/oa/leave/create",  
86 - notes = "在表单类型为 {@link BpmModelFormTypeEnum#CUSTOM} 时,必须非空") 82 + @Schema(description = "自定义表单的提交路径,使用 Vue 的路由地址-在表单类型为 {@link BpmModelFormTypeEnum#CUSTOM} 时,必须非空",
  83 + example = "/bpm/oa/leave/create")
87 private String formCustomCreatePath; 84 private String formCustomCreatePath;
88 - @ApiModelProperty(value = "自定义表单的查看路径,使用 Vue 的路由地址", example = "/bpm/oa/leave/view",  
89 - notes = "在表单类型为 {@link BpmModelFormTypeEnum#CUSTOM} 时,必须非空") 85 + @Schema(description = "自定义表单的查看路径,使用 Vue 的路由地址-在表单类型为 {@link BpmModelFormTypeEnum#CUSTOM} 时,必须非空",
  86 + example = "/bpm/oa/leave/view")
90 private String formCustomViewPath; 87 private String formCustomViewPath;
91 88
92 - @ApiModelProperty(value = "BPMN XML", required = true) 89 + @Schema(description = "BPMN XML", required = true)
93 private String bpmnXml; 90 private String bpmnXml;
94 91
95 } 92 }
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(description = "管理后台 - 通过流程任务的 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(description = "任务编号", 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(description = "审批意见", 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(description = "管理后台 - 流程任务的 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(description = "结束时间", required = true)
18 private LocalDateTime endTime; 17 private LocalDateTime endTime;
19 - @ApiModelProperty(value = "持续时间", required = true, example = "1000") 18 + @Schema(description = "持续时间", 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(description = "任务结果-参见 bpm_process_instance_result", required = true, example = "2")
23 private Integer result; 22 private Integer result;
24 - @ApiModelProperty(value = "审批建议", required = true, example = "不请假了!") 23 + @Schema(description = "审批建议", 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(description = "管理后台 - 流程任务的 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(description = "流程任务名", example = "芋道")
22 private String name; 21 private String name;
23 22
24 - @ApiModelProperty(value = "开始的创建收间") 23 + @Schema(description = "开始的创建收间")
25 @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND) 24 @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
26 private LocalDateTime beginCreateTime; 25 private LocalDateTime beginCreateTime;
27 26
28 - @ApiModelProperty(value = "结束的创建时间") 27 + @Schema(description = "结束的创建时间")
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(description = "管理后台 - 不通过流程任务的 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(description = "任务编号", 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(description = "审批意见", 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(description = "管理后台 - 流程任务的 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(description = "任务定义的标识", 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(description = "用户信息")
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(description = "用户编号", required = true, example = "1")
28 private Long id; 27 private Long id;
29 - @ApiModelProperty(value = "用户昵称", required = true, example = "芋艿") 28 + @Schema(description = "用户昵称", required = true, example = "芋艿")
30 private String nickname; 29 private String nickname;
31 30
32 - @ApiModelProperty(value = "部门编号", required = true, example = "1") 31 + @Schema(description = "部门编号", required = true, example = "1")
33 private Long deptId; 32 private Long deptId;
34 - @ApiModelProperty(value = "部门名称", required = true, example = "研发部") 33 + @Schema(description = "部门名称", 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(description = "管理后台 - 流程任务的 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(description = "任务编号", required = true, example = "1024")
14 private String id; 13 private String id;
15 14
16 - @ApiModelProperty(value = "任务名字", required = true, example = "芋道") 15 + @Schema(description = "任务名字", required = true, example = "芋道")
17 private String name; 16 private String name;
18 17
19 - @ApiModelProperty(value = "接收时间", required = true) 18 + @Schema(description = "接收时间", required = true)
20 private LocalDateTime claimTime; 19 private LocalDateTime claimTime;
21 20
22 - @ApiModelProperty(value = "创建时间", required = true) 21 + @Schema(description = "创建时间", required = true)
23 private LocalDateTime createTime; 22 private LocalDateTime createTime;
24 23
25 - @ApiModelProperty(value = "激活状态", required = true, example = "1", notes = "参见 SuspensionState 枚举") 24 + @Schema(description = "激活状态-参见 SuspensionState 枚举", required = true, example = "1")
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(description = "流程实例")
35 public static class ProcessInstance { 34 public static class ProcessInstance {
36 35
37 - @ApiModelProperty(value = "流程实例编号", required = true, example = "1024") 36 + @Schema(description = "流程实例编号", required = true, example = "1024")
38 private String id; 37 private String id;
39 38
40 - @ApiModelProperty(value = "流程实例名称", required = true, example = "芋道") 39 + @Schema(description = "流程实例名称", required = true, example = "芋道")
41 private String name; 40 private String name;
42 41
43 - @ApiModelProperty(value = "发起人的用户编号", required = true, example = "1024") 42 + @Schema(description = "发起人的用户编号", required = true, example = "1024")
44 private Long startUserId; 43 private Long startUserId;
45 44
46 - @ApiModelProperty(value = "发起人的用户昵称", required = true, example = "芋艿") 45 + @Schema(description = "发起人的用户昵称", required = true, example = "芋艿")
47 private String startUserNickname; 46 private String startUserNickname;
48 47
49 - @ApiModelProperty(value = "流程定义的编号", required = true, example = "2048") 48 + @Schema(description = "流程定义的编号", 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(description = "管理后台 - 流程任务的 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(description = "流程任务名", example = "芋道")
22 private String name; 21 private String name;
23 22
24 - @ApiModelProperty(value = "开始的创建收间") 23 + @Schema(description = "开始的创建收间")
25 @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND) 24 @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
26 private LocalDateTime beginCreateTime; 25 private LocalDateTime beginCreateTime;
27 26
28 - @ApiModelProperty(value = "结束的创建时间") 27 + @Schema(description = "结束的创建时间")
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(description = "管理后台 - 流程任务的更新负责人的 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(description = "任务编号", 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(description = "新审批人的用户编号", required = true, example = "2048")
22 @NotNull(message = "新审批人的用户编号不能为空") 21 @NotNull(message = "新审批人的用户编号不能为空")
23 private Long assigneeUserId; 22 private Long assigneeUserId;
24 23
yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/framework/web/config/BpmWebConfiguration.java 0 → 100644
  1 +package cn.iocoder.yudao.module.bpm.framework.web.config;
  2 +
  3 +import cn.iocoder.yudao.framework.swagger.config.YudaoSwaggerAutoConfiguration;
  4 +import org.springdoc.core.GroupedOpenApi;
  5 +import org.springframework.context.annotation.Bean;
  6 +import org.springframework.context.annotation.Configuration;
  7 +
  8 +/**
  9 + * bpm 模块的 web 组件的 Configuration
  10 + *
  11 + * @author 芋道源码
  12 + */
  13 +@Configuration(proxyBeanMethods = false)
  14 +public class BpmWebConfiguration {
  15 +
  16 + /**
  17 + * bpm 模块的 API 分组
  18 + */
  19 + @Bean
  20 + public GroupedOpenApi bpmGroupedOpenApi() {
  21 + return YudaoSwaggerAutoConfiguration.buildGroupedOpenApi("bpm");
  22 + }
  23 +
  24 +}
yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/framework/web/package-info.java 0 → 100644
  1 +/**
  2 + * bpm 模块的 web 配置
  3 + */
  4 +package cn.iocoder.yudao.module.bpm.framework.web;
yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/service/definition/BpmTaskAssignRuleServiceImpl.java
@@ -213,18 +213,18 @@ public class BpmTaskAssignRuleServiceImpl implements BpmTaskAssignRuleService { @@ -213,18 +213,18 @@ public class BpmTaskAssignRuleServiceImpl implements BpmTaskAssignRuleService {
213 213
214 private void validTaskAssignRuleOptions(Integer type, Set<Long> options) { 214 private void validTaskAssignRuleOptions(Integer type, Set<Long> options) {
215 if (Objects.equals(type, BpmTaskAssignRuleTypeEnum.ROLE.getType())) { 215 if (Objects.equals(type, BpmTaskAssignRuleTypeEnum.ROLE.getType())) {
216 - roleApi.validRoles(options); 216 + roleApi.validRoleList(options);
217 } else if (ObjectUtils.equalsAny(type, BpmTaskAssignRuleTypeEnum.DEPT_MEMBER.getType(), 217 } else if (ObjectUtils.equalsAny(type, BpmTaskAssignRuleTypeEnum.DEPT_MEMBER.getType(),
218 BpmTaskAssignRuleTypeEnum.DEPT_LEADER.getType())) { 218 BpmTaskAssignRuleTypeEnum.DEPT_LEADER.getType())) {
219 - deptApi.validDepts(options); 219 + deptApi.validateDeptList(options);
220 } else if (Objects.equals(type, BpmTaskAssignRuleTypeEnum.POST.getType())) { 220 } else if (Objects.equals(type, BpmTaskAssignRuleTypeEnum.POST.getType())) {
221 - postApi.validPosts(options); 221 + postApi.validPostList(options);
222 } else if (Objects.equals(type, BpmTaskAssignRuleTypeEnum.USER.getType())) { 222 } else if (Objects.equals(type, BpmTaskAssignRuleTypeEnum.USER.getType())) {
223 - adminUserApi.validUsers(options); 223 + adminUserApi.validateUserList(options);
224 } else if (Objects.equals(type, BpmTaskAssignRuleTypeEnum.USER_GROUP.getType())) { 224 } else if (Objects.equals(type, BpmTaskAssignRuleTypeEnum.USER_GROUP.getType())) {
225 userGroupService.validUserGroups(options); 225 userGroupService.validUserGroups(options);
226 } else if (Objects.equals(type, BpmTaskAssignRuleTypeEnum.SCRIPT.getType())) { 226 } else if (Objects.equals(type, BpmTaskAssignRuleTypeEnum.SCRIPT.getType())) {
227 - dictDataApi.validDictDatas(DictTypeConstants.TASK_ASSIGN_SCRIPT, 227 + dictDataApi.validateDictDataList(DictTypeConstants.TASK_ASSIGN_SCRIPT,
228 CollectionUtils.convertSet(options, String::valueOf)); 228 CollectionUtils.convertSet(options, String::valueOf));
229 } else { 229 } else {
230 throw new IllegalArgumentException(format("未知的规则类型({})", type)); 230 throw new IllegalArgumentException(format("未知的规则类型({})", type));
@@ -288,12 +288,12 @@ public class BpmTaskAssignRuleServiceImpl implements BpmTaskAssignRuleService { @@ -288,12 +288,12 @@ public class BpmTaskAssignRuleServiceImpl implements BpmTaskAssignRuleService {
288 } 288 }
289 289
290 private Set<Long> calculateTaskCandidateUsersByDeptMember(BpmTaskAssignRuleDO rule) { 290 private Set<Long> calculateTaskCandidateUsersByDeptMember(BpmTaskAssignRuleDO rule) {
291 - List<AdminUserRespDTO> users = adminUserApi.getUsersByDeptIds(rule.getOptions()); 291 + List<AdminUserRespDTO> users = adminUserApi.getUserListByDeptIds(rule.getOptions());
292 return convertSet(users, AdminUserRespDTO::getId); 292 return convertSet(users, AdminUserRespDTO::getId);
293 } 293 }
294 294
295 private Set<Long> calculateTaskCandidateUsersByDeptLeader(BpmTaskAssignRuleDO rule) { 295 private Set<Long> calculateTaskCandidateUsersByDeptLeader(BpmTaskAssignRuleDO rule) {
296 - List<DeptRespDTO> depts = deptApi.getDepts(rule.getOptions()); 296 + List<DeptRespDTO> depts = deptApi.getDeptList(rule.getOptions());
297 return convertSet(depts, DeptRespDTO::getLeaderUserId); 297 return convertSet(depts, DeptRespDTO::getLeaderUserId);
298 } 298 }
299 299
yudao-module-bpm/yudao-module-bpm-biz/src/test/java/cn/iocoder/yudao/module/bpm/service/definition/BpmTaskAssignRuleServiceImplTest.java
@@ -86,7 +86,7 @@ public class BpmTaskAssignRuleServiceImplTest extends BaseDbUnitTest { @@ -86,7 +86,7 @@ public class BpmTaskAssignRuleServiceImplTest extends BaseDbUnitTest {
86 // mock 方法 86 // mock 方法
87 List<AdminUserRespDTO> users = CollectionUtils.convertList(asSet(11L, 22L), 87 List<AdminUserRespDTO> users = CollectionUtils.convertList(asSet(11L, 22L),
88 id -> new AdminUserRespDTO().setId(id)); 88 id -> new AdminUserRespDTO().setId(id));
89 - when(adminUserApi.getUsersByDeptIds(eq(rule.getOptions()))).thenReturn(users); 89 + when(adminUserApi.getUserListByDeptIds(eq(rule.getOptions()))).thenReturn(users);
90 mockGetUserMap(asSet(11L, 22L)); 90 mockGetUserMap(asSet(11L, 22L));
91 91
92 // 调用 92 // 调用
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(description = "管理后台 - 基于数据库的表结构,创建代码生成器的表和字段定义 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(description = "数据源配置的编号", 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(description = "表名数组", 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(description = "管理后台 - 代码生成表和字段的明细 Response VO")
12 @Data 11 @Data
13 public class CodegenDetailRespVO { 12 public class CodegenDetailRespVO {
14 13
15 - @ApiModelProperty("表定义") 14 + @Schema(description = "表定义")
16 private CodegenTableRespVO table; 15 private CodegenTableRespVO table;
17 16
18 - @ApiModelProperty("字段定义") 17 + @Schema(description = "字段定义")
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(description = "管理后台 - 代码生成预览 Response VO,注意,每个文件都是一个该对象")
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(description = "文件路径", 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(description = "代码", 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(description = "管理后台 - 代码生成表和字段的修改 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(description = "更新表定义")
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(description = "编号", 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(description = "更新表定义")
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(description = "编号", 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(description = "表编号", 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(description = "字段名", 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(description = "字段类型", 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(description = "字段描述", 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(description = "是否允许为空", 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(description = "是否主键", 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(description = "是否自增", 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(description = "排序", 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(description = "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(description = "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(description = "字典类型", example = "sys_gender")
56 private String dictType; 55 private String dictType;
57 56
58 - @ApiModelProperty(value = "数据示例", example = "1024") 57 + @Schema(description = "数据示例", example = "1024")
59 private String example; 58 private String example;
60 59
61 - @ApiModelProperty(value = "是否为 Create 创建操作的字段", required = true, example = "true") 60 + @Schema(description = "是否为 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(description = "是否为 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(description = "是否为 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(description = "List 查询操作的条件类型,参见 CodegenColumnListConditionEnum 枚举", required = true, example = "LIKE")
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(description = "是否为 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(description = "显示类型", 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(description = "管理后台 - 代码生成字段定义 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(description = "编号", required = true, example = "1")
18 private Long id; 17 private Long id;
19 18
20 - @ApiModelProperty(value = "创建时间", required = true) 19 + @Schema(description = "创建时间", 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;
7 6
8 /** 7 /**
9 -* 代码生成 Base VO,提供给添加、修改、详细的子 VO 使用  
10 -* 如果子 VO 存在差异的字段,请不要添加到这里,影响 Swagger 文档生成  
11 -*/ 8 + * 代码生成 Base VO,提供给添加、修改、详细的子 VO 使用
  9 + * 如果子 VO 存在差异的字段,请不要添加到这里,影响 Swagger 文档生成
  10 + */
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(description = "生成场景,参见 CodegenSceneEnum 枚举", required = true, example = "1")
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(description = "表名称", 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(description = "表描述", 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(description = "备注", example = "我是备注")
28 private String remark; 27 private String remark;
29 28
30 - @ApiModelProperty(value = "模块名", required = true, example = "system") 29 + @Schema(description = "模块名", 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(description = "业务名", 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(description = "类名称", 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(description = "类描述", 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(description = "作者", 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(description = "模板类型,参见 CodegenTemplateTypeEnum 枚举", required = true, example = "1")
51 @NotNull(message = "模板类型不能为空") 50 @NotNull(message = "模板类型不能为空")
52 private Integer templateType; 51 private Integer templateType;
53 52
54 - @ApiModelProperty(value = "父菜单编号", example = "1024") 53 + @Schema(description = "父菜单编号", 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(description = "管理后台 - 表定义分页 Request VO")
16 @Data 15 @Data
17 @EqualsAndHashCode(callSuper = true) 16 @EqualsAndHashCode(callSuper = true)
18 @ToString(callSuper = true) 17 @ToString(callSuper = true)
19 public class CodegenTablePageReqVO extends PageParam { 18 public class CodegenTablePageReqVO extends PageParam {
20 19
21 - @ApiModelProperty(value = "表名称", example = "yudao", notes = "模糊匹配") 20 + @Schema(description = "表名称,模糊匹配", example = "yudao")
22 private String tableName; 21 private String tableName;
23 22
24 - @ApiModelProperty(value = "表描述", example = "芋道", notes = "模糊匹配") 23 + @Schema(description = "表描述,模糊匹配", example = "芋道")
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(description = "创建时间", 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(description = "管理后台 - 代码生成表定义 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(description = "编号", required = true, example = "1")
18 private Long id; 17 private Long id;
19 18
20 - @ApiModelProperty(value = "主键编号", required = true, example = "1024") 19 + @Schema(description = "主键编号", required = true, example = "1024")
21 private Integer dataSourceConfigId; 20 private Integer dataSourceConfigId;
22 21
23 - @ApiModelProperty(value = "创建时间", required = true) 22 + @Schema(description = "创建时间", required = true)
24 private LocalDateTime createTime; 23 private LocalDateTime createTime;
25 24
26 - @ApiModelProperty(value = "更新时间", required = true) 25 + @Schema(description = "更新时间", 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(description = "管理后台 - 数据库的表定义 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(description = "表名称", required = true, example = "yuanma")
12 private String name; 11 private String name;
13 12
14 - @ApiModelProperty(value = "表描述", required = true, example = "芋道源码") 13 + @Schema(description = "表描述", 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
1 package cn.iocoder.yudao.module.infra.controller.admin.config; 1 package cn.iocoder.yudao.module.infra.controller.admin.config;
2 2
3 -import cn.iocoder.yudao.framework.common.exception.util.ServiceExceptionUtil;  
4 import cn.iocoder.yudao.framework.common.pojo.CommonResult; 3 import cn.iocoder.yudao.framework.common.pojo.CommonResult;
5 import cn.iocoder.yudao.framework.common.pojo.PageResult; 4 import cn.iocoder.yudao.framework.common.pojo.PageResult;
6 import cn.iocoder.yudao.framework.excel.core.util.ExcelUtils; 5 import cn.iocoder.yudao.framework.excel.core.util.ExcelUtils;
@@ -8,11 +7,11 @@ import cn.iocoder.yudao.framework.operatelog.core.annotations.OperateLog; @@ -8,11 +7,11 @@ import cn.iocoder.yudao.framework.operatelog.core.annotations.OperateLog;
8 import cn.iocoder.yudao.module.infra.controller.admin.config.vo.*; 7 import cn.iocoder.yudao.module.infra.controller.admin.config.vo.*;
9 import cn.iocoder.yudao.module.infra.convert.config.ConfigConvert; 8 import cn.iocoder.yudao.module.infra.convert.config.ConfigConvert;
10 import cn.iocoder.yudao.module.infra.dal.dataobject.config.ConfigDO; 9 import cn.iocoder.yudao.module.infra.dal.dataobject.config.ConfigDO;
11 -import cn.iocoder.yudao.module.infra.service.config.ConfigService;  
12 import cn.iocoder.yudao.module.infra.enums.ErrorCodeConstants; 10 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; 11 +import cn.iocoder.yudao.module.infra.service.config.ConfigService;
  12 +import io.swagger.v3.oas.annotations.Operation;
  13 +import io.swagger.v3.oas.annotations.Parameter;
  14 +import io.swagger.v3.oas.annotations.tags.Tag;
16 import org.springframework.security.access.prepost.PreAuthorize; 15 import org.springframework.security.access.prepost.PreAuthorize;
17 import org.springframework.validation.annotation.Validated; 16 import org.springframework.validation.annotation.Validated;
18 import org.springframework.web.bind.annotation.*; 17 import org.springframework.web.bind.annotation.*;
@@ -23,10 +22,11 @@ import javax.validation.Valid; @@ -23,10 +22,11 @@ import javax.validation.Valid;
23 import java.io.IOException; 22 import java.io.IOException;
24 import java.util.List; 23 import java.util.List;
25 24
  25 +import static cn.iocoder.yudao.framework.common.exception.util.ServiceExceptionUtil.exception;
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,29 +60,29 @@ public class ConfigController { @@ -60,29 +60,29 @@ 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) {
76 return null; 76 return null;
77 } 77 }
78 if (!config.getVisible()) { 78 if (!config.getVisible()) {
79 - throw ServiceExceptionUtil.exception(ErrorCodeConstants.CONFIG_GET_VALUE_ERROR_IF_VISIBLE); 79 + throw exception(ErrorCodeConstants.CONFIG_GET_VALUE_ERROR_IF_VISIBLE);
80 } 80 }
81 return success(config.getValue()); 81 return success(config.getValue());
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,11 +90,11 @@ public class ConfigController { @@ -90,11 +90,11 @@ 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,  
97 - HttpServletResponse response) throws IOException { 96 + public void exportConfig(@Valid ConfigExportReqVO reqVO,
  97 + HttpServletResponse response) throws IOException {
98 List<ConfigDO> list = configService.getConfigList(reqVO); 98 List<ConfigDO> list = configService.getConfigList(reqVO);
99 // 拼接数据 99 // 拼接数据
100 List<ConfigExcelVO> datas = ConfigConvert.INSTANCE.convertList(list); 100 List<ConfigExcelVO> datas = ConfigConvert.INSTANCE.convertList(list);
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(description = "参数分组", 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(description = "参数名称", 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(description = "参数键值", 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(description = "是否敏感", 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(description = "备注", 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(description = "管理后台 - 参数配置创建 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(description = "参数键名", 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(description = "管理后台 - 参数配置导出 Request VO")
13 @Data 12 @Data
14 public class ConfigExportReqVO { 13 public class ConfigExportReqVO {
15 14
16 - @ApiModelProperty(value = "参数名称", example = "模糊匹配") 15 + @Schema(description = "参数名称", example = "模糊匹配")
17 private String name; 16 private String name;
18 17
19 - @ApiModelProperty(value = "参数键名", example = "yunai.db.username", notes = "模糊匹配") 18 + @Schema(description = "参数键名,模糊匹配", example = "yunai.db.username")
20 private String key; 19 private String key;
21 20
22 - @ApiModelProperty(value = "参数类型", example = "1", notes = "参见 SysConfigTypeEnum 枚举") 21 + @Schema(description = "参数类型,参见 SysConfigTypeEnum 枚举", example = "1")
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(description = "创建时间", 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(description = "管理后台 - 参数配置分页 Request VO")
16 @Data 15 @Data
17 @EqualsAndHashCode(callSuper = true) 16 @EqualsAndHashCode(callSuper = true)
18 @ToString(callSuper = true) 17 @ToString(callSuper = true)
19 public class ConfigPageReqVO extends PageParam { 18 public class ConfigPageReqVO extends PageParam {
20 19
21 - @ApiModelProperty(value = "数据源名称", example = "模糊匹配") 20 + @Schema(description = "数据源名称,模糊匹配", example = "名称")
22 private String name; 21 private String name;
23 22
24 - @ApiModelProperty(value = "参数键名", example = "yunai.db.username", notes = "模糊匹配") 23 + @Schema(description = "参数键名,模糊匹配", example = "yunai.db.username")
25 private String key; 24 private String key;
26 25
27 - @ApiModelProperty(value = "参数类型", example = "1", notes = "参见 SysConfigTypeEnum 枚举") 26 + @Schema(description = "参数类型,参见 SysConfigTypeEnum 枚举", example = "1")
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(description = "创建时间", 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(description = "管理后台 - 参数配置信息 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(description = "参数配置序号", 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(description = "参数键名", 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(description = "参数类型,参见 SysConfigTypeEnum 枚举", required = true, example = "1")
26 private Integer type; 25 private Integer type;
27 26
28 - @ApiModelProperty(value = "创建时间", required = true, example = "时间戳格式") 27 + @Schema(description = "创建时间", 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(description = "管理后台 - 参数配置创建 Request VO")
12 @Data 11 @Data
13 @EqualsAndHashCode(callSuper = true) 12 @EqualsAndHashCode(callSuper = true)
14 @ToString(callSuper = true) 13 @ToString(callSuper = true)
15 public class ConfigUpdateReqVO extends ConfigBaseVO { 14 public class ConfigUpdateReqVO extends ConfigBaseVO {
16 15
17 - @ApiModelProperty(value = "参数配置序号", required = true, example = "1024") 16 + @Schema(description = "参数配置序号", required = true, example = "1024")
18 @NotNull(message = "参数配置编号不能为空") 17 @NotNull(message = "参数配置编号不能为空")
19 private Long id; 18 private Long id;
20 19
yudao-module-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);