From 1f6f7c245671a9ea8ad88193543e915c091e6b59 Mon Sep 17 00:00:00 2001
From: Uncarbon <75737767+uncarbon97@users.noreply.github.com>
Date: Sat, 6 Apr 2024 17:46:55 +0800
Subject: [PATCH] =?UTF-8?q?bump:=20=E5=8F=91=E5=B8=832.0.0?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
details see: https://helio.uncarbon.cc/#/i18n/zh-CN/appendix/change-log
---
README.md | 4 +-
api/admin-api/pom.xml | 8 +--
.../module/adminapi/aspect/SysLogAspect.java | 2 +-
.../SysLogAspectExtensionForSysUserLogin.java | 5 +-
.../adminapi/enums/AdminApiErrorEnum.java | 6 +-
.../model/response/AdminCaptchaVO.java | 8 +--
.../model/response/SelectOptionItemVO.java | 17 +++---
.../web/auth/AdminAuthController.java | 23 +++-----
.../common/AdminSelectOptionsController.java | 10 ++--
.../web/oss/AdminOssFileInfoController.java | 24 +++-----
.../oss/AdminOssUploadDownloadController.java | 35 +++++------
.../web/sys/AdminSysDataDictController.java | 58 +++++--------------
.../web/sys/AdminSysDeptController.java | 25 ++++----
.../web/sys/AdminSysLogController.java | 17 ++----
.../web/sys/AdminSysMenuController.java | 29 ++++------
.../web/sys/AdminSysParamController.java | 25 ++++----
.../web/sys/AdminSysRoleController.java | 27 ++++-----
.../web/sys/AdminSysTenantController.java | 25 ++++----
.../web/sys/AdminSysUserController.java | 57 +++++++-----------
api/app-api/pom.xml | 4 +-
.../module/appapi/web/AppAuthController.java | 17 +++---
bootstrap/pom.xml | 11 ++--
.../CustomInterceptorConfiguration.java | 11 +---
.../module/config/NotFoundConfiguration.java | 11 ++--
.../AdminSaTokenParseInterceptor.java | 4 +-
.../DefaultSaTokenParseInterceptor.java | 4 +-
.../src/main/resources/application-dev.yml | 19 +++---
.../src/main/resources/application-prod.yml | 19 +++---
.../src/main/resources/application-test.yml | 19 +++---
bootstrap/src/main/resources/application.yml | 9 +--
.../src/main/resources/logback-spring.xml | 1 +
.../java/cc/uncarbon/test/BasicUnitTest.java | 37 ------------
.../cc/uncarbon/test/ExampleUnitTest.java | 56 ++++++++++++++++++
.../uncarbon/test/SysLogServiceUnitTest.java | 36 ------------
pom.xml | 6 +-
service-module/oss/oss-facade/pom.xml | 2 +-
.../request/AdminListOssFileInfoDTO.java | 12 ++--
.../model/request/UploadFileAttributeDTO.java | 10 ++--
.../response/OssFileDownloadReplyBO.java | 10 ++--
.../oss/model/response/OssFileInfoBO.java | 28 ++++-----
.../model/response/OssFileUploadResultVO.java | 8 +--
service-module/oss/oss-service/pom.xml | 6 +-
.../module/oss/entity/OssFileInfoEntity.java | 22 +++----
service-module/oss/pom.xml | 4 +-
service-module/sys/pom.xml | 4 +-
service-module/sys/sys-facade/pom.xml | 2 +-
.../module/sys/constant/SysConstant.java | 7 ---
.../request/AdminBindRoleMenuRelationDTO.java | 6 +-
.../request/AdminBindUserRoleRelationDTO.java | 6 +-
.../AdminInsertOrUpdateSysDataDictDTO.java | 24 ++++----
.../AdminInsertOrUpdateSysDeptDTO.java | 16 ++---
.../AdminInsertOrUpdateSysMenuDTO.java | 28 ++++-----
.../AdminInsertOrUpdateSysParamDTO.java | 14 ++---
.../AdminInsertOrUpdateSysRoleDTO.java | 14 ++---
.../AdminInsertOrUpdateSysUserDTO.java | 30 +++++-----
.../model/request/AdminInsertSysLogDTO.java | 28 ++++-----
.../request/AdminInsertSysTenantDTO.java | 14 ++---
.../request/AdminListSysDataDictDTO.java | 4 +-
.../sys/model/request/AdminListSysLogDTO.java | 12 ++--
.../model/request/AdminListSysParamDTO.java | 6 +-
.../model/request/AdminListSysRoleDTO.java | 6 +-
.../model/request/AdminListSysTenantDTO.java | 8 +--
.../model/request/AdminListSysUserDTO.java | 6 +-
.../request/AdminResetSysUserPasswordDTO.java | 10 ++--
.../AdminUpdateCurrentSysUserPasswordDTO.java | 12 ++--
.../request/AdminUpdateSysTenantDTO.java | 16 ++---
.../sys/model/request/SysUserLoginDTO.java | 20 +++----
.../sys/model/response/IPLocationBO.java | 10 ++--
.../sys/model/response/SysDataDictBO.java | 24 ++++----
.../module/sys/model/response/SysDeptBO.java | 16 ++---
.../module/sys/model/response/SysLogBO.java | 22 +++----
.../module/sys/model/response/SysMenuBO.java | 32 +++++-----
.../module/sys/model/response/SysParamBO.java | 14 ++---
.../module/sys/model/response/SysRoleBO.java | 14 ++---
.../sys/model/response/SysTenantBO.java | 18 +++---
.../response/SysTenantKickOutUsersBO.java | 4 +-
.../module/sys/model/response/SysUserBO.java | 26 ++++-----
.../sys/model/response/SysUserBaseInfoBO.java | 14 ++---
.../sys/model/response/SysUserLoginBO.java | 20 +++----
.../sys/model/response/SysUserLoginVO.java | 10 ++--
.../model/response/VbenAdminMenuMetaVO.java | 8 +--
.../model/response/VbenAdminUserInfoVO.java | 8 +--
service-module/sys/sys-service/pom.xml | 4 +-
.../module/sys/biz/SysTenantFacadeImpl.java | 3 +-
.../module/sys/entity/SysDataDictEntity.java | 18 +++---
.../module/sys/entity/SysDeptEntity.java | 12 ++--
.../module/sys/entity/SysLogEntity.java | 28 ++++-----
.../module/sys/entity/SysMenuEntity.java | 20 +++----
.../module/sys/entity/SysParamEntity.java | 8 +--
.../module/sys/entity/SysRoleEntity.java | 6 +-
.../sys/entity/SysRoleMenuRelationEntity.java | 6 +-
.../module/sys/entity/SysTenantEntity.java | 10 ++--
.../sys/entity/SysUserDeptRelationEntity.java | 6 +-
.../module/sys/entity/SysUserEntity.java | 20 +++----
.../sys/entity/SysUserRoleRelationEntity.java | 6 +-
.../module/sys/mapper/SysUserMapper.java | 3 +-
.../sys/model/interior/UserDeptContainer.java | 3 +-
.../module/sys/service/SysMenuService.java | 27 ++++-----
.../module/sys/service/SysUserService.java | 4 +-
99 files changed, 678 insertions(+), 810 deletions(-)
delete mode 100644 bootstrap/src/test/java/cc/uncarbon/test/BasicUnitTest.java
create mode 100644 bootstrap/src/test/java/cc/uncarbon/test/ExampleUnitTest.java
delete mode 100644 bootstrap/src/test/java/cc/uncarbon/test/SysLogServiceUnitTest.java
diff --git a/README.md b/README.md
index 30858af..233ad6c 100644
--- a/README.md
+++ b/README.md
@@ -1,11 +1,11 @@
# helio-boot-modular
## 项目介绍
-基于 Spring Boot 2.7.x,是一款预置SaaS、RBAC能力的单体项目脚手架,适合初学者学习 JavaWeb 开发的良好实践
+基于 Spring Boot 3.x,是一款预置SaaS、RBAC能力的单体项目脚手架,适合初学者学习 JavaWeb 开发的良好实践
按职责拆分为多Maven模块,依然是大单体,但命名及用途对标`helio-cloud`;适合多人协作、但不打算使用微服务架构的团队
单模块版请移步至[helio-boot](https://github.com/uncarbon97/helio-boot)项目
-JDK compatibility: 1.8 - 21
+JDK compatibility: 17 - 21
【[前端演示站](https://helio-demo.uncarbon.cc/)】
【[官方文档](https://helio.uncarbon.cc/)】
diff --git a/api/admin-api/pom.xml b/api/admin-api/pom.xml
index 191a106..9aaf34d 100644
--- a/api/admin-api/pom.xml
+++ b/api/admin-api/pom.xml
@@ -8,19 +8,19 @@
cc.uncarbon.module
helio-boot-modular
- 1.11.0
+ 2.0.0
../../pom.xml
admin-api
- 1.11.0
+ 2.0.0
- 1.11.0
+ 2.0.0
- 1.11.0
+ 2.0.0
diff --git a/api/admin-api/src/main/java/cc/uncarbon/module/adminapi/aspect/SysLogAspect.java b/api/admin-api/src/main/java/cc/uncarbon/module/adminapi/aspect/SysLogAspect.java
index 537e1a6..7b80b8d 100644
--- a/api/admin-api/src/main/java/cc/uncarbon/module/adminapi/aspect/SysLogAspect.java
+++ b/api/admin-api/src/main/java/cc/uncarbon/module/adminapi/aspect/SysLogAspect.java
@@ -34,7 +34,7 @@
import org.springframework.scheduling.concurrent.ThreadPoolTaskExecutor;
import org.springframework.stereotype.Component;
-import javax.servlet.http.HttpServletRequest;
+import jakarta.servlet.http.HttpServletRequest;
import java.util.Arrays;
import java.util.LinkedHashMap;
import java.util.Map;
diff --git a/api/admin-api/src/main/java/cc/uncarbon/module/adminapi/aspect/extension/SysLogAspectExtensionForSysUserLogin.java b/api/admin-api/src/main/java/cc/uncarbon/module/adminapi/aspect/extension/SysLogAspectExtensionForSysUserLogin.java
index 852a122..abccd92 100644
--- a/api/admin-api/src/main/java/cc/uncarbon/module/adminapi/aspect/extension/SysLogAspectExtensionForSysUserLogin.java
+++ b/api/admin-api/src/main/java/cc/uncarbon/module/adminapi/aspect/extension/SysLogAspectExtensionForSysUserLogin.java
@@ -16,9 +16,8 @@ public class SysLogAspectExtensionForSysUserLogin extends DefaultSysLogAspectExt
@Override
public void beforeSaving(AdminInsertSysLogDTO insertSysLogDTO, JoinPoint joinPoint, SysLog annotation, Throwable e, Object ret) {
for (Object arg : joinPoint.getArgs()) {
- if (arg instanceof SysUserLoginDTO) {
- SysUserLoginDTO argDTO = (SysUserLoginDTO) arg;
- insertSysLogDTO.setUsername(argDTO.getUsername());
+ if (arg instanceof SysUserLoginDTO dto) {
+ insertSysLogDTO.setUsername(dto.getUsername());
}
}
}
diff --git a/api/admin-api/src/main/java/cc/uncarbon/module/adminapi/enums/AdminApiErrorEnum.java b/api/admin-api/src/main/java/cc/uncarbon/module/adminapi/enums/AdminApiErrorEnum.java
index 5b5465e..de2f518 100644
--- a/api/admin-api/src/main/java/cc/uncarbon/module/adminapi/enums/AdminApiErrorEnum.java
+++ b/api/admin-api/src/main/java/cc/uncarbon/module/adminapi/enums/AdminApiErrorEnum.java
@@ -16,7 +16,11 @@ public enum AdminApiErrorEnum implements HelioBaseEnum {
CAPTCHA_VALIDATE_FAILED(400, "验证码不正确,请重新输入"),
- ;
+ /**
+ * 很少遇到;但是如果出现了只会提示默认的「请稍后再试」,不方便排查,还是整个文案比较好
+ */
+ UPLOAD_FILE_NOT_EXIST(400, "欲上传的文件可能已被删除,请重新选择");
+
private final Integer value;
private final String label;
diff --git a/api/admin-api/src/main/java/cc/uncarbon/module/adminapi/model/response/AdminCaptchaVO.java b/api/admin-api/src/main/java/cc/uncarbon/module/adminapi/model/response/AdminCaptchaVO.java
index 322757d..4844007 100644
--- a/api/admin-api/src/main/java/cc/uncarbon/module/adminapi/model/response/AdminCaptchaVO.java
+++ b/api/admin-api/src/main/java/cc/uncarbon/module/adminapi/model/response/AdminCaptchaVO.java
@@ -1,7 +1,7 @@
package cc.uncarbon.module.adminapi.model.response;
import cc.uncarbon.module.adminapi.model.interior.AdminCaptchaContainer;
-import io.swagger.annotations.ApiModelProperty;
+import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Getter;
import java.time.LocalDateTime;
@@ -12,13 +12,13 @@
@Getter
public class AdminCaptchaVO {
- @ApiModelProperty(value = "验证码图片Base64")
+ @Schema(description = "验证码图片Base64")
private final String captchaImage;
- @ApiModelProperty(value = "验证码唯一标识")
+ @Schema(description = "验证码唯一标识")
private final String captchaId;
- @ApiModelProperty(value = "验证码失效时刻")
+ @Schema(description = "验证码失效时刻")
private final LocalDateTime expiredAt;
diff --git a/api/admin-api/src/main/java/cc/uncarbon/module/adminapi/model/response/SelectOptionItemVO.java b/api/admin-api/src/main/java/cc/uncarbon/module/adminapi/model/response/SelectOptionItemVO.java
index 9169cdd..a195aef 100644
--- a/api/admin-api/src/main/java/cc/uncarbon/module/adminapi/model/response/SelectOptionItemVO.java
+++ b/api/admin-api/src/main/java/cc/uncarbon/module/adminapi/model/response/SelectOptionItemVO.java
@@ -3,7 +3,7 @@
import cc.uncarbon.framework.core.enums.HelioBaseEnum;
import cn.hutool.core.collection.CollUtil;
import com.fasterxml.jackson.annotation.JsonInclude;
-import io.swagger.annotations.ApiModelProperty;
+import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Getter;
import lombok.NonNull;
import lombok.Setter;
@@ -16,7 +16,6 @@
import java.util.List;
import java.util.function.Function;
import java.util.function.Predicate;
-import java.util.stream.Collectors;
import java.util.stream.Stream;
/**
@@ -30,9 +29,9 @@ public class SelectOptionItemVO implements Serializable {
private static final long serialVersionUID = 1L;
// ID👉名称 一对(用于关联各种实体)
- @ApiModelProperty(value = "ID")
+ @Schema(description = "ID")
private Number id;
- @ApiModelProperty(value = "名称")
+ @Schema(description = "名称")
private String name;
public SelectOptionItemVO(Number id, String name) {
this.id = id;
@@ -40,7 +39,7 @@ public SelectOptionItemVO(Number id, String name) {
}
// 有时候额外需要上级ID
- @ApiModelProperty(value = "上级ID")
+ @Schema(description = "上级ID")
@Setter
private Number parentId;
public SelectOptionItemVO(Number id, String name, Number parentId) {
@@ -51,9 +50,9 @@ public SelectOptionItemVO(Number id, String name, Number parentId) {
// 值👉标签 一对(仅用于枚举)
- @ApiModelProperty(value = "值")
+ @Schema(description = "值")
private Number value;
- @ApiModelProperty(value = "标签")
+ @Schema(description = "标签")
private String label;
public SelectOptionItemVO(HelioBaseEnum extends Number> helioBaseEnum) {
this.value = helioBaseEnum.getValue();
@@ -136,7 +135,7 @@ public static List listOf(
return stream.map(item ->
new SelectOptionItemVO(idGetter.apply(item), nameGetter.apply(item),
parentIdGetter == null ? null : parentIdGetter.apply(item)))
- .collect(Collectors.toList());
+ .toList();
}
/**
@@ -165,6 +164,6 @@ public static & HelioBaseEnum extends Number>> List login(@RequestBody @Valid SysUserLoginDTO dto) {
// 登录验证码核验;前端项目搜索关键词「 Helio: 登录验证码」
@@ -89,7 +82,7 @@ public ApiResult login(@RequestBody @Valid SysUserLoginDTO dto)
}
@SaCheckLogin(type = AdminStpUtil.TYPE)
- @ApiOperation(value = "登出")
+ @Operation(summary = "登出")
@PostMapping(value = "/auth/logout")
public ApiResult logout() {
AdminStpUtil.logout();
@@ -99,7 +92,7 @@ public ApiResult logout() {
return ApiResult.success();
}
- @ApiOperation(value = "获取验证码")
+ @Operation(summary = "获取验证码")
@GetMapping(value = "/auth/captcha")
public ApiResult captcha() {
// 核验方法:captchaHelper.validate
diff --git a/api/admin-api/src/main/java/cc/uncarbon/module/adminapi/web/common/AdminSelectOptionsController.java b/api/admin-api/src/main/java/cc/uncarbon/module/adminapi/web/common/AdminSelectOptionsController.java
index 5b05e59..a96cf74 100644
--- a/api/admin-api/src/main/java/cc/uncarbon/module/adminapi/web/common/AdminSelectOptionsController.java
+++ b/api/admin-api/src/main/java/cc/uncarbon/module/adminapi/web/common/AdminSelectOptionsController.java
@@ -9,8 +9,8 @@
import cc.uncarbon.module.sys.service.SysDeptService;
import cc.uncarbon.module.sys.service.SysRoleService;
import cn.dev33.satoken.annotation.SaCheckLogin;
-import io.swagger.annotations.Api;
-import io.swagger.annotations.ApiOperation;
+import io.swagger.v3.oas.annotations.tags.Tag;
+import io.swagger.v3.oas.annotations.Operation;
import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.GetMapping;
@@ -21,7 +21,7 @@
// 约束:登录后才能使用 👇 后台管理对应的鉴权工具类
@SaCheckLogin(type = AdminStpUtil.TYPE)
-@Api(value = "后台管理-下拉框数据源接口", tags = {"后台管理-下拉框数据源接口"})
+@Tag(name = "后台管理-下拉框数据源接口")
@RequestMapping(AdminApiConstant.HTTP_API_URL_PREFIX + "/api/v1")
@RequiredArgsConstructor
@RestController
@@ -37,7 +37,7 @@ public class AdminSelectOptionsController {
避免多人协作时,不知道原来是否已经有了,或者写在某个边边角角里,造成重复开发
*/
- @ApiOperation(value = "后台角色下拉框")
+ @Operation(summary = "后台角色下拉框")
@GetMapping(value = "/select-options/roles")
public ApiResult> roles() {
return ApiResult.data(
@@ -45,7 +45,7 @@ public ApiResult> roles() {
);
}
- @ApiOperation(value = "部门下拉框(前端负责转为树状数据)")
+ @Operation(summary = "部门下拉框(前端负责转为树状数据)")
@GetMapping(value = "/select-options/depts")
public ApiResult> depts() {
return ApiResult.data(
diff --git a/api/admin-api/src/main/java/cc/uncarbon/module/adminapi/web/oss/AdminOssFileInfoController.java b/api/admin-api/src/main/java/cc/uncarbon/module/adminapi/web/oss/AdminOssFileInfoController.java
index 74a9b15..512388d 100644
--- a/api/admin-api/src/main/java/cc/uncarbon/module/adminapi/web/oss/AdminOssFileInfoController.java
+++ b/api/admin-api/src/main/java/cc/uncarbon/module/adminapi/web/oss/AdminOssFileInfoController.java
@@ -6,29 +6,23 @@
import cc.uncarbon.framework.web.model.request.IdsDTO;
import cc.uncarbon.framework.web.model.response.ApiResult;
import cc.uncarbon.module.adminapi.constant.AdminApiConstant;
+import cc.uncarbon.module.adminapi.util.AdminStpUtil;
import cc.uncarbon.module.oss.model.request.AdminListOssFileInfoDTO;
import cc.uncarbon.module.oss.model.response.OssFileInfoBO;
import cc.uncarbon.module.oss.service.OssFileInfoService;
-import cc.uncarbon.module.sys.constant.SysConstant;
-import cc.uncarbon.module.adminapi.util.AdminStpUtil;
import cn.dev33.satoken.annotation.SaCheckLogin;
import cn.dev33.satoken.annotation.SaCheckPermission;
-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 jakarta.validation.Valid;
import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.*;
-import javax.validation.Valid;
-
@SaCheckLogin(type = AdminStpUtil.TYPE)
-@Api(value = "后台管理-上传文件信息管理接口", tags = {"后台管理-上传文件信息管理接口"})
-@RequestMapping(value = {
- // 兼容旧的API路由前缀
- SysConstant.SYS_MODULE_CONTEXT_PATH + HelioConstant.Version.HTTP_API_VERSION_V1,
- AdminApiConstant.HTTP_API_URL_PREFIX + "/api/v1"
-})
+@Tag(name = "后台管理-上传文件信息管理接口")
+@RequestMapping(value = AdminApiConstant.HTTP_API_URL_PREFIX + "/api/v1")
@RequiredArgsConstructor
@RestController
@Slf4j
@@ -41,21 +35,21 @@ public class AdminOssFileInfoController {
@SaCheckPermission(type = AdminStpUtil.TYPE, value = PERMISSION_PREFIX + HelioConstant.Permission.RETRIEVE)
- @ApiOperation(value = "分页列表")
+ @Operation(summary = "分页列表")
@GetMapping(value = "/oss/file/infos")
public ApiResult> list(PageParam pageParam, AdminListOssFileInfoDTO dto) {
return ApiResult.data(ossFileInfoService.adminList(pageParam, dto));
}
@SaCheckPermission(type = AdminStpUtil.TYPE, value = PERMISSION_PREFIX + HelioConstant.Permission.RETRIEVE)
- @ApiOperation(value = "详情")
+ @Operation(summary = "详情")
@GetMapping(value = "/oss/file/infos/{id}")
public ApiResult getById(@PathVariable Long id) {
return ApiResult.data(ossFileInfoService.getOneById(id, true));
}
@SaCheckPermission(type = AdminStpUtil.TYPE, value = PERMISSION_PREFIX + HelioConstant.Permission.DELETE)
- @ApiOperation(value = "删除")
+ @Operation(summary = "删除")
@DeleteMapping(value = "/oss/file/infos")
public ApiResult delete(@RequestBody @Valid IdsDTO dto) {
ossFileInfoService.adminDelete(dto.getIds());
diff --git a/api/admin-api/src/main/java/cc/uncarbon/module/adminapi/web/oss/AdminOssUploadDownloadController.java b/api/admin-api/src/main/java/cc/uncarbon/module/adminapi/web/oss/AdminOssUploadDownloadController.java
index 284d384..e906748 100644
--- a/api/admin-api/src/main/java/cc/uncarbon/module/adminapi/web/oss/AdminOssUploadDownloadController.java
+++ b/api/admin-api/src/main/java/cc/uncarbon/module/adminapi/web/oss/AdminOssUploadDownloadController.java
@@ -1,43 +1,38 @@
package cc.uncarbon.module.adminapi.web.oss;
-import cc.uncarbon.framework.core.constant.HelioConstant;
import cc.uncarbon.framework.web.model.response.ApiResult;
import cc.uncarbon.module.adminapi.constant.AdminApiConstant;
+import cc.uncarbon.module.adminapi.enums.AdminApiErrorEnum;
import cc.uncarbon.module.adminapi.util.AdminStpUtil;
import cc.uncarbon.module.oss.facade.OssUploadDownloadFacade;
import cc.uncarbon.module.oss.model.request.UploadFileAttributeDTO;
import cc.uncarbon.module.oss.model.response.OssFileDownloadReplyBO;
import cc.uncarbon.module.oss.model.response.OssFileInfoBO;
import cc.uncarbon.module.oss.model.response.OssFileUploadResultVO;
-import cc.uncarbon.module.sys.constant.SysConstant;
import cn.dev33.satoken.annotation.SaCheckLogin;
import cn.hutool.core.io.IoUtil;
import cn.hutool.core.text.CharSequenceUtil;
-import cn.hutool.core.util.CharsetUtil;
import cn.hutool.core.util.ObjectUtil;
import cn.hutool.crypto.digest.DigestUtil;
import cn.hutool.http.Header;
-import io.swagger.annotations.Api;
-import io.swagger.annotations.ApiOperation;
+import io.swagger.v3.oas.annotations.Operation;
+import io.swagger.v3.oas.annotations.tags.Tag;
+import jakarta.servlet.http.HttpServletRequest;
+import jakarta.servlet.http.HttpServletResponse;
+import jakarta.validation.Valid;
import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.springframework.http.MediaType;
import org.springframework.web.bind.annotation.*;
import org.springframework.web.multipart.MultipartFile;
-import javax.servlet.http.HttpServletRequest;
-import javax.servlet.http.HttpServletResponse;
-import javax.validation.Valid;
import java.io.IOException;
import java.net.URLEncoder;
+import java.nio.charset.StandardCharsets;
-@Api(value = "后台管理-上传、下载文件接口", tags = {"后台管理-上传、下载文件接口"})
-@RequestMapping(value = {
- // 兼容旧的API路由前缀
- SysConstant.SYS_MODULE_CONTEXT_PATH + HelioConstant.Version.HTTP_API_VERSION_V1,
- AdminApiConstant.HTTP_API_URL_PREFIX + "/api/v1"
-})
+@Tag(name = "后台管理-上传、下载文件接口")
+@RequestMapping(value = AdminApiConstant.HTTP_API_URL_PREFIX + "/api/v1")
@RequiredArgsConstructor
@RestController
@Slf4j
@@ -46,7 +41,7 @@ public class AdminOssUploadDownloadController {
private final OssUploadDownloadFacade ossUploadDownloadFacade;
- @ApiOperation(value = "上传文件", consumes = MediaType.MULTIPART_FORM_DATA_VALUE)
+ @Operation(summary = "上传文件", tags = "")
@PostMapping(value = "/oss/files")
// 约束:登录后才能上传 👇 后台管理对应的鉴权工具类
@SaCheckLogin(type = AdminStpUtil.TYPE)
@@ -54,8 +49,10 @@ public ApiResult upload(
@RequestPart MultipartFile file, @RequestPart(required = false) @Valid UploadFileAttributeDTO attr,
HttpServletRequest request
) throws IOException {
- /*
- 1. 已存在相同 MD5 文件,直接返回 URL
+ AdminApiErrorEnum.UPLOAD_FILE_NOT_EXIST.assertNotNull(file);
+
+ /*
+ 1. 已存在相同 MD5 文件,直接返回 URL
*/
String md5 = DigestUtil.md5Hex(file.getBytes());
OssFileInfoBO bo = ossUploadDownloadFacade.findByHash(md5);
@@ -75,7 +72,7 @@ public ApiResult upload(
return ApiResult.data(this.toUploadResult(bo, request.getRequestURL().toString()));
}
- @ApiOperation(value = "下载文件(根据文件ID)", consumes = MediaType.MULTIPART_FORM_DATA_VALUE)
+ @Operation(summary = "下载文件(根据文件ID)")
@GetMapping(value = "/oss/files/{id}")
// 如果需要登录后才能下载,请解禁下方注解;注意是👇 后台管理对应的鉴权工具类
// @SaCheckLogin(type = AdminStpUtil.TYPE)
@@ -91,7 +88,7 @@ public void download(@PathVariable Long id, HttpServletResponse response) throws
// 普通下载
response.setHeader(Header.CONTENT_TYPE.getValue(), MediaType.APPLICATION_OCTET_STREAM_VALUE);
response.setContentType(MediaType.APPLICATION_OCTET_STREAM_VALUE);
- String downFileName = URLEncoder.encode(reply.getStorageFilename(), CharsetUtil.UTF_8);
+ String downFileName = URLEncoder.encode(reply.getStorageFilename(), StandardCharsets.UTF_8);
response.setHeader(Header.CONTENT_DISPOSITION.getValue(), "attachment;filename=" + downFileName);
IoUtil.write(response.getOutputStream(), false, reply.getFileBytes());
diff --git a/api/admin-api/src/main/java/cc/uncarbon/module/adminapi/web/sys/AdminSysDataDictController.java b/api/admin-api/src/main/java/cc/uncarbon/module/adminapi/web/sys/AdminSysDataDictController.java
index 150ea9e..8e95f7e 100644
--- a/api/admin-api/src/main/java/cc/uncarbon/module/adminapi/web/sys/AdminSysDataDictController.java
+++ b/api/admin-api/src/main/java/cc/uncarbon/module/adminapi/web/sys/AdminSysDataDictController.java
@@ -6,31 +6,25 @@
import cc.uncarbon.framework.web.model.request.IdsDTO;
import cc.uncarbon.framework.web.model.response.ApiResult;
import cc.uncarbon.module.adminapi.constant.AdminApiConstant;
+import cc.uncarbon.module.adminapi.util.AdminStpUtil;
import cc.uncarbon.module.sys.annotation.SysLog;
-import cc.uncarbon.module.sys.constant.SysConstant;
import cc.uncarbon.module.sys.model.request.AdminInsertOrUpdateSysDataDictDTO;
import cc.uncarbon.module.sys.model.request.AdminListSysDataDictDTO;
import cc.uncarbon.module.sys.model.response.SysDataDictBO;
import cc.uncarbon.module.sys.service.SysDataDictService;
-import cc.uncarbon.module.adminapi.util.AdminStpUtil;
import cn.dev33.satoken.annotation.SaCheckLogin;
import cn.dev33.satoken.annotation.SaCheckPermission;
-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 jakarta.validation.Valid;
import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.*;
-import javax.validation.Valid;
-
@SaCheckLogin(type = AdminStpUtil.TYPE)
-@Api(value = "数据字典管理接口", tags = {"数据字典管理接口"})
-@RequestMapping(value = {
- // 兼容旧的API路由前缀
- SysConstant.SYS_MODULE_CONTEXT_PATH + HelioConstant.Version.HTTP_API_VERSION_V1,
- AdminApiConstant.HTTP_API_URL_PREFIX + "/api/v1"
-})
+@Tag(name = "数据字典管理接口")
+@RequestMapping(value = AdminApiConstant.HTTP_API_URL_PREFIX + "/api/v1")
@RequiredArgsConstructor
@RestController
@Slf4j
@@ -42,35 +36,23 @@ public class AdminSysDataDictController {
@SaCheckPermission(type = AdminStpUtil.TYPE, value = PERMISSION_PREFIX + HelioConstant.Permission.RETRIEVE)
- @ApiOperation(value = "分页列表")
- @GetMapping(value = {
- "/sys/data-dicts",
- // 兼容旧的API路由
- "/sys/dataDicts"
- })
+ @Operation(summary = "分页列表")
+ @GetMapping(value = "/sys/data-dicts")
public ApiResult> list(PageParam pageParam, AdminListSysDataDictDTO dto) {
return ApiResult.data(sysDataDictService.adminList(pageParam, dto));
}
@SaCheckPermission(type = AdminStpUtil.TYPE, value = PERMISSION_PREFIX + HelioConstant.Permission.RETRIEVE)
- @ApiOperation(value = "详情")
- @GetMapping(value = {
- "/sys/data-dicts/{id}",
- // 兼容旧的API路由
- "/sys/dataDicts/{id}"
- })
+ @Operation(summary = "详情")
+ @GetMapping(value = "/sys/data-dicts/{id}")
public ApiResult getById(@PathVariable Long id) {
return ApiResult.data(sysDataDictService.getOneById(id, true));
}
@SysLog(value = "新增数据字典")
@SaCheckPermission(type = AdminStpUtil.TYPE, value = PERMISSION_PREFIX + HelioConstant.Permission.CREATE)
- @ApiOperation(value = "新增")
- @PostMapping(value = {
- "/sys/data-dicts",
- // 兼容旧的API路由
- "/sys/dataDicts"
- })
+ @Operation(summary = "新增")
+ @PostMapping(value = "/sys/data-dicts")
public ApiResult insert(@RequestBody @Valid AdminInsertOrUpdateSysDataDictDTO dto) {
sysDataDictService.adminInsert(dto);
@@ -79,12 +61,8 @@ public ApiResult insert(@RequestBody @Valid AdminInsertOrUpdateSysDataDict
@SysLog(value = "编辑数据字典")
@SaCheckPermission(type = AdminStpUtil.TYPE, value = PERMISSION_PREFIX + HelioConstant.Permission.UPDATE)
- @ApiOperation(value = "编辑")
- @PutMapping(value = {
- "/sys/data-dicts/{id}",
- // 兼容旧的API路由
- "/sys/dataDicts/{id}"
- })
+ @Operation(summary = "编辑")
+ @PutMapping(value = "/sys/data-dicts/{id}")
public ApiResult update(@PathVariable Long id, @RequestBody @Valid AdminInsertOrUpdateSysDataDictDTO dto) {
dto.setId(id);
sysDataDictService.adminUpdate(dto);
@@ -94,12 +72,8 @@ public ApiResult update(@PathVariable Long id, @RequestBody @Valid AdminIn
@SysLog(value = "删除数据字典")
@SaCheckPermission(type = AdminStpUtil.TYPE, value = PERMISSION_PREFIX + HelioConstant.Permission.DELETE)
- @ApiOperation(value = "删除")
- @DeleteMapping(value = {
- "/sys/data-dicts",
- // 兼容旧的API路由
- "/sys/dataDicts"
- })
+ @Operation(summary = "删除")
+ @DeleteMapping(value = "/sys/data-dicts")
public ApiResult delete(@RequestBody @Valid IdsDTO dto) {
sysDataDictService.adminDelete(dto.getIds());
diff --git a/api/admin-api/src/main/java/cc/uncarbon/module/adminapi/web/sys/AdminSysDeptController.java b/api/admin-api/src/main/java/cc/uncarbon/module/adminapi/web/sys/AdminSysDeptController.java
index 9c7e724..c8ed3ee 100644
--- a/api/admin-api/src/main/java/cc/uncarbon/module/adminapi/web/sys/AdminSysDeptController.java
+++ b/api/admin-api/src/main/java/cc/uncarbon/module/adminapi/web/sys/AdminSysDeptController.java
@@ -6,30 +6,25 @@
import cc.uncarbon.framework.web.model.response.ApiResult;
import cc.uncarbon.module.adminapi.constant.AdminApiConstant;
import cc.uncarbon.module.sys.annotation.SysLog;
-import cc.uncarbon.module.sys.constant.SysConstant;
import cc.uncarbon.module.sys.model.request.AdminInsertOrUpdateSysDeptDTO;
import cc.uncarbon.module.sys.model.response.SysDeptBO;
import cc.uncarbon.module.sys.service.SysDeptService;
import cc.uncarbon.module.adminapi.util.AdminStpUtil;
import cn.dev33.satoken.annotation.SaCheckLogin;
import cn.dev33.satoken.annotation.SaCheckPermission;
-import io.swagger.annotations.Api;
-import io.swagger.annotations.ApiOperation;
+import io.swagger.v3.oas.annotations.tags.Tag;
+import io.swagger.v3.oas.annotations.Operation;
import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.*;
-import javax.validation.Valid;
+import jakarta.validation.Valid;
import java.util.List;
@SaCheckLogin(type = AdminStpUtil.TYPE)
-@Api(value = "部门管理接口", tags = {"部门管理接口"})
-@RequestMapping(value = {
- // 兼容旧的API路由前缀
- SysConstant.SYS_MODULE_CONTEXT_PATH + HelioConstant.Version.HTTP_API_VERSION_V1,
- AdminApiConstant.HTTP_API_URL_PREFIX + "/api/v1"
-})
+@Tag(name = "部门管理接口")
+@RequestMapping(value = AdminApiConstant.HTTP_API_URL_PREFIX + "/api/v1")
@RequiredArgsConstructor
@RestController
@Slf4j
@@ -41,14 +36,14 @@ public class AdminSysDeptController {
@SaCheckPermission(type = AdminStpUtil.TYPE, value = PERMISSION_PREFIX + HelioConstant.Permission.RETRIEVE)
- @ApiOperation(value = "列表")
+ @Operation(summary = "列表")
@GetMapping(value = "/sys/depts")
public ApiResult> list() {
return ApiResult.data(sysDeptService.adminList());
}
@SaCheckPermission(type = AdminStpUtil.TYPE, value = PERMISSION_PREFIX + HelioConstant.Permission.RETRIEVE)
- @ApiOperation(value = "详情")
+ @Operation(summary = "详情")
@GetMapping(value = "/sys/depts/{id}")
public ApiResult getById(@PathVariable Long id) {
return ApiResult.data(sysDeptService.getOneById(id, true));
@@ -56,7 +51,7 @@ public ApiResult getById(@PathVariable Long id) {
@SysLog(value = "新增部门")
@SaCheckPermission(type = AdminStpUtil.TYPE, value = PERMISSION_PREFIX + HelioConstant.Permission.CREATE)
- @ApiOperation(value = "新增")
+ @Operation(summary = "新增")
@PostMapping(value = "/sys/depts")
public ApiResult insert(@RequestBody @Valid AdminInsertOrUpdateSysDeptDTO dto) {
sysDeptService.adminInsert(dto);
@@ -66,7 +61,7 @@ public ApiResult insert(@RequestBody @Valid AdminInsertOrUpdateSysDeptDTO
@SysLog(value = "编辑部门")
@SaCheckPermission(type = AdminStpUtil.TYPE, value = PERMISSION_PREFIX + HelioConstant.Permission.UPDATE)
- @ApiOperation(value = "编辑")
+ @Operation(summary = "编辑")
@PutMapping(value = "/sys/depts/{id}")
public ApiResult update(@PathVariable Long id, @RequestBody @Valid AdminInsertOrUpdateSysDeptDTO dto) {
dto.setId(id);
@@ -77,7 +72,7 @@ public ApiResult update(@PathVariable Long id, @RequestBody @Valid AdminIn
@SysLog(value = "删除部门")
@SaCheckPermission(type = AdminStpUtil.TYPE, value = PERMISSION_PREFIX + HelioConstant.Permission.DELETE)
- @ApiOperation(value = "删除")
+ @Operation(summary = "删除")
@DeleteMapping(value = "/sys/depts")
public ApiResult delete(@RequestBody @Valid IdsDTO dto) {
sysDeptService.adminDelete(dto.getIds());
diff --git a/api/admin-api/src/main/java/cc/uncarbon/module/adminapi/web/sys/AdminSysLogController.java b/api/admin-api/src/main/java/cc/uncarbon/module/adminapi/web/sys/AdminSysLogController.java
index ac44598..80c8dea 100644
--- a/api/admin-api/src/main/java/cc/uncarbon/module/adminapi/web/sys/AdminSysLogController.java
+++ b/api/admin-api/src/main/java/cc/uncarbon/module/adminapi/web/sys/AdminSysLogController.java
@@ -5,15 +5,14 @@
import cc.uncarbon.framework.core.page.PageResult;
import cc.uncarbon.framework.web.model.response.ApiResult;
import cc.uncarbon.module.adminapi.constant.AdminApiConstant;
-import cc.uncarbon.module.sys.constant.SysConstant;
import cc.uncarbon.module.sys.model.request.AdminListSysLogDTO;
import cc.uncarbon.module.sys.model.response.SysLogBO;
import cc.uncarbon.module.sys.service.SysLogService;
import cc.uncarbon.module.adminapi.util.AdminStpUtil;
import cn.dev33.satoken.annotation.SaCheckLogin;
import cn.dev33.satoken.annotation.SaCheckPermission;
-import io.swagger.annotations.Api;
-import io.swagger.annotations.ApiOperation;
+import io.swagger.v3.oas.annotations.tags.Tag;
+import io.swagger.v3.oas.annotations.Operation;
import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.GetMapping;
@@ -23,12 +22,8 @@
@SaCheckLogin(type = AdminStpUtil.TYPE)
-@Api(value = "系统日志管理接口", tags = {"系统日志管理接口"})
-@RequestMapping(value = {
- // 兼容旧的API路由前缀
- SysConstant.SYS_MODULE_CONTEXT_PATH + HelioConstant.Version.HTTP_API_VERSION_V1,
- AdminApiConstant.HTTP_API_URL_PREFIX + "/api/v1"
-})
+@Tag(name = "系统日志管理接口")
+@RequestMapping(value = AdminApiConstant.HTTP_API_URL_PREFIX + "/api/v1")
@RequiredArgsConstructor
@RestController
@Slf4j
@@ -40,14 +35,14 @@ public class AdminSysLogController {
@SaCheckPermission(type = AdminStpUtil.TYPE, value = PERMISSION_PREFIX + HelioConstant.Permission.RETRIEVE)
- @ApiOperation(value = "分页列表")
+ @Operation(summary = "分页列表")
@GetMapping(value = "/sys/logs")
public ApiResult> list(PageParam pageParam, AdminListSysLogDTO dto) {
return ApiResult.data(sysLogService.adminList(pageParam, dto));
}
@SaCheckPermission(type = AdminStpUtil.TYPE, value = PERMISSION_PREFIX + HelioConstant.Permission.RETRIEVE)
- @ApiOperation(value = "详情")
+ @Operation(summary = "详情")
@GetMapping(value = "/sys/logs/{id}")
public ApiResult getById(@PathVariable Long id) {
return ApiResult.data(sysLogService.getOneById(id, true));
diff --git a/api/admin-api/src/main/java/cc/uncarbon/module/adminapi/web/sys/AdminSysMenuController.java b/api/admin-api/src/main/java/cc/uncarbon/module/adminapi/web/sys/AdminSysMenuController.java
index fff5276..fbeba0b 100644
--- a/api/admin-api/src/main/java/cc/uncarbon/module/adminapi/web/sys/AdminSysMenuController.java
+++ b/api/admin-api/src/main/java/cc/uncarbon/module/adminapi/web/sys/AdminSysMenuController.java
@@ -5,30 +5,25 @@
import cc.uncarbon.framework.web.model.response.ApiResult;
import cc.uncarbon.module.adminapi.constant.AdminApiConstant;
import cc.uncarbon.module.sys.annotation.SysLog;
-import cc.uncarbon.module.sys.constant.SysConstant;
import cc.uncarbon.module.sys.model.request.AdminInsertOrUpdateSysMenuDTO;
import cc.uncarbon.module.sys.model.response.SysMenuBO;
import cc.uncarbon.module.sys.service.SysMenuService;
import cc.uncarbon.module.adminapi.util.AdminStpUtil;
import cn.dev33.satoken.annotation.SaCheckLogin;
import cn.dev33.satoken.annotation.SaCheckPermission;
-import io.swagger.annotations.Api;
-import io.swagger.annotations.ApiOperation;
+import io.swagger.v3.oas.annotations.tags.Tag;
+import io.swagger.v3.oas.annotations.Operation;
import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.*;
-import javax.validation.Valid;
+import jakarta.validation.Valid;
import java.util.List;
@SaCheckLogin(type = AdminStpUtil.TYPE)
-@Api(value = "后台菜单管理接口", tags = {"后台菜单管理接口"})
-@RequestMapping(value = {
- // 兼容旧的API路由前缀
- SysConstant.SYS_MODULE_CONTEXT_PATH + HelioConstant.Version.HTTP_API_VERSION_V1,
- AdminApiConstant.HTTP_API_URL_PREFIX + "/api/v1"
-})
+@Tag(name = "后台菜单管理接口")
+@RequestMapping(value = AdminApiConstant.HTTP_API_URL_PREFIX + "/api/v1")
@RequiredArgsConstructor
@RestController
@Slf4j
@@ -40,14 +35,14 @@ public class AdminSysMenuController {
@SaCheckPermission(type = AdminStpUtil.TYPE, value = PERMISSION_PREFIX + HelioConstant.Permission.RETRIEVE)
- @ApiOperation(value = "列表")
+ @Operation(summary = "列表")
@GetMapping(value = "/sys/menus")
public ApiResult> list() {
return ApiResult.data(sysMenuService.adminList());
}
@SaCheckPermission(type = AdminStpUtil.TYPE, value = PERMISSION_PREFIX + HelioConstant.Permission.RETRIEVE)
- @ApiOperation(value = "详情")
+ @Operation(summary = "详情")
@GetMapping(value = "/sys/menus/{id}")
public ApiResult getById(@PathVariable Long id) {
return ApiResult.data(sysMenuService.getOneById(id, true));
@@ -55,7 +50,7 @@ public ApiResult getById(@PathVariable Long id) {
@SysLog(value = "新增后台菜单")
@SaCheckPermission(type = AdminStpUtil.TYPE, value = PERMISSION_PREFIX + HelioConstant.Permission.CREATE)
- @ApiOperation(value = "新增")
+ @Operation(summary = "新增")
@PostMapping(value = "/sys/menus")
public ApiResult insert(@RequestBody @Valid AdminInsertOrUpdateSysMenuDTO dto) {
sysMenuService.adminInsert(dto);
@@ -65,7 +60,7 @@ public ApiResult insert(@RequestBody @Valid AdminInsertOrUpdateSysMenuDTO
@SysLog(value = "编辑后台菜单")
@SaCheckPermission(type = AdminStpUtil.TYPE, value = PERMISSION_PREFIX + HelioConstant.Permission.UPDATE)
- @ApiOperation(value = "编辑")
+ @Operation(summary = "编辑")
@PutMapping(value = "/sys/menus/{id}")
public ApiResult update(@PathVariable Long id, @RequestBody @Valid AdminInsertOrUpdateSysMenuDTO dto) {
dto.setId(id);
@@ -76,7 +71,7 @@ public ApiResult update(@PathVariable Long id, @RequestBody @Valid AdminIn
@SysLog(value = "删除后台菜单")
@SaCheckPermission(type = AdminStpUtil.TYPE, value = PERMISSION_PREFIX + HelioConstant.Permission.DELETE)
- @ApiOperation(value = "删除")
+ @Operation(summary = "删除")
@DeleteMapping(value = "/sys/menus")
public ApiResult delete(@RequestBody @Valid IdsDTO dto) {
sysMenuService.adminDelete(dto.getIds());
@@ -84,13 +79,13 @@ public ApiResult delete(@RequestBody @Valid IdsDTO dto) {
return ApiResult.success();
}
- @ApiOperation(value = "取侧边菜单")
+ @Operation(summary = "取侧边菜单")
@GetMapping("/sys/menus/side")
public ApiResult> adminListSideMenu() {
return ApiResult.data(sysMenuService.adminListSideMenu());
}
- @ApiOperation(value = "取所有可见菜单")
+ @Operation(summary = "取所有可见菜单")
@GetMapping("/sys/menus/all")
public ApiResult> adminListVisibleMenu() {
return ApiResult.data(sysMenuService.adminListVisibleMenu());
diff --git a/api/admin-api/src/main/java/cc/uncarbon/module/adminapi/web/sys/AdminSysParamController.java b/api/admin-api/src/main/java/cc/uncarbon/module/adminapi/web/sys/AdminSysParamController.java
index 4912216..f1c4c28 100644
--- a/api/admin-api/src/main/java/cc/uncarbon/module/adminapi/web/sys/AdminSysParamController.java
+++ b/api/admin-api/src/main/java/cc/uncarbon/module/adminapi/web/sys/AdminSysParamController.java
@@ -7,7 +7,6 @@
import cc.uncarbon.framework.web.model.response.ApiResult;
import cc.uncarbon.module.adminapi.constant.AdminApiConstant;
import cc.uncarbon.module.sys.annotation.SysLog;
-import cc.uncarbon.module.sys.constant.SysConstant;
import cc.uncarbon.module.sys.model.request.AdminInsertOrUpdateSysParamDTO;
import cc.uncarbon.module.sys.model.request.AdminListSysParamDTO;
import cc.uncarbon.module.sys.model.response.SysParamBO;
@@ -15,22 +14,18 @@
import cc.uncarbon.module.adminapi.util.AdminStpUtil;
import cn.dev33.satoken.annotation.SaCheckLogin;
import cn.dev33.satoken.annotation.SaCheckPermission;
-import io.swagger.annotations.Api;
-import io.swagger.annotations.ApiOperation;
+import io.swagger.v3.oas.annotations.tags.Tag;
+import io.swagger.v3.oas.annotations.Operation;
import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.*;
-import javax.validation.Valid;
+import jakarta.validation.Valid;
@SaCheckLogin(type = AdminStpUtil.TYPE)
-@Api(value = "系统参数管理接口", tags = {"系统参数管理接口"})
-@RequestMapping(value = {
- // 兼容旧的API路由前缀
- SysConstant.SYS_MODULE_CONTEXT_PATH + HelioConstant.Version.HTTP_API_VERSION_V1,
- AdminApiConstant.HTTP_API_URL_PREFIX + "/api/v1"
-})
+@Tag(name = "系统参数管理接口")
+@RequestMapping(value = AdminApiConstant.HTTP_API_URL_PREFIX + "/api/v1")
@RequiredArgsConstructor
@RestController
@Slf4j
@@ -42,14 +37,14 @@ public class AdminSysParamController {
@SaCheckPermission(type = AdminStpUtil.TYPE, value = PERMISSION_PREFIX + HelioConstant.Permission.RETRIEVE)
- @ApiOperation(value = "分页列表")
+ @Operation(summary = "分页列表")
@GetMapping(value = "/sys/params")
public ApiResult> list(PageParam pageParam, AdminListSysParamDTO dto) {
return ApiResult.data(sysParamService.adminList(pageParam, dto));
}
@SaCheckPermission(type = AdminStpUtil.TYPE, value = PERMISSION_PREFIX + HelioConstant.Permission.RETRIEVE)
- @ApiOperation(value = "详情")
+ @Operation(summary = "详情")
@GetMapping(value = "/sys/params/{id}")
public ApiResult getById(@PathVariable Long id) {
return ApiResult.data(sysParamService.getOneById(id, true));
@@ -57,7 +52,7 @@ public ApiResult getById(@PathVariable Long id) {
@SysLog(value = "新增系统参数")
@SaCheckPermission(type = AdminStpUtil.TYPE, value = PERMISSION_PREFIX + HelioConstant.Permission.CREATE)
- @ApiOperation(value = "新增")
+ @Operation(summary = "新增")
@PostMapping(value = "/sys/params")
public ApiResult insert(@RequestBody @Valid AdminInsertOrUpdateSysParamDTO dto) {
sysParamService.adminInsert(dto);
@@ -67,7 +62,7 @@ public ApiResult insert(@RequestBody @Valid AdminInsertOrUpdateSysParamDTO
@SysLog(value = "编辑系统参数")
@SaCheckPermission(type = AdminStpUtil.TYPE, value = PERMISSION_PREFIX + HelioConstant.Permission.UPDATE)
- @ApiOperation(value = "编辑")
+ @Operation(summary = "编辑")
@PutMapping(value = "/sys/params/{id}")
public ApiResult update(@PathVariable Long id, @RequestBody @Valid AdminInsertOrUpdateSysParamDTO dto) {
dto.setId(id);
@@ -78,7 +73,7 @@ public ApiResult update(@PathVariable Long id, @RequestBody @Valid AdminIn
@SysLog(value = "删除系统参数")
@SaCheckPermission(type = AdminStpUtil.TYPE, value = PERMISSION_PREFIX + HelioConstant.Permission.DELETE)
- @ApiOperation(value = "删除")
+ @Operation(summary = "删除")
@DeleteMapping(value = "/sys/params")
public ApiResult delete(@RequestBody @Valid IdsDTO dto) {
sysParamService.adminDelete(dto.getIds());
diff --git a/api/admin-api/src/main/java/cc/uncarbon/module/adminapi/web/sys/AdminSysRoleController.java b/api/admin-api/src/main/java/cc/uncarbon/module/adminapi/web/sys/AdminSysRoleController.java
index 3d949cc..954f984 100644
--- a/api/admin-api/src/main/java/cc/uncarbon/module/adminapi/web/sys/AdminSysRoleController.java
+++ b/api/admin-api/src/main/java/cc/uncarbon/module/adminapi/web/sys/AdminSysRoleController.java
@@ -8,7 +8,6 @@
import cc.uncarbon.module.adminapi.constant.AdminApiConstant;
import cc.uncarbon.module.adminapi.helper.RolePermissionCacheHelper;
import cc.uncarbon.module.sys.annotation.SysLog;
-import cc.uncarbon.module.sys.constant.SysConstant;
import cc.uncarbon.module.sys.model.request.AdminBindRoleMenuRelationDTO;
import cc.uncarbon.module.sys.model.request.AdminInsertOrUpdateSysRoleDTO;
import cc.uncarbon.module.sys.model.request.AdminListSysRoleDTO;
@@ -17,23 +16,19 @@
import cc.uncarbon.module.adminapi.util.AdminStpUtil;
import cn.dev33.satoken.annotation.SaCheckLogin;
import cn.dev33.satoken.annotation.SaCheckPermission;
-import io.swagger.annotations.Api;
-import io.swagger.annotations.ApiOperation;
+import io.swagger.v3.oas.annotations.tags.Tag;
+import io.swagger.v3.oas.annotations.Operation;
import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.*;
-import javax.validation.Valid;
+import jakarta.validation.Valid;
import java.util.Set;
@SaCheckLogin(type = AdminStpUtil.TYPE)
-@Api(value = "后台角色管理接口", tags = {"后台角色管理接口"})
-@RequestMapping(value = {
- // 兼容旧的API路由前缀
- SysConstant.SYS_MODULE_CONTEXT_PATH + HelioConstant.Version.HTTP_API_VERSION_V1,
- AdminApiConstant.HTTP_API_URL_PREFIX + "/api/v1"
-})
+@Tag(name = "后台角色管理接口")
+@RequestMapping(value = AdminApiConstant.HTTP_API_URL_PREFIX + "/api/v1")
@RequiredArgsConstructor
@RestController
@Slf4j
@@ -47,14 +42,14 @@ public class AdminSysRoleController {
@SaCheckPermission(type = AdminStpUtil.TYPE, value = PERMISSION_PREFIX + HelioConstant.Permission.RETRIEVE)
- @ApiOperation(value = "分页列表")
+ @Operation(summary = "分页列表")
@GetMapping(value = "/sys/roles")
public ApiResult> list(PageParam pageParam, AdminListSysRoleDTO dto) {
return ApiResult.data(sysRoleService.adminList(pageParam, dto));
}
@SaCheckPermission(type = AdminStpUtil.TYPE, value = PERMISSION_PREFIX + HelioConstant.Permission.RETRIEVE)
- @ApiOperation(value = "详情")
+ @Operation(summary = "详情")
@GetMapping(value = "/sys/roles/{id}")
public ApiResult getById(@PathVariable Long id) {
return ApiResult.data(sysRoleService.getOneById(id, true));
@@ -62,7 +57,7 @@ public ApiResult getById(@PathVariable Long id) {
@SysLog(value = "新增后台角色")
@SaCheckPermission(type = AdminStpUtil.TYPE, value = PERMISSION_PREFIX + HelioConstant.Permission.CREATE)
- @ApiOperation(value = "新增")
+ @Operation(summary = "新增")
@PostMapping(value = "/sys/roles")
public ApiResult insert(@RequestBody @Valid AdminInsertOrUpdateSysRoleDTO dto) {
dto.setTenantId(null);
@@ -73,7 +68,7 @@ public ApiResult insert(@RequestBody @Valid AdminInsertOrUpdateSysRoleDTO
@SysLog(value = "编辑后台角色")
@SaCheckPermission(type = AdminStpUtil.TYPE, value = PERMISSION_PREFIX + HelioConstant.Permission.UPDATE)
- @ApiOperation(value = "编辑")
+ @Operation(summary = "编辑")
@PutMapping(value = "/sys/roles/{id}")
public ApiResult update(@PathVariable Long id, @RequestBody @Valid AdminInsertOrUpdateSysRoleDTO dto) {
dto
@@ -86,7 +81,7 @@ public ApiResult update(@PathVariable Long id, @RequestBody @Valid AdminIn
@SysLog(value = "删除后台角色")
@SaCheckPermission(type = AdminStpUtil.TYPE, value = PERMISSION_PREFIX + HelioConstant.Permission.DELETE)
- @ApiOperation(value = "删除")
+ @Operation(summary = "删除")
@DeleteMapping(value = "/sys/roles")
public ApiResult delete(@RequestBody @Valid IdsDTO dto) {
sysRoleService.adminDelete(dto.getIds());
@@ -99,7 +94,7 @@ public ApiResult delete(@RequestBody @Valid IdsDTO dto) {
@SysLog(value = "绑定角色与菜单关联关系")
@SaCheckPermission(type = AdminStpUtil.TYPE, value = PERMISSION_PREFIX + "bindMenus")
- @ApiOperation(value = "绑定角色与菜单关联关系")
+ @Operation(summary = "绑定角色与菜单关联关系")
@PutMapping(value = "/sys/roles/{id}/menus")
public ApiResult bindMenus(@PathVariable Long id, @RequestBody @Valid AdminBindRoleMenuRelationDTO dto) {
dto.setRoleId(id);
diff --git a/api/admin-api/src/main/java/cc/uncarbon/module/adminapi/web/sys/AdminSysTenantController.java b/api/admin-api/src/main/java/cc/uncarbon/module/adminapi/web/sys/AdminSysTenantController.java
index 0a6a3ea..6196176 100644
--- a/api/admin-api/src/main/java/cc/uncarbon/module/adminapi/web/sys/AdminSysTenantController.java
+++ b/api/admin-api/src/main/java/cc/uncarbon/module/adminapi/web/sys/AdminSysTenantController.java
@@ -9,7 +9,6 @@
import cc.uncarbon.module.adminapi.event.KickOutSysUsersEvent;
import cc.uncarbon.module.adminapi.util.AdminStpUtil;
import cc.uncarbon.module.sys.annotation.SysLog;
-import cc.uncarbon.module.sys.constant.SysConstant;
import cc.uncarbon.module.sys.facade.SysTenantFacade;
import cc.uncarbon.module.sys.model.request.AdminInsertSysTenantDTO;
import cc.uncarbon.module.sys.model.request.AdminListSysTenantDTO;
@@ -20,22 +19,18 @@
import cn.dev33.satoken.annotation.SaCheckLogin;
import cn.dev33.satoken.annotation.SaCheckPermission;
import cn.hutool.extra.spring.SpringUtil;
-import io.swagger.annotations.Api;
-import io.swagger.annotations.ApiOperation;
+import io.swagger.v3.oas.annotations.tags.Tag;
+import io.swagger.v3.oas.annotations.Operation;
import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.*;
-import javax.validation.Valid;
+import jakarta.validation.Valid;
@SaCheckLogin(type = AdminStpUtil.TYPE)
-@Api(value = "系统租户管理接口", tags = {"系统租户管理接口"})
-@RequestMapping(value = {
- // 兼容旧的API路由前缀
- SysConstant.SYS_MODULE_CONTEXT_PATH + HelioConstant.Version.HTTP_API_VERSION_V1,
- AdminApiConstant.HTTP_API_URL_PREFIX + "/api/v1"
-})
+@Tag(name = "系统租户管理接口")
+@RequestMapping(value = AdminApiConstant.HTTP_API_URL_PREFIX + "/api/v1")
@RequiredArgsConstructor
@RestController
@Slf4j
@@ -49,14 +44,14 @@ public class AdminSysTenantController {
@SaCheckPermission(type = AdminStpUtil.TYPE, value = PERMISSION_PREFIX + HelioConstant.Permission.RETRIEVE)
- @ApiOperation(value = "分页列表")
+ @Operation(summary = "分页列表")
@GetMapping(value = "/sys/tenants")
public ApiResult> list(PageParam pageParam, AdminListSysTenantDTO dto) {
return ApiResult.data(sysTenantService.adminList(pageParam, dto));
}
@SaCheckPermission(type = AdminStpUtil.TYPE, value = PERMISSION_PREFIX + HelioConstant.Permission.RETRIEVE)
- @ApiOperation(value = "详情")
+ @Operation(summary = "详情")
@GetMapping(value = "/sys/tenants/{id}")
public ApiResult getById(@PathVariable Long id) {
return ApiResult.data(sysTenantService.getOneById(id, true));
@@ -64,7 +59,7 @@ public ApiResult getById(@PathVariable Long id) {
@SysLog(value = "新增系统租户")
@SaCheckPermission(type = AdminStpUtil.TYPE, value = PERMISSION_PREFIX + HelioConstant.Permission.CREATE)
- @ApiOperation(value = "新增")
+ @Operation(summary = "新增")
@PostMapping(value = "/sys/tenants")
public ApiResult insert(@RequestBody @Valid AdminInsertSysTenantDTO dto) {
sysTenantFacade.adminInsert(dto);
@@ -74,7 +69,7 @@ public ApiResult insert(@RequestBody @Valid AdminInsertSysTenantDTO dto) {
@SysLog(value = "编辑系统租户")
@SaCheckPermission(type = AdminStpUtil.TYPE, value = PERMISSION_PREFIX + HelioConstant.Permission.UPDATE)
- @ApiOperation(value = "编辑")
+ @Operation(summary = "编辑")
@PutMapping(value = "/sys/tenants/{id}")
public ApiResult update(@PathVariable Long id, @RequestBody @Valid AdminUpdateSysTenantDTO dto) {
dto.setId(id);
@@ -90,7 +85,7 @@ public ApiResult update(@PathVariable Long id, @RequestBody @Valid AdminUp
@SysLog(value = "删除系统租户")
@SaCheckPermission(type = AdminStpUtil.TYPE, value = PERMISSION_PREFIX + HelioConstant.Permission.DELETE)
- @ApiOperation(value = "删除")
+ @Operation(summary = "删除")
@DeleteMapping(value = "/sys/tenants")
public ApiResult delete(@RequestBody @Valid IdsDTO dto) {
SysTenantKickOutUsersBO needKickOutUsers = sysTenantFacade.adminDelete(dto.getIds());
diff --git a/api/admin-api/src/main/java/cc/uncarbon/module/adminapi/web/sys/AdminSysUserController.java b/api/admin-api/src/main/java/cc/uncarbon/module/adminapi/web/sys/AdminSysUserController.java
index b731b31..c09a74c 100644
--- a/api/admin-api/src/main/java/cc/uncarbon/module/adminapi/web/sys/AdminSysUserController.java
+++ b/api/admin-api/src/main/java/cc/uncarbon/module/adminapi/web/sys/AdminSysUserController.java
@@ -8,35 +8,30 @@
import cc.uncarbon.framework.web.model.response.ApiResult;
import cc.uncarbon.module.adminapi.constant.AdminApiConstant;
import cc.uncarbon.module.adminapi.event.KickOutSysUsersEvent;
+import cc.uncarbon.module.adminapi.util.AdminStpUtil;
import cc.uncarbon.module.sys.annotation.SysLog;
-import cc.uncarbon.module.sys.constant.SysConstant;
import cc.uncarbon.module.sys.enums.SysUserStatusEnum;
import cc.uncarbon.module.sys.model.request.*;
import cc.uncarbon.module.sys.model.response.SysUserBO;
import cc.uncarbon.module.sys.model.response.VbenAdminUserInfoVO;
import cc.uncarbon.module.sys.service.SysUserService;
-import cc.uncarbon.module.adminapi.util.AdminStpUtil;
import cn.dev33.satoken.annotation.SaCheckLogin;
import cn.dev33.satoken.annotation.SaCheckPermission;
import cn.hutool.extra.spring.SpringUtil;
-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 jakarta.validation.Valid;
import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.*;
-import javax.validation.Valid;
import java.util.Collections;
import java.util.Set;
@SaCheckLogin(type = AdminStpUtil.TYPE)
-@Api(value = "后台用户管理接口", tags = {"后台用户管理接口"})
-@RequestMapping(value = {
- // 兼容旧的API路由前缀
- SysConstant.SYS_MODULE_CONTEXT_PATH + HelioConstant.Version.HTTP_API_VERSION_V1,
- AdminApiConstant.HTTP_API_URL_PREFIX + "/api/v1"
-})
+@Tag(name = "后台用户管理接口")
+@RequestMapping(value = AdminApiConstant.HTTP_API_URL_PREFIX + "/api/v1")
@RequiredArgsConstructor
@RestController
@Slf4j
@@ -48,14 +43,14 @@ public class AdminSysUserController {
@SaCheckPermission(type = AdminStpUtil.TYPE, value = PERMISSION_PREFIX + HelioConstant.Permission.RETRIEVE)
- @ApiOperation(value = "分页列表")
+ @Operation(summary = "分页列表")
@GetMapping(value = "/sys/users")
public ApiResult> list(PageParam pageParam, AdminListSysUserDTO dto) {
return ApiResult.data(sysUserService.adminList(pageParam, dto));
}
@SaCheckPermission(type = AdminStpUtil.TYPE, value = PERMISSION_PREFIX + HelioConstant.Permission.RETRIEVE)
- @ApiOperation(value = "详情")
+ @Operation(summary = "详情")
@GetMapping(value = "/sys/users/{id}")
public ApiResult getById(@PathVariable Long id) {
return ApiResult.data(sysUserService.getOneById(id, true));
@@ -63,7 +58,7 @@ public ApiResult getById(@PathVariable Long id) {
@SysLog(value = "新增后台用户")
@SaCheckPermission(type = AdminStpUtil.TYPE, value = PERMISSION_PREFIX + HelioConstant.Permission.CREATE)
- @ApiOperation(value = "新增")
+ @Operation(summary = "新增")
@PostMapping(value = "/sys/users")
public ApiResult insert(@RequestBody @Valid AdminInsertOrUpdateSysUserDTO dto) {
dto.setId(null).setTenantId(null).validate();
@@ -74,7 +69,7 @@ public ApiResult insert(@RequestBody @Valid AdminInsertOrUpdateSysUserDTO
@SysLog(value = "编辑后台用户")
@SaCheckPermission(type = AdminStpUtil.TYPE, value = PERMISSION_PREFIX + HelioConstant.Permission.UPDATE)
- @ApiOperation(value = "编辑")
+ @Operation(summary = "编辑")
@PutMapping(value = "/sys/users/{id}")
public ApiResult update(@PathVariable Long id, @RequestBody @Valid AdminInsertOrUpdateSysUserDTO dto) {
dto.setId(id).setTenantId(null).validate();
@@ -92,7 +87,7 @@ public ApiResult update(@PathVariable Long id, @RequestBody @Valid AdminIn
@SysLog(value = "删除后台用户")
@SaCheckPermission(type = AdminStpUtil.TYPE, value = PERMISSION_PREFIX + HelioConstant.Permission.DELETE)
- @ApiOperation(value = "删除")
+ @Operation(summary = "删除")
@DeleteMapping(value = "/sys/users")
public ApiResult delete(@RequestBody @Valid IdsDTO dto) {
sysUserService.adminDelete(dto.getIds());
@@ -105,7 +100,7 @@ public ApiResult delete(@RequestBody @Valid IdsDTO dto) {
return ApiResult.success();
}
- @ApiOperation(value = "取当前用户信息")
+ @Operation(summary = "取当前用户信息")
@GetMapping(value = "/sys/users/info")
public ApiResult getCurrentUserInfo() {
return ApiResult.data(sysUserService.adminGetCurrentUserInfo());
@@ -113,7 +108,7 @@ public ApiResult getCurrentUserInfo() {
@SysLog(value = "重置某用户密码")
@SaCheckPermission(type = AdminStpUtil.TYPE, value = PERMISSION_PREFIX + "resetPassword")
- @ApiOperation(value = "重置某用户密码")
+ @Operation(summary = "重置某用户密码")
@PutMapping(value = "/sys/users/{userId}/password")
public ApiResult resetPassword(@PathVariable Long userId, @RequestBody @Valid AdminResetSysUserPasswordDTO dto) {
dto.setUserId(userId);
@@ -126,12 +121,8 @@ public ApiResult resetPassword(@PathVariable Long userId, @RequestBody @Va
}
@SysLog(value = "修改当前用户密码")
- @ApiOperation(value = "修改当前用户密码")
- @PostMapping(value = {
- "/sys/users/me/password:update",
- // 兼容旧的API路由
- "/sys/users/updatePassword"
- })
+ @Operation(summary = "修改当前用户密码")
+ @PostMapping(value = "/sys/users/me/password:update")
public ApiResult updatePassword(@RequestBody @Valid AdminUpdateCurrentSysUserPasswordDTO dto) {
if (!dto.getConfirmNewPassword().equals(dto.getNewPassword())) {
throw new BusinessException(400, "密码与确认密码不同,请检查");
@@ -145,7 +136,7 @@ public ApiResult updatePassword(@RequestBody @Valid AdminUpdateCurrentSysU
}
@SaCheckPermission(type = AdminStpUtil.TYPE, value = PERMISSION_PREFIX + "bindRoles")
- @ApiOperation(value = "绑定用户与角色关联关系")
+ @Operation(summary = "绑定用户与角色关联关系")
@PutMapping(value = "/sys/users/{userId}/roles")
public ApiResult bindRoles(@PathVariable Long userId, @RequestBody AdminBindUserRoleRelationDTO dto) {
dto.setUserId(userId);
@@ -160,12 +151,8 @@ public ApiResult bindRoles(@PathVariable Long userId, @RequestBody AdminBi
}
@SaCheckPermission(type = AdminStpUtil.TYPE, value = PERMISSION_PREFIX + "kickOut")
- @ApiOperation(value = "踢某用户下线")
- @PostMapping(value = {
- "/sys/users/{userId}:kick-out",
- // 兼容旧的API路由
- "/sys/users/{userId}/kickOut"
- })
+ @Operation(summary = "踢某用户下线")
+ @PostMapping(value = "/sys/users/{userId}:kick-out")
public ApiResult kickOut(@PathVariable Long userId) {
AdminStpUtil.kickout(userId);
@@ -173,12 +160,8 @@ public ApiResult kickOut(@PathVariable Long userId) {
}
@SaCheckPermission(type = AdminStpUtil.TYPE, value = PERMISSION_PREFIX + HelioConstant.Permission.RETRIEVE)
- @ApiOperation(value = "取指定用户关联角色ID")
- @GetMapping(value = {
- "/sys/users/{userId}/roles",
- // 兼容旧的API路由
- "/sys/users/{userId}/relatedRoleIds"
- })
+ @Operation(summary = "取指定用户关联角色ID")
+ @GetMapping(value = "/sys/users/{userId}/roles")
public ApiResult> listRelatedRoleIds(@PathVariable Long userId) {
return ApiResult.data(sysUserService.listRelatedRoleIds(userId));
}
diff --git a/api/app-api/pom.xml b/api/app-api/pom.xml
index d70501b..ce885cd 100644
--- a/api/app-api/pom.xml
+++ b/api/app-api/pom.xml
@@ -8,12 +8,12 @@
cc.uncarbon.module
helio-boot-modular
- 1.11.0
+ 2.0.0
../../pom.xml
app-api
- 1.11.0
+ 2.0.0
diff --git a/api/app-api/src/main/java/cc/uncarbon/module/appapi/web/AppAuthController.java b/api/app-api/src/main/java/cc/uncarbon/module/appapi/web/AppAuthController.java
index afe53eb..f4f3627 100644
--- a/api/app-api/src/main/java/cc/uncarbon/module/appapi/web/AppAuthController.java
+++ b/api/app-api/src/main/java/cc/uncarbon/module/appapi/web/AppAuthController.java
@@ -3,8 +3,8 @@
import cc.uncarbon.framework.web.model.response.ApiResult;
import cc.uncarbon.module.appapi.constant.AppApiConstant;
-import io.swagger.annotations.Api;
-import io.swagger.annotations.ApiOperation;
+import io.swagger.v3.oas.annotations.tags.Tag;
+import io.swagger.v3.oas.annotations.Operation;
import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.PostMapping;
@@ -12,11 +12,11 @@
import org.springframework.web.bind.annotation.RestController;
-@RequiredArgsConstructor
-@Slf4j
-@Api(value = "APP鉴权接口", tags = {"APP鉴权接口"})
+@Tag(name = "APP鉴权接口")
@RequestMapping(AppApiConstant.HTTP_API_URL_PREFIX + "/api/v1")
+@RequiredArgsConstructor
@RestController
+@Slf4j
public class AppAuthController {
/*
@@ -24,13 +24,10 @@ public class AppAuthController {
相关拦截器代码请见 CustomInterceptorConfiguration.java
*/
- @ApiOperation(value = "登录")
+ @Operation(summary = "登录")
@PostMapping("/auth/login")
public ApiResult login() {
- /*
- 编码时请参考AdminAuthController#login
- */
-
+ // 可参考 admin-api 的 AdminAuthController#login
return ApiResult.success();
}
diff --git a/bootstrap/pom.xml b/bootstrap/pom.xml
index a9bf917..b3ee287 100644
--- a/bootstrap/pom.xml
+++ b/bootstrap/pom.xml
@@ -8,7 +8,7 @@
cc.uncarbon.module
helio-boot-modular
- 1.11.0
+ 2.0.0
bootstrap
@@ -17,16 +17,16 @@
- 1.11.0
+ 2.0.0
helio-boot
- 1.11.0
+ 2.0.0
- 1.11.0
+ 2.0.0
@@ -58,9 +58,6 @@
org.springframework.boot
spring-boot-maven-plugin
${spring-boot.version}
-
- true
-
diff --git a/bootstrap/src/main/java/cc/uncarbon/module/config/CustomInterceptorConfiguration.java b/bootstrap/src/main/java/cc/uncarbon/module/config/CustomInterceptorConfiguration.java
index dd7ab88..d6f6847 100644
--- a/bootstrap/src/main/java/cc/uncarbon/module/config/CustomInterceptorConfiguration.java
+++ b/bootstrap/src/main/java/cc/uncarbon/module/config/CustomInterceptorConfiguration.java
@@ -1,11 +1,10 @@
package cc.uncarbon.module.config;
import cc.uncarbon.framework.core.props.HelioProperties;
-import cc.uncarbon.module.interceptor.AdminSaTokenParseInterceptor;
-import cc.uncarbon.module.interceptor.DefaultSaTokenParseInterceptor;
import cc.uncarbon.module.adminapi.constant.AdminApiConstant;
import cc.uncarbon.module.appapi.constant.AppApiConstant;
-import cc.uncarbon.module.sys.constant.SysConstant;
+import cc.uncarbon.module.interceptor.AdminSaTokenParseInterceptor;
+import cc.uncarbon.module.interceptor.DefaultSaTokenParseInterceptor;
import cn.dev33.satoken.interceptor.SaInterceptor;
import cn.dev33.satoken.stp.StpUtil;
import lombok.RequiredArgsConstructor;
@@ -38,11 +37,7 @@ public void addInterceptors(InterceptorRegistry registry) {
registry
.addInterceptor(new AdminSaTokenParseInterceptor())
- .addPathPatterns(
- // 兼容旧的API路由前缀
- SysConstant.SYS_MODULE_CONTEXT_PATH + "/**",
- AdminApiConstant.HTTP_API_URL_PREFIX + "/**"
- );
+ .addPathPatterns(AdminApiConstant.HTTP_API_URL_PREFIX + "/**");
/*
2. 注解拦截器,启用注解功能
diff --git a/bootstrap/src/main/java/cc/uncarbon/module/config/NotFoundConfiguration.java b/bootstrap/src/main/java/cc/uncarbon/module/config/NotFoundConfiguration.java
index ae9e4ae..c63b91d 100644
--- a/bootstrap/src/main/java/cc/uncarbon/module/config/NotFoundConfiguration.java
+++ b/bootstrap/src/main/java/cc/uncarbon/module/config/NotFoundConfiguration.java
@@ -1,13 +1,12 @@
package cc.uncarbon.module.config;
+import io.swagger.v3.oas.annotations.Operation;
+import jakarta.servlet.http.HttpServletRequest;
import org.springframework.boot.web.servlet.error.ErrorController;
import org.springframework.http.HttpHeaders;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.servlet.NoHandlerFoundException;
-import springfox.documentation.annotations.ApiIgnore;
-
-import javax.servlet.http.HttpServletRequest;
/**
* 由于除 404 以外的异常都会被全局异常处理掉,所以走到这里的请求都是 404 了
@@ -18,12 +17,12 @@
public class NotFoundConfiguration implements ErrorController {
/**
- * 屏蔽 swagger 文档生成;主动抛出异常,由全局异常处理接管
+ * 不生成接口文档
+ * 主动抛出异常,由全局异常处理接管
*/
- @ApiIgnore
+ @Operation(hidden = true)
@RequestMapping(value = "/error")
public void error(HttpServletRequest request) throws NoHandlerFoundException {
throw new NoHandlerFoundException(request.getMethod(), request.getRequestURI(), new HttpHeaders());
}
-
}
diff --git a/bootstrap/src/main/java/cc/uncarbon/module/interceptor/AdminSaTokenParseInterceptor.java b/bootstrap/src/main/java/cc/uncarbon/module/interceptor/AdminSaTokenParseInterceptor.java
index 78c978c..d3279d9 100644
--- a/bootstrap/src/main/java/cc/uncarbon/module/interceptor/AdminSaTokenParseInterceptor.java
+++ b/bootstrap/src/main/java/cc/uncarbon/module/interceptor/AdminSaTokenParseInterceptor.java
@@ -12,8 +12,8 @@
import org.springframework.web.servlet.AsyncHandlerInterceptor;
import org.springframework.web.servlet.resource.ResourceHttpRequestHandler;
-import javax.servlet.http.HttpServletRequest;
-import javax.servlet.http.HttpServletResponse;
+import jakarta.servlet.http.HttpServletRequest;
+import jakarta.servlet.http.HttpServletResponse;
/**
diff --git a/bootstrap/src/main/java/cc/uncarbon/module/interceptor/DefaultSaTokenParseInterceptor.java b/bootstrap/src/main/java/cc/uncarbon/module/interceptor/DefaultSaTokenParseInterceptor.java
index 936c535..6bfd41a 100644
--- a/bootstrap/src/main/java/cc/uncarbon/module/interceptor/DefaultSaTokenParseInterceptor.java
+++ b/bootstrap/src/main/java/cc/uncarbon/module/interceptor/DefaultSaTokenParseInterceptor.java
@@ -12,8 +12,8 @@
import org.springframework.web.servlet.AsyncHandlerInterceptor;
import org.springframework.web.servlet.resource.ResourceHttpRequestHandler;
-import javax.servlet.http.HttpServletRequest;
-import javax.servlet.http.HttpServletResponse;
+import jakarta.servlet.http.HttpServletRequest;
+import jakarta.servlet.http.HttpServletResponse;
/**
* 从请求头解析并赋值到用户上下文,默认用于C端用户的鉴权
diff --git a/bootstrap/src/main/resources/application-dev.yml b/bootstrap/src/main/resources/application-dev.yml
index 3273d85..bf739d0 100644
--- a/bootstrap/src/main/resources/application-dev.yml
+++ b/bootstrap/src/main/resources/application-dev.yml
@@ -20,15 +20,16 @@ helio:
enabled: false
spring:
- redis:
- # Redis连接主机
- host: 127.0.0.1
- # Redis连接端口
- port: 6379
- # Redis登录密码;如果没有设置密码,请注释掉下面这行,避免向 Redis-server 发送 AUTH 鉴权请求,引发程序启动失败
- password:
- # Redis数据库序号
- database: 1
+ data:
+ redis:
+ # Redis连接主机
+ host: 127.0.0.1
+ # Redis连接端口
+ port: 6379
+ # Redis登录密码;如果没有设置密码,请注释掉下面这行,避免向 Redis-server 发送 AUTH 鉴权请求,引发程序启动失败
+ password:
+ # Redis数据库序号
+ database: 1
knife4j:
# 生产环境务必设为true
diff --git a/bootstrap/src/main/resources/application-prod.yml b/bootstrap/src/main/resources/application-prod.yml
index 7612275..99e6725 100644
--- a/bootstrap/src/main/resources/application-prod.yml
+++ b/bootstrap/src/main/resources/application-prod.yml
@@ -20,15 +20,16 @@ helio:
enabled: false
spring:
- redis:
- # Redis连接主机
- host: 127.0.0.1
- # Redis连接端口
- port: 6379
- # Redis登录密码;如果没有设置密码,请注释掉下面这行,避免向 Redis-server 发送 AUTH 鉴权请求,引发程序启动失败
- password:
- # Redis数据库序号
- database: 1
+ data:
+ redis:
+ # Redis连接主机
+ host: 127.0.0.1
+ # Redis连接端口
+ port: 6379
+ # Redis登录密码;如果没有设置密码,请注释掉下面这行,避免向 Redis-server 发送 AUTH 鉴权请求,引发程序启动失败
+ password:
+ # Redis数据库序号
+ database: 1
knife4j:
# 生产环境务必设为true
diff --git a/bootstrap/src/main/resources/application-test.yml b/bootstrap/src/main/resources/application-test.yml
index 74cefd7..108d0f4 100644
--- a/bootstrap/src/main/resources/application-test.yml
+++ b/bootstrap/src/main/resources/application-test.yml
@@ -20,15 +20,16 @@ helio:
enabled: true
spring:
- redis:
- # Redis连接主机
- host: 127.0.0.1
- # Redis连接端口
- port: 6379
- # Redis登录密码;如果没有设置密码,请注释掉下面这行,避免向 Redis-server 发送 AUTH 鉴权请求,引发程序启动失败
- password:
- # Redis数据库序号
- database: 1
+ data:
+ redis:
+ # Redis连接主机
+ host: 127.0.0.1
+ # Redis连接端口
+ port: 6379
+ # Redis登录密码;如果没有设置密码,请注释掉下面这行,避免向 Redis-server 发送 AUTH 鉴权请求,引发程序启动失败
+ password:
+ # Redis数据库序号
+ database: 1
knife4j:
# 生产环境务必设为true
diff --git a/bootstrap/src/main/resources/application.yml b/bootstrap/src/main/resources/application.yml
index 7c063ff..351be22 100644
--- a/bootstrap/src/main/resources/application.yml
+++ b/bootstrap/src/main/resources/application.yml
@@ -13,10 +13,6 @@ spring:
type: redis
redis:
cache-null-values: true
- mvc:
- pathmatch:
- # Boot 2.6+ 默认的路由匹配策略,Swagger 暂不兼容,使用老策略
- matching-strategy: ant_path_matcher
messages:
# 国际化资源目录,一般不做修改
basename: i18n/messages
@@ -47,9 +43,10 @@ helio:
# 放行路由, 不进行登录校验
# 图标
- /favicon.ico
- # Swagger API文档接口
- - /v2/api-docs
+ # SpringDoc 接口
- /v3/api-docs
+ # SpringMVC 404
+ - /error
# C端登录接口
- /app/api/v1/auth/login
tenant:
diff --git a/bootstrap/src/main/resources/logback-spring.xml b/bootstrap/src/main/resources/logback-spring.xml
index 08e28d3..d7a4b94 100644
--- a/bootstrap/src/main/resources/logback-spring.xml
+++ b/bootstrap/src/main/resources/logback-spring.xml
@@ -181,6 +181,7 @@
1024
+
true
diff --git a/bootstrap/src/test/java/cc/uncarbon/test/BasicUnitTest.java b/bootstrap/src/test/java/cc/uncarbon/test/BasicUnitTest.java
deleted file mode 100644
index 355012f..0000000
--- a/bootstrap/src/test/java/cc/uncarbon/test/BasicUnitTest.java
+++ /dev/null
@@ -1,37 +0,0 @@
-package cc.uncarbon.test;
-
-import cc.uncarbon.module.HelioBootApplication;
-import cc.uncarbon.framework.i18n.util.I18nUtil;
-import cc.uncarbon.module.sys.enums.SysErrorEnum;
-import cn.hutool.core.lang.Assert;
-import org.junit.jupiter.api.Test;
-import org.springframework.boot.test.context.SpringBootTest;
-
-import java.util.Locale;
-
-/**
- * 基础单元测试
- * @author Uncarbon
- */
-@SuppressWarnings("squid:S2699")
-@SpringBootTest(classes = HelioBootApplication.class)
-class BasicUnitTest {
-
- @Test
- void testI18nMessage() {
- String msg = I18nUtil.messageOf(SysErrorEnum.INVALID_TENANT);
- Assert.isTrue("所属租户无效".equals(msg));
-
- msg = I18nUtil.messageOf(Locale.US, SysErrorEnum.INCORRECT_PIN_OR_PWD);
- Assert.isTrue("Incorrect username or password".equals(msg));
-
- msg = I18nUtil.messageOf(Locale.CHINA, SysErrorEnum.DISABLED_TENANT);
- Assert.isTrue("所属租户已禁用".equals(msg));
-
- msg = I18nUtil.messageOf(Locale.US, "INCORRECT_PIN_OR_PWD");
- Assert.isTrue(msg == null);
-
- msg = I18nUtil.messageOf(Locale.US, "SysErrorEnum.UUID_CANNOT_BE_BLANK");
- Assert.isTrue("UUID cannot be blank".equals(msg));
- }
-}
diff --git a/bootstrap/src/test/java/cc/uncarbon/test/ExampleUnitTest.java b/bootstrap/src/test/java/cc/uncarbon/test/ExampleUnitTest.java
new file mode 100644
index 0000000..3857a7e
--- /dev/null
+++ b/bootstrap/src/test/java/cc/uncarbon/test/ExampleUnitTest.java
@@ -0,0 +1,56 @@
+package cc.uncarbon.test;
+
+import cc.uncarbon.framework.core.constant.HelioConstant;
+import cc.uncarbon.framework.core.context.TenantContext;
+import cc.uncarbon.framework.core.context.TenantContextHolder;
+import cc.uncarbon.framework.core.context.UserContext;
+import cc.uncarbon.framework.core.context.UserContextHolder;
+import cc.uncarbon.module.HelioBootApplication;
+import cc.uncarbon.module.sys.model.response.SysRoleBO;
+import cc.uncarbon.module.sys.service.SysRoleService;
+import cn.hutool.core.collection.CollUtil;
+import jakarta.annotation.Resource;
+import org.junit.jupiter.api.Assertions;
+import org.junit.jupiter.api.BeforeEach;
+import org.junit.jupiter.api.Test;
+import org.springframework.boot.test.context.SpringBootTest;
+
+import java.util.List;
+
+/**
+ * 一个仅用于示例的单元测试
+ *
+ * @author Uncarbon
+ */
+@SpringBootTest(classes = HelioBootApplication.class)
+class ExampleUnitTest {
+
+ @Resource
+ private SysRoleService sysRoleService;
+
+
+ @BeforeEach
+ public void init() {
+ // 设置用户上下文
+ UserContext userContext = new UserContext();
+ userContext
+ .setUserId(1L)
+ .setUserName("超级管理员")
+ // 用户类型, 根据单元测试需要修改
+ .setUserTypeStr("ADMIN_USER");
+ UserContextHolder.setUserContext(userContext);
+
+ // 设置租户上下文
+ TenantContext tenantContext = new TenantContext();
+ tenantContext
+ .setTenantId(HelioConstant.Tenant.DEFAULT_PRIVILEGED_TENANT_ID)
+ .setTenantName("超级租户");
+ TenantContextHolder.setTenantContext(tenantContext);
+ }
+
+ @Test
+ void exampleTest() {
+ List selectOptions = sysRoleService.adminSelectOptions();
+ Assertions.assertTrue(CollUtil.isNotEmpty(selectOptions));
+ }
+}
diff --git a/bootstrap/src/test/java/cc/uncarbon/test/SysLogServiceUnitTest.java b/bootstrap/src/test/java/cc/uncarbon/test/SysLogServiceUnitTest.java
deleted file mode 100644
index f957004..0000000
--- a/bootstrap/src/test/java/cc/uncarbon/test/SysLogServiceUnitTest.java
+++ /dev/null
@@ -1,36 +0,0 @@
-package cc.uncarbon.test;
-
-import cc.uncarbon.module.HelioBootApplication;
-import cc.uncarbon.framework.core.page.PageParam;
-import cc.uncarbon.module.sys.model.request.AdminListSysLogDTO;
-import cc.uncarbon.module.sys.model.response.SysLogBO;
-import cc.uncarbon.module.sys.service.SysLogService;
-import org.junit.jupiter.api.BeforeEach;
-import org.junit.jupiter.api.Test;
-import org.springframework.boot.test.context.SpringBootTest;
-
-import javax.annotation.Resource;
-import java.util.List;
-
-/**
- * @author Uncarbon
- */
-@SpringBootTest(classes = HelioBootApplication.class)
-class SysLogServiceUnitTest {
-
- @Resource
- private SysLogService sysLogService;
-
-
- @BeforeEach
- public void init() {
- // 可以在这里进行初始化操作, 如设置用户上下文等
- // UserContextHolder.setUserContext();
- }
-
- @Test
- void testAdminList() {
- List ret = sysLogService.adminList(new PageParam(1, 10000), new AdminListSysLogDTO()).getRecords();
- System.out.println(ret);
- }
-}
diff --git a/pom.xml b/pom.xml
index 03e996d..5b06959 100644
--- a/pom.xml
+++ b/pom.xml
@@ -8,19 +8,19 @@
cc.uncarbon.framework
helio-starters
- 1.11.0
+ 2.0.0
cc.uncarbon.module
helio-boot-modular
Helio 多模块版单体脚手架
- 1.11.0
+ 2.0.0
2.1.0
- 8.4.3
+ 8.5.8
diff --git a/service-module/oss/oss-facade/pom.xml b/service-module/oss/oss-facade/pom.xml
index 12164cf..363fdfd 100644
--- a/service-module/oss/oss-facade/pom.xml
+++ b/service-module/oss/oss-facade/pom.xml
@@ -8,7 +8,7 @@
cc.uncarbon.module
oss
- 1.11.0
+ 2.0.0
oss-facade
diff --git a/service-module/oss/oss-facade/src/main/java/cc/uncarbon/module/oss/model/request/AdminListOssFileInfoDTO.java b/service-module/oss/oss-facade/src/main/java/cc/uncarbon/module/oss/model/request/AdminListOssFileInfoDTO.java
index e1416cf..946513f 100644
--- a/service-module/oss/oss-facade/src/main/java/cc/uncarbon/module/oss/model/request/AdminListOssFileInfoDTO.java
+++ b/service-module/oss/oss-facade/src/main/java/cc/uncarbon/module/oss/model/request/AdminListOssFileInfoDTO.java
@@ -2,7 +2,7 @@
import cc.uncarbon.framework.core.constant.HelioConstant;
import com.fasterxml.jackson.annotation.JsonFormat;
-import io.swagger.annotations.ApiModelProperty;
+import io.swagger.v3.oas.annotations.media.Schema;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
@@ -27,21 +27,21 @@ public class AdminListOssFileInfoDTO implements Serializable {
private static final long serialVersionUID = 1L;
- @ApiModelProperty(value = "原始文件名(关键词)")
+ @Schema(description = "原始文件名(关键词)")
private String originalFilename;
- @ApiModelProperty(value = "扩展名")
+ @Schema(description = "扩展名")
private String extendName;
- @ApiModelProperty(value = "文件类别")
+ @Schema(description = "文件类别")
private String classified;
- @ApiModelProperty(value = "时间区间起")
+ @Schema(description = "时间区间起")
@JsonFormat(shape = JsonFormat.Shape.STRING, pattern = HelioConstant.Jackson.DATE_TIME_FORMAT)
@DateTimeFormat(pattern = HelioConstant.Jackson.DATE_TIME_FORMAT)
private LocalDateTime beginAt;
- @ApiModelProperty(value = "时间区间止")
+ @Schema(description = "时间区间止")
@JsonFormat(shape = JsonFormat.Shape.STRING, pattern = HelioConstant.Jackson.DATE_TIME_FORMAT)
@DateTimeFormat(pattern = HelioConstant.Jackson.DATE_TIME_FORMAT)
private LocalDateTime endAt;
diff --git a/service-module/oss/oss-facade/src/main/java/cc/uncarbon/module/oss/model/request/UploadFileAttributeDTO.java b/service-module/oss/oss-facade/src/main/java/cc/uncarbon/module/oss/model/request/UploadFileAttributeDTO.java
index dfa2cbe..a72bb09 100644
--- a/service-module/oss/oss-facade/src/main/java/cc/uncarbon/module/oss/model/request/UploadFileAttributeDTO.java
+++ b/service-module/oss/oss-facade/src/main/java/cc/uncarbon/module/oss/model/request/UploadFileAttributeDTO.java
@@ -1,6 +1,6 @@
package cc.uncarbon.module.oss.model.request;
-import io.swagger.annotations.ApiModelProperty;
+import io.swagger.v3.oas.annotations.media.Schema;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
@@ -20,19 +20,19 @@ public class UploadFileAttributeDTO implements Serializable {
private static final long serialVersionUID = 1L;
- @ApiModelProperty(value = "文件类别", example = "id_card=身份证 driver_license=驾驶证")
+ @Schema(description = "文件类别", example = "id_card=身份证 driver_license=驾驶证")
private String classified;
/*
以下字段为内部使用
*/
- @ApiModelProperty(value = "原始文件名", hidden = true)
+ @Schema(description = "原始文件名", hidden = true)
private String originalFilename;
- @ApiModelProperty(value = "MIME类型", hidden = true)
+ @Schema(description = "MIME类型", hidden = true)
private String contentType;
- @ApiModelProperty(value = "MD5", hidden = true)
+ @Schema(description = "MD5", hidden = true)
private String md5;
}
diff --git a/service-module/oss/oss-facade/src/main/java/cc/uncarbon/module/oss/model/response/OssFileDownloadReplyBO.java b/service-module/oss/oss-facade/src/main/java/cc/uncarbon/module/oss/model/response/OssFileDownloadReplyBO.java
index a33e05c..d1915e0 100644
--- a/service-module/oss/oss-facade/src/main/java/cc/uncarbon/module/oss/model/response/OssFileDownloadReplyBO.java
+++ b/service-module/oss/oss-facade/src/main/java/cc/uncarbon/module/oss/model/response/OssFileDownloadReplyBO.java
@@ -1,6 +1,6 @@
package cc.uncarbon.module.oss.model.response;
-import io.swagger.annotations.ApiModelProperty;
+import io.swagger.v3.oas.annotations.media.Schema;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
@@ -22,16 +22,16 @@ public class OssFileDownloadReplyBO implements Serializable {
private static final long serialVersionUID = 1L;
- @ApiModelProperty(value = "是否直接重定向到对象存储直链", notes = "如果允许客户端直接从“对象存储直链”下载,则本字段可以置 true")
+ @Schema(description = "是否直接重定向到对象存储直链", title = "如果允许客户端直接从“对象存储直链”下载,则本字段可以置 true")
private boolean redirect2DirectUrl;
- @ApiModelProperty(value = "文件数据", notes = "如果允许客户端直接从“对象存储直链”下载,则本字段可以置空")
+ @Schema(description = "文件数据", title = "如果允许客户端直接从“对象存储直链”下载,则本字段可以置空")
private byte[] fileBytes;
- @ApiModelProperty(value = "对象存储直链")
+ @Schema(description = "对象存储直链")
private String directUrl;
- @ApiModelProperty(value = "存储文件名")
+ @Schema(description = "存储文件名")
private String storageFilename;
}
diff --git a/service-module/oss/oss-facade/src/main/java/cc/uncarbon/module/oss/model/response/OssFileInfoBO.java b/service-module/oss/oss-facade/src/main/java/cc/uncarbon/module/oss/model/response/OssFileInfoBO.java
index d7c1e01..c0241b1 100644
--- a/service-module/oss/oss-facade/src/main/java/cc/uncarbon/module/oss/model/response/OssFileInfoBO.java
+++ b/service-module/oss/oss-facade/src/main/java/cc/uncarbon/module/oss/model/response/OssFileInfoBO.java
@@ -2,7 +2,7 @@
import cc.uncarbon.framework.core.constant.HelioConstant;
import com.fasterxml.jackson.annotation.JsonFormat;
-import io.swagger.annotations.ApiModelProperty;
+import io.swagger.v3.oas.annotations.media.Schema;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
@@ -26,47 +26,47 @@ public class OssFileInfoBO implements Serializable {
private static final long serialVersionUID = 1L;
- @ApiModelProperty(value = "主键ID")
+ @Schema(description = "主键ID")
private Long id;
- @ApiModelProperty(value = "创建时刻")
+ @Schema(description = "创建时刻")
@DateTimeFormat(pattern = HelioConstant.Jackson.DATE_TIME_FORMAT)
@JsonFormat(shape = JsonFormat.Shape.STRING, pattern = HelioConstant.Jackson.DATE_TIME_FORMAT)
private LocalDateTime createdAt;
- @ApiModelProperty(value = "更新时刻")
+ @Schema(description = "更新时刻")
@DateTimeFormat(pattern = HelioConstant.Jackson.DATE_TIME_FORMAT)
@JsonFormat(shape = JsonFormat.Shape.STRING, pattern = HelioConstant.Jackson.DATE_TIME_FORMAT)
private LocalDateTime updatedAt;
- @ApiModelProperty(value = "存储平台")
+ @Schema(description = "存储平台")
private String storagePlatform;
- @ApiModelProperty(value = "基础存储路径")
+ @Schema(description = "基础存储路径")
private String storageBasePath;
- @ApiModelProperty(value = "存储路径")
+ @Schema(description = "存储路径")
private String storagePath;
- @ApiModelProperty(value = "存储文件名")
+ @Schema(description = "存储文件名")
private String storageFilename;
- @ApiModelProperty(value = "原始文件名")
+ @Schema(description = "原始文件名")
private String originalFilename;
- @ApiModelProperty(value = "扩展名")
+ @Schema(description = "扩展名")
private String extendName;
- @ApiModelProperty(value = "文件大小")
+ @Schema(description = "文件大小")
private Long fileSize;
- @ApiModelProperty(value = "MD5")
+ @Schema(description = "MD5")
private String md5;
- @ApiModelProperty(value = "类别编号")
+ @Schema(description = "类别编号")
private String classified;
- @ApiModelProperty(value = "对象存储直链")
+ @Schema(description = "对象存储直链")
private String directUrl;
/**
diff --git a/service-module/oss/oss-facade/src/main/java/cc/uncarbon/module/oss/model/response/OssFileUploadResultVO.java b/service-module/oss/oss-facade/src/main/java/cc/uncarbon/module/oss/model/response/OssFileUploadResultVO.java
index ed0a69b..61086f0 100644
--- a/service-module/oss/oss-facade/src/main/java/cc/uncarbon/module/oss/model/response/OssFileUploadResultVO.java
+++ b/service-module/oss/oss-facade/src/main/java/cc/uncarbon/module/oss/model/response/OssFileUploadResultVO.java
@@ -1,6 +1,6 @@
package cc.uncarbon.module.oss.model.response;
-import io.swagger.annotations.ApiModelProperty;
+import io.swagger.v3.oas.annotations.media.Schema;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
@@ -20,13 +20,13 @@ public class OssFileUploadResultVO implements Serializable {
private static final long serialVersionUID = 1L;
- @ApiModelProperty(value = "文件ID")
+ @Schema(description = "文件ID")
private Long fileId;
- @ApiModelProperty(value = "存储文件名")
+ @Schema(description = "存储文件名")
private String filename;
- @ApiModelProperty(value = "完整外链")
+ @Schema(description = "完整外链")
private String url;
}
diff --git a/service-module/oss/oss-service/pom.xml b/service-module/oss/oss-service/pom.xml
index 7d7fbf3..5e5c6f3 100644
--- a/service-module/oss/oss-service/pom.xml
+++ b/service-module/oss/oss-service/pom.xml
@@ -8,14 +8,14 @@
cc.uncarbon.module
oss
- 1.11.0
+ 2.0.0
oss-service
- 1.11.0
+ 2.0.0
@@ -23,7 +23,7 @@
cc.uncarbon.module
oss-facade
- 1.11.0
+ 2.0.0
diff --git a/service-module/oss/oss-service/src/main/java/cc/uncarbon/module/oss/entity/OssFileInfoEntity.java b/service-module/oss/oss-service/src/main/java/cc/uncarbon/module/oss/entity/OssFileInfoEntity.java
index bc4435e..678dca7 100644
--- a/service-module/oss/oss-service/src/main/java/cc/uncarbon/module/oss/entity/OssFileInfoEntity.java
+++ b/service-module/oss/oss-service/src/main/java/cc/uncarbon/module/oss/entity/OssFileInfoEntity.java
@@ -3,7 +3,7 @@
import cc.uncarbon.framework.crud.entity.HelioBaseEntity;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
-import io.swagger.annotations.ApiModelProperty;
+import io.swagger.v3.oas.annotations.media.Schema;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.EqualsAndHashCode;
@@ -27,43 +27,43 @@ public class OssFileInfoEntity extends HelioBaseEntity {
private static final long serialVersionUID = 1L;
- @ApiModelProperty(value = "存储平台")
+ @Schema(description = "存储平台")
@TableField(value = "storage_platform")
private String storagePlatform;
- @ApiModelProperty(value = "基础存储路径")
+ @Schema(description = "基础存储路径")
@TableField(value = "storage_base_path")
private String storageBasePath;
- @ApiModelProperty(value = "存储路径")
+ @Schema(description = "存储路径")
@TableField(value = "storage_path")
private String storagePath;
- @ApiModelProperty(value = "存储文件名")
+ @Schema(description = "存储文件名")
@TableField(value = "storage_filename")
private String storageFilename;
- @ApiModelProperty(value = "原始文件名")
+ @Schema(description = "原始文件名")
@TableField(value = "original_filename")
private String originalFilename;
- @ApiModelProperty(value = "扩展名")
+ @Schema(description = "扩展名")
@TableField(value = "extend_name")
private String extendName;
- @ApiModelProperty(value = "文件大小")
+ @Schema(description = "文件大小")
@TableField(value = "file_size")
private Long fileSize;
- @ApiModelProperty(value = "MD5")
+ @Schema(description = "MD5")
@TableField(value = "md5")
private String md5;
- @ApiModelProperty(value = "类别名")
+ @Schema(description = "类别名")
@TableField(value = "classified")
private String classified;
- @ApiModelProperty(value = "对象存储直链")
+ @Schema(description = "对象存储直链")
@TableField(value = "direct_url")
private String directUrl;
diff --git a/service-module/oss/pom.xml b/service-module/oss/pom.xml
index 2dad57e..1bbcf40 100644
--- a/service-module/oss/pom.xml
+++ b/service-module/oss/pom.xml
@@ -8,13 +8,13 @@
cc.uncarbon.module
helio-boot-modular
- 1.11.0
+ 2.0.0
../../pom.xml
oss
文件上传下载服务
- 1.11.0
+ 2.0.0
oss-facade
diff --git a/service-module/sys/pom.xml b/service-module/sys/pom.xml
index 2c0d6e6..2949962 100644
--- a/service-module/sys/pom.xml
+++ b/service-module/sys/pom.xml
@@ -8,13 +8,13 @@
cc.uncarbon.module
helio-boot-modular
- 1.11.0
+ 2.0.0
../../pom.xml
sys
后台系统管理服务
- 1.11.0
+ 2.0.0
sys-facade
diff --git a/service-module/sys/sys-facade/pom.xml b/service-module/sys/sys-facade/pom.xml
index 0caf43a..ef8223d 100644
--- a/service-module/sys/sys-facade/pom.xml
+++ b/service-module/sys/sys-facade/pom.xml
@@ -8,7 +8,7 @@
cc.uncarbon.module
sys
- 1.11.0
+ 2.0.0
sys-facade
diff --git a/service-module/sys/sys-facade/src/main/java/cc/uncarbon/module/sys/constant/SysConstant.java b/service-module/sys/sys-facade/src/main/java/cc/uncarbon/module/sys/constant/SysConstant.java
index 333266d..123ba11 100644
--- a/service-module/sys/sys-facade/src/main/java/cc/uncarbon/module/sys/constant/SysConstant.java
+++ b/service-module/sys/sys-facade/src/main/java/cc/uncarbon/module/sys/constant/SysConstant.java
@@ -8,13 +8,6 @@ public final class SysConstant {
private SysConstant() {
}
- /**
- * 后台管理接口路由前缀
- * @deprecated since 1.9.0, because its meaning is no longer so fitting; replaced by AdminApiConstant#API_URL_PREFIX
- */
- @Deprecated
- public static final String SYS_MODULE_CONTEXT_PATH = "/sys";
-
/**
* 无上级节点的父级ID
*/
diff --git a/service-module/sys/sys-facade/src/main/java/cc/uncarbon/module/sys/model/request/AdminBindRoleMenuRelationDTO.java b/service-module/sys/sys-facade/src/main/java/cc/uncarbon/module/sys/model/request/AdminBindRoleMenuRelationDTO.java
index 32ced65..fbb5dd3 100644
--- a/service-module/sys/sys-facade/src/main/java/cc/uncarbon/module/sys/model/request/AdminBindRoleMenuRelationDTO.java
+++ b/service-module/sys/sys-facade/src/main/java/cc/uncarbon/module/sys/model/request/AdminBindRoleMenuRelationDTO.java
@@ -1,6 +1,6 @@
package cc.uncarbon.module.sys.model.request;
-import io.swagger.annotations.ApiModelProperty;
+import io.swagger.v3.oas.annotations.media.Schema;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
@@ -21,10 +21,10 @@
@Data
public class AdminBindRoleMenuRelationDTO implements Serializable {
- @ApiModelProperty(value = "菜单Ids(空=清理关联关系后不再绑定任何菜单)")
+ @Schema(description = "菜单Ids(空=清理关联关系后不再绑定任何菜单)")
private Set menuIds;
- @ApiModelProperty(value = "角色ID", hidden = true)
+ @Schema(description = "角色ID", hidden = true)
private Long roleId;
}
diff --git a/service-module/sys/sys-facade/src/main/java/cc/uncarbon/module/sys/model/request/AdminBindUserRoleRelationDTO.java b/service-module/sys/sys-facade/src/main/java/cc/uncarbon/module/sys/model/request/AdminBindUserRoleRelationDTO.java
index 961cb50..4094782 100644
--- a/service-module/sys/sys-facade/src/main/java/cc/uncarbon/module/sys/model/request/AdminBindUserRoleRelationDTO.java
+++ b/service-module/sys/sys-facade/src/main/java/cc/uncarbon/module/sys/model/request/AdminBindUserRoleRelationDTO.java
@@ -1,6 +1,6 @@
package cc.uncarbon.module.sys.model.request;
-import io.swagger.annotations.ApiModelProperty;
+import io.swagger.v3.oas.annotations.media.Schema;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
@@ -21,10 +21,10 @@
@Data
public class AdminBindUserRoleRelationDTO implements Serializable {
- @ApiModelProperty(value = "角色Ids(空=清理关联关系后不再绑定任何角色)")
+ @Schema(description = "角色Ids(空=清理关联关系后不再绑定任何角色)")
private Set roleIds;
- @ApiModelProperty(value = "用户ID", hidden = true)
+ @Schema(description = "用户ID", hidden = true)
private Long userId;
}
diff --git a/service-module/sys/sys-facade/src/main/java/cc/uncarbon/module/sys/model/request/AdminInsertOrUpdateSysDataDictDTO.java b/service-module/sys/sys-facade/src/main/java/cc/uncarbon/module/sys/model/request/AdminInsertOrUpdateSysDataDictDTO.java
index a77b5f6..1d2f71c 100644
--- a/service-module/sys/sys-facade/src/main/java/cc/uncarbon/module/sys/model/request/AdminInsertOrUpdateSysDataDictDTO.java
+++ b/service-module/sys/sys-facade/src/main/java/cc/uncarbon/module/sys/model/request/AdminInsertOrUpdateSysDataDictDTO.java
@@ -1,14 +1,14 @@
package cc.uncarbon.module.sys.model.request;
-import io.swagger.annotations.ApiModelProperty;
+import io.swagger.v3.oas.annotations.media.Schema;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.experimental.Accessors;
-import javax.validation.constraints.NotBlank;
-import javax.validation.constraints.Size;
+import jakarta.validation.constraints.NotBlank;
+import jakarta.validation.constraints.Size;
import java.io.Serializable;
@@ -22,43 +22,43 @@
@Data
public class AdminInsertOrUpdateSysDataDictDTO implements Serializable {
- @ApiModelProperty(value = "主键ID", hidden = true, notes = "仅更新时使用")
+ @Schema(description = "主键ID", hidden = true, title = "仅更新时使用")
private Long id;
- @ApiModelProperty(value = "驼峰式键名", required = true)
+ @Schema(description = "驼峰式键名", requiredMode = Schema.RequiredMode.REQUIRED)
@Size(max = 100, message = "【驼峰式键名】最长100位")
@NotBlank(message = "驼峰式键名不能为空")
private String camelCaseKey;
- @ApiModelProperty(value = "下划线式键名", required = true)
+ @Schema(description = "下划线式键名", requiredMode = Schema.RequiredMode.REQUIRED)
@Size(max = 100, message = "【下划线式键名】最长100位")
@NotBlank(message = "下划线式键名不能为空")
private String underCaseKey;
- @ApiModelProperty(value = "帕斯卡式键名", required = true)
+ @Schema(description = "帕斯卡式键名", requiredMode = Schema.RequiredMode.REQUIRED)
@Size(max = 100, message = "【帕斯卡式键名】最长100位")
@NotBlank(message = "帕斯卡式键名不能为空")
private String pascalCaseKey;
- @ApiModelProperty(value = "数据值", required = true)
+ @Schema(description = "数据值", requiredMode = Schema.RequiredMode.REQUIRED)
@Size(max = 255, message = "【数据值】最长255位")
@NotBlank(message = "数据值不能为空")
private String value;
- @ApiModelProperty(value = "描述", required = true)
+ @Schema(description = "描述", requiredMode = Schema.RequiredMode.REQUIRED)
@Size(max = 255, message = "【描述】最长255位")
@NotBlank(message = "描述不能为空")
private String description;
- @ApiModelProperty(value = "单位")
+ @Schema(description = "单位")
@Size(max = 30, message = "【单位】最长30位")
private String unit;
- @ApiModelProperty(value = "取值范围")
+ @Schema(description = "取值范围")
@Size(max = 255, message = "【取值范围】最长255位")
private String valueRange;
- @ApiModelProperty(value = "别称键名")
+ @Schema(description = "别称键名")
@Size(max = 100, message = "【别称键名】最长100位")
private String aliasKey;
diff --git a/service-module/sys/sys-facade/src/main/java/cc/uncarbon/module/sys/model/request/AdminInsertOrUpdateSysDeptDTO.java b/service-module/sys/sys-facade/src/main/java/cc/uncarbon/module/sys/model/request/AdminInsertOrUpdateSysDeptDTO.java
index d1a6fe4..781a6df 100644
--- a/service-module/sys/sys-facade/src/main/java/cc/uncarbon/module/sys/model/request/AdminInsertOrUpdateSysDeptDTO.java
+++ b/service-module/sys/sys-facade/src/main/java/cc/uncarbon/module/sys/model/request/AdminInsertOrUpdateSysDeptDTO.java
@@ -1,15 +1,15 @@
package cc.uncarbon.module.sys.model.request;
import cc.uncarbon.framework.core.enums.EnabledStatusEnum;
-import io.swagger.annotations.ApiModelProperty;
+import io.swagger.v3.oas.annotations.media.Schema;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.experimental.Accessors;
-import javax.validation.constraints.NotBlank;
-import javax.validation.constraints.Size;
+import jakarta.validation.constraints.NotBlank;
+import jakarta.validation.constraints.Size;
import java.io.Serializable;
@@ -23,21 +23,21 @@
@Data
public class AdminInsertOrUpdateSysDeptDTO implements Serializable {
- @ApiModelProperty(value = "主键ID", hidden = true, notes = "仅更新时使用")
+ @Schema(description = "主键ID", hidden = true, title = "仅更新时使用")
private Long id;
- @ApiModelProperty(value = "部门名称", required = true)
+ @Schema(description = "部门名称", requiredMode = Schema.RequiredMode.REQUIRED)
@Size(max = 50, message = "【部门名称】最长50位")
@NotBlank(message = "部门名称不能为空")
private String title;
- @ApiModelProperty(value = "上级ID(无上级节点设置为0)")
+ @Schema(description = "上级ID(无上级节点设置为0)")
private Long parentId;
- @ApiModelProperty(value = "排序")
+ @Schema(description = "排序")
private Integer sort;
- @ApiModelProperty(value = "状态")
+ @Schema(description = "状态")
private EnabledStatusEnum status;
}
diff --git a/service-module/sys/sys-facade/src/main/java/cc/uncarbon/module/sys/model/request/AdminInsertOrUpdateSysMenuDTO.java b/service-module/sys/sys-facade/src/main/java/cc/uncarbon/module/sys/model/request/AdminInsertOrUpdateSysMenuDTO.java
index 575c735..04c53f5 100644
--- a/service-module/sys/sys-facade/src/main/java/cc/uncarbon/module/sys/model/request/AdminInsertOrUpdateSysMenuDTO.java
+++ b/service-module/sys/sys-facade/src/main/java/cc/uncarbon/module/sys/model/request/AdminInsertOrUpdateSysMenuDTO.java
@@ -2,16 +2,16 @@
import cc.uncarbon.framework.core.enums.EnabledStatusEnum;
import cc.uncarbon.module.sys.enums.SysMenuTypeEnum;
-import io.swagger.annotations.ApiModelProperty;
+import io.swagger.v3.oas.annotations.media.Schema;
+import jakarta.validation.constraints.NotBlank;
+import jakarta.validation.constraints.NotNull;
+import jakarta.validation.constraints.Size;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.experimental.Accessors;
-import javax.validation.constraints.NotBlank;
-import javax.validation.constraints.NotNull;
-import javax.validation.constraints.Size;
import java.io.Serializable;
@@ -25,40 +25,40 @@
@Data
public class AdminInsertOrUpdateSysMenuDTO implements Serializable {
- @ApiModelProperty(value = "主键ID", hidden = true, notes = "仅更新时使用")
+ @Schema(description = "主键ID", hidden = true, title = "仅更新时使用")
private Long id;
- @ApiModelProperty(value = "菜单名称", required = true)
+ @Schema(description = "菜单名称", requiredMode = Schema.RequiredMode.REQUIRED)
@Size(max = 50, message = "【菜单名称】最长50位")
@NotBlank(message = "菜单名称不能为空")
private String title;
- @ApiModelProperty(value = "上级菜单ID(无上级节点设置为0)")
+ @Schema(description = "上级菜单ID(无上级节点设置为0)")
private Long parentId;
- @ApiModelProperty(value = "菜单类型", required = true)
+ @Schema(description = "菜单类型", requiredMode = Schema.RequiredMode.REQUIRED)
@NotNull(message = "菜单类型不能为空")
private SysMenuTypeEnum type;
- @ApiModelProperty(value = "组件")
+ @Schema(description = "组件")
@Size(max = 50, message = "【组件】最长50位")
private String component;
- @ApiModelProperty(value = "权限标识")
+ @Schema(description = "权限标识")
@Size(max = 255, message = "【权限标识】最长255位")
private String permission;
- @ApiModelProperty(value = "图标")
+ @Schema(description = "图标")
@Size(max = 255, message = "【图标】最长255位")
private String icon;
- @ApiModelProperty(value = "排序")
+ @Schema(description = "排序")
private Integer sort;
- @ApiModelProperty(value = "状态")
+ @Schema(description = "状态")
private EnabledStatusEnum status;
- @ApiModelProperty(value = "外链地址")
+ @Schema(description = "外链地址")
@Size(max = 255, message = "【外链地址】最长255位")
private String externalLink;
diff --git a/service-module/sys/sys-facade/src/main/java/cc/uncarbon/module/sys/model/request/AdminInsertOrUpdateSysParamDTO.java b/service-module/sys/sys-facade/src/main/java/cc/uncarbon/module/sys/model/request/AdminInsertOrUpdateSysParamDTO.java
index 60a7613..60db07f 100644
--- a/service-module/sys/sys-facade/src/main/java/cc/uncarbon/module/sys/model/request/AdminInsertOrUpdateSysParamDTO.java
+++ b/service-module/sys/sys-facade/src/main/java/cc/uncarbon/module/sys/model/request/AdminInsertOrUpdateSysParamDTO.java
@@ -1,14 +1,14 @@
package cc.uncarbon.module.sys.model.request;
-import io.swagger.annotations.ApiModelProperty;
+import io.swagger.v3.oas.annotations.media.Schema;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.experimental.Accessors;
-import javax.validation.constraints.NotBlank;
-import javax.validation.constraints.Size;
+import jakarta.validation.constraints.NotBlank;
+import jakarta.validation.constraints.Size;
import java.io.Serializable;
@@ -22,20 +22,20 @@
@Data
public class AdminInsertOrUpdateSysParamDTO implements Serializable {
- @ApiModelProperty(value = "主键ID", hidden = true, notes = "仅更新时使用")
+ @Schema(description = "主键ID", hidden = true, title = "仅更新时使用")
private Long id;
- @ApiModelProperty(value = "键名", required = true)
+ @Schema(description = "键名", requiredMode = Schema.RequiredMode.REQUIRED)
@Size(max = 50, message = "【键名】最长50位")
@NotBlank(message = "键名不能为空")
private String name;
- @ApiModelProperty(value = "键值", required = true)
+ @Schema(description = "键值", requiredMode = Schema.RequiredMode.REQUIRED)
@Size(max = 255, message = "【键值】最长255位")
@NotBlank(message = "键值不能为空")
private String value;
- @ApiModelProperty(value = "描述", required = true)
+ @Schema(description = "描述", requiredMode = Schema.RequiredMode.REQUIRED)
@Size(max = 255, message = "【描述】最长255位")
@NotBlank(message = "描述不能为空")
private String description;
diff --git a/service-module/sys/sys-facade/src/main/java/cc/uncarbon/module/sys/model/request/AdminInsertOrUpdateSysRoleDTO.java b/service-module/sys/sys-facade/src/main/java/cc/uncarbon/module/sys/model/request/AdminInsertOrUpdateSysRoleDTO.java
index 92378ac..695114c 100644
--- a/service-module/sys/sys-facade/src/main/java/cc/uncarbon/module/sys/model/request/AdminInsertOrUpdateSysRoleDTO.java
+++ b/service-module/sys/sys-facade/src/main/java/cc/uncarbon/module/sys/model/request/AdminInsertOrUpdateSysRoleDTO.java
@@ -1,15 +1,15 @@
package cc.uncarbon.module.sys.model.request;
import cc.uncarbon.module.sys.constant.SysConstant;
-import io.swagger.annotations.ApiModelProperty;
+import io.swagger.v3.oas.annotations.media.Schema;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.experimental.Accessors;
-import javax.validation.constraints.NotBlank;
-import javax.validation.constraints.Size;
+import jakarta.validation.constraints.NotBlank;
+import jakarta.validation.constraints.Size;
import java.io.Serializable;
import java.util.Objects;
@@ -24,18 +24,18 @@
@Data
public class AdminInsertOrUpdateSysRoleDTO implements Serializable {
- @ApiModelProperty(value = "主键ID", hidden = true, notes = "仅更新时使用")
+ @Schema(description = "主键ID", hidden = true, title = "仅更新时使用")
private Long id;
- @ApiModelProperty(value = "所属租户ID", hidden = true, notes = "仅新增时使用")
+ @Schema(description = "所属租户ID", hidden = true, title = "仅新增时使用")
private Long tenantId;
- @ApiModelProperty(value = "角色名", required = true)
+ @Schema(description = "角色名", requiredMode = Schema.RequiredMode.REQUIRED)
@Size(max = 50, message = "【角色名】最长50位")
@NotBlank(message = "角色名不能为空")
private String title;
- @ApiModelProperty(value = "角色编码", required = true)
+ @Schema(description = "角色编码", requiredMode = Schema.RequiredMode.REQUIRED)
@Size(max = 100, message = "【角色编码】最长100位")
@NotBlank(message = "角色编码不能为空")
private String value;
diff --git a/service-module/sys/sys-facade/src/main/java/cc/uncarbon/module/sys/model/request/AdminInsertOrUpdateSysUserDTO.java b/service-module/sys/sys-facade/src/main/java/cc/uncarbon/module/sys/model/request/AdminInsertOrUpdateSysUserDTO.java
index 1005094..f7443f9 100644
--- a/service-module/sys/sys-facade/src/main/java/cc/uncarbon/module/sys/model/request/AdminInsertOrUpdateSysUserDTO.java
+++ b/service-module/sys/sys-facade/src/main/java/cc/uncarbon/module/sys/model/request/AdminInsertOrUpdateSysUserDTO.java
@@ -5,17 +5,17 @@
import cc.uncarbon.framework.core.exception.BusinessException;
import cc.uncarbon.module.sys.enums.SysUserStatusEnum;
import cn.hutool.core.text.CharSequenceUtil;
-import io.swagger.annotations.ApiModelProperty;
+import io.swagger.v3.oas.annotations.media.Schema;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.experimental.Accessors;
-import javax.validation.constraints.NotBlank;
-import javax.validation.constraints.NotNull;
-import javax.validation.constraints.Pattern;
-import javax.validation.constraints.Size;
+import jakarta.validation.constraints.NotBlank;
+import jakarta.validation.constraints.NotNull;
+import jakarta.validation.constraints.Pattern;
+import jakarta.validation.constraints.Size;
import java.io.Serializable;
import java.util.Objects;
@@ -30,46 +30,46 @@
@Data
public class AdminInsertOrUpdateSysUserDTO implements Serializable {
- @ApiModelProperty(value = "主键ID", hidden = true, notes = "仅更新时使用")
+ @Schema(description = "主键ID", hidden = true, title = "仅更新时使用")
private Long id;
- @ApiModelProperty(value = "所属租户ID", hidden = true, notes = "仅新增时使用")
+ @Schema(description = "所属租户ID", hidden = true, title = "仅新增时使用")
private Long tenantId;
- @ApiModelProperty(value = "账号", required = true)
+ @Schema(description = "账号", requiredMode = Schema.RequiredMode.REQUIRED)
@Size(min = 6, max = 16, message = "【账号】最短6位,最长16位")
@NotBlank(message = "账号不能为空")
private String username;
- @ApiModelProperty(value = "密码字符串(仅注册时有效)")
+ @Schema(description = "密码字符串(仅注册时有效)")
private String passwordOfNewUser;
- @ApiModelProperty(value = "昵称", required = true)
+ @Schema(description = "昵称", requiredMode = Schema.RequiredMode.REQUIRED)
@Size(max = 100, message = "【昵称】最长100位")
@NotBlank(message = "昵称不能为空")
private String nickname;
- @ApiModelProperty(value = "状态", required = true)
+ @Schema(description = "状态", requiredMode = Schema.RequiredMode.REQUIRED)
@NotNull(message = "状态不能为空")
private SysUserStatusEnum status;
- @ApiModelProperty(value = "性别", required = true)
+ @Schema(description = "性别", requiredMode = Schema.RequiredMode.REQUIRED)
@NotNull(message = "性别不能为空")
private GenderEnum gender;
- @ApiModelProperty(value = "邮箱", required = true)
+ @Schema(description = "邮箱", requiredMode = Schema.RequiredMode.REQUIRED)
@Pattern(message = "邮箱格式有误", regexp = HelioConstant.Regex.EMAIL)
@Size(max = 255, message = "【邮箱】最长255位")
@NotBlank(message = "邮箱不能为空")
private String email;
- @ApiModelProperty(value = "手机号", required = true)
+ @Schema(description = "手机号", requiredMode = Schema.RequiredMode.REQUIRED)
@Pattern(message = "手机号格式有误", regexp = HelioConstant.Regex.CHINA_MAINLAND_PHONE_NO)
@Size(max = 20, message = "【手机号】最长20位")
@NotBlank(message = "手机号不能为空")
private String phoneNo;
- @ApiModelProperty(value = "所属部门ID")
+ @Schema(description = "所属部门ID")
private Long deptId;
diff --git a/service-module/sys/sys-facade/src/main/java/cc/uncarbon/module/sys/model/request/AdminInsertSysLogDTO.java b/service-module/sys/sys-facade/src/main/java/cc/uncarbon/module/sys/model/request/AdminInsertSysLogDTO.java
index a683cd3..b27b77f 100644
--- a/service-module/sys/sys-facade/src/main/java/cc/uncarbon/module/sys/model/request/AdminInsertSysLogDTO.java
+++ b/service-module/sys/sys-facade/src/main/java/cc/uncarbon/module/sys/model/request/AdminInsertSysLogDTO.java
@@ -1,7 +1,7 @@
package cc.uncarbon.module.sys.model.request;
import cc.uncarbon.module.sys.enums.SysLogStatusEnum;
-import io.swagger.annotations.ApiModelProperty;
+import io.swagger.v3.oas.annotations.media.Schema;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
@@ -19,43 +19,43 @@
@Data
public class AdminInsertSysLogDTO implements Serializable {
- @ApiModelProperty(value = "用户ID")
+ @Schema(description = "用户ID")
private Long userId;
- @ApiModelProperty(value = "用户账号")
+ @Schema(description = "用户账号")
private String username;
- @ApiModelProperty(value = "操作内容")
+ @Schema(description = "操作内容")
private String operation;
- @ApiModelProperty(value = "请求方法")
+ @Schema(description = "请求方法")
private String method;
- @ApiModelProperty(value = "请求参数")
+ @Schema(description = "请求参数")
private String params;
- @ApiModelProperty(value = "IP地址")
+ @Schema(description = "IP地址")
private String ip;
- @ApiModelProperty(value = "状态")
+ @Schema(description = "状态")
private SysLogStatusEnum status;
- @ApiModelProperty(value = "错误原因堆栈")
+ @Schema(description = "错误原因堆栈")
private String errorStacktrace;
- @ApiModelProperty(value = "用户UA")
+ @Schema(description = "用户UA")
private String userAgent;
- @ApiModelProperty(value = "IP地址属地-国家或地区名")
+ @Schema(description = "IP地址属地-国家或地区名")
private String ipLocationRegionName;
- @ApiModelProperty(value = "IP地址属地-省级行政区名")
+ @Schema(description = "IP地址属地-省级行政区名")
private String ipLocationProvinceName;
- @ApiModelProperty(value = "IP地址属地-市级行政区名")
+ @Schema(description = "IP地址属地-市级行政区名")
private String ipLocationCityName;
- @ApiModelProperty(value = "IP地址属地-县级行政区名")
+ @Schema(description = "IP地址属地-县级行政区名")
private String ipLocationDistrictName;
}
diff --git a/service-module/sys/sys-facade/src/main/java/cc/uncarbon/module/sys/model/request/AdminInsertSysTenantDTO.java b/service-module/sys/sys-facade/src/main/java/cc/uncarbon/module/sys/model/request/AdminInsertSysTenantDTO.java
index f1aa07f..e401637 100644
--- a/service-module/sys/sys-facade/src/main/java/cc/uncarbon/module/sys/model/request/AdminInsertSysTenantDTO.java
+++ b/service-module/sys/sys-facade/src/main/java/cc/uncarbon/module/sys/model/request/AdminInsertSysTenantDTO.java
@@ -1,14 +1,14 @@
package cc.uncarbon.module.sys.model.request;
import cc.uncarbon.framework.core.constant.HelioConstant;
-import io.swagger.annotations.ApiModelProperty;
+import io.swagger.v3.oas.annotations.media.Schema;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.NoArgsConstructor;
import lombok.experimental.Accessors;
-import javax.validation.constraints.*;
+import jakarta.validation.constraints.*;
/**
@@ -21,28 +21,28 @@
@Data
public class AdminInsertSysTenantDTO extends AdminUpdateSysTenantDTO {
- @ApiModelProperty(value = "租户ID(纯数字)", required = true)
+ @Schema(description = "租户ID(纯数字)", requiredMode = Schema.RequiredMode.REQUIRED)
@Positive(message = "租户ID须为正整数")
@NotNull(message = "租户ID不能为空")
private Long tenantId;
- @ApiModelProperty(value = "管理员账号", required = true)
+ @Schema(description = "管理员账号", requiredMode = Schema.RequiredMode.REQUIRED)
@Size(min = 6, max = 16, message = "【管理员账号】最短6位,最长16位")
@NotBlank(message = "管理员账号不能为空")
private String tenantAdminUsername;
- @ApiModelProperty(value = "管理员密码", required = true)
+ @Schema(description = "管理员密码", requiredMode = Schema.RequiredMode.REQUIRED)
@Size(min = 8, max = 20, message = "【管理员密码】最短8位,最长20位")
@NotBlank(message = "管理员密码不能为空")
private String tenantAdminPassword;
- @ApiModelProperty(value = "管理员邮箱", required = true)
+ @Schema(description = "管理员邮箱", requiredMode = Schema.RequiredMode.REQUIRED)
@Pattern(message = "管理员邮箱格式不正确", regexp = HelioConstant.Regex.EMAIL)
@Size(max = 255, message = "【管理员邮箱】最长255位")
@NotBlank(message = "管理员邮箱不能为空")
private String tenantAdminEmail;
- @ApiModelProperty(value = "管理员手机号", required = true)
+ @Schema(description = "管理员手机号", requiredMode = Schema.RequiredMode.REQUIRED)
@Pattern(message = "管理员手机号格式不正确", regexp = HelioConstant.Regex.CHINA_MAINLAND_PHONE_NO)
@Size(max = 20, message = "【管理员手机号】最长20位")
@NotBlank(message = "管理员手机号不能为空")
diff --git a/service-module/sys/sys-facade/src/main/java/cc/uncarbon/module/sys/model/request/AdminListSysDataDictDTO.java b/service-module/sys/sys-facade/src/main/java/cc/uncarbon/module/sys/model/request/AdminListSysDataDictDTO.java
index 698b266..3167573 100644
--- a/service-module/sys/sys-facade/src/main/java/cc/uncarbon/module/sys/model/request/AdminListSysDataDictDTO.java
+++ b/service-module/sys/sys-facade/src/main/java/cc/uncarbon/module/sys/model/request/AdminListSysDataDictDTO.java
@@ -1,6 +1,6 @@
package cc.uncarbon.module.sys.model.request;
-import io.swagger.annotations.ApiModelProperty;
+import io.swagger.v3.oas.annotations.media.Schema;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
@@ -20,7 +20,7 @@
@Data
public class AdminListSysDataDictDTO implements Serializable {
- @ApiModelProperty(value = "描述(关键词)")
+ @Schema(description = "描述(关键词)")
private String description;
}
diff --git a/service-module/sys/sys-facade/src/main/java/cc/uncarbon/module/sys/model/request/AdminListSysLogDTO.java b/service-module/sys/sys-facade/src/main/java/cc/uncarbon/module/sys/model/request/AdminListSysLogDTO.java
index 34e4519..96ec42d 100644
--- a/service-module/sys/sys-facade/src/main/java/cc/uncarbon/module/sys/model/request/AdminListSysLogDTO.java
+++ b/service-module/sys/sys-facade/src/main/java/cc/uncarbon/module/sys/model/request/AdminListSysLogDTO.java
@@ -3,7 +3,7 @@
import cc.uncarbon.framework.core.constant.HelioConstant;
import cc.uncarbon.module.sys.enums.SysLogStatusEnum;
import com.fasterxml.jackson.annotation.JsonFormat;
-import io.swagger.annotations.ApiModelProperty;
+import io.swagger.v3.oas.annotations.media.Schema;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
@@ -25,21 +25,21 @@
@Data
public class AdminListSysLogDTO implements Serializable {
- @ApiModelProperty(value = "用户账号")
+ @Schema(description = "用户账号")
private String username;
- @ApiModelProperty(value = "操作内容")
+ @Schema(description = "操作内容")
private String operation;
- @ApiModelProperty(value = "状态")
+ @Schema(description = "状态")
private SysLogStatusEnum status;
- @ApiModelProperty(value = "时间区间起")
+ @Schema(description = "时间区间起")
@JsonFormat(shape = JsonFormat.Shape.STRING, pattern = HelioConstant.Jackson.DATE_TIME_FORMAT)
@DateTimeFormat(pattern = HelioConstant.Jackson.DATE_TIME_FORMAT)
private LocalDateTime beginAt;
- @ApiModelProperty(value = "时间区间止")
+ @Schema(description = "时间区间止")
@JsonFormat(shape = JsonFormat.Shape.STRING, pattern = HelioConstant.Jackson.DATE_TIME_FORMAT)
@DateTimeFormat(pattern = HelioConstant.Jackson.DATE_TIME_FORMAT)
private LocalDateTime endAt;
diff --git a/service-module/sys/sys-facade/src/main/java/cc/uncarbon/module/sys/model/request/AdminListSysParamDTO.java b/service-module/sys/sys-facade/src/main/java/cc/uncarbon/module/sys/model/request/AdminListSysParamDTO.java
index 3c4f0fa..0830805 100644
--- a/service-module/sys/sys-facade/src/main/java/cc/uncarbon/module/sys/model/request/AdminListSysParamDTO.java
+++ b/service-module/sys/sys-facade/src/main/java/cc/uncarbon/module/sys/model/request/AdminListSysParamDTO.java
@@ -1,6 +1,6 @@
package cc.uncarbon.module.sys.model.request;
-import io.swagger.annotations.ApiModelProperty;
+import io.swagger.v3.oas.annotations.media.Schema;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
@@ -20,10 +20,10 @@
@Data
public class AdminListSysParamDTO implements Serializable {
- @ApiModelProperty(value = "键名")
+ @Schema(description = "键名")
private String name;
- @ApiModelProperty(value = "描述")
+ @Schema(description = "描述")
private String description;
}
diff --git a/service-module/sys/sys-facade/src/main/java/cc/uncarbon/module/sys/model/request/AdminListSysRoleDTO.java b/service-module/sys/sys-facade/src/main/java/cc/uncarbon/module/sys/model/request/AdminListSysRoleDTO.java
index 1f98fc9..ce53afb 100644
--- a/service-module/sys/sys-facade/src/main/java/cc/uncarbon/module/sys/model/request/AdminListSysRoleDTO.java
+++ b/service-module/sys/sys-facade/src/main/java/cc/uncarbon/module/sys/model/request/AdminListSysRoleDTO.java
@@ -1,6 +1,6 @@
package cc.uncarbon.module.sys.model.request;
-import io.swagger.annotations.ApiModelProperty;
+import io.swagger.v3.oas.annotations.media.Schema;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
@@ -20,10 +20,10 @@
@Data
public class AdminListSysRoleDTO implements Serializable {
- @ApiModelProperty(value = "角色名(关键词)")
+ @Schema(description = "角色名(关键词)")
private String title;
- @ApiModelProperty(value = "角色编码(关键词)")
+ @Schema(description = "角色编码(关键词)")
private String value;
}
diff --git a/service-module/sys/sys-facade/src/main/java/cc/uncarbon/module/sys/model/request/AdminListSysTenantDTO.java b/service-module/sys/sys-facade/src/main/java/cc/uncarbon/module/sys/model/request/AdminListSysTenantDTO.java
index 174b78d..dec73d8 100644
--- a/service-module/sys/sys-facade/src/main/java/cc/uncarbon/module/sys/model/request/AdminListSysTenantDTO.java
+++ b/service-module/sys/sys-facade/src/main/java/cc/uncarbon/module/sys/model/request/AdminListSysTenantDTO.java
@@ -1,7 +1,7 @@
package cc.uncarbon.module.sys.model.request;
import cc.uncarbon.framework.core.enums.EnabledStatusEnum;
-import io.swagger.annotations.ApiModelProperty;
+import io.swagger.v3.oas.annotations.media.Schema;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
@@ -21,13 +21,13 @@
@Data
public class AdminListSysTenantDTO implements Serializable {
- @ApiModelProperty(value = "租户名(关键词)")
+ @Schema(description = "租户名(关键词)")
private String tenantName;
- @ApiModelProperty(value = "租户ID(纯数字)")
+ @Schema(description = "租户ID(纯数字)")
private Long tenantId;
- @ApiModelProperty(value = "状态")
+ @Schema(description = "状态")
private EnabledStatusEnum status;
}
diff --git a/service-module/sys/sys-facade/src/main/java/cc/uncarbon/module/sys/model/request/AdminListSysUserDTO.java b/service-module/sys/sys-facade/src/main/java/cc/uncarbon/module/sys/model/request/AdminListSysUserDTO.java
index bb18976..cbf5e9e 100644
--- a/service-module/sys/sys-facade/src/main/java/cc/uncarbon/module/sys/model/request/AdminListSysUserDTO.java
+++ b/service-module/sys/sys-facade/src/main/java/cc/uncarbon/module/sys/model/request/AdminListSysUserDTO.java
@@ -1,7 +1,7 @@
package cc.uncarbon.module.sys.model.request;
import cc.uncarbon.module.sys.constant.SysConstant;
-import io.swagger.annotations.ApiModelProperty;
+import io.swagger.v3.oas.annotations.media.Schema;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
@@ -22,10 +22,10 @@
@Data
public class AdminListSysUserDTO implements Serializable {
- @ApiModelProperty(value = "手机号(关键词)")
+ @Schema(description = "手机号(关键词)")
private String phoneNo;
- @ApiModelProperty(value = "手动选择的部门ID")
+ @Schema(description = "手动选择的部门ID")
private Long selectedDeptId;
/**
diff --git a/service-module/sys/sys-facade/src/main/java/cc/uncarbon/module/sys/model/request/AdminResetSysUserPasswordDTO.java b/service-module/sys/sys-facade/src/main/java/cc/uncarbon/module/sys/model/request/AdminResetSysUserPasswordDTO.java
index b313103..5912348 100644
--- a/service-module/sys/sys-facade/src/main/java/cc/uncarbon/module/sys/model/request/AdminResetSysUserPasswordDTO.java
+++ b/service-module/sys/sys-facade/src/main/java/cc/uncarbon/module/sys/model/request/AdminResetSysUserPasswordDTO.java
@@ -1,14 +1,14 @@
package cc.uncarbon.module.sys.model.request;
-import io.swagger.annotations.ApiModelProperty;
+import io.swagger.v3.oas.annotations.media.Schema;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.experimental.Accessors;
-import javax.validation.constraints.NotBlank;
-import javax.validation.constraints.Size;
+import jakarta.validation.constraints.NotBlank;
+import jakarta.validation.constraints.Size;
import java.io.Serializable;
@@ -22,12 +22,12 @@
@Data
public class AdminResetSysUserPasswordDTO implements Serializable {
- @ApiModelProperty(value = "随机新密码", required = true)
+ @Schema(description = "随机新密码", requiredMode = Schema.RequiredMode.REQUIRED)
@Size(min = 16, max = 64, message = "【随机新密码】最短16位,最长64位")
@NotBlank(message = "随机新密码不能为空")
private String randomPassword;
- @ApiModelProperty(value = "用户ID", hidden = true)
+ @Schema(description = "用户ID", hidden = true)
private Long userId;
}
diff --git a/service-module/sys/sys-facade/src/main/java/cc/uncarbon/module/sys/model/request/AdminUpdateCurrentSysUserPasswordDTO.java b/service-module/sys/sys-facade/src/main/java/cc/uncarbon/module/sys/model/request/AdminUpdateCurrentSysUserPasswordDTO.java
index 7a150ac..2bccc85 100644
--- a/service-module/sys/sys-facade/src/main/java/cc/uncarbon/module/sys/model/request/AdminUpdateCurrentSysUserPasswordDTO.java
+++ b/service-module/sys/sys-facade/src/main/java/cc/uncarbon/module/sys/model/request/AdminUpdateCurrentSysUserPasswordDTO.java
@@ -1,14 +1,14 @@
package cc.uncarbon.module.sys.model.request;
-import io.swagger.annotations.ApiModelProperty;
+import io.swagger.v3.oas.annotations.media.Schema;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.experimental.Accessors;
-import javax.validation.constraints.NotBlank;
-import javax.validation.constraints.Size;
+import jakarta.validation.constraints.NotBlank;
+import jakarta.validation.constraints.Size;
import java.io.Serializable;
@@ -22,16 +22,16 @@
@Data
public class AdminUpdateCurrentSysUserPasswordDTO implements Serializable {
- @ApiModelProperty(value = "原密码", required = true)
+ @Schema(description = "原密码", requiredMode = Schema.RequiredMode.REQUIRED)
@NotBlank(message = "原密码不能为空")
private String oldPassword;
- @ApiModelProperty(value = "新密码", required = true)
+ @Schema(description = "新密码", requiredMode = Schema.RequiredMode.REQUIRED)
@Size(min = 8, max = 20, message = "【密码】长度须在 8 至 20 位之间")
@NotBlank(message = "密码不能为空")
private String newPassword;
- @ApiModelProperty(value = "确认新密码", required = true)
+ @Schema(description = "确认新密码", requiredMode = Schema.RequiredMode.REQUIRED)
@Size(min = 8, max = 20, message = "【确认密码】长度须在 8 至 20 位之间")
@NotBlank(message = "确认密码不能为空")
private String confirmNewPassword;
diff --git a/service-module/sys/sys-facade/src/main/java/cc/uncarbon/module/sys/model/request/AdminUpdateSysTenantDTO.java b/service-module/sys/sys-facade/src/main/java/cc/uncarbon/module/sys/model/request/AdminUpdateSysTenantDTO.java
index 28cc7b2..3410957 100644
--- a/service-module/sys/sys-facade/src/main/java/cc/uncarbon/module/sys/model/request/AdminUpdateSysTenantDTO.java
+++ b/service-module/sys/sys-facade/src/main/java/cc/uncarbon/module/sys/model/request/AdminUpdateSysTenantDTO.java
@@ -1,16 +1,16 @@
package cc.uncarbon.module.sys.model.request;
import cc.uncarbon.framework.core.enums.EnabledStatusEnum;
-import io.swagger.annotations.ApiModelProperty;
+import io.swagger.v3.oas.annotations.media.Schema;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.experimental.Accessors;
-import javax.validation.constraints.NotBlank;
-import javax.validation.constraints.NotNull;
-import javax.validation.constraints.Size;
+import jakarta.validation.constraints.NotBlank;
+import jakarta.validation.constraints.NotNull;
+import jakarta.validation.constraints.Size;
import java.io.Serializable;
@@ -24,19 +24,19 @@
@Data
public class AdminUpdateSysTenantDTO implements Serializable {
- @ApiModelProperty(value = "主键ID", hidden = true, notes = "仅更新时使用")
+ @Schema(description = "主键ID", hidden = true, title = "仅更新时使用")
private Long id;
- @ApiModelProperty(value = "租户名", required = true)
+ @Schema(description = "租户名", requiredMode = Schema.RequiredMode.REQUIRED)
@Size(max = 50, message = "【租户名】最长50位")
@NotBlank(message = "租户名不能为空")
private String tenantName;
- @ApiModelProperty(value = "状态", required = true)
+ @Schema(description = "状态", requiredMode = Schema.RequiredMode.REQUIRED)
@NotNull(message = "状态不能为空")
private EnabledStatusEnum status;
- @ApiModelProperty(value = "备注")
+ @Schema(description = "备注")
@Size(max = 255, message = "【备注】最长255位")
private String remark;
diff --git a/service-module/sys/sys-facade/src/main/java/cc/uncarbon/module/sys/model/request/SysUserLoginDTO.java b/service-module/sys/sys-facade/src/main/java/cc/uncarbon/module/sys/model/request/SysUserLoginDTO.java
index 79e2467..08b44ff 100644
--- a/service-module/sys/sys-facade/src/main/java/cc/uncarbon/module/sys/model/request/SysUserLoginDTO.java
+++ b/service-module/sys/sys-facade/src/main/java/cc/uncarbon/module/sys/model/request/SysUserLoginDTO.java
@@ -1,15 +1,15 @@
package cc.uncarbon.module.sys.model.request;
-import io.swagger.annotations.ApiModelProperty;
+import io.swagger.v3.oas.annotations.media.Schema;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.experimental.Accessors;
-import javax.validation.constraints.NotBlank;
-import javax.validation.constraints.NotNull;
-import javax.validation.constraints.Size;
+import jakarta.validation.constraints.NotBlank;
+import jakarta.validation.constraints.NotNull;
+import jakarta.validation.constraints.Size;
import java.io.Serializable;
@@ -23,27 +23,27 @@
@Data
public class SysUserLoginDTO implements Serializable {
- @ApiModelProperty(value = "账号", required = true)
+ @Schema(description = "账号", requiredMode = Schema.RequiredMode.REQUIRED)
@Size(min = 5, max = 16, message = "【账号】最短5位,最长16位")
@NotBlank(message = "账号不能为空")
private String username;
- @ApiModelProperty(value = "密码", required = true)
+ @Schema(description = "密码", requiredMode = Schema.RequiredMode.REQUIRED)
@Size(min = 5, max = 20, message = "【密码】最短5位,最长20位")
@NotBlank(message = "密码不能为空")
private String password;
- @ApiModelProperty(value = "记住我", required = true)
+ @Schema(description = "记住我", requiredMode = Schema.RequiredMode.REQUIRED)
@NotNull(message = "记住我不能为空")
private Boolean rememberMe;
- @ApiModelProperty(value = "租户ID(可选,启用多租户后有效)")
+ @Schema(description = "租户ID(可选,启用多租户后有效)")
private Long tenantId;
- @ApiModelProperty(value = "验证码唯一标识(可选)")
+ @Schema(description = "验证码唯一标识(可选)")
private String captchaId;
- @ApiModelProperty(value = "验证码答案(可选)")
+ @Schema(description = "验证码答案(可选)")
private String captchaAnswer;
}
diff --git a/service-module/sys/sys-facade/src/main/java/cc/uncarbon/module/sys/model/response/IPLocationBO.java b/service-module/sys/sys-facade/src/main/java/cc/uncarbon/module/sys/model/response/IPLocationBO.java
index 9ac899c..29621d6 100644
--- a/service-module/sys/sys-facade/src/main/java/cc/uncarbon/module/sys/model/response/IPLocationBO.java
+++ b/service-module/sys/sys-facade/src/main/java/cc/uncarbon/module/sys/model/response/IPLocationBO.java
@@ -1,6 +1,6 @@
package cc.uncarbon.module.sys.model.response;
-import io.swagger.annotations.ApiModelProperty;
+import io.swagger.v3.oas.annotations.media.Schema;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
@@ -18,16 +18,16 @@
@Data
public class IPLocationBO implements Serializable {
- @ApiModelProperty(value = "国家或地区名")
+ @Schema(description = "国家或地区名")
private String regionName;
- @ApiModelProperty(value = "省级行政区名")
+ @Schema(description = "省级行政区名")
private String provinceName;
- @ApiModelProperty(value = "市级行政区名")
+ @Schema(description = "市级行政区名")
private String cityName;
- @ApiModelProperty(value = "县级行政区名")
+ @Schema(description = "县级行政区名")
private String districtName;
/**
diff --git a/service-module/sys/sys-facade/src/main/java/cc/uncarbon/module/sys/model/response/SysDataDictBO.java b/service-module/sys/sys-facade/src/main/java/cc/uncarbon/module/sys/model/response/SysDataDictBO.java
index 468ddf6..8fb6c79 100644
--- a/service-module/sys/sys-facade/src/main/java/cc/uncarbon/module/sys/model/response/SysDataDictBO.java
+++ b/service-module/sys/sys-facade/src/main/java/cc/uncarbon/module/sys/model/response/SysDataDictBO.java
@@ -2,7 +2,7 @@
import cc.uncarbon.framework.core.constant.HelioConstant;
import com.fasterxml.jackson.annotation.JsonFormat;
-import io.swagger.annotations.ApiModelProperty;
+import io.swagger.v3.oas.annotations.media.Schema;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
@@ -24,41 +24,41 @@
@Data
public class SysDataDictBO implements Serializable {
- @ApiModelProperty(value = "主键ID")
+ @Schema(description = "主键ID")
private Long id;
- @ApiModelProperty(value = "创建时刻")
+ @Schema(description = "创建时刻")
@DateTimeFormat(pattern = HelioConstant.Jackson.DATE_TIME_FORMAT)
@JsonFormat(shape = JsonFormat.Shape.STRING, pattern = HelioConstant.Jackson.DATE_TIME_FORMAT)
private LocalDateTime createdAt;
- @ApiModelProperty(value = "更新时刻")
+ @Schema(description = "更新时刻")
@DateTimeFormat(pattern = HelioConstant.Jackson.DATE_TIME_FORMAT)
@JsonFormat(shape = JsonFormat.Shape.STRING, pattern = HelioConstant.Jackson.DATE_TIME_FORMAT)
private LocalDateTime updatedAt;
- @ApiModelProperty(value = "驼峰式键名")
+ @Schema(description = "驼峰式键名")
private String camelCaseKey;
- @ApiModelProperty(value = "下划线式键名")
+ @Schema(description = "下划线式键名")
private String underCaseKey;
- @ApiModelProperty(value = "帕斯卡式键名")
+ @Schema(description = "帕斯卡式键名")
private String pascalCaseKey;
- @ApiModelProperty(value = "数据值")
+ @Schema(description = "数据值")
private String value;
- @ApiModelProperty(value = "描述")
+ @Schema(description = "描述")
private String description;
- @ApiModelProperty(value = "单位")
+ @Schema(description = "单位")
private String unit;
- @ApiModelProperty(value = "取值范围")
+ @Schema(description = "取值范围")
private String valueRange;
- @ApiModelProperty(value = "别称键名")
+ @Schema(description = "别称键名")
private String aliasKey;
}
diff --git a/service-module/sys/sys-facade/src/main/java/cc/uncarbon/module/sys/model/response/SysDeptBO.java b/service-module/sys/sys-facade/src/main/java/cc/uncarbon/module/sys/model/response/SysDeptBO.java
index 16d45fd..00d1d22 100644
--- a/service-module/sys/sys-facade/src/main/java/cc/uncarbon/module/sys/model/response/SysDeptBO.java
+++ b/service-module/sys/sys-facade/src/main/java/cc/uncarbon/module/sys/model/response/SysDeptBO.java
@@ -3,7 +3,7 @@
import cc.uncarbon.framework.core.constant.HelioConstant;
import cc.uncarbon.framework.core.enums.EnabledStatusEnum;
import com.fasterxml.jackson.annotation.JsonFormat;
-import io.swagger.annotations.ApiModelProperty;
+import io.swagger.v3.oas.annotations.media.Schema;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
@@ -25,29 +25,29 @@
@Data
public class SysDeptBO implements Serializable {
- @ApiModelProperty(value = "主键ID")
+ @Schema(description = "主键ID")
private Long id;
- @ApiModelProperty(value = "创建时刻")
+ @Schema(description = "创建时刻")
@DateTimeFormat(pattern = HelioConstant.Jackson.DATE_TIME_FORMAT)
@JsonFormat(shape = JsonFormat.Shape.STRING, pattern = HelioConstant.Jackson.DATE_TIME_FORMAT)
private LocalDateTime createdAt;
- @ApiModelProperty(value = "更新时刻")
+ @Schema(description = "更新时刻")
@DateTimeFormat(pattern = HelioConstant.Jackson.DATE_TIME_FORMAT)
@JsonFormat(shape = JsonFormat.Shape.STRING, pattern = HelioConstant.Jackson.DATE_TIME_FORMAT)
private LocalDateTime updatedAt;
- @ApiModelProperty(value = "名称")
+ @Schema(description = "名称")
private String title;
- @ApiModelProperty(value = "上级ID(无上级节点设置为0)")
+ @Schema(description = "上级ID(无上级节点设置为0)")
private Long parentId;
- @ApiModelProperty(value = "排序")
+ @Schema(description = "排序")
private Integer sort;
- @ApiModelProperty(value = "状态")
+ @Schema(description = "状态")
private EnabledStatusEnum status;
}
diff --git a/service-module/sys/sys-facade/src/main/java/cc/uncarbon/module/sys/model/response/SysLogBO.java b/service-module/sys/sys-facade/src/main/java/cc/uncarbon/module/sys/model/response/SysLogBO.java
index 8359d6d..86fa06f 100644
--- a/service-module/sys/sys-facade/src/main/java/cc/uncarbon/module/sys/model/response/SysLogBO.java
+++ b/service-module/sys/sys-facade/src/main/java/cc/uncarbon/module/sys/model/response/SysLogBO.java
@@ -3,7 +3,7 @@
import cc.uncarbon.framework.core.constant.HelioConstant;
import cc.uncarbon.module.sys.enums.SysLogStatusEnum;
import com.fasterxml.jackson.annotation.JsonFormat;
-import io.swagger.annotations.ApiModelProperty;
+import io.swagger.v3.oas.annotations.media.Schema;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
@@ -25,36 +25,36 @@
@Data
public class SysLogBO implements Serializable {
- @ApiModelProperty(value = "创建时刻")
+ @Schema(description = "创建时刻")
@DateTimeFormat(pattern = HelioConstant.Jackson.DATE_TIME_FORMAT)
@JsonFormat(shape = JsonFormat.Shape.STRING, pattern = HelioConstant.Jackson.DATE_TIME_FORMAT)
private LocalDateTime createdAt;
- @ApiModelProperty(value = "用户账号")
+ @Schema(description = "用户账号")
private String username;
- @ApiModelProperty(value = "操作内容")
+ @Schema(description = "操作内容")
private String operation;
- @ApiModelProperty(value = "IP地址")
+ @Schema(description = "IP地址")
private String ip;
- @ApiModelProperty(value = "状态")
+ @Schema(description = "状态")
private SysLogStatusEnum status;
- @ApiModelProperty(value = "用户UA")
+ @Schema(description = "用户UA")
private String userAgent;
- @ApiModelProperty(value = "IP地址属地-国家或地区名")
+ @Schema(description = "IP地址属地-国家或地区名")
private String ipLocationRegionName;
- @ApiModelProperty(value = "IP地址属地-省级行政区名")
+ @Schema(description = "IP地址属地-省级行政区名")
private String ipLocationProvinceName;
- @ApiModelProperty(value = "IP地址属地-市级行政区名")
+ @Schema(description = "IP地址属地-市级行政区名")
private String ipLocationCityName;
- @ApiModelProperty(value = "IP地址属地-县级行政区名")
+ @Schema(description = "IP地址属地-县级行政区名")
private String ipLocationDistrictName;
}
diff --git a/service-module/sys/sys-facade/src/main/java/cc/uncarbon/module/sys/model/response/SysMenuBO.java b/service-module/sys/sys-facade/src/main/java/cc/uncarbon/module/sys/model/response/SysMenuBO.java
index ed3f3e4..cc415b1 100644
--- a/service-module/sys/sys-facade/src/main/java/cc/uncarbon/module/sys/model/response/SysMenuBO.java
+++ b/service-module/sys/sys-facade/src/main/java/cc/uncarbon/module/sys/model/response/SysMenuBO.java
@@ -4,7 +4,7 @@
import cc.uncarbon.framework.core.enums.EnabledStatusEnum;
import cc.uncarbon.module.sys.enums.SysMenuTypeEnum;
import com.fasterxml.jackson.annotation.JsonFormat;
-import io.swagger.annotations.ApiModelProperty;
+import io.swagger.v3.oas.annotations.media.Schema;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
@@ -26,53 +26,53 @@
@Data
public class SysMenuBO implements Serializable {
- @ApiModelProperty(value = "主键ID")
+ @Schema(description = "主键ID")
private Long id;
- @ApiModelProperty(value = "创建时刻")
+ @Schema(description = "创建时刻")
@DateTimeFormat(pattern = HelioConstant.Jackson.DATE_TIME_FORMAT)
@JsonFormat(shape = JsonFormat.Shape.STRING, pattern = HelioConstant.Jackson.DATE_TIME_FORMAT)
private LocalDateTime createdAt;
- @ApiModelProperty(value = "更新时刻")
+ @Schema(description = "更新时刻")
@DateTimeFormat(pattern = HelioConstant.Jackson.DATE_TIME_FORMAT)
@JsonFormat(shape = JsonFormat.Shape.STRING, pattern = HelioConstant.Jackson.DATE_TIME_FORMAT)
private LocalDateTime updatedAt;
- @ApiModelProperty(value = "名称")
+ @Schema(description = "名称")
private String title;
- @ApiModelProperty(value = "上级菜单ID")
+ @Schema(description = "上级菜单ID")
private Long parentId;
- @ApiModelProperty(value = "菜单类型")
+ @Schema(description = "菜单类型")
private SysMenuTypeEnum type;
- @ApiModelProperty(value = "权限标识")
+ @Schema(description = "权限标识")
private String permission;
- @ApiModelProperty(value = "图标")
+ @Schema(description = "图标")
private String icon;
- @ApiModelProperty(value = "排序")
+ @Schema(description = "排序")
private Integer sort;
- @ApiModelProperty(value = "状态")
+ @Schema(description = "状态")
private EnabledStatusEnum status;
- @ApiModelProperty(value = "组件")
+ @Schema(description = "组件")
private String component;
- @ApiModelProperty(value = "外链地址")
+ @Schema(description = "外链地址")
private String externalLink;
- @ApiModelProperty(value = "【用于Vben Admin】路由地址", hidden = true)
+ @Schema(description = "【用于Vben Admin】路由地址", hidden = true)
private String path;
- @ApiModelProperty(value = "【用于Vben Admin】菜单名(全局唯一, 不能重复)", hidden = true)
+ @Schema(description = "【用于Vben Admin】菜单名(全局唯一, 不能重复)", hidden = true)
private String name;
- @ApiModelProperty(value = "【用于Vben Admin】菜单详情", hidden = true)
+ @Schema(description = "【用于Vben Admin】菜单详情", hidden = true)
private VbenAdminMenuMetaVO meta;
}
diff --git a/service-module/sys/sys-facade/src/main/java/cc/uncarbon/module/sys/model/response/SysParamBO.java b/service-module/sys/sys-facade/src/main/java/cc/uncarbon/module/sys/model/response/SysParamBO.java
index 4d3ee58..11e6b32 100644
--- a/service-module/sys/sys-facade/src/main/java/cc/uncarbon/module/sys/model/response/SysParamBO.java
+++ b/service-module/sys/sys-facade/src/main/java/cc/uncarbon/module/sys/model/response/SysParamBO.java
@@ -2,7 +2,7 @@
import cc.uncarbon.framework.core.constant.HelioConstant;
import com.fasterxml.jackson.annotation.JsonFormat;
-import io.swagger.annotations.ApiModelProperty;
+import io.swagger.v3.oas.annotations.media.Schema;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
@@ -24,26 +24,26 @@
@Data
public class SysParamBO implements Serializable {
- @ApiModelProperty(value = "主键ID")
+ @Schema(description = "主键ID")
private Long id;
- @ApiModelProperty(value = "创建时刻")
+ @Schema(description = "创建时刻")
@DateTimeFormat(pattern = HelioConstant.Jackson.DATE_TIME_FORMAT)
@JsonFormat(shape = JsonFormat.Shape.STRING, pattern = HelioConstant.Jackson.DATE_TIME_FORMAT)
private LocalDateTime createdAt;
- @ApiModelProperty(value = "更新时刻")
+ @Schema(description = "更新时刻")
@DateTimeFormat(pattern = HelioConstant.Jackson.DATE_TIME_FORMAT)
@JsonFormat(shape = JsonFormat.Shape.STRING, pattern = HelioConstant.Jackson.DATE_TIME_FORMAT)
private LocalDateTime updatedAt;
- @ApiModelProperty(value = "键名")
+ @Schema(description = "键名")
private String name;
- @ApiModelProperty(value = "键值")
+ @Schema(description = "键值")
private String value;
- @ApiModelProperty(value = "描述")
+ @Schema(description = "描述")
private String description;
}
diff --git a/service-module/sys/sys-facade/src/main/java/cc/uncarbon/module/sys/model/response/SysRoleBO.java b/service-module/sys/sys-facade/src/main/java/cc/uncarbon/module/sys/model/response/SysRoleBO.java
index 7b00073..eac118d 100644
--- a/service-module/sys/sys-facade/src/main/java/cc/uncarbon/module/sys/model/response/SysRoleBO.java
+++ b/service-module/sys/sys-facade/src/main/java/cc/uncarbon/module/sys/model/response/SysRoleBO.java
@@ -2,7 +2,7 @@
import cc.uncarbon.framework.core.constant.HelioConstant;
import com.fasterxml.jackson.annotation.JsonFormat;
-import io.swagger.annotations.ApiModelProperty;
+import io.swagger.v3.oas.annotations.media.Schema;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
@@ -25,26 +25,26 @@
@Data
public class SysRoleBO implements Serializable {
- @ApiModelProperty(value = "主键ID")
+ @Schema(description = "主键ID")
private Long id;
- @ApiModelProperty(value = "创建时刻")
+ @Schema(description = "创建时刻")
@DateTimeFormat(pattern = HelioConstant.Jackson.DATE_TIME_FORMAT)
@JsonFormat(shape = JsonFormat.Shape.STRING, pattern = HelioConstant.Jackson.DATE_TIME_FORMAT)
private LocalDateTime createdAt;
- @ApiModelProperty(value = "更新时刻")
+ @Schema(description = "更新时刻")
@DateTimeFormat(pattern = HelioConstant.Jackson.DATE_TIME_FORMAT)
@JsonFormat(shape = JsonFormat.Shape.STRING, pattern = HelioConstant.Jackson.DATE_TIME_FORMAT)
private LocalDateTime updatedAt;
- @ApiModelProperty(value = "角色名")
+ @Schema(description = "角色名")
private String title;
- @ApiModelProperty(value = "角色编码")
+ @Schema(description = "角色编码")
private String value;
- @ApiModelProperty(value = "可见菜单Ids")
+ @Schema(description = "可见菜单Ids")
private Collection menuIds;
}
diff --git a/service-module/sys/sys-facade/src/main/java/cc/uncarbon/module/sys/model/response/SysTenantBO.java b/service-module/sys/sys-facade/src/main/java/cc/uncarbon/module/sys/model/response/SysTenantBO.java
index 3a7675b..637079c 100644
--- a/service-module/sys/sys-facade/src/main/java/cc/uncarbon/module/sys/model/response/SysTenantBO.java
+++ b/service-module/sys/sys-facade/src/main/java/cc/uncarbon/module/sys/model/response/SysTenantBO.java
@@ -3,7 +3,7 @@
import cc.uncarbon.framework.core.constant.HelioConstant;
import cc.uncarbon.framework.core.enums.EnabledStatusEnum;
import com.fasterxml.jackson.annotation.JsonFormat;
-import io.swagger.annotations.ApiModelProperty;
+import io.swagger.v3.oas.annotations.media.Schema;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
@@ -25,32 +25,32 @@
@Data
public class SysTenantBO implements Serializable {
- @ApiModelProperty(value = "主键ID")
+ @Schema(description = "主键ID")
private Long id;
- @ApiModelProperty(value = "创建时刻")
+ @Schema(description = "创建时刻")
@DateTimeFormat(pattern = HelioConstant.Jackson.DATE_TIME_FORMAT)
@JsonFormat(shape = JsonFormat.Shape.STRING, pattern = HelioConstant.Jackson.DATE_TIME_FORMAT)
private LocalDateTime createdAt;
- @ApiModelProperty(value = "更新时刻")
+ @Schema(description = "更新时刻")
@DateTimeFormat(pattern = HelioConstant.Jackson.DATE_TIME_FORMAT)
@JsonFormat(shape = JsonFormat.Shape.STRING, pattern = HelioConstant.Jackson.DATE_TIME_FORMAT)
private LocalDateTime updatedAt;
- @ApiModelProperty(value = "备注")
+ @Schema(description = "备注")
private String remark;
- @ApiModelProperty(value = "租户名")
+ @Schema(description = "租户名")
private String tenantName;
- @ApiModelProperty(value = "租户ID")
+ @Schema(description = "租户ID")
private Long tenantId;
- @ApiModelProperty(value = "状态")
+ @Schema(description = "状态")
private EnabledStatusEnum status;
- @ApiModelProperty(value = "租户管理员用户基本信息")
+ @Schema(description = "租户管理员用户基本信息")
private SysUserBaseInfoBO tenantAdminUser;
}
diff --git a/service-module/sys/sys-facade/src/main/java/cc/uncarbon/module/sys/model/response/SysTenantKickOutUsersBO.java b/service-module/sys/sys-facade/src/main/java/cc/uncarbon/module/sys/model/response/SysTenantKickOutUsersBO.java
index 4cbeffb..1ce33a1 100644
--- a/service-module/sys/sys-facade/src/main/java/cc/uncarbon/module/sys/model/response/SysTenantKickOutUsersBO.java
+++ b/service-module/sys/sys-facade/src/main/java/cc/uncarbon/module/sys/model/response/SysTenantKickOutUsersBO.java
@@ -1,6 +1,6 @@
package cc.uncarbon.module.sys.model.response;
-import io.swagger.annotations.ApiModelProperty;
+import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Getter;
import java.util.Collections;
@@ -13,7 +13,7 @@
@Getter
public class SysTenantKickOutUsersBO {
- @ApiModelProperty(value = "后台用户IDs")
+ @Schema(description = "后台用户IDs")
private final List sysUserIds;
public SysTenantKickOutUsersBO() {
diff --git a/service-module/sys/sys-facade/src/main/java/cc/uncarbon/module/sys/model/response/SysUserBO.java b/service-module/sys/sys-facade/src/main/java/cc/uncarbon/module/sys/model/response/SysUserBO.java
index e37c8b8..698d74b 100644
--- a/service-module/sys/sys-facade/src/main/java/cc/uncarbon/module/sys/model/response/SysUserBO.java
+++ b/service-module/sys/sys-facade/src/main/java/cc/uncarbon/module/sys/model/response/SysUserBO.java
@@ -4,7 +4,7 @@
import cc.uncarbon.framework.core.enums.GenderEnum;
import cc.uncarbon.module.sys.enums.SysUserStatusEnum;
import com.fasterxml.jackson.annotation.JsonFormat;
-import io.swagger.annotations.ApiModelProperty;
+import io.swagger.v3.oas.annotations.media.Schema;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
@@ -26,44 +26,44 @@
@Data
public class SysUserBO implements Serializable {
- @ApiModelProperty(value = "主键ID")
+ @Schema(description = "主键ID")
private Long id;
- @ApiModelProperty(value = "创建时刻")
+ @Schema(description = "创建时刻")
@DateTimeFormat(pattern = HelioConstant.Jackson.DATE_TIME_FORMAT)
@JsonFormat(shape = JsonFormat.Shape.STRING, pattern = HelioConstant.Jackson.DATE_TIME_FORMAT)
private LocalDateTime createdAt;
- @ApiModelProperty(value = "更新时刻")
+ @Schema(description = "更新时刻")
@DateTimeFormat(pattern = HelioConstant.Jackson.DATE_TIME_FORMAT)
@JsonFormat(shape = JsonFormat.Shape.STRING, pattern = HelioConstant.Jackson.DATE_TIME_FORMAT)
private LocalDateTime updatedAt;
- @ApiModelProperty(value = "账号")
+ @Schema(description = "账号")
private String username;
- @ApiModelProperty(value = "昵称")
+ @Schema(description = "昵称")
private String nickname;
- @ApiModelProperty(value = "状态")
+ @Schema(description = "状态")
private SysUserStatusEnum status;
- @ApiModelProperty(value = "性别")
+ @Schema(description = "性别")
private GenderEnum gender;
- @ApiModelProperty(value = "邮箱")
+ @Schema(description = "邮箱")
private String email;
- @ApiModelProperty(value = "手机号")
+ @Schema(description = "手机号")
private String phoneNo;
- @ApiModelProperty(value = "最后登录时刻")
+ @Schema(description = "最后登录时刻")
private LocalDateTime lastLoginAt;
- @ApiModelProperty(value = "所属部门ID")
+ @Schema(description = "所属部门ID")
private Long deptId;
- @ApiModelProperty(value = "所属部门名称")
+ @Schema(description = "所属部门名称")
private String deptTitle;
}
diff --git a/service-module/sys/sys-facade/src/main/java/cc/uncarbon/module/sys/model/response/SysUserBaseInfoBO.java b/service-module/sys/sys-facade/src/main/java/cc/uncarbon/module/sys/model/response/SysUserBaseInfoBO.java
index e3c8828..e5f8b41 100644
--- a/service-module/sys/sys-facade/src/main/java/cc/uncarbon/module/sys/model/response/SysUserBaseInfoBO.java
+++ b/service-module/sys/sys-facade/src/main/java/cc/uncarbon/module/sys/model/response/SysUserBaseInfoBO.java
@@ -2,7 +2,7 @@
import cc.uncarbon.framework.core.enums.GenderEnum;
import cc.uncarbon.module.sys.enums.SysUserStatusEnum;
-import io.swagger.annotations.ApiModelProperty;
+import io.swagger.v3.oas.annotations.media.Schema;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
@@ -23,22 +23,22 @@
@Data
public class SysUserBaseInfoBO implements Serializable {
- @ApiModelProperty(value = "账号")
+ @Schema(description = "账号")
private String username;
- @ApiModelProperty(value = "昵称")
+ @Schema(description = "昵称")
private String nickname;
- @ApiModelProperty(value = "状态")
+ @Schema(description = "状态")
private SysUserStatusEnum status;
- @ApiModelProperty(value = "性别")
+ @Schema(description = "性别")
private GenderEnum gender;
- @ApiModelProperty(value = "邮箱")
+ @Schema(description = "邮箱")
private String email;
- @ApiModelProperty(value = "手机号")
+ @Schema(description = "手机号")
private String phoneNo;
}
diff --git a/service-module/sys/sys-facade/src/main/java/cc/uncarbon/module/sys/model/response/SysUserLoginBO.java b/service-module/sys/sys-facade/src/main/java/cc/uncarbon/module/sys/model/response/SysUserLoginBO.java
index 4421513..7e026af 100644
--- a/service-module/sys/sys-facade/src/main/java/cc/uncarbon/module/sys/model/response/SysUserLoginBO.java
+++ b/service-module/sys/sys-facade/src/main/java/cc/uncarbon/module/sys/model/response/SysUserLoginBO.java
@@ -1,7 +1,7 @@
package cc.uncarbon.module.sys.model.response;
import cc.uncarbon.framework.core.context.TenantContext;
-import io.swagger.annotations.ApiModelProperty;
+import io.swagger.v3.oas.annotations.media.Schema;
import java.io.Serializable;
import java.util.List;
import java.util.Map;
@@ -24,31 +24,31 @@
@Data
public class SysUserLoginBO implements Serializable {
- @ApiModelProperty(value = "用户ID")
+ @Schema(description = "用户ID")
private Long id;
- @ApiModelProperty(value = "账号")
+ @Schema(description = "账号")
private String username;
- @ApiModelProperty(value = "昵称")
+ @Schema(description = "昵称")
private String nickname;
- @ApiModelProperty(value = "手机号")
+ @Schema(description = "手机号")
private String phoneNo;
- @ApiModelProperty(value = "对应角色ID")
+ @Schema(description = "对应角色ID")
private Set roleIds;
- @ApiModelProperty(value = "对应角色名")
+ @Schema(description = "对应角色名")
private List roles;
- @ApiModelProperty(value = "所有拥有权限名")
+ @Schema(description = "所有拥有权限名")
private Set permissions;
- @ApiModelProperty(value = "角色ID-对应权限名 Map")
+ @Schema(description = "角色ID-对应权限名 Map")
private Map> roleIdPermissionMap;
- @ApiModelProperty(value = "关联租户上下文")
+ @Schema(description = "关联租户上下文")
private TenantContext tenantContext;
}
diff --git a/service-module/sys/sys-facade/src/main/java/cc/uncarbon/module/sys/model/response/SysUserLoginVO.java b/service-module/sys/sys-facade/src/main/java/cc/uncarbon/module/sys/model/response/SysUserLoginVO.java
index e868652..98ec9c0 100644
--- a/service-module/sys/sys-facade/src/main/java/cc/uncarbon/module/sys/model/response/SysUserLoginVO.java
+++ b/service-module/sys/sys-facade/src/main/java/cc/uncarbon/module/sys/model/response/SysUserLoginVO.java
@@ -1,6 +1,6 @@
package cc.uncarbon.module.sys.model.response;
-import io.swagger.annotations.ApiModelProperty;
+import io.swagger.v3.oas.annotations.media.Schema;
import java.io.Serializable;
import java.util.Collection;
import lombok.AllArgsConstructor;
@@ -21,16 +21,16 @@
@Data
public class SysUserLoginVO implements Serializable {
- @ApiModelProperty(value = "token名称")
+ @Schema(description = "token名称")
private String tokenName;
- @ApiModelProperty(value = "token值")
+ @Schema(description = "token值")
private String tokenValue;
- @ApiModelProperty(value = "对应角色")
+ @Schema(description = "对应角色")
private Collection roles;
- @ApiModelProperty(value = "拥有权限")
+ @Schema(description = "拥有权限")
private Collection permissions;
}
diff --git a/service-module/sys/sys-facade/src/main/java/cc/uncarbon/module/sys/model/response/VbenAdminMenuMetaVO.java b/service-module/sys/sys-facade/src/main/java/cc/uncarbon/module/sys/model/response/VbenAdminMenuMetaVO.java
index d584a72..f96baa7 100644
--- a/service-module/sys/sys-facade/src/main/java/cc/uncarbon/module/sys/model/response/VbenAdminMenuMetaVO.java
+++ b/service-module/sys/sys-facade/src/main/java/cc/uncarbon/module/sys/model/response/VbenAdminMenuMetaVO.java
@@ -1,6 +1,6 @@
package cc.uncarbon.module.sys.model.response;
-import io.swagger.annotations.ApiModelProperty;
+import io.swagger.v3.oas.annotations.media.Schema;
import lombok.AllArgsConstructor;
import lombok.Data;
@@ -14,13 +14,13 @@
@Data
public class VbenAdminMenuMetaVO implements Serializable {
- @ApiModelProperty(value = "标题")
+ @Schema(description = "标题")
private String title;
- @ApiModelProperty(value = "是否不可关闭")
+ @Schema(description = "是否不可关闭")
private Boolean affix;
- @ApiModelProperty(value = "图标")
+ @Schema(description = "图标")
private String icon;
}
diff --git a/service-module/sys/sys-facade/src/main/java/cc/uncarbon/module/sys/model/response/VbenAdminUserInfoVO.java b/service-module/sys/sys-facade/src/main/java/cc/uncarbon/module/sys/model/response/VbenAdminUserInfoVO.java
index 3b496f0..c3f4ef6 100644
--- a/service-module/sys/sys-facade/src/main/java/cc/uncarbon/module/sys/model/response/VbenAdminUserInfoVO.java
+++ b/service-module/sys/sys-facade/src/main/java/cc/uncarbon/module/sys/model/response/VbenAdminUserInfoVO.java
@@ -1,6 +1,6 @@
package cc.uncarbon.module.sys.model.response;
-import io.swagger.annotations.ApiModelProperty;
+import io.swagger.v3.oas.annotations.media.Schema;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
@@ -21,13 +21,13 @@
@Data
public class VbenAdminUserInfoVO implements Serializable {
- @ApiModelProperty(value = "账号")
+ @Schema(description = "账号")
private String username;
- @ApiModelProperty(value = "昵称")
+ @Schema(description = "昵称")
private String nickname;
- @ApiModelProperty(value = "最后登录时刻")
+ @Schema(description = "最后登录时刻")
private LocalDateTime lastLoginAt;
}
diff --git a/service-module/sys/sys-service/pom.xml b/service-module/sys/sys-service/pom.xml
index a364712..bd764fd 100644
--- a/service-module/sys/sys-service/pom.xml
+++ b/service-module/sys/sys-service/pom.xml
@@ -8,7 +8,7 @@
cc.uncarbon.module
sys
- 1.11.0
+ 2.0.0
sys-service
@@ -21,7 +21,7 @@
cc.uncarbon.module
sys-facade
- 1.11.0
+ 2.0.0
diff --git a/service-module/sys/sys-service/src/main/java/cc/uncarbon/module/sys/biz/SysTenantFacadeImpl.java b/service-module/sys/sys-service/src/main/java/cc/uncarbon/module/sys/biz/SysTenantFacadeImpl.java
index 3d92ed3..6a6b190 100644
--- a/service-module/sys/sys-service/src/main/java/cc/uncarbon/module/sys/biz/SysTenantFacadeImpl.java
+++ b/service-module/sys/sys-service/src/main/java/cc/uncarbon/module/sys/biz/SysTenantFacadeImpl.java
@@ -123,8 +123,7 @@ public SysTenantKickOutUsersBO adminDelete(Collection ids) {
// 查出需要强制登出的用户
List tenantSysUserIds = tenantIds.stream()
.map(tenantId -> sysUserService.listUserIdsByTenantId(tenantId, Collections.singleton(EnabledStatusEnum.ENABLED)))
- .flatMap(Collection::stream)
- .collect(Collectors.toList());
+ .flatMap(Collection::stream).toList();
return new SysTenantKickOutUsersBO(tenantSysUserIds);
}
return new SysTenantKickOutUsersBO();
diff --git a/service-module/sys/sys-service/src/main/java/cc/uncarbon/module/sys/entity/SysDataDictEntity.java b/service-module/sys/sys-service/src/main/java/cc/uncarbon/module/sys/entity/SysDataDictEntity.java
index ddb9c58..ce49628 100644
--- a/service-module/sys/sys-service/src/main/java/cc/uncarbon/module/sys/entity/SysDataDictEntity.java
+++ b/service-module/sys/sys-service/src/main/java/cc/uncarbon/module/sys/entity/SysDataDictEntity.java
@@ -3,7 +3,7 @@
import cc.uncarbon.framework.crud.entity.HelioBaseEntity;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
-import io.swagger.annotations.ApiModelProperty;
+import io.swagger.v3.oas.annotations.media.Schema;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.EqualsAndHashCode;
@@ -24,35 +24,35 @@
@TableName(value = "sys_data_dict")
public class SysDataDictEntity extends HelioBaseEntity {
- @ApiModelProperty(value = "驼峰式键名")
+ @Schema(description = "驼峰式键名")
@TableField(value = "camel_case_key")
private String camelCaseKey;
- @ApiModelProperty(value = "下划线式键名")
+ @Schema(description = "下划线式键名")
@TableField(value = "under_case_key")
private String underCaseKey;
- @ApiModelProperty(value = "帕斯卡式键名")
+ @Schema(description = "帕斯卡式键名")
@TableField(value = "pascal_case_key")
private String pascalCaseKey;
- @ApiModelProperty(value = "数据值")
+ @Schema(description = "数据值")
@TableField(value = "value")
private String value;
- @ApiModelProperty(value = "描述")
+ @Schema(description = "描述")
@TableField(value = "description")
private String description;
- @ApiModelProperty(value = "单位")
+ @Schema(description = "单位")
@TableField(value = "unit")
private String unit;
- @ApiModelProperty(value = "取值范围")
+ @Schema(description = "取值范围")
@TableField(value = "value_range")
private String valueRange;
- @ApiModelProperty(value = "别称键名")
+ @Schema(description = "别称键名")
@TableField(value = "alias_key")
private String aliasKey;
diff --git a/service-module/sys/sys-service/src/main/java/cc/uncarbon/module/sys/entity/SysDeptEntity.java b/service-module/sys/sys-service/src/main/java/cc/uncarbon/module/sys/entity/SysDeptEntity.java
index 144697c..827e2da 100644
--- a/service-module/sys/sys-service/src/main/java/cc/uncarbon/module/sys/entity/SysDeptEntity.java
+++ b/service-module/sys/sys-service/src/main/java/cc/uncarbon/module/sys/entity/SysDeptEntity.java
@@ -4,7 +4,7 @@
import cc.uncarbon.framework.crud.entity.HelioBaseEntity;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
-import io.swagger.annotations.ApiModelProperty;
+import io.swagger.v3.oas.annotations.media.Schema;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.EqualsAndHashCode;
@@ -29,23 +29,23 @@ public class SysDeptEntity extends HelioBaseEntity {
* 乐观锁
* 需自行加@Version注解才有效
*/
- @ApiModelProperty(value = "乐观锁", notes = "需再次复制本字段,并自行加 @Version 注解才有效")
+ @Schema(description = "乐观锁", title = "需再次复制本字段,并自行加 @Version 注解才有效")
@TableField(value = "revision", exist = false)
private Long revision;
- @ApiModelProperty(value = "名称")
+ @Schema(description = "名称")
@TableField(value = "title")
private String title;
- @ApiModelProperty(value = "上级ID(无上级节点设置为0)")
+ @Schema(description = "上级ID(无上级节点设置为0)")
@TableField(value = "parent_id")
private Long parentId;
- @ApiModelProperty(value = "排序")
+ @Schema(description = "排序")
@TableField(value = "sort")
private Integer sort;
- @ApiModelProperty(value = "状态")
+ @Schema(description = "状态")
@TableField(value = "status")
private EnabledStatusEnum status;
diff --git a/service-module/sys/sys-service/src/main/java/cc/uncarbon/module/sys/entity/SysLogEntity.java b/service-module/sys/sys-service/src/main/java/cc/uncarbon/module/sys/entity/SysLogEntity.java
index 9319669..574f17a 100644
--- a/service-module/sys/sys-service/src/main/java/cc/uncarbon/module/sys/entity/SysLogEntity.java
+++ b/service-module/sys/sys-service/src/main/java/cc/uncarbon/module/sys/entity/SysLogEntity.java
@@ -4,7 +4,7 @@
import cc.uncarbon.module.sys.enums.SysLogStatusEnum;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
-import io.swagger.annotations.ApiModelProperty;
+import io.swagger.v3.oas.annotations.media.Schema;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.EqualsAndHashCode;
@@ -25,55 +25,55 @@
@TableName(value = "sys_log")
public class SysLogEntity extends HelioBaseEntity {
- @ApiModelProperty(value = "用户ID")
+ @Schema(description = "用户ID")
@TableField(value = "user_id")
private Long userId;
- @ApiModelProperty(value = "用户账号")
+ @Schema(description = "用户账号")
@TableField(value = "username")
private String username;
- @ApiModelProperty(value = "操作内容")
+ @Schema(description = "操作内容")
@TableField(value = "operation")
private String operation;
- @ApiModelProperty(value = "请求方法")
+ @Schema(description = "请求方法")
@TableField(value = "method")
private String method;
- @ApiModelProperty(value = "请求参数")
+ @Schema(description = "请求参数")
@TableField(value = "params")
private String params;
- @ApiModelProperty(value = "IP地址")
+ @Schema(description = "IP地址")
@TableField(value = "ip")
private String ip;
- @ApiModelProperty(value = "状态")
+ @Schema(description = "状态")
@TableField(value = "status")
private SysLogStatusEnum status;
- @ApiModelProperty(value = "错误原因堆栈")
+ @Schema(description = "错误原因堆栈")
@TableField(value = "error_stacktrace")
private String errorStacktrace;
- @ApiModelProperty(value = "用户UA")
+ @Schema(description = "用户UA")
@TableField(value = "user_agent")
private String userAgent;
- @ApiModelProperty(value = "IP地址属地-国家或地区名")
+ @Schema(description = "IP地址属地-国家或地区名")
@TableField(value = "ip_location_region_name")
private String ipLocationRegionName;
- @ApiModelProperty(value = "IP地址属地-省级行政区名")
+ @Schema(description = "IP地址属地-省级行政区名")
@TableField(value = "ip_location_province_name")
private String ipLocationProvinceName;
- @ApiModelProperty(value = "IP地址属地-市级行政区名")
+ @Schema(description = "IP地址属地-市级行政区名")
@TableField(value = "ip_location_city_name")
private String ipLocationCityName;
- @ApiModelProperty(value = "IP地址属地-县级行政区名")
+ @Schema(description = "IP地址属地-县级行政区名")
@TableField(value = "ip_location_district_name")
private String ipLocationDistrictName;
diff --git a/service-module/sys/sys-service/src/main/java/cc/uncarbon/module/sys/entity/SysMenuEntity.java b/service-module/sys/sys-service/src/main/java/cc/uncarbon/module/sys/entity/SysMenuEntity.java
index dfb1445..367bf6e 100644
--- a/service-module/sys/sys-service/src/main/java/cc/uncarbon/module/sys/entity/SysMenuEntity.java
+++ b/service-module/sys/sys-service/src/main/java/cc/uncarbon/module/sys/entity/SysMenuEntity.java
@@ -5,7 +5,7 @@
import cc.uncarbon.module.sys.enums.SysMenuTypeEnum;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
-import io.swagger.annotations.ApiModelProperty;
+import io.swagger.v3.oas.annotations.media.Schema;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.EqualsAndHashCode;
@@ -26,39 +26,39 @@
@TableName(value = "sys_menu")
public class SysMenuEntity extends HelioBaseEntity {
- @ApiModelProperty(value = "名称")
+ @Schema(description = "名称")
@TableField(value = "title")
private String title;
- @ApiModelProperty(value = "上级菜单ID")
+ @Schema(description = "上级菜单ID")
@TableField(value = "parent_id")
private Long parentId;
- @ApiModelProperty(value = "菜单类型")
+ @Schema(description = "菜单类型")
@TableField(value = "type")
private SysMenuTypeEnum type;
- @ApiModelProperty(value = "权限标识")
+ @Schema(description = "权限标识")
@TableField(value = "permission")
private String permission;
- @ApiModelProperty(value = "图标")
+ @Schema(description = "图标")
@TableField(value = "icon")
private String icon;
- @ApiModelProperty(value = "排序")
+ @Schema(description = "排序")
@TableField(value = "sort")
private Integer sort;
- @ApiModelProperty(value = "状态")
+ @Schema(description = "状态")
@TableField(value = "status")
private EnabledStatusEnum status;
- @ApiModelProperty(value = "组件(Vue项目中`/@/views/`后的路径部分; 填`LAYOUT`为空页面)")
+ @Schema(description = "组件(Vue项目中`/@/views/`后的路径部分; 填`LAYOUT`为空页面)")
@TableField(value = "component")
private String component;
- @ApiModelProperty(value = "外链地址")
+ @Schema(description = "外链地址")
@TableField(value = "external_link")
private String externalLink;
diff --git a/service-module/sys/sys-service/src/main/java/cc/uncarbon/module/sys/entity/SysParamEntity.java b/service-module/sys/sys-service/src/main/java/cc/uncarbon/module/sys/entity/SysParamEntity.java
index 069548e..f342a90 100644
--- a/service-module/sys/sys-service/src/main/java/cc/uncarbon/module/sys/entity/SysParamEntity.java
+++ b/service-module/sys/sys-service/src/main/java/cc/uncarbon/module/sys/entity/SysParamEntity.java
@@ -3,7 +3,7 @@
import cc.uncarbon.framework.crud.entity.HelioBaseEntity;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
-import io.swagger.annotations.ApiModelProperty;
+import io.swagger.v3.oas.annotations.media.Schema;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.EqualsAndHashCode;
@@ -24,15 +24,15 @@
@TableName(value = "sys_param")
public class SysParamEntity extends HelioBaseEntity {
- @ApiModelProperty(value = "键名")
+ @Schema(description = "键名")
@TableField(value = "name")
private String name;
- @ApiModelProperty(value = "键值")
+ @Schema(description = "键值")
@TableField(value = "value")
private String value;
- @ApiModelProperty(value = "描述")
+ @Schema(description = "描述")
@TableField(value = "description")
private String description;
diff --git a/service-module/sys/sys-service/src/main/java/cc/uncarbon/module/sys/entity/SysRoleEntity.java b/service-module/sys/sys-service/src/main/java/cc/uncarbon/module/sys/entity/SysRoleEntity.java
index 414a654..a26cbfb 100644
--- a/service-module/sys/sys-service/src/main/java/cc/uncarbon/module/sys/entity/SysRoleEntity.java
+++ b/service-module/sys/sys-service/src/main/java/cc/uncarbon/module/sys/entity/SysRoleEntity.java
@@ -4,7 +4,7 @@
import cc.uncarbon.module.sys.constant.SysConstant;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
-import io.swagger.annotations.ApiModelProperty;
+import io.swagger.v3.oas.annotations.media.Schema;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.EqualsAndHashCode;
@@ -25,11 +25,11 @@
@TableName(value = "sys_role")
public class SysRoleEntity extends HelioBaseEntity {
- @ApiModelProperty(value = "角色名")
+ @Schema(description = "角色名")
@TableField(value = "title")
private String title;
- @ApiModelProperty(value = "角色编码")
+ @Schema(description = "角色编码")
@TableField(value = "value")
private String value;
diff --git a/service-module/sys/sys-service/src/main/java/cc/uncarbon/module/sys/entity/SysRoleMenuRelationEntity.java b/service-module/sys/sys-service/src/main/java/cc/uncarbon/module/sys/entity/SysRoleMenuRelationEntity.java
index b72d739..d6dadd2 100644
--- a/service-module/sys/sys-service/src/main/java/cc/uncarbon/module/sys/entity/SysRoleMenuRelationEntity.java
+++ b/service-module/sys/sys-service/src/main/java/cc/uncarbon/module/sys/entity/SysRoleMenuRelationEntity.java
@@ -3,7 +3,7 @@
import cc.uncarbon.framework.crud.entity.HelioNoTenantBaseEntity;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
-import io.swagger.annotations.ApiModelProperty;
+import io.swagger.v3.oas.annotations.media.Schema;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.EqualsAndHashCode;
@@ -24,11 +24,11 @@
@TableName(value = "sys_role_menu_relation")
public class SysRoleMenuRelationEntity extends HelioNoTenantBaseEntity {
- @ApiModelProperty(value = "角色ID")
+ @Schema(description = "角色ID")
@TableField(value = "role_id")
private Long roleId;
- @ApiModelProperty(value = "菜单ID")
+ @Schema(description = "菜单ID")
@TableField(value = "menu_id")
private Long menuId;
diff --git a/service-module/sys/sys-service/src/main/java/cc/uncarbon/module/sys/entity/SysTenantEntity.java b/service-module/sys/sys-service/src/main/java/cc/uncarbon/module/sys/entity/SysTenantEntity.java
index f84dd60..0b77e3d 100644
--- a/service-module/sys/sys-service/src/main/java/cc/uncarbon/module/sys/entity/SysTenantEntity.java
+++ b/service-module/sys/sys-service/src/main/java/cc/uncarbon/module/sys/entity/SysTenantEntity.java
@@ -4,7 +4,7 @@
import cc.uncarbon.framework.crud.entity.HelioBaseEntity;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
-import io.swagger.annotations.ApiModelProperty;
+import io.swagger.v3.oas.annotations.media.Schema;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.EqualsAndHashCode;
@@ -25,19 +25,19 @@
@TableName(value = "sys_tenant")
public class SysTenantEntity extends HelioBaseEntity {
- @ApiModelProperty(value = "租户名")
+ @Schema(description = "租户名")
@TableField(value = "tenant_name")
private String tenantName;
- @ApiModelProperty(value = "状态")
+ @Schema(description = "状态")
@TableField(value = "status")
private EnabledStatusEnum status;
- @ApiModelProperty(value = "租户管理员用户ID")
+ @Schema(description = "租户管理员用户ID")
@TableField(value = "tenant_admin_user_id")
private Long tenantAdminUserId;
- @ApiModelProperty(value = "备注")
+ @Schema(description = "备注")
@TableField(value = "remark")
private String remark;
diff --git a/service-module/sys/sys-service/src/main/java/cc/uncarbon/module/sys/entity/SysUserDeptRelationEntity.java b/service-module/sys/sys-service/src/main/java/cc/uncarbon/module/sys/entity/SysUserDeptRelationEntity.java
index 62d6973..e6e5b2d 100644
--- a/service-module/sys/sys-service/src/main/java/cc/uncarbon/module/sys/entity/SysUserDeptRelationEntity.java
+++ b/service-module/sys/sys-service/src/main/java/cc/uncarbon/module/sys/entity/SysUserDeptRelationEntity.java
@@ -3,7 +3,7 @@
import cc.uncarbon.framework.crud.entity.HelioNoTenantBaseEntity;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
-import io.swagger.annotations.ApiModelProperty;
+import io.swagger.v3.oas.annotations.media.Schema;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.EqualsAndHashCode;
@@ -24,11 +24,11 @@
@TableName(value = "sys_user_dept_relation")
public class SysUserDeptRelationEntity extends HelioNoTenantBaseEntity {
- @ApiModelProperty(value = "用户ID")
+ @Schema(description = "用户ID")
@TableField(value = "user_id")
private Long userId;
- @ApiModelProperty(value = "部门ID")
+ @Schema(description = "部门ID")
@TableField(value = "dept_id")
private Long deptId;
diff --git a/service-module/sys/sys-service/src/main/java/cc/uncarbon/module/sys/entity/SysUserEntity.java b/service-module/sys/sys-service/src/main/java/cc/uncarbon/module/sys/entity/SysUserEntity.java
index bbc4251..75c3191 100644
--- a/service-module/sys/sys-service/src/main/java/cc/uncarbon/module/sys/entity/SysUserEntity.java
+++ b/service-module/sys/sys-service/src/main/java/cc/uncarbon/module/sys/entity/SysUserEntity.java
@@ -6,7 +6,7 @@
import cn.hutool.core.annotation.Alias;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
-import io.swagger.annotations.ApiModelProperty;
+import io.swagger.v3.oas.annotations.media.Schema;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.EqualsAndHashCode;
@@ -29,40 +29,40 @@
@TableName(value = "sys_user")
public class SysUserEntity extends HelioBaseEntity {
- @ApiModelProperty(value = "账号")
+ @Schema(description = "账号")
@Alias(value = "username")
@TableField(value = "pin")
private String pin;
- @ApiModelProperty(value = "密码")
+ @Schema(description = "密码")
@TableField(value = "pwd")
private String pwd;
- @ApiModelProperty(value = "盐")
+ @Schema(description = "盐")
@TableField(value = "salt")
private String salt;
- @ApiModelProperty(value = "昵称")
+ @Schema(description = "昵称")
@TableField(value = "nickname")
private String nickname;
- @ApiModelProperty(value = "状态")
+ @Schema(description = "状态")
@TableField(value = "status")
private SysUserStatusEnum status;
- @ApiModelProperty(value = "性别")
+ @Schema(description = "性别")
@TableField(value = "gender")
private GenderEnum gender;
- @ApiModelProperty(value = "邮箱")
+ @Schema(description = "邮箱")
@TableField(value = "email")
private String email;
- @ApiModelProperty(value = "手机号")
+ @Schema(description = "手机号")
@TableField(value = "phone_no")
private String phoneNo;
- @ApiModelProperty(value = "最后登录时刻")
+ @Schema(description = "最后登录时刻")
@TableField(value = "last_login_at")
private LocalDateTime lastLoginAt;
diff --git a/service-module/sys/sys-service/src/main/java/cc/uncarbon/module/sys/entity/SysUserRoleRelationEntity.java b/service-module/sys/sys-service/src/main/java/cc/uncarbon/module/sys/entity/SysUserRoleRelationEntity.java
index d2fc72e..c7d7ead 100644
--- a/service-module/sys/sys-service/src/main/java/cc/uncarbon/module/sys/entity/SysUserRoleRelationEntity.java
+++ b/service-module/sys/sys-service/src/main/java/cc/uncarbon/module/sys/entity/SysUserRoleRelationEntity.java
@@ -3,7 +3,7 @@
import cc.uncarbon.framework.crud.entity.HelioNoTenantBaseEntity;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
-import io.swagger.annotations.ApiModelProperty;
+import io.swagger.v3.oas.annotations.media.Schema;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.EqualsAndHashCode;
@@ -24,11 +24,11 @@
@TableName(value = "sys_user_role_relation")
public class SysUserRoleRelationEntity extends HelioNoTenantBaseEntity {
- @ApiModelProperty(value = "用户ID")
+ @Schema(description = "用户ID")
@TableField(value = "user_id")
private Long userId;
- @ApiModelProperty(value = "角色ID")
+ @Schema(description = "角色ID")
@TableField(value = "role_id")
private Long roleId;
diff --git a/service-module/sys/sys-service/src/main/java/cc/uncarbon/module/sys/mapper/SysUserMapper.java b/service-module/sys/sys-service/src/main/java/cc/uncarbon/module/sys/mapper/SysUserMapper.java
index 0411f44..daa1055 100644
--- a/service-module/sys/sys-service/src/main/java/cc/uncarbon/module/sys/mapper/SysUserMapper.java
+++ b/service-module/sys/sys-service/src/main/java/cc/uncarbon/module/sys/mapper/SysUserMapper.java
@@ -12,7 +12,6 @@
import java.util.Collection;
import java.util.List;
-import java.util.stream.Collectors;
/**
* 后台用户
@@ -47,7 +46,7 @@ default List selectIds(Collection statusEnums) {
.select(SysUserEntity::getId)
// 状态
.in(CollUtil.isNotEmpty(statusEnums), SysUserEntity::getStatus, statusEnums)
- ).stream().map(SysUserEntity::getId).collect(Collectors.toList());
+ ).stream().map(SysUserEntity::getId).toList();
}
}
diff --git a/service-module/sys/sys-service/src/main/java/cc/uncarbon/module/sys/model/interior/UserDeptContainer.java b/service-module/sys/sys-service/src/main/java/cc/uncarbon/module/sys/model/interior/UserDeptContainer.java
index 3e9847e..d92403a 100644
--- a/service-module/sys/sys-service/src/main/java/cc/uncarbon/module/sys/model/interior/UserDeptContainer.java
+++ b/service-module/sys/sys-service/src/main/java/cc/uncarbon/module/sys/model/interior/UserDeptContainer.java
@@ -6,7 +6,6 @@
import java.util.Collections;
import java.util.List;
-import java.util.stream.Collectors;
/**
* 用户关联部门容器
@@ -75,7 +74,7 @@ public void updateVisibleDepts(List visibleDepts) {
this.visibleDeptIds = Collections.emptyList();
this.visibleDepts = Collections.emptyList();
} else {
- this.visibleDeptIds = visibleDepts.stream().map(SysDeptEntity::getId).collect(Collectors.toList());
+ this.visibleDeptIds = visibleDepts.stream().map(SysDeptEntity::getId).toList();
this.visibleDepts = visibleDepts;
}
}
diff --git a/service-module/sys/sys-service/src/main/java/cc/uncarbon/module/sys/service/SysMenuService.java b/service-module/sys/sys-service/src/main/java/cc/uncarbon/module/sys/service/SysMenuService.java
index 441d3d5..1ed843f 100644
--- a/service-module/sys/sys-service/src/main/java/cc/uncarbon/module/sys/service/SysMenuService.java
+++ b/service-module/sys/sys-service/src/main/java/cc/uncarbon/module/sys/service/SysMenuService.java
@@ -250,16 +250,12 @@ private SysMenuBO entity2BO(SysMenuEntity entity) {
.setName(snowflakeIdStr)
.setMeta(new VbenAdminMenuMetaVO(bo.getTitle(), false, bo.getIcon()));
- // 这里是兼容 JDK8 的写法,使用较高 JDK 版本可使用语法糖
switch (bo.getType()) {
- case DIR:
- case BUTTON:
- bo
- .setComponent(SysConstant.VBEN_ADMIN_BLANK_VIEW)
- .setExternalLink(null)
- .setPath(StrPool.SLASH + snowflakeIdStr);
- break;
- case MENU:
+ case DIR, BUTTON -> bo
+ .setComponent(SysConstant.VBEN_ADMIN_BLANK_VIEW)
+ .setExternalLink(null)
+ .setPath(StrPool.SLASH + snowflakeIdStr);
+ case MENU -> {
bo
.setExternalLink(null)
.setPath(bo.getComponent());
@@ -267,13 +263,10 @@ private SysMenuBO entity2BO(SysMenuEntity entity) {
if (CharSequenceUtil.isNotBlank(bo.getPath()) && !bo.getPath().startsWith(StrPool.SLASH)) {
bo.setPath(StrPool.SLASH + bo.getPath());
}
- break;
- case EXTERNAL_LINK:
- bo
- .setComponent(bo.getExternalLink())
- .setPath(bo.getExternalLink());
- break;
- default: break;
+ }
+ case EXTERNAL_LINK -> bo
+ .setComponent(bo.getExternalLink())
+ .setPath(bo.getExternalLink());
}
return bo;
}
@@ -367,7 +360,7 @@ private void checkExistence(AdminInsertOrUpdateSysMenuDTO dto) {
/**
* 追溯并补充可能缺失的级联上级菜单ID
*
- * @param allMenuMap 完整的 菜单ID-上级菜单ID map
+ * @param allMenuMap 完整的 菜单ID-上级菜单ID map
* @param directlyRelatedMenuIds 当前用户直接关联的菜单ID集合
* @return Set 已经补充好的、完整的菜单ID集合
*/
diff --git a/service-module/sys/sys-service/src/main/java/cc/uncarbon/module/sys/service/SysUserService.java b/service-module/sys/sys-service/src/main/java/cc/uncarbon/module/sys/service/SysUserService.java
index c9ea5b8..b0cdc29 100644
--- a/service-module/sys/sys-service/src/main/java/cc/uncarbon/module/sys/service/SysUserService.java
+++ b/service-module/sys/sys-service/src/main/java/cc/uncarbon/module/sys/service/SysUserService.java
@@ -35,7 +35,7 @@
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
-import javax.annotation.PostConstruct;
+import jakarta.annotation.PostConstruct;
import java.math.BigInteger;
import java.time.LocalDateTime;
import java.util.*;
@@ -545,7 +545,7 @@ private void preDeleteCheck(Collection ids) {
}
// 目标是超级管理员时,不能删除
- List specifiedUsers = ids.stream().map(sysRoleService::getSpecifiedUserRoleContainer).collect(Collectors.toList());
+ List specifiedUsers = ids.stream().map(sysRoleService::getSpecifiedUserRoleContainer).toList();
if (specifiedUsers.stream().anyMatch(UserRoleContainer::isSuperAdmin)) {
throw new BusinessException(SysErrorEnum.CANNOT_OPERATE_THIS_USER);
}