createApiErrorLog(@Valid @RequestBody ApiErrorLogCreateReqDTO createDTO);
-}
+}
\ No newline at end of file
diff --git a/yudao-module-infra/yudao-module-infra-api/src/main/java/cn/iocoder/yudao/module/infra/api/logger/dto/ApiAccessLogCreateReqDTO.java b/yudao-module-infra/yudao-module-infra-api/src/main/java/cn/iocoder/yudao/module/infra/api/logger/dto/ApiAccessLogCreateReqDTO.java
index f4e8e6495..e29e7b787 100644
--- a/yudao-module-infra/yudao-module-infra-api/src/main/java/cn/iocoder/yudao/module/infra/api/logger/dto/ApiAccessLogCreateReqDTO.java
+++ b/yudao-module-infra/yudao-module-infra-api/src/main/java/cn/iocoder/yudao/module/infra/api/logger/dto/ApiAccessLogCreateReqDTO.java
@@ -1,56 +1,56 @@
package cn.iocoder.yudao.module.infra.api.logger.dto;
-import io.swagger.annotations.ApiModel;
-import io.swagger.annotations.ApiModelProperty;
+import io.swagger.v3.oas.annotations.media.Schema;
+import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import javax.validation.constraints.NotNull;
import java.time.LocalDateTime;
-@ApiModel("RPC 服务 - API 访问日志创建 Request DTO")
+@Schema(description = "RPC 服务 - API 访问日志创建 Request DTO")
@Data
public class ApiAccessLogCreateReqDTO {
- @ApiModelProperty(value = "链路追踪编号", example = "89aca178-a370-411c-ae02-3f0d672be4ab")
+ @Schema(description = "链路追踪编号", example = "89aca178-a370-411c-ae02-3f0d672be4ab")
private String traceId;
- @ApiModelProperty(value = "用户编号", required = true, example = "1024")
+ @Schema(description = "用户编号", required = true, example = "1024")
private Long userId;
- @ApiModelProperty(value = "用户类型", required = true, example = "1")
+ @Schema(description = "用户类型", required = true, example = "1")
private Integer userType;
- @ApiModelProperty(value = "应用名", required = true, example = "system-server")
+ @Schema(description = "应用名", required = true, example = "system-server")
@NotNull(message = "应用名不能为空")
private String applicationName;
- @ApiModelProperty(value = "请求方法名", required = true, example = "GET")
+ @Schema(description = "请求方法名", required = true, example = "GET")
@NotNull(message = "http 请求方法不能为空")
private String requestMethod;
- @ApiModelProperty(value = "请求地址", required = true, example = "/xxx/yyy")
+ @Schema(description = "请求地址", required = true, example = "/xxx/yyy")
@NotNull(message = "访问地址不能为空")
private String requestUrl;
- @ApiModelProperty(value = "请求参数", required = true)
+ @Schema(description = "请求参数", required = true)
@NotNull(message = "请求参数不能为空")
private String requestParams;
- @ApiModelProperty(value = "用户 IP", required = true, example = "127.0.0.1")
+ @Schema(description = "用户 IP", required = true, example = "127.0.0.1")
@NotNull(message = "ip 不能为空")
private String userIp;
- @ApiModelProperty(value = "浏览器 UserAgent", required = true, example = "Mozilla/5.0")
+ @Schema(description = "浏览器 UserAgent", required = true, example = "Mozilla/5.0")
@NotNull(message = "User-Agent 不能为空")
private String userAgent;
- @ApiModelProperty(value = "开始时间", required = true)
+ @Schema(description = "开始时间", required = true)
@NotNull(message = "开始请求时间不能为空")
private LocalDateTime beginTime;
- @ApiModelProperty(value = "结束时间", required = true)
+ @Schema(description = "结束时间", required = true)
@NotNull(message = "结束请求时间不能为空")
private LocalDateTime endTime;
- @ApiModelProperty(value = "执行时长,单位:毫秒", required = true)
+ @Schema(description = "执行时长,单位:毫秒", required = true)
@NotNull(message = "执行时长不能为空")
private Integer duration;
- @ApiModelProperty(value = "结果码", required = true)
+ @Schema(description = "结果码", required = true)
@NotNull(message = "错误码不能为空")
private Integer resultCode;
- @ApiModelProperty(value = "结果提示")
+ @Schema(description = "结果提示")
private String resultMsg;
-}
+}
\ No newline at end of file
diff --git a/yudao-module-infra/yudao-module-infra-api/src/main/java/cn/iocoder/yudao/module/infra/api/logger/dto/ApiErrorLogCreateReqDTO.java b/yudao-module-infra/yudao-module-infra-api/src/main/java/cn/iocoder/yudao/module/infra/api/logger/dto/ApiErrorLogCreateReqDTO.java
index 06aab01b5..6973b8dd4 100644
--- a/yudao-module-infra/yudao-module-infra-api/src/main/java/cn/iocoder/yudao/module/infra/api/logger/dto/ApiErrorLogCreateReqDTO.java
+++ b/yudao-module-infra/yudao-module-infra-api/src/main/java/cn/iocoder/yudao/module/infra/api/logger/dto/ApiErrorLogCreateReqDTO.java
@@ -1,69 +1,69 @@
package cn.iocoder.yudao.module.infra.api.logger.dto;
-import io.swagger.annotations.ApiModel;
-import io.swagger.annotations.ApiModelProperty;
+import io.swagger.v3.oas.annotations.media.Schema;
+import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import javax.validation.constraints.NotNull;
import java.time.LocalDateTime;
-@ApiModel("RPC 服务 - API 错误日志创建 Request DTO")
+@Schema(description = "RPC 服务 - API 错误日志创建 Request DTO")
@Data
public class ApiErrorLogCreateReqDTO {
- @ApiModelProperty(value = "链路追踪编号", example = "89aca178-a370-411c-ae02-3f0d672be4ab")
+ @Schema(description = "链路追踪编号", example = "89aca178-a370-411c-ae02-3f0d672be4ab")
private String traceId;
- @ApiModelProperty(value = "用户编号", required = true, example = "1024")
+ @Schema(description = "用户编号", required = true, example = "1024")
private Long userId;
- @ApiModelProperty(value = "用户类型", required = true, example = "1")
+ @Schema(description = "用户类型", required = true, example = "1")
private Integer userType;
- @ApiModelProperty(value = "应用名", required = true, example = "system-server")
+ @Schema(description = "应用名", required = true, example = "system-server")
@NotNull(message = "应用名不能为空")
private String applicationName;
- @ApiModelProperty(value = "请求方法名", required = true, example = "GET")
+ @Schema(description = "请求方法名", required = true, example = "GET")
@NotNull(message = "http 请求方法不能为空")
private String requestMethod;
- @ApiModelProperty(value = "请求地址", required = true, example = "/xxx/yyy")
+ @Schema(description = "请求地址", required = true, example = "/xxx/yyy")
@NotNull(message = "访问地址不能为空")
private String requestUrl;
- @ApiModelProperty(value = "请求参数", required = true)
+ @Schema(description = "请求参数", required = true)
@NotNull(message = "请求参数不能为空")
private String requestParams;
- @ApiModelProperty(value = "用户 IP", required = true, example = "127.0.0.1")
+ @Schema(description = "用户 IP", required = true, example = "127.0.0.1")
@NotNull(message = "ip 不能为空")
private String userIp;
- @ApiModelProperty(value = "浏览器 UserAgent", required = true, example = "Mozilla/5.0")
+ @Schema(description = "浏览器 UserAgent", required = true, example = "Mozilla/5.0")
@NotNull(message = "User-Agent 不能为空")
private String userAgent;
- @ApiModelProperty(value = "异常时间", required = true)
+ @Schema(description = "异常时间", required = true)
@NotNull(message = "异常时间不能为空")
private LocalDateTime exceptionTime;
- @ApiModelProperty(value = "异常名", required = true)
+ @Schema(description = "异常名", required = true)
@NotNull(message = "异常名不能为空")
private String exceptionName;
- @ApiModelProperty(value = "异常发生的类全名", required = true)
+ @Schema(description = "异常发生的类全名", required = true)
@NotNull(message = "异常发生的类全名不能为空")
private String exceptionClassName;
- @ApiModelProperty(value = "异常发生的类文件", required = true)
+ @Schema(description = "异常发生的类文件", required = true)
@NotNull(message = "异常发生的类文件不能为空")
private String exceptionFileName;
- @ApiModelProperty(value = "异常发生的方法名", required = true)
+ @Schema(description = "异常发生的方法名", required = true)
@NotNull(message = "异常发生的方法名不能为空")
private String exceptionMethodName;
- @ApiModelProperty(value = "异常发生的方法所在行", required = true)
+ @Schema(description = "异常发生的方法所在行", required = true)
@NotNull(message = "异常发生的方法所在行不能为空")
private Integer exceptionLineNumber;
- @ApiModelProperty(value = "异常的栈轨迹异常的栈轨迹", required = true)
+ @Schema(description = "异常的栈轨迹异常的栈轨迹", required = true)
@NotNull(message = "异常的栈轨迹不能为空")
private String exceptionStackTrace;
- @ApiModelProperty(value = "异常导致的根消息", required = true)
+ @Schema(description = "异常导致的根消息", required = true)
@NotNull(message = "异常导致的根消息不能为空")
private String exceptionRootCauseMessage;
- @ApiModelProperty(value = "异常导致的消息", required = true)
+ @Schema(description = "异常导致的消息", required = true)
@NotNull(message = "异常导致的消息不能为空")
private String exceptionMessage;
-}
+}
\ No newline at end of file
diff --git a/yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/InfraServerApplication.java b/yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/InfraServerApplication.java
index 6e4f4d0bc..fe3eee495 100644
--- a/yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/InfraServerApplication.java
+++ b/yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/InfraServerApplication.java
@@ -5,7 +5,7 @@ import org.springframework.boot.autoconfigure.SpringBootApplication;
/**
* 项目的启动类
- *
+ *
* 如果你碰到启动的问题,请认真阅读 https://cloud.iocoder.cn/quick-start/ 文章
* 如果你碰到启动的问题,请认真阅读 https://cloud.iocoder.cn/quick-start/ 文章
* 如果你碰到启动的问题,请认真阅读 https://cloud.iocoder.cn/quick-start/ 文章
diff --git a/yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/controller/admin/codegen/CodegenController.java b/yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/controller/admin/codegen/CodegenController.java
index 9a0013b93..e7367fdad 100644
--- a/yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/controller/admin/codegen/CodegenController.java
+++ b/yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/controller/admin/codegen/CodegenController.java
@@ -16,10 +16,10 @@ import cn.iocoder.yudao.module.infra.convert.codegen.CodegenConvert;
import cn.iocoder.yudao.module.infra.dal.dataobject.codegen.CodegenColumnDO;
import cn.iocoder.yudao.module.infra.dal.dataobject.codegen.CodegenTableDO;
import cn.iocoder.yudao.module.infra.service.codegen.CodegenService;
-import io.swagger.annotations.Api;
-import io.swagger.annotations.ApiImplicitParam;
-import io.swagger.annotations.ApiImplicitParams;
-import io.swagger.annotations.ApiOperation;
+import io.swagger.v3.oas.annotations.tags.Tag;
+import io.swagger.v3.oas.annotations.Parameter;
+import io.swagger.v3.oas.annotations.Parameters;
+import io.swagger.v3.oas.annotations.Operation;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.*;
@@ -36,7 +36,7 @@ import java.util.Map;
import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success;
import static cn.iocoder.yudao.framework.security.core.util.SecurityFrameworkUtils.getLoginUserId;
-@Api(tags = "管理后台 - 代码生成器")
+@Tag(name = "管理后台 - 代码生成器")
@RestController
@RequestMapping("/infra/codegen")
@Validated
@@ -46,11 +46,11 @@ public class CodegenController {
private CodegenService codegenService;
@GetMapping("/db/table/list")
- @ApiOperation(value = "获得数据库自带的表定义列表", notes = "会过滤掉已经导入 Codegen 的表")
- @ApiImplicitParams({
- @ApiImplicitParam(name = "dataSourceConfigId", value = "数据源配置的编号", required = true, example = "1", dataTypeClass = Long.class),
- @ApiImplicitParam(name = "name", value = "表名,模糊匹配", example = "yudao", dataTypeClass = String.class),
- @ApiImplicitParam(name = "comment", value = "描述,模糊匹配", example = "芋道", dataTypeClass = String.class)
+ @Operation(summary = "获得数据库自带的表定义列表", description = "会过滤掉已经导入 Codegen 的表")
+ @Parameters({
+ @Parameter(name = "dataSourceConfigId", description = "数据源配置的编号", required = true, example = "1"),
+ @Parameter(name = "name", description = "表名,模糊匹配", example = "yudao"),
+ @Parameter(name = "comment", description = "描述,模糊匹配", example = "芋道")
})
@PreAuthorize("@ss.hasPermission('infra:codegen:query')")
public CommonResult> getDatabaseTableList(
@@ -61,7 +61,7 @@ public class CodegenController {
}
@GetMapping("/table/page")
- @ApiOperation("获得表定义分页")
+ @Operation(summary = "获得表定义分页")
@PreAuthorize("@ss.hasPermission('infra:codegen:query')")
public CommonResult> getCodeGenTablePage(@Valid CodegenTablePageReqVO pageReqVO) {
PageResult pageResult = codegenService.getCodegenTablePage(pageReqVO);
@@ -69,8 +69,8 @@ public class CodegenController {
}
@GetMapping("/detail")
- @ApiOperation("获得表和字段的明细")
- @ApiImplicitParam(name = "tableId", value = "表编号", required = true, example = "1024", dataTypeClass = Long.class)
+ @Operation(summary = "获得表和字段的明细")
+ @Parameter(name = "tableId", description = "表编号", required = true, example = "1024")
@PreAuthorize("@ss.hasPermission('infra:codegen:query')")
public CommonResult getCodegenDetail(@RequestParam("tableId") Long tableId) {
CodegenTableDO table = codegenService.getCodegenTablePage(tableId);
@@ -79,14 +79,14 @@ public class CodegenController {
return success(CodegenConvert.INSTANCE.convert(table, columns));
}
- @ApiOperation("基于数据库的表结构,创建代码生成器的表和字段定义")
+ @Operation(summary = "基于数据库的表结构,创建代码生成器的表和字段定义")
@PostMapping("/create-list")
@PreAuthorize("@ss.hasPermission('infra:codegen:create')")
public CommonResult> createCodegenList(@Valid @RequestBody CodegenCreateListReqVO reqVO) {
return success(codegenService.createCodegenList(getLoginUserId(), reqVO));
}
- @ApiOperation("更新数据库的表和字段定义")
+ @Operation(summary = "更新数据库的表和字段定义")
@PutMapping("/update")
@PreAuthorize("@ss.hasPermission('infra:codegen:update')")
public CommonResult updateCodegen(@Valid @RequestBody CodegenUpdateReqVO updateReqVO) {
@@ -94,36 +94,36 @@ public class CodegenController {
return success(true);
}
- @ApiOperation("基于数据库的表结构,同步数据库的表和字段定义")
+ @Operation(summary = "基于数据库的表结构,同步数据库的表和字段定义")
@PutMapping("/sync-from-db")
- @ApiImplicitParam(name = "tableId", value = "表编号", required = true, example = "1024", dataTypeClass = Long.class)
+ @Parameter(name = "tableId", description = "表编号", required = true, example = "1024")
@PreAuthorize("@ss.hasPermission('infra:codegen:update')")
public CommonResult syncCodegenFromDB(@RequestParam("tableId") Long tableId) {
codegenService.syncCodegenFromDB(tableId);
return success(true);
}
- @ApiOperation("删除数据库的表和字段定义")
+ @Operation(summary = "删除数据库的表和字段定义")
@DeleteMapping("/delete")
- @ApiImplicitParam(name = "tableId", value = "表编号", required = true, example = "1024", dataTypeClass = Long.class)
+ @Parameter(name = "tableId", description = "表编号", required = true, example = "1024")
@PreAuthorize("@ss.hasPermission('infra:codegen:delete')")
public CommonResult deleteCodegen(@RequestParam("tableId") Long tableId) {
codegenService.deleteCodegen(tableId);
return success(true);
}
- @ApiOperation("预览生成代码")
+ @Operation(summary = "预览生成代码")
@GetMapping("/preview")
- @ApiImplicitParam(name = "tableId", value = "表编号", required = true, example = "1024", dataTypeClass = Long.class)
+ @Parameter(name = "tableId", description = "表编号", required = true, example = "1024")
@PreAuthorize("@ss.hasPermission('infra:codegen:preview')")
public CommonResult> previewCodegen(@RequestParam("tableId") Long tableId) {
Map codes = codegenService.generationCodes(tableId);
return success(CodegenConvert.INSTANCE.convert(codes));
}
- @ApiOperation("下载生成代码")
+ @Operation(summary = "下载生成代码")
@GetMapping("/download")
- @ApiImplicitParam(name = "tableId", value = "表编号", required = true, example = "1024", dataTypeClass = Long.class)
+ @Parameter(name = "tableId", description = "表编号", required = true, example = "1024")
@PreAuthorize("@ss.hasPermission('infra:codegen:download')")
public void downloadCodegen(@RequestParam("tableId") Long tableId,
HttpServletResponse response) throws IOException {
@@ -138,4 +138,4 @@ public class CodegenController {
ServletUtils.writeAttachment(response, "codegen.zip", outputStream.toByteArray());
}
-}
+}
\ No newline at end of file
diff --git a/yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/controller/admin/codegen/vo/CodegenCreateListReqVO.java b/yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/controller/admin/codegen/vo/CodegenCreateListReqVO.java
index 965c5d2b9..46dd711ad 100644
--- a/yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/controller/admin/codegen/vo/CodegenCreateListReqVO.java
+++ b/yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/controller/admin/codegen/vo/CodegenCreateListReqVO.java
@@ -1,22 +1,22 @@
package cn.iocoder.yudao.module.infra.controller.admin.codegen.vo;
-import io.swagger.annotations.ApiModel;
-import io.swagger.annotations.ApiModelProperty;
+import io.swagger.v3.oas.annotations.media.Schema;
+import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import javax.validation.constraints.NotNull;
import java.util.List;
-@ApiModel("管理后台 - 基于数据库的表结构,创建代码生成器的表和字段定义 Request VO")
+@Schema(description = "管理后台 - 基于数据库的表结构,创建代码生成器的表和字段定义 Request VO")
@Data
public class CodegenCreateListReqVO {
- @ApiModelProperty(value = "数据源配置的编号", required = true, example = "1")
+ @Schema(description = "数据源配置的编号", required = true, example = "1")
@NotNull(message = "数据源配置的编号不能为空")
private Long dataSourceConfigId;
- @ApiModelProperty(value = "表名数组", required = true, example = "[1, 2, 3]")
+ @Schema(description = "表名数组", required = true, example = "[1, 2, 3]")
@NotNull(message = "表名数组不能为空")
private List tableNames;
-}
+}
\ No newline at end of file
diff --git a/yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/controller/admin/codegen/vo/CodegenDetailRespVO.java b/yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/controller/admin/codegen/vo/CodegenDetailRespVO.java
index ad9c86812..35922c14b 100644
--- a/yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/controller/admin/codegen/vo/CodegenDetailRespVO.java
+++ b/yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/controller/admin/codegen/vo/CodegenDetailRespVO.java
@@ -2,20 +2,20 @@ package cn.iocoder.yudao.module.infra.controller.admin.codegen.vo;
import cn.iocoder.yudao.module.infra.controller.admin.codegen.vo.column.CodegenColumnRespVO;
import cn.iocoder.yudao.module.infra.controller.admin.codegen.vo.table.CodegenTableRespVO;
-import io.swagger.annotations.ApiModel;
-import io.swagger.annotations.ApiModelProperty;
+import io.swagger.v3.oas.annotations.media.Schema;
+import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import java.util.List;
-@ApiModel("管理后台 - 代码生成表和字段的明细 Response VO")
+@Schema(description = "管理后台 - 代码生成表和字段的明细 Response VO")
@Data
public class CodegenDetailRespVO {
- @ApiModelProperty("表定义")
+ @Schema(description = "表定义")
private CodegenTableRespVO table;
- @ApiModelProperty("字段定义")
+ @Schema(description = "字段定义")
private List columns;
-}
+}
\ No newline at end of file
diff --git a/yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/controller/admin/codegen/vo/CodegenPreviewRespVO.java b/yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/controller/admin/codegen/vo/CodegenPreviewRespVO.java
index 662a2350c..2997bcd11 100644
--- a/yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/controller/admin/codegen/vo/CodegenPreviewRespVO.java
+++ b/yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/controller/admin/codegen/vo/CodegenPreviewRespVO.java
@@ -1,17 +1,17 @@
package cn.iocoder.yudao.module.infra.controller.admin.codegen.vo;
-import io.swagger.annotations.ApiModel;
-import io.swagger.annotations.ApiModelProperty;
+import io.swagger.v3.oas.annotations.media.Schema;
+import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
-@ApiModel(value = "管理后台 - 代码生成预览 Response VO", description ="注意,每个文件都是一个该对象")
+@Schema(description = "管理后台 - 代码生成预览 Response VO,注意,每个文件都是一个该对象")
@Data
public class CodegenPreviewRespVO {
- @ApiModelProperty(value = "文件路径", required = true, example = "java/cn/iocoder/yudao/adminserver/modules/system/controller/test/SysTestDemoController.java")
+ @Schema(description = "文件路径", required = true, example = "java/cn/iocoder/yudao/adminserver/modules/system/controller/test/SysTestDemoController.java")
private String filePath;
- @ApiModelProperty(value = "代码", required = true, example = "Hello World")
+ @Schema(description = "代码", required = true, example = "Hello World")
private String code;
-}
+}
\ No newline at end of file
diff --git a/yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/controller/admin/codegen/vo/CodegenUpdateReqVO.java b/yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/controller/admin/codegen/vo/CodegenUpdateReqVO.java
index 2423da077..03df3213f 100644
--- a/yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/controller/admin/codegen/vo/CodegenUpdateReqVO.java
+++ b/yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/controller/admin/codegen/vo/CodegenUpdateReqVO.java
@@ -4,8 +4,8 @@ import cn.hutool.core.util.ObjectUtil;
import cn.iocoder.yudao.module.infra.controller.admin.codegen.vo.column.CodegenColumnBaseVO;
import cn.iocoder.yudao.module.infra.controller.admin.codegen.vo.table.CodegenTableBaseVO;
import cn.iocoder.yudao.module.infra.enums.codegen.CodegenSceneEnum;
-import io.swagger.annotations.ApiModel;
-import io.swagger.annotations.ApiModelProperty;
+import io.swagger.v3.oas.annotations.media.Schema;
+import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.ToString;
@@ -15,7 +15,7 @@ import javax.validation.constraints.AssertTrue;
import javax.validation.constraints.NotNull;
import java.util.List;
-@ApiModel("管理后台 - 代码生成表和字段的修改 Request VO")
+@Schema(description = "管理后台 - 代码生成表和字段的修改 Request VO")
@Data
public class CodegenUpdateReqVO {
@@ -27,14 +27,14 @@ public class CodegenUpdateReqVO {
@NotNull(message = "字段定义不能为空")
private List columns;
- @ApiModel("更新表定义")
+ @Schema(description = "更新表定义")
@Data
@EqualsAndHashCode(callSuper = true)
@ToString(callSuper = true)
@Valid
public static class Table extends CodegenTableBaseVO {
- @ApiModelProperty(value = "编号", required = true, example = "1")
+ @Schema(description = "编号", required = true, example = "1")
private Long id;
@AssertTrue(message = "上级菜单不能为空")
@@ -46,15 +46,15 @@ public class CodegenUpdateReqVO {
}
- @ApiModel("更新表定义")
+ @Schema(description = "更新表定义")
@Data
@EqualsAndHashCode(callSuper = true)
@ToString(callSuper = true)
public static class Column extends CodegenColumnBaseVO {
- @ApiModelProperty(value = "编号", required = true, example = "1")
+ @Schema(description = "编号", required = true, example = "1")
private Long id;
}
-}
+}
\ No newline at end of file
diff --git a/yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/controller/admin/codegen/vo/column/CodegenColumnBaseVO.java b/yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/controller/admin/codegen/vo/column/CodegenColumnBaseVO.java
index 770255185..0fdbc1a7a 100644
--- a/yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/controller/admin/codegen/vo/column/CodegenColumnBaseVO.java
+++ b/yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/controller/admin/codegen/vo/column/CodegenColumnBaseVO.java
@@ -1,6 +1,6 @@
package cn.iocoder.yudao.module.infra.controller.admin.codegen.vo.column;
-import io.swagger.annotations.ApiModelProperty;
+import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import javax.validation.constraints.NotNull;
@@ -12,74 +12,74 @@ import javax.validation.constraints.NotNull;
@Data
public class CodegenColumnBaseVO {
- @ApiModelProperty(value = "表编号", required = true, example = "1")
+ @Schema(description = "表编号", required = true, example = "1")
@NotNull(message = "表编号不能为空")
private Long tableId;
- @ApiModelProperty(value = "字段名", required = true, example = "user_age")
+ @Schema(description = "字段名", required = true, example = "user_age")
@NotNull(message = "字段名不能为空")
private String columnName;
- @ApiModelProperty(value = "字段类型", required = true, example = "int(11)")
+ @Schema(description = "字段类型", required = true, example = "int(11)")
@NotNull(message = "字段类型不能为空")
private String dataType;
- @ApiModelProperty(value = "字段描述", required = true, example = "年龄")
+ @Schema(description = "字段描述", required = true, example = "年龄")
@NotNull(message = "字段描述不能为空")
private String columnComment;
- @ApiModelProperty(value = "是否允许为空", required = true, example = "true")
+ @Schema(description = "是否允许为空", required = true, example = "true")
@NotNull(message = "是否允许为空不能为空")
private Boolean nullable;
- @ApiModelProperty(value = "是否主键", required = true, example = "false")
+ @Schema(description = "是否主键", required = true, example = "false")
@NotNull(message = "是否主键不能为空")
private Boolean primaryKey;
- @ApiModelProperty(value = "是否自增", required = true, example = "true")
+ @Schema(description = "是否自增", required = true, example = "true")
@NotNull(message = "是否自增不能为空")
private String autoIncrement;
- @ApiModelProperty(value = "排序", required = true, example = "10")
+ @Schema(description = "排序", required = true, example = "10")
@NotNull(message = "排序不能为空")
private Integer ordinalPosition;
- @ApiModelProperty(value = "Java 属性类型", required = true, example = "userAge")
+ @Schema(description = "Java 属性类型", required = true, example = "userAge")
@NotNull(message = "Java 属性类型不能为空")
private String javaType;
- @ApiModelProperty(value = "Java 属性名", required = true, example = "Integer")
+ @Schema(description = "Java 属性名", required = true, example = "Integer")
@NotNull(message = "Java 属性名不能为空")
private String javaField;
- @ApiModelProperty(value = "字典类型", example = "sys_gender")
+ @Schema(description = "字典类型", example = "sys_gender")
private String dictType;
- @ApiModelProperty(value = "数据示例", example = "1024")
+ @Schema(description = "数据示例", example = "1024")
private String example;
- @ApiModelProperty(value = "是否为 Create 创建操作的字段", required = true, example = "true")
+ @Schema(description = "是否为 Create 创建操作的字段", required = true, example = "true")
@NotNull(message = "是否为 Create 创建操作的字段不能为空")
private Boolean createOperation;
- @ApiModelProperty(value = "是否为 Update 更新操作的字段", required = true, example = "false")
+ @Schema(description = "是否为 Update 更新操作的字段", required = true, example = "false")
@NotNull(message = "是否为 Update 更新操作的字段不能为空")
private Boolean updateOperation;
- @ApiModelProperty(value = "是否为 List 查询操作的字段", required = true, example = "true")
+ @Schema(description = "是否为 List 查询操作的字段", required = true, example = "true")
@NotNull(message = "是否为 List 查询操作的字段不能为空")
private Boolean listOperation;
- @ApiModelProperty(value = "List 查询操作的条件类型", required = true, example = "LIKE", notes = "参见 CodegenColumnListConditionEnum 枚举")
+ @Schema(description = "List 查询操作的条件类型,参见 CodegenColumnListConditionEnum 枚举", required = true, example = "LIKE")
@NotNull(message = "List 查询操作的条件类型不能为空")
private String listOperationCondition;
- @ApiModelProperty(value = "是否为 List 查询操作的返回字段", required = true, example = "true")
+ @Schema(description = "是否为 List 查询操作的返回字段", required = true, example = "true")
@NotNull(message = "是否为 List 查询操作的返回字段不能为空")
private Boolean listOperationResult;
- @ApiModelProperty(value = "显示类型", required = true, example = "input")
+ @Schema(description = "显示类型", required = true, example = "input")
@NotNull(message = "显示类型不能为空")
private String htmlType;
-}
+}
\ No newline at end of file
diff --git a/yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/controller/admin/codegen/vo/column/CodegenColumnRespVO.java b/yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/controller/admin/codegen/vo/column/CodegenColumnRespVO.java
index 125b71801..b0f989de7 100644
--- a/yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/controller/admin/codegen/vo/column/CodegenColumnRespVO.java
+++ b/yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/controller/admin/codegen/vo/column/CodegenColumnRespVO.java
@@ -1,23 +1,23 @@
package cn.iocoder.yudao.module.infra.controller.admin.codegen.vo.column;
-import io.swagger.annotations.ApiModel;
-import io.swagger.annotations.ApiModelProperty;
+import io.swagger.v3.oas.annotations.media.Schema;
+import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.ToString;
import java.time.LocalDateTime;
-@ApiModel("管理后台 - 代码生成字段定义 Response VO")
+@Schema(description = "管理后台 - 代码生成字段定义 Response VO")
@Data
@EqualsAndHashCode(callSuper = true)
@ToString(callSuper = true)
public class CodegenColumnRespVO extends CodegenColumnBaseVO {
- @ApiModelProperty(value = "编号", required = true, example = "1")
+ @Schema(description = "编号", required = true, example = "1")
private Long id;
- @ApiModelProperty(value = "创建时间", required = true)
+ @Schema(description = "创建时间", required = true)
private LocalDateTime createTime;
-}
+}
\ No newline at end of file
diff --git a/yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/controller/admin/codegen/vo/table/CodegenTableBaseVO.java b/yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/controller/admin/codegen/vo/table/CodegenTableBaseVO.java
index ad69de7dd..4c05c10f2 100644
--- a/yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/controller/admin/codegen/vo/table/CodegenTableBaseVO.java
+++ b/yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/controller/admin/codegen/vo/table/CodegenTableBaseVO.java
@@ -1,6 +1,6 @@
package cn.iocoder.yudao.module.infra.controller.admin.codegen.vo.table;
-import io.swagger.annotations.ApiModelProperty;
+import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import javax.validation.constraints.NotNull;
@@ -12,46 +12,46 @@ import javax.validation.constraints.NotNull;
@Data
public class CodegenTableBaseVO {
- @ApiModelProperty(value = "生成场景", required = true, example = "1", notes = "参见 CodegenSceneEnum 枚举")
+ @Schema(description = "生成场景,参见 CodegenSceneEnum 枚举", required = true, example = "1")
@NotNull(message = "导入类型不能为空")
private Integer scene;
- @ApiModelProperty(value = "表名称", required = true, example = "yudao")
+ @Schema(description = "表名称", required = true, example = "yudao")
@NotNull(message = "表名称不能为空")
private String tableName;
- @ApiModelProperty(value = "表描述", required = true, example = "芋道")
+ @Schema(description = "表描述", required = true, example = "芋道")
@NotNull(message = "表描述不能为空")
private String tableComment;
- @ApiModelProperty(value = "备注", example = "我是备注")
+ @Schema(description = "备注", example = "我是备注")
private String remark;
- @ApiModelProperty(value = "模块名", required = true, example = "system")
+ @Schema(description = "模块名", required = true, example = "system")
@NotNull(message = "模块名不能为空")
private String moduleName;
- @ApiModelProperty(value = "业务名", required = true, example = "codegen")
+ @Schema(description = "业务名", required = true, example = "codegen")
@NotNull(message = "业务名不能为空")
private String businessName;
- @ApiModelProperty(value = "类名称", required = true, example = "CodegenTable")
+ @Schema(description = "类名称", required = true, example = "CodegenTable")
@NotNull(message = "类名称不能为空")
private String className;
- @ApiModelProperty(value = "类描述", required = true, example = "代码生成器的表定义")
+ @Schema(description = "类描述", required = true, example = "代码生成器的表定义")
@NotNull(message = "类描述不能为空")
private String classComment;
- @ApiModelProperty(value = "作者", required = true, example = "芋道源码")
+ @Schema(description = "作者", required = true, example = "芋道源码")
@NotNull(message = "作者不能为空")
private String author;
- @ApiModelProperty(value = "模板类型", required = true, example = "1", notes = "参见 CodegenTemplateTypeEnum 枚举")
+ @Schema(description = "模板类型,参见 CodegenTemplateTypeEnum 枚举", required = true, example = "1")
@NotNull(message = "模板类型不能为空")
private Integer templateType;
- @ApiModelProperty(value = "父菜单编号", example = "1024")
+ @Schema(description = "父菜单编号", example = "1024")
private Long parentMenuId;
-}
+}
\ No newline at end of file
diff --git a/yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/controller/admin/codegen/vo/table/CodegenTablePageReqVO.java b/yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/controller/admin/codegen/vo/table/CodegenTablePageReqVO.java
index bf940c995..290f80e44 100644
--- a/yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/controller/admin/codegen/vo/table/CodegenTablePageReqVO.java
+++ b/yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/controller/admin/codegen/vo/table/CodegenTablePageReqVO.java
@@ -1,8 +1,8 @@
package cn.iocoder.yudao.module.infra.controller.admin.codegen.vo.table;
import cn.iocoder.yudao.framework.common.pojo.PageParam;
-import io.swagger.annotations.ApiModel;
-import io.swagger.annotations.ApiModelProperty;
+import io.swagger.v3.oas.annotations.media.Schema;
+import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.ToString;
@@ -12,20 +12,20 @@ import java.time.LocalDateTime;
import static cn.iocoder.yudao.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND;
-@ApiModel("管理后台 - 表定义分页 Request VO")
+@Schema(description = "管理后台 - 表定义分页 Request VO")
@Data
@EqualsAndHashCode(callSuper = true)
@ToString(callSuper = true)
public class CodegenTablePageReqVO extends PageParam {
- @ApiModelProperty(value = "表名称", example = "yudao", notes = "模糊匹配")
+ @Schema(description = "表名称,模糊匹配", example = "yudao")
private String tableName;
- @ApiModelProperty(value = "表描述", example = "芋道", notes = "模糊匹配")
+ @Schema(description = "表描述,模糊匹配", example = "芋道")
private String tableComment;
- @ApiModelProperty(value = "创建时间", example = "[2022-07-01 00:00:00, 2022-07-01 23:59:59]")
+ @Schema(description = "创建时间", example = "[2022-07-01 00:00:00, 2022-07-01 23:59:59]")
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
private LocalDateTime[] createTime;
-}
+}
\ No newline at end of file
diff --git a/yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/controller/admin/codegen/vo/table/CodegenTableRespVO.java b/yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/controller/admin/codegen/vo/table/CodegenTableRespVO.java
index 7ef96b9a8..d89d903cb 100644
--- a/yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/controller/admin/codegen/vo/table/CodegenTableRespVO.java
+++ b/yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/controller/admin/codegen/vo/table/CodegenTableRespVO.java
@@ -1,29 +1,29 @@
package cn.iocoder.yudao.module.infra.controller.admin.codegen.vo.table;
-import io.swagger.annotations.ApiModel;
-import io.swagger.annotations.ApiModelProperty;
+import io.swagger.v3.oas.annotations.media.Schema;
+import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.ToString;
import java.time.LocalDateTime;
-@ApiModel("管理后台 - 代码生成表定义 Response VO")
+@Schema(description = "管理后台 - 代码生成表定义 Response VO")
@Data
@EqualsAndHashCode(callSuper = true)
@ToString(callSuper = true)
public class CodegenTableRespVO extends CodegenTableBaseVO {
- @ApiModelProperty(value = "编号", required = true, example = "1")
+ @Schema(description = "编号", required = true, example = "1")
private Long id;
- @ApiModelProperty(value = "主键编号", required = true, example = "1024")
+ @Schema(description = "主键编号", required = true, example = "1024")
private Integer dataSourceConfigId;
- @ApiModelProperty(value = "创建时间", required = true)
+ @Schema(description = "创建时间", required = true)
private LocalDateTime createTime;
- @ApiModelProperty(value = "更新时间", required = true)
+ @Schema(description = "更新时间", required = true)
private LocalDateTime updateTime;
-}
+}
\ No newline at end of file
diff --git a/yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/controller/admin/codegen/vo/table/DatabaseTableRespVO.java b/yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/controller/admin/codegen/vo/table/DatabaseTableRespVO.java
index 1423d119e..2669aba74 100644
--- a/yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/controller/admin/codegen/vo/table/DatabaseTableRespVO.java
+++ b/yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/controller/admin/codegen/vo/table/DatabaseTableRespVO.java
@@ -1,17 +1,17 @@
package cn.iocoder.yudao.module.infra.controller.admin.codegen.vo.table;
-import io.swagger.annotations.ApiModel;
-import io.swagger.annotations.ApiModelProperty;
+import io.swagger.v3.oas.annotations.media.Schema;
+import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
-@ApiModel("管理后台 - 数据库的表定义 Response VO")
+@Schema(description = "管理后台 - 数据库的表定义 Response VO")
@Data
public class DatabaseTableRespVO {
- @ApiModelProperty(value = "表名称", required = true, example = "yuanma")
+ @Schema(description = "表名称", required = true, example = "yuanma")
private String name;
- @ApiModelProperty(value = "表描述", required = true, example = "芋道源码")
+ @Schema(description = "表描述", required = true, example = "芋道源码")
private String comment;
-}
+}
\ No newline at end of file
diff --git a/yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/controller/admin/config/ConfigController.java b/yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/controller/admin/config/ConfigController.java
index 885294ccb..08d8b6f60 100644
--- a/yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/controller/admin/config/ConfigController.java
+++ b/yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/controller/admin/config/ConfigController.java
@@ -9,9 +9,9 @@ import cn.iocoder.yudao.module.infra.convert.config.ConfigConvert;
import cn.iocoder.yudao.module.infra.dal.dataobject.config.ConfigDO;
import cn.iocoder.yudao.module.infra.enums.ErrorCodeConstants;
import cn.iocoder.yudao.module.infra.service.config.ConfigService;
-import io.swagger.annotations.Api;
-import io.swagger.annotations.ApiImplicitParam;
-import io.swagger.annotations.ApiOperation;
+import io.swagger.v3.oas.annotations.tags.Tag;
+import io.swagger.v3.oas.annotations.Parameter;
+import io.swagger.v3.oas.annotations.Operation;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.*;
@@ -26,7 +26,7 @@ import static cn.iocoder.yudao.framework.common.exception.util.ServiceExceptionU
import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success;
import static cn.iocoder.yudao.framework.operatelog.core.enums.OperateTypeEnum.EXPORT;
-@Api(tags = "管理后台 - 参数配置")
+@Tag(name = "管理后台 - 参数配置")
@RestController
@RequestMapping("/infra/config")
@Validated
@@ -36,14 +36,14 @@ public class ConfigController {
private ConfigService configService;
@PostMapping("/create")
- @ApiOperation("创建参数配置")
+ @Operation(summary = "创建参数配置")
@PreAuthorize("@ss.hasPermission('infra:config:create')")
public CommonResult createConfig(@Valid @RequestBody ConfigCreateReqVO reqVO) {
return success(configService.createConfig(reqVO));
}
@PutMapping("/update")
- @ApiOperation("修改参数配置")
+ @Operation(summary = "修改参数配置")
@PreAuthorize("@ss.hasPermission('infra:config:update')")
public CommonResult updateConfig(@Valid @RequestBody ConfigUpdateReqVO reqVO) {
configService.updateConfig(reqVO);
@@ -51,8 +51,8 @@ public class ConfigController {
}
@DeleteMapping("/delete")
- @ApiOperation("删除参数配置")
- @ApiImplicitParam(name = "id", value = "编号", required = true, example = "1024", dataTypeClass = Long.class)
+ @Operation(summary = "删除参数配置")
+ @Parameter(name = "id", description = "编号", required = true, example = "1024")
@PreAuthorize("@ss.hasPermission('infra:config:delete')")
public CommonResult deleteConfig(@RequestParam("id") Long id) {
configService.deleteConfig(id);
@@ -60,16 +60,16 @@ public class ConfigController {
}
@GetMapping(value = "/get")
- @ApiOperation("获得参数配置")
- @ApiImplicitParam(name = "id", value = "编号", required = true, example = "1024", dataTypeClass = Long.class)
+ @Operation(summary = "获得参数配置")
+ @Parameter(name = "id", description = "编号", required = true, example = "1024")
@PreAuthorize("@ss.hasPermission('infra:config:query')")
public CommonResult getConfig(@RequestParam("id") Long id) {
return success(ConfigConvert.INSTANCE.convert(configService.getConfig(id)));
}
@GetMapping(value = "/get-value-by-key")
- @ApiOperation(value = "根据参数键名查询参数值", notes = "不可见的配置,不允许返回给前端")
- @ApiImplicitParam(name = "key", value = "参数键", required = true, example = "yunai.biz.username", dataTypeClass = String.class)
+ @Operation(summary = "根据参数键名查询参数值", description = "不可见的配置,不允许返回给前端")
+ @Parameter(name = "key", description = "参数键", required = true, example = "yunai.biz.username")
public CommonResult getConfigKey(@RequestParam("key") String key) {
ConfigDO config = configService.getConfigByKey(key);
if (config == null) {
@@ -82,7 +82,7 @@ public class ConfigController {
}
@GetMapping("/page")
- @ApiOperation("获取参数配置分页")
+ @Operation(summary = "获取参数配置分页")
@PreAuthorize("@ss.hasPermission('infra:config:query')")
public CommonResult> getConfigPage(@Valid ConfigPageReqVO reqVO) {
PageResult page = configService.getConfigPage(reqVO);
@@ -90,7 +90,7 @@ public class ConfigController {
}
@GetMapping("/export")
- @ApiOperation("导出参数配置")
+ @Operation(summary = "导出参数配置")
@PreAuthorize("@ss.hasPermission('infra:config:export')")
@OperateLog(type = EXPORT)
public void exportConfig(@Valid ConfigExportReqVO reqVO,
@@ -102,4 +102,4 @@ public class ConfigController {
ExcelUtils.write(response, "参数配置.xls", "数据", ConfigExcelVO.class, datas);
}
-}
+}
\ No newline at end of file
diff --git a/yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/controller/admin/config/vo/ConfigBaseVO.java b/yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/controller/admin/config/vo/ConfigBaseVO.java
index 774b0ac81..953e06248 100644
--- a/yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/controller/admin/config/vo/ConfigBaseVO.java
+++ b/yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/controller/admin/config/vo/ConfigBaseVO.java
@@ -1,6 +1,6 @@
package cn.iocoder.yudao.module.infra.controller.admin.config.vo;
-import io.swagger.annotations.ApiModelProperty;
+import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import javax.validation.constraints.NotBlank;
@@ -15,26 +15,26 @@ import javax.validation.constraints.Size;
@Data
public class ConfigBaseVO {
- @ApiModelProperty(value = "参数分组", required = true, example = "biz")
+ @Schema(description = "参数分组", required = true, example = "biz")
@NotEmpty(message = "参数分组不能为空")
@Size(max = 50, message = "参数名称不能超过50个字符")
private String category;
- @ApiModelProperty(value = "参数名称", required = true, example = "数据库名")
+ @Schema(description = "参数名称", required = true, example = "数据库名")
@NotBlank(message = "参数名称不能为空")
@Size(max = 100, message = "参数名称不能超过100个字符")
private String name;
- @ApiModelProperty(value = "参数键值", required = true, example = "1024")
+ @Schema(description = "参数键值", required = true, example = "1024")
@NotBlank(message = "参数键值不能为空")
@Size(max = 500, message = "参数键值长度不能超过500个字符")
private String value;
- @ApiModelProperty(value = "是否敏感", required = true, example = "true")
+ @Schema(description = "是否敏感", required = true, example = "true")
@NotNull(message = "是否敏感不能为空")
private Boolean visible;
- @ApiModelProperty(value = "备注", example = "备注一下很帅气!")
+ @Schema(description = "备注", example = "备注一下很帅气!")
private String remark;
-}
+}
\ No newline at end of file
diff --git a/yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/controller/admin/config/vo/ConfigCreateReqVO.java b/yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/controller/admin/config/vo/ConfigCreateReqVO.java
index 7a2118ae1..97779c286 100644
--- a/yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/controller/admin/config/vo/ConfigCreateReqVO.java
+++ b/yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/controller/admin/config/vo/ConfigCreateReqVO.java
@@ -1,21 +1,21 @@
package cn.iocoder.yudao.module.infra.controller.admin.config.vo;
-import io.swagger.annotations.ApiModel;
-import io.swagger.annotations.ApiModelProperty;
+import io.swagger.v3.oas.annotations.media.Schema;
+import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import lombok.EqualsAndHashCode;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.Size;
-@ApiModel("管理后台 - 参数配置创建 Request VO")
+@Schema(description = "管理后台 - 参数配置创建 Request VO")
@Data
@EqualsAndHashCode(callSuper = true)
public class ConfigCreateReqVO extends ConfigBaseVO {
- @ApiModelProperty(value = "参数键名", required = true, example = "yunai.db.username")
+ @Schema(description = "参数键名", required = true, example = "yunai.db.username")
@NotBlank(message = "参数键名长度不能为空")
@Size(max = 100, message = "参数键名长度不能超过100个字符")
private String key;
-}
+}
\ No newline at end of file
diff --git a/yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/controller/admin/config/vo/ConfigExportReqVO.java b/yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/controller/admin/config/vo/ConfigExportReqVO.java
index 7c679e2d1..e959346c7 100644
--- a/yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/controller/admin/config/vo/ConfigExportReqVO.java
+++ b/yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/controller/admin/config/vo/ConfigExportReqVO.java
@@ -1,7 +1,7 @@
package cn.iocoder.yudao.module.infra.controller.admin.config.vo;
-import io.swagger.annotations.ApiModel;
-import io.swagger.annotations.ApiModelProperty;
+import io.swagger.v3.oas.annotations.media.Schema;
+import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;
@@ -9,21 +9,21 @@ import java.time.LocalDateTime;
import static cn.iocoder.yudao.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND;
-@ApiModel("管理后台 - 参数配置导出 Request VO")
+@Schema(description = "管理后台 - 参数配置导出 Request VO")
@Data
public class ConfigExportReqVO {
- @ApiModelProperty(value = "参数名称", example = "模糊匹配")
+ @Schema(description = "参数名称", example = "模糊匹配")
private String name;
- @ApiModelProperty(value = "参数键名", example = "yunai.db.username", notes = "模糊匹配")
+ @Schema(description = "参数键名,模糊匹配", example = "yunai.db.username")
private String key;
- @ApiModelProperty(value = "参数类型", example = "1", notes = "参见 SysConfigTypeEnum 枚举")
+ @Schema(description = "参数类型,参见 SysConfigTypeEnum 枚举", example = "1")
private Integer type;
- @ApiModelProperty(value = "创建时间", example = "[2022-07-01 00:00:00,2022-07-01 23:59:59]")
+ @Schema(description = "创建时间", example = "[2022-07-01 00:00:00,2022-07-01 23:59:59]")
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
private LocalDateTime[] createTime;
-}
+}
\ No newline at end of file
diff --git a/yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/controller/admin/config/vo/ConfigPageReqVO.java b/yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/controller/admin/config/vo/ConfigPageReqVO.java
index 5ca206d46..3219fc633 100644
--- a/yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/controller/admin/config/vo/ConfigPageReqVO.java
+++ b/yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/controller/admin/config/vo/ConfigPageReqVO.java
@@ -1,8 +1,8 @@
package cn.iocoder.yudao.module.infra.controller.admin.config.vo;
import cn.iocoder.yudao.framework.common.pojo.PageParam;
-import io.swagger.annotations.ApiModel;
-import io.swagger.annotations.ApiModelProperty;
+import io.swagger.v3.oas.annotations.media.Schema;
+import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.ToString;
@@ -12,23 +12,23 @@ import java.time.LocalDateTime;
import static cn.iocoder.yudao.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND;
-@ApiModel("管理后台 - 参数配置分页 Request VO")
+@Schema(description = "管理后台 - 参数配置分页 Request VO")
@Data
@EqualsAndHashCode(callSuper = true)
@ToString(callSuper = true)
public class ConfigPageReqVO extends PageParam {
- @ApiModelProperty(value = "数据源名称", example = "模糊匹配")
+ @Schema(description = "数据源名称", example = "模糊匹配")
private String name;
- @ApiModelProperty(value = "参数键名", example = "yunai.db.username", notes = "模糊匹配")
+ @Schema(description = "参数键名,模糊匹配", example = "yunai.db.username")
private String key;
- @ApiModelProperty(value = "参数类型", example = "1", notes = "参见 SysConfigTypeEnum 枚举")
+ @Schema(description = "参数类型,参见 SysConfigTypeEnum 枚举", example = "1")
private Integer type;
- @ApiModelProperty(value = "创建时间", example = "[2022-07-01 00:00:00,2022-07-01 23:59:59]")
+ @Schema(description = "创建时间", example = "[2022-07-01 00:00:00,2022-07-01 23:59:59]")
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
private LocalDateTime[] createTime;
-}
+}
\ No newline at end of file
diff --git a/yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/controller/admin/config/vo/ConfigRespVO.java b/yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/controller/admin/config/vo/ConfigRespVO.java
index 0c952eecb..cbb289e5b 100644
--- a/yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/controller/admin/config/vo/ConfigRespVO.java
+++ b/yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/controller/admin/config/vo/ConfigRespVO.java
@@ -1,7 +1,7 @@
package cn.iocoder.yudao.module.infra.controller.admin.config.vo;
-import io.swagger.annotations.ApiModel;
-import io.swagger.annotations.ApiModelProperty;
+import io.swagger.v3.oas.annotations.media.Schema;
+import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import lombok.EqualsAndHashCode;
@@ -9,23 +9,23 @@ import javax.validation.constraints.NotBlank;
import javax.validation.constraints.Size;
import java.time.LocalDateTime;
-@ApiModel("管理后台 - 参数配置信息 Response VO")
+@Schema(description = "管理后台 - 参数配置信息 Response VO")
@Data
@EqualsAndHashCode(callSuper = true)
public class ConfigRespVO extends ConfigBaseVO {
- @ApiModelProperty(value = "参数配置序号", required = true, example = "1024")
+ @Schema(description = "参数配置序号", required = true, example = "1024")
private Long id;
- @ApiModelProperty(value = "参数键名", required = true, example = "yunai.db.username")
+ @Schema(description = "参数键名", required = true, example = "yunai.db.username")
@NotBlank(message = "参数键名长度不能为空")
@Size(max = 100, message = "参数键名长度不能超过100个字符")
private String key;
- @ApiModelProperty(value = "参数类型", required = true, example = "1", notes = "参见 SysConfigTypeEnum 枚举")
+ @Schema(description = "参数类型,参见 SysConfigTypeEnum 枚举", required = true, example = "1")
private Integer type;
- @ApiModelProperty(value = "创建时间", required = true, example = "时间戳格式")
+ @Schema(description = "创建时间", required = true, example = "时间戳格式")
private LocalDateTime createTime;
-}
+}
\ No newline at end of file
diff --git a/yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/controller/admin/config/vo/ConfigUpdateReqVO.java b/yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/controller/admin/config/vo/ConfigUpdateReqVO.java
index 2335d6169..e799c7348 100644
--- a/yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/controller/admin/config/vo/ConfigUpdateReqVO.java
+++ b/yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/controller/admin/config/vo/ConfigUpdateReqVO.java
@@ -1,21 +1,21 @@
package cn.iocoder.yudao.module.infra.controller.admin.config.vo;
-import io.swagger.annotations.ApiModel;
-import io.swagger.annotations.ApiModelProperty;
+import io.swagger.v3.oas.annotations.media.Schema;
+import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.ToString;
import javax.validation.constraints.NotNull;
-@ApiModel("管理后台 - 参数配置创建 Request VO")
+@Schema(description = "管理后台 - 参数配置创建 Request VO")
@Data
@EqualsAndHashCode(callSuper = true)
@ToString(callSuper = true)
public class ConfigUpdateReqVO extends ConfigBaseVO {
- @ApiModelProperty(value = "参数配置序号", required = true, example = "1024")
+ @Schema(description = "参数配置序号", required = true, example = "1024")
@NotNull(message = "参数配置编号不能为空")
private Long id;
-}
+}
\ No newline at end of file
diff --git a/yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/controller/admin/db/DataSourceConfigController.java b/yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/controller/admin/db/DataSourceConfigController.java
index 6b535ae98..2aba1539b 100755
--- a/yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/controller/admin/db/DataSourceConfigController.java
+++ b/yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/controller/admin/db/DataSourceConfigController.java
@@ -7,9 +7,9 @@ import cn.iocoder.yudao.module.infra.controller.admin.db.vo.DataSourceConfigUpda
import cn.iocoder.yudao.module.infra.convert.db.DataSourceConfigConvert;
import cn.iocoder.yudao.module.infra.dal.dataobject.db.DataSourceConfigDO;
import cn.iocoder.yudao.module.infra.service.db.DataSourceConfigService;
-import io.swagger.annotations.Api;
-import io.swagger.annotations.ApiImplicitParam;
-import io.swagger.annotations.ApiOperation;
+import io.swagger.v3.oas.annotations.tags.Tag;
+import io.swagger.v3.oas.annotations.Parameter;
+import io.swagger.v3.oas.annotations.Operation;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.*;
@@ -20,7 +20,7 @@ import java.util.List;
import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success;
-@Api(tags = "管理后台 - 数据源配置")
+@Tag(name = "管理后台 - 数据源配置")
@RestController
@RequestMapping("/infra/data-source-config")
@Validated
@@ -30,14 +30,14 @@ public class DataSourceConfigController {
private DataSourceConfigService dataSourceConfigService;
@PostMapping("/create")
- @ApiOperation("创建数据源配置")
+ @Operation(summary = "创建数据源配置")
@PreAuthorize("@ss.hasPermission('infra:data-source-config:create')")
public CommonResult createDataSourceConfig(@Valid @RequestBody DataSourceConfigCreateReqVO createReqVO) {
return success(dataSourceConfigService.createDataSourceConfig(createReqVO));
}
@PutMapping("/update")
- @ApiOperation("更新数据源配置")
+ @Operation(summary = "更新数据源配置")
@PreAuthorize("@ss.hasPermission('infra:data-source-config:update')")
public CommonResult updateDataSourceConfig(@Valid @RequestBody DataSourceConfigUpdateReqVO updateReqVO) {
dataSourceConfigService.updateDataSourceConfig(updateReqVO);
@@ -45,8 +45,8 @@ public class DataSourceConfigController {
}
@DeleteMapping("/delete")
- @ApiOperation("删除数据源配置")
- @ApiImplicitParam(name = "id", value = "编号", required = true, dataTypeClass = Long.class)
+ @Operation(summary = "删除数据源配置")
+ @Parameter(name = "id", description = "编号", required = true)
@PreAuthorize("@ss.hasPermission('infra:data-source-config:delete')")
public CommonResult deleteDataSourceConfig(@RequestParam("id") Long id) {
dataSourceConfigService.deleteDataSourceConfig(id);
@@ -54,8 +54,8 @@ public class DataSourceConfigController {
}
@GetMapping("/get")
- @ApiOperation("获得数据源配置")
- @ApiImplicitParam(name = "id", value = "编号", required = true, example = "1024", dataTypeClass = Long.class)
+ @Operation(summary = "获得数据源配置")
+ @Parameter(name = "id", description = "编号", required = true, example = "1024")
@PreAuthorize("@ss.hasPermission('infra:data-source-config:query')")
public CommonResult getDataSourceConfig(@RequestParam("id") Long id) {
DataSourceConfigDO dataSourceConfig = dataSourceConfigService.getDataSourceConfig(id);
@@ -63,11 +63,11 @@ public class DataSourceConfigController {
}
@GetMapping("/list")
- @ApiOperation("获得数据源配置列表")
+ @Operation(summary = "获得数据源配置列表")
@PreAuthorize("@ss.hasPermission('infra:data-source-config:query')")
public CommonResult> getDataSourceConfigList() {
List list = dataSourceConfigService.getDataSourceConfigList();
return success(DataSourceConfigConvert.INSTANCE.convertList(list));
}
-}
+}
\ No newline at end of file
diff --git a/yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/controller/admin/db/DatabaseDocController.java b/yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/controller/admin/db/DatabaseDocController.java
index eb35d4555..8a44df1df 100644
--- a/yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/controller/admin/db/DatabaseDocController.java
+++ b/yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/controller/admin/db/DatabaseDocController.java
@@ -13,9 +13,9 @@ import com.baomidou.dynamic.datasource.spring.boot.autoconfigure.DataSourcePrope
import com.baomidou.dynamic.datasource.spring.boot.autoconfigure.DynamicDataSourceProperties;
import com.zaxxer.hikari.HikariConfig;
import com.zaxxer.hikari.HikariDataSource;
-import io.swagger.annotations.Api;
-import io.swagger.annotations.ApiImplicitParam;
-import io.swagger.annotations.ApiOperation;
+import io.swagger.v3.oas.annotations.tags.Tag;
+import io.swagger.v3.oas.annotations.Parameter;
+import io.swagger.v3.oas.annotations.Operation;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
@@ -27,7 +27,7 @@ import java.io.File;
import java.io.IOException;
import java.util.Arrays;
-@Api(tags = "管理后台 - 数据库文档")
+@Tag(name = "管理后台 - 数据库文档")
@RestController
@RequestMapping("/infra/db-doc")
public class DatabaseDocController {
@@ -42,27 +42,24 @@ public class DatabaseDocController {
private static final String DOC_DESCRIPTION = "文档描述";
@GetMapping("/export-html")
- @ApiOperation("导出 html 格式的数据文档")
- @ApiImplicitParam(name = "deleteFile", value = "是否删除在服务器本地生成的数据库文档", example = "true",
- dataTypeClass = Boolean.class)
+ @Operation(summary = "导出 html 格式的数据文档")
+ @Parameter(name = "deleteFile", description = "是否删除在服务器本地生成的数据库文档", example = "true")
public void exportHtml(@RequestParam(defaultValue = "true") Boolean deleteFile,
HttpServletResponse response) throws IOException {
doExportFile(EngineFileType.HTML, deleteFile, response);
}
@GetMapping("/export-word")
- @ApiOperation("导出 word 格式的数据文档")
- @ApiImplicitParam(name = "deleteFile", value = "是否删除在服务器本地生成的数据库文档", example = "true",
- dataTypeClass = Boolean.class)
+ @Operation(summary = "导出 word 格式的数据文档")
+ @Parameter(name = "deleteFile", description = "是否删除在服务器本地生成的数据库文档", example = "true")
public void exportWord(@RequestParam(defaultValue = "true") Boolean deleteFile,
HttpServletResponse response) throws IOException {
doExportFile(EngineFileType.WORD, deleteFile, response);
}
@GetMapping("/export-markdown")
- @ApiOperation("导出 markdown 格式的数据文档")
- @ApiImplicitParam(name = "deleteFile", value = "是否删除在服务器本地生成的数据库文档", example = "true",
- dataTypeClass = Boolean.class)
+ @Operation(summary = "导出 markdown 格式的数据文档")
+ @Parameter(name = "deleteFile", description = "是否删除在服务器本地生成的数据库文档", example = "true")
public void exportMarkdown(@RequestParam(defaultValue = "true") Boolean deleteFile,
HttpServletResponse response) throws IOException {
doExportFile(EngineFileType.MD, deleteFile, response);
@@ -154,4 +151,4 @@ public class DatabaseDocController {
.build();
}
-}
+}
\ No newline at end of file
diff --git a/yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/controller/admin/db/vo/DataSourceConfigBaseVO.java b/yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/controller/admin/db/vo/DataSourceConfigBaseVO.java
index dbf25b75c..ff410ce65 100755
--- a/yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/controller/admin/db/vo/DataSourceConfigBaseVO.java
+++ b/yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/controller/admin/db/vo/DataSourceConfigBaseVO.java
@@ -1,8 +1,7 @@
package cn.iocoder.yudao.module.infra.controller.admin.db.vo;
+import io.swagger.v3.oas.annotations.media.Schema;
import lombok.*;
-import java.util.*;
-import io.swagger.annotations.*;
import javax.validation.constraints.*;
/**
@@ -12,16 +11,16 @@ import javax.validation.constraints.*;
@Data
public class DataSourceConfigBaseVO {
- @ApiModelProperty(value = "数据源名称", required = true, example = "test")
+ @Schema(description = "数据源名称", required = true, example = "test")
@NotNull(message = "数据源名称不能为空")
private String name;
- @ApiModelProperty(value = "数据源连接", required = true, example = "jdbc:mysql://127.0.0.1:3306/ruoyi-vue-pro")
+ @Schema(description = "数据源连接", required = true, example = "jdbc:mysql://127.0.0.1:3306/ruoyi-vue-pro")
@NotNull(message = "数据源连接不能为空")
private String url;
- @ApiModelProperty(value = "用户名", required = true, example = "root")
+ @Schema(description = "用户名", required = true, example = "root")
@NotNull(message = "用户名不能为空")
private String username;
-}
+}
\ No newline at end of file
diff --git a/yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/controller/admin/db/vo/DataSourceConfigCreateReqVO.java b/yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/controller/admin/db/vo/DataSourceConfigCreateReqVO.java
index 13085f9b1..b67797baf 100755
--- a/yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/controller/admin/db/vo/DataSourceConfigCreateReqVO.java
+++ b/yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/controller/admin/db/vo/DataSourceConfigCreateReqVO.java
@@ -1,18 +1,17 @@
package cn.iocoder.yudao.module.infra.controller.admin.db.vo;
+import io.swagger.v3.oas.annotations.media.Schema;
import lombok.*;
-import java.util.*;
-import io.swagger.annotations.*;
import javax.validation.constraints.*;
-@ApiModel("管理后台 - 数据源配置创建 Request VO")
+@Schema(description = "管理后台 - 数据源配置创建 Request VO")
@Data
@EqualsAndHashCode(callSuper = true)
@ToString(callSuper = true)
public class DataSourceConfigCreateReqVO extends DataSourceConfigBaseVO {
- @ApiModelProperty(value = "密码", required = true, example = "123456")
+ @Schema(description = "密码", required = true, example = "123456")
@NotNull(message = "密码不能为空")
private String password;
-}
+}
\ No newline at end of file
diff --git a/yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/controller/admin/db/vo/DataSourceConfigRespVO.java b/yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/controller/admin/db/vo/DataSourceConfigRespVO.java
index 134b2b2f1..4002d4f06 100755
--- a/yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/controller/admin/db/vo/DataSourceConfigRespVO.java
+++ b/yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/controller/admin/db/vo/DataSourceConfigRespVO.java
@@ -1,21 +1,20 @@
package cn.iocoder.yudao.module.infra.controller.admin.db.vo;
+import io.swagger.v3.oas.annotations.media.Schema;
import lombok.*;
import java.time.LocalDateTime;
-import java.util.*;
-import io.swagger.annotations.*;
-@ApiModel("管理后台 - 数据源配置 Response VO")
+@Schema(description = "管理后台 - 数据源配置 Response VO")
@Data
@EqualsAndHashCode(callSuper = true)
@ToString(callSuper = true)
public class DataSourceConfigRespVO extends DataSourceConfigBaseVO {
- @ApiModelProperty(value = "主键编号", required = true, example = "1024")
+ @Schema(description = "主键编号", required = true, example = "1024")
private Integer id;
- @ApiModelProperty(value = "创建时间", required = true)
+ @Schema(description = "创建时间", required = true)
private LocalDateTime createTime;
-}
+}
\ No newline at end of file
diff --git a/yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/controller/admin/db/vo/DataSourceConfigUpdateReqVO.java b/yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/controller/admin/db/vo/DataSourceConfigUpdateReqVO.java
index 134f3e9df..6bf318e9a 100755
--- a/yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/controller/admin/db/vo/DataSourceConfigUpdateReqVO.java
+++ b/yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/controller/admin/db/vo/DataSourceConfigUpdateReqVO.java
@@ -1,22 +1,21 @@
package cn.iocoder.yudao.module.infra.controller.admin.db.vo;
+import io.swagger.v3.oas.annotations.media.Schema;
import lombok.*;
-import java.util.*;
-import io.swagger.annotations.*;
import javax.validation.constraints.*;
-@ApiModel("管理后台 - 数据源配置更新 Request VO")
+@Schema(description = "管理后台 - 数据源配置更新 Request VO")
@Data
@EqualsAndHashCode(callSuper = true)
@ToString(callSuper = true)
public class DataSourceConfigUpdateReqVO extends DataSourceConfigBaseVO {
- @ApiModelProperty(value = "主键编号", required = true, example = "1024")
+ @Schema(description = "主键编号", required = true, example = "1024")
@NotNull(message = "主键编号不能为空")
private Long id;
- @ApiModelProperty(value = "密码", required = true, example = "123456")
+ @Schema(description = "密码", required = true, example = "123456")
@NotNull(message = "密码不能为空")
private String password;
-}
+}
\ No newline at end of file
diff --git a/yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/controller/admin/file/FileConfigController.java b/yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/controller/admin/file/FileConfigController.java
index 8c355d627..1ea122e34 100755
--- a/yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/controller/admin/file/FileConfigController.java
+++ b/yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/controller/admin/file/FileConfigController.java
@@ -9,9 +9,9 @@ import cn.iocoder.yudao.module.infra.controller.admin.file.vo.config.FileConfigU
import cn.iocoder.yudao.module.infra.convert.file.FileConfigConvert;
import cn.iocoder.yudao.module.infra.dal.dataobject.file.FileConfigDO;
import cn.iocoder.yudao.module.infra.service.file.FileConfigService;
-import io.swagger.annotations.Api;
-import io.swagger.annotations.ApiImplicitParam;
-import io.swagger.annotations.ApiOperation;
+import io.swagger.v3.oas.annotations.tags.Tag;
+import io.swagger.v3.oas.annotations.Parameter;
+import io.swagger.v3.oas.annotations.Operation;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.*;
@@ -21,7 +21,7 @@ import javax.validation.Valid;
import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success;
-@Api(tags = "管理后台 - 文件配置")
+@Tag(name = "管理后台 - 文件配置")
@RestController
@RequestMapping("/infra/file-config")
@Validated
@@ -31,14 +31,14 @@ public class FileConfigController {
private FileConfigService fileConfigService;
@PostMapping("/create")
- @ApiOperation("创建文件配置")
+ @Operation(summary = "创建文件配置")
@PreAuthorize("@ss.hasPermission('infra:file-config:create')")
public CommonResult createFileConfig(@Valid @RequestBody FileConfigCreateReqVO createReqVO) {
return success(fileConfigService.createFileConfig(createReqVO));
}
@PutMapping("/update")
- @ApiOperation("更新文件配置")
+ @Operation(summary = "更新文件配置")
@PreAuthorize("@ss.hasPermission('infra:file-config:update')")
public CommonResult updateFileConfig(@Valid @RequestBody FileConfigUpdateReqVO updateReqVO) {
fileConfigService.updateFileConfig(updateReqVO);
@@ -46,7 +46,7 @@ public class FileConfigController {
}
@PutMapping("/update-master")
- @ApiOperation("更新文件配置为 Master")
+ @Operation(summary = "更新文件配置为 Master")
@PreAuthorize("@ss.hasPermission('infra:file-config:update')")
public CommonResult updateFileConfigMaster(@RequestParam("id") Long id) {
fileConfigService.updateFileConfigMaster(id);
@@ -54,8 +54,8 @@ public class FileConfigController {
}
@DeleteMapping("/delete")
- @ApiOperation("删除文件配置")
- @ApiImplicitParam(name = "id", value = "编号", required = true, dataTypeClass = Long.class)
+ @Operation(summary = "删除文件配置")
+ @Parameter(name = "id", description = "编号", required = true)
@PreAuthorize("@ss.hasPermission('infra:file-config:delete')")
public CommonResult deleteFileConfig(@RequestParam("id") Long id) {
fileConfigService.deleteFileConfig(id);
@@ -63,8 +63,8 @@ public class FileConfigController {
}
@GetMapping("/get")
- @ApiOperation("获得文件配置")
- @ApiImplicitParam(name = "id", value = "编号", required = true, example = "1024", dataTypeClass = Long.class)
+ @Operation(summary = "获得文件配置")
+ @Parameter(name = "id", description = "编号", required = true, example = "1024")
@PreAuthorize("@ss.hasPermission('infra:file-config:query')")
public CommonResult getFileConfig(@RequestParam("id") Long id) {
FileConfigDO fileConfig = fileConfigService.getFileConfig(id);
@@ -72,7 +72,7 @@ public class FileConfigController {
}
@GetMapping("/page")
- @ApiOperation("获得文件配置分页")
+ @Operation(summary = "获得文件配置分页")
@PreAuthorize("@ss.hasPermission('infra:file-config:query')")
public CommonResult> getFileConfigPage(@Valid FileConfigPageReqVO pageVO) {
PageResult pageResult = fileConfigService.getFileConfigPage(pageVO);
@@ -80,10 +80,10 @@ public class FileConfigController {
}
@GetMapping("/test")
- @ApiOperation("测试文件配置是否正确")
+ @Operation(summary = "测试文件配置是否正确")
@PreAuthorize("@ss.hasPermission('infra:file-config:query')")
public CommonResult testFileConfig(@RequestParam("id") Long id) throws Exception {
String url = fileConfigService.testFileConfig(id);
return success(url);
}
-}
+}
\ No newline at end of file
diff --git a/yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/controller/admin/file/FileController.java b/yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/controller/admin/file/FileController.java
index 3719bc31b..82a9ec232 100644
--- a/yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/controller/admin/file/FileController.java
+++ b/yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/controller/admin/file/FileController.java
@@ -12,9 +12,9 @@ import cn.iocoder.yudao.module.infra.controller.admin.file.vo.file.FileUploadReq
import cn.iocoder.yudao.module.infra.convert.file.FileConvert;
import cn.iocoder.yudao.module.infra.dal.dataobject.file.FileDO;
import cn.iocoder.yudao.module.infra.service.file.FileService;
-import io.swagger.annotations.Api;
-import io.swagger.annotations.ApiImplicitParam;
-import io.swagger.annotations.ApiOperation;
+import io.swagger.v3.oas.annotations.tags.Tag;
+import io.swagger.v3.oas.annotations.Parameter;
+import io.swagger.v3.oas.annotations.Operation;
import lombok.extern.slf4j.Slf4j;
import org.springframework.http.HttpStatus;
import org.springframework.security.access.prepost.PreAuthorize;
@@ -30,7 +30,7 @@ import javax.validation.Valid;
import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success;
-@Api(tags = "管理后台 - 文件存储")
+@Tag(name = "管理后台 - 文件存储")
@RestController
@RequestMapping("/infra/file")
@Validated
@@ -41,7 +41,7 @@ public class FileController {
private FileService fileService;
@PostMapping("/upload")
- @ApiOperation("上传文件")
+ @Operation(summary = "上传文件")
@OperateLog(logArgs = false) // 上传文件,没有记录操作日志的必要
public CommonResult uploadFile(FileUploadReqVO uploadReqVO) throws Exception {
MultipartFile file = uploadReqVO.getFile();
@@ -50,8 +50,8 @@ public class FileController {
}
@DeleteMapping("/delete")
- @ApiOperation("删除文件")
- @ApiImplicitParam(name = "id", value = "编号", required = true, dataTypeClass = Long.class)
+ @Operation(summary = "删除文件")
+ @Parameter(name = "id", description = "编号", required = true)
@PreAuthorize("@ss.hasPermission('infra:file:delete')")
public CommonResult deleteFile(@RequestParam("id") Long id) throws Exception {
fileService.deleteFile(id);
@@ -60,8 +60,8 @@ public class FileController {
@GetMapping("/{configId}/get/**")
@PermitAll
- @ApiOperation("下载文件")
- @ApiImplicitParam(name = "configId", value = "配置编号", required = true, dataTypeClass = Long.class)
+ @Operation(summary = "下载文件")
+ @Parameter(name = "configId", description = "配置编号", required = true)
public void getFileContent(HttpServletRequest request,
HttpServletResponse response,
@PathVariable("configId") Long configId) throws Exception {
@@ -82,11 +82,11 @@ public class FileController {
}
@GetMapping("/page")
- @ApiOperation("获得文件分页")
+ @Operation(summary = "获得文件分页")
@PreAuthorize("@ss.hasPermission('infra:file:query')")
public CommonResult> getFilePage(@Valid FilePageReqVO pageVO) {
PageResult pageResult = fileService.getFilePage(pageVO);
return success(FileConvert.INSTANCE.convertPage(pageResult));
}
-}
+}
\ No newline at end of file
diff --git a/yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/controller/admin/file/vo/config/FileConfigBaseVO.java b/yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/controller/admin/file/vo/config/FileConfigBaseVO.java
index 09faa645b..5520ebfec 100755
--- a/yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/controller/admin/file/vo/config/FileConfigBaseVO.java
+++ b/yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/controller/admin/file/vo/config/FileConfigBaseVO.java
@@ -1,6 +1,6 @@
package cn.iocoder.yudao.module.infra.controller.admin.file.vo.config;
-import io.swagger.annotations.ApiModelProperty;
+import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import javax.validation.constraints.NotNull;
@@ -12,11 +12,11 @@ import javax.validation.constraints.NotNull;
@Data
public class FileConfigBaseVO {
- @ApiModelProperty(value = "配置名", required = true, example = "S3 - 阿里云")
+ @Schema(description = "配置名", required = true, example = "S3 - 阿里云")
@NotNull(message = "配置名不能为空")
private String name;
- @ApiModelProperty(value = "备注", example = "我是备注")
+ @Schema(description = "备注", example = "我是备注")
private String remark;
-}
+}
\ No newline at end of file
diff --git a/yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/controller/admin/file/vo/config/FileConfigCreateReqVO.java b/yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/controller/admin/file/vo/config/FileConfigCreateReqVO.java
index 876757920..1830f23a4 100755
--- a/yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/controller/admin/file/vo/config/FileConfigCreateReqVO.java
+++ b/yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/controller/admin/file/vo/config/FileConfigCreateReqVO.java
@@ -1,7 +1,7 @@
package cn.iocoder.yudao.module.infra.controller.admin.file.vo.config;
-import io.swagger.annotations.ApiModel;
-import io.swagger.annotations.ApiModelProperty;
+import io.swagger.v3.oas.annotations.media.Schema;
+import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.ToString;
@@ -9,18 +9,18 @@ import lombok.ToString;
import javax.validation.constraints.NotNull;
import java.util.Map;
-@ApiModel("管理后台 - 文件配置创建 Request VO")
+@Schema(description = "管理后台 - 文件配置创建 Request VO")
@Data
@EqualsAndHashCode(callSuper = true)
@ToString(callSuper = true)
public class FileConfigCreateReqVO extends FileConfigBaseVO {
- @ApiModelProperty(value = "存储器", required = true, example = "1", notes = "参见 FileStorageEnum 枚举类")
+ @Schema(description = "存储器,参见 FileStorageEnum 枚举类", required = true, example = "1")
@NotNull(message = "存储器不能为空")
private Integer storage;
- @ApiModelProperty(value = "存储配置", required = true, notes = "配置是动态参数,所以使用 Map 接收")
+ @Schema(description = "存储配置,配置是动态参数,所以使用 Map 接收", required = true)
@NotNull(message = "存储配置不能为空")
private Map config;
-}
+}
\ No newline at end of file
diff --git a/yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/controller/admin/file/vo/config/FileConfigPageReqVO.java b/yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/controller/admin/file/vo/config/FileConfigPageReqVO.java
index f8ea275f3..2b76612bb 100755
--- a/yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/controller/admin/file/vo/config/FileConfigPageReqVO.java
+++ b/yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/controller/admin/file/vo/config/FileConfigPageReqVO.java
@@ -1,8 +1,8 @@
package cn.iocoder.yudao.module.infra.controller.admin.file.vo.config;
import cn.iocoder.yudao.framework.common.pojo.PageParam;
-import io.swagger.annotations.ApiModel;
-import io.swagger.annotations.ApiModelProperty;
+import io.swagger.v3.oas.annotations.media.Schema;
+import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.ToString;
@@ -12,20 +12,20 @@ import java.time.LocalDateTime;
import static cn.iocoder.yudao.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND;
-@ApiModel("管理后台 - 文件配置分页 Request VO")
+@Schema(description = "管理后台 - 文件配置分页 Request VO")
@Data
@EqualsAndHashCode(callSuper = true)
@ToString(callSuper = true)
public class FileConfigPageReqVO extends PageParam {
- @ApiModelProperty(value = "配置名", example = "S3 - 阿里云")
+ @Schema(description = "配置名", example = "S3 - 阿里云")
private String name;
- @ApiModelProperty(value = "存储器", example = "1")
+ @Schema(description = "存储器", example = "1")
private Integer storage;
- @ApiModelProperty(value = "创建时间", example = "[2022-07-01 00:00:00, 2022-07-01 23:59:59]")
+ @Schema(description = "创建时间", example = "[2022-07-01 00:00:00, 2022-07-01 23:59:59]")
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
private LocalDateTime[] createTime;
-}
+}
\ No newline at end of file
diff --git a/yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/controller/admin/file/vo/config/FileConfigRespVO.java b/yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/controller/admin/file/vo/config/FileConfigRespVO.java
index c2341e486..ac0834bbd 100755
--- a/yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/controller/admin/file/vo/config/FileConfigRespVO.java
+++ b/yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/controller/admin/file/vo/config/FileConfigRespVO.java
@@ -1,8 +1,8 @@
package cn.iocoder.yudao.module.infra.controller.admin.file.vo.config;
import cn.iocoder.yudao.framework.file.core.client.FileClientConfig;
-import io.swagger.annotations.ApiModel;
-import io.swagger.annotations.ApiModelProperty;
+import io.swagger.v3.oas.annotations.media.Schema;
+import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.ToString;
@@ -10,27 +10,27 @@ import lombok.ToString;
import javax.validation.constraints.NotNull;
import java.time.LocalDateTime;
-@ApiModel("管理后台 - 文件配置 Response VO")
+@Schema(description = "管理后台 - 文件配置 Response VO")
@Data
@EqualsAndHashCode(callSuper = true)
@ToString(callSuper = true)
public class FileConfigRespVO extends FileConfigBaseVO {
- @ApiModelProperty(value = "编号", required = true, example = "1")
+ @Schema(description = "编号", required = true, example = "1")
private Long id;
- @ApiModelProperty(value = "存储器", required = true, example = "1", notes = "参见 FileStorageEnum 枚举类")
+ @Schema(description = "存储器,参见 FileStorageEnum 枚举类", required = true, example = "1")
@NotNull(message = "存储器不能为空")
private Integer storage;
- @ApiModelProperty(value = "是否为主配置", required = true, example = "true")
+ @Schema(description = "是否为主配置", required = true, example = "true")
@NotNull(message = "是否为主配置不能为空")
private Boolean master;
- @ApiModelProperty(value = "存储配置", required = true)
+ @Schema(description = "存储配置", required = true)
private FileClientConfig config;
- @ApiModelProperty(value = "创建时间", required = true)
+ @Schema(description = "创建时间", required = true)
private LocalDateTime createTime;
-}
+}
\ No newline at end of file
diff --git a/yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/controller/admin/file/vo/config/FileConfigUpdateReqVO.java b/yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/controller/admin/file/vo/config/FileConfigUpdateReqVO.java
index 45f8f751a..5b5fe2224 100755
--- a/yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/controller/admin/file/vo/config/FileConfigUpdateReqVO.java
+++ b/yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/controller/admin/file/vo/config/FileConfigUpdateReqVO.java
@@ -1,7 +1,7 @@
package cn.iocoder.yudao.module.infra.controller.admin.file.vo.config;
-import io.swagger.annotations.ApiModel;
-import io.swagger.annotations.ApiModelProperty;
+import io.swagger.v3.oas.annotations.media.Schema;
+import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.ToString;
@@ -9,18 +9,18 @@ import lombok.ToString;
import javax.validation.constraints.NotNull;
import java.util.Map;
-@ApiModel("管理后台 - 文件配置更新 Request VO")
+@Schema(description = "管理后台 - 文件配置更新 Request VO")
@Data
@EqualsAndHashCode(callSuper = true)
@ToString(callSuper = true)
public class FileConfigUpdateReqVO extends FileConfigBaseVO {
- @ApiModelProperty(value = "编号", required = true, example = "1")
+ @Schema(description = "编号", required = true, example = "1")
@NotNull(message = "编号不能为空")
private Long id;
- @ApiModelProperty(value = "存储配置", required = true, notes = "配置是动态参数,所以使用 Map 接收")
+ @Schema(description = "存储配置,配置是动态参数,所以使用 Map 接收", required = true)
@NotNull(message = "存储配置不能为空")
private Map config;
-}
+}
\ No newline at end of file
diff --git a/yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/controller/admin/file/vo/file/FilePageReqVO.java b/yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/controller/admin/file/vo/file/FilePageReqVO.java
index 774ed4f39..2c240d4a4 100644
--- a/yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/controller/admin/file/vo/file/FilePageReqVO.java
+++ b/yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/controller/admin/file/vo/file/FilePageReqVO.java
@@ -1,8 +1,8 @@
package cn.iocoder.yudao.module.infra.controller.admin.file.vo.file;
import cn.iocoder.yudao.framework.common.pojo.PageParam;
-import io.swagger.annotations.ApiModel;
-import io.swagger.annotations.ApiModelProperty;
+import io.swagger.v3.oas.annotations.media.Schema;
+import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.ToString;
@@ -12,20 +12,20 @@ import java.time.LocalDateTime;
import static cn.iocoder.yudao.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND;
-@ApiModel("管理后台 - 文件分页 Request VO")
+@Schema(description = "管理后台 - 文件分页 Request VO")
@Data
@EqualsAndHashCode(callSuper = true)
@ToString(callSuper = true)
public class FilePageReqVO extends PageParam {
- @ApiModelProperty(value = "文件路径", example = "yudao", notes = "模糊匹配")
+ @Schema(description = "文件路径,模糊匹配", example = "yudao")
private String path;
- @ApiModelProperty(value = "文件类型", example = "jpg", notes = "模糊匹配")
+ @Schema(description = "文件类型,模糊匹配", example = "jpg")
private String type;
- @ApiModelProperty(value = "创建时间", example = "[2022-07-01 00:00:00, 2022-07-01 23:59:59]")
+ @Schema(description = "创建时间", example = "[2022-07-01 00:00:00, 2022-07-01 23:59:59]")
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
private LocalDateTime[] createTime;
-}
+}
\ No newline at end of file
diff --git a/yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/controller/admin/file/vo/file/FileRespVO.java b/yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/controller/admin/file/vo/file/FileRespVO.java
index ff51725bf..a8344ee21 100644
--- a/yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/controller/admin/file/vo/file/FileRespVO.java
+++ b/yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/controller/admin/file/vo/file/FileRespVO.java
@@ -1,31 +1,31 @@
package cn.iocoder.yudao.module.infra.controller.admin.file.vo.file;
-import io.swagger.annotations.ApiModel;
-import io.swagger.annotations.ApiModelProperty;
+import io.swagger.v3.oas.annotations.media.Schema;
+import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import java.time.LocalDateTime;
-@ApiModel(value = "管理后台 - 文件 Response VO", description = "不返回 content 字段,太大")
+@Schema(description = "管理后台 - 文件 Response VO,不返回 content 字段,太大" )
@Data
public class FileRespVO {
- @ApiModelProperty(value = "文件编号", required = true, example = "1024")
+ @Schema(description = "文件编号", required = true, example = "1024")
private Long id;
- @ApiModelProperty(value = "文件路径", required = true, example = "yudao.jpg")
+ @Schema(description = "文件路径", required = true, example = "yudao.jpg")
private String path;
- @ApiModelProperty(value = "文件 URL", required = true, example = "https://www.iocoder.cn/yudao.jpg")
+ @Schema(description = "文件 URL", required = true, example = "https://www.iocoder.cn/yudao.jpg")
private String url;
- @ApiModelProperty(value = "文件类型", example = "jpg")
+ @Schema(description = "文件类型", example = "jpg")
private String type;
- @ApiModelProperty(value = "文件大小", example = "2048", required = true)
+ @Schema(description = "文件大小", example = "2048", required = true)
private Integer size;
- @ApiModelProperty(value = "创建时间", required = true)
+ @Schema(description = "创建时间", required = true)
private LocalDateTime createTime;
-}
+}
\ No newline at end of file
diff --git a/yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/controller/admin/file/vo/file/FileUploadReqVO.java b/yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/controller/admin/file/vo/file/FileUploadReqVO.java
index 74e00a75a..83d38c81e 100644
--- a/yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/controller/admin/file/vo/file/FileUploadReqVO.java
+++ b/yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/controller/admin/file/vo/file/FileUploadReqVO.java
@@ -1,21 +1,21 @@
package cn.iocoder.yudao.module.infra.controller.admin.file.vo.file;
-import io.swagger.annotations.ApiModel;
-import io.swagger.annotations.ApiModelProperty;
+import io.swagger.v3.oas.annotations.media.Schema;
+import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import org.springframework.web.multipart.MultipartFile;
import javax.validation.constraints.NotNull;
-@ApiModel(value = "管理后台 - 上传文件 Request VO")
+@Schema(description = "管理后台 - 上传文件 Request VO")
@Data
public class FileUploadReqVO {
- @ApiModelProperty(value = "文件附件", required = true)
+ @Schema(description = "文件附件", required = true)
@NotNull(message = "文件附件不能为空")
private MultipartFile file;
- @ApiModelProperty(value = "文件附件", example = "yudaoyuanma.png")
+ @Schema(description = "文件附件", example = "yudaoyuanma.png")
private String path;
-}
+}
\ No newline at end of file
diff --git a/yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/controller/admin/logger/ApiAccessLogController.java b/yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/controller/admin/logger/ApiAccessLogController.java
index 5046ea5af..3533e8c0c 100644
--- a/yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/controller/admin/logger/ApiAccessLogController.java
+++ b/yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/controller/admin/logger/ApiAccessLogController.java
@@ -11,8 +11,8 @@ import cn.iocoder.yudao.module.infra.controller.admin.logger.vo.apiaccesslog.Api
import cn.iocoder.yudao.module.infra.convert.logger.ApiAccessLogConvert;
import cn.iocoder.yudao.module.infra.dal.dataobject.logger.ApiAccessLogDO;
import cn.iocoder.yudao.module.infra.service.logger.ApiAccessLogService;
-import io.swagger.annotations.Api;
-import io.swagger.annotations.ApiOperation;
+import io.swagger.v3.oas.annotations.tags.Tag;
+import io.swagger.v3.oas.annotations.Operation;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.GetMapping;
@@ -28,7 +28,7 @@ import java.util.List;
import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success;
import static cn.iocoder.yudao.framework.operatelog.core.enums.OperateTypeEnum.EXPORT;
-@Api(tags = "管理后台 - API 访问日志")
+@Tag(name = "管理后台 - API 访问日志")
@RestController
@RequestMapping("/infra/api-access-log")
@Validated
@@ -38,7 +38,7 @@ public class ApiAccessLogController {
private ApiAccessLogService apiAccessLogService;
@GetMapping("/page")
- @ApiOperation("获得API 访问日志分页")
+ @Operation(summary = "获得API 访问日志分页")
@PreAuthorize("@ss.hasPermission('infra:api-access-log:query')")
public CommonResult> getApiAccessLogPage(@Valid ApiAccessLogPageReqVO pageVO) {
PageResult pageResult = apiAccessLogService.getApiAccessLogPage(pageVO);
@@ -46,7 +46,7 @@ public class ApiAccessLogController {
}
@GetMapping("/export-excel")
- @ApiOperation("导出API 访问日志 Excel")
+ @Operation(summary = "导出API 访问日志 Excel")
@PreAuthorize("@ss.hasPermission('infra:api-access-log:export')")
@OperateLog(type = EXPORT)
public void exportApiAccessLogExcel(@Valid ApiAccessLogExportReqVO exportReqVO,
@@ -57,4 +57,4 @@ public class ApiAccessLogController {
ExcelUtils.write(response, "API 访问日志.xls", "数据", ApiAccessLogExcelVO.class, datas);
}
-}
+}
\ No newline at end of file
diff --git a/yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/controller/admin/logger/ApiErrorLogController.java b/yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/controller/admin/logger/ApiErrorLogController.java
index d592836b2..9d582670c 100644
--- a/yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/controller/admin/logger/ApiErrorLogController.java
+++ b/yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/controller/admin/logger/ApiErrorLogController.java
@@ -11,10 +11,10 @@ import cn.iocoder.yudao.module.infra.controller.admin.logger.vo.apierrorlog.ApiE
import cn.iocoder.yudao.module.infra.convert.logger.ApiErrorLogConvert;
import cn.iocoder.yudao.module.infra.dal.dataobject.logger.ApiErrorLogDO;
import cn.iocoder.yudao.module.infra.service.logger.ApiErrorLogService;
-import io.swagger.annotations.Api;
-import io.swagger.annotations.ApiImplicitParam;
-import io.swagger.annotations.ApiImplicitParams;
-import io.swagger.annotations.ApiOperation;
+import io.swagger.v3.oas.annotations.tags.Tag;
+import io.swagger.v3.oas.annotations.Parameter;
+import io.swagger.v3.oas.annotations.Parameters;
+import io.swagger.v3.oas.annotations.Operation;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.*;
@@ -29,7 +29,7 @@ import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success;
import static cn.iocoder.yudao.framework.operatelog.core.enums.OperateTypeEnum.EXPORT;
import static cn.iocoder.yudao.framework.security.core.util.SecurityFrameworkUtils.getLoginUserId;
-@Api(tags = "管理后台 - API 错误日志")
+@Tag(name = "管理后台 - API 错误日志")
@RestController
@RequestMapping("/infra/api-error-log")
@Validated
@@ -39,10 +39,10 @@ public class ApiErrorLogController {
private ApiErrorLogService apiErrorLogService;
@PutMapping("/update-status")
- @ApiOperation("更新 API 错误日志的状态")
- @ApiImplicitParams({
- @ApiImplicitParam(name = "id", value = "编号", required = true, example = "1024", dataTypeClass = Long.class),
- @ApiImplicitParam(name = "processStatus", value = "处理状态", required = true, example = "1", dataTypeClass = Integer.class)
+ @Operation(summary = "更新 API 错误日志的状态")
+ @Parameters({
+ @Parameter(name = "id", description = "编号", required = true, example = "1024"),
+ @Parameter(name = "processStatus", description = "处理状态", required = true, example = "1")
})
@PreAuthorize("@ss.hasPermission('infra:api-error-log:update-status')")
public CommonResult updateApiErrorLogProcess(@RequestParam("id") Long id,
@@ -52,7 +52,7 @@ public class ApiErrorLogController {
}
@GetMapping("/page")
- @ApiOperation("获得 API 错误日志分页")
+ @Operation(summary = "获得 API 错误日志分页")
@PreAuthorize("@ss.hasPermission('infra:api-error-log:query')")
public CommonResult> getApiErrorLogPage(@Valid ApiErrorLogPageReqVO pageVO) {
PageResult pageResult = apiErrorLogService.getApiErrorLogPage(pageVO);
@@ -60,7 +60,7 @@ public class ApiErrorLogController {
}
@GetMapping("/export-excel")
- @ApiOperation("导出 API 错误日志 Excel")
+ @Operation(summary = "导出 API 错误日志 Excel")
@PreAuthorize("@ss.hasPermission('infra:api-error-log:export')")
@OperateLog(type = EXPORT)
public void exportApiErrorLogExcel(@Valid ApiErrorLogExportReqVO exportReqVO,
@@ -71,4 +71,4 @@ public class ApiErrorLogController {
ExcelUtils.write(response, "API 错误日志.xls", "数据", ApiErrorLogExcelVO.class, datas);
}
-}
+}
\ No newline at end of file
diff --git a/yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/controller/admin/logger/vo/apiaccesslog/ApiAccessLogBaseVO.java b/yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/controller/admin/logger/vo/apiaccesslog/ApiAccessLogBaseVO.java
index 077f26133..94e17c9af 100644
--- a/yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/controller/admin/logger/vo/apiaccesslog/ApiAccessLogBaseVO.java
+++ b/yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/controller/admin/logger/vo/apiaccesslog/ApiAccessLogBaseVO.java
@@ -1,6 +1,6 @@
package cn.iocoder.yudao.module.infra.controller.admin.logger.vo.apiaccesslog;
-import io.swagger.annotations.ApiModelProperty;
+import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;
@@ -16,60 +16,60 @@ import static cn.iocoder.yudao.framework.common.util.date.DateUtils.FORMAT_YEAR_
@Data
public class ApiAccessLogBaseVO {
- @ApiModelProperty(value = "链路追踪编号", required = true, example = "66600cb6-7852-11eb-9439-0242ac130002")
+ @Schema(description = "链路追踪编号", required = true, example = "66600cb6-7852-11eb-9439-0242ac130002")
@NotNull(message = "链路追踪编号不能为空")
private String traceId;
- @ApiModelProperty(value = "用户编号", required = true, example = "666")
+ @Schema(description = "用户编号", required = true, example = "666")
@NotNull(message = "用户编号不能为空")
private Long userId;
- @ApiModelProperty(value = "用户类型", required = true, example = "2", notes = "参见 UserTypeEnum 枚举")
+ @Schema(description = "用户类型,参见 UserTypeEnum 枚举", required = true, example = "2")
@NotNull(message = "用户类型不能为空")
private Integer userType;
- @ApiModelProperty(value = "应用名", required = true, example = "dashboard")
+ @Schema(description = "应用名", required = true, example = "dashboard")
@NotNull(message = "应用名不能为空")
private String applicationName;
- @ApiModelProperty(value = "请求方法名", required = true, example = "GET")
+ @Schema(description = "请求方法名", required = true, example = "GET")
@NotNull(message = "请求方法名不能为空")
private String requestMethod;
- @ApiModelProperty(value = "请求地址", required = true, example = "/xxx/yyy")
+ @Schema(description = "请求地址", required = true, example = "/xxx/yyy")
@NotNull(message = "请求地址不能为空")
private String requestUrl;
- @ApiModelProperty(value = "请求参数")
+ @Schema(description = "请求参数")
private String requestParams;
- @ApiModelProperty(value = "用户 IP", required = true, example = "127.0.0.1")
+ @Schema(description = "用户 IP", required = true, example = "127.0.0.1")
@NotNull(message = "用户 IP不能为空")
private String userIp;
- @ApiModelProperty(value = "浏览器 UA", required = true, example = "Mozilla/5.0")
+ @Schema(description = "浏览器 UA", required = true, example = "Mozilla/5.0")
@NotNull(message = "浏览器 UA不能为空")
private String userAgent;
- @ApiModelProperty(value = "开始请求时间", required = true)
+ @Schema(description = "开始请求时间", required = true)
@NotNull(message = "开始请求时间不能为空")
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
private LocalDateTime beginTime;
- @ApiModelProperty(value = "结束请求时间", required = true)
+ @Schema(description = "结束请求时间", required = true)
@NotNull(message = "结束请求时间不能为空")
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
private LocalDateTime endTime;
- @ApiModelProperty(value = "执行时长", required = true, example = "100")
+ @Schema(description = "执行时长", required = true, example = "100")
@NotNull(message = "执行时长不能为空")
private Integer duration;
- @ApiModelProperty(value = "结果码", required = true, example = "0")
+ @Schema(description = "结果码", required = true, example = "0")
@NotNull(message = "结果码不能为空")
private Integer resultCode;
- @ApiModelProperty(value = "结果提示", example = "芋道源码,牛逼!")
+ @Schema(description = "结果提示", example = "芋道源码,牛逼!")
private String resultMsg;
-}
+}
\ No newline at end of file
diff --git a/yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/controller/admin/logger/vo/apiaccesslog/ApiAccessLogExportReqVO.java b/yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/controller/admin/logger/vo/apiaccesslog/ApiAccessLogExportReqVO.java
index 406446d98..82ae47ef8 100644
--- a/yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/controller/admin/logger/vo/apiaccesslog/ApiAccessLogExportReqVO.java
+++ b/yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/controller/admin/logger/vo/apiaccesslog/ApiAccessLogExportReqVO.java
@@ -1,7 +1,7 @@
package cn.iocoder.yudao.module.infra.controller.admin.logger.vo.apiaccesslog;
-import io.swagger.annotations.ApiModel;
-import io.swagger.annotations.ApiModelProperty;
+import io.swagger.v3.oas.annotations.media.Schema;
+import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;
@@ -9,30 +9,30 @@ import java.time.LocalDateTime;
import static cn.iocoder.yudao.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND;
-@ApiModel(value = "管理后台 - API 访问日志 Excel 导出 Request VO", description = "参数和 ApiAccessLogPageReqVO 是一致的")
+@Schema(description = "管理后台 - API 访问日志 Excel 导出 Request VO,参数和 ApiAccessLogPageReqVO 是一致的")
@Data
public class ApiAccessLogExportReqVO {
- @ApiModelProperty(value = "用户编号", example = "666")
+ @Schema(description = "用户编号", example = "666")
private Long userId;
- @ApiModelProperty(value = "用户类型", example = "2")
+ @Schema(description = "用户类型", example = "2")
private Integer userType;
- @ApiModelProperty(value = "应用名", example = "dashboard")
+ @Schema(description = "应用名", example = "dashboard")
private String applicationName;
- @ApiModelProperty(value = "请求地址", example = "/xxx/yyy", notes = "模糊匹配")
+ @Schema(description = "请求地址,模糊匹配", example = "/xxx/yyy")
private String requestUrl;
- @ApiModelProperty(value = "开始时间", example = "[2022-07-01 00:00:00, 2022-07-01 23:59:59]")
+ @Schema(description = "开始时间", example = "[2022-07-01 00:00:00, 2022-07-01 23:59:59]")
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
private LocalDateTime[] beginTime;
- @ApiModelProperty(value = "执行时长", example = "100", notes = "大于等于,单位:毫秒")
+ @Schema(description = "执行时长,大于等于,单位:毫秒", example = "100")
private Integer duration;
- @ApiModelProperty(value = "结果码", example = "0")
+ @Schema(description = "结果码", example = "0")
private Integer resultCode;
-}
+}
\ No newline at end of file
diff --git a/yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/controller/admin/logger/vo/apiaccesslog/ApiAccessLogPageReqVO.java b/yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/controller/admin/logger/vo/apiaccesslog/ApiAccessLogPageReqVO.java
index a141a758b..31ca93e77 100644
--- a/yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/controller/admin/logger/vo/apiaccesslog/ApiAccessLogPageReqVO.java
+++ b/yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/controller/admin/logger/vo/apiaccesslog/ApiAccessLogPageReqVO.java
@@ -1,8 +1,8 @@
package cn.iocoder.yudao.module.infra.controller.admin.logger.vo.apiaccesslog;
import cn.iocoder.yudao.framework.common.pojo.PageParam;
-import io.swagger.annotations.ApiModel;
-import io.swagger.annotations.ApiModelProperty;
+import io.swagger.v3.oas.annotations.media.Schema;
+import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.ToString;
@@ -12,32 +12,32 @@ import java.time.LocalDateTime;
import static cn.iocoder.yudao.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND;
-@ApiModel("管理后台 - API 访问日志分页 Request VO")
+@Schema(description = "管理后台 - API 访问日志分页 Request VO")
@Data
@EqualsAndHashCode(callSuper = true)
@ToString(callSuper = true)
public class ApiAccessLogPageReqVO extends PageParam {
- @ApiModelProperty(value = "用户编号", example = "666")
+ @Schema(description = "用户编号", example = "666")
private Long userId;
- @ApiModelProperty(value = "用户类型", example = "2")
+ @Schema(description = "用户类型", example = "2")
private Integer userType;
- @ApiModelProperty(value = "应用名", example = "dashboard")
+ @Schema(description = "应用名", example = "dashboard")
private String applicationName;
- @ApiModelProperty(value = "请求地址", example = "/xxx/yyy", notes = "模糊匹配")
+ @Schema(description = "请求地址,模糊匹配", example = "/xxx/yyy")
private String requestUrl;
- @ApiModelProperty(value = "开始时间", example = "[2022-07-01 00:00:00, 2022-07-01 23:59:59]")
+ @Schema(description = "开始时间", example = "[2022-07-01 00:00:00, 2022-07-01 23:59:59]")
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
private LocalDateTime[] beginTime;
- @ApiModelProperty(value = "执行时长", example = "100", notes = "大于等于,单位:毫秒")
+ @Schema(description = "执行时长,大于等于,单位:毫秒", example = "100")
private Integer duration;
- @ApiModelProperty(value = "结果码", example = "0")
+ @Schema(description = "结果码", example = "0")
private Integer resultCode;
-}
+}
\ No newline at end of file
diff --git a/yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/controller/admin/logger/vo/apiaccesslog/ApiAccessLogRespVO.java b/yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/controller/admin/logger/vo/apiaccesslog/ApiAccessLogRespVO.java
index 2a6125d38..be4feb65e 100644
--- a/yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/controller/admin/logger/vo/apiaccesslog/ApiAccessLogRespVO.java
+++ b/yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/controller/admin/logger/vo/apiaccesslog/ApiAccessLogRespVO.java
@@ -1,23 +1,23 @@
package cn.iocoder.yudao.module.infra.controller.admin.logger.vo.apiaccesslog;
-import io.swagger.annotations.ApiModel;
-import io.swagger.annotations.ApiModelProperty;
+import io.swagger.v3.oas.annotations.media.Schema;
+import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.ToString;
import java.time.LocalDateTime;
-@ApiModel("管理后台 - API 访问日志 Response VO")
+@Schema(description = "管理后台 - API 访问日志 Response VO")
@Data
@EqualsAndHashCode(callSuper = true)
@ToString(callSuper = true)
public class ApiAccessLogRespVO extends ApiAccessLogBaseVO {
- @ApiModelProperty(value = "日志主键", required = true, example = "1024")
+ @Schema(description = "日志主键", required = true, example = "1024")
private Long id;
- @ApiModelProperty(value = "创建时间", required = true)
+ @Schema(description = "创建时间", required = true)
private LocalDateTime createTime;
-}
+}
\ No newline at end of file
diff --git a/yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/controller/admin/logger/vo/apierrorlog/ApiErrorLogBaseVO.java b/yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/controller/admin/logger/vo/apierrorlog/ApiErrorLogBaseVO.java
index ad0b44368..ae5448160 100644
--- a/yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/controller/admin/logger/vo/apierrorlog/ApiErrorLogBaseVO.java
+++ b/yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/controller/admin/logger/vo/apierrorlog/ApiErrorLogBaseVO.java
@@ -1,6 +1,6 @@
package cn.iocoder.yudao.module.infra.controller.admin.logger.vo.apierrorlog;
-import io.swagger.annotations.ApiModelProperty;
+import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;
@@ -16,81 +16,81 @@ import static cn.iocoder.yudao.framework.common.util.date.DateUtils.FORMAT_YEAR_
@Data
public class ApiErrorLogBaseVO {
- @ApiModelProperty(value = "链路追踪编号", required = true, example = "66600cb6-7852-11eb-9439-0242ac130002")
+ @Schema(description = "链路追踪编号", required = true, example = "66600cb6-7852-11eb-9439-0242ac130002")
@NotNull(message = "链路追踪编号不能为空")
private String traceId;
- @ApiModelProperty(value = "用户编号", required = true, example = "666")
+ @Schema(description = "用户编号", required = true, example = "666")
@NotNull(message = "用户编号不能为空")
private Integer userId;
- @ApiModelProperty(value = "用户类型", required = true, example = "1")
+ @Schema(description = "用户类型", required = true, example = "1")
@NotNull(message = "用户类型不能为空")
private Integer userType;
- @ApiModelProperty(value = "应用名", required = true, example = "dashboard")
+ @Schema(description = "应用名", required = true, example = "dashboard")
@NotNull(message = "应用名不能为空")
private String applicationName;
- @ApiModelProperty(value = "请求方法名", required = true, example = "GET")
+ @Schema(description = "请求方法名", required = true, example = "GET")
@NotNull(message = "请求方法名不能为空")
private String requestMethod;
- @ApiModelProperty(value = "请求地址", required = true, example = "/xx/yy")
+ @Schema(description = "请求地址", required = true, example = "/xx/yy")
@NotNull(message = "请求地址不能为空")
private String requestUrl;
- @ApiModelProperty(value = "请求参数", required = true)
+ @Schema(description = "请求参数", required = true)
@NotNull(message = "请求参数不能为空")
private String requestParams;
- @ApiModelProperty(value = "用户 IP", required = true, example = "127.0.0.1")
+ @Schema(description = "用户 IP", required = true, example = "127.0.0.1")
@NotNull(message = "用户 IP不能为空")
private String userIp;
- @ApiModelProperty(value = "浏览器 UA", required = true, example = "Mozilla/5.0")
+ @Schema(description = "浏览器 UA", required = true, example = "Mozilla/5.0")
@NotNull(message = "浏览器 UA不能为空")
private String userAgent;
- @ApiModelProperty(value = "异常发生时间", required = true)
+ @Schema(description = "异常发生时间", required = true)
@NotNull(message = "异常发生时间不能为空")
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
private LocalDateTime exceptionTime;
- @ApiModelProperty(value = "异常名", required = true)
+ @Schema(description = "异常名", required = true)
@NotNull(message = "异常名不能为空")
private String exceptionName;
- @ApiModelProperty(value = "异常导致的消息", required = true)
+ @Schema(description = "异常导致的消息", required = true)
@NotNull(message = "异常导致的消息不能为空")
private String exceptionMessage;
- @ApiModelProperty(value = "异常导致的根消息", required = true)
+ @Schema(description = "异常导致的根消息", required = true)
@NotNull(message = "异常导致的根消息不能为空")
private String exceptionRootCauseMessage;
- @ApiModelProperty(value = "异常的栈轨迹", required = true)
+ @Schema(description = "异常的栈轨迹", required = true)
@NotNull(message = "异常的栈轨迹不能为空")
private String exceptionStackTrace;
- @ApiModelProperty(value = "异常发生的类全名", required = true)
+ @Schema(description = "异常发生的类全名", required = true)
@NotNull(message = "异常发生的类全名不能为空")
private String exceptionClassName;
- @ApiModelProperty(value = "异常发生的类文件", required = true)
+ @Schema(description = "异常发生的类文件", required = true)
@NotNull(message = "异常发生的类文件不能为空")
private String exceptionFileName;
- @ApiModelProperty(value = "异常发生的方法名", required = true)
+ @Schema(description = "异常发生的方法名", required = true)
@NotNull(message = "异常发生的方法名不能为空")
private String exceptionMethodName;
- @ApiModelProperty(value = "异常发生的方法所在行", required = true)
+ @Schema(description = "异常发生的方法所在行", required = true)
@NotNull(message = "异常发生的方法所在行不能为空")
private Integer exceptionLineNumber;
- @ApiModelProperty(value = "处理状态", required = true, example = "0")
+ @Schema(description = "处理状态", required = true, example = "0")
@NotNull(message = "处理状态不能为空")
private Integer processStatus;
-}
+}
\ No newline at end of file
diff --git a/yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/controller/admin/logger/vo/apierrorlog/ApiErrorLogExportReqVO.java b/yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/controller/admin/logger/vo/apierrorlog/ApiErrorLogExportReqVO.java
index e2c241138..c618d2f5c 100644
--- a/yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/controller/admin/logger/vo/apierrorlog/ApiErrorLogExportReqVO.java
+++ b/yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/controller/admin/logger/vo/apierrorlog/ApiErrorLogExportReqVO.java
@@ -1,7 +1,7 @@
package cn.iocoder.yudao.module.infra.controller.admin.logger.vo.apierrorlog;
-import io.swagger.annotations.ApiModel;
-import io.swagger.annotations.ApiModelProperty;
+import io.swagger.v3.oas.annotations.media.Schema;
+import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;
@@ -9,27 +9,27 @@ import java.time.LocalDateTime;
import static cn.iocoder.yudao.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND;
-@ApiModel(value = "管理后台 - API 错误日志 Excel 导出 Request VO", description = "参数和 ApiErrorLogPageReqVO 是一致的")
+@Schema(description = "管理后台 - API 错误日志 Excel 导出 Request VO,参数和 ApiErrorLogPageReqVO 是一致的")
@Data
public class ApiErrorLogExportReqVO {
- @ApiModelProperty(value = "用户编号", example = "666")
+ @Schema(description = "用户编号", example = "666")
private Long userId;
- @ApiModelProperty(value = "用户类型", example = "1")
+ @Schema(description = "用户类型", example = "1")
private Integer userType;
- @ApiModelProperty(value = "应用名", example = "dashboard")
+ @Schema(description = "应用名", example = "dashboard")
private String applicationName;
- @ApiModelProperty(value = "请求地址", example = "/xx/yy")
+ @Schema(description = "请求地址", example = "/xx/yy")
private String requestUrl;
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
- @ApiModelProperty(value = "异常发生时间")
+ @Schema(description = "异常发生时间")
private LocalDateTime[] exceptionTime;
- @ApiModelProperty(value = "处理状态", example = "0")
+ @Schema(description = "处理状态", example = "0")
private Integer processStatus;
-}
+}
\ No newline at end of file
diff --git a/yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/controller/admin/logger/vo/apierrorlog/ApiErrorLogPageReqVO.java b/yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/controller/admin/logger/vo/apierrorlog/ApiErrorLogPageReqVO.java
index 56496325d..e29cfdbad 100644
--- a/yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/controller/admin/logger/vo/apierrorlog/ApiErrorLogPageReqVO.java
+++ b/yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/controller/admin/logger/vo/apierrorlog/ApiErrorLogPageReqVO.java
@@ -1,8 +1,8 @@
package cn.iocoder.yudao.module.infra.controller.admin.logger.vo.apierrorlog;
import cn.iocoder.yudao.framework.common.pojo.PageParam;
-import io.swagger.annotations.ApiModel;
-import io.swagger.annotations.ApiModelProperty;
+import io.swagger.v3.oas.annotations.media.Schema;
+import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.ToString;
@@ -12,29 +12,29 @@ import java.time.LocalDateTime;
import static cn.iocoder.yudao.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND;
-@ApiModel("管理后台 - API 错误日志分页 Request VO")
+@Schema(description = "管理后台 - API 错误日志分页 Request VO")
@Data
@EqualsAndHashCode(callSuper = true)
@ToString(callSuper = true)
public class ApiErrorLogPageReqVO extends PageParam {
- @ApiModelProperty(value = "用户编号", example = "666")
+ @Schema(description = "用户编号", example = "666")
private Long userId;
- @ApiModelProperty(value = "用户类型", example = "1")
+ @Schema(description = "用户类型", example = "1")
private Integer userType;
- @ApiModelProperty(value = "应用名", example = "dashboard")
+ @Schema(description = "应用名", example = "dashboard")
private String applicationName;
- @ApiModelProperty(value = "请求地址", example = "/xx/yy")
+ @Schema(description = "请求地址", example = "/xx/yy")
private String requestUrl;
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
- @ApiModelProperty(value = "异常发生时间")
+ @Schema(description = "异常发生时间")
private LocalDateTime[] exceptionTime;
- @ApiModelProperty(value = "处理状态", example = "0")
+ @Schema(description = "处理状态", example = "0")
private Integer processStatus;
-}
+}
\ No newline at end of file
diff --git a/yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/controller/admin/logger/vo/apierrorlog/ApiErrorLogRespVO.java b/yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/controller/admin/logger/vo/apierrorlog/ApiErrorLogRespVO.java
index c108b548c..899d3c877 100644
--- a/yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/controller/admin/logger/vo/apierrorlog/ApiErrorLogRespVO.java
+++ b/yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/controller/admin/logger/vo/apierrorlog/ApiErrorLogRespVO.java
@@ -1,29 +1,29 @@
package cn.iocoder.yudao.module.infra.controller.admin.logger.vo.apierrorlog;
-import io.swagger.annotations.ApiModel;
-import io.swagger.annotations.ApiModelProperty;
+import io.swagger.v3.oas.annotations.media.Schema;
+import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.ToString;
import java.time.LocalDateTime;
-@ApiModel("管理后台 - API 错误日志 Response VO")
+@Schema(description = "管理后台 - API 错误日志 Response VO")
@Data
@EqualsAndHashCode(callSuper = true)
@ToString(callSuper = true)
public class ApiErrorLogRespVO extends ApiErrorLogBaseVO {
- @ApiModelProperty(value = "编号", required = true, example = "1024")
+ @Schema(description = "编号", required = true, example = "1024")
private Integer id;
- @ApiModelProperty(value = "创建时间", required = true)
+ @Schema(description = "创建时间", required = true)
private LocalDateTime createTime;
- @ApiModelProperty(value = "处理时间", required = true)
+ @Schema(description = "处理时间", required = true)
private LocalDateTime processTime;
- @ApiModelProperty(value = "处理用户编号", example = "233")
+ @Schema(description = "处理用户编号", example = "233")
private Integer processUserId;
-}
+}
\ No newline at end of file
diff --git a/yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/controller/admin/redis/RedisController.java b/yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/controller/admin/redis/RedisController.java
index 7d53c7332..56eec47cc 100644
--- a/yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/controller/admin/redis/RedisController.java
+++ b/yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/controller/admin/redis/RedisController.java
@@ -9,9 +9,9 @@ import cn.iocoder.yudao.module.infra.controller.admin.redis.vo.RedisKeyDefineRes
import cn.iocoder.yudao.module.infra.controller.admin.redis.vo.RedisKeyValueRespVO;
import cn.iocoder.yudao.module.infra.controller.admin.redis.vo.RedisMonitorRespVO;
import cn.iocoder.yudao.module.infra.convert.redis.RedisConvert;
-import io.swagger.annotations.Api;
-import io.swagger.annotations.ApiImplicitParam;
-import io.swagger.annotations.ApiOperation;
+import io.swagger.v3.oas.annotations.tags.Tag;
+import io.swagger.v3.oas.annotations.Parameter;
+import io.swagger.v3.oas.annotations.Operation;
import org.springframework.data.redis.connection.RedisServerCommands;
import org.springframework.data.redis.core.Cursor;
import org.springframework.data.redis.core.RedisCallback;
@@ -28,7 +28,7 @@ import java.util.Set;
import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success;
-@Api(tags = "管理后台 - Redis 监控")
+@Tag(name = "管理后台 - Redis 监控")
@RestController
@RequestMapping("/infra/redis")
public class RedisController {
@@ -37,7 +37,7 @@ public class RedisController {
private StringRedisTemplate stringRedisTemplate;
@GetMapping("/get-monitor-info")
- @ApiOperation("获得 Redis 监控信息")
+ @Operation(summary = "获得 Redis 监控信息")
@PreAuthorize("@ss.hasPermission('infra:redis:get-monitor-info')")
public CommonResult getRedisMonitorInfo() {
// 获得 Redis 统计信息
@@ -51,7 +51,7 @@ public class RedisController {
}
@GetMapping("/get-key-define-list")
- @ApiOperation("获得 Redis Key 模板列表")
+ @Operation(summary = "获得 Redis Key 模板列表")
@PreAuthorize("@ss.hasPermission('infra:redis:get-key-list')")
public CommonResult> getKeyDefineList() {
List keyDefines = RedisKeyRegistry.list();
@@ -59,8 +59,8 @@ public class RedisController {
}
@GetMapping("/get-key-list")
- @ApiOperation("获得 Redis keys 键名列表")
- @ApiImplicitParam(name = "keyTemplate", value = "Redis Key 定义", example = "true", dataTypeClass = String.class)
+ @Operation(summary = "获得 Redis keys 键名列表")
+ @Parameter(name = "keyTemplate", description = "Redis Key 定义", example = "true")
@PreAuthorize("@ss.hasPermission('infra:redis:get-key-list')")
public CommonResult> getKeyDefineList(@RequestParam("keyTemplate") String keyTemplate) {
return success(getKeyDefineList0(keyTemplate));
@@ -83,8 +83,8 @@ public class RedisController {
}
@GetMapping("/get-key-value")
- @ApiOperation("获得 Redis key 内容")
- @ApiImplicitParam(name = "key", value = "Redis Key", example = "oauth2_access_token:233", dataTypeClass = String.class)
+ @Operation(summary = "获得 Redis key 内容")
+ @Parameter(name = "key", description = "Redis Key", example = "oauth2_access_token:233")
@PreAuthorize("@ss.hasPermission('infra:redis:get-key-list')")
public CommonResult getKeyValue(@RequestParam("key") String key) {
String value = stringRedisTemplate.opsForValue().get(key);
@@ -92,8 +92,8 @@ public class RedisController {
}
@DeleteMapping("/delete-key")
- @ApiOperation("删除 Redis Key")
- @ApiImplicitParam(name = "key", value = "Redis Key", example = "oauth2_access_token:233", dataTypeClass = String.class)
+ @Operation(summary = "删除 Redis Key")
+ @Parameter(name = "key", description = "Redis Key", example = "oauth2_access_token:233")
@PreAuthorize("@ss.hasPermission('infra:redis:get-key-list')")
public CommonResult deleteKey(@RequestParam("key") String key) {
stringRedisTemplate.delete(key);
@@ -101,8 +101,8 @@ public class RedisController {
}
@DeleteMapping("/delete-keys")
- @ApiOperation("删除 Redis Key 根据模板")
- @ApiImplicitParam(name = "keyTemplate", value = "Redis Key 定义", example = "true", dataTypeClass = String.class)
+ @Operation(summary = "删除 Redis Key 根据模板")
+ @Parameter(name = "keyTemplate", description = "Redis Key 定义", example = "true")
@PreAuthorize("@ss.hasPermission('infra:redis:get-key-list')")
public CommonResult deleteKeys(@RequestParam("keyTemplate") String keyTemplate) {
Set keys = getKeyDefineList0(keyTemplate);
@@ -112,4 +112,4 @@ public class RedisController {
return success(Boolean.TRUE);
}
-}
+}
\ No newline at end of file
diff --git a/yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/controller/admin/redis/vo/RedisKeyDefineRespVO.java b/yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/controller/admin/redis/vo/RedisKeyDefineRespVO.java
index 4c1b5acd8..82e88d740 100644
--- a/yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/controller/admin/redis/vo/RedisKeyDefineRespVO.java
+++ b/yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/controller/admin/redis/vo/RedisKeyDefineRespVO.java
@@ -1,36 +1,36 @@
package cn.iocoder.yudao.module.infra.controller.admin.redis.vo;
import cn.iocoder.yudao.framework.redis.core.RedisKeyDefine;
-import io.swagger.annotations.ApiModel;
-import io.swagger.annotations.ApiModelProperty;
+import io.swagger.v3.oas.annotations.media.Schema;
+import io.swagger.v3.oas.annotations.media.Schema;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import java.time.Duration;
-@ApiModel("管理后台 - Redis Key 信息 Response VO")
+@Schema(description = "管理后台 - Redis Key 信息 Response VO")
@Data
@Builder
@AllArgsConstructor
public class RedisKeyDefineRespVO {
- @ApiModelProperty(value = "Key 模板", required = true, example = "login_user:%s")
+ @Schema(description = "Key 模板", required = true, example = "login_user:%s")
private String keyTemplate;
- @ApiModelProperty(value = "Key 类型的枚举", required = true, example = "String")
+ @Schema(description = "Key 类型的枚举", required = true, example = "String")
private RedisKeyDefine.KeyTypeEnum keyType;
- @ApiModelProperty(value = "Value 类型", required = true, example = "java.lang.String")
+ @Schema(description = "Value 类型", required = true, example = "java.lang.String")
private Class> valueType;
- @ApiModelProperty(value = "超时类型", required = true, example = "1")
+ @Schema(description = "超时类型", required = true, example = "1")
private RedisKeyDefine.TimeoutTypeEnum timeoutType;
- @ApiModelProperty(value = "过期时间,单位:毫秒", required = true, example = "1024")
+ @Schema(description = "过期时间,单位:毫秒", required = true, example = "1024")
private Duration timeout;
- @ApiModelProperty(value = "备注", required = true, example = "啦啦啦啦~")
+ @Schema(description = "备注", required = true, example = "啦啦啦啦~")
private String memo;
-}
+}
\ No newline at end of file
diff --git a/yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/controller/admin/redis/vo/RedisKeyRespVO.java b/yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/controller/admin/redis/vo/RedisKeyRespVO.java
index 6fb71fe9a..bcb5b820f 100644
--- a/yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/controller/admin/redis/vo/RedisKeyRespVO.java
+++ b/yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/controller/admin/redis/vo/RedisKeyRespVO.java
@@ -1,36 +1,36 @@
package cn.iocoder.yudao.module.infra.controller.admin.redis.vo;
import cn.iocoder.yudao.framework.redis.core.RedisKeyDefine;
-import io.swagger.annotations.ApiModel;
-import io.swagger.annotations.ApiModelProperty;
+import io.swagger.v3.oas.annotations.media.Schema;
+import io.swagger.v3.oas.annotations.media.Schema;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import java.time.Duration;
-@ApiModel("管理后台 - Redis Key 信息 Response VO")
+@Schema(description = "管理后台 - Redis Key 信息 Response VO")
@Data
@Builder
@AllArgsConstructor
public class RedisKeyRespVO {
- @ApiModelProperty(value = "login_user:%s", required = true, example = "String")
+ @Schema(description = "login_user:%s", required = true, example = "String")
private String keyTemplate;
- @ApiModelProperty(value = "Key 类型的枚举", required = true, example = "String")
+ @Schema(description = "Key 类型的枚举", required = true, example = "String")
private RedisKeyDefine.KeyTypeEnum keyType;
- @ApiModelProperty(value = "Value 类型", required = true, example = "java.lang.String")
+ @Schema(description = "Value 类型", required = true, example = "java.lang.String")
private Class> valueType;
- @ApiModelProperty(value = "超时类型", required = true, example = "1")
+ @Schema(description = "超时类型", required = true, example = "1")
private RedisKeyDefine.TimeoutTypeEnum timeoutType;
- @ApiModelProperty(value = "过期时间,单位:毫秒", required = true, example = "1024")
+ @Schema(description = "过期时间,单位:毫秒", required = true, example = "1024")
private Duration timeout;
- @ApiModelProperty(value = "备注", required = true, example = "啦啦啦啦~")
+ @Schema(description = "备注", required = true, example = "啦啦啦啦~")
private String memo;
-}
+}
\ No newline at end of file
diff --git a/yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/controller/admin/redis/vo/RedisKeyValueRespVO.java b/yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/controller/admin/redis/vo/RedisKeyValueRespVO.java
index 0f16f0640..52075abc1 100644
--- a/yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/controller/admin/redis/vo/RedisKeyValueRespVO.java
+++ b/yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/controller/admin/redis/vo/RedisKeyValueRespVO.java
@@ -1,19 +1,19 @@
package cn.iocoder.yudao.module.infra.controller.admin.redis.vo;
-import io.swagger.annotations.ApiModel;
-import io.swagger.annotations.ApiModelProperty;
+import io.swagger.v3.oas.annotations.media.Schema;
+import io.swagger.v3.oas.annotations.media.Schema;
import lombok.AllArgsConstructor;
import lombok.Data;
-@ApiModel("管理后台 - 单个 Redis Key Value Response VO")
+@Schema(description = "管理后台 - 单个 Redis Key Value Response VO")
@Data
@AllArgsConstructor
public class RedisKeyValueRespVO {
- @ApiModelProperty(value = "c5f6990767804a928f4bb96ca249febf", required = true, example = "String")
+ @Schema(description = "c5f6990767804a928f4bb96ca249febf", required = true, example = "String")
private String key;
- @ApiModelProperty(required = true, example = "String")
+ @Schema(required = true, example = "String")
private String value;
-}
+}
\ No newline at end of file
diff --git a/yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/controller/admin/redis/vo/RedisMonitorRespVO.java b/yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/controller/admin/redis/vo/RedisMonitorRespVO.java
index 703a697dc..51a91b23f 100644
--- a/yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/controller/admin/redis/vo/RedisMonitorRespVO.java
+++ b/yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/controller/admin/redis/vo/RedisMonitorRespVO.java
@@ -1,7 +1,7 @@
package cn.iocoder.yudao.module.infra.controller.admin.redis.vo;
-import io.swagger.annotations.ApiModel;
-import io.swagger.annotations.ApiModelProperty;
+import io.swagger.v3.oas.annotations.media.Schema;
+import io.swagger.v3.oas.annotations.media.Schema;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
@@ -9,36 +9,36 @@ import lombok.Data;
import java.util.List;
import java.util.Properties;
-@ApiModel("管理后台 - Redis 监控信息 Response VO")
+@Schema(description = "管理后台 - Redis 监控信息 Response VO")
@Data
@Builder
@AllArgsConstructor
public class RedisMonitorRespVO {
- @ApiModelProperty(value = "Redis info 指令结果", required = true, notes = "具体字段,查看 Redis 文档")
+ @Schema(description = "Redis info 指令结果,具体字段,查看 Redis 文档", required = true)
private Properties info;
- @ApiModelProperty(value = "Redis key 数量", required = true, example = "1024")
+ @Schema(description = "Redis key 数量", required = true, example = "1024")
private Long dbSize;
- @ApiModelProperty(value = "CommandStat 数组", required = true)
+ @Schema(description = "CommandStat 数组", required = true)
private List commandStats;
- @ApiModel("Redis 命令统计结果")
+ @Schema(description = "Redis 命令统计结果")
@Data
@Builder
@AllArgsConstructor
public static class CommandStat {
- @ApiModelProperty(value = "Redis 命令", required = true, example = "get")
+ @Schema(description = "Redis 命令", required = true, example = "get")
private String command;
- @ApiModelProperty(value = "调用次数", required = true, example = "1024")
+ @Schema(description = "调用次数", required = true, example = "1024")
private Integer calls;
- @ApiModelProperty(value = "消耗 CPU 秒数", required = true, example = "666")
+ @Schema(description = "消耗 CPU 秒数", required = true, example = "666")
private Long usec;
}
-}
+}
\ No newline at end of file
diff --git a/yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/controller/admin/test/TestDemoController.java b/yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/controller/admin/test/TestDemoController.java
index a534b7daf..8bf3dd3f2 100755
--- a/yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/controller/admin/test/TestDemoController.java
+++ b/yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/controller/admin/test/TestDemoController.java
@@ -8,9 +8,9 @@ import cn.iocoder.yudao.module.infra.controller.admin.test.vo.*;
import cn.iocoder.yudao.module.infra.convert.test.TestDemoConvert;
import cn.iocoder.yudao.module.infra.dal.dataobject.test.TestDemoDO;
import cn.iocoder.yudao.module.infra.service.test.TestDemoService;
-import io.swagger.annotations.Api;
-import io.swagger.annotations.ApiImplicitParam;
-import io.swagger.annotations.ApiOperation;
+import io.swagger.v3.oas.annotations.tags.Tag;
+import io.swagger.v3.oas.annotations.Parameter;
+import io.swagger.v3.oas.annotations.Operation;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.*;
@@ -25,7 +25,7 @@ import java.util.List;
import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success;
import static cn.iocoder.yudao.framework.operatelog.core.enums.OperateTypeEnum.EXPORT;
-@Api(tags = "管理后台 - 字典类型")
+@Tag(name = "管理后台 - 字典类型")
@RestController
@RequestMapping("/infra/test-demo")
@Validated
@@ -35,14 +35,14 @@ public class TestDemoController {
private TestDemoService testDemoService;
@PostMapping("/create")
- @ApiOperation("创建字典类型")
+ @Operation(summary = "创建字典类型")
@PreAuthorize("@ss.hasPermission('infra:test-demo:create')")
public CommonResult createTestDemo(@Valid @RequestBody TestDemoCreateReqVO createReqVO) {
return success(testDemoService.createTestDemo(createReqVO));
}
@PutMapping("/update")
- @ApiOperation("更新字典类型")
+ @Operation(summary = "更新字典类型")
@PreAuthorize("@ss.hasPermission('infra:test-demo:update')")
public CommonResult updateTestDemo(@Valid @RequestBody TestDemoUpdateReqVO updateReqVO) {
testDemoService.updateTestDemo(updateReqVO);
@@ -50,8 +50,8 @@ public class TestDemoController {
}
@DeleteMapping("/delete")
- @ApiOperation("删除字典类型")
- @ApiImplicitParam(name = "id", value = "编号", required = true, dataTypeClass = Long.class)
+ @Operation(summary = "删除字典类型")
+ @Parameter(name = "id", description = "编号", required = true)
@PreAuthorize("@ss.hasPermission('infra:test-demo:delete')")
public CommonResult deleteTestDemo(@RequestParam("id") Long id) {
testDemoService.deleteTestDemo(id);
@@ -59,8 +59,8 @@ public class TestDemoController {
}
@GetMapping("/get")
- @ApiOperation("获得字典类型")
- @ApiImplicitParam(name = "id", value = "编号", required = true, example = "1024", dataTypeClass = Long.class)
+ @Operation(summary = "获得字典类型")
+ @Parameter(name = "id", description = "编号", required = true, example = "1024")
@PreAuthorize("@ss.hasPermission('infra:test-demo:query')")
public CommonResult getTestDemo(@RequestParam("id") Long id) {
TestDemoDO testDemo = testDemoService.getTestDemo(id);
@@ -68,8 +68,8 @@ public class TestDemoController {
}
@GetMapping("/list")
- @ApiOperation("获得字典类型列表")
- @ApiImplicitParam(name = "ids", value = "编号列表", required = true, example = "1024,2048", dataTypeClass = List.class)
+ @Operation(summary = "获得字典类型列表")
+ @Parameter(name = "ids", description = "编号列表", required = true, example = "1024,2048")
@PreAuthorize("@ss.hasPermission('infra:test-demo:query')")
public CommonResult> getTestDemoList(@RequestParam("ids") Collection ids) {
List list = testDemoService.getTestDemoList(ids);
@@ -77,14 +77,14 @@ public class TestDemoController {
}
@GetMapping("/page")
- @ApiOperation("获得字典类型分页")
+ @Operation(summary = "获得字典类型分页")
@PreAuthorize("@ss.hasPermission('infra:test-demo:query')") public CommonResult> getTestDemoPage(@Valid TestDemoPageReqVO pageVO) {
PageResult pageResult = testDemoService.getTestDemoPage(pageVO);
return success(TestDemoConvert.INSTANCE.convertPage(pageResult));
}
@GetMapping("/export-excel")
- @ApiOperation("导出字典类型 Excel")
+ @Operation(summary = "导出字典类型 Excel")
@PreAuthorize("@ss.hasPermission('infra:test-demo:export')") @OperateLog(type = EXPORT)
public void exportTestDemoExcel(@Valid TestDemoExportReqVO exportReqVO,
HttpServletResponse response) throws IOException {
@@ -94,4 +94,4 @@ public class TestDemoController {
ExcelUtils.write(response, "字典类型.xls", "数据", TestDemoExcelVO.class, datas);
}
-}
+}
\ No newline at end of file
diff --git a/yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/controller/admin/test/vo/TestDemoBaseVO.java b/yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/controller/admin/test/vo/TestDemoBaseVO.java
index 1f657938e..fcc5c0761 100755
--- a/yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/controller/admin/test/vo/TestDemoBaseVO.java
+++ b/yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/controller/admin/test/vo/TestDemoBaseVO.java
@@ -1,8 +1,7 @@
package cn.iocoder.yudao.module.infra.controller.admin.test.vo;
+import io.swagger.v3.oas.annotations.media.Schema;
import lombok.*;
-import java.util.*;
-import io.swagger.annotations.*;
import javax.validation.constraints.*;
/**
@@ -12,23 +11,23 @@ import javax.validation.constraints.*;
@Data
public class TestDemoBaseVO {
- @ApiModelProperty(value = "名字", required = true)
+ @Schema(description = "名字", required = true)
@NotNull(message = "名字不能为空")
private String name;
- @ApiModelProperty(value = "状态", required = true)
+ @Schema(description = "状态", required = true)
@NotNull(message = "状态不能为空")
private Integer status;
- @ApiModelProperty(value = "类型", required = true)
+ @Schema(description = "类型", required = true)
@NotNull(message = "类型不能为空")
private Integer type;
- @ApiModelProperty(value = "分类", required = true)
+ @Schema(description = "分类", required = true)
@NotNull(message = "分类不能为空")
private Integer category;
- @ApiModelProperty(value = "备注")
+ @Schema(description = "备注")
private String remark;
-}
+}
\ No newline at end of file
diff --git a/yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/controller/admin/test/vo/TestDemoCreateReqVO.java b/yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/controller/admin/test/vo/TestDemoCreateReqVO.java
index d932daac6..2f84f6376 100755
--- a/yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/controller/admin/test/vo/TestDemoCreateReqVO.java
+++ b/yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/controller/admin/test/vo/TestDemoCreateReqVO.java
@@ -1,12 +1,12 @@
package cn.iocoder.yudao.module.infra.controller.admin.test.vo;
+import io.swagger.v3.oas.annotations.media.Schema;
import lombok.*;
-import io.swagger.annotations.*;
-@ApiModel("管理后台 - 字典类型创建 Request VO")
+@Schema(description = "管理后台 - 字典类型创建 Request VO")
@Data
@EqualsAndHashCode(callSuper = true)
@ToString(callSuper = true)
public class TestDemoCreateReqVO extends TestDemoBaseVO {
-}
+}
\ No newline at end of file
diff --git a/yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/controller/admin/test/vo/TestDemoExcelVO.java b/yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/controller/admin/test/vo/TestDemoExcelVO.java
index d255c86d5..be94c31d7 100755
--- a/yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/controller/admin/test/vo/TestDemoExcelVO.java
+++ b/yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/controller/admin/test/vo/TestDemoExcelVO.java
@@ -3,8 +3,6 @@ package cn.iocoder.yudao.module.infra.controller.admin.test.vo;
import lombok.*;
import java.time.LocalDateTime;
-import java.util.*;
-import io.swagger.annotations.*;
import com.alibaba.excel.annotation.ExcelProperty;
@@ -37,4 +35,4 @@ public class TestDemoExcelVO {
@ExcelProperty("创建时间")
private LocalDateTime createTime;
-}
+}
\ No newline at end of file
diff --git a/yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/controller/admin/test/vo/TestDemoExportReqVO.java b/yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/controller/admin/test/vo/TestDemoExportReqVO.java
index c685bffa7..115d92aef 100755
--- a/yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/controller/admin/test/vo/TestDemoExportReqVO.java
+++ b/yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/controller/admin/test/vo/TestDemoExportReqVO.java
@@ -1,7 +1,7 @@
package cn.iocoder.yudao.module.infra.controller.admin.test.vo;
-import io.swagger.annotations.ApiModel;
-import io.swagger.annotations.ApiModelProperty;
+import io.swagger.v3.oas.annotations.media.Schema;
+import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;
@@ -9,27 +9,27 @@ import java.time.LocalDateTime;
import static cn.iocoder.yudao.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND;
-@ApiModel(value = "管理后台 - 字典类型 Excel 导出 Request VO", description = "参数和 TestDemoPageReqVO 是一致的")
+@Schema(description = "管理后台 - 字典类型 Excel 导出 Request VO,参数和 TestDemoPageReqVO 是一致的")
@Data
public class TestDemoExportReqVO {
- @ApiModelProperty(value = "名字")
+ @Schema(description = "名字")
private String name;
- @ApiModelProperty(value = "状态")
+ @Schema(description = "状态")
private Integer status;
- @ApiModelProperty(value = "类型")
+ @Schema(description = "类型")
private Integer type;
- @ApiModelProperty(value = "分类")
+ @Schema(description = "分类")
private Integer category;
- @ApiModelProperty(value = "备注")
+ @Schema(description = "备注")
private String remark;
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
- @ApiModelProperty(value = "创建时间")
+ @Schema(description = "创建时间")
private LocalDateTime[] createTime;
-}
+}
\ No newline at end of file
diff --git a/yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/controller/admin/test/vo/TestDemoPageReqVO.java b/yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/controller/admin/test/vo/TestDemoPageReqVO.java
index be68e57a6..88040176f 100755
--- a/yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/controller/admin/test/vo/TestDemoPageReqVO.java
+++ b/yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/controller/admin/test/vo/TestDemoPageReqVO.java
@@ -1,8 +1,8 @@
package cn.iocoder.yudao.module.infra.controller.admin.test.vo;
import cn.iocoder.yudao.framework.common.pojo.PageParam;
-import io.swagger.annotations.ApiModel;
-import io.swagger.annotations.ApiModelProperty;
+import io.swagger.v3.oas.annotations.media.Schema;
+import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.ToString;
@@ -12,29 +12,29 @@ import java.time.LocalDateTime;
import static cn.iocoder.yudao.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND;
-@ApiModel("管理后台 - 字典类型分页 Request VO")
+@Schema(description = "管理后台 - 字典类型分页 Request VO")
@Data
@EqualsAndHashCode(callSuper = true)
@ToString(callSuper = true)
public class TestDemoPageReqVO extends PageParam {
- @ApiModelProperty(value = "名字")
+ @Schema(description = "名字")
private String name;
- @ApiModelProperty(value = "状态")
+ @Schema(description = "状态")
private Integer status;
- @ApiModelProperty(value = "类型")
+ @Schema(description = "类型")
private Integer type;
- @ApiModelProperty(value = "分类")
+ @Schema(description = "分类")
private Integer category;
- @ApiModelProperty(value = "备注")
+ @Schema(description = "备注")
private String remark;
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
- @ApiModelProperty(value = "创建时间")
+ @Schema(description = "创建时间")
private LocalDateTime[] createTime;
-}
+}
\ No newline at end of file
diff --git a/yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/controller/admin/test/vo/TestDemoRespVO.java b/yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/controller/admin/test/vo/TestDemoRespVO.java
index 93f5aecca..a76fdb425 100755
--- a/yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/controller/admin/test/vo/TestDemoRespVO.java
+++ b/yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/controller/admin/test/vo/TestDemoRespVO.java
@@ -1,23 +1,23 @@
package cn.iocoder.yudao.module.infra.controller.admin.test.vo;
-import io.swagger.annotations.ApiModel;
-import io.swagger.annotations.ApiModelProperty;
+import io.swagger.v3.oas.annotations.media.Schema;
+import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.ToString;
import java.time.LocalDateTime;
-@ApiModel("管理后台 - 字典类型 Response VO")
+@Schema(description = "管理后台 - 字典类型 Response VO")
@Data
@EqualsAndHashCode(callSuper = true)
@ToString(callSuper = true)
public class TestDemoRespVO extends TestDemoBaseVO {
- @ApiModelProperty(value = "编号", required = true)
+ @Schema(description = "编号", required = true)
private Long id;
- @ApiModelProperty(value = "创建时间", required = true)
+ @Schema(description = "创建时间", required = true)
private LocalDateTime createTime;
-}
+}
\ No newline at end of file
diff --git a/yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/controller/admin/test/vo/TestDemoUpdateReqVO.java b/yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/controller/admin/test/vo/TestDemoUpdateReqVO.java
index 59d56b4da..12765e561 100755
--- a/yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/controller/admin/test/vo/TestDemoUpdateReqVO.java
+++ b/yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/controller/admin/test/vo/TestDemoUpdateReqVO.java
@@ -1,17 +1,17 @@
package cn.iocoder.yudao.module.infra.controller.admin.test.vo;
+import io.swagger.v3.oas.annotations.media.Schema;
import lombok.*;
-import io.swagger.annotations.*;
import javax.validation.constraints.*;
-@ApiModel("管理后台 - 字典类型更新 Request VO")
+@Schema(description = "管理后台 - 字典类型更新 Request VO")
@Data
@EqualsAndHashCode(callSuper = true)
@ToString(callSuper = true)
public class TestDemoUpdateReqVO extends TestDemoBaseVO {
- @ApiModelProperty(value = "编号", required = true)
+ @Schema(description = "编号", required = true)
@NotNull(message = "编号不能为空")
private Long id;
-}
+}
\ No newline at end of file
diff --git a/yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/framework/security/config/SecurityConfiguration.java b/yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/framework/security/config/SecurityConfiguration.java
index 01ee55124..c5b947e11 100644
--- a/yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/framework/security/config/SecurityConfiguration.java
+++ b/yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/framework/security/config/SecurityConfiguration.java
@@ -24,10 +24,8 @@ public class SecurityConfiguration {
@Override
public void customize(ExpressionUrlAuthorizationConfigurer.ExpressionInterceptUrlRegistry registry) {
// Swagger 接口文档
- registry.antMatchers("/swagger-ui.html").anonymous()
- .antMatchers("/swagger-resources/**").anonymous()
- .antMatchers("/webjars/**").anonymous()
- .antMatchers("/*/api-docs").anonymous();
+ registry.antMatchers("/v3/api-docs/**").permitAll() // 元数据
+ .antMatchers("/swagger-ui.html").permitAll(); // Swagger UI
// Spring Boot Actuator 的安全配置
registry.antMatchers("/actuator").anonymous()
.antMatchers("/actuator/**").anonymous();
diff --git a/yudao-module-infra/yudao-module-infra-biz/src/main/resources/application.yaml b/yudao-module-infra/yudao-module-infra-biz/src/main/resources/application.yaml
index a996095e7..3cd28d3f3 100644
--- a/yudao-module-infra/yudao-module-infra-biz/src/main/resources/application.yaml
+++ b/yudao-module-infra/yudao-module-infra-biz/src/main/resources/application.yaml
@@ -27,6 +27,21 @@ spring:
redis:
time-to-live: 1h # 设置过期时间为 1 小时
+--- #################### 接口文档配置 ####################
+
+springdoc:
+ api-docs:
+ enabled: true # 1. 是否开启 Swagger 接文档的元数据
+ path: /v3/api-docs
+ swagger-ui:
+ enabled: true # 2.1 是否开启 Swagger 文档的官方 UI 界面
+ path: /swagger-ui.html
+
+knife4j:
+ enable: true # 2.2 是否开启 Swagger 文档的 Knife4j UI 界面
+ setting:
+ language: zh_cn
+
# MyBatis Plus 的配置项
mybatis-plus:
configuration:
diff --git a/yudao-module-report/yudao-module-report-biz/src/main/java/cn/iocoder/yudao/module/report/framework/security/config/SecurityConfiguration.java b/yudao-module-report/yudao-module-report-biz/src/main/java/cn/iocoder/yudao/module/report/framework/security/config/SecurityConfiguration.java
index e481133b8..05b009661 100644
--- a/yudao-module-report/yudao-module-report-biz/src/main/java/cn/iocoder/yudao/module/report/framework/security/config/SecurityConfiguration.java
+++ b/yudao-module-report/yudao-module-report-biz/src/main/java/cn/iocoder/yudao/module/report/framework/security/config/SecurityConfiguration.java
@@ -19,10 +19,8 @@ public class SecurityConfiguration {
@Override
public void customize(ExpressionUrlAuthorizationConfigurer.ExpressionInterceptUrlRegistry registry) {
// Swagger 接口文档
- registry.antMatchers("/swagger-ui.html").anonymous()
- .antMatchers("/swagger-resources/**").anonymous()
- .antMatchers("/webjars/**").anonymous()
- .antMatchers("/*/api-docs").anonymous();
+ registry.antMatchers("/v3/api-docs/**").permitAll() // 元数据
+ .antMatchers("/swagger-ui.html").permitAll(); // Swagger UI
// Spring Boot Actuator 的安全配置
registry.antMatchers("/actuator").anonymous()
.antMatchers("/actuator/**").anonymous();
diff --git a/yudao-module-report/yudao-module-report-biz/src/main/resources/application.yaml b/yudao-module-report/yudao-module-report-biz/src/main/resources/application.yaml
index ff1e97b31..5b1e86b0e 100644
--- a/yudao-module-report/yudao-module-report-biz/src/main/resources/application.yaml
+++ b/yudao-module-report/yudao-module-report-biz/src/main/resources/application.yaml
@@ -27,6 +27,21 @@ spring:
redis:
time-to-live: 1h # 设置过期时间为 1 小时
+--- #################### 接口文档配置 ####################
+
+springdoc:
+ api-docs:
+ enabled: true # 1. 是否开启 Swagger 接文档的元数据
+ path: /v3/api-docs
+ swagger-ui:
+ enabled: true # 2.1 是否开启 Swagger 文档的官方 UI 界面
+ path: /swagger-ui.html
+
+knife4j:
+ enable: true # 2.2 是否开启 Swagger 文档的 Knife4j UI 界面
+ setting:
+ language: zh_cn
+
# MyBatis Plus 的配置项
mybatis-plus:
configuration:
diff --git a/yudao-module-system/yudao-module-system-api/pom.xml b/yudao-module-system/yudao-module-system-api/pom.xml
index f125b277e..dcd4132ed 100644
--- a/yudao-module-system/yudao-module-system-api/pom.xml
+++ b/yudao-module-system/yudao-module-system-api/pom.xml
@@ -24,9 +24,9 @@
- io.swagger
+ io.swagger.core.v3
swagger-annotations
- true
+ provided
diff --git a/yudao-module-system/yudao-module-system-api/src/main/java/cn/iocoder/yudao/module/system/api/dept/DeptApi.java b/yudao-module-system/yudao-module-system-api/src/main/java/cn/iocoder/yudao/module/system/api/dept/DeptApi.java
index b9e417541..affa89ea1 100644
--- a/yudao-module-system/yudao-module-system-api/src/main/java/cn/iocoder/yudao/module/system/api/dept/DeptApi.java
+++ b/yudao-module-system/yudao-module-system-api/src/main/java/cn/iocoder/yudao/module/system/api/dept/DeptApi.java
@@ -4,9 +4,9 @@ import cn.iocoder.yudao.framework.common.pojo.CommonResult;
import cn.iocoder.yudao.framework.common.util.collection.CollectionUtils;
import cn.iocoder.yudao.module.system.api.dept.dto.DeptRespDTO;
import cn.iocoder.yudao.module.system.enums.ApiConstants;
-import io.swagger.annotations.Api;
-import io.swagger.annotations.ApiImplicitParam;
-import io.swagger.annotations.ApiOperation;
+import io.swagger.v3.oas.annotations.Operation;
+import io.swagger.v3.oas.annotations.Parameter;
+import io.swagger.v3.oas.annotations.tags.Tag;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestParam;
@@ -17,24 +17,24 @@ import java.util.Map;
import java.util.Set;
@FeignClient(name = ApiConstants.NAME) // TODO 芋艿:fallbackFactory =
-@Api(tags = "RPC 服务 - 部门")
+@Tag(name = "RPC 服务 - 部门")
public interface DeptApi {
String PREFIX = ApiConstants.PREFIX + "/dept";
@GetMapping(PREFIX + "/get")
- @ApiOperation("获得部门信息")
- @ApiImplicitParam(name = "id", value = "部门编号", example = "1024", required = true, dataTypeClass = Long.class)
+ @Operation(summary = "获得部门信息")
+ @Parameter(name = "id", description = "部门编号", example = "1024", required = true)
CommonResult getDept(@RequestParam("id") Long id);
@GetMapping(PREFIX + "/list")
- @ApiOperation("获得部门信息数组")
- @ApiImplicitParam(name = "ids", value = "部门编号数组", example = "1,2", required = true, allowMultiple = true)
+ @Operation(summary = "获得部门信息数组")
+ @Parameter(name = "ids", description = "部门编号数组", example = "1,2", required = true)
CommonResult> getDeptList(@RequestParam("ids") Collection ids);
@GetMapping(PREFIX + "/valid")
- @ApiOperation("校验部门是否合法")
- @ApiImplicitParam(name = "ids", value = "部门编号数组", example = "1,2", required = true, allowMultiple = true)
+ @Operation(summary = "校验部门是否合法")
+ @Parameter(name = "ids", description = "部门编号数组", example = "1,2", required = true)
CommonResult validateDeptList(@RequestParam("ids") Collection ids);
/**
diff --git a/yudao-module-system/yudao-module-system-api/src/main/java/cn/iocoder/yudao/module/system/api/dept/PostApi.java b/yudao-module-system/yudao-module-system-api/src/main/java/cn/iocoder/yudao/module/system/api/dept/PostApi.java
index 1cd8fc71c..73d3d38a9 100644
--- a/yudao-module-system/yudao-module-system-api/src/main/java/cn/iocoder/yudao/module/system/api/dept/PostApi.java
+++ b/yudao-module-system/yudao-module-system-api/src/main/java/cn/iocoder/yudao/module/system/api/dept/PostApi.java
@@ -2,9 +2,9 @@ package cn.iocoder.yudao.module.system.api.dept;
import cn.iocoder.yudao.framework.common.pojo.CommonResult;
import cn.iocoder.yudao.module.system.enums.ApiConstants;
-import io.swagger.annotations.Api;
-import io.swagger.annotations.ApiImplicitParam;
-import io.swagger.annotations.ApiOperation;
+import io.swagger.v3.oas.annotations.Operation;
+import io.swagger.v3.oas.annotations.Parameter;
+import io.swagger.v3.oas.annotations.tags.Tag;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestParam;
@@ -12,14 +12,14 @@ import org.springframework.web.bind.annotation.RequestParam;
import java.util.Collection;
@FeignClient(name = ApiConstants.NAME) // TODO 芋艿:fallbackFactory =
-@Api(tags = "RPC 服务 - 岗位")
+@Tag(name = "RPC 服务 - 岗位")
public interface PostApi {
String PREFIX = ApiConstants.PREFIX + "/post";
@GetMapping(PREFIX + "/valid")
- @ApiOperation("校验岗位是否合法")
- @ApiImplicitParam(name = "ids", value = "岗位编号数组", example = "1,2", required = true, allowMultiple = true)
+ @Operation(summary = "校验岗位是否合法")
+ @Parameter(name = "ids", description = "岗位编号数组", example = "1,2", required = true)
CommonResult validPostList(@RequestParam("ids") Collection ids);
}
diff --git a/yudao-module-system/yudao-module-system-api/src/main/java/cn/iocoder/yudao/module/system/api/dict/DictDataApi.java b/yudao-module-system/yudao-module-system-api/src/main/java/cn/iocoder/yudao/module/system/api/dict/DictDataApi.java
index 0b53c3137..246aa2db3 100644
--- a/yudao-module-system/yudao-module-system-api/src/main/java/cn/iocoder/yudao/module/system/api/dict/DictDataApi.java
+++ b/yudao-module-system/yudao-module-system-api/src/main/java/cn/iocoder/yudao/module/system/api/dict/DictDataApi.java
@@ -1,12 +1,12 @@
package cn.iocoder.yudao.module.system.api.dict;
+import io.swagger.v3.oas.annotations.tags.Tag;
+import io.swagger.v3.oas.annotations.Parameter;
+import io.swagger.v3.oas.annotations.Parameters;
+import io.swagger.v3.oas.annotations.Operation;
import cn.iocoder.yudao.framework.common.pojo.CommonResult;
import cn.iocoder.yudao.module.system.api.dict.dto.DictDataRespDTO;
import cn.iocoder.yudao.module.system.enums.ApiConstants;
-import io.swagger.annotations.Api;
-import io.swagger.annotations.ApiImplicitParam;
-import io.swagger.annotations.ApiImplicitParams;
-import io.swagger.annotations.ApiOperation;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestParam;
@@ -14,36 +14,36 @@ import org.springframework.web.bind.annotation.RequestParam;
import java.util.Collection;
@FeignClient(name = ApiConstants.NAME) // TODO 芋艿:fallbackFactory =
-@Api(tags = "RPC 服务 - 字典数据")
+@Tag(name = "RPC 服务 - 字典数据")
public interface DictDataApi {
String PREFIX = ApiConstants.PREFIX + "/dict-data";
@GetMapping(PREFIX + "/valid")
- @ApiOperation("校验字典数据们是否有效")
- @ApiImplicitParams({
- @ApiImplicitParam(name = "dictType", value = "字典类型", example = "SEX", required = true, dataTypeClass = String.class),
- @ApiImplicitParam(name = "values", value = "字典数据值的数组", example = "1,2", required = true, allowMultiple = true)
+ @Operation(summary = "校验字典数据们是否有效")
+ @Parameters({
+ @Parameter(name = "dictType", description = "字典类型", example = "SEX", required = true),
+ @Parameter(name = "descriptions", description = "字典数据值的数组", example = "1,2", required = true)
})
CommonResult validateDictDatas(@RequestParam("dictType") String dictType,
@RequestParam("values") Collection values);
@GetMapping(PREFIX + "/get")
- @ApiOperation("获得指定的字典数据")
- @ApiImplicitParams({
- @ApiImplicitParam(name = "dictType", value = "字典类型", example = "SEX", required = true, dataTypeClass = String.class),
- @ApiImplicitParam(name = "value", value = "字典数据值", example = "1", required = true, dataTypeClass = String.class)
+ @Operation(summary = "获得指定的字典数据")
+ @Parameters({
+ @Parameter(name = "dictType", description = "字典类型", example = "SEX", required = true),
+ @Parameter(name = "description", description = "字典数据值", example = "1", required = true)
})
CommonResult getDictData(@RequestParam("dictType") String dictType,
@RequestParam("value") String value);
@GetMapping(PREFIX + "/parse")
- @ApiOperation("解析获得指定的字典数据")
- @ApiImplicitParams({
- @ApiImplicitParam(name = "dictType", value = "字典类型", example = "SEX", required = true, dataTypeClass = String.class),
- @ApiImplicitParam(name = "label", value = "字典标签", example = "男", required = true, dataTypeClass = String.class)
+ @Operation(summary = "解析获得指定的字典数据")
+ @Parameters({
+ @Parameter(name = "dictType", description = "字典类型", example = "SEX", required = true),
+ @Parameter(name = "label", description = "字典标签", example = "男", required = true)
})
CommonResult parseDictData(@RequestParam("dictType") String dictType,
@RequestParam("label") String label);
-}
+}
\ No newline at end of file
diff --git a/yudao-module-system/yudao-module-system-api/src/main/java/cn/iocoder/yudao/module/system/api/dict/dto/DictDataRespDTO.java b/yudao-module-system/yudao-module-system-api/src/main/java/cn/iocoder/yudao/module/system/api/dict/dto/DictDataRespDTO.java
index c988ea653..45da86691 100644
--- a/yudao-module-system/yudao-module-system-api/src/main/java/cn/iocoder/yudao/module/system/api/dict/dto/DictDataRespDTO.java
+++ b/yudao-module-system/yudao-module-system-api/src/main/java/cn/iocoder/yudao/module/system/api/dict/dto/DictDataRespDTO.java
@@ -1,21 +1,21 @@
package cn.iocoder.yudao.module.system.api.dict.dto;
import cn.iocoder.yudao.framework.common.enums.CommonStatusEnum;
-import io.swagger.annotations.ApiModel;
-import io.swagger.annotations.ApiModelProperty;
+import io.swagger.v3.oas.annotations.media.Schema;
+import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
-@ApiModel("RPC 服务 - 字典数据 Response DTO")
+@Schema(description = "RPC 服务 - 字典数据 Response DTO")
@Data
public class DictDataRespDTO {
- @ApiModelProperty(value = "字典标签", required = true, example = "芋道")
+ @Schema(description = "字典标签", required = true, example = "芋道")
private String label;
- @ApiModelProperty(value = "字典值", required = true, example = "iocoder")
+ @Schema(description = "字典值", required = true, example = "iocoder")
private String value;
- @ApiModelProperty(value = "字典类型", required = true, example = "sys_common_sex")
+ @Schema(description = "字典类型", required = true, example = "sys_common_sex")
private String dictType;
- @ApiModelProperty(value = "状态", required = true, example = "1", notes = "见 CommonStatusEnum 枚举")
+ @Schema(description = "状态,见 CommonStatusEnum 枚举", required = true, example = "1")
private Integer status;
-}
+}
\ No newline at end of file
diff --git a/yudao-module-system/yudao-module-system-api/src/main/java/cn/iocoder/yudao/module/system/api/errorcode/ErrorCodeApi.java b/yudao-module-system/yudao-module-system-api/src/main/java/cn/iocoder/yudao/module/system/api/errorcode/ErrorCodeApi.java
index 0abc37a24..202fee02a 100644
--- a/yudao-module-system/yudao-module-system-api/src/main/java/cn/iocoder/yudao/module/system/api/errorcode/ErrorCodeApi.java
+++ b/yudao-module-system/yudao-module-system-api/src/main/java/cn/iocoder/yudao/module/system/api/errorcode/ErrorCodeApi.java
@@ -4,10 +4,10 @@ import cn.iocoder.yudao.framework.common.pojo.CommonResult;
import cn.iocoder.yudao.module.system.api.errorcode.dto.ErrorCodeAutoGenerateReqDTO;
import cn.iocoder.yudao.module.system.api.errorcode.dto.ErrorCodeRespDTO;
import cn.iocoder.yudao.module.system.enums.ApiConstants;
-import io.swagger.annotations.Api;
-import io.swagger.annotations.ApiImplicitParam;
-import io.swagger.annotations.ApiImplicitParams;
-import io.swagger.annotations.ApiOperation;
+import io.swagger.v3.oas.annotations.tags.Tag;
+import io.swagger.v3.oas.annotations.Parameter;
+import io.swagger.v3.oas.annotations.Parameters;
+import io.swagger.v3.oas.annotations.Operation;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
@@ -16,25 +16,26 @@ import org.springframework.web.bind.annotation.RequestParam;
import javax.validation.Valid;
import java.time.LocalDateTime;
+import java.util.Date;
import java.util.List;
@FeignClient(name = ApiConstants.NAME) // TODO 芋艿:fallbackFactory =
-@Api(tags = "RPC 服务 - 错误码")
+@Tag(name = "RPC 服务 - 错误码")
public interface ErrorCodeApi {
String PREFIX = ApiConstants.PREFIX + "/error-code";
@PostMapping(PREFIX + "/auto-generate")
- @ApiOperation("自动创建错误码")
+ @Operation(summary = "自动创建错误码")
CommonResult autoGenerateErrorCodeList(@Valid @RequestBody List autoGenerateDTOs);
@GetMapping(PREFIX + "/list")
- @ApiOperation(value = "增量获得错误码数组", notes = "如果 minUpdateTime 为空时,则获取所有错误码")
- @ApiImplicitParams({
- @ApiImplicitParam(name = "applicationName", value = "应用名", example = "system-server", required = true, dataTypeClass = String.class),
- @ApiImplicitParam(name = "minUpdateTime", value = "最小更新时间", dataTypeClass = LocalDateTime.class)
+ @Operation(summary = "增量获得错误码数组", description = "如果 minUpdateTime 为空时,则获取所有错误码")
+ @Parameters({
+ @Parameter(name = "applicationName", description = "应用名", example = "system-server", required = true),
+ @Parameter(name = "minUpdateTime", description = "最小更新时间")
})
CommonResult> getErrorCodeList(@RequestParam(value = "applicationName") String applicationName,
@RequestParam(value = "minUpdateTime", required = false) LocalDateTime minUpdateTime);
-}
+}
\ No newline at end of file
diff --git a/yudao-module-system/yudao-module-system-api/src/main/java/cn/iocoder/yudao/module/system/api/logger/LoginLogApi.java b/yudao-module-system/yudao-module-system-api/src/main/java/cn/iocoder/yudao/module/system/api/logger/LoginLogApi.java
index dc0c0faee..f6dd7829b 100644
--- a/yudao-module-system/yudao-module-system-api/src/main/java/cn/iocoder/yudao/module/system/api/logger/LoginLogApi.java
+++ b/yudao-module-system/yudao-module-system-api/src/main/java/cn/iocoder/yudao/module/system/api/logger/LoginLogApi.java
@@ -3,8 +3,8 @@ package cn.iocoder.yudao.module.system.api.logger;
import cn.iocoder.yudao.framework.common.pojo.CommonResult;
import cn.iocoder.yudao.module.system.api.logger.dto.LoginLogCreateReqDTO;
import cn.iocoder.yudao.module.system.enums.ApiConstants;
-import io.swagger.annotations.Api;
-import io.swagger.annotations.ApiOperation;
+import io.swagger.v3.oas.annotations.tags.Tag;
+import io.swagger.v3.oas.annotations.Operation;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
@@ -12,13 +12,13 @@ import org.springframework.web.bind.annotation.RequestBody;
import javax.validation.Valid;
@FeignClient(name = ApiConstants.NAME) // TODO 芋艿:fallbackFactory =
-@Api(tags = "RPC 服务 - 登录日志")
+@Tag(name = "RPC 服务 - 登录日志")
public interface LoginLogApi {
String PREFIX = ApiConstants.PREFIX + "/login-log";
@PostMapping(PREFIX + "/create")
- @ApiOperation("创建登录日志")
+ @Operation(summary = "创建登录日志")
CommonResult createLoginLog(@Valid @RequestBody LoginLogCreateReqDTO reqDTO);
-}
+}
\ No newline at end of file
diff --git a/yudao-module-system/yudao-module-system-api/src/main/java/cn/iocoder/yudao/module/system/api/logger/OperateLogApi.java b/yudao-module-system/yudao-module-system-api/src/main/java/cn/iocoder/yudao/module/system/api/logger/OperateLogApi.java
index 95cc00826..9c28cd1f3 100644
--- a/yudao-module-system/yudao-module-system-api/src/main/java/cn/iocoder/yudao/module/system/api/logger/OperateLogApi.java
+++ b/yudao-module-system/yudao-module-system-api/src/main/java/cn/iocoder/yudao/module/system/api/logger/OperateLogApi.java
@@ -3,8 +3,8 @@ package cn.iocoder.yudao.module.system.api.logger;
import cn.iocoder.yudao.framework.common.pojo.CommonResult;
import cn.iocoder.yudao.module.system.api.logger.dto.OperateLogCreateReqDTO;
import cn.iocoder.yudao.module.system.enums.ApiConstants;
-import io.swagger.annotations.Api;
-import io.swagger.annotations.ApiOperation;
+import io.swagger.v3.oas.annotations.tags.Tag;
+import io.swagger.v3.oas.annotations.Operation;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
@@ -12,13 +12,13 @@ import org.springframework.web.bind.annotation.RequestBody;
import javax.validation.Valid;
@FeignClient(name = ApiConstants.NAME) // TODO 芋艿:fallbackFactory =
-@Api(tags = "RPC 服务 - 操作日志")
+@Tag(name = "RPC 服务 - 操作日志")
public interface OperateLogApi {
String PREFIX = ApiConstants.PREFIX + "/operate-log";
@PostMapping(PREFIX + "/create")
- @ApiOperation("创建操作日志")
+ @Operation(summary = "创建操作日志")
CommonResult createOperateLog(@Valid @RequestBody OperateLogCreateReqDTO createReqDTO);
-}
+}
\ No newline at end of file
diff --git a/yudao-module-system/yudao-module-system-api/src/main/java/cn/iocoder/yudao/module/system/api/logger/dto/LoginLogCreateReqDTO.java b/yudao-module-system/yudao-module-system-api/src/main/java/cn/iocoder/yudao/module/system/api/logger/dto/LoginLogCreateReqDTO.java
index a3b068d06..e8d380f56 100644
--- a/yudao-module-system/yudao-module-system-api/src/main/java/cn/iocoder/yudao/module/system/api/logger/dto/LoginLogCreateReqDTO.java
+++ b/yudao-module-system/yudao-module-system-api/src/main/java/cn/iocoder/yudao/module/system/api/logger/dto/LoginLogCreateReqDTO.java
@@ -1,6 +1,6 @@
package cn.iocoder.yudao.module.system.api.logger.dto;
-import io.swagger.annotations.ApiModelProperty;
+import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import javax.validation.constraints.NotBlank;
@@ -16,32 +16,32 @@ import javax.validation.constraints.Size;
@Data
public class LoginLogCreateReqDTO {
- @ApiModelProperty(value = "日志类型", required = true, example = "1", notes = "参见 LoginLogTypeEnum 枚举类")
+ @Schema(description = "日志类型,参见 LoginLogTypeEnum 枚举类", required = true, example = "1" )
@NotNull(message = "日志类型不能为空")
private Integer logType;
- @ApiModelProperty(value = "链路追踪编号", required = true, example = "89aca178-a370-411c-ae02-3f0d672be4ab")
+ @Schema(description = "链路追踪编号", required = true, example = "89aca178-a370-411c-ae02-3f0d672be4ab")
private String traceId;
- @ApiModelProperty(value = "用户编号", example = "666")
+ @Schema(description = "用户编号", example = "666")
private Long userId;
- @ApiModelProperty(value = "用户类型", required = true, example = "2", notes = "参见 UserTypeEnum 枚举")
+ @Schema(description = "用户类型,参见 UserTypeEnum 枚举", required = true, example = "2" )
@NotNull(message = "用户类型不能为空")
private Integer userType;
- @ApiModelProperty(value = "用户账号", required = true, example = "yudao")
+ @Schema(description = "用户账号", required = true, example = "yudao")
@NotBlank(message = "用户账号不能为空")
@Size(max = 30, message = "用户账号长度不能超过30个字符")
private String username;
- @ApiModelProperty(value = "登录结果", required = true, example = "1", notes = "参见 LoginResultEnum 枚举类")
+ @Schema(description = "登录结果,参见 LoginResultEnum 枚举类", required = true, example = "1")
@NotNull(message = "登录结果不能为空")
private Integer result;
- @ApiModelProperty(value = "用户 IP", required = true, example = "127.0.0.1")
+ @Schema(description = "用户 IP", required = true, example = "127.0.0.1")
@NotEmpty(message = "用户 IP 不能为空")
private String userIp;
- @ApiModelProperty(value = "浏览器 UserAgent", required = true, example = "Mozilla/5.0")
+ @Schema(description = "浏览器 UserAgent", required = true, example = "Mozilla/5.0")
private String userAgent;
-}
+}
\ No newline at end of file
diff --git a/yudao-module-system/yudao-module-system-api/src/main/java/cn/iocoder/yudao/module/system/api/logger/dto/OperateLogCreateReqDTO.java b/yudao-module-system/yudao-module-system-api/src/main/java/cn/iocoder/yudao/module/system/api/logger/dto/OperateLogCreateReqDTO.java
index 483c4e88f..712aadfa3 100644
--- a/yudao-module-system/yudao-module-system-api/src/main/java/cn/iocoder/yudao/module/system/api/logger/dto/OperateLogCreateReqDTO.java
+++ b/yudao-module-system/yudao-module-system-api/src/main/java/cn/iocoder/yudao/module/system/api/logger/dto/OperateLogCreateReqDTO.java
@@ -1,7 +1,7 @@
package cn.iocoder.yudao.module.system.api.logger.dto;
-import io.swagger.annotations.ApiModel;
-import io.swagger.annotations.ApiModelProperty;
+import io.swagger.v3.oas.annotations.media.Schema;
+import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import javax.validation.constraints.NotEmpty;
@@ -9,77 +9,77 @@ import javax.validation.constraints.NotNull;
import java.time.LocalDateTime;
import java.util.Map;
-@ApiModel("RPC 服务 - 操作日志创建 Request DTO")
+@Schema(description = "RPC 服务 - 操作日志创建 Request DTO")
@Data
public class OperateLogCreateReqDTO {
- @ApiModelProperty(value = "链路追踪编号", example = "89aca178-a370-411c-ae02-3f0d672be4ab")
+ @Schema(description = "链路追踪编号", example = "89aca178-a370-411c-ae02-3f0d672be4ab")
private String traceId;
- @ApiModelProperty(value = "用户编号", required = true, example = "1024")
+ @Schema(description = "用户编号", required = true, example = "1024")
@NotNull(message = "用户编号不能为空")
private Long userId;
- @ApiModelProperty(value = "用户类型", required = true, example = "1")
+ @Schema(description = "用户类型", required = true, example = "1")
@NotNull(message = "用户类型不能为空")
private Integer userType;
- @ApiModelProperty(value = "操作模块", required = true, example = "订单")
+ @Schema(description = "操作模块", required = true, example = "订单")
@NotEmpty(message = "操作模块不能为空")
private String module;
- @ApiModelProperty(value = "操作名", required = true, example = "创建订单")
+ @Schema(description = "操作名", required = true, example = "创建订单")
@NotEmpty(message = "操作名")
private String name;
- @ApiModelProperty(value = "操作分类", required = true, example = "1", notes = "参见 SysOperateLogTypeEnum 枚举类")
+ @Schema(description = "操作分类,参见 SysOperateLogTypeEnum 枚举类", required = true, example = "1")
@NotNull(message = "操作分类不能为空")
private Integer type;
- @ApiModelProperty(value = "操作明细", example = "修改编号为 1 的用户信息,将性别从男改成女,将姓名从芋道改成源码。")
+ @Schema(description = "操作明细", example = "修改编号为 1 的用户信息,将性别从男改成女,将姓名从芋道改成源码。")
private String content;
- @ApiModelProperty(value = "拓展字段", example = "{'orderId': 1}")
+ @Schema(description = "拓展字段", example = "{'orderId': 1}")
private Map exts;
- @ApiModelProperty(value = "请求方法名", required = true, example = "GET")
+ @Schema(description = "请求方法名", required = true, example = "GET")
@NotEmpty(message = "请求方法名不能为空")
private String requestMethod;
- @ApiModelProperty(value = "请求地址", required = true, example = "/xxx/yyy")
+ @Schema(description = "请求地址", required = true, example = "/xxx/yyy")
@NotEmpty(message = "请求地址不能为空")
private String requestUrl;
- @ApiModelProperty(value = "用户 IP", required = true, example = "127.0.0.1")
+ @Schema(description = "用户 IP", required = true, example = "127.0.0.1")
@NotEmpty(message = "用户 IP 不能为空")
private String userIp;
- @ApiModelProperty(value = "浏览器 UserAgent", required = true, example = "Mozilla/5.0")
+ @Schema(description = "浏览器 UserAgent", required = true, example = "Mozilla/5.0")
@NotEmpty(message = "浏览器 UserAgent 不能为空")
private String userAgent;
- @ApiModelProperty(value = "Java 方法名", required = true, example = "cn.iocoder.yudao.UserController.save(...)")
+ @Schema(description = "Java 方法名", required = true, example = "cn.iocoder.yudao.UserController.save(...)")
@NotEmpty(message = "Java 方法名不能为空")
private String javaMethod;
- @ApiModelProperty(value = "Java 方法的参数")
+ @Schema(description = "Java 方法的参数")
private String javaMethodArgs;
- @ApiModelProperty(value = "开始时间", required = true)
+ @Schema(description = "开始时间", required = true)
@NotNull(message = "开始时间不能为空")
private LocalDateTime startTime;
- @ApiModelProperty(value = "执行时长,单位:毫秒", required = true)
+ @Schema(description = "执行时长,单位:毫秒", required = true)
@NotNull(message = "执行时长不能为空")
private Integer duration;
- @ApiModelProperty(value = "结果码", required = true)
+ @Schema(description = "结果码", required = true)
@NotNull(message = "结果码不能为空")
private Integer resultCode;
- @ApiModelProperty(value = "结果提示")
+ @Schema(description = "结果提示")
private String resultMsg;
- @ApiModelProperty(value = "结果数据")
+ @Schema(description = "结果数据")
private String resultData;
-}
+}
\ No newline at end of file
diff --git a/yudao-module-system/yudao-module-system-api/src/main/java/cn/iocoder/yudao/module/system/api/mail/MailSendApi.java b/yudao-module-system/yudao-module-system-api/src/main/java/cn/iocoder/yudao/module/system/api/mail/MailSendApi.java
index ded07635a..56f9a8b56 100644
--- a/yudao-module-system/yudao-module-system-api/src/main/java/cn/iocoder/yudao/module/system/api/mail/MailSendApi.java
+++ b/yudao-module-system/yudao-module-system-api/src/main/java/cn/iocoder/yudao/module/system/api/mail/MailSendApi.java
@@ -3,25 +3,25 @@ package cn.iocoder.yudao.module.system.api.mail;
import cn.iocoder.yudao.framework.common.pojo.CommonResult;
import cn.iocoder.yudao.module.system.api.mail.dto.MailSendSingleToUserReqDTO;
import cn.iocoder.yudao.module.system.enums.ApiConstants;
-import io.swagger.annotations.Api;
-import io.swagger.annotations.ApiOperation;
+import io.swagger.v3.oas.annotations.tags.Tag;
+import io.swagger.v3.oas.annotations.Operation;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PostMapping;
import javax.validation.Valid;
@FeignClient(name = ApiConstants.NAME) // TODO 芋艿:fallbackFactory =
-@Api(tags = "RPC 服务 - 邮件发送")
+@Tag(name = "RPC 服务 - 邮件发送")
public interface MailSendApi {
String PREFIX = ApiConstants.PREFIX + "/mail/send";
@PostMapping(PREFIX + "/send-single-admin")
- @ApiOperation(value = "发送单条邮件给 Admin 用户", notes = "在 mail 为空时,使用 userId 加载对应 Admin 的邮箱")
+ @Operation(summary = "发送单条邮件给 Admin 用户", description = "在 mail 为空时,使用 userId 加载对应 Admin 的邮箱")
CommonResult sendSingleMailToAdmin(@Valid MailSendSingleToUserReqDTO reqDTO);
@PostMapping(PREFIX + "/send-single-member")
- @ApiOperation(value = "发送单条邮件给 Member 用户", notes = "在 mail 为空时,使用 userId 加载对应 Member 的邮箱")
+ @Operation(summary = "发送单条邮件给 Member 用户", description = "在 mail 为空时,使用 userId 加载对应 Member 的邮箱")
CommonResult sendSingleMailToMember(@Valid MailSendSingleToUserReqDTO reqDTO);
-}
+}
\ No newline at end of file
diff --git a/yudao-module-system/yudao-module-system-api/src/main/java/cn/iocoder/yudao/module/system/api/mail/dto/MailSendSingleToUserReqDTO.java b/yudao-module-system/yudao-module-system-api/src/main/java/cn/iocoder/yudao/module/system/api/mail/dto/MailSendSingleToUserReqDTO.java
index 57c07cef4..230fc2f86 100644
--- a/yudao-module-system/yudao-module-system-api/src/main/java/cn/iocoder/yudao/module/system/api/mail/dto/MailSendSingleToUserReqDTO.java
+++ b/yudao-module-system/yudao-module-system-api/src/main/java/cn/iocoder/yudao/module/system/api/mail/dto/MailSendSingleToUserReqDTO.java
@@ -1,27 +1,27 @@
package cn.iocoder.yudao.module.system.api.mail.dto;
-import io.swagger.annotations.ApiModel;
-import io.swagger.annotations.ApiModelProperty;
+import io.swagger.v3.oas.annotations.media.Schema;
+import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import javax.validation.constraints.Email;
import javax.validation.constraints.NotNull;
import java.util.Map;
-@ApiModel("RPC 服务 - 邮件发送给 Admin 或者 Member 用户 Request DTO")
+@Schema(description = "RPC 服务 - 邮件发送给 Admin 或者 Member 用户 Request DTO")
@Data
public class MailSendSingleToUserReqDTO {
- @ApiModelProperty(value = "用户编号", example = "1024")
+ @Schema(description = "用户编号", example = "1024")
private Long userId;
- @ApiModelProperty(value = "手机号", required = true, example = "15601691300")
+ @Schema(description = "手机号", required = true, example = "15601691300")
@Email
private String mail;
- @ApiModelProperty(value = "邮件模板编号", required = true, example = "USER_SEND")
+ @Schema(description = "邮件模板编号", required = true, example = "USER_SEND")
@NotNull(message = "邮件模板编号不能为空")
private String templateCode;
- @ApiModelProperty(value = "邮件模板参数")
+ @Schema(description = "邮件模板参数")
private Map templateParams;
-}
+}
\ No newline at end of file
diff --git a/yudao-module-system/yudao-module-system-api/src/main/java/cn/iocoder/yudao/module/system/api/notify/NotifyMessageSendApi.java b/yudao-module-system/yudao-module-system-api/src/main/java/cn/iocoder/yudao/module/system/api/notify/NotifyMessageSendApi.java
index 781a792ad..5535d6717 100644
--- a/yudao-module-system/yudao-module-system-api/src/main/java/cn/iocoder/yudao/module/system/api/notify/NotifyMessageSendApi.java
+++ b/yudao-module-system/yudao-module-system-api/src/main/java/cn/iocoder/yudao/module/system/api/notify/NotifyMessageSendApi.java
@@ -3,25 +3,25 @@ package cn.iocoder.yudao.module.system.api.notify;
import cn.iocoder.yudao.framework.common.pojo.CommonResult;
import cn.iocoder.yudao.module.system.api.notify.dto.NotifySendSingleToUserReqDTO;
import cn.iocoder.yudao.module.system.enums.ApiConstants;
-import io.swagger.annotations.Api;
-import io.swagger.annotations.ApiOperation;
+import io.swagger.v3.oas.annotations.tags.Tag;
+import io.swagger.v3.oas.annotations.Operation;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PostMapping;
import javax.validation.Valid;
@FeignClient(name = ApiConstants.NAME) // TODO 芋艿:fallbackFactory =
-@Api(tags = "RPC 服务 - 站内信发送")
+@Tag(name = "RPC 服务 - 站内信发送")
public interface NotifyMessageSendApi {
String PREFIX = ApiConstants.PREFIX + "/notify/send";
@PostMapping(PREFIX + "/send-single-admin")
- @ApiOperation(value = "发送单条站内信给 Admin 用户")
+ @Operation(summary = "发送单条站内信给 Admin 用户")
CommonResult sendSingleMessageToAdmin(@Valid NotifySendSingleToUserReqDTO reqDTO);
@PostMapping(PREFIX + "/send-single-member")
- @ApiOperation(value = "发送单条站内信给 Member 用户")
+ @Operation(summary = "发送单条站内信给 Member 用户")
CommonResult sendSingleMessageToMember(@Valid NotifySendSingleToUserReqDTO reqDTO);
-}
+}
\ No newline at end of file
diff --git a/yudao-module-system/yudao-module-system-api/src/main/java/cn/iocoder/yudao/module/system/api/notify/dto/NotifySendSingleToUserReqDTO.java b/yudao-module-system/yudao-module-system-api/src/main/java/cn/iocoder/yudao/module/system/api/notify/dto/NotifySendSingleToUserReqDTO.java
index 124b9c74a..22e9bee44 100644
--- a/yudao-module-system/yudao-module-system-api/src/main/java/cn/iocoder/yudao/module/system/api/notify/dto/NotifySendSingleToUserReqDTO.java
+++ b/yudao-module-system/yudao-module-system-api/src/main/java/cn/iocoder/yudao/module/system/api/notify/dto/NotifySendSingleToUserReqDTO.java
@@ -1,24 +1,24 @@
package cn.iocoder.yudao.module.system.api.notify.dto;
-import io.swagger.annotations.ApiModel;
-import io.swagger.annotations.ApiModelProperty;
+import io.swagger.v3.oas.annotations.media.Schema;
+import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.NotNull;
import java.util.Map;
-@ApiModel("RPC 服务 - 站内信发送给 Admin 或者 Member 用户 Request DTO")
+@Schema(description = "RPC 服务 - 站内信发送给 Admin 或者 Member 用户 Request DTO")
@Data
public class NotifySendSingleToUserReqDTO {
- @ApiModelProperty(value = "用户编号", required = true, example = "1024")
+ @Schema(description = "用户编号", required = true, example = "1024")
@NotNull(message = "用户编号不能为空")
private Long userId;
- @ApiModelProperty(value = "站内信模板编号", required = true, example = "USER_SEND")
+ @Schema(description = "站内信模板编号", required = true, example = "USER_SEND")
@NotEmpty(message = "站内信模板编号不能为空")
private String templateCode;
- @ApiModelProperty(value = "邮件模板参数")
+ @Schema(description = "邮件模板参数")
private Map templateParams;
-}
+}
\ No newline at end of file
diff --git a/yudao-module-system/yudao-module-system-api/src/main/java/cn/iocoder/yudao/module/system/api/oauth2/OAuth2TokenApi.java b/yudao-module-system/yudao-module-system-api/src/main/java/cn/iocoder/yudao/module/system/api/oauth2/OAuth2TokenApi.java
index e81869a40..55d64dd1b 100644
--- a/yudao-module-system/yudao-module-system-api/src/main/java/cn/iocoder/yudao/module/system/api/oauth2/OAuth2TokenApi.java
+++ b/yudao-module-system/yudao-module-system-api/src/main/java/cn/iocoder/yudao/module/system/api/oauth2/OAuth2TokenApi.java
@@ -5,17 +5,17 @@ import cn.iocoder.yudao.module.system.api.oauth2.dto.OAuth2AccessTokenCheckRespD
import cn.iocoder.yudao.module.system.api.oauth2.dto.OAuth2AccessTokenCreateReqDTO;
import cn.iocoder.yudao.module.system.api.oauth2.dto.OAuth2AccessTokenRespDTO;
import cn.iocoder.yudao.module.system.enums.ApiConstants;
-import io.swagger.annotations.Api;
-import io.swagger.annotations.ApiImplicitParam;
-import io.swagger.annotations.ApiImplicitParams;
-import io.swagger.annotations.ApiOperation;
+import io.swagger.v3.oas.annotations.tags.Tag;
+import io.swagger.v3.oas.annotations.Parameter;
+import io.swagger.v3.oas.annotations.Parameters;
+import io.swagger.v3.oas.annotations.Operation;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.*;
import javax.validation.Valid;
@FeignClient(name = ApiConstants.NAME) // TODO 芋艿:fallbackFactory =
-@Api(tags = "RPC 服务 - OAuth2.0 令牌")
+@Tag(name = "RPC 服务 - OAuth2.0 令牌")
public interface OAuth2TokenApi {
String PREFIX = ApiConstants.PREFIX + "/oauth2/token";
@@ -27,26 +27,26 @@ public interface OAuth2TokenApi {
String URL_CHECK = "http://" + ApiConstants.NAME + PREFIX + "/check";
@PostMapping(PREFIX + "/create")
- @ApiOperation("创建访问令牌")
+ @Operation(summary = "创建访问令牌")
CommonResult createAccessToken(@Valid @RequestBody OAuth2AccessTokenCreateReqDTO reqDTO);
@GetMapping(PREFIX + "/check")
- @ApiOperation("校验访问令牌")
- @ApiImplicitParam(name = "accessToken", value = "访问令牌", required = true, dataTypeClass = String.class, example = "tudou")
+ @Operation(summary = "校验访问令牌")
+ @Parameter(name = "accessToken", description = "访问令牌", required = true, example = "tudou")
CommonResult checkAccessToken(@RequestParam("accessToken") String accessToken);
@DeleteMapping(PREFIX + "/remove")
- @ApiOperation("移除访问令牌")
- @ApiImplicitParam(name = "accessToken", value = "访问令牌", required = true, dataTypeClass = String.class, example = "tudou")
+ @Operation(summary = "移除访问令牌")
+ @Parameter(name = "accessToken", description = "访问令牌", required = true, example = "tudou")
CommonResult removeAccessToken(@RequestParam("accessToken") String accessToken);
@PutMapping(PREFIX + "/refresh")
- @ApiOperation("刷新访问令牌")
- @ApiImplicitParams({
- @ApiImplicitParam(name = "refreshToken", value = "刷新令牌", required = true, dataTypeClass = String.class, example = "haha"),
- @ApiImplicitParam(name = "clientId", value = "客户端编号", required = true, dataTypeClass = String.class, example = "yudaoyuanma")
+ @Operation(summary = "刷新访问令牌")
+ @Parameters({
+ @Parameter(name = "refreshToken", description = "刷新令牌", required = true, example = "haha"),
+ @Parameter(name = "clientId", description = "客户端编号", required = true, example = "yudaoyuanma")
})
CommonResult refreshAccessToken(@RequestParam("refreshToken") String refreshToken,
@RequestParam("clientId") String clientId);
-}
+}
\ No newline at end of file
diff --git a/yudao-module-system/yudao-module-system-api/src/main/java/cn/iocoder/yudao/module/system/api/oauth2/dto/OAuth2AccessTokenCheckRespDTO.java b/yudao-module-system/yudao-module-system-api/src/main/java/cn/iocoder/yudao/module/system/api/oauth2/dto/OAuth2AccessTokenCheckRespDTO.java
index 7d500293d..3478aee03 100644
--- a/yudao-module-system/yudao-module-system-api/src/main/java/cn/iocoder/yudao/module/system/api/oauth2/dto/OAuth2AccessTokenCheckRespDTO.java
+++ b/yudao-module-system/yudao-module-system-api/src/main/java/cn/iocoder/yudao/module/system/api/oauth2/dto/OAuth2AccessTokenCheckRespDTO.java
@@ -1,26 +1,26 @@
package cn.iocoder.yudao.module.system.api.oauth2.dto;
-import io.swagger.annotations.ApiModel;
-import io.swagger.annotations.ApiModelProperty;
+import io.swagger.v3.oas.annotations.media.Schema;
+import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import java.io.Serializable;
import java.util.List;
-@ApiModel("RPC 服务 - OAuth2 访问令牌的校验 Response DTO")
+@Schema(description = "RPC 服务 - OAuth2 访问令牌的校验 Response DTO")
@Data
public class OAuth2AccessTokenCheckRespDTO implements Serializable {
- @ApiModelProperty(value = "用户编号", required = true, example = "10")
+ @Schema(description = "用户编号", required = true, example = "10")
private Long userId;
- @ApiModelProperty(value = "用户类型", required = true, example = "1", notes = "参见 UserTypeEnum 枚举")
+ @Schema(description = "用户类型,参见 UserTypeEnum 枚举", required = true, example = "1")
private Integer userType;
- @ApiModelProperty(value = "租户编号", required = true, example = "1024")
+ @Schema(description = "租户编号", required = true, example = "1024")
private Long tenantId;
- @ApiModelProperty(value = "授权范围的数组", example = "user_info")
+ @Schema(description = "授权范围的数组", example = "user_info")
private List scopes;
-}
+}
\ No newline at end of file
diff --git a/yudao-module-system/yudao-module-system-api/src/main/java/cn/iocoder/yudao/module/system/api/oauth2/dto/OAuth2AccessTokenCreateReqDTO.java b/yudao-module-system/yudao-module-system-api/src/main/java/cn/iocoder/yudao/module/system/api/oauth2/dto/OAuth2AccessTokenCreateReqDTO.java
index 17b9ba456..f2264e11e 100644
--- a/yudao-module-system/yudao-module-system-api/src/main/java/cn/iocoder/yudao/module/system/api/oauth2/dto/OAuth2AccessTokenCreateReqDTO.java
+++ b/yudao-module-system/yudao-module-system-api/src/main/java/cn/iocoder/yudao/module/system/api/oauth2/dto/OAuth2AccessTokenCreateReqDTO.java
@@ -2,32 +2,32 @@ package cn.iocoder.yudao.module.system.api.oauth2.dto;
import cn.iocoder.yudao.framework.common.enums.UserTypeEnum;
import cn.iocoder.yudao.framework.common.validation.InEnum;
-import io.swagger.annotations.ApiModel;
-import io.swagger.annotations.ApiModelProperty;
+import io.swagger.v3.oas.annotations.media.Schema;
+import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import javax.validation.constraints.NotNull;
import java.io.Serializable;
import java.util.List;
-@ApiModel("RPC 服务 - OAuth2 访问令牌创建 Request DTO")
+@Schema(description = "RPC 服务 - OAuth2 访问令牌创建 Request DTO")
@Data
public class OAuth2AccessTokenCreateReqDTO implements Serializable {
- @ApiModelProperty(value = "用户编号", required = true, example = "10")
+ @Schema(description = "用户编号", required = true, example = "10")
@NotNull(message = "用户编号不能为空")
private Long userId;
- @ApiModelProperty(value = "用户类型", required = true, example = "1", notes = "参见 UserTypeEnum 枚举")
+ @Schema(description = "用户类型,参见 UserTypeEnum 枚举", required = true, example = "1")
@NotNull(message = "用户类型不能为空")
@InEnum(value = UserTypeEnum.class, message = "用户类型必须是 {value}")
private Integer userType;
- @ApiModelProperty(value = "客户端编号", required = true, example = "yudaoyuanma")
+ @Schema(description = "客户端编号", required = true, example = "yudaoyuanma")
@NotNull(message = "客户端编号不能为空")
private String clientId;
- @ApiModelProperty(value = "授权范围的数组", example = "user_info")
+ @Schema(description = "授权范围的数组", example = "user_info")
private List scopes;
-}
+}
\ No newline at end of file
diff --git a/yudao-module-system/yudao-module-system-api/src/main/java/cn/iocoder/yudao/module/system/api/oauth2/dto/OAuth2AccessTokenRespDTO.java b/yudao-module-system/yudao-module-system-api/src/main/java/cn/iocoder/yudao/module/system/api/oauth2/dto/OAuth2AccessTokenRespDTO.java
index 0534930db..baeb97a00 100644
--- a/yudao-module-system/yudao-module-system-api/src/main/java/cn/iocoder/yudao/module/system/api/oauth2/dto/OAuth2AccessTokenRespDTO.java
+++ b/yudao-module-system/yudao-module-system-api/src/main/java/cn/iocoder/yudao/module/system/api/oauth2/dto/OAuth2AccessTokenRespDTO.java
@@ -1,31 +1,31 @@
package cn.iocoder.yudao.module.system.api.oauth2.dto;
-import io.swagger.annotations.ApiModel;
-import io.swagger.annotations.ApiModelProperty;
+import io.swagger.v3.oas.annotations.media.Schema;
+import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import lombok.experimental.Accessors;
import java.io.Serializable;
import java.time.LocalDateTime;
-@ApiModel("RPC 服务 - OAuth2 访问令牌的信息 Response DTO")
+@Schema(description = "RPC 服务 - OAuth2 访问令牌的信息 Response DTO")
@Data
@Accessors(chain = true)
public class OAuth2AccessTokenRespDTO implements Serializable {
- @ApiModelProperty(value = "访问令牌", required = true, example = "tudou")
+ @Schema(description = "访问令牌", required = true, example = "tudou")
private String accessToken;
- @ApiModelProperty(value = "刷新令牌", required = true, example = "haha")
+ @Schema(description = "刷新令牌", required = true, example = "haha")
private String refreshToken;
- @ApiModelProperty(value = "用户编号", required = true, example = "10")
+ @Schema(description = "用户编号", required = true, example = "10")
private Long userId;
- @ApiModelProperty(value = "用户类型", required = true, example = "1", notes = "参见 UserTypeEnum 枚举")
+ @Schema(description = "用户类型,参见 UserTypeEnum 枚举", required = true, example = "1" )
private Integer userType;
- @ApiModelProperty(value = "过期时间", required = true)
+ @Schema(description = "过期时间", required = true)
private LocalDateTime expiresTime;
-}
+}
\ No newline at end of file
diff --git a/yudao-module-system/yudao-module-system-api/src/main/java/cn/iocoder/yudao/module/system/api/permission/PermissionApi.java b/yudao-module-system/yudao-module-system-api/src/main/java/cn/iocoder/yudao/module/system/api/permission/PermissionApi.java
index a316afc74..9b023acc4 100644
--- a/yudao-module-system/yudao-module-system-api/src/main/java/cn/iocoder/yudao/module/system/api/permission/PermissionApi.java
+++ b/yudao-module-system/yudao-module-system-api/src/main/java/cn/iocoder/yudao/module/system/api/permission/PermissionApi.java
@@ -3,10 +3,10 @@ package cn.iocoder.yudao.module.system.api.permission;
import cn.iocoder.yudao.framework.common.pojo.CommonResult;
import cn.iocoder.yudao.module.system.api.permission.dto.DeptDataPermissionRespDTO;
import cn.iocoder.yudao.module.system.enums.ApiConstants;
-import io.swagger.annotations.Api;
-import io.swagger.annotations.ApiImplicitParam;
-import io.swagger.annotations.ApiImplicitParams;
-import io.swagger.annotations.ApiOperation;
+import io.swagger.v3.oas.annotations.tags.Tag;
+import io.swagger.v3.oas.annotations.Parameter;
+import io.swagger.v3.oas.annotations.Parameters;
+import io.swagger.v3.oas.annotations.Operation;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestParam;
@@ -15,37 +15,37 @@ import java.util.Collection;
import java.util.Set;
@FeignClient(name = ApiConstants.NAME) // TODO 芋艿:fallbackFactory =
-@Api(tags = "RPC 服务 - 权限")
+@Tag(name = "RPC 服务 - 权限")
public interface PermissionApi {
String PREFIX = ApiConstants.PREFIX + "/permission";
@GetMapping(PREFIX + "/user-role-id-list-by-role-id")
- @ApiOperation("获得拥有多个角色的用户编号集合")
- @ApiImplicitParam(name = "roleIds", value = "角色编号集合", example = "1,2", required = true, allowMultiple = true)
+ @Operation(summary = "获得拥有多个角色的用户编号集合")
+ @Parameter(name = "roleIds", description = "角色编号集合", example = "1,2", required = true)
CommonResult> getUserRoleIdListByRoleIds(@RequestParam("roleIds") Collection roleIds);
@GetMapping(PREFIX + "/has-any-permissions")
- @ApiOperation("判断是否有权限,任一一个即可")
- @ApiImplicitParams({
- @ApiImplicitParam(name = "userId", value = "用户编号", example = "1", required = true, dataTypeClass = Long.class),
- @ApiImplicitParam(name = "permissions", value = "权限", example = "read,write", required = true, allowMultiple = true)
+ @Operation(summary = "判断是否有权限,任一一个即可")
+ @Parameters({
+ @Parameter(name = "userId", description = "用户编号", example = "1", required = true),
+ @Parameter(name = "permissions", description = "权限", example = "read,write", required = true)
})
CommonResult hasAnyPermissions(@RequestParam("userId") Long userId,
@RequestParam("permissions") String... permissions);
@GetMapping(PREFIX + "/has-any-roles")
- @ApiOperation("判断是否有角色,任一一个即可")
- @ApiImplicitParams({
- @ApiImplicitParam(name = "userId", value = "用户编号", example = "1", required = true, dataTypeClass = Long.class),
- @ApiImplicitParam(name = "roles", value = "角色数组", example = "2", required = true, allowMultiple = true)
+ @Operation(summary = "判断是否有角色,任一一个即可")
+ @Parameters({
+ @Parameter(name = "userId", description = "用户编号", example = "1", required = true),
+ @Parameter(name = "roles", description = "角色数组", example = "2", required = true)
})
CommonResult hasAnyRoles(@RequestParam("userId") Long userId,
@RequestParam("roles") String... roles);
@GetMapping(PREFIX + "/get-dept-data-permission")
- @ApiOperation("获得登陆用户的部门数据权限")
- @ApiImplicitParam(name = "userId", value = "用户编号", example = "2", required = true, dataTypeClass = Long.class)
+ @Operation(summary = "获得登陆用户的部门数据权限")
+ @Parameter(name = "userId", description = "用户编号", example = "2", required = true)
CommonResult getDeptDataPermission(@RequestParam("userId") Long userId);
-}
+}
\ No newline at end of file
diff --git a/yudao-module-system/yudao-module-system-api/src/main/java/cn/iocoder/yudao/module/system/api/permission/RoleApi.java b/yudao-module-system/yudao-module-system-api/src/main/java/cn/iocoder/yudao/module/system/api/permission/RoleApi.java
index 84a5b1966..33c6fa23e 100644
--- a/yudao-module-system/yudao-module-system-api/src/main/java/cn/iocoder/yudao/module/system/api/permission/RoleApi.java
+++ b/yudao-module-system/yudao-module-system-api/src/main/java/cn/iocoder/yudao/module/system/api/permission/RoleApi.java
@@ -2,9 +2,9 @@ package cn.iocoder.yudao.module.system.api.permission;
import cn.iocoder.yudao.framework.common.pojo.CommonResult;
import cn.iocoder.yudao.module.system.enums.ApiConstants;
-import io.swagger.annotations.Api;
-import io.swagger.annotations.ApiImplicitParam;
-import io.swagger.annotations.ApiOperation;
+import io.swagger.v3.oas.annotations.tags.Tag;
+import io.swagger.v3.oas.annotations.Parameter;
+import io.swagger.v3.oas.annotations.Operation;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestParam;
@@ -12,14 +12,14 @@ import org.springframework.web.bind.annotation.RequestParam;
import java.util.Collection;
@FeignClient(name = ApiConstants.NAME) // TODO 芋艿:fallbackFactory =
-@Api(tags = "RPC 服务 - 角色")
+@Tag(name = "RPC 服务 - 角色")
public interface RoleApi {
String PREFIX = ApiConstants.PREFIX + "/role";
@GetMapping(PREFIX + "/valid")
- @ApiOperation("校验角色是否合法")
- @ApiImplicitParam(name = "ids", value = "角色编号数组", example = "1,2", required = true, allowMultiple = true)
+ @Operation(summary = "校验角色是否合法")
+ @Parameter(name = "ids", description = "角色编号数组", example = "1,2", required = true)
CommonResult validRoleList(@RequestParam("ids") Collection ids);
-}
+}
\ No newline at end of file
diff --git a/yudao-module-system/yudao-module-system-api/src/main/java/cn/iocoder/yudao/module/system/api/sensitiveword/SensitiveWordApi.java b/yudao-module-system/yudao-module-system-api/src/main/java/cn/iocoder/yudao/module/system/api/sensitiveword/SensitiveWordApi.java
index 916d09a91..35b6b3f5c 100644
--- a/yudao-module-system/yudao-module-system-api/src/main/java/cn/iocoder/yudao/module/system/api/sensitiveword/SensitiveWordApi.java
+++ b/yudao-module-system/yudao-module-system-api/src/main/java/cn/iocoder/yudao/module/system/api/sensitiveword/SensitiveWordApi.java
@@ -2,10 +2,10 @@ package cn.iocoder.yudao.module.system.api.sensitiveword;
import cn.iocoder.yudao.framework.common.pojo.CommonResult;
import cn.iocoder.yudao.module.system.enums.ApiConstants;
-import io.swagger.annotations.Api;
-import io.swagger.annotations.ApiImplicitParam;
-import io.swagger.annotations.ApiImplicitParams;
-import io.swagger.annotations.ApiOperation;
+import io.swagger.v3.oas.annotations.tags.Tag;
+import io.swagger.v3.oas.annotations.Parameter;
+import io.swagger.v3.oas.annotations.Parameters;
+import io.swagger.v3.oas.annotations.Operation;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestParam;
@@ -13,27 +13,27 @@ import org.springframework.web.bind.annotation.RequestParam;
import java.util.List;
@FeignClient(name = ApiConstants.NAME) // TODO 芋艿:fallbackFacx`tory =
-@Api(tags = "RPC 服务 - 敏感词")
+@Tag(name = "RPC 服务 - 敏感词")
public interface SensitiveWordApi {
String PREFIX = ApiConstants.PREFIX + "/sensitive-word";
@GetMapping(PREFIX + "/validate-text")
- @ApiOperation("获得文本所包含的不合法的敏感词数组")
- @ApiImplicitParams({
- @ApiImplicitParam(name = "text", value = "文本", example = "傻瓜", required = true, dataTypeClass = String.class),
- @ApiImplicitParam(name = "tags", value = "标签数组", example = "product,life", required = true, allowMultiple = true)
+ @Operation(summary = "获得文本所包含的不合法的敏感词数组")
+ @Parameters({
+ @Parameter(name = "text", description = "文本", example = "傻瓜", required = true),
+ @Parameter(name = "tags", description = "标签数组", example = "product,life", required = true)
})
CommonResult> validateText(@RequestParam("text") String text,
@RequestParam("tags") List tags);
@GetMapping(PREFIX + "/is-text-valid")
- @ApiOperation("判断文本是否包含敏感词")
- @ApiImplicitParams({
- @ApiImplicitParam(name = "text", value = "文本", example = "傻瓜", required = true, dataTypeClass = String.class),
- @ApiImplicitParam(name = "tags", value = "标签数组", example = "product,life", required = true, allowMultiple = true)
+ @Operation(summary = "判断文本是否包含敏感词")
+ @Parameters({
+ @Parameter(name = "text", description = "文本", example = "傻瓜", required = true),
+ @Parameter(name = "tags", description = "标签数组", example = "product,life", required = true)
})
CommonResult isTextValid(@RequestParam("text") String text,
@RequestParam("tags") List tags);
-}
+}
\ No newline at end of file
diff --git a/yudao-module-system/yudao-module-system-api/src/main/java/cn/iocoder/yudao/module/system/api/sms/SmsCodeApi.java b/yudao-module-system/yudao-module-system-api/src/main/java/cn/iocoder/yudao/module/system/api/sms/SmsCodeApi.java
index ca4830ecf..a68865201 100644
--- a/yudao-module-system/yudao-module-system-api/src/main/java/cn/iocoder/yudao/module/system/api/sms/SmsCodeApi.java
+++ b/yudao-module-system/yudao-module-system-api/src/main/java/cn/iocoder/yudao/module/system/api/sms/SmsCodeApi.java
@@ -5,8 +5,8 @@ import cn.iocoder.yudao.module.system.api.sms.dto.code.SmsCodeValidateReqDTO;
import cn.iocoder.yudao.module.system.api.sms.dto.code.SmsCodeSendReqDTO;
import cn.iocoder.yudao.module.system.api.sms.dto.code.SmsCodeUseReqDTO;
import cn.iocoder.yudao.module.system.enums.ApiConstants;
-import io.swagger.annotations.Api;
-import io.swagger.annotations.ApiOperation;
+import io.swagger.v3.oas.annotations.tags.Tag;
+import io.swagger.v3.oas.annotations.Operation;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
@@ -16,21 +16,21 @@ import org.springframework.web.bind.annotation.RequestBody;
import javax.validation.Valid;
@FeignClient(name = ApiConstants.NAME) // TODO 芋艿:fallbackFactory =
-@Api(tags = "RPC 服务 - 短信验证码")
+@Tag(name = "RPC 服务 - 短信验证码")
public interface SmsCodeApi {
String PREFIX = ApiConstants.PREFIX + "/oauth2/sms/code";
@PostMapping(PREFIX + "/send")
- @ApiOperation("创建短信验证码,并进行发送")
+ @Operation(summary = "创建短信验证码,并进行发送")
CommonResult sendSmsCode(@Valid @RequestBody SmsCodeSendReqDTO reqDTO);
@PutMapping(PREFIX + "/use")
- @ApiOperation("验证短信验证码,并进行使用")
+ @Operation(summary = "验证短信验证码,并进行使用")
CommonResult useSmsCode(@Valid @RequestBody SmsCodeUseReqDTO reqDTO);
@GetMapping(PREFIX + "/validate")
- @ApiOperation("检查验证码是否有效")
+ @Operation(summary = "检查验证码是否有效")
CommonResult validateSmsCode(@Valid @RequestBody SmsCodeValidateReqDTO reqDTO);
-}
+}
\ No newline at end of file
diff --git a/yudao-module-system/yudao-module-system-api/src/main/java/cn/iocoder/yudao/module/system/api/sms/SmsSendApi.java b/yudao-module-system/yudao-module-system-api/src/main/java/cn/iocoder/yudao/module/system/api/sms/SmsSendApi.java
index 59a02b9ae..93faa18f1 100644
--- a/yudao-module-system/yudao-module-system-api/src/main/java/cn/iocoder/yudao/module/system/api/sms/SmsSendApi.java
+++ b/yudao-module-system/yudao-module-system-api/src/main/java/cn/iocoder/yudao/module/system/api/sms/SmsSendApi.java
@@ -3,8 +3,8 @@ package cn.iocoder.yudao.module.system.api.sms;
import cn.iocoder.yudao.framework.common.pojo.CommonResult;
import cn.iocoder.yudao.module.system.api.sms.dto.send.SmsSendSingleToUserReqDTO;
import cn.iocoder.yudao.module.system.enums.ApiConstants;
-import io.swagger.annotations.Api;
-import io.swagger.annotations.ApiOperation;
+import io.swagger.v3.oas.annotations.tags.Tag;
+import io.swagger.v3.oas.annotations.Operation;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
@@ -12,17 +12,17 @@ import org.springframework.web.bind.annotation.RequestBody;
import javax.validation.Valid;
@FeignClient(name = ApiConstants.NAME) // TODO 芋艿:fallbackFactory =
-@Api(tags = "RPC 服务 - 短信发送")
+@Tag(name = "RPC 服务 - 短信发送")
public interface SmsSendApi {
String PREFIX = ApiConstants.PREFIX + "/sms/send";
@PostMapping(PREFIX + "/send-single-admin")
- @ApiOperation(value = "发送单条短信给 Admin 用户", notes = "在 mobile 为空时,使用 userId 加载对应 Admin 的手机号")
+ @Operation(summary = "发送单条短信给 Admin 用户", description = "在 mobile 为空时,使用 userId 加载对应 Admin 的手机号")
CommonResult sendSingleSmsToAdmin(@Valid @RequestBody SmsSendSingleToUserReqDTO reqDTO);
@PostMapping(PREFIX + "/send-single-member")
- @ApiOperation(value = "发送单条短信给 Member 用户", notes = "在 mobile 为空时,使用 userId 加载对应 Member 的手机号")
+ @Operation(summary = "发送单条短信给 Member 用户", description = "在 mobile 为空时,使用 userId 加载对应 Member 的手机号")
CommonResult sendSingleSmsToMember(@Valid @RequestBody SmsSendSingleToUserReqDTO reqDTO);
-}
+}
\ No newline at end of file
diff --git a/yudao-module-system/yudao-module-system-api/src/main/java/cn/iocoder/yudao/module/system/api/sms/dto/code/SmsCodeSendReqDTO.java b/yudao-module-system/yudao-module-system-api/src/main/java/cn/iocoder/yudao/module/system/api/sms/dto/code/SmsCodeSendReqDTO.java
index 9c23f7f51..2c0779f1b 100644
--- a/yudao-module-system/yudao-module-system-api/src/main/java/cn/iocoder/yudao/module/system/api/sms/dto/code/SmsCodeSendReqDTO.java
+++ b/yudao-module-system/yudao-module-system-api/src/main/java/cn/iocoder/yudao/module/system/api/sms/dto/code/SmsCodeSendReqDTO.java
@@ -3,27 +3,27 @@ package cn.iocoder.yudao.module.system.api.sms.dto.code;
import cn.iocoder.yudao.framework.common.validation.InEnum;
import cn.iocoder.yudao.framework.common.validation.Mobile;
import cn.iocoder.yudao.module.system.enums.sms.SmsSceneEnum;
-import io.swagger.annotations.ApiModel;
-import io.swagger.annotations.ApiModelProperty;
+import io.swagger.v3.oas.annotations.media.Schema;
+import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.NotNull;
-@ApiModel("RPC 服务 - 短信验证码的发送 Request DTO")
+@Schema(description = "RPC 服务 - 短信验证码的发送 Request DTO")
@Data
public class SmsCodeSendReqDTO {
- @ApiModelProperty(value = "手机号", required = true, example = "15601691300")
+ @Schema(description = "手机号", required = true, example = "15601691300")
@Mobile
@NotEmpty(message = "手机号不能为空")
private String mobile;
- @ApiModelProperty(value = "发送场景", required = true, example = "1")
+ @Schema(description = "发送场景", required = true, example = "1")
@NotNull(message = "发送场景不能为空")
@InEnum(SmsSceneEnum.class)
private Integer scene;
- @ApiModelProperty(value = "发送 IP", required = true, example = "10.20.30.40")
+ @Schema(description = "发送 IP", required = true, example = "10.20.30.40")
@NotEmpty(message = "发送 IP 不能为空")
private String createIp;
-}
+}
\ No newline at end of file
diff --git a/yudao-module-system/yudao-module-system-api/src/main/java/cn/iocoder/yudao/module/system/api/sms/dto/code/SmsCodeUseReqDTO.java b/yudao-module-system/yudao-module-system-api/src/main/java/cn/iocoder/yudao/module/system/api/sms/dto/code/SmsCodeUseReqDTO.java
index 40b682b79..b2641afd5 100644
--- a/yudao-module-system/yudao-module-system-api/src/main/java/cn/iocoder/yudao/module/system/api/sms/dto/code/SmsCodeUseReqDTO.java
+++ b/yudao-module-system/yudao-module-system-api/src/main/java/cn/iocoder/yudao/module/system/api/sms/dto/code/SmsCodeUseReqDTO.java
@@ -3,30 +3,30 @@ package cn.iocoder.yudao.module.system.api.sms.dto.code;
import cn.iocoder.yudao.framework.common.validation.InEnum;
import cn.iocoder.yudao.framework.common.validation.Mobile;
import cn.iocoder.yudao.module.system.enums.sms.SmsSceneEnum;
-import io.swagger.annotations.ApiModel;
-import io.swagger.annotations.ApiModelProperty;
+import io.swagger.v3.oas.annotations.media.Schema;
+import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.NotNull;
-@ApiModel("RPC 服务 - 短信验证码的使用 Request DTO")
+@Schema(description = "RPC 服务 - 短信验证码的使用 Request DTO")
@Data
public class SmsCodeUseReqDTO {
- @ApiModelProperty(value = "手机号", required = true, example = "15601691300")
+ @Schema(description = "手机号", required = true, example = "15601691300")
@Mobile
@NotEmpty(message = "手机号不能为空")
private String mobile;
- @ApiModelProperty(value = "发送场景", required = true, example = "1")
+ @Schema(description = "发送场景", required = true, example = "1")
@NotNull(message = "发送场景不能为空")
@InEnum(SmsSceneEnum.class)
private Integer scene;
- @ApiModelProperty(value = "验证码", required = true, example = "1024")
+ @Schema(description = "验证码", required = true, example = "1024")
@NotEmpty(message = "验证码")
private String code;
- @ApiModelProperty(value = "发送 IP", required = true, example = "10.20.30.40")
+ @Schema(description = "发送 IP", required = true, example = "10.20.30.40")
@NotEmpty(message = "使用 IP 不能为空")
private String usedIp;
-}
+}
\ No newline at end of file
diff --git a/yudao-module-system/yudao-module-system-api/src/main/java/cn/iocoder/yudao/module/system/api/sms/dto/code/SmsCodeValidateReqDTO.java b/yudao-module-system/yudao-module-system-api/src/main/java/cn/iocoder/yudao/module/system/api/sms/dto/code/SmsCodeValidateReqDTO.java
index c96d3fa83..9fba60262 100644
--- a/yudao-module-system/yudao-module-system-api/src/main/java/cn/iocoder/yudao/module/system/api/sms/dto/code/SmsCodeValidateReqDTO.java
+++ b/yudao-module-system/yudao-module-system-api/src/main/java/cn/iocoder/yudao/module/system/api/sms/dto/code/SmsCodeValidateReqDTO.java
@@ -3,27 +3,27 @@ package cn.iocoder.yudao.module.system.api.sms.dto.code;
import cn.iocoder.yudao.framework.common.validation.InEnum;
import cn.iocoder.yudao.framework.common.validation.Mobile;
import cn.iocoder.yudao.module.system.enums.sms.SmsSceneEnum;
-import io.swagger.annotations.ApiModel;
-import io.swagger.annotations.ApiModelProperty;
+import io.swagger.v3.oas.annotations.media.Schema;
+import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.NotNull;
-@ApiModel("RPC 服务 - 短信验证码的校验 Request DTO")
+@Schema(description = "RPC 服务 - 短信验证码的校验 Request DTO")
@Data
public class SmsCodeValidateReqDTO {
- @ApiModelProperty(value = "手机号", required = true, example = "15601691300")
+ @Schema(description = "手机号", required = true, example = "15601691300")
@Mobile
@NotEmpty(message = "手机号不能为空")
private String mobile;
- @ApiModelProperty(value = "发送场景", required = true, example = "1")
+ @Schema(description = "发送场景", required = true, example = "1")
@NotNull(message = "发送场景不能为空")
@InEnum(SmsSceneEnum.class)
private Integer scene;
- @ApiModelProperty(value = "验证码", required = true, example = "1024")
+ @Schema(description = "验证码", required = true, example = "1024")
@NotEmpty(message = "验证码")
private String code;
-}
+}
\ No newline at end of file
diff --git a/yudao-module-system/yudao-module-system-api/src/main/java/cn/iocoder/yudao/module/system/api/sms/dto/send/SmsSendSingleToUserReqDTO.java b/yudao-module-system/yudao-module-system-api/src/main/java/cn/iocoder/yudao/module/system/api/sms/dto/send/SmsSendSingleToUserReqDTO.java
index 683e1f633..45538386b 100644
--- a/yudao-module-system/yudao-module-system-api/src/main/java/cn/iocoder/yudao/module/system/api/sms/dto/send/SmsSendSingleToUserReqDTO.java
+++ b/yudao-module-system/yudao-module-system-api/src/main/java/cn/iocoder/yudao/module/system/api/sms/dto/send/SmsSendSingleToUserReqDTO.java
@@ -1,28 +1,28 @@
package cn.iocoder.yudao.module.system.api.sms.dto.send;
import cn.iocoder.yudao.framework.common.validation.Mobile;
-import io.swagger.annotations.ApiModel;
-import io.swagger.annotations.ApiModelProperty;
+import io.swagger.v3.oas.annotations.media.Schema;
+import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.NotNull;
import java.util.Map;
-@ApiModel("RPC 服务 - 短信发送给 Admin 或者 Member 用户 Request DTO")
+@Schema(description = "RPC 服务 - 短信发送给 Admin 或者 Member 用户 Request DTO")
@Data
public class SmsSendSingleToUserReqDTO {
- @ApiModelProperty(value = "用户编号", example = "1024")
+ @Schema(description = "用户编号", example = "1024")
private Long userId;
- @ApiModelProperty(value = "手机号", required = true, example = "15601691300")
+ @Schema(description = "手机号", required = true, example = "15601691300")
@Mobile
private String mobile;
- @ApiModelProperty(value = "短信模板编号", required = true, example = "USER_SEND")
+ @Schema(description = "短信模板编号", required = true, example = "USER_SEND")
@NotEmpty(message = "短信模板编号不能为空")
private String templateCode;
- @ApiModelProperty(value = "短信模板参数")
+ @Schema(description = "短信模板参数")
private Map templateParams;
-}
+}
\ No newline at end of file
diff --git a/yudao-module-system/yudao-module-system-api/src/main/java/cn/iocoder/yudao/module/system/api/social/SocialUserApi.java b/yudao-module-system/yudao-module-system-api/src/main/java/cn/iocoder/yudao/module/system/api/social/SocialUserApi.java
index f5e0b5ef2..00432635f 100644
--- a/yudao-module-system/yudao-module-system-api/src/main/java/cn/iocoder/yudao/module/system/api/social/SocialUserApi.java
+++ b/yudao-module-system/yudao-module-system-api/src/main/java/cn/iocoder/yudao/module/system/api/social/SocialUserApi.java
@@ -4,49 +4,49 @@ import cn.iocoder.yudao.framework.common.pojo.CommonResult;
import cn.iocoder.yudao.module.system.api.social.dto.SocialUserBindReqDTO;
import cn.iocoder.yudao.module.system.api.social.dto.SocialUserUnbindReqDTO;
import cn.iocoder.yudao.module.system.enums.ApiConstants;
-import io.swagger.annotations.Api;
-import io.swagger.annotations.ApiImplicitParam;
-import io.swagger.annotations.ApiImplicitParams;
-import io.swagger.annotations.ApiOperation;
+import io.swagger.v3.oas.annotations.tags.Tag;
+import io.swagger.v3.oas.annotations.Parameter;
+import io.swagger.v3.oas.annotations.Parameters;
+import io.swagger.v3.oas.annotations.Operation;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.*;
import javax.validation.Valid;
@FeignClient(name = ApiConstants.NAME) // TODO 芋艿:fallbackFactory =
-@Api(tags = "RPC 服务 - 社交用户")
+@Tag(name = "RPC 服务 - 社交用户")
public interface SocialUserApi {
String PREFIX = ApiConstants.PREFIX + "/social-user";
- @GetMapping(PREFIX + "/get-authorize-url")
- @ApiOperation("获得社交平台的授权 URL")
- @ApiImplicitParams({
- @ApiImplicitParam(name = "type", value = "社交平台的类型", example = "1", required = true, dataTypeClass = Integer.class),
- @ApiImplicitParam(name = "redirectUri", value = "重定向 URL", example = "https://www.iocoder.cn",required = true, dataTypeClass = String.class)
+ @GetMapping("PREFIX + /get-authorize-url")
+ @Operation(summary = "获得社交平台的授权 URL")
+ @Parameters({
+ @Parameter(name = "type", description = "社交平台的类型", example = "1", required = true),
+ @Parameter(name = "redirectUri", description = "重定向 URL", example = "https://www.iocoder.cn",required = true)
})
CommonResult getAuthorizeUrl(@RequestParam("type") Integer type,
@RequestParam("redirectUri") String redirectUri);
- @PostMapping(PREFIX + "/bind")
- @ApiOperation("绑定社交用户")
+ @PostMapping("PREFIX + /bind")
+ @Operation(summary = "绑定社交用户")
CommonResult bindSocialUser(@Valid @RequestBody SocialUserBindReqDTO reqDTO);
- @DeleteMapping(PREFIX + "/unbind")
- @ApiOperation("取消绑定社交用户")
+ @DeleteMapping("PREFIX + /unbind")
+ @Operation(summary = "取消绑定社交用户")
CommonResult unbindSocialUser(@Valid @RequestBody SocialUserUnbindReqDTO reqDTO);
- @GetMapping(PREFIX + "/get-bind-user-id")
- @ApiOperation("获得社交用户的绑定用户编号")
- @ApiImplicitParams({
- @ApiImplicitParam(name = "userType", value = "用户类型", example = "2", required = true, dataTypeClass = Integer.class),
- @ApiImplicitParam(name = "type", value = "社交平台的类型", example = "1", required = true, dataTypeClass = Integer.class),
- @ApiImplicitParam(name = "code", value = "授权码", required = true, example = "tudou", dataTypeClass = String.class),
- @ApiImplicitParam(name = "state", value = "state", required = true, example = "coke", dataTypeClass = String.class)
+ @GetMapping("PREFIX + /get-bind-user-id")
+ @Operation(summary = "获得社交用户的绑定用户编号")
+ @Parameters({
+ @Parameter(name = "userType", description = "用户类型", example = "2", required = true),
+ @Parameter(name = "type", description = "社交平台的类型", example = "1", required = true),
+ @Parameter(name = "code", description = "授权码", required = true, example = "tudou"),
+ @Parameter(name = "state", description = "state", required = true, example = "coke")
})
CommonResult getBindUserId(@RequestParam("userType") Integer userType,
@RequestParam("type") Integer type,
@RequestParam("code") String code,
@RequestParam("state") String state);
-}
+}
\ No newline at end of file
diff --git a/yudao-module-system/yudao-module-system-api/src/main/java/cn/iocoder/yudao/module/system/api/tenant/TenantApi.java b/yudao-module-system/yudao-module-system-api/src/main/java/cn/iocoder/yudao/module/system/api/tenant/TenantApi.java
index f5371432a..213926392 100644
--- a/yudao-module-system/yudao-module-system-api/src/main/java/cn/iocoder/yudao/module/system/api/tenant/TenantApi.java
+++ b/yudao-module-system/yudao-module-system-api/src/main/java/cn/iocoder/yudao/module/system/api/tenant/TenantApi.java
@@ -2,9 +2,9 @@ package cn.iocoder.yudao.module.system.api.tenant;
import cn.iocoder.yudao.framework.common.pojo.CommonResult;
import cn.iocoder.yudao.module.system.enums.ApiConstants;
-import io.swagger.annotations.Api;
-import io.swagger.annotations.ApiImplicitParam;
-import io.swagger.annotations.ApiOperation;
+import io.swagger.v3.oas.annotations.tags.Tag;
+import io.swagger.v3.oas.annotations.Parameter;
+import io.swagger.v3.oas.annotations.Operation;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestParam;
@@ -12,18 +12,18 @@ import org.springframework.web.bind.annotation.RequestParam;
import java.util.List;
@FeignClient(name = ApiConstants.NAME) // TODO 芋艿:fallbackFactory =
-@Api(tags = "RPC 服务 - 多租户")
+@Tag(name = "RPC 服务 - 多租户")
public interface TenantApi {
String PREFIX = ApiConstants.PREFIX + "/tenant";
@GetMapping(PREFIX + "/id-list")
- @ApiOperation("获得所有租户编号")
+ @Operation(summary = "获得所有租户编号")
CommonResult> getTenantIdList();
@GetMapping(PREFIX + "/valid")
- @ApiOperation("校验租户是否合法")
- @ApiImplicitParam(name = "id", value = "租户编号", required = true, example = "1024", dataTypeClass = Long.class)
+ @Operation(summary = "校验租户是否合法")
+ @Parameter(name = "id", description = "租户编号", required = true, example = "1024")
CommonResult validTenant(@RequestParam("id") Long id);
-}
+}
\ No newline at end of file
diff --git a/yudao-module-system/yudao-module-system-api/src/main/java/cn/iocoder/yudao/module/system/api/user/AdminUserApi.java b/yudao-module-system/yudao-module-system-api/src/main/java/cn/iocoder/yudao/module/system/api/user/AdminUserApi.java
index 721c309a4..f84773312 100644
--- a/yudao-module-system/yudao-module-system-api/src/main/java/cn/iocoder/yudao/module/system/api/user/AdminUserApi.java
+++ b/yudao-module-system/yudao-module-system-api/src/main/java/cn/iocoder/yudao/module/system/api/user/AdminUserApi.java
@@ -4,9 +4,9 @@ import cn.iocoder.yudao.framework.common.pojo.CommonResult;
import cn.iocoder.yudao.framework.common.util.collection.CollectionUtils;
import cn.iocoder.yudao.module.system.api.user.dto.AdminUserRespDTO;
import cn.iocoder.yudao.module.system.enums.ApiConstants;
-import io.swagger.annotations.Api;
-import io.swagger.annotations.ApiImplicitParam;
-import io.swagger.annotations.ApiOperation;
+import io.swagger.v3.oas.annotations.tags.Tag;
+import io.swagger.v3.oas.annotations.Parameter;
+import io.swagger.v3.oas.annotations.Operation;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestParam;
@@ -17,29 +17,29 @@ import java.util.Map;
import java.util.Set;
@FeignClient(name = ApiConstants.NAME) // TODO 芋艿:fallbackFactory =
-@Api(tags = "RPC 服务 - 管理员用户")
+@Tag(name = "RPC 服务 - 管理员用户")
public interface AdminUserApi {
String PREFIX = ApiConstants.PREFIX + "/user";
@GetMapping(PREFIX + "/get")
- @ApiOperation("通过用户 ID 查询用户")
- @ApiImplicitParam(name = "id", value = "用户编号", example = "1", required = true, dataTypeClass = Long.class)
+ @Operation(summary = "通过用户 ID 查询用户")
+ @Parameter(name = "id", description = "用户编号", example = "1", required = true)
CommonResult getUser(@RequestParam("id") Long id);
@GetMapping(PREFIX + "/list")
- @ApiOperation("通过用户 ID 查询用户们")
- @ApiImplicitParam(name = "ids", value = "部门编号数组", example = "1,2", required = true, allowMultiple = true)
- CommonResult> getUserList(@RequestParam("ids") Collection ids);
+ @Operation(summary = "通过用户 ID 查询用户们")
+ @Parameter(name = "ids", description = "部门编号数组", example = "1,2", required = true)
+ CommonResult> getUsers(@RequestParam("ids") Collection ids);
@GetMapping(PREFIX + "/list-by-dept-id")
- @ApiOperation("获得指定部门的用户数组")
- @ApiImplicitParam(name = "deptIds", value = "部门编号数组", example = "1,2", required = true, allowMultiple = true)
+ @Operation(summary = "获得指定部门的用户数组")
+ @Parameter(name = "deptIds", description = "部门编号数组", example = "1,2", required = true)
CommonResult> getUserListByDeptIds(@RequestParam("deptIds") Collection deptIds);
@GetMapping(PREFIX + "/list-by-post-id")
- @ApiOperation("获得指定岗位的用户数组")
- @ApiImplicitParam(name = "postIds", value = "岗位编号数组", example = "2,3", required = true, allowMultiple = true)
+ @Operation(summary = "获得指定岗位的用户数组")
+ @Parameter(name = "postIds", description = "岗位编号数组", example = "2,3", required = true)
CommonResult> getUserListByPostIds(@RequestParam("postIds") Collection postIds);
/**
@@ -49,12 +49,12 @@ public interface AdminUserApi {
* @return 用户 Map
*/
default Map getUserMap(Collection ids) {
- return CollectionUtils.convertMap(getUserList(ids).getCheckedData(), AdminUserRespDTO::getId);
+ return CollectionUtils.convertMap(getUsers(ids).getCheckedData(), AdminUserRespDTO::getId);
}
@GetMapping(PREFIX + "/valid")
- @ApiOperation("校验用户们是否有效")
- @ApiImplicitParam(name = "ids", value = "用户编号数组", example = "3,5", required = true)
+ @Operation(summary = "校验用户们是否有效")
+ @Parameter(name = "ids", description = "用户编号数组", example = "3,5", required = true)
CommonResult validUserList(@RequestParam("ids") Set ids);
}
diff --git a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/api/oauth2/OAuth2TokenApiImpl.java b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/api/oauth2/OAuth2TokenApiImpl.java
index 256c9202c..3c0e11829 100644
--- a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/api/oauth2/OAuth2TokenApiImpl.java
+++ b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/api/oauth2/OAuth2TokenApiImpl.java
@@ -7,7 +7,7 @@ import cn.iocoder.yudao.module.system.api.oauth2.dto.OAuth2AccessTokenRespDTO;
import cn.iocoder.yudao.module.system.convert.auth.OAuth2TokenConvert;
import cn.iocoder.yudao.module.system.dal.dataobject.oauth2.OAuth2AccessTokenDO;
import cn.iocoder.yudao.module.system.service.oauth2.OAuth2TokenService;
-import io.swagger.annotations.ApiOperation;
+import io.swagger.v3.oas.annotations.Operation;
import org.apache.dubbo.config.annotation.DubboService;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.RestController;
@@ -26,7 +26,7 @@ public class OAuth2TokenApiImpl implements OAuth2TokenApi {
private OAuth2TokenService oauth2TokenService;
@Override
- @ApiOperation("创建访问令牌")
+ @Operation(description = "创建访问令牌")
public CommonResult createAccessToken(OAuth2AccessTokenCreateReqDTO reqDTO) {
OAuth2AccessTokenDO accessTokenDO = oauth2TokenService.createAccessToken(
reqDTO.getUserId(), reqDTO.getUserType(), reqDTO.getClientId(), reqDTO.getScopes());
diff --git a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/api/user/AdminUserApiImpl.java b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/api/user/AdminUserApiImpl.java
index eb9adba11..5691c682d 100644
--- a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/api/user/AdminUserApiImpl.java
+++ b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/api/user/AdminUserApiImpl.java
@@ -33,7 +33,7 @@ public class AdminUserApiImpl implements AdminUserApi {
}
@Override
- public CommonResult> getUserList(Collection ids) {
+ public CommonResult> getUsers(Collection ids) {
List users = userService.getUserList(ids);
return success(UserConvert.INSTANCE.convertList4(users));
}
diff --git a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/auth/AuthController.java b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/auth/AuthController.java
index 41a5a414c..d6a3832fb 100644
--- a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/auth/AuthController.java
+++ b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/auth/AuthController.java
@@ -18,10 +18,10 @@ import cn.iocoder.yudao.module.system.service.permission.PermissionService;
import cn.iocoder.yudao.module.system.service.permission.RoleService;
import cn.iocoder.yudao.module.system.service.social.SocialUserService;
import cn.iocoder.yudao.module.system.service.user.AdminUserService;
-import io.swagger.annotations.Api;
-import io.swagger.annotations.ApiImplicitParam;
-import io.swagger.annotations.ApiImplicitParams;
-import io.swagger.annotations.ApiOperation;
+import io.swagger.v3.oas.annotations.tags.Tag;
+import io.swagger.v3.oas.annotations.Parameter;
+import io.swagger.v3.oas.annotations.Parameters;
+import io.swagger.v3.oas.annotations.Operation;
import lombok.extern.slf4j.Slf4j;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.*;
@@ -38,7 +38,7 @@ import static cn.iocoder.yudao.framework.security.core.util.SecurityFrameworkUti
import static cn.iocoder.yudao.framework.security.core.util.SecurityFrameworkUtils.obtainAuthorization;
import static java.util.Collections.singleton;
-@Api(tags = "管理后台 - 认证")
+@Tag(name = "管理后台 - 认证")
@RestController
@RequestMapping("/system/auth")
@Validated
@@ -61,7 +61,7 @@ public class AuthController {
@PostMapping("/login")
@PermitAll
- @ApiOperation("使用账号密码登录")
+ @Operation(summary = "使用账号密码登录")
@OperateLog(enable = false) // 避免 Post 请求被记录操作日志
public CommonResult login(@RequestBody @Valid AuthLoginReqVO reqVO) {
return success(authService.login(reqVO));
@@ -69,7 +69,7 @@ public class AuthController {
@PostMapping("/logout")
@PermitAll
- @ApiOperation("登出系统")
+ @Operation(summary = "登出系统")
@OperateLog(enable = false) // 避免 Post 请求被记录操作日志
public CommonResult logout(HttpServletRequest request) {
String token = obtainAuthorization(request, securityProperties.getTokenHeader());
@@ -81,15 +81,15 @@ public class AuthController {
@PostMapping("/refresh-token")
@PermitAll
- @ApiOperation("刷新令牌")
- @ApiImplicitParam(name = "refreshToken", value = "刷新令牌", required = true, dataTypeClass = String.class)
+ @Operation(summary = "刷新令牌")
+ @Parameter(name = "refreshToken", description = "刷新令牌", required = true)
@OperateLog(enable = false) // 避免 Post 请求被记录操作日志
public CommonResult refreshToken(@RequestParam("refreshToken") String refreshToken) {
return success(authService.refreshToken(refreshToken));
}
@GetMapping("/get-permission-info")
- @ApiOperation("获取登录用户的权限信息")
+ @Operation(summary = "获取登录用户的权限信息")
public CommonResult getPermissionInfo() {
// 获得用户信息
AdminUserDO user = userService.getUser(getLoginUserId());
@@ -108,8 +108,8 @@ public class AuthController {
}
@GetMapping("/list-menus")
- @ApiOperation("获得登录用户的菜单列表")
- public CommonResult> getMenuList() {
+ @Operation(summary = "获得登录用户的菜单列表")
+ public CommonResult> getMenus() {
// 获得角色列表
Set roleIds = permissionService.getUserRoleIdsFromCache(getLoginUserId(), singleton(CommonStatusEnum.ENABLE.getStatus()));
// 获得用户拥有的菜单列表
@@ -124,7 +124,7 @@ public class AuthController {
@PostMapping("/sms-login")
@PermitAll
- @ApiOperation("使用短信验证码登录")
+ @Operation(summary = "使用短信验证码登录")
@OperateLog(enable = false) // 避免 Post 请求被记录操作日志
public CommonResult smsLogin(@RequestBody @Valid AuthSmsLoginReqVO reqVO) {
return success(authService.smsLogin(reqVO));
@@ -132,7 +132,7 @@ public class AuthController {
@PostMapping("/send-sms-code")
@PermitAll
- @ApiOperation(value = "发送手机验证码")
+ @Operation(summary = "发送手机验证码")
@OperateLog(enable = false) // 避免 Post 请求被记录操作日志
public CommonResult sendLoginSmsCode(@RequestBody @Valid AuthSmsSendReqVO reqVO) {
authService.sendSmsCode(reqVO);
@@ -143,10 +143,10 @@ public class AuthController {
@GetMapping("/social-auth-redirect")
@PermitAll
- @ApiOperation("社交授权的跳转")
- @ApiImplicitParams({
- @ApiImplicitParam(name = "type", value = "社交类型", required = true, dataTypeClass = Integer.class),
- @ApiImplicitParam(name = "redirectUri", value = "回调路径", dataTypeClass = String.class)
+ @Operation(summary = "社交授权的跳转")
+ @Parameters({
+ @Parameter(name = "type", description = "社交类型", required = true),
+ @Parameter(name = "redirectUri", description = "回调路径")
})
public CommonResult socialLogin(@RequestParam("type") Integer type,
@RequestParam("redirectUri") String redirectUri) {
@@ -155,10 +155,10 @@ public class AuthController {
@PostMapping("/social-login")
@PermitAll
- @ApiOperation(value = "社交快捷登录,使用 code 授权码", notes = "适合未登录的用户,但是社交账号已绑定用户")
+ @Operation(summary = "社交快捷登录,使用 code 授权码", description = "适合未登录的用户,但是社交账号已绑定用户")
@OperateLog(enable = false) // 避免 Post 请求被记录操作日志
public CommonResult socialQuickLogin(@RequestBody @Valid AuthSocialLoginReqVO reqVO) {
return success(authService.socialLogin(reqVO));
}
-}
+}
\ No newline at end of file
diff --git a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/auth/vo/AuthLoginReqVO.java b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/auth/vo/AuthLoginReqVO.java
index bafc322e2..7d00a751b 100644
--- a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/auth/vo/AuthLoginReqVO.java
+++ b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/auth/vo/AuthLoginReqVO.java
@@ -3,8 +3,8 @@ package cn.iocoder.yudao.module.system.controller.admin.auth.vo;
import cn.hutool.core.util.StrUtil;
import cn.iocoder.yudao.framework.common.validation.InEnum;
import cn.iocoder.yudao.module.system.enums.social.SocialTypeEnum;
-import io.swagger.annotations.ApiModel;
-import io.swagger.annotations.ApiModelProperty;
+import io.swagger.v3.oas.annotations.media.Schema;
+import io.swagger.v3.oas.annotations.media.Schema;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
@@ -15,48 +15,48 @@ import javax.validation.constraints.AssertTrue;
import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.Pattern;
-@ApiModel(value = "管理后台 - 账号密码登录 Request VO", description = "如果登录并绑定社交用户,需要传递 social 开头的参数")
+@Schema(description = "管理后台 - 账号密码登录 Request VO,如果登录并绑定社交用户,需要传递 social 开头的参数")
@Data
@NoArgsConstructor
@AllArgsConstructor
@Builder
public class AuthLoginReqVO {
- @ApiModelProperty(value = "账号", required = true, example = "yudaoyuanma")
+ @Schema(description = "账号", required = true, example = "yudaoyuanma")
@NotEmpty(message = "登录账号不能为空")
@Length(min = 4, max = 16, message = "账号长度为 4-16 位")
@Pattern(regexp = "^[A-Za-z0-9]+$", message = "账号格式为数字以及字母")
private String username;
- @ApiModelProperty(value = "密码", required = true, example = "buzhidao")
+ @Schema(description = "密码", required = true, example = "buzhidao")
@NotEmpty(message = "密码不能为空")
@Length(min = 4, max = 16, message = "密码长度为 4-16 位")
private String password;
// ========== 图片验证码相关 ==========
- @ApiModelProperty(value = "验证码", required = true,
- example = "PfcH6mgr8tpXuMWFjvW6YVaqrswIuwmWI5dsVZSg7sGpWtDCUbHuDEXl3cFB1+VvCC/rAkSwK8Fad52FSuncVg==",
- notes = "验证码开启时,需要传递")
+ @Schema(description = "验证码,验证码开启时,需要传递", required = true,
+ example = "PfcH6mgr8tpXuMWFjvW6YVaqrswIuwmWI5dsVZSg7sGpWtDCUbHuDEXl3cFB1+VvCC/rAkSwK8Fad52FSuncVg==")
@NotEmpty(message = "验证码不能为空", groups = CodeEnableGroup.class)
private String captchaVerification;
// ========== 绑定社交登录时,需要传递如下参数 ==========
- @ApiModelProperty(value = "社交平台的类型", required = true, example = "10", notes = "参见 SysUserSocialTypeEnum 枚举值")
+ @Schema(description = "社交平台的类型,参见 SysUserSocialTypeEnum 枚举值", required = true, example = "10")
@InEnum(SocialTypeEnum.class)
private Integer socialType;
- @ApiModelProperty(value = "授权码", required = true, example = "1024")
+ @Schema(description = "授权码", required = true, example = "1024")
private String socialCode;
- @ApiModelProperty(value = "state", required = true, example = "9b2ffbc1-7425-4155-9894-9d5c08541d62")
+ @Schema(description = "state", required = true, example = "9b2ffbc1-7425-4155-9894-9d5c08541d62")
private String socialState;
/**
* 开启验证码的 Group
*/
- public interface CodeEnableGroup {}
+ public interface CodeEnableGroup {
+ }
@AssertTrue(message = "授权码不能为空")
public boolean isSocialCodeValid() {
@@ -68,4 +68,4 @@ public class AuthLoginReqVO {
return socialType == null || StrUtil.isNotEmpty(socialState);
}
-}
+}
\ No newline at end of file
diff --git a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/auth/vo/AuthLoginRespVO.java b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/auth/vo/AuthLoginRespVO.java
index 6e1882887..bc78f8b80 100644
--- a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/auth/vo/AuthLoginRespVO.java
+++ b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/auth/vo/AuthLoginRespVO.java
@@ -1,7 +1,7 @@
package cn.iocoder.yudao.module.system.controller.admin.auth.vo;
-import io.swagger.annotations.ApiModel;
-import io.swagger.annotations.ApiModelProperty;
+import io.swagger.v3.oas.annotations.media.Schema;
+import io.swagger.v3.oas.annotations.media.Schema;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
@@ -9,23 +9,23 @@ import lombok.NoArgsConstructor;
import java.time.LocalDateTime;
-@ApiModel("管理后台 - 登录 Response VO")
+@Schema(description = "管理后台 - 登录 Response VO")
@Data
@NoArgsConstructor
@AllArgsConstructor
@Builder
public class AuthLoginRespVO {
- @ApiModelProperty(value = "用户编号", required = true, example = "1024")
+ @Schema(description = "用户编号", required = true, example = "1024")
private Long userId;
- @ApiModelProperty(value = "访问令牌", required = true, example = "happy")
+ @Schema(description = "访问令牌", required = true, example = "happy")
private String accessToken;
- @ApiModelProperty(value = "刷新令牌", required = true, example = "nice")
+ @Schema(description = "刷新令牌", required = true, example = "nice")
private String refreshToken;
- @ApiModelProperty(value = "过期时间", required = true)
+ @Schema(description = "过期时间", required = true)
private LocalDateTime expiresTime;
-}
+}
\ No newline at end of file
diff --git a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/auth/vo/AuthMenuRespVO.java b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/auth/vo/AuthMenuRespVO.java
index abd4f0d8d..9f681de46 100644
--- a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/auth/vo/AuthMenuRespVO.java
+++ b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/auth/vo/AuthMenuRespVO.java
@@ -1,7 +1,6 @@
package cn.iocoder.yudao.module.system.controller.admin.auth.vo;
-import io.swagger.annotations.ApiModel;
-import io.swagger.annotations.ApiModelProperty;
+import io.swagger.v3.oas.annotations.media.Schema;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
@@ -9,41 +8,41 @@ import lombok.NoArgsConstructor;
import java.util.List;
-@ApiModel("管理后台 - 登录用户的菜单信息 Response VO")
+@Schema(description = "管理后台 - 登录用户的菜单信息 Response VO")
@Data
@NoArgsConstructor
@AllArgsConstructor
@Builder
public class AuthMenuRespVO {
- @ApiModelProperty(value = "菜单名称", required = true, example = "芋道")
+ @Schema(description = "菜单名称", required = true, example = "芋道")
private Long id;
- @ApiModelProperty(value = "父菜单 ID", required = true, example = "1024")
+ @Schema(description = "父菜单 ID", required = true, example = "1024")
private Long parentId;
- @ApiModelProperty(value = "菜单名称", required = true, example = "芋道")
+ @Schema(description = "菜单名称", required = true, example = "芋道")
private String name;
- @ApiModelProperty(value = "路由地址", example = "post", notes = "仅菜单类型为菜单或者目录时,才需要传")
+ @Schema(description = "路由地址,仅菜单类型为菜单或者目录时,才需要传", example = "post")
private String path;
- @ApiModelProperty(value = "组件路径", example = "system/post/index", notes = "仅菜单类型为菜单时,才需要传")
+ @Schema(description = "组件路径,仅菜单类型为菜单时,才需要传", example = "system/post/index")
private String component;
- @ApiModelProperty(value = "组件名", example = "SystemUser")
+ @Schema(description = "组件名", example = "SystemUser")
private String componentName;
- @ApiModelProperty(value = "菜单图标", example = "/menu/list", notes = "仅菜单类型为菜单或者目录时,才需要传")
+ @Schema(description = "菜单图标,仅菜单类型为菜单或者目录时,才需要传", example = "/menu/list")
private String icon;
- @ApiModelProperty(value = "是否可见", required = true, example = "false")
+ @Schema(description = "是否可见", required = true, example = "false")
private Boolean visible;
- @ApiModelProperty(value = "是否缓存", required = true, example = "false")
+ @Schema(description = "是否缓存", required = true, example = "false")
private Boolean keepAlive;
- @ApiModelProperty(value = "是否总是显示", example = "false")
+ @Schema(description = "是否总是显示", example = "false")
private Boolean alwaysShow;
/**
diff --git a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/auth/vo/AuthPermissionInfoRespVO.java b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/auth/vo/AuthPermissionInfoRespVO.java
index 0e809226c..9948a4a90 100644
--- a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/auth/vo/AuthPermissionInfoRespVO.java
+++ b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/auth/vo/AuthPermissionInfoRespVO.java
@@ -1,7 +1,7 @@
package cn.iocoder.yudao.module.system.controller.admin.auth.vo;
-import io.swagger.annotations.ApiModel;
-import io.swagger.annotations.ApiModelProperty;
+import io.swagger.v3.oas.annotations.media.Schema;
+import io.swagger.v3.oas.annotations.media.Schema;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
@@ -9,38 +9,38 @@ import lombok.NoArgsConstructor;
import java.util.Set;
-@ApiModel(value = "管理后台 - 登录用户的权限信息 Response VO", description = "额外包括用户信息和角色列表")
+@Schema(description = "管理后台 - 登录用户的权限信息 Response VO,额外包括用户信息和角色列表")
@Data
@NoArgsConstructor
@AllArgsConstructor
@Builder
public class AuthPermissionInfoRespVO {
- @ApiModelProperty(value = "用户信息", required = true)
+ @Schema(description = "用户信息", required = true)
private UserVO user;
- @ApiModelProperty(value = "角色标识数组", required = true)
+ @Schema(description = "角色标识数组", required = true)
private Set roles;
- @ApiModelProperty(value = "操作权限数组", required = true)
+ @Schema(description = "操作权限数组", required = true)
private Set permissions;
- @ApiModel("用户信息 VO")
+ @Schema(description = "用户信息 VO")
@Data
@NoArgsConstructor
@AllArgsConstructor
@Builder
public static class UserVO {
- @ApiModelProperty(value = "用户编号", required = true, example = "1024")
+ @Schema(description = "用户编号", required = true, example = "1024")
private Long id;
- @ApiModelProperty(value = "用户昵称", required = true, example = "芋道源码")
+ @Schema(description = "用户昵称", required = true, example = "芋道源码")
private String nickname;
- @ApiModelProperty(value = "用户头像", required = true, example = "http://www.iocoder.cn/xx.jpg")
+ @Schema(description = "用户头像", required = true, example = "http://www.iocoder.cn/xx.jpg")
private String avatar;
}
-}
+}
\ No newline at end of file
diff --git a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/auth/vo/AuthSmsLoginReqVO.java b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/auth/vo/AuthSmsLoginReqVO.java
index b641bcca6..7c27b97d2 100644
--- a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/auth/vo/AuthSmsLoginReqVO.java
+++ b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/auth/vo/AuthSmsLoginReqVO.java
@@ -1,8 +1,8 @@
package cn.iocoder.yudao.module.system.controller.admin.auth.vo;
import cn.iocoder.yudao.framework.common.validation.Mobile;
-import io.swagger.annotations.ApiModel;
-import io.swagger.annotations.ApiModelProperty;
+import io.swagger.v3.oas.annotations.media.Schema;
+import io.swagger.v3.oas.annotations.media.Schema;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
@@ -10,20 +10,20 @@ import lombok.NoArgsConstructor;
import javax.validation.constraints.NotEmpty;
-@ApiModel("管理后台 - 短信验证码的登录 Request VO")
+@Schema(description = "管理后台 - 短信验证码的登录 Request VO")
@Data
@NoArgsConstructor
@AllArgsConstructor
@Builder
public class AuthSmsLoginReqVO {
- @ApiModelProperty(value = "手机号", required = true, example = "yudaoyuanma")
+ @Schema(description = "手机号", required = true, example = "yudaoyuanma")
@NotEmpty(message = "手机号不能为空")
@Mobile
private String mobile;
- @ApiModelProperty(value = "短信验证码", required = true, example = "1024")
+ @Schema(description = "短信验证码", required = true, example = "1024")
@NotEmpty(message = "验证码不能为空")
private String code;
-}
+}
\ No newline at end of file
diff --git a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/auth/vo/AuthSmsSendReqVO.java b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/auth/vo/AuthSmsSendReqVO.java
index 0df9a521e..914e4311d 100644
--- a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/auth/vo/AuthSmsSendReqVO.java
+++ b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/auth/vo/AuthSmsSendReqVO.java
@@ -3,8 +3,8 @@ package cn.iocoder.yudao.module.system.controller.admin.auth.vo;
import cn.iocoder.yudao.framework.common.validation.InEnum;
import cn.iocoder.yudao.framework.common.validation.Mobile;
import cn.iocoder.yudao.module.system.enums.sms.SmsSceneEnum;
-import io.swagger.annotations.ApiModel;
-import io.swagger.annotations.ApiModelProperty;
+import io.swagger.v3.oas.annotations.media.Schema;
+import io.swagger.v3.oas.annotations.media.Schema;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
@@ -13,21 +13,21 @@ import lombok.NoArgsConstructor;
import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.NotNull;
-@ApiModel("管理后台 - 发送手机验证码 Request VO")
+@Schema(description = "管理后台 - 发送手机验证码 Request VO")
@Data
@NoArgsConstructor
@AllArgsConstructor
@Builder
public class AuthSmsSendReqVO {
- @ApiModelProperty(value = "手机号", required = true, example = "yudaoyuanma")
+ @Schema(description = "手机号", required = true, example = "yudaoyuanma")
@NotEmpty(message = "手机号不能为空")
@Mobile
private String mobile;
- @ApiModelProperty(value = "短信场景", required = true, example = "1")
+ @Schema(description = "短信场景", required = true, example = "1")
@NotNull(message = "发送场景不能为空")
@InEnum(SmsSceneEnum.class)
private Integer scene;
-}
+}
\ No newline at end of file
diff --git a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/auth/vo/AuthSocialBindLoginReqVO.java b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/auth/vo/AuthSocialBindLoginReqVO.java
index cefe40d14..6977bb819 100644
--- a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/auth/vo/AuthSocialBindLoginReqVO.java
+++ b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/auth/vo/AuthSocialBindLoginReqVO.java
@@ -2,8 +2,8 @@ package cn.iocoder.yudao.module.system.controller.admin.auth.vo;
import cn.iocoder.yudao.framework.common.validation.InEnum;
import cn.iocoder.yudao.module.system.enums.social.SocialTypeEnum;
-import io.swagger.annotations.ApiModel;
-import io.swagger.annotations.ApiModelProperty;
+import io.swagger.v3.oas.annotations.media.Schema;
+import io.swagger.v3.oas.annotations.media.Schema;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
@@ -14,35 +14,35 @@ import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Pattern;
-@ApiModel("管理后台 - 社交绑定登录 Request VO,使用 code 授权码 + 账号密码")
+@Schema(description = "管理后台 - 社交绑定登录 Request VO,使用 code 授权码 + 账号密码")
@Data
@NoArgsConstructor
@AllArgsConstructor
@Builder
public class AuthSocialBindLoginReqVO {
- @ApiModelProperty(value = "社交平台的类型", required = true, example = "10", notes = "参见 UserSocialTypeEnum 枚举值")
+ @Schema(description = "社交平台的类型,参见 UserSocialTypeEnum 枚举值", required = true, example = "10" )
@InEnum(SocialTypeEnum.class)
@NotNull(message = "社交平台的类型不能为空")
private Integer type;
- @ApiModelProperty(value = "授权码", required = true, example = "1024")
+ @Schema(description = "授权码", required = true, example = "1024")
@NotEmpty(message = "授权码不能为空")
private String code;
- @ApiModelProperty(value = "state", required = true, example = "9b2ffbc1-7425-4155-9894-9d5c08541d62")
+ @Schema(description = "state", required = true, example = "9b2ffbc1-7425-4155-9894-9d5c08541d62")
@NotEmpty(message = "state 不能为空")
private String state;
- @ApiModelProperty(value = "账号", required = true, example = "yudaoyuanma")
+ @Schema(description = "账号", required = true, example = "yudaoyuanma")
@NotEmpty(message = "登录账号不能为空")
@Length(min = 4, max = 16, message = "账号长度为 4-16 位")
@Pattern(regexp = "^[A-Za-z0-9]+$", message = "账号格式为数字以及字母")
private String username;
- @ApiModelProperty(value = "密码", required = true, example = "buzhidao")
+ @Schema(description = "密码", required = true, example = "buzhidao")
@NotEmpty(message = "密码不能为空")
@Length(min = 4, max = 16, message = "密码长度为 4-16 位")
private String password;
-}
+}
\ No newline at end of file
diff --git a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/auth/vo/AuthSocialLoginReqVO.java b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/auth/vo/AuthSocialLoginReqVO.java
index e52a49288..cd86b1778 100644
--- a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/auth/vo/AuthSocialLoginReqVO.java
+++ b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/auth/vo/AuthSocialLoginReqVO.java
@@ -2,8 +2,8 @@ package cn.iocoder.yudao.module.system.controller.admin.auth.vo;
import cn.iocoder.yudao.framework.common.validation.InEnum;
import cn.iocoder.yudao.module.system.enums.social.SocialTypeEnum;
-import io.swagger.annotations.ApiModel;
-import io.swagger.annotations.ApiModelProperty;
+import io.swagger.v3.oas.annotations.media.Schema;
+import io.swagger.v3.oas.annotations.media.Schema;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
@@ -12,24 +12,24 @@ import lombok.NoArgsConstructor;
import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.NotNull;
-@ApiModel("管理后台 - 社交绑定登录 Request VO,使用 code 授权码 + 账号密码")
+@Schema(description = "管理后台 - 社交绑定登录 Request VO,使用 code 授权码 + 账号密码")
@Data
@NoArgsConstructor
@AllArgsConstructor
@Builder
public class AuthSocialLoginReqVO {
- @ApiModelProperty(value = "社交平台的类型", required = true, example = "10", notes = "参见 UserSocialTypeEnum 枚举值")
+ @Schema(description = "社交平台的类型,参见 UserSocialTypeEnum 枚举值", required = true, example = "10")
@InEnum(SocialTypeEnum.class)
@NotNull(message = "社交平台的类型不能为空")
private Integer type;
- @ApiModelProperty(value = "授权码", required = true, example = "1024")
+ @Schema(description = "授权码", required = true, example = "1024")
@NotEmpty(message = "授权码不能为空")
private String code;
- @ApiModelProperty(value = "state", required = true, example = "9b2ffbc1-7425-4155-9894-9d5c08541d62")
+ @Schema(description = "state", required = true, example = "9b2ffbc1-7425-4155-9894-9d5c08541d62")
@NotEmpty(message = "state 不能为空")
private String state;
-}
+}
\ No newline at end of file
diff --git a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/captcha/CaptchaController.java b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/captcha/CaptchaController.java
index 9921c8ea8..38efeef57 100644
--- a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/captcha/CaptchaController.java
+++ b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/captcha/CaptchaController.java
@@ -6,8 +6,8 @@ import cn.iocoder.yudao.framework.operatelog.core.annotations.OperateLog;
import com.xingyuv.captcha.model.common.ResponseModel;
import com.xingyuv.captcha.model.vo.CaptchaVO;
import com.xingyuv.captcha.service.CaptchaService;
-import io.swagger.annotations.Api;
-import io.swagger.annotations.ApiOperation;
+import io.swagger.v3.oas.annotations.tags.Tag;
+import io.swagger.v3.oas.annotations.Operation;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
@@ -22,7 +22,7 @@ import javax.servlet.http.HttpServletRequest;
*
* @author 芋道源码
*/
-@Api(tags = "管理后台 - 验证码")
+@Tag(name = "管理后台 - 验证码")
@RestController("adminCaptchaController")
@RequestMapping("/system/captcha")
public class CaptchaController {
@@ -31,7 +31,7 @@ public class CaptchaController {
private CaptchaService captchaService;
@PostMapping({"/get"})
- @ApiOperation("获得验证码")
+ @Operation(summary = "获得验证码")
@PermitAll
@OperateLog(enable = false) // 避免 Post 请求被记录操作日志
public ResponseModel get(@RequestBody CaptchaVO data, HttpServletRequest request) {
@@ -41,7 +41,7 @@ public class CaptchaController {
}
@PostMapping("/check")
- @ApiOperation("校验验证码")
+ @Operation(summary = "校验验证码")
@PermitAll
@OperateLog(enable = false) // 避免 Post 请求被记录操作日志
public ResponseModel check(@RequestBody CaptchaVO data, HttpServletRequest request) {
@@ -58,4 +58,4 @@ public class CaptchaController {
return request.getRemoteAddr() + ua;
}
-}
+}
\ No newline at end of file
diff --git a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/dept/DeptController.java b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/dept/DeptController.java
index cff8a9c46..7731603e0 100644
--- a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/dept/DeptController.java
+++ b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/dept/DeptController.java
@@ -6,9 +6,9 @@ import cn.iocoder.yudao.module.system.controller.admin.dept.vo.dept.*;
import cn.iocoder.yudao.module.system.convert.dept.DeptConvert;
import cn.iocoder.yudao.module.system.dal.dataobject.dept.DeptDO;
import cn.iocoder.yudao.module.system.service.dept.DeptService;
-import io.swagger.annotations.Api;
-import io.swagger.annotations.ApiImplicitParam;
-import io.swagger.annotations.ApiOperation;
+import io.swagger.v3.oas.annotations.tags.Tag;
+import io.swagger.v3.oas.annotations.Parameter;
+import io.swagger.v3.oas.annotations.Operation;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.*;
@@ -20,7 +20,7 @@ import java.util.List;
import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success;
-@Api(tags = "管理后台 - 部门")
+@Tag(name = "管理后台 - 部门")
@RestController
@RequestMapping("/system/dept")
@Validated
@@ -30,7 +30,7 @@ public class DeptController {
private DeptService deptService;
@PostMapping("create")
- @ApiOperation("创建部门")
+ @Operation(summary = "创建部门")
@PreAuthorize("@ss.hasPermission('system:dept:create')")
public CommonResult createDept(@Valid @RequestBody DeptCreateReqVO reqVO) {
Long deptId = deptService.createDept(reqVO);
@@ -38,7 +38,7 @@ public class DeptController {
}
@PutMapping("update")
- @ApiOperation("更新部门")
+ @Operation(summary = "更新部门")
@PreAuthorize("@ss.hasPermission('system:dept:update')")
public CommonResult updateDept(@Valid @RequestBody DeptUpdateReqVO reqVO) {
deptService.updateDept(reqVO);
@@ -46,8 +46,8 @@ public class DeptController {
}
@DeleteMapping("delete")
- @ApiOperation("删除部门")
- @ApiImplicitParam(name = "id", value = "编号", required = true, example = "1024", dataTypeClass = Long.class)
+ @Operation(summary = "删除部门")
+ @Parameter(name = "id", description = "编号", required = true, example = "1024")
@PreAuthorize("@ss.hasPermission('system:dept:delete')")
public CommonResult deleteDept(@RequestParam("id") Long id) {
deptService.deleteDept(id);
@@ -55,17 +55,17 @@ public class DeptController {
}
@GetMapping("/list")
- @ApiOperation("获取部门列表")
+ @Operation(summary = "获取部门列表")
@PreAuthorize("@ss.hasPermission('system:dept:query')")
- public CommonResult> getDeptList(DeptListReqVO reqVO) {
+ public CommonResult> listDepts(DeptListReqVO reqVO) {
List list = deptService.getDeptList(reqVO);
list.sort(Comparator.comparing(DeptDO::getSort));
return success(DeptConvert.INSTANCE.convertList(list));
}
@GetMapping("/list-all-simple")
- @ApiOperation(value = "获取部门精简信息列表", notes = "只包含被开启的部门,主要用于前端的下拉选项")
- public CommonResult> getSimpleDeptList() {
+ @Operation(summary = "获取部门精简信息列表", description = "只包含被开启的部门,主要用于前端的下拉选项")
+ public CommonResult> getSimpleDepts() {
// 获得部门列表,只要开启状态的
DeptListReqVO reqVO = new DeptListReqVO();
reqVO.setStatus(CommonStatusEnum.ENABLE.getStatus());
@@ -76,11 +76,11 @@ public class DeptController {
}
@GetMapping("/get")
- @ApiOperation("获得部门信息")
- @ApiImplicitParam(name = "id", value = "编号", required = true, example = "1024", dataTypeClass = Long.class)
+ @Operation(summary = "获得部门信息")
+ @Parameter(name = "id", description = "编号", required = true, example = "1024")
@PreAuthorize("@ss.hasPermission('system:dept:query')")
public CommonResult getDept(@RequestParam("id") Long id) {
return success(DeptConvert.INSTANCE.convert(deptService.getDept(id)));
}
-}
+}
\ No newline at end of file
diff --git a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/dept/PostController.java b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/dept/PostController.java
index 0fc8af8aa..4f0956578 100644
--- a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/dept/PostController.java
+++ b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/dept/PostController.java
@@ -9,9 +9,9 @@ import cn.iocoder.yudao.module.system.controller.admin.dept.vo.post.*;
import cn.iocoder.yudao.module.system.convert.dept.PostConvert;
import cn.iocoder.yudao.module.system.dal.dataobject.dept.PostDO;
import cn.iocoder.yudao.module.system.service.dept.PostService;
-import io.swagger.annotations.Api;
-import io.swagger.annotations.ApiImplicitParam;
-import io.swagger.annotations.ApiOperation;
+import io.swagger.v3.oas.annotations.tags.Tag;
+import io.swagger.v3.oas.annotations.Parameter;
+import io.swagger.v3.oas.annotations.Operation;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.*;
@@ -27,7 +27,7 @@ import java.util.List;
import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success;
import static cn.iocoder.yudao.framework.operatelog.core.enums.OperateTypeEnum.EXPORT;
-@Api(tags = "管理后台 - 岗位")
+@Tag(name = "管理后台 - 岗位")
@RestController
@RequestMapping("/system/post")
@Validated
@@ -37,7 +37,7 @@ public class PostController {
private PostService postService;
@PostMapping("/create")
- @ApiOperation("创建岗位")
+ @Operation(summary = "创建岗位")
@PreAuthorize("@ss.hasPermission('system:post:create')")
public CommonResult createPost(@Valid @RequestBody PostCreateReqVO reqVO) {
Long postId = postService.createPost(reqVO);
@@ -45,7 +45,7 @@ public class PostController {
}
@PutMapping("/update")
- @ApiOperation("修改岗位")
+ @Operation(summary = "修改岗位")
@PreAuthorize("@ss.hasPermission('system:post:update')")
public CommonResult updatePost(@Valid @RequestBody PostUpdateReqVO reqVO) {
postService.updatePost(reqVO);
@@ -53,7 +53,7 @@ public class PostController {
}
@DeleteMapping("/delete")
- @ApiOperation("删除岗位")
+ @Operation(summary = "删除岗位")
@PreAuthorize("@ss.hasPermission('system:post:delete')")
public CommonResult deletePost(@RequestParam("id") Long id) {
postService.deletePost(id);
@@ -61,16 +61,16 @@ public class PostController {
}
@GetMapping(value = "/get")
- @ApiOperation("获得岗位信息")
- @ApiImplicitParam(name = "id", value = "岗位编号", required = true, example = "1024", dataTypeClass = Long.class)
+ @Operation(summary = "获得岗位信息")
+ @Parameter(name = "id", description = "岗位编号", required = true, example = "1024")
@PreAuthorize("@ss.hasPermission('system:post:query')")
public CommonResult getPost(@RequestParam("id") Long id) {
return success(PostConvert.INSTANCE.convert(postService.getPost(id)));
}
@GetMapping("/list-all-simple")
- @ApiOperation(value = "获取岗位精简信息列表", notes = "只包含被开启的岗位,主要用于前端的下拉选项")
- public CommonResult> getSimplePostList() {
+ @Operation(summary = "获取岗位精简信息列表", description = "只包含被开启的岗位,主要用于前端的下拉选项")
+ public CommonResult> getSimplePosts() {
// 获得岗位列表,只要开启状态的
List list = postService.getPostList(null, Collections.singleton(CommonStatusEnum.ENABLE.getStatus()));
// 排序后,返回给前端
@@ -79,14 +79,14 @@ public class PostController {
}
@GetMapping("/page")
- @ApiOperation("获得岗位分页列表")
+ @Operation(summary = "获得岗位分页列表")
@PreAuthorize("@ss.hasPermission('system:post:query')")
public CommonResult> getPostPage(@Validated PostPageReqVO reqVO) {
return success(PostConvert.INSTANCE.convertPage(postService.getPostPage(reqVO)));
}
@GetMapping("/export")
- @ApiOperation("岗位管理")
+ @Operation(summary = "岗位管理")
@PreAuthorize("@ss.hasPermission('system:post:export')")
@OperateLog(type = EXPORT)
public void export(HttpServletResponse response, @Validated PostExportReqVO reqVO) throws IOException {
@@ -96,4 +96,4 @@ public class PostController {
ExcelUtils.write(response, "岗位数据.xls", "岗位列表", PostExcelVO.class, data);
}
-}
+}
\ No newline at end of file
diff --git a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/dept/vo/dept/DeptBaseVO.java b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/dept/vo/dept/DeptBaseVO.java
index 699a27694..80637158b 100644
--- a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/dept/vo/dept/DeptBaseVO.java
+++ b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/dept/vo/dept/DeptBaseVO.java
@@ -1,6 +1,6 @@
package cn.iocoder.yudao.module.system.controller.admin.dept.vo.dept;
-import io.swagger.annotations.ApiModelProperty;
+import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import javax.validation.constraints.Email;
@@ -15,33 +15,33 @@ import javax.validation.constraints.Size;
@Data
public class DeptBaseVO {
- @ApiModelProperty(value = "菜单名称", required = true, example = "芋道")
+ @Schema(description = "菜单名称", required = true, example = "芋道")
@NotBlank(message = "部门名称不能为空")
@Size(max = 30, message = "部门名称长度不能超过30个字符")
private String name;
- @ApiModelProperty(value = "父菜单 ID", example = "1024")
+ @Schema(description = "父菜单 ID", example = "1024")
private Long parentId;
- @ApiModelProperty(value = "显示顺序不能为空", required = true, example = "1024")
+ @Schema(description = "显示顺序不能为空", required = true, example = "1024")
@NotNull(message = "显示顺序不能为空")
private Integer sort;
- @ApiModelProperty(value = "负责人的用户编号", example = "2048")
+ @Schema(description = "负责人的用户编号", example = "2048")
private Long leaderUserId;
- @ApiModelProperty(value = "联系电话", example = "15601691000")
+ @Schema(description = "联系电话", example = "15601691000")
@Size(max = 11, message = "联系电话长度不能超过11个字符")
private String phone;
- @ApiModelProperty(value = "邮箱", example = "yudao@iocoder.cn")
+ @Schema(description = "邮箱", example = "yudao@iocoder.cn")
@Email(message = "邮箱格式不正确")
@Size(max = 50, message = "邮箱长度不能超过50个字符")
private String email;
- @ApiModelProperty(value = "状态", required = true, example = "1", notes = "见 CommonStatusEnum 枚举")
+ @Schema(description = "状态,见 CommonStatusEnum 枚举", required = true, example = "1")
@NotNull(message = "状态不能为空")
// @InEnum(value = CommonStatusEnum.class, message = "修改状态必须是 {value}")
private Integer status;
-}
+}
\ No newline at end of file
diff --git a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/dept/vo/dept/DeptCreateReqVO.java b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/dept/vo/dept/DeptCreateReqVO.java
index efd6c39a3..5cf650c52 100644
--- a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/dept/vo/dept/DeptCreateReqVO.java
+++ b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/dept/vo/dept/DeptCreateReqVO.java
@@ -1,11 +1,11 @@
package cn.iocoder.yudao.module.system.controller.admin.dept.vo.dept;
-import io.swagger.annotations.ApiModel;
+import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.ToString;
-@ApiModel("管理后台 - 部门创建 Request VO")
+@Schema(description = "管理后台 - 部门创建 Request VO")
@Data
@EqualsAndHashCode(callSuper = true)
@ToString(callSuper = true)
diff --git a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/dept/vo/dept/DeptListReqVO.java b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/dept/vo/dept/DeptListReqVO.java
index c4ff55243..ae20e774b 100644
--- a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/dept/vo/dept/DeptListReqVO.java
+++ b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/dept/vo/dept/DeptListReqVO.java
@@ -1,17 +1,17 @@
package cn.iocoder.yudao.module.system.controller.admin.dept.vo.dept;
-import io.swagger.annotations.ApiModel;
-import io.swagger.annotations.ApiModelProperty;
+import io.swagger.v3.oas.annotations.media.Schema;
+import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
-@ApiModel("管理后台 - 部门列表 Request VO")
+@Schema(description = "管理后台 - 部门列表 Request VO")
@Data
public class DeptListReqVO {
- @ApiModelProperty(value = "部门名称", example = "芋道", notes = "模糊匹配")
+ @Schema(description = "部门名称,模糊匹配", example = "芋道")
private String name;
- @ApiModelProperty(value = "展示状态", example = "1", notes = "参见 CommonStatusEnum 枚举类")
+ @Schema(description = "展示状态,参见 CommonStatusEnum 枚举类", example = "1")
private Integer status;
-}
+}
\ No newline at end of file
diff --git a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/dept/vo/dept/DeptRespVO.java b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/dept/vo/dept/DeptRespVO.java
index a3361cdd6..36e977729 100644
--- a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/dept/vo/dept/DeptRespVO.java
+++ b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/dept/vo/dept/DeptRespVO.java
@@ -1,24 +1,24 @@
package cn.iocoder.yudao.module.system.controller.admin.dept.vo.dept;
-import io.swagger.annotations.ApiModel;
-import io.swagger.annotations.ApiModelProperty;
+import io.swagger.v3.oas.annotations.media.Schema;
+import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import lombok.EqualsAndHashCode;
import java.time.LocalDateTime;
-@ApiModel("管理后台 - 部门信息 Response VO")
+@Schema(description = "管理后台 - 部门信息 Response VO")
@Data
@EqualsAndHashCode(callSuper = true)
public class DeptRespVO extends DeptBaseVO {
- @ApiModelProperty(value = "部门编号", required = true, example = "1024")
+ @Schema(description = "部门编号", required = true, example = "1024")
private Long id;
- @ApiModelProperty(value = "状态", required = true, example = "1", notes = "参见 CommonStatusEnum 枚举类")
+ @Schema(description = "状态,参见 CommonStatusEnum 枚举类", required = true, example = "1")
private Integer status;
- @ApiModelProperty(value = "创建时间", required = true, example = "时间戳格式")
+ @Schema(description = "创建时间", required = true, example = "时间戳格式")
private LocalDateTime createTime;
-}
+}
\ No newline at end of file
diff --git a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/dept/vo/dept/DeptSimpleRespVO.java b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/dept/vo/dept/DeptSimpleRespVO.java
index 1a3d64f6e..3da8e14cb 100644
--- a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/dept/vo/dept/DeptSimpleRespVO.java
+++ b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/dept/vo/dept/DeptSimpleRespVO.java
@@ -1,24 +1,24 @@
package cn.iocoder.yudao.module.system.controller.admin.dept.vo.dept;
-import io.swagger.annotations.ApiModel;
-import io.swagger.annotations.ApiModelProperty;
+import io.swagger.v3.oas.annotations.media.Schema;
+import io.swagger.v3.oas.annotations.media.Schema;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
-@ApiModel("管理后台 - 部门精简信息 Response VO")
+@Schema(description = "管理后台 - 部门精简信息 Response VO")
@Data
@NoArgsConstructor
@AllArgsConstructor
public class DeptSimpleRespVO {
- @ApiModelProperty(value = "部门编号", required = true, example = "1024")
+ @Schema(description = "部门编号", required = true, example = "1024")
private Long id;
- @ApiModelProperty(value = "部门名称", required = true, example = "芋道")
+ @Schema(description = "部门名称", required = true, example = "芋道")
private String name;
- @ApiModelProperty(value = "父部门 ID", required = true, example = "1024")
+ @Schema(description = "父部门 ID", required = true, example = "1024")
private Long parentId;
-}
+}
\ No newline at end of file
diff --git a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/dept/vo/dept/DeptUpdateReqVO.java b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/dept/vo/dept/DeptUpdateReqVO.java
index 3e2f13a84..bf53453b9 100644
--- a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/dept/vo/dept/DeptUpdateReqVO.java
+++ b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/dept/vo/dept/DeptUpdateReqVO.java
@@ -1,19 +1,19 @@
package cn.iocoder.yudao.module.system.controller.admin.dept.vo.dept;
-import io.swagger.annotations.ApiModel;
-import io.swagger.annotations.ApiModelProperty;
+import io.swagger.v3.oas.annotations.media.Schema;
+import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import lombok.EqualsAndHashCode;
import javax.validation.constraints.NotNull;
-@ApiModel("管理后台 - 部门更新 Request VO")
+@Schema(description = "管理后台 - 部门更新 Request VO")
@Data
@EqualsAndHashCode(callSuper = true)
public class DeptUpdateReqVO extends DeptBaseVO {
- @ApiModelProperty(value = "部门编号", required = true, example = "1024")
+ @Schema(description = "部门编号", required = true, example = "1024")
@NotNull(message = "部门编号不能为空")
private Long id;
-}
+}
\ No newline at end of file
diff --git a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/dept/vo/post/PostBaseVO.java b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/dept/vo/post/PostBaseVO.java
index 98c1bf212..eaad42fc7 100644
--- a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/dept/vo/post/PostBaseVO.java
+++ b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/dept/vo/post/PostBaseVO.java
@@ -1,6 +1,6 @@
package cn.iocoder.yudao.module.system.controller.admin.dept.vo.post;
-import io.swagger.annotations.ApiModelProperty;
+import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import javax.validation.constraints.NotBlank;
@@ -14,24 +14,24 @@ import javax.validation.constraints.Size;
@Data
public class PostBaseVO {
- @ApiModelProperty(value = "岗位名称", required = true, example = "小博主")
+ @Schema(description = "岗位名称", required = true, example = "小博主")
@NotBlank(message = "岗位名称不能为空")
@Size(max = 50, message = "岗位名称长度不能超过50个字符")
private String name;
- @ApiModelProperty(value = "岗位编码", required = true, example = "yudao")
+ @Schema(description = "岗位编码", required = true, example = "yudao")
@NotBlank(message = "岗位编码不能为空")
@Size(max = 64, message = "岗位编码长度不能超过64个字符")
private String code;
- @ApiModelProperty(value = "显示顺序不能为空", required = true, example = "1024")
+ @Schema(description = "显示顺序不能为空", required = true, example = "1024")
@NotNull(message = "显示顺序不能为空")
private Integer sort;
- @ApiModelProperty(value = "状态", required = true, example = "1", notes = "参见 CommonStatusEnum 枚举类")
+ @Schema(description = "状态,参见 CommonStatusEnum 枚举类", required = true, example = "1")
private Integer status;
- @ApiModelProperty(value = "备注", example = "快乐的备注")
+ @Schema(description = "备注", example = "快乐的备注")
private String remark;
-}
+}
\ No newline at end of file
diff --git a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/dept/vo/post/PostCreateReqVO.java b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/dept/vo/post/PostCreateReqVO.java
index 547739c0d..b2e52e174 100644
--- a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/dept/vo/post/PostCreateReqVO.java
+++ b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/dept/vo/post/PostCreateReqVO.java
@@ -1,10 +1,10 @@
package cn.iocoder.yudao.module.system.controller.admin.dept.vo.post;
-import io.swagger.annotations.ApiModel;
+import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import lombok.EqualsAndHashCode;
-@ApiModel("管理后台 - 岗位创建 Request VO")
+@Schema(description = "管理后台 - 岗位创建 Request VO")
@Data
@EqualsAndHashCode(callSuper = true)
public class PostCreateReqVO extends PostBaseVO {
diff --git a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/dept/vo/post/PostExportReqVO.java b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/dept/vo/post/PostExportReqVO.java
index 735bfcce1..071e422b1 100644
--- a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/dept/vo/post/PostExportReqVO.java
+++ b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/dept/vo/post/PostExportReqVO.java
@@ -1,20 +1,20 @@
package cn.iocoder.yudao.module.system.controller.admin.dept.vo.post;
-import io.swagger.annotations.ApiModel;
-import io.swagger.annotations.ApiModelProperty;
+import io.swagger.v3.oas.annotations.media.Schema;
+import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
-@ApiModel(value = "管理后台 - 岗位导出 Request VO", description = "参数和 PostExcelVO 是一致的")
+@Schema(description = "管理后台 - 岗位导出 Request VO,参数和 PostExcelVO 是一致的")
@Data
public class PostExportReqVO {
- @ApiModelProperty(value = "岗位编码", example = "yudao", notes = "模糊匹配")
+ @Schema(description = "岗位编码,模糊匹配", example = "yudao")
private String code;
- @ApiModelProperty(value = "岗位名称", example = "芋道", notes = "模糊匹配")
+ @Schema(description = "岗位名称,模糊匹配", example = "芋道")
private String name;
- @ApiModelProperty(value = "展示状态", example = "1", notes = "参见 CommonStatusEnum 枚举类")
+ @Schema(description = "展示状态,参见 CommonStatusEnum 枚举类", example = "1")
private Integer status;
-}
+}
\ No newline at end of file
diff --git a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/dept/vo/post/PostListReqVO.java b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/dept/vo/post/PostListReqVO.java
index 58ba469e1..6796a1c66 100644
--- a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/dept/vo/post/PostListReqVO.java
+++ b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/dept/vo/post/PostListReqVO.java
@@ -1,19 +1,19 @@
package cn.iocoder.yudao.module.system.controller.admin.dept.vo.post;
-import io.swagger.annotations.ApiModel;
-import io.swagger.annotations.ApiModelProperty;
+import io.swagger.v3.oas.annotations.media.Schema;
+import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import lombok.EqualsAndHashCode;
-@ApiModel("管理后台 - 岗位列表 Request VO")
+@Schema(description = "管理后台 - 岗位列表 Request VO")
@Data
@EqualsAndHashCode(callSuper = true)
public class PostListReqVO extends PostBaseVO {
- @ApiModelProperty(value = "岗位名称", example = "芋道", notes = "模糊匹配")
+ @Schema(description = "岗位名称,模糊匹配", example = "芋道")
private String name;
- @ApiModelProperty(value = "展示状态", example = "1", notes = "参见 CommonStatusEnum 枚举类")
+ @Schema(description = "展示状态,参见 CommonStatusEnum 枚举类", example = "1")
private Integer status;
-}
+}
\ No newline at end of file
diff --git a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/dept/vo/post/PostPageReqVO.java b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/dept/vo/post/PostPageReqVO.java
index be9ebeab4..edfbf0610 100644
--- a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/dept/vo/post/PostPageReqVO.java
+++ b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/dept/vo/post/PostPageReqVO.java
@@ -1,23 +1,23 @@
package cn.iocoder.yudao.module.system.controller.admin.dept.vo.post;
import cn.iocoder.yudao.framework.common.pojo.PageParam;
-import io.swagger.annotations.ApiModel;
-import io.swagger.annotations.ApiModelProperty;
+import io.swagger.v3.oas.annotations.media.Schema;
+import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import lombok.EqualsAndHashCode;
-@ApiModel("管理后台 - 岗位分页 Request VO")
+@Schema(description = "管理后台 - 岗位分页 Request VO")
@Data
@EqualsAndHashCode(callSuper = true)
public class PostPageReqVO extends PageParam {
- @ApiModelProperty(value = "岗位编码", example = "yudao", notes = "模糊匹配")
+ @Schema(description = "岗位编码,模糊匹配", example = "yudao")
private String code;
- @ApiModelProperty(value = "岗位名称", example = "芋道", notes = "模糊匹配")
+ @Schema(description = "岗位名称,模糊匹配", example = "芋道")
private String name;
- @ApiModelProperty(value = "展示状态", example = "1", notes = "参见 CommonStatusEnum 枚举类")
+ @Schema(description = "展示状态,参见 CommonStatusEnum 枚举类", example = "1")
private Integer status;
-}
+}
\ No newline at end of file
diff --git a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/dept/vo/post/PostRespVO.java b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/dept/vo/post/PostRespVO.java
index d6aa60d17..2604512f1 100644
--- a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/dept/vo/post/PostRespVO.java
+++ b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/dept/vo/post/PostRespVO.java
@@ -1,21 +1,21 @@
package cn.iocoder.yudao.module.system.controller.admin.dept.vo.post;
-import io.swagger.annotations.ApiModel;
-import io.swagger.annotations.ApiModelProperty;
+import io.swagger.v3.oas.annotations.media.Schema;
+import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import lombok.EqualsAndHashCode;
import java.time.LocalDateTime;
-@ApiModel("管理后台 - 岗位信息 Response VO")
+@Schema(description = "管理后台 - 岗位信息 Response VO")
@Data
@EqualsAndHashCode(callSuper = true)
public class PostRespVO extends PostBaseVO {
- @ApiModelProperty(value = "岗位序号", required = true, example = "1024")
+ @Schema(description = "岗位序号", required = true, example = "1024")
private Long id;
- @ApiModelProperty(value = "创建时间", required = true, example = "时间戳格式")
+ @Schema(description = "创建时间", required = true, example = "时间戳格式")
private LocalDateTime createTime;
-}
+}
\ No newline at end of file
diff --git a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/dept/vo/post/PostSimpleRespVO.java b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/dept/vo/post/PostSimpleRespVO.java
index 0334a7652..c947fe37e 100644
--- a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/dept/vo/post/PostSimpleRespVO.java
+++ b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/dept/vo/post/PostSimpleRespVO.java
@@ -1,21 +1,21 @@
package cn.iocoder.yudao.module.system.controller.admin.dept.vo.post;
-import io.swagger.annotations.ApiModel;
-import io.swagger.annotations.ApiModelProperty;
+import io.swagger.v3.oas.annotations.media.Schema;
+import io.swagger.v3.oas.annotations.media.Schema;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
-@ApiModel("管理后台 - 岗位精简信息 Response VO")
+@Schema(description = "管理后台 - 岗位精简信息 Response VO")
@Data
@NoArgsConstructor
@AllArgsConstructor
public class PostSimpleRespVO {
- @ApiModelProperty(value = "岗位编号", required = true, example = "1024")
+ @Schema(description = "岗位编号", required = true, example = "1024")
private Long id;
- @ApiModelProperty(value = "岗位名称", required = true, example = "芋道")
+ @Schema(description = "岗位名称", required = true, example = "芋道")
private String name;
-}
+}
\ No newline at end of file
diff --git a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/dept/vo/post/PostUpdateReqVO.java b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/dept/vo/post/PostUpdateReqVO.java
index aeb91998b..64defa524 100644
--- a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/dept/vo/post/PostUpdateReqVO.java
+++ b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/dept/vo/post/PostUpdateReqVO.java
@@ -1,19 +1,19 @@
package cn.iocoder.yudao.module.system.controller.admin.dept.vo.post;
-import io.swagger.annotations.ApiModel;
-import io.swagger.annotations.ApiModelProperty;
+import io.swagger.v3.oas.annotations.media.Schema;
+import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import lombok.EqualsAndHashCode;
import javax.validation.constraints.NotNull;
-@ApiModel("管理后台 - 岗位更新 Request VO")
+@Schema(description = "管理后台 - 岗位更新 Request VO")
@Data
@EqualsAndHashCode(callSuper = true)
public class PostUpdateReqVO extends PostBaseVO {
- @ApiModelProperty(value = "岗位编号", required = true, example = "1024")
+ @Schema(description = "岗位编号", required = true, example = "1024")
@NotNull(message = "岗位编号不能为空")
private Long id;
-}
+}
\ No newline at end of file
diff --git a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/dict/DictDataController.java b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/dict/DictDataController.java
index 3679e2d00..e47814b23 100644
--- a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/dict/DictDataController.java
+++ b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/dict/DictDataController.java
@@ -8,9 +8,9 @@ import cn.iocoder.yudao.framework.operatelog.core.annotations.OperateLog;
import cn.iocoder.yudao.module.system.controller.admin.dict.vo.data.*;
import cn.iocoder.yudao.module.system.convert.dict.DictDataConvert;
import cn.iocoder.yudao.module.system.service.dict.DictDataService;
-import io.swagger.annotations.Api;
-import io.swagger.annotations.ApiImplicitParam;
-import io.swagger.annotations.ApiOperation;
+import io.swagger.v3.oas.annotations.tags.Tag;
+import io.swagger.v3.oas.annotations.Parameter;
+import io.swagger.v3.oas.annotations.Operation;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.*;
@@ -24,7 +24,7 @@ import java.util.List;
import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success;
import static cn.iocoder.yudao.framework.operatelog.core.enums.OperateTypeEnum.EXPORT;
-@Api(tags = "管理后台 - 字典数据")
+@Tag(name = "管理后台 - 字典数据")
@RestController
@RequestMapping("/system/dict-data")
@Validated
@@ -34,7 +34,7 @@ public class DictDataController {
private DictDataService dictDataService;
@PostMapping("/create")
- @ApiOperation("新增字典数据")
+ @Operation(summary = "新增字典数据")
@PreAuthorize("@ss.hasPermission('system:dict:create')")
public CommonResult createDictData(@Valid @RequestBody DictDataCreateReqVO reqVO) {
Long dictDataId = dictDataService.createDictData(reqVO);
@@ -42,7 +42,7 @@ public class DictDataController {
}
@PutMapping("update")
- @ApiOperation("修改字典数据")
+ @Operation(summary = "修改字典数据")
@PreAuthorize("@ss.hasPermission('system:dict:update')")
public CommonResult updateDictData(@Valid @RequestBody DictDataUpdateReqVO reqVO) {
dictDataService.updateDictData(reqVO);
@@ -50,8 +50,8 @@ public class DictDataController {
}
@DeleteMapping("/delete")
- @ApiOperation("删除字典数据")
- @ApiImplicitParam(name = "id", value = "编号", required = true, example = "1024", dataTypeClass = Long.class)
+ @Operation(summary = "删除字典数据")
+ @Parameter(name = "id", description = "编号", required = true, example = "1024")
@PreAuthorize("@ss.hasPermission('system:dict:delete')")
public CommonResult deleteDictData(Long id) {
dictDataService.deleteDictData(id);
@@ -59,7 +59,7 @@ public class DictDataController {
}
@GetMapping("/list-all-simple")
- @ApiOperation(value = "获得全部字典数据列表", notes = "一般用于管理后台缓存字典数据在本地")
+ @Operation(summary = "获得全部字典数据列表", description = "一般用于管理后台缓存字典数据在本地")
// 无需添加权限认证,因为前端全局都需要
public CommonResult> getSimpleDictDataList() {
List list = dictDataService.getDictDataList();
@@ -67,22 +67,22 @@ public class DictDataController {
}
@GetMapping("/page")
- @ApiOperation("/获得字典类型的分页列表")
+ @Operation(summary = "/获得字典类型的分页列表")
@PreAuthorize("@ss.hasPermission('system:dict:query')")
public CommonResult> getDictTypePage(@Valid DictDataPageReqVO reqVO) {
return success(DictDataConvert.INSTANCE.convertPage(dictDataService.getDictDataPage(reqVO)));
}
@GetMapping(value = "/get")
- @ApiOperation("/查询字典数据详细")
- @ApiImplicitParam(name = "id", value = "编号", required = true, example = "1024", dataTypeClass = Long.class)
+ @Operation(summary = "/查询字典数据详细")
+ @Parameter(name = "id", description = "编号", required = true, example = "1024")
@PreAuthorize("@ss.hasPermission('system:dict:query')")
public CommonResult getDictData(@RequestParam("id") Long id) {
return success(DictDataConvert.INSTANCE.convert(dictDataService.getDictData(id)));
}
@GetMapping("/export")
- @ApiOperation("导出字典数据")
+ @Operation(summary = "导出字典数据")
@PreAuthorize("@ss.hasPermission('system:dict:export')")
@OperateLog(type = EXPORT)
public void export(HttpServletResponse response, @Valid DictDataExportReqVO reqVO) throws IOException {
@@ -92,4 +92,4 @@ public class DictDataController {
ExcelUtils.write(response, "字典数据.xls", "数据列表", DictDataExcelVO.class, data);
}
-}
+}
\ No newline at end of file
diff --git a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/dict/DictTypeController.java b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/dict/DictTypeController.java
index e1606b267..eee4d95bc 100644
--- a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/dict/DictTypeController.java
+++ b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/dict/DictTypeController.java
@@ -8,9 +8,9 @@ import cn.iocoder.yudao.module.system.controller.admin.dict.vo.type.*;
import cn.iocoder.yudao.module.system.convert.dict.DictTypeConvert;
import cn.iocoder.yudao.module.system.dal.dataobject.dict.DictTypeDO;
import cn.iocoder.yudao.module.system.service.dict.DictTypeService;
-import io.swagger.annotations.Api;
-import io.swagger.annotations.ApiImplicitParam;
-import io.swagger.annotations.ApiOperation;
+import io.swagger.v3.oas.annotations.tags.Tag;
+import io.swagger.v3.oas.annotations.Parameter;
+import io.swagger.v3.oas.annotations.Operation;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.*;
@@ -24,7 +24,7 @@ import java.util.List;
import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success;
import static cn.iocoder.yudao.framework.operatelog.core.enums.OperateTypeEnum.EXPORT;
-@Api(tags = "管理后台 - 字典类型")
+@Tag(name = "管理后台 - 字典类型")
@RestController
@RequestMapping("/system/dict-type")
@Validated
@@ -34,7 +34,7 @@ public class DictTypeController {
private DictTypeService dictTypeService;
@PostMapping("/create")
- @ApiOperation("创建字典类型")
+ @Operation(summary = "创建字典类型")
@PreAuthorize("@ss.hasPermission('system:dict:create')")
public CommonResult createDictType(@Valid @RequestBody DictTypeCreateReqVO reqVO) {
Long dictTypeId = dictTypeService.createDictType(reqVO);
@@ -42,7 +42,7 @@ public class DictTypeController {
}
@PutMapping("/update")
- @ApiOperation("修改字典类型")
+ @Operation(summary = "修改字典类型")
@PreAuthorize("@ss.hasPermission('system:dict:update')")
public CommonResult updateDictType(@Valid @RequestBody DictTypeUpdateReqVO reqVO) {
dictTypeService.updateDictType(reqVO);
@@ -50,23 +50,23 @@ public class DictTypeController {
}
@DeleteMapping("/delete")
- @ApiOperation("删除字典类型")
- @ApiImplicitParam(name = "id", value = "编号", required = true, example = "1024", dataTypeClass = Long.class)
+ @Operation(summary = "删除字典类型")
+ @Parameter(name = "id", description = "编号", required = true, example = "1024")
@PreAuthorize("@ss.hasPermission('system:dict:delete')")
public CommonResult deleteDictType(Long id) {
dictTypeService.deleteDictType(id);
return success(true);
}
- @ApiOperation("/获得字典类型的分页列表")
+ @Operation(summary = "/获得字典类型的分页列表")
@GetMapping("/page")
@PreAuthorize("@ss.hasPermission('system:dict:query')")
public CommonResult> pageDictTypes(@Valid DictTypePageReqVO reqVO) {
return success(DictTypeConvert.INSTANCE.convertPage(dictTypeService.getDictTypePage(reqVO)));
}
- @ApiOperation("/查询字典类型详细")
- @ApiImplicitParam(name = "id", value = "编号", required = true, example = "1024", dataTypeClass = Long.class)
+ @Operation(summary = "/查询字典类型详细")
+ @Parameter(name = "id", description = "编号", required = true, example = "1024")
@GetMapping(value = "/get")
@PreAuthorize("@ss.hasPermission('system:dict:query')")
public CommonResult getDictType(@RequestParam("id") Long id) {
@@ -74,14 +74,14 @@ public class DictTypeController {
}
@GetMapping("/list-all-simple")
- @ApiOperation(value = "获得全部字典类型列表", notes = "包括开启 + 禁用的字典类型,主要用于前端的下拉选项")
+ @Operation(summary = "获得全部字典类型列表", description = "包括开启 + 禁用的字典类型,主要用于前端的下拉选项")
// 无需添加权限认证,因为前端全局都需要
public CommonResult