diff --git a/sa-base/pom.xml b/sa-base/pom.xml
new file mode 100644
index 0000000..2f44ad0
--- /dev/null
+++ b/sa-base/pom.xml
@@ -0,0 +1,314 @@
+
+ 4.0.0
+
+ net.lab1024
+ sa-parent
+ 3.0.0
+ ../pom.xml
+
+
+ sa-base
+ 3.0.0
+
+ sa-base
+ sa-base project
+
+
+
+
+ org.springframework.boot
+ spring-boot-starter-aop
+
+
+ org.springframework.boot
+ spring-boot-starter-logging
+
+
+
+
+
+ org.springframework.boot
+ spring-boot-starter-data-redis
+
+
+ org.springframework.boot
+ spring-boot-starter
+
+
+
+
+
+ org.springframework.boot
+ spring-boot-starter-web
+
+
+ org.springframework.boot
+ spring-boot-starter-logging
+
+
+
+
+
+ org.springframework.security
+ spring-security-crypto
+
+
+
+
+ cn.dev33
+ sa-token-spring-boot3-starter
+
+
+
+ cn.dev33
+ sa-token-redis-jackson
+
+
+
+
+
+ org.springframework.boot
+ spring-boot-starter-log4j2
+
+
+
+ org.springframework.boot
+ spring-boot-starter-validation
+
+
+
+ org.springframework.boot
+ spring-boot-starter-test
+
+
+
+ com.mysql
+ mysql-connector-j
+
+
+
+ com.github.ben-manes.caffeine
+ caffeine
+
+
+ error_prone_annotations
+ com.google.errorprone
+
+
+
+
+
+ org.projectlombok
+ lombok
+
+
+
+ org.apache.commons
+ commons-pool2
+
+
+
+ org.apache.commons
+ commons-text
+
+
+
+ com.baomidou
+ mybatis-plus-spring-boot3-starter
+
+
+
+ p6spy
+ p6spy
+
+
+
+ com.github.xiaoymin
+ knife4j-openapi3-jakarta-spring-boot-starter
+
+
+
+ com.squareup.okhttp3
+ okhttp
+
+
+
+ com.alibaba
+ fastjson
+
+
+
+ com.alibaba
+ druid-spring-boot-3-starter
+
+
+
+ com.google.guava
+ guava
+
+
+
+ com.googlecode.concurrentlinkedhashmap
+ concurrentlinkedhashmap-lru
+
+
+
+ org.reflections
+ reflections
+
+
+
+ com.amazonaws
+ aws-java-sdk-s3
+
+
+
+ org.apache.commons
+ commons-lang3
+
+
+ org.apache.commons
+ commons-collections4
+
+
+
+ commons-io
+ commons-io
+
+
+
+ org.apache.commons
+ commons-compress
+
+
+
+ cn.hutool
+ hutool-all
+
+
+
+ org.apache.velocity
+ velocity-engine-core
+
+
+
+ org.apache.velocity.tools
+ velocity-tools-generic
+
+
+
+ org.lionsoul
+ ip2region
+
+
+
+ org.bouncycastle
+ bcprov-jdk18on
+
+
+
+ cn.idev.excel
+ fastexcel
+
+
+
+ org.apache.poi
+ poi
+
+
+
+ org.apache.poi
+ poi-ooxml
+
+
+
+ org.apache.poi
+ poi-scratchpad
+
+
+
+ org.apache.poi
+ ooxml-schemas
+
+
+
+ com.fasterxml.jackson.datatype
+ jackson-datatype-jsr310
+
+
+
+ net.1024lab
+ smartdb
+ ${smartdb.version}
+
+
+
+ org.redisson
+ redisson-spring-boot-starter
+
+
+
+ org.yaml
+ snakeyaml
+
+
+
+ org.springframework.boot
+ spring-boot-starter-mail
+
+
+
+ org.jsoup
+ jsoup
+
+
+
+ org.freemarker
+ freemarker
+
+
+
+ org.apache.tika
+ tika-core
+
+
+
+
+ com.aliyun.oss
+ aliyun-sdk-oss
+ 3.17.4
+
+
+
+
+ com.aliyun
+ dysmsapi20170525
+ 2.0.23
+
+
+
+
+ com.aliyun
+ tea-openapi
+ 0.2.6
+
+
+
+
+ com.aliyun
+ tea-util
+ 0.2.13
+
+
+
+
+ com.github.binarywang
+ weixin-java-miniapp
+ 4.7.0
+
+
+
+
+
+
diff --git a/sa-base/src/main/java/net/lab1024/sa/base/common/annoation/NoNeedLogin.java b/sa-base/src/main/java/net/lab1024/sa/base/common/annoation/NoNeedLogin.java
new file mode 100644
index 0000000..87e10e1
--- /dev/null
+++ b/sa-base/src/main/java/net/lab1024/sa/base/common/annoation/NoNeedLogin.java
@@ -0,0 +1,20 @@
+package net.lab1024.sa.base.common.annoation;
+
+import java.lang.annotation.ElementType;
+import java.lang.annotation.Retention;
+import java.lang.annotation.RetentionPolicy;
+import java.lang.annotation.Target;
+
+/**
+ * 不需要登录注解
+ *
+ * @Author 1024创新实验室: 罗伊
+ * @Date 2022-05-30 21:22:12
+ * @Wechat zhuoda1024
+ * @Email lab1024@163.com
+ * @Copyright 1024创新实验室
+ */
+@Retention(RetentionPolicy.RUNTIME)
+@Target(ElementType.METHOD)
+public @interface NoNeedLogin {
+}
diff --git a/sa-base/src/main/java/net/lab1024/sa/base/common/code/ErrorCode.java b/sa-base/src/main/java/net/lab1024/sa/base/common/code/ErrorCode.java
new file mode 100644
index 0000000..31eed10
--- /dev/null
+++ b/sa-base/src/main/java/net/lab1024/sa/base/common/code/ErrorCode.java
@@ -0,0 +1,47 @@
+package net.lab1024.sa.base.common.code;
+
+/**
+ * 错误码
+ * 一共分为三种: 1)系统错误、2)用户级别错误、3)未预期到的错误
+ *
+ * @Author 1024创新实验室-主任: 卓大
+ * @Date 2021-09-02 20:21:10
+ * @Wechat zhuoda1024
+ * @Email lab1024@163.com
+ * @Copyright 1024创新实验室
+ */
+public interface ErrorCode {
+
+ /**
+ * 系统等级
+ */
+ String LEVEL_SYSTEM = "system";
+
+ /**
+ * 用户等级
+ */
+ String LEVEL_USER = "user";
+
+ /**
+ * 未预期到的等级
+ */
+ String LEVEL_UNEXPECTED = "unexpected";
+
+ /**
+ * 错误码
+ */
+ int getCode();
+
+ /**
+ * 错误消息
+ *
+ */
+ String getMsg();
+
+ /**
+ * 错误等级
+ */
+ String getLevel();
+
+
+}
diff --git a/sa-base/src/main/java/net/lab1024/sa/base/common/code/ErrorCodeRangeContainer.java b/sa-base/src/main/java/net/lab1024/sa/base/common/code/ErrorCodeRangeContainer.java
new file mode 100644
index 0000000..73c5b3a
--- /dev/null
+++ b/sa-base/src/main/java/net/lab1024/sa/base/common/code/ErrorCodeRangeContainer.java
@@ -0,0 +1,111 @@
+package net.lab1024.sa.base.common.code;
+
+import org.apache.commons.collections4.CollectionUtils;
+import org.apache.commons.lang3.tuple.ImmutablePair;
+
+import java.util.Collection;
+import java.util.List;
+import java.util.Map;
+import java.util.concurrent.ConcurrentHashMap;
+import java.util.stream.Collectors;
+import java.util.stream.Stream;
+
+/**
+ * 错误码 注册容器
+ *
+ * @Author 1024创新实验室-主任: 卓大
+ * @Date 2021/09/27 22:09
+ * @Wechat zhuoda1024
+ * @Email lab1024@163.com
+ * @Copyright 1024创新实验室
+ */
+class ErrorCodeRangeContainer {
+
+ /**
+ * 所有的错误码均大于10000
+ */
+ static final int MIN_START_CODE = 10000;
+
+ static final Map, ImmutablePair> CODE_RANGE_MAP = new ConcurrentHashMap<>();
+
+ /**
+ * 用于统计数量
+ */
+ static int errorCounter = 0;
+
+ /**
+ * 注册状态码
+ * 校验是否重复 是否越界
+ *
+ */
+ static void register(Class extends ErrorCode> clazz, int start, int end) {
+ String simpleName = clazz.getSimpleName();
+ if (!clazz.isEnum()) {
+ throw new ExceptionInInitializerError(String.format("<> error: %s not Enum class !", simpleName));
+ }
+ if (start > end) {
+ throw new ExceptionInInitializerError(String.format("<> error: %s start must be less than the end !", simpleName));
+ }
+
+ if (start <= MIN_START_CODE) {
+ throw new ExceptionInInitializerError(String.format("<> error: %s start must be more than %s !", simpleName, MIN_START_CODE));
+ }
+
+ // 校验是否重复注册
+ boolean containsKey = CODE_RANGE_MAP.containsKey(clazz);
+ if (containsKey) {
+ throw new ExceptionInInitializerError(String.format("<> error: Enum %s already exist !", simpleName));
+ }
+
+ // 校验 开始结束值 是否越界
+ CODE_RANGE_MAP.forEach((k, v) -> {
+ if (isExistOtherRange(start, end, v)) {
+ throw new IllegalArgumentException(String.format("<> error: %s[%d,%d] has intersection with class:%s[%d,%d]", simpleName, start, end,
+ k.getSimpleName(), v.getLeft(), v.getRight()));
+ }
+ });
+
+ // 循环校验code并存储
+ List codeList = Stream.of(clazz.getEnumConstants()).map(codeEnum -> {
+ int code = codeEnum.getCode();
+ if (code < start || code > end) {
+ throw new IllegalArgumentException(String.format("<> error: %s[%d,%d] code %d out of range", simpleName, start, end, code));
+ }
+ return code;
+ }).collect(Collectors.toList());
+
+ // 校验code是否重复
+ List distinctCodeList = codeList.stream().distinct().collect(Collectors.toList());
+ Collection subtract = CollectionUtils.subtract(codeList, distinctCodeList);
+ if (CollectionUtils.isNotEmpty(subtract)) {
+ throw new IllegalArgumentException(String.format("<> error: %s code %s is repeat!", simpleName, subtract));
+ }
+
+ CODE_RANGE_MAP.put(clazz, ImmutablePair.of(start, end));
+ // 统计
+ errorCounter = errorCounter + distinctCodeList.size();
+ }
+
+ /**
+ * 是否存在于其他范围
+ */
+ private static boolean isExistOtherRange(int start, int end, ImmutablePair range) {
+ if (start >= range.getLeft() && start <= range.getRight()) {
+ return true;
+ }
+
+ if (end >= range.getLeft() && end <= range.getRight()) {
+ return true;
+ }
+
+ return false;
+ }
+
+ /**
+ * 进行初始化
+ */
+ static int initialize() {
+ return errorCounter;
+ }
+
+}
diff --git a/sa-base/src/main/java/net/lab1024/sa/base/common/code/ErrorCodeRegister.java b/sa-base/src/main/java/net/lab1024/sa/base/common/code/ErrorCodeRegister.java
new file mode 100644
index 0000000..4fa925a
--- /dev/null
+++ b/sa-base/src/main/java/net/lab1024/sa/base/common/code/ErrorCodeRegister.java
@@ -0,0 +1,41 @@
+package net.lab1024.sa.base.common.code;
+
+import static net.lab1024.sa.base.common.code.ErrorCodeRangeContainer.register;
+
+/**
+ * 注册code状态码
+ * ps:为什么要在此处不那么优雅的手动注册?
+ * 主要是为了能统一、清晰、浏览当前定义的所有状态码
+ * 方便后续维护
+ *
+ * @Author 1024创新实验室-主任: 卓大
+ * @Date 2021/09/27 23:09
+ * @Wechat zhuoda1024
+ * @Email lab1024@163.com
+ * @Copyright 1024创新实验室
+ */
+public class ErrorCodeRegister {
+
+ static {
+
+ // 系统 错误码
+ register(SystemErrorCode.class, 10001, 20000);
+
+ // 意外 错误码
+ register(UnexpectedErrorCode.class, 20001, 30000);
+
+ // 用户 通用错误码
+ register(UserErrorCode.class, 30001, 40000);
+
+ }
+
+
+ public static int initialize() {
+ return ErrorCodeRangeContainer.initialize();
+ }
+
+ public static void main(String[] args) {
+ ErrorCodeRegister.initialize();
+ }
+
+}
diff --git a/sa-base/src/main/java/net/lab1024/sa/base/common/code/SystemErrorCode.java b/sa-base/src/main/java/net/lab1024/sa/base/common/code/SystemErrorCode.java
new file mode 100644
index 0000000..f3e0c39
--- /dev/null
+++ b/sa-base/src/main/java/net/lab1024/sa/base/common/code/SystemErrorCode.java
@@ -0,0 +1,39 @@
+package net.lab1024.sa.base.common.code;
+
+import lombok.AllArgsConstructor;
+import lombok.Getter;
+
+/**
+ * 系统错误状态码(此类返回码应该高度重视)
+ *
+ * @Author 1024创新实验室-主任: 卓大
+ * @Date 2021/10/24 20:09
+ * @Wechat zhuoda1024
+ * @Email lab1024@163.com
+ * @Copyright 1024创新实验室
+ */
+@Getter
+@AllArgsConstructor
+public enum SystemErrorCode implements ErrorCode {
+
+ /**
+ * 系统错误
+ */
+ SYSTEM_ERROR(10001, "系统似乎出现了点小问题"),
+
+ ;
+
+ private final int code;
+
+ private final String msg;
+
+ private final String level;
+
+ SystemErrorCode(int code, String msg) {
+ this.code = code;
+ this.msg = msg;
+ this.level = LEVEL_SYSTEM;
+ }
+
+}
+
diff --git a/sa-base/src/main/java/net/lab1024/sa/base/common/code/UnexpectedErrorCode.java b/sa-base/src/main/java/net/lab1024/sa/base/common/code/UnexpectedErrorCode.java
new file mode 100644
index 0000000..c1517e7
--- /dev/null
+++ b/sa-base/src/main/java/net/lab1024/sa/base/common/code/UnexpectedErrorCode.java
@@ -0,0 +1,43 @@
+package net.lab1024.sa.base.common.code;
+
+import lombok.AllArgsConstructor;
+import lombok.Getter;
+
+/**
+ * 未预期的错误码(即发生了不可能发生的事情,此类返回码应该高度重视)
+ *
+ * @Author 1024创新实验室-主任: 卓大
+ * @Date 2021/09/27 22:10:46
+ * @Wechat zhuoda1024
+ * @Email lab1024@163.com
+ * @Copyright 1024创新实验室
+ */
+@Getter
+@AllArgsConstructor
+public enum UnexpectedErrorCode implements ErrorCode {
+
+ /**
+ * 业务错误
+ */
+ BUSINESS_HANDING(20001, "呃~ 业务繁忙,请稍后重试"),
+
+ /**
+ * id错误
+ */
+ PAY_ORDER_ID_ERROR(20002, "付款单id发生了异常,请联系技术人员排查"),
+
+ ;
+
+ private final int code;
+
+ private final String msg;
+
+ private final String level;
+
+ UnexpectedErrorCode(int code, String msg) {
+ this.code = code;
+ this.msg = msg;
+ this.level = LEVEL_UNEXPECTED;
+ }
+
+}
diff --git a/sa-base/src/main/java/net/lab1024/sa/base/common/code/UserErrorCode.java b/sa-base/src/main/java/net/lab1024/sa/base/common/code/UserErrorCode.java
new file mode 100644
index 0000000..f6dcfeb
--- /dev/null
+++ b/sa-base/src/main/java/net/lab1024/sa/base/common/code/UserErrorCode.java
@@ -0,0 +1,53 @@
+package net.lab1024.sa.base.common.code;
+
+import lombok.AllArgsConstructor;
+import lombok.Getter;
+
+/**
+ * 用户级别的错误码(用户引起的错误返回码,可以不用关注)
+ *
+ * @Author 1024创新实验室-主任: 卓大
+ * @Date 2021/09/21 22:12:27
+ * @Wechat zhuoda1024
+ * @Email lab1024@163.com
+ * @Copyright 1024创新实验室
+ */
+@Getter
+@AllArgsConstructor
+public enum UserErrorCode implements ErrorCode {
+
+ PARAM_ERROR(30001, "参数错误"),
+
+ DATA_NOT_EXIST(30002, "左翻右翻,数据竟然找不到了~"),
+
+ ALREADY_EXIST(30003, "数据已存在了呀~"),
+
+ REPEAT_SUBMIT(30004, "亲~您操作的太快了,请稍等下再操作~"),
+
+ NO_PERMISSION(30005, "对不起,您没有权限访问此内容哦~"),
+
+ DEVELOPING(30006, "系統正在紧急开发中,敬请期待~"),
+
+ LOGIN_STATE_INVALID(30007, "您还未登录或登录失效,请重新登录!"),
+
+ USER_STATUS_ERROR(30008, "用户状态异常"),
+
+ FORM_REPEAT_SUBMIT(30009, "请勿重复提交"),
+
+ LOGIN_FAIL_LOCK(30010, "登录连续失败已经被锁定,无法登录"),
+ LOGIN_FAIL_WILL_LOCK(30011, "登录连续失败将会锁定提醒"),
+
+ LOGIN_ACTIVE_TIMEOUT(30012, "长时间未操作系统,需要重新登录");
+
+ private final int code;
+
+ private final String msg;
+
+ private final String level;
+
+ UserErrorCode(int code, String msg) {
+ this.code = code;
+ this.msg = msg;
+ this.level = LEVEL_USER;
+ }
+}
diff --git a/sa-base/src/main/java/net/lab1024/sa/base/common/constant/RequestHeaderConst.java b/sa-base/src/main/java/net/lab1024/sa/base/common/constant/RequestHeaderConst.java
new file mode 100644
index 0000000..d0e4060
--- /dev/null
+++ b/sa-base/src/main/java/net/lab1024/sa/base/common/constant/RequestHeaderConst.java
@@ -0,0 +1,18 @@
+package net.lab1024.sa.base.common.constant;
+
+/**
+ * 请求消息头常量
+ *
+ * @Author 1024创新实验室: 罗伊
+ * @Date 2022-05-15 20:46:27
+ * @Wechat zhuoda1024
+ * @Email lab1024@163.com
+ * @Copyright 1024创新实验室
+ */
+public class RequestHeaderConst {
+
+ public static final String TOKEN = "Authorization";
+
+ public static final String USER_AGENT = "user-agent";
+
+}
diff --git a/sa-base/src/main/java/net/lab1024/sa/base/common/constant/StringConst.java b/sa-base/src/main/java/net/lab1024/sa/base/common/constant/StringConst.java
new file mode 100644
index 0000000..e9e8fdf
--- /dev/null
+++ b/sa-base/src/main/java/net/lab1024/sa/base/common/constant/StringConst.java
@@ -0,0 +1,49 @@
+package net.lab1024.sa.base.common.constant;
+
+/**
+ * 字符串常量
+ *
+ * @Author 1024创新实验室-主任: 卓大
+ * @Date 2021-10-14 23:16:47
+ * @Wechat zhuoda1024
+ * @Email lab1024@163.com
+ * @Copyright 1024创新实验室
+ */
+public class StringConst {
+
+ /**
+ * 全局通用分隔符
+ */
+ public static final String SEPARATOR = ",";
+
+ /**
+ * 全局通用分隔符 下划线
+ */
+ public static final String UNDERLINE = "_";
+
+ /**
+ * 全局通用 横杠
+ */
+ public static final String HORIZONTAL = "-";
+
+ /**
+ * 全局通用分隔符
+ */
+ public static final Character SEPARATOR_CHAR = ',';
+
+ /**
+ * 全局通用分隔符 斜杠
+ */
+ public static final String SEPARATOR_SLASH = "/";
+
+ /**
+ * 空字符串
+ */
+ public static final String EMPTY = "";
+
+ /**
+ * 全局通用 冒号
+ */
+ public static final String COLON = ":";
+
+}
diff --git a/sa-base/src/main/java/net/lab1024/sa/base/common/controller/SupportBaseController.java b/sa-base/src/main/java/net/lab1024/sa/base/common/controller/SupportBaseController.java
new file mode 100644
index 0000000..6f0a28d
--- /dev/null
+++ b/sa-base/src/main/java/net/lab1024/sa/base/common/controller/SupportBaseController.java
@@ -0,0 +1,18 @@
+package net.lab1024.sa.base.common.controller;
+
+import net.lab1024.sa.base.constant.SwaggerTagConst;
+import org.springframework.web.bind.annotation.RequestMapping;
+
+
+/**
+ * 支撑类业务路由基类
+ *
+ * @Author 1024创新实验室: 胡克
+ * @Date 2022-04-24 20:43:55
+ * @Wechat zhuoda1024
+ * @Email lab1024@163.com
+ * @Copyright 1024创新实验室
+ */
+@RequestMapping(SwaggerTagConst.Support.URL_PREFIX)
+public class SupportBaseController {
+}
diff --git a/sa-base/src/main/java/net/lab1024/sa/base/common/domain/DataScopePlugin.java b/sa-base/src/main/java/net/lab1024/sa/base/common/domain/DataScopePlugin.java
new file mode 100644
index 0000000..0fe704c
--- /dev/null
+++ b/sa-base/src/main/java/net/lab1024/sa/base/common/domain/DataScopePlugin.java
@@ -0,0 +1,15 @@
+package net.lab1024.sa.base.common.domain;
+
+import org.apache.ibatis.plugin.Interceptor;
+
+/**
+ * 数据范围 插件
+ *
+ * @Author 1024创新实验室: 罗伊
+ * @Date 2021-11-15 17:20:04
+ * @Wechat zhuoda1024
+ * @Email lab1024@163.com
+ * @Copyright 1024创新实验室
+ */
+public abstract class DataScopePlugin implements Interceptor {
+}
\ No newline at end of file
diff --git a/sa-base/src/main/java/net/lab1024/sa/base/common/domain/PageParam.java b/sa-base/src/main/java/net/lab1024/sa/base/common/domain/PageParam.java
new file mode 100644
index 0000000..59a6dc4
--- /dev/null
+++ b/sa-base/src/main/java/net/lab1024/sa/base/common/domain/PageParam.java
@@ -0,0 +1,58 @@
+package net.lab1024.sa.base.common.domain;
+
+import io.swagger.v3.oas.annotations.media.Schema;
+import jakarta.validation.Valid;
+import jakarta.validation.constraints.Max;
+import jakarta.validation.constraints.NotBlank;
+import jakarta.validation.constraints.NotNull;
+import jakarta.validation.constraints.Size;
+import lombok.Data;
+import org.hibernate.validator.constraints.Length;
+
+import java.util.List;
+
+/**
+ * 分页基础参数
+ *
+ * @Author 1024创新实验室-主任: 卓大
+ * @Date 2020/04/28 16:19
+ * @Wechat zhuoda1024
+ * @Email lab1024@163.com
+ * @Copyright 1024创新实验室
+ */
+@Data
+public class PageParam {
+
+ @Schema(description = "页码(不能为空)", example = "1")
+ @NotNull(message = "分页参数不能为空")
+ private Long pageNum;
+
+ @Schema(description = "每页数量(不能为空)", example = "10")
+ @NotNull(message = "每页数量不能为空")
+ @Max(value = 500, message = "每页最大为500")
+ private Long pageSize;
+
+ @Schema(description = "是否查询总条数")
+ protected Boolean searchCount;
+
+ @Schema(description = "排序字段集合")
+ @Size(max = 10, message = "排序字段最多10")
+ @Valid
+ private List sortItemList;
+
+ /**
+ * 排序DTO类
+ */
+ @Data
+ public static class SortItem {
+
+ @Schema(description = "true正序|false倒序")
+ @NotNull(message = "排序规则不能为空")
+ private Boolean isAsc;
+
+ @Schema(description = "排序字段")
+ @NotBlank(message = "排序字段不能为空")
+ @Length(max = 30, message = "排序字段最多30")
+ private String column;
+ }
+}
diff --git a/sa-base/src/main/java/net/lab1024/sa/base/common/domain/PageResult.java b/sa-base/src/main/java/net/lab1024/sa/base/common/domain/PageResult.java
new file mode 100644
index 0000000..14274b3
--- /dev/null
+++ b/sa-base/src/main/java/net/lab1024/sa/base/common/domain/PageResult.java
@@ -0,0 +1,53 @@
+package net.lab1024.sa.base.common.domain;
+
+import io.swagger.v3.oas.annotations.media.Schema;
+import lombok.Data;
+
+import java.util.List;
+
+/**
+ * 分页返回对象
+ *
+ * @Author 1024创新实验室-主任: 卓大
+ * @Date 2020/04/28 16:19
+ * @Wechat zhuoda1024
+ * @Email lab1024@163.com
+ * @Copyright 1024创新实验室
+ */
+@Data
+public class PageResult {
+
+ /**
+ * 当前页
+ */
+ @Schema(description = "当前页")
+ private Long pageNum;
+
+ /**
+ * 每页的数量
+ */
+ @Schema(description = "每页的数量")
+ private Long pageSize;
+
+ /**
+ * 总记录数
+ */
+ @Schema(description = "总记录数")
+ private Long total;
+
+ /**
+ * 总页数
+ */
+ @Schema(description = "总页数")
+ private Long pages;
+
+ /**
+ * 结果集
+ */
+ @Schema(description = "结果集")
+ private List list;
+
+ @Schema(description = "是否为空")
+ private Boolean emptyFlag;
+
+}
diff --git a/sa-base/src/main/java/net/lab1024/sa/base/common/domain/RequestUrlVO.java b/sa-base/src/main/java/net/lab1024/sa/base/common/domain/RequestUrlVO.java
new file mode 100644
index 0000000..4669c2d
--- /dev/null
+++ b/sa-base/src/main/java/net/lab1024/sa/base/common/domain/RequestUrlVO.java
@@ -0,0 +1,26 @@
+package net.lab1024.sa.base.common.domain;
+
+import io.swagger.v3.oas.annotations.media.Schema;
+import lombok.Data;
+
+/**
+ * 请求url返回对象
+ *
+ * @Author 1024创新实验室: 李善逸
+ * @Date 2021/9/1 20:15
+ * @Wechat zhuoda1024
+ * @Email lab1024@163.com
+ * @Copyright 1024创新实验室
+ */
+@Data
+public class RequestUrlVO {
+
+ @Schema(description = "注释说明")
+ private String comment;
+
+ @Schema(description = "controller.method")
+ private String name;
+
+ @Schema(description = "url")
+ private String url;
+}
diff --git a/sa-base/src/main/java/net/lab1024/sa/base/common/domain/RequestUser.java b/sa-base/src/main/java/net/lab1024/sa/base/common/domain/RequestUser.java
new file mode 100644
index 0000000..9886436
--- /dev/null
+++ b/sa-base/src/main/java/net/lab1024/sa/base/common/domain/RequestUser.java
@@ -0,0 +1,49 @@
+package net.lab1024.sa.base.common.domain;
+
+import net.lab1024.sa.base.common.enumeration.UserTypeEnum;
+
+/**
+ * 请求用户
+ *
+ * @Author 1024创新实验室-主任: 卓大
+ * @Date 2021-12-21 19:55:07
+ * @Wechat zhuoda1024
+ * @Email lab1024@163.com
+ * @Copyright 1024创新实验室
+ */
+public interface RequestUser {
+
+ /**
+ * 请求用户id
+ *
+ * @return
+ */
+ Long getUserId();
+
+ /**
+ * 请求用户名称
+ *
+ * @return
+ */
+ String getUserName();
+
+ /**
+ * 获取用户类型
+ */
+ UserTypeEnum getUserType();
+
+ /**
+ * 获取请求的IP
+ *
+ * @return
+ */
+ String getIp();
+
+ /**
+ * 获取请求 user-agent
+ *
+ * @return
+ */
+ String getUserAgent();
+
+}
diff --git a/sa-base/src/main/java/net/lab1024/sa/base/common/domain/ResponseDTO.java b/sa-base/src/main/java/net/lab1024/sa/base/common/domain/ResponseDTO.java
new file mode 100644
index 0000000..513091a
--- /dev/null
+++ b/sa-base/src/main/java/net/lab1024/sa/base/common/domain/ResponseDTO.java
@@ -0,0 +1,121 @@
+package net.lab1024.sa.base.common.domain;
+
+
+import io.swagger.v3.oas.annotations.media.Schema;
+import lombok.Data;
+import net.lab1024.sa.base.common.code.ErrorCode;
+import net.lab1024.sa.base.common.code.UserErrorCode;
+import net.lab1024.sa.base.common.enumeration.DataTypeEnum;
+import net.lab1024.sa.base.common.swagger.SchemaEnum;
+import org.apache.commons.lang3.StringUtils;
+
+/**
+ * 请求返回对象
+ *
+ * @Author 1024创新实验室-主任: 卓大
+ * @Date 2021-10-31 21:06:11
+ * @Wechat zhuoda1024
+ * @Email lab1024@163.com
+ * @Copyright 1024创新实验室
+ */
+@Data
+@Schema
+public class ResponseDTO {
+
+ public static final int OK_CODE = 0;
+
+ public static final String OK_MSG = "操作成功";
+
+ @Schema(description = "返回码")
+ private Integer code;
+
+ @Schema(description = "级别")
+ private String level;
+
+ private String msg;
+
+ private Boolean ok;
+
+ @Schema(description = "返回数据")
+ private T data;
+
+ @SchemaEnum(value = DataTypeEnum.class,desc = "数据类型")
+ private Integer dataType;
+
+ public ResponseDTO(Integer code, String level, boolean ok, String msg, T data) {
+ this.code = code;
+ this.level = level;
+ this.ok = ok;
+ this.msg = msg;
+ this.data = data;
+ this.dataType = DataTypeEnum.NORMAL.getValue();
+ }
+
+ public ResponseDTO(Integer code, String level, boolean ok, String msg) {
+ this.code = code;
+ this.level = level;
+ this.ok = ok;
+ this.msg = msg;
+ this.dataType = DataTypeEnum.NORMAL.getValue();
+ }
+
+ public ResponseDTO(ErrorCode errorCode, boolean ok, String msg, T data) {
+ this.code = errorCode.getCode();
+ this.level = errorCode.getLevel();
+ this.ok = ok;
+ if (StringUtils.isNotBlank(msg)) {
+ this.msg = msg;
+ } else {
+ this.msg = errorCode.getMsg();
+ }
+ this.data = data;
+ this.dataType = DataTypeEnum.NORMAL.getValue();
+ }
+
+ public static ResponseDTO ok() {
+ return new ResponseDTO<>(OK_CODE, null, true, OK_MSG, null);
+ }
+
+ public static ResponseDTO ok(T data) {
+ return new ResponseDTO<>(OK_CODE, null, true, OK_MSG, data);
+ }
+
+ public static ResponseDTO okMsg(String msg) {
+ return new ResponseDTO<>(OK_CODE, null, true, msg, null);
+ }
+
+ // -------------------------------------------- 最常用的 用户参数 错误码 --------------------------------------------
+
+ public static ResponseDTO userErrorParam() {
+ return new ResponseDTO<>(UserErrorCode.PARAM_ERROR, false, null, null);
+ }
+
+
+ public static ResponseDTO userErrorParam(String msg) {
+ return new ResponseDTO<>(UserErrorCode.PARAM_ERROR, false, msg, null);
+ }
+
+ // -------------------------------------------- 错误码 --------------------------------------------
+
+ public static ResponseDTO error(ErrorCode errorCode) {
+ return new ResponseDTO<>(errorCode, false, null, null);
+ }
+
+ public static ResponseDTO error(ErrorCode errorCode, boolean ok) {
+ return new ResponseDTO<>(errorCode, ok, null, null);
+ }
+
+ public static ResponseDTO error(ResponseDTO> responseDTO) {
+ return new ResponseDTO<>(responseDTO.getCode(), responseDTO.getLevel(), responseDTO.getOk(), responseDTO.getMsg(), null);
+ }
+
+ public static ResponseDTO error(ErrorCode errorCode, String msg) {
+ return new ResponseDTO<>(errorCode, false, msg, null);
+ }
+
+ public static ResponseDTO errorData(ErrorCode errorCode, T data) {
+ return new ResponseDTO<>(errorCode, false, null, data);
+ }
+
+
+}
diff --git a/sa-base/src/main/java/net/lab1024/sa/base/common/domain/SystemEnvironment.java b/sa-base/src/main/java/net/lab1024/sa/base/common/domain/SystemEnvironment.java
new file mode 100644
index 0000000..232b292
--- /dev/null
+++ b/sa-base/src/main/java/net/lab1024/sa/base/common/domain/SystemEnvironment.java
@@ -0,0 +1,35 @@
+package net.lab1024.sa.base.common.domain;
+
+
+import lombok.AllArgsConstructor;
+import lombok.Getter;
+import net.lab1024.sa.base.common.enumeration.SystemEnvironmentEnum;
+
+/**
+ * 系统环境
+ *
+ * @Author 1024创新实验室-主任: 卓大
+ * @Date 2021/8/13 21:06:11
+ * @Wechat zhuoda1024
+ * @Email lab1024@163.com
+ * @Copyright 1024创新实验室
+ */
+@AllArgsConstructor
+@Getter
+public class SystemEnvironment {
+
+ /**
+ * 是否位生产环境
+ */
+ private boolean isProd;
+
+ /**
+ * 项目名称
+ */
+ private String projectName;
+
+ /**
+ * 当前环境
+ */
+ private SystemEnvironmentEnum currentEnvironment;
+}
diff --git a/sa-base/src/main/java/net/lab1024/sa/base/common/domain/UserPermission.java b/sa-base/src/main/java/net/lab1024/sa/base/common/domain/UserPermission.java
new file mode 100644
index 0000000..355b948
--- /dev/null
+++ b/sa-base/src/main/java/net/lab1024/sa/base/common/domain/UserPermission.java
@@ -0,0 +1,32 @@
+package net.lab1024.sa.base.common.domain;
+
+import lombok.Data;
+
+import java.io.Serializable;
+import java.util.List;
+
+/**
+ * sa-token 所需的权限信息
+ *
+ * @Author 1024创新实验室-主任:卓大
+ * @Date 2023/8/26 15:23:10
+ * @Wechat zhuoda1024
+ * @Email lab1024@163.com
+ * @Copyright 1024创新实验室,Since 2012
+ */
+
+@Data
+public class UserPermission implements Serializable {
+
+ /**
+ * 权限列表
+ */
+ private List permissionList;
+
+ /**
+ * 角色列表
+ */
+ private List roleList;
+
+
+}
diff --git a/sa-base/src/main/java/net/lab1024/sa/base/common/domain/ValidateData.java b/sa-base/src/main/java/net/lab1024/sa/base/common/domain/ValidateData.java
new file mode 100644
index 0000000..15fbf00
--- /dev/null
+++ b/sa-base/src/main/java/net/lab1024/sa/base/common/domain/ValidateData.java
@@ -0,0 +1,20 @@
+package net.lab1024.sa.base.common.domain;
+
+import jakarta.validation.constraints.NotNull;
+import lombok.Data;
+
+/**
+ * 校验数据是否为空的包装类
+ *
+ * @Author 1024创新实验室: 胡克
+ * @Date 2020/10/16 21:06:11
+ * @Wechat zhuoda1024
+ * @Email lab1024@163.com
+ * @Copyright 1024创新实验室
+ */
+@Data
+public class ValidateData {
+
+ @NotNull(message = "数据不能为空哦")
+ private T data;
+}
\ No newline at end of file
diff --git a/sa-base/src/main/java/net/lab1024/sa/base/common/domain/ValidateList.java b/sa-base/src/main/java/net/lab1024/sa/base/common/domain/ValidateList.java
new file mode 100644
index 0000000..ec302c1
--- /dev/null
+++ b/sa-base/src/main/java/net/lab1024/sa/base/common/domain/ValidateList.java
@@ -0,0 +1,154 @@
+package net.lab1024.sa.base.common.domain;
+
+import jakarta.validation.Valid;
+import jakarta.validation.constraints.NotEmpty;
+
+import java.util.*;
+
+/**
+ * 校验集合是否为空的包装类
+ *
+ * @Author 1024创新实验室-主任: 卓大
+ * @Date 2020-02-03 17:37
+ * @Wechat zhuoda1024
+ * @Email lab1024@163.com
+ * @Copyright 1024创新实验室
+ */
+public class ValidateList implements List {
+
+ @Valid
+ @NotEmpty(message = "数据长度不能为空哦")
+ private List list;
+
+ public ValidateList() {
+ this.list = new ArrayList<>();
+ }
+
+ public ValidateList(List list) {
+ this.list = list;
+ }
+
+ public List getList() {
+ return list;
+ }
+
+ public void setList(List list) {
+ this.list = list;
+ }
+
+ @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);
+ }
+
+}
\ No newline at end of file
diff --git a/sa-base/src/main/java/net/lab1024/sa/base/common/enumeration/BaseEnum.java b/sa-base/src/main/java/net/lab1024/sa/base/common/enumeration/BaseEnum.java
new file mode 100644
index 0000000..6593aa9
--- /dev/null
+++ b/sa-base/src/main/java/net/lab1024/sa/base/common/enumeration/BaseEnum.java
@@ -0,0 +1,99 @@
+package net.lab1024.sa.base.common.enumeration;
+
+import com.alibaba.fastjson.JSON;
+import com.alibaba.fastjson.JSONAware;
+import com.alibaba.fastjson.JSONObject;
+import com.google.common.base.CaseFormat;
+import lombok.Data;
+
+import java.util.LinkedHashMap;
+import java.util.Objects;
+
+/**
+ * 枚举类接口
+ *
+ * @Author 1024创新实验室: 胡克
+ * @Date 2018-07-17 21:22:12
+ * @Wechat zhuoda1024
+ * @Email lab1024@163.com
+ * @Copyright 1024创新实验室
+ */
+public interface BaseEnum {
+
+ /**
+ * 获取枚举类的值
+ *
+ * @return
+ */
+ Object getValue();
+
+ /**
+ * 获取枚举类的说明
+ *
+ * @return String
+ */
+ String getDesc();
+
+ /**
+ * 比较参数是否与枚举类的value相同
+ *
+ * @param value
+ * @return boolean
+ */
+ default boolean equalsValue(Object value) {
+ return Objects.equals(getValue(), value);
+ }
+
+ /**
+ * 比较枚举类是否相同
+ *
+ * @param baseEnum
+ * @return boolean
+ */
+ default boolean equals(BaseEnum baseEnum) {
+ return Objects.equals(getValue(), baseEnum.getValue()) && Objects.equals(getDesc(), baseEnum.getDesc());
+ }
+
+ /**
+ * 返回枚举类的说明
+ *
+ * @param clazz 枚举类类对象
+ * @return
+ */
+ static String getInfo(Class extends BaseEnum> clazz) {
+ BaseEnum[] enums = clazz.getEnumConstants();
+ LinkedHashMap json = new LinkedHashMap<>(enums.length);
+ for (BaseEnum e : enums) {
+ JSONObject jsonObject = new JSONObject();
+ jsonObject.put("value", new DeletedQuotationAware(e.getValue()));
+ jsonObject.put("desc", new DeletedQuotationAware(e.getDesc()));
+ json.put(e.toString(), jsonObject);
+ }
+
+ String enumJson = JSON.toJSONString(json, true);
+ enumJson = enumJson.replaceAll("\"", "");
+ enumJson = enumJson.replaceAll("\t", " ");
+ enumJson = enumJson.replaceAll("\n", "
");
+ String prefix = "
export const " + CaseFormat.UPPER_CAMEL.to(CaseFormat.UPPER_UNDERSCORE, clazz.getSimpleName() + " =
");
+ return prefix + enumJson + "
";
+ }
+
+ @Data
+ class DeletedQuotationAware implements JSONAware {
+
+ private String value;
+
+ public DeletedQuotationAware(Object value) {
+ if (value instanceof String) {
+ this.value = "'" + value + "'";
+ } else {
+ this.value = value.toString();
+ }
+ }
+
+ @Override
+ public String toJSONString() {
+ return value;
+ }
+ }
+}
diff --git a/sa-base/src/main/java/net/lab1024/sa/base/common/enumeration/DataTypeEnum.java b/sa-base/src/main/java/net/lab1024/sa/base/common/enumeration/DataTypeEnum.java
new file mode 100644
index 0000000..6cb068c
--- /dev/null
+++ b/sa-base/src/main/java/net/lab1024/sa/base/common/enumeration/DataTypeEnum.java
@@ -0,0 +1,32 @@
+package net.lab1024.sa.base.common.enumeration;
+
+import lombok.AllArgsConstructor;
+import lombok.Getter;
+
+/**
+ * @Author 1024创新实验室-主任:卓大
+ * @Date 2023/10/25 09:47:13
+ * @Wechat zhuoda1024
+ * @Email lab1024@163.com
+ * @Copyright 1024创新实验室,Since 2012
+ */
+
+@Getter
+@AllArgsConstructor
+public enum DataTypeEnum implements BaseEnum {
+
+ /**
+ *普通数据
+ */
+ NORMAL(1, "普通数据"),
+
+ /**
+ * 加密数据
+ */
+ ENCRYPT(10, "加密数据"),
+ ;
+ private final Integer value;
+
+ private final String desc;
+
+}
diff --git a/sa-base/src/main/java/net/lab1024/sa/base/common/enumeration/GenderEnum.java b/sa-base/src/main/java/net/lab1024/sa/base/common/enumeration/GenderEnum.java
new file mode 100644
index 0000000..cbfbc39
--- /dev/null
+++ b/sa-base/src/main/java/net/lab1024/sa/base/common/enumeration/GenderEnum.java
@@ -0,0 +1,37 @@
+package net.lab1024.sa.base.common.enumeration;
+
+import lombok.AllArgsConstructor;
+import lombok.Getter;
+
+/**
+ * 性别枚举类
+ *
+ * @Author 1024创新实验室: 胡克
+ * @Date 2019/09/24 16:50
+ * @Wechat zhuoda1024
+ * @Email lab1024@163.com
+ * @Copyright 1024创新实验室
+ */
+@AllArgsConstructor
+@Getter
+public enum GenderEnum implements BaseEnum {
+
+ /**
+ * 0 未知
+ */
+ UNKNOWN(0, "未知"),
+
+ /**
+ * 男 1 奇数为阳
+ */
+ MAN(1, "男"),
+
+ /**
+ * 女 2 偶数为阴
+ */
+ WOMAN(2, "女");
+
+ private final Integer value;
+
+ private final String desc;
+}
diff --git a/sa-base/src/main/java/net/lab1024/sa/base/common/enumeration/SystemEnvironmentEnum.java b/sa-base/src/main/java/net/lab1024/sa/base/common/enumeration/SystemEnvironmentEnum.java
new file mode 100644
index 0000000..c4167fd
--- /dev/null
+++ b/sa-base/src/main/java/net/lab1024/sa/base/common/enumeration/SystemEnvironmentEnum.java
@@ -0,0 +1,50 @@
+package net.lab1024.sa.base.common.enumeration;
+
+
+import lombok.AllArgsConstructor;
+import lombok.Getter;
+
+/**
+ * 系统环境枚举类
+ *
+ * @Author 1024创新实验室-主任: 卓大
+ * @Date 2020-10-15 22:45:04
+ * @Wechat zhuoda1024
+ * @Email lab1024@163.com
+ * @Copyright 1024创新实验室
+ */
+@AllArgsConstructor
+@Getter
+public enum SystemEnvironmentEnum implements BaseEnum {
+ /**
+ * dev
+ */
+ DEV(SystemEnvironmentNameConst.DEV, "开发环境"),
+
+ /**
+ * test
+ */
+ TEST(SystemEnvironmentNameConst.TEST, "测试环境"),
+
+ /**
+ * pre
+ */
+ PRE(SystemEnvironmentNameConst.PRE, "预发布环境"),
+
+ /**
+ * prod
+ */
+ PROD(SystemEnvironmentNameConst.PROD, "生产环境");
+
+ private final String value;
+
+ private final String desc;
+
+ public static final class SystemEnvironmentNameConst {
+ public static final String DEV = "dev";
+ public static final String TEST = "test";
+ public static final String PRE = "pre";
+ public static final String PROD = "prod";
+ }
+
+}
diff --git a/sa-base/src/main/java/net/lab1024/sa/base/common/enumeration/UserTypeEnum.java b/sa-base/src/main/java/net/lab1024/sa/base/common/enumeration/UserTypeEnum.java
new file mode 100644
index 0000000..60bec4d
--- /dev/null
+++ b/sa-base/src/main/java/net/lab1024/sa/base/common/enumeration/UserTypeEnum.java
@@ -0,0 +1,37 @@
+package net.lab1024.sa.base.common.enumeration;
+
+/**
+ * 用户类型
+ *
+ * @Author 1024创新实验室-主任:卓大
+ * @Date 2022/10/19 21:46:24
+ * @Wechat zhuoda1024
+ * @Email lab1024@163.com
+ * @Copyright 1024创新实验室
+ */
+public enum UserTypeEnum implements BaseEnum {
+
+ /**
+ * 管理端 员工用户
+ */
+ ADMIN_EMPLOYEE(1, "员工");
+
+ private Integer type;
+
+ private String desc;
+
+ UserTypeEnum(Integer type, String desc) {
+ this.type = type;
+ this.desc = desc;
+ }
+
+ @Override
+ public Integer getValue() {
+ return type;
+ }
+
+ @Override
+ public String getDesc() {
+ return desc;
+ }
+}
diff --git a/sa-base/src/main/java/net/lab1024/sa/base/common/exception/BusinessException.java b/sa-base/src/main/java/net/lab1024/sa/base/common/exception/BusinessException.java
new file mode 100644
index 0000000..481210d
--- /dev/null
+++ b/sa-base/src/main/java/net/lab1024/sa/base/common/exception/BusinessException.java
@@ -0,0 +1,38 @@
+package net.lab1024.sa.base.common.exception;
+
+import net.lab1024.sa.base.common.code.ErrorCode;
+
+/**
+ * 业务逻辑异常,全局异常拦截后统一返回ResponseCodeConst.SYSTEM_ERROR
+ *
+ * @Author 1024创新实验室: 罗伊
+ * @Date 2020/8/25 21:57
+ * @Wechat zhuoda1024
+ * @Email lab1024@163.com
+ * @Copyright 1024创新实验室
+ */
+public class BusinessException extends RuntimeException {
+
+ public BusinessException() {
+ }
+
+ public BusinessException(ErrorCode errorCode) {
+ super(errorCode.getMsg());
+ }
+
+ public BusinessException(String message) {
+ super(message);
+ }
+
+ public BusinessException(String message, Throwable cause) {
+ super(message, cause);
+ }
+
+ public BusinessException(Throwable cause) {
+ super(cause);
+ }
+
+ public BusinessException(String message, Throwable cause, boolean enableSuppression, boolean writableStackTrace) {
+ super(message, cause, enableSuppression, writableStackTrace);
+ }
+}
diff --git a/sa-base/src/main/java/net/lab1024/sa/base/common/json/deserializer/DictDataDeserializer.java b/sa-base/src/main/java/net/lab1024/sa/base/common/json/deserializer/DictDataDeserializer.java
new file mode 100644
index 0000000..3369045
--- /dev/null
+++ b/sa-base/src/main/java/net/lab1024/sa/base/common/json/deserializer/DictDataDeserializer.java
@@ -0,0 +1,49 @@
+package net.lab1024.sa.base.common.json.deserializer;
+
+import com.fasterxml.jackson.core.JsonParser;
+import com.fasterxml.jackson.core.ObjectCodec;
+import com.fasterxml.jackson.databind.DeserializationContext;
+import com.fasterxml.jackson.databind.JsonDeserializer;
+import com.fasterxml.jackson.databind.JsonNode;
+import lombok.extern.slf4j.Slf4j;
+
+import java.io.IOException;
+import java.util.ArrayList;
+import java.util.List;
+
+/**
+ * 字典反序列化
+ *
+ * @Author 1024创新实验室: 罗伊
+ * @Date 2022-08-12 22:17:53
+ * @Wechat zhuoda1024
+ * @Email lab1024@163.com
+ * @Copyright 1024创新实验室
+ */
+@Slf4j
+public class DictDataDeserializer extends JsonDeserializer {
+
+ @Override
+ public String deserialize(JsonParser jsonParser, DeserializationContext deserializationContext) throws IOException {
+ List list = new ArrayList<>();
+ ObjectCodec objectCodec = jsonParser.getCodec();
+ JsonNode listOrObjectNode = objectCodec.readTree(jsonParser);
+ String deserialize = "";
+ try {
+ if (listOrObjectNode.isArray()) {
+ for (JsonNode node : listOrObjectNode) {
+ list.add(node.asText());
+ }
+ } else {
+ list.add(listOrObjectNode.asText());
+ }
+ deserialize = String.join(",", list);
+ } catch (Exception e) {
+ log.error(e.getMessage(), e);
+ deserialize = listOrObjectNode.asText();
+ }
+ return deserialize;
+ }
+
+
+}
diff --git a/sa-base/src/main/java/net/lab1024/sa/base/common/json/deserializer/FileKeyVoDeserializer.java b/sa-base/src/main/java/net/lab1024/sa/base/common/json/deserializer/FileKeyVoDeserializer.java
new file mode 100644
index 0000000..f2ebab1
--- /dev/null
+++ b/sa-base/src/main/java/net/lab1024/sa/base/common/json/deserializer/FileKeyVoDeserializer.java
@@ -0,0 +1,53 @@
+package net.lab1024.sa.base.common.json.deserializer;
+
+import com.fasterxml.jackson.core.JsonParser;
+import com.fasterxml.jackson.core.JsonProcessingException;
+import com.fasterxml.jackson.core.ObjectCodec;
+import com.fasterxml.jackson.databind.DeserializationContext;
+import com.fasterxml.jackson.databind.JsonDeserializer;
+import com.fasterxml.jackson.databind.JsonNode;
+import lombok.extern.slf4j.Slf4j;
+import net.lab1024.sa.base.module.support.file.domain.vo.FileVO;
+
+import java.io.IOException;
+import java.util.ArrayList;
+import java.util.List;
+import java.util.stream.Collectors;
+
+/**
+ * 文件key反序列化
+ * 由于前端接收到的是序列化过的字段, 这边入库需要进行反序列化操作比较方便处理
+ *
+ * @Author 1024创新实验室: 胡克
+ * @Date 2022-11-24 17:15:23
+ * @Wechat zhuoda1024
+ * @Email lab1024@163.com
+ * @Copyright 1024创新实验室
+ */
+@Slf4j
+public class FileKeyVoDeserializer extends JsonDeserializer {
+
+ @Override
+ public String deserialize(JsonParser jsonParser, DeserializationContext deserializationContext) throws IOException, JsonProcessingException {
+ List list = new ArrayList<>();
+ ObjectCodec objectCodec = jsonParser.getCodec();
+ JsonNode listOrObjectNode = objectCodec.readTree(jsonParser);
+ String deserialize = "";
+ try {
+ if (listOrObjectNode.isArray()) {
+ for (JsonNode node : listOrObjectNode) {
+ list.add(objectCodec.treeToValue(node, FileVO.class));
+ }
+ } else {
+ list.add(objectCodec.treeToValue(listOrObjectNode, FileVO.class));
+ }
+ deserialize = list.stream().map(FileVO::getFileKey).collect(Collectors.joining(","));
+ } catch (Exception e) {
+ log.error(e.getMessage(), e);
+ deserialize = listOrObjectNode.asText();
+ }
+ return deserialize;
+ }
+
+
+}
diff --git a/sa-base/src/main/java/net/lab1024/sa/base/common/json/deserializer/LongJsonDeserializer.java b/sa-base/src/main/java/net/lab1024/sa/base/common/json/deserializer/LongJsonDeserializer.java
new file mode 100644
index 0000000..01117eb
--- /dev/null
+++ b/sa-base/src/main/java/net/lab1024/sa/base/common/json/deserializer/LongJsonDeserializer.java
@@ -0,0 +1,30 @@
+package net.lab1024.sa.base.common.json.deserializer;
+
+import com.fasterxml.jackson.core.JsonParser;
+import com.fasterxml.jackson.core.JsonProcessingException;
+import com.fasterxml.jackson.databind.DeserializationContext;
+import com.fasterxml.jackson.databind.JsonDeserializer;
+
+import java.io.IOException;
+
+/**
+ * Long类型序列化
+ *
+ * @Author 1024创新实验室-主任: 卓大
+ * @Date 2020-06-02 22:55:07
+ * @Wechat zhuoda1024
+ * @Email lab1024@163.com
+ * @Copyright 1024创新实验室
+ */
+public class LongJsonDeserializer extends JsonDeserializer {
+
+ @Override
+ public Long deserialize(JsonParser jsonParser, DeserializationContext deserializationContext) throws IOException, JsonProcessingException {
+ String value = jsonParser.getText();
+ try {
+ return value == null ? null : Long.parseLong(value);
+ } catch (NumberFormatException e) {
+ return null;
+ }
+ }
+}
\ No newline at end of file
diff --git a/sa-base/src/main/java/net/lab1024/sa/base/common/json/serializer/BigDecimalNullZeroSerializer.java b/sa-base/src/main/java/net/lab1024/sa/base/common/json/serializer/BigDecimalNullZeroSerializer.java
new file mode 100644
index 0000000..aac0566
--- /dev/null
+++ b/sa-base/src/main/java/net/lab1024/sa/base/common/json/serializer/BigDecimalNullZeroSerializer.java
@@ -0,0 +1,29 @@
+package net.lab1024.sa.base.common.json.serializer;
+
+import com.fasterxml.jackson.core.JsonGenerator;
+import com.fasterxml.jackson.databind.JsonSerializer;
+import com.fasterxml.jackson.databind.SerializerProvider;
+
+import java.io.IOException;
+import java.math.BigDecimal;
+
+/**
+ * 数字序列化
+ *
+ * @Author 1024创新实验室: 罗伊
+ * @Date 2020/8/20 21:04
+ * @Wechat zhuoda1024
+ * @Email lab1024@163.com
+ * @Copyright 1024创新实验室
+ */
+public class BigDecimalNullZeroSerializer extends JsonSerializer {
+
+ @Override
+ public void serialize(BigDecimal value, JsonGenerator jsonGenerator, SerializerProvider serializerProvider) throws IOException {
+ if (value == null) {
+ jsonGenerator.writeNumber(BigDecimal.ZERO);
+ return;
+ }
+ jsonGenerator.writeNumber(value);
+ }
+}
\ No newline at end of file
diff --git a/sa-base/src/main/java/net/lab1024/sa/base/common/json/serializer/DataMaskingSerializer.java b/sa-base/src/main/java/net/lab1024/sa/base/common/json/serializer/DataMaskingSerializer.java
new file mode 100644
index 0000000..ffe7c84
--- /dev/null
+++ b/sa-base/src/main/java/net/lab1024/sa/base/common/json/serializer/DataMaskingSerializer.java
@@ -0,0 +1,59 @@
+package net.lab1024.sa.base.common.json.serializer;
+
+import com.fasterxml.jackson.core.JsonGenerator;
+import com.fasterxml.jackson.databind.BeanProperty;
+import com.fasterxml.jackson.databind.JsonMappingException;
+import com.fasterxml.jackson.databind.JsonSerializer;
+import com.fasterxml.jackson.databind.SerializerProvider;
+import com.fasterxml.jackson.databind.ser.ContextualSerializer;
+import net.lab1024.sa.base.module.support.datamasking.DataMasking;
+import net.lab1024.sa.base.module.support.datamasking.DataMaskingTypeEnum;
+import net.lab1024.sa.base.module.support.datamasking.SmartDataMaskingUtil;
+import org.apache.commons.lang3.ObjectUtils;
+
+import java.io.IOException;
+
+/**
+ * 脱敏序列化
+ *
+ * @author 罗伊
+ * @description:
+ * @date 2024/7/21 4:39 下午
+ */
+public class DataMaskingSerializer extends JsonSerializer