@@ -17,8 +17,8 @@
- 已读
- 未读
+ 已读
+ 未读
@@ -81,3 +81,9 @@
})
}
+
+
diff --git a/snowy-admin-web/src/views/sys/user/userTab/userMessage/detail.vue b/snowy-admin-web/src/views/sys/user/userTab/userMessage/detail.vue
index a21a5cf1..add81db0 100644
--- a/snowy-admin-web/src/views/sys/user/userTab/userMessage/detail.vue
+++ b/snowy-admin-web/src/views/sys/user/userTab/userMessage/detail.vue
@@ -20,8 +20,8 @@
>
- 已读
- 未读
+ 已读
+ 未读
diff --git a/snowy-admin-web/vite.config.mjs b/snowy-admin-web/vite.config.mjs
index b3d36d0d..f23de518 100644
--- a/snowy-admin-web/vite.config.mjs
+++ b/snowy-admin-web/vite.config.mjs
@@ -19,35 +19,21 @@ import { visualizer } from 'rollup-plugin-visualizer'
import Less2CssVariablePlugin from 'antd-less-to-css-variable'
import viteCompression from 'vite-plugin-compression'
-export const r = (...args) => resolve(__dirname, '.', ...args)
+// ant-design-vue 的 less 变量,通过兼容包将 v4 变量转译成 v3 版本,并通过 less-loader 注入
+import { theme } from 'ant-design-vue/lib';
+import convertLegacyToken from 'ant-design-vue/lib/theme/convertLegacyToken';
+const { defaultAlgorithm, defaultSeed } = theme;
+const mapToken = defaultAlgorithm(defaultSeed);
+const v3Token = convertLegacyToken.default(mapToken);
-const removeModulePreloadPlugin = (keys) => {
- if (!keys || !keys.length) {
- return
- }
- return {
- name: 'remove-module-preload',
- transformIndexHtml: {
- enforce: 'after',
- transform(html, ctx) {
- let result = html
- keys.forEach((key) => {
- result = result.replace(new RegExp(`
resolve(__dirname, '.', ...args)
export default defineConfig(({ command, mode }) => {
const envConfig = loadEnv(mode, './')
-
const alias = {
'~': `${resolve(__dirname, './')}`,
'@/': `${resolve(__dirname, 'src')}/`
}
-
return {
server: {
port: envConfig.VITE_PORT,
@@ -67,7 +53,8 @@ export default defineConfig(({ command, mode }) => {
define: {
__VUE_I18N_FULL_INSTALL__: true,
__VUE_I18N_LEGACY_API__: true,
- __VUE_I18N_PROD_DEVTOOLS__: true
+ __VUE_I18N_PROD_DEVTOOLS__: true,
+ __VUE_PROD_HYDRATION_MISMATCH_DETAILS__: true
},
build: {
// sourcemap: true,
@@ -110,7 +97,11 @@ export default defineConfig(({ command, mode }) => {
preprocessorOptions: {
less: {
javascriptEnabled: true,
- plugins: [new Less2CssVariablePlugin()]
+ plugins: [new Less2CssVariablePlugin({
+ // TODO:有必要用的情况下,是否需要传入 variables,可能会造成重复引用
+ variables: { ...v3Token }
+ })],
+ modifyVars: v3Token
}
}
},
diff --git a/snowy-common/pom.xml b/snowy-common/pom.xml
index f823af94..cd53e5b8 100644
--- a/snowy-common/pom.xml
+++ b/snowy-common/pom.xml
@@ -7,7 +7,7 @@
vip.xiaonuo
snowy
- 2.0.0
+ 3.0.0
snowy-common
@@ -15,6 +15,13 @@
基础通用模块
+
+
+
+ org.openjdk.nashorn
+ nashorn-core
+
+
org.springframework.boot
@@ -60,39 +67,19 @@
com.baomidou
- mybatis-plus-boot-starter
+ mybatis-plus-spring-boot3-starter
com.fhs-opensource
easy-trans-spring-boot-starter
-
-
- mybatis-plus-annotation
- com.baomidou
-
-
- springfox-schema
- io.springfox
-
-
- error_prone_annotations
- com.google.errorprone
-
-
com.fhs-opensource
easy-trans-mybatis-plus-extend
-
-
- mybatis-plus-extension
- com.baomidou
-
-
@@ -101,18 +88,6 @@
commons-pool2
-
-
- com.fasterxml.jackson.core
- jackson-core
-
-
-
-
- com.fasterxml.jackson.core
- jackson-databind
-
-
cn.hutool
@@ -134,31 +109,13 @@
com.github.xiaoymin
- knife4j-spring-boot-starter
+ knife4j-openapi3-jakarta-spring-boot-starter
cn.afterturn
easypoi-spring-boot-starter
-
-
- javassist
- org.javassist
-
-
- poi
- org.apache.poi
-
-
- poi-ooxml
- org.apache.poi
-
-
- poi-ooxml-schemas
- org.apache.poi
-
-
diff --git a/snowy-common/src/main/java/vip/xiaonuo/common/cache/CommonCacheOperator.java b/snowy-common/src/main/java/vip/xiaonuo/common/cache/CommonCacheOperator.java
index 34ad3a15..0c3e784a 100644
--- a/snowy-common/src/main/java/vip/xiaonuo/common/cache/CommonCacheOperator.java
+++ b/snowy-common/src/main/java/vip/xiaonuo/common/cache/CommonCacheOperator.java
@@ -15,10 +15,10 @@ package vip.xiaonuo.common.cache;
import cn.hutool.core.collection.CollectionUtil;
import cn.hutool.core.map.MapUtil;
import cn.hutool.core.util.StrUtil;
+import jakarta.annotation.Resource;
import org.springframework.data.redis.core.RedisTemplate;
import org.springframework.stereotype.Component;
-import javax.annotation.Resource;
import java.util.*;
import java.util.concurrent.TimeUnit;
import java.util.stream.Collectors;
diff --git a/snowy-common/src/main/java/vip/xiaonuo/common/pojo/CommonEntity.java b/snowy-common/src/main/java/vip/xiaonuo/common/pojo/CommonEntity.java
index 05c4c579..8f4ea5f7 100644
--- a/snowy-common/src/main/java/vip/xiaonuo/common/pojo/CommonEntity.java
+++ b/snowy-common/src/main/java/vip/xiaonuo/common/pojo/CommonEntity.java
@@ -19,7 +19,7 @@ import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fhs.core.trans.anno.Trans;
import com.fhs.core.trans.constant.TransType;
import com.fhs.core.trans.vo.TransPojo;
-import io.swagger.annotations.ApiModelProperty;
+import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Getter;
import lombok.Setter;
@@ -42,39 +42,39 @@ public class CommonEntity implements Serializable, TransPojo {
/** 删除标志 */
@JsonIgnore
@TableLogic
- @ApiModelProperty(value = "删除标志", position = 999)
+ @Schema(description = "删除标志")
@TableField(fill = FieldFill.INSERT)
private String deleteFlag;
/** 创建时间 */
- @ApiModelProperty(value = "创建时间", position = 1000)
+ @Schema(description = "创建时间")
@TableField(fill = FieldFill.INSERT)
private Date createTime;
/** 创建人 */
- @ApiModelProperty(value = "创建人", position = 1001)
+ @Schema(description = "创建人")
@TableField(fill = FieldFill.INSERT)
@Trans(type = TransType.RPC, targetClassName = "vip.xiaonuo.sys.modular.user.entity.SysUser", fields = "name", alias = "createUser", ref = "createUserName")
private String createUser;
/** 创建人名称 */
- @ApiModelProperty(value = "创建人名称", position = 1002)
+ @Schema(description = "创建人名称")
@TableField(exist = false)
private String createUserName;
/** 更新时间 */
- @ApiModelProperty(value = "更新时间", position = 1003)
+ @Schema(description = "更新时间")
@TableField(fill = FieldFill.UPDATE)
private Date updateTime;
/** 更新人 */
- @ApiModelProperty(value = "更新人", position = 1004)
+ @Schema(description = "更新人")
@TableField(fill = FieldFill.UPDATE)
@Trans(type = TransType.RPC, targetClassName = "vip.xiaonuo.sys.modular.user.entity.SysUser", fields = "name", alias = "updateUser", ref = "updateUserName")
private String updateUser;
/** 更新人名称 */
- @ApiModelProperty(value = "更新人名称", position = 1005)
+ @Schema(description = "更新人名称")
@TableField(exist = false)
private String updateUserName;
}
diff --git a/snowy-common/src/main/java/vip/xiaonuo/common/pojo/CommonResult.java b/snowy-common/src/main/java/vip/xiaonuo/common/pojo/CommonResult.java
index 80667cac..ffa97398 100644
--- a/snowy-common/src/main/java/vip/xiaonuo/common/pojo/CommonResult.java
+++ b/snowy-common/src/main/java/vip/xiaonuo/common/pojo/CommonResult.java
@@ -12,15 +12,9 @@
*/
package vip.xiaonuo.common.pojo;
-import io.swagger.annotations.ApiModelProperty;
-import springfox.documentation.builders.ResponseMessageBuilder;
-import springfox.documentation.service.ResponseMessage;
-import vip.xiaonuo.common.enums.CommonExceptionEnum;
+import io.swagger.v3.oas.annotations.media.Schema;
import java.io.Serializable;
-import java.util.Arrays;
-import java.util.List;
-import java.util.stream.Collectors;
/**
* 对Ajax请求返回Json格式数据的简易封装
@@ -33,13 +27,13 @@ public class CommonResult implements Serializable{
public static final int CODE_SUCCESS = 200;
public static final int CODE_ERROR = 500;
- @ApiModelProperty(value = "状态码")
+ @Schema(description = "状态码")
private int code;
- @ApiModelProperty(value = "提示语")
+ @Schema(description = "提示语")
private String msg;
- @ApiModelProperty(value = "返回数据")
+ @Schema(description = "返回数据")
private T data;
public CommonResult() {
@@ -145,16 +139,4 @@ public class CommonResult implements Serializable{
+ ", \"data\": \"" + this.getData() + "\""
+ "}";
}
-
- /**
- * 响应状态码集合
- *
- * @author xuyuxiang
- * @date 2022/7/25 13:36
- **/
- public static List responseList() {
- return Arrays.stream(CommonExceptionEnum.values()).map(commonExceptionEnum -> new ResponseMessageBuilder()
- .code(commonExceptionEnum.getCode()).message(commonExceptionEnum.getMessage()).build())
- .collect(Collectors.toList());
- }
}
diff --git a/snowy-common/src/main/java/vip/xiaonuo/common/pojo/CommonValidList.java b/snowy-common/src/main/java/vip/xiaonuo/common/pojo/CommonValidList.java
deleted file mode 100644
index 4a14692a..00000000
--- a/snowy-common/src/main/java/vip/xiaonuo/common/pojo/CommonValidList.java
+++ /dev/null
@@ -1,146 +0,0 @@
-/*
- * Copyright [2022] [https://www.xiaonuo.vip]
- *
- * Snowy采用APACHE LICENSE 2.0开源协议,您在使用过程中,需要注意以下几点:
- *
- * 1.请不要删除和修改根目录下的LICENSE文件。
- * 2.请不要删除和修改Snowy源码头部的版权声明。
- * 3.本项目代码可免费商业使用,商业使用请保留源码和相关描述文件的项目出处,作者声明等。
- * 4.分发源码时候,请注明软件出处 https://www.xiaonuo.vip
- * 5.不可二次分发开源参与同类竞品,如有想法可联系团队xiaonuobase@qq.com商议合作。
- * 6.若您的项目无法满足以上几点,需要更多功能代码,获取Snowy商业授权许可,请在官网购买授权,地址为 https://www.xiaonuo.vip
- */
-package vip.xiaonuo.common.pojo;
-
-import lombok.Data;
-
-import javax.validation.Valid;
-import java.util.*;
-
-/**
- * 可被校验的通用List
- *
- * @author xuyuxiang
- * @date 2022/7/28 16:08
- **/
-@Data
-public class CommonValidList implements List {
-
- @Valid
- private List list = new LinkedList<>();
-
- @Override
- public int size() {
- return list.size();
- }
-
- @Override
- public boolean isEmpty() {
- return list.isEmpty();
- }
-
- @Override
- public boolean contains(Object o) {
- return list.contains(o);
- }
-
- @Override
- public Iterator iterator() {
- return list.iterator();
- }
-
- @Override
- public Object[] toArray() {
- return list.toArray();
- }
-
- @Override
- public T[] toArray(T[] a) {
- return list.toArray(a);
- }
-
- @Override
- public boolean add(E e) {
- return list.add(e);
- }
-
- @Override
- public boolean remove(Object o) {
- return list.remove(o);
- }
-
- @Override
- public boolean containsAll(Collection> c) {
- return list.containsAll(c);
- }
-
- @Override
- public boolean addAll(Collection extends E> c) {
- return list.addAll(c);
- }
-
- @Override
- public boolean addAll(int index, Collection extends E> c) {
- return list.addAll(index, c);
- }
-
- @Override
- public boolean removeAll(Collection> c) {
- return list.removeAll(c);
- }
-
- @Override
- public boolean retainAll(Collection> c) {
- return list.retainAll(c);
- }
-
- @Override
- public void clear() {
- list.clear();
- }
-
- @Override
- public E get(int index) {
- return list.get(index);
- }
-
- @Override
- public E set(int index, E element) {
- return list.set(index, element);
- }
-
- @Override
- public void add(int index, E element) {
- list.add(index, element);
- }
-
- @Override
- public E remove(int index) {
- return list.remove(index);
- }
-
- @Override
- public int indexOf(Object o) {
- return list.indexOf(o);
- }
-
- @Override
- public int lastIndexOf(Object o) {
- return list.lastIndexOf(o);
- }
-
- @Override
- public ListIterator listIterator() {
- return list.listIterator();
- }
-
- @Override
- public ListIterator listIterator(int index) {
- return list.listIterator(index);
- }
-
- @Override
- public List subList(int fromIndex, int toIndex) {
- return list.subList(fromIndex, toIndex);
- }
-}
diff --git a/snowy-common/src/main/java/vip/xiaonuo/common/util/CommonDownloadUtil.java b/snowy-common/src/main/java/vip/xiaonuo/common/util/CommonDownloadUtil.java
index 33045e08..18e17a1e 100644
--- a/snowy-common/src/main/java/vip/xiaonuo/common/util/CommonDownloadUtil.java
+++ b/snowy-common/src/main/java/vip/xiaonuo/common/util/CommonDownloadUtil.java
@@ -15,9 +15,9 @@ package vip.xiaonuo.common.util;
import cn.hutool.core.io.FileUtil;
import cn.hutool.core.io.IoUtil;
import cn.hutool.core.util.URLUtil;
+import jakarta.servlet.http.HttpServletResponse;
import lombok.extern.slf4j.Slf4j;
-import javax.servlet.http.HttpServletResponse;
import java.io.File;
import java.io.IOException;
diff --git a/snowy-common/src/main/java/vip/xiaonuo/common/util/CommonFilterExceptionUtil.java b/snowy-common/src/main/java/vip/xiaonuo/common/util/CommonFilterExceptionUtil.java
index 9bd3b00c..a654bcf3 100644
--- a/snowy-common/src/main/java/vip/xiaonuo/common/util/CommonFilterExceptionUtil.java
+++ b/snowy-common/src/main/java/vip/xiaonuo/common/util/CommonFilterExceptionUtil.java
@@ -12,8 +12,8 @@
*/
package vip.xiaonuo.common.util;
-import javax.servlet.ServletRequest;
-import javax.servlet.ServletResponse;
+import jakarta.servlet.ServletRequest;
+import jakarta.servlet.ServletResponse;
/**
* 过滤器异常工具类,用于处理过滤器中的异常
diff --git a/snowy-common/src/main/java/vip/xiaonuo/common/util/CommonIpAddressUtil.java b/snowy-common/src/main/java/vip/xiaonuo/common/util/CommonIpAddressUtil.java
index 6ebe978e..ef1a2316 100644
--- a/snowy-common/src/main/java/vip/xiaonuo/common/util/CommonIpAddressUtil.java
+++ b/snowy-common/src/main/java/vip/xiaonuo/common/util/CommonIpAddressUtil.java
@@ -15,12 +15,12 @@ package vip.xiaonuo.common.util;
import cn.hutool.core.io.FileUtil;
import cn.hutool.core.net.Ipv4Util;
import cn.hutool.core.util.ObjectUtil;
-import cn.hutool.extra.servlet.ServletUtil;
+import cn.hutool.extra.servlet.JakartaServletUtil;
+import jakarta.servlet.http.HttpServletRequest;
import lombok.extern.slf4j.Slf4j;
import org.lionsoul.ip2region.xdb.Searcher;
import vip.xiaonuo.common.exception.CommonException;
-import javax.servlet.http.HttpServletRequest;
import java.io.File;
import java.io.InputStream;
@@ -80,7 +80,7 @@ public class CommonIpAddressUtil {
return Ipv4Util.LOCAL_IP;
} else {
try {
- String remoteHost = ServletUtil.getClientIP(request);
+ String remoteHost = JakartaServletUtil.getClientIP(request);
return LOCAL_REMOTE_HOST.equals(remoteHost) ? Ipv4Util.LOCAL_IP : remoteHost;
} catch (Exception e) {
log.error(">>> 获取客户端ip异常:", e);
@@ -99,7 +99,7 @@ public class CommonIpAddressUtil {
try {
ip = ip.trim();
// 3、执行查询
- String region = searcher.searchByStr(ip);
+ String region = searcher.search(ip);
return region.replace("0|", "").replace("|0", "");
} catch (Exception e) {
return "未知";
diff --git a/snowy-common/src/main/java/vip/xiaonuo/common/util/CommonJoinPointUtil.java b/snowy-common/src/main/java/vip/xiaonuo/common/util/CommonJoinPointUtil.java
index 02bd5910..021a3a56 100644
--- a/snowy-common/src/main/java/vip/xiaonuo/common/util/CommonJoinPointUtil.java
+++ b/snowy-common/src/main/java/vip/xiaonuo/common/util/CommonJoinPointUtil.java
@@ -16,13 +16,13 @@ import cn.hutool.core.map.MapUtil;
import cn.hutool.core.util.ObjectUtil;
import cn.hutool.core.util.StrUtil;
import cn.hutool.json.JSONUtil;
+import jakarta.servlet.http.HttpServletRequest;
+import jakarta.servlet.http.HttpServletResponse;
import org.aspectj.lang.JoinPoint;
import org.aspectj.lang.Signature;
import org.aspectj.lang.reflect.MethodSignature;
import org.springframework.web.multipart.MultipartFile;
-import javax.servlet.http.HttpServletRequest;
-import javax.servlet.http.HttpServletResponse;
import java.util.Map;
/**
diff --git a/snowy-common/src/main/java/vip/xiaonuo/common/util/CommonResponseUtil.java b/snowy-common/src/main/java/vip/xiaonuo/common/util/CommonResponseUtil.java
index f3c1fd50..55238000 100644
--- a/snowy-common/src/main/java/vip/xiaonuo/common/util/CommonResponseUtil.java
+++ b/snowy-common/src/main/java/vip/xiaonuo/common/util/CommonResponseUtil.java
@@ -16,9 +16,9 @@ import cn.hutool.core.util.CharsetUtil;
import cn.hutool.core.util.ObjectUtil;
import cn.hutool.http.ContentType;
import cn.hutool.json.JSONUtil;
+import jakarta.servlet.http.HttpServletResponse;
import vip.xiaonuo.common.pojo.CommonResult;
-import javax.servlet.http.HttpServletResponse;
import java.io.IOException;
/**
diff --git a/snowy-common/src/main/java/vip/xiaonuo/common/util/CommonServletUtil.java b/snowy-common/src/main/java/vip/xiaonuo/common/util/CommonServletUtil.java
index 0792306c..35847507 100644
--- a/snowy-common/src/main/java/vip/xiaonuo/common/util/CommonServletUtil.java
+++ b/snowy-common/src/main/java/vip/xiaonuo/common/util/CommonServletUtil.java
@@ -13,15 +13,14 @@
package vip.xiaonuo.common.util;
import cn.hutool.core.util.ObjectUtil;
+import jakarta.servlet.http.Cookie;
+import jakarta.servlet.http.HttpServletRequest;
+import jakarta.servlet.http.HttpServletResponse;
import lombok.extern.slf4j.Slf4j;
import org.springframework.web.context.request.RequestContextHolder;
import org.springframework.web.context.request.ServletRequestAttributes;
import vip.xiaonuo.common.exception.CommonException;
-import javax.servlet.http.Cookie;
-import javax.servlet.http.HttpServletRequest;
-import javax.servlet.http.HttpServletResponse;
-
/**
* HttpServlet工具类,获取当前request和response
*
diff --git a/snowy-common/src/main/java/vip/xiaonuo/common/util/CommonUaUtil.java b/snowy-common/src/main/java/vip/xiaonuo/common/util/CommonUaUtil.java
index 0621b74b..c7ab88b3 100644
--- a/snowy-common/src/main/java/vip/xiaonuo/common/util/CommonUaUtil.java
+++ b/snowy-common/src/main/java/vip/xiaonuo/common/util/CommonUaUtil.java
@@ -14,12 +14,11 @@ package vip.xiaonuo.common.util;
import cn.hutool.core.util.ObjectUtil;
import cn.hutool.core.util.StrUtil;
-import cn.hutool.extra.servlet.ServletUtil;
+import cn.hutool.extra.servlet.JakartaServletUtil;
import cn.hutool.http.useragent.Browser;
import cn.hutool.http.useragent.UserAgent;
import cn.hutool.http.useragent.UserAgentUtil;
-
-import javax.servlet.http.HttpServletRequest;
+import jakarta.servlet.http.HttpServletRequest;
/**
* 用户代理工具类
@@ -74,7 +73,7 @@ public class CommonUaUtil {
* @date 2022/9/2 15:36
*/
private static UserAgent getUserAgent(HttpServletRequest request) {
- String userAgentStr = ServletUtil.getHeaderIgnoreCase(request, "User-Agent");
+ String userAgentStr = JakartaServletUtil.getHeaderIgnoreCase(request, "User-Agent");
UserAgent userAgent = UserAgentUtil.parse(userAgentStr);
if (ObjectUtil.isNotEmpty(userAgentStr)) {
if ("Unknown".equals(userAgent.getBrowser().getName())) {
diff --git a/snowy-plugin-api/pom.xml b/snowy-plugin-api/pom.xml
index e0523441..ecb308a6 100644
--- a/snowy-plugin-api/pom.xml
+++ b/snowy-plugin-api/pom.xml
@@ -7,7 +7,7 @@
vip.xiaonuo
snowy
- 2.0.0
+ 3.0.0
snowy-plugin-api
diff --git a/snowy-plugin-api/snowy-plugin-auth-api/pom.xml b/snowy-plugin-api/snowy-plugin-auth-api/pom.xml
index 346aa0a3..649c8cd4 100644
--- a/snowy-plugin-api/snowy-plugin-auth-api/pom.xml
+++ b/snowy-plugin-api/snowy-plugin-auth-api/pom.xml
@@ -7,7 +7,7 @@
vip.xiaonuo
snowy-plugin-api
- 2.0.0
+ 3.0.0
snowy-plugin-auth-api
diff --git a/snowy-plugin-api/snowy-plugin-auth-api/src/main/java/vip/xiaonuo/auth/core/pojo/SaBaseClientLoginUser.java b/snowy-plugin-api/snowy-plugin-auth-api/src/main/java/vip/xiaonuo/auth/core/pojo/SaBaseClientLoginUser.java
index 0c4da1da..e0897900 100644
--- a/snowy-plugin-api/snowy-plugin-auth-api/src/main/java/vip/xiaonuo/auth/core/pojo/SaBaseClientLoginUser.java
+++ b/snowy-plugin-api/snowy-plugin-auth-api/src/main/java/vip/xiaonuo/auth/core/pojo/SaBaseClientLoginUser.java
@@ -13,7 +13,7 @@
package vip.xiaonuo.auth.core.pojo;
import com.fasterxml.jackson.annotation.JsonIgnore;
-import io.swagger.annotations.ApiModelProperty;
+import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Getter;
import lombok.Setter;
@@ -31,184 +31,184 @@ import java.util.List;
public abstract class SaBaseClientLoginUser {
/** id */
- @ApiModelProperty(value = "id", position = 1)
+ @Schema(description = "id")
private String id;
/** 头像 */
- @ApiModelProperty(value = "头像,图片base64", position = 2)
+ @Schema(description = "头像,图片base64")
private String avatar;
/** 签名 */
- @ApiModelProperty(value = "签名,图片base64", position = 3)
+ @Schema(description = "签名,图片base64")
private String signature;
/** 账号 */
- @ApiModelProperty(value = "账号", position = 4)
+ @Schema(description = "账号")
private String account;
/** 姓名 */
- @ApiModelProperty(value = "姓名", position = 5)
+ @Schema(description = "姓名")
private String name;
/** 昵称 */
- @ApiModelProperty(value = "昵称", position = 6)
+ @Schema(description = "昵称")
private String nickname;
/** 性别 */
- @ApiModelProperty(value = "性别", position = 7)
+ @Schema(description = "性别")
private String gender;
/** 年龄 */
- @ApiModelProperty(value = "年龄", position = 8)
+ @Schema(description = "年龄")
private String age;
/** 出生日期 */
- @ApiModelProperty(value = "出生日期", position = 9)
+ @Schema(description = "出生日期")
private String birthday;
/** 民族 */
- @ApiModelProperty(value = "民族", position = 10)
+ @Schema(description = "民族")
private String nation;
/** 籍贯 */
- @ApiModelProperty(value = "籍贯", position = 11)
+ @Schema(description = "籍贯")
private String nativePlace;
/** 家庭住址 */
- @ApiModelProperty(value = "家庭住址", position = 12)
+ @Schema(description = "家庭住址")
private String homeAddress;
/** 通信地址 */
- @ApiModelProperty(value = "通信地址", position = 13)
+ @Schema(description = "通信地址")
private String mailingAddress;
/** 证件类型 */
- @ApiModelProperty(value = "证件类型", position = 14)
+ @Schema(description = "证件类型")
private String idCardType;
/** 证件号码 */
- @ApiModelProperty(value = "证件号码", position = 15)
+ @Schema(description = "证件号码")
private String idCardNumber;
/** 文化程度 */
- @ApiModelProperty(value = "文化程度", position = 16)
+ @Schema(description = "文化程度")
private String cultureLevel;
/** 政治面貌 */
- @ApiModelProperty(value = "政治面貌", position = 17)
+ @Schema(description = "政治面貌")
private String politicalOutlook;
/** 毕业院校 */
- @ApiModelProperty(value = "毕业院校", position = 18)
+ @Schema(description = "毕业院校")
private String college;
/** 学历 */
- @ApiModelProperty(value = "学历", position = 19)
+ @Schema(description = "学历")
private String education;
/** 学制 */
- @ApiModelProperty(value = "学制", position = 20)
+ @Schema(description = "学制")
private String eduLength;
/** 学位 */
- @ApiModelProperty(value = "学位", position = 21)
+ @Schema(description = "学位")
private String degree;
/** 手机 */
- @ApiModelProperty(value = "手机", position = 22)
+ @Schema(description = "手机")
private String phone;
/** 邮箱 */
- @ApiModelProperty(value = "邮箱", position = 23)
+ @Schema(description = "邮箱")
private String email;
/** 家庭电话 */
- @ApiModelProperty(value = "家庭电话", position = 24)
+ @Schema(description = "家庭电话")
private String homeTel;
/** 办公电话 */
- @ApiModelProperty(value = "办公电话", position = 25)
+ @Schema(description = "办公电话")
private String officeTel;
/** 紧急联系人 */
- @ApiModelProperty(value = "紧急联系人", position = 26)
+ @Schema(description = "紧急联系人")
private String emergencyContact;
/** 紧急联系人电话 */
- @ApiModelProperty(value = "紧急联系人电话", position = 27)
+ @Schema(description = "紧急联系人电话")
private String emergencyPhone;
/** 紧急联系人地址 */
- @ApiModelProperty(value = "紧急联系人地址", position = 28)
+ @Schema(description = "紧急联系人地址")
private String emergencyAddress;
/** 上次登录ip */
- @ApiModelProperty(value = "上次登录ip", position = 29)
+ @Schema(description = "上次登录ip")
private String lastLoginIp;
/** 上次登录地点 */
- @ApiModelProperty(value = "上次登录地点", position = 30)
+ @Schema(description = "上次登录地点")
private String lastLoginAddress;
/** 上次登录时间 */
- @ApiModelProperty(value = "上次登录时间", position = 31)
+ @Schema(description = "上次登录时间")
private Date lastLoginTime;
/** 上次登录设备 */
- @ApiModelProperty(value = "上次登录设备", position = 32)
+ @Schema(description = "上次登录设备")
private String lastLoginDevice;
/** 最新登录ip */
- @ApiModelProperty(value = "最新登录ip", position = 33)
+ @Schema(description = "最新登录ip")
private String latestLoginIp;
/** 最新登录地点 */
- @ApiModelProperty(value = "最新登录地点", position = 34)
+ @Schema(description = "最新登录地点")
private String latestLoginAddress;
/** 最新登录时间 */
- @ApiModelProperty(value = "最新登录时间", position = 35)
+ @Schema(description = "最新登录时间")
private Date latestLoginTime;
/** 最新登录设备 */
- @ApiModelProperty(value = "最新登录设备", position = 36)
+ @Schema(description = "最新登录设备")
private String latestLoginDevice;
/** 用户状态 */
- @ApiModelProperty(value = "用户状态", position = 37)
+ @Schema(description = "用户状态")
private String userStatus;
/** 排序码 */
- @ApiModelProperty(value = "排序码", position = 38)
+ @Schema(description = "排序码")
private Integer sortCode;
/** 扩展信息 */
- @ApiModelProperty(value = "扩展信息", position = 39)
+ @Schema(description = "扩展信息")
private String extJson;
/** 按钮码集合 */
- @ApiModelProperty(value = "按钮码集合", position = 40)
+ @Schema(description = "按钮码集合")
private List buttonCodeList;
/** 移动端按钮码集合 */
- @ApiModelProperty(value = "移动端按钮码集合", position = 41)
+ @Schema(description = "移动端按钮码集合")
private List mobileButtonCodeList;
/** 权限码集合 */
- @ApiModelProperty(value = "权限码集合", position = 42, hidden = true)
+ @Schema(description = "权限码集合", hidden = true)
private List permissionCodeList;
/** 角色码集合 */
- @ApiModelProperty(value = "角色码集合", position = 43, hidden = true)
+ @Schema(description = "角色码集合", hidden = true)
private List roleCodeList;
/** 数据范围集合 */
- @ApiModelProperty(value = "数据范围集合", position = 44, hidden = true)
+ @Schema(description = "数据范围集合", hidden = true)
private List dataScopeList;
/** 用户密码hash值 */
@JsonIgnore
- @ApiModelProperty(value = "用户密码hash值", position = 45)
+ @Schema(description = "用户密码hash值")
private String password;
/** 是否可登录,由继承类实现 */
@@ -225,11 +225,11 @@ public abstract class SaBaseClientLoginUser {
public static class DataScope {
/** API接口 */
- @ApiModelProperty(value = "API接口", position = 1)
+ @Schema(description = "API接口")
private String apiUrl;
/** 数据范围 */
- @ApiModelProperty(value = "数据范围", position = 2)
+ @Schema(description = "数据范围")
private List dataScope;
}
}
diff --git a/snowy-plugin-api/snowy-plugin-auth-api/src/main/java/vip/xiaonuo/auth/core/pojo/SaBaseLoginUser.java b/snowy-plugin-api/snowy-plugin-auth-api/src/main/java/vip/xiaonuo/auth/core/pojo/SaBaseLoginUser.java
index c3631155..cfff32a9 100644
--- a/snowy-plugin-api/snowy-plugin-auth-api/src/main/java/vip/xiaonuo/auth/core/pojo/SaBaseLoginUser.java
+++ b/snowy-plugin-api/snowy-plugin-auth-api/src/main/java/vip/xiaonuo/auth/core/pojo/SaBaseLoginUser.java
@@ -13,7 +13,7 @@
package vip.xiaonuo.auth.core.pojo;
import com.fasterxml.jackson.annotation.JsonIgnore;
-import io.swagger.annotations.ApiModelProperty;
+import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Getter;
import lombok.Setter;
@@ -31,220 +31,220 @@ import java.util.List;
public abstract class SaBaseLoginUser {
/** id */
- @ApiModelProperty(value = "id", position = 1)
+ @Schema(description = "id")
private String id;
/** 头像 */
- @ApiModelProperty(value = "头像", position = 3)
+ @Schema(description = "头像")
private String avatar;
/** 签名 */
- @ApiModelProperty(value = "签名", position = 4)
+ @Schema(description = "签名")
private String signature;
/** 账号 */
- @ApiModelProperty(value = "账号", position = 5)
+ @Schema(description = "账号")
private String account;
/** 姓名 */
- @ApiModelProperty(value = "姓名", position = 6)
+ @Schema(description = "姓名")
private String name;
/** 昵称 */
- @ApiModelProperty(value = "昵称", position = 7)
+ @Schema(description = "昵称")
private String nickname;
/** 性别 */
- @ApiModelProperty(value = "性别", position = 8)
+ @Schema(description = "性别")
private String gender;
/** 年龄 */
- @ApiModelProperty(value = "年龄", position = 9)
+ @Schema(description = "年龄")
private String age;
/** 出生日期 */
- @ApiModelProperty(value = "出生日期", position = 10)
+ @Schema(description = "出生日期")
private String birthday;
/** 民族 */
- @ApiModelProperty(value = "民族", position = 11)
+ @Schema(description = "民族")
private String nation;
/** 籍贯 */
- @ApiModelProperty(value = "籍贯", position = 12)
+ @Schema(description = "籍贯")
private String nativePlace;
/** 家庭住址 */
- @ApiModelProperty(value = "家庭住址", position = 13)
+ @Schema(description = "家庭住址")
private String homeAddress;
/** 通信地址 */
- @ApiModelProperty(value = "通信地址", position = 14)
+ @Schema(description = "通信地址")
private String mailingAddress;
/** 证件类型 */
- @ApiModelProperty(value = "证件类型", position = 15)
+ @Schema(description = "证件类型")
private String idCardType;
/** 证件号码 */
- @ApiModelProperty(value = "证件号码", position = 16)
+ @Schema(description = "证件号码")
private String idCardNumber;
/** 文化程度 */
- @ApiModelProperty(value = "文化程度", position = 17)
+ @Schema(description = "文化程度")
private String cultureLevel;
/** 政治面貌 */
- @ApiModelProperty(value = "政治面貌", position = 18)
+ @Schema(description = "政治面貌")
private String politicalOutlook;
/** 毕业院校 */
- @ApiModelProperty(value = "毕业院校", position = 19)
+ @Schema(description = "毕业院校")
private String college;
/** 学历 */
- @ApiModelProperty(value = "学历", position = 20)
+ @Schema(description = "学历")
private String education;
/** 学制 */
- @ApiModelProperty(value = "学制", position = 21)
+ @Schema(description = "学制")
private String eduLength;
/** 学位 */
- @ApiModelProperty(value = "学位", position = 22)
+ @Schema(description = "学位")
private String degree;
/** 手机 */
- @ApiModelProperty(value = "手机", position = 23)
+ @Schema(description = "手机")
private String phone;
/** 邮箱 */
- @ApiModelProperty(value = "邮箱", position = 24)
+ @Schema(description = "邮箱")
private String email;
/** 家庭电话 */
- @ApiModelProperty(value = "家庭电话", position = 25)
+ @Schema(description = "家庭电话")
private String homeTel;
/** 办公电话 */
- @ApiModelProperty(value = "办公电话", position = 26)
+ @Schema(description = "办公电话")
private String officeTel;
/** 紧急联系人 */
- @ApiModelProperty(value = "紧急联系人", position = 27)
+ @Schema(description = "紧急联系人")
private String emergencyContact;
/** 紧急联系人电话 */
- @ApiModelProperty(value = "紧急联系人电话", position = 28)
+ @Schema(description = "紧急联系人电话")
private String emergencyPhone;
/** 紧急联系人地址 */
- @ApiModelProperty(value = "紧急联系人地址", position = 29)
+ @Schema(description = "紧急联系人地址")
private String emergencyAddress;
/** 员工编号 */
- @ApiModelProperty(value = "员工编号", position = 30)
+ @Schema(description = "员工编号")
private String empNo;
/** 入职日期 */
- @ApiModelProperty(value = "入职日期", position = 31)
+ @Schema(description = "入职日期")
private String entryDate;
/** 组织id */
- @ApiModelProperty(value = "组织id", position = 32)
+ @Schema(description = "组织id")
private String orgId;
/** 组织名称 */
- @ApiModelProperty(value = "组织名称", position = 33)
+ @Schema(description = "组织名称")
private String orgName;
/** 职位id */
- @ApiModelProperty(value = "职位id", position = 34)
+ @Schema(description = "职位id")
private String positionId;
/** 职位名称 */
- @ApiModelProperty(value = "职位名称", position = 35)
+ @Schema(description = "职位名称")
private String positionName;
/** 职级 */
- @ApiModelProperty(value = "职级", position = 36)
+ @Schema(description = "职级")
private String positionLevel;
/** 主管id */
- @ApiModelProperty(value = "主管id", position = 37)
+ @Schema(description = "主管id")
private String directorId;
/** 兼任信息 */
- @ApiModelProperty(value = "兼任信息", position = 38)
+ @Schema(description = "兼任信息")
private String positionJson;
/** 上次登录ip */
- @ApiModelProperty(value = "上次登录ip", position = 39)
+ @Schema(description = "上次登录ip")
private String lastLoginIp;
/** 上次登录地点 */
- @ApiModelProperty(value = "上次登录地点", position = 40)
+ @Schema(description = "上次登录地点")
private String lastLoginAddress;
/** 上次登录时间 */
- @ApiModelProperty(value = "上次登录时间", position = 41)
+ @Schema(description = "上次登录时间")
private Date lastLoginTime;
/** 上次登录设备 */
- @ApiModelProperty(value = "上次登录设备", position = 42)
+ @Schema(description = "上次登录设备")
private String lastLoginDevice;
/** 最新登录ip */
- @ApiModelProperty(value = "最新登录ip", position = 43)
+ @Schema(description = "最新登录ip")
private String latestLoginIp;
/** 最新登录地点 */
- @ApiModelProperty(value = "最新登录地点", position = 44)
+ @Schema(description = "最新登录地点")
private String latestLoginAddress;
/** 最新登录时间 */
- @ApiModelProperty(value = "最新登录时间", position = 45)
+ @Schema(description = "最新登录时间")
private Date latestLoginTime;
/** 最新登录设备 */
- @ApiModelProperty(value = "最新登录设备", position = 46)
+ @Schema(description = "最新登录设备")
private String latestLoginDevice;
/** 用户状态 */
- @ApiModelProperty(value = "用户状态", position = 47)
+ @Schema(description = "用户状态")
private String userStatus;
/** 排序码 */
- @ApiModelProperty(value = "排序码", position = 48)
+ @Schema(description = "排序码")
private Integer sortCode;
/** 扩展信息 */
- @ApiModelProperty(value = "扩展信息", position = 49)
+ @Schema(description = "扩展信息")
private String extJson;
/** 按钮码集合 */
- @ApiModelProperty(value = "按钮码集合", position = 50)
+ @Schema(description = "按钮码集合")
private List buttonCodeList;
/** 移动端按钮码集合 */
- @ApiModelProperty(value = "移动端按钮码集合", position = 51)
+ @Schema(description = "移动端按钮码集合")
private List mobileButtonCodeList;
/** 权限码集合 */
- @ApiModelProperty(value = "权限码集合", position = 52, hidden = true)
+ @Schema(description = "权限码集合", hidden = true)
private List permissionCodeList;
/** 角色码集合 */
- @ApiModelProperty(value = "角色码集合", position = 53, hidden = true)
+ @Schema(description = "角色码集合", hidden = true)
private List roleCodeList;
/** 数据范围集合 */
- @ApiModelProperty(value = "数据范围集合", position = 54, hidden = true)
+ @Schema(description = "数据范围集合", hidden = true)
private List dataScopeList;
/** 用户密码hash值 */
@JsonIgnore
- @ApiModelProperty(value = "用户密码hash值", position = 55)
+ @Schema(description = "用户密码hash值")
private String password;
/** 是否可登录,由继承类实现 */
@@ -261,11 +261,11 @@ public abstract class SaBaseLoginUser {
public static class DataScope {
/** API接口 */
- @ApiModelProperty(value = "API接口", position = 1)
+ @Schema(description = "API接口")
private String apiUrl;
/** 数据范围 */
- @ApiModelProperty(value = "数据范围", position = 2)
+ @Schema(description = "数据范围")
private List dataScope;
}
}
diff --git a/snowy-plugin-api/snowy-plugin-auth-api/src/main/java/vip/xiaonuo/auth/core/util/StpClientUtil.java b/snowy-plugin-api/snowy-plugin-auth-api/src/main/java/vip/xiaonuo/auth/core/util/StpClientUtil.java
index a894503a..22dc2e89 100644
--- a/snowy-plugin-api/snowy-plugin-auth-api/src/main/java/vip/xiaonuo/auth/core/util/StpClientUtil.java
+++ b/snowy-plugin-api/snowy-plugin-auth-api/src/main/java/vip/xiaonuo/auth/core/util/StpClientUtil.java
@@ -418,17 +418,17 @@ public class StpClientUtil {
/**
* 检查当前token 是否已经[临时过期],如果已经过期则抛出异常
*/
- public static void checkActivityTimeout() {
- stpLogic.checkActivityTimeout();
+ public static void checkActiveTimeout() {
+ stpLogic.checkActiveTimeout();
}
/**
* 续签当前token:(将 [最后操作时间] 更新为当前时间戳)
* 请注意: 即时token已经 [临时过期] 也可续签成功,
- * 如果此场景下需要提示续签失败,可在此之前调用 checkActivityTimeout() 强制检查是否过期即可
+ * 如果此场景下需要提示续签失败,可在此之前调用 checkActiveTimeout() 强制检查是否过期即可
*/
- public static void updateLastActivityToNow() {
- stpLogic.updateLastActivityToNow();
+ public static void updateLastActiveToNow() {
+ stpLogic.updateLastActiveToNow();
}
@@ -462,8 +462,8 @@ public class StpClientUtil {
* 获取当前 token [临时过期] 剩余有效时间 (单位: 秒)
* @return token [临时过期] 剩余有效时间
*/
- public static long getTokenActivityTimeout() {
- return stpLogic.getTokenActivityTimeout();
+ public static long getTokenActiveTimeout() {
+ return stpLogic.getTokenActiveTimeout();
}
/**
diff --git a/snowy-plugin-api/snowy-plugin-biz-api/pom.xml b/snowy-plugin-api/snowy-plugin-biz-api/pom.xml
index c1000001..4ceb6ee6 100644
--- a/snowy-plugin-api/snowy-plugin-biz-api/pom.xml
+++ b/snowy-plugin-api/snowy-plugin-biz-api/pom.xml
@@ -7,7 +7,7 @@
vip.xiaonuo
snowy-plugin-api
- 2.0.0
+ 3.0.0
snowy-plugin-biz-api
diff --git a/snowy-plugin-api/snowy-plugin-client-api/pom.xml b/snowy-plugin-api/snowy-plugin-client-api/pom.xml
index 8cec38a6..5a227bb8 100644
--- a/snowy-plugin-api/snowy-plugin-client-api/pom.xml
+++ b/snowy-plugin-api/snowy-plugin-client-api/pom.xml
@@ -7,7 +7,7 @@
vip.xiaonuo
snowy-plugin-api
- 2.0.0
+ 3.0.0
snowy-plugin-client-api
diff --git a/snowy-plugin-api/snowy-plugin-dev-api/pom.xml b/snowy-plugin-api/snowy-plugin-dev-api/pom.xml
index b032dac0..5a074e78 100644
--- a/snowy-plugin-api/snowy-plugin-dev-api/pom.xml
+++ b/snowy-plugin-api/snowy-plugin-dev-api/pom.xml
@@ -7,7 +7,7 @@
vip.xiaonuo
snowy-plugin-api
- 2.0.0
+ 3.0.0
snowy-plugin-dev-api
@@ -21,84 +21,66 @@
snowy-common
-
+
+
+ org.dromara.x-file-storage
+ x-file-storage-spring
+
+
+
com.qcloud
cos_api
-
-
- tencentcloud-sdk-java-common
- com.tencentcloudapi
-
-
-
+
com.aliyun.oss
aliyun-sdk-oss
-
-
- org.codehaus.jettison
- jettison
-
-
-
-
- org.codehaus.jettison
- jettison
-
-
-
+
io.minio
minio
-
+
com.sun.mail
- javax.mail
+ jakarta.mail
-
+
com.aliyun
- aliyun-java-sdk-dm
+ dm20151123
-
+
com.tencentcloudapi
tencentcloud-sdk-java-ses
-
-
- okio-jvm
- com.squareup.okio
-
-
-
+
com.aliyun
dysmsapi20170525
-
-
- org.jacoco.agent
- org.jacoco
-
-
-
+
com.tencentcloudapi
tencentcloud-sdk-java-sms
+
+
+ org.dromara.sms4j
+ sms4j-javase-plugin
+
+
com.github.oshi
diff --git a/snowy-plugin-api/snowy-plugin-dev-api/src/main/java/vip/xiaonuo/dev/api/DevSmsApi.java b/snowy-plugin-api/snowy-plugin-dev-api/src/main/java/vip/xiaonuo/dev/api/DevSmsApi.java
index 29c22a0d..127068fb 100644
--- a/snowy-plugin-api/snowy-plugin-dev-api/src/main/java/vip/xiaonuo/dev/api/DevSmsApi.java
+++ b/snowy-plugin-api/snowy-plugin-dev-api/src/main/java/vip/xiaonuo/dev/api/DevSmsApi.java
@@ -20,14 +20,14 @@ package vip.xiaonuo.dev.api;
**/
public interface DevSmsApi {
- /* =========阿里云邮件========= */
+ /* =========阿里云短信========= */
/**
* 发送短信
*
* @param phoneNumbers 手机号码,支持对多个手机号码发送短信,手机号码之间以半角逗号(,)分隔。
* 上限为1000个手机号码。批量调用相对于单条调用及时性稍有延迟。
- * @param signName 短信服务控制台配置且审核通过的短信签名
+ * @param signName 短信服务控制台配置且审核通过的短信签名,为空则使用默认签名
* @param templateCode 短信服务控制台配置且审核通过的模板编码
* @param templateParam 短信模板变量对应的实际值,JSON格式。支持传入多个参数,示例:{"name":"张三","number":"15038****76"}
* @author xuyuxiang
@@ -35,7 +35,7 @@ public interface DevSmsApi {
**/
void sendSmsAliyun(String phoneNumbers, String signName, String templateCode, String templateParam);
- /* =========腾讯云邮件========= */
+ /* =========腾讯云短信========= */
/**
* 发送短信
@@ -44,11 +44,24 @@ public interface DevSmsApi {
* 可前往 [短信控制台](https://console.cloud.tencent.com/smsv2/app-manage) 查看
* @param phoneNumbers 手机号码,支持对多个手机号码发送短信,手机号码之间以半角逗号(,)分隔。
* 上限为1000个手机号码。批量调用相对于单条调用及时性稍有延迟。
- * @param signName 短信服务控制台配置且审核通过的短信签名
+ * @param signName 短信服务控制台配置且审核通过的短信签名,为空则使用默认签名
* @param templateCode 短信服务控制台配置且审核通过的模板编码
* @param templateParam 短信模板变量对应的顺序。支持传入多个参数,逗号拼接,示例:"张三,15038****76,进行中"}
* @author xuyuxiang
* @date 2022/2/24 13:42
**/
void sendSmsTencent(String sdkAppId, String phoneNumbers, String signName, String templateCode, String templateParam);
+
+ /* =========小诺短信========= */
+
+ /**
+ * 发送短信
+ *
+ * @param phoneNumbers 手机号码,支持对多个手机号码发送短信,手机号码之间以半角逗号(,)分隔。
+ * @param signName 短信签名,为空则使用默认签名
+ * @param message 短信内容
+ * @author xuyuxiang
+ * @date 2022/2/24 13:42
+ **/
+ void sendSmsXiaonuo(String phoneNumbers, String signName, String templateCode, String message);
}
diff --git a/snowy-plugin-api/snowy-plugin-dev-api/src/main/java/vip/xiaonuo/dev/api/DevSseApi.java b/snowy-plugin-api/snowy-plugin-dev-api/src/main/java/vip/xiaonuo/dev/api/DevSseApi.java
index 9b3ee312..29b6febc 100644
--- a/snowy-plugin-api/snowy-plugin-dev-api/src/main/java/vip/xiaonuo/dev/api/DevSseApi.java
+++ b/snowy-plugin-api/snowy-plugin-dev-api/src/main/java/vip/xiaonuo/dev/api/DevSseApi.java
@@ -14,6 +14,7 @@ package vip.xiaonuo.dev.api;
import org.springframework.web.servlet.mvc.method.annotation.SseEmitter;
import vip.xiaonuo.common.sse.CommonSseParam;
+
import java.util.function.Consumer;
/**
diff --git a/snowy-plugin-api/snowy-plugin-gen-api/pom.xml b/snowy-plugin-api/snowy-plugin-gen-api/pom.xml
index c38694d8..32fb90c3 100644
--- a/snowy-plugin-api/snowy-plugin-gen-api/pom.xml
+++ b/snowy-plugin-api/snowy-plugin-gen-api/pom.xml
@@ -7,7 +7,7 @@
vip.xiaonuo
snowy-plugin-api
- 2.0.0
+ 3.0.0
snowy-plugin-gen-api
diff --git a/snowy-plugin-api/snowy-plugin-mobile-api/pom.xml b/snowy-plugin-api/snowy-plugin-mobile-api/pom.xml
index 5f5b17d7..efb76f97 100644
--- a/snowy-plugin-api/snowy-plugin-mobile-api/pom.xml
+++ b/snowy-plugin-api/snowy-plugin-mobile-api/pom.xml
@@ -7,7 +7,7 @@
vip.xiaonuo
snowy-plugin-api
- 2.0.0
+ 3.0.0
snowy-plugin-mobile-api
diff --git a/snowy-plugin-api/snowy-plugin-mobile-api/src/main/java/vip/xiaonuo/mobile/api/MobileModuleApi.java b/snowy-plugin-api/snowy-plugin-mobile-api/src/main/java/vip/xiaonuo/mobile/api/MobileModuleApi.java
index 47873fa9..f166323a 100644
--- a/snowy-plugin-api/snowy-plugin-mobile-api/src/main/java/vip/xiaonuo/mobile/api/MobileModuleApi.java
+++ b/snowy-plugin-api/snowy-plugin-mobile-api/src/main/java/vip/xiaonuo/mobile/api/MobileModuleApi.java
@@ -13,6 +13,7 @@
package vip.xiaonuo.mobile.api;
import cn.hutool.json.JSONObject;
+
import java.util.List;
/**
diff --git a/snowy-plugin-api/snowy-plugin-sys-api/pom.xml b/snowy-plugin-api/snowy-plugin-sys-api/pom.xml
index 63d277c6..f3b5e67e 100644
--- a/snowy-plugin-api/snowy-plugin-sys-api/pom.xml
+++ b/snowy-plugin-api/snowy-plugin-sys-api/pom.xml
@@ -7,7 +7,7 @@
vip.xiaonuo
snowy-plugin-api
- 2.0.0
+ 3.0.0
snowy-plugin-sys-api
diff --git a/snowy-plugin-api/snowy-plugin-sys-api/src/main/java/vip/xiaonuo/sys/api/SysPositionApi.java b/snowy-plugin-api/snowy-plugin-sys-api/src/main/java/vip/xiaonuo/sys/api/SysPositionApi.java
index 9be0875e..e4fea209 100644
--- a/snowy-plugin-api/snowy-plugin-sys-api/src/main/java/vip/xiaonuo/sys/api/SysPositionApi.java
+++ b/snowy-plugin-api/snowy-plugin-sys-api/src/main/java/vip/xiaonuo/sys/api/SysPositionApi.java
@@ -15,8 +15,6 @@ package vip.xiaonuo.sys.api;
import cn.hutool.json.JSONObject;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
-import java.util.List;
-
/**
* 职位API
*
diff --git a/snowy-plugin/pom.xml b/snowy-plugin/pom.xml
index 71f77a38..58c38603 100644
--- a/snowy-plugin/pom.xml
+++ b/snowy-plugin/pom.xml
@@ -7,7 +7,7 @@
vip.xiaonuo
snowy
- 2.0.0
+ 3.0.0
snowy-plugin
diff --git a/snowy-plugin/snowy-plugin-auth/pom.xml b/snowy-plugin/snowy-plugin-auth/pom.xml
index 4fc0cf01..22970636 100644
--- a/snowy-plugin/snowy-plugin-auth/pom.xml
+++ b/snowy-plugin/snowy-plugin-auth/pom.xml
@@ -7,7 +7,7 @@
vip.xiaonuo
snowy-plugin
- 2.0.0
+ 3.0.0
snowy-plugin-auth
@@ -31,13 +31,13 @@
cn.dev33
- sa-token-spring-boot-starter
+ sa-token-spring-boot3-starter
cn.dev33
- sa-token-dao-redis-jackson
+ sa-token-redis-jackson
diff --git a/snowy-plugin/snowy-plugin-auth/src/main/java/vip/xiaonuo/auth/core/config/AuthConfigure.java b/snowy-plugin/snowy-plugin-auth/src/main/java/vip/xiaonuo/auth/core/config/AuthConfigure.java
index 1202a148..1f471153 100644
--- a/snowy-plugin/snowy-plugin-auth/src/main/java/vip/xiaonuo/auth/core/config/AuthConfigure.java
+++ b/snowy-plugin/snowy-plugin-auth/src/main/java/vip/xiaonuo/auth/core/config/AuthConfigure.java
@@ -12,31 +12,23 @@
*/
package vip.xiaonuo.auth.core.config;
+import cn.dev33.satoken.config.SaTokenConfig;
import cn.dev33.satoken.interceptor.SaInterceptor;
import cn.dev33.satoken.stp.StpInterface;
import cn.dev33.satoken.stp.StpLogic;
import cn.dev33.satoken.strategy.SaStrategy;
-import com.github.xiaoymin.knife4j.spring.extension.OpenApiExtensionResolver;
-import io.swagger.annotations.ApiOperation;
+import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
+import org.springframework.context.annotation.Primary;
import org.springframework.core.annotation.AnnotatedElementUtils;
import org.springframework.stereotype.Component;
-import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.servlet.config.annotation.InterceptorRegistry;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;
-import springfox.documentation.builders.ApiInfoBuilder;
-import springfox.documentation.builders.PathSelectors;
-import springfox.documentation.builders.RequestHandlerSelectors;
-import springfox.documentation.service.Contact;
-import springfox.documentation.spi.DocumentationType;
-import springfox.documentation.spring.web.plugins.Docket;
import vip.xiaonuo.auth.core.enums.SaClientTypeEnum;
import vip.xiaonuo.auth.core.util.StpClientLoginUserUtil;
import vip.xiaonuo.auth.core.util.StpLoginUserUtil;
-import vip.xiaonuo.common.pojo.CommonResult;
-import javax.annotation.Resource;
import java.util.List;
/**
@@ -48,9 +40,6 @@ import java.util.List;
@Configuration
public class AuthConfigure implements WebMvcConfigurer {
- @Resource
- private OpenApiExtensionResolver openApiExtensionResolver;
-
/**
* 注册Sa-Token的注解拦截器,打开注解式鉴权功能
*
@@ -69,19 +58,20 @@ public class AuthConfigure implements WebMvcConfigurer {
registry.addInterceptor(new SaInterceptor()).addPathPatterns("/**");
}
+ @Primary
@Bean("stpLogic")
- public StpLogic getStpLogic() {
+ public StpLogic getStpLogic(SaTokenConfig saTokenConfig) {
// 重写Sa-Token的StpLogic,默认客户端类型为B
- return new StpLogic(SaClientTypeEnum.B.getValue());
+ return new StpLogic(SaClientTypeEnum.B.getValue()).setConfig(saTokenConfig);
}
@Bean("stpClientLogic")
- public StpLogic getStpClientLogic() {
+ public StpLogic getStpClientLogic(SaTokenConfig saTokenConfig) {
// 重写Sa-Token的StpLogic,默认客户端类型为C
- return new StpLogic(SaClientTypeEnum.C.getValue());
+ return new StpLogic(SaClientTypeEnum.C.getValue()).setConfig(saTokenConfig);
}
- @Bean
+ @Autowired
public void rewriteSaStrategy() {
// 重写Sa-Token的注解处理器,增加注解合并功能
SaStrategy.me.getAnnotation = AnnotatedElementUtils::getMergedAnnotation;
@@ -120,30 +110,4 @@ public class AuthConfigure implements WebMvcConfigurer {
}
}
}
-
- /**
- * API文档分组配置
- *
- * @author xuyuxiang
- * @date 2022/7/7 16:18
- **/
- @Bean(value = "authDocApi")
- public Docket authDocApi() {
- return new Docket(DocumentationType.SWAGGER_2)
- .apiInfo(new ApiInfoBuilder()
- .title("登录鉴权AUTH")
- .description("登录鉴权AUTH")
- .termsOfServiceUrl("https://www.xiaonuo.vip")
- .contact(new Contact("SNOWY_TEAM","https://www.xiaonuo.vip", "xuyuxiang29@foxmail.com"))
- .version("2.0.0")
- .build())
- .globalResponseMessage(RequestMethod.GET, CommonResult.responseList())
- .globalResponseMessage(RequestMethod.POST, CommonResult.responseList())
- .groupName("登录鉴权AUTH")
- .select()
- .apis(RequestHandlerSelectors.withMethodAnnotation(ApiOperation.class))
- .apis(RequestHandlerSelectors.basePackage("vip.xiaonuo.auth"))
- .paths(PathSelectors.any())
- .build().extensions(openApiExtensionResolver.buildExtensions("登录鉴权AUTH"));
- }
}
diff --git a/snowy-plugin/snowy-plugin-auth/src/main/java/vip/xiaonuo/auth/core/util/AuthExceptionUtil.java b/snowy-plugin/snowy-plugin-auth/src/main/java/vip/xiaonuo/auth/core/util/AuthExceptionUtil.java
index 267f7503..0358ab88 100644
--- a/snowy-plugin/snowy-plugin-auth/src/main/java/vip/xiaonuo/auth/core/util/AuthExceptionUtil.java
+++ b/snowy-plugin/snowy-plugin-auth/src/main/java/vip/xiaonuo/auth/core/util/AuthExceptionUtil.java
@@ -12,7 +12,6 @@
*/
package vip.xiaonuo.auth.core.util;
-import cn.dev33.satoken.context.SaHolder;
import cn.dev33.satoken.exception.*;
import cn.hutool.http.HttpStatus;
import lombok.extern.slf4j.Slf4j;
diff --git a/snowy-plugin/snowy-plugin-auth/src/main/java/vip/xiaonuo/auth/modular/login/controller/AuthClientController.java b/snowy-plugin/snowy-plugin-auth/src/main/java/vip/xiaonuo/auth/modular/login/controller/AuthClientController.java
index 914dc1ae..de4ea207 100644
--- a/snowy-plugin/snowy-plugin-auth/src/main/java/vip/xiaonuo/auth/modular/login/controller/AuthClientController.java
+++ b/snowy-plugin/snowy-plugin-auth/src/main/java/vip/xiaonuo/auth/modular/login/controller/AuthClientController.java
@@ -12,10 +12,10 @@
*/
package vip.xiaonuo.auth.modular.login.controller;
-import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport;
-import com.github.xiaoymin.knife4j.annotations.ApiSupport;
-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.annotation.Resource;
+import jakarta.validation.Valid;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
@@ -32,17 +32,13 @@ import vip.xiaonuo.auth.modular.login.result.AuthPicValidCodeResult;
import vip.xiaonuo.auth.modular.login.service.AuthService;
import vip.xiaonuo.common.pojo.CommonResult;
-import javax.annotation.Resource;
-import javax.validation.Valid;
-
/**
* C端登录控制器
*
* @author xuyuxiang
* @date 2021/12/23 21:50
*/
-@Api(tags = "C端登录控制器")
-@ApiSupport(author = "SNOWY_TEAM", order = 1)
+@Tag(name = "C端登录控制器")
@RestController
@Validated
public class AuthClientController {
@@ -56,8 +52,7 @@ public class AuthClientController {
* @author xuyuxiang
* @date 2022/7/8 9:26
**/
- @ApiOperationSupport(order = 1)
- @ApiOperation("C端获取图片验证码")
+ @Operation(summary = "C端获取图片验证码")
@GetMapping("/auth/c/getPicCaptcha")
public CommonResult getPicCaptcha() {
return CommonResult.data(authService.getPicCaptcha(SaClientTypeEnum.C.getValue()));
@@ -69,8 +64,7 @@ public class AuthClientController {
* @author xuyuxiang
* @date 2022/7/8 9:26
**/
- @ApiOperationSupport(order = 2)
- @ApiOperation("C端获取手机验证码")
+ @Operation(summary = "C端获取手机验证码")
@GetMapping("/auth/c/getPhoneValidCode")
public CommonResult getPhoneValidCode(@Valid AuthGetPhoneValidCodeParam authGetPhoneValidCodeParam) {
return CommonResult.data(authService.getPhoneValidCode(authGetPhoneValidCodeParam, SaClientTypeEnum.C.getValue()));
@@ -82,8 +76,7 @@ public class AuthClientController {
* @author xuyuxiang
* @date 2021/10/15 13:12
**/
- @ApiOperationSupport(order = 3)
- @ApiOperation("C端账号密码登录")
+ @Operation(summary = "C端账号密码登录")
@PostMapping("/auth/c/doLogin")
public CommonResult doLogin(@RequestBody @Valid AuthAccountPasswordLoginParam authAccountPasswordLoginParam) {
return CommonResult.data(authService.doLogin(authAccountPasswordLoginParam, SaClientTypeEnum.C.getValue()));
@@ -95,8 +88,7 @@ public class AuthClientController {
* @author xuyuxiang
* @date 2021/10/15 13:12
**/
- @ApiOperationSupport(order = 4)
- @ApiOperation("C端手机验证码登录")
+ @Operation(summary = "C端手机验证码登录")
@PostMapping("/auth/c/doLoginByPhone")
public CommonResult doLoginByPhone(@RequestBody @Valid AuthPhoneValidCodeLoginParam authPhoneValidCodeLoginParam) {
return CommonResult.data(authService.doLoginByPhone(authPhoneValidCodeLoginParam, SaClientTypeEnum.C.getValue()));
@@ -108,8 +100,7 @@ public class AuthClientController {
* @author xuyuxiang
* @date 2021/10/15 13:12
**/
- @ApiOperationSupport(order = 5)
- @ApiOperation("C端退出")
+ @Operation(summary = "C端退出")
@SaClientCheckLogin
@GetMapping("/auth/c/doLogout")
public CommonResult doLogout() {
@@ -123,8 +114,7 @@ public class AuthClientController {
* @author xuyuxiang
* @date 2021/10/15 13:12
**/
- @ApiOperationSupport(order = 6)
- @ApiOperation("C端获取用户信息")
+ @Operation(summary = "C端获取用户信息")
@SaClientCheckLogin
@GetMapping("/auth/c/getLoginUser")
public CommonResult getLoginUser() {
diff --git a/snowy-plugin/snowy-plugin-auth/src/main/java/vip/xiaonuo/auth/modular/login/controller/AuthController.java b/snowy-plugin/snowy-plugin-auth/src/main/java/vip/xiaonuo/auth/modular/login/controller/AuthController.java
index f7d6be62..9802812b 100644
--- a/snowy-plugin/snowy-plugin-auth/src/main/java/vip/xiaonuo/auth/modular/login/controller/AuthController.java
+++ b/snowy-plugin/snowy-plugin-auth/src/main/java/vip/xiaonuo/auth/modular/login/controller/AuthController.java
@@ -14,10 +14,10 @@ package vip.xiaonuo.auth.modular.login.controller;
import cn.dev33.satoken.annotation.SaCheckLogin;
import cn.dev33.satoken.stp.StpUtil;
-import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport;
-import com.github.xiaoymin.knife4j.annotations.ApiSupport;
-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.annotation.Resource;
+import jakarta.validation.Valid;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
@@ -32,17 +32,13 @@ import vip.xiaonuo.auth.modular.login.result.AuthPicValidCodeResult;
import vip.xiaonuo.auth.modular.login.service.AuthService;
import vip.xiaonuo.common.pojo.CommonResult;
-import javax.annotation.Resource;
-import javax.validation.Valid;
-
/**
* B端登录控制器
*
* @author xuyuxiang
* @date 2021/12/23 21:50
*/
-@Api(tags = "B端登录控制器")
-@ApiSupport(author = "SNOWY_TEAM", order = 2)
+@Tag(name = "B端登录控制器")
@RestController
@Validated
public class AuthController {
@@ -56,8 +52,7 @@ public class AuthController {
* @author xuyuxiang
* @date 2022/7/8 9:26
**/
- @ApiOperationSupport(order = 1)
- @ApiOperation("B端获取图片验证码")
+ @Operation(summary = "B端获取图片验证码")
@GetMapping("/auth/b/getPicCaptcha")
public CommonResult getPicCaptcha() {
return CommonResult.data(authService.getPicCaptcha(SaClientTypeEnum.B.getValue()));
@@ -69,8 +64,7 @@ public class AuthController {
* @author xuyuxiang
* @date 2022/7/8 9:26
**/
- @ApiOperationSupport(order = 2)
- @ApiOperation("B端获取手机验证码")
+ @Operation(summary = "B端获取手机验证码")
@GetMapping("/auth/b/getPhoneValidCode")
public CommonResult getPhoneValidCode(@Valid AuthGetPhoneValidCodeParam authGetPhoneValidCodeParam) {
return CommonResult.data(authService.getPhoneValidCode(authGetPhoneValidCodeParam, SaClientTypeEnum.B.getValue()));
@@ -82,8 +76,7 @@ public class AuthController {
* @author xuyuxiang
* @date 2021/10/15 13:12
**/
- @ApiOperationSupport(order = 3)
- @ApiOperation("B端账号密码登录")
+ @Operation(summary = "B端账号密码登录")
@PostMapping("/auth/b/doLogin")
public CommonResult doLogin(@RequestBody @Valid AuthAccountPasswordLoginParam authAccountPasswordLoginParam) {
return CommonResult.data(authService.doLogin(authAccountPasswordLoginParam, SaClientTypeEnum.B.getValue()));
@@ -95,8 +88,7 @@ public class AuthController {
* @author xuyuxiang
* @date 2021/10/15 13:12
**/
- @ApiOperationSupport(order = 4)
- @ApiOperation("B端手机验证码登录")
+ @Operation(summary = "B端手机验证码登录")
@PostMapping("/auth/b/doLoginByPhone")
public CommonResult doLoginByPhone(@RequestBody @Valid AuthPhoneValidCodeLoginParam authPhoneValidCodeLoginParam) {
return CommonResult.data(authService.doLoginByPhone(authPhoneValidCodeLoginParam, SaClientTypeEnum.B.getValue()));
@@ -108,8 +100,7 @@ public class AuthController {
* @author xuyuxiang
* @date 2021/10/15 13:12
**/
- @ApiOperationSupport(order = 5)
- @ApiOperation("B端退出")
+ @Operation(summary = "B端退出")
@SaCheckLogin
@GetMapping("/auth/b/doLogout")
public CommonResult doLogout() {
@@ -123,8 +114,7 @@ public class AuthController {
* @author xuyuxiang
* @date 2021/10/15 13:12
**/
- @ApiOperationSupport(order = 6)
- @ApiOperation("B端获取用户信息")
+ @Operation(summary = "B端获取用户信息")
@SaCheckLogin
@GetMapping("/auth/b/getLoginUser")
public CommonResult getLoginUser() {
diff --git a/snowy-plugin/snowy-plugin-auth/src/main/java/vip/xiaonuo/auth/modular/login/listener/AuthListener.java b/snowy-plugin/snowy-plugin-auth/src/main/java/vip/xiaonuo/auth/modular/login/listener/AuthListener.java
index 8111b1f3..c5a15827 100644
--- a/snowy-plugin/snowy-plugin-auth/src/main/java/vip/xiaonuo/auth/modular/login/listener/AuthListener.java
+++ b/snowy-plugin/snowy-plugin-auth/src/main/java/vip/xiaonuo/auth/modular/login/listener/AuthListener.java
@@ -16,14 +16,13 @@ import cn.dev33.satoken.listener.SaTokenListener;
import cn.dev33.satoken.stp.SaLoginModel;
import cn.hutool.core.convert.Convert;
import cn.hutool.core.util.ObjectUtil;
+import jakarta.annotation.Resource;
import org.springframework.stereotype.Component;
import vip.xiaonuo.auth.api.SaBaseLoginUserApi;
import vip.xiaonuo.auth.core.enums.SaClientTypeEnum;
import vip.xiaonuo.auth.core.pojo.SaBaseLoginUser;
import vip.xiaonuo.dev.api.DevLogApi;
-import javax.annotation.Resource;
-
/**
* 自定义登录监听器
*
@@ -98,6 +97,18 @@ public class AuthListener implements SaTokenListener {
// ...
}
+ /** 每次打开二级认证时触发 */
+ @Override
+ public void doOpenSafe(String loginType, String tokenValue, String service, long safeTime) {
+ // ...
+ }
+
+ /** 每次关闭二级认证时触发 */
+ @Override
+ public void doCloseSafe(String loginType, String tokenValue, String service) {
+ // ...
+ }
+
/** 每次创建Session时触发 */
@Override
public void doCreateSession(String id) {
diff --git a/snowy-plugin/snowy-plugin-auth/src/main/java/vip/xiaonuo/auth/modular/login/param/AuthAccountPasswordLoginParam.java b/snowy-plugin/snowy-plugin-auth/src/main/java/vip/xiaonuo/auth/modular/login/param/AuthAccountPasswordLoginParam.java
index 8a486f9d..f5e50273 100644
--- a/snowy-plugin/snowy-plugin-auth/src/main/java/vip/xiaonuo/auth/modular/login/param/AuthAccountPasswordLoginParam.java
+++ b/snowy-plugin/snowy-plugin-auth/src/main/java/vip/xiaonuo/auth/modular/login/param/AuthAccountPasswordLoginParam.java
@@ -12,12 +12,11 @@
*/
package vip.xiaonuo.auth.modular.login.param;
-import io.swagger.annotations.ApiModelProperty;
+import io.swagger.v3.oas.annotations.media.Schema;
+import jakarta.validation.constraints.NotBlank;
import lombok.Getter;
import lombok.Setter;
-import javax.validation.constraints.NotBlank;
-
/**
* 账号密码登录参数
*
@@ -29,24 +28,24 @@ import javax.validation.constraints.NotBlank;
public class AuthAccountPasswordLoginParam {
/** 账号 */
- @ApiModelProperty(value = "账号", required = true, position = 1)
+ @Schema(description = "账号", requiredMode = Schema.RequiredMode.REQUIRED)
@NotBlank(message = "账号不能为空")
private String account;
/** 密码 */
- @ApiModelProperty(value = "密码", required = true, position = 2)
+ @Schema(description = "密码", requiredMode = Schema.RequiredMode.REQUIRED)
@NotBlank(message = "密码不能为空")
private String password;
/** 设备 */
- @ApiModelProperty(value = "设备", position = 3)
+ @Schema(description = "设备")
private String device;
/** 验证码 */
- @ApiModelProperty(value = "验证码", position = 4)
+ @Schema(description = "验证码")
private String validCode;
/** 验证码请求号 */
- @ApiModelProperty(value = "验证码请求号", position = 5)
+ @Schema(description = "验证码请求号")
private String validCodeReqNo;
}
diff --git a/snowy-plugin/snowy-plugin-auth/src/main/java/vip/xiaonuo/auth/modular/login/param/AuthGetPhoneValidCodeParam.java b/snowy-plugin/snowy-plugin-auth/src/main/java/vip/xiaonuo/auth/modular/login/param/AuthGetPhoneValidCodeParam.java
index d1dab9ae..9bc12811 100644
--- a/snowy-plugin/snowy-plugin-auth/src/main/java/vip/xiaonuo/auth/modular/login/param/AuthGetPhoneValidCodeParam.java
+++ b/snowy-plugin/snowy-plugin-auth/src/main/java/vip/xiaonuo/auth/modular/login/param/AuthGetPhoneValidCodeParam.java
@@ -12,12 +12,11 @@
*/
package vip.xiaonuo.auth.modular.login.param;
-import io.swagger.annotations.ApiModelProperty;
+import io.swagger.v3.oas.annotations.media.Schema;
+import jakarta.validation.constraints.NotBlank;
import lombok.Getter;
import lombok.Setter;
-import javax.validation.constraints.NotBlank;
-
/**
* 获取手机验证码参数
*
@@ -29,17 +28,17 @@ import javax.validation.constraints.NotBlank;
public class AuthGetPhoneValidCodeParam {
/** 手机号 */
- @ApiModelProperty(value = "手机号", required = true, position = 1)
+ @Schema(description = "手机号", requiredMode = Schema.RequiredMode.REQUIRED)
@NotBlank(message = "手机号不能为空")
private String phone;
/** 验证码 */
- @ApiModelProperty(value = "验证码", required = true, position = 2)
+ @Schema(description = "验证码", requiredMode = Schema.RequiredMode.REQUIRED)
@NotBlank(message = "验证码不能为空")
private String validCode;
/** 验证码请求号 */
- @ApiModelProperty(value = "验证码请求号", required = true, position = 3)
+ @Schema(description = "验证码请求号", requiredMode = Schema.RequiredMode.REQUIRED)
@NotBlank(message = "验证码请求号不能为空")
private String validCodeReqNo;
}
diff --git a/snowy-plugin/snowy-plugin-auth/src/main/java/vip/xiaonuo/auth/modular/login/param/AuthPhoneValidCodeLoginParam.java b/snowy-plugin/snowy-plugin-auth/src/main/java/vip/xiaonuo/auth/modular/login/param/AuthPhoneValidCodeLoginParam.java
index 51932974..88631b95 100644
--- a/snowy-plugin/snowy-plugin-auth/src/main/java/vip/xiaonuo/auth/modular/login/param/AuthPhoneValidCodeLoginParam.java
+++ b/snowy-plugin/snowy-plugin-auth/src/main/java/vip/xiaonuo/auth/modular/login/param/AuthPhoneValidCodeLoginParam.java
@@ -12,12 +12,11 @@
*/
package vip.xiaonuo.auth.modular.login.param;
-import io.swagger.annotations.ApiModelProperty;
+import io.swagger.v3.oas.annotations.media.Schema;
+import jakarta.validation.constraints.NotBlank;
import lombok.Getter;
import lombok.Setter;
-import javax.validation.constraints.NotBlank;
-
/**
* 手机验证码登录参数
*
@@ -29,21 +28,21 @@ import javax.validation.constraints.NotBlank;
public class AuthPhoneValidCodeLoginParam {
/** 手机号 */
- @ApiModelProperty(value = "手机号", required = true, position = 1)
+ @Schema(description = "手机号", requiredMode = Schema.RequiredMode.REQUIRED)
@NotBlank(message = "手机号不能为空")
private String phone;
/** 验证码 */
- @ApiModelProperty(value = "验证码", required = true, position = 2)
+ @Schema(description = "验证码", requiredMode = Schema.RequiredMode.REQUIRED)
@NotBlank(message = "验证码不能为空")
private String validCode;
/** 验证码请求号 */
- @ApiModelProperty(value = "验证码请求号", required = true, position = 3)
+ @Schema(description = "验证码请求号", requiredMode = Schema.RequiredMode.REQUIRED)
@NotBlank(message = "验证码请求号不能为空")
private String validCodeReqNo;
/** 设备 */
- @ApiModelProperty(value = "设备", position = 4)
+ @Schema(description = "设备")
private String device;
}
diff --git a/snowy-plugin/snowy-plugin-auth/src/main/java/vip/xiaonuo/auth/modular/login/result/AuthPicValidCodeResult.java b/snowy-plugin/snowy-plugin-auth/src/main/java/vip/xiaonuo/auth/modular/login/result/AuthPicValidCodeResult.java
index 28c917ef..c61995fe 100644
--- a/snowy-plugin/snowy-plugin-auth/src/main/java/vip/xiaonuo/auth/modular/login/result/AuthPicValidCodeResult.java
+++ b/snowy-plugin/snowy-plugin-auth/src/main/java/vip/xiaonuo/auth/modular/login/result/AuthPicValidCodeResult.java
@@ -12,7 +12,7 @@
*/
package vip.xiaonuo.auth.modular.login.result;
-import io.swagger.annotations.ApiModelProperty;
+import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Getter;
import lombok.Setter;
@@ -27,10 +27,10 @@ import lombok.Setter;
public class AuthPicValidCodeResult {
/** 验证码图片,Base64 */
- @ApiModelProperty(value = "验证码图片,Base64", position = 1)
+ @Schema(description = "验证码图片,Base64")
private String validCodeBase64;
/** 验证码请求号 */
- @ApiModelProperty(value = "验证码请求号", position = 2)
+ @Schema(description = "验证码请求号")
private String validCodeReqNo;
}
diff --git a/snowy-plugin/snowy-plugin-auth/src/main/java/vip/xiaonuo/auth/modular/login/service/impl/AuthServiceImpl.java b/snowy-plugin/snowy-plugin-auth/src/main/java/vip/xiaonuo/auth/modular/login/service/impl/AuthServiceImpl.java
index 2c09c5ea..3ec66704 100644
--- a/snowy-plugin/snowy-plugin-auth/src/main/java/vip/xiaonuo/auth/modular/login/service/impl/AuthServiceImpl.java
+++ b/snowy-plugin/snowy-plugin-auth/src/main/java/vip/xiaonuo/auth/modular/login/service/impl/AuthServiceImpl.java
@@ -24,6 +24,7 @@ import cn.hutool.core.util.RandomUtil;
import cn.hutool.core.util.StrUtil;
import cn.hutool.json.JSONObject;
import com.baomidou.mybatisplus.core.toolkit.IdWorker;
+import jakarta.annotation.Resource;
import org.springframework.stereotype.Service;
import vip.xiaonuo.auth.api.SaBaseLoginUserApi;
import vip.xiaonuo.auth.core.enums.SaClientTypeEnum;
@@ -46,7 +47,6 @@ import vip.xiaonuo.common.util.CommonEmailUtil;
import vip.xiaonuo.dev.api.DevConfigApi;
import vip.xiaonuo.dev.api.DevSmsApi;
-import javax.annotation.Resource;
import java.util.List;
import java.util.stream.Collectors;
diff --git a/snowy-plugin/snowy-plugin-auth/src/main/java/vip/xiaonuo/auth/modular/monitor/controller/AuthSessionController.java b/snowy-plugin/snowy-plugin-auth/src/main/java/vip/xiaonuo/auth/modular/monitor/controller/AuthSessionController.java
index f723ada9..8374e3d1 100644
--- a/snowy-plugin/snowy-plugin-auth/src/main/java/vip/xiaonuo/auth/modular/monitor/controller/AuthSessionController.java
+++ b/snowy-plugin/snowy-plugin-auth/src/main/java/vip/xiaonuo/auth/modular/monitor/controller/AuthSessionController.java
@@ -13,10 +13,11 @@
package vip.xiaonuo.auth.modular.monitor.controller;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
-import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport;
-import com.github.xiaoymin.knife4j.annotations.ApiSupport;
-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.annotation.Resource;
+import jakarta.validation.Valid;
+import jakarta.validation.constraints.NotEmpty;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
@@ -30,11 +31,8 @@ import vip.xiaonuo.auth.modular.monitor.result.AuthSessionPageResult;
import vip.xiaonuo.auth.modular.monitor.service.AuthSessionService;
import vip.xiaonuo.common.annotation.CommonLog;
import vip.xiaonuo.common.pojo.CommonResult;
-import vip.xiaonuo.common.pojo.CommonValidList;
-import javax.annotation.Resource;
-import javax.validation.Valid;
-import javax.validation.constraints.NotEmpty;
+import java.util.List;
/**
* 会话治理控制器
@@ -42,8 +40,7 @@ import javax.validation.constraints.NotEmpty;
* @author xuyuxiang
* @date 2022/6/24 15:20
**/
-@Api(tags = "会话治理控制器")
-@ApiSupport(author = "SNOWY_TEAM", order = 3)
+@Tag(name = "会话治理控制器")
@RestController
@Validated
public class AuthSessionController {
@@ -57,8 +54,7 @@ public class AuthSessionController {
* @author xuyuxiang
* @date 2022/6/24 22:28
*/
- @ApiOperationSupport(order = 1)
- @ApiOperation("会话统计")
+ @Operation(summary = "会话统计")
@GetMapping("/auth/session/analysis")
public CommonResult analysis() {
return CommonResult.data(authSessionService.analysis());
@@ -70,8 +66,7 @@ public class AuthSessionController {
* @author xuyuxiang
* @date 2022/6/24 22:28
*/
- @ApiOperationSupport(order = 2)
- @ApiOperation("查询B端会话")
+ @Operation(summary = "查询B端会话")
@GetMapping("/auth/session/b/page")
public CommonResult> pageForB(AuthSessionPageParam authSessionPageParam) {
return CommonResult.data(authSessionService.pageForB(authSessionPageParam));
@@ -83,8 +78,7 @@ public class AuthSessionController {
* @author xuyuxiang
* @date 2022/6/24 22:28
*/
- @ApiOperationSupport(order = 3)
- @ApiOperation("查询C端会话")
+ @Operation(summary = "查询C端会话")
@GetMapping("/auth/session/c/page")
public CommonResult> pageForC(AuthSessionPageParam authSessionPageParam) {
return CommonResult.data(authSessionService.pageForC(authSessionPageParam));
@@ -96,12 +90,11 @@ public class AuthSessionController {
* @author xuyuxiang
* @date 2021/10/12 10:25
**/
- @ApiOperationSupport(order = 4)
- @ApiOperation("强退B端会话")
+ @Operation(summary = "强退B端会话")
@CommonLog("强退B端会话")
@PostMapping("/auth/session/b/exit")
public CommonResult exitSessionForB(@RequestBody @Valid @NotEmpty(message = "集合不能为空")
- CommonValidList authExitSessionParamList) {
+ List authExitSessionParamList) {
authSessionService.exitSessionForB(authExitSessionParamList);
return CommonResult.ok();
}
@@ -112,12 +105,11 @@ public class AuthSessionController {
* @author xuyuxiang
* @date 2021/10/12 10:25
**/
- @ApiOperationSupport(order = 5)
- @ApiOperation("强退C端会话")
+ @Operation(summary = "强退C端会话")
@CommonLog("强退C端会话")
@PostMapping("/auth/session/c/exit")
public CommonResult exitSessionForC(@RequestBody @Valid @NotEmpty(message = "集合不能为空")
- CommonValidList authExitSessionParamList) {
+ List authExitSessionParamList) {
authSessionService.exitSessionForC(authExitSessionParamList);
return CommonResult.ok();
}
@@ -128,12 +120,11 @@ public class AuthSessionController {
* @author xuyuxiang
* @date 2021/10/12 10:25
**/
- @ApiOperationSupport(order = 6)
- @ApiOperation("强退B端token")
+ @Operation(summary = "强退B端token")
@CommonLog("强退B端token")
@PostMapping("/auth/token/b/exit")
public CommonResult exitTokenForB(@RequestBody @Valid @NotEmpty(message = "集合不能为空")
- CommonValidList authExitTokenParamList) {
+ List authExitTokenParamList) {
authSessionService.exitTokenForB(authExitTokenParamList);
return CommonResult.ok();
}
@@ -144,12 +135,11 @@ public class AuthSessionController {
* @author xuyuxiang
* @date 2021/10/12 10:25
**/
- @ApiOperationSupport(order = 7)
- @ApiOperation("强退C端token")
+ @Operation(summary = "强退C端token")
@CommonLog("强退C端token")
@PostMapping("/auth/token/c/exit")
public CommonResult exitTokenForC(@RequestBody @Valid @NotEmpty(message = "集合不能为空")
- CommonValidList authExitTokenParamList) {
+ List authExitTokenParamList) {
authSessionService.exitTokenForC(authExitTokenParamList);
return CommonResult.ok();
}
diff --git a/snowy-plugin/snowy-plugin-auth/src/main/java/vip/xiaonuo/auth/modular/monitor/param/AuthExitSessionParam.java b/snowy-plugin/snowy-plugin-auth/src/main/java/vip/xiaonuo/auth/modular/monitor/param/AuthExitSessionParam.java
index 0d55a40e..00436603 100644
--- a/snowy-plugin/snowy-plugin-auth/src/main/java/vip/xiaonuo/auth/modular/monitor/param/AuthExitSessionParam.java
+++ b/snowy-plugin/snowy-plugin-auth/src/main/java/vip/xiaonuo/auth/modular/monitor/param/AuthExitSessionParam.java
@@ -12,12 +12,11 @@
*/
package vip.xiaonuo.auth.modular.monitor.param;
-import io.swagger.annotations.ApiModelProperty;
+import io.swagger.v3.oas.annotations.media.Schema;
+import jakarta.validation.constraints.NotBlank;
import lombok.Getter;
import lombok.Setter;
-import javax.validation.constraints.NotBlank;
-
/**
* Session退出参数
*
@@ -29,7 +28,7 @@ import javax.validation.constraints.NotBlank;
public class AuthExitSessionParam {
/** 用户id */
- @ApiModelProperty(value = "用户id", required = true)
+ @Schema(description = "用户id", requiredMode = Schema.RequiredMode.REQUIRED)
@NotBlank(message = "userId不能为空")
private String userId;
}
diff --git a/snowy-plugin/snowy-plugin-auth/src/main/java/vip/xiaonuo/auth/modular/monitor/param/AuthExitTokenParam.java b/snowy-plugin/snowy-plugin-auth/src/main/java/vip/xiaonuo/auth/modular/monitor/param/AuthExitTokenParam.java
index 2796103f..77fd2332 100644
--- a/snowy-plugin/snowy-plugin-auth/src/main/java/vip/xiaonuo/auth/modular/monitor/param/AuthExitTokenParam.java
+++ b/snowy-plugin/snowy-plugin-auth/src/main/java/vip/xiaonuo/auth/modular/monitor/param/AuthExitTokenParam.java
@@ -12,12 +12,11 @@
*/
package vip.xiaonuo.auth.modular.monitor.param;
-import io.swagger.annotations.ApiModelProperty;
+import io.swagger.v3.oas.annotations.media.Schema;
+import jakarta.validation.constraints.NotBlank;
import lombok.Getter;
import lombok.Setter;
-import javax.validation.constraints.NotBlank;
-
/**
* Token退出参数
*
@@ -29,7 +28,7 @@ import javax.validation.constraints.NotBlank;
public class AuthExitTokenParam {
/** token值 */
- @ApiModelProperty(value = "token值", required = true)
+ @Schema(description = "token值", requiredMode = Schema.RequiredMode.REQUIRED)
@NotBlank(message = "tokenValue不能为空")
private String tokenValue;
}
diff --git a/snowy-plugin/snowy-plugin-auth/src/main/java/vip/xiaonuo/auth/modular/monitor/param/AuthSessionPageParam.java b/snowy-plugin/snowy-plugin-auth/src/main/java/vip/xiaonuo/auth/modular/monitor/param/AuthSessionPageParam.java
index 606b6210..670084b4 100644
--- a/snowy-plugin/snowy-plugin-auth/src/main/java/vip/xiaonuo/auth/modular/monitor/param/AuthSessionPageParam.java
+++ b/snowy-plugin/snowy-plugin-auth/src/main/java/vip/xiaonuo/auth/modular/monitor/param/AuthSessionPageParam.java
@@ -12,7 +12,7 @@
*/
package vip.xiaonuo.auth.modular.monitor.param;
-import io.swagger.annotations.ApiModelProperty;
+import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Getter;
import lombok.Setter;
@@ -27,6 +27,6 @@ import lombok.Setter;
public class AuthSessionPageParam {
/** 用户id */
- @ApiModelProperty(value = "用户id")
+ @Schema(description = "用户id")
private String userId;
}
diff --git a/snowy-plugin/snowy-plugin-auth/src/main/java/vip/xiaonuo/auth/modular/monitor/result/AuthSessionAnalysisResult.java b/snowy-plugin/snowy-plugin-auth/src/main/java/vip/xiaonuo/auth/modular/monitor/result/AuthSessionAnalysisResult.java
index 55de7c02..9348eec0 100644
--- a/snowy-plugin/snowy-plugin-auth/src/main/java/vip/xiaonuo/auth/modular/monitor/result/AuthSessionAnalysisResult.java
+++ b/snowy-plugin/snowy-plugin-auth/src/main/java/vip/xiaonuo/auth/modular/monitor/result/AuthSessionAnalysisResult.java
@@ -12,7 +12,7 @@
*/
package vip.xiaonuo.auth.modular.monitor.result;
-import io.swagger.annotations.ApiModelProperty;
+import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Getter;
import lombok.Setter;
@@ -27,18 +27,18 @@ import lombok.Setter;
public class AuthSessionAnalysisResult {
/** 当前会话总数量 */
- @ApiModelProperty(value = "当前会话总数量", position = 1)
+ @Schema(description = "当前会话总数量")
private String currentSessionTotalCount;
/** 最大签发令牌数 */
- @ApiModelProperty(value = "最大签发令牌数", position = 2)
+ @Schema(description = "最大签发令牌数")
private String maxTokenCount;
/** 最近1小时会话数 */
- @ApiModelProperty(value = "最近1小时会话数", position = 3)
+ @Schema(description = "最近1小时会话数")
private String oneHourNewlyAdded;
/** BC端会话比例 */
- @ApiModelProperty(value = "BC端会话比例", position = 4)
+ @Schema(description = "BC端会话比例")
private String proportionOfBAndC;
}
diff --git a/snowy-plugin/snowy-plugin-auth/src/main/java/vip/xiaonuo/auth/modular/monitor/result/AuthSessionPageResult.java b/snowy-plugin/snowy-plugin-auth/src/main/java/vip/xiaonuo/auth/modular/monitor/result/AuthSessionPageResult.java
index 68374f83..aca503f7 100644
--- a/snowy-plugin/snowy-plugin-auth/src/main/java/vip/xiaonuo/auth/modular/monitor/result/AuthSessionPageResult.java
+++ b/snowy-plugin/snowy-plugin-auth/src/main/java/vip/xiaonuo/auth/modular/monitor/result/AuthSessionPageResult.java
@@ -12,7 +12,7 @@
*/
package vip.xiaonuo.auth.modular.monitor.result;
-import io.swagger.annotations.ApiModelProperty;
+import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Getter;
import lombok.Setter;
@@ -30,71 +30,71 @@ import java.util.List;
public class AuthSessionPageResult {
/** id */
- @ApiModelProperty(value = "id", position = 1)
+ @Schema(description = "id")
private String id;
/** 头像 */
- @ApiModelProperty(value = "头像", position = 2)
+ @Schema(description = "头像")
private String avatar;
/** 账号 */
- @ApiModelProperty(value = "账号", position = 3)
+ @Schema(description = "账号")
private String account;
/** 姓名 */
- @ApiModelProperty(value = "姓名", position = 4)
+ @Schema(description = "姓名")
private String name;
/** 上次登录ip */
- @ApiModelProperty(value = "上次登录ip", position = 5)
+ @Schema(description = "上次登录ip")
private String lastLoginIp;
/** 上次登录地点 */
- @ApiModelProperty(value = "上次登录地点", position = 6)
+ @Schema(description = "上次登录地点")
private String lastLoginAddress;
/** 上次登录时间 */
- @ApiModelProperty(value = "上次登录时间", position = 7)
+ @Schema(description = "上次登录时间")
private Date lastLoginTime;
/** 上次登录设备 */
- @ApiModelProperty(value = "上次登录设备", position = 8)
+ @Schema(description = "上次登录设备")
private String lastLoginDevice;
/** 最新登录ip */
- @ApiModelProperty(value = "最新登录ip", position = 9)
+ @Schema(description = "最新登录ip")
private String latestLoginIp;
/** 最新登录地点 */
- @ApiModelProperty(value = "最新登录地点", position = 10)
+ @Schema(description = "最新登录地点")
private String latestLoginAddress;
/** 最新登录时间 */
- @ApiModelProperty(value = "最新登录时间", position = 11)
+ @Schema(description = "最新登录时间")
private Date latestLoginTime;
/** 最新登录设备 */
- @ApiModelProperty(value = "最新登录设备", position = 12)
+ @Schema(description = "最新登录设备")
private String latestLoginDevice;
/** 会话id */
- @ApiModelProperty(value = "会话id", position = 13)
+ @Schema(description = "会话id")
private String sessionId;
/** 会话创建时间 */
- @ApiModelProperty(value = "会话创建时间", position = 14)
+ @Schema(description = "会话创建时间")
private Date sessionCreateTime;
/** 会话剩余有效期 */
- @ApiModelProperty(value = "会话剩余有效期", position = 15)
+ @Schema(description = "会话剩余有效期")
private String sessionTimeout;
/** 令牌数量 */
- @ApiModelProperty(value = "令牌数量", position = 16)
+ @Schema(description = "令牌数量")
private Integer tokenCount;
/** 令牌信息集合 */
- @ApiModelProperty(value = "令牌信息集合", position = 17)
+ @Schema(description = "令牌信息集合")
private List tokenSignList;
/**
@@ -108,19 +108,19 @@ public class AuthSessionPageResult {
public static class TokenSignInfo {
/** token值 */
- @ApiModelProperty(value = "token值", position = 1)
+ @Schema(description = "token值")
private String tokenValue;
/** 登录设备 */
- @ApiModelProperty(value = "登录设备", position = 2)
+ @Schema(description = "登录设备")
private String tokenDevice;
/** token剩余有效期 */
- @ApiModelProperty(value = "token剩余有效期", position = 3)
+ @Schema(description = "token剩余有效期")
private String tokenTimeout;
/** token剩余有效期百分比 */
- @ApiModelProperty(value = "token剩余有效期百分比", position = 4)
+ @Schema(description = "token剩余有效期百分比")
private Double tokenTimeoutPercent;
}
}
diff --git a/snowy-plugin/snowy-plugin-auth/src/main/java/vip/xiaonuo/auth/modular/monitor/service/impl/AuthSessionServiceImpl.java b/snowy-plugin/snowy-plugin-auth/src/main/java/vip/xiaonuo/auth/modular/monitor/service/impl/AuthSessionServiceImpl.java
index d422bbb6..264f138a 100644
--- a/snowy-plugin/snowy-plugin-auth/src/main/java/vip/xiaonuo/auth/modular/monitor/service/impl/AuthSessionServiceImpl.java
+++ b/snowy-plugin/snowy-plugin-auth/src/main/java/vip/xiaonuo/auth/modular/monitor/service/impl/AuthSessionServiceImpl.java
@@ -26,6 +26,7 @@ import cn.hutool.core.util.StrUtil;
import cn.hutool.json.JSONObject;
import cn.hutool.json.JSONUtil;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
+import jakarta.annotation.Resource;
import org.springframework.stereotype.Service;
import vip.xiaonuo.auth.api.SaBaseLoginUserApi;
import vip.xiaonuo.auth.core.util.StpClientUtil;
@@ -38,7 +39,6 @@ import vip.xiaonuo.auth.modular.monitor.service.AuthSessionService;
import vip.xiaonuo.common.page.CommonPageRequest;
import vip.xiaonuo.common.util.CommonTimeFormatUtil;
-import javax.annotation.Resource;
import java.util.Comparator;
import java.util.Date;
import java.util.List;
@@ -139,7 +139,7 @@ public class AuthSessionServiceImpl implements AuthSessionService {
tokenSignInfo.setTokenValue(tokenSign.getValue());
tokenSignInfo.setTokenDevice(tokenSign.getDevice());
long tokenTimeout = SaManager.getSaTokenDao().getTimeout(StpUtil.stpLogic.splicingKeyTokenValue(tokenSign.getValue()));
- long tokenTimeoutConfig = StpUtil.stpLogic.getConfig().getTimeout();
+ long tokenTimeoutConfig = StpUtil.stpLogic.getConfigOrGlobal().getTimeout();
if (tokenTimeout == -1) {
tokenSignInfo.setTokenTimeout("永久");
tokenSignInfo.setTokenTimeoutPercent(100d);
@@ -200,7 +200,7 @@ public class AuthSessionServiceImpl implements AuthSessionService {
tokenSignInfo.setTokenValue(tokenSign.getValue());
tokenSignInfo.setTokenDevice(tokenSign.getDevice());
long tokenTimeout = SaManager.getSaTokenDao().getTimeout(StpClientUtil.stpLogic.splicingKeyTokenValue(tokenSign.getValue()));
- long tokenTimeoutConfig = StpClientUtil.stpLogic.getConfig().getTimeout();
+ long tokenTimeoutConfig = StpClientUtil.stpLogic.getConfigOrGlobal().getTimeout();
if (tokenTimeout == -1) {
tokenSignInfo.setTokenTimeout("永久");
tokenSignInfo.setTokenTimeoutPercent(100d);
diff --git a/snowy-plugin/snowy-plugin-auth/src/main/java/vip/xiaonuo/auth/modular/third/controller/AuthThirdController.java b/snowy-plugin/snowy-plugin-auth/src/main/java/vip/xiaonuo/auth/modular/third/controller/AuthThirdController.java
index 2ac83200..35dae66d 100644
--- a/snowy-plugin/snowy-plugin-auth/src/main/java/vip/xiaonuo/auth/modular/third/controller/AuthThirdController.java
+++ b/snowy-plugin/snowy-plugin-auth/src/main/java/vip/xiaonuo/auth/modular/third/controller/AuthThirdController.java
@@ -13,10 +13,10 @@
package vip.xiaonuo.auth.modular.third.controller;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
-import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport;
-import com.github.xiaoymin.knife4j.annotations.ApiSupport;
-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.annotation.Resource;
+import jakarta.validation.Valid;
import me.zhyd.oauth.model.AuthCallback;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.GetMapping;
@@ -29,17 +29,13 @@ import vip.xiaonuo.auth.modular.third.result.AuthThirdRenderResult;
import vip.xiaonuo.auth.modular.third.service.AuthThirdService;
import vip.xiaonuo.common.pojo.CommonResult;
-import javax.annotation.Resource;
-import javax.validation.Valid;
-
/**
* 第三方登录控制器
*
* @author xuyuxiang
* @date 2022/7/8 16:18
**/
-@Api(tags = "三方登录控制器")
-@ApiSupport(author = "SNOWY_TEAM", order = 5)
+@Tag(name = "三方登录控制器")
@RestController
@Validated
public class AuthThirdController {
@@ -53,8 +49,7 @@ public class AuthThirdController {
* @author xuyuxiang
* @date 2022/7/8 16:19
**/
- @ApiOperationSupport(order = 1)
- @ApiOperation("第三方登录页面渲染")
+ @Operation(summary = "第三方登录页面渲染")
@GetMapping("/auth/third/render")
public CommonResult render(@Valid AuthThirdRenderParam authThirdRenderParam) {
return CommonResult.data(authThirdService.render(authThirdRenderParam));
@@ -66,8 +61,7 @@ public class AuthThirdController {
* @author xuyuxiang
* @date 2022/7/8 16:42
**/
- @ApiOperationSupport(order = 2)
- @ApiOperation("第三方登录授权回调")
+ @Operation(summary = "第三方登录授权回调")
@GetMapping("/auth/third/callback")
public CommonResult callback(@Valid AuthThirdCallbackParam authThirdCallbackParam, AuthCallback authCallback) {
return CommonResult.data(authThirdService.callback(authThirdCallbackParam, authCallback));
@@ -79,8 +73,7 @@ public class AuthThirdController {
* @author xuyuxiang
* @date 2022/4/24 20:00
*/
- @ApiOperationSupport(order = 3)
- @ApiOperation("获取三方用户分页")
+ @Operation(summary = "获取三方用户分页")
@GetMapping("/auth/third/page")
public CommonResult> page(AuthThirdUserPageParam authThirdUserPageParam) {
return CommonResult.data(authThirdService.page(authThirdUserPageParam));
diff --git a/snowy-plugin/snowy-plugin-auth/src/main/java/vip/xiaonuo/auth/modular/third/entity/AuthThirdUser.java b/snowy-plugin/snowy-plugin-auth/src/main/java/vip/xiaonuo/auth/modular/third/entity/AuthThirdUser.java
index df37b01f..6c997937 100644
--- a/snowy-plugin/snowy-plugin-auth/src/main/java/vip/xiaonuo/auth/modular/third/entity/AuthThirdUser.java
+++ b/snowy-plugin/snowy-plugin-auth/src/main/java/vip/xiaonuo/auth/modular/third/entity/AuthThirdUser.java
@@ -15,7 +15,7 @@ package vip.xiaonuo.auth.modular.third.entity;
import com.baomidou.mybatisplus.annotation.FieldStrategy;
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.Getter;
import lombok.Setter;
import vip.xiaonuo.common.pojo.CommonEntity;
@@ -32,42 +32,42 @@ import vip.xiaonuo.common.pojo.CommonEntity;
public class AuthThirdUser extends CommonEntity {
/** id */
- @ApiModelProperty(value = "id", position = 1)
+ @Schema(description = "id")
private String id;
/** 三方用户id */
- @ApiModelProperty(value = "三方用户id", position = 2)
+ @Schema(description = "三方用户id")
private String thirdId;
/** 系统用户id */
- @ApiModelProperty(value = "系统用户id", position = 3)
+ @Schema(description = "系统用户id")
private String userId;
/** 头像 */
- @ApiModelProperty(value = "头像", position = 4)
+ @Schema(description = "头像")
@TableField(insertStrategy = FieldStrategy.IGNORED, updateStrategy = FieldStrategy.IGNORED)
private String avatar;
/** 姓名 */
- @ApiModelProperty(value = "姓名", position = 5)
+ @Schema(description = "姓名")
private String name;
/** 昵称 */
- @ApiModelProperty(value = "昵称", position = 6)
+ @Schema(description = "昵称")
@TableField(insertStrategy = FieldStrategy.IGNORED, updateStrategy = FieldStrategy.IGNORED)
private String nickname;
/** 性别 */
- @ApiModelProperty(value = "性别", position = 7)
+ @Schema(description = "性别")
@TableField(insertStrategy = FieldStrategy.IGNORED, updateStrategy = FieldStrategy.IGNORED)
private String gender;
/** 分类 */
- @ApiModelProperty(value = "分类", position = 8)
+ @Schema(description = "分类")
private String category;
/** 扩展信息 */
- @ApiModelProperty(value = "扩展信息", position = 9)
+ @Schema(description = "扩展信息")
@TableField(insertStrategy = FieldStrategy.IGNORED, updateStrategy = FieldStrategy.IGNORED)
private String extJson;
}
diff --git a/snowy-plugin/snowy-plugin-auth/src/main/java/vip/xiaonuo/auth/modular/third/param/AuthThirdCallbackParam.java b/snowy-plugin/snowy-plugin-auth/src/main/java/vip/xiaonuo/auth/modular/third/param/AuthThirdCallbackParam.java
index 9503cf4e..921eecc1 100644
--- a/snowy-plugin/snowy-plugin-auth/src/main/java/vip/xiaonuo/auth/modular/third/param/AuthThirdCallbackParam.java
+++ b/snowy-plugin/snowy-plugin-auth/src/main/java/vip/xiaonuo/auth/modular/third/param/AuthThirdCallbackParam.java
@@ -12,12 +12,11 @@
*/
package vip.xiaonuo.auth.modular.third.param;
-import io.swagger.annotations.ApiModelProperty;
+import io.swagger.v3.oas.annotations.media.Schema;
+import jakarta.validation.constraints.NotBlank;
import lombok.Getter;
import lombok.Setter;
-import javax.validation.constraints.NotBlank;
-
/**
* 第三方登录回调参数
*
@@ -29,17 +28,17 @@ import javax.validation.constraints.NotBlank;
public class AuthThirdCallbackParam {
/** 第三方平台标识 */
- @ApiModelProperty(value = "第三方平台标识", required = true, position = 1)
+ @Schema(description = "第三方平台标识", requiredMode = Schema.RequiredMode.REQUIRED)
@NotBlank(message = "platform不能为空")
private String platform;
/** 第三方回调code */
- @ApiModelProperty(value = "第三方回调code", required = true, position = 2)
+ @Schema(description = "第三方回调code", requiredMode = Schema.RequiredMode.REQUIRED)
@NotBlank(message = "code不能为空")
private String code;
/** 第三方回调state */
- @ApiModelProperty(value = "第三方回调state", required = true, position = 3)
+ @Schema(description = "第三方回调state", requiredMode = Schema.RequiredMode.REQUIRED)
@NotBlank(message = "state不能为空")
private String state;
}
diff --git a/snowy-plugin/snowy-plugin-auth/src/main/java/vip/xiaonuo/auth/modular/third/param/AuthThirdRenderParam.java b/snowy-plugin/snowy-plugin-auth/src/main/java/vip/xiaonuo/auth/modular/third/param/AuthThirdRenderParam.java
index be833212..19bf8daf 100644
--- a/snowy-plugin/snowy-plugin-auth/src/main/java/vip/xiaonuo/auth/modular/third/param/AuthThirdRenderParam.java
+++ b/snowy-plugin/snowy-plugin-auth/src/main/java/vip/xiaonuo/auth/modular/third/param/AuthThirdRenderParam.java
@@ -12,12 +12,11 @@
*/
package vip.xiaonuo.auth.modular.third.param;
-import io.swagger.annotations.ApiModelProperty;
+import io.swagger.v3.oas.annotations.media.Schema;
+import jakarta.validation.constraints.NotBlank;
import lombok.Getter;
import lombok.Setter;
-import javax.validation.constraints.NotBlank;
-
/**
* 第三方登录授权参数
*
@@ -29,7 +28,7 @@ import javax.validation.constraints.NotBlank;
public class AuthThirdRenderParam {
/** 第三方平台标识 */
- @ApiModelProperty(value = "第三方平台标识", required = true)
+ @Schema(description = "第三方平台标识", requiredMode = Schema.RequiredMode.REQUIRED)
@NotBlank(message = "platform不能为空")
private String platform;
}
diff --git a/snowy-plugin/snowy-plugin-auth/src/main/java/vip/xiaonuo/auth/modular/third/param/AuthThirdUserPageParam.java b/snowy-plugin/snowy-plugin-auth/src/main/java/vip/xiaonuo/auth/modular/third/param/AuthThirdUserPageParam.java
index 1178ac60..f647daac 100644
--- a/snowy-plugin/snowy-plugin-auth/src/main/java/vip/xiaonuo/auth/modular/third/param/AuthThirdUserPageParam.java
+++ b/snowy-plugin/snowy-plugin-auth/src/main/java/vip/xiaonuo/auth/modular/third/param/AuthThirdUserPageParam.java
@@ -12,7 +12,7 @@
*/
package vip.xiaonuo.auth.modular.third.param;
-import io.swagger.annotations.ApiModelProperty;
+import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Getter;
import lombok.Setter;
@@ -27,26 +27,26 @@ import lombok.Setter;
public class AuthThirdUserPageParam {
/** 当前页 */
- @ApiModelProperty(value = "当前页码")
+ @Schema(description = "当前页码")
private Integer current;
/** 每页条数 */
- @ApiModelProperty(value = "每页条数")
+ @Schema(description = "每页条数")
private Integer size;
/** 排序字段 */
- @ApiModelProperty(value = "排序字段,字段驼峰名称,如:userName")
+ @Schema(description = "排序字段,字段驼峰名称,如:userName")
private String sortField;
/** 排序方式 */
- @ApiModelProperty(value = "排序方式,升序:ASCEND;降序:DESCEND")
+ @Schema(description = "排序方式,升序:ASCEND;降序:DESCEND")
private String sortOrder;
/** 三方用户分类 */
- @ApiModelProperty(value = "分类")
+ @Schema(description = "分类")
private String category;
/** 用户名或昵称关键词 */
- @ApiModelProperty(value = "用户名或昵称关键词")
+ @Schema(description = "用户名或昵称关键词")
private String searchKey;
}
diff --git a/snowy-plugin/snowy-plugin-auth/src/main/java/vip/xiaonuo/auth/modular/third/result/AuthThirdRenderResult.java b/snowy-plugin/snowy-plugin-auth/src/main/java/vip/xiaonuo/auth/modular/third/result/AuthThirdRenderResult.java
index 3a479e2a..69fe7cf4 100644
--- a/snowy-plugin/snowy-plugin-auth/src/main/java/vip/xiaonuo/auth/modular/third/result/AuthThirdRenderResult.java
+++ b/snowy-plugin/snowy-plugin-auth/src/main/java/vip/xiaonuo/auth/modular/third/result/AuthThirdRenderResult.java
@@ -12,7 +12,7 @@
*/
package vip.xiaonuo.auth.modular.third.result;
-import io.swagger.annotations.ApiModelProperty;
+import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Getter;
import lombok.Setter;
@@ -27,10 +27,10 @@ import lombok.Setter;
public class AuthThirdRenderResult {
/** 授权地址 */
- @ApiModelProperty(value = "授权地址")
+ @Schema(description = "授权地址")
private String authorizeUrl;
/** 状态码 */
- @ApiModelProperty(value = "状态码")
+ @Schema(description = "状态码")
private String state;
}
diff --git a/snowy-plugin/snowy-plugin-auth/src/main/java/vip/xiaonuo/auth/modular/third/service/impl/AuthThirdServiceImpl.java b/snowy-plugin/snowy-plugin-auth/src/main/java/vip/xiaonuo/auth/modular/third/service/impl/AuthThirdServiceImpl.java
index e43b1668..366a9bc8 100644
--- a/snowy-plugin/snowy-plugin-auth/src/main/java/vip/xiaonuo/auth/modular/third/service/impl/AuthThirdServiceImpl.java
+++ b/snowy-plugin/snowy-plugin-auth/src/main/java/vip/xiaonuo/auth/modular/third/service/impl/AuthThirdServiceImpl.java
@@ -21,6 +21,7 @@ import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.xkcoding.http.HttpUtil;
import com.xkcoding.http.support.hutool.HutoolImpl;
+import jakarta.annotation.Resource;
import me.zhyd.oauth.config.AuthConfig;
import me.zhyd.oauth.model.AuthCallback;
import me.zhyd.oauth.model.AuthResponse;
@@ -49,8 +50,6 @@ import vip.xiaonuo.common.exception.CommonException;
import vip.xiaonuo.common.page.CommonPageRequest;
import vip.xiaonuo.dev.api.DevConfigApi;
-import javax.annotation.Resource;
-
/**
* 第三方登录Service接口实现类
*
diff --git a/snowy-plugin/snowy-plugin-biz/pom.xml b/snowy-plugin/snowy-plugin-biz/pom.xml
index 1c02b558..1984227b 100644
--- a/snowy-plugin/snowy-plugin-biz/pom.xml
+++ b/snowy-plugin/snowy-plugin-biz/pom.xml
@@ -7,7 +7,7 @@
vip.xiaonuo
snowy-plugin
- 2.0.0
+ 3.0.0
snowy-plugin-biz
diff --git a/snowy-plugin/snowy-plugin-biz/src/main/java/vip/xiaonuo/biz/core/config/BizConfigure.java b/snowy-plugin/snowy-plugin-biz/src/main/java/vip/xiaonuo/biz/core/config/BizConfigure.java
index 778f2660..9415ff5c 100644
--- a/snowy-plugin/snowy-plugin-biz/src/main/java/vip/xiaonuo/biz/core/config/BizConfigure.java
+++ b/snowy-plugin/snowy-plugin-biz/src/main/java/vip/xiaonuo/biz/core/config/BizConfigure.java
@@ -12,20 +12,7 @@
*/
package vip.xiaonuo.biz.core.config;
-import com.github.xiaoymin.knife4j.spring.extension.OpenApiExtensionResolver;
-import io.swagger.annotations.ApiOperation;
-import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
-import org.springframework.web.bind.annotation.RequestMethod;
-import springfox.documentation.builders.ApiInfoBuilder;
-import springfox.documentation.builders.PathSelectors;
-import springfox.documentation.builders.RequestHandlerSelectors;
-import springfox.documentation.service.Contact;
-import springfox.documentation.spi.DocumentationType;
-import springfox.documentation.spring.web.plugins.Docket;
-import vip.xiaonuo.common.pojo.CommonResult;
-
-import javax.annotation.Resource;
/**
* 业务相关配置
@@ -35,33 +22,4 @@ import javax.annotation.Resource;
**/
@Configuration
public class BizConfigure {
-
- @Resource
- private OpenApiExtensionResolver openApiExtensionResolver;
-
- /**
- * API文档分组配置
- *
- * @author xuyuxiang
- * @date 2022/7/7 16:18
- **/
- @Bean(value = "bizDocApi")
- public Docket bizDocApi() {
- return new Docket(DocumentationType.SWAGGER_2)
- .apiInfo(new ApiInfoBuilder()
- .title("业务功能BIZ")
- .description("业务功能BIZ")
- .termsOfServiceUrl("https://www.xiaonuo.vip")
- .contact(new Contact("SNOWY_TEAM","https://www.xiaonuo.vip", "xuyuxiang29@foxmail.com"))
- .version("2.0.0")
- .build())
- .globalResponseMessage(RequestMethod.GET, CommonResult.responseList())
- .globalResponseMessage(RequestMethod.POST, CommonResult.responseList())
- .groupName("业务功能BIZ")
- .select()
- .apis(RequestHandlerSelectors.withMethodAnnotation(ApiOperation.class))
- .apis(RequestHandlerSelectors.basePackage("vip.xiaonuo.biz"))
- .paths(PathSelectors.any())
- .build().extensions(openApiExtensionResolver.buildExtensions("业务功能BIZ"));
- }
}
diff --git a/snowy-plugin/snowy-plugin-biz/src/main/java/vip/xiaonuo/biz/modular/dict/controller/BizDictController.java b/snowy-plugin/snowy-plugin-biz/src/main/java/vip/xiaonuo/biz/modular/dict/controller/BizDictController.java
index 0ccb5bd3..24e77628 100644
--- a/snowy-plugin/snowy-plugin-biz/src/main/java/vip/xiaonuo/biz/modular/dict/controller/BizDictController.java
+++ b/snowy-plugin/snowy-plugin-biz/src/main/java/vip/xiaonuo/biz/modular/dict/controller/BizDictController.java
@@ -15,10 +15,10 @@ package vip.xiaonuo.biz.modular.dict.controller;
import cn.dev33.satoken.annotation.SaCheckPermission;
import cn.hutool.core.lang.tree.Tree;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
-import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport;
-import com.github.xiaoymin.knife4j.annotations.ApiSupport;
-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.annotation.Resource;
+import jakarta.validation.Valid;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
@@ -31,8 +31,6 @@ import vip.xiaonuo.biz.modular.dict.service.BizDictService;
import vip.xiaonuo.common.annotation.CommonLog;
import vip.xiaonuo.common.pojo.CommonResult;
-import javax.annotation.Resource;
-import javax.validation.Valid;
import java.util.List;
/**
@@ -41,8 +39,7 @@ import java.util.List;
* @author xuyuxiang
* @date 2022/6/21 14:58
**/
-@Api(tags = "业务字典控制器")
-@ApiSupport(author = "SNOWY_TEAM", order = 4)
+@Tag(name = "业务字典控制器")
@RestController
@Validated
public class BizDictController {
@@ -56,8 +53,7 @@ public class BizDictController {
* @author xuyuxiang
* @date 2022/4/24 20:00
*/
- @ApiOperationSupport(order = 1)
- @ApiOperation("获取业务字典分页")
+ @Operation(summary = "获取业务字典分页")
@SaCheckPermission("/biz/dict/page")
@GetMapping("/biz/dict/page")
public CommonResult> page(BizDictPageParam bizDictPageParam) {
@@ -70,8 +66,7 @@ public class BizDictController {
* @author xuyuxiang
* @date 2022/4/24 20:00
*/
- @ApiOperationSupport(order = 2)
- @ApiOperation("获取业务字典树")
+ @Operation(summary = "获取业务字典树")
@SaCheckPermission("/biz/dict/tree")
@GetMapping("/biz/dict/tree")
public CommonResult>> tree() {
@@ -84,8 +79,7 @@ public class BizDictController {
* @author xuyuxiang
* @date 2022/4/24 20:00
*/
- @ApiOperationSupport(order = 3)
- @ApiOperation("获取所有字典树")
+ @Operation(summary = "获取所有字典树")
@GetMapping("/biz/dict/treeAll")
public CommonResult>> treeAll() {
return CommonResult.data(bizDictService.treeAll());
@@ -97,8 +91,7 @@ public class BizDictController {
* @author xuyuxiang
* @date 2022/4/24 20:47
*/
- @ApiOperationSupport(order = 4)
- @ApiOperation("编辑业务字典")
+ @Operation(summary = "编辑业务字典")
@CommonLog("编辑业务字典")
@SaCheckPermission("/biz/dict/edit")
@PostMapping("/biz/dict/edit")
diff --git a/snowy-plugin/snowy-plugin-biz/src/main/java/vip/xiaonuo/biz/modular/dict/entity/BizDict.java b/snowy-plugin/snowy-plugin-biz/src/main/java/vip/xiaonuo/biz/modular/dict/entity/BizDict.java
index 97da9617..b4ce95ec 100644
--- a/snowy-plugin/snowy-plugin-biz/src/main/java/vip/xiaonuo/biz/modular/dict/entity/BizDict.java
+++ b/snowy-plugin/snowy-plugin-biz/src/main/java/vip/xiaonuo/biz/modular/dict/entity/BizDict.java
@@ -15,7 +15,7 @@ package vip.xiaonuo.biz.modular.dict.entity;
import com.baomidou.mybatisplus.annotation.FieldStrategy;
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.Getter;
import lombok.Setter;
import vip.xiaonuo.common.pojo.CommonEntity;
@@ -32,31 +32,31 @@ import vip.xiaonuo.common.pojo.CommonEntity;
public class BizDict extends CommonEntity {
/** id */
- @ApiModelProperty(value = "id", position = 1)
+ @Schema(description = "id")
private String id;
/** 父id */
- @ApiModelProperty(value = "父id", position = 2)
+ @Schema(description = "父id")
private String parentId;
/** 字典文字 */
- @ApiModelProperty(value = "字典文字", position = 3)
+ @Schema(description = "字典文字")
private String dictLabel;
/** 字典值 */
- @ApiModelProperty(value = "字典值", position = 4)
+ @Schema(description = "字典值")
private String dictValue;
/** 分类 */
- @ApiModelProperty(value = "分类", position = 5)
+ @Schema(description = "分类")
private String category;
/** 排序码 */
- @ApiModelProperty(value = "排序码", position = 6)
+ @Schema(description = "排序码")
private Integer sortCode;
/** 扩展信息 */
- @ApiModelProperty(value = "扩展信息", position = 7)
+ @Schema(description = "扩展信息")
@TableField(insertStrategy = FieldStrategy.IGNORED, updateStrategy = FieldStrategy.IGNORED)
private String extJson;
}
diff --git a/snowy-plugin/snowy-plugin-biz/src/main/java/vip/xiaonuo/biz/modular/dict/param/BizDictEditParam.java b/snowy-plugin/snowy-plugin-biz/src/main/java/vip/xiaonuo/biz/modular/dict/param/BizDictEditParam.java
index 11fc0c57..5e7c625d 100644
--- a/snowy-plugin/snowy-plugin-biz/src/main/java/vip/xiaonuo/biz/modular/dict/param/BizDictEditParam.java
+++ b/snowy-plugin/snowy-plugin-biz/src/main/java/vip/xiaonuo/biz/modular/dict/param/BizDictEditParam.java
@@ -12,13 +12,12 @@
*/
package vip.xiaonuo.biz.modular.dict.param;
-import io.swagger.annotations.ApiModelProperty;
+import io.swagger.v3.oas.annotations.media.Schema;
+import jakarta.validation.constraints.NotBlank;
+import jakarta.validation.constraints.NotNull;
import lombok.Getter;
import lombok.Setter;
-import javax.validation.constraints.NotBlank;
-import javax.validation.constraints.NotNull;
-
/**
* 业务字典编辑参数
*
@@ -30,21 +29,21 @@ import javax.validation.constraints.NotNull;
public class BizDictEditParam {
/** id */
- @ApiModelProperty(value = "id", position = 1)
+ @Schema(description = "id", requiredMode = Schema.RequiredMode.REQUIRED)
@NotBlank(message = "id不能为空")
private String id;
/** 字典文字 */
- @ApiModelProperty(value = "字典文字", position = 2)
+ @Schema(description = "字典文字", requiredMode = Schema.RequiredMode.REQUIRED)
@NotBlank(message = "dictLabel不能为空")
private String dictLabel;
/** 排序码 */
- @ApiModelProperty(value = "排序码", position = 3)
+ @Schema(description = "排序码", requiredMode = Schema.RequiredMode.REQUIRED)
@NotNull(message = "sortCode不能为空")
private Integer sortCode;
/** 扩展信息 */
- @ApiModelProperty(value = "扩展信息", position = 4)
+ @Schema(description = "扩展信息")
private String extJson;
}
diff --git a/snowy-plugin/snowy-plugin-biz/src/main/java/vip/xiaonuo/biz/modular/dict/param/BizDictPageParam.java b/snowy-plugin/snowy-plugin-biz/src/main/java/vip/xiaonuo/biz/modular/dict/param/BizDictPageParam.java
index 5211bc7f..7c1a228e 100644
--- a/snowy-plugin/snowy-plugin-biz/src/main/java/vip/xiaonuo/biz/modular/dict/param/BizDictPageParam.java
+++ b/snowy-plugin/snowy-plugin-biz/src/main/java/vip/xiaonuo/biz/modular/dict/param/BizDictPageParam.java
@@ -12,7 +12,7 @@
*/
package vip.xiaonuo.biz.modular.dict.param;
-import io.swagger.annotations.ApiModelProperty;
+import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Getter;
import lombok.Setter;
@@ -27,26 +27,26 @@ import lombok.Setter;
public class BizDictPageParam {
/** 当前页 */
- @ApiModelProperty(value = "当前页码")
+ @Schema(description = "当前页码")
private Integer current;
/** 每页条数 */
- @ApiModelProperty(value = "每页条数")
+ @Schema(description = "每页条数")
private Integer size;
/** 排序字段 */
- @ApiModelProperty(value = "排序字段,字段驼峰名称,如:userName")
+ @Schema(description = "排序字段,字段驼峰名称,如:userName")
private String sortField;
/** 排序方式 */
- @ApiModelProperty(value = "排序方式,升序:ASCEND;降序:DESCEND")
+ @Schema(description = "排序方式,升序:ASCEND;降序:DESCEND")
private String sortOrder;
/** 父id */
- @ApiModelProperty(value = "父id")
+ @Schema(description = "父id")
private String parentId;
/** 字典文字关键词 */
- @ApiModelProperty(value = "字典文字关键词")
+ @Schema(description = "字典文字关键词")
private String searchKey;
}
diff --git a/snowy-plugin/snowy-plugin-biz/src/main/java/vip/xiaonuo/biz/modular/dict/service/impl/BizDictServiceImpl.java b/snowy-plugin/snowy-plugin-biz/src/main/java/vip/xiaonuo/biz/modular/dict/service/impl/BizDictServiceImpl.java
index c79956f8..c093714e 100644
--- a/snowy-plugin/snowy-plugin-biz/src/main/java/vip/xiaonuo/biz/modular/dict/service/impl/BizDictServiceImpl.java
+++ b/snowy-plugin/snowy-plugin-biz/src/main/java/vip/xiaonuo/biz/modular/dict/service/impl/BizDictServiceImpl.java
@@ -24,6 +24,7 @@ import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.fhs.trans.service.impl.DictionaryTransService;
+import jakarta.annotation.Resource;
import org.springframework.beans.factory.InitializingBean;
import org.springframework.stereotype.Service;
import vip.xiaonuo.biz.modular.dict.entity.BizDict;
@@ -36,7 +37,6 @@ import vip.xiaonuo.common.enums.CommonSortOrderEnum;
import vip.xiaonuo.common.exception.CommonException;
import vip.xiaonuo.common.page.CommonPageRequest;
-import javax.annotation.Resource;
import java.util.List;
import java.util.Map;
import java.util.concurrent.CompletableFuture;
diff --git a/snowy-plugin/snowy-plugin-biz/src/main/java/vip/xiaonuo/biz/modular/org/controller/BizOrgController.java b/snowy-plugin/snowy-plugin-biz/src/main/java/vip/xiaonuo/biz/modular/org/controller/BizOrgController.java
index d142d8da..89cfbfaa 100644
--- a/snowy-plugin/snowy-plugin-biz/src/main/java/vip/xiaonuo/biz/modular/org/controller/BizOrgController.java
+++ b/snowy-plugin/snowy-plugin-biz/src/main/java/vip/xiaonuo/biz/modular/org/controller/BizOrgController.java
@@ -15,10 +15,11 @@ package vip.xiaonuo.biz.modular.org.controller;
import cn.dev33.satoken.annotation.SaCheckPermission;
import cn.hutool.core.lang.tree.Tree;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
-import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport;
-import com.github.xiaoymin.knife4j.annotations.ApiSupport;
-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.annotation.Resource;
+import jakarta.validation.Valid;
+import jakarta.validation.constraints.NotEmpty;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
@@ -30,11 +31,7 @@ import vip.xiaonuo.biz.modular.org.service.BizOrgService;
import vip.xiaonuo.biz.modular.user.entity.BizUser;
import vip.xiaonuo.common.annotation.CommonLog;
import vip.xiaonuo.common.pojo.CommonResult;
-import vip.xiaonuo.common.pojo.CommonValidList;
-import javax.annotation.Resource;
-import javax.validation.Valid;
-import javax.validation.constraints.NotEmpty;
import java.util.List;
/**
@@ -43,8 +40,7 @@ import java.util.List;
* @author xuyuxiang
* @date 2022/4/24 19:55
*/
-@Api(tags = "机构控制器")
-@ApiSupport(author = "SNOWY_TEAM", order = 1)
+@Tag(name = "机构控制器")
@RestController
@Validated
public class BizOrgController {
@@ -58,8 +54,7 @@ public class BizOrgController {
* @author xuyuxiang
* @date 2022/4/24 20:00
*/
- @ApiOperationSupport(order = 1)
- @ApiOperation("获取机构分页")
+ @Operation(summary = "获取机构分页")
@SaCheckPermission("/biz/org/page")
@GetMapping("/biz/org/page")
public CommonResult> page(BizOrgPageParam bizOrgPageParam) {
@@ -72,8 +67,7 @@ public class BizOrgController {
* @author xuyuxiang
* @date 2022/4/24 20:00
*/
- @ApiOperationSupport(order = 2)
- @ApiOperation("获取机构树")
+ @Operation(summary = "获取机构树")
@SaCheckPermission("/biz/org/tree")
@GetMapping("/biz/org/tree")
public CommonResult>> tree() {
@@ -86,8 +80,7 @@ public class BizOrgController {
* @author xuyuxiang
* @date 2022/4/24 20:47
*/
- @ApiOperationSupport(order = 3)
- @ApiOperation("添加机构")
+ @Operation(summary = "添加机构")
@CommonLog("添加机构")
@SaCheckPermission("/biz/org/add")
@PostMapping("/biz/org/add")
@@ -102,8 +95,7 @@ public class BizOrgController {
* @author xuyuxiang
* @date 2022/4/24 20:47
*/
- @ApiOperationSupport(order = 4)
- @ApiOperation("编辑机构")
+ @Operation(summary = "编辑机构")
@CommonLog("编辑机构")
@SaCheckPermission("/biz/org/edit")
@PostMapping("/biz/org/edit")
@@ -118,13 +110,12 @@ public class BizOrgController {
* @author xuyuxiang
* @date 2022/4/24 20:00
*/
- @ApiOperationSupport(order = 5)
- @ApiOperation("删除机构")
+ @Operation(summary = "删除机构")
@CommonLog("删除机构")
@SaCheckPermission("/biz/org/delete")
@PostMapping("/biz/org/delete")
public CommonResult delete(@RequestBody @Valid @NotEmpty(message = "集合不能为空")
- CommonValidList bizOrgIdParamList) {
+ List bizOrgIdParamList) {
bizOrgService.delete(bizOrgIdParamList);
return CommonResult.ok();
}
@@ -135,8 +126,7 @@ public class BizOrgController {
* @author xuyuxiang
* @date 2022/4/24 20:00
*/
- @ApiOperationSupport(order = 6)
- @ApiOperation("获取机构详情")
+ @Operation(summary = "获取机构详情")
@SaCheckPermission("/biz/org/detail")
@GetMapping("/biz/org/detail")
public CommonResult detail(@Valid BizOrgIdParam bizOrgIdParam) {
@@ -151,8 +141,7 @@ public class BizOrgController {
* @author xuyuxiang
* @date 2022/4/24 20:00
*/
- @ApiOperationSupport(order = 7)
- @ApiOperation("获取机构树选择器")
+ @Operation(summary = "获取机构树选择器")
@SaCheckPermission("/biz/org/orgTreeSelector")
@GetMapping("/biz/org/orgTreeSelector")
public CommonResult>> orgTreeSelector() {
@@ -165,8 +154,7 @@ public class BizOrgController {
* @author xuyuxiang
* @date 2022/4/24 20:00
*/
- @ApiOperationSupport(order = 8)
- @ApiOperation("获取人员选择器")
+ @Operation(summary = "获取人员选择器")
@SaCheckPermission("/biz/org/userSelector")
@GetMapping("/biz/org/userSelector")
public CommonResult> userSelector(BizOrgSelectorUserParam bizOrgSelectorUserParam) {
diff --git a/snowy-plugin/snowy-plugin-biz/src/main/java/vip/xiaonuo/biz/modular/org/entity/BizOrg.java b/snowy-plugin/snowy-plugin-biz/src/main/java/vip/xiaonuo/biz/modular/org/entity/BizOrg.java
index 856b8506..727c19e9 100644
--- a/snowy-plugin/snowy-plugin-biz/src/main/java/vip/xiaonuo/biz/modular/org/entity/BizOrg.java
+++ b/snowy-plugin/snowy-plugin-biz/src/main/java/vip/xiaonuo/biz/modular/org/entity/BizOrg.java
@@ -17,7 +17,7 @@ import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fhs.core.trans.anno.Trans;
import com.fhs.core.trans.constant.TransType;
-import io.swagger.annotations.ApiModelProperty;
+import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Getter;
import lombok.Setter;
import vip.xiaonuo.biz.modular.user.entity.BizUser;
@@ -35,37 +35,37 @@ import vip.xiaonuo.common.pojo.CommonEntity;
public class BizOrg extends CommonEntity {
/** id */
- @ApiModelProperty(value = "id", position = 1)
+ @Schema(description = "id")
private String id;
/** 父id */
- @ApiModelProperty(value = "父id", position = 2)
+ @Schema(description = "父id")
private String parentId;
/** 主管id */
- @ApiModelProperty(value = "主管id", position = 3)
+ @Schema(description = "主管id")
@TableField(insertStrategy = FieldStrategy.IGNORED, updateStrategy = FieldStrategy.IGNORED)
@Trans(type = TransType.SIMPLE, target = BizUser.class, fields = "name", alias = "director", ref = "directorName")
private String directorId;
/** 名称 */
- @ApiModelProperty(value = "名称", position = 4)
+ @Schema(description = "名称")
private String name;
/** 编码 */
- @ApiModelProperty(value = "编码", position = 5)
+ @Schema(description = "编码")
private String code;
/** 分类 */
- @ApiModelProperty(value = "分类", position = 6)
+ @Schema(description = "分类")
private String category;
/** 排序码 */
- @ApiModelProperty(value = "排序码", position = 7)
+ @Schema(description = "排序码")
private Integer sortCode;
/** 扩展信息 */
- @ApiModelProperty(value = "扩展信息", position = 8)
+ @Schema(description = "扩展信息")
@TableField(insertStrategy = FieldStrategy.IGNORED, updateStrategy = FieldStrategy.IGNORED)
private String extJson;
}
diff --git a/snowy-plugin/snowy-plugin-biz/src/main/java/vip/xiaonuo/biz/modular/org/param/BizOrgAddParam.java b/snowy-plugin/snowy-plugin-biz/src/main/java/vip/xiaonuo/biz/modular/org/param/BizOrgAddParam.java
index 7fecbb1a..5377b0b1 100644
--- a/snowy-plugin/snowy-plugin-biz/src/main/java/vip/xiaonuo/biz/modular/org/param/BizOrgAddParam.java
+++ b/snowy-plugin/snowy-plugin-biz/src/main/java/vip/xiaonuo/biz/modular/org/param/BizOrgAddParam.java
@@ -12,13 +12,12 @@
*/
package vip.xiaonuo.biz.modular.org.param;
-import io.swagger.annotations.ApiModelProperty;
+import io.swagger.v3.oas.annotations.media.Schema;
+import jakarta.validation.constraints.NotBlank;
+import jakarta.validation.constraints.NotNull;
import lombok.Getter;
import lombok.Setter;
-import javax.validation.constraints.NotBlank;
-import javax.validation.constraints.NotNull;
-
/**
* 机构添加参数
*
@@ -30,30 +29,30 @@ import javax.validation.constraints.NotNull;
public class BizOrgAddParam {
/** 父id */
- @ApiModelProperty(value = "父id", required = true, position = 1)
+ @Schema(description = "父id", requiredMode = Schema.RequiredMode.REQUIRED)
@NotBlank(message = "parentId不能为空")
private String parentId;
/** 名称 */
- @ApiModelProperty(value = "名称", required = true, position = 2)
+ @Schema(description = "名称", requiredMode = Schema.RequiredMode.REQUIRED)
@NotBlank(message = "name不能为空")
private String name;
/** 分类 */
- @ApiModelProperty(value = "分类", required = true, position = 3)
+ @Schema(description = "分类", requiredMode = Schema.RequiredMode.REQUIRED)
@NotBlank(message = "category不能为空")
private String category;
/** 排序码 */
- @ApiModelProperty(value = "排序码", required = true, position = 4)
+ @Schema(description = "排序码", requiredMode = Schema.RequiredMode.REQUIRED)
@NotNull(message = "sortCode不能为空")
private Integer sortCode;
/** 主管id */
- @ApiModelProperty(value = "主管id", position = 5)
+ @Schema(description = "主管id")
private String directorId;
/** 扩展JSON */
- @ApiModelProperty(value = "扩展JSON", position = 6)
+ @Schema(description = "扩展JSON")
private String extJson;
}
diff --git a/snowy-plugin/snowy-plugin-biz/src/main/java/vip/xiaonuo/biz/modular/org/param/BizOrgEditParam.java b/snowy-plugin/snowy-plugin-biz/src/main/java/vip/xiaonuo/biz/modular/org/param/BizOrgEditParam.java
index 06abed6e..f967579c 100644
--- a/snowy-plugin/snowy-plugin-biz/src/main/java/vip/xiaonuo/biz/modular/org/param/BizOrgEditParam.java
+++ b/snowy-plugin/snowy-plugin-biz/src/main/java/vip/xiaonuo/biz/modular/org/param/BizOrgEditParam.java
@@ -12,13 +12,12 @@
*/
package vip.xiaonuo.biz.modular.org.param;
-import io.swagger.annotations.ApiModelProperty;
+import io.swagger.v3.oas.annotations.media.Schema;
+import jakarta.validation.constraints.NotBlank;
+import jakarta.validation.constraints.NotNull;
import lombok.Getter;
import lombok.Setter;
-import javax.validation.constraints.NotBlank;
-import javax.validation.constraints.NotNull;
-
/**
* 机构编辑参数
*
@@ -30,35 +29,35 @@ import javax.validation.constraints.NotNull;
public class BizOrgEditParam {
/** id */
- @ApiModelProperty(value = "id", required = true, position = 1)
+ @Schema(description = "id", requiredMode = Schema.RequiredMode.REQUIRED)
@NotBlank(message = "id不能为空")
private String id;
/** 父id */
- @ApiModelProperty(value = "父id", required = true, position = 2)
+ @Schema(description = "父id", requiredMode = Schema.RequiredMode.REQUIRED)
@NotBlank(message = "parentId不能为空")
private String parentId;
/** 名称 */
- @ApiModelProperty(value = "名称", required = true, position = 3)
+ @Schema(description = "名称", requiredMode = Schema.RequiredMode.REQUIRED)
@NotBlank(message = "name不能为空")
private String name;
/** 分类 */
- @ApiModelProperty(value = "分类", required = true, position = 4)
+ @Schema(description = "分类", requiredMode = Schema.RequiredMode.REQUIRED)
@NotBlank(message = "category不能为空")
private String category;
/** 排序码 */
- @ApiModelProperty(value = "排序码", required = true, position = 5)
+ @Schema(description = "排序码", requiredMode = Schema.RequiredMode.REQUIRED)
@NotNull(message = "sortCode不能为空")
private Integer sortCode;
/** 主管id */
- @ApiModelProperty(value = "主管id", position = 6)
+ @Schema(description = "主管id")
private String directorId;
/** 扩展JSON */
- @ApiModelProperty(value = "扩展JSON", position = 7)
+ @Schema(description = "扩展JSON")
private String extJson;
}
diff --git a/snowy-plugin/snowy-plugin-biz/src/main/java/vip/xiaonuo/biz/modular/org/param/BizOrgIdParam.java b/snowy-plugin/snowy-plugin-biz/src/main/java/vip/xiaonuo/biz/modular/org/param/BizOrgIdParam.java
index e22cb459..e6b68989 100644
--- a/snowy-plugin/snowy-plugin-biz/src/main/java/vip/xiaonuo/biz/modular/org/param/BizOrgIdParam.java
+++ b/snowy-plugin/snowy-plugin-biz/src/main/java/vip/xiaonuo/biz/modular/org/param/BizOrgIdParam.java
@@ -12,12 +12,11 @@
*/
package vip.xiaonuo.biz.modular.org.param;
-import io.swagger.annotations.ApiModelProperty;
+import io.swagger.v3.oas.annotations.media.Schema;
+import jakarta.validation.constraints.NotBlank;
import lombok.Getter;
import lombok.Setter;
-import javax.validation.constraints.NotBlank;
-
/**
* 机构Id参数
*
@@ -29,7 +28,7 @@ import javax.validation.constraints.NotBlank;
public class BizOrgIdParam {
/** id */
- @ApiModelProperty(value = "id", required = true)
+ @Schema(description = "id", requiredMode = Schema.RequiredMode.REQUIRED)
@NotBlank(message = "id不能为空")
private String id;
}
diff --git a/snowy-plugin/snowy-plugin-biz/src/main/java/vip/xiaonuo/biz/modular/org/param/BizOrgPageParam.java b/snowy-plugin/snowy-plugin-biz/src/main/java/vip/xiaonuo/biz/modular/org/param/BizOrgPageParam.java
index ae6c09e1..5a161b6f 100644
--- a/snowy-plugin/snowy-plugin-biz/src/main/java/vip/xiaonuo/biz/modular/org/param/BizOrgPageParam.java
+++ b/snowy-plugin/snowy-plugin-biz/src/main/java/vip/xiaonuo/biz/modular/org/param/BizOrgPageParam.java
@@ -12,7 +12,7 @@
*/
package vip.xiaonuo.biz.modular.org.param;
-import io.swagger.annotations.ApiModelProperty;
+import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Getter;
import lombok.Setter;
@@ -27,26 +27,26 @@ import lombok.Setter;
public class BizOrgPageParam {
/** 当前页 */
- @ApiModelProperty(value = "当前页码")
+ @Schema(description = "当前页码")
private Integer current;
/** 每页条数 */
- @ApiModelProperty(value = "每页条数")
+ @Schema(description = "每页条数")
private Integer size;
/** 排序字段 */
- @ApiModelProperty(value = "排序字段,字段驼峰名称,如:userName")
+ @Schema(description = "排序字段,字段驼峰名称,如:userName")
private String sortField;
/** 排序方式 */
- @ApiModelProperty(value = "排序方式,升序:ASCEND;降序:DESCEND")
+ @Schema(description = "排序方式,升序:ASCEND;降序:DESCEND")
private String sortOrder;
/** 父id */
- @ApiModelProperty(value = "父id")
+ @Schema(description = "父id")
private String parentId;
/** 名称关键词 */
- @ApiModelProperty(value = "名称关键词")
+ @Schema(description = "名称关键词")
private String searchKey;
}
diff --git a/snowy-plugin/snowy-plugin-biz/src/main/java/vip/xiaonuo/biz/modular/org/param/BizOrgSelectorOrgListParam.java b/snowy-plugin/snowy-plugin-biz/src/main/java/vip/xiaonuo/biz/modular/org/param/BizOrgSelectorOrgListParam.java
index f5fea016..542e525b 100644
--- a/snowy-plugin/snowy-plugin-biz/src/main/java/vip/xiaonuo/biz/modular/org/param/BizOrgSelectorOrgListParam.java
+++ b/snowy-plugin/snowy-plugin-biz/src/main/java/vip/xiaonuo/biz/modular/org/param/BizOrgSelectorOrgListParam.java
@@ -12,7 +12,7 @@
*/
package vip.xiaonuo.biz.modular.org.param;
-import io.swagger.annotations.ApiModelProperty;
+import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Getter;
import lombok.Setter;
@@ -27,18 +27,18 @@ import lombok.Setter;
public class BizOrgSelectorOrgListParam {
/** 当前页 */
- @ApiModelProperty(value = "当前页码")
+ @Schema(description = "当前页码")
private Integer current;
/** 每页条数 */
- @ApiModelProperty(value = "每页条数")
+ @Schema(description = "每页条数")
private Integer size;
/** 父id */
- @ApiModelProperty(value = "父id")
+ @Schema(description = "父id")
private String parentId;
/** 名称关键词 */
- @ApiModelProperty(value = "名称关键词")
+ @Schema(description = "名称关键词")
private String searchKey;
}
diff --git a/snowy-plugin/snowy-plugin-biz/src/main/java/vip/xiaonuo/biz/modular/org/param/BizOrgSelectorUserParam.java b/snowy-plugin/snowy-plugin-biz/src/main/java/vip/xiaonuo/biz/modular/org/param/BizOrgSelectorUserParam.java
index 1ba21852..29479761 100644
--- a/snowy-plugin/snowy-plugin-biz/src/main/java/vip/xiaonuo/biz/modular/org/param/BizOrgSelectorUserParam.java
+++ b/snowy-plugin/snowy-plugin-biz/src/main/java/vip/xiaonuo/biz/modular/org/param/BizOrgSelectorUserParam.java
@@ -12,7 +12,7 @@
*/
package vip.xiaonuo.biz.modular.org.param;
-import io.swagger.annotations.ApiModelProperty;
+import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Getter;
import lombok.Setter;
@@ -27,18 +27,18 @@ import lombok.Setter;
public class BizOrgSelectorUserParam {
/** 当前页 */
- @ApiModelProperty(value = "当前页码")
+ @Schema(description = "当前页码")
private Integer current;
/** 每页条数 */
- @ApiModelProperty(value = "每页条数")
+ @Schema(description = "每页条数")
private Integer size;
/** 机构id */
- @ApiModelProperty(value = "机构id")
+ @Schema(description = "机构id")
private String orgId;
/** 姓名关键词 */
- @ApiModelProperty(value = "姓名关键词")
+ @Schema(description = "姓名关键词")
private String searchKey;
}
diff --git a/snowy-plugin/snowy-plugin-biz/src/main/java/vip/xiaonuo/biz/modular/org/service/impl/BizOrgServiceImpl.java b/snowy-plugin/snowy-plugin-biz/src/main/java/vip/xiaonuo/biz/modular/org/service/impl/BizOrgServiceImpl.java
index 12e5090a..24a82f10 100644
--- a/snowy-plugin/snowy-plugin-biz/src/main/java/vip/xiaonuo/biz/modular/org/service/impl/BizOrgServiceImpl.java
+++ b/snowy-plugin/snowy-plugin-biz/src/main/java/vip/xiaonuo/biz/modular/org/service/impl/BizOrgServiceImpl.java
@@ -27,6 +27,7 @@ import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import jakarta.annotation.Resource;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import vip.xiaonuo.auth.core.util.StpLoginUserUtil;
@@ -47,7 +48,6 @@ import vip.xiaonuo.common.listener.CommonDataChangeEventCenter;
import vip.xiaonuo.common.page.CommonPageRequest;
import vip.xiaonuo.sys.api.SysRoleApi;
-import javax.annotation.Resource;
import java.util.Iterator;
import java.util.List;
import java.util.Set;
diff --git a/snowy-plugin/snowy-plugin-biz/src/main/java/vip/xiaonuo/biz/modular/position/controller/BizPositionController.java b/snowy-plugin/snowy-plugin-biz/src/main/java/vip/xiaonuo/biz/modular/position/controller/BizPositionController.java
index 23cc76d0..6986cffa 100644
--- a/snowy-plugin/snowy-plugin-biz/src/main/java/vip/xiaonuo/biz/modular/position/controller/BizPositionController.java
+++ b/snowy-plugin/snowy-plugin-biz/src/main/java/vip/xiaonuo/biz/modular/position/controller/BizPositionController.java
@@ -15,10 +15,11 @@ package vip.xiaonuo.biz.modular.position.controller;
import cn.dev33.satoken.annotation.SaCheckPermission;
import cn.hutool.core.lang.tree.Tree;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
-import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport;
-import com.github.xiaoymin.knife4j.annotations.ApiSupport;
-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.annotation.Resource;
+import jakarta.validation.Valid;
+import jakarta.validation.constraints.NotEmpty;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
@@ -29,11 +30,7 @@ import vip.xiaonuo.biz.modular.position.param.*;
import vip.xiaonuo.biz.modular.position.service.BizPositionService;
import vip.xiaonuo.common.annotation.CommonLog;
import vip.xiaonuo.common.pojo.CommonResult;
-import vip.xiaonuo.common.pojo.CommonValidList;
-import javax.annotation.Resource;
-import javax.validation.Valid;
-import javax.validation.constraints.NotEmpty;
import java.util.List;
/**
@@ -42,8 +39,7 @@ import java.util.List;
* @author xuyuxiang
* @date 2022/4/25 20:40
*/
-@Api(tags = "岗位控制器")
-@ApiSupport(author = "SNOWY_TEAM", order = 2)
+@Tag(name = "岗位控制器")
@RestController
@Validated
public class BizPositionController {
@@ -57,8 +53,7 @@ public class BizPositionController {
* @author xuyuxiang
* @date 2022/4/24 20:00
*/
- @ApiOperationSupport(order = 1)
- @ApiOperation("获取岗位分页")
+ @Operation(summary = "获取岗位分页")
@SaCheckPermission("/biz/position/page")
@GetMapping("/biz/position/page")
public CommonResult> page(BizPositionPageParam bizPositionPageParam) {
@@ -71,8 +66,7 @@ public class BizPositionController {
* @author xuyuxiang
* @date 2022/4/24 20:47
*/
- @ApiOperationSupport(order = 2)
- @ApiOperation("添加岗位")
+ @Operation(summary = "添加岗位")
@CommonLog("添加岗位")
@SaCheckPermission("/biz/position/add")
@PostMapping("/biz/position/add")
@@ -87,8 +81,7 @@ public class BizPositionController {
* @author xuyuxiang
* @date 2022/4/24 20:47
*/
- @ApiOperationSupport(order = 3)
- @ApiOperation("编辑岗位")
+ @Operation(summary = "编辑岗位")
@CommonLog("编辑岗位")
@SaCheckPermission("/biz/position/edit")
@PostMapping("/biz/position/edit")
@@ -103,13 +96,12 @@ public class BizPositionController {
* @author xuyuxiang
* @date 2022/4/24 20:00
*/
- @ApiOperationSupport(order = 4)
- @ApiOperation("删除岗位")
+ @Operation(summary = "删除岗位")
@CommonLog("删除岗位")
@SaCheckPermission("/biz/position/delete")
@PostMapping("/biz/position/delete")
public CommonResult delete(@RequestBody @Valid @NotEmpty(message = "集合不能为空")
- CommonValidList bizPositionIdParamList) {
+ List bizPositionIdParamList) {
bizPositionService.delete(bizPositionIdParamList);
return CommonResult.ok();
}
@@ -120,8 +112,7 @@ public class BizPositionController {
* @author xuyuxiang
* @date 2022/4/24 20:00
*/
- @ApiOperationSupport(order = 5)
- @ApiOperation("获取岗位详情")
+ @Operation(summary = "获取岗位详情")
@SaCheckPermission("/biz/position/detail")
@GetMapping("/biz/position/detail")
public CommonResult detail(@Valid BizPositionIdParam bizPositionIdParam) {
@@ -136,8 +127,7 @@ public class BizPositionController {
* @author xuyuxiang
* @date 2022/4/24 20:00
*/
- @ApiOperationSupport(order = 6)
- @ApiOperation("获取组织树选择器")
+ @Operation(summary = "获取组织树选择器")
@SaCheckPermission("/biz/position/orgTreeSelector")
@GetMapping("/biz/position/orgTreeSelector")
public CommonResult>> orgTreeSelector() {
@@ -150,8 +140,7 @@ public class BizPositionController {
* @author xuyuxiang
* @date 2022/4/24 20:00
*/
- @ApiOperationSupport(order = 7)
- @ApiOperation("获取岗位选择器")
+ @Operation(summary = "获取岗位选择器")
@SaCheckPermission("/biz/position/positionSelector")
@GetMapping("/biz/position/positionSelector")
public CommonResult> positionSelector(BizPositionSelectorPositionParam bizPositionSelectorPositionParam) {
diff --git a/snowy-plugin/snowy-plugin-biz/src/main/java/vip/xiaonuo/biz/modular/position/entity/BizPosition.java b/snowy-plugin/snowy-plugin-biz/src/main/java/vip/xiaonuo/biz/modular/position/entity/BizPosition.java
index 6fbc6a0a..8dad4e8a 100644
--- a/snowy-plugin/snowy-plugin-biz/src/main/java/vip/xiaonuo/biz/modular/position/entity/BizPosition.java
+++ b/snowy-plugin/snowy-plugin-biz/src/main/java/vip/xiaonuo/biz/modular/position/entity/BizPosition.java
@@ -15,8 +15,7 @@ package vip.xiaonuo.biz.modular.position.entity;
import com.baomidou.mybatisplus.annotation.FieldStrategy;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
-import com.fhs.core.trans.vo.TransPojo;
-import io.swagger.annotations.ApiModelProperty;
+import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Getter;
import lombok.Setter;
import vip.xiaonuo.common.pojo.CommonEntity;
@@ -33,31 +32,31 @@ import vip.xiaonuo.common.pojo.CommonEntity;
public class BizPosition extends CommonEntity {
/** id */
- @ApiModelProperty(value = "id", position = 1)
+ @Schema(description = "id")
private String id;
/** 机构id */
- @ApiModelProperty(value = "机构id", position = 2)
+ @Schema(description = "机构id")
private String orgId;
/** 名称 */
- @ApiModelProperty(value = "名称", position = 3)
+ @Schema(description = "名称")
private String name;
/** 编码 */
- @ApiModelProperty(value = "编码", position = 4)
+ @Schema(description = "编码")
private String code;
/** 分类 */
- @ApiModelProperty(value = "分类", position = 5)
+ @Schema(description = "分类")
private String category;
/** 排序码 */
- @ApiModelProperty(value = "排序码", position = 6)
+ @Schema(description = "排序码")
private Integer sortCode;
/** 扩展信息 */
- @ApiModelProperty(value = "扩展信息", position = 7)
+ @Schema(description = "扩展信息")
@TableField(insertStrategy = FieldStrategy.IGNORED, updateStrategy = FieldStrategy.IGNORED)
private String extJson;
}
diff --git a/snowy-plugin/snowy-plugin-biz/src/main/java/vip/xiaonuo/biz/modular/position/param/BizPositionAddParam.java b/snowy-plugin/snowy-plugin-biz/src/main/java/vip/xiaonuo/biz/modular/position/param/BizPositionAddParam.java
index 69d2f882..0ae96260 100644
--- a/snowy-plugin/snowy-plugin-biz/src/main/java/vip/xiaonuo/biz/modular/position/param/BizPositionAddParam.java
+++ b/snowy-plugin/snowy-plugin-biz/src/main/java/vip/xiaonuo/biz/modular/position/param/BizPositionAddParam.java
@@ -12,13 +12,12 @@
*/
package vip.xiaonuo.biz.modular.position.param;
-import io.swagger.annotations.ApiModelProperty;
+import io.swagger.v3.oas.annotations.media.Schema;
+import jakarta.validation.constraints.NotBlank;
+import jakarta.validation.constraints.NotNull;
import lombok.Getter;
import lombok.Setter;
-import javax.validation.constraints.NotBlank;
-import javax.validation.constraints.NotNull;
-
/**
* 岗位添加参数
*
@@ -30,26 +29,26 @@ import javax.validation.constraints.NotNull;
public class BizPositionAddParam {
/** 机构id */
- @ApiModelProperty(value = "机构id", required = true, position = 1)
+ @Schema(description = "机构id", requiredMode = Schema.RequiredMode.REQUIRED)
@NotBlank(message = "orgId不能为空")
private String orgId;
/** 名称 */
- @ApiModelProperty(value = "名称", required = true, position = 2)
+ @Schema(description = "名称", requiredMode = Schema.RequiredMode.REQUIRED)
@NotBlank(message = "name不能为空")
private String name;
/** 分类 */
- @ApiModelProperty(value = "分类", required = true, position = 3)
+ @Schema(description = "分类", requiredMode = Schema.RequiredMode.REQUIRED)
@NotBlank(message = "category不能为空")
private String category;
/** 排序码 */
- @ApiModelProperty(value = "排序码", required = true, position = 4)
+ @Schema(description = "排序码", requiredMode = Schema.RequiredMode.REQUIRED)
@NotNull(message = "sortCode不能为空")
private Integer sortCode;
/** 扩展JSON */
- @ApiModelProperty(value = "扩展JSON", position = 5)
+ @Schema(description = "扩展JSON")
private String extJson;
}
diff --git a/snowy-plugin/snowy-plugin-biz/src/main/java/vip/xiaonuo/biz/modular/position/param/BizPositionEditParam.java b/snowy-plugin/snowy-plugin-biz/src/main/java/vip/xiaonuo/biz/modular/position/param/BizPositionEditParam.java
index 3c1df7fe..df5fb980 100644
--- a/snowy-plugin/snowy-plugin-biz/src/main/java/vip/xiaonuo/biz/modular/position/param/BizPositionEditParam.java
+++ b/snowy-plugin/snowy-plugin-biz/src/main/java/vip/xiaonuo/biz/modular/position/param/BizPositionEditParam.java
@@ -12,13 +12,12 @@
*/
package vip.xiaonuo.biz.modular.position.param;
-import io.swagger.annotations.ApiModelProperty;
+import io.swagger.v3.oas.annotations.media.Schema;
+import jakarta.validation.constraints.NotBlank;
+import jakarta.validation.constraints.NotNull;
import lombok.Getter;
import lombok.Setter;
-import javax.validation.constraints.NotBlank;
-import javax.validation.constraints.NotNull;
-
/**
* 岗位编辑参数
*
@@ -30,31 +29,31 @@ import javax.validation.constraints.NotNull;
public class BizPositionEditParam {
/** id */
- @ApiModelProperty(value = "id", required = true, position = 1)
+ @Schema(description = "id", requiredMode = Schema.RequiredMode.REQUIRED)
@NotBlank(message = "id不能为空")
private String id;
/** 机构id */
- @ApiModelProperty(value = "机构id", required = true, position = 2)
+ @Schema(description = "机构id", requiredMode = Schema.RequiredMode.REQUIRED)
@NotBlank(message = "orgId不能为空")
private String orgId;
/** 名称 */
- @ApiModelProperty(value = "名称", required = true, position = 3)
+ @Schema(description = "名称", requiredMode = Schema.RequiredMode.REQUIRED)
@NotBlank(message = "name不能为空")
private String name;
/** 分类 */
- @ApiModelProperty(value = "分类", required = true, position = 4)
+ @Schema(description = "分类", requiredMode = Schema.RequiredMode.REQUIRED)
@NotBlank(message = "category不能为空")
private String category;
/** 排序码 */
- @ApiModelProperty(value = "排序码", required = true, position = 5)
+ @Schema(description = "排序码", requiredMode = Schema.RequiredMode.REQUIRED)
@NotNull(message = "sortCode不能为空")
private Integer sortCode;
/** 扩展JSON */
- @ApiModelProperty(value = "扩展JSON", position = 6)
+ @Schema(description = "扩展JSON")
private String extJson;
}
diff --git a/snowy-plugin/snowy-plugin-biz/src/main/java/vip/xiaonuo/biz/modular/position/param/BizPositionIdParam.java b/snowy-plugin/snowy-plugin-biz/src/main/java/vip/xiaonuo/biz/modular/position/param/BizPositionIdParam.java
index 032dbb45..5b7510ba 100644
--- a/snowy-plugin/snowy-plugin-biz/src/main/java/vip/xiaonuo/biz/modular/position/param/BizPositionIdParam.java
+++ b/snowy-plugin/snowy-plugin-biz/src/main/java/vip/xiaonuo/biz/modular/position/param/BizPositionIdParam.java
@@ -12,12 +12,11 @@
*/
package vip.xiaonuo.biz.modular.position.param;
-import io.swagger.annotations.ApiModelProperty;
+import io.swagger.v3.oas.annotations.media.Schema;
+import jakarta.validation.constraints.NotBlank;
import lombok.Getter;
import lombok.Setter;
-import javax.validation.constraints.NotBlank;
-
/**
* 岗位Id参数
*
@@ -29,7 +28,7 @@ import javax.validation.constraints.NotBlank;
public class BizPositionIdParam {
/** id */
- @ApiModelProperty(value = "id", required = true)
+ @Schema(description = "id", requiredMode = Schema.RequiredMode.REQUIRED)
@NotBlank(message = "id不能为空")
private String id;
}
diff --git a/snowy-plugin/snowy-plugin-biz/src/main/java/vip/xiaonuo/biz/modular/position/param/BizPositionPageParam.java b/snowy-plugin/snowy-plugin-biz/src/main/java/vip/xiaonuo/biz/modular/position/param/BizPositionPageParam.java
index 68b9b500..05f65608 100644
--- a/snowy-plugin/snowy-plugin-biz/src/main/java/vip/xiaonuo/biz/modular/position/param/BizPositionPageParam.java
+++ b/snowy-plugin/snowy-plugin-biz/src/main/java/vip/xiaonuo/biz/modular/position/param/BizPositionPageParam.java
@@ -12,7 +12,7 @@
*/
package vip.xiaonuo.biz.modular.position.param;
-import io.swagger.annotations.ApiModelProperty;
+import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Getter;
import lombok.Setter;
@@ -27,30 +27,30 @@ import lombok.Setter;
public class BizPositionPageParam {
/** 当前页 */
- @ApiModelProperty(value = "当前页码")
+ @Schema(description = "当前页码")
private Integer current;
/** 每页条数 */
- @ApiModelProperty(value = "每页条数")
+ @Schema(description = "每页条数")
private Integer size;
/** 排序字段 */
- @ApiModelProperty(value = "排序字段,字段驼峰名称,如:userName")
+ @Schema(description = "排序字段,字段驼峰名称,如:userName")
private String sortField;
/** 排序方式 */
- @ApiModelProperty(value = "排序方式,升序:ASCEND;降序:DESCEND")
+ @Schema(description = "排序方式,升序:ASCEND;降序:DESCEND")
private String sortOrder;
/** 机构id */
- @ApiModelProperty(value = "机构id")
+ @Schema(description = "机构id")
private String orgId;
/** 岗位分类 */
- @ApiModelProperty(value = "岗位分类")
+ @Schema(description = "岗位分类")
private String category;
/** 名称关键词 */
- @ApiModelProperty(value = "名称关键词")
+ @Schema(description = "名称关键词")
private String searchKey;
}
diff --git a/snowy-plugin/snowy-plugin-biz/src/main/java/vip/xiaonuo/biz/modular/position/param/BizPositionSelectorPositionParam.java b/snowy-plugin/snowy-plugin-biz/src/main/java/vip/xiaonuo/biz/modular/position/param/BizPositionSelectorPositionParam.java
index 115a1f21..e9b5f79f 100644
--- a/snowy-plugin/snowy-plugin-biz/src/main/java/vip/xiaonuo/biz/modular/position/param/BizPositionSelectorPositionParam.java
+++ b/snowy-plugin/snowy-plugin-biz/src/main/java/vip/xiaonuo/biz/modular/position/param/BizPositionSelectorPositionParam.java
@@ -12,7 +12,7 @@
*/
package vip.xiaonuo.biz.modular.position.param;
-import io.swagger.annotations.ApiModelProperty;
+import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Getter;
import lombok.Setter;
@@ -27,18 +27,18 @@ import lombok.Setter;
public class BizPositionSelectorPositionParam {
/** 当前页 */
- @ApiModelProperty(value = "当前页码")
+ @Schema(description = "当前页码")
private Integer current;
/** 每页条数 */
- @ApiModelProperty(value = "每页条数")
+ @Schema(description = "每页条数")
private Integer size;
/** 机构id */
- @ApiModelProperty(value = "机构id")
+ @Schema(description = "机构id")
private String orgId;
/** 名称关键词 */
- @ApiModelProperty(value = "名称关键词")
+ @Schema(description = "名称关键词")
private String searchKey;
}
diff --git a/snowy-plugin/snowy-plugin-biz/src/main/java/vip/xiaonuo/biz/modular/position/service/impl/BizPositionServiceImpl.java b/snowy-plugin/snowy-plugin-biz/src/main/java/vip/xiaonuo/biz/modular/position/service/impl/BizPositionServiceImpl.java
index f34972a4..2043c49c 100644
--- a/snowy-plugin/snowy-plugin-biz/src/main/java/vip/xiaonuo/biz/modular/position/service/impl/BizPositionServiceImpl.java
+++ b/snowy-plugin/snowy-plugin-biz/src/main/java/vip/xiaonuo/biz/modular/position/service/impl/BizPositionServiceImpl.java
@@ -28,6 +28,7 @@ import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import jakarta.annotation.Resource;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import vip.xiaonuo.auth.core.util.StpLoginUserUtil;
@@ -46,7 +47,6 @@ import vip.xiaonuo.common.exception.CommonException;
import vip.xiaonuo.common.listener.CommonDataChangeEventCenter;
import vip.xiaonuo.common.page.CommonPageRequest;
-import javax.annotation.Resource;
import java.util.List;
import java.util.Set;
import java.util.stream.Collectors;
diff --git a/snowy-plugin/snowy-plugin-biz/src/main/java/vip/xiaonuo/biz/modular/user/controller/BizUserController.java b/snowy-plugin/snowy-plugin-biz/src/main/java/vip/xiaonuo/biz/modular/user/controller/BizUserController.java
index 39f9063d..b0304a91 100644
--- a/snowy-plugin/snowy-plugin-biz/src/main/java/vip/xiaonuo/biz/modular/user/controller/BizUserController.java
+++ b/snowy-plugin/snowy-plugin-biz/src/main/java/vip/xiaonuo/biz/modular/user/controller/BizUserController.java
@@ -15,10 +15,12 @@ package vip.xiaonuo.biz.modular.user.controller;
import cn.dev33.satoken.annotation.SaCheckPermission;
import cn.hutool.core.lang.tree.Tree;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
-import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport;
-import com.github.xiaoymin.knife4j.annotations.ApiSupport;
-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.annotation.Resource;
+import jakarta.servlet.http.HttpServletResponse;
+import jakarta.validation.Valid;
+import jakarta.validation.constraints.NotEmpty;
import org.springframework.http.MediaType;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.GetMapping;
@@ -33,12 +35,7 @@ import vip.xiaonuo.biz.modular.user.result.BizUserRoleResult;
import vip.xiaonuo.biz.modular.user.service.BizUserService;
import vip.xiaonuo.common.annotation.CommonLog;
import vip.xiaonuo.common.pojo.CommonResult;
-import vip.xiaonuo.common.pojo.CommonValidList;
-import javax.annotation.Resource;
-import javax.servlet.http.HttpServletResponse;
-import javax.validation.Valid;
-import javax.validation.constraints.NotEmpty;
import java.io.IOException;
import java.util.List;
@@ -48,8 +45,7 @@ import java.util.List;
* @author xuyuxiang
* @date 2022/4/22 9:34
**/
-@Api(tags = "人员控制器")
-@ApiSupport(author = "SNOWY_TEAM", order = 9)
+@Tag(name = "人员控制器")
@RestController
@Validated
public class BizUserController {
@@ -63,8 +59,7 @@ public class BizUserController {
* @author xuyuxiang
* @date 2022/4/24 20:00
*/
- @ApiOperationSupport(order = 1)
- @ApiOperation("获取人员分页")
+ @Operation(summary = "获取人员分页")
@SaCheckPermission("/biz/user/page")
@GetMapping("/biz/user/page")
public CommonResult> page(BizUserPageParam bizUserPageParam) {
@@ -77,8 +72,7 @@ public class BizUserController {
* @author xuyuxiang
* @date 2022/4/24 20:47
*/
- @ApiOperationSupport(order = 2)
- @ApiOperation("添加人员")
+ @Operation(summary = "添加人员")
@CommonLog("添加人员")
@SaCheckPermission("/biz/user/add")
@PostMapping("/biz/user/add")
@@ -93,8 +87,7 @@ public class BizUserController {
* @author xuyuxiang
* @date 2022/4/24 20:47
*/
- @ApiOperationSupport(order = 3)
- @ApiOperation("编辑人员")
+ @Operation(summary = "编辑人员")
@CommonLog("编辑人员")
@SaCheckPermission("/biz/user/edit")
@PostMapping("/biz/user/edit")
@@ -109,13 +102,12 @@ public class BizUserController {
* @author xuyuxiang
* @date 2022/4/24 20:00
*/
- @ApiOperationSupport(order = 4)
- @ApiOperation("删除人员")
+ @Operation(summary = "删除人员")
@CommonLog("删除人员")
@SaCheckPermission("/biz/user/delete")
@PostMapping("/biz/user/delete")
public CommonResult delete(@RequestBody @Valid @NotEmpty(message = "集合不能为空")
- CommonValidList bizUserIdParamList) {
+ List bizUserIdParamList) {
bizUserService.delete(bizUserIdParamList);
return CommonResult.ok();
}
@@ -126,8 +118,7 @@ public class BizUserController {
* @author xuyuxiang
* @date 2022/4/24 20:00
*/
- @ApiOperationSupport(order = 5)
- @ApiOperation("获取人员详情")
+ @Operation(summary = "获取人员详情")
@SaCheckPermission("/biz/user/detail")
@GetMapping("/biz/user/detail")
public CommonResult detail(@Valid BizUserIdParam bizUserIdParam) {
@@ -140,8 +131,7 @@ public class BizUserController {
* @author xuyuxiang
* @date 2021/10/13 14:01
**/
- @ApiOperationSupport(order = 6)
- @ApiOperation("禁用人员")
+ @Operation(summary = "禁用人员")
@CommonLog("禁用人员")
@SaCheckPermission("/biz/user/disableUser")
@PostMapping("/biz/user/disableUser")
@@ -156,8 +146,7 @@ public class BizUserController {
* @author xuyuxiang
* @date 2021/10/13 14:01
**/
- @ApiOperationSupport(order = 7)
- @ApiOperation("启用人员")
+ @Operation(summary = "启用人员")
@CommonLog("启用人员")
@SaCheckPermission("/biz/user/enableUser")
@PostMapping("/biz/user/enableUser")
@@ -172,8 +161,7 @@ public class BizUserController {
* @author xuyuxiang
* @date 2021/10/13 14:01
**/
- @ApiOperationSupport(order = 8)
- @ApiOperation("重置人员密码")
+ @Operation(summary = "重置人员密码")
@CommonLog("重置人员密码")
@SaCheckPermission("/biz/user/resetPassword")
@PostMapping("/biz/user/resetPassword")
@@ -188,8 +176,7 @@ public class BizUserController {
* @author xuyuxiang
* @date 2022/4/24 20:00
*/
- @ApiOperationSupport(order = 9)
- @ApiOperation("获取人员拥有角色")
+ @Operation(summary = "获取人员拥有角色")
@SaCheckPermission("/biz/user/ownRole")
@GetMapping("/biz/user/ownRole")
public CommonResult> ownRole(@Valid BizUserIdParam bizUserIdParam) {
@@ -202,8 +189,7 @@ public class BizUserController {
* @author xuyuxiang
* @date 2022/4/24 20:00
*/
- @ApiOperationSupport(order = 10)
- @ApiOperation("给人员授权角色")
+ @Operation(summary = "给人员授权角色")
@CommonLog("给人员授权角色")
@SaCheckPermission("/biz/user/grantRole")
@PostMapping("/biz/user/grantRole")
@@ -218,8 +204,7 @@ public class BizUserController {
* @author xuyuxiang
* @date 2022/4/24 20:00
*/
- @ApiOperationSupport(order = 11)
- @ApiOperation("人员导出")
+ @Operation(summary = "人员导出")
@CommonLog("人员导出")
@SaCheckPermission("/biz/user/export")
@GetMapping(value = "/biz/user/export", produces = MediaType.APPLICATION_OCTET_STREAM_VALUE)
@@ -233,8 +218,7 @@ public class BizUserController {
* @author xuyuxiang
* @date 2022/4/24 20:00
*/
- @ApiOperationSupport(order = 12)
- @ApiOperation("导出人员个人信息")
+ @Operation(summary = "导出人员个人信息")
@CommonLog("导出人员个人信息")
@SaCheckPermission("/biz/user/exportUserInfo")
@GetMapping(value = "/biz/user/exportUserInfo", produces = MediaType.APPLICATION_OCTET_STREAM_VALUE)
@@ -250,8 +234,7 @@ public class BizUserController {
* @author xuyuxiang
* @date 2022/4/24 20:00
*/
- @ApiOperationSupport(order = 13)
- @ApiOperation("获取机构树选择器")
+ @Operation(summary = "获取机构树选择器")
@SaCheckPermission("/biz/user/orgTreeSelector")
@GetMapping("/biz/user/orgTreeSelector")
public CommonResult>> orgTreeSelector() {
@@ -264,8 +247,7 @@ public class BizUserController {
* @author xuyuxiang
* @date 2022/4/24 20:00
*/
- @ApiOperationSupport(order = 14)
- @ApiOperation("获取机构列表选择器")
+ @Operation(summary = "获取机构列表选择器")
@SaCheckPermission("/biz/user/orgListSelector")
@GetMapping("/biz/user/orgListSelector")
public CommonResult> orgListSelector(BizUserSelectorOrgListParam bizUserSelectorOrgListParam) {
@@ -278,8 +260,7 @@ public class BizUserController {
* @author xuyuxiang
* @date 2022/4/24 20:00
*/
- @ApiOperationSupport(order = 15)
- @ApiOperation("获取岗位选择器")
+ @Operation(summary = "获取岗位选择器")
@SaCheckPermission("/biz/user/positionSelector")
@GetMapping("/biz/user/positionSelector")
public CommonResult> positionSelector(BizUserSelectorPositionParam bizUserSelectorPositionParam) {
@@ -292,8 +273,7 @@ public class BizUserController {
* @author xuyuxiang
* @date 2022/4/24 20:00
*/
- @ApiOperationSupport(order = 16)
- @ApiOperation("获取角色选择器")
+ @Operation(summary = "获取角色选择器")
@SaCheckPermission("/biz/user/roleSelector")
@GetMapping("/biz/user/roleSelector")
public CommonResult> roleSelector(BizUserSelectorRoleParam bizUserSelectorRoleParam) {
@@ -306,8 +286,7 @@ public class BizUserController {
* @author xuyuxiang
* @date 2022/4/24 20:00
*/
- @ApiOperationSupport(order = 17)
- @ApiOperation("获取人员选择器")
+ @Operation(summary = "获取人员选择器")
@SaCheckPermission("/biz/user/userSelector")
@GetMapping("/biz/user/userSelector")
public CommonResult> userSelector(BizUserSelectorUserParam bizUserSelectorUserParam) {
diff --git a/snowy-plugin/snowy-plugin-biz/src/main/java/vip/xiaonuo/biz/modular/user/entity/BizUser.java b/snowy-plugin/snowy-plugin-biz/src/main/java/vip/xiaonuo/biz/modular/user/entity/BizUser.java
index 2be4e2c7..af95768a 100644
--- a/snowy-plugin/snowy-plugin-biz/src/main/java/vip/xiaonuo/biz/modular/user/entity/BizUser.java
+++ b/snowy-plugin/snowy-plugin-biz/src/main/java/vip/xiaonuo/biz/modular/user/entity/BizUser.java
@@ -19,7 +19,7 @@ import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fhs.core.trans.anno.Trans;
import com.fhs.core.trans.constant.TransType;
-import io.swagger.annotations.ApiModelProperty;
+import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Getter;
import lombok.Setter;
import vip.xiaonuo.biz.modular.org.entity.BizOrg;
@@ -42,240 +42,240 @@ public class BizUser extends CommonEntity {
/** id */
@TableId
- @ApiModelProperty(value = "id", position = 1)
+ @Schema(description = "id")
private String id;
/** 头像 */
- @ApiModelProperty(value = "头像", position = 2)
+ @Schema(description = "头像")
@TableField(insertStrategy = FieldStrategy.IGNORED, updateStrategy = FieldStrategy.IGNORED)
private String avatar;
/** 签名 */
- @ApiModelProperty(value = "签名", position = 3)
+ @Schema(description = "签名")
@TableField(insertStrategy = FieldStrategy.IGNORED, updateStrategy = FieldStrategy.IGNORED)
private String signature;
/** 账号 */
- @ApiModelProperty(value = "账号", position = 4)
+ @Schema(description = "账号")
private String account;
/** 密码 */
@JsonIgnore
- @ApiModelProperty(value = "密码", position = 5)
+ @Schema(description = "密码")
private String password;
/** 姓名 */
- @ApiModelProperty(value = "姓名", position = 6)
+ @Schema(description = "姓名")
private String name;
/** 昵称 */
- @ApiModelProperty(value = "昵称", position = 7)
+ @Schema(description = "昵称")
@TableField(insertStrategy = FieldStrategy.IGNORED, updateStrategy = FieldStrategy.IGNORED)
private String nickname;
/** 性别 */
- @ApiModelProperty(value = "性别", position = 8)
+ @Schema(description = "性别")
@TableField(insertStrategy = FieldStrategy.IGNORED, updateStrategy = FieldStrategy.IGNORED)
@Trans(type = TransType.DICTIONARY, key = "GENDER")
private String gender;
/** 年龄 */
- @ApiModelProperty(value = "年龄", position = 9)
+ @Schema(description = "年龄")
@TableField(insertStrategy = FieldStrategy.IGNORED, updateStrategy = FieldStrategy.IGNORED)
private String age;
/** 出生日期 */
- @ApiModelProperty(value = "出生日期", position = 10)
+ @Schema(description = "出生日期")
@TableField(insertStrategy = FieldStrategy.IGNORED, updateStrategy = FieldStrategy.IGNORED)
private String birthday;
/** 民族 */
- @ApiModelProperty(value = "民族", position = 11)
+ @Schema(description = "民族")
@TableField(insertStrategy = FieldStrategy.IGNORED, updateStrategy = FieldStrategy.IGNORED)
private String nation;
/** 籍贯 */
- @ApiModelProperty(value = "籍贯", position = 12)
+ @Schema(description = "籍贯")
@TableField(insertStrategy = FieldStrategy.IGNORED, updateStrategy = FieldStrategy.IGNORED)
private String nativePlace;
/** 家庭住址 */
- @ApiModelProperty(value = "家庭住址", position = 13)
+ @Schema(description = "家庭住址")
@TableField(insertStrategy = FieldStrategy.IGNORED, updateStrategy = FieldStrategy.IGNORED)
private String homeAddress;
/** 通信地址 */
- @ApiModelProperty(value = "通信地址", position = 14)
+ @Schema(description = "通信地址")
@TableField(insertStrategy = FieldStrategy.IGNORED, updateStrategy = FieldStrategy.IGNORED)
private String mailingAddress;
/** 证件类型 */
- @ApiModelProperty(value = "证件类型", position = 15)
+ @Schema(description = "证件类型")
@TableField(insertStrategy = FieldStrategy.IGNORED, updateStrategy = FieldStrategy.IGNORED)
private String idCardType;
/** 证件号码 */
- @ApiModelProperty(value = "证件号码", position = 16)
+ @Schema(description = "证件号码")
@TableField(insertStrategy = FieldStrategy.IGNORED, updateStrategy = FieldStrategy.IGNORED, typeHandler = CommonSm4CbcTypeHandler.class)
private String idCardNumber;
/** 文化程度 */
- @ApiModelProperty(value = "文化程度", position = 17)
+ @Schema(description = "文化程度")
@TableField(insertStrategy = FieldStrategy.IGNORED, updateStrategy = FieldStrategy.IGNORED)
private String cultureLevel;
/** 政治面貌 */
- @ApiModelProperty(value = "政治面貌", position = 18)
+ @Schema(description = "政治面貌")
@TableField(insertStrategy = FieldStrategy.IGNORED, updateStrategy = FieldStrategy.IGNORED)
private String politicalOutlook;
/** 毕业院校 */
- @ApiModelProperty(value = "毕业院校", position = 19)
+ @Schema(description = "毕业院校")
@TableField(insertStrategy = FieldStrategy.IGNORED, updateStrategy = FieldStrategy.IGNORED)
private String college;
/** 学历 */
- @ApiModelProperty(value = "学历", position = 20)
+ @Schema(description = "学历")
@TableField(insertStrategy = FieldStrategy.IGNORED, updateStrategy = FieldStrategy.IGNORED)
private String education;
/** 学制 */
- @ApiModelProperty(value = "学制", position = 21)
+ @Schema(description = "学制")
@TableField(insertStrategy = FieldStrategy.IGNORED, updateStrategy = FieldStrategy.IGNORED)
private String eduLength;
/** 学位 */
- @ApiModelProperty(value = "学位", position = 22)
+ @Schema(description = "学位")
@TableField(insertStrategy = FieldStrategy.IGNORED, updateStrategy = FieldStrategy.IGNORED)
private String degree;
/** 手机 */
- @ApiModelProperty(value = "手机", position = 23)
+ @Schema(description = "手机")
@TableField(insertStrategy = FieldStrategy.IGNORED, updateStrategy = FieldStrategy.IGNORED, typeHandler = CommonSm4CbcTypeHandler.class)
private String phone;
/** 邮箱 */
- @ApiModelProperty(value = "邮箱", position = 24)
+ @Schema(description = "邮箱")
@TableField(insertStrategy = FieldStrategy.IGNORED, updateStrategy = FieldStrategy.IGNORED)
private String email;
/** 家庭电话 */
- @ApiModelProperty(value = "家庭电话", position = 25)
+ @Schema(description = "家庭电话")
@TableField(insertStrategy = FieldStrategy.IGNORED, updateStrategy = FieldStrategy.IGNORED)
private String homeTel;
/** 办公电话 */
- @ApiModelProperty(value = "办公电话", position = 26)
+ @Schema(description = "办公电话")
@TableField(insertStrategy = FieldStrategy.IGNORED, updateStrategy = FieldStrategy.IGNORED)
private String officeTel;
/** 紧急联系人 */
- @ApiModelProperty(value = "紧急联系人", position = 27)
+ @Schema(description = "紧急联系人")
@TableField(insertStrategy = FieldStrategy.IGNORED, updateStrategy = FieldStrategy.IGNORED)
private String emergencyContact;
/** 紧急联系人电话 */
- @ApiModelProperty(value = "紧急联系人电话", position = 28)
+ @Schema(description = "紧急联系人电话")
@TableField(insertStrategy = FieldStrategy.IGNORED, updateStrategy = FieldStrategy.IGNORED, typeHandler = CommonSm4CbcTypeHandler.class)
private String emergencyPhone;
/** 紧急联系人地址 */
- @ApiModelProperty(value = "紧急联系人地址", position = 29)
+ @Schema(description = "紧急联系人地址")
@TableField(insertStrategy = FieldStrategy.IGNORED, updateStrategy = FieldStrategy.IGNORED)
private String emergencyAddress;
/** 员工编号 */
- @ApiModelProperty(value = "员工编号", position = 30)
+ @Schema(description = "员工编号")
@TableField(insertStrategy = FieldStrategy.IGNORED, updateStrategy = FieldStrategy.IGNORED)
private String empNo;
/** 入职日期 */
- @ApiModelProperty(value = "入职日期", position = 31)
+ @Schema(description = "入职日期")
@TableField(insertStrategy = FieldStrategy.IGNORED, updateStrategy = FieldStrategy.IGNORED)
private String entryDate;
/** 机构id */
- @ApiModelProperty(value = "机构id", position = 32)
+ @Schema(description = "机构id")
@TableField(insertStrategy = FieldStrategy.IGNORED, updateStrategy = FieldStrategy.IGNORED)
@Trans(type = TransType.SIMPLE, target = BizOrg.class, fields = "name", alias = "org", ref = "orgName")
private String orgId;
/** 岗位id */
- @ApiModelProperty(value = "岗位id", position = 33)
+ @Schema(description = "岗位id")
@TableField(insertStrategy = FieldStrategy.IGNORED, updateStrategy = FieldStrategy.IGNORED)
@Trans(type = TransType.SIMPLE, target = BizPosition.class, fields = "name", alias = "position", ref = "positionName")
private String positionId;
/** 职级 */
- @ApiModelProperty(value = "职级", position = 34)
+ @Schema(description = "职级")
@TableField(insertStrategy = FieldStrategy.IGNORED, updateStrategy = FieldStrategy.IGNORED)
private String positionLevel;
/** 主管id */
- @ApiModelProperty(value = "主管id", position = 35)
+ @Schema(description = "主管id")
@TableField(insertStrategy = FieldStrategy.IGNORED, updateStrategy = FieldStrategy.IGNORED)
@Trans(type = TransType.SIMPLE, target = BizUser.class, fields = "name", alias = "director", ref = "directorName")
private String directorId;
/** 兼任信息 */
- @ApiModelProperty(value = "兼任信息", position = 36)
+ @Schema(description = "兼任信息")
@TableField(insertStrategy = FieldStrategy.IGNORED, updateStrategy = FieldStrategy.IGNORED)
private String positionJson;
/** 上次登录ip */
- @ApiModelProperty(value = "上次登录ip", position = 37)
+ @Schema(description = "上次登录ip")
private String lastLoginIp;
/** 上次登录地点 */
- @ApiModelProperty(value = "上次登录地点", position = 38)
+ @Schema(description = "上次登录地点")
private String lastLoginAddress;
/** 上次登录时间 */
- @ApiModelProperty(value = "上次登录时间", position = 39)
+ @Schema(description = "上次登录时间")
private Date lastLoginTime;
/** 上次登录设备 */
- @ApiModelProperty(value = "上次登录设备", position = 40)
+ @Schema(description = "上次登录设备")
private String lastLoginDevice;
/** 最新登录ip */
- @ApiModelProperty(value = "最新登录ip", position = 41)
+ @Schema(description = "最新登录ip")
private String latestLoginIp;
/** 最新登录地点 */
- @ApiModelProperty(value = "最新登录地点", position = 42)
+ @Schema(description = "最新登录地点")
private String latestLoginAddress;
/** 最新登录时间 */
- @ApiModelProperty(value = "最新登录时间", position = 43)
+ @Schema(description = "最新登录时间")
private Date latestLoginTime;
/** 最新登录设备 */
- @ApiModelProperty(value = "最新登录设备", position = 44)
+ @Schema(description = "最新登录设备")
private String latestLoginDevice;
/** 用户状态 */
- @ApiModelProperty(value = "用户状态", position = 45)
+ @Schema(description = "用户状态")
private String userStatus;
/** 排序码 */
- @ApiModelProperty(value = "排序码", position = 46)
+ @Schema(description = "排序码")
private Integer sortCode;
/** 扩展信息 */
- @ApiModelProperty(value = "扩展信息", position = 47)
+ @Schema(description = "扩展信息")
@TableField(insertStrategy = FieldStrategy.IGNORED, updateStrategy = FieldStrategy.IGNORED)
private String extJson;
- @ApiModelProperty(value = "机构名称", position = 48)
+ @Schema(description = "机构名称")
@TableField(exist = false)
private String orgName;
- @ApiModelProperty(value = "岗位名称", position = 49)
+ @Schema(description = "岗位名称")
@TableField(exist = false)
private String positionName;
- @ApiModelProperty(value = "主管名称", position = 50)
+ @Schema(description = "主管名称")
@TableField(exist = false)
private String directorName;
}
diff --git a/snowy-plugin/snowy-plugin-biz/src/main/java/vip/xiaonuo/biz/modular/user/param/BizUserAddParam.java b/snowy-plugin/snowy-plugin-biz/src/main/java/vip/xiaonuo/biz/modular/user/param/BizUserAddParam.java
index 3277a5e4..1604bb61 100644
--- a/snowy-plugin/snowy-plugin-biz/src/main/java/vip/xiaonuo/biz/modular/user/param/BizUserAddParam.java
+++ b/snowy-plugin/snowy-plugin-biz/src/main/java/vip/xiaonuo/biz/modular/user/param/BizUserAddParam.java
@@ -12,12 +12,11 @@
*/
package vip.xiaonuo.biz.modular.user.param;
-import io.swagger.annotations.ApiModelProperty;
+import io.swagger.v3.oas.annotations.media.Schema;
+import jakarta.validation.constraints.NotBlank;
import lombok.Getter;
import lombok.Setter;
-import javax.validation.constraints.NotBlank;
-
/**
* 人员添加参数
*
@@ -29,150 +28,150 @@ import javax.validation.constraints.NotBlank;
public class BizUserAddParam {
/** 账号 */
- @ApiModelProperty(value = "账号", required = true, position = 1)
+ @Schema(description = "账号", requiredMode = Schema.RequiredMode.REQUIRED)
@NotBlank(message = "account不能为空")
private String account;
/** 姓名 */
- @ApiModelProperty(value = "姓名", required = true, position = 2)
+ @Schema(description = "姓名", requiredMode = Schema.RequiredMode.REQUIRED)
@NotBlank(message = "name不能为空")
private String name;
/** 机构id */
- @ApiModelProperty(value = "机构id", required = true, position = 3)
+ @Schema(description = "机构id", requiredMode = Schema.RequiredMode.REQUIRED)
@NotBlank(message = "orgId不能为空")
private String orgId;
/** 岗位id */
- @ApiModelProperty(value = "岗位id", required = true, position = 4)
+ @Schema(description = "岗位id", requiredMode = Schema.RequiredMode.REQUIRED)
@NotBlank(message = "positionId不能为空")
private String positionId;
/** 岗级 */
- @ApiModelProperty(value = "岗级", position = 5)
+ @Schema(description = "岗级")
private String positionLevel;
/** 主管id */
- @ApiModelProperty(value = "主管id", position = 6)
+ @Schema(description = "主管id")
private String directorId;
/** 头像 */
- @ApiModelProperty(value = "头像,图片base64", position = 7)
+ @Schema(description = "头像,图片base64")
private String avatar;
/** 签名 */
- @ApiModelProperty(value = "签名,图片base64", position = 8)
+ @Schema(description = "签名,图片base64")
private String signature;
/** 昵称 */
- @ApiModelProperty(value = "昵称", position = 9)
+ @Schema(description = "昵称")
private String nickname;
/** 性别 */
- @ApiModelProperty(value = "性别", position = 10)
+ @Schema(description = "性别")
private String gender;
/** 年龄 */
- @ApiModelProperty(value = "年龄", position = 11)
+ @Schema(description = "年龄")
private String age;
/** 出生日期 */
- @ApiModelProperty(value = "出生日期", position = 12)
+ @Schema(description = "出生日期")
private String birthday;
/** 民族 */
- @ApiModelProperty(value = "民族", position = 13)
+ @Schema(description = "民族")
private String nation;
/** 籍贯 */
- @ApiModelProperty(value = "籍贯", position = 14)
+ @Schema(description = "籍贯")
private String nativePlace;
/** 家庭住址 */
- @ApiModelProperty(value = "家庭住址", position = 15)
+ @Schema(description = "家庭住址")
private String homeAddress;
/** 通信地址 */
- @ApiModelProperty(value = "通信地址", position = 16)
+ @Schema(description = "通信地址")
private String mailingAddress;
/** 证件类型 */
- @ApiModelProperty(value = "证件类型", position = 17)
+ @Schema(description = "证件类型")
private String idCardType;
/** 证件号码 */
- @ApiModelProperty(value = "证件号码", position = 18)
+ @Schema(description = "证件号码")
private String idCardNumber;
/** 文化程度 */
- @ApiModelProperty(value = "文化程度", position = 19)
+ @Schema(description = "文化程度")
private String cultureLevel;
/** 政治面貌 */
- @ApiModelProperty(value = "政治面貌", position = 20)
+ @Schema(description = "政治面貌")
private String politicalOutlook;
/** 毕业院校 */
- @ApiModelProperty(value = "毕业院校", position = 21)
+ @Schema(description = "毕业院校")
private String college;
/** 学历 */
- @ApiModelProperty(value = "学历", position = 22)
+ @Schema(description = "学历")
private String education;
/** 学制 */
- @ApiModelProperty(value = "学制", position = 23)
+ @Schema(description = "学制")
private String eduLength;
/** 学位 */
- @ApiModelProperty(value = "学位", position = 24)
+ @Schema(description = "学位")
private String degree;
/** 手机 */
- @ApiModelProperty(value = "手机", position = 25)
+ @Schema(description = "手机")
private String phone;
/** 邮箱 */
- @ApiModelProperty(value = "邮箱", position = 26)
+ @Schema(description = "邮箱")
private String email;
/** 家庭电话 */
- @ApiModelProperty(value = "家庭电话", position = 27)
+ @Schema(description = "家庭电话")
private String homeTel;
/** 办公电话 */
- @ApiModelProperty(value = "办公电话", position = 28)
+ @Schema(description = "办公电话")
private String officeTel;
/** 紧急联系人 */
- @ApiModelProperty(value = "紧急联系人", position = 29)
+ @Schema(description = "紧急联系人")
private String emergencyContact;
/** 紧急联系人电话 */
- @ApiModelProperty(value = "紧急联系人电话", position = 30)
+ @Schema(description = "紧急联系人电话")
private String emergencyPhone;
/** 紧急联系人地址 */
- @ApiModelProperty(value = "紧急联系人地址", position = 31)
+ @Schema(description = "紧急联系人地址")
private String emergencyAddress;
/** 员工编号 */
- @ApiModelProperty(value = "员工编号", position = 32)
+ @Schema(description = "员工编号")
private String empNo;
/** 入职日期 */
- @ApiModelProperty(value = "员工编号", position = 33)
+ @Schema(description = "员工编号")
private String entryDate;
/** 兼任信息 */
- @ApiModelProperty(value = "兼任信息", position = 34)
+ @Schema(description = "兼任信息")
private String positionJson;
/** 排序码 */
- @ApiModelProperty(value = "排序码", position = 35)
+ @Schema(description = "排序码")
private Integer sortCode;
/** 扩展信息 */
- @ApiModelProperty(value = "扩展信息", position = 36)
+ @Schema(description = "扩展信息")
private String extJson;
}
diff --git a/snowy-plugin/snowy-plugin-biz/src/main/java/vip/xiaonuo/biz/modular/user/param/BizUserEditParam.java b/snowy-plugin/snowy-plugin-biz/src/main/java/vip/xiaonuo/biz/modular/user/param/BizUserEditParam.java
index 8898da01..ee0e7c1a 100644
--- a/snowy-plugin/snowy-plugin-biz/src/main/java/vip/xiaonuo/biz/modular/user/param/BizUserEditParam.java
+++ b/snowy-plugin/snowy-plugin-biz/src/main/java/vip/xiaonuo/biz/modular/user/param/BizUserEditParam.java
@@ -12,12 +12,11 @@
*/
package vip.xiaonuo.biz.modular.user.param;
-import io.swagger.annotations.ApiModelProperty;
+import io.swagger.v3.oas.annotations.media.Schema;
+import jakarta.validation.constraints.NotBlank;
import lombok.Getter;
import lombok.Setter;
-import javax.validation.constraints.NotBlank;
-
/**
* 人员编辑参数
*
@@ -29,155 +28,155 @@ import javax.validation.constraints.NotBlank;
public class BizUserEditParam {
/** id */
- @ApiModelProperty(value = "id", required = true, position = 1)
+ @Schema(description = "id", requiredMode = Schema.RequiredMode.REQUIRED)
@NotBlank(message = "id不能为空")
private String id;
/** 账号 */
- @ApiModelProperty(value = "账号", required = true, position = 2)
+ @Schema(description = "账号", requiredMode = Schema.RequiredMode.REQUIRED)
@NotBlank(message = "account不能为空")
private String account;
/** 姓名 */
- @ApiModelProperty(value = "姓名", required = true, position = 3)
+ @Schema(description = "姓名", requiredMode = Schema.RequiredMode.REQUIRED)
@NotBlank(message = "name不能为空")
private String name;
/** 机构id */
- @ApiModelProperty(value = "机构id", required = true, position = 4)
+ @Schema(description = "机构id", requiredMode = Schema.RequiredMode.REQUIRED)
@NotBlank(message = "orgId不能为空")
private String orgId;
/** 岗位id */
- @ApiModelProperty(value = "岗位id", required = true, position = 5)
+ @Schema(description = "岗位id", requiredMode = Schema.RequiredMode.REQUIRED)
@NotBlank(message = "positionId不能为空")
private String positionId;
/** 岗级 */
- @ApiModelProperty(value = "岗级", position = 6)
+ @Schema(description = "岗级")
private String positionLevel;
/** 主管id */
- @ApiModelProperty(value = "主管id", position = 7)
+ @Schema(description = "主管id")
private String directorId;
/** 头像 */
- @ApiModelProperty(value = "头像,图片base64", position = 8)
+ @Schema(description = "头像,图片base64")
private String avatar;
/** 签名 */
- @ApiModelProperty(value = "签名,图片base64", position = 9)
+ @Schema(description = "签名,图片base64")
private String signature;
/** 昵称 */
- @ApiModelProperty(value = "昵称", position = 10)
+ @Schema(description = "昵称")
private String nickname;
/** 性别 */
- @ApiModelProperty(value = "性别", position = 11)
+ @Schema(description = "性别")
private String gender;
/** 年龄 */
- @ApiModelProperty(value = "年龄", position = 12)
+ @Schema(description = "年龄")
private String age;
/** 出生日期 */
- @ApiModelProperty(value = "出生日期", position = 13)
+ @Schema(description = "出生日期")
private String birthday;
/** 民族 */
- @ApiModelProperty(value = "民族", position = 14)
+ @Schema(description = "民族")
private String nation;
/** 籍贯 */
- @ApiModelProperty(value = "籍贯", position = 15)
+ @Schema(description = "籍贯")
private String nativePlace;
/** 家庭住址 */
- @ApiModelProperty(value = "家庭住址", position = 16)
+ @Schema(description = "家庭住址")
private String homeAddress;
/** 通信地址 */
- @ApiModelProperty(value = "通信地址", position = 17)
+ @Schema(description = "通信地址")
private String mailingAddress;
/** 证件类型 */
- @ApiModelProperty(value = "证件类型", position = 18)
+ @Schema(description = "证件类型")
private String idCardType;
/** 证件号码 */
- @ApiModelProperty(value = "证件号码", position = 19)
+ @Schema(description = "证件号码")
private String idCardNumber;
/** 文化程度 */
- @ApiModelProperty(value = "文化程度", position = 20)
+ @Schema(description = "文化程度")
private String cultureLevel;
/** 政治面貌 */
- @ApiModelProperty(value = "政治面貌", position = 21)
+ @Schema(description = "政治面貌")
private String politicalOutlook;
/** 毕业院校 */
- @ApiModelProperty(value = "毕业院校", position = 22)
+ @Schema(description = "毕业院校")
private String college;
/** 学历 */
- @ApiModelProperty(value = "学历", position = 23)
+ @Schema(description = "学历")
private String education;
/** 学制 */
- @ApiModelProperty(value = "学制", position = 24)
+ @Schema(description = "学制")
private String eduLength;
/** 学位 */
- @ApiModelProperty(value = "学位", position = 25)
+ @Schema(description = "学位")
private String degree;
/** 手机 */
- @ApiModelProperty(value = "手机", position = 26)
+ @Schema(description = "手机")
private String phone;
/** 邮箱 */
- @ApiModelProperty(value = "邮箱", position = 27)
+ @Schema(description = "邮箱")
private String email;
/** 家庭电话 */
- @ApiModelProperty(value = "家庭电话", position = 28)
+ @Schema(description = "家庭电话")
private String homeTel;
/** 办公电话 */
- @ApiModelProperty(value = "办公电话", position = 29)
+ @Schema(description = "办公电话")
private String officeTel;
/** 紧急联系人 */
- @ApiModelProperty(value = "紧急联系人", position = 30)
+ @Schema(description = "紧急联系人")
private String emergencyContact;
/** 紧急联系人电话 */
- @ApiModelProperty(value = "紧急联系人电话", position = 31)
+ @Schema(description = "紧急联系人电话")
private String emergencyPhone;
/** 紧急联系人地址 */
- @ApiModelProperty(value = "紧急联系人地址", position = 32)
+ @Schema(description = "紧急联系人地址")
private String emergencyAddress;
/** 员工编号 */
- @ApiModelProperty(value = "员工编号", position = 33)
+ @Schema(description = "员工编号")
private String empNo;
/** 入职日期 */
- @ApiModelProperty(value = "员工编号", position = 34)
+ @Schema(description = "员工编号")
private String entryDate;
/** 兼任信息 */
- @ApiModelProperty(value = "兼任信息", position = 35)
+ @Schema(description = "兼任信息")
private String positionJson;
/** 排序码 */
- @ApiModelProperty(value = "排序码", position = 36)
+ @Schema(description = "排序码")
private Integer sortCode;
/** 扩展信息 */
- @ApiModelProperty(value = "扩展信息", position = 37)
+ @Schema(description = "扩展信息")
private String extJson;
}
diff --git a/snowy-plugin/snowy-plugin-biz/src/main/java/vip/xiaonuo/biz/modular/user/param/BizUserExportParam.java b/snowy-plugin/snowy-plugin-biz/src/main/java/vip/xiaonuo/biz/modular/user/param/BizUserExportParam.java
index 53e2bd65..234b2840 100644
--- a/snowy-plugin/snowy-plugin-biz/src/main/java/vip/xiaonuo/biz/modular/user/param/BizUserExportParam.java
+++ b/snowy-plugin/snowy-plugin-biz/src/main/java/vip/xiaonuo/biz/modular/user/param/BizUserExportParam.java
@@ -12,7 +12,7 @@
*/
package vip.xiaonuo.biz.modular.user.param;
-import io.swagger.annotations.ApiModelProperty;
+import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Getter;
import lombok.Setter;
@@ -27,14 +27,14 @@ import lombok.Setter;
public class BizUserExportParam {
/** 人员状态 */
- @ApiModelProperty(value = "人员状态")
+ @Schema(description = "人员状态")
private String userStatus;
/** 账号、姓名、手机号关键词 */
- @ApiModelProperty(value = "账号、姓名、手机号关键词")
+ @Schema(description = "账号、姓名、手机号关键词")
private String searchKey;
/** 人员id集合 */
- @ApiModelProperty(value = "人员id集合")
+ @Schema(description = "人员id集合")
private String userIds;
}
diff --git a/snowy-plugin/snowy-plugin-biz/src/main/java/vip/xiaonuo/biz/modular/user/param/BizUserGrantRoleParam.java b/snowy-plugin/snowy-plugin-biz/src/main/java/vip/xiaonuo/biz/modular/user/param/BizUserGrantRoleParam.java
index aaf3519b..f7809015 100644
--- a/snowy-plugin/snowy-plugin-biz/src/main/java/vip/xiaonuo/biz/modular/user/param/BizUserGrantRoleParam.java
+++ b/snowy-plugin/snowy-plugin-biz/src/main/java/vip/xiaonuo/biz/modular/user/param/BizUserGrantRoleParam.java
@@ -12,12 +12,12 @@
*/
package vip.xiaonuo.biz.modular.user.param;
-import io.swagger.annotations.ApiModelProperty;
+import io.swagger.v3.oas.annotations.media.Schema;
+import jakarta.validation.constraints.NotBlank;
+import jakarta.validation.constraints.NotNull;
import lombok.Getter;
import lombok.Setter;
-import javax.validation.constraints.NotBlank;
-import javax.validation.constraints.NotNull;
import java.util.List;
/**
@@ -31,12 +31,12 @@ import java.util.List;
public class BizUserGrantRoleParam {
/** id */
- @ApiModelProperty(value = "id", required = true, position = 1)
+ @Schema(description = "id", requiredMode = Schema.RequiredMode.REQUIRED)
@NotBlank(message = "id不能为空")
private String id;
/** 角色id集合 */
- @ApiModelProperty(value = "角色id集合", required = true, position = 2)
+ @Schema(description = "角色id集合", requiredMode = Schema.RequiredMode.REQUIRED)
@NotNull(message = "roleIdList不能为空")
private List roleIdList;
}
diff --git a/snowy-plugin/snowy-plugin-biz/src/main/java/vip/xiaonuo/biz/modular/user/param/BizUserIdParam.java b/snowy-plugin/snowy-plugin-biz/src/main/java/vip/xiaonuo/biz/modular/user/param/BizUserIdParam.java
index 67295dea..21d7e643 100644
--- a/snowy-plugin/snowy-plugin-biz/src/main/java/vip/xiaonuo/biz/modular/user/param/BizUserIdParam.java
+++ b/snowy-plugin/snowy-plugin-biz/src/main/java/vip/xiaonuo/biz/modular/user/param/BizUserIdParam.java
@@ -12,12 +12,11 @@
*/
package vip.xiaonuo.biz.modular.user.param;
-import io.swagger.annotations.ApiModelProperty;
+import io.swagger.v3.oas.annotations.media.Schema;
+import jakarta.validation.constraints.NotBlank;
import lombok.Getter;
import lombok.Setter;
-import javax.validation.constraints.NotBlank;
-
/**
* 人员Id参数
*
@@ -29,7 +28,7 @@ import javax.validation.constraints.NotBlank;
public class BizUserIdParam {
/** id */
- @ApiModelProperty(value = "id", required = true)
+ @Schema(description = "id", requiredMode = Schema.RequiredMode.REQUIRED)
@NotBlank(message = "id不能为空")
private String id;
}
diff --git a/snowy-plugin/snowy-plugin-biz/src/main/java/vip/xiaonuo/biz/modular/user/param/BizUserPageParam.java b/snowy-plugin/snowy-plugin-biz/src/main/java/vip/xiaonuo/biz/modular/user/param/BizUserPageParam.java
index 507d5d55..ba53e578 100644
--- a/snowy-plugin/snowy-plugin-biz/src/main/java/vip/xiaonuo/biz/modular/user/param/BizUserPageParam.java
+++ b/snowy-plugin/snowy-plugin-biz/src/main/java/vip/xiaonuo/biz/modular/user/param/BizUserPageParam.java
@@ -12,7 +12,7 @@
*/
package vip.xiaonuo.biz.modular.user.param;
-import io.swagger.annotations.ApiModelProperty;
+import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Getter;
import lombok.Setter;
@@ -27,30 +27,30 @@ import lombok.Setter;
public class BizUserPageParam {
/** 当前页 */
- @ApiModelProperty(value = "当前页码")
+ @Schema(description = "当前页码")
private Integer current;
/** 每页条数 */
- @ApiModelProperty(value = "每页条数")
+ @Schema(description = "每页条数")
private Integer size;
/** 排序字段 */
- @ApiModelProperty(value = "排序字段,字段驼峰名称,如:userName")
+ @Schema(description = "排序字段,字段驼峰名称,如:userName")
private String sortField;
/** 排序方式 */
- @ApiModelProperty(value = "排序方式,升序:ASCEND;降序:DESCEND")
+ @Schema(description = "排序方式,升序:ASCEND;降序:DESCEND")
private String sortOrder;
/** 姓名关键词 */
- @ApiModelProperty(value = "账号、姓名、手机号关键词")
+ @Schema(description = "账号、姓名、手机号关键词")
private String searchKey;
/** 人员状态 */
- @ApiModelProperty(value = "人员状态")
+ @Schema(description = "人员状态")
private String userStatus;
/** 所属机构 */
- @ApiModelProperty(value = "所属机构")
+ @Schema(description = "所属机构")
private String orgId;
}
diff --git a/snowy-plugin/snowy-plugin-biz/src/main/java/vip/xiaonuo/biz/modular/user/param/BizUserSelectorOrgListParam.java b/snowy-plugin/snowy-plugin-biz/src/main/java/vip/xiaonuo/biz/modular/user/param/BizUserSelectorOrgListParam.java
index defc6445..96edd5c1 100644
--- a/snowy-plugin/snowy-plugin-biz/src/main/java/vip/xiaonuo/biz/modular/user/param/BizUserSelectorOrgListParam.java
+++ b/snowy-plugin/snowy-plugin-biz/src/main/java/vip/xiaonuo/biz/modular/user/param/BizUserSelectorOrgListParam.java
@@ -12,7 +12,7 @@
*/
package vip.xiaonuo.biz.modular.user.param;
-import io.swagger.annotations.ApiModelProperty;
+import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Getter;
import lombok.Setter;
@@ -27,18 +27,18 @@ import lombok.Setter;
public class BizUserSelectorOrgListParam {
/** 当前页 */
- @ApiModelProperty(value = "当前页码")
+ @Schema(description = "当前页码")
private Integer current;
/** 每页条数 */
- @ApiModelProperty(value = "每页条数")
+ @Schema(description = "每页条数")
private Integer size;
/** 父id */
- @ApiModelProperty(value = "父id")
+ @Schema(description = "父id")
private String parentId;
/** 名称关键词 */
- @ApiModelProperty(value = "名称关键词")
+ @Schema(description = "名称关键词")
private String searchKey;
}
diff --git a/snowy-plugin/snowy-plugin-biz/src/main/java/vip/xiaonuo/biz/modular/user/param/BizUserSelectorPositionParam.java b/snowy-plugin/snowy-plugin-biz/src/main/java/vip/xiaonuo/biz/modular/user/param/BizUserSelectorPositionParam.java
index dd9a5200..acc5b3aa 100644
--- a/snowy-plugin/snowy-plugin-biz/src/main/java/vip/xiaonuo/biz/modular/user/param/BizUserSelectorPositionParam.java
+++ b/snowy-plugin/snowy-plugin-biz/src/main/java/vip/xiaonuo/biz/modular/user/param/BizUserSelectorPositionParam.java
@@ -12,7 +12,7 @@
*/
package vip.xiaonuo.biz.modular.user.param;
-import io.swagger.annotations.ApiModelProperty;
+import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Getter;
import lombok.Setter;
@@ -27,18 +27,18 @@ import lombok.Setter;
public class BizUserSelectorPositionParam {
/** 当前页 */
- @ApiModelProperty(value = "当前页码")
+ @Schema(description = "当前页码")
private Integer current;
/** 每页条数 */
- @ApiModelProperty(value = "每页条数")
+ @Schema(description = "每页条数")
private Integer size;
/** 机构id */
- @ApiModelProperty(value = "机构id")
+ @Schema(description = "机构id")
private String orgId;
/** 名称关键词 */
- @ApiModelProperty(value = "名称关键词")
+ @Schema(description = "名称关键词")
private String searchKey;
}
diff --git a/snowy-plugin/snowy-plugin-biz/src/main/java/vip/xiaonuo/biz/modular/user/param/BizUserSelectorRoleParam.java b/snowy-plugin/snowy-plugin-biz/src/main/java/vip/xiaonuo/biz/modular/user/param/BizUserSelectorRoleParam.java
index b1f14ac0..ad66c551 100644
--- a/snowy-plugin/snowy-plugin-biz/src/main/java/vip/xiaonuo/biz/modular/user/param/BizUserSelectorRoleParam.java
+++ b/snowy-plugin/snowy-plugin-biz/src/main/java/vip/xiaonuo/biz/modular/user/param/BizUserSelectorRoleParam.java
@@ -12,7 +12,7 @@
*/
package vip.xiaonuo.biz.modular.user.param;
-import io.swagger.annotations.ApiModelProperty;
+import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Getter;
import lombok.Setter;
@@ -27,22 +27,22 @@ import lombok.Setter;
public class BizUserSelectorRoleParam {
/** 当前页 */
- @ApiModelProperty(value = "当前页码")
+ @Schema(description = "当前页码")
private Integer current;
/** 每页条数 */
- @ApiModelProperty(value = "每页条数")
+ @Schema(description = "每页条数")
private Integer size;
/** 组织id */
- @ApiModelProperty(value = "组织id")
+ @Schema(description = "组织id")
private String orgId;
/** 角色分类 */
- @ApiModelProperty(value = "角色分类")
+ @Schema(description = "角色分类")
private String category;
/** 名称关键词 */
- @ApiModelProperty(value = "名称关键词")
+ @Schema(description = "名称关键词")
private String searchKey;
}
diff --git a/snowy-plugin/snowy-plugin-biz/src/main/java/vip/xiaonuo/biz/modular/user/param/BizUserSelectorUserParam.java b/snowy-plugin/snowy-plugin-biz/src/main/java/vip/xiaonuo/biz/modular/user/param/BizUserSelectorUserParam.java
index e6a4121c..263c5a85 100644
--- a/snowy-plugin/snowy-plugin-biz/src/main/java/vip/xiaonuo/biz/modular/user/param/BizUserSelectorUserParam.java
+++ b/snowy-plugin/snowy-plugin-biz/src/main/java/vip/xiaonuo/biz/modular/user/param/BizUserSelectorUserParam.java
@@ -12,7 +12,7 @@
*/
package vip.xiaonuo.biz.modular.user.param;
-import io.swagger.annotations.ApiModelProperty;
+import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Getter;
import lombok.Setter;
@@ -27,18 +27,18 @@ import lombok.Setter;
public class BizUserSelectorUserParam {
/** 当前页 */
- @ApiModelProperty(value = "当前页码")
+ @Schema(description = "当前页码")
private Integer current;
/** 每页条数 */
- @ApiModelProperty(value = "每页条数")
+ @Schema(description = "每页条数")
private Integer size;
/** 组织id */
- @ApiModelProperty(value = "组织id")
+ @Schema(description = "组织id")
private String orgId;
/** 姓名关键词 */
- @ApiModelProperty(value = "姓名关键词")
+ @Schema(description = "姓名关键词")
private String searchKey;
}
diff --git a/snowy-plugin/snowy-plugin-biz/src/main/java/vip/xiaonuo/biz/modular/user/result/BizUserRoleResult.java b/snowy-plugin/snowy-plugin-biz/src/main/java/vip/xiaonuo/biz/modular/user/result/BizUserRoleResult.java
index 4abee597..041b9840 100644
--- a/snowy-plugin/snowy-plugin-biz/src/main/java/vip/xiaonuo/biz/modular/user/result/BizUserRoleResult.java
+++ b/snowy-plugin/snowy-plugin-biz/src/main/java/vip/xiaonuo/biz/modular/user/result/BizUserRoleResult.java
@@ -12,7 +12,7 @@
*/
package vip.xiaonuo.biz.modular.user.result;
-import io.swagger.annotations.ApiModelProperty;
+import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Getter;
import lombok.Setter;
@@ -27,22 +27,22 @@ import lombok.Setter;
public class BizUserRoleResult {
/** id */
- @ApiModelProperty(value = "id", position = 1)
+ @Schema(description = "id")
private String id;
/** 组织id */
- @ApiModelProperty(value = "机构id", position = 2)
+ @Schema(description = "机构id")
private String orgId;
/** 名称 */
- @ApiModelProperty(value = "名称", position = 3)
+ @Schema(description = "名称")
private String name;
/** 分类 */
- @ApiModelProperty(value = "分类", position = 4)
+ @Schema(description = "分类")
private String category;
/** 排序码 */
- @ApiModelProperty(value = "排序码", position = 5)
+ @Schema(description = "排序码")
private Integer sortCode;
}
diff --git a/snowy-plugin/snowy-plugin-biz/src/main/java/vip/xiaonuo/biz/modular/user/service/BizUserService.java b/snowy-plugin/snowy-plugin-biz/src/main/java/vip/xiaonuo/biz/modular/user/service/BizUserService.java
index d14a0080..1532f8c7 100644
--- a/snowy-plugin/snowy-plugin-biz/src/main/java/vip/xiaonuo/biz/modular/user/service/BizUserService.java
+++ b/snowy-plugin/snowy-plugin-biz/src/main/java/vip/xiaonuo/biz/modular/user/service/BizUserService.java
@@ -15,13 +15,13 @@ package vip.xiaonuo.biz.modular.user.service;
import cn.hutool.core.lang.tree.Tree;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.IService;
+import jakarta.servlet.http.HttpServletResponse;
import vip.xiaonuo.biz.modular.org.entity.BizOrg;
import vip.xiaonuo.biz.modular.position.entity.BizPosition;
import vip.xiaonuo.biz.modular.user.entity.BizUser;
import vip.xiaonuo.biz.modular.user.param.*;
import vip.xiaonuo.biz.modular.user.result.BizUserRoleResult;
-import javax.servlet.http.HttpServletResponse;
import java.io.IOException;
import java.util.List;
diff --git a/snowy-plugin/snowy-plugin-biz/src/main/java/vip/xiaonuo/biz/modular/user/service/impl/BizUserServiceImpl.java b/snowy-plugin/snowy-plugin-biz/src/main/java/vip/xiaonuo/biz/modular/user/service/impl/BizUserServiceImpl.java
index 90b801b5..38acd4ff 100644
--- a/snowy-plugin/snowy-plugin-biz/src/main/java/vip/xiaonuo/biz/modular/user/service/impl/BizUserServiceImpl.java
+++ b/snowy-plugin/snowy-plugin-biz/src/main/java/vip/xiaonuo/biz/modular/user/service/impl/BizUserServiceImpl.java
@@ -47,6 +47,8 @@ import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.fhs.trans.service.impl.TransService;
+import jakarta.annotation.Resource;
+import jakarta.servlet.http.HttpServletResponse;
import org.apache.poi.ss.usermodel.*;
import org.apache.poi.xwpf.usermodel.XWPFDocument;
import org.springframework.stereotype.Service;
@@ -63,6 +65,7 @@ import vip.xiaonuo.biz.modular.user.enums.BizRoleCategoryEnum;
import vip.xiaonuo.biz.modular.user.enums.BizUserStatusEnum;
import vip.xiaonuo.biz.modular.user.mapper.BizUserMapper;
import vip.xiaonuo.biz.modular.user.param.*;
+import vip.xiaonuo.biz.modular.user.result.BizUserExportResult;
import vip.xiaonuo.biz.modular.user.result.BizUserRoleResult;
import vip.xiaonuo.biz.modular.user.service.BizUserService;
import vip.xiaonuo.common.enums.CommonSortOrderEnum;
@@ -74,10 +77,7 @@ import vip.xiaonuo.common.util.*;
import vip.xiaonuo.dev.api.DevConfigApi;
import vip.xiaonuo.sys.api.SysRoleApi;
import vip.xiaonuo.sys.api.SysUserApi;
-import vip.xiaonuo.biz.modular.user.result.BizUserExportResult;
-import javax.annotation.Resource;
-import javax.servlet.http.HttpServletResponse;
import java.io.BufferedOutputStream;
import java.io.File;
import java.io.IOException;
diff --git a/snowy-plugin/snowy-plugin-client/pom.xml b/snowy-plugin/snowy-plugin-client/pom.xml
index ac7067fc..8b54c1bc 100644
--- a/snowy-plugin/snowy-plugin-client/pom.xml
+++ b/snowy-plugin/snowy-plugin-client/pom.xml
@@ -7,7 +7,7 @@
vip.xiaonuo
snowy-plugin
- 2.0.0
+ 3.0.0
snowy-plugin-client
diff --git a/snowy-plugin/snowy-plugin-client/src/main/java/vip/xiaonuo/client/core/config/ClientConfigure.java b/snowy-plugin/snowy-plugin-client/src/main/java/vip/xiaonuo/client/core/config/ClientConfigure.java
index 599010f5..b9f3aeed 100644
--- a/snowy-plugin/snowy-plugin-client/src/main/java/vip/xiaonuo/client/core/config/ClientConfigure.java
+++ b/snowy-plugin/snowy-plugin-client/src/main/java/vip/xiaonuo/client/core/config/ClientConfigure.java
@@ -12,20 +12,7 @@
*/
package vip.xiaonuo.client.core.config;
-import com.github.xiaoymin.knife4j.spring.extension.OpenApiExtensionResolver;
-import io.swagger.annotations.ApiOperation;
-import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
-import org.springframework.web.bind.annotation.RequestMethod;
-import springfox.documentation.builders.ApiInfoBuilder;
-import springfox.documentation.builders.PathSelectors;
-import springfox.documentation.builders.RequestHandlerSelectors;
-import springfox.documentation.service.Contact;
-import springfox.documentation.spi.DocumentationType;
-import springfox.documentation.spring.web.plugins.Docket;
-import vip.xiaonuo.common.pojo.CommonResult;
-
-import javax.annotation.Resource;
/**
* C端相关配置
@@ -35,34 +22,4 @@ import javax.annotation.Resource;
**/
@Configuration
public class ClientConfigure {
-
- @Resource
- private OpenApiExtensionResolver openApiExtensionResolver;
-
- /**
- * API文档分组配置
- *
- * @author xuyuxiang
- * @date 2022/7/7 16:18
- **/
- @Bean(value = "clientDocApi")
- public Docket clientDocApi() {
- return new Docket(DocumentationType.SWAGGER_2)
- .apiInfo(new ApiInfoBuilder()
- .title("C端功能CLIENT")
- .description("C端功能CLIENT")
- .termsOfServiceUrl("https://www.xiaonuo.vip")
- .contact(new Contact("SNOWY_TEAM","https://www.xiaonuo.vip", "xuyuxiang29@foxmail.com"))
- .version("2.0.0")
- .build())
- .useDefaultResponseMessages(false)
- .globalResponseMessage(RequestMethod.GET, CommonResult.responseList())
- .globalResponseMessage(RequestMethod.POST, CommonResult.responseList())
- .groupName("C端功能CLIENT")
- .select()
- .apis(RequestHandlerSelectors.withMethodAnnotation(ApiOperation.class))
- .apis(RequestHandlerSelectors.basePackage("vip.xiaonuo.client"))
- .paths(PathSelectors.any())
- .build().extensions(openApiExtensionResolver.buildExtensions("C端功能CLIENT"));
- }
}
diff --git a/snowy-plugin/snowy-plugin-client/src/main/java/vip/xiaonuo/client/modular/user/controller/ClientUserController.java b/snowy-plugin/snowy-plugin-client/src/main/java/vip/xiaonuo/client/modular/user/controller/ClientUserController.java
index e2540d15..d471048a 100644
--- a/snowy-plugin/snowy-plugin-client/src/main/java/vip/xiaonuo/client/modular/user/controller/ClientUserController.java
+++ b/snowy-plugin/snowy-plugin-client/src/main/java/vip/xiaonuo/client/modular/user/controller/ClientUserController.java
@@ -13,10 +13,11 @@
package vip.xiaonuo.client.modular.user.controller;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
-import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport;
-import com.github.xiaoymin.knife4j.annotations.ApiSupport;
-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.annotation.Resource;
+import jakarta.validation.Valid;
+import jakarta.validation.constraints.NotEmpty;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
@@ -30,11 +31,8 @@ import vip.xiaonuo.client.modular.user.param.ClientUserPageParam;
import vip.xiaonuo.client.modular.user.service.ClientUserService;
import vip.xiaonuo.common.annotation.CommonLog;
import vip.xiaonuo.common.pojo.CommonResult;
-import vip.xiaonuo.common.pojo.CommonValidList;
-import javax.annotation.Resource;
-import javax.validation.Valid;
-import javax.validation.constraints.NotEmpty;
+import java.util.List;
/**
* C端用户控制器
@@ -42,8 +40,7 @@ import javax.validation.constraints.NotEmpty;
* @author xuyuxiang
* @date 2022/4/22 9:34
**/
-@Api(tags = "C端用户控制器")
-@ApiSupport(author = "SNOWY_TEAM", order = 1)
+@Tag(name = "C端用户控制器")
@RestController
@Validated
public class ClientUserController {
@@ -57,8 +54,7 @@ public class ClientUserController {
* @author xuyuxiang
* @date 2022/4/24 20:00
*/
- @ApiOperationSupport(order = 1)
- @ApiOperation("获取C端用户分页")
+ @Operation(summary = "获取C端用户分页")
@GetMapping("/client/user/page")
public CommonResult> page(ClientUserPageParam clientUserPageParam) {
return CommonResult.data(clientUserService.page(clientUserPageParam));
@@ -70,8 +66,7 @@ public class ClientUserController {
* @author xuyuxiang
* @date 2022/4/24 20:47
*/
- @ApiOperationSupport(order = 2)
- @ApiOperation("添加C端用户")
+ @Operation(summary = "添加C端用户")
@CommonLog("添加C端用户")
@PostMapping("/client/user/add")
public CommonResult add(@RequestBody @Valid ClientUserAddParam clientUserAddParam) {
@@ -85,8 +80,7 @@ public class ClientUserController {
* @author xuyuxiang
* @date 2022/4/24 20:47
*/
- @ApiOperationSupport(order = 3)
- @ApiOperation("编辑C端用户")
+ @Operation(summary = "编辑C端用户")
@CommonLog("编辑C端用户")
@PostMapping("/client/user/edit")
public CommonResult edit(@RequestBody @Valid ClientUserEditParam clientUserEditParam) {
@@ -100,12 +94,11 @@ public class ClientUserController {
* @author xuyuxiang
* @date 2022/4/24 20:00
*/
- @ApiOperationSupport(order = 4)
- @ApiOperation("删除C端用户")
+ @Operation(summary = "删除C端用户")
@CommonLog("删除C端用户")
@PostMapping("/client/user/delete")
public CommonResult delete(@RequestBody @Valid @NotEmpty(message = "集合不能为空")
- CommonValidList clientUserIdParamList) {
+ List clientUserIdParamList) {
clientUserService.delete(clientUserIdParamList);
return CommonResult.ok();
}
@@ -116,8 +109,7 @@ public class ClientUserController {
* @author xuyuxiang
* @date 2022/4/24 20:00
*/
- @ApiOperationSupport(order = 5)
- @ApiOperation("获取C端用户详情")
+ @Operation(summary = "获取C端用户详情")
@GetMapping("/client/user/detail")
public CommonResult detail(@Valid ClientUserIdParam clientUserIdParam) {
return CommonResult.data(clientUserService.detail(clientUserIdParam));
diff --git a/snowy-plugin/snowy-plugin-client/src/main/java/vip/xiaonuo/client/modular/user/entity/ClientUser.java b/snowy-plugin/snowy-plugin-client/src/main/java/vip/xiaonuo/client/modular/user/entity/ClientUser.java
index 6c562933..36c9ef0d 100644
--- a/snowy-plugin/snowy-plugin-client/src/main/java/vip/xiaonuo/client/modular/user/entity/ClientUser.java
+++ b/snowy-plugin/snowy-plugin-client/src/main/java/vip/xiaonuo/client/modular/user/entity/ClientUser.java
@@ -18,7 +18,7 @@ import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fhs.core.trans.anno.Trans;
import com.fhs.core.trans.constant.TransType;
-import io.swagger.annotations.ApiModelProperty;
+import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Getter;
import lombok.Setter;
import vip.xiaonuo.common.handler.CommonSm4CbcTypeHandler;
@@ -38,190 +38,190 @@ import java.util.Date;
public class ClientUser extends CommonEntity {
/** id */
- @ApiModelProperty(value = "id", position = 1)
+ @Schema(description = "id")
private String id;
/** 头像 */
- @ApiModelProperty(value = "头像,图片base64", position = 2)
+ @Schema(description = "头像,图片base64")
@TableField(insertStrategy = FieldStrategy.IGNORED, updateStrategy = FieldStrategy.IGNORED)
private String avatar;
/** 签名 */
- @ApiModelProperty(value = "签名,图片base64", position = 3)
+ @Schema(description = "签名,图片base64")
@TableField(insertStrategy = FieldStrategy.IGNORED, updateStrategy = FieldStrategy.IGNORED)
private String signature;
/** 账号 */
- @ApiModelProperty(value = "账号", position = 4)
+ @Schema(description = "账号")
private String account;
/** 密码 */
@JsonIgnore
- @ApiModelProperty(value = "密码", position = 5)
+ @Schema(description = "密码")
private String password;
/** 姓名 */
- @ApiModelProperty(value = "姓名", position = 6)
+ @Schema(description = "姓名")
private String name;
/** 昵称 */
- @ApiModelProperty(value = "昵称", position = 7)
+ @Schema(description = "昵称")
@TableField(insertStrategy = FieldStrategy.IGNORED, updateStrategy = FieldStrategy.IGNORED)
private String nickname;
/** 性别 */
- @ApiModelProperty(value = "性别", position = 8)
+ @Schema(description = "性别")
@TableField(insertStrategy = FieldStrategy.IGNORED, updateStrategy = FieldStrategy.IGNORED)
@Trans(type = TransType.DICTIONARY, key = "GENDER")
private String gender;
/** 年龄 */
- @ApiModelProperty(value = "年龄", position = 9)
+ @Schema(description = "年龄")
@TableField(insertStrategy = FieldStrategy.IGNORED, updateStrategy = FieldStrategy.IGNORED)
private String age;
/** 出生日期 */
- @ApiModelProperty(value = "出生日期", position = 10)
+ @Schema(description = "出生日期")
@TableField(insertStrategy = FieldStrategy.IGNORED, updateStrategy = FieldStrategy.IGNORED)
private String birthday;
/** 民族 */
- @ApiModelProperty(value = "民族", position = 11)
+ @Schema(description = "民族")
@TableField(insertStrategy = FieldStrategy.IGNORED, updateStrategy = FieldStrategy.IGNORED)
private String nation;
/** 籍贯 */
- @ApiModelProperty(value = "籍贯", position = 12)
+ @Schema(description = "籍贯")
@TableField(insertStrategy = FieldStrategy.IGNORED, updateStrategy = FieldStrategy.IGNORED)
private String nativePlace;
/** 家庭住址 */
- @ApiModelProperty(value = "家庭住址", position = 13)
+ @Schema(description = "家庭住址")
@TableField(insertStrategy = FieldStrategy.IGNORED, updateStrategy = FieldStrategy.IGNORED)
private String homeAddress;
/** 通信地址 */
- @ApiModelProperty(value = "通信地址", position = 14)
+ @Schema(description = "通信地址")
@TableField(insertStrategy = FieldStrategy.IGNORED, updateStrategy = FieldStrategy.IGNORED)
private String mailingAddress;
/** 证件类型 */
- @ApiModelProperty(value = "证件类型", position = 15)
+ @Schema(description = "证件类型")
@TableField(insertStrategy = FieldStrategy.IGNORED, updateStrategy = FieldStrategy.IGNORED)
private String idCardType;
/** 证件号码 */
- @ApiModelProperty(value = "证件号码", position = 16)
+ @Schema(description = "证件号码")
@TableField(insertStrategy = FieldStrategy.IGNORED, updateStrategy = FieldStrategy.IGNORED, typeHandler = CommonSm4CbcTypeHandler.class)
private String idCardNumber;
/** 文化程度 */
- @ApiModelProperty(value = "文化程度", position = 17)
+ @Schema(description = "文化程度")
@TableField(insertStrategy = FieldStrategy.IGNORED, updateStrategy = FieldStrategy.IGNORED)
private String cultureLevel;
/** 政治面貌 */
- @ApiModelProperty(value = "政治面貌", position = 18)
+ @Schema(description = "政治面貌")
@TableField(insertStrategy = FieldStrategy.IGNORED, updateStrategy = FieldStrategy.IGNORED)
private String politicalOutlook;
/** 毕业院校 */
- @ApiModelProperty(value = "毕业院校", position = 19)
+ @Schema(description = "毕业院校")
@TableField(insertStrategy = FieldStrategy.IGNORED, updateStrategy = FieldStrategy.IGNORED)
private String college;
/** 学历 */
- @ApiModelProperty(value = "学历", position = 20)
+ @Schema(description = "学历")
@TableField(insertStrategy = FieldStrategy.IGNORED, updateStrategy = FieldStrategy.IGNORED)
private String education;
/** 学制 */
- @ApiModelProperty(value = "学制", position = 21)
+ @Schema(description = "学制")
@TableField(insertStrategy = FieldStrategy.IGNORED, updateStrategy = FieldStrategy.IGNORED)
private String eduLength;
/** 学位 */
- @ApiModelProperty(value = "学位", position = 22)
+ @Schema(description = "学位")
@TableField(insertStrategy = FieldStrategy.IGNORED, updateStrategy = FieldStrategy.IGNORED)
private String degree;
/** 手机 */
- @ApiModelProperty(value = "手机", position = 23)
+ @Schema(description = "手机")
@TableField(insertStrategy = FieldStrategy.IGNORED, updateStrategy = FieldStrategy.IGNORED, typeHandler = CommonSm4CbcTypeHandler.class)
private String phone;
/** 邮箱 */
- @ApiModelProperty(value = "邮箱", position = 24)
+ @Schema(description = "邮箱")
@TableField(insertStrategy = FieldStrategy.IGNORED, updateStrategy = FieldStrategy.IGNORED)
private String email;
/** 家庭电话 */
- @ApiModelProperty(value = "家庭电话", position = 25)
+ @Schema(description = "家庭电话")
@TableField(insertStrategy = FieldStrategy.IGNORED, updateStrategy = FieldStrategy.IGNORED)
private String homeTel;
/** 办公电话 */
- @ApiModelProperty(value = "办公电话", position = 26)
+ @Schema(description = "办公电话")
@TableField(insertStrategy = FieldStrategy.IGNORED, updateStrategy = FieldStrategy.IGNORED)
private String officeTel;
/** 紧急联系人 */
- @ApiModelProperty(value = "紧急联系人", position = 27)
+ @Schema(description = "紧急联系人")
@TableField(insertStrategy = FieldStrategy.IGNORED, updateStrategy = FieldStrategy.IGNORED)
private String emergencyContact;
/** 紧急联系人电话 */
- @ApiModelProperty(value = "紧急联系人电话", position = 28)
+ @Schema(description = "紧急联系人电话")
@TableField(insertStrategy = FieldStrategy.IGNORED, updateStrategy = FieldStrategy.IGNORED, typeHandler = CommonSm4CbcTypeHandler.class)
private String emergencyPhone;
/** 紧急联系人地址 */
- @ApiModelProperty(value = "紧急联系人地址", position = 29)
+ @Schema(description = "紧急联系人地址")
@TableField(insertStrategy = FieldStrategy.IGNORED, updateStrategy = FieldStrategy.IGNORED)
private String emergencyAddress;
/** 上次登录ip */
- @ApiModelProperty(value = "上次登录ip", position = 30)
+ @Schema(description = "上次登录ip")
private String lastLoginIp;
/** 上次登录地点 */
- @ApiModelProperty(value = "上次登录地点", position = 31)
+ @Schema(description = "上次登录地点")
private String lastLoginAddress;
/** 上次登录时间 */
- @ApiModelProperty(value = "上次登录时间", position = 32)
+ @Schema(description = "上次登录时间")
private Date lastLoginTime;
/** 上次登录设备 */
- @ApiModelProperty(value = "上次登录设备", position = 33)
+ @Schema(description = "上次登录设备")
private String lastLoginDevice;
/** 最新登录ip */
- @ApiModelProperty(value = "最新登录ip", position = 34)
+ @Schema(description = "最新登录ip")
private String latestLoginIp;
/** 最新登录地点 */
- @ApiModelProperty(value = "最新登录地点", position = 35)
+ @Schema(description = "最新登录地点")
private String latestLoginAddress;
/** 最新登录时间 */
- @ApiModelProperty(value = "最新登录时间", position = 36)
+ @Schema(description = "最新登录时间")
private Date latestLoginTime;
/** 最新登录设备 */
- @ApiModelProperty(value = "最新登录设备", position = 37)
+ @Schema(description = "最新登录设备")
private String latestLoginDevice;
/** 用户状态 */
- @ApiModelProperty(value = "用户状态", position = 38)
+ @Schema(description = "用户状态")
private String userStatus;
/** 排序码 */
- @ApiModelProperty(value = "排序码", position = 39)
+ @Schema(description = "排序码")
private Integer sortCode;
/** 扩展信息 */
- @ApiModelProperty(value = "扩展信息", position = 40)
+ @Schema(description = "扩展信息")
@TableField(insertStrategy = FieldStrategy.IGNORED, updateStrategy = FieldStrategy.IGNORED)
private String extJson;
}
diff --git a/snowy-plugin/snowy-plugin-client/src/main/java/vip/xiaonuo/client/modular/user/param/ClientUserAddParam.java b/snowy-plugin/snowy-plugin-client/src/main/java/vip/xiaonuo/client/modular/user/param/ClientUserAddParam.java
index c1eaa6f5..5291c09f 100644
--- a/snowy-plugin/snowy-plugin-client/src/main/java/vip/xiaonuo/client/modular/user/param/ClientUserAddParam.java
+++ b/snowy-plugin/snowy-plugin-client/src/main/java/vip/xiaonuo/client/modular/user/param/ClientUserAddParam.java
@@ -12,12 +12,11 @@
*/
package vip.xiaonuo.client.modular.user.param;
-import io.swagger.annotations.ApiModelProperty;
+import io.swagger.v3.oas.annotations.media.Schema;
+import jakarta.validation.constraints.NotBlank;
import lombok.Getter;
import lombok.Setter;
-import javax.validation.constraints.NotBlank;
-
/**
* C端用户添加参数
*
@@ -29,120 +28,120 @@ import javax.validation.constraints.NotBlank;
public class ClientUserAddParam {
/** 账号 */
- @ApiModelProperty(value = "账号", required = true, position = 1)
+ @Schema(description = "账号", requiredMode = Schema.RequiredMode.REQUIRED)
@NotBlank(message = "account不能为空")
private String account;
/** 姓名 */
- @ApiModelProperty(value = "姓名", required = true, position = 2)
+ @Schema(description = "姓名", requiredMode = Schema.RequiredMode.REQUIRED)
@NotBlank(message = "name不能为空")
private String name;
/** 头像 */
- @ApiModelProperty(value = "头像,图片base64", position = 3)
+ @Schema(description = "头像,图片base64")
private String avatar;
/** 签名 */
- @ApiModelProperty(value = "签名,图片base64", position = 4)
+ @Schema(description = "签名,图片base64")
private String signature;
/** 昵称 */
- @ApiModelProperty(value = "昵称", position = 7)
+ @Schema(description = "昵称")
private String nickname;
/** 性别 */
- @ApiModelProperty(value = "性别", position = 8)
+ @Schema(description = "性别")
private String gender;
/** 年龄 */
- @ApiModelProperty(value = "年龄", position = 9)
+ @Schema(description = "年龄")
private String age;
/** 出生日期 */
- @ApiModelProperty(value = "出生日期", position = 10)
+ @Schema(description = "出生日期")
private String birthday;
/** 民族 */
- @ApiModelProperty(value = "民族", position = 11)
+ @Schema(description = "民族")
private String nation;
/** 籍贯 */
- @ApiModelProperty(value = "籍贯", position = 12)
+ @Schema(description = "籍贯")
private String nativePlace;
/** 家庭住址 */
- @ApiModelProperty(value = "家庭住址", position = 13)
+ @Schema(description = "家庭住址")
private String homeAddress;
/** 通信地址 */
- @ApiModelProperty(value = "通信地址", position = 14)
+ @Schema(description = "通信地址")
private String mailingAddress;
/** 证件类型 */
- @ApiModelProperty(value = "证件类型", position = 15)
+ @Schema(description = "证件类型")
private String idCardType;
/** 证件号码 */
- @ApiModelProperty(value = "证件号码", position = 16)
+ @Schema(description = "证件号码")
private String idCardNumber;
/** 文化程度 */
- @ApiModelProperty(value = "文化程度", position = 17)
+ @Schema(description = "文化程度")
private String cultureLevel;
/** 政治面貌 */
- @ApiModelProperty(value = "政治面貌", position = 18)
+ @Schema(description = "政治面貌")
private String politicalOutlook;
/** 毕业院校 */
- @ApiModelProperty(value = "毕业院校", position = 19)
+ @Schema(description = "毕业院校")
private String college;
/** 学历 */
- @ApiModelProperty(value = "学历", position = 20)
+ @Schema(description = "学历")
private String education;
/** 学制 */
- @ApiModelProperty(value = "学制", position = 21)
+ @Schema(description = "学制")
private String eduLength;
/** 学位 */
- @ApiModelProperty(value = "学位", position = 22)
+ @Schema(description = "学位")
private String degree;
/** 手机 */
- @ApiModelProperty(value = "手机", position = 23)
+ @Schema(description = "手机")
private String phone;
/** 邮箱 */
- @ApiModelProperty(value = "邮箱", position = 24)
+ @Schema(description = "邮箱")
private String email;
/** 家庭电话 */
- @ApiModelProperty(value = "家庭电话", position = 25)
+ @Schema(description = "家庭电话")
private String homeTel;
/** 办公电话 */
- @ApiModelProperty(value = "办公电话", position = 26)
+ @Schema(description = "办公电话")
private String officeTel;
/** 紧急联系人 */
- @ApiModelProperty(value = "紧急联系人", position = 27)
+ @Schema(description = "紧急联系人")
private String emergencyContact;
/** 紧急联系人电话 */
- @ApiModelProperty(value = "紧急联系人电话", position = 28)
+ @Schema(description = "紧急联系人电话")
private String emergencyPhone;
/** 紧急联系人地址 */
- @ApiModelProperty(value = "紧急联系人地址", position = 29)
+ @Schema(description = "紧急联系人地址")
private String emergencyAddress;
/** 排序码 */
- @ApiModelProperty(value = "排序码", position = 30)
+ @Schema(description = "排序码")
private Integer sortCode;
/** 扩展信息 */
- @ApiModelProperty(value = "扩展信息", position = 31)
+ @Schema(description = "扩展信息")
private String extJson;
}
diff --git a/snowy-plugin/snowy-plugin-client/src/main/java/vip/xiaonuo/client/modular/user/param/ClientUserEditParam.java b/snowy-plugin/snowy-plugin-client/src/main/java/vip/xiaonuo/client/modular/user/param/ClientUserEditParam.java
index 129d6530..d6ca910b 100644
--- a/snowy-plugin/snowy-plugin-client/src/main/java/vip/xiaonuo/client/modular/user/param/ClientUserEditParam.java
+++ b/snowy-plugin/snowy-plugin-client/src/main/java/vip/xiaonuo/client/modular/user/param/ClientUserEditParam.java
@@ -12,12 +12,11 @@
*/
package vip.xiaonuo.client.modular.user.param;
-import io.swagger.annotations.ApiModelProperty;
+import io.swagger.v3.oas.annotations.media.Schema;
+import jakarta.validation.constraints.NotBlank;
import lombok.Getter;
import lombok.Setter;
-import javax.validation.constraints.NotBlank;
-
/**
* C端用户参数
*
@@ -29,125 +28,125 @@ import javax.validation.constraints.NotBlank;
public class ClientUserEditParam {
/** id */
- @ApiModelProperty(value = "id", required = true, position = 1)
+ @Schema(description = "id", requiredMode = Schema.RequiredMode.REQUIRED)
@NotBlank(message = "id不能为空")
private String id;
/** 账号 */
- @ApiModelProperty(value = "账号", required = true, position = 2)
+ @Schema(description = "账号", requiredMode = Schema.RequiredMode.REQUIRED)
@NotBlank(message = "account不能为空")
private String account;
/** 姓名 */
- @ApiModelProperty(value = "姓名", required = true, position = 3)
+ @Schema(description = "姓名", requiredMode = Schema.RequiredMode.REQUIRED)
@NotBlank(message = "name不能为空")
private String name;
/** 头像 */
- @ApiModelProperty(value = "头像,图片base64", position = 4)
+ @Schema(description = "头像,图片base64")
private String avatar;
/** 签名 */
- @ApiModelProperty(value = "签名,图片base64", position = 5)
+ @Schema(description = "签名,图片base64")
private String signature;
/** 昵称 */
- @ApiModelProperty(value = "昵称", position = 7)
+ @Schema(description = "昵称")
private String nickname;
/** 性别 */
- @ApiModelProperty(value = "性别", position = 8)
+ @Schema(description = "性别")
private String gender;
/** 年龄 */
- @ApiModelProperty(value = "年龄", position = 9)
+ @Schema(description = "年龄")
private String age;
/** 出生日期 */
- @ApiModelProperty(value = "出生日期", position = 10)
+ @Schema(description = "出生日期")
private String birthday;
/** 民族 */
- @ApiModelProperty(value = "民族", position = 11)
+ @Schema(description = "民族")
private String nation;
/** 籍贯 */
- @ApiModelProperty(value = "籍贯", position = 12)
+ @Schema(description = "籍贯")
private String nativePlace;
/** 家庭住址 */
- @ApiModelProperty(value = "家庭住址", position = 13)
+ @Schema(description = "家庭住址")
private String homeAddress;
/** 通信地址 */
- @ApiModelProperty(value = "通信地址", position = 14)
+ @Schema(description = "通信地址")
private String mailingAddress;
/** 证件类型 */
- @ApiModelProperty(value = "证件类型", position = 15)
+ @Schema(description = "证件类型")
private String idCardType;
/** 证件号码 */
- @ApiModelProperty(value = "证件号码", position = 16)
+ @Schema(description = "证件号码")
private String idCardNumber;
/** 文化程度 */
- @ApiModelProperty(value = "文化程度", position = 17)
+ @Schema(description = "文化程度")
private String cultureLevel;
/** 政治面貌 */
- @ApiModelProperty(value = "政治面貌", position = 18)
+ @Schema(description = "政治面貌")
private String politicalOutlook;
/** 毕业院校 */
- @ApiModelProperty(value = "毕业院校", position = 19)
+ @Schema(description = "毕业院校")
private String college;
/** 学历 */
- @ApiModelProperty(value = "学历", position = 20)
+ @Schema(description = "学历")
private String education;
/** 学制 */
- @ApiModelProperty(value = "学制", position = 21)
+ @Schema(description = "学制")
private String eduLength;
/** 学位 */
- @ApiModelProperty(value = "学位", position = 22)
+ @Schema(description = "学位")
private String degree;
/** 手机 */
- @ApiModelProperty(value = "手机", position = 23)
+ @Schema(description = "手机")
private String phone;
/** 邮箱 */
- @ApiModelProperty(value = "邮箱", position = 24)
+ @Schema(description = "邮箱")
private String email;
/** 家庭电话 */
- @ApiModelProperty(value = "家庭电话", position = 25)
+ @Schema(description = "家庭电话")
private String homeTel;
/** 办公电话 */
- @ApiModelProperty(value = "办公电话", position = 26)
+ @Schema(description = "办公电话")
private String officeTel;
/** 紧急联系人 */
- @ApiModelProperty(value = "紧急联系人", position = 27)
+ @Schema(description = "紧急联系人")
private String emergencyContact;
/** 紧急联系人电话 */
- @ApiModelProperty(value = "紧急联系人电话", position = 28)
+ @Schema(description = "紧急联系人电话")
private String emergencyPhone;
/** 紧急联系人地址 */
- @ApiModelProperty(value = "紧急联系人地址", position = 29)
+ @Schema(description = "紧急联系人地址")
private String emergencyAddress;
/** 排序码 */
- @ApiModelProperty(value = "排序码", position = 30)
+ @Schema(description = "排序码")
private Integer sortCode;
/** 扩展信息 */
- @ApiModelProperty(value = "扩展信息", position = 31)
+ @Schema(description = "扩展信息")
private String extJson;
}
diff --git a/snowy-plugin/snowy-plugin-client/src/main/java/vip/xiaonuo/client/modular/user/param/ClientUserIdParam.java b/snowy-plugin/snowy-plugin-client/src/main/java/vip/xiaonuo/client/modular/user/param/ClientUserIdParam.java
index 987a5144..e98c7a89 100644
--- a/snowy-plugin/snowy-plugin-client/src/main/java/vip/xiaonuo/client/modular/user/param/ClientUserIdParam.java
+++ b/snowy-plugin/snowy-plugin-client/src/main/java/vip/xiaonuo/client/modular/user/param/ClientUserIdParam.java
@@ -12,12 +12,11 @@
*/
package vip.xiaonuo.client.modular.user.param;
-import io.swagger.annotations.ApiModelProperty;
+import io.swagger.v3.oas.annotations.media.Schema;
+import jakarta.validation.constraints.NotBlank;
import lombok.Getter;
import lombok.Setter;
-import javax.validation.constraints.NotBlank;
-
/**
* C端用户Id参数
*
@@ -29,7 +28,7 @@ import javax.validation.constraints.NotBlank;
public class ClientUserIdParam {
/** id */
- @ApiModelProperty(value = "id", required = true)
+ @Schema(description = "id", requiredMode = Schema.RequiredMode.REQUIRED)
@NotBlank(message = "id不能为空")
private String id;
}
diff --git a/snowy-plugin/snowy-plugin-client/src/main/java/vip/xiaonuo/client/modular/user/param/ClientUserPageParam.java b/snowy-plugin/snowy-plugin-client/src/main/java/vip/xiaonuo/client/modular/user/param/ClientUserPageParam.java
index f5b66220..39bf173f 100644
--- a/snowy-plugin/snowy-plugin-client/src/main/java/vip/xiaonuo/client/modular/user/param/ClientUserPageParam.java
+++ b/snowy-plugin/snowy-plugin-client/src/main/java/vip/xiaonuo/client/modular/user/param/ClientUserPageParam.java
@@ -12,7 +12,7 @@
*/
package vip.xiaonuo.client.modular.user.param;
-import io.swagger.annotations.ApiModelProperty;
+import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Getter;
import lombok.Setter;
@@ -27,22 +27,22 @@ import lombok.Setter;
public class ClientUserPageParam {
/** 当前页 */
- @ApiModelProperty(value = "当前页码")
+ @Schema(description = "当前页码")
private Integer current;
/** 每页条数 */
- @ApiModelProperty(value = "每页条数")
+ @Schema(description = "每页条数")
private Integer size;
/** 排序字段 */
- @ApiModelProperty(value = "排序字段,字段驼峰名称,如:userName")
+ @Schema(description = "排序字段,字段驼峰名称,如:userName")
private String sortField;
/** 排序方式 */
- @ApiModelProperty(value = "排序方式,升序:ASCEND;降序:DESCEND")
+ @Schema(description = "排序方式,升序:ASCEND;降序:DESCEND")
private String sortOrder;
/** 账号、姓名关键词 */
- @ApiModelProperty(value = "账号、姓名关键词")
+ @Schema(description = "账号、姓名关键词")
private String searchKey;
}
diff --git a/snowy-plugin/snowy-plugin-client/src/main/java/vip/xiaonuo/client/modular/user/provider/ClientLoginUserApiProvider.java b/snowy-plugin/snowy-plugin-client/src/main/java/vip/xiaonuo/client/modular/user/provider/ClientLoginUserApiProvider.java
index 07df3f2f..a71e838a 100644
--- a/snowy-plugin/snowy-plugin-client/src/main/java/vip/xiaonuo/client/modular/user/provider/ClientLoginUserApiProvider.java
+++ b/snowy-plugin/snowy-plugin-client/src/main/java/vip/xiaonuo/client/modular/user/provider/ClientLoginUserApiProvider.java
@@ -15,6 +15,7 @@ package vip.xiaonuo.client.modular.user.provider;
import cn.hutool.core.collection.CollectionUtil;
import cn.hutool.json.JSONObject;
import cn.hutool.json.JSONUtil;
+import jakarta.annotation.Resource;
import org.springframework.stereotype.Service;
import vip.xiaonuo.auth.api.SaBaseLoginUserApi;
import vip.xiaonuo.auth.core.pojo.SaBaseClientLoginUser;
@@ -22,7 +23,6 @@ import vip.xiaonuo.auth.core.pojo.SaBaseLoginUser;
import vip.xiaonuo.client.modular.user.result.ClientLoginUser;
import vip.xiaonuo.client.modular.user.service.ClientUserService;
-import javax.annotation.Resource;
import java.util.List;
import java.util.stream.Collectors;
diff --git a/snowy-plugin/snowy-plugin-client/src/main/java/vip/xiaonuo/client/modular/user/service/impl/ClientUserServiceImpl.java b/snowy-plugin/snowy-plugin-client/src/main/java/vip/xiaonuo/client/modular/user/service/impl/ClientUserServiceImpl.java
index 12ecedc9..b787b704 100644
--- a/snowy-plugin/snowy-plugin-client/src/main/java/vip/xiaonuo/client/modular/user/service/impl/ClientUserServiceImpl.java
+++ b/snowy-plugin/snowy-plugin-client/src/main/java/vip/xiaonuo/client/modular/user/service/impl/ClientUserServiceImpl.java
@@ -23,6 +23,7 @@ import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.fhs.trans.service.impl.TransService;
+import jakarta.annotation.Resource;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import vip.xiaonuo.client.modular.relation.service.ClientRelationService;
@@ -41,7 +42,6 @@ import vip.xiaonuo.common.page.CommonPageRequest;
import vip.xiaonuo.common.util.*;
import vip.xiaonuo.dev.api.DevConfigApi;
-import javax.annotation.Resource;
import java.util.List;
/**
diff --git a/snowy-plugin/snowy-plugin-dev/pom.xml b/snowy-plugin/snowy-plugin-dev/pom.xml
index d56c3fc0..68f51eba 100644
--- a/snowy-plugin/snowy-plugin-dev/pom.xml
+++ b/snowy-plugin/snowy-plugin-dev/pom.xml
@@ -7,7 +7,7 @@
vip.xiaonuo
snowy-plugin
- 2.0.0
+ 3.0.0
snowy-plugin-dev
diff --git a/snowy-plugin/snowy-plugin-dev/src/main/java/vip/xiaonuo/dev/core/config/DevConfigure.java b/snowy-plugin/snowy-plugin-dev/src/main/java/vip/xiaonuo/dev/core/config/DevConfigure.java
index 798ebfd5..21b48b63 100644
--- a/snowy-plugin/snowy-plugin-dev/src/main/java/vip/xiaonuo/dev/core/config/DevConfigure.java
+++ b/snowy-plugin/snowy-plugin-dev/src/main/java/vip/xiaonuo/dev/core/config/DevConfigure.java
@@ -12,20 +12,7 @@
*/
package vip.xiaonuo.dev.core.config;
-import com.github.xiaoymin.knife4j.spring.extension.OpenApiExtensionResolver;
-import io.swagger.annotations.ApiOperation;
-import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
-import org.springframework.web.bind.annotation.RequestMethod;
-import springfox.documentation.builders.ApiInfoBuilder;
-import springfox.documentation.builders.PathSelectors;
-import springfox.documentation.builders.RequestHandlerSelectors;
-import springfox.documentation.service.Contact;
-import springfox.documentation.spi.DocumentationType;
-import springfox.documentation.spring.web.plugins.Docket;
-import vip.xiaonuo.common.pojo.CommonResult;
-
-import javax.annotation.Resource;
/**
* 开发工具相关配置
@@ -35,33 +22,4 @@ import javax.annotation.Resource;
**/
@Configuration
public class DevConfigure {
-
- @Resource
- private OpenApiExtensionResolver openApiExtensionResolver;
-
- /**
- * API文档分组配置
- *
- * @author xuyuxiang
- * @date 2022/7/7 16:18
- **/
- @Bean(value = "devDocApi")
- public Docket devDocApi() {
- return new Docket(DocumentationType.SWAGGER_2)
- .apiInfo(new ApiInfoBuilder()
- .title("开发工具DEV")
- .description("开发工具DEV")
- .termsOfServiceUrl("https://www.xiaonuo.vip")
- .contact(new Contact("SNOWY_TEAM","https://www.xiaonuo.vip", "xuyuxiang29@foxmail.com"))
- .version("2.0.0")
- .build())
- .globalResponseMessage(RequestMethod.GET, CommonResult.responseList())
- .globalResponseMessage(RequestMethod.POST, CommonResult.responseList())
- .groupName("开发工具DEV")
- .select()
- .apis(RequestHandlerSelectors.withMethodAnnotation(ApiOperation.class))
- .apis(RequestHandlerSelectors.basePackage("vip.xiaonuo.dev"))
- .paths(PathSelectors.any())
- .build().extensions(openApiExtensionResolver.buildExtensions("开发工具DEV"));
- }
}
diff --git a/snowy-plugin/snowy-plugin-dev/src/main/java/vip/xiaonuo/dev/modular/config/controller/DevConfigController.java b/snowy-plugin/snowy-plugin-dev/src/main/java/vip/xiaonuo/dev/modular/config/controller/DevConfigController.java
index f6e4962f..a30be722 100644
--- a/snowy-plugin/snowy-plugin-dev/src/main/java/vip/xiaonuo/dev/modular/config/controller/DevConfigController.java
+++ b/snowy-plugin/snowy-plugin-dev/src/main/java/vip/xiaonuo/dev/modular/config/controller/DevConfigController.java
@@ -13,10 +13,11 @@
package vip.xiaonuo.dev.modular.config.controller;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
-import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport;
-import com.github.xiaoymin.knife4j.annotations.ApiSupport;
-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.annotation.Resource;
+import jakarta.validation.Valid;
+import jakarta.validation.constraints.NotEmpty;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
@@ -24,14 +25,10 @@ import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RestController;
import vip.xiaonuo.common.annotation.CommonLog;
import vip.xiaonuo.common.pojo.CommonResult;
-import vip.xiaonuo.common.pojo.CommonValidList;
import vip.xiaonuo.dev.modular.config.entity.DevConfig;
import vip.xiaonuo.dev.modular.config.param.*;
import vip.xiaonuo.dev.modular.config.service.DevConfigService;
-import javax.annotation.Resource;
-import javax.validation.Valid;
-import javax.validation.constraints.NotEmpty;
import java.util.List;
/**
@@ -40,8 +37,7 @@ import java.util.List;
* @author xuyuxiang
* @date 2022/4/22 10:56
**/
-@Api(tags = "配置控制器")
-@ApiSupport(author = "SNOWY_TEAM", order = 1)
+@Tag(name = "配置控制器")
@RestController
@Validated
public class DevConfigController {
@@ -55,8 +51,7 @@ public class DevConfigController {
* @author xuyuxiang
* @date 2022/4/24 20:00
*/
- @ApiOperationSupport(order = 1)
- @ApiOperation("获取配置分页")
+ @Operation(summary = "获取配置分页")
@GetMapping("/dev/config/page")
public CommonResult> page(DevConfigPageParam devConfigPageParam) {
return CommonResult.data(devConfigService.page(devConfigPageParam));
@@ -68,8 +63,7 @@ public class DevConfigController {
* @author xuyuxiang
* @date 2022/4/24 20:00
*/
- @ApiOperationSupport(order = 2)
- @ApiOperation("获取系统基础配置")
+ @Operation(summary = "获取系统基础配置")
@GetMapping("/dev/config/sysBaseList")
public CommonResult> sysBaseList() {
return CommonResult.data(devConfigService.sysBaseList());
@@ -81,8 +75,7 @@ public class DevConfigController {
* @author xuyuxiang
* @date 2022/4/24 20:00
*/
- @ApiOperationSupport(order = 2)
- @ApiOperation("获取配置列表")
+ @Operation(summary = "获取配置列表")
@GetMapping("/dev/config/list")
public CommonResult> list(DevConfigListParam devConfigListParam) {
return CommonResult.data(devConfigService.list(devConfigListParam));
@@ -94,8 +87,7 @@ public class DevConfigController {
* @author xuyuxiang
* @date 2022/4/24 20:47
*/
- @ApiOperationSupport(order = 3)
- @ApiOperation("添加配置")
+ @Operation(summary = "添加配置")
@CommonLog("添加配置")
@PostMapping("/dev/config/add")
public CommonResult add(@RequestBody @Valid DevConfigAddParam devConfigAddParam) {
@@ -109,8 +101,7 @@ public class DevConfigController {
* @author xuyuxiang
* @date 2022/4/24 20:47
*/
- @ApiOperationSupport(order = 4)
- @ApiOperation("编辑配置")
+ @Operation(summary = "编辑配置")
@CommonLog("编辑配置")
@PostMapping("/dev/config/edit")
public CommonResult edit(@RequestBody @Valid DevConfigEditParam devConfigEditParam) {
@@ -124,12 +115,11 @@ public class DevConfigController {
* @author xuyuxiang
* @date 2022/4/24 20:00
*/
- @ApiOperationSupport(order = 5)
- @ApiOperation("删除配置")
+ @Operation(summary = "删除配置")
@CommonLog("删除配置")
@PostMapping("/dev/config/delete")
public CommonResult delete(@RequestBody @Valid @NotEmpty(message = "集合不能为空")
- CommonValidList devConfigIdParamList) {
+ List devConfigIdParamList) {
devConfigService.delete(devConfigIdParamList);
return CommonResult.ok();
}
@@ -140,8 +130,7 @@ public class DevConfigController {
* @author xuyuxiang
* @date 2022/4/24 20:00
*/
- @ApiOperationSupport(order = 6)
- @ApiOperation("获取配置详情")
+ @Operation(summary = "获取配置详情")
@GetMapping("/dev/config/detail")
public CommonResult detail(@Valid DevConfigIdParam devConfigIdParam) {
return CommonResult.data(devConfigService.detail(devConfigIdParam));
@@ -153,12 +142,11 @@ public class DevConfigController {
* @author xuyuxiang
* @date 2022/4/24 20:00
*/
- @ApiOperationSupport(order = 7)
- @ApiOperation("配置批量更新")
+ @Operation(summary = "配置批量更新")
@CommonLog("配置批量更新")
@PostMapping("/dev/config/editBatch")
public CommonResult editBatch(@RequestBody @Valid @NotEmpty(message = "集合不能为空")
- CommonValidList devConfigBatchParamList) {
+ List devConfigBatchParamList) {
devConfigService.editBatch(devConfigBatchParamList);
return CommonResult.ok();
}
diff --git a/snowy-plugin/snowy-plugin-dev/src/main/java/vip/xiaonuo/dev/modular/config/entity/DevConfig.java b/snowy-plugin/snowy-plugin-dev/src/main/java/vip/xiaonuo/dev/modular/config/entity/DevConfig.java
index b55bd5b6..10d04717 100644
--- a/snowy-plugin/snowy-plugin-dev/src/main/java/vip/xiaonuo/dev/modular/config/entity/DevConfig.java
+++ b/snowy-plugin/snowy-plugin-dev/src/main/java/vip/xiaonuo/dev/modular/config/entity/DevConfig.java
@@ -15,7 +15,7 @@ package vip.xiaonuo.dev.modular.config.entity;
import com.baomidou.mybatisplus.annotation.FieldStrategy;
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.Getter;
import lombok.Setter;
import vip.xiaonuo.common.pojo.CommonEntity;
@@ -32,31 +32,31 @@ import vip.xiaonuo.common.pojo.CommonEntity;
public class DevConfig extends CommonEntity {
/** id */
- @ApiModelProperty(value = "id", position = 1)
+ @Schema(description = "id")
private String id;
/** 配置键 */
- @ApiModelProperty(value = "配置键", position = 2)
+ @Schema(description = "配置键")
private String configKey;
/** 配置值 */
- @ApiModelProperty(value = "配置值", position = 3)
+ @Schema(description = "配置值")
private String configValue;
/** 分类 */
- @ApiModelProperty(value = "分类", position = 4)
+ @Schema(description = "分类")
private String category;
/** 备注 */
- @ApiModelProperty(value = "备注", position = 5)
+ @Schema(description = "备注")
private String remark;
/** 排序码 */
- @ApiModelProperty(value = "排序码", position = 6)
+ @Schema(description = "排序码")
private Integer sortCode;
/** 扩展信息 */
- @ApiModelProperty(value = "扩展信息", position = 7)
+ @Schema(description = "扩展信息")
@TableField(insertStrategy = FieldStrategy.IGNORED, updateStrategy = FieldStrategy.IGNORED)
private String extJson;
}
diff --git a/snowy-plugin/snowy-plugin-dev/src/main/java/vip/xiaonuo/dev/modular/config/enums/DevConfigCategoryEnum.java b/snowy-plugin/snowy-plugin-dev/src/main/java/vip/xiaonuo/dev/modular/config/enums/DevConfigCategoryEnum.java
index 6fe203a8..712d4336 100644
--- a/snowy-plugin/snowy-plugin-dev/src/main/java/vip/xiaonuo/dev/modular/config/enums/DevConfigCategoryEnum.java
+++ b/snowy-plugin/snowy-plugin-dev/src/main/java/vip/xiaonuo/dev/modular/config/enums/DevConfigCategoryEnum.java
@@ -87,7 +87,12 @@ public enum DevConfigCategoryEnum {
/**
* 短信-阿里云
*/
- SMS_ALIYUN("SMS_ALIYUN");
+ SMS_ALIYUN("SMS_ALIYUN"),
+
+ /**
+ * 短信-小诺短信
+ */
+ SMS_XIAONUO("SMS_XIAONUO");
private final String value;
@@ -101,7 +106,8 @@ public enum DevConfigCategoryEnum {
FILE_LOCAL.getValue().equals(value) || FILE_TENCENT.getValue().equals(value) ||
FILE_ALIYUN.getValue().equals(value) || FILE_MINIO.getValue().equals(value) ||
EMAIL_TENCENT.getValue().equals(value) || EMAIL_ALIYUN.getValue().equals(value) ||
- SMS_TENCENT.getValue().equals(value) || SMS_ALIYUN.getValue().equals(value);
+ SMS_TENCENT.getValue().equals(value) || SMS_ALIYUN.getValue().equals(value) ||
+ SMS_XIAONUO.getValue().equals(value);
if(!flag) {
throw new CommonException("不支持的配置分类:{}", value);
}
diff --git a/snowy-plugin/snowy-plugin-dev/src/main/java/vip/xiaonuo/dev/modular/config/param/DevConfigAddParam.java b/snowy-plugin/snowy-plugin-dev/src/main/java/vip/xiaonuo/dev/modular/config/param/DevConfigAddParam.java
index 470d4bf4..7f32f8a1 100644
--- a/snowy-plugin/snowy-plugin-dev/src/main/java/vip/xiaonuo/dev/modular/config/param/DevConfigAddParam.java
+++ b/snowy-plugin/snowy-plugin-dev/src/main/java/vip/xiaonuo/dev/modular/config/param/DevConfigAddParam.java
@@ -12,13 +12,12 @@
*/
package vip.xiaonuo.dev.modular.config.param;
-import io.swagger.annotations.ApiModelProperty;
+import io.swagger.v3.oas.annotations.media.Schema;
+import jakarta.validation.constraints.NotBlank;
+import jakarta.validation.constraints.NotNull;
import lombok.Getter;
import lombok.Setter;
-import javax.validation.constraints.NotBlank;
-import javax.validation.constraints.NotNull;
-
/**
* 配置添加参数
*
@@ -30,25 +29,25 @@ import javax.validation.constraints.NotNull;
public class DevConfigAddParam {
/** 配置键 */
- @ApiModelProperty(value = "配置键", required = true, position = 1)
+ @Schema(description = "配置键", requiredMode = Schema.RequiredMode.REQUIRED)
@NotBlank(message = "configKey不能为空")
private String configKey;
/** 配置值 */
- @ApiModelProperty(value = "配置值", required = true, position = 2)
+ @Schema(description = "配置值", requiredMode = Schema.RequiredMode.REQUIRED)
@NotBlank(message = "configValue不能为空")
private String configValue;
/** 备注 */
- @ApiModelProperty(value = "备注", position = 3)
+ @Schema(description = "备注")
private String remark;
/** 排序码 */
- @ApiModelProperty(value = "排序码", required = true, position = 4)
+ @Schema(description = "排序码", requiredMode = Schema.RequiredMode.REQUIRED)
@NotNull(message = "sortCode不能为空")
private Integer sortCode;
/** 扩展信息 */
- @ApiModelProperty(value = "扩展信息", position = 5)
+ @Schema(description = "扩展信息")
private String extJson;
}
diff --git a/snowy-plugin/snowy-plugin-dev/src/main/java/vip/xiaonuo/dev/modular/config/param/DevConfigBatchParam.java b/snowy-plugin/snowy-plugin-dev/src/main/java/vip/xiaonuo/dev/modular/config/param/DevConfigBatchParam.java
index f4d8842a..4c5c2252 100644
--- a/snowy-plugin/snowy-plugin-dev/src/main/java/vip/xiaonuo/dev/modular/config/param/DevConfigBatchParam.java
+++ b/snowy-plugin/snowy-plugin-dev/src/main/java/vip/xiaonuo/dev/modular/config/param/DevConfigBatchParam.java
@@ -12,12 +12,11 @@
*/
package vip.xiaonuo.dev.modular.config.param;
-import io.swagger.annotations.ApiModelProperty;
+import io.swagger.v3.oas.annotations.media.Schema;
+import jakarta.validation.constraints.NotBlank;
import lombok.Getter;
import lombok.Setter;
-import javax.validation.constraints.NotBlank;
-
/**
* 配置批量更新参数
*
@@ -29,12 +28,12 @@ import javax.validation.constraints.NotBlank;
public class DevConfigBatchParam {
/** 配置键 */
- @ApiModelProperty(value = "配置键", required = true, position = 1)
+ @Schema(description = "配置键", requiredMode = Schema.RequiredMode.REQUIRED)
@NotBlank(message = "configKey不能为空")
private String configKey;
/** 配置值 */
- @ApiModelProperty(value = "配置值", required = true, position = 2)
+ @Schema(description = "配置值", requiredMode = Schema.RequiredMode.REQUIRED)
@NotBlank(message = "configValue不能为空")
private String configValue;
diff --git a/snowy-plugin/snowy-plugin-dev/src/main/java/vip/xiaonuo/dev/modular/config/param/DevConfigEditParam.java b/snowy-plugin/snowy-plugin-dev/src/main/java/vip/xiaonuo/dev/modular/config/param/DevConfigEditParam.java
index 9a5665b1..f1009608 100644
--- a/snowy-plugin/snowy-plugin-dev/src/main/java/vip/xiaonuo/dev/modular/config/param/DevConfigEditParam.java
+++ b/snowy-plugin/snowy-plugin-dev/src/main/java/vip/xiaonuo/dev/modular/config/param/DevConfigEditParam.java
@@ -12,13 +12,12 @@
*/
package vip.xiaonuo.dev.modular.config.param;
-import io.swagger.annotations.ApiModelProperty;
+import io.swagger.v3.oas.annotations.media.Schema;
+import jakarta.validation.constraints.NotBlank;
+import jakarta.validation.constraints.NotNull;
import lombok.Getter;
import lombok.Setter;
-import javax.validation.constraints.NotBlank;
-import javax.validation.constraints.NotNull;
-
/**
* 配置编辑参数
*
@@ -30,30 +29,30 @@ import javax.validation.constraints.NotNull;
public class DevConfigEditParam {
/** id */
- @ApiModelProperty(value = "id", required = true, position = 1)
+ @Schema(description = "id", requiredMode = Schema.RequiredMode.REQUIRED)
@NotBlank(message = "id不能为空")
private String id;
/** 配置键 */
- @ApiModelProperty(value = "配置键", required = true, position = 2)
+ @Schema(description = "配置键", requiredMode = Schema.RequiredMode.REQUIRED)
@NotBlank(message = "configKey不能为空")
private String configKey;
/** 配置值 */
- @ApiModelProperty(value = "配置值", required = true, position = 3)
+ @Schema(description = "配置值", requiredMode = Schema.RequiredMode.REQUIRED)
@NotBlank(message = "configValue不能为空")
private String configValue;
/** 备注 */
- @ApiModelProperty(value = "备注", position = 4)
+ @Schema(description = "备注")
private String remark;
/** 排序码 */
- @ApiModelProperty(value = "排序码", required = true, position = 5)
+ @Schema(description = "排序码", requiredMode = Schema.RequiredMode.REQUIRED)
@NotNull(message = "sortCode不能为空")
private Integer sortCode;
/** 扩展信息 */
- @ApiModelProperty(value = "扩展信息", position = 6)
+ @Schema(description = "扩展信息")
private String extJson;
}
diff --git a/snowy-plugin/snowy-plugin-dev/src/main/java/vip/xiaonuo/dev/modular/config/param/DevConfigIdParam.java b/snowy-plugin/snowy-plugin-dev/src/main/java/vip/xiaonuo/dev/modular/config/param/DevConfigIdParam.java
index 03de2eb5..228d6a28 100644
--- a/snowy-plugin/snowy-plugin-dev/src/main/java/vip/xiaonuo/dev/modular/config/param/DevConfigIdParam.java
+++ b/snowy-plugin/snowy-plugin-dev/src/main/java/vip/xiaonuo/dev/modular/config/param/DevConfigIdParam.java
@@ -12,12 +12,11 @@
*/
package vip.xiaonuo.dev.modular.config.param;
-import io.swagger.annotations.ApiModelProperty;
+import io.swagger.v3.oas.annotations.media.Schema;
+import jakarta.validation.constraints.NotBlank;
import lombok.Getter;
import lombok.Setter;
-import javax.validation.constraints.NotBlank;
-
/**
* 配置Id参数
*
@@ -29,7 +28,7 @@ import javax.validation.constraints.NotBlank;
public class DevConfigIdParam {
/** id */
- @ApiModelProperty(value = "id", required = true)
+ @Schema(description = "id", requiredMode = Schema.RequiredMode.REQUIRED)
@NotBlank(message = "id不能为空")
private String id;
}
diff --git a/snowy-plugin/snowy-plugin-dev/src/main/java/vip/xiaonuo/dev/modular/config/param/DevConfigListParam.java b/snowy-plugin/snowy-plugin-dev/src/main/java/vip/xiaonuo/dev/modular/config/param/DevConfigListParam.java
index 82f9dbaf..e6d1fbd7 100644
--- a/snowy-plugin/snowy-plugin-dev/src/main/java/vip/xiaonuo/dev/modular/config/param/DevConfigListParam.java
+++ b/snowy-plugin/snowy-plugin-dev/src/main/java/vip/xiaonuo/dev/modular/config/param/DevConfigListParam.java
@@ -12,7 +12,7 @@
*/
package vip.xiaonuo.dev.modular.config.param;
-import io.swagger.annotations.ApiModelProperty;
+import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Getter;
import lombok.Setter;
@@ -27,6 +27,6 @@ import lombok.Setter;
public class DevConfigListParam {
/** 配置分类 */
- @ApiModelProperty(value = "配置分类")
+ @Schema(description = "配置分类")
private String category;
}
diff --git a/snowy-plugin/snowy-plugin-dev/src/main/java/vip/xiaonuo/dev/modular/config/param/DevConfigPageParam.java b/snowy-plugin/snowy-plugin-dev/src/main/java/vip/xiaonuo/dev/modular/config/param/DevConfigPageParam.java
index 9718e4a6..28c49ab9 100644
--- a/snowy-plugin/snowy-plugin-dev/src/main/java/vip/xiaonuo/dev/modular/config/param/DevConfigPageParam.java
+++ b/snowy-plugin/snowy-plugin-dev/src/main/java/vip/xiaonuo/dev/modular/config/param/DevConfigPageParam.java
@@ -12,7 +12,7 @@
*/
package vip.xiaonuo.dev.modular.config.param;
-import io.swagger.annotations.ApiModelProperty;
+import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Getter;
import lombok.Setter;
@@ -27,22 +27,22 @@ import lombok.Setter;
public class DevConfigPageParam {
/** 当前页 */
- @ApiModelProperty(value = "当前页码")
+ @Schema(description = "当前页码")
private Integer current;
/** 每页条数 */
- @ApiModelProperty(value = "每页条数")
+ @Schema(description = "每页条数")
private Integer size;
/** 排序字段 */
- @ApiModelProperty(value = "排序字段,字段驼峰名称,如:userName")
+ @Schema(description = "排序字段,字段驼峰名称,如:userName")
private String sortField;
/** 排序方式 */
- @ApiModelProperty(value = "排序方式,升序:ASCEND;降序:DESCEND")
+ @Schema(description = "排序方式,升序:ASCEND;降序:DESCEND")
private String sortOrder;
/** 配置键关键词 */
- @ApiModelProperty(value = "配置键关键词")
+ @Schema(description = "配置键关键词")
private String searchKey;
}
diff --git a/snowy-plugin/snowy-plugin-dev/src/main/java/vip/xiaonuo/dev/modular/config/provider/DevConfigApiProvider.java b/snowy-plugin/snowy-plugin-dev/src/main/java/vip/xiaonuo/dev/modular/config/provider/DevConfigApiProvider.java
index ebcae0ab..d32780fb 100644
--- a/snowy-plugin/snowy-plugin-dev/src/main/java/vip/xiaonuo/dev/modular/config/provider/DevConfigApiProvider.java
+++ b/snowy-plugin/snowy-plugin-dev/src/main/java/vip/xiaonuo/dev/modular/config/provider/DevConfigApiProvider.java
@@ -12,12 +12,11 @@
*/
package vip.xiaonuo.dev.modular.config.provider;
+import jakarta.annotation.Resource;
import org.springframework.stereotype.Service;
import vip.xiaonuo.dev.api.DevConfigApi;
import vip.xiaonuo.dev.modular.config.service.DevConfigService;
-import javax.annotation.Resource;
-
/**
* 配置API接口实现类
*
diff --git a/snowy-plugin/snowy-plugin-dev/src/main/java/vip/xiaonuo/dev/modular/config/service/impl/DevConfigServiceImpl.java b/snowy-plugin/snowy-plugin-dev/src/main/java/vip/xiaonuo/dev/modular/config/service/impl/DevConfigServiceImpl.java
index 3e01189f..cb6a3789 100644
--- a/snowy-plugin/snowy-plugin-dev/src/main/java/vip/xiaonuo/dev/modular/config/service/impl/DevConfigServiceImpl.java
+++ b/snowy-plugin/snowy-plugin-dev/src/main/java/vip/xiaonuo/dev/modular/config/service/impl/DevConfigServiceImpl.java
@@ -23,6 +23,7 @@ import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import jakarta.annotation.Resource;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import vip.xiaonuo.common.cache.CommonCacheOperator;
@@ -35,7 +36,6 @@ import vip.xiaonuo.dev.modular.config.mapper.DevConfigMapper;
import vip.xiaonuo.dev.modular.config.param.*;
import vip.xiaonuo.dev.modular.config.service.DevConfigService;
-import javax.annotation.Resource;
import java.util.List;
import java.util.stream.Collectors;
diff --git a/snowy-plugin/snowy-plugin-dev/src/main/java/vip/xiaonuo/dev/modular/dict/controller/DevDictController.java b/snowy-plugin/snowy-plugin-dev/src/main/java/vip/xiaonuo/dev/modular/dict/controller/DevDictController.java
index b22e52d1..6b7b990f 100644
--- a/snowy-plugin/snowy-plugin-dev/src/main/java/vip/xiaonuo/dev/modular/dict/controller/DevDictController.java
+++ b/snowy-plugin/snowy-plugin-dev/src/main/java/vip/xiaonuo/dev/modular/dict/controller/DevDictController.java
@@ -14,10 +14,11 @@ package vip.xiaonuo.dev.modular.dict.controller;
import cn.hutool.core.lang.tree.Tree;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
-import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport;
-import com.github.xiaoymin.knife4j.annotations.ApiSupport;
-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.annotation.Resource;
+import jakarta.validation.Valid;
+import jakarta.validation.constraints.NotEmpty;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
@@ -25,14 +26,10 @@ import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RestController;
import vip.xiaonuo.common.annotation.CommonLog;
import vip.xiaonuo.common.pojo.CommonResult;
-import vip.xiaonuo.common.pojo.CommonValidList;
import vip.xiaonuo.dev.modular.dict.entity.DevDict;
import vip.xiaonuo.dev.modular.dict.param.*;
import vip.xiaonuo.dev.modular.dict.service.DevDictService;
-import javax.annotation.Resource;
-import javax.validation.Valid;
-import javax.validation.constraints.NotEmpty;
import java.util.List;
/**
@@ -41,8 +38,7 @@ import java.util.List;
* @author xuyuxiang
* @date 2022/6/21 14:58
**/
-@Api(tags = "字典控制器")
-@ApiSupport(author = "SNOWY_TEAM", order = 2)
+@Tag(name = "字典控制器")
@RestController
@Validated
public class DevDictController {
@@ -56,8 +52,7 @@ public class DevDictController {
* @author xuyuxiang
* @date 2022/4/24 20:00
*/
- @ApiOperationSupport(order = 1)
- @ApiOperation("获取字典分页")
+ @Operation(summary = "获取字典分页")
@GetMapping("/dev/dict/page")
public CommonResult> page(DevDictPageParam devDictPageParam) {
return CommonResult.data(devDictService.page(devDictPageParam));
@@ -69,8 +64,7 @@ public class DevDictController {
* @author xuyuxiang
* @date 2022/4/24 20:00
*/
- @ApiOperationSupport(order = 2)
- @ApiOperation("获取字典列表")
+ @Operation(summary = "获取字典列表")
@GetMapping("/dev/dict/list")
public CommonResult> list(DevDictListParam devDictListParam) {
return CommonResult.data(devDictService.list(devDictListParam));
@@ -82,8 +76,7 @@ public class DevDictController {
* @author xuyuxiang
* @date 2022/4/24 20:00
*/
- @ApiOperationSupport(order = 3)
- @ApiOperation("获取字典树")
+ @Operation(summary = "获取字典树")
@GetMapping("/dev/dict/tree")
public CommonResult>> tree(DevDictTreeParam devDictTreeParam) {
return CommonResult.data(devDictService.tree(devDictTreeParam));
@@ -95,8 +88,7 @@ public class DevDictController {
* @author xuyuxiang
* @date 2022/4/24 20:47
*/
- @ApiOperationSupport(order = 4)
- @ApiOperation("添加字典")
+ @Operation(summary = "添加字典")
@CommonLog("添加字典")
@PostMapping("/dev/dict/add")
public CommonResult add(@RequestBody @Valid DevDictAddParam devDictAddParam) {
@@ -110,8 +102,7 @@ public class DevDictController {
* @author xuyuxiang
* @date 2022/4/24 20:47
*/
- @ApiOperationSupport(order = 5)
- @ApiOperation("编辑字典")
+ @Operation(summary = "编辑字典")
@CommonLog("编辑字典")
@PostMapping("/dev/dict/edit")
public CommonResult edit(@RequestBody @Valid DevDictEditParam devDictEditParam) {
@@ -125,12 +116,11 @@ public class DevDictController {
* @author xuyuxiang
* @date 2022/4/24 20:00
*/
- @ApiOperationSupport(order = 6)
- @ApiOperation("删除字典")
+ @Operation(summary = "删除字典")
@CommonLog("删除字典")
@PostMapping("/dev/dict/delete")
public CommonResult delete(@RequestBody @Valid @NotEmpty(message = "集合不能为空")
- CommonValidList devDictIdParamList) {
+ List devDictIdParamList) {
devDictService.delete(devDictIdParamList);
return CommonResult.ok();
}
@@ -141,8 +131,7 @@ public class DevDictController {
* @author xuyuxiang
* @date 2022/4/24 20:00
*/
- @ApiOperationSupport(order = 7)
- @ApiOperation("获取字典详情")
+ @Operation(summary = "获取字典详情")
@GetMapping("/dev/dict/detail")
public CommonResult detail(@Valid DevDictIdParam devDictIdParam) {
return CommonResult.data(devDictService.detail(devDictIdParam));
diff --git a/snowy-plugin/snowy-plugin-dev/src/main/java/vip/xiaonuo/dev/modular/dict/entity/DevDict.java b/snowy-plugin/snowy-plugin-dev/src/main/java/vip/xiaonuo/dev/modular/dict/entity/DevDict.java
index a2858f88..ff44cda1 100644
--- a/snowy-plugin/snowy-plugin-dev/src/main/java/vip/xiaonuo/dev/modular/dict/entity/DevDict.java
+++ b/snowy-plugin/snowy-plugin-dev/src/main/java/vip/xiaonuo/dev/modular/dict/entity/DevDict.java
@@ -15,7 +15,7 @@ package vip.xiaonuo.dev.modular.dict.entity;
import com.baomidou.mybatisplus.annotation.FieldStrategy;
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.Getter;
import lombok.Setter;
import vip.xiaonuo.common.pojo.CommonEntity;
@@ -32,31 +32,31 @@ import vip.xiaonuo.common.pojo.CommonEntity;
public class DevDict extends CommonEntity {
/** id */
- @ApiModelProperty(value = "id", position = 1)
+ @Schema(description = "id")
private String id;
/** 父id */
- @ApiModelProperty(value = "父id", position = 2)
+ @Schema(description = "父id")
private String parentId;
/** 字典文字 */
- @ApiModelProperty(value = "字典文字", position = 3)
+ @Schema(description = "字典文字")
private String dictLabel;
/** 字典值 */
- @ApiModelProperty(value = "字典值", position = 4)
+ @Schema(description = "字典值")
private String dictValue;
/** 分类 */
- @ApiModelProperty(value = "分类", position = 5)
+ @Schema(description = "分类")
private String category;
/** 排序码 */
- @ApiModelProperty(value = "排序码", position = 6)
+ @Schema(description = "排序码")
private Integer sortCode;
/** 扩展信息 */
- @ApiModelProperty(value = "扩展信息", position = 7)
+ @Schema(description = "扩展信息")
@TableField(insertStrategy = FieldStrategy.IGNORED, updateStrategy = FieldStrategy.IGNORED)
private String extJson;
}
diff --git a/snowy-plugin/snowy-plugin-dev/src/main/java/vip/xiaonuo/dev/modular/dict/param/DevDictAddParam.java b/snowy-plugin/snowy-plugin-dev/src/main/java/vip/xiaonuo/dev/modular/dict/param/DevDictAddParam.java
index db1d5ac2..faec6020 100644
--- a/snowy-plugin/snowy-plugin-dev/src/main/java/vip/xiaonuo/dev/modular/dict/param/DevDictAddParam.java
+++ b/snowy-plugin/snowy-plugin-dev/src/main/java/vip/xiaonuo/dev/modular/dict/param/DevDictAddParam.java
@@ -12,13 +12,12 @@
*/
package vip.xiaonuo.dev.modular.dict.param;
-import io.swagger.annotations.ApiModelProperty;
+import io.swagger.v3.oas.annotations.media.Schema;
+import jakarta.validation.constraints.NotBlank;
+import jakarta.validation.constraints.NotNull;
import lombok.Getter;
import lombok.Setter;
-import javax.validation.constraints.NotBlank;
-import javax.validation.constraints.NotNull;
-
/**
* 字典添加参数
*
@@ -30,31 +29,31 @@ import javax.validation.constraints.NotNull;
public class DevDictAddParam {
/** 父id */
- @ApiModelProperty(value = "父id", position = 1)
+ @Schema(description = "父id")
@NotBlank(message = "parentId不能为空")
private String parentId;
/** 字典文字 */
- @ApiModelProperty(value = "字典文字", position = 2)
+ @Schema(description = "字典文字")
@NotBlank(message = "dictLabel不能为空")
private String dictLabel;
/** 字典值 */
- @ApiModelProperty(value = "字典值", position = 3)
+ @Schema(description = "字典值")
@NotBlank(message = "dictValue不能为空")
private String dictValue;
/** 分类 */
- @ApiModelProperty(value = "分类", position = 4)
+ @Schema(description = "分类")
@NotBlank(message = "category不能为空")
private String category;
/** 排序码 */
- @ApiModelProperty(value = "排序码", position = 5)
+ @Schema(description = "排序码")
@NotNull(message = "sortCode不能为空")
private Integer sortCode;
/** 扩展信息 */
- @ApiModelProperty(value = "扩展信息", position = 6)
+ @Schema(description = "扩展信息")
private String extJson;
}
diff --git a/snowy-plugin/snowy-plugin-dev/src/main/java/vip/xiaonuo/dev/modular/dict/param/DevDictEditParam.java b/snowy-plugin/snowy-plugin-dev/src/main/java/vip/xiaonuo/dev/modular/dict/param/DevDictEditParam.java
index ee606fab..ba840da6 100644
--- a/snowy-plugin/snowy-plugin-dev/src/main/java/vip/xiaonuo/dev/modular/dict/param/DevDictEditParam.java
+++ b/snowy-plugin/snowy-plugin-dev/src/main/java/vip/xiaonuo/dev/modular/dict/param/DevDictEditParam.java
@@ -12,13 +12,12 @@
*/
package vip.xiaonuo.dev.modular.dict.param;
-import io.swagger.annotations.ApiModelProperty;
+import io.swagger.v3.oas.annotations.media.Schema;
+import jakarta.validation.constraints.NotBlank;
+import jakarta.validation.constraints.NotNull;
import lombok.Getter;
import lombok.Setter;
-import javax.validation.constraints.NotBlank;
-import javax.validation.constraints.NotNull;
-
/**
* 字典编辑参数
*
@@ -30,36 +29,36 @@ import javax.validation.constraints.NotNull;
public class DevDictEditParam {
/** id */
- @ApiModelProperty(value = "id", position = 1)
+ @Schema(description = "id")
@NotBlank(message = "id不能为空")
private String id;
/** 父id */
- @ApiModelProperty(value = "父id", position = 2)
+ @Schema(description = "父id")
@NotBlank(message = "parentId不能为空")
private String parentId;
/** 字典文字 */
- @ApiModelProperty(value = "字典文字", position = 3)
+ @Schema(description = "字典文字")
@NotBlank(message = "dictLabel不能为空")
private String dictLabel;
/** 字典值 */
- @ApiModelProperty(value = "字典值", position = 4)
+ @Schema(description = "字典值")
@NotBlank(message = "dictValue不能为空")
private String dictValue;
/** 分类 */
- @ApiModelProperty(value = "分类", position = 5)
+ @Schema(description = "分类")
@NotBlank(message = "category不能为空")
private String category;
/** 排序码 */
- @ApiModelProperty(value = "排序码", position = 6)
+ @Schema(description = "排序码")
@NotNull(message = "sortCode不能为空")
private Integer sortCode;
/** 扩展信息 */
- @ApiModelProperty(value = "扩展信息", position = 7)
+ @Schema(description = "扩展信息")
private String extJson;
}
diff --git a/snowy-plugin/snowy-plugin-dev/src/main/java/vip/xiaonuo/dev/modular/dict/param/DevDictIdParam.java b/snowy-plugin/snowy-plugin-dev/src/main/java/vip/xiaonuo/dev/modular/dict/param/DevDictIdParam.java
index c2567a5c..5d420c2d 100644
--- a/snowy-plugin/snowy-plugin-dev/src/main/java/vip/xiaonuo/dev/modular/dict/param/DevDictIdParam.java
+++ b/snowy-plugin/snowy-plugin-dev/src/main/java/vip/xiaonuo/dev/modular/dict/param/DevDictIdParam.java
@@ -12,12 +12,11 @@
*/
package vip.xiaonuo.dev.modular.dict.param;
-import io.swagger.annotations.ApiModelProperty;
+import io.swagger.v3.oas.annotations.media.Schema;
+import jakarta.validation.constraints.NotBlank;
import lombok.Getter;
import lombok.Setter;
-import javax.validation.constraints.NotBlank;
-
/**
* 字典Id参数
*
@@ -29,7 +28,7 @@ import javax.validation.constraints.NotBlank;
public class DevDictIdParam {
/** id */
- @ApiModelProperty(value = "id", required = true)
+ @Schema(description = "id", requiredMode = Schema.RequiredMode.REQUIRED)
@NotBlank(message = "id不能为空")
private String id;
}
diff --git a/snowy-plugin/snowy-plugin-dev/src/main/java/vip/xiaonuo/dev/modular/dict/param/DevDictListParam.java b/snowy-plugin/snowy-plugin-dev/src/main/java/vip/xiaonuo/dev/modular/dict/param/DevDictListParam.java
index 66996c1b..300c0b44 100644
--- a/snowy-plugin/snowy-plugin-dev/src/main/java/vip/xiaonuo/dev/modular/dict/param/DevDictListParam.java
+++ b/snowy-plugin/snowy-plugin-dev/src/main/java/vip/xiaonuo/dev/modular/dict/param/DevDictListParam.java
@@ -12,7 +12,7 @@
*/
package vip.xiaonuo.dev.modular.dict.param;
-import io.swagger.annotations.ApiModelProperty;
+import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Getter;
import lombok.Setter;
@@ -27,10 +27,10 @@ import lombok.Setter;
public class DevDictListParam {
/** 父id */
- @ApiModelProperty(value = "父id")
+ @Schema(description = "父id")
private String parentId;
/** 字典分类 */
- @ApiModelProperty(value = "字典分类")
+ @Schema(description = "字典分类")
private String category;
}
diff --git a/snowy-plugin/snowy-plugin-dev/src/main/java/vip/xiaonuo/dev/modular/dict/param/DevDictPageParam.java b/snowy-plugin/snowy-plugin-dev/src/main/java/vip/xiaonuo/dev/modular/dict/param/DevDictPageParam.java
index 30e2cdcc..df96e086 100644
--- a/snowy-plugin/snowy-plugin-dev/src/main/java/vip/xiaonuo/dev/modular/dict/param/DevDictPageParam.java
+++ b/snowy-plugin/snowy-plugin-dev/src/main/java/vip/xiaonuo/dev/modular/dict/param/DevDictPageParam.java
@@ -12,7 +12,7 @@
*/
package vip.xiaonuo.dev.modular.dict.param;
-import io.swagger.annotations.ApiModelProperty;
+import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Getter;
import lombok.Setter;
@@ -27,30 +27,30 @@ import lombok.Setter;
public class DevDictPageParam {
/** 当前页 */
- @ApiModelProperty(value = "当前页码")
+ @Schema(description = "当前页码")
private Integer current;
/** 每页条数 */
- @ApiModelProperty(value = "每页条数")
+ @Schema(description = "每页条数")
private Integer size;
/** 排序字段 */
- @ApiModelProperty(value = "排序字段,字段驼峰名称,如:userName")
+ @Schema(description = "排序字段,字段驼峰名称,如:userName")
private String sortField;
/** 排序方式 */
- @ApiModelProperty(value = "排序方式,升序:ASCEND;降序:DESCEND")
+ @Schema(description = "排序方式,升序:ASCEND;降序:DESCEND")
private String sortOrder;
/** 父id */
- @ApiModelProperty(value = "父id")
+ @Schema(description = "父id")
private String parentId;
/** 字典分类 */
- @ApiModelProperty(value = "字典分类")
+ @Schema(description = "字典分类")
private String category;
/** 字典文字关键词 */
- @ApiModelProperty(value = "字典文字关键词")
+ @Schema(description = "字典文字关键词")
private String searchKey;
}
diff --git a/snowy-plugin/snowy-plugin-dev/src/main/java/vip/xiaonuo/dev/modular/dict/param/DevDictTreeParam.java b/snowy-plugin/snowy-plugin-dev/src/main/java/vip/xiaonuo/dev/modular/dict/param/DevDictTreeParam.java
index 8ea7c4f0..c2158502 100644
--- a/snowy-plugin/snowy-plugin-dev/src/main/java/vip/xiaonuo/dev/modular/dict/param/DevDictTreeParam.java
+++ b/snowy-plugin/snowy-plugin-dev/src/main/java/vip/xiaonuo/dev/modular/dict/param/DevDictTreeParam.java
@@ -12,7 +12,7 @@
*/
package vip.xiaonuo.dev.modular.dict.param;
-import io.swagger.annotations.ApiModelProperty;
+import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Getter;
import lombok.Setter;
@@ -27,6 +27,6 @@ import lombok.Setter;
public class DevDictTreeParam {
/** 字典分类 */
- @ApiModelProperty(value = "字典分类")
+ @Schema(description = "字典分类")
private String category;
}
diff --git a/snowy-plugin/snowy-plugin-dev/src/main/java/vip/xiaonuo/dev/modular/dict/service/impl/DevDictServiceImpl.java b/snowy-plugin/snowy-plugin-dev/src/main/java/vip/xiaonuo/dev/modular/dict/service/impl/DevDictServiceImpl.java
index bff4acdb..68aebd30 100644
--- a/snowy-plugin/snowy-plugin-dev/src/main/java/vip/xiaonuo/dev/modular/dict/service/impl/DevDictServiceImpl.java
+++ b/snowy-plugin/snowy-plugin-dev/src/main/java/vip/xiaonuo/dev/modular/dict/service/impl/DevDictServiceImpl.java
@@ -25,6 +25,7 @@ import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.fhs.trans.service.impl.DictionaryTransService;
+import jakarta.annotation.Resource;
import org.springframework.beans.factory.InitializingBean;
import org.springframework.stereotype.Service;
import vip.xiaonuo.common.enums.CommonSortOrderEnum;
@@ -36,7 +37,6 @@ import vip.xiaonuo.dev.modular.dict.mapper.DevDictMapper;
import vip.xiaonuo.dev.modular.dict.param.*;
import vip.xiaonuo.dev.modular.dict.service.DevDictService;
-import javax.annotation.Resource;
import java.util.List;
import java.util.Map;
import java.util.concurrent.CompletableFuture;
diff --git a/snowy-plugin/snowy-plugin-dev/src/main/java/vip/xiaonuo/dev/modular/email/controller/DevEmailController.java b/snowy-plugin/snowy-plugin-dev/src/main/java/vip/xiaonuo/dev/modular/email/controller/DevEmailController.java
index 05982dfa..78a24eca 100644
--- a/snowy-plugin/snowy-plugin-dev/src/main/java/vip/xiaonuo/dev/modular/email/controller/DevEmailController.java
+++ b/snowy-plugin/snowy-plugin-dev/src/main/java/vip/xiaonuo/dev/modular/email/controller/DevEmailController.java
@@ -13,10 +13,11 @@
package vip.xiaonuo.dev.modular.email.controller;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
-import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport;
-import com.github.xiaoymin.knife4j.annotations.ApiSupport;
-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.annotation.Resource;
+import jakarta.validation.Valid;
+import jakarta.validation.constraints.NotEmpty;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
@@ -24,14 +25,11 @@ import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RestController;
import vip.xiaonuo.common.annotation.CommonLog;
import vip.xiaonuo.common.pojo.CommonResult;
-import vip.xiaonuo.common.pojo.CommonValidList;
import vip.xiaonuo.dev.modular.email.entity.DevEmail;
import vip.xiaonuo.dev.modular.email.param.*;
import vip.xiaonuo.dev.modular.email.service.DevEmailService;
-import javax.annotation.Resource;
-import javax.validation.Valid;
-import javax.validation.constraints.NotEmpty;
+import java.util.List;
/**
* 邮件控制器
@@ -39,8 +37,7 @@ import javax.validation.constraints.NotEmpty;
* @author xuyuxiang
* @date 2022/2/23 18:26
**/
-@Api(tags = "邮件控制器")
-@ApiSupport(author = "SNOWY_TEAM", order = 3)
+@Tag(name = "邮件控制器")
@RestController
@Validated
public class DevEmailController {
@@ -54,8 +51,7 @@ public class DevEmailController {
* @author xuyuxiang
* @date 2022/4/24 20:47
*/
- @ApiOperationSupport(order = 1)
- @ApiOperation("发送本地文本邮件")
+ @Operation(summary = "发送本地文本邮件")
@CommonLog("发送本地文本邮件")
@PostMapping("/dev/email/sendLocalTxt")
public CommonResult sendLocal(@RequestBody @Valid DevEmailSendLocalTxtParam devEmailSendLocalTxtParam) {
@@ -69,8 +65,7 @@ public class DevEmailController {
* @author xuyuxiang
* @date 2022/4/24 20:47
*/
- @ApiOperationSupport(order = 2)
- @ApiOperation("发送本地HTML邮件")
+ @Operation(summary = "发送本地HTML邮件")
@CommonLog("发送本地HTML邮件")
@PostMapping("/dev/email/sendLocalHtml")
public CommonResult sendLocal(@RequestBody @Valid DevEmailSendLocalHtmlParam devEmailSendLocalHtmlParam) {
@@ -84,8 +79,7 @@ public class DevEmailController {
* @author xuyuxiang
* @date 2022/4/24 20:47
*/
- @ApiOperationSupport(order = 3)
- @ApiOperation("发送阿里云文本邮件")
+ @Operation(summary = "发送阿里云文本邮件")
@CommonLog("发送阿里云文本邮件")
@PostMapping("/dev/email/sendAliyunTxt")
public CommonResult sendAliyun(@RequestBody @Valid DevEmailSendAliyunTxtParam devEmailSendAliyunTxtParam) {
@@ -99,8 +93,7 @@ public class DevEmailController {
* @author xuyuxiang
* @date 2022/4/24 20:47
*/
- @ApiOperationSupport(order = 4)
- @ApiOperation("发送阿里云HTML邮件")
+ @Operation(summary = "发送阿里云HTML邮件")
@CommonLog("发送阿里云HTML邮件")
@PostMapping("/dev/email/sendAliyunHtml")
public CommonResult sendAliyun(@RequestBody @Valid DevEmailSendAliyunHtmlParam devEmailSendAliyunHtmlParam) {
@@ -114,8 +107,7 @@ public class DevEmailController {
* @author xuyuxiang
* @date 2022/4/24 20:47
*/
- @ApiOperationSupport(order = 5)
- @ApiOperation("发送阿里云模板邮件")
+ @Operation(summary = "发送阿里云模板邮件")
@CommonLog("发送阿里云模板邮件")
@PostMapping("/dev/email/sendAliyunTmp")
public CommonResult sendAliyun(@RequestBody @Valid DevEmailSendAliyunTmpParam devEmailSendAliyunTmpParam) {
@@ -129,8 +121,7 @@ public class DevEmailController {
* @author xuyuxiang
* @date 2022/4/24 20:47
*/
- @ApiOperationSupport(order = 6)
- @ApiOperation("发送腾讯云文本邮件")
+ @Operation(summary = "发送腾讯云文本邮件")
@CommonLog("发送腾讯云文本邮件")
@PostMapping("/dev/email/sendTencentTxt")
public CommonResult sendTencent(@RequestBody @Valid DevEmailSendTencentTxtParam devEmailSendTencentTxtParam) {
@@ -144,8 +135,7 @@ public class DevEmailController {
* @author xuyuxiang
* @date 2022/4/24 20:47
*/
- @ApiOperationSupport(order = 7)
- @ApiOperation("发送腾讯云HTML邮件")
+ @Operation(summary = "发送腾讯云HTML邮件")
@CommonLog("发送腾讯云HTML邮件")
@PostMapping("/dev/email/sentTencentHtml")
public CommonResult sendTencent(@RequestBody @Valid DevEmailSendTencentHtmlParam devEmailSendTencentHtmlParam) {
@@ -159,8 +149,7 @@ public class DevEmailController {
* @author xuyuxiang
* @date 2022/4/24 20:47
*/
- @ApiOperationSupport(order = 8)
- @ApiOperation("发送腾讯云模板邮件")
+ @Operation(summary = "发送腾讯云模板邮件")
@CommonLog("发送腾讯云模板邮件")
@PostMapping("/dev/email/sentTencentTmp")
public CommonResult sendTencent(@RequestBody @Valid DevEmailSendTencentTmpParam devEmailSendTencentTmpParam) {
@@ -174,8 +163,7 @@ public class DevEmailController {
* @author xuyuxiang
* @date 2022/4/24 20:00
*/
- @ApiOperationSupport(order = 9)
- @ApiOperation("获取邮件分页")
+ @Operation(summary = "获取邮件分页")
@GetMapping("/dev/email/page")
public CommonResult> page(DevEmailPageParam devEmailPageParam) {
return CommonResult.data(devEmailService.page(devEmailPageParam));
@@ -187,12 +175,11 @@ public class DevEmailController {
* @author xuyuxiang
* @date 2022/4/24 20:00
*/
- @ApiOperationSupport(order = 10)
- @ApiOperation("删除邮件")
+ @Operation(summary = "删除邮件")
@CommonLog("删除邮件")
@PostMapping("/dev/email/delete")
public CommonResult delete(@RequestBody @Valid @NotEmpty(message = "集合不能为空")
- CommonValidList devEmailIdParamList) {
+ List devEmailIdParamList) {
devEmailService.delete(devEmailIdParamList);
return CommonResult.ok();
}
@@ -203,8 +190,7 @@ public class DevEmailController {
* @author xuyuxiang
* @date 2022/4/24 20:00
*/
- @ApiOperationSupport(order = 11)
- @ApiOperation("获取邮件详情")
+ @Operation(summary = "获取邮件详情")
@GetMapping("/dev/email/detail")
public CommonResult detail(@Valid DevEmailIdParam devEmailIdParam) {
return CommonResult.data(devEmailService.detail(devEmailIdParam));
diff --git a/snowy-plugin/snowy-plugin-dev/src/main/java/vip/xiaonuo/dev/modular/email/entity/DevEmail.java b/snowy-plugin/snowy-plugin-dev/src/main/java/vip/xiaonuo/dev/modular/email/entity/DevEmail.java
index 34a0b9fd..00dd7642 100644
--- a/snowy-plugin/snowy-plugin-dev/src/main/java/vip/xiaonuo/dev/modular/email/entity/DevEmail.java
+++ b/snowy-plugin/snowy-plugin-dev/src/main/java/vip/xiaonuo/dev/modular/email/entity/DevEmail.java
@@ -13,7 +13,7 @@
package vip.xiaonuo.dev.modular.email.entity;
import com.baomidou.mybatisplus.annotation.TableName;
-import io.swagger.annotations.ApiModelProperty;
+import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Getter;
import lombok.Setter;
import vip.xiaonuo.common.pojo.CommonEntity;
@@ -30,50 +30,50 @@ import vip.xiaonuo.common.pojo.CommonEntity;
public class DevEmail extends CommonEntity {
/** id */
- @ApiModelProperty(value = "id", position = 1)
+ @Schema(description = "id")
private String id;
/** 邮件引擎 */
- @ApiModelProperty(value = "邮件引擎", position = 2)
+ @Schema(description = "邮件引擎")
private String engine;
/** 发件人邮箱 */
- @ApiModelProperty(value = "发件人邮箱", position = 3)
+ @Schema(description = "发件人邮箱")
private String sendAccount;
/** 发件人昵称 */
- @ApiModelProperty(value = "发件人昵称", position = 4)
+ @Schema(description = "发件人昵称")
private String sendUser;
/** 接收人 */
- @ApiModelProperty(value = "接收人", position = 5)
+ @Schema(description = "接收人")
private String receiveAccounts;
/** 邮件主题 */
- @ApiModelProperty(value = "邮件主题", position = 6)
+ @Schema(description = "邮件主题")
private String subject;
/** 邮件正文 */
- @ApiModelProperty(value = "邮件正文", position = 7)
+ @Schema(description = "邮件正文")
private String content;
/** 标签名 */
- @ApiModelProperty(value = "标签名", position = 8)
+ @Schema(description = "标签名")
private String tagName;
/** 模板名 */
- @ApiModelProperty(value = "模板名", position = 9)
+ @Schema(description = "模板名")
private String templateName;
/** 发送参数 */
- @ApiModelProperty(value = "发送参数", position = 10)
+ @Schema(description = "发送参数")
private String templateParam;
/** 回执信息 */
- @ApiModelProperty(value = "回执信息", position = 11)
+ @Schema(description = "回执信息")
private String receiptInfo;
/** 扩展信息 */
- @ApiModelProperty(value = "扩展信息", position = 12)
+ @Schema(description = "扩展信息")
private String extJson;
}
diff --git a/snowy-plugin/snowy-plugin-dev/src/main/java/vip/xiaonuo/dev/modular/email/param/DevEmailIdParam.java b/snowy-plugin/snowy-plugin-dev/src/main/java/vip/xiaonuo/dev/modular/email/param/DevEmailIdParam.java
index 7b2e3481..46585116 100644
--- a/snowy-plugin/snowy-plugin-dev/src/main/java/vip/xiaonuo/dev/modular/email/param/DevEmailIdParam.java
+++ b/snowy-plugin/snowy-plugin-dev/src/main/java/vip/xiaonuo/dev/modular/email/param/DevEmailIdParam.java
@@ -12,12 +12,11 @@
*/
package vip.xiaonuo.dev.modular.email.param;
-import io.swagger.annotations.ApiModelProperty;
+import io.swagger.v3.oas.annotations.media.Schema;
+import jakarta.validation.constraints.NotBlank;
import lombok.Getter;
import lombok.Setter;
-import javax.validation.constraints.NotBlank;
-
/**
* 邮件Id参数
*
@@ -29,7 +28,7 @@ import javax.validation.constraints.NotBlank;
public class DevEmailIdParam {
/** id */
- @ApiModelProperty(value = "id", required = true)
+ @Schema(description = "id", requiredMode = Schema.RequiredMode.REQUIRED)
@NotBlank(message = "id不能为空")
private String id;
}
diff --git a/snowy-plugin/snowy-plugin-dev/src/main/java/vip/xiaonuo/dev/modular/email/param/DevEmailPageParam.java b/snowy-plugin/snowy-plugin-dev/src/main/java/vip/xiaonuo/dev/modular/email/param/DevEmailPageParam.java
index f26934e4..c4dd2058 100644
--- a/snowy-plugin/snowy-plugin-dev/src/main/java/vip/xiaonuo/dev/modular/email/param/DevEmailPageParam.java
+++ b/snowy-plugin/snowy-plugin-dev/src/main/java/vip/xiaonuo/dev/modular/email/param/DevEmailPageParam.java
@@ -12,7 +12,7 @@
*/
package vip.xiaonuo.dev.modular.email.param;
-import io.swagger.annotations.ApiModelProperty;
+import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Getter;
import lombok.Setter;
@@ -27,26 +27,26 @@ import lombok.Setter;
public class DevEmailPageParam {
/** 当前页 */
- @ApiModelProperty(value = "当前页码")
+ @Schema(description = "当前页码")
private Integer current;
/** 每页条数 */
- @ApiModelProperty(value = "每页条数")
+ @Schema(description = "每页条数")
private Integer size;
/** 排序字段 */
- @ApiModelProperty(value = "排序字段,字段驼峰名称,如:userName")
+ @Schema(description = "排序字段,字段驼峰名称,如:userName")
private String sortField;
/** 排序方式 */
- @ApiModelProperty(value = "排序方式,升序:ASCEND;降序:DESCEND")
+ @Schema(description = "排序方式,升序:ASCEND;降序:DESCEND")
private String sortOrder;
/** 邮件引擎 */
- @ApiModelProperty(value = "邮件引擎")
+ @Schema(description = "邮件引擎")
private String engine;
/** 邮件主题关键词 */
- @ApiModelProperty(value = "邮件主题关键词")
+ @Schema(description = "邮件主题关键词")
private String searchKey;
}
diff --git a/snowy-plugin/snowy-plugin-dev/src/main/java/vip/xiaonuo/dev/modular/email/param/DevEmailSendAliyunHtmlParam.java b/snowy-plugin/snowy-plugin-dev/src/main/java/vip/xiaonuo/dev/modular/email/param/DevEmailSendAliyunHtmlParam.java
index ae525828..8ced5a3a 100644
--- a/snowy-plugin/snowy-plugin-dev/src/main/java/vip/xiaonuo/dev/modular/email/param/DevEmailSendAliyunHtmlParam.java
+++ b/snowy-plugin/snowy-plugin-dev/src/main/java/vip/xiaonuo/dev/modular/email/param/DevEmailSendAliyunHtmlParam.java
@@ -12,12 +12,11 @@
*/
package vip.xiaonuo.dev.modular.email.param;
-import io.swagger.annotations.ApiModelProperty;
+import io.swagger.v3.oas.annotations.media.Schema;
+import jakarta.validation.constraints.NotBlank;
import lombok.Getter;
import lombok.Setter;
-import javax.validation.constraints.NotBlank;
-
/**
* 邮件发送——阿里云HTML参数
*
@@ -29,26 +28,26 @@ import javax.validation.constraints.NotBlank;
public class DevEmailSendAliyunHtmlParam {
/** 发件人邮箱 */
- @ApiModelProperty(value = "发件人邮箱,即管理控制台中配置的发信地址", required = true, position = 1)
+ @Schema(description = "发件人邮箱,即管理控制台中配置的发信地址", requiredMode = Schema.RequiredMode.REQUIRED)
@NotBlank(message = "sendAccount不能为空")
private String sendAccount;
/** 接收人 */
- @ApiModelProperty(value = "接收人邮箱地址,多个逗号拼接", required = true, position = 2)
+ @Schema(description = "接收人邮箱地址,多个逗号拼接", requiredMode = Schema.RequiredMode.REQUIRED)
@NotBlank(message = "receiveAccounts不能为空")
private String receiveAccounts;
/** 邮件主题 */
- @ApiModelProperty(value = "邮件主题", required = true, position = 3)
+ @Schema(description = "邮件主题", requiredMode = Schema.RequiredMode.REQUIRED)
@NotBlank(message = "subject不能为空")
private String subject;
/** 邮件正文 */
- @ApiModelProperty(value = "邮件正文", required = true, position = 4)
+ @Schema(description = "邮件正文", requiredMode = Schema.RequiredMode.REQUIRED)
@NotBlank(message = "content不能为空")
private String content;
/** 发件人昵称 */
- @ApiModelProperty(value = "发件人昵称", position = 5)
+ @Schema(description = "发件人昵称")
private String sendUser;
}
diff --git a/snowy-plugin/snowy-plugin-dev/src/main/java/vip/xiaonuo/dev/modular/email/param/DevEmailSendAliyunTmpParam.java b/snowy-plugin/snowy-plugin-dev/src/main/java/vip/xiaonuo/dev/modular/email/param/DevEmailSendAliyunTmpParam.java
index 7a224b3d..5d5b4a5c 100644
--- a/snowy-plugin/snowy-plugin-dev/src/main/java/vip/xiaonuo/dev/modular/email/param/DevEmailSendAliyunTmpParam.java
+++ b/snowy-plugin/snowy-plugin-dev/src/main/java/vip/xiaonuo/dev/modular/email/param/DevEmailSendAliyunTmpParam.java
@@ -12,12 +12,11 @@
*/
package vip.xiaonuo.dev.modular.email.param;
-import io.swagger.annotations.ApiModelProperty;
+import io.swagger.v3.oas.annotations.media.Schema;
+import jakarta.validation.constraints.NotBlank;
import lombok.Getter;
import lombok.Setter;
-import javax.validation.constraints.NotBlank;
-
/**
* 邮件发送——阿里云TMP参数
*
@@ -29,21 +28,21 @@ import javax.validation.constraints.NotBlank;
public class DevEmailSendAliyunTmpParam {
/** 发件人邮箱 */
- @ApiModelProperty(value = "管理控制台中配置的发信地址", required = true, position = 1)
+ @Schema(description = "管理控制台中配置的发信地址", requiredMode = Schema.RequiredMode.REQUIRED)
@NotBlank(message = "sendAccount不能为空")
private String sendAccount;
/** 接收人 */
- @ApiModelProperty(value = "预先创建且上传了收件人的收件人列表名称", required = true, position = 2)
+ @Schema(description = "预先创建且上传了收件人的收件人列表名称", requiredMode = Schema.RequiredMode.REQUIRED)
@NotBlank(message = "receiveAccounts不能为空")
private String receiveAccounts;
/** 模板名 */
- @ApiModelProperty(value = "预先创建且通过审核的模板名称", required = true, position = 4)
+ @Schema(description = "预先创建且通过审核的模板名称", requiredMode = Schema.RequiredMode.REQUIRED)
@NotBlank(message = "templateName不能为空")
private String templateName;
/** 标签名 */
- @ApiModelProperty(value = "标签名", position = 5)
+ @Schema(description = "标签名")
private String tagName;
}
diff --git a/snowy-plugin/snowy-plugin-dev/src/main/java/vip/xiaonuo/dev/modular/email/param/DevEmailSendAliyunTxtParam.java b/snowy-plugin/snowy-plugin-dev/src/main/java/vip/xiaonuo/dev/modular/email/param/DevEmailSendAliyunTxtParam.java
index 5f139cc9..a6005fcb 100644
--- a/snowy-plugin/snowy-plugin-dev/src/main/java/vip/xiaonuo/dev/modular/email/param/DevEmailSendAliyunTxtParam.java
+++ b/snowy-plugin/snowy-plugin-dev/src/main/java/vip/xiaonuo/dev/modular/email/param/DevEmailSendAliyunTxtParam.java
@@ -12,12 +12,11 @@
*/
package vip.xiaonuo.dev.modular.email.param;
-import io.swagger.annotations.ApiModelProperty;
+import io.swagger.v3.oas.annotations.media.Schema;
+import jakarta.validation.constraints.NotBlank;
import lombok.Getter;
import lombok.Setter;
-import javax.validation.constraints.NotBlank;
-
/**
* 邮件发送——阿里云TXT参数
*
@@ -29,26 +28,26 @@ import javax.validation.constraints.NotBlank;
public class DevEmailSendAliyunTxtParam {
/** 发件人邮箱 */
- @ApiModelProperty(value = "发件人邮箱,即管理控制台中配置的发信地址", required = true, position = 1)
+ @Schema(description = "发件人邮箱,即管理控制台中配置的发信地址", requiredMode = Schema.RequiredMode.REQUIRED)
@NotBlank(message = "sendAccount不能为空")
private String sendAccount;
/** 接收人 */
- @ApiModelProperty(value = "接收人邮箱地址,多个逗号拼接", required = true, position = 2)
+ @Schema(description = "接收人邮箱地址,多个逗号拼接", requiredMode = Schema.RequiredMode.REQUIRED)
@NotBlank(message = "receiveAccounts不能为空")
private String receiveAccounts;
/** 邮件主题 */
- @ApiModelProperty(value = "邮件主题", required = true, position = 3)
+ @Schema(description = "邮件主题", requiredMode = Schema.RequiredMode.REQUIRED)
@NotBlank(message = "subject不能为空")
private String subject;
/** 邮件正文 */
- @ApiModelProperty(value = "邮件正文", required = true, position = 4)
+ @Schema(description = "邮件正文", requiredMode = Schema.RequiredMode.REQUIRED)
@NotBlank(message = "content不能为空")
private String content;
/** 发件人昵称 */
- @ApiModelProperty(value = "发件人昵称", position = 5)
+ @Schema(description = "发件人昵称")
private String sendUser;
}
diff --git a/snowy-plugin/snowy-plugin-dev/src/main/java/vip/xiaonuo/dev/modular/email/param/DevEmailSendLocalHtmlParam.java b/snowy-plugin/snowy-plugin-dev/src/main/java/vip/xiaonuo/dev/modular/email/param/DevEmailSendLocalHtmlParam.java
index c7f5627f..32554513 100644
--- a/snowy-plugin/snowy-plugin-dev/src/main/java/vip/xiaonuo/dev/modular/email/param/DevEmailSendLocalHtmlParam.java
+++ b/snowy-plugin/snowy-plugin-dev/src/main/java/vip/xiaonuo/dev/modular/email/param/DevEmailSendLocalHtmlParam.java
@@ -14,11 +14,11 @@ package vip.xiaonuo.dev.modular.email.param;
import cn.hutool.core.collection.CollectionUtil;
import cn.hutool.core.map.MapUtil;
-import io.swagger.annotations.ApiModelProperty;
+import io.swagger.v3.oas.annotations.media.Schema;
+import jakarta.validation.constraints.NotBlank;
import lombok.Getter;
import lombok.Setter;
-import javax.validation.constraints.NotBlank;
import java.io.File;
import java.io.InputStream;
import java.util.List;
@@ -35,25 +35,25 @@ import java.util.Map;
public class DevEmailSendLocalHtmlParam {
/** 接收人 */
- @ApiModelProperty(value = "接收人邮箱地址,多个逗号拼接", required = true, position = 1)
+ @Schema(description = "接收人邮箱地址,多个逗号拼接", requiredMode = Schema.RequiredMode.REQUIRED)
@NotBlank(message = "receiveAccounts不能为空")
private String receiveAccounts;
/** 邮件主题 */
- @ApiModelProperty(value = "邮件主题", required = true, position = 2)
+ @Schema(description = "邮件主题", requiredMode = Schema.RequiredMode.REQUIRED)
@NotBlank(message = "subject不能为空")
private String subject;
/** 邮件正文 */
- @ApiModelProperty(value = "邮件正文", required = true, position = 3)
+ @Schema(description = "邮件正文", requiredMode = Schema.RequiredMode.REQUIRED)
@NotBlank(message = "content不能为空")
private String content;
/** 图片展位符 */
- @ApiModelProperty(value = "图片展位符", position = 4, hidden = true)
+ @Schema(description = "图片展位符", hidden = true)
private Map imageMap = MapUtil.newHashMap();
/** 附件列表 */
- @ApiModelProperty(value = "附件列表", position = 5, hidden = true)
+ @Schema(description = "附件列表", hidden = true)
private List files = CollectionUtil.newArrayList();
}
diff --git a/snowy-plugin/snowy-plugin-dev/src/main/java/vip/xiaonuo/dev/modular/email/param/DevEmailSendLocalTxtParam.java b/snowy-plugin/snowy-plugin-dev/src/main/java/vip/xiaonuo/dev/modular/email/param/DevEmailSendLocalTxtParam.java
index c81110ce..145641b4 100644
--- a/snowy-plugin/snowy-plugin-dev/src/main/java/vip/xiaonuo/dev/modular/email/param/DevEmailSendLocalTxtParam.java
+++ b/snowy-plugin/snowy-plugin-dev/src/main/java/vip/xiaonuo/dev/modular/email/param/DevEmailSendLocalTxtParam.java
@@ -13,11 +13,11 @@
package vip.xiaonuo.dev.modular.email.param;
import cn.hutool.core.collection.CollectionUtil;
-import io.swagger.annotations.ApiModelProperty;
+import io.swagger.v3.oas.annotations.media.Schema;
+import jakarta.validation.constraints.NotBlank;
import lombok.Getter;
import lombok.Setter;
-import javax.validation.constraints.NotBlank;
import java.io.File;
import java.util.List;
@@ -32,21 +32,21 @@ import java.util.List;
public class DevEmailSendLocalTxtParam {
/** 接收人 */
- @ApiModelProperty(value = "接收人邮箱地址,多个逗号拼接", required = true, position = 1)
+ @Schema(description = "接收人邮箱地址,多个逗号拼接", requiredMode = Schema.RequiredMode.REQUIRED)
@NotBlank(message = "receiveAccounts不能为空")
private String receiveAccounts;
/** 邮件主题 */
- @ApiModelProperty(value = "邮件主题", required = true, position = 2)
+ @Schema(description = "邮件主题", requiredMode = Schema.RequiredMode.REQUIRED)
@NotBlank(message = "subject不能为空")
private String subject;
/** 邮件正文 */
- @ApiModelProperty(value = "邮件正文", required = true, position = 3)
+ @Schema(description = "邮件正文", requiredMode = Schema.RequiredMode.REQUIRED)
@NotBlank(message = "content不能为空")
private String content;
/** 附件列表 */
- @ApiModelProperty(value = "附件列表", position = 4, hidden = true)
+ @Schema(description = "附件列表", hidden = true)
private List files = CollectionUtil.newArrayList();
}
diff --git a/snowy-plugin/snowy-plugin-dev/src/main/java/vip/xiaonuo/dev/modular/email/param/DevEmailSendTencentHtmlParam.java b/snowy-plugin/snowy-plugin-dev/src/main/java/vip/xiaonuo/dev/modular/email/param/DevEmailSendTencentHtmlParam.java
index f2f9909c..a5bd06e4 100644
--- a/snowy-plugin/snowy-plugin-dev/src/main/java/vip/xiaonuo/dev/modular/email/param/DevEmailSendTencentHtmlParam.java
+++ b/snowy-plugin/snowy-plugin-dev/src/main/java/vip/xiaonuo/dev/modular/email/param/DevEmailSendTencentHtmlParam.java
@@ -14,11 +14,11 @@ package vip.xiaonuo.dev.modular.email.param;
import cn.hutool.core.collection.CollectionUtil;
import cn.hutool.json.JSONObject;
-import io.swagger.annotations.ApiModelProperty;
+import io.swagger.v3.oas.annotations.media.Schema;
+import jakarta.validation.constraints.NotBlank;
import lombok.Getter;
import lombok.Setter;
-import javax.validation.constraints.NotBlank;
import java.util.List;
/**
@@ -32,30 +32,30 @@ import java.util.List;
public class DevEmailSendTencentHtmlParam {
/** 发件人邮箱 */
- @ApiModelProperty(value = "管理控制台中配置的发信地址", required = true, position = 1)
+ @Schema(description = "管理控制台中配置的发信地址", requiredMode = Schema.RequiredMode.REQUIRED)
@NotBlank(message = "sendAccount不能为空")
private String sendAccount;
/** 接收人 */
- @ApiModelProperty(value = "接收人邮箱地址,多个逗号拼接", required = true, position = 2)
+ @Schema(description = "接收人邮箱地址,多个逗号拼接", requiredMode = Schema.RequiredMode.REQUIRED)
@NotBlank(message = "receiveAccounts不能为空")
private String receiveAccounts;
/** 邮件主题 */
- @ApiModelProperty(value = "邮件主题", required = true, position = 3)
+ @Schema(description = "邮件主题", requiredMode = Schema.RequiredMode.REQUIRED)
@NotBlank(message = "subject不能为空")
private String subject;
/** 邮件正文 */
- @ApiModelProperty(value = "邮件正文", required = true, position = 4)
+ @Schema(description = "邮件正文", requiredMode = Schema.RequiredMode.REQUIRED)
@NotBlank(message = "content不能为空")
private String content;
/** 发件人昵称 */
- @ApiModelProperty(value = "发件人昵称", position = 5)
+ @Schema(description = "发件人昵称")
private String sendUser;
/** 附件列表 */
- @ApiModelProperty(value = "附件列表", position = 6, hidden = true)
+ @Schema(description = "附件列表", hidden = true)
List attachmentList = CollectionUtil.newArrayList();
}
diff --git a/snowy-plugin/snowy-plugin-dev/src/main/java/vip/xiaonuo/dev/modular/email/param/DevEmailSendTencentTmpParam.java b/snowy-plugin/snowy-plugin-dev/src/main/java/vip/xiaonuo/dev/modular/email/param/DevEmailSendTencentTmpParam.java
index d37aea28..1f1d2dae 100644
--- a/snowy-plugin/snowy-plugin-dev/src/main/java/vip/xiaonuo/dev/modular/email/param/DevEmailSendTencentTmpParam.java
+++ b/snowy-plugin/snowy-plugin-dev/src/main/java/vip/xiaonuo/dev/modular/email/param/DevEmailSendTencentTmpParam.java
@@ -14,11 +14,11 @@ package vip.xiaonuo.dev.modular.email.param;
import cn.hutool.core.collection.CollectionUtil;
import cn.hutool.json.JSONObject;
-import io.swagger.annotations.ApiModelProperty;
+import io.swagger.v3.oas.annotations.media.Schema;
+import jakarta.validation.constraints.NotBlank;
import lombok.Getter;
import lombok.Setter;
-import javax.validation.constraints.NotBlank;
import java.util.List;
/**
@@ -32,34 +32,34 @@ import java.util.List;
public class DevEmailSendTencentTmpParam {
/** 发件人邮箱 */
- @ApiModelProperty(value = "管理控制台中配置的发信地址", required = true, position = 1)
+ @Schema(description = "管理控制台中配置的发信地址", requiredMode = Schema.RequiredMode.REQUIRED)
@NotBlank(message = "sendAccount不能为空")
private String sendAccount;
/** 接收人 */
- @ApiModelProperty(value = "预先创建且上传了收件人的收件人列表id", required = true, position = 2)
+ @Schema(description = "预先创建且上传了收件人的收件人列表id", requiredMode = Schema.RequiredMode.REQUIRED)
@NotBlank(message = "receiveAccounts不能为空")
private String receiveAccounts;
/** 模板名 */
- @ApiModelProperty(value = "预先创建且通过审核的模板Id", required = true, position = 3)
+ @Schema(description = "预先创建且通过审核的模板Id", requiredMode = Schema.RequiredMode.REQUIRED)
@NotBlank(message = "templateName不能为空")
private String templateName;
/** 邮件主题 */
- @ApiModelProperty(value = "邮件主题", required = true, position = 4)
+ @Schema(description = "邮件主题", requiredMode = Schema.RequiredMode.REQUIRED)
@NotBlank(message = "subject不能为空")
private String subject;
/** 发件人昵称 */
- @ApiModelProperty(value = "发件人昵称", position = 5)
+ @Schema(description = "发件人昵称")
private String sendUser;
/** 发送参数 */
- @ApiModelProperty(value = "预先创建且通过审核的模板的参数json", position = 6)
+ @Schema(description = "预先创建且通过审核的模板的参数json")
private String templateParam;
/** 附件列表 */
- @ApiModelProperty(value = "附件列表", position = 7, hidden = true)
+ @Schema(description = "附件列表", hidden = true)
List attachmentList = CollectionUtil.newArrayList();
}
diff --git a/snowy-plugin/snowy-plugin-dev/src/main/java/vip/xiaonuo/dev/modular/email/param/DevEmailSendTencentTxtParam.java b/snowy-plugin/snowy-plugin-dev/src/main/java/vip/xiaonuo/dev/modular/email/param/DevEmailSendTencentTxtParam.java
index 46e7d977..beeeb2c2 100644
--- a/snowy-plugin/snowy-plugin-dev/src/main/java/vip/xiaonuo/dev/modular/email/param/DevEmailSendTencentTxtParam.java
+++ b/snowy-plugin/snowy-plugin-dev/src/main/java/vip/xiaonuo/dev/modular/email/param/DevEmailSendTencentTxtParam.java
@@ -14,11 +14,11 @@ package vip.xiaonuo.dev.modular.email.param;
import cn.hutool.core.collection.CollectionUtil;
import cn.hutool.json.JSONObject;
-import io.swagger.annotations.ApiModelProperty;
+import io.swagger.v3.oas.annotations.media.Schema;
+import jakarta.validation.constraints.NotBlank;
import lombok.Getter;
import lombok.Setter;
-import javax.validation.constraints.NotBlank;
import java.util.List;
/**
@@ -32,30 +32,30 @@ import java.util.List;
public class DevEmailSendTencentTxtParam {
/** 发件人邮箱 */
- @ApiModelProperty(value = "管理控制台中配置的发信地址", required = true, position = 1)
+ @Schema(description = "管理控制台中配置的发信地址", requiredMode = Schema.RequiredMode.REQUIRED)
@NotBlank(message = "sendAccount不能为空")
private String sendAccount;
/** 接收人 */
- @ApiModelProperty(value = "接收人邮箱地址,多个逗号拼接", required = true, position = 2)
+ @Schema(description = "接收人邮箱地址,多个逗号拼接", requiredMode = Schema.RequiredMode.REQUIRED)
@NotBlank(message = "receiveAccounts不能为空")
private String receiveAccounts;
/** 邮件主题 */
- @ApiModelProperty(value = "邮件主题", required = true, position = 3)
+ @Schema(description = "邮件主题", requiredMode = Schema.RequiredMode.REQUIRED)
@NotBlank(message = "subject不能为空")
private String subject;
/** 邮件正文 */
- @ApiModelProperty(value = "邮件正文", required = true, position = 4)
+ @Schema(description = "邮件正文", requiredMode = Schema.RequiredMode.REQUIRED)
@NotBlank(message = "content不能为空")
private String content;
/** 发件人昵称 */
- @ApiModelProperty(value = "发件人昵称", position = 5)
+ @Schema(description = "发件人昵称")
private String sendUser;
/** 附件列表 */
- @ApiModelProperty(value = "附件列表", position = 6, hidden = true)
+ @Schema(description = "附件列表", hidden = true)
List attachmentList = CollectionUtil.newArrayList();
}
diff --git a/snowy-plugin/snowy-plugin-dev/src/main/java/vip/xiaonuo/dev/modular/email/provider/DevEmailApiProvider.java b/snowy-plugin/snowy-plugin-dev/src/main/java/vip/xiaonuo/dev/modular/email/provider/DevEmailApiProvider.java
index 594ff4cf..a3829fd1 100644
--- a/snowy-plugin/snowy-plugin-dev/src/main/java/vip/xiaonuo/dev/modular/email/provider/DevEmailApiProvider.java
+++ b/snowy-plugin/snowy-plugin-dev/src/main/java/vip/xiaonuo/dev/modular/email/provider/DevEmailApiProvider.java
@@ -13,12 +13,12 @@
package vip.xiaonuo.dev.modular.email.provider;
import cn.hutool.json.JSONObject;
+import jakarta.annotation.Resource;
import org.springframework.stereotype.Service;
import vip.xiaonuo.dev.api.DevEmailApi;
import vip.xiaonuo.dev.modular.email.param.*;
import vip.xiaonuo.dev.modular.email.service.DevEmailService;
-import javax.annotation.Resource;
import java.io.File;
import java.io.InputStream;
import java.util.List;
diff --git a/snowy-plugin/snowy-plugin-dev/src/main/java/vip/xiaonuo/dev/modular/email/util/DevEmailAliyunUtil.java b/snowy-plugin/snowy-plugin-dev/src/main/java/vip/xiaonuo/dev/modular/email/util/DevEmailAliyunUtil.java
index 90767818..f2f800f7 100644
--- a/snowy-plugin/snowy-plugin-dev/src/main/java/vip/xiaonuo/dev/modular/email/util/DevEmailAliyunUtil.java
+++ b/snowy-plugin/snowy-plugin-dev/src/main/java/vip/xiaonuo/dev/modular/email/util/DevEmailAliyunUtil.java
@@ -14,13 +14,10 @@ package vip.xiaonuo.dev.modular.email.util;
import cn.hutool.core.util.ObjectUtil;
import cn.hutool.extra.spring.SpringUtil;
-import com.aliyuncs.DefaultAcsClient;
-import com.aliyuncs.IAcsClient;
-import com.aliyuncs.dm.model.v20151123.BatchSendMailRequest;
-import com.aliyuncs.dm.model.v20151123.SingleSendMailRequest;
-import com.aliyuncs.exceptions.ClientException;
-import com.aliyuncs.http.MethodType;
-import com.aliyuncs.profile.DefaultProfile;
+import com.aliyun.dm20151123.Client;
+import com.aliyun.dm20151123.models.BatchSendMailRequest;
+import com.aliyun.dm20151123.models.SingleSendMailRequest;
+import com.aliyun.teaopenapi.models.Config;
import lombok.extern.slf4j.Slf4j;
import vip.xiaonuo.common.exception.CommonException;
import vip.xiaonuo.dev.api.DevConfigApi;
@@ -35,7 +32,7 @@ import vip.xiaonuo.dev.api.DevConfigApi;
@Slf4j
public class DevEmailAliyunUtil {
- private static IAcsClient client;
+ private static Client client;
private static final String SNOWY_EMAIL_ALIYUN_ACCESS_KEY_ID_KEY = "SNOWY_EMAIL_ALIYUN_ACCESS_KEY_ID";
private static final String SNOWY_EMAIL_ALIYUN_ACCESS_KEY_SECRET_KEY = "SNOWY_EMAIL_ALIYUN_ACCESS_KEY_SECRET";
@@ -72,7 +69,11 @@ public class DevEmailAliyunUtil {
throw new CommonException("阿里云邮件操作客户端未正确配置:regionId为空");
}
- client = new DefaultAcsClient(DefaultProfile.getProfile(regionId, accessKeyId, accessKeySecret));
+ try {
+ client = new Client(new Config().setRegionId(regionId).setAccessKeyId(accessKeyId).setAccessKeySecret(accessKeySecret));
+ } catch (Exception e) {
+ throw new CommonException(e.getMessage());
+ }
}
/**
@@ -91,8 +92,8 @@ public class DevEmailAliyunUtil {
try {
initClient();
SingleSendMailRequest singleSendMailRequest = createSingleSendRequest(from, user, tos, subject, content, false);
- return client.getAcsResponse(singleSendMailRequest).getEnvId();
- } catch (ClientException e) {
+ return client.singleSendMail(singleSendMailRequest).getBody().getEnvId();
+ } catch (Exception e) {
throw new CommonException(e.getMessage());
}
}
@@ -113,8 +114,8 @@ public class DevEmailAliyunUtil {
try {
initClient();
SingleSendMailRequest singleSendMailRequest = createSingleSendRequest(from, user, tos, subject, content, true);
- return client.getAcsResponse(singleSendMailRequest).getEnvId();
- } catch (ClientException e) {
+ return client.singleSendMail(singleSendMailRequest).getBody().getEnvId();
+ } catch (Exception e) {
throw new CommonException(e.getMessage());
}
}
@@ -134,8 +135,8 @@ public class DevEmailAliyunUtil {
try {
initClient();
BatchSendMailRequest batchSendMailRequest = createBatchSendRequest(from, tagName, toName, templateName);
- return client.getAcsResponse(batchSendMailRequest).getEnvId();
- } catch (ClientException e) {
+ return client.batchSendMail(batchSendMailRequest).getBody().getEnvId();
+ } catch (Exception e) {
throw new CommonException(e.getMessage());
}
}
@@ -175,10 +176,6 @@ public class DevEmailAliyunUtil {
request.setTextBody(content);
}
- //SDK 采用的是http协议的发信方式, 默认是GET方法,有一定的长度限制。
- //若textBody、htmlBody或content的大小不确定,建议采用POST方式提交,避免出现uri is not valid异常
- request.setSysMethod(MethodType.POST);
-
//是否开启追踪功能,开启需要备案,0关闭,1开启
request.setClickTrace("0");
@@ -209,10 +206,6 @@ public class DevEmailAliyunUtil {
// 控制台创建的标签
request.setTagName(tagName);
- //SDK 采用的是http协议的发信方式, 默认是GET方法,有一定的长度限制。
- //若textBody、htmlBody或content的大小不确定,建议采用POST方式提交,避免出现uri is not valid异常
- request.setSysMethod(MethodType.POST);
-
//是否开启追踪功能,开启需要备案,0关闭,1开启
request.setClickTrace("0");
diff --git a/snowy-plugin/snowy-plugin-dev/src/main/java/vip/xiaonuo/dev/modular/file/controller/DevFileController.java b/snowy-plugin/snowy-plugin-dev/src/main/java/vip/xiaonuo/dev/modular/file/controller/DevFileController.java
index 04ab33c7..4d7f0659 100644
--- a/snowy-plugin/snowy-plugin-dev/src/main/java/vip/xiaonuo/dev/modular/file/controller/DevFileController.java
+++ b/snowy-plugin/snowy-plugin-dev/src/main/java/vip/xiaonuo/dev/modular/file/controller/DevFileController.java
@@ -13,17 +13,18 @@
package vip.xiaonuo.dev.modular.file.controller;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
-import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport;
-import com.github.xiaoymin.knife4j.annotations.ApiSupport;
-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.annotation.Resource;
+import jakarta.servlet.http.HttpServletResponse;
+import jakarta.validation.Valid;
+import jakarta.validation.constraints.NotEmpty;
import org.springframework.http.MediaType;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.*;
import org.springframework.web.multipart.MultipartFile;
import vip.xiaonuo.common.annotation.CommonLog;
import vip.xiaonuo.common.pojo.CommonResult;
-import vip.xiaonuo.common.pojo.CommonValidList;
import vip.xiaonuo.dev.api.DevConfigApi;
import vip.xiaonuo.dev.modular.file.entity.DevFile;
import vip.xiaonuo.dev.modular.file.enums.DevFileEngineTypeEnum;
@@ -32,10 +33,6 @@ import vip.xiaonuo.dev.modular.file.param.DevFileListParam;
import vip.xiaonuo.dev.modular.file.param.DevFilePageParam;
import vip.xiaonuo.dev.modular.file.service.DevFileService;
-import javax.annotation.Resource;
-import javax.servlet.http.HttpServletResponse;
-import javax.validation.Valid;
-import javax.validation.constraints.NotEmpty;
import java.io.IOException;
import java.util.List;
@@ -45,8 +42,7 @@ import java.util.List;
* @author xuyuxiang
* @date 2022/2/23 18:26
**/
-@Api(tags = "文件控制器")
-@ApiSupport(author = "SNOWY_TEAM", order = 4)
+@Tag(name = "文件控制器")
@RestController
@Validated
public class DevFileController {
@@ -66,8 +62,7 @@ public class DevFileController {
* @author xuyuxiang
* @date 2021/10/13 14:01
**/
- @ApiOperationSupport(order = 1)
- @ApiOperation("动态上传文件返回id")
+ @Operation(summary = "动态上传文件返回id")
@CommonLog("动态上传文件返回id")
@PostMapping("/dev/file/uploadDynamicReturnId")
public CommonResult uploadDynamicReturnId(@RequestPart("file") MultipartFile file) {
@@ -80,8 +75,7 @@ public class DevFileController {
* @author xuyuxiang
* @date 2021/10/13 14:01
**/
- @ApiOperationSupport(order = 2)
- @ApiOperation("动态上传文件返回url")
+ @Operation(summary = "动态上传文件返回url")
@CommonLog("动态上传文件返回url")
@PostMapping("/dev/file/uploadDynamicReturnUrl")
public CommonResult uploadDynamicReturnUrl(@RequestPart("file") MultipartFile file) {
@@ -94,8 +88,7 @@ public class DevFileController {
* @author xuyuxiang
* @date 2021/10/13 14:01
**/
- @ApiOperationSupport(order = 3)
- @ApiOperation("上传本地文件返回id")
+ @Operation(summary = "上传本地文件返回id")
@CommonLog("上传本地文件返回id")
@PostMapping("/dev/file/uploadLocalReturnId")
public CommonResult uploadLocalReturnId(@RequestPart("file") MultipartFile file) {
@@ -108,8 +101,7 @@ public class DevFileController {
* @author xuyuxiang
* @date 2021/10/13 14:01
**/
- @ApiOperationSupport(order = 4)
- @ApiOperation("上传本地文件返回url")
+ @Operation(summary = "上传本地文件返回url")
@CommonLog("上传本地文件返回url")
@PostMapping("/dev/file/uploadLocalReturnUrl")
public CommonResult uploadLocalReturnUrl(@RequestPart("file") MultipartFile file) {
@@ -122,8 +114,7 @@ public class DevFileController {
* @author xuyuxiang
* @date 2021/10/13 14:01
**/
- @ApiOperationSupport(order = 5)
- @ApiOperation("上传阿里云文件返回id")
+ @Operation(summary = "上传阿里云文件返回id")
@CommonLog("上传阿里云文件返回id")
@PostMapping("/dev/file/uploadAliyunReturnId")
public CommonResult uploadAliyunReturnId(@RequestPart("file") MultipartFile file) {
@@ -136,8 +127,7 @@ public class DevFileController {
* @author xuyuxiang
* @date 2021/10/13 14:01
**/
- @ApiOperationSupport(order = 6)
- @ApiOperation("上传阿里云文件返回url")
+ @Operation(summary = "上传阿里云文件返回url")
@CommonLog("上传阿里云文件返回url")
@PostMapping("/dev/file/uploadAliyunReturnUrl")
public CommonResult uploadAliyunReturnUrl(@RequestPart("file") MultipartFile file) {
@@ -150,8 +140,7 @@ public class DevFileController {
* @author xuyuxiang
* @date 2021/10/13 14:01
**/
- @ApiOperationSupport(order = 7)
- @ApiOperation("上传腾讯云文件返回id")
+ @Operation(summary = "上传腾讯云文件返回id")
@CommonLog("上传腾讯云文件返回id")
@PostMapping("/dev/file/uploadTencentReturnId")
public CommonResult uploadTencentReturnId(@RequestPart("file") MultipartFile file) {
@@ -164,8 +153,7 @@ public class DevFileController {
* @author xuyuxiang
* @date 2021/10/13 14:01
**/
- @ApiOperationSupport(order = 8)
- @ApiOperation("上传腾讯云文件返回url")
+ @Operation(summary = "上传腾讯云文件返回url")
@CommonLog("上传腾讯云文件返回url")
@PostMapping("/dev/file/uploadTencentReturnUrl")
public CommonResult uploadTencentReturnUrl(@RequestPart("file") MultipartFile file) {
@@ -178,8 +166,7 @@ public class DevFileController {
* @author xuyuxiang
* @date 2021/10/13 14:01
**/
- @ApiOperationSupport(order = 9)
- @ApiOperation("上传MINIO文件返回id")
+ @Operation(summary = "上传MINIO文件返回id")
@CommonLog("上传MINIO文件返回id")
@PostMapping("/dev/file/uploadMinioReturnId")
public CommonResult uploadMinioReturnId(@RequestPart("file") MultipartFile file) {
@@ -192,8 +179,7 @@ public class DevFileController {
* @author xuyuxiang
* @date 2021/10/13 14:01
**/
- @ApiOperationSupport(order = 10)
- @ApiOperation("上传MINIO文件返回url")
+ @Operation(summary = "上传MINIO文件返回url")
@CommonLog("上传MINIO文件返回url")
@PostMapping("/dev/file/uploadMinioReturnUrl")
public CommonResult uploadMinioReturnUrl(@RequestPart("file") MultipartFile file) {
@@ -206,8 +192,7 @@ public class DevFileController {
* @author xuyuxiang
* @date 2022/4/24 20:00
*/
- @ApiOperationSupport(order = 11)
- @ApiOperation("获取文件分页列表")
+ @Operation(summary = "获取文件分页列表")
@GetMapping("/dev/file/page")
public CommonResult> page(DevFilePageParam devFilePageParam) {
return CommonResult.data(devFileService.page(devFilePageParam));
@@ -219,8 +204,7 @@ public class DevFileController {
* @author xuyuxiang
* @date 2022/4/24 20:00
*/
- @ApiOperationSupport(order = 12)
- @ApiOperation("获取文件列表")
+ @Operation(summary = "获取文件列表")
@GetMapping("/dev/file/list")
public CommonResult> list(DevFileListParam devFileListParam) {
return CommonResult.data(devFileService.list(devFileListParam));
@@ -232,8 +216,7 @@ public class DevFileController {
* @author xuyuxiang
* @date 2022/6/21 15:44
**/
- @ApiOperationSupport(order = 13)
- @ApiOperation("下载文件")
+ @Operation(summary = "下载文件")
@CommonLog("下载文件")
@GetMapping(value = "/dev/file/download", produces = MediaType.APPLICATION_OCTET_STREAM_VALUE)
public void download(@Valid DevFileIdParam devFileIdParam, HttpServletResponse response) throws IOException {
@@ -246,12 +229,11 @@ public class DevFileController {
* @author xuyuxiang
* @date 2022/4/24 20:00
*/
- @ApiOperationSupport(order = 14)
- @ApiOperation("删除文件")
+ @Operation(summary = "删除文件")
@CommonLog("删除文件")
@PostMapping(value = "/dev/file/delete")
public CommonResult delete(@RequestBody @Valid @NotEmpty(message = "集合不能为空")
- CommonValidList devFileIdParamList) {
+ List devFileIdParamList) {
devFileService.delete(devFileIdParamList);
return CommonResult.ok();
}
@@ -262,8 +244,7 @@ public class DevFileController {
* @author xuyuxiang
* @date 2022/6/21 15:44
**/
- @ApiOperationSupport(order = 15)
- @ApiOperation("获取文件详情")
+ @Operation(summary = "获取文件详情")
@GetMapping("/dev/file/detail")
public CommonResult detail(@Valid DevFileIdParam devFileIdParam) {
return CommonResult.data(devFileService.detail(devFileIdParam));
diff --git a/snowy-plugin/snowy-plugin-dev/src/main/java/vip/xiaonuo/dev/modular/file/entity/DevFile.java b/snowy-plugin/snowy-plugin-dev/src/main/java/vip/xiaonuo/dev/modular/file/entity/DevFile.java
index d443f941..b37b53a7 100644
--- a/snowy-plugin/snowy-plugin-dev/src/main/java/vip/xiaonuo/dev/modular/file/entity/DevFile.java
+++ b/snowy-plugin/snowy-plugin-dev/src/main/java/vip/xiaonuo/dev/modular/file/entity/DevFile.java
@@ -13,7 +13,7 @@
package vip.xiaonuo.dev.modular.file.entity;
import com.baomidou.mybatisplus.annotation.TableName;
-import io.swagger.annotations.ApiModelProperty;
+import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Getter;
import lombok.Setter;
import vip.xiaonuo.common.pojo.CommonEntity;
@@ -30,50 +30,50 @@ import vip.xiaonuo.common.pojo.CommonEntity;
public class DevFile extends CommonEntity {
/** id */
- @ApiModelProperty(value = "id", position = 1)
+ @Schema(description = "id")
private String id;
/** 存储引擎 */
- @ApiModelProperty(value = "存储引擎", position = 2)
+ @Schema(description = "存储引擎")
private String engine;
/** 存储桶 */
- @ApiModelProperty(value = "存储桶", position = 3)
+ @Schema(description = "存储桶")
private String bucket;
/** 文件名称 */
- @ApiModelProperty(value = "文件名称", position = 4)
+ @Schema(description = "文件名称")
private String name;
/** 文件后缀 */
- @ApiModelProperty(value = "文件后缀", position = 5)
+ @Schema(description = "文件后缀")
private String suffix;
/** 文件大小kb */
- @ApiModelProperty(value = "文件大小kb", position = 6)
+ @Schema(description = "文件大小kb")
private String sizeKb;
/** 文件大小(格式化后) */
- @ApiModelProperty(value = "文件大小(格式化后)", position = 7)
+ @Schema(description = "文件大小(格式化后)")
private String sizeInfo;
/** 文件的对象名(唯一名称) */
- @ApiModelProperty(value = "文件的对象名(唯一名称)", position = 8)
+ @Schema(description = "文件的对象名(唯一名称)")
private String objName;
/** 文件存储路径 */
- @ApiModelProperty(value = "文件存储路径", position = 9)
+ @Schema(description = "文件存储路径")
private String storagePath;
/** 文件下载路径 */
- @ApiModelProperty(value = "文件下载路径", position = 10)
+ @Schema(description = "文件下载路径")
private String downloadPath;
/** 图片缩略图 */
- @ApiModelProperty(value = "图片缩略图", position = 11)
+ @Schema(description = "图片缩略图")
private String thumbnail;
/** 扩展信息 */
- @ApiModelProperty(value = "扩展信息", position = 12)
+ @Schema(description = "扩展信息")
private String extJson;
}
diff --git a/snowy-plugin/snowy-plugin-dev/src/main/java/vip/xiaonuo/dev/modular/file/param/DevFileIdParam.java b/snowy-plugin/snowy-plugin-dev/src/main/java/vip/xiaonuo/dev/modular/file/param/DevFileIdParam.java
index 5d906dbc..e2e04c05 100644
--- a/snowy-plugin/snowy-plugin-dev/src/main/java/vip/xiaonuo/dev/modular/file/param/DevFileIdParam.java
+++ b/snowy-plugin/snowy-plugin-dev/src/main/java/vip/xiaonuo/dev/modular/file/param/DevFileIdParam.java
@@ -12,12 +12,11 @@
*/
package vip.xiaonuo.dev.modular.file.param;
-import io.swagger.annotations.ApiModelProperty;
+import io.swagger.v3.oas.annotations.media.Schema;
+import jakarta.validation.constraints.NotBlank;
import lombok.Getter;
import lombok.Setter;
-import javax.validation.constraints.NotBlank;
-
/**
* 文件Id参数
*
@@ -29,7 +28,7 @@ import javax.validation.constraints.NotBlank;
public class DevFileIdParam {
/** id */
- @ApiModelProperty(value = "id", required = true)
+ @Schema(description = "id", requiredMode = Schema.RequiredMode.REQUIRED)
@NotBlank(message = "id不能为空")
private String id;
}
diff --git a/snowy-plugin/snowy-plugin-dev/src/main/java/vip/xiaonuo/dev/modular/file/param/DevFileListParam.java b/snowy-plugin/snowy-plugin-dev/src/main/java/vip/xiaonuo/dev/modular/file/param/DevFileListParam.java
index fe122e5d..7c79896a 100644
--- a/snowy-plugin/snowy-plugin-dev/src/main/java/vip/xiaonuo/dev/modular/file/param/DevFileListParam.java
+++ b/snowy-plugin/snowy-plugin-dev/src/main/java/vip/xiaonuo/dev/modular/file/param/DevFileListParam.java
@@ -12,7 +12,7 @@
*/
package vip.xiaonuo.dev.modular.file.param;
-import io.swagger.annotations.ApiModelProperty;
+import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Getter;
import lombok.Setter;
@@ -27,10 +27,10 @@ import lombok.Setter;
public class DevFileListParam {
/** 文件引擎 */
- @ApiModelProperty(value = "文件引擎")
+ @Schema(description = "文件引擎")
private String engine;
/** 文件名关键词 */
- @ApiModelProperty(value = "文件名关键词")
+ @Schema(description = "文件名关键词")
private String searchKey;
}
diff --git a/snowy-plugin/snowy-plugin-dev/src/main/java/vip/xiaonuo/dev/modular/file/param/DevFilePageParam.java b/snowy-plugin/snowy-plugin-dev/src/main/java/vip/xiaonuo/dev/modular/file/param/DevFilePageParam.java
index 7a962c69..88cde3df 100644
--- a/snowy-plugin/snowy-plugin-dev/src/main/java/vip/xiaonuo/dev/modular/file/param/DevFilePageParam.java
+++ b/snowy-plugin/snowy-plugin-dev/src/main/java/vip/xiaonuo/dev/modular/file/param/DevFilePageParam.java
@@ -12,7 +12,7 @@
*/
package vip.xiaonuo.dev.modular.file.param;
-import io.swagger.annotations.ApiModelProperty;
+import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Getter;
import lombok.Setter;
@@ -27,10 +27,10 @@ import lombok.Setter;
public class DevFilePageParam {
/** 文件引擎 */
- @ApiModelProperty(value = "文件引擎")
+ @Schema(description = "文件引擎")
private String engine;
/** 文件名关键词 */
- @ApiModelProperty(value = "文件名关键词")
+ @Schema(description = "文件名关键词")
private String searchKey;
}
diff --git a/snowy-plugin/snowy-plugin-dev/src/main/java/vip/xiaonuo/dev/modular/file/provider/DevFileApiProvider.java b/snowy-plugin/snowy-plugin-dev/src/main/java/vip/xiaonuo/dev/modular/file/provider/DevFileApiProvider.java
index d248face..6ced3a09 100644
--- a/snowy-plugin/snowy-plugin-dev/src/main/java/vip/xiaonuo/dev/modular/file/provider/DevFileApiProvider.java
+++ b/snowy-plugin/snowy-plugin-dev/src/main/java/vip/xiaonuo/dev/modular/file/provider/DevFileApiProvider.java
@@ -12,14 +12,13 @@
*/
package vip.xiaonuo.dev.modular.file.provider;
+import jakarta.annotation.Resource;
import org.springframework.stereotype.Service;
import org.springframework.web.multipart.MultipartFile;
import vip.xiaonuo.dev.api.DevFileApi;
import vip.xiaonuo.dev.modular.file.enums.DevFileEngineTypeEnum;
import vip.xiaonuo.dev.modular.file.service.DevFileService;
-import javax.annotation.Resource;
-
/**
* 文件API接口提供者
*
diff --git a/snowy-plugin/snowy-plugin-dev/src/main/java/vip/xiaonuo/dev/modular/file/service/DevFileService.java b/snowy-plugin/snowy-plugin-dev/src/main/java/vip/xiaonuo/dev/modular/file/service/DevFileService.java
index ad73f4d5..274d2635 100644
--- a/snowy-plugin/snowy-plugin-dev/src/main/java/vip/xiaonuo/dev/modular/file/service/DevFileService.java
+++ b/snowy-plugin/snowy-plugin-dev/src/main/java/vip/xiaonuo/dev/modular/file/service/DevFileService.java
@@ -14,13 +14,13 @@ package vip.xiaonuo.dev.modular.file.service;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.IService;
+import jakarta.servlet.http.HttpServletResponse;
import org.springframework.web.multipart.MultipartFile;
import vip.xiaonuo.dev.modular.file.entity.DevFile;
import vip.xiaonuo.dev.modular.file.param.DevFileIdParam;
import vip.xiaonuo.dev.modular.file.param.DevFileListParam;
import vip.xiaonuo.dev.modular.file.param.DevFilePageParam;
-import javax.servlet.http.HttpServletResponse;
import java.io.IOException;
import java.util.List;
diff --git a/snowy-plugin/snowy-plugin-dev/src/main/java/vip/xiaonuo/dev/modular/file/service/impl/DevFileServiceImpl.java b/snowy-plugin/snowy-plugin-dev/src/main/java/vip/xiaonuo/dev/modular/file/service/impl/DevFileServiceImpl.java
index 152c2b86..923cda7c 100644
--- a/snowy-plugin/snowy-plugin-dev/src/main/java/vip/xiaonuo/dev/modular/file/service/impl/DevFileServiceImpl.java
+++ b/snowy-plugin/snowy-plugin-dev/src/main/java/vip/xiaonuo/dev/modular/file/service/impl/DevFileServiceImpl.java
@@ -25,6 +25,8 @@ import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.toolkit.IdWorker;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import jakarta.annotation.Resource;
+import jakarta.servlet.http.HttpServletResponse;
import org.springframework.stereotype.Service;
import org.springframework.web.multipart.MultipartFile;
import vip.xiaonuo.common.exception.CommonException;
@@ -44,11 +46,10 @@ import vip.xiaonuo.dev.modular.file.util.DevFileLocalUtil;
import vip.xiaonuo.dev.modular.file.util.DevFileMinIoUtil;
import vip.xiaonuo.dev.modular.file.util.DevFileTencentUtil;
-import javax.annotation.Resource;
-import javax.servlet.http.HttpServletResponse;
import java.io.File;
import java.io.IOException;
import java.math.BigDecimal;
+import java.math.RoundingMode;
import java.util.List;
/**
@@ -184,7 +185,7 @@ public class DevFileServiceImpl extends ServiceImpl impl
StrUtil.DOT, true):null;
devFile.setSuffix(suffix);
devFile.setSizeKb(Convert.toStr(NumberUtil.div(new BigDecimal(file.getSize()), BigDecimal.valueOf(1024))
- .setScale(0, BigDecimal.ROUND_HALF_UP)));
+ .setScale(0, RoundingMode.HALF_UP)));
devFile.setSizeInfo(FileUtil.readableFileSize(file.getSize()));
devFile.setObjName(ObjectUtil.isNotEmpty(devFile.getSuffix())?fileId + StrUtil.DOT + devFile.getSuffix():null);
// 如果是图片,则压缩生成缩略图
diff --git a/snowy-plugin/snowy-plugin-dev/src/main/java/vip/xiaonuo/dev/modular/file/util/DevFileAliyunUtil.java b/snowy-plugin/snowy-plugin-dev/src/main/java/vip/xiaonuo/dev/modular/file/util/DevFileAliyunUtil.java
index 0fc53b97..7a304ca0 100644
--- a/snowy-plugin/snowy-plugin-dev/src/main/java/vip/xiaonuo/dev/modular/file/util/DevFileAliyunUtil.java
+++ b/snowy-plugin/snowy-plugin-dev/src/main/java/vip/xiaonuo/dev/modular/file/util/DevFileAliyunUtil.java
@@ -23,13 +23,13 @@ import com.aliyun.oss.model.CannedAccessControlList;
import com.aliyun.oss.model.GeneratePresignedUrlRequest;
import com.aliyun.oss.model.OSSObject;
import com.aliyun.oss.model.ObjectMetadata;
+import jakarta.activation.MimetypesFileTypeMap;
import lombok.extern.slf4j.Slf4j;
import org.springframework.web.multipart.MultipartFile;
import vip.xiaonuo.common.exception.CommonException;
import vip.xiaonuo.dev.api.DevConfigApi;
import vip.xiaonuo.dev.modular.file.enums.DevFileBucketAuthEnum;
-import javax.activation.MimetypesFileTypeMap;
import java.io.*;
import java.net.URL;
import java.util.Date;
diff --git a/snowy-plugin/snowy-plugin-dev/src/main/java/vip/xiaonuo/dev/modular/file/util/DevFileMinIoUtil.java b/snowy-plugin/snowy-plugin-dev/src/main/java/vip/xiaonuo/dev/modular/file/util/DevFileMinIoUtil.java
index cab47d17..0b4054db 100644
--- a/snowy-plugin/snowy-plugin-dev/src/main/java/vip/xiaonuo/dev/modular/file/util/DevFileMinIoUtil.java
+++ b/snowy-plugin/snowy-plugin-dev/src/main/java/vip/xiaonuo/dev/modular/file/util/DevFileMinIoUtil.java
@@ -23,13 +23,13 @@ import cn.hutool.json.JSONObject;
import cn.hutool.json.JSONUtil;
import io.minio.*;
import io.minio.http.Method;
+import jakarta.activation.MimetypesFileTypeMap;
import lombok.extern.slf4j.Slf4j;
import org.springframework.web.multipart.MultipartFile;
import vip.xiaonuo.common.exception.CommonException;
import vip.xiaonuo.dev.api.DevConfigApi;
import vip.xiaonuo.dev.modular.file.enums.DevFileBucketAuthEnum;
-import javax.activation.MimetypesFileTypeMap;
import java.io.*;
/**
diff --git a/snowy-plugin/snowy-plugin-dev/src/main/java/vip/xiaonuo/dev/modular/file/util/DevFileTencentUtil.java b/snowy-plugin/snowy-plugin-dev/src/main/java/vip/xiaonuo/dev/modular/file/util/DevFileTencentUtil.java
index d3a6c882..33f82f6c 100644
--- a/snowy-plugin/snowy-plugin-dev/src/main/java/vip/xiaonuo/dev/modular/file/util/DevFileTencentUtil.java
+++ b/snowy-plugin/snowy-plugin-dev/src/main/java/vip/xiaonuo/dev/modular/file/util/DevFileTencentUtil.java
@@ -27,13 +27,13 @@ import com.qcloud.cos.model.*;
import com.qcloud.cos.region.Region;
import com.qcloud.cos.transfer.TransferManager;
import com.qcloud.cos.transfer.TransferManagerConfiguration;
+import jakarta.activation.MimetypesFileTypeMap;
import lombok.extern.slf4j.Slf4j;
import org.springframework.web.multipart.MultipartFile;
import vip.xiaonuo.common.exception.CommonException;
import vip.xiaonuo.dev.api.DevConfigApi;
import vip.xiaonuo.dev.modular.file.enums.DevFileBucketAuthEnum;
-import javax.activation.MimetypesFileTypeMap;
import java.io.*;
import java.net.URL;
import java.util.Date;
diff --git a/snowy-plugin/snowy-plugin-dev/src/main/java/vip/xiaonuo/dev/modular/job/controller/DevJobController.java b/snowy-plugin/snowy-plugin-dev/src/main/java/vip/xiaonuo/dev/modular/job/controller/DevJobController.java
index 5f5b4c65..ebd0e9b4 100644
--- a/snowy-plugin/snowy-plugin-dev/src/main/java/vip/xiaonuo/dev/modular/job/controller/DevJobController.java
+++ b/snowy-plugin/snowy-plugin-dev/src/main/java/vip/xiaonuo/dev/modular/job/controller/DevJobController.java
@@ -13,10 +13,11 @@
package vip.xiaonuo.dev.modular.job.controller;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
-import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport;
-import com.github.xiaoymin.knife4j.annotations.ApiSupport;
-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.annotation.Resource;
+import jakarta.validation.Valid;
+import jakarta.validation.constraints.NotEmpty;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
@@ -24,14 +25,10 @@ import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RestController;
import vip.xiaonuo.common.annotation.CommonLog;
import vip.xiaonuo.common.pojo.CommonResult;
-import vip.xiaonuo.common.pojo.CommonValidList;
import vip.xiaonuo.dev.modular.job.entity.DevJob;
import vip.xiaonuo.dev.modular.job.param.*;
import vip.xiaonuo.dev.modular.job.service.DevJobService;
-import javax.annotation.Resource;
-import javax.validation.Valid;
-import javax.validation.constraints.NotEmpty;
import java.util.List;
/**
@@ -40,8 +37,7 @@ import java.util.List;
* @author xuyuxiang
* @date 2022/8/5 10:48
**/
-@Api(tags = "定时任务控制器")
-@ApiSupport(author = "SNOWY_TEAM", order = 7)
+@Tag(name = "定时任务控制器")
@RestController
@Validated
public class DevJobController {
@@ -55,8 +51,7 @@ public class DevJobController {
* @author xuyuxiang
* @date 2022/4/24 20:00
*/
- @ApiOperationSupport(order = 1)
- @ApiOperation("获取定时任务分页")
+ @Operation(summary = "获取定时任务分页")
@GetMapping("/dev/job/page")
public CommonResult> page(DevJobPageParam devJobPageParam) {
return CommonResult.data(devJobService.page(devJobPageParam));
@@ -68,8 +63,7 @@ public class DevJobController {
* @author xuyuxiang
* @date 2022/4/24 20:00
*/
- @ApiOperationSupport(order = 2)
- @ApiOperation("获取定时任务列表")
+ @Operation(summary = "获取定时任务列表")
@GetMapping("/dev/job/list")
public CommonResult> list(DevJobListParam devJobListParam) {
return CommonResult.data(devJobService.list(devJobListParam));
@@ -81,8 +75,7 @@ public class DevJobController {
* @author xuyuxiang
* @date 2022/4/24 20:47
*/
- @ApiOperationSupport(order = 3)
- @ApiOperation("添加定时任务")
+ @Operation(summary = "添加定时任务")
@CommonLog("添加定时任务")
@PostMapping("/dev/job/add")
public CommonResult add(@RequestBody @Valid DevJobAddParam devJobAddParam) {
@@ -96,8 +89,7 @@ public class DevJobController {
* @author xuyuxiang
* @date 2022/4/24 20:47
*/
- @ApiOperationSupport(order = 4)
- @ApiOperation("编辑定时任务")
+ @Operation(summary = "编辑定时任务")
@CommonLog("编辑定时任务")
@PostMapping("/dev/job/edit")
public CommonResult