Sfoglia il codice sorgente

边坡项目初始项目提交

lengfaqiang 2 anni fa
commit
b44a0f3c00
100 ha cambiato i file con 10802 aggiunte e 0 eliminazioni
  1. 27 0
      .gitignore
  2. 44 0
      README.md
  3. 440 0
      pom.xml
  4. 34 0
      slope-common/pom.xml
  5. 83 0
      slope-common/slope-common-bom/pom.xml
  6. 186 0
      slope-common/slope-common-core/pom.xml
  7. 23 0
      slope-common/slope-common-core/src/main/java/com/sckw/core/annotation/ApiVersion.java
  8. 20 0
      slope-common/slope-common-core/src/main/java/com/sckw/core/annotation/Log.java
  9. 26 0
      slope-common/slope-common-core/src/main/java/com/sckw/core/annotation/RepeatSubmit.java
  10. 18 0
      slope-common/slope-common-core/src/main/java/com/sckw/core/annotation/SckwCloudApplication.java
  11. 23 0
      slope-common/slope-common-core/src/main/java/com/sckw/core/annotation/Sensitive.java
  12. 136 0
      slope-common/slope-common-core/src/main/java/com/sckw/core/aspect/DaoAspect.java
  13. 80 0
      slope-common/slope-common-core/src/main/java/com/sckw/core/aspect/LogAspect.java
  14. 59 0
      slope-common/slope-common-core/src/main/java/com/sckw/core/aspect/NoRepeatSubmitAspect.java
  15. 72 0
      slope-common/slope-common-core/src/main/java/com/sckw/core/common/enums/NumberConstant.java
  16. 51 0
      slope-common/slope-common-core/src/main/java/com/sckw/core/common/enums/StringConstant.java
  17. 25 0
      slope-common/slope-common-core/src/main/java/com/sckw/core/config/JacksonConfig.java
  18. 36 0
      slope-common/slope-common-core/src/main/java/com/sckw/core/config/MybatisPlusConfig.java
  19. 33 0
      slope-common/slope-common-core/src/main/java/com/sckw/core/exception/BusinessException.java
  20. 37 0
      slope-common/slope-common-core/src/main/java/com/sckw/core/exception/CustomPromptException.java
  21. 133 0
      slope-common/slope-common-core/src/main/java/com/sckw/core/exception/GlobalSystemExceptionHandler.java
  22. 21 0
      slope-common/slope-common-core/src/main/java/com/sckw/core/exception/SourceInitializeException.java
  23. 25 0
      slope-common/slope-common-core/src/main/java/com/sckw/core/exception/SystemException.java
  24. 25 0
      slope-common/slope-common-core/src/main/java/com/sckw/core/exception/TranslateException.java
  25. 38 0
      slope-common/slope-common-core/src/main/java/com/sckw/core/filter/ExceptionFilterConfig.java
  26. 66 0
      slope-common/slope-common-core/src/main/java/com/sckw/core/model/base/BaseModel.java
  27. 57 0
      slope-common/slope-common-core/src/main/java/com/sckw/core/model/base/IdsList.java
  28. 24 0
      slope-common/slope-common-core/src/main/java/com/sckw/core/model/base/TimeBase.java
  29. 40 0
      slope-common/slope-common-core/src/main/java/com/sckw/core/model/constant/AopSortConstants.java
  30. 309 0
      slope-common/slope-common-core/src/main/java/com/sckw/core/model/constant/Global.java
  31. 47 0
      slope-common/slope-common-core/src/main/java/com/sckw/core/model/enums/SensitiveStrategy.java
  32. 80 0
      slope-common/slope-common-core/src/main/java/com/sckw/core/model/page/PageHelperUtil.java
  33. 21 0
      slope-common/slope-common-core/src/main/java/com/sckw/core/model/page/PageRequest.java
  34. 149 0
      slope-common/slope-common-core/src/main/java/com/sckw/core/model/page/PageRes.java
  35. 136 0
      slope-common/slope-common-core/src/main/java/com/sckw/core/model/page/PageResult.java
  36. 25 0
      slope-common/slope-common-core/src/main/java/com/sckw/core/model/vo/BaseList.java
  37. 40 0
      slope-common/slope-common-core/src/main/java/com/sckw/core/model/vo/BasePara.java
  38. 20 0
      slope-common/slope-common-core/src/main/java/com/sckw/core/model/vo/FileInfoEncryptVO.java
  39. 50 0
      slope-common/slope-common-core/src/main/java/com/sckw/core/model/vo/FileInfoVO.java
  40. 24 0
      slope-common/slope-common-core/src/main/java/com/sckw/core/model/vo/TableBottom.java
  41. 36 0
      slope-common/slope-common-core/src/main/java/com/sckw/core/model/vo/TableStatisticRes.java
  42. 39 0
      slope-common/slope-common-core/src/main/java/com/sckw/core/model/vo/TableTop.java
  43. 17 0
      slope-common/slope-common-core/src/main/java/com/sckw/core/service/SensitiveService.java
  44. 54 0
      slope-common/slope-common-core/src/main/java/com/sckw/core/utils/AsyncThreadUtils.java
  45. 262 0
      slope-common/slope-common-core/src/main/java/com/sckw/core/utils/BeanUtils.java
  46. 447 0
      slope-common/slope-common-core/src/main/java/com/sckw/core/utils/CollectionUtils.java
  47. 309 0
      slope-common/slope-common-core/src/main/java/com/sckw/core/utils/DateTimeUtil.java
  48. 795 0
      slope-common/slope-common-core/src/main/java/com/sckw/core/utils/DateUtils.java
  49. 147 0
      slope-common/slope-common-core/src/main/java/com/sckw/core/utils/Digests.java
  50. 153 0
      slope-common/slope-common-core/src/main/java/com/sckw/core/utils/Encodes.java
  51. 322 0
      slope-common/slope-common-core/src/main/java/com/sckw/core/utils/EncryUtil.java
  52. 123 0
      slope-common/slope-common-core/src/main/java/com/sckw/core/utils/EncryptionUtil.java
  53. 114 0
      slope-common/slope-common-core/src/main/java/com/sckw/core/utils/IdWorker.java
  54. 87 0
      slope-common/slope-common-core/src/main/java/com/sckw/core/utils/ListToPageDataUntil.java
  55. 175 0
      slope-common/slope-common-core/src/main/java/com/sckw/core/utils/ListUtils.java
  56. 59 0
      slope-common/slope-common-core/src/main/java/com/sckw/core/utils/LocUtils.java
  57. 90 0
      slope-common/slope-common-core/src/main/java/com/sckw/core/utils/LogUtil.java
  58. 24 0
      slope-common/slope-common-core/src/main/java/com/sckw/core/utils/LongToStringUtils.java
  59. 210 0
      slope-common/slope-common-core/src/main/java/com/sckw/core/utils/NumberUtils.java
  60. 491 0
      slope-common/slope-common-core/src/main/java/com/sckw/core/utils/OkHttpUtils.java
  61. 59 0
      slope-common/slope-common-core/src/main/java/com/sckw/core/utils/PageData.java
  62. 138 0
      slope-common/slope-common-core/src/main/java/com/sckw/core/utils/PasswordUtils.java
  63. 169 0
      slope-common/slope-common-core/src/main/java/com/sckw/core/utils/ReflectionUtils.java
  64. 148 0
      slope-common/slope-common-core/src/main/java/com/sckw/core/utils/RegularUtils.java
  65. 52 0
      slope-common/slope-common-core/src/main/java/com/sckw/core/utils/SensitiveJsonSerializer.java
  66. 70 0
      slope-common/slope-common-core/src/main/java/com/sckw/core/utils/SpringUtils.java
  67. 63 0
      slope-common/slope-common-core/src/main/java/com/sckw/core/utils/StringTimeUtil.java
  68. 832 0
      slope-common/slope-common-core/src/main/java/com/sckw/core/utils/StringUtils.java
  69. 10 0
      slope-common/slope-common-core/src/main/java/com/sckw/core/utils/UUIDUtils.java
  70. 169 0
      slope-common/slope-common-core/src/main/java/com/sckw/core/utils/workerUtils.java
  71. 34 0
      slope-common/slope-common-core/src/main/java/com/sckw/core/web/config/CustomConfig.java
  72. 0 0
      slope-common/slope-common-core/src/main/java/com/sckw/core/web/config/GlobalTransactionalConfig.java
  73. 197 0
      slope-common/slope-common-core/src/main/java/com/sckw/core/web/constant/HttpStatus.java
  74. 17 0
      slope-common/slope-common-core/src/main/java/com/sckw/core/web/constant/RequestConstant.java
  75. 95 0
      slope-common/slope-common-core/src/main/java/com/sckw/core/web/context/LoginEntHolder.java
  76. 160 0
      slope-common/slope-common-core/src/main/java/com/sckw/core/web/context/LoginUserHolder.java
  77. 37 0
      slope-common/slope-common-core/src/main/java/com/sckw/core/web/context/SignBase.java
  78. 50 0
      slope-common/slope-common-core/src/main/java/com/sckw/core/web/model/EntCertificateInfo.java
  79. 47 0
      slope-common/slope-common-core/src/main/java/com/sckw/core/web/model/LoginBase.java
  80. 135 0
      slope-common/slope-common-core/src/main/java/com/sckw/core/web/model/LoginEntInfo.java
  81. 79 0
      slope-common/slope-common-core/src/main/java/com/sckw/core/web/model/LoginUserInfo.java
  82. 137 0
      slope-common/slope-common-core/src/main/java/com/sckw/core/web/model/ValiList.java
  83. 343 0
      slope-common/slope-common-core/src/main/java/com/sckw/core/web/request/HttpClientUtil.java
  84. 35 0
      slope-common/slope-common-core/src/main/java/com/sckw/core/web/request/RequestReadUtils.java
  85. 107 0
      slope-common/slope-common-core/src/main/java/com/sckw/core/web/request/RequestUtil.java
  86. 89 0
      slope-common/slope-common-core/src/main/java/com/sckw/core/web/response/HttpResult.java
  87. 29 0
      slope-common/slope-common-core/src/main/java/com/sckw/core/web/response/ResponseUtil.java
  88. 62 0
      slope-common/slope-common-core/src/main/java/com/sckw/core/web/response/result/Data.java
  89. 44 0
      slope-common/slope-common-core/src/main/java/com/sckw/core/web/response/result/I18nMessage.java
  90. 55 0
      slope-common/slope-common-core/src/main/java/com/sckw/core/web/response/result/Page.java
  91. 176 0
      slope-common/slope-common-core/src/main/java/com/sckw/core/web/response/result/Result.java
  92. 32 0
      slope-common/slope-common-core/src/main/java/com/sckw/core/web/response/result/Status.java
  93. 8 0
      slope-common/slope-common-core/src/main/resources/META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports
  94. 45 0
      slope-common/slope-common-datasource/pom.xml
  95. 55 0
      slope-common/slope-common-excel/pom.xml
  96. 35 0
      slope-common/slope-common-excel/src/main/java/com/sckw/excel/annotation/EasyExcel.java
  97. 26 0
      slope-common/slope-common-excel/src/main/java/com/sckw/excel/annotation/ExcelContext.java
  98. 31 0
      slope-common/slope-common-excel/src/main/java/com/sckw/excel/annotation/ExcelSelected.java
  99. 82 0
      slope-common/slope-common-excel/src/main/java/com/sckw/excel/common/FileType.java
  100. 113 0
      slope-common/slope-common-excel/src/main/java/com/sckw/excel/config/easyexcel/CustomCellWeightWeightConfig.java

+ 27 - 0
.gitignore

@@ -0,0 +1,27 @@
+# ---> Java
+*.class
+target
+
+# Mobile Tools for Java (J2ME)
+.mtj.tmp/
+
+# Package Files #
+*.jar
+*.war
+*.ear
+
+# virtual machine crash logs, see http://www.java.com/en/download/help/error_hotspot.xml
+hs_err_pid*
+
+### IntelliJ IDEA ###
+.idea
+*.iws
+*.iml
+*.ipr
+
+### VS Code ###
+.vscode
+
+### logs目录 ###
+logs
+

+ 44 - 0
README.md

@@ -0,0 +1,44 @@
+## 平台简介
+
+开物边坡平台。
+
+* 采用前后端分离的模式,微服务版本。
+* 后端采用Spring Boot、Spring Cloud & Alibaba。
+* 服务之间调用支持openfeign和dubbo。
+* 服务调用链路使用ZipKin,分布式任务调度xxjob。
+* 多语言微服务异构使用sidecar,消息驱动服务使用stream。
+*
+
+## 架构图
+
+![framework.png](framework.png)
+
+## 技术栈
+
+## 系统模块
+
+~~~
+slope-service-platform     
+├── slope-modules                                // 业务模块
+│       └── slope-file                           // 文件服务 [18880]
+├── slope-modules-api                    // 接口模块
+│       └── sckw-modules-bom                    // modules依赖项
+│       └── sckw-message-api                    // 消息服务接口
+├── slope-common          				// 通用模块
+│       └── slope-common-bom                     // common依赖项
+│       └── slope-common-core                    // 核心模块
+│       └── slope-common-datasource              // 多数据源
+│       └── slope-common-log                     // 日志记录
+│       └── slope-common-redis                   // 缓存服务
+│       └── slope-common-remote                  // 资源包
+│       └── slope-common-stream                  // 消息驱动
+│       └── slope-common-xxljob                  // 任务调度
+│       └── slope-common-excel                   // excel导入导出
+~~~
+
+## 运行配置
+
+Run/Debug Configurations->Modify options->Add VM options->--add-opens java.base/java.lang=ALL-UNNAMED --add-opens
+java.base/java.lang.reflect=ALL-UNNAMED
+
+## 数据库说明

+ 440 - 0
pom.xml

@@ -0,0 +1,440 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project xmlns="http://maven.apache.org/POM/4.0.0"
+         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+    <modelVersion>4.0.0</modelVersion>
+
+    <groupId>com.sckw</groupId>
+    <artifactId>slope-manage-service</artifactId>
+    <version>1.0.0</version>
+
+    <name>slope-manage-service</name>
+    <url>http://git.sckaiwu.cn/17358629955/sckw-service-platform.git</url>
+    <description>slope-manage-service微服务系统</description>
+
+    <modules>
+        <module>slope-modules</module>
+        <module>slope-common</module>
+        <module>slope-modules-api</module>
+    </modules>
+    <packaging>pom</packaging>
+
+    <properties>
+        <maven.compiler.source>17</maven.compiler.source>
+        <maven.compiler.target>17</maven.compiler.target>
+        <maven.compiler.compilerVersion>17</maven.compiler.compilerVersion>
+        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
+        <spring-version>6.0.7</spring-version>
+        <spring-boot.version>3.0.5</spring-boot.version>
+        <spring-cloud.version>2022.0.0</spring-cloud.version>
+        <spring-cloud-alibaba.version>2022.0.0.0-RC1</spring-cloud-alibaba.version>
+
+        <!--不能使用3.2.0版本,会导致redisson里面的kryo版本降低值4.2.0-->
+        <dubbo.version>3.2.2</dubbo.version>
+        <snakeyaml.version>2.0</snakeyaml.version>
+        <springdoc.version>2.1.0</springdoc.version>
+        <redisson.version>3.21.3</redisson.version>
+        <fastjson.version>2.0.38</fastjson.version>
+        <easyexcel.version>3.3.2</easyexcel.version>
+        <cglib.version>3.3.0</cglib.version>
+        <commons-io.version>2.11.0</commons-io.version>
+        <alicloud-sms.version>2.2.0.RELEASE</alicloud-sms.version>
+        <sentinel-csp.version>1.8.6</sentinel-csp.version>
+        <nacos-client.version>2.2.1</nacos-client.version>
+        <hutool.version>5.8.18</hutool.version>
+        <mybatis-plus.version>3.5.3.1</mybatis-plus.version>
+        <dynamic-datasource.version>3.6.1</dynamic-datasource.version>
+        <latest.release.version>5.2.0</latest.release.version>
+        <tdengine.version>3.2.5</tdengine.version>
+        <pagehelper.version>5.3.2</pagehelper.version>
+        <pagehelper-spring-boot-starter.version>1.4.7</pagehelper-spring-boot-starter.version>
+        <junit.version>4.13.2</junit.version>
+        <xxljob.version>2.4.0</xxljob.version>
+        <project.version>1.0.0</project.version>
+        <!--maven插件版本声明-->
+        <maven-clean-plugin.version>3.2.0</maven-clean-plugin.version>
+        <maven-compiler-plugin.version>3.10.1</maven-compiler-plugin.version>
+        <maven-jar-plugin.version>3.3.0</maven-jar-plugin.version>
+        <maven-resources-plugin.version>3.3.0</maven-resources-plugin.version>
+        <maven-install-plugin.version>3.0.1</maven-install-plugin.version>
+        <maven-deploy-plugin.version>3.0.0</maven-deploy-plugin.version>
+    </properties>
+
+    <dependencyManagement>
+        <dependencies>
+
+            <dependency>
+                <groupId>org.springframework.boot</groupId>
+                <artifactId>spring-boot-dependencies</artifactId>
+                <version>${spring-boot.version}</version>
+                <type>pom</type>
+                <scope>import</scope>
+            </dependency>
+
+            <!-- spring-cloud -->
+            <dependency>
+                <groupId>org.springframework.cloud</groupId>
+                <artifactId>spring-cloud-dependencies</artifactId>
+                <version>${spring-cloud.version}</version>
+                <type>pom</type>
+                <scope>import</scope>
+            </dependency>
+
+            <!-- spring-cloud-alibaba -->
+            <dependency>
+                <groupId>com.alibaba.cloud</groupId>
+                <artifactId>spring-cloud-alibaba-dependencies</artifactId>
+                <version>${spring-cloud-alibaba.version}</version>
+                <type>pom</type>
+                <scope>import</scope>
+                <exclusions>
+                    <exclusion>
+                        <groupId>com.alibaba.nacos</groupId>
+                        <artifactId>nacos-client</artifactId>
+                    </exclusion>
+                </exclusions>
+            </dependency>
+
+            <!-- common 的依赖配置-->
+            <dependency>
+                <groupId>com.sckw</groupId>
+                <artifactId>sckw-common-bom</artifactId>
+                <version>${project.version}</version>
+                <type>pom</type>
+                <scope>import</scope>
+            </dependency>
+
+            <!-- modules 的依赖配置-->
+            <dependency>
+                <groupId>com.sckw</groupId>
+                <artifactId>sckw-modules-bom</artifactId>
+                <version>${project.version}</version>
+                <type>pom</type>
+                <scope>import</scope>
+            </dependency>
+
+
+            <!-- apache dubbo -->
+            <dependency>
+                <groupId>org.apache.dubbo</groupId>
+                <artifactId>dubbo-bom</artifactId>
+                <version>${dubbo.version}</version>
+                <type>pom</type>
+                <scope>import</scope>
+                <exclusions>
+                    <exclusion>
+                        <groupId>com.alibaba</groupId>
+                        <artifactId>hessian-lite</artifactId>
+                    </exclusion>
+                </exclusions>
+            </dependency>
+
+            <!-- yaml/yml配置文件 -->
+            <dependency>
+                <groupId>org.yaml</groupId>
+                <artifactId>snakeyaml</artifactId>
+                <version>${snakeyaml.version}</version>
+                <!--<scope>compile</scope>-->
+            </dependency>
+
+            <!--处理序列化问题-->
+<!--            <dependency>-->
+<!--                <groupId>com.caucho</groupId>-->
+<!--                <artifactId>hessian</artifactId>-->
+<!--            </dependency>-->
+
+            <!--reids操作-->
+            <dependency>
+                <groupId>org.redisson</groupId>
+                <artifactId>redisson-spring-boot-starter</artifactId>
+                <version>${redisson.version}</version>
+            </dependency>
+
+            <!--alibaba fastjson-->
+            <dependency>
+                <groupId>com.alibaba</groupId>
+                <artifactId>fastjson</artifactId>
+                <version>${fastjson.version}</version>
+            </dependency>
+
+            <!--alibaba EasyExcel导入导出-->
+            <dependency>
+                <groupId>com.alibaba</groupId>
+                <artifactId>easyexcel</artifactId>
+                <version>${easyexcel.version}</version>
+            </dependency>
+
+            <!--cglib-->
+            <dependency>
+                <groupId>cglib</groupId>
+                <artifactId>cglib</artifactId>
+                <exclusions>
+                    <exclusion>
+                        <groupId>org.ow2.asm</groupId>
+                        <artifactId>asm</artifactId>
+                    </exclusion>
+                </exclusions>
+                <version>${cglib.version}</version>
+            </dependency>
+
+            <dependency>
+                <groupId>commons-io</groupId>
+                <artifactId>commons-io</artifactId>
+                <version>${commons-io.version}</version>
+            </dependency>
+
+            <!--alibaba 短信-->
+            <dependency>
+                <groupId>com.alibaba.cloud</groupId>
+                <artifactId>spring-cloud-alicloud-sms</artifactId>
+                <version>${alicloud-sms.version}</version>
+            </dependency>
+
+            <!--nacos-->
+            <dependency>
+                <groupId>com.alibaba.nacos</groupId>
+                <artifactId>nacos-client</artifactId>
+                <version>${nacos-client.version}</version>
+            </dependency>
+
+            <!--jdk9+ 以上需要手动添加 JAXB能够使用Jackson对JAXB注解-->
+            <dependency>
+                <groupId>javax.xml.bind</groupId>
+                <artifactId>jaxb-api</artifactId>
+                <version>2.3.1</version>
+            </dependency>
+
+            <!--hutool-->
+            <dependency>
+                <groupId>cn.hutool</groupId>
+                <artifactId>hutool-http</artifactId>
+                <version>${hutool.version}</version>
+            </dependency>
+            <dependency>
+                <groupId>cn.hutool</groupId>
+                <artifactId>hutool-extra</artifactId>
+                <version>${hutool.version}</version>
+            </dependency>
+
+            <!--mybatis-plus 依赖-->
+            <dependency>
+                <groupId>com.baomidou</groupId>
+                <artifactId>mybatis-plus-boot-starter</artifactId>
+                <version>${mybatis-plus.version}</version>
+            </dependency>
+
+            <dependency>
+                <groupId>com.baomidou</groupId>
+                <artifactId>mybatis-plus-annotation</artifactId>
+                <version>${mybatis-plus.version}</version>
+            </dependency>
+
+            <dependency>
+                <groupId>com.baomidou</groupId>
+                <artifactId>mybatis-plus-extension</artifactId>
+                <version>${mybatis-plus.version}</version>
+            </dependency>
+
+            <!--多数据源-->
+            <dependency>
+                <groupId>com.baomidou</groupId>
+                <artifactId>dynamic-datasource-spring-boot-starter</artifactId>
+                <version>${dynamic-datasource.version}</version>
+            </dependency>
+
+            <!--ShardingSphere-JDBC-->
+            <dependency>
+                <groupId>org.apache.shardingsphere</groupId>
+                <artifactId>shardingsphere-jdbc-core-spring-boot-starter</artifactId>
+                <version>${latest.release.version}</version>
+            </dependency>
+            <!--tdengine-->
+            <dependency>
+                <groupId>com.taosdata.jdbc</groupId>
+                <artifactId>taos-jdbcdriver</artifactId>
+                <version>${tdengine.version}</version>
+            </dependency>
+
+            <!--分页-->
+            <dependency>
+                <groupId>com.github.pagehelper</groupId>
+                <artifactId>pagehelper</artifactId>
+                <version>${pagehelper.version}</version>
+            </dependency>
+
+            <dependency>
+                <groupId>com.github.pagehelper</groupId>
+                <artifactId>pagehelper-spring-boot-autoconfigure</artifactId>
+                <version>${pagehelper-spring-boot-starter.version}</version>
+            </dependency>
+
+            <dependency>
+                <groupId>com.github.pagehelper</groupId>
+                <artifactId>pagehelper-spring-boot-starter</artifactId>
+                <version>${pagehelper-spring-boot-starter.version}</version>
+            </dependency>
+
+            <!--junit-->
+            <dependency>
+                <groupId>junit</groupId>
+                <artifactId>junit</artifactId>
+                <version>${junit.version}</version>
+                <scope>test</scope>
+            </dependency>
+
+            <!--Lombok-->
+            <dependency>
+                <groupId>org.projectlombok</groupId>
+                <artifactId>lombok</artifactId>
+                <version>1.18.26</version>
+                <!--<scope>provided</scope>-->
+            </dependency>
+
+            <dependency>
+                <groupId>org.apache.tomcat.embed</groupId>
+                <artifactId>tomcat-embed-core</artifactId>
+                <version>10.1.7</version>
+            </dependency>
+
+            <dependency>
+                <groupId>org.springframework</groupId>
+                <artifactId>spring-webmvc</artifactId>
+                <version>${spring-version}</version>
+            </dependency>
+
+            <!--xxx-job-->
+            <dependency>
+                <groupId>com.xuxueli</groupId>
+                <artifactId>xxl-job-core</artifactId>
+                <version>${xxljob.version}</version>
+            </dependency>
+
+            <dependency>
+                <groupId>org.bouncycastle</groupId>
+                <artifactId>bcprov-jdk18on</artifactId>
+                <version>1.74</version>
+            </dependency>
+        </dependencies>
+    </dependencyManagement>
+
+    <profiles>
+        <profile>
+            <id>dev</id>
+            <properties>
+                <profiles.active>dev</profiles.active>
+                <nacos.server>10.10.10.230:8848</nacos.server>
+                <nacos.namespace>slope-manage-service</nacos.namespace>
+            </properties>
+        </profile>
+        <!--测试环境-->
+        <profile>
+            <id>test</id>
+            <properties>
+                <profiles.active>test</profiles.active>
+                <nacos.server>10.10.10.224:8848</nacos.server>
+                <nacos.namespace>slope-manage-service</nacos.namespace>
+            </properties>
+        </profile>
+        <!--生产环境-->
+        <profile>
+            <id>prod</id>
+            <properties>
+                <profiles.active>prod</profiles.active>
+                <nacos.server>172.16.156.151:8848</nacos.server>
+                <nacos.namespace>slope-manage-service</nacos.namespace>
+            </properties>
+        </profile>
+    </profiles>
+    <build>
+        <pluginManagement>
+            <plugins>
+                <plugin>
+                    <groupId>org.apache.maven.plugins</groupId>
+                    <artifactId>maven-clean-plugin</artifactId>
+                    <version>${maven-clean-plugin.version}</version>
+                </plugin>
+                <plugin>
+                    <groupId>org.apache.maven.plugins</groupId>
+                    <artifactId>maven-compiler-plugin</artifactId>
+                    <version>${maven-compiler-plugin.version}</version>
+                </plugin>
+                <plugin>
+                    <groupId>org.apache.maven.plugins</groupId>
+                    <artifactId>maven-deploy-plugin</artifactId>
+                    <version>${maven-deploy-plugin.version}</version>
+                </plugin>
+                <plugin>
+                    <groupId>org.apache.maven.plugins</groupId>
+                    <artifactId>maven-install-plugin</artifactId>
+                    <version>${maven-install-plugin.version}</version>
+                </plugin>
+                <plugin>
+                    <groupId>org.apache.maven.plugins</groupId>
+                    <artifactId>maven-jar-plugin</artifactId>
+                    <version>${maven-jar-plugin.version}</version>
+                </plugin>
+                <plugin>
+                    <groupId>org.apache.maven.plugins</groupId>
+                    <artifactId>maven-resources-plugin</artifactId>
+                    <version>${maven-resources-plugin.version}</version>
+                    <configuration>
+                        <propertiesEncoding>${project.build.sourceEncoding}</propertiesEncoding>
+                        <delimiters>
+                            <delimiter>@</delimiter>
+                        </delimiters>
+                        <useDefaultDelimiters>false</useDefaultDelimiters>
+                    </configuration>
+                </plugin>
+                <plugin>
+                    <groupId>org.springframework.boot</groupId>
+                    <artifactId>spring-boot-maven-plugin</artifactId>
+                    <version>${spring-boot.version}</version>
+                </plugin>
+            </plugins>
+        </pluginManagement>
+        <plugins>
+            <plugin>
+                <groupId>org.apache.maven.plugins</groupId>
+                <artifactId>maven-clean-plugin</artifactId>
+            </plugin>
+            <plugin>
+                <groupId>org.apache.maven.plugins</groupId>
+                <artifactId>maven-deploy-plugin</artifactId>
+            </plugin>
+            <plugin>
+                <groupId>org.apache.maven.plugins</groupId>
+                <artifactId>maven-install-plugin</artifactId>
+            </plugin>
+            <plugin>
+                <groupId>org.apache.maven.plugins</groupId>
+                <artifactId>maven-compiler-plugin</artifactId>
+                <configuration>
+                    <source>17</source>
+                    <target>17</target>
+                    <encoding>UTF-8</encoding>
+                </configuration>
+            </plugin>
+        </plugins>
+        <resources>
+            <resource>
+                <directory>src/main/resources</directory>
+                <!-- 关闭过滤 -->
+                <filtering>false</filtering>
+                <includes>
+                    <include>**/*</include>
+                </includes>
+            </resource>
+            <resource>
+                <directory>src/main/resources</directory>
+                <!-- 启用过滤 即该资源中的变量将会被过滤器中的值替换 -->
+                <filtering>true</filtering>
+                <!--资源-->
+                <includes>
+                    <include>**/*.properties</include>
+                    <include>**/*.yml</include>
+                </includes>
+            </resource>
+        </resources>
+    </build>
+
+</project>

+ 34 - 0
slope-common/pom.xml

@@ -0,0 +1,34 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project xmlns="http://maven.apache.org/POM/4.0.0"
+         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+    <parent>
+        <artifactId>slope-manage-service</artifactId>
+        <groupId>com.sckw</groupId>
+        <version>1.0.0</version>
+    </parent>
+    <modelVersion>4.0.0</modelVersion>
+
+    <artifactId>slope-common</artifactId>
+    <packaging>pom</packaging>
+    <modules>
+        <module>slope-common-bom</module>
+        <module>slope-common-core</module>
+        <module>slope-common-xxljob</module>
+        <module>slope-common-stream</module>
+        <module>slope-common-remote</module>
+        <module>slope-common-sms</module>
+        <module>slope-common-tdengine</module>
+        <module>slope-common-redis</module>
+        <module>slope-common-excel</module>
+        <module>slope-common-datasource</module>
+        <module>slope-common-startup</module>
+        <module>slope-common-log</module>
+    </modules>
+
+    <properties>
+        <maven.compiler.source>17</maven.compiler.source>
+        <maven.compiler.target>17</maven.compiler.target>
+    </properties>
+
+</project>

+ 83 - 0
slope-common/slope-common-bom/pom.xml

@@ -0,0 +1,83 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project xmlns="http://maven.apache.org/POM/4.0.0"
+         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+    <modelVersion>4.0.0</modelVersion>
+
+    <parent>
+        <groupId>com.sckw</groupId>
+        <artifactId>slope-common</artifactId>
+        <version>1.0.0</version>
+    </parent>
+
+    <groupId>com.sckw</groupId>
+    <artifactId>slope-common-bom</artifactId>
+    <version>1.0.0</version>
+    <packaging>pom</packaging>
+    <description>common依赖项</description>
+
+
+    <properties>
+        <maven.compiler.source>17</maven.compiler.source>
+        <maven.compiler.target>17</maven.compiler.target>
+        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
+    </properties>
+    <dependencyManagement>
+        <dependencies>
+            <!-- 核心模块 -->
+            <dependency>
+                <groupId>com.sckw</groupId>
+                <artifactId>sckw-common-startup</artifactId>
+                <version>${project.version}</version>
+            </dependency>
+
+            <dependency>
+                <groupId>com.sckw</groupId>
+                <artifactId>sckw-common-core</artifactId>
+                <version>${project.version}</version>
+            </dependency>
+
+            <dependency>
+                <groupId>com.sckw</groupId>
+                <artifactId>sckw-common-mongo</artifactId>
+                <version>${project.version}</version>
+            </dependency>
+
+            <dependency>
+                <groupId>com.sckw</groupId>
+                <artifactId>sckw-common-xxljob</artifactId>
+                <version>${project.version}</version>
+            </dependency>
+
+            <dependency>
+                <groupId>com.sckw</groupId>
+                <artifactId>sckw-common-stream</artifactId>
+                <version>${project.version}</version>
+            </dependency>
+
+            <dependency>
+                <groupId>com.sckw</groupId>
+                <artifactId>sckw-common-remote</artifactId>
+                <version>${project.version}</version>
+            </dependency>
+
+            <dependency>
+                <groupId>com.sckw</groupId>
+                <artifactId>sckw-common-redis</artifactId>
+                <version>${project.version}</version>
+            </dependency>
+
+            <dependency>
+                <groupId>com.sckw</groupId>
+                <artifactId>sckw-common-excel</artifactId>
+                <version>${project.version}</version>
+            </dependency>
+
+            <dependency>
+                <groupId>com.sckw</groupId>
+                <artifactId>sckw-common-datasource</artifactId>
+                <version>${project.version}</version>
+            </dependency>
+        </dependencies>
+    </dependencyManagement>
+</project>

+ 186 - 0
slope-common/slope-common-core/pom.xml

@@ -0,0 +1,186 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project xmlns="http://maven.apache.org/POM/4.0.0"
+         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+    <parent>
+        <artifactId>slope-common</artifactId>
+        <groupId>com.sckw</groupId>
+        <version>1.0.0</version>
+    </parent>
+    <modelVersion>4.0.0</modelVersion>
+
+    <artifactId>slope-common-core</artifactId>
+<!--    <version>1.0.0</version>-->
+    <description>核心基础</description>
+
+    <properties>
+        <maven.compiler.source>17</maven.compiler.source>
+        <maven.compiler.target>17</maven.compiler.target>
+    </properties>
+
+    <dependencies>
+        <dependency>
+            <groupId>org.springframework.boot</groupId>
+            <artifactId>spring-boot-autoconfigure</artifactId>
+        </dependency>
+
+        <dependency>
+            <groupId>org.springframework.cloud</groupId>
+            <artifactId>spring-cloud-commons</artifactId>
+        </dependency>
+
+        <dependency>
+            <groupId>org.springframework.boot</groupId>
+            <artifactId>spring-boot-starter</artifactId>
+            <exclusions>
+                <exclusion>
+                    <groupId>org.springframework.boot</groupId>
+                    <artifactId>spring-boot-starter-logging</artifactId>
+                </exclusion>
+            </exclusions>
+        </dependency>
+
+        <dependency>
+            <groupId>commons-io</groupId>
+            <artifactId>commons-io</artifactId>
+        </dependency>
+
+
+        <!--log4j2日志-->
+        <!--全局日志排除-->
+        <dependency>
+            <groupId>org.springframework.boot</groupId>
+            <artifactId>spring-boot-starter-logging</artifactId>
+            <exclusions>
+                <exclusion>
+                    <groupId>*</groupId>
+                    <artifactId>*</artifactId>
+                </exclusion>
+            </exclusions>
+        </dependency>
+
+        <!--采用log4j2 日志输出方式-->
+        <dependency>
+            <groupId>org.springframework.boot</groupId>
+            <artifactId>spring-boot-starter-log4j2</artifactId>
+        </dependency>
+
+        <dependency>
+            <groupId>org.apache.commons</groupId>
+            <artifactId>commons-lang3</artifactId>
+        </dependency>
+
+        <dependency>
+            <groupId>com.fasterxml.jackson.core</groupId>
+            <artifactId>jackson-annotations</artifactId>
+        </dependency>
+
+        <dependency>
+            <groupId>com.fasterxml.jackson.core</groupId>
+            <artifactId>jackson-databind</artifactId>
+        </dependency>
+
+        <dependency>
+            <groupId>com.github.pagehelper</groupId>
+            <artifactId>pagehelper</artifactId>
+        </dependency>
+
+        <dependency>
+            <groupId>com.github.pagehelper</groupId>
+            <artifactId>pagehelper-spring-boot-autoconfigure</artifactId>
+        </dependency>
+
+        <dependency>
+            <groupId>com.github.pagehelper</groupId>
+            <artifactId>pagehelper-spring-boot-starter</artifactId>
+        </dependency>
+
+        <dependency>
+            <groupId>cn.hutool</groupId>
+            <artifactId>hutool-http</artifactId>
+        </dependency>
+
+        <dependency>
+            <groupId>cn.hutool</groupId>
+            <artifactId>hutool-extra</artifactId>
+        </dependency>
+
+        <dependency>
+            <groupId>commons-codec</groupId>
+            <artifactId>commons-codec</artifactId>
+        </dependency>
+
+        <dependency>
+            <groupId>org.apache.tomcat.embed</groupId>
+            <artifactId>tomcat-embed-core</artifactId>
+        </dependency>
+
+        <!-- validation -->
+        <dependency>
+            <groupId>org.springframework.boot</groupId>
+            <artifactId>spring-boot-starter-validation</artifactId>
+        </dependency>
+
+        <dependency>
+            <groupId>jakarta.validation</groupId>
+            <artifactId>jakarta.validation-api</artifactId>
+        </dependency>
+
+        <dependency>
+            <groupId>org.projectlombok</groupId>
+            <artifactId>lombok</artifactId>
+        </dependency>
+
+        <dependency>
+            <groupId>com.alibaba</groupId>
+            <artifactId>fastjson</artifactId>
+        </dependency>
+
+        <dependency>
+            <groupId>org.springframework.boot</groupId>
+            <artifactId>spring-boot-starter-aop</artifactId>
+        </dependency>
+
+        <dependency>
+            <groupId>org.bouncycastle</groupId>
+            <artifactId>bcprov-jdk18on</artifactId>
+        </dependency>
+
+        <dependency>
+            <groupId>org.springframework</groupId>
+            <artifactId>spring-webmvc</artifactId>
+        </dependency>
+
+        <dependency>
+            <groupId>com.sckw</groupId>
+            <artifactId>sckw-common-redis</artifactId>
+        </dependency>
+
+        <!--mybatis-plus 依赖-->
+        <dependency>
+            <groupId>com.baomidou</groupId>
+            <artifactId>mybatis-plus-annotation</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>com.baomidou</groupId>
+            <artifactId>mybatis-plus-extension</artifactId>
+        </dependency>
+
+        <dependency>
+            <groupId>com.squareup.okhttp3</groupId>
+            <artifactId>okhttp</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.httpcomponents.client5</groupId>
+            <artifactId>httpclient5</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.httpcomponents</groupId>
+            <artifactId>httpcore</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.httpcomponents</groupId>
+            <artifactId>httpclient</artifactId>
+        </dependency>
+    </dependencies>
+</project>

+ 23 - 0
slope-common/slope-common-core/src/main/java/com/sckw/core/annotation/ApiVersion.java

@@ -0,0 +1,23 @@
+package com.sckw.core.annotation;
+
+import com.sckw.core.model.constant.Global;
+import org.springframework.web.bind.annotation.Mapping;
+import java.lang.annotation.*;
+
+/**
+ * @desc 控制接口版本
+ * @author zk
+ * @date 2023/7/3 0003
+ */
+@Target({ElementType.METHOD, ElementType.TYPE})
+@Retention(RetentionPolicy.RUNTIME)
+@Documented
+@Mapping
+public @interface ApiVersion {
+    /**
+     * 标识版本号
+     * @return
+     */
+    String value() default Global.API_VERSION;
+
+}

+ 20 - 0
slope-common/slope-common-core/src/main/java/com/sckw/core/annotation/Log.java

@@ -0,0 +1,20 @@
+package com.sckw.core.annotation;
+
+import java.lang.annotation.*;
+
+/**
+ * @desc: 自定义日志注解
+ * @author: yzc
+ * @date: 2023-08-02 9:20
+ */
+@Target(ElementType.METHOD)
+@Retention(RetentionPolicy.RUNTIME)
+@Documented
+public @interface Log {
+
+    /**
+     * 日志描述
+     * @return
+     */
+    String description() default "";
+}

+ 26 - 0
slope-common/slope-common-core/src/main/java/com/sckw/core/annotation/RepeatSubmit.java

@@ -0,0 +1,26 @@
+package com.sckw.core.annotation;
+
+import java.lang.annotation.*;
+
+/**
+ * @author czh
+ * @desc 重复请求校验
+ * @date 2023/9/1
+ */
+@Inherited
+@Target(ElementType.METHOD)
+@Retention(RetentionPolicy.RUNTIME)
+@Documented
+public @interface RepeatSubmit {
+
+    /**
+     * 间隔时间(ms),小于此时间视为重复提交
+     */
+    long interval() default 5000;
+
+    /**
+     * 提示消息
+     */
+    String message() default "请求频率限制,请稍候再试";
+
+}

+ 18 - 0
slope-common/slope-common-core/src/main/java/com/sckw/core/annotation/SckwCloudApplication.java

@@ -0,0 +1,18 @@
+package com.sckw.core.annotation;
+
+import org.springframework.boot.autoconfigure.SpringBootApplication;
+import org.springframework.boot.autoconfigure.jdbc.DataSourceAutoConfiguration;
+import org.springframework.cloud.client.discovery.EnableDiscoveryClient;
+
+import java.lang.annotation.*;
+
+@Target({ElementType.TYPE})
+@Retention(RetentionPolicy.RUNTIME)
+@Documented
+@Inherited
+//@EnableDubbo
+//@EnableFeignClients({"com.sckw.*.api.feign"})
+@EnableDiscoveryClient
+@SpringBootApplication(exclude = {DataSourceAutoConfiguration.class})
+public @interface SckwCloudApplication {
+}

+ 23 - 0
slope-common/slope-common-core/src/main/java/com/sckw/core/annotation/Sensitive.java

@@ -0,0 +1,23 @@
+package com.sckw.core.annotation;
+
+import com.fasterxml.jackson.annotation.JacksonAnnotationsInside;
+import com.fasterxml.jackson.databind.annotation.JsonSerialize;
+import com.sckw.core.model.enums.SensitiveStrategy;
+import com.sckw.core.utils.SensitiveJsonSerializer;
+
+import java.lang.annotation.ElementType;
+import java.lang.annotation.Retention;
+import java.lang.annotation.RetentionPolicy;
+import java.lang.annotation.Target;
+
+/**
+ * 数据脱敏注解
+ * @author zk
+ */
+@Retention(RetentionPolicy.RUNTIME)
+@Target(ElementType.FIELD)
+@JacksonAnnotationsInside
+@JsonSerialize(using = SensitiveJsonSerializer.class)
+public @interface Sensitive {
+    SensitiveStrategy strategy();
+}

+ 136 - 0
slope-common/slope-common-core/src/main/java/com/sckw/core/aspect/DaoAspect.java

@@ -0,0 +1,136 @@
+package com.sckw.core.aspect;
+
+import com.sckw.core.model.constant.Global;
+import com.sckw.core.utils.BeanUtils;
+import com.sckw.core.utils.CollectionUtils;
+import com.sckw.core.utils.IdWorker;
+import com.sckw.core.web.context.LoginUserHolder;
+import org.aspectj.lang.ProceedingJoinPoint;
+import org.aspectj.lang.annotation.Around;
+import org.aspectj.lang.annotation.Aspect;
+import org.aspectj.lang.annotation.Pointcut;
+import org.springframework.context.annotation.Configuration;
+import org.springframework.stereotype.Component;
+
+import java.util.Date;
+import java.util.List;
+import java.util.Objects;
+
+/**
+ * DAO切面,插入创建人,创建时间,修改人,修改时间
+ *
+ * @author zk
+ * @date Oct 29, 2018
+ */
+@Aspect
+@Component
+@Configuration
+public class DaoAspect {
+    private static final String ID = "id";
+    private static final String STATUS = "status";
+    private static final String CREATE_BY = "createBy";
+    private static final String CREATE_BY_NAME = "createByName";
+    private static final String CREATE_TIME = "createTime";
+    private static final String UPDATE_BY = "updateBy";
+    private static final String UPDATE_BY_NAME = "updateByName";
+    private static final String UPDATE_TIME = "updateTime";
+    private static final String DEL_FLAG = "delFlag";
+
+    @Pointcut("execution(* com.sckw.*.dao.*.update*(..))")
+    public void daoUpdate() {
+    }
+
+    @Pointcut("execution(* com.sckw.*.dao.*.insert*(..))")
+    public void daoCreate() {
+    }
+
+    @Around("daoUpdate()")
+    public Object doAroundUpdate(ProceedingJoinPoint point) throws Throwable {
+        /*ServletRequestAttributes attributes = (ServletRequestAttributes) RequestContextHolder.getRequestAttributes();
+        if (attributes == null) {
+            return point.proceed();
+        }
+        HttpServletRequest request = attributes.getRequest();*/
+        Object[] objects = point.getArgs();
+        if (objects != null) {
+            for (Object arg : objects) {
+                List<Object> objs = CollectionUtils.objectCastList(arg, Object.class);
+                if (CollectionUtils.isEmpty(objs)) {
+                    objs.add(arg);
+                }
+                Long userId = LoginUserHolder.getUserId();
+                objs.forEach(obj -> {
+                    if (isProperty(obj, UPDATE_BY) && !userId.equals(1L)) {
+                        BeanUtils.setProperty(obj, UPDATE_BY, userId);
+                    }
+                    if (isProperty(obj, UPDATE_TIME)) {
+                        BeanUtils.setProperty(obj, UPDATE_TIME, new Date());
+                    }
+                });
+            }
+        }
+        return point.proceed();
+    }
+
+    @Around("daoCreate()")
+    public Object doAroundCreate(ProceedingJoinPoint point) throws Throwable {
+        /*ServletRequestAttributes attributes = (ServletRequestAttributes) RequestContextHolder.getRequestAttributes();
+        if (attributes == null) {
+            return point.proceed();
+        }
+        HttpServletRequest request = attributes.getRequest();*/
+        Object[] objects = point.getArgs();
+        if (objects != null) {
+            for (Object arg : objects) {
+                List<Object> objs = CollectionUtils.objectCastList(arg, Object.class);
+                if (CollectionUtils.isEmpty(objs)) {
+                    objs.add(arg);
+                }
+                Date date = new Date();
+                objs.forEach(obj -> {
+                    Long userId = LoginUserHolder.getUserId();
+                    if (isProperty(obj, CREATE_BY) && Objects.isNull(BeanUtils.getProperty(obj, CREATE_BY))) {
+                        BeanUtils.setProperty(obj, CREATE_BY, userId);
+                    }
+                    if (isProperty(obj, UPDATE_BY) && Objects.isNull(BeanUtils.getProperty(obj, UPDATE_BY))) {
+                        BeanUtils.setProperty(obj, UPDATE_BY, userId);
+                    }
+
+//                if (userName != null){
+//                    if (isProperty(arg, CREATE_BY_NAME) && StringUtils.isBlank(BeanUtils.getProperty(arg, CREATE_BY_NAME))) {
+//                        BeanUtils.setProperty(arg, CREATE_BY_NAME, userName);
+//                    }
+//                    if (isProperty(arg, UPDATE_BY_NAME) && StringUtils.isBlank(BeanUtils.getProperty(arg, UPDATE_BY_NAME))) {
+//                        BeanUtils.setProperty(arg, UPDATE_BY_NAME, userName);
+//                    }
+//                }
+
+                    if (isProperty(obj, CREATE_TIME) && Objects.isNull(BeanUtils.getProperty(obj, CREATE_TIME))) {
+                        BeanUtils.setProperty(obj, CREATE_TIME, date);
+                    }
+
+                    if (isProperty(obj, UPDATE_TIME) && Objects.isNull(BeanUtils.getProperty(obj, UPDATE_TIME))) {
+                        BeanUtils.setProperty(obj, UPDATE_TIME, date);
+                    }
+
+                    if (isProperty(obj, ID) && Objects.isNull(BeanUtils.getProperty(obj, ID))) {
+                        BeanUtils.setProperty(obj, ID, new IdWorker(1).nextId());
+                    }
+
+                    if (isProperty(obj, STATUS) && Objects.isNull(BeanUtils.getProperty(obj, STATUS))) {
+                        BeanUtils.setProperty(obj, STATUS, Global.NO);
+                    }
+
+                    if (isProperty(obj, DEL_FLAG) && Objects.isNull((BeanUtils.getProperty(obj, DEL_FLAG)))) {
+                        BeanUtils.setProperty(obj, DEL_FLAG, Global.NO);
+                    }
+                });
+            }
+        }
+        return point.proceed();
+    }
+
+    public static boolean isProperty(Object bean, String field) {
+        return BeanUtils.isProperty(bean, field);
+    }
+}

+ 80 - 0
slope-common/slope-common-core/src/main/java/com/sckw/core/aspect/LogAspect.java

@@ -0,0 +1,80 @@
+package com.sckw.core.aspect;
+
+import com.alibaba.fastjson.JSON;
+import com.sckw.core.annotation.Log;
+import jakarta.servlet.http.HttpServletRequest;
+import jakarta.servlet.http.HttpServletResponse;
+import lombok.extern.slf4j.Slf4j;
+import org.apache.commons.lang3.ArrayUtils;
+import org.apache.commons.lang3.time.DateFormatUtils;
+import org.aspectj.lang.ProceedingJoinPoint;
+import org.aspectj.lang.annotation.Around;
+import org.aspectj.lang.annotation.Aspect;
+import org.aspectj.lang.annotation.Pointcut;
+import org.springframework.stereotype.Component;
+import org.springframework.web.multipart.MultipartFile;
+
+import java.util.Arrays;
+import java.util.Date;
+import java.util.List;
+import java.util.stream.Collectors;
+import java.util.stream.Stream;
+
+/**
+ * @desc: controller请求切面增强
+ * @author: yzc
+ * @date: 2023-08-02 9:21
+ */
+@Aspect
+@Component
+@Slf4j
+public class LogAspect {
+    private static final String TIME_PATTERN = "yyyy-MM-dd HH:mm:ss:SSS";
+
+    @Pointcut("@annotation(l)")
+    public void loggerPointcut(Log l) {
+    }
+
+    @Around(value = "loggerPointcut(l)", argNames = "p,l")
+    public Object around(ProceedingJoinPoint p, Log l) throws Throwable {
+        Object result = null;
+        //开始时间
+        Date startTime = new Date();
+        String targetName = p.getTarget().getClass().getName();
+        String methodName = p.getSignature().getName();
+        Object[] args = p.getArgs();
+        Stream<?> stream = ArrayUtils.isEmpty(args) ? Stream.empty() : Arrays.stream(args);
+        List<Object> logArgs = stream
+                .filter(arg -> (!(arg instanceof HttpServletRequest) && !(arg instanceof HttpServletResponse)) && !(arg instanceof MultipartFile))
+                .collect(Collectors.toList());
+        //过滤后序列化无异常
+        String param = JSON.toJSONString(logArgs);
+        String exception = "";
+        try {
+            //执行结果,返回参数
+            result = p.proceed();
+        } catch (Throwable e) {
+            exception = e.getMessage();
+            //异常抛出
+            throw e;
+        } finally {
+            Date endTime = new Date();
+            long time = endTime.getTime() - startTime.getTime();
+            Boolean slowRequest = (time > 1500L);
+            log.info("{}:{}.{}," +
+                            "param={}," +
+                            "result={}," +
+                            "exception={}," +
+                            "[{}->{}],slowRequest{}=[{}]", l.description(), targetName, methodName,
+                    param,
+                    JSON.toJSONString(result),
+                    exception,
+                    DateFormatUtils.format(startTime, TIME_PATTERN),
+                    DateFormatUtils.format(endTime, TIME_PATTERN),
+                    slowRequest,
+                    time);
+        }
+        return result;
+    }
+
+}

+ 59 - 0
slope-common/slope-common-core/src/main/java/com/sckw/core/aspect/NoRepeatSubmitAspect.java

@@ -0,0 +1,59 @@
+package com.sckw.core.aspect;
+
+import com.sckw.core.annotation.RepeatSubmit;
+import com.sckw.core.exception.SystemException;
+import com.sckw.core.model.constant.Global;
+import com.sckw.core.utils.StringUtils;
+import com.sckw.core.web.context.LoginUserHolder;
+import com.sckw.redis.utils.RedissonUtils;
+import jakarta.servlet.http.HttpServletRequest;
+import lombok.extern.slf4j.Slf4j;
+import org.aspectj.lang.ProceedingJoinPoint;
+import org.aspectj.lang.annotation.Around;
+import org.aspectj.lang.annotation.Aspect;
+import org.aspectj.lang.reflect.MethodSignature;
+import org.springframework.web.context.request.RequestAttributes;
+import org.springframework.web.context.request.RequestContextHolder;
+import org.springframework.web.context.request.ServletRequestAttributes;
+
+import java.lang.reflect.Method;
+import java.util.Objects;
+import java.util.concurrent.TimeUnit;
+
+/**
+ * @author czh
+ * @desc 防重复提交
+ * @date 2023/9/1
+ */
+@Aspect
+@Slf4j
+public class NoRepeatSubmitAspect {
+
+    @Around("@annotation(com.sckw.core.annotation.RepeatSubmit)")
+    public Object doAround(ProceedingJoinPoint pjp) throws Throwable {
+        RequestAttributes requestAttributes = RequestContextHolder.getRequestAttributes();
+        ServletRequestAttributes servletRequestAttributes = (ServletRequestAttributes) requestAttributes;
+        HttpServletRequest request = servletRequestAttributes.getRequest();
+        String url = request.getRequestURI();
+        Long userId = LoginUserHolder.getUserId();
+        if (Objects.isNull(userId)) {
+            return pjp.proceed();
+        }
+
+        String key = Global.getRepeatSubmitKey(userId, url);
+        String res = RedissonUtils.getString(key);
+        MethodSignature signature = (MethodSignature) pjp.getSignature();
+        Method method = signature.getMethod();
+        RepeatSubmit annotation = method.getAnnotation(RepeatSubmit.class);
+        long interval = annotation.interval();
+        if (StringUtils.isNotBlank(res)) {
+            if (System.currentTimeMillis() - Long.parseLong(res) < interval) {
+                throw new SystemException(annotation.message());
+            }
+            return pjp.proceed();
+        }
+
+        RedissonUtils.putString(key, String.valueOf(System.currentTimeMillis()), interval, TimeUnit.MILLISECONDS);
+        return pjp.proceed();
+    }
+}

+ 72 - 0
slope-common/slope-common-core/src/main/java/com/sckw/core/common/enums/NumberConstant.java

@@ -0,0 +1,72 @@
+package com.sckw.core.common.enums;
+
+import java.math.BigDecimal;
+
+/**
+ * @description:    定义常量
+ * @author: LengFaQiang
+ * @copyright
+ * @create: 2022-01-27 16:02
+ **/
+public final class NumberConstant {
+    public static final int ZERO = 0;
+    public static final int ONE = 1;
+    public static final int TWO = 2;
+    public static final int THREE = 3;
+    public static final int FOUR = 4;
+    public static final int FIVE = 5;
+    public static final int SIX = 6;
+    public static final int SEVEN = 7;
+    public static final int EIGHT = 8;
+    public static final int NINE = 9;
+    public static final int TEN = 10;
+    public static final int ELEVEN = 11;
+    public static final int TWELVE = 12;
+    public static final int THREETEEN = 13;
+    public static final int FOURTEEN = 14;
+    public static final int ONE_FIVE = 15;
+    public static final int SIXTEEN = 16;
+    public static final int EIGHTTEEN = 18;
+    public static final int NINETEEN = 19;
+    public static final int TWETY = 20;
+    public static final int TWETYTHREE = 23;
+    public static final int TWENTY_FOUR = 24;
+    public static final int TWENTY_SIX = 26;
+    public static final int THIRTY = 30;
+    public static final int THIRTY_TREE = 32;
+    public static final int FOURTY = 40;
+    public static final int FIFTY = 50;
+    public static final int EIGTY = 80;
+    public static final int ONE_ZERO_ZERO = 100;
+    public static final int ONE_ONE_ZERO = 110;
+    public static final int ONE_ZERO_ONE = 101;
+    public static final int ONE_ONE_ONE = 111;
+    public static final int ONE_TWO_ONE = 121;
+    public static final int ONE_TWO_EIGHT = 128;
+    public static final int ONE_THREE_THREE = 133;
+    public static final int TWO_HUNDRED = 200;
+    public static final int TWO_FIVE_FIVE = 255;
+    public static final int TWO_FIVE_SIX = 256;
+    public static final int FOUR_HUNDRED = 400;
+    public static final int FOUR_ZERO_ONE = 401;
+    public static final int THREE_HUNDRED = 300;
+    public static final int THREE_FIVE_ZERO = 350;
+    public static final int FIVE_HUNDRED = 500;
+    public static final int EIGHT_HUNDRED = 800;
+    public static final int SIX_THREE_SEVEN_NINE = 6379;
+    public static final int ONE_ZERO_TWO_FOUR = 1024;
+    public static final int ONE_THOUSAND = 1000;
+    public static final int THREE_SIX_ZERO_ZERO = 3600;
+    public static final int FIFTY_MILLION = 52428800;
+    public static final double NINETY = 90.0D;
+    public static final double NEGATICE_NINETY = -90.0D;
+    public static final double ONE_HUNDRED_EIGHTY = 180.0D;
+    public static final double NEGATICE_ONE_HUNDRED_EIGHTY = -180.0D;
+    public static final int COOKIE_TIMEN = 300;
+
+    public static final BigDecimal ONE_HUNDRED = new BigDecimal("100.00");
+    public static final BigDecimal TEN_THOUSAND = new BigDecimal("10000.00");
+
+    public NumberConstant() {
+    }
+}

+ 51 - 0
slope-common/slope-common-core/src/main/java/com/sckw/core/common/enums/StringConstant.java

@@ -0,0 +1,51 @@
+package com.sckw.core.common.enums;
+
+import java.time.format.DateTimeFormatter;
+
+/**
+ * @description: 定义字符串常量
+ * @author: LengFaQiang
+ * @copyright
+ * @create: 2022-01-27 16:02
+ **/
+public final class StringConstant {
+    public static final String LEFT_SEPARATOR = "/";
+    public static final String LEFT_SEPARATORS = "//";
+    public static final String RIGHT_SEPARATOR = "\\";
+    public static final String COLON = ":";
+    public static final String SEMICOLON = ";";
+    public static final String POINT = ".";
+
+    public static final String COMMA = ",";
+
+    /**
+     * 中横线
+     */
+    public static final String HYPHEN = "-";
+
+    /**
+     * 下划线
+     */
+    public static final String UNDERLINE = "_";
+    public static final String HTTP_STRING = "http";
+    public static final String HTTPS_STRING = "https";
+    public static final String B = "B";
+    public static final String KB = "KB";
+
+    public static final String MB = "MB";
+    public static final String G = "G";
+    public static final String GB = "GB";
+    public static final String DEFAULT_DATE_PATTERN = "yyyy-MM-dd HH:mm:ss";
+    public static final String DEF_DATE_FORMAT = "yyyy-MM-dd";
+    public static final DateTimeFormatter YYYY_MM_DD_HH_MM_SS = DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss");
+    public static final DateTimeFormatter YYYY_MM_DD = DateTimeFormatter.ofPattern("yyyy-MM-dd");
+    public static final DateTimeFormatter HH_MM_SS = DateTimeFormatter.ofPattern("HH:mm:ss");
+    public static final String DATE_YYYYMMDD = "yyyyMMdd";
+    public static final String ENCODING_UTF_EIGHT = "UTF-8";
+    public static final String ENCODING_UTF_SIXTEEN = "UTF-16";
+    public static final String ENCODING_GBK = "GBK";
+    public static final String ENCODING_ISO = "ISO8859-1";
+
+    public StringConstant() {
+    }
+}

+ 25 - 0
slope-common/slope-common-core/src/main/java/com/sckw/core/config/JacksonConfig.java

@@ -0,0 +1,25 @@
+package com.sckw.core.config;
+
+import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
+import org.springframework.boot.autoconfigure.jackson.Jackson2ObjectMapperBuilderCustomizer;
+import org.springframework.context.annotation.Bean;
+import org.springframework.context.annotation.Configuration;
+
+import java.math.BigInteger;
+
+/**
+ * @desc: Jackson全局转化long类型为String,解决jackson序列化时传入前端Long类型缺失精度问题(js解析只能解析到16位)
+ * @author: yzc
+ * @date: 2023-07-17 11:19
+ */
+@Configuration
+public class JacksonConfig {
+    @Bean
+    public Jackson2ObjectMapperBuilderCustomizer jackson2ObjectMapperBuilderCustomizer() {
+        return jacksonObjectMapperBuilder -> {
+            jacksonObjectMapperBuilder.serializerByType(BigInteger.class, ToStringSerializer.instance);
+            jacksonObjectMapperBuilder.serializerByType(Long.class, ToStringSerializer.instance);
+            jacksonObjectMapperBuilder.serializerByType(Long.TYPE, ToStringSerializer.instance);
+        };
+    }
+}

+ 36 - 0
slope-common/slope-common-core/src/main/java/com/sckw/core/config/MybatisPlusConfig.java

@@ -0,0 +1,36 @@
+package com.sckw.core.config;
+
+import com.baomidou.mybatisplus.annotation.DbType;
+import com.baomidou.mybatisplus.extension.plugins.MybatisPlusInterceptor;
+import com.baomidou.mybatisplus.extension.plugins.inner.PaginationInnerInterceptor;
+import org.springframework.context.annotation.Bean;
+import org.springframework.context.annotation.Configuration;
+
+import java.util.Collections;
+
+/**
+ * @desc: MybatisPlus配置
+ * @author: yzc
+ * @date: 2023-07-07 8:46
+ */
+@Configuration
+public class MybatisPlusConfig {
+    @Bean
+    public PaginationInnerInterceptor paginationInnerInterceptor() {
+        PaginationInnerInterceptor paginationInterceptor = new PaginationInnerInterceptor();
+        // 设置最大单页限制数量,默认 500 条,-1 不受限制
+        paginationInterceptor.setMaxLimit(-1L);
+        paginationInterceptor.setDbType(DbType.MYSQL);
+        // 开启 count 的 join 优化,只针对部分 left join
+        paginationInterceptor.setOptimizeJoin(true);
+        return paginationInterceptor;
+    }
+
+    @Bean
+    public MybatisPlusInterceptor mybatisPlusInterceptor() {
+        MybatisPlusInterceptor mybatisPlusInterceptor = new MybatisPlusInterceptor();
+        mybatisPlusInterceptor.setInterceptors(Collections.singletonList(paginationInnerInterceptor()));
+        return mybatisPlusInterceptor;
+    }
+}
+

+ 33 - 0
slope-common/slope-common-core/src/main/java/com/sckw/core/exception/BusinessException.java

@@ -0,0 +1,33 @@
+package com.sckw.core.exception;
+
+import lombok.Getter;
+
+import java.io.Serial;
+
+/**
+ * @Author yzc
+ * @Description 自定义业务异常
+ * @createTime 2023年06月08日 10:05:00
+ */
+@Getter
+public class BusinessException extends RuntimeException {
+    @Serial
+    private static final long serialVersionUID = 4515565480123536390L;
+    /**
+     * 异常信息
+     **/
+    private final String msg;
+    private Object[] param;
+
+    public BusinessException(String msg) {
+        super(msg);
+        this.msg = msg;
+    }
+
+    public BusinessException(String msg, Object... param) {
+        super(msg);
+        this.msg = msg;
+        this.param = param;
+    }
+
+}

+ 37 - 0
slope-common/slope-common-core/src/main/java/com/sckw/core/exception/CustomPromptException.java

@@ -0,0 +1,37 @@
+package com.sckw.core.exception;
+
+import lombok.Getter;
+
+import java.io.Serial;
+
+/**
+ * @Author yzc
+ * @Description 前端自定义提示异常
+ * @createTime 2023年06月08日 10:05:00
+ */
+@Getter
+public class CustomPromptException extends RuntimeException {
+
+    @Serial
+    private static final long serialVersionUID = -295458079254252674L;
+    /**
+     * 异常信息
+     **/
+    private final String msg;
+    private final Integer code;
+    private Object[] param;
+
+    public CustomPromptException(Integer code,String msg) {
+        super(msg);
+        this.code = code;
+        this.msg = msg;
+    }
+
+    public CustomPromptException(Integer code,String msg, Object... param) {
+        super(msg);
+        this.code = code;
+        this.msg = msg;
+        this.param = param;
+    }
+
+}

+ 133 - 0
slope-common/slope-common-core/src/main/java/com/sckw/core/exception/GlobalSystemExceptionHandler.java

@@ -0,0 +1,133 @@
+package com.sckw.core.exception;
+
+import com.sckw.core.web.constant.HttpStatus;
+import com.sckw.core.web.response.HttpResult;
+import jakarta.validation.ConstraintViolation;
+import jakarta.validation.ConstraintViolationException;
+import lombok.extern.slf4j.Slf4j;
+import org.springframework.context.annotation.Configuration;
+import org.springframework.util.CollectionUtils;
+import org.springframework.validation.FieldError;
+import org.springframework.web.bind.MethodArgumentNotValidException;
+import org.springframework.web.bind.MissingServletRequestParameterException;
+import org.springframework.web.bind.annotation.ExceptionHandler;
+import org.springframework.web.bind.annotation.ResponseBody;
+import org.springframework.web.bind.annotation.RestControllerAdvice;
+
+import java.util.List;
+import java.util.Set;
+
+@Slf4j
+@RestControllerAdvice
+@Configuration
+public class GlobalSystemExceptionHandler {
+
+    @ExceptionHandler(value = SystemException.class)
+    @ResponseBody
+    public HttpResult handlerSystemException(SystemException e) {
+        log.error("业务异常:", e);
+        return HttpResult.error(e.getCode(), e.getMessage());
+    }
+
+    @ExceptionHandler(value = RuntimeException.class)
+    @ResponseBody
+    public HttpResult handlerRuntimeException(RuntimeException e) {
+        log.error("业务异常:", e);
+        return HttpResult.error(HttpStatus.GLOBAL_EXCEPTION_CODE, e.getMessage());
+    }
+
+    /**
+     * BusinessException处理
+     *
+     * @param ex
+     * @return
+     */
+    @ResponseBody
+    @ExceptionHandler(BusinessException.class)
+    public HttpResult businessExceptionHandler(BusinessException ex) {
+        log.error("业务异常,message={},param={}", ex.getMsg(), ex.getParam());
+        return HttpResult.error(HttpStatus.GLOBAL_EXCEPTION_CODE, ex.getMessage());
+    }
+
+    /**
+     * 前端自定义提示异常
+     *
+     * @param ex
+     * @return
+     */
+    @ResponseBody
+    @ExceptionHandler(CustomPromptException.class)
+    public HttpResult customPromptExceptionHandler(CustomPromptException ex) {
+        log.error("前端自定义提示异常,code={},message={},param={}", ex.getCode(), ex.getMsg(), ex.getParam());
+        return HttpResult.error(ex.getCode(), ex.getMessage());
+    }
+
+
+
+    @ResponseBody
+    @ExceptionHandler(MissingServletRequestParameterException.class)
+    public HttpResult noArgs(MissingServletRequestParameterException ex) {
+        String format = "参数:[%s]不能为空";
+        return HttpResult.error(HttpStatus.PARAMETERS_PATTERN_ERROR_CODE, String.format(format, ex.getParameterName()));
+    }
+
+    /**
+     * 注解校验异常处理
+     *
+     * @param ex
+     * @return
+     */
+    @ResponseBody
+    @ExceptionHandler(MethodArgumentNotValidException.class)
+    public HttpResult methodArgumentNotValidExceptionHandler(MethodArgumentNotValidException ex) {
+        List<FieldError> fieldErrors = ex.getBindingResult().getFieldErrors();
+        StringBuilder sb = new StringBuilder();
+        if (!CollectionUtils.isEmpty(fieldErrors)) {
+            boolean first = true;
+            for (FieldError fieldError : fieldErrors) {
+                if (!first) {
+                    sb.append(",");
+                }
+                sb.append(fieldError.getDefaultMessage());
+                first = false;
+            }
+        }
+        String errMsg = sb.toString();
+        log.error("参数校验异常:{}", errMsg);
+        return HttpResult.error(HttpStatus.PARAMETERS_PATTERN_ERROR_CODE, errMsg);
+    }
+
+    @ResponseBody
+    @ExceptionHandler(ConstraintViolationException.class)
+    public HttpResult constraintViolationExceptionHandler(ConstraintViolationException ex) {
+        log.error("参数校验异常c:{}", ex.getMessage());
+        Set<ConstraintViolation<?>> constraintViolations = ex.getConstraintViolations();
+        StringBuilder sb = new StringBuilder();
+        if (!CollectionUtils.isEmpty(constraintViolations)) {
+            boolean first = true;
+            for (ConstraintViolation<?> constraintViolation : constraintViolations) {
+                if (!first) {
+                    sb.append(",");
+                }
+                sb.append(constraintViolation.getMessage());
+                first = false;
+            }
+        }
+        return HttpResult.error(HttpStatus.PARAMETERS_PATTERN_ERROR_CODE, sb.toString());
+    }
+
+    /**
+     * exception处理
+     *
+     * @param ex
+     * @returnh
+     */
+    @ResponseBody
+    @ExceptionHandler(Exception.class)
+    public HttpResult defaultExceptionHandler(Exception ex) {
+        log.error("系统异常", ex);
+        return HttpResult.error(HttpStatus.GLOBAL_EXCEPTION_CODE, ex.toString());
+    }
+
+}
+

+ 21 - 0
slope-common/slope-common-core/src/main/java/com/sckw/core/exception/SourceInitializeException.java

@@ -0,0 +1,21 @@
+package com.sckw.core.exception;
+
+import lombok.Getter;
+
+/**
+ *
+ * 数据源初始化失败异常
+ *
+ *
+ * @author lfdc
+ * @version v1
+ * @create 2020-11-28 17:13:33
+ * @copyright
+ */
+@Getter
+public class SourceInitializeException extends Exception {
+
+    public SourceInitializeException(String msg) {
+        super(msg);
+    }
+}

+ 25 - 0
slope-common/slope-common-core/src/main/java/com/sckw/core/exception/SystemException.java

@@ -0,0 +1,25 @@
+package com.sckw.core.exception;
+
+import com.sckw.core.web.constant.HttpStatus;
+import lombok.Data;
+
+@Data
+public class SystemException extends RuntimeException {
+
+    private final int code;
+
+    private final String message;
+
+    public SystemException(String message) {
+        super();
+        this.code = HttpStatus.GLOBAL_EXCEPTION_CODE;
+        this.message = message;
+    }
+
+    public SystemException(int code, String message) {
+        super();
+        this.code = code;
+        this.message = message;
+    }
+
+}

+ 25 - 0
slope-common/slope-common-core/src/main/java/com/sckw/core/exception/TranslateException.java

@@ -0,0 +1,25 @@
+package com.sckw.core.exception;
+
+import lombok.Getter;
+
+/**
+ *
+ * 翻译失败时的异常
+ *
+ *
+ * @author lfdc
+ * @version v1
+ * @create 2020-12-01 11:53:03
+ * @copyright
+ */
+@Getter
+public class TranslateException extends RuntimeException {
+
+    public TranslateException(String msg) {
+        super(msg);
+    }
+
+    public TranslateException(String msg, Throwable e) {
+        super(msg, e);
+    }
+}

+ 38 - 0
slope-common/slope-common-core/src/main/java/com/sckw/core/filter/ExceptionFilterConfig.java

@@ -0,0 +1,38 @@
+package com.sckw.core.filter;
+
+import com.sckw.core.exception.SystemException;
+import jakarta.servlet.*;
+import jakarta.servlet.http.HttpServletRequest;
+import jakarta.servlet.http.HttpServletResponse;
+import lombok.extern.slf4j.Slf4j;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.beans.factory.annotation.Qualifier;
+import org.springframework.stereotype.Component;
+import org.springframework.web.filter.OncePerRequestFilter;
+import org.springframework.web.servlet.HandlerExceptionResolver;
+
+import java.io.IOException;
+
+/**
+ * @author czh
+ * @desc 过滤器的异常抛出
+ * @date 2023/6/14
+ */
+@Component
+@Slf4j
+public class ExceptionFilterConfig extends OncePerRequestFilter {
+
+    @Autowired
+    @Qualifier("handlerExceptionResolver")
+    private HandlerExceptionResolver resolver;
+
+    @Override
+    protected void doFilterInternal(HttpServletRequest request, HttpServletResponse response, FilterChain filterChain) throws ServletException, IOException {
+        try {
+            filterChain.doFilter(request, response);
+        } catch (SystemException e) {
+            // 会交到 Springmvc的全局异常处理器那里
+            resolver.resolveException(request, response, null, e);
+        }
+    }
+}

+ 66 - 0
slope-common/slope-common-core/src/main/java/com/sckw/core/model/base/BaseModel.java

@@ -0,0 +1,66 @@
+package com.sckw.core.model.base;
+
+import com.fasterxml.jackson.annotation.JsonFormat;
+import jakarta.validation.constraints.Size;
+import lombok.Data;
+import lombok.experimental.Accessors;
+
+import java.io.Serializable;
+import java.util.Date;
+
+/**
+ * 基础模型
+ * @author zk
+ * @date Nov 24, 2018
+ */
+@Data
+@Accessors(chain = true)
+public class BaseModel implements Serializable {
+
+	private static final long serialVersionUID = 1L;
+
+	/**
+	 * 主键
+	 */
+	private Long id;
+
+	/**
+	 * 备注
+	 */
+	@Size(max = 200, message = "备注长度不能超过200")
+	private String remark;
+
+	/**
+	 * 状态:0正常/1锁定
+	 */
+	private Integer status;
+
+	/**
+	 * 创建人
+	 */
+	private Long createBy;
+
+	/**
+	 * 创建时间
+	 */
+	@JsonFormat(pattern="yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
+	private Date createTime;
+
+	/**
+	 * 更新人
+	 */
+	private Long updateBy;
+
+
+	/**
+	 * 更新时间
+	 */
+	@JsonFormat(pattern="yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
+	private Date updateTime;
+
+	/**
+	 * 删除标识(0正常/-1删除)
+	 */
+	private Integer delFlag = 0;
+
+}

+ 57 - 0
slope-common/slope-common-core/src/main/java/com/sckw/core/model/base/IdsList.java

@@ -0,0 +1,57 @@
+package com.sckw.core.model.base;
+
+import com.sckw.core.utils.StringUtils;
+
+import java.util.List;
+
+/**
+ * ids处理接口类
+ *
+ * @author xucaiqin
+ * @date 2023-07-27 16:40:15
+ */
+public interface IdsList {
+    default String getId() {
+        return "";
+    }
+
+    default String getIds() {
+        return "";
+    }
+
+    /**
+     * 返回long类型的id
+     *
+     * @return Long
+     */
+    default Long getIdLong() {
+        String s;
+        if (StringUtils.isNotBlank(s = getId())) {
+            try {
+                return Long.parseLong(s);
+            } catch (NumberFormatException e) {
+                return null;
+            }
+        }
+        return null;
+    }
+
+    default Long changeId(String id) {
+        if (StringUtils.isNotBlank(id)) {
+            try {
+                return Long.parseLong(id);
+            } catch (NumberFormatException e) {
+                return null;
+            }
+        }
+        return null;
+    }
+
+    default List<Long> getIdList() {
+        return StringUtils.splitStrToList(getIds(), Long.class);
+    }
+
+    default List<String> getIdsList() {
+        return StringUtils.splitStrToList(getIds(), String.class);
+    }
+}

+ 24 - 0
slope-common/slope-common-core/src/main/java/com/sckw/core/model/base/TimeBase.java

@@ -0,0 +1,24 @@
+package com.sckw.core.model.base;
+
+import com.sckw.core.utils.StringTimeUtil;
+import org.apache.commons.lang3.StringUtils;
+
+/**
+ * @author xucaiqin
+ * @date 2023-07-27 19:30:53
+ */
+public interface TimeBase {
+    default String getStartDateTime(String time) {
+        if (StringUtils.isBlank(time)) {
+            return null;
+        }
+        return StringTimeUtil.fillStart(time);
+    }
+
+    default String getEndDateTime(String time) {
+        if (StringUtils.isBlank(time)) {
+            return null;
+        }
+        return StringTimeUtil.fillEnd(time);
+    }
+}

+ 40 - 0
slope-common/slope-common-core/src/main/java/com/sckw/core/model/constant/AopSortConstants.java

@@ -0,0 +1,40 @@
+package com.sckw.core.model.constant;
+
+/**
+ * Roses中所有AOP的顺序排序(数字越低越靠前)
+ * @author zk
+ * @date 2018年07月23日 15:25:32
+ */
+public interface AopSortConstants {
+
+    /**
+     * 默认的ExceptionHandler的aop顺序
+     */
+    int DEFAULT_EXCEPTION_HANDLER_SORT = 200;
+
+    /**
+     * 临时保存RequestData的aop
+     */
+    int REQUEST_DATA_AOP_SORT = 500;
+
+    /**
+     * 参数校验为空的aop
+     */
+    int PARAM_VALIDATE_AOP_SORT = 510;
+
+    /**
+     * 控制器调用链的aop
+     */
+    int CHAIN_ON_CONTROLLER_SORT = 1;
+
+    /**
+     * provider的调用链aop
+     */
+    int CHAIN_ON_PROVIDER_SORT = 2;
+
+    /**
+     * consumer的调用链aop
+     */
+    int CHAIN_ON_CONSUMMER_SORT = 3;
+
+}

+ 309 - 0
slope-common/slope-common-core/src/main/java/com/sckw/core/model/constant/Global.java

@@ -0,0 +1,309 @@
+package com.sckw.core.model.constant;
+
+/**
+ * All rights Reserved, Designed By www.51wph.com
+ *
+ * @version V1.0
+ * @ProjectName: wph-platform
+ * @Package com.wph.common.consts
+ * @Description:全局配置类/系统常用常量
+ * @author: zk
+ * @date: 2019-05-28 17:31
+ * @Copyright: 2019 www.51wph.com Inc. All rights reserved.
+ * 注意:本内容仅限于汇链科技有限公司内部传阅,禁止外泄以及用于其他的商业目的
+ */
+public class Global {
+
+    /**pc-background token有效期为2小时*/
+    public static final int PC_BACKGROUND_TOKEN_EXPIRE = 60 * 60 * 2;
+
+    /**app token有效期为30天*/
+    public static final int APP_TOKEN_EXPIRE = 30 * 24 * 60 * 60;
+
+    /**pc token有效期为2小时*/
+    public static final int PC_TOKEN_EXPIRE = 2 * 60 * 60;
+
+    /**通用有效期为2小时*/
+    public static final int COMMON_EXPIRE = 2 * 60 * 60;
+
+    /**API调用token有效时间*/
+    public static final int API_EXPIRE = 120 * 60;
+
+    /**保存全局属性值*/
+//    private static Map<String, String> map = Maps.newHashMap();
+
+    /**显示/隐藏*/
+    public static final int SHOW = 1;
+    public static final int HIDE = 0;
+    public static final int MINUS_ONE = -1;
+    /**正常/删除*/
+    public static final int DELETED = 1;
+    public static final int UN_DELETED = 0;
+    /**是/否*/
+    public static final int YES = 1;
+    public static final int NO = 0;
+    public static final String BE = "是";
+    public static final String NAY = "否";
+
+    /**对/错*/
+    public static final boolean TRUE = true;
+    public static final boolean FALSE = false;
+
+    /**字符*/
+    public static final String CODING_GBK = "GBK";
+    public static final String CODING_UTF8 = "UTF-8";
+
+    /**消息强弱提醒 强提醒:Y,否则:N*/
+    public static final String Y = "Y";
+    public static final String N = "N";
+
+    /**初始金额*/
+    public static final Double AMOUNT = 0.0;
+
+    /**初始数值*/
+    public static final int NUMERICAL_ZERO = 0;
+    public static final int NUMERICAL_ONE = 1;
+    public static final int NUMERICAL_TWO = 2;
+    public static final int NUMERICAL_THREE = 3;
+    public static final int NUMERICAL_FOUR = 4;
+    public static final int NUMERICAL_EIGHT = 8;
+    public static final int NUMERICAL_TWELVE = 12;
+    public static final int NUMERICAL_SIXTEEN = 16;
+
+    /**pid等于0的*/
+    public static final String PID = "0";
+
+    /**or*/
+    public static final String OR = "OR";
+
+    /**and*/
+    public static final String AND = "AND";
+
+    /**ok*/
+    public static final String OK = "OK";
+
+    /**忘记密码获取验证码*/
+    public static final String FORGET_SMS = "forget:";
+
+    /**忘记密码获取验证码*/
+    public static final String REPEAT_SUBMIT = "repeatSubmit:";
+
+    /**用户登录验证码*/
+    public static final String USER_LOGIN_CAPTCHA = "userLoginCaptcha:";
+
+    /**redis用户信息前缀*/
+    public static final String REDIS_USER_LOGIN_PREFIX = "userLoginInfo:";
+    public static final String REDIS_USER_PREFIX = "userInfo:";
+    public static final String REDIS_USER_TOKEN_PREFIX = "userToken:";
+
+    /**redis企业信息前缀*/
+    public static final String REDIS_ENTERPRISE_PREFIX = "enterpriseInfo:";
+
+    /**redis区域信息前缀*/
+    public static final String REDIS_AREA_PREFIX = "areaInfo:";
+
+    /**redis区域信息前缀*/
+    public static final String REDIS_GROUP_AREA_PREFIX = "areaInfo:group:";
+
+    /**redis用户菜单信息前缀*/
+    public static final String REDIS_SYS_MENU_PREFIX = "sysMenu:";
+
+    /**redis字典信息前缀*/
+    public static final String REDIS_SYS_DICT_TYPE_PREFIX = "dictInfo:type:";
+    public static final String REDIS_SYS_DICT_PREFIX = "dictInfo:dict:";
+    public static final String REDIS_SYS_DICT_GROUP_PREFIX = "dictInfo:group:";
+
+    /**redis用户车辆gps信息*/
+    public static final String REDIS_CACHE_GPS_CAR_PREFIX = "cacheGpsCar:";
+
+    /**redis运营活动奖品前缀*/
+    public static final String REDIS_ACTIVITY_PRIZE_PREFIX = "activityPrize:";
+
+    /**redis用户运营活动抽奖信息前缀*/
+    public static final String ACTIVITY_JOIN = "activityJoin:";
+
+    /**redis用户运营活动信息前缀*/
+    public static final String ACTIVITY = "activity:";
+
+    /**汇链用户专场编号*/
+    public static final String PHONE = "400-030-5677";
+
+    /**系统初始密码*/
+    public static final String PASSWORD = "123456";
+
+    /**逗号-英文*/
+    public static final String COMMA = ",";
+
+    /**逗号-中文*/
+    public static final String COMMA1 = ",";
+    /**
+     * 右斜杠
+     */
+    public static final String RIGHT_SLASH = "/";
+
+    /**点*/
+    public static final String DOT = ".";
+
+    /**冒号*/
+    public static final String COLON = ":";
+
+    /**下划线拼接*/
+    public static final char UNDERLINE = '_';
+
+    /**空字符串*/
+    public static final String EMPTY_STRING = "";
+
+    /**等号**/
+    public static final String EQUAL_SIGN = "=";
+
+    /**美元符号**/
+    public static final String DOLLAR = "$";
+
+    /**+符号**/
+    public static final String PLUS = "+";
+
+    /**-符号*/
+    public static final String MINUS_SIGN = "-";
+
+    /**#符号**/
+    public static final String POUND = "#";
+
+    /**下划线拼接*/
+    public static final String BRACKET = "()";
+    public static final String BRACKET_LEFT = "(";
+    public static final String BRACKET_RIGHT = ")";
+
+    /**大括号*/
+    public static final String BIG_BRACKETS = "{}";
+    public static final String BIG_BRACKETS_LEFT = "{";
+    public static final String BIG_BRACKETS_RIGHT = "}";
+
+    /**星号拼接*/
+    public static final String ASTERISK1 = "*";
+    public static final String ASTERISK2 = "**";
+
+    /**括号*/
+    public static final String BRACKETS = "[]";
+    public static final String BRACKETS_LEFT = "[";
+    public static final String BRACKETS_RIGHT = "]";
+
+    /**排序*/
+    public static final String ASC = "asc";
+    public static final String DESC = "desc";
+
+    /**请求成功值*/
+    public static final int SUCCEED = 200;
+
+    /**短信请求返回参数名*/
+    public static final String SUCCESS = "success";
+
+    /**pageNum当前页数/pageSize每页显示条数*/
+    public static final String PAGE_NUM = "pageNum";
+    public static final String PAGE_SIZE = "pageSize";
+
+    /**可调用EncryUtil.generatorPriKey()方法生成*/
+    public static final String PRI_KEY = "127f0400ff8a8b7a20d91dfc60a39725";
+
+    /**APP*/
+    public static final String APP = "APP";
+
+    /**API*/
+    public static final String API = "API";
+
+    /**API初始版本号*/
+    public static final String API_VERSION = "1.0.0";
+
+    /**请求头token*/
+    public static final String ACCESS_TOKEN = "Access-Token";
+
+    /**客户终端类型*/
+    public static final String CLIENT_TYPE = "Client-Type";
+
+    /**系统类型*/
+    public static final String SYSTEM_TYPE = "System-Type";
+
+    /**请求代理*/
+    public static final String USER_AGENT = "user-agent";
+
+    /**请求格式*/
+    public static final String CONTENT_TYPE_AJ = "application/json";
+
+    /**请求方法*/
+    public static final String METHOD_POST = "POST";
+    public static final String METHOD_GET = "GET";
+
+    /**错误图片*/
+    public static final String WRONG_USER_HEAD = "data:,";
+
+    /**运输订单号前缀*/
+    public static final String TRAN_NUM_PREFIX = "LTO";
+
+    /**委托单单号前缀*/
+    public static final String ENTR_NUM_PREFIX = "LD";
+
+    /**车辆运单单号前缀*/
+    public static final String TASK_NUM_PREFIX = "LTL";
+
+    /**装货地点*/
+    public static final Integer ADDRESS_LOAD = 1;
+
+    /**卸货地点*/
+    public static final Integer ADDRESS_UNLOAD = 2;
+
+    /**时间周期-天/周/月/年*/
+    public static final String CYCLE_DAY = "天";
+    public static final String CYCLE_WEEK = "周";
+    public static final String CYCLE_MONTH = "月";
+    public static final String CYCLE_YEAR = "年";
+
+    /**重量单位*/
+    public static final String UNIT_TON = "吨";
+    public static final String UNIT_KG = "千克";
+
+    /**未读*/
+    public static final Integer UN_READ = 0;
+    /**管理员角色名*/
+    public static final String MANAGE_NAME = "系统管理员";
+
+    /**管理员机构名*/
+    public static final String MANAGE_DEPT_NAME = "系统管理员部门";
+
+    /**已读*/
+    public static final Integer READ = 1;
+
+
+    /**完整的用户登录信息key*/
+    public static String getFullUserLoginKey(Integer systemType, Long userId, String clientType) {
+        return REDIS_USER_LOGIN_PREFIX + systemType + COLON + userId + COLON + clientType;
+    }
+
+    /**完整的用户登录信息key*/
+    public static String getFullUserLoginKey(Integer systemType, Long userId) {
+        return REDIS_USER_LOGIN_PREFIX + systemType + COLON + userId;
+    }
+
+    /**完整的用户登录tokenkey*/
+    public static String getFullUserTokenKey(String clientType, Long userId) {
+        return REDIS_USER_TOKEN_PREFIX + clientType + COLON + userId;
+    }
+
+    /**完整的用户企业信息key*/
+    public static String getFullUserEntKey(Long entId) {
+        return REDIS_ENTERPRISE_PREFIX + entId;
+    }
+
+    /**完整的用户菜单信息key*/
+    public static String getFullUserMenuKey(Integer systemType, Long userId) {
+        return REDIS_SYS_MENU_PREFIX + systemType + COLON + userId;
+    }
+
+    /**完整的忘记密码获取验证码key*/
+    public static String getForgetKey(Integer systemType, String account) {
+        return FORGET_SMS + systemType + COLON + account;
+    }
+
+    /**完整的校验重复请求key*/
+    public static String getRepeatSubmitKey(Long userId, String url) {
+        return REPEAT_SUBMIT + userId + COLON + url;
+    }
+}

+ 47 - 0
slope-common/slope-common-core/src/main/java/com/sckw/core/model/enums/SensitiveStrategy.java

@@ -0,0 +1,47 @@
+package com.sckw.core.model.enums;
+
+import cn.hutool.core.util.DesensitizedUtil;
+import lombok.AllArgsConstructor;
+
+import java.util.function.Function;
+
+/**
+ * 脱敏策略
+ * @author zk
+ */
+@AllArgsConstructor
+public enum SensitiveStrategy {
+
+    /**
+     * 身份证脱敏
+     */
+    ID_CARD(s -> DesensitizedUtil.idCardNum(s, 3, 4)),
+
+    /**
+     * 手机号脱敏
+     */
+    PHONE(DesensitizedUtil::mobilePhone),
+
+    /**
+     * 地址脱敏
+     */
+    ADDRESS(s -> DesensitizedUtil.address(s, 8)),
+
+    /**
+     * 邮箱脱敏
+     */
+    EMAIL(DesensitizedUtil::email),
+
+    /**
+     * 银行卡
+     */
+    BANK_CARD(DesensitizedUtil::bankCard);
+
+    //可自行添加其他脱敏策略
+
+    private final Function<String, String> desensitizer;
+
+    public Function<String, String> desensitizer() {
+        return desensitizer;
+    }
+}

+ 80 - 0
slope-common/slope-common-core/src/main/java/com/sckw/core/model/page/PageHelperUtil.java

@@ -0,0 +1,80 @@
+package com.sckw.core.model.page;
+
+import com.github.pagehelper.PageHelper;
+import com.github.pagehelper.PageInfo;
+import com.sckw.core.utils.ReflectionUtils;
+
+import java.util.List;
+
+/**
+ * MyBatis 分页查询助手
+ * @author zk
+ * @date Nov 24, 2018
+ */
+public class PageHelperUtil {
+
+    public static final String FIND_PAGE = "findPage";
+
+    /**
+     * 分页查询, 约定查询方法名为 “findPage”
+     * @param pageRequest 分页请求
+     * @param mapper Dao对象,MyBatis的 Mapper
+     */
+    public static PageResult findPage(PageRequest pageRequest, Object mapper) {
+        return findPage(pageRequest, mapper, FIND_PAGE);
+    }
+
+    /**
+     * 调用分页插件进行分页查询
+     * @param pageRequest 分页请求
+     * @param mapper Dao对象,MyBatis的 Mapper
+     * @param queryMethodName 要分页的查询方法名
+     * @param args 方法参数
+     */
+    @SuppressWarnings({ "unchecked", "rawtypes" })
+    public static PageResult findPage(PageRequest pageRequest, Object mapper, String queryMethodName, Object... args) {
+        // 设置分页参数
+        int pageNum = pageRequest.getPage();
+        int pageSize = pageRequest.getPageSize();
+        PageHelper.startPage(pageNum, pageSize);
+        // 利用反射调用查询方法
+        Object result = ReflectionUtils.invoke(mapper, queryMethodName, args);
+        return getPageResult(pageRequest, new PageInfo((List) result));
+    }
+
+    /**
+     * 将分页信息封装到统一的接口
+     */
+    private static PageResult getPageResult(PageRequest pageRequest, PageInfo<?> pageInfo) {
+        return setPageResult(pageInfo);
+    }
+
+    /**
+     * 将分页信息封装到统一的接口
+     * @return PageResult
+     */
+    public static PageResult getPageResult(PageInfo<?> pageInfo) {
+        return setPageResult(pageInfo);
+    }
+
+    /**
+     * 将分页信息封装到统一的接口  针对于有复杂的业务组装接口
+     * @return PageResult
+     */
+    public static PageResult getPageResult(PageInfo<?> pageInfo, List<?> totalList, int pageSize) {
+        PageInfo<?> pageInfoTotal = new PageInfo<>(totalList);
+        pageInfo.setTotal(pageInfoTotal.getTotal());
+        pageInfo.setPageSize(pageSize);
+        return setPageResult(pageInfo);
+    }
+
+    public static PageResult setPageResult(PageInfo<?> pageInfo){
+        PageResult pageResult = new PageResult();
+        pageResult.setPage(pageInfo.getPageNum());
+        pageResult.setPageSize(pageInfo.getPageSize());
+        pageResult.setSize(pageInfo.getTotal());
+        pageResult.setPages(pageInfo.getPages());
+        pageResult.setList(pageInfo.getList());
+        return pageResult;
+    }
+}

+ 21 - 0
slope-common/slope-common-core/src/main/java/com/sckw/core/model/page/PageRequest.java

@@ -0,0 +1,21 @@
+package com.sckw.core.model.page;
+
+import lombok.Data;
+
+/**
+ * 分页请求
+ * @author zk
+ * @date Nov 24, 2018
+ */
+@Data
+public class PageRequest {
+	/**
+	 * 当前页码
+	 */
+	private int page = 1;
+	/**
+	 * 每页数量
+	 */
+	private int pageSize = 10;
+
+}

+ 149 - 0
slope-common/slope-common-core/src/main/java/com/sckw/core/model/page/PageRes.java

@@ -0,0 +1,149 @@
+package com.sckw.core.model.page;
+
+import com.github.pagehelper.PageInfo;
+import com.sckw.core.utils.CollectionUtils;
+
+import java.util.ArrayList;
+import java.util.List;
+
+/**
+ * 分页结果泛型类
+ *
+ * @author xucaiqin
+ * @date 2023-07-12 08:42:26
+ */
+public class PageRes<T> {
+
+    /**
+     * 当前页数
+     */
+    protected int page;
+    /**
+     * 每页显示条数
+     */
+    protected int pageSize;
+    /**
+     * 总条数
+     */
+    protected long size;
+    /**
+     * 总页数
+     */
+    protected int pages;
+    /**
+     * 数据
+     */
+    protected List<T> list;
+
+    public PageRes() {
+        this.list = new ArrayList<>();
+    }
+
+    public PageRes(int page, int pageSize, long size, int pages, List<T> list) {
+        this.page = page;
+        this.pageSize = pageSize;
+        this.size = size;
+        this.pages = pages;
+        this.list = list;
+    }
+
+    public PageRes(PageInfo<T> pageInfo) {
+        this.page = pageInfo.getPageNum();
+        this.pageSize = pageInfo.getPageSize();
+        this.size = pageInfo.getTotal();
+        this.pages = pageInfo.getPages();
+        this.list = CollectionUtils.isEmpty(pageInfo.getList()) ? new ArrayList<>() : pageInfo.getList();
+    }
+
+    public PageRes(PageInfo<T> pageInfo, List<T> list) {
+        this.page = pageInfo.getPageNum();
+        this.pageSize = pageInfo.getPageSize();
+        this.size = pageInfo.getTotal();
+        this.pages = pageInfo.getPages();
+        this.list = list;
+    }
+
+    public PageRes(List<T> list) {
+        PageInfo<T> pageInfo = new PageInfo<>(list);
+        this.page = pageInfo.getPageNum();
+        this.pageSize = pageInfo.getPageSize();
+        this.size = pageInfo.getTotal();
+        this.pages = pageInfo.getPages();
+        this.list = pageInfo.getList();
+    }
+
+    /**
+     * 构建返回数据
+     *
+     * @param pagInfo pageHelper的分页对象
+     * @param list    实际返回的数据集
+     * @return
+     */
+    public static <T> PageRes<T> build(PageInfo<?> pagInfo, List<T> list) {
+        PageRes<T> tPageRes = new PageRes<>();
+        tPageRes.setPage(pagInfo.getPageNum());
+        tPageRes.setPageSize(pagInfo.getPageSize());
+        tPageRes.setSize(pagInfo.getTotal());
+        tPageRes.setPages(pagInfo.getPages());
+        tPageRes.setList(list);
+        return tPageRes;
+    }
+
+    /**
+     * 手动对list进行分页数据处理
+     *
+     * @param page     当前页
+     * @param pageSize 每页大小
+     * @param list     总数据
+     * @return
+     */
+    public static <T> PageRes<T> handPage(int page, int pageSize, List<T> list) {
+        PageRes<T> tPageRes = new PageRes<>();
+        tPageRes.setPage(page);
+        tPageRes.setPageSize(pageSize);
+        tPageRes.setSize(list.size());
+        tPageRes.setPages(list.size() / pageSize + 1);
+        tPageRes.setList(list.stream().skip((long) (page - 1) * pageSize).limit(pageSize).toList());
+        return tPageRes;
+    }
+
+    public void setPage(int page) {
+        this.page = page;
+    }
+
+    public void setPageSize(int pageSize) {
+        this.pageSize = pageSize;
+    }
+
+    public void setSize(long size) {
+        this.size = size;
+    }
+
+    public void setPages(int pages) {
+        this.pages = pages;
+    }
+
+    public void setList(List<T> list) {
+        this.list = list;
+    }
+
+    public int getPage() {
+        return page;
+    }
+
+    public int getPageSize() {
+        return pageSize;
+    }
+
+    public long getSize() {
+        return size;
+    }
+
+    public int getPages() {
+        return pages;
+    }
+
+    public List<T> getList() {
+        return list;
+    }
+}

+ 136 - 0
slope-common/slope-common-core/src/main/java/com/sckw/core/model/page/PageResult.java

@@ -0,0 +1,136 @@
+package com.sckw.core.model.page;
+
+import com.github.pagehelper.PageInfo;
+
+import java.io.Serializable;
+import java.util.List;
+import java.util.Map;
+
+/**
+ * @Description 分页结果相关
+ * @Author zk
+ * @Date 2019/5/14
+ */
+public class PageResult implements Serializable {
+
+    /**
+     * 当前页数
+     */
+    protected int page;
+    /**
+     * 每页显示条数
+     */
+    protected int pageSize;
+    /**
+     * 总条数
+     */
+    protected long size;
+    /**
+     * 总页数
+     */
+    protected int pages;
+    protected List list;
+
+    public PageResult(){
+
+    }
+
+    public PageResult(int page, int pageSize, List list){
+        this.page = page;
+        this.pageSize = pageSize;
+        if(list == null){
+            this.size = 0;
+            this.list = null;
+        }else{
+            this.size = list.size();
+            this.list = list.subList(pageSize * (page - 1),pageSize * page > size ? (int) size : pageSize * page);
+        }
+    }
+
+    public PageResult(int page, int pageSize, List list, int size){
+        this.page = page;
+        this.pageSize = pageSize;
+        if(list == null){
+            this.size = 0;
+            this.list = null;
+        }else{
+            this.size = size;
+            this.list = list;
+        }
+    }
+
+    public PageResult(PageInfo pageInfo){
+        this.page = pageInfo.getPageNum();
+        this.pageSize = pageInfo.getPageSize();
+        this.size = pageInfo.getTotal();
+        this.pages = pageInfo.getPages();
+        this.list = pageInfo.getList();
+    }
+
+    public static <T> PageResult build(Integer page, Integer pageSize, Long totalCount, List<T> records) {
+        PageResult pageResult = new PageResult();
+        pageResult.setPage(page);
+        pageResult.setPageSize(pageSize);
+        pageResult.setSize(totalCount);
+        pageResult.setPages((int) ((totalCount + pageSize - 1) / pageSize));
+        pageResult.setList(records);
+        return pageResult;
+    }
+
+    public void setPageInfo(PageInfo pageInfo){
+        this.page = pageInfo.getPageNum();
+        this.pageSize = pageInfo.getPageSize();
+        this.size = pageInfo.getTotal();
+        this.pages = pageInfo.getPages();
+        this.list = pageInfo.getList();
+    }
+
+    public int getPage() {
+        return page;
+    }
+
+    public void setPage(int page) {
+        this.page = page;
+    }
+
+    public int getPageSize() {
+        return pageSize;
+    }
+
+    public void setPageSize(int pageSize) {
+        this.pageSize = pageSize;
+    }
+
+    public long getSize() {
+        return size;
+    }
+
+    public void setSize(long size) {
+        this.size = size;
+    }
+
+    public int getPages() {
+        return pages;
+    }
+
+    public void setPages(int pages) {
+        this.pages = pages;
+    }
+
+    public List getList() {
+        return list;
+    }
+
+    public void setList(List list) {
+        this.list = list;
+    }
+
+    public static int getPage(Map record) {
+        return record != null && record.get("page") != null ? Integer.parseInt(record.get("page").toString()) : 1;
+    }
+
+    public static int getPageSize(Map record) {
+        return record != null && record.get("pageSize") != null ? Integer.parseInt(record.get("pageSize").toString()) : 10;
+    }
+
+}

+ 25 - 0
slope-common/slope-common-core/src/main/java/com/sckw/core/model/vo/BaseList.java

@@ -0,0 +1,25 @@
+package com.sckw.core.model.vo;
+
+import jakarta.validation.constraints.NotBlank;
+import lombok.Data;
+import org.hibernate.validator.constraints.Length;
+
+/**
+ * @author lfdc
+ * @description
+ * @date 2023-08-15 19:08:14
+ */
+@Data
+public class BaseList {
+    /**
+     * 数据id 逗号隔开
+     */
+    @NotBlank(message = "数据id不能为空")
+    private String ids;
+
+    /**
+     * 备注
+     */
+    @Length(max = 200,message = "备注长度错误最大长度:{max}")
+    private String remark;
+}

+ 40 - 0
slope-common/slope-common-core/src/main/java/com/sckw/core/model/vo/BasePara.java

@@ -0,0 +1,40 @@
+package com.sckw.core.model.vo;
+
+import lombok.Getter;
+import lombok.Setter;
+
+import java.io.Serial;
+import java.io.Serializable;
+
+/**
+ * @author xucaiqin
+ * @date 2023-07-07 16:58:41
+ */
+@Getter
+@Setter
+public class BasePara implements Serializable {
+    @Serial
+    private static final long serialVersionUID = 1881051859375157819L;
+    /**
+     * 当前页
+     */
+    private int page;
+    /**
+     * 每页数量
+     */
+    private int pageSize;
+    /**
+     * 关键字搜索
+     */
+    private String keywords;
+
+    public BasePara() {
+        this(1, 10, "");
+    }
+
+    public BasePara(int page, int pageSize, String keywords) {
+        this.page = page;
+        this.pageSize = pageSize;
+        this.keywords = keywords;
+    }
+}

+ 20 - 0
slope-common/slope-common-core/src/main/java/com/sckw/core/model/vo/FileInfoEncryptVO.java

@@ -0,0 +1,20 @@
+package com.sckw.core.model.vo;
+
+import lombok.Data;
+
+import java.io.Serializable;
+
+/**
+ * @author lfdc
+ * @description 文件上传返回vo
+ * @date 2023-07-04 09:07:08
+ */
+@Data
+public class FileInfoEncryptVO implements Serializable {
+
+    /**
+     * 文件加密key
+     */
+    private String fileMd5;
+
+}

+ 50 - 0
slope-common/slope-common-core/src/main/java/com/sckw/core/model/vo/FileInfoVO.java

@@ -0,0 +1,50 @@
+package com.sckw.core.model.vo;
+
+import lombok.Data;
+
+import java.io.Serializable;
+import java.math.BigDecimal;
+
+/**
+ * @author lfdc
+ * @description 文件上传返回vo
+ * @date 2023-07-04 09:07:08
+ */
+@Data
+public class FileInfoVO implements Serializable {
+    /**
+     * 文件上传类型 oss/qiniuyun
+     */
+    private String type;
+
+    /**
+     * 文件原名称
+     */
+    private String fileOriginalName;
+    /**
+     * 文件加密key
+     */
+    private String fileMd5;
+
+    /**
+     * 文件新名称
+     */
+    private String fileName;
+    /**
+     * 文件后缀
+     */
+    private String fileSuffix;
+    /**
+     * 文件大小  默认为mb
+     */
+    private BigDecimal fileSize;
+
+    /**
+     * 文件相对路径
+     */
+    private String filePath;
+    /**
+     * 文件绝对路径
+     */
+    private String fileAbsolutePath;
+}

+ 24 - 0
slope-common/slope-common-core/src/main/java/com/sckw/core/model/vo/TableBottom.java

@@ -0,0 +1,24 @@
+package com.sckw.core.model.vo;
+
+import lombok.Getter;
+import lombok.Setter;
+import lombok.ToString;
+import lombok.experimental.Accessors;
+
+/**
+ * @desc: 表格底部对象
+ * @author: yzc
+ * @date: 2023-07-05 17:50
+ */
+@Getter
+@Setter
+@ToString
+@Accessors(chain = true)
+public class TableBottom {
+
+    /**
+     * 统计数据
+     */
+    private Integer total;
+
+}

+ 36 - 0
slope-common/slope-common-core/src/main/java/com/sckw/core/model/vo/TableStatisticRes.java

@@ -0,0 +1,36 @@
+package com.sckw.core.model.vo;
+
+import lombok.Getter;
+import lombok.Setter;
+import lombok.ToString;
+import lombok.experimental.Accessors;
+
+import java.io.Serial;
+import java.io.Serializable;
+import java.util.List;
+
+/**
+ * @desc: 表格统计对象
+ * @author: yzc
+ * @date: 2023-07-05 17:50
+ */
+@Getter
+@Setter
+@ToString
+@Accessors(chain = true)
+public class TableStatisticRes implements Serializable {
+
+    @Serial
+    private static final long serialVersionUID = 1699225803039367149L;
+
+    /**
+     * 表格顶部对象
+     */
+    private List<TableTop> tableTops;
+
+    /**
+     * 表格底部对象
+     */
+    private TableBottom tableBottom;
+
+}

+ 39 - 0
slope-common/slope-common-core/src/main/java/com/sckw/core/model/vo/TableTop.java

@@ -0,0 +1,39 @@
+package com.sckw.core.model.vo;
+
+import lombok.Getter;
+import lombok.Setter;
+import lombok.ToString;
+import lombok.experimental.Accessors;
+
+import java.io.Serial;
+import java.io.Serializable;
+
+/**
+ * @desc: 表格顶部对象
+ * @author: yzc
+ * @date: 2023-07-05 17:50
+ */
+@Getter
+@Setter
+@ToString
+@Accessors(chain = true)
+public class TableTop implements Serializable {
+
+    @Serial
+    private static final long serialVersionUID = -2419518869931408146L;
+
+    /**
+     * tab名称
+     */
+    private String name;
+
+    /**
+     * 状态值
+     */
+    private Integer value;
+
+    /**
+     * 统计数据
+     */
+    private Integer total;
+}

+ 17 - 0
slope-common/slope-common-core/src/main/java/com/sckw/core/service/SensitiveService.java

@@ -0,0 +1,17 @@
+package com.sckw.core.service;
+
+/**
+ * 脱敏服务
+ * 默认管理员不过滤
+ * 需自行根据业务重写实现
+ * @author
+ * @version
+ */
+public interface SensitiveService {
+
+    /**
+     * 是否脱敏
+     */
+    boolean isSensitive();
+
+}

+ 54 - 0
slope-common/slope-common-core/src/main/java/com/sckw/core/utils/AsyncThreadUtils.java

@@ -0,0 +1,54 @@
+package com.sckw.core.utils;
+
+import java.util.concurrent.*;
+
+/**
+ * @author czh
+ * @desc TODO
+ * @date 2023/6/19
+ */
+public class AsyncThreadUtils {
+
+    //CPU核心数
+    private static final int corePoolSize = Runtime.getRuntime().availableProcessors();
+    private static final int maximumPoolSize = corePoolSize * 2;
+    private static final long keepAliveTime = 10;
+    private static final TimeUnit keepAliveTimeUnit = TimeUnit.SECONDS;
+    private static final BlockingQueue<Runnable> workQueue = new ArrayBlockingQueue<>(1024);
+    private static final RejectedExecutionHandler rejectedHandler = new ThreadPoolExecutor.CallerRunsPolicy();
+
+    /**
+     * corePoolSize : 线程池核心线程数,最好默认CPU核心数
+     * maximumPoolSize : 线程池最大线程数,最好是核心线程数的两倍,太多会引起线程切换
+     * keepAliveTime : 大于核心线程数的空闲线程存活时间
+     * keepAliveTimeUnit : 空闲线程存活时间的单位(秒、分钟、小时等等)
+     * workQueue : 线程池有界队列,新任务没有可用线程处理时会把任务放到该队列中,等待被处理
+     * rejectedHandler : 拒绝处理策略,默认直接丢弃并抛出异常-AbortPolicy,调用者线程直接处理-CallerRunsPolicy
+     */
+    private static ThreadPoolExecutor poolExecutor = new ThreadPoolExecutor(
+            corePoolSize,
+            maximumPoolSize,
+            keepAliveTime,
+            keepAliveTimeUnit,
+            workQueue,
+            rejectedHandler
+    );
+
+    /**
+     * 直接提交任务,无返回值
+     * @param task Runnable
+     */
+    public static void submit(Runnable task) {
+        poolExecutor.submit(task);
+    }
+
+    /**
+     * 提交任务,返回泛型结果
+     * @param <T>
+     * @return Future
+     */
+    public static <T> Future<T> submit(Callable<T> task) {
+        return poolExecutor.submit(task);
+    }
+
+}

+ 262 - 0
slope-common/slope-common-core/src/main/java/com/sckw/core/utils/BeanUtils.java

@@ -0,0 +1,262 @@
+package com.sckw.core.utils;
+
+import cn.hutool.core.bean.BeanUtil;
+import com.sckw.core.model.constant.Global;
+
+import java.beans.PropertyDescriptor;
+import java.lang.reflect.Field;
+import java.lang.reflect.Method;
+import java.lang.reflect.Type;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+/**
+ * @author zk
+ * @version V1.0
+ * @Title: SupplyMapper
+ * @Package com.wph.modules.supply.mapper
+ * @Description: ()
+ * @date 2019/5/15 001510:37
+ */
+public class BeanUtils extends BeanUtil {
+
+    /**
+     * 下划线拼接
+     */
+    public static final char UNDERLINE = '_';
+
+    public static boolean checkFieldValueNull(Object bean) {
+        boolean result = true;
+        if (bean == null) {
+            return true;
+        }
+        Class<?> cls = bean.getClass();
+        Method[] methods = cls.getDeclaredMethods();
+        Field[] fields = cls.getDeclaredFields();
+        for (Field field : fields) {
+            try {
+                String fieldGetName = parGetName(field.getName());
+                if (!checkGetMet(methods, fieldGetName)) {
+                    continue;
+                }
+                Method fieldGetMet = cls.getMethod(fieldGetName, new Class[]{});
+                Object fieldVal = fieldGetMet.invoke(bean, new Object[]{});
+                if (fieldVal != null) {
+                    if ("".equals(fieldVal)) {
+                        result = true;
+                    } else {
+                        result = false;
+                    }
+                }
+            } catch (Exception e) {
+                continue;
+            }
+        }
+        return result;
+    }
+
+
+    /**
+     * 拼接某属性的 get方法
+     *
+     * @param fieldName
+     * @return String
+     */
+    public static String parGetName(String fieldName) {
+        if (null == fieldName || "".equals(fieldName)) {
+            return null;
+        }
+        int startIndex = 0;
+        if (fieldName.charAt(0) == UNDERLINE) {
+            startIndex = 1;
+        }
+        return "get"
+                + fieldName.substring(startIndex, startIndex + 1).toUpperCase()
+                + fieldName.substring(startIndex + 1);
+    }
+
+    /**
+     * 判断是否存在某属性的 get方法
+     *
+     * @param methods
+     * @param fieldGetMet
+     * @return boolean
+     */
+    public static boolean checkGetMet(Method[] methods, String fieldGetMet) {
+        for (Method met : methods) {
+            if (fieldGetMet.equals(met.getName())) {
+                return true;
+            }
+        }
+        return false;
+    }
+
+    /**
+     *
+     * @Title: isProperty
+     * @Description: 判断对象是否存在某属性
+     * @param bean 对象
+     * @param propertyName 属性
+     * @return
+     * @return: boolean 有则反之true 反之false
+     *
+    public static boolean isProperty(Object bean, String propertyName){
+    if (bean == null) {
+    return false;
+    }
+    Class<?> cls = bean.getClass();
+    PropertyDescriptor[] propertys = org.springframework.beans.BeanUtils.getPropertyDescriptors(cls);
+    for (PropertyDescriptor property : propertys){
+    String fieldName = property.getName();
+    if(fieldName != null && propertyName != null && fieldName.equals(propertyName)){
+    return true;
+    }
+    }
+    return false;
+    }*/
+
+
+    /**
+     * @param object
+     * @return boolean
+     * @description 判断当前对象是否为空
+     * @author jiangwei
+     * @date 2020/9/18 14:40
+     **/
+    public static boolean objCheckIsNull(Object object) {
+        return objCheckIsNull(object, null, null);
+    }
+
+    /**
+     * @param object           入参对象
+     * @param excludeNameList  要剔除的属性名称,没有就传空集合或者null
+     * @param excludeValueList 要剔除的数值,没有就传空集合或者null
+     * @return boolean
+     * @description 判断当前对象是否为空(包括所有属性为空)
+     * 可选则在判断规则中剔除某一字段,或者某一值
+     * @author jiangwei
+     * @date 2020/5/22 10:14
+     **/
+    public static boolean objCheckIsNull(Object object, List<String> excludeNameList, List<Object> excludeValueList) {
+
+        if (object == null) {
+            return true;
+        }
+        // 得到类对象
+        Class clazz = object.getClass();
+        // 得到所有属性
+        Field[] fields = clazz.getDeclaredFields();
+        //判断入参
+        boolean excludeNameListFlag = false;
+        if (excludeNameList != null && excludeNameList.size() > 0) {
+            excludeNameListFlag = true;
+        }
+        boolean excludeValueListFlag = false;
+        if (excludeValueList != null && excludeValueList.size() > 0) {
+            excludeValueListFlag = true;
+        }
+        //定义返回结果,默认为true
+        boolean flag = true;
+        for (Field field : fields) {
+            field.setAccessible(true);
+            Object fieldValue = null;
+            String fieldName = null;
+            try {
+                //得到属性值
+                fieldValue = field.get(object);
+                //得到属性类型
+                Type fieldType = field.getGenericType();
+                //得到属性名
+                fieldName = field.getName();
+                //剔除指定属性名的属性值
+                if (excludeNameListFlag) {
+                    for (String s : excludeNameList) {
+                        if (fieldName.equals(s)) {
+                            fieldValue = null;
+                        }
+                    }
+                }
+                //剔除指定属性值
+                if (excludeValueListFlag) {
+                    for (Object obj : excludeValueList) {
+                        if (fieldValue == obj) {
+                            fieldValue = null;
+                        }
+                    }
+                }
+            } catch (IllegalArgumentException | IllegalAccessException e) {
+                e.printStackTrace();
+            }
+            //只要有一个属性值不为null 就返回false 表示对象不为null 忽略序列化
+            if (fieldValue != null && !"serialVersionUID".equals(fieldName)) {
+                flag = false;
+                break;
+            }
+        }
+        return flag;
+    }
+
+    /**
+     * @param bean         对象
+     * @param propertyName 属性
+     * @return
+     * @Title: isProperty
+     * @Description: 判断对象是否存在某属性
+     * @return: boolean 有则反之true 反之false
+     */
+    public static boolean isProperty(Object bean, String propertyName) {
+        if (bean == null) {
+            return false;
+        }
+        Class<?> cls = bean.getClass();
+        PropertyDescriptor[] propertys = org.springframework.beans.BeanUtils.getPropertyDescriptors(cls);
+        for (PropertyDescriptor property : propertys) {
+            String fieldName = property.getName();
+            if (fieldName != null && propertyName != null && fieldName.equals(propertyName)) {
+                return true;
+            }
+        }
+        return false;
+    }
+
+    /**
+     * @param source 源对象
+     * @param target 目标对象
+     * @desc source 属性值赋值给target
+     * @author zk
+     * @date 2023/7/18
+     **/
+    public static void copyPropertiesValue(Object source, Object target) {
+        // 获取实体类的所有属性,返回Field数组
+        Field[] field = target.getClass().getDeclaredFields();
+        // 遍历所有属性
+        for (int j = 0; j < field.length; j++) {
+            // 获取属性的名字
+            String fieldName = field[j].getName();
+            // 通过属性名称获取对象属性值
+            Object value = BeanUtils.getProperty(source, fieldName);
+            if (value != null) {
+                // 为对象属性赋值
+                BeanUtils.setProperty(target, fieldName, value);
+            }
+        }
+    }
+
+    public static Map<String, Object> convertToMap(Object yourObject) {
+        Map<String, Object> map = new HashMap<>(Global.NUMERICAL_SIXTEEN);
+        try {
+            Field[] fields = yourObject.getClass().getDeclaredFields();
+            for (Field field : fields) {
+                field.setAccessible(true);
+                String fieldName = field.getName();
+                Object fieldValue = field.get(yourObject);
+                map.put(fieldName, fieldValue);
+            }
+        } catch (IllegalAccessException e) {
+            throw new RuntimeException(e);
+        }
+        return map;
+    }
+
+}

+ 447 - 0
slope-common/slope-common-core/src/main/java/com/sckw/core/utils/CollectionUtils.java

@@ -0,0 +1,447 @@
+package com.sckw.core.utils;
+
+import cn.hutool.core.collection.CollectionUtil;
+import com.alibaba.fastjson.JSONObject;
+import com.sckw.core.model.constant.Global;
+
+import java.lang.reflect.Field;
+import java.lang.reflect.Modifier;
+import java.util.*;
+
+/**
+ * @author zk
+ * @description 集合框架处理类
+ * @date 2020/06/06 09:03:53
+ */
+public class CollectionUtils extends CollectionUtil {
+    private static final int DEFAULT_INITIAL_CAPACITY = 16;
+
+    public CollectionUtils() {
+    }
+
+    /**
+     * @Description 创建HashMap
+     * @Author dengyinghui
+     * @Date 2019/5/12
+     * @return
+     */
+    public static synchronized Map<String, Object> createHashMap(){
+	  return new HashMap<>(DEFAULT_INITIAL_CAPACITY);
+    }
+
+    /**
+     * @Description 从Map中获取String值
+     * @param map map集合
+     * @param key key值
+     * @Author dengyinghui
+     * @Date 2019/5/14
+     * @return
+     */
+    public static String getString(Map<String, Object> map, String key){
+	  if(map == null){
+		return null;
+	  }
+	  return StringUtils.valueOf(map.get(key));
+    }
+
+    /**
+     * @Description 从Map中获取Integer值
+     * @param map map集合
+     * @param key key值
+     * @Author dengyinghui
+     * @Date 2019/5/14
+     * @return
+     */
+    public static Integer getInteger(Map<String, Object> map, String key){
+	  if(map == null){
+		return null;
+	  }
+	  return (Integer)map.get(key);
+    }
+
+    /**
+     * @Description 从Map中获取Date值
+     * @param map map集合
+     * @param key key值
+     * @Author dengyinghui
+     * @Date 2019/5/14
+     * @return
+     */
+    public static Date getDate(Map<String, Object> map, String key){
+	  if(map == null){
+		return null;
+	  }
+	  return (Date)map.get(key);
+    }
+
+    /**
+     * @Description JSONObject转MAP<String,String>
+     * @param object JSONObject对象
+     * @Author bernie
+     * @Date 2019/08/02
+     * @return HashMap<String, String> map结果
+     */
+    public static HashMap<String, String> toHashMap(JSONObject object)
+    {
+	  HashMap<String, String> data = new HashMap<>(16);
+	  Set<String> keys =  object.keySet();
+	  Iterator it = keys.iterator();
+	  // 遍历jsonObject数据,添加到Map对象
+	  while (it.hasNext())
+	  {
+		String key = String.valueOf(it.next());
+		String value = (String) object.get(key);
+		data.put(key, value);
+	  }
+	  return data;
+    }
+
+    public static boolean isEmpty(Collection<?> list) {
+	  return list == null || list.size() == 0;
+    }
+
+    public static Set<String> valueOfSet(String str) {
+	  return valueOfSet(str, ",");
+    }
+
+    public static Set<String> valueOfSet(String str, String split) {
+	  Set<String> set = new HashSet();
+	  str = StringUtils.trimNull(str);
+	  if (!StringUtils.isEmpty(str)) {
+		String[] strs = str.split(split);
+		if (!StringUtils.isEmpty(strs)) {
+		    String[] var7 = strs;
+		    int var6 = strs.length;
+
+		    for(int var5 = 0; var5 < var6; ++var5) {
+			  String string = var7[var5];
+			  string = StringUtils.trimNull(string);
+			  if (!StringUtils.isEmpty(string)) {
+				set.add(string);
+			  }
+		    }
+		}
+	  }
+
+	  return set;
+    }
+
+    public static List<String> valueOfList(String str) {
+	  return valueOfList(str, ",");
+    }
+
+    public static List<String> valueOfList(String str, String split) {
+	  List<String> list = new ArrayList();
+	  str = StringUtils.trimNull(str);
+	  if (!StringUtils.isEmpty(str)) {
+		String[] strs = str.split(split);
+		if (!StringUtils.isEmpty(strs)) {
+		    String[] var7 = strs;
+		    int var6 = strs.length;
+
+		    for(int var5 = 0; var5 < var6; ++var5) {
+			  String string = var7[var5];
+			  string = StringUtils.trimNull(string);
+			  if (!StringUtils.isEmpty(string)) {
+				list.add(string);
+			  }
+		    }
+		}
+	  }
+
+	  return list;
+    }
+
+    /**
+     * 按照List<Map<String,Object>>里面map的某个value重新封装成多个不同的list, 原始数据类型List<Map
+     * <String,Object>>, 转换后数据类型Map<String,List<Map<String,Object>>>
+     * @param list
+     * @param oneMapKey
+     * @return
+     */
+    public static Map<String, Object> change(List<Map<String, Object>> list, String oneMapKey) {
+	  Map<String, Object> resultMap = CollectionUtils.createHashMap();
+	  Set<Object> setTmp = new HashSet<Object>();
+	  for (Map<String, Object> tmp : list) {
+		setTmp.add(tmp.get(oneMapKey));
+	  }
+	  Iterator<Object> it = setTmp.iterator();
+	  while (it.hasNext()) {
+		String oneSetTmpStr = (String) it.next();
+		List<Map<String, Object>> oneSetTmpList = new ArrayList<Map<String, Object>>();
+		for (Map<String, Object> tmp : list) {
+		    String oneMapValueStr = (String) tmp.get(oneMapKey);
+		    if (oneMapValueStr.equals(oneSetTmpStr)) {
+			  oneSetTmpList.add(tmp);
+		    }
+		}
+		resultMap.put(oneSetTmpStr, oneSetTmpList);
+	  }
+	  return resultMap;
+    }
+
+    /**
+     * 按照List<Map<String,Object>>里面map的某个value重新封装成多个不同的list, 原始数据类型List<Map
+     * <String,Object>>, 转换后数据类型Map<String,List<Map<String,Object>>>
+     * @param list
+     * @param oneMapKey
+     * @return
+     */
+    public static List<Map<String, Object>> change2(List<Map<String, Object>> list, String oneMapKey,
+								    List<Map<String, Object>> outList) {
+	  // 1.将某个key的值存在set中
+	  Set<Object> setTmp = new HashSet<Object>();
+	  for (Map<String, Object> tmp : list) {
+		setTmp.add(tmp.get(oneMapKey));
+	  }
+	  // 2.遍历set
+	  Iterator<Object> it = setTmp.iterator();
+	  while (it.hasNext()) {
+		String oneMapValueStr = "";
+		String oneSetTmpStr = (String) it.next();
+		Map<String, Object> oneSetTmpMap = CollectionUtils.createHashMap();
+		List<Map<String, Object>> oneSetTmpList = new ArrayList<Map<String, Object>>();
+
+		for (Map<String, Object> tmp : list) {
+		    oneMapValueStr = (String) tmp.get(oneMapKey);
+		    if (oneSetTmpStr.equals(oneMapValueStr)) {
+			  oneSetTmpMap.put("key", oneSetTmpStr);
+			  oneSetTmpList.add(tmp);
+		    }
+		}
+		oneSetTmpMap.put("children", oneSetTmpList);
+		outList.add(oneSetTmpMap);
+	  }
+	  return outList;
+    }
+
+	/**
+	 * 开始分页
+	 * @param list
+	 * @param page 页码
+	 * @param pageSize 每页多少条数据
+	 * @return
+	 */
+	public static List startPage(List list, Integer page,
+								 Integer pageSize) {
+		if (list == null) {
+			return null;
+		}
+		if (list.size() == 0) {
+			return null;
+		}
+		// 记录总数
+		Integer count = list.size();
+		int fromIndex = Math.min((page - 1) * pageSize,count);
+		int toIndex = Math.min(fromIndex + pageSize,count);
+
+		List pageList = list.subList(fromIndex, toIndex);
+		return pageList;
+	}
+
+	/**
+	 * Map 按值排序
+	 * @param params
+	 * @return
+	 */
+	public static Set<Map.Entry<String, Integer>> valueSort(Map<String, Integer> params){
+		Set<Map.Entry<String, Integer>> treeSet = new TreeSet<Map.Entry<String, Integer>>(
+				new Comparator<Map.Entry<String, Integer>>() {
+					@Override
+					public int compare(Map.Entry<String, Integer> o1,
+									   Map.Entry<String, Integer> o2) {
+						Integer d1 = o1.getValue();
+						Integer d2 = o2.getValue();
+						int r = d2.compareTo(d1);
+
+						if (r != 0) {
+							return r;
+						} else {
+							return o2.getKey().compareTo(o1.getKey());
+						}
+					}
+				});
+		treeSet.addAll(params.entrySet());
+		return treeSet;
+	}
+
+	/**
+	 * 获取list中对象key值为value的对象
+	 * @param list 数据集
+	 * @param key key
+	 * @param value 匹配值
+	 * @return
+	 */
+	public List<Map<String, Object>> listByKeyValue(List<Map<String, Object>> list, String key, String value) {
+		if (CollectionUtils.isEmpty(list)) {
+			return null;
+		}
+		List<Map<String, Object>> outList = new ArrayList();
+		for (Map<String, Object> map:list) {
+			Object str = map.get(key);
+			if (StringUtils.isNotBlank(str) && StringUtils.objectStr(str).equals(value)) {
+				outList.add(map);
+			}
+		}
+
+		return outList;
+	}
+
+	/**
+	 * 校验list中对象key值是否存在与value不一致的情况
+	 * @param list 数据集
+	 * @param key key
+	 * @param value 匹配值
+	 * @return
+	 */
+	public static boolean listByKeyValueV1(List<Map<String, Object>> list, String key, String value) {
+		if (CollectionUtils.isEmpty(list)) {
+			return false;
+		}
+		for (Map<String, Object> map:list) {
+			Object str = map.get(key);
+			if (StringUtils.isNotBlank(str) && !StringUtils.objectStr(str).equals(value)) {
+				return true;
+			}
+		}
+
+		return false;
+	}
+
+
+    public static void main(String[] args) {
+	  Map<String, Object> map1 = CollectionUtils.createHashMap();
+	  Map<String, Object> map2 = CollectionUtils.createHashMap();
+	  Map<String, Object> map3 = CollectionUtils.createHashMap();
+	  Map<String, Object> map4 = CollectionUtils.createHashMap();
+	  Map<String, Object> map5 = CollectionUtils.createHashMap();
+
+	  List<Map<String, Object>> inList = new ArrayList<Map<String, Object>>();
+	  map1.put("id", "111");
+	  map1.put("name", "tom");
+	  map1.put("sex", "male");
+
+	  map2.put("id", "222");
+	  map2.put("name", "jack");
+	  map2.put("sex", "male");
+
+	  map3.put("id", "333");
+	  map3.put("name", "lucy");
+	  map3.put("sex", "female");
+
+	  map4.put("id", "444");
+	  map4.put("name", "lucy");
+	  map4.put("sex", "female");
+
+	  inList.add(map1);
+	  inList.add(map2);
+	  inList.add(map3);
+	  inList.add(map4);
+	  System.out.println("原始inList:" + inList);
+
+
+	  map5.put("一类(爆炸品)", map4);
+	  map5.put("二类(压缩,液化气体)", null);
+	  map5.put("三类(易燃液体)", null);
+	  map5.put("四类(易燃固体,自燃物品和遇湿易燃)", map3);
+	  map5.put("五类(氧化剂,有机过氧化物)", null);
+	  map5.put("六类(毒害品,感染类物品)", null);
+	  map5.put("七类(放射性物质)", null);
+	  map5.put("八类(腐蚀品)", null);
+	  map5.put("九类(危险废弃物)", map2);
+	  map5.put("普货", null);
+	  map5.put("其他", map2);
+
+	  Map<String, Object> resultMap = CollectionUtils.createHashMap();
+	  // resultMap = change(list, "sex");
+	  resultMap = change(inList, "name");
+	  System.out.println("按照map中的某个值重新封装后的resultMap:" + JSONObject.toJSONString(resultMap));
+
+	  List<Map<String, Object>> outList = new ArrayList<Map<String, Object>>();
+	  System.out.println("retList==1==:" + outList);
+	  outList = change2(inList, "name", outList);
+	  System.out.println("retList==2==:" + JSONObject.toJSONString(outList));
+
+	  List list = toList("165159551228710912,165181777487335424,165181777487335425,165181777487335426", false);
+	  System.out.println(list);
+
+    }
+
+    /**
+     * @desc: object转list
+     * @author: yzc
+     * @date: 2023-06-26 15:27
+     * @Param obj:
+     * @Param clazz:
+     * @return: java.util.List<T>
+     */
+    public static <T> List<T> objectCastList(Object obj, Class<T> clazz) {
+        List<T> result = new ArrayList<>();
+        if (obj instanceof List<?>) {
+			for (Object o : (List<?>) obj) {
+				result.add(clazz.cast(o));
+			}
+		}
+		return result;
+    }
+
+	/**
+	 * 对象转Map
+	 * @param object
+	 * @return
+	 * @throws IllegalAccessException
+	 */
+	public static Map beanToMap(Object object) throws Exception {
+		Map<String, Object> map = new HashMap<>(Global.NUMERICAL_SIXTEEN);
+		Field[] fields = object.getClass().getDeclaredFields();
+		for (Field field : fields) {
+			field.setAccessible(true);
+			map.put(field.getName(), field.get(object));
+		}
+		return map;
+	}
+
+	/**
+	 * map转对象
+	 * @param map
+	 * @param beanClass
+	 * @param <T>
+	 * @return
+	 * @throws Exception
+	 */
+	public static <T> T mapToBean(Map map, Class<T> beanClass) throws Exception {
+		T object = beanClass.getDeclaredConstructor().newInstance();
+		Field[] fields = object.getClass().getDeclaredFields();
+		for (Field field : fields) {
+			int mod = field.getModifiers();
+			if (Modifier.isStatic(mod) || Modifier.isFinal(mod)) {
+				continue;
+			}
+			field.setAccessible(true);
+			if (map.containsKey(field.getName())) {
+				field.set(object, map.get(field.getName()));
+			}
+		}
+		return object;
+	}
+
+	/**
+	 * @param str 数组转换值
+	 * @param bool true 原顺序、false 倒序
+	 * @desc 字符串转换集合
+	 * @author zk
+	 * @date 2023/8/7
+	 **/
+	public static List toList(String str, boolean bool) {
+		if (StringUtils.isNotBlank(str)) {
+			List idArray = Arrays.asList(str.split(Global.COMMA));
+			if (!bool) {
+				Collections.reverse(idArray);
+			}
+			return idArray;
+		} else {
+			return new ArrayList();
+		}
+	}
+
+}

+ 309 - 0
slope-common/slope-common-core/src/main/java/com/sckw/core/utils/DateTimeUtil.java

@@ -0,0 +1,309 @@
+package com.sckw.core.utils;
+
+
+import java.time.LocalDate;
+import java.time.LocalDateTime;
+import java.time.LocalTime;
+import java.time.format.DateTimeFormatter;
+import java.time.temporal.ChronoUnit;
+import java.time.temporal.TemporalAdjusters;
+import java.util.ArrayList;
+import java.util.List;
+
+/**
+ * @description: 时间工具类
+ * @author: xucaiqin
+ * @copyright
+ * @create: 2022-01-27 16:04
+ **/
+public class DateTimeUtil {
+    public static final String YMD = "yyyy-MM-dd";
+    public static final String YM = "yyyy-MM";
+    public static final String HMS = "HH:mm:ss";
+    public static final DateTimeFormatter YYYY_MM_DD_HH_MM_SS = DateTimeFormatter.ofPattern(YMD + " " + HMS);
+    public static final DateTimeFormatter YYYYMMDDHHMMSS = DateTimeFormatter.ofPattern("yyyyMMddHHmmss");
+    public static final DateTimeFormatter YYYY_MM_DD = DateTimeFormatter.ofPattern(YMD);
+    public static final DateTimeFormatter YYYY_MM = DateTimeFormatter.ofPattern(YM);
+    public static final DateTimeFormatter HH_MM_SS = DateTimeFormatter.ofPattern(HMS);
+
+    /**
+     * 拼接 00:00:00
+     *
+     * @param localDate 日期
+     * @return yyyy-MM-dd 00:00:00
+     */
+    public static LocalDateTime appendStart(LocalDate localDate) {
+        return LocalDateTime.of(localDate, LocalTime.MIN);
+    }
+
+    /**
+     * 拼接 23:59:59
+     *
+     * @param localDate 日期
+     * @return yyyy-MM-dd 23:59:59
+     */
+    public static LocalDateTime appendEnd(LocalDate localDate) {
+        return LocalDateTime.of(localDate, LocalTime.MAX);
+    }
+
+    public static LocalDateTime parse(String date) {
+        return LocalDateTime.parse(date, YYYY_MM_DD_HH_MM_SS);
+    }
+
+    public static LocalDate parseYMD(String date) {
+        return LocalDate.parse(date, YYYY_MM_DD);
+    }
+    /*格式化*/
+
+    /**
+     * 当前时间的前一个星期
+     *
+     * @return
+     */
+    public static String format(LocalDateTime localDateTime) {
+        return YYYY_MM_DD_HH_MM_SS.format(localDateTime);
+    }
+
+    public static String formatYM(LocalDate localDate) {
+        return YYYY_MM.format(localDate);
+    }
+
+    public static String formatYMD(LocalDate localDate) {
+        return YYYY_MM_DD.format(localDate);
+    }
+
+    public static String formatYMD(LocalDateTime localDateTime) {
+        return YYYY_MM_DD.format(localDateTime);
+    }
+    /*月差计算*/
+
+    /**
+     * 从当前日期计算月数差
+     *
+     * @param months 加或减的月数
+     * @return LocalDate
+     */
+    public static LocalDate getComputeMonth(long months) {
+        return getComputeMonth(LocalDate.now(), months);
+    }
+
+    /**
+     * 从当前日期计算月数差
+     *
+     * @param months 加或减的月数
+     * @return yyyy-MM-dd
+     */
+    public static String getComputeMonthStr(long months) {
+        return formatYMD(getComputeMonth(months));
+    }
+
+    /**
+     * 从给定的日期计算月数差
+     *
+     * @param months    加或减的月数
+     * @param localDate 给定的日期
+     * @return LocalDate
+     */
+    public static LocalDate getComputeMonth(LocalDate localDate, long months) {
+        return localDate.plusMonths(months);
+    }
+
+    /**
+     * 从给定的日期时间计算月数差
+     *
+     * @param months        加或减的月数
+     * @param localDateTime 给定的日期时间
+     * @return LocalDate
+     */
+    public static LocalDateTime getComputeMonth(LocalDateTime localDateTime, long months) {
+        return localDateTime.plusMonths(months);
+    }
+
+    /**
+     * 从当前日期计算月数差,并取当月的第一天
+     *
+     * @param months 加或减的月数
+     * @return LocalDateTime,时间最小值
+     */
+    public static LocalDate getComputeMonthStartDay(long months) {
+        return getComputeMonth(months).with(TemporalAdjusters.firstDayOfMonth());
+    }
+
+    /**
+     * 获取传入日期的当月第一天
+     *
+     * @param date 日期(不能包含时分秒)
+     * @return
+     */
+    public static String getComputeMonthStartDayStr(String date) {
+        return formatYMD(parseYMD(date).with(TemporalAdjusters.firstDayOfMonth()));
+    }
+
+    public static String getComputeMonthStartDayStr(long months) {
+        return formatYMD(getComputeMonth(months).with(TemporalAdjusters.firstDayOfMonth()));
+    }
+
+    /**
+     * 从当前日期计算月数差,时间取最小值 00:00:00
+     *
+     * @param months 加或减的月数
+     * @param offset 偏移的天数 ±1
+     * @return LocalDateTime,时间最小值
+     */
+    public static LocalDateTime getComputeMonthStart(long months, long offset) {
+        return LocalDateTime.of(getComputeMonth(months), LocalTime.MIN).plusDays(offset);
+    }
+
+    /**
+     * 从当前日期计算月数差,时间取最大值 23:59:59
+     *
+     * @param months 加或减的月数
+     * @param offset 偏移的天数 ±1
+     * @return LocalDateTime,时间最大值
+     */
+    public static LocalDateTime getComputeMonthEnd(long months, long offset) {
+        return LocalDateTime.of(getComputeMonth(months), LocalTime.MAX).plusDays(offset);
+    }
+
+    /**
+     * 获取传入日期的当月最后一天
+     *
+     * @param date
+     * @return
+     */
+    public static String getComputeMonthEndDayStr(String date) {
+        return formatYMD(parseYMD(date).with(TemporalAdjusters.lastDayOfMonth()));
+    }
+
+    public static String getComputeMonthEndDayStr(long months) {
+        return formatYMD(getComputeMonth(months).with(TemporalAdjusters.lastDayOfMonth()));
+    }
+
+    /**
+     * 从当前日期计算月数差,并取当月的最后一天
+     *
+     * @param months 加或减的月数
+     * @return LocalDateTime,时间最小值
+     */
+    public static LocalDate getComputeMonthEndDay(long months) {
+        return getComputeMonth(months).with(TemporalAdjusters.lastDayOfMonth());
+    }
+    /*天差计算*/
+
+    /**
+     * 从当前时间,计算天数差
+     *
+     * @param days 加或减的天数
+     * @return yyyy-MM-dd
+     */
+    public static String getComputeDaysStr(long days) {
+        return formatYMD(getComputeDays(days));
+    }
+
+    /**
+     * 从当前时间,计算天数差
+     *
+     * @param days 加或减的天数
+     * @return LocalDate
+     */
+    public static LocalDate getComputeDays(long days) {
+        return getComputeDays(LocalDate.now(), days);
+    }
+
+    /**
+     * 从给定的日期计算天数差
+     *
+     * @param days      加或减的天数
+     * @param localDate 给定的日期
+     * @return LocalDate
+     */
+    public static LocalDate getComputeDays(LocalDate localDate, long days) {
+        return localDate.plusDays(days);
+    }
+
+    /**
+     * 从给定日期时间计算天数差
+     *
+     * @param days          加或减的天数
+     * @param localDateTime 给定的日期时间
+     * @return LocalDate
+     */
+    public static LocalDateTime getComputeDays(LocalDateTime localDateTime, long days) {
+        return localDateTime.plusDays(days);
+    }
+
+
+    /**
+     * 从当前时间,计算天数差
+     *
+     * @param days 加或减的天数
+     * @return LocalDateTime,时间最小值
+     */
+    public static LocalDateTime getComputeDaysStart(long days) {
+        return LocalDateTime.of(getComputeDays(days), LocalTime.MIN);
+    }
+
+    /**
+     * 从当前时间,计算天数差
+     *
+     * @param days 加或减的天数
+     * @return LocalDateTime,时间最大值
+     */
+    public static LocalDateTime getComputeDaysEnd(long days) {
+        return LocalDateTime.of(getComputeDays(days), LocalTime.MAX);
+    }
+
+    /**
+     * 今天开始时间
+     *
+     * @return LocalDateTime yyyy-MM-dd 00:00:00
+     */
+    public static LocalDateTime todayStart() {
+        return LocalDateTime.of(LocalDate.now(), LocalTime.MIN);
+    }
+
+    /**
+     * 今天结束时间
+     *
+     * @return LocalDateTime yyyy-MM-dd 23:59:59
+     */
+    public static LocalDateTime todayEnd() {
+        return LocalDateTime.of(LocalDate.now(), LocalTime.MAX);
+    }
+
+
+    public static List<String> generateDateRange(LocalDate startDate, LocalDate endDate) {
+        List<String> dateRange = new ArrayList<>();
+        LocalDate currentDate = startDate;
+
+        while (!currentDate.isAfter(endDate)) {
+            dateRange.add(formatYMD(currentDate));
+            currentDate = currentDate.plus(1, ChronoUnit.DAYS); // 增加一天
+        }
+        return dateRange;
+    }
+
+    /**
+     * 根据开始时间结束时间 格式化时间范围内的时间
+     *
+     * @param startDate
+     * @param endDate
+     * @return
+     */
+    public static List<String> generateMonthRange(LocalDate startDate, LocalDate endDate) {
+        List<String> dateRange = new ArrayList<>();
+        LocalDate currentDate = startDate;
+
+        while (!currentDate.isAfter(endDate)) {
+            dateRange.add(formatYM(currentDate));
+            currentDate = currentDate.plus(1, ChronoUnit.MONTHS);
+        }
+        return dateRange;
+    }
+
+    public static void main(String[] args) {
+
+        System.out.println(parse("2023-12-11"));
+        System.out.println(getComputeMonthEndDayStr(0));
+    }
+}

+ 795 - 0
slope-common/slope-common-core/src/main/java/com/sckw/core/utils/DateUtils.java

@@ -0,0 +1,795 @@
+package com.sckw.core.utils;
+
+import cn.hutool.core.date.DateUtil;
+import com.sckw.core.exception.BusinessException;
+
+import java.text.DateFormat;
+import java.text.ParseException;
+import java.text.SimpleDateFormat;
+import java.time.*;
+import java.time.format.DateTimeFormatter;
+import java.util.Calendar;
+import java.util.Date;
+import java.util.Objects;
+
+
+/**
+ * 日期处理
+ *
+ * @author
+ */
+public class DateUtils extends DateUtil {
+    /**
+     * 时间格式(yyyy-MM-dd)
+     */
+    public final static String DATE_PATTERN = "yyyy-MM-dd";
+    /**
+     * 时间格式(yyyy-MM-dd HH:mm:ss)
+     */
+    public final static String DATE_TIME_PATTERN = "yyyy-MM-dd HH:mm:ss";
+
+    public static String FORMAT2 = "yyyy-MM-dd HH:mm:ss";
+
+    public static String FORMAT3 = "yyyyMMddHHmmss";
+
+    public static String FORMAT4 = "yyMMddHHmmss";
+
+    public static String FORMAT5 = "yyMMddHHmmssSSS";
+
+    public static String FORMAT6 = "yyyyMMdd";
+
+    public static String FORMAT7 = "yyyy-MM-dd HH:mm";
+
+    public static String FORMAT8 = "yyMMdd";
+
+    public static String FORMAT9 = "yyyy/MM/dd";
+
+    public static String FORMAT10 = "yyyy-MM";
+
+    public static int THIRTEEN = 13;
+
+    /**
+     * 获取时间
+     *
+     * @return 返回当前时间
+     */
+    public static Date getDate() {
+        return new Date();
+    }
+
+    public static String getCurrentTime() {
+        Date day = new Date();
+        SimpleDateFormat df = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
+        System.out.println(df.format(day));
+        return df.format(day);
+    }
+
+    public static String getCurrentTime(String format) {
+        Date day = new Date();
+        SimpleDateFormat df = new SimpleDateFormat(format);
+        System.out.println(df.format(day));
+        return df.format(day);
+    }
+
+    /**
+     * 获取时间
+     *
+     * @param timeStamp 时间戳
+     * @return Date
+     */
+    public static Date getDate(Long timeStamp) {
+        if (timeStamp == null || timeStamp <= 0) {
+            return null;
+        }
+        return new Date(timeStamp);
+    }
+
+    /**
+     * 日期格式化 日期格式为:yyyy-MM-dd
+     *
+     * @param date 日期
+     * @return 返回yyyy-MM-dd格式日期
+     */
+    public static String format(Date date) {
+        return format(date, DATE_PATTERN);
+    }
+
+    /**
+     * 日期格式化 日期格式为:yyyy-MM-dd HH:mm:ss
+     *
+     * @param date 日期
+     * @return 返回yyyy-MM-dd格式日期
+     */
+    public static String formatV1(Date date) {
+        return format(date, DATE_TIME_PATTERN);
+    }
+
+    /**
+     * 日期格式化 日期格式为:yyyy-MM-dd
+     *
+     * @param date    日期
+     * @param pattern 格式,如:DateUtils.DATE_TIME_PATTERN
+     * @return 返回yyyy-MM-dd格式日期
+     */
+    public static String format(Date date, String pattern) {
+        if (date != null) {
+            SimpleDateFormat df = new SimpleDateFormat(pattern);
+            return df.format(date);
+        }
+        return null;
+    }
+
+
+    /**
+     * 日期格式化 日期格式为:yyyy-MM-dd
+     *
+     * @param date 日期
+     * @return 返回yyMMdd格式日期
+     */
+    public static Date formatDate(String date) {
+        try {
+            if (date != null) {
+                SimpleDateFormat df = new SimpleDateFormat(DATE_TIME_PATTERN);
+                return df.parse(date);
+            }
+        } catch (Exception e) {
+            e.printStackTrace();
+        }
+        return null;
+    }
+
+
+    /**
+     * 日期格式化 日期格式为:yyyy-MM-dd
+     *
+     * @param date 日期
+     * @return 返回yyMMdd格式日期
+     */
+    public static String formatDate(Date date) {
+        if (date != null) {
+            SimpleDateFormat df = new SimpleDateFormat(FORMAT8);
+            return df.format(date);
+        }
+        return null;
+    }
+
+
+    /**
+     * 日期格式化 日期格式为:yyyy-MM-dd
+     *
+     * @param expireDate 日期
+     * @return 返回yyMMdd格式日期
+     */
+    public static String formatDateToYYMMDD(Date expireDate) {
+        if (expireDate != null) {
+            String str = new SimpleDateFormat("yyMMdd").format(expireDate);
+            return str;
+        }
+        return null;
+    }
+
+    /**
+     * @param date
+     * @return String    返回类型
+     * @Title: getYear
+     * @Description: TODO(获取YYYY格式)
+     */
+    public static String getYear(Date date) {
+        return format(date, "yyyy");
+    }
+
+    /**
+     * @param date
+     * @return String    返回类型
+     * @Title: getMonth
+     * @Description: 获取月(获取MM格式)
+     */
+    public static String getMonth(Date date) {
+        return format(date, "MM");
+    }
+
+    /**
+     * @param date
+     * @return String    返回类型
+     * @Title: getTheDay
+     * @Description: 获取日期的天(dd格式)
+     */
+    public static String getTheDay(Date date) {
+        return format(date, "dd");
+    }
+
+    /**
+     * 方法描述:将时间转换为制定格式的日期时间字符串
+     *
+     * @param date
+     * @return
+     */
+    public static String dateToString(Date date, String pattern) {
+        SimpleDateFormat df;
+        String returnValue = "";
+
+        if (date != null) {
+            df = new SimpleDateFormat(pattern);
+            returnValue = df.format(date);
+        }
+        return (returnValue);
+    }
+
+    /**
+     * @param beginDateStr
+     * @param endDateStr
+     * @return long    返回类型
+     * @Title: getDaySub
+     * @Description: TODO(功能描述 : 时间相减得到天数)
+     */
+    public static long getDaySub(String beginDateStr, String endDateStr) {
+        long day = 0;
+        SimpleDateFormat format = new SimpleDateFormat(
+                "yyyy-MM-dd");
+        Date beginDate = null;
+        Date endDate = null;
+
+        try {
+            beginDate = format.parse(beginDateStr);
+            endDate = format.parse(endDateStr);
+        } catch (ParseException e) {
+            e.printStackTrace();
+        }
+        day = (endDate.getTime() - beginDate.getTime()) / (24 * 60 * 60 * 1000);
+        // System.out.println("相隔的天数="+day);
+
+        return day;
+    }
+
+    /**
+     * 10位13位时间戳转String 格式(2018-10-15 16:03:27) 日期
+     *
+     * @param timestamp
+     * @param simpleDateFormatType 时间戳类型("yyyy-MM-dd HH:mm:ss")
+     * @return
+     */
+    public static String numberDateFormat(String timestamp, String simpleDateFormatType) {
+        //要转换的时间格式
+        SimpleDateFormat sdf = new SimpleDateFormat(simpleDateFormatType);
+        String date = null;
+        if (timestamp.length() == THIRTEEN) {
+            date = sdf.format(Long.parseLong(timestamp));
+        } else {
+            date = sdf.format(Long.parseLong(timestamp) * 1000);
+        }
+        return date;
+    }
+
+    /**
+     * 10位13位时间戳转Date
+     *
+     * @param timestamp            参数时间戳
+     * @param simpleDateFormatType 时间戳类型("yyyy-MM-dd HH:mm:ss")
+     * @return
+     */
+    public static Date numberDateFormatToDate(String timestamp, String simpleDateFormatType) {
+        //要转换的时间格式
+        SimpleDateFormat sdf = new SimpleDateFormat(simpleDateFormatType);
+        Date date = null;
+        try {
+            if (timestamp.length() == THIRTEEN) {
+                date = sdf.parse(sdf.format(Long.parseLong(timestamp)));
+            } else {
+                date = sdf.parse(sdf.format(Long.parseLong(timestamp) * 1000));
+            }
+        } catch (ParseException e) {
+            e.printStackTrace();
+        }
+        return date;
+    }
+
+    /**
+     * Date转10位13位时间戳
+     *
+     * @param date 参数date
+     * @param n    需要转换成几位时间戳
+     * @return
+     */
+    public static String numberDateFormatToDate(Date date, int n) {
+        String result = null;
+        if (n == THIRTEEN) {
+            result = String.valueOf(date.getTime());
+        } else {
+            result = String.valueOf(date.getTime() / 1000);
+        }
+        return result;
+    }
+
+    /**
+     * @Author:Bernie
+     * @Params: seconds 秒数
+     * @Description: 通过秒数转换为时分秒
+     * @Date: 2019/7/18 0018 16:46
+     */
+    public static String getTimeBySecond(long seconds) {
+        //转换天数
+        long days = seconds / 86400;
+        //剩余秒数
+        seconds = seconds % 86400;
+        //转换小时数
+        long hours = seconds / 3600;
+        //剩余秒数
+        seconds = seconds % 3600;
+        //转换分钟
+        long minutes = seconds / 60;
+        //剩余秒数
+        seconds = seconds % 60;
+        if (0 < days) {
+            return days + "天," + hours + "小时," + minutes + "分," + seconds + "秒";
+        } else {
+            return (hours == 0 ? "00" : (hours >= 10 ? hours : "0" + hours)) + ":" + (minutes == 0 ? "00" : (minutes >= 10 ? minutes : "0" + minutes)) + ":" + (seconds == 0 ? "00" : (seconds >= 10 ? seconds : "0" + seconds)) + "秒";
+        }
+
+    }
+
+    /**
+     * @return java.lang.String
+     * @Description 转换iso格式
+     * @Author CHENJUN
+     * @Date 2020/7/10 14:49
+     * @params [isoDate]
+     */
+    public static long getDateFromISO(String isoDate) {
+        DateFormat sdf = new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ss.SSS'Z'");
+//        DateFormat sd = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
+        try {
+            return sdf.parse(isoDate).getTime();
+        } catch (ParseException e) {
+            e.printStackTrace();
+            return 0;
+        }
+    }
+
+    public static long getDateFromDate(String date) {
+        DateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
+//        DateFormat sd = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
+        try {
+            return sdf.parse(date).getTime();
+        } catch (ParseException e) {
+            e.printStackTrace();
+            return 0;
+        }
+    }
+
+    public static int getDifference(String start, String end) {
+        SimpleDateFormat simpleFormat = new SimpleDateFormat("yyyy-MM-dd");
+        /*天数差*/
+        Date fromDate1 = null, toDate1 = null;
+        try {
+            fromDate1 = simpleFormat.parse(start);
+            toDate1 = simpleFormat.parse(end);
+        } catch (ParseException e) {
+            e.printStackTrace();
+        }
+        long from1 = fromDate1.getTime();
+        long to1 = toDate1.getTime();
+        int days = (int) ((to1 - from1) / (1000 * 60 * 60 * 24));
+        System.out.println("两个时间之间的天数差为:" + days);
+        return days;
+    }
+
+    /**
+     * @return 以小数格式显示的小时
+     * @Description 将毫秒转换成以小数格式显示的小时
+     * @Author SuiYingying
+     * @Date 2021/12/24 14:49
+     * @params time 毫秒格式的时间
+     */
+    public static String getHoursForLong(Long time) {
+        float newTime;
+        time = time / 1000;
+        newTime = (float) time % (1000 * 60 * 60 * 24) / (1000 * 60 * 60);
+        newTime = newTime * 1000;
+        return String.format("%.5f", newTime);
+    }
+
+    /**
+     * 获取当天剩余秒数
+     *
+     * @return
+     */
+    public static Long getSecondsDay() {
+        LocalDateTime nextDay = LocalDate.now().plusDays(1).atStartOfDay();
+        LocalDateTime now = LocalDateTime.now();
+        return Duration.between(now, nextDay).getSeconds();
+    }
+
+    /**
+     * 对日期的【秒】进行加/减
+     *
+     * @param date    日期
+     * @param seconds 秒数,负数为减
+     * @return 加/减几秒后的日期
+     */
+    public static Date addDateSeconds(Date date, int seconds) {
+        Calendar cal = Calendar.getInstance();
+        cal.setTime(date);
+        cal.add(Calendar.MINUTE, seconds);
+        return cal.getTime();
+    }
+
+    /**
+     * 对日期的【分钟】进行加/减
+     *
+     * @param date    日期
+     * @param minutes 分钟数,负数为减
+     * @return 加/减几分钟后的日期
+     */
+    public static Date addDateMinutes(Date date, int minutes) {
+        Calendar cal = Calendar.getInstance();
+        cal.setTime(date);
+        cal.add(Calendar.MINUTE, minutes);
+        return cal.getTime();
+    }
+
+    /**
+     * 对日期的【小时】进行加/减
+     *
+     * @param date  日期
+     * @param hours 小时数,负数为减
+     * @return 加/减几小时后的日期
+     */
+    public static Date addDateHours(Date date, int hours) {
+        Calendar cal = Calendar.getInstance();
+        cal.setTime(date);
+        cal.add(Calendar.HOUR, hours);
+        return cal.getTime();
+    }
+
+    /**
+     * 对日期的【天】进行加/减
+     *
+     * @param date 日期
+     * @param days 天数,负数为减
+     * @return 加/减几天后的日期
+     */
+    public static Date addDateDays(Date date, int days) {
+        Calendar cal = Calendar.getInstance();
+        cal.setTime(date);
+        cal.add(Calendar.DATE, days);
+        return cal.getTime();
+    }
+
+    /**
+     * 对日期的【周】进行加/减
+     *
+     * @param date  日期
+     * @param weeks 周数,负数为减
+     * @return 加/减几周后的日期
+     */
+    public static Date addDateWeeks(Date date, int weeks) {
+        Calendar cal = Calendar.getInstance();
+        cal.setTime(date);
+        cal.add(Calendar.DATE, weeks * 7);
+        return cal.getTime();
+    }
+
+    /**
+     * 对日期的【月】进行加/减
+     *
+     * @param date   日期
+     * @param months 月数,负数为减
+     * @return 加/减几月后的日期
+     */
+    public static Date addDateMonths(Date date, int months) {
+        Calendar cal = Calendar.getInstance();
+        cal.setTime(date);
+        cal.add(Calendar.MONTH, months);
+        return cal.getTime();
+    }
+
+    /**
+     * 对日期的【年】进行加/减
+     *
+     * @param date  日期
+     * @param years 年数,负数为减
+     * @return 加/减几年后的日期
+     */
+    public static Date addDateYears(Date date, int years) {
+        Calendar cal = Calendar.getInstance();
+        cal.setTime(date);
+        cal.add(Calendar.YEAR, years);
+        return cal.getTime();
+    }
+
+    /**
+     * 时间比较大小
+     *
+     * @param date1 日期
+     * @param date2 年数,负数为减
+     * @return -1 date1小于date2、0 date1等于date2、1 date1大于date2
+     */
+    public static int compareTo(Date date1, Date date2) {
+        return date1.compareTo(date2);
+    }
+
+    public static void main(String[] ager) throws InterruptedException {
+        System.out.println(getEndOfDay(new Date()));
+    }
+
+    /**
+     * ltf 获取
+     * 获取指定日期所在周的周一
+     *
+     * @param date
+     * @return
+     */
+    public static Date getFirstDayOfWeek(Date date) {
+        Calendar c = Calendar.getInstance();
+        c.setTime(date);
+        if (c.get(Calendar.DAY_OF_WEEK) == 1) {
+            c.add(Calendar.DAY_OF_MONTH, -1);
+        }
+        c.add(Calendar.DATE, c.getFirstDayOfWeek() - c.get(Calendar.DAY_OF_WEEK) + 1);
+        return c.getTime();
+    }
+
+    /**
+     * 获取startDate日期后month月的日期
+     *
+     * @param startDate 开始日期
+     * @param month     几个月后
+     * @return
+     * @author wenzhang
+     */
+    public static Date getMonthDate(Date startDate, int month) {
+        LocalDateTime localDateTime = startDate.toInstant()
+                .atZone(ZoneId.systemDefault())
+                .toLocalDateTime().plusMonths(month);
+        Date date = Date.from(localDateTime.atZone(ZoneId.systemDefault()).toInstant());
+        return date;
+    }
+
+    /**
+     * @param days
+     * @return
+     * @author wenzhang
+     */
+    public static Date getDateAdd(int days) {
+        SimpleDateFormat sf = new SimpleDateFormat("yyyy-MM-dd");
+        Calendar c = Calendar.getInstance();
+        c.add(Calendar.DAY_OF_MONTH, days);
+        return c.getTime();
+
+    }
+
+    /**
+     * 计算两个日期的月数
+     *
+     * @param startDate
+     * @param endDate
+     * @return
+     */
+    public static int getMonthSpace(String startDate, String endDate) throws Exception {
+        int monthCount = 0;
+        Calendar startCalendar = Calendar.getInstance();
+        Calendar endCalendar = Calendar.getInstance();
+        startCalendar.setTime(new SimpleDateFormat("yyyy-MM-dd").parse(startDate));
+        endCalendar.setTime(new SimpleDateFormat("yyyy-MM-dd").parse(endDate));
+
+        int year = endCalendar.get(Calendar.YEAR) - startCalendar.get(Calendar.YEAR);
+        int month = endCalendar.get(Calendar.MONTH) - startCalendar.get(Calendar.MONTH);
+        int day = Math.abs(endCalendar.get(Calendar.DATE) - startCalendar.get(Calendar.DATE));
+
+        if (year == 0 && month == 0) {
+            startCalendar.set(Calendar.DATE, 1);
+            endCalendar.set(Calendar.DATE, 1);
+            endCalendar.roll(Calendar.DATE, -1);
+            if (day == (endCalendar.get(Calendar.DATE) - startCalendar.get(Calendar.DATE))) {
+                // 两日期间满一个月
+                monthCount = 1;
+            } else {
+                // 两日期间不足一个月
+                monthCount = 0;
+            }
+            // 年份不同月份相同
+        } else if (year != 0 && month == 0) {
+            // 两日期间的天数,小于等于当月
+            if (startCalendar.get(Calendar.DATE) < endCalendar.get(Calendar.DATE)) {
+                monthCount = 1;
+            }
+            monthCount += year * 12 + month;
+        } else {
+            // 起始日期DATE 大于等于结束日期DATE
+            if (startCalendar.get(Calendar.DATE) >= endCalendar.get(Calendar.DATE)) {
+                monthCount = year * 12 + month;
+            } else {
+                monthCount = year * 12 + month + 1;
+            }
+        }
+
+        return monthCount;
+    }
+
+    /**
+     * @desc: 获取指定时间的1日/2周/3月/4年开始时间
+     * @author: yzc
+     * @date: 2023-09-12 10:20
+     * @Param dateType:
+     * @Param time:
+     * @return: java.util.Date
+     */
+    public static Date getStartTime(Integer dateType, LocalDateTime time) {
+        LocalDateTime startTime;
+        if (Objects.equals(dateType, 1)) {
+            startTime = LocalDateTime.of(time.toLocalDate(), LocalTime.MIN);
+        } else if (Objects.equals(dateType, 2)) {
+            startTime = LocalDateTime.of(time.toLocalDate().minusDays(6), LocalTime.MIN);
+        } else if (Objects.equals(dateType, 3)) {
+            startTime = LocalDateTime.of(time.toLocalDate().minusMonths(1).plusDays(1), LocalTime.MIN);
+        } else {
+            startTime = LocalDateTime.of(time.toLocalDate().minusYears(1).plusDays(1), LocalTime.MIN);
+        }
+        return formatDate(startTime);
+    }
+
+    /**
+     * @desc: 获取上1日/2周/3月/4年结束时间
+     * @author: yzc
+     * @date: 2023-09-12 10:21
+     * @Param dateType:
+     * @return: java.util.Date
+     */
+    public static Date getLastEndTime(Integer dateType) {
+        LocalDateTime endTime;
+        if (Objects.equals(dateType, 1)) {
+            endTime = LocalDateTime.of(LocalDate.now().minusDays(1), LocalTime.MAX);
+        } else if (Objects.equals(dateType, 2)) {
+            endTime = LocalDateTime.of(LocalDate.now().minusDays(7), LocalTime.MAX);
+        } else if (Objects.equals(dateType, 3)) {
+            endTime = LocalDateTime.of(LocalDate.now().minusMonths(1), LocalTime.MAX);
+        } else {
+            endTime = LocalDateTime.of(LocalDate.now().minusYears(1), LocalTime.MAX);
+        }
+        return formatDate(endTime);
+    }
+
+    /**
+     * @desc: 获取当前时间倒推一年开始时间
+     * @author: yzc
+     * @date: 2023-09-13 10:29
+     * @return: java.util.Date
+     */
+    public static Date getYearStartTime() {
+        //当前时间减去11个月
+        LocalDate localDate = LocalDate.now().minusMonths(11);
+        //获取localDate当月第一天
+        LocalDate date = LocalDate.of(localDate.getYear(), localDate.getMonth(), 1);
+        return formatDate(date.atStartOfDay());
+    }
+
+    /**
+     * @desc: 获取日期转换格式
+     * @author: yzc
+     * @date: 2023-09-13 9:32
+     * @Param dateType:  1日/3月/4年
+     * @return: java.lang.String
+     */
+    public static String getDateFormat(Integer dateType) {
+        String dateFormat;
+        switch (dateType) {
+            case 1 -> dateFormat = "%Y-%m-%d";
+            case 3 -> dateFormat = "%Y-%m";
+            case 4 -> dateFormat = "%Y";
+            default -> throw new BusinessException("Invalid dateType");
+        }
+        return dateFormat;
+    }
+
+    /**
+     * @desc: LocalDateTime转换为Date
+     * @author: yzc
+     * @date: 2023-09-11 16:42
+     * @Param time:
+     * @return: java.util.Date
+     */
+    public static Date formatDate(LocalDateTime time) {
+        if (Objects.isNull(time)) {
+            return null;
+        }
+        return Date.from(time.atZone(ZoneId.systemDefault()).toInstant());
+    }
+
+    /**
+     * @desc: date转换为LocalDate
+     * @author: yzc
+     * @date: 2023-09-13 15:14
+     * @Param date:
+     * @return: java.time.LocalDate
+     */
+    public static LocalDate dateToLocalDate(Date date) {
+        if (Objects.isNull(date)) {
+            return null;
+        }
+        return date.toInstant().atZone(ZoneId.systemDefault()).toLocalDate();
+    }
+
+    /**
+     * @desc: localDate转换为String
+     * @author: yzc
+     * @date: 2023-09-13 15:21
+     * @Param date:
+     * @Param pattern:
+     * @return: java.lang.String
+     */
+    public static String localDateToString(LocalDate date, String pattern) {
+        if (Objects.isNull(date)) {
+            return null;
+        }
+        DateTimeFormatter fmt = DateTimeFormatter.ofPattern(pattern);
+        return date.format(fmt);
+    }
+
+    /**
+     * @desc: localDate转换为date 开始时间
+     * @author: yzc
+     * @date: 2023-09-27 9:52
+     * @Param localDate:
+     * @return: java.util.Date
+     */
+    public static Date localDateToDateStart(LocalDate localDate) {
+        if (Objects.isNull(localDate)) {
+            return null;
+        }
+        LocalDateTime time = LocalDateTime.of(localDate, LocalTime.MIN);
+        return formatDate(time);
+    }
+
+    /**
+     * @desc: 一天的开始时间
+     * @author: yzc
+     * @date: 2023-09-27 9:52
+     */
+    public static Date getStartOfDay(Date date) {
+        String dateStr = format(date, DATE_PATTERN);
+        return parse(dateStr, DATE_PATTERN);
+    }
+
+    /**
+     * @desc: 一天的开始时间
+     * @author: yzc
+     * @date: 2023-09-27 9:52
+     */
+    public static Date getStartOfDay(Date date, String format) {
+        if (Objects.isNull(date)) {
+            return null;
+        }
+        String dateStr = format(date, format);
+        return parse(dateStr, format);
+    }
+
+    /**
+     * @desc: 一天的结束时间
+     * @author: yzc
+     * @date: 2023-09-27 9:52
+     */
+    public static Date getEndOfDay(Date date) {
+        if (Objects.isNull(date)) {
+            return null;
+        }
+        String dateStr = format(date, DATE_PATTERN);
+        return parse(dateStr + " 23:59:59", DATE_TIME_PATTERN);
+    }
+
+
+
+    /**
+     * @desc: localDate转换为date 结束时间
+     * @author: yzc
+     * @date: 2023-09-27 9:52
+     * @Param localDate:
+     * @return: java.util.Date
+     */
+    public static Date localDateToDateEnd(LocalDate localDate) {
+        if (Objects.isNull(localDate)) {
+            return null;
+        }
+        LocalDateTime time = LocalDateTime.of(localDate, LocalTime.MAX).withNano(0);
+        return formatDate(time);
+    }
+}

+ 147 - 0
slope-common/slope-common-core/src/main/java/com/sckw/core/utils/Digests.java

@@ -0,0 +1,147 @@
+/**
+ * Copyright (c) 2005-2012 springside.org.cn
+ */
+package com.sckw.core.utils;
+
+import org.apache.commons.lang3.Validate;
+import java.io.IOException;
+import java.io.InputStream;
+import java.security.GeneralSecurityException;
+import java.security.MessageDigest;
+import java.security.SecureRandom;
+
+/**
+ * 支持SHA-1/MD5消息摘要的工具类.
+ * 返回ByteSource,可进一步被编码为Hex, Base64或UrlSafeBase64
+ * @author calvin
+ */
+public class Digests {
+
+	private static final String SHA1 = "SHA-1";
+	private static final String MD5 = "MD5";
+
+	private static SecureRandom random = new SecureRandom();
+
+	/**
+	 * 对输入字符串进行md5散列.
+	 */
+	public static byte[] md5(byte[] input) {
+		return digest(input, MD5, null, 1);
+	}
+	public static byte[] md5(byte[] input, int iterations) {
+		return digest(input, MD5, null, iterations);
+	}
+	
+	/**
+	 * 对输入字符串进行sha1散列.
+	 */
+	public static byte[] sha1(byte[] input) {
+		return digest(input, SHA1, null, 1);
+	}
+
+	public static byte[] sha1(byte[] input, byte[] salt) {
+		return digest(input, SHA1, salt, 1);
+	}
+
+	public static byte[] sha1(byte[] input, byte[] salt, int iterations) {
+		return digest(input, SHA1, salt, iterations);
+	}
+
+	/**
+	 * 对字符串进行散列, 支持md5与sha1算法.
+	 */
+	private static byte[] digest(byte[] input, String algorithm, byte[] salt, int iterations) {
+		try {
+			MessageDigest digest = MessageDigest.getInstance(algorithm);
+
+			if (salt != null) {
+				digest.update(salt);
+			}
+
+			byte[] result = digest.digest(input);
+
+			for (int i = 1; i < iterations; i++) {
+				digest.reset();
+				result = digest.digest(result);
+			}
+			return result;
+		} catch (GeneralSecurityException e) {
+            e.printStackTrace();
+            return null;
+		}
+	}
+
+	/**
+	 * 生成随机的Byte[]作为salt.
+	 * 
+	 * @param numBytes byte数组的大小
+	 */
+	public static byte[] generateSalt(int numBytes) {
+		Validate.isTrue(numBytes > 0, "numBytes argument must be a positive integer (1 or larger)", numBytes);
+
+		byte[] bytes = new byte[numBytes];
+		random.nextBytes(bytes);
+		return bytes;
+	}
+
+	/**
+	 * 对文件进行md5散列.
+	 */
+	public static byte[] md5(InputStream input) throws IOException {
+		return digest(input, MD5);
+	}
+
+	/**
+	 * 对文件进行sha1散列.
+	 */
+	public static byte[] sha1(InputStream input) throws IOException {
+		return digest(input, SHA1);
+	}
+
+	private static byte[] digest(InputStream input, String algorithm) throws IOException {
+		try {
+			MessageDigest messageDigest = MessageDigest.getInstance(algorithm);
+			int bufferLength = 8 * 1024;
+			byte[] buffer = new byte[bufferLength];
+			int read = input.read(buffer, 0, bufferLength);
+
+			while (read > -1) {
+				messageDigest.update(buffer, 0, read);
+				read = input.read(buffer, 0, bufferLength);
+			}
+
+			return messageDigest.digest();
+		} catch (GeneralSecurityException e) {
+            e.printStackTrace();
+            return null;
+		}
+	}
+	
+	public static String string2MD5(String inStr){  
+        MessageDigest md5 = null;  
+        try{  
+            md5 = MessageDigest.getInstance("MD5");  
+        }catch (Exception e){  
+            System.out.println(e.toString());  
+            e.printStackTrace();  
+            return "";  
+        }  
+        char[] charArray = inStr.toCharArray();  
+        byte[] byteArray = new byte[charArray.length];  
+  
+        for (int i = 0; i < charArray.length; i++) {
+            byteArray[i] = (byte) charArray[i];
+        }
+        byte[] md5Bytes = md5.digest(byteArray);  
+        StringBuffer hexValue = new StringBuffer();  
+        for (int i = 0; i < md5Bytes.length; i++){  
+            int val = ((int) md5Bytes[i]) & 0xff;  
+            if (val < 16) {
+                hexValue.append("0");
+            }
+            hexValue.append(Integer.toHexString(val));  
+        }  
+        return hexValue.toString();  
+  
+    }  
+}

+ 153 - 0
slope-common/slope-common-core/src/main/java/com/sckw/core/utils/Encodes.java

@@ -0,0 +1,153 @@
+/**
+ * Copyright (c) 2005-2012 springside.org.cn
+ */
+package com.sckw.core.utils;
+
+import org.apache.commons.codec.DecoderException;
+import org.apache.commons.codec.binary.Base64;
+import org.apache.commons.codec.binary.Hex;
+import org.apache.commons.lang3.StringEscapeUtils;
+import java.io.UnsupportedEncodingException;
+import java.net.URLDecoder;
+import java.net.URLEncoder;
+
+/**
+ * 封装各种格式的编码解码工具类.
+ * 1.Commons-Codec的 hex/base64 编码
+ * 2.自制的base62 编码
+ * 3.Commons-Lang的xml/html escape
+ * 4.JDK提供的URLEncoder
+ * @author calvin
+ * @version 2013-01-15
+ */
+public class Encodes {
+
+	private static final String DEFAULT_URL_ENCODING = "UTF-8";
+	private static final char[] BASE62 = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz".toCharArray();
+
+	/**
+	 * Hex编码.
+	 */
+	public static String encodeHex(byte[] input) {
+		return new String(Hex.encodeHex(input));
+	}
+
+	/**
+	 * Hex解码.
+	 */
+	public static byte[] decodeHex(String input) {
+		try {
+			return Hex.decodeHex(input.toCharArray());
+		} catch (DecoderException e) {
+			e.printStackTrace();
+		}
+		return null;
+	}
+
+	/**
+	 * Base64编码.
+	 */
+	public static String encodeBase64(byte[] input) {
+		return new String(Base64.encodeBase64(input));
+	}
+	
+	/**
+	 * Base64编码.
+	 */
+	public static String encodeBase64(String input) {
+		try {
+			return new String(Base64.encodeBase64(input.getBytes(DEFAULT_URL_ENCODING)));
+		} catch (UnsupportedEncodingException e) {
+			return "";
+		}
+	}
+
+//	/**
+//	 * Base64编码, URL安全(将Base64中的URL非法字符'+'和'/'转为'-'和'_', 见RFC3548).
+//	 */
+//	public static String encodeUrlSafeBase64(byte[] input) {
+//		return Base64.encodeBase64URLSafe(input);
+//	}
+
+	/**
+	 * Base64解码.
+	 */
+	public static byte[] decodeBase64(String input) {
+		return Base64.decodeBase64(input.getBytes());
+	}
+	
+	/**
+	 * Base64解码.
+	 */
+	public static String decodeBase64String(String input) {
+		try {
+			return new String(Base64.decodeBase64(input.getBytes()), DEFAULT_URL_ENCODING);
+		} catch (UnsupportedEncodingException e) {
+			return "";
+		}
+	}
+
+	/**
+	 * Base62编码。
+	 */
+	public static String encodeBase62(byte[] input) {
+		char[] chars = new char[input.length];
+		for (int i = 0; i < input.length; i++) {
+			chars[i] = BASE62[((input[i] & 0xFF) % BASE62.length)];
+		}
+		return new String(chars);
+	}
+
+	/**
+	 * Html 转码.
+	 */
+	public static String escapeHtml(String html) {
+		return StringEscapeUtils.escapeHtml4(html);
+	}
+
+	/**
+	 * Html 解码.
+	 */
+	public static String unescapeHtml(String htmlEscaped) {
+		return StringEscapeUtils.unescapeHtml4(htmlEscaped);
+	}
+
+	/**
+	 * Xml 转码.
+	 */
+	public static String escapeXml(String xml) {
+		return StringEscapeUtils.escapeXml10(xml);
+	}
+
+	/**
+	 * Xml 解码.
+	 */
+	public static String unescapeXml(String xmlEscaped) {
+		return StringEscapeUtils.unescapeXml(xmlEscaped);
+	}
+
+	/**
+	 * URL 编码, Encode默认为UTF-8. 
+	 */
+	public static String urlEncode(String part) {
+		try {
+			return URLEncoder.encode(part, DEFAULT_URL_ENCODING);
+		} catch (UnsupportedEncodingException e) {
+			e.printStackTrace();
+		}
+		return null;
+	}
+
+	/**
+	 * URL 解码, Encode默认为UTF-8. 
+	 */
+	public static String urlDecode(String part) {
+
+		try {
+			return URLDecoder.decode(part, DEFAULT_URL_ENCODING);
+		} catch (UnsupportedEncodingException e) {
+			e.printStackTrace();
+		}
+		return null;
+	}
+}

+ 322 - 0
slope-common/slope-common-core/src/main/java/com/sckw/core/utils/EncryUtil.java

@@ -0,0 +1,322 @@
+package com.sckw.core.utils;
+
+import com.alibaba.fastjson.JSON;
+import com.alibaba.fastjson.JSONObject;
+import com.sckw.core.model.constant.Global;
+import jakarta.servlet.http.HttpServletRequest;
+import org.bouncycastle.util.encoders.Hex;
+import javax.crypto.Cipher;
+import javax.crypto.KeyGenerator;
+import javax.crypto.SecretKey;
+import javax.crypto.spec.SecretKeySpec;
+import java.security.Key;
+import java.util.*;
+
+/**
+ * @author dengyinghui
+ * @create 2019-02-27
+ * @description 加密工具类
+ */
+public class EncryUtil {
+    /**可调用EncryUtil.generatorPriKey()方法生成*/
+    public static final String PRI_KEY = "127f0400ff8a8b7a20d91dfc60a39725";
+    /**API签名铭文*/
+    public static final String SIGN_KEY = "sign";
+    /**API签名公钥*/
+    public static final String ACCESS_KEY = "accessKey";
+    /**API签名私钥*/
+    public static final String ACCESS_SECRET = "accessSecret";
+
+    /**
+     * 私钥生成器
+     * @author dengyinghui
+     * #date 2019/02/27
+     * @return
+     */
+    public static String generatorPriKey() throws Exception{
+        //生成Key
+        KeyGenerator keyGenerator = KeyGenerator.getInstance("AES");
+        keyGenerator.init(128);
+        SecretKey secretKey = keyGenerator.generateKey();
+        byte[] keyBytes = secretKey.getEncoded();
+        String priKey = toHexString(keyBytes);
+        return priKey;
+    }
+
+
+    /**
+     * 加密
+     * @param appSecret 私钥
+     * @param orginStr 原始加密参数
+     * @author dengyinghui
+     * #date 2019/02/27
+     * @return
+     */
+    public static String encry(String appSecret, String orginStr) throws Exception{
+        Cipher cipher = Cipher.getInstance("AES/ECB/PKCS5Padding");
+        Key key = new SecretKeySpec(toByteArray(appSecret), "AES");
+        cipher.init(Cipher.ENCRYPT_MODE, key);
+        byte[] encodeResult = cipher.doFinal(orginStr.getBytes());
+        return Hex.toHexString(encodeResult);
+    }
+
+
+    /**
+     * 加密
+     * @param appSecret 私钥
+     * @param jsonObject 原始加密参数
+     * @author dengyinghui
+     * #date 2019/02/27
+     * @return
+     */
+    public static String encry(String appSecret, JSONObject jsonObject) throws Exception{
+        Cipher cipher = Cipher.getInstance("AES/ECB/PKCS5Padding");
+        Key key = new SecretKeySpec(toByteArray(appSecret), "AES");
+        cipher.init(Cipher.ENCRYPT_MODE, key);
+        byte[] encodeResult = cipher.doFinal(jsonObject.toJSONString().getBytes());
+        return Hex.toHexString(encodeResult);
+    }
+
+
+    /**
+     * 加密
+     * @param appSecret 私钥
+     * @param orginStr 原始加密参数
+     * @author dengyinghui
+     * #date 2019/02/27
+     * @return
+     */
+    public static String encryV1(String appSecret, String orginStr){
+        try {
+            Cipher cipher = Cipher.getInstance("AES/ECB/PKCS5Padding");
+            Key key = new SecretKeySpec(toByteArray(appSecret), "AES");
+            cipher.init(Cipher.ENCRYPT_MODE, key);
+            byte[] encodeResult = cipher.doFinal(orginStr.getBytes());
+            return Hex.toHexString(encodeResult);
+        } catch (Exception e) {
+            e.printStackTrace();
+            return null;
+        }
+    }
+
+
+    /**
+     *  字节数组转成16进制表示格式的字符串
+     * @author dengyinghui
+     * #date 2019/02/27
+     * @return
+     */
+    public static String toHexString(byte[] byteArray) {
+        if (byteArray == null || byteArray.length < 1){
+            throw new IllegalArgumentException("this byteArray must not be null or empty");
+        }
+
+        final StringBuilder hexString = new StringBuilder();
+        for (int i = 0; i < byteArray.length; i++) {
+            if ((byteArray[i] & 0xff) < 0x10){
+                hexString.append("0");
+            }
+
+            hexString.append(Integer.toHexString(0xFF & byteArray[i]));
+        }
+        return hexString.toString().toLowerCase();
+    }
+
+
+    /**
+     *  16进制的字符串表示转成字节数组
+     * @author dengyinghui
+     * #date 2019/02/27
+     * @return
+     */
+    public static byte[] toByteArray(String hexString) {
+        if (org.apache.commons.lang3.StringUtils.isEmpty(hexString)){
+            throw new IllegalArgumentException("this hexString must not be empty");
+        }
+
+        hexString = hexString.toLowerCase();
+        final byte[] byteArray = new byte[hexString.length() / 2];
+        int k = 0;
+        //因为是16进制,最多只会占用4位,转换成字节需要两个16进制的字符,高位在先
+        for (int i = 0; i < byteArray.length; i++) {
+            byte high = (byte) (Character.digit(hexString.charAt(k), 16) & 0xff);
+            byte low = (byte) (Character.digit(hexString.charAt(k + 1), 16) & 0xff);
+            byteArray[i] = (byte) (high << 4 | low);
+            k += 2;
+        }
+        return byteArray;
+    }
+
+
+    /**
+     * 解密
+     * @param appSecret 私钥
+     * @param encryStr 加密了的字符串
+     * @author dengyinghui
+     * #date 2019/02/27
+     * @return
+     */
+    public synchronized static String descry(String appSecret, String encryStr) throws Exception {
+        Key key = new SecretKeySpec(toByteArray(appSecret), "AES");
+        Cipher cipher = Cipher.getInstance("AES/ECB/PKCS5Padding");
+        cipher.init(Cipher.DECRYPT_MODE, key);
+        byte[] decodeResult = cipher.doFinal(org.apache.commons.codec.binary.Hex.decodeHex(encryStr));
+        return new String(decodeResult);
+    }
+
+
+    /**
+     * 解密
+     * @param appSecret 私钥
+     * @param encryStr 加密了的字符串
+     * @author dengyinghui
+     * #date 2019/02/27
+     * @return
+     */
+    public synchronized static String descryV1(String appSecret, String encryStr) {
+        try {
+            Key key = new SecretKeySpec(toByteArray(appSecret), "AES");
+            Cipher cipher = Cipher.getInstance("AES/ECB/PKCS5Padding");
+            cipher.init(Cipher.DECRYPT_MODE, key);
+            byte[] decodeResult = cipher.doFinal(org.apache.commons.codec.binary.Hex.decodeHex(encryStr));
+            return new String(decodeResult);
+        } catch (Exception e) {
+            e.printStackTrace();
+            return null;
+        }
+    }
+
+
+    /**
+     * 解密
+     * @param appSecret 私钥
+     * @param encryStr 加密了的字符串
+     * @author dengyinghui
+     * #date 2019/02/27
+     * @return
+     */
+    public synchronized static Map<String, Object> descryV2(String appSecret, String encryStr) {
+        try {
+            Key key = new SecretKeySpec(toByteArray(appSecret), "AES");
+            Cipher cipher = Cipher.getInstance("AES/ECB/PKCS5Padding");
+            cipher.init(Cipher.DECRYPT_MODE, key);
+            byte[] decodeResult = cipher.doFinal(org.apache.commons.codec.binary.Hex.decodeHex(encryStr));
+            String decodeStr = new String(decodeResult);
+
+            return JSON.parseObject(decodeStr, HashMap.class);
+        } catch (Exception e) {
+            e.printStackTrace();
+            return null;
+        }
+    }
+
+
+    /**
+     * 解密
+     * @param appSecret 私钥
+     * @param encryStr 加密了的字符串
+     * @author dengyinghui
+     * #date 2019/02/27
+     * @return
+     */
+    public static JSONObject descryJson(String appSecret, String encryStr) throws Exception {
+        String json = EncryUtil.descry(Global.PRI_KEY, encryStr);
+        return JSON.parseObject(json);
+    }
+
+
+    /**
+     * @description 校验
+     * @author zk
+     * @date 2020/8/15 15:15
+     * @param
+     * @return
+     **/
+    public static boolean checkSign(Map<String, Object> data, String accessSecret) {
+        String originSign = null;
+        Map params = CollectionUtils.createHashMap();
+        for (Map.Entry<String, Object> entry : data.entrySet()) {
+            if (SIGN_KEY.equals(entry.getKey())){
+                originSign = StringUtils.objectStr(entry.getValue());
+                continue;
+            }
+            if (ACCESS_KEY.equals(entry.getKey())){
+                continue;
+            }
+            params.put(entry.getKey(), entry.getValue());
+        }
+
+        String sign = createSign(params, accessSecret);
+        return sign.equals(originSign);
+    }
+
+
+    /**
+     * @description 校验
+     * @author zk
+     * @date 2020/8/17 17:45
+     * @param
+     * @return
+     **/
+    public static boolean checkSign(HttpServletRequest request, String accessSecret) {
+        Enumeration<?> pNames = request.getParameterNames();
+        Map<String, Object> params = new HashMap<>(Global.NUMERICAL_SIXTEEN);
+        while (pNames.hasMoreElements()) {
+            String pName = (String) pNames.nextElement();
+            if (SIGN_KEY.equals(pName)) {
+                continue;
+            }
+            Object pValue = request.getParameter(pName);
+            params.put(pName, pValue);
+        }
+
+        return checkSign(params, accessSecret);
+    }
+
+
+    /**
+     * @description 生成签名
+     * @author zk
+     * @date 2020/8/15 15:14
+     * @param {params:请求参数,accessSecret 私钥}
+     * @return
+     **/
+    public static String createSign(Map<String, Object> params, String accessSecret) {
+        Set<String> keysSet = params.keySet();
+        Object[] keys = keysSet.toArray();
+        Arrays.sort(keys);
+        StringBuilder temp = new StringBuilder();
+        boolean first = true;
+        for (Object key : keys) {
+            if (first) {
+                first = false;
+            } else {
+                temp.append("&");
+            }
+            temp.append(key).append("=");
+            Object value = params.get(key);
+            String valueString = "";
+            if (null != value) {
+                valueString = String.valueOf(value);
+            }
+            temp.append(valueString);
+        }
+        temp.append("&").append(ACCESS_SECRET).append("=").append(accessSecret);
+        //LogUtil.debug("参数:" + temp.toString());
+        return PasswordUtils.md5(temp.toString()).toUpperCase();
+    }
+
+    public static void main(String [] age)  {
+        long timeStamp = System.currentTimeMillis();
+        Map<String, Object> params = CollectionUtils.createHashMap();
+        params.put("subtaskId", "SDT2008020000301");
+        params.put("goodsName", "工业级碳酸乙烯酯");
+        params.put("grossWeight", "47.7800");
+        params.put("netWeight", "17.6800");
+        params.put("weight", "30.0000");
+        params.put("timeStamp", "1597890005658");
+        String singStr = createSign(params, "xinyuan20200819");
+        System.out.println("sign:" +singStr);
+        System.out.println("timeStamp:" +timeStamp);
+    }
+}

+ 123 - 0
slope-common/slope-common-core/src/main/java/com/sckw/core/utils/EncryptionUtil.java

@@ -0,0 +1,123 @@
+package com.sckw.core.utils;
+
+import java.io.UnsupportedEncodingException;
+import java.security.MessageDigest;
+import java.security.NoSuchAlgorithmException;
+
+/**
+ * 加密
+ * @author zk
+ * @date 2019-12-29
+ */
+public class EncryptionUtil {
+
+	private final static String[] HEX_DIGITS = { "0", "1", "2", "3", "4", "5", "6", "7", "8", "9", "a", "b", "c", "d","e", "f" };
+	private final static String MD5 = "MD5";
+	private final static String SHA = "SHA";
+	private final static String SHA256 = "SHA-256";
+
+	private Object salt;
+	private String algorithm;
+
+	public EncryptionUtil() {
+
+	}
+
+	public EncryptionUtil(Object salt) {
+		this(salt, MD5);
+	}
+	
+	public EncryptionUtil(Object salt, String algorithm) {
+		this.salt = salt;
+		this.algorithm = algorithm;
+	}
+
+	/**
+	 * 加密
+	 * @param params
+	 * @return
+	 */
+	public String encode(String params) {
+		String result = null;
+		try {
+			MessageDigest md = MessageDigest.getInstance(algorithm);
+			// 加密后的字符串
+			result = byteArrayToHexString(md.digest(mergeEncryptionAndSalt(params).getBytes("utf-8")));
+		} catch (Exception ex) {
+		}
+		return result;
+	}
+
+	/**
+	 * 密码匹配验证
+	 * @param encParams 密文
+	 * @param rawParams 明文
+	 * @return
+	 */
+	public boolean matches(String encParams, String rawParams) {
+		String pass1 = "" + encParams;
+		String pass2 = encode(rawParams);
+		return pass1.equals(pass2);
+	}
+
+	private String mergeEncryptionAndSalt(String params) {
+		if (params == null) {
+			params = "";
+		}
+
+		if ((salt == null) || "".equals(salt)) {
+			return params;
+		} else {
+			return params + "{" + salt.toString() + "}";
+		}
+	}
+
+	/**
+	 * 转换字节数组为16进制字串
+	 * @param b 字节数组
+	 * @return 16进制字串
+	 */
+	private String byteArrayToHexString(byte[] b) {
+		StringBuffer resultSb = new StringBuffer();
+		for (int i = 0; i < b.length; i++) {
+			resultSb.append(byteToHexString(b[i]));
+		}
+		return resultSb.toString();
+	}
+
+	/**
+	 * 将字节转换为16进制
+	 * @param b
+	 * @return
+	 */
+	private static String byteToHexString(byte b) {
+		int n = b;
+		if (n < 0) {
+			n = 256 + n;
+		}
+		int d1 = n / 16;
+		int d2 = n % 16;
+		return HEX_DIGITS[d1] + HEX_DIGITS[d2];
+	}
+
+	/**
+	 * SHA-256加密
+	 * @param str
+	 * @return
+	 */
+	public String getSHA256Str(String str){
+		MessageDigest messageDigest;
+		String encodeStr = "";
+		try {
+			messageDigest = MessageDigest.getInstance(SHA256);
+			messageDigest.update(str.getBytes("UTF-8"));
+			encodeStr = byteArrayToHexString(messageDigest.digest());
+		} catch (NoSuchAlgorithmException e) {
+			e.printStackTrace();
+		} catch (UnsupportedEncodingException e) {
+			e.printStackTrace();
+		}
+		return encodeStr;
+	}
+
+}

+ 114 - 0
slope-common/slope-common-core/src/main/java/com/sckw/core/utils/IdWorker.java

@@ -0,0 +1,114 @@
+package com.sckw.core.utils;
+
+/**
+ * 雪花算法生成ID
+ */
+public class IdWorker {
+    /** 开始时间截 (建议用服务第一次上线的时间,到毫秒级的时间戳) */
+    private final long twepoch = 1651070159429L;
+
+    /** 机器id所占的位数 */
+    private final long workerIdBits = 10L;
+
+    /** 支持的最大机器id,结果是1023 (这个移位算法可以很快的计算出几位二进制数所能表示的最大十进制数) */
+    private final long maxWorkerId = -1L ^ (-1L << workerIdBits);
+
+    /** 序列在id中占的位数 */
+    private final long sequenceBits = 12L;
+
+    /** 机器ID向左移12位 */
+    private final long workerIdShift = sequenceBits;
+
+    /** 时间截向左移22位(10+12) */
+    private final long timestampLeftShift = sequenceBits + workerIdBits;
+
+    /** 生成序列的掩码,这里为4095 (0b111111111111=0xfff=4095)
+     * <<为左移,每左移动1位,则扩大1倍
+     * */
+    private final long sequenceMask = -1L ^ (-1L << sequenceBits);
+
+    /** 工作机器ID(0~1024) */
+    private long workerId;
+
+    /** 毫秒内序列(0~4095) */
+    private static long sequence = 0L;
+
+    /** 上次生成ID的时间截 */
+    private static long lastTimestamp = -1L;
+
+    //==============================Constructors=====================================
+    /**
+     * 构造函数
+     * @param workerId 工作ID (0~1023)
+     */
+    public IdWorker(long workerId) {
+        if (workerId > maxWorkerId || workerId < 0) {
+            throw new IllegalArgumentException(String.format("workerId can't be greater than %d or less than 0", maxWorkerId));
+        }
+        this.workerId = workerId;
+    }
+
+    // ==============================Methods==========================================
+    /**
+     * 获得下一个ID (该方法是线程安全的)
+     * @return SnowflakeId
+     */
+    public synchronized long nextId() {
+        long timestamp = timeGen();
+        //如果当前时间小于上一次ID生成的时间戳,说明系统时钟回退过这个时候应当抛出异常
+        if (timestamp < lastTimestamp) {
+            throw new RuntimeException(
+                    String.format("Clock moved backwards.  Refusing to generate id for %d milliseconds", lastTimestamp - timestamp));
+        }
+
+        //如果是同一时间生成的,则进行毫秒内序列
+        if (lastTimestamp == timestamp) {
+            //如果毫秒相同,则从0递增生成序列号
+            sequence = (sequence + 1) & sequenceMask;
+            //毫秒内序列溢出
+            if (sequence == 0) {
+                //阻塞到下一个毫秒,获得新的时间戳
+                timestamp = tilNextMillis(lastTimestamp);
+            }
+        }
+        //时间戳改变,毫秒内序列重置
+        else {
+            sequence = 0L;
+        }
+
+        //上次生成ID的时间截
+        lastTimestamp = timestamp;
+        //移位并通过或运算拼到一起组成64位的ID
+        long result = ((timestamp - twepoch) << timestampLeftShift)
+                | (workerId << workerIdShift)
+                | sequence;
+        return result;
+    }
+
+    /**
+     * 阻塞到下一个毫秒,直到获得新的时间戳
+     * @param lastTimestamp 上次生成ID的时间截
+     * @return 当前时间戳
+     */
+    protected long tilNextMillis(long lastTimestamp) {
+        long timestamp = timeGen();
+        while (timestamp <= lastTimestamp) {
+            timestamp = timeGen();
+        }
+        return timestamp;
+    }
+
+    /**
+     * 返回以毫秒为单位的当前时间,从1970-01-01 08:00:00算起
+     * @return 当前时间(毫秒)
+     */
+    protected long timeGen() {
+        return System.currentTimeMillis();
+    }
+
+    public static void main(String[] args) {
+        for (int i  = 0; i < 100; i++) {
+            System.out.println(new IdWorker(1).nextId());
+        }
+    }
+}

+ 87 - 0
slope-common/slope-common-core/src/main/java/com/sckw/core/utils/ListToPageDataUntil.java

@@ -0,0 +1,87 @@
+package com.sckw.core.utils;
+
+import java.util.ArrayList;
+import java.util.List;
+
+/**
+ * @author lfdc
+ * @description List分页工具类
+ * @date 2023-08-03 18:08:07
+ */
+public class ListToPageDataUntil {
+    /**
+     * 数据集合的分页方法,根据传入总共的数据跟页码,返回页码所需要显示多少条的数据
+     * <BR/>采用泛型的方法,即为,list中为什么类型的数据就返回什么类型的数据
+     *
+     * @param List 带有需要进行分页的数据集合
+     * @param page 第几页
+     * @param rows 显示多少条数据
+     * @return 进过分页之后返回的数据
+     */
+    public static <T> PageData<T> getListToPageData(Integer page, Integer rows, List<T> List) {
+        PageData<T> data = new PageData<>();
+        List<T> datepaging = datepaging(List, page, rows);
+        //第几页,1开始
+        data.setPage(page);
+        //每页显示的条数
+        data.setPageSize(rows);
+        //总页数
+        int size = List.size();
+        int totalPage = size / rows;
+        data.setPages(totalPage);
+        //总条数
+        data.setSize(size);
+        //每页的内容
+        data.setList(datepaging);
+        return data;
+    }
+
+    /**
+     * 数据集合的分页方法,根据传入总共的数据跟页码,返回页码所需要显示多少条的数据
+     * <BR/>采用泛型的方法,即为,list中为什么类型的数据就返回什么类型的数据
+     *
+     * @param list 带有需要进行分页的数据集合
+     * @param page 第几页
+     * @param rows 显示多少条数据
+     * @return 进过分页之后返回的数据
+     */
+    private static <T> List<T> datepaging(List<T> list, Integer page, Integer rows) {
+        /*
+         * 经过测试发现当page为0或者小于时,也就是第0页时,程序会报错,所以需要处理一下page的值
+         * 先进行空值的判断,避免程序出现null异常
+         * 当page的值小于等于0时,我们让它的值为1
+         */
+        //参数的校验 当传入过来的list集合为null时,先进行实例化
+        if (list == null) {
+            list = new ArrayList<T>();
+        }
+        //当传入过来的page为null时,先进行赋值操作
+        if ((Object) page == null) {
+            page = 1;
+        }
+        //当传入过来的rows为null时,先进行赋值操作
+        if ((Object) rows == null) {
+            rows = 1;
+        }
+        if (page <= 0) {
+            page = 1;
+        }
+        //记录一下数据一共有多少条
+        int totalitems = list.size();
+        //实例化一个接受分页处理之后的数据
+        List<T> afterList = new ArrayList<T>();
+        /*
+         * 进行分页处理,采用for循环的方式来进行处理
+         * 首先for循环中,i应该从哪里开始:i应该从 (当前是第几页 -1 乘以 条数) 开始
+         * 然后for循环应该到哪里结束,也就是i应该小于:判断(开始的索引+显示条数)是不是大于总条数,如果大于就是总条数,如果小于就是(开始的索引+显示条数)
+         * 然后让i++
+         */
+        for (int i = (page - 1) * rows; i < (((page - 1) * rows) + rows > totalitems ? totalitems : ((page - 1) * rows) + rows); i++) {
+            //然后将数据存入afterList中
+            afterList.add(list.get(i));
+        }
+        //然后将处理后的数据集合进行返回
+        return afterList;
+    }
+
+}

+ 175 - 0
slope-common/slope-common-core/src/main/java/com/sckw/core/utils/ListUtils.java

@@ -0,0 +1,175 @@
+package com.sckw.core.utils;
+
+import com.sckw.core.model.constant.Global;
+
+import java.util.*;
+
+/**
+ * @author lfdc
+ * @description listUtils
+ * @date 2023-08-08 11:08:11
+ */
+public class ListUtils {
+
+    /**
+     * 比较两个List集合是否相等
+     * <p>注:1. 如果一个List的引用为<code>null</code>,或者其包含的元素个数为0,那么该List在本逻辑处理中都算作空;
+     * <p>2. 泛型参数E涉及到对象,所以需要确保正确实现了对应对象的<code>equal()</code>方法。
+     *
+     * @param list1
+     * @param list2
+     * @return
+     */
+    public static <E> boolean isListEqual(List<E> list1, List<E> list2) {
+        // 两个list引用相同(包括两者都为空指针的情况)
+        if (list1 == list2) {
+            return true;
+        }
+
+        // 两个list都为空(包括空指针、元素个数为0)
+        if ((list1 == null && list2 != null && list2.size() == 0)
+                || (list2 == null && list1 != null && list1.size() == 0)) {
+            return true;
+        }
+
+        // 两个list元素个数不相同
+        if (list1.size() != list2.size()) {
+            return false;
+        }
+
+        // 两个list元素个数已经相同,再比较两者内容
+        // 采用这种可以忽略list中的元素的顺序
+        // 涉及到对象的比较是否相同时,确保实现了equals()方法
+        if (!list1.containsAll(list2) && !list2.containsAll(list1)) {
+            return false;
+        }
+
+        return true;
+    }
+
+    public static void main(String[] args) {
+        // desc-倒叙  asc-正序
+        String sortTyp = "asc";
+        // 组装测试数据
+        List<Map<String, Object>> list = initMapList();
+
+        // 单个map排序
+        Map<String, Object> map = list.get(0);
+        Map<String, Object> sortMap = sortMap(map, sortTyp);
+        // Map<String, Object> sortMap = sortByKey(map, false);
+        for (Map.Entry<String, Object> entry : sortMap.entrySet()) {
+            System.out.println("单个map排序" + sortTyp);
+            System.out.println(entry.getKey());
+        }
+
+        // List<map>根据某个字段排序
+        sortMapListByFeild(list, "age", sortTyp);
+        System.out.println("按年纪取最大的一条数据,其姓名是:" + list.get(0).get("name"));
+    }
+
+    /**
+     * List<Map>根据map字段排序
+     *
+     * @param list
+     * @param feild   排序字段
+     * @param sortTyp 排序方式 desc-倒序 asc-正序
+     * @return
+     */
+    public static List<Map<String, Object>> sortMapListByFeild(List<Map<String, Object>> list, String feild, String sortTyp) {
+        if (CollectionUtils.isNotEmpty(list)) {
+            // 方法1
+            list.sort((m1, m2) -> {
+                if ("desc".equals(sortTyp)) {
+                    return String.valueOf(m2.get(feild)).compareTo(String.valueOf(m1.get(feild)));
+                } else {
+                    return String.valueOf(m1.get(feild)).compareTo(String.valueOf(m2.get(feild)));
+                }
+            });
+
+            // 方法2 也ok噢
+            /*if (StringUtils.equals(sortTyp, "desc")) {
+                Collections.sort(list, (m1, m2)-> String.valueOf(m2.get(feild)).compareTo(String.valueOf(m1.get(feild)))); // lamuda排序
+            } else {
+                Collections.sort(list, (m1, m2)-> String.valueOf(m1.get(feild)).compareTo(String.valueOf(m2.get(feild)))); // lamuda排序
+            }*/
+        }
+
+        return list;
+    }
+
+    /**
+     * map排序
+     *
+     * @param map
+     * @return
+     */
+    public static Map<String, Object> sortMap(Map<String, Object> map, String sortTyp) {
+        try {
+            if ("desc".equals(sortTyp)) {
+                // 定义个倒叙的set
+                Set<String> sortSet = new TreeSet<>(Comparator.reverseOrder());
+                // 获取全部key,添加后就自然倒序了
+                sortSet.addAll(map.keySet());
+
+                Map<String, Object> resp = new LinkedHashMap<>();
+                for (String key : sortSet) {
+                    // 按顺序放入新map
+                    resp.put(key, map.get(key));
+                }
+
+                return resp;
+            } else {
+                // TreeMap 本身就是正序的
+                return new TreeMap<>(map);
+            }
+        } catch (Exception e) {
+            e.printStackTrace();
+        }
+        return map;
+    }
+
+    /**
+     * 根据map的key排序
+     *
+     * @param map    待排序的map
+     * @param isDesc 是否降序,true:降序,false:升序
+     * @param <K>
+     * @param <V>
+     * @return
+     */
+    public static <K extends Comparable<? super K>, V> Map<K, V> sortByKey(Map<K, V> map, boolean isDesc) {
+        Map<K, V> result = new LinkedHashMap<>();
+        if (isDesc) {
+            map.entrySet().stream().sorted(Map.Entry.<K, V>comparingByKey().reversed())
+                    .forEachOrdered(e -> result.put(e.getKey(), e.getValue()));
+        } else {
+            map.entrySet().stream().sorted(Map.Entry.<K, V>comparingByKey())
+                    .forEachOrdered(e -> result.put(e.getKey(), e.getValue()));
+        }
+        return result;
+    }
+
+    private static List<Map<String, Object>> initMapList() {
+        List<Map<String, Object>> lists = new ArrayList<>();
+
+        Map<String, Object> map = new HashMap<>(Global.NUMERICAL_SIXTEEN);
+        map.put("name", "王五");
+        map.put("age", 55);
+        map.put("mobile", "15900001112");
+        lists.add(map);
+
+        Map<String, Object> map1 = new HashMap<>(Global.NUMERICAL_SIXTEEN);
+        map1.put("name", "李四");
+        map1.put("age", 18);
+        map1.put("mobile", "15900001111");
+        lists.add(map1);
+
+        Map<String, Object> map2 = new HashMap<>(Global.NUMERICAL_SIXTEEN);
+        map2.put("name", "赵六");
+        map2.put("age", 58);
+        map2.put("mobile", "13700001111");
+        lists.add(map2);
+
+        return lists;
+    }
+}

+ 59 - 0
slope-common/slope-common-core/src/main/java/com/sckw/core/utils/LocUtils.java

@@ -0,0 +1,59 @@
+package com.sckw.core.utils;
+
+import com.alibaba.fastjson.JSON;
+import com.alibaba.fastjson.JSONObject;
+import com.sckw.core.model.constant.Global;
+import org.apache.http.HttpEntity;
+import org.apache.http.HttpResponse;
+import org.apache.http.client.HttpClient;
+import org.apache.http.client.methods.HttpGet;
+import org.apache.http.impl.client.HttpClients;
+import org.apache.http.util.EntityUtils;
+
+import java.io.IOException;
+
+public class LocUtils {
+
+    static String GD_KEY = "739ace2ede6fe1e2f4ae3bcba890833c";
+
+    /**
+     * @param lng 经度
+     * @param lat 纬度
+     * @desc 通过gps查询位置信息-高德
+     * @author zk
+     * @date 2023/10/7
+     **/
+    public static String regeo(String lng, String lat) {
+        if (StringUtils.isBlank(lng) || StringUtils.isBlank(lat)) {
+            return null;
+        }
+        StringBuilder requestUrl = new StringBuilder();
+        requestUrl.append("https://restapi.amap.com/v3/geocode/regeo?output=json&location="+ lng + Global.COMMA + lat);
+        requestUrl.append("&key="+GD_KEY);
+        requestUrl.append("&radius=1000&extensions=base");
+
+        try {
+            HttpClient httpClient = HttpClients.createDefault();
+            HttpGet httpGet = new HttpGet(requestUrl.toString());
+            HttpResponse response = httpClient.execute(httpGet);
+            HttpEntity entity = response.getEntity();
+            String responseStr = EntityUtils.toString(entity, "UTF-8");
+            JSONObject resultJson = responseStr != null ? JSON.parseObject(responseStr) : null;
+            Integer status = resultJson != null ? resultJson.getInteger("status") : null;
+            if (status != null && status == Global.NUMERICAL_ONE) {
+                JSONObject regeocode = resultJson.getJSONObject("regeocode");
+                return regeocode != null ? regeocode.getString("formatted_address") : null;
+            }
+
+            return null;
+        } catch (IOException e) {
+            e.printStackTrace();
+        }
+        return null;
+    }
+
+    public static void main(String[] args) {
+        String res = regeo("118.879289", "38.052237");
+        System.out.println(res);
+    }
+}

+ 90 - 0
slope-common/slope-common-core/src/main/java/com/sckw/core/utils/LogUtil.java

@@ -0,0 +1,90 @@
+package com.sckw.core.utils;
+
+import org.apache.logging.log4j.LogManager;
+import org.apache.logging.log4j.Logger;
+import java.io.PrintWriter;
+import java.io.StringWriter;
+
+/**
+ * @Desc 日志打印工具类
+ * @Author zk
+ * @Date 2019/5/13
+ */
+public class LogUtil {
+    private static Logger logger = LogManager.getLogger(LogUtil.class);
+
+    public static String TITLE = "【矿拉拉平台】=====";
+
+    /**
+     * 获取异常信息
+     * @Author zk
+     * @param e 异常Exception
+     * @Date 2019/5/13
+     * @return
+     */
+    public static synchronized String getStackTraceInfo(Exception e){
+        StringWriter sw = new StringWriter();
+        e.printStackTrace(new PrintWriter(sw, true));
+        return sw.toString();
+    }
+
+    /**
+     * 打印日志
+     * @Author zk
+     * @param message 日志内容
+     * @Date 2019/5/13
+     * @return
+     */
+    public static synchronized void debug(String message){
+        logger.info(TITLE + message);
+    }
+
+    /**
+     * 打印日志
+     * @Author zk
+     * @param message 日志内容
+     * @Date 2019/5/13
+     * @return
+     */
+    public static synchronized void info(String message){
+        logger.info(TITLE + message);
+    }
+
+    public static synchronized void info(String message, Object params){
+        logger.info(TITLE + message,params);
+    }
+
+    /**
+     * 打印异常日志
+     * @Author zk
+     * @param message 日志内容
+     * @Date 2020/03/13
+     * @return
+     */
+    public static synchronized void error(String className, String methodName, String exceptionName, String message, String params){
+        logger.error(TITLE+"异常["+className+"."+methodName+"] 异常代码["+exceptionName+"] 异常信息["+message+"] 请求参数:"+params);
+    }
+
+    /**
+     * 打印异常日志
+     * @Author zk
+     * @param message 日志内容
+     * @Date 2020/03/13
+     * @return
+     */
+    public static synchronized void error(String className, String methodName, String exceptionName, String message){
+        logger.error(TITLE+"异常["+className+"."+methodName+"] 异常代码["+exceptionName+"] 异常信息["+message+"]");
+    }
+
+    /**
+     * 打印异常日志
+     * @Author zk
+     * @param message 日志内容
+     * @Date 2021/01/22
+     * @return
+     */
+    public static synchronized void error(String className, String message){
+        logger.error(TITLE+"异常["+className+"] 异常信息["+message+"]");
+    }
+
+}

+ 24 - 0
slope-common/slope-common-core/src/main/java/com/sckw/core/utils/LongToStringUtils.java

@@ -0,0 +1,24 @@
+package com.sckw.core.utils;
+
+
+import com.fasterxml.jackson.core.JsonGenerator;
+import com.fasterxml.jackson.databind.JsonSerializer;
+import com.fasterxml.jackson.databind.SerializerProvider;
+
+import java.io.IOException;
+
+/**
+ * @author czh
+ * @desc TODO
+ * @date 2023/7/10
+ */
+public class LongToStringUtils extends JsonSerializer<Long> {
+
+
+    @Override
+    public void serialize(Long aLong, JsonGenerator jsonGenerator, SerializerProvider serializerProvider) throws IOException {
+        if(null!=aLong) {
+            jsonGenerator.writeString(String.valueOf(aLong));
+        }
+    }
+}

+ 210 - 0
slope-common/slope-common-core/src/main/java/com/sckw/core/utils/NumberUtils.java

@@ -0,0 +1,210 @@
+package com.sckw.core.utils;
+
+import java.math.BigDecimal;
+import java.text.DecimalFormat;
+import java.text.NumberFormat;
+
+/**
+ * @author zk
+ * @description 数值处理类
+ * @date 2020/06/06 09:00:32
+ */
+public class NumberUtils {
+    private static final int SIX = 6;
+    public NumberUtils() {
+    }
+
+    public static boolean parseBoolean(Object obj) {
+        if (obj == null) {
+            return false;
+        } else if (obj instanceof Boolean) {
+            return (Boolean)obj;
+        } else {
+            return obj instanceof String ? "true".equalsIgnoreCase(((String)obj).trim()) : false;
+        }
+    }
+
+    public static Integer parseIntV1(Object obj) {
+        if (obj == null) {
+            return null;
+        }
+        return parseInt(obj, 0);
+    }
+
+    public static int parseInt(Object obj) {
+        return parseInt(obj, 0);
+    }
+
+    public static int parseInt(Object obj, int defaultValue) {
+        if (obj == null) {
+            return defaultValue;
+        } else if (obj instanceof String) {
+            try {
+                String str = ((String)obj).trim();
+                return str.length() == 0 ? defaultValue : Integer.parseInt(str);
+            } catch (NumberFormatException var3) {
+                return defaultValue;
+            }
+        } else {
+            return obj instanceof Number ? ((Number)obj).intValue() : defaultValue;
+        }
+    }
+
+    public static Integer parseInteger(Object obj){
+        return parseInt(obj, 0);
+    }
+
+    public static Integer parseEmptyInteger(Object obj) {
+        if (obj == null) {
+            return null;
+        }
+        return parseInt(obj, 0);
+    }
+
+    public static long parseLong(Object obj) {
+        return parseLong(obj, 0L);
+    }
+
+    public static long parseLong(Object obj, long defaultValue) {
+        if (obj == null) {
+            return defaultValue;
+        } else if (obj instanceof String) {
+            try {
+                return Long.parseLong(((String)obj).trim());
+            } catch (NumberFormatException var4) {
+                return defaultValue;
+            }
+        } else {
+            return obj instanceof Number ? ((Number)obj).longValue() : defaultValue;
+        }
+    }
+
+    public static Long parseEmptyLong(Object obj){
+        if (obj == null) {
+            return null;
+        }
+        return parseLong(obj, 0);
+    }
+
+    public static float parseFloat(Object obj) {
+        return parseFloat(obj, 0.0F);
+    }
+
+    public static float parseFloat(Object obj, float defaultValue) {
+        if (obj == null) {
+            return defaultValue;
+        } else if (obj instanceof String) {
+            try {
+                return Float.parseFloat(((String)obj).trim());
+            } catch (NumberFormatException var3) {
+                return defaultValue;
+            }
+        } else {
+            return obj instanceof Number ? ((Number)obj).floatValue() : defaultValue;
+        }
+    }
+
+    public static Float parseEmptyFloat(Object obj){
+        if (obj == null) {
+            return null;
+        }
+        return parseFloat(obj, 0);
+    }
+
+    public static double parseDouble(Object str) {
+        return parseDouble(str, 0.0D);
+    }
+
+    public static double parseDouble(Object obj, double defaultValue) {
+        if (obj == null) {
+            return defaultValue;
+        } else if (obj instanceof String) {
+            try {
+                return Double.parseDouble(((String)obj).trim());
+            } catch (NumberFormatException var4) {
+                return defaultValue;
+            }
+        } else {
+            return obj instanceof Number ? ((Number)obj).doubleValue() : defaultValue;
+        }
+    }
+
+    public static Double parseEmptyDouble(Object obj){
+        if (obj == null) {
+            return null;
+        }
+        return parseDouble(obj, 0);
+    }
+
+    public static BigDecimal parseBigDecimal(Object obj) {
+        return parseBigDecimal(obj, new BigDecimal(0));
+    }
+
+    public static BigDecimal parseBigDecimal(Object obj, BigDecimal defaultValue) {
+        if (obj == null) {
+            return defaultValue;
+        } else if (obj instanceof String) {
+            try {
+                String s = (String)obj;
+                s = s.trim();
+                if (s.length() == 0) {
+                    s = "0";
+                }
+
+                return new BigDecimal(s);
+            } catch (NumberFormatException var3) {
+                return defaultValue;
+            }
+        } else if (obj instanceof BigDecimal) {
+            return (BigDecimal)obj;
+        } else if (obj instanceof Integer) {
+            return new BigDecimal((Integer)obj);
+        } else if (obj instanceof Long) {
+            return new BigDecimal((Long)obj);
+        } else if (obj instanceof Float) {
+            return new BigDecimal((double)(Float)obj);
+        } else if (obj instanceof Double) {
+            return new BigDecimal((Double)obj);
+        } else {
+            return obj instanceof Number ? new BigDecimal(((Number)obj).doubleValue()) : defaultValue;
+        }
+    }
+
+    public static String formatNumberValue(Object obj) {
+        return formatNumber(obj, "###0.00");
+    }
+
+    public static String formatNumberStr(Object obj) {
+        return formatNumber(obj, "#,##0.00");
+    }
+
+    public static String formatNumberEmpty(Object obj) {
+        if (obj == null) {
+            obj = new BigDecimal(0);
+        }
+
+        return ((Number)obj).intValue() == 0 ? "" : formatNumberStr(obj);
+    }
+
+    public static String formatNumber(Object obj, String pattern) {
+        if (obj == null) {
+            obj = new BigDecimal(0);
+        }
+
+        NumberFormat nf = new DecimalFormat(pattern);
+        return nf.format(obj);
+    }
+
+    /**
+     * 生成六位随机数
+     * @return
+     */
+    public static String createRandomVcode() {
+        //验证码
+        StringBuilder vcode = new StringBuilder();
+        for (int i = 0; i < SIX; i++) {
+            vcode.append((int) (Math.random() * 9));
+        }
+        return vcode.toString();
+    }
+}

+ 491 - 0
slope-common/slope-common-core/src/main/java/com/sckw/core/utils/OkHttpUtils.java

@@ -0,0 +1,491 @@
+package com.sckw.core.utils;
+
+import com.alibaba.fastjson2.JSONObject;
+import lombok.extern.slf4j.Slf4j;
+import okhttp3.*;
+import org.apache.commons.lang3.StringUtils;
+import org.apache.hc.client5.http.classic.methods.HttpPost;
+import org.apache.hc.client5.http.entity.mime.FileBody;
+import org.apache.hc.client5.http.entity.mime.HttpMultipartMode;
+import org.apache.hc.client5.http.entity.mime.MultipartEntityBuilder;
+import org.apache.hc.client5.http.impl.classic.CloseableHttpClient;
+import org.apache.hc.client5.http.impl.classic.CloseableHttpResponse;
+import org.apache.hc.client5.http.impl.classic.HttpClients;
+import org.apache.hc.core5.http.ContentType;
+import org.apache.hc.core5.http.HttpEntity;
+import org.apache.hc.core5.http.io.entity.EntityUtils;
+import org.apache.http.client.methods.HttpRequestBase;
+import org.jetbrains.annotations.NotNull;
+import org.springframework.util.CollectionUtils;
+
+import javax.net.ssl.SSLContext;
+import javax.net.ssl.SSLSocketFactory;
+import javax.net.ssl.TrustManager;
+import javax.net.ssl.X509TrustManager;
+import java.io.File;
+import java.io.IOException;
+import java.net.URLEncoder;
+import java.nio.charset.StandardCharsets;
+import java.security.SecureRandom;
+import java.security.cert.X509Certificate;
+import java.util.LinkedHashMap;
+import java.util.Map;
+import java.util.Set;
+import java.util.concurrent.Semaphore;
+import java.util.concurrent.TimeUnit;
+
+/**
+ * @author xcq
+ * @date 2023-02-21 10:42:20
+ **/
+@Slf4j
+public class OkHttpUtils {
+    private static volatile OkHttpClient okHttpClient = null;
+    private static volatile Semaphore semaphore = null;
+    private Map<String, String> headerMap;
+    private Map<String, String> paraMap;
+    private Map<String, String> bodyParaMap;
+    //json字符串
+    private String bodyParaString;
+    private String url;
+    private Request.Builder request;
+
+    /**
+     * 初始化okHttpClient,并且允许https访问
+     */
+    private OkHttpUtils() {
+        if (okHttpClient == null) {
+            synchronized (OkHttpUtils.class) {
+                if (okHttpClient == null) {
+                    TrustManager[] trustManagers = buildTrustManagers();
+                    okHttpClient = new OkHttpClient.Builder()
+                            .connectTimeout(15, TimeUnit.SECONDS)
+                            .writeTimeout(20, TimeUnit.SECONDS)
+                            .readTimeout(20, TimeUnit.SECONDS)
+                            .sslSocketFactory(createSSLSocketFactory(trustManagers), (X509TrustManager) trustManagers[0])
+                            .hostnameVerifier((hostName, session) -> true)
+                            .retryOnConnectionFailure(true)
+                            .build();
+                    addHeader("User-Agent", "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_12_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/63.0.3239.132 Safari/537.36");
+                }
+            }
+        }
+    }
+
+    /**
+     * 用于异步请求时,控制访问线程数,返回结果
+     *
+     * @return
+     */
+    private static Semaphore getSemaphoreInstance() {
+        //只能1个线程同时访问
+        synchronized (OkHttpUtils.class) {
+            if (semaphore == null) {
+                semaphore = new Semaphore(0);
+            }
+        }
+        return semaphore;
+    }
+
+    /**
+     * 创建OkHttpUtils
+     *
+     * @return
+     */
+    public static OkHttpUtils builder() {
+        return new OkHttpUtils();
+    }
+
+    /**
+     * 添加url
+     *
+     * @param url
+     * @return
+     */
+    public OkHttpUtils url(String url) {
+        this.url = url;
+        return this;
+    }
+
+    /**
+     * 添加参数
+     *
+     * @param key   参数名
+     * @param value 参数值
+     * @return
+     */
+    public OkHttpUtils addPara(String key, String value) {
+        if (paraMap == null) {
+            paraMap = new LinkedHashMap<>(16);
+        }
+        paraMap.put(key, value);
+        return this;
+    }
+
+    /**
+     * 添加参数
+     *
+     * @param key   参数名
+     * @param value 参数值
+     * @return
+     */
+    public OkHttpUtils addBodyPara(String key, String value) {
+        if (bodyParaMap == null) {
+            bodyParaMap = new LinkedHashMap<>(16);
+        }
+        bodyParaMap.put(key, value);
+        return this;
+    }
+
+    public OkHttpUtils addBodyJsonStr(String string) {
+        bodyParaString = string;
+        return this;
+    }
+
+    /**
+     * 添加请求头
+     *
+     * @param key   参数名
+     * @param value 参数值
+     * @return
+     */
+    public OkHttpUtils addHeader(String key, String value) {
+        if (headerMap == null) {
+            headerMap = new LinkedHashMap<>(16);
+        }
+        headerMap.put(key, value);
+        return this;
+    }
+
+    /**
+     * 初始化get方法
+     *
+     * @return
+     */
+    public OkHttpUtils get() {
+        request = new Request.Builder().get();
+        request.url(buildUrl());
+        return this;
+    }
+
+    /**
+     * 初始化post方法
+     */
+    public OkHttpUtils postForm(JSONObject object, byte[] file) {
+        MultipartBody.Builder formBody = new MultipartBody.Builder();
+        formBody.setType(MultipartBody.FORM);
+
+        for (String s : object.keySet()) {
+            formBody.addFormDataPart(s, StringUtils.isBlank(object.getString(s)) ? "" : object.getString(s));
+        }
+        String fileName = UUIDUtils.get32UUID() + ".zip";
+        log.info("文件名:{}", fileName);
+        formBody.addFormDataPart("file", fileName, RequestBody.create(file));
+
+        RequestBody requestBody = formBody.build();
+        // params参数
+        request = new Request.Builder().post(requestBody).url(buildUrl());
+        return this;
+    }
+
+    /**
+     * 初始化post方法
+     *
+     * @param isJsonPost true等于json的方式提交数据,类似postman里post方法的raw
+     *                   false等于普通的表单提交
+     * @return
+     */
+    public OkHttpUtils post(boolean isJsonPost) {
+        RequestBody requestBody;
+        if (isJsonPost) {
+            String json;
+            if (StringUtils.isNotBlank(bodyParaString)) {
+                json = bodyParaString;
+            } else if (!CollectionUtils.isEmpty(bodyParaMap)) {
+                json = JSONObject.toJSONString(bodyParaMap);
+            } else {
+                json = "{}";
+            }
+            log.info("请求参数:{}", json);
+            requestBody = RequestBody.create(json, MediaType.parse("application/json; charset=utf-8"));
+        } else {
+            FormBody.Builder formBody = new FormBody.Builder();
+            if (bodyParaMap != null) {
+                bodyParaMap.forEach(formBody::add);
+            }
+            requestBody = formBody.build();
+        }
+        // params参数
+        request = new Request.Builder().post(requestBody).url(buildUrl());
+        return this;
+    }
+
+    private String buildUrl() {
+        StringBuilder urlBuilder = new StringBuilder(url);
+        if (paraMap != null) {
+            urlBuilder.append("?");
+            try {
+                for (Map.Entry<String, String> entry : paraMap.entrySet()) {
+                    urlBuilder.append(URLEncoder.encode(entry.getKey(), StandardCharsets.UTF_8)).
+                            append("=").
+                            append(URLEncoder.encode(entry.getValue(), StandardCharsets.UTF_8)).
+                            append("&");
+                }
+            } catch (Exception e) {
+                e.printStackTrace();
+            }
+            urlBuilder.deleteCharAt(urlBuilder.length() - 1);
+        }
+        log.info("请求地址:\n" + urlBuilder.toString());
+        return urlBuilder.toString();
+    }
+
+    /**
+     * 文件下载同步请求
+     *
+     * @return
+     */
+    public byte[] fileSync() {
+        setHeader(request);
+        try (Response response = okHttpClient.newCall(request.build()).execute()) {
+            if (response.isSuccessful()) {
+                assert response.body() != null;
+                return response.body().bytes();
+            }
+            return new byte[0];
+        } catch (IOException e) {
+            e.printStackTrace();
+            return new byte[0];
+        }
+    }
+
+    /**
+     * 同步请求
+     *
+     * @return
+     */
+    public String sync() {
+        setHeader(request);
+        try (Response response = okHttpClient.newCall(request.build()).execute()) {
+            assert response.body() != null;
+            return response.body().string();
+        } catch (IOException e) {
+            e.printStackTrace();
+            return "请求失败:" + e.getMessage();
+        }
+    }
+
+    /**
+     * 异步请求,有返回值
+     */
+    public String async() {
+        StringBuilder buffer = new StringBuilder();
+        setHeader(request);
+        okHttpClient.newCall(request.build()).enqueue(new Callback() {
+            @Override
+            public void onResponse(@NotNull Call call, @NotNull Response response) throws IOException {
+                assert response.body() != null;
+                buffer.append(response.body().string());
+                getSemaphoreInstance().release();
+            }
+
+            @Override
+            public void onFailure(@NotNull Call call, @NotNull IOException e) {
+                buffer.append("请求出错:").append(e.getMessage());
+
+            }
+        });
+        try {
+            getSemaphoreInstance().acquire();
+        } catch (InterruptedException e) {
+            e.printStackTrace();
+        }
+        return buffer.toString();
+    }
+
+    /**
+     * 异步请求,带有接口回调
+     *
+     * @param callBack
+     */
+    public void async(ICallBack callBack) {
+        setHeader(request);
+        okHttpClient.newCall(request.build()).enqueue(new Callback() {
+
+            @Override
+            public void onFailure(@NotNull Call call, @NotNull IOException e) {
+                callBack.onFailure(call, e.getMessage());
+            }
+
+            @Override
+            public void onResponse(@NotNull Call call, @NotNull Response response) throws IOException {
+                assert response.body() != null;
+                callBack.onSuccessful(call, response.body().string());
+            }
+        });
+    }
+
+    /**
+     * 为request添加请求头
+     *
+     * @param request
+     */
+    private void setHeader(Request.Builder request) {
+        if (headerMap != null) {
+            try {
+                for (Map.Entry<String, String> entry : headerMap.entrySet()) {
+                    request.addHeader(entry.getKey(), entry.getValue());
+                }
+            } catch (Exception e) {
+                e.printStackTrace();
+            }
+        }
+    }
+
+
+    /**
+     * 生成安全套接字工厂,用于https请求的证书跳过
+     *
+     * @return
+     */
+    private static SSLSocketFactory createSSLSocketFactory(TrustManager[] trustAllCerts) {
+        SSLSocketFactory ssfFactory = null;
+        try {
+            SSLContext sc = SSLContext.getInstance("SSL");
+            sc.init(null, trustAllCerts, new SecureRandom());
+            ssfFactory = sc.getSocketFactory();
+        } catch (Exception e) {
+            e.printStackTrace();
+        }
+        return ssfFactory;
+    }
+
+    private static TrustManager[] buildTrustManagers() {
+        return new TrustManager[]{
+                new X509TrustManager() {
+                    @Override
+                    public void checkClientTrusted(X509Certificate[] chain, String authType) {
+                    }
+
+                    @Override
+                    public void checkServerTrusted(X509Certificate[] chain, String authType) {
+                    }
+
+                    @Override
+                    public X509Certificate[] getAcceptedIssuers() {
+                        return new X509Certificate[]{};
+                    }
+                }
+        };
+    }
+
+    /**
+     * 自定义一个接口回调
+     */
+    public interface ICallBack {
+
+        void onSuccessful(Call call, String data);
+
+        void onFailure(Call call, String errorMsg);
+
+    }
+
+
+    /**
+     * 使用示例
+     *
+     * @param args
+     * @author xcq
+     * @date 2023-02-21 10:47:28
+     **/
+    public static void main(String[] args) {
+        String address = "https://file.cloudpnr.com/app-86820a0f-8b13-479b-a466-b261af7290d5%2Fsaturnfile%2F48cf909816b142e5beec68988c1982b1%2F39189ab6-fac3-11ed-9690-0242ac110002.zip?Expires=1685254390&OSSAccessKeyId=LTAI6Yzq9tIYS57h&Signature=oNyqey777CjDk0IH5ZaniwTAdfg%3D";
+        byte[] file = OkHttpUtils.builder().url(address)
+                .get()
+                .fileSync();
+        /*通知中台*/
+        JSONObject tmp = new JSONObject();
+        tmp.put("status", StringUtils.equals("00000000", "00000000") ? "true" : "false");
+        tmp.put("msg", "");
+        log.info("交易确认异步通知中台入参:{}", tmp.toJSONString());
+
+        String sync = OkHttpUtils.builder().url("http://10.10.10.241:9505/notice/huifu/signal_agent_pay/S520267896211968001/00dd5d5dd4682ea3fad88a37ab48223a")
+                .postForm(tmp, file)
+                .sync();
+        log.info("交易确认异步通知中台返回->{}", sync);
+    }
+
+    /**
+     * post请求提交form-data上传文件
+     *
+     * @param url
+     * @return
+     */
+    public static String doPostUploadFile(String url, Map<String, Object> param) {
+        HttpPost httpPost = new HttpPost(url);
+        CloseableHttpResponse response = null;
+        String respContent = null;
+        CloseableHttpClient httpClient = HttpClients.createDefault();
+        try {
+            String boundary = "--" + UUIDUtils.get32UUID();
+            httpPost.setHeader("Content-Type", "multipart/form-data; boundary=" + boundary);
+            MultipartEntityBuilder builder = MultipartEntityBuilder.create().setMode(HttpMultipartMode.LEGACY);
+            builder.setCharset(StandardCharsets.UTF_8);
+            builder.setBoundary(boundary);
+            for (String key : param.keySet()) {
+                Object value = param.get(key);
+                if (value instanceof File file) {
+                    FileBody fileBody = new FileBody(file);
+                    builder.addBinaryBody(key, fileBody.getInputStream(), ContentType.DEFAULT_BINARY, fileBody.getFilename());
+                } else {
+                    builder.addBinaryBody(key, String.valueOf(value).getBytes(StandardCharsets.UTF_8));
+                }
+            }
+            HttpEntity entity = builder.build();
+            httpPost.setEntity(entity);
+            response = httpClient.execute(httpPost);
+            if (response != null) {
+                HttpEntity he = response.getEntity();
+                if (he != null) {
+                    respContent = EntityUtils.toString(he, StandardCharsets.UTF_8);
+                }
+            } else {
+                log.error("对方响应的状态码不在符合的范围内!");
+                throw new RuntimeException();
+            }
+            return respContent;
+        } catch (Exception e) {
+            log.error("网络访问异常,请求url地址={},响应体={},error=", url, response, e);
+            throw new RuntimeException();
+        } finally {
+            log.info("统一外网请求参数打印,post请求url地址={},响应={}", url, respContent);
+            try {
+                if (response != null) {
+                    response.close();
+                }
+                if (null != httpClient) {
+                    httpClient.close();
+                }
+            } catch (IOException e) {
+                log.error("请求链接释放异常", e);
+            }
+        }
+    }
+
+
+    /**
+     * 封装请求头
+     *
+     * @param paramsHeads
+     * @param httpMethod
+     */
+    private static void packageHeader(Map<String, String> paramsHeads, HttpRequestBase httpMethod) {
+        if (null != paramsHeads && paramsHeads.size() > 0) {
+            Set<Map.Entry<String, String>> entrySet = paramsHeads.entrySet();
+            for (Map.Entry<String, String> entry : entrySet) {
+                httpMethod.setHeader(entry.getKey(), entry.getValue());
+            }
+        }
+    }
+
+}

+ 59 - 0
slope-common/slope-common-core/src/main/java/com/sckw/core/utils/PageData.java

@@ -0,0 +1,59 @@
+package com.sckw.core.utils;
+
+import lombok.Data;
+
+import java.util.List;
+
+/**
+ * @author lfdc
+ * @description
+ * @date 2023-08-03 18:08:09
+ */
+@Data
+public class PageData<T> {
+
+    /**
+     * 当前页
+     */
+    private int page;
+    /**
+     * 当前页的数量
+     */
+    private int pageSize;
+    /**
+     * 总条数
+     */
+    private int size;
+
+    /**
+     * 由于startRow和endRow不常用,这里说个具体的用法
+     * 可以在页面中"显示startRow到endRow 共size条数据"
+     * 当前页面第一个元素在数据库中的行号
+     */
+    private long startRow;
+    /**
+     * 当前页面最后一个元素在数据库中的行号
+     */
+    private long endRow;
+    /**
+     * 总页数
+     */
+    private int pages;
+    /**
+     * 前一页
+     */
+    private int prePage;
+    /**
+     * 下一页
+     */
+    private int nextPage;
+    /**
+     * 展示数据
+     */
+    private List list;
+
+    /**
+     * 是否为第一页
+     */
+    private boolean isFirstPage = false;
+}

+ 138 - 0
slope-common/slope-common-core/src/main/java/com/sckw/core/utils/PasswordUtils.java

@@ -0,0 +1,138 @@
+package com.sckw.core.utils;
+
+import java.security.MessageDigest;
+import java.util.UUID;
+
+/**
+ * 密码工具类
+ *
+ * @author Louis
+ * @date Sep 1, 2018
+ */
+public class PasswordUtils {
+    public static final int HASH_INTERATIONS = 1024;
+    public static final int SALT_SIZE = 8;
+    public static final int SUB_LENGTH = 16;
+
+    /**
+     * 匹配密码
+     *
+     * @param salt    盐
+     * @param rawPass 明文
+     * @param encPass 密文
+     * @return
+     */
+    public static boolean matches(String salt, String rawPass, String encPass) {
+        return new EncryptionUtil(salt).matches(encPass, rawPass);
+    }
+
+    /**
+     * 明文密码加密
+     *
+     * @param rawPass 明文
+     * @param salt
+     * @return
+     */
+    public static String encode(String rawPass, String salt) {
+        return new EncryptionUtil(salt).encode(rawPass);
+    }
+
+    /**
+     * 获取加密盐
+     *
+     * @return
+     */
+    public static String getSalt() {
+        return UUID.randomUUID().toString().replaceAll("-", "").substring(0, 20);
+    }
+
+    /**
+     * MD5加密
+     *
+     * @param inStr 明文
+     * @return 32位密文
+     */
+    public static String md5(String inStr) {
+        MessageDigest md5 = null;
+        try {
+            md5 = MessageDigest.getInstance("MD5");
+            byte[] byteArray = inStr.getBytes("UTF-8");
+            byte[] md5Bytes = md5.digest(byteArray);
+            StringBuffer hexValue = new StringBuffer();
+            for (int i = 0; i < md5Bytes.length; i++) {
+                int val = ((int) md5Bytes[i]) & 0xff;
+                if (val < 16) {
+                    hexValue.append("0");
+                }
+                hexValue.append(Integer.toHexString(val));
+            }
+            return hexValue.toString();
+        } catch (Exception e) {
+            System.out.println(e.toString());
+            e.printStackTrace();
+            return "";
+        }
+    }
+
+    /**
+     * md5密码校验
+     *
+     * @param rawPass
+     * @param encPass
+     * @return
+     */
+    public static boolean matchesMD5(String rawPass, String encPass) {
+        if (md5(rawPass).equals(encPass)) {
+            return true;
+        } else {
+            return false;
+        }
+    }
+
+    /**
+     * 生成安全的密码,生成随机的16位salt并经过1024次 sha-1 hash
+     */
+    public static String entryptPassword(String plainPassword) {
+        byte[] salt = Digests.generateSalt(SALT_SIZE);
+        byte[] hashPassword = Digests.sha1(plainPassword.getBytes(), salt, HASH_INTERATIONS);
+        return Encodes.encodeHex(salt) + Encodes.encodeHex(hashPassword);
+    }
+
+    /**
+     * 截取密文密码生成盐
+     */
+    public static String getSaltSubPwd(String password) {
+        return password.substring(0, SUB_LENGTH);
+    }
+
+    /**
+     * 验证密码
+     *
+     * @param plainPassword 明文密码
+     * @param password      密文密码
+     * @return 验证成功返回true
+     */
+    public static boolean validatePassword(String plainPassword, String password) {
+        byte[] salt = Encodes.decodeHex(password.substring(0, SUB_LENGTH));
+        byte[] hashPassword = Digests.sha1(plainPassword.getBytes(), salt, HASH_INTERATIONS);
+        return password.equals(Encodes.encodeHex(salt) + Encodes.encodeHex(hashPassword));
+    }
+
+    public static void main(String[] args) {
+
+        String password = PasswordUtils.entryptPassword(PasswordUtils.md5("18581845668"));
+        String md5 = PasswordUtils.md5("123456");
+        System.out.println(password);
+        System.out.println(md5);
+        System.out.println(validatePassword(md5, password));
+//        System.out.println(PasswordUtils.md5("czh"));
+//        System.out.println(PasswordUtils.entryptPassword(PasswordUtils.md5("czh")));
+        System.out.println(validatePassword(md5, "86e07d48c04c8a4bd9fe9dc819c608c43efda576b215995e9f138809"));
+
+
+        byte[] salt = Digests.generateSalt(SALT_SIZE);
+        byte[] hashPassword = Digests.sha1(md5.getBytes(), salt, HASH_INTERATIONS);
+        System.out.println(Encodes.encodeHex(salt));
+        System.out.println(Encodes.encodeHex(hashPassword));
+    }
+}

+ 169 - 0
slope-common/slope-common-core/src/main/java/com/sckw/core/utils/ReflectionUtils.java

@@ -0,0 +1,169 @@
+package com.sckw.core.utils;
+
+import java.lang.reflect.InvocationTargetException;
+import java.lang.reflect.Method;
+import java.lang.reflect.Modifier;
+
+/**
+ * 反射相关辅助方法
+ * @author zk
+ * @date Aug 19, 2018
+ */
+public class ReflectionUtils {
+
+	private static final String GETTER_PREFIX = "get";
+	/**
+	 * 点
+	 */
+	public static final String DOT = ".";
+	/**
+	 * 根据方法名调用指定对象的方法
+	 * @param object 要调用方法的对象
+	 * @param method 要调用的方法名
+	 * @param args 参数对象数组
+	 * @return
+	 */
+	public static Object invoke(Object object, String method, Object... args) {
+		Object result = null;
+		Class<? extends Object> clazz = object.getClass();
+		Method queryMethod = getMethod(clazz, method, args);
+		if(queryMethod != null) {
+			try {
+				result = queryMethod.invoke(object, args);
+			} catch (IllegalAccessException e) {
+				e.printStackTrace();
+			} catch (IllegalArgumentException e) {
+				e.printStackTrace();
+			} catch (InvocationTargetException e) {
+				e.printStackTrace();
+			}
+		} else {
+			try {
+				throw new NoSuchMethodException(clazz.getName() + " 类中没有找到 " + method + " 方法。");
+			} catch (NoSuchMethodException e) {
+				e.printStackTrace();
+			}
+		}
+		return result;
+	}
+	
+	/**
+	 * 根据方法名和参数对象查找方法
+	 * @param clazz
+	 * @param name
+	 * @param args 参数实例数据
+	 * @return
+	 */
+	public static Method getMethod(Class<? extends Object> clazz, String name, Object[] args) {
+		Method queryMethod = null;
+		Method[] methods = clazz.getMethods();
+		for(Method method:methods) {
+			if(method.getName().equals(name)) {
+				Class<?>[] parameterTypes = method.getParameterTypes();
+				if(parameterTypes.length == args.length) {
+					boolean isSameMethod = true;
+					for(int i=0; i<parameterTypes.length; i++) {
+						Object arg = args[i];
+						if(arg == null) {
+							arg = "";
+						}
+						if(!parameterTypes[i].equals(args[i].getClass())) {
+							isSameMethod = false;
+						}
+					}
+					if(isSameMethod) {
+						queryMethod = method;
+						break ;
+					}
+				}
+			}
+		}
+		return queryMethod;
+	}
+	/**
+	 * 调用Getter方法.
+	 * 支持多级,如:对象名.对象名.方法
+	 */
+	public static Object invokeGetter(Object obj, String propertyName) {
+		Object object = obj;
+		for (String name : StringUtils.splitStr(propertyName, DOT)){
+			String getterMethodName = GETTER_PREFIX + StringUtils.capitalize(name);
+			object = invokeMethod(object, getterMethodName, new Class[] {}, new Object[] {});
+		}
+		return object;
+	}
+
+	/**
+	 * 直接调用对象方法, 无视private/protected修饰符.
+	 * 用于一次性调用的情况,否则应使用getAccessibleMethod()函数获得Method后反复调用.
+	 * 同时匹配方法名+参数类型,
+	 */
+	public static Object invokeMethod(final Object obj, final String methodName, final Class<?>[] parameterTypes,
+									  final Object[] args) {
+		Method method = getAccessibleMethod(obj, methodName, parameterTypes);
+		if (method == null) {
+			throw new IllegalArgumentException("Could not find method [" + methodName + "] on target [" + obj + "]");
+		}
+
+		try {
+			return method.invoke(obj, args);
+		} catch (Exception e) {
+			throw convertReflectionExceptionToUnchecked(e);
+		}
+	}
+
+	/**
+	 * 循环向上转型, 获取对象的DeclaredMethod,并强制设置为可访问.
+	 * 如向上转型到Object仍无法找到, 返回null.
+	 * 匹配函数名+参数类型。
+	 *
+	 * 用于方法需要被多次调用的情况. 先使用本函数先取得Method,然后调用Method.invoke(Object obj, Object... args)
+	 */
+	public static Method getAccessibleMethod(final Object obj, final String methodName,
+											 final Class<?>... parameterTypes) {
+		//Validate.notNull(obj, "object can't be null");
+		//Validate.notBlank(methodName, "methodName can't be blank");
+		if (obj == null) {
+			return null;
+		}
+		if (StringUtils.isBlank(obj)){
+			return null;
+		}
+
+		for (Class<?> searchType = obj.getClass(); searchType != Object.class; searchType = searchType.getSuperclass()) {
+			try {
+				Method method = searchType.getDeclaredMethod(methodName, parameterTypes);
+				makeAccessible(method);
+				return method;
+			} catch (NoSuchMethodException e) {
+				// Method不在当前类定义,继续向上转型
+				continue;// new add
+			}
+		}
+		return null;
+	}
+	/**
+	 * 改变private/protected的方法为public,尽量不调用实际改动的语句,避免JDK的SecurityManager抱怨。
+	 */
+	public static void makeAccessible(Method method) {
+		if ((!Modifier.isPublic(method.getModifiers()) || !Modifier.isPublic(method.getDeclaringClass().getModifiers()))) {
+			if(!method.isAccessible()){
+			method.setAccessible(true);
+			}
+		}
+	}
+	/**
+	 * 将反射时的checked exception转换为unchecked exception.
+	 */
+	public static RuntimeException convertReflectionExceptionToUnchecked(Exception e) {
+		if (e instanceof IllegalAccessException || e instanceof IllegalArgumentException
+				|| e instanceof NoSuchMethodException) {
+			return new IllegalArgumentException(e);
+		} else if (e instanceof InvocationTargetException) {
+			return new RuntimeException(((InvocationTargetException) e).getTargetException());
+		} else if (e instanceof RuntimeException) {
+			return (RuntimeException) e;
+		}
+		return new RuntimeException("Unexpected Checked Exception.", e);
+	}
+}

+ 148 - 0
slope-common/slope-common-core/src/main/java/com/sckw/core/utils/RegularUtils.java

@@ -0,0 +1,148 @@
+package com.sckw.core.utils;
+
+import java.util.regex.Matcher;
+import java.util.regex.Pattern;
+
+/**
+ * @author zk
+ * @description 正则表达式校验
+ * @date 2020/05/09 14:37:50
+ */
+public class RegularUtils {
+    /**
+     * 手机号
+     */
+    public static final String PHONE_REG = "^1[3456789]\\d{9}$";
+
+    /**
+     * 浮点型(不包括0)保留两位小数
+     */
+    public static final String DECIMAL_REG = "^[+]?(([1-9]\\d*[.]?)|(0.))(\\d{1,2})?$";
+
+    /**
+     * 非负浮点型(包括0)
+     */
+    public static final String DECIMAL_REG1 = "^\\d+(\\.\\d+)?$";
+
+    /**
+     * 数字和字母
+     */
+    public static final String NUMBER_AND_LATTER = "[0-9A-Za-z]{18}";
+
+    /**
+     * 数字和大写字母
+     */
+    public static final String NUMBER_AND_UPPERCASE_LATTER = "[0-9A-Z]";
+
+    /**
+     * 正整数和0
+     */
+    public static final String NUMBER = "^[1-9]\\d*|0$";
+
+    /**
+     * 金额
+     */
+    public static final String DECIMAL_REG2 = "^(-?\\d+)(\\.\\d+)?$";
+
+    /**
+     * ${xxxxx}
+     */
+    public static final String DOLLAR_BIG_BRACKETS = "(\\$\\{)([\\w]+)(\\})";
+
+    /**
+     * 身份证
+     */
+    public static final String IDCARD = "[0-9A-Za-z]{15}|[0-9A-Za-z]{18}";
+    /**[0-9A-Za-z]{18}
+     * 车牌号
+     */
+//    public static final String TRUCK_NUMBER = "^[京津沪冀晋辽吉黑苏浙皖闽赣鲁豫鄂湘粤桂琼川黔云渝藏陕陇青宁新闽粤晋琼使领A_Z]{1}[A_Z]{1}[A-Z0-9]{4}[A-Z0-9挂学警港澳]{1}$";
+//    public static final String TRUCK_NUMBER = "^[京津冀晋蒙辽吉黑沪苏浙皖闽赣鲁豫鄂湘粤桂琼川贵云渝藏陕甘青宁新]{1}[A-Z]{1}[DF]{1}[0-9a-zA-Z]{5}$";
+    /**
+     * 车牌校验  五位数车牌
+     */
+    public static final String TRUCK_NUMBER_FIVE = "^[京津冀晋蒙辽吉黑沪苏浙皖闽赣鲁豫鄂湘粤桂琼川贵云渝藏陕甘青宁新使]{1}[a-zA-Z]{1}[0-9a-zA-Z]{5}$";
+
+    /**
+     * 车牌校验  六位数车牌
+     */
+    public static final String TRUCK_NUMBER_SIX = "^[京津冀晋蒙辽吉黑沪苏浙皖闽赣鲁豫鄂湘粤桂琼川贵云渝藏陕甘青宁新使]{1}[a-zA-Z]{1}[0-9a-zA-Z]{6}$";
+
+    /**
+     * 中文汉字
+     */
+    public static final String CHINESE = "^[\\u4e00-\\u9fa5]{1,6}$";
+
+    /**
+     * 姓名相关
+     * (企业法人、企业代表、员工姓名、司机姓名)
+     */
+    public static final String NAME = "^[\\u4e00-\\u9fa5]{1,25}$";
+
+
+    /**
+     * 道路运输许可证号
+     */
+    public static final String ROAD_LICENCE = "(^\\d{12})";
+
+    /**
+     * @param
+     * @return
+     * @description 校验
+     * @author zk
+     * @date 2020/5/9 14:38
+     **/
+    public static boolean matchs(String regular, String str) {
+        Pattern p = Pattern.compile(regular);
+        Matcher m = p.matcher(str);
+        boolean isMatch = m.matches();
+        return isMatch;
+    }
+
+    /**
+     * @param regular 正则 str匹配字符串 min 最小长度 max最大长度
+     * @desc: 校验(限制长度范围)
+     * @author: czh
+     * @date: 2023/7/25
+     */
+    public static boolean matchWithRange(String regular, String str, Integer min, Integer max) {
+        StringBuilder stringBuilder = new StringBuilder();
+        stringBuilder.append(regular).append("{").append(min).append(",").append(max).append("}$");
+        Pattern p = Pattern.compile(stringBuilder.toString());
+        Matcher m = p.matcher(str);
+        return m.matches();
+    }
+
+    /**
+     * @param regular 正则 str匹配字符串 fixLength 固定长度
+     * @desc: 校验(限制固定长度)
+     * @author: czh
+     * @date: 2023/7/25
+     */
+    public static boolean matchWithFix(String regular, String str, Integer fixLength) {
+        StringBuilder stringBuilder = new StringBuilder();
+        stringBuilder.append(regular).append("{").append(fixLength).append("}$");
+        Pattern p = Pattern.compile(stringBuilder.toString());
+        Matcher m = p.matcher(str);
+        return m.matches();
+    }
+
+    /**
+     * @param str 数值 numLength 整数长度  fractionLenth小数长度
+     * @desc: 校验(限制固定长度)
+     * @author: czh
+     * @date: 2023/7/25
+     */
+    public static boolean matchNumberWithFix(String str, Integer numLength, Integer fractionLenth) {
+        StringBuilder stringBuilder = new StringBuilder();
+        stringBuilder.append("\\d{1,").append(numLength).append("}([\\.]\\d{0,").append(fractionLenth).append("})?");
+        Pattern p = Pattern.compile(stringBuilder.toString());
+        Matcher m = p.matcher(str);
+        return m.matches();
+    }
+
+
+    public static void main(String[] args) {
+        System.out.println(matchs(IDCARD, "22883719241229935X"));
+    }
+}

+ 52 - 0
slope-common/slope-common-core/src/main/java/com/sckw/core/utils/SensitiveJsonSerializer.java

@@ -0,0 +1,52 @@
+package com.sckw.core.utils;
+
+import cn.hutool.core.util.ObjectUtil;
+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 com.sckw.core.annotation.Sensitive;
+import com.sckw.core.model.enums.SensitiveStrategy;
+import com.sckw.core.service.SensitiveService;
+import org.springframework.beans.BeansException;
+import java.io.IOException;
+import java.util.Objects;
+
+/**
+ * 数据脱敏json序列化工具
+ * @author zk
+ */
+//@Slf4j
+public class SensitiveJsonSerializer extends JsonSerializer<String> implements ContextualSerializer {
+
+    private SensitiveStrategy strategy;
+
+    @Override
+    public void serialize(String value, JsonGenerator gen, SerializerProvider serializers) throws IOException {
+        try {
+            SensitiveService sensitiveService = SpringUtils.getBean(SensitiveService.class);
+            if (ObjectUtil.isNotNull(sensitiveService) && sensitiveService.isSensitive()) {
+                gen.writeString(strategy.desensitizer().apply(value));
+            } else {
+                gen.writeString(value);
+            }
+        } catch (BeansException e) {
+            e.printStackTrace();
+            //log.error("脱敏实现不存在, 采用默认处理 => {}", e.getMessage());
+            System.out.println("脱敏实现不存在, 采用默认处理 => {}"+ e.getMessage());
+            gen.writeString(value);
+        }
+    }
+
+    @Override
+    public JsonSerializer<?> createContextual(SerializerProvider prov, BeanProperty property) throws JsonMappingException {
+        Sensitive annotation = property.getAnnotation(Sensitive.class);
+        if (Objects.nonNull(annotation) && Objects.equals(String.class, property.getType().getRawClass())) {
+            this.strategy = annotation.strategy();
+            return this;
+        }
+        return prov.findValueSerializer(property.getType(), property);
+    }
+}

+ 70 - 0
slope-common/slope-common-core/src/main/java/com/sckw/core/utils/SpringUtils.java

@@ -0,0 +1,70 @@
+package com.sckw.core.utils;
+
+import cn.hutool.extra.spring.SpringUtil;
+import org.springframework.aop.framework.AopContext;
+import org.springframework.beans.factory.NoSuchBeanDefinitionException;
+import org.springframework.context.ApplicationContext;
+
+/**
+ * spring工具类
+ * @author
+ */
+public final class SpringUtils extends SpringUtil {
+
+    /**
+     * 如果BeanFactory包含一个与所给名称匹配的bean定义,则返回true
+     *
+     * @param name
+     * @return boolean
+     */
+    public static boolean containsBean(String name) {
+        return getBeanFactory().containsBean(name);
+    }
+
+    /**
+     * 判断以给定名字注册的bean定义是一个singleton还是一个prototype。
+     * 如果与给定名字相应的bean定义没有被找到,将会抛出一个异常(NoSuchBeanDefinitionException)
+     *
+     * @param name
+     * @return boolean
+     */
+    public static boolean isSingleton(String name) throws NoSuchBeanDefinitionException {
+        return getBeanFactory().isSingleton(name);
+    }
+
+    /**
+     * @param name
+     * @return Class 注册对象的类型
+     */
+    public static Class<?> getType(String name) throws NoSuchBeanDefinitionException {
+        return getBeanFactory().getType(name);
+    }
+
+    /**
+     * 如果给定的bean名字在bean定义中有别名,则返回这些别名
+     *
+     * @param name
+     */
+    public static String[] getAliases(String name) throws NoSuchBeanDefinitionException {
+        return getBeanFactory().getAliases(name);
+    }
+
+    /**
+     * 获取aop代理对象
+     *
+     * @param invoker
+     * @return
+     */
+    @SuppressWarnings("unchecked")
+    public static <T> T getAopProxy(T invoker) {
+        return (T) AopContext.currentProxy();
+    }
+
+    /**
+     * 获取spring上下文
+     */
+    public static ApplicationContext context() {
+        return getApplicationContext();
+    }
+
+}

+ 63 - 0
slope-common/slope-common-core/src/main/java/com/sckw/core/utils/StringTimeUtil.java

@@ -0,0 +1,63 @@
+package com.sckw.core.utils;
+
+import com.sckw.core.exception.BusinessException;
+import lombok.extern.slf4j.Slf4j;
+import java.time.LocalDate;
+import java.time.LocalDateTime;
+import java.time.format.DateTimeFormatter;
+
+/**
+ * @author xucaiqin
+ * @date 2023-07-26 11:42:43
+ */
+@Slf4j
+public class StringTimeUtil {
+    private final static DateTimeFormatter dateTimeFormatter = DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss");
+    private final static DateTimeFormatter dateTimeYMD = DateTimeFormatter.ofPattern("yyyy-MM-dd");
+
+    @SuppressWarnings("all")
+    private static void formatCheck(String time) {
+        try {
+            LocalDate.parse(time, dateTimeYMD);
+        } catch (Exception e) {
+            log.error("时间格式化错误", e);
+            throw new BusinessException("时间格式化错误!");
+        }
+    }
+
+    /**
+     * @param time yyyy-MM-dd
+     * @return String yyyy-MM-dd HH:mm:ss
+     * @throws RuntimeException
+     */
+    public static String fillStart(String time) {
+        formatCheck(time);
+        return time + " 00:00:00";
+    }
+
+    /**
+     * @param time yyyy-MM-dd
+     * @return String yyyy-MM-dd HH:mm:ss
+     * @throws RuntimeException
+     */
+    public static String fillEnd(String time) {
+        formatCheck(time);
+        return time + " 23:59:59";
+    }
+
+    /**
+     * @param time yyyy-MM-dd
+     * @return LocalDateTime yyyy-MM-dd HH:mm:ss
+     */
+    public static LocalDateTime startDateTime(String time) {
+        return LocalDateTime.parse(fillStart(time), dateTimeFormatter);
+    }
+
+    /**
+     * @param time yyyy-MM-dd
+     * @return LocalDateTime yyyy-MM-dd HH:mm:ss
+     */
+    public static LocalDateTime endDateTime(String time) {
+        return LocalDateTime.parse(fillEnd(time), dateTimeFormatter);
+    }
+}

+ 832 - 0
slope-common/slope-common-core/src/main/java/com/sckw/core/utils/StringUtils.java

@@ -0,0 +1,832 @@
+package com.sckw.core.utils;
+
+import com.sckw.core.exception.BusinessException;
+import com.sckw.core.model.constant.Global;
+
+import java.lang.reflect.InvocationTargetException;
+import java.math.BigDecimal;
+import java.math.RoundingMode;
+import java.util.*;
+import java.util.regex.Matcher;
+import java.util.regex.Pattern;
+import java.util.stream.Collectors;
+
+/**
+ * @Description 自测公共处理类
+ * @Author zk
+ * @Date 2019/5/13 0013
+ */
+public class StringUtils {
+
+    /**
+     * 空字符串
+     */
+    private static final String NULLSTR = "";
+    /**
+     * 下划线
+     */
+    private static final char SEPARATOR_CHAR = '_';
+    /**
+     * 下划线
+     */
+    private static final String SEPARATOR_STRING = "_";
+    /**
+     * 加密字符
+     */
+    public static final String HASH_ALGORITHM = "SHA-1";
+    /**
+     * ${xxx}
+     **/
+    public static final Pattern pattern = Pattern.compile("(\\$\\{)([\\w]+)(\\})");
+
+    /**
+     * 判断字符串是否为空
+     *
+     * @param str 源字符串
+     * @return
+     * @author dengyinghui
+     * @date 2018/11/12
+     */
+    public static boolean validatorEmpty(String str) {
+        if (str != null && !"".equals(str)) {
+            return false;
+        }
+
+        return true;
+    }
+
+    /**
+     * 判空操作(空)
+     *
+     * @param str
+     * @return
+     */
+    public static boolean isBlank(Object str) {
+        String value = objectStr(str);
+        return value == null || "".equals(value) || "null".equals(value);
+    }
+
+    /**
+     * 判空操作(空)
+     *
+     * @param value
+     * @return
+     */
+    public static boolean isBlank(String value) {
+        return value == null || "".equals(value) || "null".equals(value);
+    }
+
+    /**
+     * 判空操作(非空)
+     *
+     * @param str
+     * @return
+     */
+    public static boolean isNotBlank(Object str) {
+        String value = objectStr(str);
+        return value != null && !"".equals(value) && !"null".equals(value);
+    }
+
+    /**
+     * 判空操作(非空)
+     *
+     * @param value
+     * @return
+     */
+    public static boolean isNotBlank(String value) {
+        return value != null && !"".equals(value) && !"null".equals(value);
+    }
+
+    /**
+     * 获取uuid
+     *
+     * @return
+     */
+    public static String uuid() {
+        return UUID.randomUUID().toString().replaceAll("-", "");
+    }
+
+    /**
+     * 获取参数不为空值
+     *
+     * @param value defaultValue 要判断的value
+     * @return value 返回值
+     */
+    public static <T> T nvl(T value, T defaultValue) {
+        return value != null ? value : defaultValue;
+    }
+
+    /**
+     * * 判断一个Collection是否为空, 包含List,Set,Queue
+     *
+     * @param coll 要判断的Collection
+     * @return true:为空 false:非空
+     */
+    public static boolean isEmpty(Collection<?> coll) {
+        return isNull(coll) || coll.isEmpty();
+    }
+
+    /**
+     * * 判断一个Collection是否非空,包含List,Set,Queue
+     *
+     * @param coll 要判断的Collection
+     * @return true:非空 false:空
+     */
+    public static boolean isNotEmpty(Collection<?> coll) {
+        return !isEmpty(coll);
+    }
+
+    /**
+     * * 判断一个对象数组是否为空
+     *
+     * @param objects 要判断的对象数组
+     *                * @return true:为空 false:非空
+     */
+    public static boolean isEmpty(Object[] objects) {
+        return isNull(objects) || (objects.length == 0);
+    }
+
+    /**
+     * * 判断一个对象数组是否非空
+     *
+     * @param objects 要判断的对象数组
+     * @return true:非空 false:空
+     */
+    public static boolean isNotEmpty(Object[] objects) {
+        return !isEmpty(objects);
+    }
+
+    /**
+     * * 判断一个Map是否为空
+     *
+     * @param map 要判断的Map
+     * @return true:为空 false:非空
+     */
+    public static boolean isEmpty(Map<?, ?> map) {
+        return isNull(map) || map.isEmpty();
+    }
+
+    /**
+     * * 判断一个Map是否为空
+     *
+     * @param map 要判断的Map
+     * @return true:非空 false:空
+     */
+    public static boolean isNotEmpty(Map<?, ?> map) {
+        return !isEmpty(map);
+    }
+
+    /**
+     * * 判断一个字符串是否为空串
+     *
+     * @param str String
+     * @return true:为空 false:非空
+     */
+    public static boolean isEmpty(String str) {
+        return isNull(str) || NULLSTR.equals(str.trim());
+    }
+
+    /**
+     * * 判断一个字符串是否为非空串
+     *
+     * @param str String
+     * @return true:非空串 false:空串
+     */
+    public static boolean isNotEmpty(String str) {
+        return !isEmpty(str);
+    }
+
+    /**
+     * * 判断一个对象是否为空
+     *
+     * @param object Object
+     * @return true:为空 false:非空
+     */
+    public static boolean isNull(Object object) {
+        return object == null;
+    }
+
+    /**
+     * * 判断一个对象是否非空
+     *
+     * @param object Object
+     * @return true:非空 false:空
+     */
+    public static boolean isNotNull(Object object) {
+        return !isNull(object);
+    }
+
+    /**
+     * * 判断一个对象是否是数组类型(Java基本型别的数组)
+     *
+     * @param object 对象
+     * @return true:是数组 false:不是数组
+     */
+    public static boolean isArray(Object object) {
+        return isNotNull(object) && object.getClass().isArray();
+    }
+
+    /**
+     * 去空格
+     */
+    public static String trim(String str) {
+        return (str == null ? "" : str.trim());
+    }
+
+    /**
+     * 截取字符串
+     *
+     * @param str   字符串
+     * @param start 开始
+     * @return 结果
+     */
+    public static String substring(final String str, int start) {
+        if (str == null) {
+            return NULLSTR;
+        }
+
+        if (start < 0) {
+            start = str.length() + start;
+        }
+
+        if (start < 0) {
+            start = 0;
+        }
+        if (start > str.length()) {
+            return NULLSTR;
+        }
+
+        return str.substring(start);
+    }
+
+    /**
+     * 截取字符串
+     *
+     * @param str   字符串
+     * @param start 开始
+     * @param end   结束
+     * @return 结果
+     */
+    public static String substring(final String str, int start, int end) {
+        if (str == null) {
+            return NULLSTR;
+        }
+
+        if (end < 0) {
+            end = str.length() + end;
+        }
+        if (start < 0) {
+            start = str.length() + start;
+        }
+
+        if (end > str.length()) {
+            end = str.length();
+        }
+
+        if (start > end) {
+            return NULLSTR;
+        }
+
+        if (start < 0) {
+            start = 0;
+        }
+        if (end < 0) {
+            end = 0;
+        }
+
+        return str.substring(start, end);
+    }
+
+    /**
+     * 格式化文本, {} 表示占位符<br>
+     * 此方法只是简单将占位符 {} 按照顺序替换为参数<br>
+     * 如果想输出 {} 使用 \\转义 { 即可,如果想输出 {} 之前的 \ 使用双转义符 \\\\ 即可<br>
+     * 例:<br>
+     * 通常使用:format("this is {} for {}", "a", "b") -> this is a for b<br>
+     * 转义{}: format("this is \\{} for {}", "a", "b") -> this is \{} for a<br>
+     * 转义\: format("this is \\\\{} for {}", "a", "b") -> this is \a for b<br>
+     *
+     * @param template 文本模板,被替换的部分用 {} 表示
+     * @param params 参数值
+     * @return 格式化后的文本
+
+    public static String format(String template, Object... params)
+    {
+    if (isEmpty(params) || isEmpty(template))
+    {
+    return template;
+    }
+    return StrFormatter.format(template, params);
+    }*/
+
+    /**
+     * 下划线转驼峰命名
+     */
+    public static String toUnderScoreCase(String s) {
+        if (s == null) {
+            return null;
+        }
+        StringBuilder sb = new StringBuilder();
+        boolean upperCase = false;
+        for (int i = 0; i < s.length(); i++) {
+            char c = s.charAt(i);
+
+            boolean nextUpperCase = true;
+
+            if (i < (s.length() - 1)) {
+                nextUpperCase = Character.isUpperCase(s.charAt(i + 1));
+            }
+
+            if ((i > 0) && Character.isUpperCase(c)) {
+                if (!upperCase || !nextUpperCase) {
+                    sb.append(SEPARATOR_CHAR);
+                }
+                upperCase = true;
+            } else {
+                upperCase = false;
+            }
+
+            sb.append(Character.toLowerCase(c));
+        }
+
+        return sb.toString();
+    }
+
+    /**
+     * 是否包含字符串
+     *
+     * @param str  验证字符串
+     * @param strs 字符串组
+     * @return 包含返回true
+     */
+    public static boolean inStringIgnoreCase(String str, String... strs) {
+        if (str != null && strs != null) {
+            for (String s : strs) {
+                if (str.equalsIgnoreCase(trim(s))) {
+                    return true;
+                }
+            }
+        }
+        return false;
+    }
+
+    /**
+     * 截取字符串从index到最后
+     *
+     * @param str
+     * @param index
+     * @return
+     */
+    public static String subStrFromIndexToEnd(String str, Integer index) {
+        if (StringUtils.isBlank(str) || str.length() <= index) {
+            return str;
+        }
+        return str.substring(str.length() - index);
+    }
+
+    /**
+     * 字符串转数组
+     *
+     * @param params 字符串
+     * @param regex  截取字符
+     * @return
+     */
+    public static String[] splitStr(String params, String regex) {
+        regex = StringUtils.isNotBlank(regex) ? regex : ",";
+        return StringUtils.isNotBlank(params) ? params.split(regex) : new String[]{};
+    }
+
+    /**
+     * 字符串分割转list
+     *
+     * @param str 字符串
+     * @param cls 转换类型class
+     * @return
+     */
+    public static <T> List<T> splitStrToList(String str, Class<T> cls) {
+        return splitStrToList(str, ",", cls);
+    }
+
+    /**
+     * 字符串分割转list
+     *
+     * @param str   字符串
+     * @param regex 截取字符
+     * @param cls   转换类型class
+     * @return
+     */
+    public static <T> List<T> splitStrToList(String str, String regex, Class<T> cls) {
+        regex = StringUtils.isNotBlank(regex) ? regex : ",";
+        if (StringUtils.isBlank(str)) {
+            return Collections.emptyList();
+        }
+        List<T> result;
+        if (cls == String.class) {
+            result = Arrays.stream(str.split(regex))
+                    .map(strValue -> (T) strValue)
+                    .collect(Collectors.toList());
+        } else {
+            result = Arrays.stream(str.split(regex))
+                    .map(strValue -> {
+                        try {
+                            return cls.getConstructor(String.class).newInstance(strValue);
+                        } catch (InstantiationException | IllegalAccessException | InvocationTargetException |
+                                 NoSuchMethodException e) {
+                            throw new BusinessException("字符串转集合异常!");
+                        }
+                    }).collect(Collectors.toList());
+        }
+        return result;
+    }
+
+    /**
+     * Object对象转字符串
+     *
+     * @param obj
+     * @return
+     */
+    public static String objectStr(Object obj) {
+        if (obj != null) {
+            return obj.toString();
+        }
+        return null;
+    }
+
+    public static String trimNull(Object str) {
+        if (str == null) {
+            return "";
+        } else {
+            return str instanceof String ? ((String) str).trim() : str.toString();
+        }
+    }
+
+    /**
+     * 解析出url请求的路径,包括页面
+     *
+     * @param strURL url地址
+     * @return url路径
+     */
+    public static String urlPage(String strURL) {
+        String strPage = null;
+        String[] arrSplit = null;
+        strURL = strURL.trim().toLowerCase();
+        arrSplit = strURL.split("[?]");
+        if (strURL.length() > 0) {
+            if (arrSplit.length > 1) {
+                if (arrSplit[0] != null) {
+                    strPage = arrSplit[0];
+                }
+            }
+        }
+        return strPage;
+    }
+
+    /**
+     * 去掉url中的路径,留下请求参数部分
+     *
+     * @param strURL url地址
+     * @return url请求参数部分
+     */
+    private static String truncateUrlPage(String strURL) {
+        String strAllParam = null;
+        String[] arrSplit = null;
+        strURL = strURL.trim().toLowerCase();
+        arrSplit = strURL.split("[?]");
+        if (strURL.length() > 1) {
+            if (arrSplit.length > 1) {
+                if (arrSplit[1] != null) {
+                    strAllParam = arrSplit[1];
+                }
+            }
+        }
+        return strAllParam;
+    }
+
+    /**
+     * 解析出url参数中的键值对
+     * 如 "index.jsp?Action=del&id=123",解析出Action:del,id:123存入map中
+     *
+     * @param url url地址
+     * @return url请求参数部分
+     */
+    public static Map<String, String> urlRequest(String url) {
+        Map<String, String> mapRequest = new HashMap<>(Global.NUMERICAL_SIXTEEN);
+        String[] arrSplit = null;
+        String strUrlParam = truncateUrlPage(url);
+        if (strUrlParam == null) {
+            return mapRequest;
+        }
+        //每个键值为一组 www.2cto.com
+        arrSplit = strUrlParam.split("[&]");
+        for (String strSplit : arrSplit) {
+            String[] arrSplitEqual = null;
+            arrSplitEqual = strSplit.split("[=]");
+            //解析出键值
+            if (arrSplitEqual.length > 1) {
+                //正确解析
+                mapRequest.put(arrSplitEqual[0], arrSplitEqual[1]);
+            } else {
+                if (arrSplitEqual[0] != "") {
+                    //只有参数没有值,不加入
+                    mapRequest.put(arrSplitEqual[0], "");
+                }
+            }
+        }
+        return mapRequest;
+    }
+
+    /**
+     * 解析出url参数中的键值对
+     * 如 "Action=del&id=123",解析出Action:del,id:123存入map中
+     *
+     * @param strUrlParam url地址
+     * @return url请求参数部分
+     */
+    public static Map<String, String> urlParams(String strUrlParam) {
+        Map<String, String> mapRequest = new HashMap<>(Global.NUMERICAL_SIXTEEN);
+        String[] arrSplit = null;
+        if (strUrlParam == null) {
+            return mapRequest;
+        }
+        //每个键值为一组 www.2cto.com
+        arrSplit = strUrlParam.split("[&]");
+        for (String strSplit : arrSplit) {
+            String[] arrSplitEqual = null;
+            arrSplitEqual = strSplit.split("[=]");
+            //解析出键值
+            if (arrSplitEqual.length > 1) {
+                //正确解析
+                mapRequest.put(arrSplitEqual[0], arrSplitEqual[1]);
+            } else {
+                if (arrSplitEqual[0] != "") {
+                    //只有参数没有值,不加入
+                    mapRequest.put(arrSplitEqual[0], "");
+                }
+            }
+        }
+        return mapRequest;
+    }
+
+    /**
+     * 替换掉HTML标签方法
+     */
+    public static String replaceHtml(String html) {
+        if (isBlank(html)) {
+            return "";
+        }
+        String regEx = "<.+?>";
+        Pattern p = Pattern.compile(regEx);
+        Matcher m = p.matcher(html);
+        String s = m.replaceAll("");
+        return s;
+    }
+
+    /**
+     * 替换为手机识别的HTML,去掉样式及属性,保留回车。
+     *
+     * @param html
+     * @return
+     */
+    public static String replaceMobileHtml(String html) {
+        if (html == null) {
+            return "";
+        }
+        return html.replaceAll("<([a-z]+?)\\s+?.*?>", "<$1>");
+    }
+
+    /**
+     * 转换为Double类型
+     */
+    public static Double toDouble(Object val) {
+        if (val == null) {
+            return 0D;
+        }
+        try {
+            return Double.valueOf(trim(val.toString()));
+        } catch (Exception e) {
+            return 0D;
+        }
+    }
+
+    /**
+     * 转换为Float类型
+     */
+    public static Float toFloat(Object val) {
+        return toDouble(val).floatValue();
+    }
+
+    /**
+     * 转换为Long类型
+     */
+    public static Long toLong(Object val) {
+        return toDouble(val).longValue();
+    }
+
+    /**
+     * 转换为Integer类型
+     */
+    public static Integer toInteger(Object val) {
+        return toLong(val).intValue();
+    }
+
+    /**
+     * Object转String
+     *
+     * @param val 源字符串
+     * @return
+     * @author dengyinghui
+     * @date 2018/2/27
+     */
+    public static String valueOf(Object val) {
+        if (val == null) {
+            return "";
+        } else {
+            return String.valueOf(val);
+        }
+    }
+
+    private static String toHex(byte[] bytes) {
+        final char[] hexDigits = "0123456789ABCDEF".toCharArray();
+        StringBuilder ret = new StringBuilder(bytes.length * 2);
+        for (int i = 0; i < bytes.length; i++) {
+            ret.append(hexDigits[(bytes[i] >> 4) & 0x0f]);
+            ret.append(hexDigits[bytes[i] & 0x0f]);
+        }
+        return ret.toString();
+    }
+
+    /**
+     * 替换字符串${xxxx}
+     *
+     * @param content     账号创建成功,欢迎使用危品汇!登录账号:${account},默认密码:${pwd}!
+     * @param regex       需要替换的字符(account)
+     * @param replacement 替换值(173xxxxxxxx)
+     * @return
+     */
+    public static String replace(String content, String regex, String replacement) {
+        if (content == null || regex == null || replacement == null) {
+            return null;
+        }
+        Matcher matcher = pattern.matcher(content);
+        StringBuffer strBuf = new StringBuffer();
+        while (matcher.find()) {
+            String group = matcher.group().replace("${", "").replace("}", "");
+            if (group.equals(regex)) {
+                matcher.appendReplacement(strBuf, replacement);
+                return matcher.appendTail(strBuf).toString();
+            }
+        }
+        return matcher.appendTail(strBuf).toString();
+    }
+
+    /**
+     * 替换字符串${xxxx}
+     *
+     * @param content 账号创建成功,欢迎使用危品汇!登录账号:${account},默认密码:${pwd}!
+     * @param params  {"account":"xxxxx", "pwd":"xxxx"}
+     * @return
+     */
+    public static String replace1(String content, Map<String, Object> params) {
+        if (content == null || params == null) {
+            return null;
+        }
+
+        Matcher matcher = pattern.matcher(content);
+        StringBuffer strBuf = new StringBuffer();
+        while (matcher.find()) {
+            String group = matcher.group().replace("${", "").replace("}", "");
+            if (params.get(group) != null) {
+                String replacement = StringUtils.objectStr(params.get(group));
+                matcher.appendReplacement(strBuf, replacement);
+            }
+        }
+        matcher.appendTail(strBuf);
+        return strBuf.toString();
+    }
+
+    public static String capitalize(final String str) {
+        int strLen;
+        if (str == null || (strLen = str.length()) == 0) {
+            return str;
+        }
+
+        final int firstCodepoint = str.codePointAt(0);
+        final int newCodePoint = Character.toTitleCase(firstCodepoint);
+        if (firstCodepoint == newCodePoint) {
+            // already capitalized
+            return str;
+        }
+        // cannot be longer than the char array
+        final int [] newCodePoints = new int[strLen];
+        int outOffset = 0;
+        // copy the first codepoint
+        newCodePoints[outOffset++] = newCodePoint;
+        for (int inOffset = Character.charCount(firstCodepoint); inOffset < strLen; ) {
+            final int codepoint = str.codePointAt(inOffset);
+            // copy the remaining ones
+            newCodePoints[outOffset++] = codepoint;
+            inOffset += Character.charCount(codepoint);
+        }
+        return new String(newCodePoints, 0, outOffset);
+    }
+
+
+    /**
+     * 字符串格式化长度不足补0
+     */
+    public static String addZeroForNum(String str, int strLength) {
+        int strLen = str.length();
+        if (strLen < strLength) {
+            StringBuffer sb = new StringBuffer(str);
+            while (strLen < strLength) {
+                // 左补0
+                sb.insert(0, "0");
+                strLen = sb.length();
+            }
+            str = sb.toString();
+        }
+        return str;
+    }
+
+    /**
+     * 值替换
+     *
+     * @param prefix
+     * @param args
+     * @return
+     */
+    public static String format(String prefix, Object... args) {
+        return String.format(prefix, args);
+    }
+
+    /**
+     * @desc: 替换文本变量,变量格式为:${}
+     * @author: yzc
+     * @date: 2023-09-01 9:03
+     * @Param text: 文本
+     * @Param varNames:  变量名map
+     * @return: java.util.List<java.lang.String>  替换后的文本
+     */
+    public static String replaceTextVar(String text, Map<String, Object> varNames) {
+        if (StringUtils.isBlank(text) || CollectionUtils.isEmpty(varNames)) {
+            return text;
+        }
+        String str = "\\$\\{([^}]+)\\}";
+        Pattern pattern = Pattern.compile(str);
+        Matcher matcher = pattern.matcher(text);
+        StringBuilder result = new StringBuilder();
+        while (matcher.find()) {
+            String varName = matcher.group(1);
+            Object varValue = varNames.get(varName);
+            if (Objects.nonNull(varValue)) {
+                matcher.appendReplacement(result, varValue.toString());
+            }
+        }
+        matcher.appendTail(result);
+        return result.toString();
+    }
+
+    /**
+     * @desc: 设置两位小数
+     * @author: yzc
+     * @date: 2023-09-26 10:11
+     * @Param d:
+     * @return: java.lang.BigDecimal
+     */
+    private BigDecimal setScale(Double d) {
+        if (Objects.isNull(d) || BigDecimal.ZERO.compareTo(BigDecimal.valueOf(d)) == 0) {
+            return new BigDecimal("0.00");
+        }
+        return BigDecimal.valueOf(d).setScale(2, RoundingMode.HALF_UP);
+    }
+
+    /**
+     * @desc: 设置两位小数
+     * @author: yzc
+     * @date: 2023-09-26 10:11
+     * @Param d:
+     * @return: java.lang.BigDecimal
+     */
+    private BigDecimal setScale(BigDecimal d) {
+        if (Objects.isNull(d) || BigDecimal.ZERO.compareTo(d) == 0) {
+            return new BigDecimal("0.00");
+        }
+        return d.setScale(2, RoundingMode.HALF_UP);
+    }
+
+    public static void main(String[] args) {
+        Map<String, Object> param = new HashMap<>(Global.NUMERICAL_SIXTEEN);
+        param.put("account", "17358629955");
+        param.put("pwd", "123456");
+        String template = "账号创建成功,欢迎使用危品汇!登录账号:${account},默认密码:${pwd}!";
+        for (String key : param.keySet()) {
+            template = StringUtils.replace(template, key, StringUtils.objectStr(param.get(key)));
+        }
+        System.out.println(template);
+
+        Map<String, Object> m = new HashMap<>(Global.NUMERICAL_SIXTEEN);
+        m.put("account", "han");
+        m.put("pwd", "zhong");
+        System.out.println(replace1(template, m));
+    }
+}

+ 10 - 0
slope-common/slope-common-core/src/main/java/com/sckw/core/utils/UUIDUtils.java

@@ -0,0 +1,10 @@
+package com.sckw.core.utils;
+
+import cn.hutool.core.lang.UUID;
+
+public class UUIDUtils {
+
+    public static String get32UUID(){
+        return UUID.randomUUID().toString().replace("-", "");
+    }
+}

+ 169 - 0
slope-common/slope-common-core/src/main/java/com/sckw/core/utils/workerUtils.java

@@ -0,0 +1,169 @@
+package com.sckw.core.utils;
+
+import java.text.ParseException;
+import java.text.SimpleDateFormat;
+import java.util.Date;
+
+public class workerUtils {
+
+    /**
+     * 开始时间截 (2023-05-26)
+     */
+    private final long twepoch = 1685030400000L;
+
+    /**
+     * 机器id所占的位数
+     */
+    private final long workerIdBits = 5L;
+
+    /**
+     * 数据标识id所占的位数
+     */
+    private final long datacenterIdBits = 5L;
+
+    /**
+     * 支持的最大机器id,结果是31 (这个移位算法可以很快的计算出几位二进制数所能表示的最大十进制数)
+     */
+    private final long maxWorkerId = -1L ^ (-1L << workerIdBits);
+
+    /**
+     * 支持的最大数据标识id,结果是31
+     */
+    private final long maxDatacenterId = -1L ^ (-1L << datacenterIdBits);
+
+    /**
+     * 序列在id中占的位数
+     */
+    private final long sequenceBits = 12L;
+
+    /**
+     * 机器ID向左移12位
+     */
+    private final long workerIdShift = sequenceBits;
+
+    /**
+     * 数据标识id向左移17位(12+5)
+     */
+    private final long datacenterIdShift = sequenceBits + workerIdBits;
+
+    /**
+     * 时间截向左移22位(5+5+12)
+     */
+    private final long timestampLeftShift = sequenceBits + workerIdBits + datacenterIdBits;
+
+    /**
+     * 生成序列的掩码,这里为4095 (0b111111111111=0xfff=4095)
+     */
+    private final long sequenceMask = -1L ^ (-1L << sequenceBits);
+
+    /**
+     * 工作机器ID(0~31)
+     */
+    private long workerId;
+
+    /**
+     * 数据中心ID(0~31)
+     */
+    private long datacenterId;
+
+    /**
+     * 毫秒内序列(0~4095)
+     */
+    private long sequence = 0L;
+
+    /**
+     * 上次生成ID的时间截
+     */
+    private long lastTimestamp = -1L;
+
+    /**
+     * 构造函数
+     * @param workerId     工作ID (0~31)
+     * @param datacenterId 数据中心ID (0~31)
+     */
+    public workerUtils(long workerId, long datacenterId) {
+        if (workerId > maxWorkerId || workerId < 0) {
+            throw new IllegalArgumentException(String.format("worker Id can't be greater than %d or less than 0", maxWorkerId));
+        }
+        if (datacenterId > maxDatacenterId || datacenterId < 0) {
+            throw new IllegalArgumentException(String.format("datacenter Id can't be greater than %d or less than 0", maxDatacenterId));
+        }
+        this.workerId = workerId;
+        this.datacenterId = datacenterId;
+    }
+
+    /**
+     * 获得下一个ID (该方法是线程安全的)
+     * @return SnowflakeId
+     */
+    public synchronized long nextId() {
+        long timestamp = timeGen();
+        // 如果当前时间小于上一次ID生成的时间戳,说明系统时钟回退过这个时候应当抛出异常
+        if (timestamp < lastTimestamp) {
+            throw new RuntimeException(
+                    String.format("Clock moved backwards.  Refusing to generate id for %d milliseconds", lastTimestamp - timestamp));
+        }
+        // 如果是同一时间生成的,则进行毫秒内序列
+        if (lastTimestamp == timestamp) {
+            sequence = (sequence + 1) & sequenceMask;
+            // 毫秒内序列溢出
+            if (sequence == 0) {
+                //阻塞到下一个毫秒,获得新的时间戳
+                timestamp = tilNextMillis(lastTimestamp);
+            }
+        }
+        // 时间戳改变,毫秒内序列重置
+        else {
+            sequence = 0L;
+        }
+        // 上次生成ID的时间截
+        lastTimestamp = timestamp;
+        // 移位并通过或运算拼到一起组成64位的ID
+        return ((timestamp - twepoch) << timestampLeftShift)
+                | (datacenterId << datacenterIdShift)
+                | (workerId << workerIdShift)
+                | sequence;
+    }
+
+    /**
+     * 阻塞到下一个毫秒,直到获得新的时间戳
+     * @param lastTimestamp 上次生成ID的时间截
+     * @return 当前时间戳
+     */
+    protected long tilNextMillis(long lastTimestamp) {
+        long timestamp = timeGen();
+        while (timestamp <= lastTimestamp) {
+            timestamp = timeGen();
+        }
+        return timestamp;
+    }
+
+    /**
+     * 返回以毫秒为单位的当前时间
+     * @return 当前时间(毫秒)
+     */
+    protected long timeGen() {
+        return System.currentTimeMillis();
+    }
+
+    public static void main(String[] args) throws InterruptedException {
+        workerUtils idWorker = new workerUtils(0, 0);
+        for (int i = 0; i < 10; i++) {
+            long id = idWorker.nextId();
+            Thread.sleep(1);
+            System.out.println(id);
+        }
+
+        SimpleDateFormat formater = new SimpleDateFormat("yyyy-MM-dd");
+        //有一个字符串表示的日期
+        String str = "2023-05-26";
+        Date date = null;
+        try {
+            date = formater.parse(str);
+            System.out.println(date.getTime());
+        } catch (ParseException e) {
+            e.printStackTrace();
+        }
+
+    }
+}

+ 34 - 0
slope-common/slope-common-core/src/main/java/com/sckw/core/web/config/CustomConfig.java

@@ -0,0 +1,34 @@
+package com.sckw.core.web.config;
+
+import lombok.Data;
+import org.springframework.beans.factory.annotation.Value;
+import org.springframework.stereotype.Component;
+
+/**
+ * @author czh
+ * @desc 自定义配置类
+ * @date 2023/6/16
+ */
+@Data
+@Component
+public class CustomConfig {
+
+    /**
+     * 直接放行的请求链接
+     */
+    @Value("${links}")
+    private String links;
+
+//    /**
+//     * 是否允许一个账号绑定多个角色
+//     */
+//    @Value("${isBindManyRole}")
+//    private Integer isBindManyRole;
+
+//    /**
+//     * 需要token校验但不需要接口权限校验的请求链接
+//     */
+//    @Value("${withoutLinks}")
+//    private String withoutLinks;
+
+}

+ 0 - 0
slope-common/slope-common-core/src/main/java/com/sckw/core/web/config/GlobalTransactionalConfig.java


+ 197 - 0
slope-common/slope-common-core/src/main/java/com/sckw/core/web/constant/HttpStatus.java

@@ -0,0 +1,197 @@
+package com.sckw.core.web.constant;
+
+/**
+ * @Description 自定义接口请求状态码(和http请求码无关)
+ * @Author zk
+ * @Date 2019/5/13 0013
+ */
+public class HttpStatus {
+
+    /**成功状态码*/
+    public static final int SUCCESS_CODE = 60200;
+    /**成功提示信息*/
+    public static final String SUCCESS_MESSAGE = "success";
+
+    /**未登录状态码*/
+    public static final int UN_LOGIN_CODE = 60300;
+    /**未登录提示信息*/
+    public static final String UN_LOGIN_MESSAGE = "您尚未登录,请先登录!";
+
+    /**访问权限状态码*/
+    public static final int AUTHORITY_NO_CODE = 60403;
+    public static final String ACCESS_FIAL = "暂无该功能权限!";
+
+    /**全局异常状态码*/
+    public static final int GLOBAL_EXCEPTION_CODE = 60500;
+    /**
+     * 完结贸易订单失败异常码
+     */
+    public static final int COMPLETE_TORDER_FAIL_CODE = 60666;
+    /**
+     * 商品上架失败异常码
+     */
+    public static final int GOODS_PUT_ON_SHELVES_FAIL_CODE = 60667;
+    /**全局异常提示信息*/
+    public static final String GLOBAL_EXCEPTION_MESSAGE = "攻城狮正在拼命优化,请您稍候再试!";
+
+    /**参数缺失状态码*/
+    public static final int PARAMETERS_MISSING_CODE = 60600;
+    public static final String ID_MISSING = "id不能为空!";
+    public static final String ACCOUNT_MISSING = "用户账号必填!";
+    public static final String ACCOUNT_FREEZE = "用户账号不能重复冻结!";
+    public static final String ACCOUNT_UNFREEZE = "用户账号不能重复解冻!";
+    public static final String PWD_MISSING = "密码不能为空!";
+    public static final String TOKEN_MISSING = "token不能为空!";
+    public static final String TOKEN_ERROR = "非法token!";
+    public static final String CAPCHA_ERROR = "验证码无效!";
+    public static final String ADDRESS_EXISTS = "地点已存在,不可重复!";
+
+    /**其他自定义状态码*/
+    public static final int CODE_60603 = 60603;
+    public static final String ENTCERTIFICATES_INVAILD = "您的企业资质已失效,暂没有权限访问,请尽快更新资质";
+    public static final String ENTCERTIFICATES_NOT_REGISTER = "您未做企业资质认证,暂没有权限访问";
+    public static final String ENTCERTIFICATES_NOT_PASS = "您的企业资质认证还在审核中,暂没有权限访问";
+
+
+
+    public static final int CODE_60604 = 60604;
+    public static final int CODE_60605 = 60605;
+    public static final int CODE_60606 = 60606;
+    public static final int CODE_60607 = 60607;
+    public static final int CODE_60608 = 60608;
+    public static final int CODE_60609 = 60609;
+    /**sentinel异常code定义*/
+    public static final int CODE_60701 = 60701;
+    public static final int CODE_60801 = 60801;
+    public static final int CODE_60901 = 60901;
+    public static final int CODE_601001 = 601001;
+    public static final int CODE_601101 = 601101;
+    public static final int CODE_601201 = 601201;
+
+    public static final String FLOW_EXCEPTION_ERROR_MESSAGE = "您的访问过于频繁,请稍后重试";
+    public static final String DEGRADE_EXCEPTION_ERROR_MESSAGE = "调用服务响应异常,请稍后重试";
+    public static final String PARAM_FLOW_EXCEPTION_ERROR_MESSAGE = "您对热点参数访问过于频繁,请稍后重试";
+    public static final String SYSTEM_BLOCK_EXCEPTION_ERROR_MESSAGE = "已触碰系统的红线规则,请检查访问参数";
+    public static final String AUTHORITY_EXCEPTION_ERROR_MESSAGE = "授权规则检测不同,请检查访问参数";
+    public static final String OTHER_EXCEPTION_ERROR_MESSAGE = "非法访问,请稍后重试";
+
+    /**版本号和接口版本不对称状态码*/
+    public static final int VERSION_NOT_NEWEST_CODE = 60700;
+    /**版本号和接口版本不对称提示信息*/
+    public static final String VERSION_NOT_NEWEST_MESSAGE = "当前版本较低,请更新升级后再试!";
+
+
+    /**参数格式不正确状态码*/
+    public static final int PARAMETERS_PATTERN_ERROR_CODE = 60800;
+    /**参数格式不正确提示信息*/
+    public static final String PARAMETERS_PATTERN_ERROR_MESSAGE = "参数格式不正确";
+    public static final String CONTACTS_ERROR = "联系人格式不正确";
+    public static final String CONTACTS_PHONE_ERROR = "联系人手机号格式不正确";
+    public static final String LEGAL_NAME_ERROR = "法人格式不正确";
+    public static final String LEGAL_PHONE_ERROR = "法人手机号格式不正确";
+    public static final String LEGAL_ID_CARD_ERROR = "法人身份证号格式不正确";
+    public static final String ENT_CODE_ERROR = "营业执照编号格式不正确";
+
+    /**账号在别处登录状态码*/
+    public static final int ACCOUNT_OTHER_LOGIN_CODE = 60900;
+    /**账号在别处登录提示信息*/
+    public static final String ACCOUNT_OTHER_LOGIN_MESSAGE = "您的账号已在其他设备登录,如非本人操作,请及时修改密码!";
+
+
+    /**token无效状态码*/
+    public static final int TOKEN_INVALID_CODE = 60901;
+    /**token无效提示信息*/
+    public static final String TOKEN_INVALID_MESSAGE = "由于您一段时间未操作,为了您的账户安全,请重新登录!";
+
+    /**请求超过次数*/
+    public static final int FREQUENCY_OUT = 60902;
+    /**请求超过次数提示信息*/
+    public static final String FREQUENCY_OUT_MESSAGE = "您的操作过于频繁,请刷新浏览器或稍候重试!";
+
+    /**审核状态状态码*/
+    public static final int ACCOUNT_AUDIT_CODE = 60903;
+    /**审核状态状提示信息*/
+    public static final String ACCOUNT_AUDIT_MESSAGE = "您所属企业企业资质审批未通过,请核实确认!";
+
+    /**微信账号未绑定态码*/
+    public static final int WECHAR_BIND_CODE = 60904;
+    /**微信账号未绑定提示信息*/
+    public static final String WECHAR_BIND_MESSAGE = "您的微信还未绑定危品汇账号!";
+
+    /**
+     * 自定义状态码,该状态码没有特殊含义,只是提供一个状态标识(目前提供9个,可自行扩展)
+     * 现作为校验失败的一类异常码
+     */
+    public static final int CODE_10301 = 10301;
+
+    /**数据库的操作失败*/
+    public static final int CRUD_FAIL_CODE = 60601;
+    public static final String UPDATE_FAIL = "更新失败";
+    public static final String INSERT_FAIL = "新增失败";
+    public static final String DELETE_FAIL = "删除失败";
+
+    /**未查询到相关信息*/
+    public static final int QUERY_FAIL_CODE = 60602;
+    public static final String ACCOUNT_NOT_EXISTS = "用户信息不存在或已失效";
+    public static final String ENT_NOT_EXISTS = "企业信息不存在或已失效";
+    public static final String DEPT_NOT_EXISTS = "机构信息不存在或已失效";
+    public static final String ENTCERTIFICATES_NOT_EXISTS = "未查询到企业资质信息";
+    public static final String ROLE_NOT_EXISTS = "未查询到关联的角色";
+    public static final String USER_DEPT_NOT_EXISTS = "未查询到用户-机构关联信息";
+    public static final String MENU_NOT_EXISTS = "未查询到菜单信息";
+    public static final String PARENT_MENU_NOT_EXISTS = "未查询到父菜单信息";
+    public static final String PARENT_UNIT_NOT_EXISTS = "未查询到父级单位信息";
+    public static final String COOPERATE_ATTRIBUTE_NOT_EXISTS = "未查询到已有的合作属性";
+    public static final String COOPERATE_NOT_EXISTS = "未查询到合作记录或已失效";
+    public static final String COOPERATE_CANCEL_EXISTS = "未查询到可撤销的记录";
+    public static final String ADDRESS_NOT_EXISTS = "未查询到地址记录或已失效";
+    public static final String CONTRACT_NOT_EXISTS = "未查询到合同或已失效";
+    public static final String BANNER_NOT_EXISTS = "未查询到banner数据或已失效";
+
+    /**自定义提示消息*/
+    public static final String PASSWD_ERROR = "密码不正确";
+    public static final String PASSWD_REPEAT = "新密码与旧密码不能一样!";
+    public static final String CAPTCHA_ERROR = "验证码输入错误";
+    public static final String MSG_001 = "密码重置成功";
+    public static final String MSG_002 = "密码修改成功";
+    public static final String MSG_003 = "新增成功";
+    public static final String MSG_004 = "审批完成";
+    public static final String MSG_005 = "更新成功";
+    public static final String MSG_006 = "当前系统不允许绑定多个岗位!";
+    public static final String MSG_007 = "注册成功!";
+    public static final String MSG_008 = "删除成功!";
+    public static final String MSG_009 = "认证提交成功!";
+    public static final String MSG_010 = "绑定成功!";
+    public static final String MSG_011 = "当前企业还存在员工数据,不能删除!";
+    public static final String MSG_012 = "只能解除状态为合作中的记录!";
+    public static final String MSG_013 = "只能删除状态为已解除的记录!";
+    public static final String MSG_014 = "导出失败";
+    public static final String MSG_015 = "与对方企业存在待审核的合作关系,请撤销或者完成审核再申请!";
+    public static final String MSG_016 = "与对方企业已存在相同属性的合作关系!";
+    public static final String MSG_017 = "发起申请成功!";
+    public static final String MSG_018 = "撤销成功!";
+    public static final String MSG_019 = "只能操作正在审核中的记录!";
+    public static final String MSG_020 = "当前机构还存在员工数据,不能删除!";
+    public static final String MSG_021 = "不能重复设置默认地址!";
+    public static final String MSG_022 = "只能对草稿进行删除!";
+    public static final String MSG_023 = "解除成功!";
+    public static final String MSG_024 = "名称不能重复!";
+    public static final String MSG_025 = "禁止删除本人信息!";
+    public static final String MSG_026 = "资质认证审核中,请等待审核后再提交!";
+    public static final String MSG_027 = "一级机构不能删除!";
+    public static final String MSG_028 = "合同未签约,不能手动完结!";
+    public static final String MSG_029 = "合同编号超长!";
+    public static final String MSG_030 = "合同名称超长!";
+    public static final String MSG_031 = "您与所选企业存在未完结销售订单,当前无法删除!";
+    public static final String MSG_032 = "您与所选企业存在未完结托运承运订单,当前无法删除!";
+    public static final String MSG_033 = "当前企业资质在审核中,无法删除!";
+    public static final String MSG_034 = "您与所选企业存在未完结对账单,当前无法删除!";
+    public static final String MSG_035 = "地址信息已存在";
+
+    public static final String ENT_EXISTS = "企业已存在,不可重复!";
+    public static final String ACCOUNT_EXISTS = "用户账号已存在!";
+    public static final String DICTTYPE_EXISTS = "字典类型已存在,不可重复!";
+    public static final String DICT_EXISTS = "字典键值已存在,不可重复!";
+    public static final String PL34 = "3PL和4PL不能同时注册!";
+
+}

+ 17 - 0
slope-common/slope-common-core/src/main/java/com/sckw/core/web/constant/RequestConstant.java

@@ -0,0 +1,17 @@
+package com.sckw.core.web.constant;
+
+/**
+ * @Description web请求常量
+ * @Author zk
+ * @Date 2022/6/16
+ */
+public class RequestConstant {
+
+    /**请求头token*/
+    public static final String TOKEN = "Access-Token";
+    /**客户终端类型*/
+    public static final String CLIENT_TYPE = "Client-Type";
+    /**系统类型*/
+    public static final String SYSTEM_TYPE = "System-Type";
+
+}

+ 95 - 0
slope-common/slope-common-core/src/main/java/com/sckw/core/web/context/LoginEntHolder.java

@@ -0,0 +1,95 @@
+package com.sckw.core.web.context;
+
+import com.sckw.core.web.model.LoginEntInfo;
+
+/**
+ * 当前登录用户企业的临时保存容器
+ * @Author zhaokang
+ * @date 2020/04/13 0021
+ */
+public class LoginEntHolder {
+    private static final ThreadLocal<LoginEntInfo> LONGIN_ENT_HOLDER = new ThreadLocal<LoginEntInfo>();
+
+    /**
+     * 赋值
+     * @author zhaokang
+     * @Date 2020/04/13 0021
+     */
+    public static void set(LoginEntInfo loginEnterpriseInfo) {
+        LONGIN_ENT_HOLDER.set(loginEnterpriseInfo);
+    }
+
+    /**
+     * 取值
+     * @author zhaokang
+     * @Date 2020/04/13 0021
+     */
+    public static LoginEntInfo get() {
+        return LONGIN_ENT_HOLDER == null ? null : LONGIN_ENT_HOLDER.get();
+    }
+
+    /**
+     * 删除保存的用户
+     * @author zhaokang
+     * @Date 2020/04/13 0021
+     */
+    public static void remove() {
+        LONGIN_ENT_HOLDER.remove();
+    }
+
+    /**
+     * 用户所属企业id
+     * @author zhaokang
+     * @Date 2020/04/13 0021
+     */
+    public static Long getEntId(){
+        return LONGIN_ENT_HOLDER.get() == null ? null : LONGIN_ENT_HOLDER.get().getId();
+    }
+
+    /**
+     * 用户所属企业名称
+     * @author zhaokang
+     * @Date 2020/04/13 0021
+     */
+    public static String getFirmName(){
+        return LONGIN_ENT_HOLDER.get() == null ? null : LONGIN_ENT_HOLDER.get().getFirmName();
+    }
+
+    /**
+     * 用户类型
+     * @author zhaokang
+     * @Date 2020/04/13 0021
+     */
+    public static Integer getUserType(){
+        return LONGIN_ENT_HOLDER.get() == null ? null : LONGIN_ENT_HOLDER.get().getUserType();
+    }
+
+    /**
+     * 资料审批状态(1通过、0未审批、2未通过、3审批中)
+     * @author zhaokang
+     * @Date 2020/04/13 0021
+     */
+    public static Integer getApproval(){
+        return LONGIN_ENT_HOLDER.get() == null ? null : LONGIN_ENT_HOLDER.get().getApproval();
+    }
+
+    /**
+     * 用户状态(-1删除、0正常、1已锁)
+     * @author zhaokang
+     * @Date 2020/04/13 0021
+     */
+    public static Integer getStatus(){
+        return LONGIN_ENT_HOLDER.get() == null ? null : LONGIN_ENT_HOLDER.get().getStatus();
+    }
+
+    /**
+     * 用户分支类型
+     * @author zk
+     * @date 2021/3/16 11:24
+     **/
+    public static Integer getBranchType(){
+        return LONGIN_ENT_HOLDER.get() == null ? null : LONGIN_ENT_HOLDER.get().getBranchType();
+    }
+
+
+}

+ 160 - 0
slope-common/slope-common-core/src/main/java/com/sckw/core/web/context/LoginUserHolder.java

@@ -0,0 +1,160 @@
+package com.sckw.core.web.context;
+
+import com.sckw.core.utils.CollectionUtils;
+import com.sckw.core.web.model.LoginUserInfo;
+
+import java.util.ArrayList;
+import java.util.Collections;
+import java.util.List;
+
+/**
+ * 当前登录用户的临时保存容器
+ * @Author zk
+ * @date 2020/04/13 0021
+ */
+public class LoginUserHolder {
+
+    private static final ThreadLocal<LoginUserInfo> LONGIN_USER_HOLDER = new ThreadLocal<LoginUserInfo>();
+
+    /**
+     * 赋值
+     * @author zhaokang
+     * @Date 2020/04/13 0021
+     */
+    public static void set(LoginUserInfo loginUserInfo) {
+        LONGIN_USER_HOLDER.set(loginUserInfo);
+    }
+
+    /**
+     * 取值
+     * @author zhaokang
+     * @Date 2020/04/13 0021
+     */
+    public static LoginUserInfo get() {
+        return LONGIN_USER_HOLDER == null ? null : LONGIN_USER_HOLDER.get();
+    }
+
+    /**
+     * 删除保存的用户
+     * @author zhaokang
+     * @Date 2020/04/13 0021
+     */
+    public static void remove() {
+        LONGIN_USER_HOLDER.remove();
+    }
+
+    /**
+     * 用户id
+     * @author zhaokang
+     * @Date 2020/04/13 0021
+     */
+    public static Long getUserId(){
+        return LONGIN_USER_HOLDER.get() == null ? 1L : LONGIN_USER_HOLDER.get().getId();
+    }
+
+    /**
+     * 用户所属系统
+     * @author zhaokang
+     * @Date 2020/04/13 0021
+     */
+    public static Integer getSystemType(){
+        return LONGIN_USER_HOLDER.get() == null ? null : LONGIN_USER_HOLDER.get().getSystemType();
+    }
+
+    /**
+     * 用户账号
+     * @author zhaokang
+     * @Date 2020/04/13 0021
+     */
+    public static String getAccount(){
+        return LONGIN_USER_HOLDER.get() == null ? null : LONGIN_USER_HOLDER.get().getAccount();
+    }
+
+    /**
+     * 用户姓名
+     * @author zhaokang
+     * @Date 2020/04/13 0021
+     */
+    public static String getUserName(){
+        return LONGIN_USER_HOLDER.get() == null ? null : LONGIN_USER_HOLDER.get().getUserName();
+    }
+
+    /**
+     * 用户电话
+     * @author zhaokang
+     * @Date 2020/04/13 0021
+     */
+    public static String getPhone(){
+        return LONGIN_USER_HOLDER.get() == null ? null : LONGIN_USER_HOLDER.get().getPhone();
+    }
+
+    /**
+     * 是否主账号(0是/1否)
+     * @author zhaokang
+     * @Date 2020/04/13 0021
+     */
+    public static Integer getIsMain(){
+        return LONGIN_USER_HOLDER.get() == null ? null : LONGIN_USER_HOLDER.get().getIsMain();
+    }
+
+    /**
+     * 用户账号状态(0正常/1锁定)
+     * @author zhaokang
+     * @Date 2020/04/13 0021
+     */
+    public static Integer getStatus(){
+        return LONGIN_USER_HOLDER.get() == null ? null : LONGIN_USER_HOLDER.get().getStatus();
+    }
+
+    /**
+     * 用户所属企业
+     * @author zhaokang
+     * @Date 2020/04/13 0021
+     */
+    public static Long getEntId(){
+        return LONGIN_USER_HOLDER.get() == null ? null : LONGIN_USER_HOLDER.get().getEntId();
+    }
+
+    /**
+     * 用户所属企业
+     * @author zhaokang
+     * @Date 2020/04/13 0021
+     */
+    public static String getEntName(){
+        return LONGIN_USER_HOLDER.get() == null ? null : LONGIN_USER_HOLDER.get().getEntName();
+    }
+
+    /**
+     * 用户登录终端
+     * @author zhaokang
+     * @Date 2020/04/13 0021
+     */
+    public static String getClientType(){
+        return LONGIN_USER_HOLDER.get() == null ? null : LONGIN_USER_HOLDER.get().getClientType();
+    }
+
+    /**
+     * 用户机构
+     * @author zhaokang
+     * @Date 2020/04/13 0021
+     */
+    public static String getDeptIds(){
+        return LONGIN_USER_HOLDER.get() == null ? null : LONGIN_USER_HOLDER.get().getDeptIds();
+    }
+
+    /**
+     * 用户权限
+     */
+    public static List<Long> getAuthUserIdList() {
+        if (LONGIN_USER_HOLDER.get() == null) {
+            return new ArrayList<>();
+        }
+        List<Long> authUserIdList = LONGIN_USER_HOLDER.get().getAuthUserIdList();
+        if (CollectionUtils.isEmpty(authUserIdList)) {
+            return new ArrayList<>();
+        }
+
+        return authUserIdList;
+    }
+
+}

+ 37 - 0
slope-common/slope-common-core/src/main/java/com/sckw/core/web/context/SignBase.java

@@ -0,0 +1,37 @@
+package com.sckw.core.web.context;
+
+import lombok.Data;
+import java.util.Map;
+
+/**
+ * @author zk
+ * @description 获取铭文请求参数
+ * @date 2020/08/15 16:11:10
+ */
+@Data
+public class SignBase {
+    /**
+     * 铭文
+     */
+    private String sign;
+
+    /**
+     * 公钥
+     */
+    private String accessKey;
+
+    /**
+     * 私钥
+     */
+    private String accessSecret;
+
+    /**
+     * 时间戳
+     */
+    private Long timeStamp;
+
+    /**
+     * 请求参数
+     */
+    private Map<String, Object> params;
+}

+ 50 - 0
slope-common/slope-common-core/src/main/java/com/sckw/core/web/model/EntCertificateInfo.java

@@ -0,0 +1,50 @@
+package com.sckw.core.web.model;
+
+import lombok.Data;
+
+import java.io.Serial;
+import java.io.Serializable;
+import java.util.Date;
+
+/**
+ * @author czh
+ * @desc 资质
+ * @date 2023/6/29
+ */
+@Data
+public class EntCertificateInfo implements Serializable {
+
+    @Serial
+    private static final long serialVersionUID = -1913060977212008558L;
+
+    /**
+     * 执照编号
+     */
+    private String code;
+
+    /**
+     * 证书类型 (1联系人身份证 2法人身份证 3营业执照 4道路运输许可证 5开户许可证号 6授权证书 6电子签章授权书)
+     */
+    private int type;
+
+    /**
+     * 证书正面
+     */
+    private String certificateMain;
+
+    /**
+     * 证书反面
+     */
+    private String certificateRevolt;
+
+    /**
+     * 有效期
+     */
+    private Date expireTime;
+
+    /**
+     * 备注
+     */
+    private String remark;
+
+}

+ 47 - 0
slope-common/slope-common-core/src/main/java/com/sckw/core/web/model/LoginBase.java

@@ -0,0 +1,47 @@
+package com.sckw.core.web.model;
+
+import lombok.Data;
+
+/**
+ * @author zk
+ * @description 登录信息
+ * @date 2020/06/12 09:06:14
+ */
+@Data
+public class LoginBase {
+
+    /**
+     * 账号
+     */
+    private String account;
+
+    /**
+     * 密码
+     */
+    private String password;
+
+    /**
+     * 验证码
+     */
+    private String captcha;
+
+    /**
+     * 系统类型(1 运营管理中心/2 运营管理中心/3 官网/4 司机应用)
+     */
+    private Integer systemType;
+
+    /**
+     * 客户端类型(ios 苹果设备/android 安卓设备/pc 浏览器/pc-background 管理系统)
+     */
+    private String clientType;
+
+    /**
+     * 登录方式1 账号密码登录/2账号短信登录/3单账号登录
+     */
+    private int loginMethod;
+
+    /**
+     * 用户类型(1 表示官网 )
+     */
+    private String userType;
+}

+ 135 - 0
slope-common/slope-common-core/src/main/java/com/sckw/core/web/model/LoginEntInfo.java

@@ -0,0 +1,135 @@
+package com.sckw.core.web.model;
+
+import lombok.Data;
+import java.util.Date;
+import java.util.List;
+
+/**
+ * 登录中的用户企业信息
+ * @Author zhaokang
+ * @date 2020/04/13 0021
+ */
+@Data
+public class LoginEntInfo {
+    /**
+     * 用户所属企业id
+     */
+    private Long id;
+    /**
+     * 用户所属企业名称
+     */
+    private String firmName;
+    /**
+     * 用户类型
+     */
+    private int userType;
+    /**
+     * 用户分支类型(1承运商企业、2车主)
+     */
+    private int branchType;
+    /**
+     * 资料审批状态(0未审批、1通过、2未通过、3审批中)
+     */
+    private int approval;
+    /**
+     * 用户状态(-1删除、0正常、1已锁)
+     */
+    private int status;
+
+    /**
+     * 交通安培账号状态
+     */
+    private int jtaqStatus;
+
+    /**
+     * 交通安培账号删除标识
+     */
+    private int jtaqDelFlag;
+
+    /**
+     * 企业联系人
+     */
+    private String contacts;
+
+    /**
+     * 联系电话
+     */
+    private String phone;
+
+    /**
+     * 法人姓名
+     */
+    private String legalName;
+
+    /**
+     * 法人联系电话
+     */
+    private String legalPhone;
+
+    /**
+     * 企业注册时间
+     */
+    private Date regTime;
+
+    /**
+     * 是否有效
+     */
+    private Boolean valid;
+
+    /**
+     * 企业属性
+     */
+    private String entTypes;
+
+    /**
+     * 资质
+     */
+    private List<EntCertificateInfo> certificateInfo;
+
+
+//    /**
+//     * 企业编号
+//     */
+//    private Long id;
+//
+//    /**
+//     * 企业名称
+//     */
+//    private String firmName;
+//
+//    /**
+//     * 注册时间
+//     */
+//    private Date regTime;
+//
+//    /**
+//     * 资料审批状态(0未审批、1通过、2未通过、3审批中)
+//     */
+//    private Integer approval;
+//
+//    /**
+//     * 企业类型(值)
+//     */
+//    private String entTypes;
+
+    /**
+     * 企业类型(名称)
+     */
+    private String entTypeNames;
+
+    /**
+     * 企业联系人(企业管理员)
+     */
+    private Long mainId;
+
+    /**
+     * 企业联系人(企业管理员)
+     */
+    private String mainName;
+
+    /**
+     * 联系电话(企业管理员)
+     */
+    private String mainPhone;
+
+}

+ 79 - 0
slope-common/slope-common-core/src/main/java/com/sckw/core/web/model/LoginUserInfo.java

@@ -0,0 +1,79 @@
+package com.sckw.core.web.model;
+
+import lombok.Data;
+
+import java.util.List;
+
+/**
+ * 登录中的用户信息
+ * @Author zhaokang
+ * @date 2020/04/13 0021
+ */
+@Data
+public class LoginUserInfo {
+    /**
+     * 用户id
+     */
+    private Long id;
+    /**
+     * 用户所属系统
+     */
+    private Integer systemType;
+    /**
+     * 用户账号
+     */
+    private String account;
+    /**
+     * 用户姓名
+     */
+    private String userName;
+    /**
+     * 用户电话
+     */
+    private String phone;
+    /**
+     * 是否主账号(0是/1否)
+     */
+    private int isMain;
+    /**
+     *用户账号状态(0正常/1锁定)
+     */
+    private Integer status;
+    /**
+     * 用户所属企业id
+     */
+    private Long entId;
+    /**
+     * 用户登录终端
+     */
+    private String clientType;
+    /**
+     * 用户所属机构id
+     */
+    private String deptIds;
+
+    /**
+     * 企业名
+     */
+    private String entName;
+
+    private List<Long> authUserIdList;
+
+    public LoginUserInfo() {
+    }
+
+    public LoginUserInfo(Long id, Integer systemType, String account, String userName, String phone,
+                         int isMain, int status, Long entId, String clientType, String deptIds, List<Long> authUserIdList) {
+        this.id = id;
+        this.systemType = systemType;
+        this.account = account;
+        this.userName = userName;
+        this.phone = phone;
+        this.isMain = isMain;
+        this.status = status;
+        this.entId = entId;
+        this.clientType = clientType;
+        this.deptIds = deptIds;
+        this.authUserIdList = authUserIdList;
+    }
+}

+ 137 - 0
slope-common/slope-common-core/src/main/java/com/sckw/core/web/model/ValiList.java

@@ -0,0 +1,137 @@
+package com.sckw.core.web.model;
+
+import jakarta.validation.Valid;
+import lombok.Data;
+
+import java.util.*;
+
+/**
+ * @author lfdc
+ * @version 1.0.0
+ * @ClassName ValiList.java
+ * @Description List集合验证工具类
+ * @createTime 2021年10月20日 15:29:00
+ */
+@Data
+public class ValiList<E> implements List<E> {
+
+    @Valid
+    private List<E> list = new ArrayList<>();
+
+    @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<E> iterator() {
+        return list.iterator();
+    }
+
+    @Override
+    public Object[] toArray() {
+        return list.toArray();
+    }
+
+    @Override
+    public <T> 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<E> listIterator() {
+        return list.listIterator();
+    }
+
+    @Override
+    public ListIterator<E> listIterator(int index) {
+        return list.listIterator(index);
+    }
+
+    @Override
+    public List<E> subList(int fromIndex, int toIndex) {
+        return list.subList(fromIndex, toIndex);
+    }
+}
+
+

+ 343 - 0
slope-common/slope-common-core/src/main/java/com/sckw/core/web/request/HttpClientUtil.java

@@ -0,0 +1,343 @@
+package com.sckw.core.web.request;
+
+import com.sckw.core.model.constant.Global;
+import com.sckw.core.utils.StringUtils;
+import lombok.extern.slf4j.Slf4j;
+import org.apache.http.HttpEntity;
+import org.apache.http.NameValuePair;
+import org.apache.http.client.ClientProtocolException;
+import org.apache.http.client.entity.UrlEncodedFormEntity;
+import org.apache.http.client.methods.CloseableHttpResponse;
+import org.apache.http.client.methods.HttpGet;
+import org.apache.http.client.methods.HttpPost;
+import org.apache.http.client.methods.HttpRequestBase;
+import org.apache.http.client.utils.URIBuilder;
+import org.apache.http.conn.HttpHostConnectException;
+import org.apache.http.entity.StringEntity;
+import org.apache.http.impl.client.CloseableHttpClient;
+import org.apache.http.impl.client.HttpClients;
+import org.apache.http.message.BasicNameValuePair;
+import org.apache.http.util.EntityUtils;
+
+import java.io.IOException;
+import java.util.ArrayList;
+import java.util.List;
+import java.util.Map;
+
+/**
+ * @desc http请求工具类
+ * @Author dengyinghui
+ * @Date 2018年02月03日
+ */
+@Slf4j
+public class HttpClientUtil {
+
+    private static final String UTF_8 = "UTF-8";
+
+    /**
+     * POST请求
+     *
+     * @param url 请求地址
+     * @return 返回结果
+     * @Date 2018年02月03日
+     */
+    public static String post(String url) throws ClientProtocolException, IOException {
+        return post(url, Global.EMPTY_STRING);
+    }
+
+    /**
+     * POST请求
+     * @param url    请求地址
+     * @param params 请求参数
+     * @return 返回结果
+     * @Date 2018年02月03日
+     */
+    public static String post(String url, Map<String, Object> params) throws ClientProtocolException, IOException {
+        HttpPost httpPost = new HttpPost(url);
+        List<NameValuePair> pairs = null;
+        if (params != null && params.size() > 0) {
+            pairs = covertParams2Nvps(params);
+            try {
+                httpPost.setEntity(new UrlEncodedFormEntity(pairs, UTF_8));
+            } catch (Exception e) {
+                e.printStackTrace();
+            }
+        }
+        return handlerRequest(httpPost);
+    }
+
+    /**
+     * POST请求
+     * @param url    请求地址
+     * @param body 请求参数
+     * @param headsMap 请求参数
+     * @return 返回结果
+     * @Date 2018年02月03日
+     */
+    public static String postBody(String url, String body, Map<String, Object> headsMap) {
+        int successCode = 200;
+        log.debug("start:");
+        // 实例化httpClient
+        CloseableHttpClient httpclient = HttpClients.createDefault();
+        // 实例化post方法
+        HttpPost httpPost = new HttpPost(url);
+        //头
+        httpPost.setHeader("Content-Type", "application/json");
+        if (headsMap != null && !headsMap.isEmpty()) {
+            for (String key : headsMap.keySet()) {
+                httpPost.setHeader(key, (String) headsMap.get(key));
+            }
+        }
+        log.debug("initheader");
+        // 结果
+        CloseableHttpResponse response = null;
+        String content = null;
+        try {
+            log.debug("initbody");
+            // 将参数给post方法
+            if (body != null) {
+                StringEntity stringEntity = new StringEntity(body, "UTF-8");
+                httpPost.setEntity(stringEntity);
+            }
+            log.info(httpPost.toString());
+            // 执行post方法
+            response = httpclient.execute(httpPost);
+            log.info(response.getEntity().toString());
+            try {
+                content = EntityUtils.toString(response.getEntity(), "UTF-8");
+            } catch (Exception e) {
+                e.printStackTrace();
+                log.error("HttpClientUtil.postBody:", e.getMessage());
+            } finally {
+                response.close();
+            }
+        } catch (ClientProtocolException e) {
+            e.printStackTrace();
+        } catch (IOException e) {
+            e.printStackTrace();
+        } finally {
+            try {
+                httpclient.close();
+            } catch (IOException e) {
+                e.printStackTrace();
+            }
+        }
+        return content;
+    }
+
+    /**
+     * POST请求
+     * @param url  请求地址
+     * @param data 字符参数参数
+     * @return 返回结果
+     * @Date 2018年02月03日
+     */
+    public static String post(String url, String data) {
+        HttpPost httpPost = new HttpPost(url);
+        httpPost.setHeader("Content-Type", "application/json");
+        try {
+            if (!StringUtils.validatorEmpty(data)) {
+                httpPost.setEntity(new StringEntity(data, UTF_8));
+            }
+        } catch (Exception e) {
+            e.printStackTrace();
+        }
+        CloseableHttpResponse response = null;
+        String content = null;
+        CloseableHttpClient httpclient = HttpClients.createDefault();
+        try {
+            response = httpclient.execute(httpPost);
+        } catch (IOException e) {
+            e.printStackTrace();
+        }
+        try {
+            try {
+                content = EntityUtils.toString(response.getEntity(), "UTF-8");
+            } catch (IOException e) {
+                e.printStackTrace();
+            }
+        } finally {
+            try {
+                response.close();
+            } catch (IOException e) {
+                e.printStackTrace();
+            }
+        }
+        return content;
+    }
+
+
+    /**
+     * GET请求
+     * @param url 请求地址
+     * @return 返回结果
+     * @Date 2018年02月03日
+     */
+    public static String get(String url) throws ClientProtocolException, IOException {
+        return get(url, null);
+    }
+
+    /**
+     * GET请求
+     * @param url    请求地址
+     * @param params 请求参数
+     * @return 返回结果
+     * @Date 2018年02月03日
+     */
+    public static String get(String url, Map<String, Object> params) throws ClientProtocolException, HttpHostConnectException, IOException {
+        URIBuilder ub = new URIBuilder();
+        ub.setPath(url);
+        if (params != null && params.size() > 0) {
+            List<NameValuePair> pairs = covertParams2Nvps(params);
+            ub.setParameters(pairs);
+        }
+        HttpGet httpGet = null;
+        try {
+            httpGet = new HttpGet(ub.build());
+
+        } catch (Exception e) {
+            e.printStackTrace();
+        }
+        return handlerRequest(httpGet);
+    }
+
+    /**
+     * 封装请求参数
+     * @param params 请求参数
+     * @return 返回结果
+     * @Date 2018年02月03日
+     */
+    private static List<NameValuePair> covertParams2Nvps(Map<String, Object> params) {
+        List<NameValuePair> pairs = new ArrayList<NameValuePair>();
+        for (Map.Entry<String, Object> param : params.entrySet()) {
+            pairs.add(new BasicNameValuePair(param.getKey(), String.valueOf(param.getValue())));
+        }
+        return pairs;
+    }
+
+    /**
+     * 处理Http请求
+     * @param httpRequestBase
+     * @return 返回结果
+     * @Date 2018年02月03日
+     */
+    private static String handlerRequest(HttpRequestBase httpRequestBase) throws ClientProtocolException, IOException {
+        CloseableHttpClient httpClient = HttpClients.createDefault();
+        CloseableHttpResponse response = httpClient.execute(httpRequestBase);
+        HttpEntity entity = response.getEntity();
+        if (entity != null) {
+            String result = EntityUtils.toString(entity, UTF_8);
+            response.close();
+            return result;
+        }
+        return null;
+    }
+
+    public static String postBody(String url, String body) {
+        int successCode = 200;
+        // 实例化httpClient
+        CloseableHttpClient httpclient = HttpClients.createDefault();
+        // 实例化post方法
+        HttpPost httpPost = new HttpPost(url);
+        // 结果
+        CloseableHttpResponse response = null;
+        String content = null;
+        httpPost.setHeader("Content-Type", "application/json");
+        httpPost.setHeader("token", null);
+        httpPost.setHeader("type", "pc");
+        httpPost.setHeader("version", "5");
+        try {
+            // 将参数给post方法
+            if (body != null) {
+                StringEntity stringEntity = new StringEntity(body, "UTF-8");
+                httpPost.setEntity(stringEntity);
+            }
+            // 执行post方法
+            response = httpclient.execute(httpPost);
+            try {
+                content = EntityUtils.toString(response.getEntity(), "UTF-8");
+            } catch (Exception e) {
+                e.printStackTrace();
+                log.error("HttpClientUtil.postBody:", e.getMessage());
+            } finally {
+                response.close();
+            }
+        } catch (ClientProtocolException e) {
+            e.printStackTrace();
+        } catch (IOException e) {
+            e.printStackTrace();
+        } finally {
+            try {
+                httpclient.close();
+            } catch (IOException e) {
+                e.printStackTrace();
+            }
+        }
+        return content;
+    }
+
+    /**
+     * GET请求
+     * @param url    请求地址
+     * @return 返回结果
+     * @Date 2018年02月03日
+     */
+    public static String getBody(String url) {
+        // 实例化httpClient
+        CloseableHttpClient httpclient = HttpClients.createDefault();
+        // 实例化post方法
+        //HttpPost httpPost = new HttpPost(url);
+        HttpGet httpGet = new HttpGet(url);
+        // 结果
+        CloseableHttpResponse response = null;
+        String content = null;
+        httpGet.setHeader("Content-Type", "application/json");
+        try {
+            // 执行post方法
+            int successCode = 200;
+            response = httpclient.execute(httpGet);
+            try {
+                content = EntityUtils.toString(response.getEntity(), "UTF-8");
+            } finally {
+                response.close();
+            }
+        } catch (ClientProtocolException e) {
+            e.printStackTrace();
+        } catch (IOException e) {
+            e.printStackTrace();
+        } finally {
+            try {
+                httpclient.close();
+            } catch (IOException e) {
+                e.printStackTrace();
+            }
+        }
+        return content;
+    }
+
+    /**
+     * POST请求
+     * @param url    请求地址
+     * @param params 请求参数
+     * @return 返回结果
+     * @Date 2018年02月03日
+     */
+    public static String postByMapString(String url, Map<String, String> params) throws ClientProtocolException, IOException {
+        HttpPost httpPost = new HttpPost(url);
+        List<NameValuePair> pairs = null;
+        if (params != null && params.size() > 0) {
+            pairs = new ArrayList<>();
+            for (Map.Entry<String, String> param : params.entrySet()) {
+                pairs.add(new BasicNameValuePair(param.getKey(), param.getValue()));
+            }
+            try {
+                httpPost.setEntity(new UrlEncodedFormEntity(pairs, UTF_8));
+            } catch (Exception e) {
+                e.printStackTrace();
+            }
+        }
+        return handlerRequest(httpPost);
+    }
+
+
+}

+ 35 - 0
slope-common/slope-common-core/src/main/java/com/sckw/core/web/request/RequestReadUtils.java

@@ -0,0 +1,35 @@
+package com.sckw.core.web.request;
+
+import jakarta.servlet.http.HttpServletRequest;
+import java.io.*;
+
+/**
+ * @desc
+ * @author zk
+ * @date 2020/08/19
+ */
+public class RequestReadUtils {
+    private static final int BUFFER_SIZE = 1024 * 8;
+
+    public static String read(HttpServletRequest request) throws IOException {
+        BufferedReader bufferedReader = request.getReader();
+        StringWriter writer = new StringWriter();
+        write(bufferedReader,writer);
+        return writer.getBuffer().toString();
+    }
+
+    public static long write(Reader reader, Writer writer) throws IOException {
+        return write(reader, writer, BUFFER_SIZE);
+    }
+
+    public static long write(Reader reader, Writer writer, int bufferSize) throws IOException {
+        int read;
+        long total = 0;
+        char[] buf = new char[bufferSize];
+        while( ( read = reader.read(buf) ) != -1 ) {
+            writer.write(buf, 0, read);
+            total += read;
+        }
+        return total;
+    }
+}

+ 107 - 0
slope-common/slope-common-core/src/main/java/com/sckw/core/web/request/RequestUtil.java

@@ -0,0 +1,107 @@
+package com.sckw.core.web.request;
+
+import com.sckw.core.utils.CollectionUtils;
+import com.sckw.core.utils.StringUtils;
+import jakarta.servlet.http.HttpServletRequest;
+import org.springframework.beans.factory.BeanFactory;
+import org.springframework.web.context.support.WebApplicationContextUtils;
+import java.util.Enumeration;
+import java.util.Map;
+
+/**
+ * @desc 请求校验
+ * @author zk
+ * @date 2020/08/19
+ */
+public class RequestUtil {
+
+    /**
+     * 获取参数值
+     * @param request 请求
+     * @param key 键
+     * @throws Exception
+     */
+    public static String getParam(HttpServletRequest request, String key) throws Exception{
+        String value = request.getHeader(key);
+        if (StringUtils.isBlank(value)){
+            value = request.getParameter(key);
+        }
+        return value;
+    }
+
+    /**
+     * @description 获取请求参数
+     * @author zk
+     * @date 2020/8/17 18:24
+     * @param
+     * @return
+     **/
+    public static Map<String, Object> getParams(HttpServletRequest request){
+        Enumeration<?> pNames = request.getParameterNames();
+        Map<String, Object> params = CollectionUtils.createHashMap();
+        while (pNames.hasMoreElements()) {
+            String pName = (String) pNames.nextElement();
+            Object pValue = request.getParameter(pName);
+            params.put(pName, pValue);
+        }
+        return params;
+    }
+
+    /**
+     * @description 获取请求参数
+     * @author zk
+     * @date 2020/8/17 18:24
+     * @param
+     * @return
+
+    public static Object getBodyParams(HttpServletRequest request){
+        Object params;
+        try {
+            RequestWrapper requestWrapper = new RequestWrapper(request);
+            String reqBody = requestWrapper.getBodyString(request);
+            params = JSONObject.parse(reqBody);
+        } catch (Exception e) {
+            e.printStackTrace();
+            return null;
+        }
+        return params;
+    }**/
+
+    /**
+     * @Description 获取 Nginx代理后的真实ip
+     * @author jiangwei
+     * @date 2019/9/11 10:46
+     */
+    public static String getClientIp(HttpServletRequest request) {
+        String ip = request.getHeader("X-Forwarded-For");
+        String unKnown = "unKnown";
+        if (StringUtils.isNotBlank(ip) && !unKnown.equalsIgnoreCase(ip)) {
+            //多次反向代理后会有多个ip值,第一个ip才是真实ip
+            int index = ip.indexOf(",");
+            if (index != -1) {
+                return ip.substring(0, index);
+            } else {
+
+                return ip;
+            }
+        }
+        ip = request.getHeader("X-Real-IP");
+        if (StringUtils.isNotBlank(ip) && !unKnown.equalsIgnoreCase(ip)) {
+            return ip;
+        }
+        return request.getRemoteAddr();
+    }
+
+
+    /**
+     * 拦截器中,通过@Autowired注入失效,需要通过以下方式获取service对象
+     * @param clazz  对象class类
+     * @param request http request
+     * @param <T>  对象类别
+     * @return 返回一个对象
+     */
+    public static <T> T getObject(Class<T> clazz, HttpServletRequest request) {
+        BeanFactory factory = WebApplicationContextUtils.getRequiredWebApplicationContext(request.getServletContext());
+        return factory.getBean(clazz);
+    }
+}

+ 89 - 0
slope-common/slope-common-core/src/main/java/com/sckw/core/web/response/HttpResult.java

@@ -0,0 +1,89 @@
+package com.sckw.core.web.response;
+
+import com.sckw.core.web.constant.HttpStatus;
+import lombok.Data;
+
+import java.io.Serializable;
+
+/**
+ * HTTP结果封装
+ * @author zk
+ * @date Oct 29, 2018
+ */
+@Data
+public class HttpResult implements Serializable {
+
+	private int code = HttpStatus.SUCCESS_CODE;
+	private String msg = HttpStatus.SUCCESS_MESSAGE;
+	private Object data;
+
+	public static HttpResult error() {
+		return error(HttpStatus.GLOBAL_EXCEPTION_CODE, HttpStatus.GLOBAL_EXCEPTION_MESSAGE);
+	}
+	
+	public static HttpResult error(String msg) {
+		return error(HttpStatus.GLOBAL_EXCEPTION_CODE, msg);
+	}
+	
+	public static HttpResult error(int code, String msg) {
+		HttpResult r = new HttpResult();
+		r.setCode(code);
+		r.setMsg(msg);
+		return r;
+	}
+
+	public static HttpResult error(String msg, Object data) {
+		HttpResult r = new HttpResult();
+		r.setCode(HttpStatus.GLOBAL_EXCEPTION_CODE);
+		r.setMsg(msg);
+		r.setData(data);
+		return r;
+	}
+
+	public static HttpResult error(int code, String msg, Object data) {
+		HttpResult r = new HttpResult();
+		r.setCode(code);
+		r.setMsg(msg);
+		r.setData(data);
+		return r;
+	}
+
+
+	public static HttpResult ok() {
+		return new HttpResult();
+	}
+
+	public static HttpResult ok(String msg) {
+		HttpResult r = new HttpResult();
+		r.setMsg(msg);
+		return r;
+	}
+	
+	public static HttpResult ok(Object data) {
+		HttpResult r = new HttpResult();
+		r.setData(data);
+		return r;
+	}
+
+    public static HttpResult ok(int code, String msg) {
+        HttpResult r = new HttpResult();
+        r.setCode(code);
+        r.setMsg(msg);
+        return r;
+    }
+
+	public static HttpResult ok(String msg, Object data) {
+		HttpResult r = new HttpResult();
+		r.setMsg(msg);
+		r.setData(data);
+		return r;
+	}
+
+    public static HttpResult ok(int code,String msg, Object data) {
+        HttpResult r = new HttpResult();
+        r.setCode(code);
+        r.setMsg(msg);
+        r.setData(data);
+        return r;
+    }
+}

+ 29 - 0
slope-common/slope-common-core/src/main/java/com/sckw/core/web/response/ResponseUtil.java

@@ -0,0 +1,29 @@
+package com.sckw.core.web.response;
+
+import com.alibaba.fastjson.JSON;
+import jakarta.servlet.http.HttpServletResponse;
+
+import java.io.IOException;
+import java.io.PrintWriter;
+
+/**
+ * @desc 响应
+ * @author zk
+ * @date 2020/08/19
+ */
+public class ResponseUtil {
+
+    /**
+     * 相应输出
+     * @param response 响应
+     * @param httpResult 相应内容
+     * @throws Exception
+     */
+    public static void writer(HttpServletResponse response, HttpResult httpResult) throws IOException {
+        response.setCharacterEncoding("utf-8");
+        PrintWriter printWriter = response.getWriter();
+        printWriter.write(JSON.toJSONString(httpResult));
+        printWriter.flush();
+        printWriter.close();
+    }
+}

+ 62 - 0
slope-common/slope-common-core/src/main/java/com/sckw/core/web/response/result/Data.java

@@ -0,0 +1,62 @@
+package com.sckw.core.web.response.result;
+
+import com.fasterxml.jackson.annotation.JsonInclude;
+
+/**
+ * @description: 数据封装
+ * @author: lfdc
+ * @copyright
+ * @create: 2022-01-27 09:49
+ **/
+public class Data {
+    @JsonInclude(JsonInclude.Include.NON_NULL)
+    private Object body;
+    @JsonInclude(JsonInclude.Include.NON_NULL)
+    private Page page;
+
+    public static Data getData() {
+        return new Data();
+    }
+
+    public static Data getData(Object data) {
+        Data da = new Data();
+        da.setBody(data);
+        return da;
+    }
+
+    public static Data getData(Object data, Page page) {
+        Data da = new Data();
+        da.setBody(data);
+        da.setPage(page);
+        return da;
+    }
+
+    public Object getBody() {
+        return this.body;
+    }
+
+    public Page getPage() {
+        return this.page;
+    }
+
+    public void setBody(Object body) {
+        this.body = body;
+    }
+
+    public void setPage(Page page) {
+        this.page = page;
+    }
+
+    @Override
+    public String toString() {
+        return "Data(body=" + this.getBody() + ", page=" + this.getPage() + ")";
+    }
+
+    public Data() {
+    }
+
+    public Data(Object body, Page page) {
+        this.body = body;
+        this.page = page;
+    }
+}

+ 44 - 0
slope-common/slope-common-core/src/main/java/com/sckw/core/web/response/result/I18nMessage.java

@@ -0,0 +1,44 @@
+package com.sckw.core.web.response.result;
+
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.springframework.context.MessageSource;
+import org.springframework.context.i18n.LocaleContextHolder;
+
+import java.util.Objects;
+
+/**
+ * @author lfdc
+ * @description
+ * @date 2023-09-14 09:09:06
+ */
+public class I18nMessage {
+    private static final Logger log = LoggerFactory.getLogger(I18nMessage.class);
+    private static MessageSource messageSource;
+
+    public I18nMessage() {
+        throw new IllegalArgumentException("MessageSource can't be null");
+    }
+
+    public I18nMessage(MessageSource messageSource) {
+        Objects.requireNonNull(messageSource, "MessageSource can't be null");
+        I18nMessage.messageSource = messageSource;
+    }
+
+    public static String getMessage(String msgCode, Object[] args) {
+        try {
+            return messageSource.getMessage(msgCode, args, LocaleContextHolder.getLocale());
+        } catch (Exception var3) {
+            if (log.isDebugEnabled()) {
+                var3.printStackTrace();
+            }
+
+            log.error("===> 读取国际化消息失败, code:{}, args:{}, ex:{}", new Object[]{msgCode, args, var3.getMessage() == null ? var3.toString() : var3.getMessage()});
+            return "-Unknown-";
+        }
+    }
+
+    public static String getMessage(String msgCode) {
+        return getMessage(msgCode, (Object[])null);
+    }
+}

+ 55 - 0
slope-common/slope-common-core/src/main/java/com/sckw/core/web/response/result/Page.java

@@ -0,0 +1,55 @@
+package com.sckw.core.web.response.result;
+
+/**
+ * @author lfdc
+ * @description
+ * @date 2023-09-14 09:09:06
+ */
+public class Page {
+    private static final long serialVersionUID = 7367318386929321066L;
+    private long total;
+    private int page;
+    private int pageSize;
+
+    public static Page getPage(long total, int page, int pageSize) {
+        return new Page(total, page, pageSize);
+    }
+
+    public long getTotal() {
+        return this.total;
+    }
+
+    public int getPage() {
+        return this.page;
+    }
+
+    public int getPageSize() {
+        return this.pageSize;
+    }
+
+    public void setTotal(long total) {
+        this.total = total;
+    }
+
+    public void setPage(int page) {
+        this.page = page;
+    }
+
+    public void setPageSize(int pageSize) {
+        this.pageSize = pageSize;
+    }
+
+    @Override
+    public String toString() {
+        return "Page(total=" + this.getTotal() + ", page=" + this.getPage() + ", pageSize=" + this.getPageSize() + ")";
+    }
+
+    public Page() {
+    }
+
+    public Page(long total, int page, int pageSize) {
+        this.total = total;
+        this.page = page;
+        this.pageSize = pageSize;
+    }
+}

+ 176 - 0
slope-common/slope-common-core/src/main/java/com/sckw/core/web/response/result/Result.java

@@ -0,0 +1,176 @@
+package com.sckw.core.web.response.result;
+
+import com.fasterxml.jackson.annotation.JsonIgnore;
+import com.fasterxml.jackson.annotation.JsonProperty;
+
+import java.io.Serializable;
+
+/**
+ * @description:
+ * @author: lfdc
+ * @copyright
+ * @create: 2022-01-27 10:17
+ **/
+public class Result implements Serializable {
+    private static final long serialVersionUID = 8295075842951977226L;
+    private int status;
+    private String msg;
+    @JsonProperty
+    private Data data;
+
+    public Result(Status status) {
+        this.status = status.getCode();
+        this.msg = status.getMsg();
+        this.data = Data.getData();
+    }
+
+    public Result(Status status, Object data) {
+        this.status = status.getCode();
+        this.msg = status.getMsg();
+        this.data = Data.getData(data);
+    }
+
+    public Result(Status status, Object data, Page page) {
+        this.status = status.getCode();
+        this.msg = status.getMsg();
+        this.data = Data.getData(data, page);
+    }
+
+    public Result(Status status, String msg) {
+        this.status = status.getCode();
+        this.msg = msg;
+        this.data = Data.getData();
+    }
+
+    public Result(Status status, int msgCode) {
+        this.status = status.getCode();
+        this.msg = I18nMessage.getMessage(String.valueOf(msgCode));
+        this.data = Data.getData();
+    }
+
+    public Result(Status status, String msg, Object data) {
+        this.status = status.getCode();
+        this.msg = msg;
+        this.data = Data.getData(data);
+    }
+
+    public Result(Status status, int msgCode, Object data) {
+        this.status = status.getCode();
+        this.msg = I18nMessage.getMessage(String.valueOf(msgCode));
+        this.data = Data.getData(data);
+    }
+
+    public Result(Status status, String msg, Object data, Page page) {
+        this.status = status.getCode();
+        this.msg = msg;
+        this.data = Data.getData(data, page);
+    }
+
+    public Result(Status status, int msgCode, Object data, Page page) {
+        this.status = status.getCode();
+        this.msg = I18nMessage.getMessage(String.valueOf(msgCode));
+        this.data = Data.getData(data, page);
+    }
+
+    @JsonIgnore
+    public boolean isSuccess() {
+        return this.status == Status.SUCCESS.getCode();
+    }
+
+    @JsonIgnore
+    public boolean nonSuccess() {
+        return this.status != Status.SUCCESS.getCode();
+    }
+
+    public static Result success() {
+        return new Result(Status.SUCCESS);
+    }
+
+    public static Result illegal() {
+        return new Result(Status.BAD_REQUEST);
+    }
+
+    public static Result unauthorized() {
+        return new Result(Status.UNAUTHORIZED);
+    }
+
+    public static Result forbidden() {
+        return new Result(Status.FORBIDDEN);
+    }
+
+    public static Result notFound() {
+        return new Result(Status.NOT_FOUND);
+    }
+
+    public static Result failure() {
+        return new Result(Status.FAILURE);
+    }
+
+    public static Result conflict() {
+        return new Result(Status.CONFLICT);
+    }
+
+    public static Result build(Status status, Object data) {
+        return new Result(status, data);
+    }
+
+    public static Result build(Status status, Object data, Page page) {
+        return new Result(status, data, page);
+    }
+
+    public static Result build(Status status, String msg) {
+        return new Result(status, msg);
+    }
+
+    public static Result build(Status status, int msgCode) {
+        return new Result(status, msgCode);
+    }
+
+    public static Result build(Status status, String msg, Object data) {
+        return new Result(status, msg, data);
+    }
+
+    public static Result build(Status status, int msgCode, Object data) {
+        return new Result(status, msgCode, data);
+    }
+
+    public static Result build(Status status, String msg, Object data, Page page) {
+        return new Result(status, msg, data, page);
+    }
+
+    public static Result build(Status status, int msgCode, Object data, Page page) {
+        return new Result(status, msgCode, data, page);
+    }
+
+    public int getStatus() {
+        return this.status;
+    }
+
+    public String getMsg() {
+        return this.msg;
+    }
+
+    public Data getData() {
+        return this.data;
+    }
+
+    public void setStatus(int status) {
+        this.status = status;
+    }
+
+    public void setMsg(String msg) {
+        this.msg = msg;
+    }
+
+    public void setData(Data data) {
+        this.data = data;
+    }
+
+    @Override
+    public String toString() {
+        return "Result(status=" + this.getStatus() + ", msg=" + this.getMsg() + ", data=" + this.getData() + ")";
+    }
+
+    public Result() {
+    }
+}

+ 32 - 0
slope-common/slope-common-core/src/main/java/com/sckw/core/web/response/result/Status.java

@@ -0,0 +1,32 @@
+package com.sckw.core.web.response.result;
+
+/**
+ * @description: 状态枚举
+ * @author: lfdc
+ * @create: 2022-01-27 09:43
+ **/
+public enum Status {
+    SUCCESS(200, "操作成功"),
+    BAD_REQUEST(400, "操作验证失败"),
+    UNAUTHORIZED(401, "操作未授权"),
+    FORBIDDEN(403, "操作被拒绝"),
+    NOT_FOUND(404, "未知操作"),
+    CONFLICT(409, "请求发生冲突"),
+    FAILURE(500, "操作失败");
+
+    private int code;
+    private String msg;
+
+    private Status(int code, String msg) {
+        this.code = code;
+        this.msg = msg;
+    }
+
+    public int getCode() {
+        return this.code;
+    }
+
+    public String getMsg() {
+        return this.msg;
+    }
+}

+ 8 - 0
slope-common/slope-common-core/src/main/resources/META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports

@@ -0,0 +1,8 @@
+com.sckw.core.aspect.DaoAspect
+com.sckw.core.aspect.NoRepeatSubmitAspect
+com.sckw.core.exception.GlobalSystemExceptionHandler
+#com.sckw.core.web.config.CustomConfig
+com.sckw.core.config.MybatisPlusConfig
+com.sckw.core.config.JacksonConfig
+com.sckw.core.filter.ExceptionFilterConfig
+com.sckw.core.aspect.LogAspect

+ 45 - 0
slope-common/slope-common-datasource/pom.xml

@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project xmlns="http://maven.apache.org/POM/4.0.0"
+         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+    <parent>
+        <artifactId>slope-common</artifactId>
+        <groupId>com.sckw</groupId>
+        <version>1.0.0</version>
+    </parent>
+    <modelVersion>4.0.0</modelVersion>
+
+    <artifactId>slope-common-datasource</artifactId>
+    <description>数据库连接</description>
+
+    <properties>
+        <maven.compiler.source>17</maven.compiler.source>
+        <maven.compiler.target>17</maven.compiler.target>
+    </properties>
+
+    <dependencies>
+        <!--mysql-->
+        <dependency>
+            <groupId>com.mysql</groupId>
+            <artifactId>mysql-connector-j</artifactId>
+        </dependency>
+
+        <!--mybatis-plus 依赖-->
+        <dependency>
+            <groupId>com.baomidou</groupId>
+            <artifactId>mybatis-plus-boot-starter</artifactId>
+        </dependency>
+
+        <!--多数据源-->
+        <dependency>
+            <groupId>com.baomidou</groupId>
+            <artifactId>dynamic-datasource-spring-boot-starter</artifactId>
+        </dependency>
+
+        <!--ShardingSphere-JDBC-->
+        <dependency>
+            <groupId>org.apache.shardingsphere</groupId>
+            <artifactId>shardingsphere-jdbc-core-spring-boot-starter</artifactId>
+        </dependency>
+    </dependencies>
+</project>

+ 55 - 0
slope-common/slope-common-excel/pom.xml

@@ -0,0 +1,55 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project xmlns="http://maven.apache.org/POM/4.0.0"
+         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+    <parent>
+        <artifactId>slope-common</artifactId>
+        <groupId>com.sckw</groupId>
+        <version>1.0.0</version>
+    </parent>
+    <modelVersion>4.0.0</modelVersion>
+
+    <artifactId>slope-common-excel</artifactId>
+    <description>excel导入导出</description>
+
+    <properties>
+        <maven.compiler.source>17</maven.compiler.source>
+        <maven.compiler.target>17</maven.compiler.target>
+    </properties>
+
+    <dependencies>
+        <dependency>
+            <groupId>com.sckw</groupId>
+            <artifactId>slope-common-core</artifactId>
+            <version>1.0.0</version>
+        </dependency>
+
+        <!--alibaba EasyExcel导入导出-->
+        <dependency>
+            <groupId>com.alibaba</groupId>
+            <artifactId>easyexcel</artifactId>
+        </dependency>
+
+        <!--cglib-->
+        <dependency>
+            <groupId>cglib</groupId>
+            <artifactId>cglib</artifactId>
+            <exclusions>
+                <exclusion>
+                    <groupId>org.ow2.asm</groupId>
+                    <artifactId>asm</artifactId>
+                </exclusion>
+            </exclusions>
+        </dependency>
+
+        <dependency>
+            <groupId>org.springframework</groupId>
+            <artifactId>spring-web</artifactId>
+        </dependency>
+
+        <dependency>
+            <groupId>org.springframework.cloud</groupId>
+            <artifactId>spring-cloud-context</artifactId>
+        </dependency>
+    </dependencies>
+</project>

+ 35 - 0
slope-common/slope-common-excel/src/main/java/com/sckw/excel/annotation/EasyExcel.java

@@ -0,0 +1,35 @@
+package com.sckw.excel.annotation;
+
+import java.lang.annotation.*;
+
+/**
+ * @author lfdc
+ * @version v1
+ * @create 2020-11-28 15:37:35
+ * @copyright 指定枚举类注解进行翻译处理
+ */
+@Target({ElementType.FIELD})
+@Retention(RetentionPolicy.RUNTIME)
+@Documented
+public @interface EasyExcel {
+    /**
+     * 控件类型-指定枚举类翻译
+     *
+     * @return
+     */
+    Class<? extends Enum> type();
+
+    /**
+     * 默认翻译字段类型-代表字段类型处理 1字符串  2 Integer
+     *
+     * @return
+     */
+    int status() default 0;
+
+    /**
+     * 是否选择翻译
+     *
+     * @return
+     */
+    boolean flag() default true;
+}

+ 26 - 0
slope-common/slope-common-excel/src/main/java/com/sckw/excel/annotation/ExcelContext.java

@@ -0,0 +1,26 @@
+package com.sckw.excel.annotation;
+
+import java.lang.annotation.*;
+
+/**
+ * @author lfdc
+ * @version v1
+ * @create 2020-11-28 15:37:35
+ * @copyright
+ */
+@Target({ElementType.TYPE})
+@Retention(RetentionPolicy.RUNTIME)
+@Documented
+public @interface ExcelContext {
+
+    String fileName() default "";
+
+    String sheetName();
+
+    @Target({ElementType.TYPE})
+    @Retention(RetentionPolicy.RUNTIME)
+    @Documented
+    public @interface Query {
+        boolean combine() default false;
+    }
+}

+ 31 - 0
slope-common/slope-common-excel/src/main/java/com/sckw/excel/annotation/ExcelSelected.java

@@ -0,0 +1,31 @@
+package com.sckw.excel.annotation;
+
+import java.lang.annotation.*;
+
+/**
+ * easy导出下拉框注解 标注导出的列为下拉框类型,并为下拉框设置内容
+ *
+ * @author lfdc
+ * @version v1
+ * @create 2020-11-28 15:37:35
+ * @copyright
+ */
+@Documented
+@Retention(RetentionPolicy.RUNTIME)
+@Target(ElementType.FIELD)
+public @interface ExcelSelected {
+    /**
+     * 固定下拉内容
+     */
+    String[] source() default {};
+
+    /**
+     * 设置下拉框的起始行,默认为第二行
+     */
+    int firstRow() default 1;
+
+    /**
+     * 设置下拉框的结束行,默认为最后一行
+     */
+    int lastRow() default 0x10000;
+}

+ 82 - 0
slope-common/slope-common-excel/src/main/java/com/sckw/excel/common/FileType.java

@@ -0,0 +1,82 @@
+package com.sckw.excel.common;
+
+/**
+ * @description:    文件类型
+ * @author: LengFaQiang
+ * @copyright
+ * @create: 2022-01-27 16:02
+ */
+public class FileType {
+
+    public enum type {
+        /**
+         * 商品主档信息导入模板
+         */
+        REGISTERED(1, "商品主档信息导入模板.xlsx"),
+        /**
+         * 备案结果导入模板
+         */
+        LOGIN(2, "备案结果导入模板.xlsx"),
+        /**
+         * 商品分类导入模板
+         */
+        BIND(3, "商品分类导入模板.xlsx"),
+        /**
+         * 商品品牌导入模板
+         */
+        UPDATE(4, "商品品牌导入模板.xlsx"),
+        /**
+         * 入库单导入模板
+         */
+        SET(5, "入库单导入模板.xlsx"),
+        /**
+         * 调拨单导入模板
+         */
+        SET_PASSWORD(6, "调拨单导入模板.xlsx"),
+        /**
+         * 出库单导入模板
+         */
+        BANK(7, "出库单导入模板.xlsx");
+        private Integer code;
+        private String value;
+
+        type(Integer code, String value) {
+            this.code = code;
+            this.value = value;
+        }
+
+        public int getCode() {
+            return code;
+        }
+
+        public String getValue() {
+            return value;
+        }
+
+        public void setCode(Integer code) {
+            this.code = code;
+        }
+
+        public void setValue(String value) {
+            this.value = value;
+        }
+    }
+
+    public static String getValue(Integer code) {
+        for (type ele : type.values()) {
+            if (ele.getCode() == code) {
+                return ele.getValue();
+            }
+        }
+        return null;
+    }
+
+    public static int getCode(Integer code) {
+        for (type ele : type.values()) {
+            if (ele.getCode() == code) {
+                return ele.getCode();
+            }
+        }
+        return 0;
+    }
+}

+ 113 - 0
slope-common/slope-common-excel/src/main/java/com/sckw/excel/config/easyexcel/CustomCellWeightWeightConfig.java

@@ -0,0 +1,113 @@
+package com.sckw.excel.config.easyexcel;
+
+import com.alibaba.excel.enums.CellDataTypeEnum;
+import com.alibaba.excel.metadata.Head;
+import com.alibaba.excel.metadata.data.CellData;
+import com.alibaba.excel.metadata.data.WriteCellData;
+import com.alibaba.excel.write.metadata.holder.WriteSheetHolder;
+import com.alibaba.excel.write.style.column.AbstractColumnWidthStyleStrategy;
+import com.sckw.core.common.enums.NumberConstant;
+import com.sckw.core.model.constant.Global;
+import com.sckw.core.utils.CollectionUtils;
+import org.apache.poi.ss.usermodel.Cell;
+import org.apache.poi.ss.usermodel.CellType;
+import org.apache.poi.ss.usermodel.Sheet;
+
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+/**
+ * @author lfdc
+ * @description 自定义设置行高行宽
+ * @date 2023-10-11 14:10:19
+ */
+public class CustomCellWeightWeightConfig extends AbstractColumnWidthStyleStrategy {
+
+    private static final int MAX_COLUMN_WIDTH = 255;
+    // 保底宽度
+    private static final int COLUMN_WIDTH = 20;
+    private Map<Integer, Map<Integer, Integer>> CACHE = new HashMap<>();
+
+    @Override
+    protected void setColumnWidth(WriteSheetHolder writeSheetHolder, List<WriteCellData<?>> cellDataList, Cell cell, Head head, Integer integer, Boolean isHead) {
+        boolean needSetWidth = isHead || !CollectionUtils.isEmpty(cellDataList);
+        if (needSetWidth) {
+            Map<Integer, Integer> maxColumnWidthMap = CACHE.get(writeSheetHolder.getSheetNo());
+            if (maxColumnWidthMap == null) {
+                maxColumnWidthMap = new HashMap<>(Global.NUMERICAL_SIXTEEN);
+                CACHE.put(writeSheetHolder.getSheetNo(), maxColumnWidthMap);
+            }
+
+            Integer columnWidth = this.dataLength(cellDataList, cell, isHead);
+            if (columnWidth >= 0) {
+                if (columnWidth >= MAX_COLUMN_WIDTH) {
+                    columnWidth = MAX_COLUMN_WIDTH;
+                } else {
+                    if (columnWidth <= COLUMN_WIDTH) {
+                        //小于基础跨度的时候略加宽
+                        columnWidth = columnWidth + NumberConstant.EIGHT;
+                    }
+                }
+
+                Integer maxColumnWidth = maxColumnWidthMap.get(cell.getColumnIndex());
+                if (maxColumnWidth == null || columnWidth > maxColumnWidth) {
+                    maxColumnWidthMap.put(cell.getColumnIndex(), columnWidth);
+                    Sheet sheet = writeSheetHolder.getSheet();
+                    sheet.setColumnWidth(cell.getColumnIndex(), columnWidth * 200);
+                }
+//                if (maxColumnWidth == null || columnWidth > maxColumnWidth) {
+//                    maxColumnWidthMap.put(cell.getColumnIndex(), columnWidth);
+//                    writeSheetHolder.getSheet().setColumnWidth(cell.getColumnIndex(), columnWidth * 256);
+//                } else {
+//                    // 设置表头宽度
+//                    writeSheetHolder.getSheet().setColumnWidth(cell.getColumnIndex(), columnWidth * 256);
+//                }
+
+                //设置单元格类型
+                cell.setCellType(CellType.STRING);
+                // 数据总长度
+                int length = cell.getStringCellValue().length();
+                // 换行数
+                int rows = cell.getStringCellValue().split("\n").length;
+                // 默认一行高为20
+                cell.getRow().setHeightInPoints(rows * 20);
+            }
+        }
+    }
+
+    /**
+     * 计算长度
+     *
+     * @param cellDataList
+     * @param cell
+     * @param isHead
+     * @return
+     */
+    private Integer dataLength(List<WriteCellData<?>> cellDataList, Cell cell, Boolean isHead) {
+        if (isHead) {
+            return cell.getStringCellValue().getBytes().length;
+        } else {
+            CellData cellData = cellDataList.get(0);
+            CellDataTypeEnum type = cellData.getType();
+            if (type == null) {
+                return -1;
+            } else {
+                switch (type) {
+                    case STRING:
+                        // 换行符(数据需要提前解析好)
+                        int index = cellData.getStringValue().indexOf("\n");
+                        return index != -1 ?
+                                cellData.getStringValue().substring(0, index).getBytes().length + 1 : cellData.getStringValue().getBytes().length + 1;
+                    case BOOLEAN:
+                        return cellData.getBooleanValue().toString().getBytes().length;
+                    case NUMBER:
+                        return cellData.getNumberValue().toString().getBytes().length;
+                    default:
+                        return -1;
+                }
+            }
+        }
+    }
+
+}

Some files were not shown because too many files changed in this diff