lin.liu 1 місяць тому
коміт
8e7fe3bef0
100 змінених файлів з 7078 додано та 0 видалено
  1. 52 0
      .gitignore
  2. 20 0
      LICENSE
  3. 451 0
      pom.xml
  4. 16 0
      run-doc.bat
  5. 28 0
      secure-producting-business/pom.xml
  6. 150 0
      secure-producting-business/src/main/java/com/customs/cq/datacenter/business/controller/PolicyCategoryController.java
  7. 154 0
      secure-producting-business/src/main/java/com/customs/cq/datacenter/business/controller/PolicyPublishController.java
  8. 63 0
      secure-producting-business/src/main/java/com/customs/cq/datacenter/business/domain/PolicyCategoryPO.java
  9. 95 0
      secure-producting-business/src/main/java/com/customs/cq/datacenter/business/domain/PolicyPublishPO.java
  10. 57 0
      secure-producting-business/src/main/java/com/customs/cq/datacenter/business/domain/vo/PolicyCategoryVO.java
  11. 57 0
      secure-producting-business/src/main/java/com/customs/cq/datacenter/business/domain/vo/PolicyPublishVO.java
  12. 43 0
      secure-producting-business/src/main/java/com/customs/cq/datacenter/business/entity/request/policycategory/ReqCreatePolicyCategory.java
  13. 47 0
      secure-producting-business/src/main/java/com/customs/cq/datacenter/business/entity/request/policycategory/ReqModifyPolicyCategory.java
  14. 58 0
      secure-producting-business/src/main/java/com/customs/cq/datacenter/business/entity/request/policypublish/ReqCreatePolicyPublish.java
  15. 63 0
      secure-producting-business/src/main/java/com/customs/cq/datacenter/business/entity/request/policypublish/ReqModifyPolicyPublish.java
  16. 23 0
      secure-producting-business/src/main/java/com/customs/cq/datacenter/business/entity/search/SearchPolicyCategory.java
  17. 32 0
      secure-producting-business/src/main/java/com/customs/cq/datacenter/business/entity/search/SearchPolicyPublish.java
  18. 14 0
      secure-producting-business/src/main/java/com/customs/cq/datacenter/business/mapper/PolicyCategoryMapper.java
  19. 14 0
      secure-producting-business/src/main/java/com/customs/cq/datacenter/business/mapper/PolicyPublishMapper.java
  20. 117 0
      secure-producting-business/src/main/java/com/customs/cq/datacenter/business/mapper/impl/PolicyCategoryMapperImpl.java
  21. 103 0
      secure-producting-business/src/main/java/com/customs/cq/datacenter/business/mapper/impl/PolicyPublishMapperImpl.java
  22. 144 0
      secure-producting-business/src/main/java/com/customs/cq/datacenter/business/service/PolicyCategoryService.java
  23. 172 0
      secure-producting-business/src/main/java/com/customs/cq/datacenter/business/service/PolicyPublishService.java
  24. 247 0
      secure-producting-common/pom.xml
  25. 151 0
      secure-producting-common/src/main/java/com/customs/cq/datacenter/common/ExecutedResult.java
  26. 106 0
      secure-producting-common/src/main/java/com/customs/cq/datacenter/common/PagerResult.java
  27. 26 0
      secure-producting-common/src/main/java/com/customs/cq/datacenter/common/PagerResultMore.java
  28. 24 0
      secure-producting-common/src/main/java/com/customs/cq/datacenter/common/annotation/CellMerge.java
  29. 28 0
      secure-producting-common/src/main/java/com/customs/cq/datacenter/common/annotation/DataColumn.java
  30. 18 0
      secure-producting-common/src/main/java/com/customs/cq/datacenter/common/annotation/DataPermission.java
  31. 29 0
      secure-producting-common/src/main/java/com/customs/cq/datacenter/common/annotation/DictDataMapper.java
  32. 44 0
      secure-producting-common/src/main/java/com/customs/cq/datacenter/common/annotation/EncryptField.java
  33. 32 0
      secure-producting-common/src/main/java/com/customs/cq/datacenter/common/annotation/ExcelDictFormat.java
  34. 30 0
      secure-producting-common/src/main/java/com/customs/cq/datacenter/common/annotation/ExcelEnumFormat.java
  35. 47 0
      secure-producting-common/src/main/java/com/customs/cq/datacenter/common/annotation/Log.java
  36. 41 0
      secure-producting-common/src/main/java/com/customs/cq/datacenter/common/annotation/RateLimiter.java
  37. 29 0
      secure-producting-common/src/main/java/com/customs/cq/datacenter/common/annotation/RepeatSubmit.java
  38. 24 0
      secure-producting-common/src/main/java/com/customs/cq/datacenter/common/annotation/Sensitive.java
  39. 20 0
      secure-producting-common/src/main/java/com/customs/cq/datacenter/common/annotation/ThirdPartyAuth.java
  40. 39 0
      secure-producting-common/src/main/java/com/customs/cq/datacenter/common/annotation/Translation.java
  41. 23 0
      secure-producting-common/src/main/java/com/customs/cq/datacenter/common/annotation/TranslationType.java
  42. 85 0
      secure-producting-common/src/main/java/com/customs/cq/datacenter/common/captcha/UnsignedMathGenerator.java
  43. 15 0
      secure-producting-common/src/main/java/com/customs/cq/datacenter/common/config/FileConfig.java
  44. 54 0
      secure-producting-common/src/main/java/com/customs/cq/datacenter/common/config/RuoYiConfig.java
  45. 13 0
      secure-producting-common/src/main/java/com/customs/cq/datacenter/common/config/SystemConfig.java
  46. 44 0
      secure-producting-common/src/main/java/com/customs/cq/datacenter/common/constant/CacheConstants.java
  47. 58 0
      secure-producting-common/src/main/java/com/customs/cq/datacenter/common/constant/CacheNames.java
  48. 365 0
      secure-producting-common/src/main/java/com/customs/cq/datacenter/common/constant/Constants.java
  49. 193 0
      secure-producting-common/src/main/java/com/customs/cq/datacenter/common/constant/GenConstants.java
  50. 93 0
      secure-producting-common/src/main/java/com/customs/cq/datacenter/common/constant/HttpStatus.java
  51. 30 0
      secure-producting-common/src/main/java/com/customs/cq/datacenter/common/constant/TransConstant.java
  52. 137 0
      secure-producting-common/src/main/java/com/customs/cq/datacenter/common/constant/UserConstants.java
  53. 52 0
      secure-producting-common/src/main/java/com/customs/cq/datacenter/common/convert/ExcelBigNumberConvert.java
  54. 73 0
      secure-producting-common/src/main/java/com/customs/cq/datacenter/common/convert/ExcelDictConvert.java
  55. 97 0
      secure-producting-common/src/main/java/com/customs/cq/datacenter/common/convert/ExcelEnumConvert.java
  56. 69 0
      secure-producting-common/src/main/java/com/customs/cq/datacenter/common/core/controller/BaseController.java
  57. 59 0
      secure-producting-common/src/main/java/com/customs/cq/datacenter/common/core/controller/BasicController.java
  58. 63 0
      secure-producting-common/src/main/java/com/customs/cq/datacenter/common/core/domain/BaseEntity.java
  59. 112 0
      secure-producting-common/src/main/java/com/customs/cq/datacenter/common/core/domain/PageQuery.java
  60. 107 0
      secure-producting-common/src/main/java/com/customs/cq/datacenter/common/core/domain/R.java
  61. 39 0
      secure-producting-common/src/main/java/com/customs/cq/datacenter/common/core/domain/TreeEntity.java
  62. 38 0
      secure-producting-common/src/main/java/com/customs/cq/datacenter/common/core/domain/dto/RoleDTO.java
  63. 60 0
      secure-producting-common/src/main/java/com/customs/cq/datacenter/common/core/domain/dto/UserOnlineDTO.java
  64. 88 0
      secure-producting-common/src/main/java/com/customs/cq/datacenter/common/core/domain/entity/SysDept.java
  65. 107 0
      secure-producting-common/src/main/java/com/customs/cq/datacenter/common/core/domain/entity/SysDictData.java
  66. 71 0
      secure-producting-common/src/main/java/com/customs/cq/datacenter/common/core/domain/entity/SysDictType.java
  67. 114 0
      secure-producting-common/src/main/java/com/customs/cq/datacenter/common/core/domain/entity/SysMenu.java
  68. 128 0
      secure-producting-common/src/main/java/com/customs/cq/datacenter/common/core/domain/entity/SysRole.java
  69. 185 0
      secure-producting-common/src/main/java/com/customs/cq/datacenter/common/core/domain/entity/SysUser.java
  70. 44 0
      secure-producting-common/src/main/java/com/customs/cq/datacenter/common/core/domain/event/LogininforEvent.java
  71. 104 0
      secure-producting-common/src/main/java/com/customs/cq/datacenter/common/core/domain/event/OperLogEvent.java
  72. 30 0
      secure-producting-common/src/main/java/com/customs/cq/datacenter/common/core/domain/model/EmailLoginBody.java
  73. 42 0
      secure-producting-common/src/main/java/com/customs/cq/datacenter/common/core/domain/model/LoginBody.java
  74. 116 0
      secure-producting-common/src/main/java/com/customs/cq/datacenter/common/core/domain/model/LoginUser.java
  75. 17 0
      secure-producting-common/src/main/java/com/customs/cq/datacenter/common/core/domain/model/RegisterBody.java
  76. 28 0
      secure-producting-common/src/main/java/com/customs/cq/datacenter/common/core/domain/model/SmsLoginBody.java
  77. 24 0
      secure-producting-common/src/main/java/com/customs/cq/datacenter/common/core/domain/model/XcxLoginUser.java
  78. 192 0
      secure-producting-common/src/main/java/com/customs/cq/datacenter/common/core/mapper/BaseMapperPlus.java
  79. 234 0
      secure-producting-common/src/main/java/com/customs/cq/datacenter/common/core/mapper/BasicMapper.java
  80. 78 0
      secure-producting-common/src/main/java/com/customs/cq/datacenter/common/core/page/TableDataInfo.java
  81. 16 0
      secure-producting-common/src/main/java/com/customs/cq/datacenter/common/core/service/BasicService.java
  82. 18 0
      secure-producting-common/src/main/java/com/customs/cq/datacenter/common/core/service/ConfigService.java
  83. 18 0
      secure-producting-common/src/main/java/com/customs/cq/datacenter/common/core/service/DeptService.java
  84. 66 0
      secure-producting-common/src/main/java/com/customs/cq/datacenter/common/core/service/DictService.java
  85. 18 0
      secure-producting-common/src/main/java/com/customs/cq/datacenter/common/core/service/OssService.java
  86. 18 0
      secure-producting-common/src/main/java/com/customs/cq/datacenter/common/core/service/SensitiveService.java
  87. 18 0
      secure-producting-common/src/main/java/com/customs/cq/datacenter/common/core/service/UserService.java
  88. 9 0
      secure-producting-common/src/main/java/com/customs/cq/datacenter/common/core/validate/AddGroup.java
  89. 9 0
      secure-producting-common/src/main/java/com/customs/cq/datacenter/common/core/validate/EditGroup.java
  90. 9 0
      secure-producting-common/src/main/java/com/customs/cq/datacenter/common/core/validate/QueryGroup.java
  91. 13 0
      secure-producting-common/src/main/java/com/customs/cq/datacenter/common/core/vo/BasicVO.java
  92. 41 0
      secure-producting-common/src/main/java/com/customs/cq/datacenter/common/encrypt/EncryptContext.java
  93. 35 0
      secure-producting-common/src/main/java/com/customs/cq/datacenter/common/encrypt/IEncryptor.java
  94. 18 0
      secure-producting-common/src/main/java/com/customs/cq/datacenter/common/encrypt/encryptor/AbstractEncryptor.java
  95. 69 0
      secure-producting-common/src/main/java/com/customs/cq/datacenter/common/encrypt/encryptor/AesEncryptor.java
  96. 48 0
      secure-producting-common/src/main/java/com/customs/cq/datacenter/common/encrypt/encryptor/Base64Encryptor.java
  97. 69 0
      secure-producting-common/src/main/java/com/customs/cq/datacenter/common/encrypt/encryptor/MD5Util.java
  98. 65 0
      secure-producting-common/src/main/java/com/customs/cq/datacenter/common/encrypt/encryptor/RsaEncryptor.java
  99. 65 0
      secure-producting-common/src/main/java/com/customs/cq/datacenter/common/encrypt/encryptor/Sm2Encryptor.java
  100. 67 0
      secure-producting-common/src/main/java/com/customs/cq/datacenter/common/encrypt/encryptor/Sm4Encryptor.java

+ 52 - 0
.gitignore

@@ -0,0 +1,52 @@
+######################################################################
+# Build Tools
+.gradle
+/build/
+!gradle/wrapper/gradle-wrapper.jar
+
+target/
+!.mvn/wrapper/maven-wrapper.jar
+
+######################################################################
+# IDE
+
+### STS ###
+.apt_generated
+.classpath
+.factorypath
+.project
+.settings
+.springBeans
+
+### IntelliJ IDEA ###
+.idea
+*.iws
+*.iml
+*.ipr
+
+### JRebel ###
+rebel.xml
+
+### NetBeans ###
+nbproject/private/
+build/*
+nbbuild/
+nbdist/
+.nb-gradle/
+
+######################################################################
+# Others
+*.log
+*.xml.versionsBackup
+*.swp
+
+!*/build/*.java
+!*/build/*.html
+!*/build/*.xml
+
+**/static/doc/*.*
+/logs/*
+/cabinet/*
+
+**/log/
+**/logs/

+ 20 - 0
LICENSE

@@ -0,0 +1,20 @@
+The MIT License (MIT)
+
+Copyright (c) 2019 RuoYi-Vue-Plus
+
+Permission is hereby granted, free of charge, to any person obtaining a copy of
+this software and associated documentation files (the "Software"), to deal in
+the Software without restriction, including without limitation the rights to
+use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
+the Software, and to permit persons to whom the Software is furnished to do so,
+subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all
+copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
+FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
+COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
+IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

+ 451 - 0
pom.xml

@@ -0,0 +1,451 @@
+<?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 https://maven.apache.org/xsd/maven-4.0.0.xsd">
+	<modelVersion>4.0.0</modelVersion>
+	<parent>
+		<groupId>org.springframework.boot</groupId>
+		<artifactId>spring-boot-starter-parent</artifactId>
+		<version>2.7.13</version>
+		<relativePath/> <!-- lookup parent from repository -->
+	</parent>
+
+	<groupId>com.customs.cq.datacenter</groupId>
+	<artifactId>secure-producting</artifactId>
+	<version>0.0.1-SNAPSHOT</version>
+	<packaging>pom</packaging>
+
+	<modules>
+		<module>secure-producting-common</module>
+		<module>secure-producting-framework</module>
+		<module>secure-producting-system</module>
+		<module>secure-producting-business</module>
+		<module>secure-producting-host</module>
+		<module>secure-producting-oss</module>
+	</modules>
+
+	<properties>
+		<java.version>1.8</java.version>
+		<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
+		<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
+
+		<spring-boot.version>2.7.13</spring-boot.version>
+		<maven-jar-plugin.version>3.2.2</maven-jar-plugin.version>
+		<spring-boot.mybatis>2.2.2</spring-boot.mybatis>
+		<poi.version>5.2.3</poi.version>
+		<easyexcel.version>3.3.4</easyexcel.version>
+		<satoken.version>1.35.0.RC</satoken.version>
+		<mybatis-plus.version>3.5.3.1</mybatis-plus.version>
+		<p6spy.version>3.9.1</p6spy.version>
+		<hutool.version>5.8.18</hutool.version>
+		<redisson.version>3.20.1</redisson.version>
+		<lock4j.version>2.2.3</lock4j.version>
+		<dynamic-ds.version>3.5.2</dynamic-ds.version>
+		<alibaba-ttl.version>2.14.2</alibaba-ttl.version>
+		<lombok.version>1.16.10</lombok.version>
+		<bouncycastle.version>1.72</bouncycastle.version>
+		<!-- 离线IP地址定位库 -->
+		<ip2region.version>2.7.0</ip2region.version>
+
+		<!-- 临时修复 snakeyaml 漏洞 -->
+		<snakeyaml.version>1.33</snakeyaml.version>
+
+		<!-- OSS 配置 -->
+		<aws-java-sdk-s3.version>1.12.400</aws-java-sdk-s3.version>
+
+		<!-- apache http -->
+		<apache.http.version>4.5.14</apache.http.version>
+		<!-- json -->
+		<gson.version>2.8.0</gson.version>
+
+		<!-- 获取系统信息 -->
+		<oshi.version>5.8.2</oshi.version>
+	</properties>
+
+	<!-- 环境申明 -->
+	<profiles>
+		<profile>
+			<id>jeff</id>
+			<properties>
+				<!-- 环境标识,需要与配置文件的名称相对应 -->
+				<profiles.active>jeff</profiles.active>
+				<logging.level>debug</logging.level>
+				<package.buildName>-${project.version}</package.buildName>
+			</properties>
+		</profile>
+		<profile>
+			<id>dev</id>
+			<properties>
+				<!-- 环境标识,需要与配置文件的名称相对应 -->
+				<profiles.active>dev</profiles.active>
+				<logging.level>debug</logging.level>
+				<package.buildName>-${project.version}</package.buildName>
+			</properties>
+			<activation>
+				<!-- 默认环境 -->
+				<activeByDefault>true</activeByDefault>
+			</activation>
+		</profile>
+		<profile>
+			<id>prod</id>
+			<properties>
+				<profiles.active>prod</profiles.active>
+				<logging.level>warn</logging.level>
+				<package.buildName></package.buildName>
+			</properties>
+		</profile>
+	</profiles>
+
+	<!-- 依赖声明 -->
+	<dependencyManagement>
+		<dependencies>
+			<!--=================================== 项目本身模块 - start ===================================-->
+			<!-- 通用工具 -->
+			<dependency>
+				<groupId>${project.groupId}</groupId>
+				<artifactId>secure-producting-common</artifactId>
+				<version>${project.version}</version>
+			</dependency>
+			<!-- 核心模块 -->
+			<dependency>
+				<groupId>${project.groupId}</groupId>
+				<artifactId>secure-producting-framework</artifactId>
+				<version>${project.version}</version>
+			</dependency>
+			<!-- OSS对象存储模块 -->
+			<dependency>
+				<groupId>${project.groupId}</groupId>
+				<artifactId>secure-producting-oss</artifactId>
+				<version>${project.version}</version>
+			</dependency>
+			<!-- 系统模块 -->
+			<dependency>
+				<groupId>${project.groupId}</groupId>
+				<artifactId>secure-producting-system</artifactId>
+				<version>${project.version}</version>
+			</dependency>
+			<!-- 业务模块 -->
+			<dependency>
+				<groupId>${project.groupId}</groupId>
+				<artifactId>secure-producting-business</artifactId>
+				<version>${project.version}</version>
+			</dependency>
+			<!-- 程序启动入口 -->
+			<dependency>
+				<groupId>${project.groupId}</groupId>
+				<artifactId>secure-producting-host</artifactId>
+				<version>${project.version}</version>
+			</dependency>
+			<!--=================================== 项目本身模块 - end ===================================-->
+
+			<!-- hutool 的依赖配置-->
+			<dependency>
+				<groupId>cn.hutool</groupId>
+				<artifactId>hutool-bom</artifactId>
+				<version>${hutool.version}</version>
+				<type>pom</type>
+				<scope>import</scope>
+			</dependency>
+
+			<dependency>
+				<groupId>org.projectlombok</groupId>
+				<artifactId>lombok</artifactId>
+				<version>${lombok.version}</version>
+			</dependency>
+
+			<dependency>
+				<groupId>org.apache.poi</groupId>
+				<artifactId>poi</artifactId>
+				<version>${poi.version}</version>
+			</dependency>
+			<dependency>
+				<groupId>org.apache.poi</groupId>
+				<artifactId>poi-ooxml</artifactId>
+				<version>${poi.version}</version>
+			</dependency>
+			<dependency>
+				<groupId>com.alibaba</groupId>
+				<artifactId>easyexcel</artifactId>
+				<version>${easyexcel.version}</version>
+				<exclusions>
+					<exclusion>
+						<groupId>org.apache.poi</groupId>
+						<artifactId>poi-ooxml-schemas</artifactId>
+					</exclusion>
+				</exclusions>
+			</dependency>
+			<dependency>
+				<groupId>com.alibaba</groupId>
+				<artifactId>easyexcel-core</artifactId>
+				<version>${easyexcel.version}</version>
+				<exclusions>
+					<exclusion>
+						<artifactId>xmlbeans</artifactId>
+						<groupId>org.apache.xmlbeans</groupId>
+					</exclusion>
+					<exclusion>
+						<artifactId>commons-io</artifactId>
+						<groupId>commons-io</groupId>
+					</exclusion>
+				</exclusions>
+			</dependency>
+
+			<!-- Sa-Token 权限认证, 在线文档:http://sa-token.dev33.cn/ -->
+			<dependency>
+				<groupId>cn.dev33</groupId>
+				<artifactId>sa-token-spring-boot-starter</artifactId>
+				<version>${satoken.version}</version>
+			</dependency>
+			<!-- Sa-Token 整合 jwt -->
+			<dependency>
+				<groupId>cn.dev33</groupId>
+				<artifactId>sa-token-jwt</artifactId>
+				<version>${satoken.version}</version>
+				<exclusions>
+					<exclusion>
+						<groupId>cn.hutool</groupId>
+						<artifactId>hutool-all</artifactId>
+					</exclusion>
+				</exclusions>
+			</dependency>
+			<!-- Sa-Token 整合 jwt -->
+			<dependency>
+				<groupId>cn.dev33</groupId>
+				<artifactId>sa-token-core</artifactId>
+				<version>${satoken.version}</version>
+			</dependency>
+
+			<!-- dynamic-datasource 多数据源-->
+			<dependency>
+				<groupId>com.baomidou</groupId>
+				<artifactId>dynamic-datasource-spring-boot-starter</artifactId>
+				<version>${dynamic-ds.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-core</artifactId>
+				<version>${mybatis-plus.version}</version>
+			</dependency>
+			<dependency>
+				<groupId>com.baomidou</groupId>
+				<artifactId>mybatis-plus-extension</artifactId>
+				<version>${mybatis-plus.version}</version>
+			</dependency>
+
+			<!-- sql性能分析插件 -->
+			<dependency>
+				<groupId>p6spy</groupId>
+				<artifactId>p6spy</artifactId>
+				<version>${p6spy.version}</version>
+			</dependency>
+
+			<dependency>
+				<groupId>com.amazonaws</groupId>
+				<artifactId>aws-java-sdk-s3</artifactId>
+				<version>${aws-java-sdk-s3.version}</version>
+			</dependency>
+
+			<!--redisson-->
+			<dependency>
+				<groupId>org.redisson</groupId>
+				<artifactId>redisson-spring-boot-starter</artifactId>
+				<version>${redisson.version}</version>
+				<exclusions>
+					<exclusion>
+						<groupId>org.redisson</groupId>
+						<artifactId>redisson-spring-data-30</artifactId>
+					</exclusion>
+				</exclusions>
+			</dependency>
+			<dependency>
+				<groupId>org.redisson</groupId>
+				<artifactId>redisson-spring-data-27</artifactId>
+				<version>${redisson.version}</version>
+			</dependency>
+
+			<dependency>
+				<groupId>com.baomidou</groupId>
+				<artifactId>lock4j-redisson-spring-boot-starter</artifactId>
+				<version>${lock4j.version}</version>
+			</dependency>
+
+			<dependency>
+				<groupId>com.alibaba</groupId>
+				<artifactId>transmittable-thread-local</artifactId>
+				<version>${alibaba-ttl.version}</version>
+			</dependency>
+
+			<!-- 离线IP地址定位库 ip2region -->
+			<dependency>
+				<groupId>org.lionsoul</groupId>
+				<artifactId>ip2region</artifactId>
+				<version>${ip2region.version}</version>
+			</dependency>
+
+			<!-- 临时修复 snakeyaml 漏洞 -->
+			<dependency>
+				<groupId>org.yaml</groupId>
+				<artifactId>snakeyaml</artifactId>
+				<version>${snakeyaml.version}</version>
+			</dependency>
+
+			<!-- 加密包引入 -->
+			<dependency>
+				<groupId>org.bouncycastle</groupId>
+				<artifactId>bcprov-jdk15to18</artifactId>
+				<version>${bouncycastle.version}</version>
+			</dependency>
+
+			<!-- http请求相关 -->
+			<dependency>
+				<groupId>org.apache.httpcomponents</groupId>
+				<artifactId>httpmime</artifactId>
+				<version>${apache.http.version}</version>
+			</dependency>
+			<!-- json -->
+			<dependency>
+				<groupId>com.google.code.gson</groupId>
+				<artifactId>gson</artifactId>
+				<version>${gson.version}</version>
+			</dependency>
+
+			<!--mapStruct依赖 高性能对象映射-->
+			<!--mapstruct核心-->
+			<dependency>
+				<groupId>org.mapstruct</groupId>
+				<artifactId>mapstruct</artifactId>
+				<version>1.5.0.Beta1</version>
+			</dependency>
+			<!--mapstruct编译-->
+			<dependency>
+				<groupId>org.mapstruct</groupId>
+				<artifactId>mapstruct-processor</artifactId>
+				<version>1.5.0.Beta1</version>
+			</dependency>
+
+			<!-- 中文转拼音 -->
+			<dependency>
+				<groupId>com.belerweb</groupId>
+				<artifactId>pinyin4j</artifactId>
+				<version>2.5.0</version>
+			</dependency>
+
+			<!--quartz依赖-->
+			<dependency>
+				<groupId>org.springframework.boot</groupId>
+				<artifactId>spring-boot-starter-quartz</artifactId>
+				<version>2.0.3.RELEASE</version>
+			</dependency>
+
+			<!-- 获取系统信息 -->
+			<dependency>
+				<groupId>com.github.oshi</groupId>
+				<artifactId>oshi-core</artifactId>
+				<version>${oshi.version}</version>
+			</dependency>
+
+			<!-- hibernate.validator -->
+			<dependency>
+				<groupId>org.hibernate.validator</groupId>
+				<artifactId>hibernate-validator</artifactId>
+				<version>6.0.13.Final</version>
+			</dependency>
+		</dependencies>
+	</dependencyManagement>
+
+	<!-- 所有模块都需要的依赖 -->
+	<dependencies>
+		<!-- SpringWeb模块 -->
+		<dependency>
+			<groupId>org.springframework</groupId>
+			<artifactId>spring-web</artifactId>
+		</dependency>
+		<dependency>
+			<groupId>org.springframework</groupId>
+			<artifactId>spring-webmvc</artifactId>
+		</dependency>
+
+		<!-- 自动getter/setter -->
+		<dependency>
+			<groupId>org.projectlombok</groupId>
+			<artifactId>lombok</artifactId>
+		</dependency>
+
+		<!--mapstruct核心-->
+		<dependency>
+			<groupId>org.mapstruct</groupId>
+			<artifactId>mapstruct</artifactId>
+		</dependency>
+
+		<dependency>
+			<groupId>com.fasterxml.jackson.core</groupId>
+			<artifactId>jackson-annotations</artifactId>
+		</dependency>
+	</dependencies>
+
+	<build>
+		<plugins>
+			<!-- smart-doc 自动生成接口文档 -->
+			<plugin>
+				<groupId>com.github.shalousun</groupId>
+				<artifactId>smart-doc-maven-plugin</artifactId>
+				<version>2.2.7</version>
+				<configuration>
+					<!--指定生成文档的使用的配置文件,配置文件放在自己的项目中-->
+					<configFile>./src/main/resources/smart-doc.json</configFile>
+					<!--指定项目名称-->
+					<projectName>重庆海关安全生产网格化智慧管理平台-接口文档</projectName>
+					<!--smart-doc实现自动分析依赖树加载第三方依赖的源码,如果一些框架依赖库加载不到导致报错,这时请使用excludes排除掉-->
+					<!--<excludes>
+						&lt;!&ndash;格式为:groupId:artifactId;参考如下&ndash;&gt;
+						<exclude>com.alibaba:fastjson</exclude>
+					</excludes>-->
+
+					<!--自1.0.8版本开始,插件提供includes支持,配置了includes后插件会按照用户配置加载而不是自动加载,因此使用时需要注意-->
+					<!--smart-doc能自动分析依赖树加载所有依赖源码,原则上会影响文档构建效率,因此你可以使用includes来让插件加载你配置的组件-->
+					<!--<includes>
+						&lt;!&ndash;格式为:groupId:artifactId;参考如下&ndash;&gt;
+						&lt;!&ndash;也可以支持正则式如:com.alibaba:.* &ndash;&gt;
+						<include>com.alibaba:fastjson</include>
+					</includes>-->
+				</configuration>
+				<executions>
+					<execution>
+						<!--如果不需要在执行编译时启动smart-doc,则将phase注释掉-->
+						<!--<phase>compile</phase>-->
+						<goals>
+							<!--smart-doc提供了html、openapi、markdown等goal,可按需配置-->
+							<goal>html</goal>
+						</goals>
+					</execution>
+				</executions>
+			</plugin>
+		</plugins>
+
+		<resources>
+			<resource>
+				<directory>src/main/resources</directory>
+				<!-- 关闭过滤 -->
+				<filtering>false</filtering>
+			</resource>
+
+			<resource>
+				<directory>src/main/resources</directory>
+				<!-- 引入所有 匹配文件进行过滤 -->
+				<includes>
+					<include>application*</include>
+					<include>bootstrap*</include>
+					<include>banner*</include>
+				</includes>
+				<!-- 启用过滤 即该资源中的变量将会被过滤器中的值替换 -->
+				<filtering>true</filtering>
+			</resource>
+		</resources>
+	</build>
+</project>

+ 16 - 0
run-doc.bat

@@ -0,0 +1,16 @@
+@echo off
+set pan=""
+set currPath=""
+set jarName = ""
+
+set pan=%~d0
+set currPath=%~dp0
+
+%pan%
+
+cd %currPath%
+
+mvn smart-doc:openapi -Dfile.encoding=UTF-8 -pl :secure-producting-host -am
+mvn smart-doc:html -Dfile.encoding=UTF-8 -pl :secure-producting-host -am
+
+pause&gt;nul

+ 28 - 0
secure-producting-business/pom.xml

@@ -0,0 +1,28 @@
+<?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>
+        <groupId>com.customs.cq.datacenter</groupId>
+        <artifactId>secure-producting</artifactId>
+        <version>0.0.1-SNAPSHOT</version>
+    </parent>
+    <modelVersion>4.0.0</modelVersion>
+
+    <artifactId>secure-producting-business</artifactId>
+
+    <dependencies>
+        <!--==================================== 项目自身模块 - start ====================================-->
+        <!-- 通用工具-->
+        <dependency>
+            <groupId>com.customs.cq.datacenter</groupId>
+            <artifactId>secure-producting-common</artifactId>
+        </dependency>
+        <!-- OSS对象存储模块 -->
+        <dependency>
+            <groupId>com.customs.cq.datacenter</groupId>
+            <artifactId>secure-producting-system</artifactId>
+        </dependency>
+        <!--==================================== 项目自身模块 - end ====================================-->
+    </dependencies>
+</project>

+ 150 - 0
secure-producting-business/src/main/java/com/customs/cq/datacenter/business/controller/PolicyCategoryController.java

@@ -0,0 +1,150 @@
+/**
+#                                                    __----~~~~~~~~~~~------___
+#                                   .  .   ~~//====......          __--~ ~~
+#                   -.            \_|//     |||\\  ~~~~~~::::... /~
+#                ___-==_       _-~o~  \/    |||  \\            _/~~-
+#        __---~~~.==~||\=_    -_--~/_-~|-   |\\   \\        _/~
+#    _-~~     .=~    |  \\-_    '-~7  /-   /  ||    \      /
+#  .~       .~       |   \\ -_    /  /-   /   ||      \   /
+# /  ____  /         |     \\ ~-_/  /|- _/   .||       \ /
+# |~~    ~~|--~~~~--_ \     ~==-/   | \~--===~~        .\
+#          '         ~-|      /|    |-~\~~       __--~~
+#                      |-~~-_/ |    |   ~\_   _-~            /\
+#                           /  \     \__   \/~                \__
+#                       _--~ _/ | .-~~____--~-/                  ~~==.
+#                      ((->/~   '.|||' -_|    ~~-/ ,              . _||
+#                                 -_     ~\      ~~---l__i__i__i--~~_/
+#                                 _-~-__   ~)  \--______________--~~
+#                               //.-~~~-~_--~- |-------~~~~~~~~
+#                                      //.-~~~--\
+#                  神兽保佑
+#                  永无BUG!
+*/
+package com.customs.cq.datacenter.business.controller;
+
+import com.customs.cq.datacenter.business.domain.vo.PolicyCategoryVO;
+import com.customs.cq.datacenter.business.entity.request.policycategory.ReqCreatePolicyCategory;
+import com.customs.cq.datacenter.business.entity.request.policycategory.ReqModifyPolicyCategory;
+import com.customs.cq.datacenter.business.entity.search.SearchPolicyCategory;
+import com.customs.cq.datacenter.business.service.PolicyCategoryService;
+import com.customs.cq.datacenter.common.ExecutedResult;
+import com.customs.cq.datacenter.common.PagerResult;
+import com.customs.cq.datacenter.common.annotation.Log;
+import com.customs.cq.datacenter.common.constant.Constants;
+import com.customs.cq.datacenter.common.core.controller.BasicController;
+import com.customs.cq.datacenter.common.enums.BusinessType;
+import com.customs.cq.datacenter.common.model.NameValueDto;
+import com.customs.cq.datacenter.common.model.ReqListId;
+import com.customs.cq.datacenter.common.utils.ParameterUtil;
+import com.customs.cq.datacenter.common.validator.ParameterValidateResult;
+import com.customs.cq.datacenter.common.validator.ParameterValidator;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.*;
+
+import java.util.List;
+
+/**
+ * 10.政策法规分类
+ * @author lin.liu
+ * @description 10.政策法规分类
+ * @order 10
+ */
+@RestController
+@RequestMapping(value = "policyCategory")
+public class PolicyCategoryController extends BasicController {
+    @Autowired
+    private PolicyCategoryService service;
+
+    /**
+     * 创建[政策法规分类]
+     * @author lin.liu
+     * @description 创建[政策法规分类]
+     */
+    @Log(title = "政策法规分类", businessType = BusinessType.INSERT)
+    @PostMapping(value = "create")
+    public ExecutedResult<Long> create(@RequestBody ReqCreatePolicyCategory request) {
+        //#region 参数验证
+        ParameterValidator validator = new ParameterValidator()
+                // 非空
+                .addNotNullOrEmpty(ParameterUtil.named("分类名称"), request.getCategoryName())
+                // 限制最大长度
+                .addLengthMax(ParameterUtil.named("分类名称"), request.getCategoryName(), Constants.LENGTH_MAX20)
+                // 限制最大长度
+                .addLengthMax(ParameterUtil.named("备注"), request.getRemark(), Constants.LENGTH_MAX500)
+                ;
+        ParameterValidateResult result = validator.validate();
+        if (result.getIsFiled()) {
+            return failed(result.getErrorMsg());
+        }
+        //#endregion
+        return this.service.create(request);
+    }
+
+    /**
+     * 编辑[政策法规分类]
+     * @author lin.liu
+     * @description 编辑[政策法规分类]
+     */
+    @Log(title = "政策法规分类", businessType = BusinessType.UPDATE)
+    @PostMapping(value = "modify")
+    public ExecutedResult<String> modify(@RequestBody ReqModifyPolicyCategory request) {
+        //#region 参数验证
+        ParameterValidator validator = new ParameterValidator()
+                // 必须大于0
+                .addGreater(ParameterUtil.named("分类id"), request.getId(), 0L)
+                // 非空
+                .addNotNullOrEmpty(ParameterUtil.named("分类名称"), request.getCategoryName())
+                // 限制最大长度
+                .addLengthMax(ParameterUtil.named("分类名称"), request.getCategoryName(), Constants.LENGTH_MAX20)
+                // 限制最大长度
+                .addLengthMax(ParameterUtil.named("备注"), request.getRemark(), Constants.LENGTH_MAX500)
+                ;
+        ParameterValidateResult result = validator.validate();
+        if (result.getIsFiled()) {
+            return failed(result.getErrorMsg());
+        }
+        //#endregion
+        return this.service.modify(request);
+    }
+
+    /**
+     * 获取[政策法规分类]
+     * @author lin.liu
+     * @description 获取[政策法规分类]
+     */
+    @GetMapping(value = "get/{id}")
+    public ExecutedResult<PolicyCategoryVO> get(@PathVariable Long id) {
+        return this.service.get(id);
+    }
+
+    /**
+     * 根据id批量获取[政策法规分类]
+     * @author lin.liu
+     * @description 根据id批量获取[政策法规分类]
+     */
+    @PostMapping(value = "getList")
+    public ExecutedResult<List<PolicyCategoryVO>> getList(@RequestBody ReqListId request) {
+        return this.service.getList(request.getListId());
+    }
+
+    /**
+     * 查询[政策法规分类]
+     * @author lin.liu
+     * @description 查询[政策法规分类]
+     */
+    @PostMapping(value = "search")
+    public ExecutedResult<PagerResult<PolicyCategoryVO>> search(@RequestBody SearchPolicyCategory request) {
+        return this.service.search(request);
+    }
+
+    /**
+     * 获取所有政策法规分类下拉选项
+     *
+     * @author lin.liu
+     * @description 获取所有政策法规分类下拉选项
+     */
+    @GetMapping(value = "listAll")
+    public ExecutedResult<List<NameValueDto>> listAllSelect() {
+        return success(this.service.listAllSelect());
+    }
+}

+ 154 - 0
secure-producting-business/src/main/java/com/customs/cq/datacenter/business/controller/PolicyPublishController.java

@@ -0,0 +1,154 @@
+/**
+#                                                    __----~~~~~~~~~~~------___
+#                                   .  .   ~~//====......          __--~ ~~
+#                   -.            \_|//     |||\\  ~~~~~~::::... /~
+#                ___-==_       _-~o~  \/    |||  \\            _/~~-
+#        __---~~~.==~||\=_    -_--~/_-~|-   |\\   \\        _/~
+#    _-~~     .=~    |  \\-_    '-~7  /-   /  ||    \      /
+#  .~       .~       |   \\ -_    /  /-   /   ||      \   /
+# /  ____  /         |     \\ ~-_/  /|- _/   .||       \ /
+# |~~    ~~|--~~~~--_ \     ~==-/   | \~--===~~        .\
+#          '         ~-|      /|    |-~\~~       __--~~
+#                      |-~~-_/ |    |   ~\_   _-~            /\
+#                           /  \     \__   \/~                \__
+#                       _--~ _/ | .-~~____--~-/                  ~~==.
+#                      ((->/~   '.|||' -_|    ~~-/ ,              . _||
+#                                 -_     ~\      ~~---l__i__i__i--~~_/
+#                                 _-~-__   ~)  \--______________--~~
+#                               //.-~~~-~_--~- |-------~~~~~~~~
+#                                      //.-~~~--\
+#                  神兽保佑
+#                  永无BUG!
+*/
+package com.customs.cq.datacenter.business.controller;
+
+import com.customs.cq.datacenter.business.domain.vo.PolicyPublishVO;
+import com.customs.cq.datacenter.business.entity.request.policypublish.ReqCreatePolicyPublish;
+import com.customs.cq.datacenter.business.entity.request.policypublish.ReqModifyPolicyPublish;
+import com.customs.cq.datacenter.business.entity.search.SearchPolicyPublish;
+import com.customs.cq.datacenter.business.service.PolicyPublishService;
+import com.customs.cq.datacenter.common.ExecutedResult;
+import com.customs.cq.datacenter.common.PagerResult;
+import com.customs.cq.datacenter.common.annotation.Log;
+import com.customs.cq.datacenter.common.constant.Constants;
+import com.customs.cq.datacenter.common.core.controller.BasicController;
+import com.customs.cq.datacenter.common.enums.BusinessType;
+import com.customs.cq.datacenter.common.model.ReqListId;
+import com.customs.cq.datacenter.common.utils.ParameterUtil;
+import com.customs.cq.datacenter.common.validator.ParameterValidateResult;
+import com.customs.cq.datacenter.common.validator.ParameterValidator;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.*;
+
+import java.util.List;
+
+/**
+ * 20.政策法规发布信息
+ * @author lin.liu
+ * @description 20.政策法规发布信息
+ * @order 20
+ */
+@RestController
+@RequestMapping(value = "policy")
+public class PolicyPublishController extends BasicController {
+    @Autowired
+    private PolicyPublishService service;
+
+    /**
+     * 发布政策法规信息
+     * @author lin.liu
+     * @description 发布政策法规信息
+     */
+    @Log(title = "政策法规发布", businessType = BusinessType.INSERT)
+    @PostMapping(value = "publish")
+    public ExecutedResult<Long> publish(@RequestBody ReqCreatePolicyPublish request) {
+        //#region 参数验证
+        ParameterValidator validator = new ParameterValidator()
+                // 必须大于0
+                .addGreater(ParameterUtil.named("分类id"), request.getCategoryId(), 0L)
+                // 非空
+                .addNotNullOrEmpty(ParameterUtil.named("标题"), request.getTitle())
+                // 限制最大长度
+                .addLengthMax(ParameterUtil.named("标题"), request.getTitle(), Constants.LENGTH_MAX100)
+                // 非空
+                .addNotNullOrEmpty(ParameterUtil.named("政策文件路径"), request.getFilePath())
+                // 限制最大长度
+                .addLengthMax(ParameterUtil.named("政策文件路径"), request.getFilePath(), Constants.LENGTH_MAX200)
+                // 限制最大长度
+                .addLengthMax(ParameterUtil.named("政策文件路径(pdf)"), request.getFilePdfPath(), Constants.LENGTH_MAX200)
+                // 限制最大长度
+                .addLengthMax(ParameterUtil.named("备注"), request.getRemark(), Constants.LENGTH_MAX500)
+                ;
+        ParameterValidateResult result = validator.validate();
+        if (result.getIsFiled()) {
+            return failed(result.getErrorMsg());
+        }
+        //#endregion
+        return this.service.create(request);
+    }
+
+    /**
+     * 编辑[政策法规发布信息]
+     * @author lin.liu
+     * @description 编辑[政策法规发布信息]
+     */
+    @Log(title = "政策法规发布", businessType = BusinessType.UPDATE)
+    @PostMapping(value = "modify")
+    public ExecutedResult<String> modify(@RequestBody ReqModifyPolicyPublish request) {
+        //#region 参数验证
+        ParameterValidator validator = new ParameterValidator()
+                // 必须大于0
+                .addGreater(ParameterUtil.named("发布id"), request.getId(), 0L)
+                // 必须大于0
+                .addGreater(ParameterUtil.named("分类id"), request.getCategoryId(), 0L)
+                // 非空
+                .addNotNullOrEmpty(ParameterUtil.named("标题"), request.getTitle())
+                // 限制最大长度
+                .addLengthMax(ParameterUtil.named("标题"), request.getTitle(), Constants.LENGTH_MAX100)
+                // 非空
+                .addNotNullOrEmpty(ParameterUtil.named("政策文件路径"), request.getFilePath())
+                // 限制最大长度
+                .addLengthMax(ParameterUtil.named("政策文件路径"), request.getFilePath(), Constants.LENGTH_MAX200)
+                // 限制最大长度
+                .addLengthMax(ParameterUtil.named("政策文件路径(pdf)"), request.getFilePdfPath(), Constants.LENGTH_MAX200)
+                // 限制最大长度
+                .addLengthMax(ParameterUtil.named("备注"), request.getRemark(), Constants.LENGTH_MAX500)
+                ;
+        ParameterValidateResult result = validator.validate();
+        if (result.getIsFiled()) {
+            return failed(result.getErrorMsg());
+        }
+        //#endregion
+        return this.service.modify(request);
+    }
+
+    /**
+     * 获取[政策法规发布信息]
+     * @author lin.liu
+     * @description 获取[政策法规发布信息]
+     */
+    @GetMapping(value = "get/{id}")
+    public ExecutedResult<PolicyPublishVO> get(@PathVariable Long id) {
+        return this.service.get(id);
+    }
+
+    /**
+     * 根据id批量获取[政策法规发布信息]
+     * @author lin.liu
+     * @description 根据id批量获取[政策法规发布信息]
+     */
+    @PostMapping(value = "getList")
+    public ExecutedResult<List<PolicyPublishVO>> getList(@RequestBody ReqListId request) {
+        return this.service.getList(request.getListId());
+    }
+
+    /**
+     * 查询[政策法规发布信息]
+     * @author lin.liu
+     * @description 查询[政策法规发布信息]
+     */
+    @PostMapping(value = "search")
+    public ExecutedResult<PagerResult<PolicyPublishVO>> search(@RequestBody SearchPolicyPublish request) {
+        return this.service.search(request);
+    }
+}

+ 63 - 0
secure-producting-business/src/main/java/com/customs/cq/datacenter/business/domain/PolicyCategoryPO.java

@@ -0,0 +1,63 @@
+/**
+#                                                    __----~~~~~~~~~~~------___
+#                                   .  .   ~~//====......          __--~ ~~
+#                   -.            \_|//     |||\\  ~~~~~~::::... /~
+#                ___-==_       _-~o~  \/    |||  \\            _/~~-
+#        __---~~~.==~||\=_    -_--~/_-~|-   |\\   \\        _/~
+#    _-~~     .=~    |  \\-_    '-~7  /-   /  ||    \      /
+#  .~       .~       |   \\ -_    /  /-   /   ||      \   /
+# /  ____  /         |     \\ ~-_/  /|- _/   .||       \ /
+# |~~    ~~|--~~~~--_ \     ~==-/   | \~--===~~        .\
+#          '         ~-|      /|    |-~\~~       __--~~
+#                      |-~~-_/ |    |   ~\_   _-~            /\
+#                           /  \     \__   \/~                \__
+#                       _--~ _/ | .-~~____--~-/                  ~~==.
+#                      ((->/~   '.|||' -_|    ~~-/ ,              . _||
+#                                 -_     ~\      ~~---l__i__i__i--~~_/
+#                                 _-~-__   ~)  \--______________--~~
+#                               //.-~~~-~_--~- |-------~~~~~~~~
+#                                      //.-~~~--\
+#                  神兽保佑
+#                  永无BUG!
+*/
+package com.customs.cq.datacenter.business.domain;
+
+import lombok.Data;
+
+import com.baomidou.mybatisplus.annotation.*;
+import java.sql.Timestamp;
+import java.time.LocalDate;
+
+/**
+ * 政策法规分类
+ * @author lin.liu
+ * @description 政策法规分类
+ */
+@Data
+@TableName("SP_POLICY_CATEGORY")
+public class PolicyCategoryPO {
+	/**
+	 * 主键
+	 */
+	private Long id;
+	/**
+	 * 分类名称
+	 */
+	private String categoryName;
+	/**
+	 * 描述
+	 */
+	private String remark;
+	/**
+	 * 数据创建时间
+	 */
+	private Long createTime;
+	/**
+	 * 最后更新时间
+	 */
+	private Timestamp updateTime;
+	/**
+	 * 是否删除(逻辑删除)
+	 */
+	private Integer isDelete;
+}

+ 95 - 0
secure-producting-business/src/main/java/com/customs/cq/datacenter/business/domain/PolicyPublishPO.java

@@ -0,0 +1,95 @@
+/**
+#                                                    __----~~~~~~~~~~~------___
+#                                   .  .   ~~//====......          __--~ ~~
+#                   -.            \_|//     |||\\  ~~~~~~::::... /~
+#                ___-==_       _-~o~  \/    |||  \\            _/~~-
+#        __---~~~.==~||\=_    -_--~/_-~|-   |\\   \\        _/~
+#    _-~~     .=~    |  \\-_    '-~7  /-   /  ||    \      /
+#  .~       .~       |   \\ -_    /  /-   /   ||      \   /
+# /  ____  /         |     \\ ~-_/  /|- _/   .||       \ /
+# |~~    ~~|--~~~~--_ \     ~==-/   | \~--===~~        .\
+#          '         ~-|      /|    |-~\~~       __--~~
+#                      |-~~-_/ |    |   ~\_   _-~            /\
+#                           /  \     \__   \/~                \__
+#                       _--~ _/ | .-~~____--~-/                  ~~==.
+#                      ((->/~   '.|||' -_|    ~~-/ ,              . _||
+#                                 -_     ~\      ~~---l__i__i__i--~~_/
+#                                 _-~-__   ~)  \--______________--~~
+#                               //.-~~~-~_--~- |-------~~~~~~~~
+#                                      //.-~~~--\
+#                  神兽保佑
+#                  永无BUG!
+*/
+package com.customs.cq.datacenter.business.domain;
+
+import lombok.Data;
+
+import com.baomidou.mybatisplus.annotation.*;
+import java.sql.Timestamp;
+import java.time.LocalDate;
+
+/**
+ * 政策法规发布信息
+ * @author lin.liu
+ * @description 政策法规发布信息
+ */
+@Data
+@TableName("SP_POLICY_PUBLISH")
+public class PolicyPublishPO {
+	/**
+	 * 主键
+	 */
+	private Long id;
+	/**
+	 * 所属分类
+	 */
+	private Long categoryId;
+	/**
+	 * 所属分类名称
+	 */
+	private String categoryName;
+	/**
+	 * 标题
+	 */
+	private String title;
+	/**
+	 * 政策文件转pdf路径
+	 */
+	private String filePath;
+	/**
+	 * 
+	 */
+	private String filePdfPath;
+	/**
+	 * 备注
+	 */
+	private String remark;
+	/**
+	 * 数据创建时间
+	 */
+	private Long createTime;
+	/**
+	 * 最后更新时间
+	 */
+	private Timestamp updateTime;
+	/**
+	 * 数据创建人
+	 */
+	private String createBy;
+	/**
+	 * 数据创建人名称
+	 */
+	private String createByName;
+	/**
+	 * 最后更新人
+	 */
+	private String updateBy;
+	/**
+	 * 最后更新人名称
+	 */
+	private String updateByName;
+	/**
+	 * 是否删除(逻辑删除)
+	 */
+	private Integer isDelete;
+}

+ 57 - 0
secure-producting-business/src/main/java/com/customs/cq/datacenter/business/domain/vo/PolicyCategoryVO.java

@@ -0,0 +1,57 @@
+/**
+#                                                    __----~~~~~~~~~~~------___
+#                                   .  .   ~~//====......          __--~ ~~
+#                   -.            \_|//     |||\\  ~~~~~~::::... /~
+#                ___-==_       _-~o~  \/    |||  \\            _/~~-
+#        __---~~~.==~||\=_    -_--~/_-~|-   |\\   \\        _/~
+#    _-~~     .=~    |  \\-_    '-~7  /-   /  ||    \      /
+#  .~       .~       |   \\ -_    /  /-   /   ||      \   /
+# /  ____  /         |     \\ ~-_/  /|- _/   .||       \ /
+# |~~    ~~|--~~~~--_ \     ~==-/   | \~--===~~        .\
+#          '         ~-|      /|    |-~\~~       __--~~
+#                      |-~~-_/ |    |   ~\_   _-~            /\
+#                           /  \     \__   \/~                \__
+#                       _--~ _/ | .-~~____--~-/                  ~~==.
+#                      ((->/~   '.|||' -_|    ~~-/ ,              . _||
+#                                 -_     ~\      ~~---l__i__i__i--~~_/
+#                                 _-~-__   ~)  \--______________--~~
+#                               //.-~~~-~_--~- |-------~~~~~~~~
+#                                      //.-~~~--\
+#                  神兽保佑
+#                  永无BUG!
+*/
+package com.customs.cq.datacenter.business.domain.vo;
+
+import lombok.Data;
+
+import com.customs.cq.datacenter.common.utils.LocalDateTimeUtil;
+import com.customs.cq.datacenter.common.utils.NumericUtil;
+import java.util.Objects;
+
+import com.customs.cq.datacenter.common.core.vo.BasicVO;
+import com.customs.cq.datacenter.business.domain.PolicyCategoryPO;
+
+/**
+ * 政策法规分类
+ * @author lin.liu
+ * @description 政策法规分类
+ */
+@Data
+public class PolicyCategoryVO extends PolicyCategoryPO implements BasicVO {
+
+    @Override
+    public String getCreateTimeView() {
+        if (NumericUtil.tryParseLong(this.getCreateTime()).compareTo(0L) > 0) {
+            return LocalDateTimeUtil.toFormatString(this.getCreateTime());
+        }
+        return "";
+    }
+
+    @Override
+    public String getUpdateTimeView() {
+        if (Objects.isNull(this.getUpdateTime())) {
+            return "";
+        }
+        return LocalDateTimeUtil.toFormatFullString(this.getUpdateTime());
+    }
+}

+ 57 - 0
secure-producting-business/src/main/java/com/customs/cq/datacenter/business/domain/vo/PolicyPublishVO.java

@@ -0,0 +1,57 @@
+/**
+#                                                    __----~~~~~~~~~~~------___
+#                                   .  .   ~~//====......          __--~ ~~
+#                   -.            \_|//     |||\\  ~~~~~~::::... /~
+#                ___-==_       _-~o~  \/    |||  \\            _/~~-
+#        __---~~~.==~||\=_    -_--~/_-~|-   |\\   \\        _/~
+#    _-~~     .=~    |  \\-_    '-~7  /-   /  ||    \      /
+#  .~       .~       |   \\ -_    /  /-   /   ||      \   /
+# /  ____  /         |     \\ ~-_/  /|- _/   .||       \ /
+# |~~    ~~|--~~~~--_ \     ~==-/   | \~--===~~        .\
+#          '         ~-|      /|    |-~\~~       __--~~
+#                      |-~~-_/ |    |   ~\_   _-~            /\
+#                           /  \     \__   \/~                \__
+#                       _--~ _/ | .-~~____--~-/                  ~~==.
+#                      ((->/~   '.|||' -_|    ~~-/ ,              . _||
+#                                 -_     ~\      ~~---l__i__i__i--~~_/
+#                                 _-~-__   ~)  \--______________--~~
+#                               //.-~~~-~_--~- |-------~~~~~~~~
+#                                      //.-~~~--\
+#                  神兽保佑
+#                  永无BUG!
+*/
+package com.customs.cq.datacenter.business.domain.vo;
+
+import lombok.Data;
+
+import com.customs.cq.datacenter.common.utils.LocalDateTimeUtil;
+import com.customs.cq.datacenter.common.utils.NumericUtil;
+import java.util.Objects;
+
+import com.customs.cq.datacenter.common.core.vo.BasicVO;
+import com.customs.cq.datacenter.business.domain.PolicyPublishPO;
+
+/**
+ * 政策法规发布信息
+ * @author lin.liu
+ * @description 政策法规发布信息
+ */
+@Data
+public class PolicyPublishVO extends PolicyPublishPO implements BasicVO {
+
+    @Override
+    public String getCreateTimeView() {
+        if (NumericUtil.tryParseLong(this.getCreateTime()).compareTo(0L) > 0) {
+            return LocalDateTimeUtil.toFormatString(this.getCreateTime());
+        }
+        return "";
+    }
+
+    @Override
+    public String getUpdateTimeView() {
+        if (Objects.isNull(this.getUpdateTime())) {
+            return "";
+        }
+        return LocalDateTimeUtil.toFormatFullString(this.getUpdateTime());
+    }
+}

+ 43 - 0
secure-producting-business/src/main/java/com/customs/cq/datacenter/business/entity/request/policycategory/ReqCreatePolicyCategory.java

@@ -0,0 +1,43 @@
+/**
+#                                                    __----~~~~~~~~~~~------___
+#                                   .  .   ~~//====......          __--~ ~~
+#                   -.            \_|//     |||\\  ~~~~~~::::... /~
+#                ___-==_       _-~o~  \/    |||  \\            _/~~-
+#        __---~~~.==~||\=_    -_--~/_-~|-   |\\   \\        _/~
+#    _-~~     .=~    |  \\-_    '-~7  /-   /  ||    \      /
+#  .~       .~       |   \\ -_    /  /-   /   ||      \   /
+# /  ____  /         |     \\ ~-_/  /|- _/   .||       \ /
+# |~~    ~~|--~~~~--_ \     ~==-/   | \~--===~~        .\
+#          '         ~-|      /|    |-~\~~       __--~~
+#                      |-~~-_/ |    |   ~\_   _-~            /\
+#                           /  \     \__   \/~                \__
+#                       _--~ _/ | .-~~____--~-/                  ~~==.
+#                      ((->/~   '.|||' -_|    ~~-/ ,              . _||
+#                                 -_     ~\      ~~---l__i__i__i--~~_/
+#                                 _-~-__   ~)  \--______________--~~
+#                               //.-~~~-~_--~- |-------~~~~~~~~
+#                                      //.-~~~--\
+#                  神兽保佑
+#                  永无BUG!
+*/
+package com.customs.cq.datacenter.business.entity.request.policycategory;
+
+import lombok.Data;
+import java.time.LocalDate;
+
+/**
+ * 政策法规分类
+ * @author lin.liu
+ * @description 政策法规分类
+ */
+@Data
+public class ReqCreatePolicyCategory {
+	/**
+	 * 分类名称
+	 */
+	private String categoryName;
+	/**
+	 * 描述
+	 */
+	private String remark;
+}

+ 47 - 0
secure-producting-business/src/main/java/com/customs/cq/datacenter/business/entity/request/policycategory/ReqModifyPolicyCategory.java

@@ -0,0 +1,47 @@
+/**
+#                                                    __----~~~~~~~~~~~------___
+#                                   .  .   ~~//====......          __--~ ~~
+#                   -.            \_|//     |||\\  ~~~~~~::::... /~
+#                ___-==_       _-~o~  \/    |||  \\            _/~~-
+#        __---~~~.==~||\=_    -_--~/_-~|-   |\\   \\        _/~
+#    _-~~     .=~    |  \\-_    '-~7  /-   /  ||    \      /
+#  .~       .~       |   \\ -_    /  /-   /   ||      \   /
+# /  ____  /         |     \\ ~-_/  /|- _/   .||       \ /
+# |~~    ~~|--~~~~--_ \     ~==-/   | \~--===~~        .\
+#          '         ~-|      /|    |-~\~~       __--~~
+#                      |-~~-_/ |    |   ~\_   _-~            /\
+#                           /  \     \__   \/~                \__
+#                       _--~ _/ | .-~~____--~-/                  ~~==.
+#                      ((->/~   '.|||' -_|    ~~-/ ,              . _||
+#                                 -_     ~\      ~~---l__i__i__i--~~_/
+#                                 _-~-__   ~)  \--______________--~~
+#                               //.-~~~-~_--~- |-------~~~~~~~~
+#                                      //.-~~~--\
+#                  神兽保佑
+#                  永无BUG!
+*/
+package com.customs.cq.datacenter.business.entity.request.policycategory;
+
+import lombok.Data;
+import java.time.LocalDate;
+
+/**
+ * 政策法规分类
+ * @author lin.liu
+ * @description 政策法规分类
+ */
+@Data
+public class ReqModifyPolicyCategory {
+	/**
+	 * 主键
+	 */
+	private Long id;
+	/**
+	 * 分类名称
+	 */
+	private String categoryName;
+	/**
+	 * 描述
+	 */
+	private String remark;
+}

+ 58 - 0
secure-producting-business/src/main/java/com/customs/cq/datacenter/business/entity/request/policypublish/ReqCreatePolicyPublish.java

@@ -0,0 +1,58 @@
+/**
+#                                                    __----~~~~~~~~~~~------___
+#                                   .  .   ~~//====......          __--~ ~~
+#                   -.            \_|//     |||\\  ~~~~~~::::... /~
+#                ___-==_       _-~o~  \/    |||  \\            _/~~-
+#        __---~~~.==~||\=_    -_--~/_-~|-   |\\   \\        _/~
+#    _-~~     .=~    |  \\-_    '-~7  /-   /  ||    \      /
+#  .~       .~       |   \\ -_    /  /-   /   ||      \   /
+# /  ____  /         |     \\ ~-_/  /|- _/   .||       \ /
+# |~~    ~~|--~~~~--_ \     ~==-/   | \~--===~~        .\
+#          '         ~-|      /|    |-~\~~       __--~~
+#                      |-~~-_/ |    |   ~\_   _-~            /\
+#                           /  \     \__   \/~                \__
+#                       _--~ _/ | .-~~____--~-/                  ~~==.
+#                      ((->/~   '.|||' -_|    ~~-/ ,              . _||
+#                                 -_     ~\      ~~---l__i__i__i--~~_/
+#                                 _-~-__   ~)  \--______________--~~
+#                               //.-~~~-~_--~- |-------~~~~~~~~
+#                                      //.-~~~--\
+#                  神兽保佑
+#                  永无BUG!
+*/
+package com.customs.cq.datacenter.business.entity.request.policypublish;
+
+import lombok.Data;
+import java.time.LocalDate;
+
+/**
+ * 政策法规发布信息
+ * @author lin.liu
+ * @description 政策法规发布信息
+ */
+@Data
+public class ReqCreatePolicyPublish {
+	/**
+	 * 政策法规分类id
+	 * @required
+	 */
+	private Long categoryId;
+	/**
+	 * 标题
+	 * @required
+	 */
+	private String title;
+	/**
+	 * 政策文件路径
+	 * @required
+	 */
+	private String filePath;
+	/**
+	 * 政策文件路径(pdf)
+	 */
+	private String filePdfPath;
+	/**
+	 * 备注
+	 */
+	private String remark;
+}

+ 63 - 0
secure-producting-business/src/main/java/com/customs/cq/datacenter/business/entity/request/policypublish/ReqModifyPolicyPublish.java

@@ -0,0 +1,63 @@
+/**
+#                                                    __----~~~~~~~~~~~------___
+#                                   .  .   ~~//====......          __--~ ~~
+#                   -.            \_|//     |||\\  ~~~~~~::::... /~
+#                ___-==_       _-~o~  \/    |||  \\            _/~~-
+#        __---~~~.==~||\=_    -_--~/_-~|-   |\\   \\        _/~
+#    _-~~     .=~    |  \\-_    '-~7  /-   /  ||    \      /
+#  .~       .~       |   \\ -_    /  /-   /   ||      \   /
+# /  ____  /         |     \\ ~-_/  /|- _/   .||       \ /
+# |~~    ~~|--~~~~--_ \     ~==-/   | \~--===~~        .\
+#          '         ~-|      /|    |-~\~~       __--~~
+#                      |-~~-_/ |    |   ~\_   _-~            /\
+#                           /  \     \__   \/~                \__
+#                       _--~ _/ | .-~~____--~-/                  ~~==.
+#                      ((->/~   '.|||' -_|    ~~-/ ,              . _||
+#                                 -_     ~\      ~~---l__i__i__i--~~_/
+#                                 _-~-__   ~)  \--______________--~~
+#                               //.-~~~-~_--~- |-------~~~~~~~~
+#                                      //.-~~~--\
+#                  神兽保佑
+#                  永无BUG!
+*/
+package com.customs.cq.datacenter.business.entity.request.policypublish;
+
+import lombok.Data;
+import java.time.LocalDate;
+
+/**
+ * 政策法规发布信息
+ * @author lin.liu
+ * @description 政策法规发布信息
+ */
+@Data
+public class ReqModifyPolicyPublish {
+	/**
+	 * 发布id
+	 * @required
+	 */
+	private Long id;
+	/**
+	 * 分类名称
+	 * @required
+	 */
+	private Long categoryId;
+	/**
+	 * 标题
+	 * @required
+	 */
+	private String title;
+	/**
+	 * 政策文件路径
+	 * @required
+	 */
+	private String filePath;
+	/**
+	 * 政策文件路径(pdf)
+	 */
+	private String filePdfPath;
+	/**
+	 * 备注
+	 */
+	private String remark;
+}

+ 23 - 0
secure-producting-business/src/main/java/com/customs/cq/datacenter/business/entity/search/SearchPolicyCategory.java

@@ -0,0 +1,23 @@
+package com.customs.cq.datacenter.business.entity.search;
+
+import com.customs.cq.datacenter.common.model.SearchBasicDTO;
+
+/**
+ * 政策法规分类
+ * @author lin.liu
+ * @description 政策法规分类
+ */
+public class SearchPolicyCategory extends SearchBasicDTO {
+	@Override
+	public String toString() {
+		return "SearchPolicyCategory{" + "'" +
+			"keywords='" + getKeywords() +
+			", status =" + getStatus() +
+			", listStatus =" + getListStatus() +
+			", createTimeRange='" + getCreateTimeRange() + "'" +
+			", createTimeStart =" + getCreateTimeEnd() +
+			", createTimeEnd =" + getCreateTimeEnd() +
+			", orderBy='" + getOrderBy() + "'" +
+		'}';
+	}
+}

+ 32 - 0
secure-producting-business/src/main/java/com/customs/cq/datacenter/business/entity/search/SearchPolicyPublish.java

@@ -0,0 +1,32 @@
+package com.customs.cq.datacenter.business.entity.search;
+
+import com.customs.cq.datacenter.common.model.SearchBasicDTO;
+import lombok.Data;
+
+import java.util.List;
+
+/**
+ * 政策法规发布信息
+ * @author lin.liu
+ * @description 政策法规发布信息
+ */
+@Data
+public class SearchPolicyPublish extends SearchBasicDTO {
+	/**
+	 * 所属分类
+	 */
+	private List<Long> listCategory;
+
+	@Override
+	public String toString() {
+		return "SearchPolicyPublish{" + "'" +
+			"keywords='" + getKeywords() +
+			", status =" + getStatus() +
+			", listStatus =" + getListStatus() +
+			", createTimeRange='" + getCreateTimeRange() + "'" +
+			", createTimeStart =" + getCreateTimeEnd() +
+			", createTimeEnd =" + getCreateTimeEnd() +
+			", orderBy='" + getOrderBy() + "'" +
+		'}';
+	}
+}

+ 14 - 0
secure-producting-business/src/main/java/com/customs/cq/datacenter/business/mapper/PolicyCategoryMapper.java

@@ -0,0 +1,14 @@
+package com.customs.cq.datacenter.business.mapper;
+
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import org.apache.ibatis.annotations.Mapper;
+import com.customs.cq.datacenter.business.domain.PolicyCategoryPO;
+
+/**
+ * 政策法规分类
+ * @author lin.liu
+ * @description 政策法规分类
+ */
+@Mapper
+public interface PolicyCategoryMapper extends BaseMapper<PolicyCategoryPO> {
+}

+ 14 - 0
secure-producting-business/src/main/java/com/customs/cq/datacenter/business/mapper/PolicyPublishMapper.java

@@ -0,0 +1,14 @@
+package com.customs.cq.datacenter.business.mapper;
+
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import org.apache.ibatis.annotations.Mapper;
+import com.customs.cq.datacenter.business.domain.PolicyPublishPO;
+
+/**
+ * 政策法规发布信息
+ * @author lin.liu
+ * @description 政策法规发布信息
+ */
+@Mapper
+public interface PolicyPublishMapper extends BaseMapper<PolicyPublishPO> {
+}

+ 117 - 0
secure-producting-business/src/main/java/com/customs/cq/datacenter/business/mapper/impl/PolicyCategoryMapperImpl.java

@@ -0,0 +1,117 @@
+package com.customs.cq.datacenter.business.mapper.impl;
+
+import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
+import com.baomidou.mybatisplus.core.metadata.IPage;
+import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
+import com.customs.cq.datacenter.common.enums.EOrderBy;
+import com.customs.cq.datacenter.common.enums.EYesOrNo;
+import com.customs.cq.datacenter.common.model.NameValueDto;
+import com.customs.cq.datacenter.common.utils.ListUtil;
+import com.customs.cq.datacenter.common.utils.NumericUtil;
+import com.customs.cq.datacenter.common.core.mapper.BasicMapper;
+import com.customs.cq.datacenter.common.model.OrderByDTO;
+import com.customs.cq.datacenter.common.model.SearchBasicDTO;
+import com.customs.cq.datacenter.common.utils.StringUtil;
+import org.springframework.stereotype.Repository;
+import com.customs.cq.datacenter.business.entity.search.SearchPolicyCategory;
+import com.customs.cq.datacenter.business.domain.PolicyCategoryPO;
+import com.customs.cq.datacenter.business.mapper.PolicyCategoryMapper;
+
+import java.util.ArrayList;
+import java.util.List;
+import java.util.stream.Collectors;
+
+/**
+ * 政策法规分类
+ * @author lin.liu
+ * @description 政策法规分类
+ */
+@Repository
+public class PolicyCategoryMapperImpl extends BasicMapper<PolicyCategoryPO> {
+    public PolicyCategoryMapperImpl(PolicyCategoryMapper mapper) {
+        super(mapper);
+    }
+
+    /**
+     * 分页查询
+     *
+     * @param request 请求参数
+     */
+    @Override
+    public IPage<PolicyCategoryPO> search(SearchBasicDTO request) {
+        // 查询条件类型还原
+        SearchPolicyCategory search = (SearchPolicyCategory)request;
+
+        LambdaQueryWrapper<PolicyCategoryPO> queryWrapper = this.getQuery();
+        // 状态非逻辑删除
+        queryWrapper.eq(PolicyCategoryPO::getIsDelete, EYesOrNo.NO.getValue());
+        // 状态
+        //queryWrapper.eq(NumericUtil.tryParseInt(search.getStatus()).compareTo(0) > 0, PolicyCategoryPO::getState, search.getStatus());
+        // 状态列表
+        //queryWrapper.in(ListUtil.isNotNullOrEmpty(search.getListStatus()), PolicyCategoryPO::getState, search.getListStatus());
+        // 数据创建时间-起始
+        queryWrapper.ge(NumericUtil.tryParseLong(search.getCreateTimeStart()).compareTo(0L) > 0, PolicyCategoryPO::getCreateTime, search.getCreateTimeStart());
+        // 数据创建时间-截止
+        queryWrapper.le(NumericUtil.tryParseLong(search.getCreateTimeEnd()).compareTo(0L) > 0, PolicyCategoryPO::getCreateTime, search.getCreateTimeEnd());
+        // 关键字
+        if (StringUtil.isNotNullOrEmpty(search.getKeywords())) {
+            queryWrapper.like(PolicyCategoryPO::getCategoryName, search.getKeywords());
+        }
+        // 排序处理
+        if (ListUtil.isNotNullOrEmpty(search.getOrderBy())) {
+            for (OrderByDTO item : search.getOrderBy()) {
+                EOrderBy orderBy = EOrderBy.getByValue(item.getOrderBy());
+                // 顺序排序
+                if (item.getIsAsc()) {
+                    switch (orderBy) {
+                        // 主键
+                        case ID:
+                            queryWrapper.orderByAsc(PolicyCategoryPO::getId);
+                            break;
+                        // 数据创建时间
+                        case CREATE_TIME:
+                            queryWrapper.orderByAsc(PolicyCategoryPO::getCreateTime);
+                            break;
+                        // 最后更新时间
+                        case UPDATE_TIME:
+                            queryWrapper.orderByAsc(PolicyCategoryPO::getUpdateTime);
+                            break;
+                    }
+                } else {
+                    // 倒叙排序
+                    switch (orderBy) {
+                        // 主键
+                        case ID:
+                            queryWrapper.orderByAsc(PolicyCategoryPO::getId);
+                            break;
+                        // 数据创建时间
+                        case CREATE_TIME:
+                            queryWrapper.orderByAsc(PolicyCategoryPO::getCreateTime);
+                            break;
+                        // 最后更新时间
+                        case UPDATE_TIME:
+                            queryWrapper.orderByAsc(PolicyCategoryPO::getUpdateTime);
+                            break;
+                    }
+                }
+            }
+        } else {
+            queryWrapper.orderByDesc(PolicyCategoryPO::getId);
+        }
+        return mapper.selectPage(new Page<>(search.getPage(), search.getLimit()), queryWrapper);
+    }
+
+    public List<NameValueDto> listAllSelect() {
+        List<String> listColumn = new ArrayList<>();
+        listColumn.add("id");
+        listColumn.add("category_name");
+
+        LambdaQueryWrapper<PolicyCategoryPO> queryWrapper = this.getQuery();
+        queryWrapper.select(PolicyCategoryPO.class, c -> listColumn.contains(c.getColumn()));
+        queryWrapper.eq(PolicyCategoryPO::getIsDelete, EYesOrNo.NO.getValue());
+        return mapper.selectList(queryWrapper)
+                .stream()
+                .map(c -> new NameValueDto(c.getCategoryName(), c.getId().toString()))
+                .collect(Collectors.toList());
+    }
+}

+ 103 - 0
secure-producting-business/src/main/java/com/customs/cq/datacenter/business/mapper/impl/PolicyPublishMapperImpl.java

@@ -0,0 +1,103 @@
+package com.customs.cq.datacenter.business.mapper.impl;
+
+import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
+import com.baomidou.mybatisplus.core.metadata.IPage;
+import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
+import com.customs.cq.datacenter.common.enums.EOrderBy;
+import com.customs.cq.datacenter.common.enums.EYesOrNo;
+import com.customs.cq.datacenter.common.utils.ListUtil;
+import com.customs.cq.datacenter.common.utils.NumericUtil;
+import com.customs.cq.datacenter.common.core.mapper.BasicMapper;
+import com.customs.cq.datacenter.common.model.OrderByDTO;
+import com.customs.cq.datacenter.common.model.SearchBasicDTO;
+import com.customs.cq.datacenter.common.utils.StringUtil;
+import org.springframework.stereotype.Repository;
+import com.customs.cq.datacenter.business.entity.search.SearchPolicyPublish;
+import com.customs.cq.datacenter.business.domain.PolicyPublishPO;
+import com.customs.cq.datacenter.business.mapper.PolicyPublishMapper;
+
+/**
+ * 政策法规发布信息
+ * @author lin.liu
+ * @description 政策法规发布信息
+ */
+@Repository
+public class PolicyPublishMapperImpl extends BasicMapper<PolicyPublishPO> {
+    public PolicyPublishMapperImpl(PolicyPublishMapper mapper) {
+        super(mapper);
+    }
+
+    /**
+     * 分页查询
+     *
+     * @param request 请求参数
+     */
+    @Override
+    public IPage<PolicyPublishPO> search(SearchBasicDTO request) {
+        // 查询条件类型还原
+        SearchPolicyPublish search = (SearchPolicyPublish)request;
+
+        LambdaQueryWrapper<PolicyPublishPO> queryWrapper = this.getQuery();
+        // 状态非逻辑删除
+        queryWrapper.eq(PolicyPublishPO::getIsDelete, EYesOrNo.NO.getValue());
+        // 状态
+        //queryWrapper.eq(NumericUtil.tryParseInt(search.getStatus()).compareTo(0) > 0, PolicyPublishPO::getState, search.getStatus());
+        // 状态列表
+        //queryWrapper.in(ListUtil.isNotNullOrEmpty(search.getListStatus()), PolicyPublishPO::getState, search.getListStatus());
+        // 数据创建时间-起始
+        queryWrapper.ge(NumericUtil.tryParseLong(search.getCreateTimeStart()).compareTo(0L) > 0, PolicyPublishPO::getCreateTime, search.getCreateTimeStart());
+        // 数据创建时间-截止
+        queryWrapper.le(NumericUtil.tryParseLong(search.getCreateTimeEnd()).compareTo(0L) > 0, PolicyPublishPO::getCreateTime, search.getCreateTimeEnd());
+        // 分类列表
+        queryWrapper.eq(ListUtil.isNotNullOrEmpty(search.getListCategory()), PolicyPublishPO::getCategoryId, search.getListCategory());
+        // 关键字
+        if (StringUtil.isNotNullOrEmpty(search.getKeywords())) {
+            queryWrapper.and(q ->
+                    q.like(PolicyPublishPO::getTitle, search.getKeywords())
+                            .or().like(PolicyPublishPO::getCategoryName, search.getKeywords())
+            );
+        }
+        // 排序处理
+        if (ListUtil.isNotNullOrEmpty(search.getOrderBy())) {
+            for (OrderByDTO item : search.getOrderBy()) {
+                EOrderBy orderBy = EOrderBy.getByValue(item.getOrderBy());
+                // 顺序排序
+                if (item.getIsAsc()) {
+                    switch (orderBy) {
+                        // 主键
+                        case ID:
+                            queryWrapper.orderByAsc(PolicyPublishPO::getId);
+                            break;
+                        // 数据创建时间
+                        case CREATE_TIME:
+                            queryWrapper.orderByAsc(PolicyPublishPO::getCreateTime);
+                            break;
+                        // 最后更新时间
+                        case UPDATE_TIME:
+                            queryWrapper.orderByAsc(PolicyPublishPO::getUpdateTime);
+                            break;
+                    }
+                } else {
+                    // 倒叙排序
+                    switch (orderBy) {
+                        // 主键
+                        case ID:
+                            queryWrapper.orderByAsc(PolicyPublishPO::getId);
+                            break;
+                        // 数据创建时间
+                        case CREATE_TIME:
+                            queryWrapper.orderByAsc(PolicyPublishPO::getCreateTime);
+                            break;
+                        // 最后更新时间
+                        case UPDATE_TIME:
+                            queryWrapper.orderByAsc(PolicyPublishPO::getUpdateTime);
+                            break;
+                    }
+                }
+            }
+        } else {
+            queryWrapper.orderByDesc(PolicyPublishPO::getId);
+        }
+        return mapper.selectPage(new Page<>(search.getPage(), search.getLimit()), queryWrapper);
+    }
+}

+ 144 - 0
secure-producting-business/src/main/java/com/customs/cq/datacenter/business/service/PolicyCategoryService.java

@@ -0,0 +1,144 @@
+/**
+#                                                    __----~~~~~~~~~~~------___
+#                                   .  .   ~~//====......          __--~ ~~
+#                   -.            \_|//     |||\\  ~~~~~~::::... /~
+#                ___-==_       _-~o~  \/    |||  \\            _/~~-
+#        __---~~~.==~||\=_    -_--~/_-~|-   |\\   \\        _/~
+#    _-~~     .=~    |  \\-_    '-~7  /-   /  ||    \      /
+#  .~       .~       |   \\ -_    /  /-   /   ||      \   /
+# /  ____  /         |     \\ ~-_/  /|- _/   .||       \ /
+# |~~    ~~|--~~~~--_ \     ~==-/   | \~--===~~        .\
+#          '         ~-|      /|    |-~\~~       __--~~
+#                      |-~~-_/ |    |   ~\_   _-~            /\
+#                           /  \     \__   \/~                \__
+#                       _--~ _/ | .-~~____--~-/                  ~~==.
+#                      ((->/~   '.|||' -_|    ~~-/ ,              . _||
+#                                 -_     ~\      ~~---l__i__i__i--~~_/
+#                                 _-~-__   ~)  \--______________--~~
+#                               //.-~~~-~_--~- |-------~~~~~~~~
+#                                      //.-~~~--\
+#                  神兽保佑
+#                  永无BUG!
+*/
+package com.customs.cq.datacenter.business.service;
+
+import com.baomidou.mybatisplus.core.metadata.IPage;
+import com.customs.cq.datacenter.business.domain.PolicyCategoryPO;
+import com.customs.cq.datacenter.business.domain.vo.PolicyCategoryVO;
+import com.customs.cq.datacenter.business.entity.request.policycategory.ReqCreatePolicyCategory;
+import com.customs.cq.datacenter.business.entity.request.policycategory.ReqModifyPolicyCategory;
+import com.customs.cq.datacenter.business.entity.search.SearchPolicyCategory;
+import com.customs.cq.datacenter.business.mapper.impl.PolicyCategoryMapperImpl;
+import com.customs.cq.datacenter.common.ExecutedResult;
+import com.customs.cq.datacenter.common.PagerResult;
+import com.customs.cq.datacenter.common.core.service.BasicService;
+import com.customs.cq.datacenter.common.enums.EYesOrNo;
+import com.customs.cq.datacenter.common.model.NameValueDto;
+import com.customs.cq.datacenter.common.model.Tuple;
+import com.customs.cq.datacenter.common.utils.*;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+
+import java.util.ArrayList;
+import java.util.List;
+import java.util.Objects;
+
+/**
+ * 政策法规分类
+ * @author lin.liu
+ * @description 政策法规分类
+ */
+@Service
+public class PolicyCategoryService extends BasicService {
+    @Autowired
+    private PolicyCategoryMapperImpl dao;
+
+    public ExecutedResult<Long> create(ReqCreatePolicyCategory request) {
+        // 转换po
+        PolicyCategoryPO item = CopierUtil.mapTo(request, PolicyCategoryPO.class);
+        // 设置主键
+        item.setId(SnowFlakeUtil.getId());
+        // 设置状态
+        //item.setStatus(EState.NORMAL.getValue());
+        // 设置记录创建时间
+        item.setCreateTime(LocalDateTimeUtil.nowTimeStamp());
+        // 是否删除(逻辑删除)初始值
+        item.setIsDelete(EYesOrNo.NO.getValue());
+
+        int result = this.dao.insert(item);
+        if (result != 1) {
+            return ExecutedResult.failed("创建[政策法规分类]失败。");
+        }
+        return ExecutedResult.success(item.getId());
+    }
+
+    public ExecutedResult<String> modify(ReqModifyPolicyCategory request) {
+        // 验证记录是否存在
+        ExecutedResult<PolicyCategoryPO> checkExists = this.check4Id(request.getId());
+        if (checkExists.isFailed()) {
+            return ExecutedResult.failed(checkExists.getMsg());
+        }
+        // 转换po
+        PolicyCategoryPO item = CopierUtil.mapTo(request, PolicyCategoryPO.class);
+
+        int result = this.dao.updateById(item);
+        if (result != 1) {
+            return ExecutedResult.failed("编辑[政策法规分类]失败。");
+        }
+        return ExecutedResult.success();
+    }
+
+    public ExecutedResult<PolicyCategoryVO> get(Long id) {
+        PolicyCategoryVO result = new PolicyCategoryVO();
+
+        PolicyCategoryPO find = dao.selectById(id);
+        if (null != find) {
+            result = CopierUtil.mapTo(find, PolicyCategoryVO.class);
+        }
+        return ExecutedResult.success(result);
+    }
+
+    public ExecutedResult<List<PolicyCategoryVO>> getList(List<Long> listId) {
+        List<PolicyCategoryVO> result = new ArrayList<>();
+
+        List<PolicyCategoryPO> list = this.dao.selectBatchIds(listId);
+        if (ListUtil.isNotNullOrEmpty(list)) {
+            result = CopierUtil.mapTo(list, PolicyCategoryVO.class);
+        }
+        return ExecutedResult.success(result);
+    }
+
+    public ExecutedResult<PagerResult<PolicyCategoryVO>> search(SearchPolicyCategory search) {
+        // 处理创建时间范围-查询参数
+        Tuple<String, String> createTimeRange = ParameterUtil.getTimeRange(search.getCreateTimeRange());
+        if (StringUtil.isNotNullOrEmpty(createTimeRange.getItem1())) {
+            search.setCreateTimeStart(LocalDateTimeUtil.getTimeStamp(createTimeRange.getItem1()).getTime());
+        }
+        if (StringUtil.isNotNullOrEmpty(createTimeRange.getItem2())) {
+            search.setCreateTimeEnd(LocalDateTimeUtil.getTimeStamp(createTimeRange.getItem2()).getTime());
+        }
+
+        IPage<PolicyCategoryPO> pageList = dao.search(search);
+        List<PolicyCategoryVO> listVo = new ArrayList<>();
+        List<PolicyCategoryPO> list = pageList.getRecords();
+        if (ListUtil.isNotNullOrEmpty(list)) {
+            // 转换vo
+            listVo = CopierUtil.mapTo(list, PolicyCategoryVO.class);
+        }
+        PagerResult<PolicyCategoryVO> result = new PagerResult<>(pageList.getSize(), pageList.getCurrent(), pageList.getTotal(), listVo);
+        return ExecutedResult.success(result);
+    }
+
+    protected ExecutedResult<PolicyCategoryPO> check4Id(Long id) {
+        PolicyCategoryPO exists = dao.selectById(id);
+        if (Objects.isNull(exists)) {
+            return ExecutedResult.failed("[政策法规分类]不存在:" + id);
+        }
+        return ExecutedResult.success(exists);
+    }
+
+    // 获取所有分类下拉列表
+    public List<NameValueDto> listAllSelect() {
+        return dao.listAllSelect();
+    }
+}

+ 172 - 0
secure-producting-business/src/main/java/com/customs/cq/datacenter/business/service/PolicyPublishService.java

@@ -0,0 +1,172 @@
+/**
+#                                                    __----~~~~~~~~~~~------___
+#                                   .  .   ~~//====......          __--~ ~~
+#                   -.            \_|//     |||\\  ~~~~~~::::... /~
+#                ___-==_       _-~o~  \/    |||  \\            _/~~-
+#        __---~~~.==~||\=_    -_--~/_-~|-   |\\   \\        _/~
+#    _-~~     .=~    |  \\-_    '-~7  /-   /  ||    \      /
+#  .~       .~       |   \\ -_    /  /-   /   ||      \   /
+# /  ____  /         |     \\ ~-_/  /|- _/   .||       \ /
+# |~~    ~~|--~~~~--_ \     ~==-/   | \~--===~~        .\
+#          '         ~-|      /|    |-~\~~       __--~~
+#                      |-~~-_/ |    |   ~\_   _-~            /\
+#                           /  \     \__   \/~                \__
+#                       _--~ _/ | .-~~____--~-/                  ~~==.
+#                      ((->/~   '.|||' -_|    ~~-/ ,              . _||
+#                                 -_     ~\      ~~---l__i__i__i--~~_/
+#                                 _-~-__   ~)  \--______________--~~
+#                               //.-~~~-~_--~- |-------~~~~~~~~
+#                                      //.-~~~--\
+#                  神兽保佑
+#                  永无BUG!
+*/
+package com.customs.cq.datacenter.business.service;
+
+import com.baomidou.mybatisplus.core.metadata.IPage;
+import com.customs.cq.datacenter.business.domain.PolicyCategoryPO;
+import com.customs.cq.datacenter.business.domain.PolicyPublishPO;
+import com.customs.cq.datacenter.business.domain.vo.PolicyPublishVO;
+import com.customs.cq.datacenter.business.entity.request.policypublish.ReqCreatePolicyPublish;
+import com.customs.cq.datacenter.business.entity.request.policypublish.ReqModifyPolicyPublish;
+import com.customs.cq.datacenter.business.entity.search.SearchPolicyPublish;
+import com.customs.cq.datacenter.business.mapper.impl.PolicyPublishMapperImpl;
+import com.customs.cq.datacenter.common.ExecutedResult;
+import com.customs.cq.datacenter.common.PagerResult;
+import com.customs.cq.datacenter.common.core.domain.model.LoginUser;
+import com.customs.cq.datacenter.common.core.service.BasicService;
+import com.customs.cq.datacenter.common.enums.EYesOrNo;
+import com.customs.cq.datacenter.common.helper.LoginHelper;
+import com.customs.cq.datacenter.common.model.Tuple;
+import com.customs.cq.datacenter.common.utils.*;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+
+import java.util.ArrayList;
+import java.util.List;
+import java.util.Objects;
+
+/**
+ * 政策法规发布信息
+ * @author lin.liu
+ * @description 政策法规发布信息
+ */
+@Service
+public class PolicyPublishService extends BasicService {
+    @Autowired
+    private PolicyPublishMapperImpl dao;
+
+    @Autowired
+    private PolicyCategoryService categoryService;
+
+
+
+    public ExecutedResult<Long> create(ReqCreatePolicyPublish request) {
+        // 校验分类
+        ExecutedResult<PolicyCategoryPO> checkCategory = categoryService.check4Id(request.getCategoryId());
+        if (checkCategory.isFailed()) {
+            return ExecutedResult.failed(checkCategory.getMsg());
+        }
+        // 转换po
+        PolicyPublishPO item = CopierUtil.mapTo(request, PolicyPublishPO.class);
+        // 设置主键
+        item.setId(SnowFlakeUtil.getId());
+        // 分类名称
+        item.setCategoryName(checkCategory.getData().getCategoryName());
+        // 设置状态
+        //item.setStatus(EState.NORMAL.getValue());
+        // 设置记录创建时间
+        item.setCreateTime(LocalDateTimeUtil.nowTimeStamp());
+        // 是否删除(逻辑删除)初始值
+        item.setIsDelete(EYesOrNo.NO.getValue());
+        // 创建人信息
+        LoginUser loginUser = LoginHelper.getLoginUser();
+        if (Objects.nonNull(loginUser)) {
+            item.setCreateBy(loginUser.getUserId().toString());
+            item.setCreateByName(loginUser.getUsername());
+        }
+
+        int result = this.dao.insert(item);
+        if (result != 1) {
+            return ExecutedResult.failed("创建[政策法规发布信息]失败。");
+        }
+        return ExecutedResult.success(item.getId());
+    }
+
+    public ExecutedResult<String> modify(ReqModifyPolicyPublish request) {
+        // 验证记录是否存在
+        ExecutedResult<PolicyPublishPO> checkExists = this.check4Id(request.getId());
+        if (checkExists.isFailed()) {
+            return ExecutedResult.failed(checkExists.getMsg());
+        }
+        // 校验分类
+        ExecutedResult<PolicyCategoryPO> checkCategory = categoryService.check4Id(request.getCategoryId());
+        if (checkCategory.isFailed()) {
+            return ExecutedResult.failed(checkCategory.getMsg());
+        }
+        // 转换po
+        PolicyPublishPO item = CopierUtil.mapTo(request, PolicyPublishPO.class);
+        // 分类名称
+        item.setCategoryName(checkCategory.getData().getCategoryName());
+        // 更新人信息
+        LoginUser loginUser = LoginHelper.getLoginUser();
+        if (Objects.nonNull(loginUser)) {
+            item.setUpdateBy(loginUser.getUserId().toString());
+            item.setUpdateByName(loginUser.getUsername());
+        }
+
+        int result = this.dao.updateById(item);
+        if (result != 1) {
+            return ExecutedResult.failed("编辑[政策法规发布信息]失败。");
+        }
+        return ExecutedResult.success();
+    }
+
+    public ExecutedResult<PolicyPublishVO> get(Long id) {
+        PolicyPublishVO result = new PolicyPublishVO();
+
+        PolicyPublishPO find = dao.selectById(id);
+        if (null != find) {
+            result = CopierUtil.mapTo(find, PolicyPublishVO.class);
+        }
+        return ExecutedResult.success(result);
+    }
+
+    public ExecutedResult<List<PolicyPublishVO>> getList(List<Long> listId) {
+        List<PolicyPublishVO> result = new ArrayList<>();
+
+        List<PolicyPublishPO> list = this.dao.selectBatchIds(listId);
+        if (ListUtil.isNotNullOrEmpty(list)) {
+            result = CopierUtil.mapTo(list, PolicyPublishVO.class);
+        }
+        return ExecutedResult.success(result);
+    }
+
+    public ExecutedResult<PagerResult<PolicyPublishVO>> search(SearchPolicyPublish search) {
+        // 处理创建时间范围-查询参数
+        Tuple<String, String> createTimeRange = ParameterUtil.getTimeRange(search.getCreateTimeRange());
+        if (StringUtil.isNotNullOrEmpty(createTimeRange.getItem1())) {
+            search.setCreateTimeStart(LocalDateTimeUtil.getTimeStamp(createTimeRange.getItem1()).getTime());
+        }
+        if (StringUtil.isNotNullOrEmpty(createTimeRange.getItem2())) {
+            search.setCreateTimeEnd(LocalDateTimeUtil.getTimeStamp(createTimeRange.getItem2()).getTime());
+        }
+
+        IPage<PolicyPublishPO> pageList = dao.search(search);
+        List<PolicyPublishVO> listVo = new ArrayList<>();
+        List<PolicyPublishPO> list = pageList.getRecords();
+        if (ListUtil.isNotNullOrEmpty(list)) {
+            // 转换vo
+            listVo = CopierUtil.mapTo(list, PolicyPublishVO.class);
+        }
+        PagerResult<PolicyPublishVO> result = new PagerResult<>(pageList.getSize(), pageList.getCurrent(), pageList.getTotal(), listVo);
+        return ExecutedResult.success(result);
+    }
+
+    protected ExecutedResult<PolicyPublishPO> check4Id(Long id) {
+        PolicyPublishPO exists = dao.selectById(id);
+        if (Objects.isNull(exists)) {
+            return ExecutedResult.failed("[政策法规发布信息]不存在:" + id);
+        }
+        return ExecutedResult.success(exists);
+    }
+}

+ 247 - 0
secure-producting-common/pom.xml

@@ -0,0 +1,247 @@
+<?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>
+        <groupId>com.customs.cq.datacenter</groupId>
+        <artifactId>secure-producting</artifactId>
+        <version>0.0.1-SNAPSHOT</version>
+    </parent>
+    <modelVersion>4.0.0</modelVersion>
+
+    <artifactId>secure-producting-common</artifactId>
+    <description>common通用工具</description>
+
+    <dependencies>
+        <!-- Spring框架基本的核心工具 -->
+        <dependency>
+            <groupId>org.springframework</groupId>
+            <artifactId>spring-context-support</artifactId>
+        </dependency>
+
+        <!-- SpringWeb模块 -->
+        <dependency>
+            <groupId>org.springframework</groupId>
+            <artifactId>spring-web</artifactId>
+        </dependency>
+
+        <!-- Sa-Token 权限认证, 在线文档:http://sa-token.dev33.cn/ -->
+        <dependency>
+            <groupId>cn.dev33</groupId>
+            <artifactId>sa-token-spring-boot-starter</artifactId>
+        </dependency>
+        <!-- Sa-Token 整合 jwt -->
+        <dependency>
+            <groupId>cn.dev33</groupId>
+            <artifactId>sa-token-jwt</artifactId>
+        </dependency>
+
+        <!-- 自定义验证注解 -->
+        <dependency>
+            <groupId>org.springframework.boot</groupId>
+            <artifactId>spring-boot-starter-validation</artifactId>
+        </dependency>
+
+        <!--常用工具类 -->
+        <dependency>
+            <groupId>org.apache.commons</groupId>
+            <artifactId>commons-lang3</artifactId>
+        </dependency>
+
+        <!-- JSON工具类 -->
+        <dependency>
+            <groupId>com.fasterxml.jackson.core</groupId>
+            <artifactId>jackson-databind</artifactId>
+        </dependency>
+
+        <dependency>
+            <groupId>com.alibaba</groupId>
+            <artifactId>easyexcel</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>com.alibaba</groupId>
+            <artifactId>easyexcel-core</artifactId>
+        </dependency>
+
+        <!-- yml解析器 -->
+        <dependency>
+            <groupId>org.yaml</groupId>
+            <artifactId>snakeyaml</artifactId>
+        </dependency>
+
+        <!-- servlet包 -->
+        <dependency>
+            <groupId>javax.servlet</groupId>
+            <artifactId>javax.servlet-api</artifactId>
+        </dependency>
+
+        <dependency>
+            <groupId>com.baomidou</groupId>
+            <artifactId>mybatis-plus-boot-starter</artifactId>
+        </dependency>
+
+        <!-- dynamic-datasource 多数据源-->
+        <dependency>
+            <groupId>com.baomidou</groupId>
+            <artifactId>dynamic-datasource-spring-boot-starter</artifactId>
+        </dependency>
+
+        <dependency>
+            <groupId>com.github.yulichang</groupId>
+            <artifactId>mybatis-plus-join-boot-starter</artifactId>
+            <version>1.4.13</version>
+        </dependency>
+
+        <dependency>
+            <groupId>cn.hutool</groupId>
+            <artifactId>hutool-core</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>cn.hutool</groupId>
+            <artifactId>hutool-http</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>cn.hutool</groupId>
+            <artifactId>hutool-captcha</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>cn.hutool</groupId>
+            <artifactId>hutool-jwt</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>cn.hutool</groupId>
+            <artifactId>hutool-extra</artifactId>
+        </dependency>
+
+        <dependency>
+            <groupId>com.sun.mail</groupId>
+            <artifactId>jakarta.mail</artifactId>
+        </dependency>
+
+        <dependency>
+            <groupId>org.projectlombok</groupId>
+            <artifactId>lombok</artifactId>
+        </dependency>
+
+        <!--  常用工具  -->
+        <dependency>
+            <groupId>com.google.guava</groupId>
+            <artifactId>guava</artifactId>
+            <version>32.1.3-jre</version>
+        </dependency>
+        <!--  自动生成YML配置关联JSON文件  -->
+        <dependency>
+            <groupId>org.springframework.boot</groupId>
+            <artifactId>spring-boot-configuration-processor</artifactId>
+        </dependency>
+        <!-- https://mvnrepository.com/artifact/org.apache.tika/tika-core -->
+        <dependency>
+            <groupId>org.apache.tika</groupId>
+            <artifactId>tika-core</artifactId>
+            <version>2.9.2</version>
+        </dependency>
+
+        <dependency>
+            <groupId>commons-io</groupId>
+            <artifactId>commons-io</artifactId>
+            <version>2.15.1</version>
+        </dependency>
+
+        <!--redisson-->
+        <dependency>
+            <groupId>org.redisson</groupId>
+            <artifactId>redisson-spring-boot-starter</artifactId>
+        </dependency>
+
+        <dependency>
+            <groupId>org.redisson</groupId>
+            <artifactId>redisson-spring-data-27</artifactId>
+        </dependency>
+
+        <dependency>
+            <groupId>com.baomidou</groupId>
+            <artifactId>lock4j-redisson-spring-boot-starter</artifactId>
+        </dependency>
+
+        <!-- 加密包引入 -->
+        <dependency>
+            <groupId>org.bouncycastle</groupId>
+            <artifactId>bcprov-jdk15to18</artifactId>
+        </dependency>
+
+        <!-- 离线IP地址定位库 -->
+        <dependency>
+            <groupId>org.lionsoul</groupId>
+            <artifactId>ip2region</artifactId>
+        </dependency>
+
+        <dependency>
+            <groupId>cn.gov.customs</groupId>
+            <artifactId>h4a-sdk</artifactId>
+            <version>1.0.6</version>
+            <scope>system</scope>
+            <systemPath>${pom.basedir}/../secure-producting-host/src/main/resources/lib/h4a-sdk-1.0.6.jar</systemPath>
+        </dependency>
+        <dependency>
+            <groupId>cn.gov.customs</groupId>
+            <artifactId>sso-sdk</artifactId>
+            <version>1.0.6</version>
+            <scope>system</scope>
+            <systemPath>${pom.basedir}/../secure-producting-host/src/main/resources/lib/sso-sdk-1.0.6.jar</systemPath>
+        </dependency>
+        <dependency>
+            <groupId>cn.gov.customs</groupId>
+            <artifactId>config-sdk</artifactId>
+            <version>1.0.6</version>
+            <scope>system</scope>
+            <systemPath>${pom.basedir}/../secure-producting-host/src/main/resources/lib/config-sdk-1.0.6.jar</systemPath>
+        </dependency>
+
+        <!-- http请求相关 -->
+        <dependency>
+            <groupId>org.apache.httpcomponents</groupId>
+            <artifactId>httpmime</artifactId>
+        </dependency>
+        <!-- json -->
+        <dependency>
+            <groupId>com.google.code.gson</groupId>
+            <artifactId>gson</artifactId>
+        </dependency>
+
+        <!-- 中文转拼音 -->
+        <dependency>
+            <groupId>com.belerweb</groupId>
+            <artifactId>pinyin4j</artifactId>
+        </dependency>
+
+        <!-- 处理office文件 -->
+        <dependency>
+            <groupId>com.aspose</groupId>
+            <artifactId>aspose-words</artifactId>
+            <version>14.9.0</version>
+            <scope>system</scope>
+            <systemPath>${project.basedir}/../secure-producting-host/src/main/resources/lib/aspose-words-14.9.0-jdk16.jar</systemPath>
+        </dependency>
+        <dependency>
+            <groupId>com.aspose</groupId>
+            <artifactId>aspose-cells</artifactId>
+            <version>8.5.2</version>
+            <scope>system</scope>
+            <systemPath>${project.basedir}/../secure-producting-host/src/main/resources/lib/aspose-cells-8.5.2.jar</systemPath>
+        </dependency>
+        <dependency>
+            <groupId>com.aspose</groupId>
+            <artifactId>aspose-slides</artifactId>
+            <version>15.9.0</version>
+            <scope>system</scope>
+            <systemPath>${project.basedir}/../secure-producting-host/src/main/resources/lib/aspose.slides-15.9.0.jar</systemPath>
+        </dependency>
+
+        <!-- iso格式时间处理 -->
+        <dependency>
+            <groupId>joda-time</groupId>
+            <artifactId>joda-time</artifactId>
+            <version>2.9.9</version>
+        </dependency>
+    </dependencies>
+</project>

+ 151 - 0
secure-producting-common/src/main/java/com/customs/cq/datacenter/common/ExecutedResult.java

@@ -0,0 +1,151 @@
+package com.customs.cq.datacenter.common;
+
+import com.customs.cq.datacenter.common.enums.EResultCode;
+import com.customs.cq.datacenter.common.utils.StringUtil;
+import com.fasterxml.jackson.annotation.JsonIgnore;
+
+import java.util.Objects;
+
+/**
+ * 执行结果实体
+ * @author lin.liu
+ * @date   2019-01-08
+ * @param <T> 数据包类型
+ */
+public class ExecutedResult<T> {
+    private static final String STR_SUCCESS = "success.";
+    private static final String STR_FAILED = "failed.";
+
+    /**
+     * 请求响应状态码 EResultCode
+     */
+    private Integer code = EResultCode.FAILED.getCode();
+    /**
+     * 错误消息
+     */
+    private String msg = STR_FAILED;
+    /**
+     * 数据包
+     */
+    private T data = null;
+    /**
+     * 错误码
+     * @ignore
+     */
+    @JsonIgnore
+    private String msgCode = "";
+
+    public Integer getCode() {
+        return code;
+    }
+    public void setCode(Integer code) {
+        this.code = code;
+    }
+
+    public String getMsg() {
+        return msg;
+    }
+    public void setMsg(String msg) {
+        this.msg = msg;
+    }
+
+    public T getData() {
+        return data;
+    }
+    public void setData(T data) {
+        this.data = data;
+    }
+
+    public String getMsgCode() {
+        return msgCode;
+    }
+    public void setMsgCode(String msgCode) {
+        this.msgCode = msgCode;
+    }
+
+    public ExecutedResult(){}
+
+    public ExecutedResult(EResultCode code, T data){
+        this.code = code.getCode();
+        this.data = data;
+    }
+
+    public ExecutedResult(EResultCode code, T data, String msg){
+        this.code = code.getCode();
+        this.data = data;
+        this.msg = msg;
+    }
+
+    public ExecutedResult(EResultCode code, T data, String msg, String msgCode){
+        this.code = code.getCode();
+        this.data = data;
+        this.msg = msg;
+        this.msgCode = msgCode;
+    }
+
+    @JsonIgnore
+    public Boolean isSuccess(){
+        return Objects.equals(this.code, EResultCode.SUCCESS.getCode());
+    }
+
+    @JsonIgnore
+    public Boolean isFailed(){
+        return !this.isSuccess();
+    }
+
+    public static <T> ExecutedResult<T> success(){
+        return new ExecutedResult<>(EResultCode.SUCCESS, null, STR_SUCCESS);
+    }
+
+    public static <T> ExecutedResult<T> success(T data){
+        return new ExecutedResult<>(EResultCode.SUCCESS, data, STR_SUCCESS);
+    }
+
+    public static <T> ExecutedResult<T> success(T data, String msg){
+        if(StringUtil.isNullOrEmpty(msg)){
+            msg = STR_SUCCESS;
+        }
+        return new ExecutedResult<>(EResultCode.SUCCESS, data, msg);
+    }
+
+    public static <T> ExecutedResult<T> failed(){
+        return ExecutedResult.failed("");
+    }
+
+    public static <T> ExecutedResult<T> failed(String msg){
+        return ExecutedResult.failed(msg, "");
+    }
+
+    public static <T> ExecutedResult<T> failed(String msg, String msgCode){
+        return ExecutedResult.failed(null, msg, msgCode);
+    }
+
+    public static <T> ExecutedResult<T> failed(T data, String msg, String msgCode){
+        if(StringUtil.isNullOrEmpty(msg)){
+            msg = STR_FAILED;
+        }
+        return  new ExecutedResult<>(EResultCode.FAILED, data, msg, msgCode);
+    }
+
+    /**
+     * 参数验证失败返回结果
+     * @param message 提示信息
+     */
+    public static <T> ExecutedResult<T> validateFailed(String message) {
+        return new ExecutedResult<>(EResultCode.VALIDATE_FAILED, null, message);
+    }
+
+    /**
+     * 未登录返回结果
+     */
+    public static <T> ExecutedResult<T> unauthorized(T data) {
+        return new ExecutedResult<>(EResultCode.UNAUTHORIZED, data, EResultCode.UNAUTHORIZED.getMessage());
+    }
+
+    /**
+     * 未授权返回结果
+     */
+    public static <T> ExecutedResult<T> forbidden() {
+        return new ExecutedResult<>(EResultCode.FORBIDDEN, null, EResultCode.FORBIDDEN.getMessage());
+    }
+}

+ 106 - 0
secure-producting-common/src/main/java/com/customs/cq/datacenter/common/PagerResult.java

@@ -0,0 +1,106 @@
+package com.customs.cq.datacenter.common;
+
+import java.util.ArrayList;
+import java.util.List;
+
+/**
+ * 分页结果
+ * @author linliu
+ * @date   2018-12-24
+ * @param <T> 数据包数据类型
+ */
+public class PagerResult<T> {
+    /**
+     * 页大小(每页返回的记录条数)
+     **/
+    private Long limit = 10L;
+    /**
+     * 页号(第几页, 从1开始)
+     **/
+    private Long page = 1L;
+    /**
+     * 记录总条数
+     **/
+    private Number total = 0L;
+    /**
+     * 数据包
+     **/
+    private List<T> list = new ArrayList<>();
+
+    /**
+     * 构造方法
+     */
+    public PagerResult() {
+
+    }
+
+    /**
+     * 构造方法
+     * @param limit 页大小(每页显示记录数)
+     * @param page 页号(第几页, 从1开始)
+     * @param total 记录总条数
+     * @param list 数据包
+     */
+    public PagerResult(Long limit, Long page, Number total, List<T> list) {
+        this.limit = limit;
+        this.page = page;
+        this.total = total;
+        this.list = list;
+    }
+
+    public Long getLimit() {
+        return limit;
+    }
+    public void setLimit(Long limit) {
+        this.limit = limit;
+    }
+
+    public Long getPage() {
+        return page;
+    }
+
+    public void setPage(Long page) {
+        this.page = page;
+    }
+
+    public Long getTotal() {
+        return total.longValue();
+    }
+
+    public void setTotal(Number total) {
+        this.total = total;
+    }
+
+    public List<T> getList() {
+        return list;
+    }
+
+    public void setList(List<T> list) {
+        this.list = list;
+    }
+
+    /**
+     * 总页数
+     */
+    public Long getTotalPage() {
+        Long page = this.total.longValue() / this.limit;
+        if(this.total.longValue() % this.limit != 0){
+            page++;
+        }
+        return page;
+    }
+
+    /**
+     * 是否还有上一页
+     */
+    public boolean getIsHasPrePage() {
+        return this.getPage() > 1;
+    }
+
+    /**
+     * 是否还有下一页
+     */
+    public boolean getIsHasNextPage() {
+        return this.getPage() < this.getTotalPage().intValue();
+    }
+}

+ 26 - 0
secure-producting-common/src/main/java/com/customs/cq/datacenter/common/PagerResultMore.java

@@ -0,0 +1,26 @@
+package com.customs.cq.datacenter.common;
+
+import java.util.List;
+
+public class PagerResultMore<T, M> extends PagerResult<T> {
+    /**
+     * 其他信息
+     */
+    private M other;
+
+    public M getOther() {
+        return other;
+    }
+
+    public void setOther(M other) {
+        this.other = other;
+    }
+
+    public PagerResultMore() {
+    }
+
+    public PagerResultMore(Long limit, Long page, Number total, List<T> list, M other) {
+        super(limit, page, total, list);
+        this.other = other;
+    }
+}

+ 24 - 0
secure-producting-common/src/main/java/com/customs/cq/datacenter/common/annotation/CellMerge.java

@@ -0,0 +1,24 @@
+package com.customs.cq.datacenter.common.annotation;
+
+import com.customs.cq.datacenter.common.excel.CellMergeStrategy;
+
+import java.lang.annotation.*;
+
+/**
+ * excel 列单元格合并(合并列相同项)
+ *
+ * 需搭配 {@link CellMergeStrategy} 策略使用
+ *
+ * @author Lion
+ */
+@Target(ElementType.FIELD)
+@Retention(RetentionPolicy.RUNTIME)
+@Inherited
+public @interface CellMerge {
+
+	/**
+	 * col index
+	 */
+	int index() default -1;
+
+}

+ 28 - 0
secure-producting-common/src/main/java/com/customs/cq/datacenter/common/annotation/DataColumn.java

@@ -0,0 +1,28 @@
+package com.customs.cq.datacenter.common.annotation;
+
+import java.lang.annotation.*;
+
+/**
+ * 数据权限
+ *
+ * 一个注解只能对应一个模板
+ *
+ * @author Lion
+ * @version 3.5.0
+ */
+@Target(ElementType.METHOD)
+@Retention(RetentionPolicy.RUNTIME)
+@Documented
+public @interface DataColumn {
+
+    /**
+     * 占位符关键字
+     */
+    String[] key() default "deptName";
+
+    /**
+     * 占位符替换值
+     */
+    String[] value() default "dept_id";
+
+}

+ 18 - 0
secure-producting-common/src/main/java/com/customs/cq/datacenter/common/annotation/DataPermission.java

@@ -0,0 +1,18 @@
+package com.customs.cq.datacenter.common.annotation;
+
+import java.lang.annotation.*;
+
+/**
+ * 数据权限组
+ *
+ * @author Lion
+ * @version 3.5.0
+ */
+@Target({ElementType.METHOD, ElementType.TYPE})
+@Retention(RetentionPolicy.RUNTIME)
+@Documented
+public @interface DataPermission {
+
+    DataColumn[] value();
+
+}

+ 29 - 0
secure-producting-common/src/main/java/com/customs/cq/datacenter/common/annotation/DictDataMapper.java

@@ -0,0 +1,29 @@
+package com.customs.cq.datacenter.common.annotation;
+
+import com.customs.cq.datacenter.common.jackson.DictDataJsonSerializer;
+import com.fasterxml.jackson.annotation.JacksonAnnotationsInside;
+import com.fasterxml.jackson.databind.annotation.JsonSerialize;
+
+import java.lang.annotation.ElementType;
+import java.lang.annotation.Retention;
+import java.lang.annotation.RetentionPolicy;
+import java.lang.annotation.Target;
+
+/**
+ * 字典数据映射注解
+ *
+ * @author itino
+ * @deprecated 建议使用通用翻译注解
+ */
+@Deprecated
+@Retention(RetentionPolicy.RUNTIME)
+@Target({ElementType.FIELD, ElementType.METHOD})
+@JacksonAnnotationsInside
+@JsonSerialize(using = DictDataJsonSerializer.class)
+public @interface DictDataMapper {
+
+    /**
+     * 设置字典的type值 (如: sys_user_sex)
+     */
+    String dictType() default "";
+}

+ 44 - 0
secure-producting-common/src/main/java/com/customs/cq/datacenter/common/annotation/EncryptField.java

@@ -0,0 +1,44 @@
+package com.customs.cq.datacenter.common.annotation;
+
+import com.customs.cq.datacenter.common.enums.AlgorithmType;
+import com.customs.cq.datacenter.common.enums.EncodeType;
+
+import java.lang.annotation.*;
+
+/**
+ * 字段加密注解
+ *
+ * @author 老马
+ */
+@Documented
+@Inherited
+@Target({ElementType.FIELD})
+@Retention(RetentionPolicy.RUNTIME)
+public @interface EncryptField {
+
+    /**
+     * 加密算法
+     */
+    AlgorithmType algorithm() default AlgorithmType.DEFAULT;
+
+    /**
+     * 秘钥。AES、SM4需要
+     */
+    String password() default "";
+
+    /**
+     * 公钥。RSA、SM2需要
+     */
+    String publicKey() default "";
+
+    /**
+     * 私钥。RSA、SM2需要
+     */
+    String privateKey() default "";
+
+    /**
+     * 编码方式。对加密算法为BASE64的不起作用
+     */
+    EncodeType encode() default EncodeType.DEFAULT;
+
+}

+ 32 - 0
secure-producting-common/src/main/java/com/customs/cq/datacenter/common/annotation/ExcelDictFormat.java

@@ -0,0 +1,32 @@
+package com.customs.cq.datacenter.common.annotation;
+
+import com.customs.cq.datacenter.common.utils.StringUtils;
+
+import java.lang.annotation.*;
+
+/**
+ * 字典格式化
+ *
+ * @author Lion
+ */
+@Target({ElementType.FIELD})
+@Retention(RetentionPolicy.RUNTIME)
+@Inherited
+public @interface ExcelDictFormat {
+
+    /**
+     * 如果是字典类型,请设置字典的type值 (如: sys_user_sex)
+     */
+    String dictType() default "";
+
+    /**
+     * 读取内容转表达式 (如: 0=男,1=女,2=未知)
+     */
+    String readConverterExp() default "";
+
+    /**
+     * 分隔符,读取字符串组内容
+     */
+    String separator() default StringUtils.SEPARATOR;
+
+}

+ 30 - 0
secure-producting-common/src/main/java/com/customs/cq/datacenter/common/annotation/ExcelEnumFormat.java

@@ -0,0 +1,30 @@
+package com.customs.cq.datacenter.common.annotation;
+
+import java.lang.annotation.*;
+
+/**
+ * 枚举格式化
+ *
+ * @author Liang
+ */
+@Target({ElementType.FIELD})
+@Retention(RetentionPolicy.RUNTIME)
+@Inherited
+public @interface ExcelEnumFormat {
+
+    /**
+     * 字典枚举类型
+     */
+    Class<? extends Enum<?>> enumClass();
+
+    /**
+     * 字典枚举类中对应的code属性名称,默认为code
+     */
+    String codeField() default "code";
+
+    /**
+     * 字典枚举类中对应的text属性名称,默认为text
+     */
+    String textField() default "text";
+
+}

+ 47 - 0
secure-producting-common/src/main/java/com/customs/cq/datacenter/common/annotation/Log.java

@@ -0,0 +1,47 @@
+package com.customs.cq.datacenter.common.annotation;
+
+import com.customs.cq.datacenter.common.enums.BusinessType;
+import com.customs.cq.datacenter.common.enums.OperatorType;
+
+import java.lang.annotation.*;
+
+/**
+ * 自定义操作日志记录注解
+ *
+ * @author ruoyi
+ */
+@Target({ElementType.PARAMETER, ElementType.METHOD})
+@Retention(RetentionPolicy.RUNTIME)
+@Documented
+public @interface Log {
+    /**
+     * 模块
+     */
+    String title() default "";
+
+    /**
+     * 功能
+     */
+    BusinessType businessType() default BusinessType.OTHER;
+
+    /**
+     * 操作人类别
+     */
+    OperatorType operatorType() default OperatorType.MANAGE;
+
+    /**
+     * 是否保存请求的参数
+     */
+    boolean isSaveRequestData() default true;
+
+    /**
+     * 是否保存响应的参数
+     */
+    boolean isSaveResponseData() default true;
+
+    /**
+     * 排除指定的请求参数
+     */
+    String[] excludeParamNames() default {};
+
+}

+ 41 - 0
secure-producting-common/src/main/java/com/customs/cq/datacenter/common/annotation/RateLimiter.java

@@ -0,0 +1,41 @@
+package com.customs.cq.datacenter.common.annotation;
+
+import com.customs.cq.datacenter.common.enums.LimitType;
+
+import java.lang.annotation.*;
+
+/**
+ * 限流注解
+ *
+ * @author Lion
+ */
+@Target(ElementType.METHOD)
+@Retention(RetentionPolicy.RUNTIME)
+@Documented
+public @interface RateLimiter {
+    /**
+     * 限流key,支持使用Spring el表达式来动态获取方法上的参数值
+     * 格式类似于  #code.id #{#code}
+     */
+    String key() default "";
+
+    /**
+     * 限流时间,单位秒
+     */
+    int time() default 60;
+
+    /**
+     * 限流次数
+     */
+    int count() default 100;
+
+    /**
+     * 限流类型
+     */
+    LimitType limitType() default LimitType.DEFAULT;
+
+    /**
+     * 提示消息 支持国际化 格式为 {code}
+     */
+    String message() default "{rate.limiter.message}";
+}

+ 29 - 0
secure-producting-common/src/main/java/com/customs/cq/datacenter/common/annotation/RepeatSubmit.java

@@ -0,0 +1,29 @@
+package com.customs.cq.datacenter.common.annotation;
+
+import java.lang.annotation.*;
+import java.util.concurrent.TimeUnit;
+
+/**
+ * 自定义注解防止表单重复提交
+ *
+ * @author Lion
+ */
+@Inherited
+@Target(ElementType.METHOD)
+@Retention(RetentionPolicy.RUNTIME)
+@Documented
+public @interface RepeatSubmit {
+
+    /**
+     * 间隔时间(ms),小于此时间视为重复提交
+     */
+    int interval() default 5000;
+
+    TimeUnit timeUnit() default TimeUnit.MILLISECONDS;
+
+    /**
+     * 提示消息 支持国际化 格式为 {code}
+     */
+    String message() default "{repeat.submit.message}";
+
+}

+ 24 - 0
secure-producting-common/src/main/java/com/customs/cq/datacenter/common/annotation/Sensitive.java

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

+ 20 - 0
secure-producting-common/src/main/java/com/customs/cq/datacenter/common/annotation/ThirdPartyAuth.java

@@ -0,0 +1,20 @@
+package com.customs.cq.datacenter.common.annotation;
+
+
+import java.lang.annotation.*;
+
+/**
+ * 第三方调用接口身份认证
+ *
+ * @author xqf
+ */
+
+@Target({ElementType.PARAMETER, ElementType.METHOD})
+@Retention(RetentionPolicy.RUNTIME)
+@Documented
+public @interface ThirdPartyAuth {
+    /**
+     * 模块
+     */
+    String title() default "";
+}

+ 39 - 0
secure-producting-common/src/main/java/com/customs/cq/datacenter/common/annotation/Translation.java

@@ -0,0 +1,39 @@
+package com.customs.cq.datacenter.common.annotation;
+
+import com.customs.cq.datacenter.common.translation.handler.TranslationHandler;
+import com.fasterxml.jackson.annotation.JacksonAnnotationsInside;
+import com.fasterxml.jackson.databind.annotation.JsonSerialize;
+
+import java.lang.annotation.*;
+
+/**
+ * 通用翻译注解
+ *
+ * @author Lion
+ */
+@Inherited
+@Retention(RetentionPolicy.RUNTIME)
+@Target({ElementType.FIELD, ElementType.METHOD})
+@Documented
+@JacksonAnnotationsInside
+@JsonSerialize(using = TranslationHandler.class)
+public @interface Translation {
+
+    /**
+     * 类型 (需与实现类上的 {@link TranslationType} 注解type对应)
+     * <p>
+     * 默认取当前字段的值 如果设置了 @{@link Translation#mapper()} 则取映射字段的值
+     */
+    String type();
+
+    /**
+     * 映射字段 (如果不为空则取此字段的值)
+     */
+    String mapper() default "";
+
+    /**
+     * 其他条件 例如: 字典type(sys_user_sex)
+     */
+    String other() default "";
+
+}

+ 23 - 0
secure-producting-common/src/main/java/com/customs/cq/datacenter/common/annotation/TranslationType.java

@@ -0,0 +1,23 @@
+package com.customs.cq.datacenter.common.annotation;
+
+import com.customs.cq.datacenter.common.translation.TranslationInterface;
+
+import java.lang.annotation.*;
+
+/**
+ * 翻译类型注解 (标注到{@link TranslationInterface} 的实现类)
+ *
+ * @author Lion
+ */
+@Inherited
+@Retention(RetentionPolicy.RUNTIME)
+@Target({ElementType.TYPE})
+@Documented
+public @interface TranslationType {
+
+    /**
+     * 类型
+     */
+    String type();
+
+}

+ 85 - 0
secure-producting-common/src/main/java/com/customs/cq/datacenter/common/captcha/UnsignedMathGenerator.java

@@ -0,0 +1,85 @@
+package com.customs.cq.datacenter.common.captcha;
+
+import cn.hutool.captcha.generator.CodeGenerator;
+import cn.hutool.core.math.Calculator;
+import cn.hutool.core.util.CharUtil;
+import cn.hutool.core.util.RandomUtil;
+import com.customs.cq.datacenter.common.utils.StringUtils;
+
+/**
+ * 无符号计算生成器
+ *
+ * @author Lion
+ */
+public class UnsignedMathGenerator implements CodeGenerator {
+
+    private static final long serialVersionUID = -5514819971774091076L;
+
+    private static final String OPERATORS = "+-*";
+
+    /**
+     * 参与计算数字最大长度
+     */
+    private final int numberLength;
+
+    /**
+     * 构造
+     */
+    public UnsignedMathGenerator() {
+        this(2);
+    }
+
+    /**
+     * 构造
+     *
+     * @param numberLength 参与计算最大数字位数
+     */
+    public UnsignedMathGenerator(int numberLength) {
+        this.numberLength = numberLength;
+    }
+
+    @Override
+    public String generate() {
+        final int limit = getLimit();
+        int a = RandomUtil.randomInt(limit);
+        int b = RandomUtil.randomInt(limit);
+        String max = Integer.toString(Math.max(a,b));
+        String min = Integer.toString(Math.min(a,b));
+        max = StringUtils.rightPad(max, this.numberLength, CharUtil.SPACE);
+        min = StringUtils.rightPad(min, this.numberLength, CharUtil.SPACE);
+
+        return max + RandomUtil.randomChar(OPERATORS) + min + '=';
+    }
+
+    @Override
+    public boolean verify(String code, String userInputCode) {
+        int result;
+        try {
+            result = Integer.parseInt(userInputCode);
+        } catch (NumberFormatException e) {
+            // 用户输入非数字
+            return false;
+        }
+
+        final int calculateResult = (int) Calculator.conversion(code);
+        return result == calculateResult;
+    }
+
+    /**
+     * 获取验证码长度
+     *
+     * @return 验证码长度
+     */
+    public int getLength() {
+        return this.numberLength * 2 + 2;
+    }
+
+    /**
+     * 根据长度获取参与计算数字最大值
+     *
+     * @return 最大值
+     */
+    private int getLimit() {
+        return Integer.parseInt("1" + StringUtils.repeat('0', this.numberLength));
+    }
+}

+ 15 - 0
secure-producting-common/src/main/java/com/customs/cq/datacenter/common/config/FileConfig.java

@@ -0,0 +1,15 @@
+package com.customs.cq.datacenter.common.config;
+
+import lombok.Data;
+import org.springframework.boot.context.properties.ConfigurationProperties;
+import org.springframework.stereotype.Component;
+
+@Data
+@Component
+@ConfigurationProperties(prefix = "file")
+public class FileConfig {
+    private String uploadBasicPath;
+    private String fileBasicUrl;
+    private String disturbStr;
+    private String enableSelfServer;
+}

+ 54 - 0
secure-producting-common/src/main/java/com/customs/cq/datacenter/common/config/RuoYiConfig.java

@@ -0,0 +1,54 @@
+package com.customs.cq.datacenter.common.config;
+
+import lombok.Data;
+import lombok.Getter;
+import org.springframework.boot.context.properties.ConfigurationProperties;
+import org.springframework.stereotype.Component;
+
+/**
+ * 读取项目相关配置
+ *
+ * @author Lion
+ */
+
+@Data
+@Component
+@ConfigurationProperties(prefix = "ruoyi")
+public class RuoYiConfig {
+
+    /**
+     * 项目名称
+     */
+    private String name;
+
+    /**
+     * 版本
+     */
+    private String version;
+
+    /**
+     * 版权年份
+     */
+    private String copyrightYear;
+
+    /**
+     * 实例演示开关
+     */
+    private boolean demoEnabled;
+
+    /**
+     * 缓存懒加载
+     */
+    private boolean cacheLazy;
+
+    /**
+     * 获取地址开关
+     */
+    @Getter
+    private static boolean addressEnabled;
+
+    public void setAddressEnabled(boolean addressEnabled) {
+        RuoYiConfig.addressEnabled = addressEnabled;
+    }
+
+}

+ 13 - 0
secure-producting-common/src/main/java/com/customs/cq/datacenter/common/config/SystemConfig.java

@@ -0,0 +1,13 @@
+package com.customs.cq.datacenter.common.config;
+
+import com.customs.cq.datacenter.common.utils.SpringUtil;
+
+/**
+ * 获取系统配置 读取配置文件
+ */
+public class SystemConfig {
+    /**
+     * 上传文件相关配置
+     */
+    public static FileConfig UPLOAD_FILE = SpringUtil.getBean(FileConfig.class);
+}

+ 44 - 0
secure-producting-common/src/main/java/com/customs/cq/datacenter/common/constant/CacheConstants.java

@@ -0,0 +1,44 @@
+package com.customs.cq.datacenter.common.constant;
+
+/**
+ * 缓存的key 常量
+ *
+ * @author ruoyi
+ */
+public interface CacheConstants {
+
+    /**
+     * 在线用户 redis key
+     */
+    String ONLINE_TOKEN_KEY = "online_tokens:";
+
+    /**
+     * 验证码 redis key
+     */
+    String CAPTCHA_CODE_KEY = "captcha_codes:";
+
+    /**
+     * 参数管理 cache key
+     */
+    String SYS_CONFIG_KEY = "sys_config:";
+
+    /**
+     * 字典管理 cache key
+     */
+    String SYS_DICT_KEY = "sys_dict:";
+
+    /**
+     * 防重提交 redis key
+     */
+    String REPEAT_SUBMIT_KEY = "repeat_submit:";
+
+    /**
+     * 限流 redis key
+     */
+    String RATE_LIMIT_KEY = "rate_limit:";
+
+    /**
+     * 登录账户密码错误次数 redis key
+     */
+    String PWD_ERR_CNT_KEY = "pwd_err_cnt:";
+}

+ 58 - 0
secure-producting-common/src/main/java/com/customs/cq/datacenter/common/constant/CacheNames.java

@@ -0,0 +1,58 @@
+package com.customs.cq.datacenter.common.constant;
+
+/**
+ * 缓存组名称常量
+ * <p>
+ * key 格式为 cacheNames#ttl#maxIdleTime#maxSize
+ * <p>
+ * ttl 过期时间 如果设置为0则不过期 默认为0
+ * maxIdleTime 最大空闲时间 根据LRU算法清理空闲数据 如果设置为0则不检测 默认为0
+ * maxSize 组最大长度 根据LRU算法清理溢出数据 如果设置为0则无限长 默认为0
+ * <p>
+ * 例子: test#60s、test#0#60s、test#0#1m#1000、test#1h#0#500
+ *
+ * @author Lion
+ */
+public interface CacheNames {
+
+    /**
+     * 演示案例
+     */
+    String DEMO_CACHE = "demo:cache#60s#10m#20";
+
+    /**
+     * 系统配置
+     */
+    String SYS_CONFIG = "sys_config";
+
+    /**
+     * 数据字典
+     */
+    String SYS_DICT = "sys_dict";
+
+    /**
+     * 用户账户
+     */
+    String SYS_USER_NAME = "sys_user_name#30d";
+
+    /**
+     * 部门
+     */
+    String SYS_DEPT = "sys_dept#30d";
+
+    /**
+     * OSS内容
+     */
+    String SYS_OSS = "sys_oss#30d";
+
+    /**
+     * OSS配置
+     */
+    String SYS_OSS_CONFIG = "sys_oss_config";
+
+    /**
+     * 在线用户
+     */
+    String ONLINE_TOKEN = "online_tokens";
+
+}

+ 365 - 0
secure-producting-common/src/main/java/com/customs/cq/datacenter/common/constant/Constants.java

@@ -0,0 +1,365 @@
+package com.customs.cq.datacenter.common.constant;
+
+/**
+ * 通用常量信息
+ *
+ * @author ruoyi
+ */
+public interface Constants {
+
+    /**
+     * UTF-8 字符集
+     */
+    String UTF8 = "UTF-8";
+
+    /**
+     * GBK 字符集
+     */
+    String GBK = "GBK";
+
+    /**
+     * www主域
+     */
+    String WWW = "www.";
+
+    /**
+     * http请求
+     */
+    String HTTP = "http://";
+
+    /**
+     * https请求
+     */
+    String HTTPS = "https://";
+
+    /**
+     * 通用成功标识
+     */
+    String SUCCESS = "0";
+
+    /**
+     * 通用失败标识
+     */
+    String FAIL = "1";
+
+    /**
+     * 登录成功
+     */
+    String LOGIN_SUCCESS = "Success";
+
+    /**
+     * 注销
+     */
+    String LOGOUT = "Logout";
+
+    /**
+     * 注册
+     */
+    String REGISTER = "Register";
+
+    /**
+     * 登录失败
+     */
+    String LOGIN_FAIL = "Error";
+
+    /**
+     * 验证码有效期(分钟)
+     */
+    Integer CAPTCHA_EXPIRATION = 2;
+
+    /**
+     * 令牌
+     */
+    String TOKEN = "token";
+
+
+
+
+    //********************************** 字符串 **********************************
+    /**
+     * 获取字符串换行符
+     */
+    String STR_NEWLINE = "\r\n";
+    /**
+     * 获取html换行符
+     */
+    String STR_HTMLBR = "<br />";
+    /**
+     * 1个空格字符串
+     */
+    String STR_SPACE = " ";
+    /**
+     * 正则中的1个空格字符串
+     */
+    String STR_REGEX_SPACE = "\\s";
+    /**
+     * ~
+     */
+    String STR_TIME_RANGE = " ~ ";
+    /**
+     * ;
+     */
+    String STR_SEMICOLON = ";";
+    //********************************** 字符串 **********************************
+
+
+
+
+
+    //********************************** 时间日期 相关 **********************************
+    /**
+     * 日期格式“yyyy-MM-dd”
+     */
+    String STR_DATE = "yyyy-MM-dd";
+    /**
+     * 时间格式“yyyy-MM-dd HH:mm:ss”
+     */
+    String STR_DATE_FULL = "yyyy-MM-dd HH:mm:ss";
+    /**
+     * 时间格式“yyyy-MM-dd HH:mm:ss.SSS”
+     */
+    String STR_DATE_FULLMS = "yyyy-MM-dd HH:mm:ss.SSS";
+    /**
+     * 时间格式“yyyy-MM-dd HH:mm:ss”
+     */
+    String STR_DATE_ISO_FULL = "yyyy-MM-dd HH:mm:ss";
+    /**
+     * 时间格式“yyyy-MM-dd HH:mm:ss.SSS”
+     */
+    String STR_DATE_ISO_FULL_MS = "yyyy-MM-dd HH:mm:ss.SSS";
+    /**
+     * “ 00:00:00”
+     */
+    String STR_DATE_DAYSTART = " 00:00:00";
+    /**
+     * “ 23:59:59”
+     */
+    String STR_DATE_DAYEND = " 23:59:59";
+    /**
+     * “1970-01-01”
+     */
+    String STR_DATE_DEFAULT_DATE = "1970-01-01";
+    /**
+     * “1970-01-01 00:00:00”
+     */
+    String STR_DATE_DEFAULT = "1970-01-01 00:00:00";
+    /**
+     * “1970-01-01 08:00:01”
+     */
+    String STR_DATE_DEFAULT_UTC8 = "1970-01-01 08:00:01";
+    /**
+     * “1970-01-01 00:00:00”
+     */
+    String STR_DATE_DEFAULT_FULL = "1970-01-01 00:00:00.000";
+    //********************************** 时间日期 相关 **********************************
+
+
+
+
+
+    //********************************** SQL关键字 相关 **********************************
+    /**
+     * 等于“ = ?”
+     */
+    String SQL_EQUAL = " = ?";
+    /**
+     * 不等于
+     */
+    String SQL_NOTEQUAL = " <> ?";
+    /**
+     * 大于
+     */
+    String SQL_GREATER = " > ?";
+    /**
+     * 大于等于
+     */
+    String SQL_GREATERTHAN = " >= ?";
+    /**
+     * 小于
+     */
+    String SQL_LESS = " < ?";
+    /**
+     * 小于等于
+     */
+    String SQL_LESSTHAN = " <= ?";
+    /**
+     * 模糊等于“ like ?”
+     */
+    String SQL_LIKE = " like ?";
+    /**
+     * 模糊不等于“ not like ?”
+     */
+    String SQL_NOTLIKE = " not like ?";
+    /**
+     * “ IN”
+     */
+    String SQL_IN = " IN";
+    //String SQL_IN = " FIND_IN_SET(%s, ?) > 0";//由于“FIND_IN_SET”无法使用索引 2020-06-17 改为“in”语法 lin.liu
+    /**
+     * “ NOT IN”
+     */
+    String SQL_NOTIN = " NOT IN";
+    //String SQL_NOTIN = " FIND_IN_SET(%s, ?) = 0";//由于“FIND_IN_SET”无法使用索引 2020-06-17 改为“not in”语法 lin.liu
+
+
+    /**
+     * 并且“AND”
+     */
+    String SQL_AND = " AND";
+    /**
+     * 或者“OR”
+     */
+    String SQL_OR = " OR";
+
+    /**
+     * 逗号“,”
+     */
+    String SQL_STR_COMMA = " ,";
+    /**
+     * “ ASC”
+     */
+    String SQL_ASC = " ASC";
+    /**
+     * “ DESC”
+     */
+    String SQL_DESC = " DESC";
+    String TB_A = "a.";
+    String TB_B = "b.";
+    //********************************** SQL关键字 相关 **********************************
+
+
+
+
+
+
+    //********************************** redis 相关 **********************************
+    /**
+     * 分布式锁前缀
+     */
+    String REDIS_LOCKPREFIX = "lock_";
+    /**
+     * 分布式锁超时时间10秒
+     */
+    Long REDIS_LOCKTIMEOUT = 10 * 1000L;
+    /**
+     * token哈希key
+     */
+    String REDIS_HASH_TOKEN = "HASH_TOKEN";
+    /**
+     * 分布式锁超时时间24小时
+     */
+    Long REDIS_EXPIRE_DEFAULT = 24 * 60 * 60L;
+    //********************************** redis 相关 **********************************
+
+
+
+
+
+
+    //********************************** request请求 相关 **********************************
+    /**
+     * token存在于headers的键值
+     */
+    String REQUEST_TOKENKEY = "tokencode";
+    /**
+     * token过期时间
+     */
+    Long TOKEN_EXPIRE_DEFAULT = 2 * 60 * 60L;
+    /**
+     * 刷新token过期时间
+     */
+    Long LONG_TOKEN_EXPIRE_DEFAULT = 7 * 24 * 60 * 60L;
+    //********************************** request请求 相关 **********************************
+
+
+
+
+
+
+    //********************************** 正则表达式相关 **********************************
+    /**
+     * 字符串格式为日期“yyyy-MM-dd”的正则
+     */
+    String REGEX_DATE = "^[0-9]{4}\\-((0[1-9])|(1[0-2]))\\-((0[1-9])|(1[0-9])|(2[0-9])|(3[0-1]))$";
+    /**
+     * 字符串格式为时间“yyyy-MM-dd HH:mm:ss”的正则
+     */
+    String REGEX_DATETIME = "^[0-9]{4}\\-((0[1-9])|(1[0-2]))\\-((0[1-9])|([12][0-9])|(3[0-1]))\\s((0[0-9])|(1[0-9])|(2[0-3]))(\\:((0[0-9])|([1-5][0-9]))){2}$";
+    /**
+     * 字符串格式为完整时间“yyyy-MM-dd HH:mm:ss.SSS”的正则
+     */
+    String REGEX_DATETIME_FULL = "^[0-9]{4}\\-((0[1-9])|(1[0-2]))\\-((0[1-9])|([12][0-9])|(3[0-1]))\\s((0[0-9])|(1[0-9])|(2[0-3]))(\\:((0[0-9])|([1-5][0-9]))){2}\\.([0-9]){3}$";
+    /**
+     * 字符串格式为时间“/Date(1585790902913+0800)/”的正则
+     */
+    String REGEX_DATETIME_JAVA = "^/Date\\((?<timestamp>[0-9]{13})\\+([^\\)]+)\\)/$";
+    /**
+     * 字符串格式为时间“yyyy-MM-dd'T'HH:mm:ss+'Z'”的正则
+     */
+    String REGEX_DATETIME_ISO = "^^[0-9]{4}\\-((0[1-9])|(1[0-2]))\\-((0[1-9])|([12][0-9])|(3[0-1]))T((0[0-9])|(1[0-9])|(2[0-3]))(\\:((0[0-9])|([1-5][0-9]))){2}\\+[0-9]{2}:[0-9]{2}$";
+    /**
+     * 字符串格式为时间“yyyy-MM-dd'T'HH:mm:ss.SSS+'Z'”的正则
+     */
+    String REGEX_DATETIME_ISO_FULL = "^^[0-9]{4}\\-((0[1-9])|(1[0-2]))\\-((0[1-9])|([12][0-9])|(3[0-1]))T((0[0-9])|(1[0-9])|(2[0-3]))(\\:((0[0-9])|([1-5][0-9]))){2}\\.([0-9]){3}\\+[0-9]{2}:[0-9]{2}$";
+
+    //********************************** 正则表达式相关 **********************************
+
+
+
+
+    Integer NUM0 = 0;
+    Integer NUM1 = 1;
+    Integer NUM2 = 2;
+    Integer NUM3 = 3;
+    Integer NUM4 = 4;
+    Integer NUM5 = 5;
+    Integer NUM10 = 10;
+    Integer NUM15 = 15;
+    Integer NUM20 = 20;
+    Integer NUM30 = 30;
+    Integer NUM50 = 50;
+    Integer NUM60 = 60;
+    Integer NUM100 = 100;
+    Integer NUM200 = 200;
+    Integer NUM500 = 500;
+    Integer NUM1000 = 1000;
+    Integer NUM2000 = 2000;
+    Integer NUM5000 = 5000;
+    Integer NUM10000 = 10000;
+    Integer LENGTH_MAX10000 = 10000;
+    Integer LENGTH_MAX7000 = 7000;
+    Integer LENGTH_MAX5000 = 5000;
+    Integer LENGTH_MAX2000 = 2000;
+    Integer LENGTH_MAX1000 = 1000;
+    Integer LENGTH_MAX500 = 500;
+    Integer LENGTH_MAX200 = 200;
+    Integer LENGTH_MAX100 = 100;
+    Integer LENGTH_MAX50 = 50;
+    Integer LENGTH_MAX20 = 20;
+    Integer MONEY_MAX_LENGTH = 2;
+    Integer MAX_PAGE_SIZE = 999999;
+    Integer PAGE_SIZE_DEFAULT = 20;
+    Integer DEFAULT_NUM_PRECISION = 2;
+    Integer FILE_UNIT = 1024;
+    Integer FILE_SIZE_1M = 1024;
+    Integer FILE_SIZE_2M = 2 * 1024;
+    Integer FILE_SIZE_5M = 5 * 1024;
+    Integer FILE_SIZE_10M = 10 * 1024;
+    Integer FILE_SIZE_20M = 20 * 1024;
+    Integer FILE_SIZE_50M = 50 * 1024;
+    Integer FILE_SIZE_100M = 100 * 1024;
+    Integer FILE_SIZE_200M = 200 * 1024;
+    Integer TIME_LEN_1S = 1000;
+    Integer TIME_LEN_10S = 10 * 1000;
+    Integer TIME_LEN_1MIN = 60 * 1000;
+    Integer TIME_LEN_5MIN = 5 * 60 * 1000;
+    Integer TIME_LEN_10MIN = 10 * 60 * 1000;
+    Integer TIME_LEN_20MIN = 20 * 60 * 1000;
+    Integer TIME_LEN_50MIN = 50 * 60 * 1000;
+    Integer TIME_LEN_100MIN = 100 * 60 * 1000;
+    Integer TIME_LEN_1H = 60 * 60 * 1000;
+    Integer TIME_LEN_2H = 2 * 60 * 60 * 1000;
+    Integer TIME_LEN_12H = 12 * 60 * 60 * 1000;
+    Integer TIME_LEN_24H = 24 * 60 * 60 * 1000;
+}
+

+ 193 - 0
secure-producting-common/src/main/java/com/customs/cq/datacenter/common/constant/GenConstants.java

@@ -0,0 +1,193 @@
+package com.customs.cq.datacenter.common.constant;
+
+/**
+ * 代码生成通用常量
+ *
+ * @author ruoyi
+ */
+public interface GenConstants {
+    /**
+     * 单表(增删改查)
+     */
+    String TPL_CRUD = "crud";
+
+    /**
+     * 树表(增删改查)
+     */
+    String TPL_TREE = "tree";
+
+    /**
+     * 主子表(增删改查)
+     */
+    String TPL_SUB = "sub";
+
+    /**
+     * 树编码字段
+     */
+    String TREE_CODE = "treeCode";
+
+    /**
+     * 树父编码字段
+     */
+    String TREE_PARENT_CODE = "treeParentCode";
+
+    /**
+     * 树名称字段
+     */
+    String TREE_NAME = "treeName";
+
+    /**
+     * 上级菜单ID字段
+     */
+    String PARENT_MENU_ID = "parentMenuId";
+
+    /**
+     * 上级菜单名称字段
+     */
+    String PARENT_MENU_NAME = "parentMenuName";
+
+    /**
+     * 数据库字符串类型
+     */
+    String[] COLUMNTYPE_STR = {"char", "varchar", "nvarchar", "varchar2"};
+
+    /**
+     * 数据库文本类型
+     */
+    String[] COLUMNTYPE_TEXT = {"tinytext", "text", "mediumtext", "longtext"};
+
+    /**
+     * 数据库时间类型
+     */
+    String[] COLUMNTYPE_TIME = {"datetime", "time", "date", "timestamp"};
+
+    /**
+     * 数据库数字类型
+     */
+    String[] COLUMNTYPE_NUMBER = {"tinyint", "smallint", "mediumint", "int", "number", "integer",
+        "bit", "bigint", "float", "double", "decimal"};
+
+    /**
+     * BO对象 不需要添加字段
+     */
+    String[] COLUMNNAME_NOT_ADD = {"create_by", "create_time", "del_flag", "is_delete", "update_by",
+        "update_time", "version"};
+
+    /**
+     * BO对象 不需要编辑字段
+     */
+    String[] COLUMNNAME_NOT_EDIT = {"create_by", "create_time", "del_flag", "is_delete", "update_by",
+        "update_time", "version"};
+
+    /**
+     * VO对象 不需要返回字段
+     */
+    String[] COLUMNNAME_NOT_LIST = {"create_by", "create_time", "del_flag", "is_delete", "update_by",
+        "update_time", "version"};
+
+    /**
+     * BO对象 不需要查询字段
+     */
+    String[] COLUMNNAME_NOT_QUERY = {"id", "create_by", "create_time", "del_flag", "is_delete", "update_by",
+        "update_time", "remark", "version"};
+
+    /**
+     * Entity基类字段
+     */
+    String[] BASE_ENTITY = {"createBy", "createTime", "updateBy", "updateTime"};
+
+    /**
+     * Tree基类字段
+     */
+    String[] TREE_ENTITY = {"parentName", "parentId", "children"};
+
+    /**
+     * 文本框
+     */
+    String HTML_INPUT = "input";
+
+    /**
+     * 文本域
+     */
+    String HTML_TEXTAREA = "textarea";
+
+    /**
+     * 下拉框
+     */
+    String HTML_SELECT = "select";
+
+    /**
+     * 单选框
+     */
+    String HTML_RADIO = "radio";
+
+    /**
+     * 复选框
+     */
+    String HTML_CHECKBOX = "checkbox";
+
+    /**
+     * 日期控件
+     */
+    String HTML_DATETIME = "datetime";
+
+    /**
+     * 图片上传控件
+     */
+    String HTML_IMAGE_UPLOAD = "imageUpload";
+
+    /**
+     * 文件上传控件
+     */
+    String HTML_FILE_UPLOAD = "fileUpload";
+
+    /**
+     * 富文本控件
+     */
+    String HTML_EDITOR = "editor";
+
+    /**
+     * 字符串类型
+     */
+    String TYPE_STRING = "String";
+
+    /**
+     * 整型
+     */
+    String TYPE_INTEGER = "Integer";
+
+    /**
+     * 长整型
+     */
+    String TYPE_LONG = "Long";
+
+    /**
+     * 浮点型
+     */
+    String TYPE_DOUBLE = "Double";
+
+    /**
+     * 高精度计算类型
+     */
+    String TYPE_BIGDECIMAL = "BigDecimal";
+
+    /**
+     * 时间类型
+     */
+    String TYPE_DATE = "Date";
+
+    /**
+     * 模糊查询
+     */
+    String QUERY_LIKE = "LIKE";
+
+    /**
+     * 相等查询
+     */
+    String QUERY_EQ = "EQ";
+
+    /**
+     * 需要
+     */
+    String REQUIRE = "1";
+}

+ 93 - 0
secure-producting-common/src/main/java/com/customs/cq/datacenter/common/constant/HttpStatus.java

@@ -0,0 +1,93 @@
+package com.customs.cq.datacenter.common.constant;
+
+/**
+ * 返回状态码
+ *
+ * @author Lion
+ */
+public interface HttpStatus {
+    /**
+     * 操作成功
+     */
+    int SUCCESS = 200;
+
+    /**
+     * 对象创建成功
+     */
+    int CREATED = 201;
+
+    /**
+     * 请求已经被接受
+     */
+    int ACCEPTED = 202;
+
+    /**
+     * 操作已经执行成功,但是没有返回数据
+     */
+    int NO_CONTENT = 204;
+
+    /**
+     * 资源已被移除
+     */
+    int MOVED_PERM = 301;
+
+    /**
+     * 重定向
+     */
+    int SEE_OTHER = 303;
+
+    /**
+     * 资源没有被修改
+     */
+    int NOT_MODIFIED = 304;
+
+    /**
+     * 参数列表错误(缺少,格式不匹配)
+     */
+    int BAD_REQUEST = 400;
+
+    /**
+     * 未授权
+     */
+    int UNAUTHORIZED = 401;
+
+    /**
+     * 访问受限,授权过期
+     */
+    int FORBIDDEN = 403;
+
+    /**
+     * 资源,服务未找到
+     */
+    int NOT_FOUND = 404;
+
+    /**
+     * 不允许的http方法
+     */
+    int BAD_METHOD = 405;
+
+    /**
+     * 资源冲突,或者资源被锁
+     */
+    int CONFLICT = 409;
+
+    /**
+     * 不支持的数据,媒体类型
+     */
+    int UNSUPPORTED_TYPE = 415;
+
+    /**
+     * 系统内部错误
+     */
+    int ERROR = 500;
+
+    /**
+     * 接口未实现
+     */
+    int NOT_IMPLEMENTED = 501;
+
+    /**
+     * 系统警告消息
+     */
+    int WARN = 601;
+}

+ 30 - 0
secure-producting-common/src/main/java/com/customs/cq/datacenter/common/constant/TransConstant.java

@@ -0,0 +1,30 @@
+package com.customs.cq.datacenter.common.constant;
+
+/**
+ * 翻译常量
+ *
+ * @author Lion
+ */
+public interface TransConstant {
+
+    /**
+     * 用户id转账号
+     */
+    String USER_ID_TO_NAME = "user_id_to_name";
+
+    /**
+     * 部门id转名称
+     */
+    String DEPT_ID_TO_NAME = "dept_id_to_name";
+
+    /**
+     * 字典type转label
+     */
+    String DICT_TYPE_TO_LABEL = "dict_type_to_label";
+
+    /**
+     * ossId转url
+     */
+    String OSS_ID_TO_URL = "oss_id_to_url";
+
+}

+ 137 - 0
secure-producting-common/src/main/java/com/customs/cq/datacenter/common/constant/UserConstants.java

@@ -0,0 +1,137 @@
+package com.customs.cq.datacenter.common.constant;
+
+/**
+ * 用户常量信息
+ *
+ * @author ruoyi
+ */
+public interface UserConstants {
+
+    /**
+     * 平台内系统用户的唯一标志
+     */
+    String SYS_USER = "SYS_USER";
+
+    /**
+     * 正常状态
+     */
+    String NORMAL = "0";
+
+    /**
+     * 异常状态
+     */
+    String EXCEPTION = "1";
+
+    /**
+     * 用户正常状态
+     */
+    String USER_NORMAL = "0";
+
+    /**
+     * 用户封禁状态
+     */
+    String USER_DISABLE = "1";
+
+    /**
+     * 角色正常状态
+     */
+    String ROLE_NORMAL = "0";
+
+    /**
+     * 角色封禁状态
+     */
+    String ROLE_DISABLE = "1";
+
+    /**
+     * 部门正常状态
+     */
+    String DEPT_NORMAL = "0";
+
+    /**
+     * 部门停用状态
+     */
+    String DEPT_DISABLE = "1";
+
+    /**
+     * 字典正常状态
+     */
+    String DICT_NORMAL = "0";
+
+    /**
+     * 是否为系统默认(是)
+     */
+    String YES = "Y";
+
+    /**
+     * 是否菜单外链(是)
+     */
+    String YES_FRAME = "0";
+
+    /**
+     * 是否菜单外链(否)
+     */
+    String NO_FRAME = "1";
+
+    /**
+     * 菜单正常状态
+     */
+    String MENU_NORMAL = "0";
+
+    /**
+     * 菜单停用状态
+     */
+    String MENU_DISABLE = "1";
+
+    /**
+     * 菜单类型(目录)
+     */
+    String TYPE_DIR = "M";
+
+    /**
+     * 菜单类型(菜单)
+     */
+    String TYPE_MENU = "C";
+
+    /**
+     * 菜单类型(按钮)
+     */
+    String TYPE_BUTTON = "F";
+
+    /**
+     * Layout组件标识
+     */
+    String LAYOUT = "Layout";
+
+    /**
+     * ParentView组件标识
+     */
+    String PARENT_VIEW = "ParentView";
+
+    /**
+     * InnerLink组件标识
+     */
+    String INNER_LINK = "InnerLink";
+
+    /**
+     * 用户名长度限制
+     */
+    int USERNAME_MIN_LENGTH = 2;
+    int USERNAME_MAX_LENGTH = 20;
+
+    /**
+     * 密码长度限制
+     */
+    int PASSWORD_MIN_LENGTH = 5;
+    int PASSWORD_MAX_LENGTH = 20;
+
+    /**
+     * 管理员ID
+     */
+    Long ADMIN_ID = 1L;
+
+    /**
+     * 管理员角色key
+     */
+    String ADMIN_ROLE_KEY = "admin";
+
+}

+ 52 - 0
secure-producting-common/src/main/java/com/customs/cq/datacenter/common/convert/ExcelBigNumberConvert.java

@@ -0,0 +1,52 @@
+package com.customs.cq.datacenter.common.convert;
+
+import cn.hutool.core.convert.Convert;
+import cn.hutool.core.util.ObjectUtil;
+import com.alibaba.excel.converters.Converter;
+import com.alibaba.excel.enums.CellDataTypeEnum;
+import com.alibaba.excel.metadata.GlobalConfiguration;
+import com.alibaba.excel.metadata.data.ReadCellData;
+import com.alibaba.excel.metadata.data.WriteCellData;
+import com.alibaba.excel.metadata.property.ExcelContentProperty;
+import lombok.extern.slf4j.Slf4j;
+
+import java.math.BigDecimal;
+
+/**
+ * 大数值转换
+ * Excel 数值长度位15位 大于15位的数值转换位字符串
+ *
+ * @author Lion
+ */
+@Slf4j
+public class ExcelBigNumberConvert implements Converter<Long> {
+
+    @Override
+    public Class<Long> supportJavaTypeKey() {
+        return Long.class;
+    }
+
+    @Override
+    public CellDataTypeEnum supportExcelTypeKey() {
+        return CellDataTypeEnum.STRING;
+    }
+
+    @Override
+    public Long convertToJavaData(ReadCellData<?> cellData, ExcelContentProperty contentProperty, GlobalConfiguration globalConfiguration) {
+        return Convert.toLong(cellData.getData());
+    }
+
+    @Override
+    public WriteCellData<Object> convertToExcelData(Long object, ExcelContentProperty contentProperty, GlobalConfiguration globalConfiguration) {
+        if (ObjectUtil.isNotNull(object)) {
+            String str = Convert.toStr(object);
+            if (str.length() > 15) {
+                return new WriteCellData<>(str);
+            }
+        }
+        WriteCellData<Object> cellData = new WriteCellData<>(new BigDecimal(object));
+        cellData.setType(CellDataTypeEnum.NUMBER);
+        return cellData;
+    }
+
+}

+ 73 - 0
secure-producting-common/src/main/java/com/customs/cq/datacenter/common/convert/ExcelDictConvert.java

@@ -0,0 +1,73 @@
+package com.customs.cq.datacenter.common.convert;
+
+import cn.hutool.core.annotation.AnnotationUtil;
+import cn.hutool.core.convert.Convert;
+import cn.hutool.core.util.ObjectUtil;
+import com.alibaba.excel.converters.Converter;
+import com.alibaba.excel.enums.CellDataTypeEnum;
+import com.alibaba.excel.metadata.GlobalConfiguration;
+import com.alibaba.excel.metadata.data.ReadCellData;
+import com.alibaba.excel.metadata.data.WriteCellData;
+import com.alibaba.excel.metadata.property.ExcelContentProperty;
+import com.customs.cq.datacenter.common.annotation.ExcelDictFormat;
+import com.customs.cq.datacenter.common.core.service.DictService;
+import com.customs.cq.datacenter.common.utils.StringUtils;
+import com.customs.cq.datacenter.common.utils.poi.ExcelUtil;
+import com.customs.cq.datacenter.common.utils.spring.SpringUtils;
+import lombok.extern.slf4j.Slf4j;
+
+import java.lang.reflect.Field;
+
+/**
+ * 字典格式化转换处理
+ *
+ * @author Lion
+ */
+@Slf4j
+public class ExcelDictConvert implements Converter<Object> {
+
+    @Override
+    public Class<Object> supportJavaTypeKey() {
+        return Object.class;
+    }
+
+    @Override
+    public CellDataTypeEnum supportExcelTypeKey() {
+        return null;
+    }
+
+    @Override
+    public Object convertToJavaData(ReadCellData<?> cellData, ExcelContentProperty contentProperty, GlobalConfiguration globalConfiguration) {
+        ExcelDictFormat anno = getAnnotation(contentProperty.getField());
+        String type = anno.dictType();
+        String label = cellData.getStringValue();
+        String value;
+        if (StringUtils.isBlank(type)) {
+            value = ExcelUtil.reverseByExp(label, anno.readConverterExp(), anno.separator());
+        } else {
+            value = SpringUtils.getBean(DictService.class).getDictValue(type, label, anno.separator());
+        }
+        return Convert.convert(contentProperty.getField().getType(), value);
+    }
+
+    @Override
+    public WriteCellData<String> convertToExcelData(Object object, ExcelContentProperty contentProperty, GlobalConfiguration globalConfiguration) {
+        if (ObjectUtil.isNull(object)) {
+            return new WriteCellData<>("");
+        }
+        ExcelDictFormat anno = getAnnotation(contentProperty.getField());
+        String type = anno.dictType();
+        String value = Convert.toStr(object);
+        String label;
+        if (StringUtils.isBlank(type)) {
+            label = ExcelUtil.convertByExp(value, anno.readConverterExp(), anno.separator());
+        } else {
+            label = SpringUtils.getBean(DictService.class).getDictLabel(type, value, anno.separator());
+        }
+        return new WriteCellData<>(label);
+    }
+
+    private ExcelDictFormat getAnnotation(Field field) {
+        return AnnotationUtil.getAnnotation(field, ExcelDictFormat.class);
+    }
+}

+ 97 - 0
secure-producting-common/src/main/java/com/customs/cq/datacenter/common/convert/ExcelEnumConvert.java

@@ -0,0 +1,97 @@
+package com.customs.cq.datacenter.common.convert;
+
+import cn.hutool.core.annotation.AnnotationUtil;
+import cn.hutool.core.convert.Convert;
+import cn.hutool.core.util.ObjectUtil;
+import com.alibaba.excel.converters.Converter;
+import com.alibaba.excel.enums.CellDataTypeEnum;
+import com.alibaba.excel.metadata.GlobalConfiguration;
+import com.alibaba.excel.metadata.data.ReadCellData;
+import com.alibaba.excel.metadata.data.WriteCellData;
+import com.alibaba.excel.metadata.property.ExcelContentProperty;
+import com.customs.cq.datacenter.common.annotation.ExcelEnumFormat;
+import com.customs.cq.datacenter.common.utils.reflect.ReflectUtils;
+import lombok.extern.slf4j.Slf4j;
+
+import java.lang.reflect.Field;
+import java.util.HashMap;
+import java.util.Map;
+
+/**
+ * 枚举格式化转换处理
+ *
+ * @author Liang
+ */
+@Slf4j
+public class ExcelEnumConvert implements Converter<Object> {
+
+    @Override
+    public Class<Object> supportJavaTypeKey() {
+        return Object.class;
+    }
+
+    @Override
+    public CellDataTypeEnum supportExcelTypeKey() {
+        return null;
+    }
+
+    @Override
+    public Object convertToJavaData(ReadCellData<?> cellData, ExcelContentProperty contentProperty, GlobalConfiguration globalConfiguration) {
+        cellData.checkEmpty();
+        // Excel中填入的是枚举中指定的描述
+        Object textValue = null;
+        switch (cellData.getType()) {
+            case STRING:
+            case DIRECT_STRING:
+            case RICH_TEXT_STRING:
+                textValue = cellData.getStringValue();
+                break;
+            case NUMBER:
+                textValue = cellData.getNumberValue();
+                break;
+            case BOOLEAN:
+                textValue = cellData.getBooleanValue();
+                break;
+            default:
+                throw new IllegalArgumentException("单元格类型异常!");
+        }
+        // 如果是空值
+        if (ObjectUtil.isNull(textValue)) {
+            return null;
+        }
+        Map<Object, String> enumCodeToTextMap = beforeConvert(contentProperty);
+        // 从Java输出至Excel是code转text
+        // 因此从Excel转Java应该将text与code对调
+        Map<Object, Object> enumTextToCodeMap = new HashMap<>();
+        enumCodeToTextMap.forEach((key, value) -> enumTextToCodeMap.put(value, key));
+        // 应该从text -> code中查找
+        Object codeValue = enumTextToCodeMap.get(textValue);
+        return Convert.convert(contentProperty.getField().getType(), codeValue);
+    }
+
+    @Override
+    public WriteCellData<String> convertToExcelData(Object object, ExcelContentProperty contentProperty, GlobalConfiguration globalConfiguration) {
+        if (ObjectUtil.isNull(object)) {
+            return new WriteCellData<>("");
+        }
+        Map<Object, String> enumValueMap = beforeConvert(contentProperty);
+        String value = Convert.toStr(enumValueMap.get(object), "");
+        return new WriteCellData<>(value);
+    }
+
+    private Map<Object, String> beforeConvert(ExcelContentProperty contentProperty) {
+        ExcelEnumFormat anno = getAnnotation(contentProperty.getField());
+        Map<Object, String> enumValueMap = new HashMap<>();
+        Enum<?>[] enumConstants = anno.enumClass().getEnumConstants();
+        for (Enum<?> enumConstant : enumConstants) {
+            Object codeValue = ReflectUtils.invokeGetter(enumConstant, anno.codeField());
+            String textValue = ReflectUtils.invokeGetter(enumConstant, anno.textField());
+            enumValueMap.put(codeValue, textValue);
+        }
+        return enumValueMap;
+    }
+
+    private ExcelEnumFormat getAnnotation(Field field) {
+        return AnnotationUtil.getAnnotation(field, ExcelEnumFormat.class);
+    }
+}

+ 69 - 0
secure-producting-common/src/main/java/com/customs/cq/datacenter/common/core/controller/BaseController.java

@@ -0,0 +1,69 @@
+package com.customs.cq.datacenter.common.core.controller;
+
+import com.customs.cq.datacenter.common.core.domain.R;
+import com.customs.cq.datacenter.common.core.domain.model.LoginUser;
+import com.customs.cq.datacenter.common.helper.LoginHelper;
+import com.customs.cq.datacenter.common.utils.StringUtils;
+
+/**
+ * web层通用数据处理
+ *
+ * @author Lion
+ */
+public class BaseController {
+
+    /**
+     * 响应返回结果
+     *
+     * @param rows 影响行数
+     * @return 操作结果
+     */
+    protected R<Void> toAjax(int rows) {
+        return rows > 0 ? R.ok() : R.fail();
+    }
+
+    /**
+     * 响应返回结果
+     *
+     * @param result 结果
+     * @return 操作结果
+     */
+    protected R<Void> toAjax(boolean result) {
+        return result ? R.ok() : R.fail();
+    }
+
+    /**
+     * 页面跳转
+     */
+    public String redirect(String url) {
+        return StringUtils.format("redirect:{}", url);
+    }
+
+    /**
+     * 获取用户缓存信息
+     */
+    public LoginUser getLoginUser() {
+        return LoginHelper.getLoginUser();
+    }
+
+    /**
+     * 获取登录用户id
+     */
+    public Long getUserId() {
+        return LoginHelper.getUserId();
+    }
+
+    /**
+     * 获取登录部门id
+     */
+    public Long getDeptId() {
+        return LoginHelper.getDeptId();
+    }
+
+    /**
+     * 获取登录用户名
+     */
+    public String getUsername() {
+        return LoginHelper.getUsername();
+    }
+}

+ 59 - 0
secure-producting-common/src/main/java/com/customs/cq/datacenter/common/core/controller/BasicController.java

@@ -0,0 +1,59 @@
+package com.customs.cq.datacenter.common.core.controller;
+
+import com.customs.cq.datacenter.common.ExecutedResult;
+import org.springframework.web.context.request.RequestAttributes;
+import org.springframework.web.context.request.RequestContextHolder;
+import org.springframework.web.context.request.ServletRequestAttributes;
+
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+
+/**
+ * 基础控制器
+ */
+public class BasicController {
+
+    /**
+     * 获取当前请求上下文的“HttpServletRequest”对象
+     */
+    protected HttpServletRequest ServletRequest() {
+        RequestAttributes reqAttributes = RequestContextHolder.currentRequestAttributes();
+        if (null == reqAttributes) {
+            return null;
+        }
+        ServletRequestAttributes servletReqAttributes = (ServletRequestAttributes)reqAttributes;
+        return servletReqAttributes.getRequest();
+    }
+
+    /**
+     * 获取当前请求上下文的“HttpServletResponse”对象
+     */
+    protected HttpServletResponse ServletResponse() {
+        RequestAttributes reqAttributes = RequestContextHolder.currentRequestAttributes();
+        if (null == reqAttributes) {
+            return null;
+        }
+        ServletRequestAttributes servletReqAttributes = (ServletRequestAttributes)reqAttributes;
+        return servletReqAttributes.getResponse();
+    }
+
+//    protected String getToken() {
+//        return this.ServletRequest().getHeader(SysConfig.getTokenHeader());
+//    }
+
+    protected String getHeader(String key) {
+        return this.ServletRequest().getHeader(key);
+    }
+
+//    protected LoginUserDTO getTokenUser() {
+//        return JWTUtil.getUser(this.getToken());
+//    }
+
+    protected <T> ExecutedResult<T> success(T data) {
+        return ExecutedResult.success(data);
+    }
+
+    protected <T> ExecutedResult<T> failed(String msg) {
+        return ExecutedResult.failed(msg);
+    }
+}

+ 63 - 0
secure-producting-common/src/main/java/com/customs/cq/datacenter/common/core/domain/BaseEntity.java

@@ -0,0 +1,63 @@
+package com.customs.cq.datacenter.common.core.domain;
+
+import com.baomidou.mybatisplus.annotation.FieldFill;
+import com.baomidou.mybatisplus.annotation.TableField;
+import com.fasterxml.jackson.annotation.JsonIgnore;
+import com.fasterxml.jackson.annotation.JsonInclude;
+import lombok.Data;
+
+import java.io.Serializable;
+import java.time.LocalDateTime;
+import java.util.HashMap;
+import java.util.Map;
+
+/**
+ * Entity基类
+ *
+ * @author Lion
+ */
+
+@Data
+public class BaseEntity implements Serializable {
+
+    private static final long serialVersionUID = 1L;
+
+    /**
+     * 搜索值
+     */
+    @JsonIgnore
+    @TableField(exist = false)
+    private String searchValue;
+
+    /**
+     * 创建者
+     */
+    @TableField(fill = FieldFill.INSERT)
+    private String createBy;
+
+    /**
+     * 创建时间
+     */
+    @TableField(fill = FieldFill.INSERT)
+    private LocalDateTime createTime;
+
+    /**
+     * 更新者
+     */
+    @TableField(fill = FieldFill.INSERT_UPDATE)
+    private String updateBy;
+
+    /**
+     * 更新时间
+     */
+    @TableField(fill = FieldFill.INSERT_UPDATE)
+    private LocalDateTime updateTime;
+
+    /**
+     * 请求参数
+     */
+    @JsonInclude(JsonInclude.Include.NON_EMPTY)
+    @TableField(exist = false)
+    private Map<String, Object> params = new HashMap<>();
+
+}

+ 112 - 0
secure-producting-common/src/main/java/com/customs/cq/datacenter/common/core/domain/PageQuery.java

@@ -0,0 +1,112 @@
+package com.customs.cq.datacenter.common.core.domain;
+
+import cn.hutool.core.collection.CollUtil;
+import cn.hutool.core.util.ObjectUtil;
+import com.baomidou.mybatisplus.core.metadata.OrderItem;
+import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
+import com.customs.cq.datacenter.common.exception.ServiceException;
+import com.customs.cq.datacenter.common.utils.StringUtils;
+import com.customs.cq.datacenter.common.utils.sql.SqlUtil;
+import lombok.Data;
+
+import java.io.Serializable;
+import java.util.ArrayList;
+import java.util.List;
+
+/**
+ * 分页查询实体类
+ *
+ * @author Lion
+ */
+
+@Data
+public class PageQuery implements Serializable {
+
+    private static final long serialVersionUID = 1L;
+
+    /**
+     * 分页大小
+     */
+    private Integer pageSize;
+
+    /**
+     * 当前页数
+     */
+    private Integer pageNum;
+
+    /**
+     * 排序列
+     */
+    private String orderByColumn;
+
+    /**
+     * 排序的方向desc或者asc
+     */
+    private String isAsc;
+
+    /**
+     * 当前记录起始索引 默认值
+     */
+    public static final int DEFAULT_PAGE_NUM = 1;
+
+    /**
+     * 每页显示记录数 默认值 默认查全部
+     */
+    public static final int DEFAULT_PAGE_SIZE = Integer.MAX_VALUE;
+
+    public <T> Page<T> build() {
+        Integer pageNum = ObjectUtil.defaultIfNull(getPageNum(), DEFAULT_PAGE_NUM);
+        Integer pageSize = ObjectUtil.defaultIfNull(getPageSize(), DEFAULT_PAGE_SIZE);
+        if (pageNum <= 0) {
+            pageNum = DEFAULT_PAGE_NUM;
+        }
+        Page<T> page = new Page<>(pageNum, pageSize);
+        List<OrderItem> orderItems = buildOrderItem();
+        if (CollUtil.isNotEmpty(orderItems)) {
+            page.addOrder(orderItems);
+        }
+        return page;
+    }
+
+    /**
+     * 构建排序
+     *
+     * 支持的用法如下:
+     * {isAsc:"asc",orderByColumn:"id"} order by id asc
+     * {isAsc:"asc",orderByColumn:"id,createTime"} order by id asc,create_time asc
+     * {isAsc:"desc",orderByColumn:"id,createTime"} order by id desc,create_time desc
+     * {isAsc:"asc,desc",orderByColumn:"id,createTime"} order by id asc,create_time desc
+     */
+    private List<OrderItem> buildOrderItem() {
+        if (StringUtils.isBlank(orderByColumn) || StringUtils.isBlank(isAsc)) {
+            return null;
+        }
+        String orderBy = SqlUtil.escapeOrderBySql(orderByColumn);
+        orderBy = StringUtils.toUnderScoreCase(orderBy);
+
+        // 兼容前端排序类型
+        isAsc = StringUtils.replaceEach(isAsc, new String[]{"ascending", "descending"}, new String[]{"asc", "desc"});
+
+        String[] orderByArr = orderBy.split(StringUtils.SEPARATOR);
+        String[] isAscArr = isAsc.split(StringUtils.SEPARATOR);
+        if (isAscArr.length != 1 && isAscArr.length != orderByArr.length) {
+            throw new ServiceException("排序参数有误");
+        }
+
+        List<OrderItem> list = new ArrayList<>();
+        // 每个字段各自排序
+        for (int i = 0; i < orderByArr.length; i++) {
+            String orderByStr = orderByArr[i];
+            String isAscStr = isAscArr.length == 1 ? isAscArr[0] : isAscArr[i];
+            if ("asc".equals(isAscStr)) {
+                list.add(OrderItem.asc(orderByStr));
+            } else if ("desc".equals(isAscStr)) {
+                list.add(OrderItem.desc(orderByStr));
+            } else {
+                throw new ServiceException("排序参数有误");
+            }
+        }
+        return list;
+    }
+
+}

+ 107 - 0
secure-producting-common/src/main/java/com/customs/cq/datacenter/common/core/domain/R.java

@@ -0,0 +1,107 @@
+package com.customs.cq.datacenter.common.core.domain;
+
+import com.customs.cq.datacenter.common.constant.HttpStatus;
+import lombok.Data;
+import lombok.NoArgsConstructor;
+
+import java.io.Serializable;
+
+/**
+ * 响应信息主体
+ *
+ * @author Lion
+ */
+@Data
+@NoArgsConstructor
+public class R<T> implements Serializable {
+    private static final long serialVersionUID = 1L;
+
+    /**
+     * 成功
+     */
+    public static final int SUCCESS = 200;
+
+    /**
+     * 失败
+     */
+    public static final int FAIL = 500;
+
+    private int code;
+
+    private String msg;
+
+    private T data;
+
+    public static <T> R<T> ok() {
+        return restResult(null, SUCCESS, "操作成功");
+    }
+
+    public static <T> R<T> ok(T data) {
+        return restResult(data, SUCCESS, "操作成功");
+    }
+
+    public static <T> R<T> ok(String msg) {
+        return restResult(null, SUCCESS, msg);
+    }
+
+    public static <T> R<T> ok(String msg, T data) {
+        return restResult(data, SUCCESS, msg);
+    }
+
+    public static <T> R<T> fail() {
+        return restResult(null, FAIL, "操作失败");
+    }
+
+    public static <T> R<T> fail(String msg) {
+        return restResult(null, FAIL, msg);
+    }
+
+    public static <T> R<T> fail(T data) {
+        return restResult(data, FAIL, "操作失败");
+    }
+
+    public static <T> R<T> fail(String msg, T data) {
+        return restResult(data, FAIL, msg);
+    }
+
+    public static <T> R<T> fail(int code, String msg) {
+        return restResult(null, code, msg);
+    }
+
+    /**
+     * 返回警告消息
+     *
+     * @param msg 返回内容
+     * @return 警告消息
+     */
+    public static <T> R<T> warn(String msg) {
+        return restResult(null, HttpStatus.WARN, msg);
+    }
+
+    /**
+     * 返回警告消息
+     *
+     * @param msg 返回内容
+     * @param data 数据对象
+     * @return 警告消息
+     */
+    public static <T> R<T> warn(String msg, T data) {
+        return restResult(data, HttpStatus.WARN, msg);
+    }
+
+    private static <T> R<T> restResult(T data, int code, String msg) {
+        R<T> r = new R<>();
+        r.setCode(code);
+        r.setData(data);
+        r.setMsg(msg);
+        return r;
+    }
+
+    public static <T> Boolean isError(R<T> ret) {
+        return !isSuccess(ret);
+    }
+
+    public static <T> Boolean isSuccess(R<T> ret) {
+        return R.SUCCESS == ret.getCode();
+    }
+}

+ 39 - 0
secure-producting-common/src/main/java/com/customs/cq/datacenter/common/core/domain/TreeEntity.java

@@ -0,0 +1,39 @@
+package com.customs.cq.datacenter.common.core.domain;
+
+import com.baomidou.mybatisplus.annotation.TableField;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+
+import java.util.ArrayList;
+import java.util.List;
+
+/**
+ * Tree基类
+ *
+ * @author Lion
+ */
+
+@Data
+@EqualsAndHashCode(callSuper = true)
+public class TreeEntity<T> extends BaseEntity {
+
+    private static final long serialVersionUID = 1L;
+
+    /**
+     * 父菜单名称
+     */
+    @TableField(exist = false)
+    private String parentName;
+
+    /**
+     * 父菜单ID
+     */
+    private Long parentId;
+
+    /**
+     * 子部门
+     */
+    @TableField(exist = false)
+    private List<T> children = new ArrayList<>();
+
+}

+ 38 - 0
secure-producting-common/src/main/java/com/customs/cq/datacenter/common/core/domain/dto/RoleDTO.java

@@ -0,0 +1,38 @@
+package com.customs.cq.datacenter.common.core.domain.dto;
+
+import lombok.Data;
+import lombok.NoArgsConstructor;
+
+import java.io.Serializable;
+
+/**
+ * 角色
+ *
+ * @author Lion
+ */
+
+@Data
+@NoArgsConstructor
+public class RoleDTO implements Serializable {
+
+    /**
+     * 角色ID
+     */
+    private Long roleId;
+
+    /**
+     * 角色名称
+     */
+    private String roleName;
+
+    /**
+     * 角色权限
+     */
+    private String roleKey;
+
+    /**
+     * 数据范围(1:所有数据权限;2:自定义数据权限;3:本部门数据权限;4:本部门及以下数据权限;5:仅本人数据权限)
+     */
+    private String dataScope;
+
+}

+ 60 - 0
secure-producting-common/src/main/java/com/customs/cq/datacenter/common/core/domain/dto/UserOnlineDTO.java

@@ -0,0 +1,60 @@
+package com.customs.cq.datacenter.common.core.domain.dto;
+
+import lombok.Data;
+import lombok.NoArgsConstructor;
+
+import java.io.Serializable;
+
+/**
+ * 当前在线会话
+ *
+ * @author ruoyi
+ */
+
+@Data
+@NoArgsConstructor
+public class UserOnlineDTO implements Serializable {
+
+    private static final long serialVersionUID = 1L;
+
+    /**
+     * 会话编号
+     */
+    private String tokenId;
+
+    /**
+     * 部门名称
+     */
+    private String deptName;
+
+    /**
+     * 用户名称
+     */
+    private String userName;
+
+    /**
+     * 登录IP地址
+     */
+    private String ipaddr;
+
+    /**
+     * 登录地址
+     */
+    private String loginLocation;
+
+    /**
+     * 浏览器类型
+     */
+    private String browser;
+
+    /**
+     * 操作系统
+     */
+    private String os;
+
+    /**
+     * 登录时间
+     */
+    private Long loginTime;
+
+}

+ 88 - 0
secure-producting-common/src/main/java/com/customs/cq/datacenter/common/core/domain/entity/SysDept.java

@@ -0,0 +1,88 @@
+package com.customs.cq.datacenter.common.core.domain.entity;
+
+import com.baomidou.mybatisplus.annotation.TableId;
+import com.baomidou.mybatisplus.annotation.TableLogic;
+import com.baomidou.mybatisplus.annotation.TableName;
+import com.customs.cq.datacenter.common.core.domain.TreeEntity;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+
+import javax.validation.constraints.Email;
+import javax.validation.constraints.NotBlank;
+import javax.validation.constraints.NotNull;
+import javax.validation.constraints.Size;
+
+/**
+ * 部门表 sys_dept
+ *
+ * @author Lion
+ */
+
+@Data
+@EqualsAndHashCode(callSuper = true)
+@TableName("sys_dept")
+public class SysDept extends TreeEntity<SysDept> {
+    private static final long serialVersionUID = 1L;
+
+    /**
+     * 部门ID
+     */
+    @TableId(value = "dept_id")
+    private Long deptId;
+
+    /**
+     * 部门名称
+     */
+    @NotBlank(message = "部门名称不能为空")
+    @Size(min = 0, max = 30, message = "部门名称长度不能超过{max}个字符")
+    private String deptName;
+
+    /**
+     * 显示顺序
+     */
+    @NotNull(message = "显示顺序不能为空")
+    private Integer orderNum;
+
+    /**
+     * 负责人
+     */
+    private String leader;
+
+    /**
+     * 联系电话
+     */
+    @Size(min = 0, max = 11, message = "联系电话长度不能超过{max}个字符")
+    private String phone;
+
+    /**
+     * 邮箱
+     */
+    @Email(message = "邮箱格式不正确")
+    @Size(min = 0, max = 50, message = "邮箱长度不能超过{max}个字符")
+    private String email;
+
+    /**
+     * 部门状态:0正常,1停用
+     */
+    private String status;
+
+    /**
+     * 祖级列表
+     */
+    private String ancestors;
+    /**
+     * h4a guid
+     */
+    private String guid;
+
+    /**
+     * h4a guid
+     */
+    private String allPathName;
+
+    /**
+     * 是否删除(逻辑删除)
+     */
+    @TableLogic
+    private Integer isDelete;
+}

+ 107 - 0
secure-producting-common/src/main/java/com/customs/cq/datacenter/common/core/domain/entity/SysDictData.java

@@ -0,0 +1,107 @@
+package com.customs.cq.datacenter.common.core.domain.entity;
+
+import com.alibaba.excel.annotation.ExcelIgnoreUnannotated;
+import com.alibaba.excel.annotation.ExcelProperty;
+import com.baomidou.mybatisplus.annotation.TableId;
+import com.baomidou.mybatisplus.annotation.TableLogic;
+import com.baomidou.mybatisplus.annotation.TableName;
+import com.customs.cq.datacenter.common.annotation.ExcelDictFormat;
+import com.customs.cq.datacenter.common.constant.UserConstants;
+import com.customs.cq.datacenter.common.convert.ExcelDictConvert;
+import com.customs.cq.datacenter.common.core.domain.BaseEntity;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+
+import javax.validation.constraints.NotBlank;
+import javax.validation.constraints.Size;
+
+/**
+ * 字典数据表 sys_dict_data
+ *
+ * @author Lion
+ */
+
+@Data
+@EqualsAndHashCode(callSuper = true)
+@TableName("sys_dict_data")
+@ExcelIgnoreUnannotated
+public class SysDictData extends BaseEntity {
+
+    /**
+     * 字典编码
+     */
+    @ExcelProperty(value = "字典编码")
+    @TableId(value = "dict_code")
+    private Long dictCode;
+
+    /**
+     * 字典排序
+     */
+    @ExcelProperty(value = "字典排序")
+    private Integer dictSort;
+
+    /**
+     * 字典标签
+     */
+    @ExcelProperty(value = "字典标签")
+    @NotBlank(message = "字典标签不能为空")
+    @Size(min = 0, max = 100, message = "字典标签长度不能超过{max}个字符")
+    private String dictLabel;
+
+    /**
+     * 字典键值
+     */
+    @ExcelProperty(value = "字典键值")
+    @NotBlank(message = "字典键值不能为空")
+    @Size(min = 0, max = 100, message = "字典键值长度不能超过{max}个字符")
+    private String dictValue;
+
+    /**
+     * 字典类型
+     */
+    @ExcelProperty(value = "字典类型")
+    @NotBlank(message = "字典类型不能为空")
+    @Size(min = 0, max = 100, message = "字典类型长度不能超过{max}个字符")
+    private String dictType;
+
+    /**
+     * 样式属性(其他样式扩展)
+     */
+    @Size(min = 0, max = 100, message = "样式属性长度不能超过{max}个字符")
+    private String cssClass;
+
+    /**
+     * 表格字典样式
+     */
+    private String listClass;
+
+    /**
+     * 是否默认(Y是 N否)
+     */
+    @ExcelProperty(value = "是否默认", converter = ExcelDictConvert.class)
+    @ExcelDictFormat(dictType = "sys_yes_no")
+    private String isDefault;
+
+    /**
+     * 状态(0正常 1停用)
+     */
+    @ExcelProperty(value = "状态", converter = ExcelDictConvert.class)
+    @ExcelDictFormat(dictType = "sys_normal_disable")
+    private String status;
+
+    /**
+     * 备注
+     */
+    private String remark;
+
+    /**
+     * 是否删除(逻辑删除)
+     */
+    @TableLogic
+    private Integer isDelete;
+
+    public boolean getDefault() {
+        return UserConstants.YES.equals(this.isDefault);
+    }
+
+}

+ 71 - 0
secure-producting-common/src/main/java/com/customs/cq/datacenter/common/core/domain/entity/SysDictType.java

@@ -0,0 +1,71 @@
+package com.customs.cq.datacenter.common.core.domain.entity;
+
+import com.alibaba.excel.annotation.ExcelIgnoreUnannotated;
+import com.alibaba.excel.annotation.ExcelProperty;
+import com.baomidou.mybatisplus.annotation.TableId;
+import com.baomidou.mybatisplus.annotation.TableLogic;
+import com.baomidou.mybatisplus.annotation.TableName;
+import com.customs.cq.datacenter.common.annotation.ExcelDictFormat;
+import com.customs.cq.datacenter.common.convert.ExcelDictConvert;
+import com.customs.cq.datacenter.common.core.domain.BaseEntity;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+
+import javax.validation.constraints.NotBlank;
+import javax.validation.constraints.Pattern;
+import javax.validation.constraints.Size;
+
+/**
+ * 字典类型表 sys_dict_type
+ *
+ * @author Lion
+ */
+
+@Data
+@EqualsAndHashCode(callSuper = true)
+@TableName("sys_dict_type")
+@ExcelIgnoreUnannotated
+public class SysDictType extends BaseEntity {
+
+    /**
+     * 字典主键
+     */
+    @ExcelProperty(value = "字典主键")
+    @TableId(value = "dict_id")
+    private Long dictId;
+
+    /**
+     * 字典名称
+     */
+    @ExcelProperty(value = "字典名称")
+    @NotBlank(message = "字典名称不能为空")
+    @Size(min = 0, max = 100, message = "字典类型名称长度不能超过{max}个字符")
+    private String dictName;
+
+    /**
+     * 字典类型
+     */
+    @ExcelProperty(value = "字典类型")
+    @NotBlank(message = "字典类型不能为空")
+    @Size(min = 0, max = 100, message = "字典类型类型长度不能超过{max}个字符")
+    @Pattern(regexp = "^[a-z][a-z0-9_]*$", message = "字典类型必须以字母开头,且只能为(小写字母,数字,下滑线)")
+    private String dictType;
+
+    /**
+     * 状态(0正常 1停用)
+     */
+    @ExcelProperty(value = "状态", converter = ExcelDictConvert.class)
+    @ExcelDictFormat(dictType = "sys_normal_disable")
+    private String status;
+
+    /**
+     * 备注
+     */
+    private String remark;
+
+    /**
+     * 是否删除(逻辑删除)
+     */
+    @TableLogic
+    private Integer isDelete;
+}

+ 114 - 0
secure-producting-common/src/main/java/com/customs/cq/datacenter/common/core/domain/entity/SysMenu.java

@@ -0,0 +1,114 @@
+package com.customs.cq.datacenter.common.core.domain.entity;
+
+import com.baomidou.mybatisplus.annotation.TableId;
+import com.baomidou.mybatisplus.annotation.TableLogic;
+import com.baomidou.mybatisplus.annotation.TableName;
+import com.customs.cq.datacenter.common.core.domain.TreeEntity;
+import com.fasterxml.jackson.annotation.JsonInclude;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+
+import javax.validation.constraints.NotBlank;
+import javax.validation.constraints.NotNull;
+import javax.validation.constraints.Size;
+
+/**
+ * 菜单权限表 sys_menu
+ *
+ * @author Lion
+ */
+
+@Data
+@EqualsAndHashCode(callSuper = true)
+@TableName("sys_menu")
+public class SysMenu extends TreeEntity<SysMenu> {
+
+    /**
+     * 菜单ID
+     */
+    @TableId(value = "menu_id")
+    private Long menuId;
+
+    /**
+     * 菜单名称
+     */
+    @NotBlank(message = "菜单名称不能为空")
+    @Size(min = 0, max = 50, message = "菜单名称长度不能超过{max}个字符")
+    private String menuName;
+
+    /**
+     * 显示顺序
+     */
+    @NotNull(message = "显示顺序不能为空")
+    private Integer orderNum;
+
+    /**
+     * 路由地址
+     */
+    @Size(min = 0, max = 200, message = "路由地址不能超过{max}个字符")
+    private String path;
+
+    /**
+     * 组件路径
+     */
+    @Size(min = 0, max = 200, message = "组件路径不能超过{max}个字符")
+    private String component;
+
+    /**
+     * 路由参数
+     */
+    private String queryParam;
+
+    /**
+     * 是否为外链(0是 1否)
+     */
+    private String isFrame;
+
+    /**
+     * 是否缓存(0缓存 1不缓存)
+     */
+    private String isCache;
+
+    /**
+     * 类型(M目录 C菜单 F按钮)
+     */
+    @NotBlank(message = "菜单类型不能为空")
+    private String menuType;
+
+    /**
+     * 显示状态(0显示 1隐藏)
+     */
+    private String visible;
+
+    /**
+     * 菜单状态(0正常 1停用)
+     */
+    private String status;
+
+    /**
+     * 权限字符串
+     */
+    @JsonInclude(JsonInclude.Include.NON_NULL)
+    @Size(min = 0, max = 200, message = "权限标识长度不能超过{max}个字符")
+    private String perms;
+
+    /**
+     * 菜单图标
+     */
+    private String icon;
+
+    /**
+     * 备注
+     */
+    private String remark;
+    /**
+    * h4aguid
+    */
+    private String guid;
+
+    /**
+     * 是否删除(逻辑删除)
+     */
+    @TableLogic
+    private Integer isDelete;
+}

+ 128 - 0
secure-producting-common/src/main/java/com/customs/cq/datacenter/common/core/domain/entity/SysRole.java

@@ -0,0 +1,128 @@
+package com.customs.cq.datacenter.common.core.domain.entity;
+
+import com.alibaba.excel.annotation.ExcelIgnoreUnannotated;
+import com.alibaba.excel.annotation.ExcelProperty;
+import com.baomidou.mybatisplus.annotation.TableField;
+import com.baomidou.mybatisplus.annotation.TableId;
+import com.baomidou.mybatisplus.annotation.TableLogic;
+import com.baomidou.mybatisplus.annotation.TableName;
+import com.customs.cq.datacenter.common.annotation.ExcelDictFormat;
+import com.customs.cq.datacenter.common.constant.UserConstants;
+import com.customs.cq.datacenter.common.convert.ExcelDictConvert;
+import com.customs.cq.datacenter.common.core.domain.BaseEntity;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+import lombok.NoArgsConstructor;
+
+import javax.validation.constraints.NotBlank;
+import javax.validation.constraints.NotNull;
+import javax.validation.constraints.Size;
+
+/**
+ * 角色表 sys_role
+ *
+ * @author Lion
+ */
+
+@Data
+@NoArgsConstructor
+@EqualsAndHashCode(callSuper = true)
+@TableName("sys_role")
+@ExcelIgnoreUnannotated
+public class SysRole extends BaseEntity {
+
+    /**
+     * 角色ID
+     */
+    @ExcelProperty(value = "角色序号")
+    @TableId(value = "role_id")
+    private Long roleId;
+
+    /**
+     * 角色名称
+     */
+    @ExcelProperty(value = "角色名称")
+    @NotBlank(message = "角色名称不能为空")
+    @Size(min = 0, max = 30, message = "角色名称长度不能超过{max}个字符")
+    private String roleName;
+
+    /**
+     * 角色权限
+     */
+    @ExcelProperty(value = "角色权限")
+    @NotBlank(message = "权限字符不能为空")
+    @Size(min = 0, max = 100, message = "权限字符长度不能超过{max}个字符")
+    private String roleKey;
+
+    /**
+     * 角色排序
+     */
+    @ExcelProperty(value = "角色排序")
+    @NotNull(message = "显示顺序不能为空")
+    private Integer roleSort;
+
+    /**
+     * 数据范围(1:所有数据权限;2:自定义数据权限;3:本部门数据权限;4:本部门及以下数据权限;5:仅本人数据权限)
+     */
+    @ExcelProperty(value = "数据范围", converter = ExcelDictConvert.class)
+    @ExcelDictFormat(readConverterExp = "1=所有数据权限,2=自定义数据权限,3=本部门数据权限,4=本部门及以下数据权限,5=仅本人数据权限")
+    private String dataScope;
+
+    /**
+     * 菜单树选择项是否关联显示( 0:父子不互相关联显示 1:父子互相关联显示)
+     */
+    private Boolean menuCheckStrictly;
+
+    /**
+     * 部门树选择项是否关联显示(0:父子不互相关联显示 1:父子互相关联显示 )
+     */
+    private Boolean deptCheckStrictly;
+
+    /**
+     * 角色状态(0正常 1停用)
+     */
+    @ExcelProperty(value = "角色状态", converter = ExcelDictConvert.class)
+    @ExcelDictFormat(dictType = "sys_normal_disable")
+    private String status;
+
+    /**
+     * 备注
+     */
+    private String remark;
+    /**
+     * h4a guid
+     */
+    private String guid;
+
+    /**
+     * 是否删除(逻辑删除)
+     */
+    @TableLogic
+    private Integer isDelete;
+
+    /**
+     * 用户是否存在此角色标识 默认不存在
+     */
+    @TableField(exist = false)
+    private boolean flag = false;
+
+    /**
+     * 菜单组
+     */
+    @TableField(exist = false)
+    private Long[] menuIds;
+
+    /**
+     * 部门组(数据权限)
+     */
+    @TableField(exist = false)
+    private Long[] deptIds;
+
+    public SysRole(Long roleId) {
+        this.roleId = roleId;
+    }
+
+    public boolean isAdmin() {
+        return UserConstants.ADMIN_ID.equals(this.roleId);
+    }
+}

+ 185 - 0
secure-producting-common/src/main/java/com/customs/cq/datacenter/common/core/domain/entity/SysUser.java

@@ -0,0 +1,185 @@
+package com.customs.cq.datacenter.common.core.domain.entity;
+
+import com.baomidou.mybatisplus.annotation.*;
+import com.customs.cq.datacenter.common.annotation.Sensitive;
+import com.customs.cq.datacenter.common.constant.UserConstants;
+import com.customs.cq.datacenter.common.core.domain.BaseEntity;
+import com.customs.cq.datacenter.common.enums.SensitiveStrategy;
+import com.customs.cq.datacenter.common.xss.Xss;
+import com.fasterxml.jackson.annotation.JsonIgnore;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+import lombok.NoArgsConstructor;
+
+import javax.validation.constraints.Email;
+import javax.validation.constraints.NotBlank;
+import javax.validation.constraints.Size;
+import java.time.LocalDateTime;
+import java.util.Date;
+import java.util.List;
+
+/**
+ * 用户对象 sys_user
+ *
+ * @author Lion
+ */
+
+@Data
+@NoArgsConstructor
+@EqualsAndHashCode(callSuper = true)
+@TableName("sys_user")
+public class SysUser extends BaseEntity {
+
+    /**
+     * 用户ID
+     */
+    @TableId(value = "user_id")
+    private Long userId;
+
+    /**
+     * 部门ID
+     */
+    private Long deptId;
+
+    /**
+     * 用户账号
+     */
+    @Xss(message = "用户账号不能包含脚本字符")
+    @NotBlank(message = "用户账号不能为空")
+    @Size(min = 0, max = 30, message = "用户账号长度不能超过{max}个字符")
+    private String userName;
+
+    /**
+     * 用户昵称
+     */
+    @Xss(message = "用户昵称不能包含脚本字符")
+    @NotBlank(message = "用户昵称不能为空")
+    @Size(min = 0, max = 30, message = "用户昵称长度不能超过{max}个字符")
+    private String nickName;
+
+    /**
+     * 用户类型(sys_user系统用户)
+     */
+    private String userType;
+
+    /**
+     * 用户邮箱
+     */
+    @Sensitive(strategy = SensitiveStrategy.EMAIL)
+    @Email(message = "邮箱格式不正确")
+    @Size(min = 0, max = 50, message = "邮箱长度不能超过{max}个字符")
+    private String email;
+
+    /**
+     * 手机号码
+     */
+    @Sensitive(strategy = SensitiveStrategy.PHONE)
+    private String phonenumber;
+
+    /**
+     * 用户性别
+     */
+    private String sex;
+
+    /**
+     * 用户头像
+     */
+    private String avatar;
+
+    /**
+     * 密码
+     */
+    @TableField(
+        insertStrategy = FieldStrategy.NOT_EMPTY,
+        updateStrategy = FieldStrategy.NOT_EMPTY,
+        whereStrategy = FieldStrategy.NOT_EMPTY
+    )
+    private String password;
+
+    @JsonIgnore
+    @JsonProperty
+    public String getPassword() {
+        return password;
+    }
+
+    /**
+     * 帐号状态(0正常 1停用)
+     */
+    private String status;
+
+    /**
+     * 最后登录IP
+     */
+    private String loginIp;
+
+    /**
+     * 最后登录时间
+     */
+    private Date loginDate;
+
+    /**
+     * 备注
+     */
+    private String remark;
+
+    private String userGuid;
+    private String personId;
+    private String orgKeId;
+    private String orgKeName;
+    private String orgChuId;
+    private String orgChuName;
+    private String rankCode;
+    private String rankName;
+    private String orgType;
+    private String loginName;
+    private String selected;
+    private LocalDateTime expirationTime;
+    private String slideLine;
+    private String allPathName;
+    private String globalSort;
+
+    /**
+     * 是否删除(逻辑删除)
+     */
+    @TableLogic
+    private Integer isDelete;
+
+    /**
+     * 部门对象
+     */
+    @TableField(exist = false)
+    private SysDept dept;
+
+    /**
+     * 角色对象
+     */
+    @TableField(exist = false)
+    private List<SysRole> roles;
+
+    /**
+     * 角色组
+     */
+    @TableField(exist = false)
+    private Long[] roleIds;
+
+    /**
+     * 岗位组
+     */
+    @TableField(exist = false)
+    private Long[] postIds;
+
+    /**
+     * 数据权限 当前角色ID
+     */
+    @TableField(exist = false)
+    private Long roleId;
+
+    public SysUser(Long userId) {
+        this.userId = userId;
+    }
+
+    public boolean isAdmin() {
+        return UserConstants.ADMIN_ID.equals(this.userId);
+    }
+}

+ 44 - 0
secure-producting-common/src/main/java/com/customs/cq/datacenter/common/core/domain/event/LogininforEvent.java

@@ -0,0 +1,44 @@
+package com.customs.cq.datacenter.common.core.domain.event;
+
+import lombok.Data;
+
+import javax.servlet.http.HttpServletRequest;
+import java.io.Serializable;
+
+/**
+ * 登录事件
+ *
+ * @author Lion
+ */
+
+@Data
+public class LogininforEvent implements Serializable {
+
+    private static final long serialVersionUID = 1L;
+
+    /**
+     * 用户账号
+     */
+    private String username;
+
+    /**
+     * 登录状态 0成功 1失败
+     */
+    private String status;
+
+    /**
+     * 提示消息
+     */
+    private String message;
+
+    /**
+     * 请求体
+     */
+    private HttpServletRequest request;
+
+    /**
+     * 其他参数
+     */
+    private Object[] args;
+
+}

+ 104 - 0
secure-producting-common/src/main/java/com/customs/cq/datacenter/common/core/domain/event/OperLogEvent.java

@@ -0,0 +1,104 @@
+package com.customs.cq.datacenter.common.core.domain.event;
+
+import lombok.Data;
+
+import java.io.Serializable;
+import java.util.Date;
+
+/**
+ * 操作日志事件
+ *
+ * @author Lion
+ */
+
+@Data
+public class OperLogEvent implements Serializable {
+
+    private static final long serialVersionUID = 1L;
+
+    /**
+     * 日志主键
+     */
+    private Long operId;
+
+    /**
+     * 操作模块
+     */
+    private String title;
+
+    /**
+     * 业务类型(0其它 1新增 2修改 3删除)
+     */
+    private Integer businessType;
+
+    /**
+     * 业务类型数组
+     */
+    private Integer[] businessTypes;
+
+    /**
+     * 请求方法
+     */
+    private String method;
+
+    /**
+     * 请求方式
+     */
+    private String requestMethod;
+
+    /**
+     * 操作类别(0其它 1后台用户 2手机端用户)
+     */
+    private Integer operatorType;
+
+    /**
+     * 操作人员
+     */
+    private String operName;
+
+    /**
+     * 部门名称
+     */
+    private String deptName;
+
+    /**
+     * 请求url
+     */
+    private String operUrl;
+
+    /**
+     * 操作地址
+     */
+    private String operIp;
+
+    /**
+     * 操作地点
+     */
+    private String operLocation;
+
+    /**
+     * 请求参数
+     */
+    private String operParam;
+
+    /**
+     * 返回参数
+     */
+    private String jsonResult;
+
+    /**
+     * 操作状态(0正常 1异常)
+     */
+    private Integer status;
+
+    /**
+     * 错误消息
+     */
+    private String errorMsg;
+
+    /**
+     * 操作时间
+     */
+    private Date operTime;
+
+}

+ 30 - 0
secure-producting-common/src/main/java/com/customs/cq/datacenter/common/core/domain/model/EmailLoginBody.java

@@ -0,0 +1,30 @@
+package com.customs.cq.datacenter.common.core.domain.model;
+
+import lombok.Data;
+
+import javax.validation.constraints.Email;
+import javax.validation.constraints.NotBlank;
+
+/**
+ * 邮箱登录对象
+ *
+ * @author Lion
+ */
+
+@Data
+public class EmailLoginBody {
+
+    /**
+     * 邮箱
+     */
+    @NotBlank(message = "{user.email.not.blank}")
+    @Email(message = "{user.email.not.valid}")
+    private String email;
+
+    /**
+     * 邮箱code
+     */
+    @NotBlank(message = "{email.code.not.blank}")
+    private String emailCode;
+
+}

+ 42 - 0
secure-producting-common/src/main/java/com/customs/cq/datacenter/common/core/domain/model/LoginBody.java

@@ -0,0 +1,42 @@
+package com.customs.cq.datacenter.common.core.domain.model;
+
+import com.customs.cq.datacenter.common.constant.UserConstants;
+import lombok.Data;
+import org.hibernate.validator.constraints.Length;
+
+import javax.validation.constraints.NotBlank;
+
+/**
+ * 用户登录对象
+ *
+ * @author Lion
+ */
+
+@Data
+public class LoginBody {
+
+    /**
+     * 用户名
+     */
+    @NotBlank(message = "{user.username.not.blank}")
+    @Length(min = UserConstants.USERNAME_MIN_LENGTH, max = UserConstants.USERNAME_MAX_LENGTH, message = "{user.username.length.valid}")
+    private String username;
+
+    /**
+     * 用户密码
+     */
+    @NotBlank(message = "{user.password.not.blank}")
+    @Length(min = UserConstants.PASSWORD_MIN_LENGTH, max = UserConstants.PASSWORD_MAX_LENGTH, message = "{user.password.length.valid}")
+    private String password;
+
+    /**
+     * 验证码
+     */
+    private String code;
+
+    /**
+     * 唯一标识
+     */
+    private String uuid;
+
+}

+ 116 - 0
secure-producting-common/src/main/java/com/customs/cq/datacenter/common/core/domain/model/LoginUser.java

@@ -0,0 +1,116 @@
+package com.customs.cq.datacenter.common.core.domain.model;
+
+import com.customs.cq.datacenter.common.core.domain.dto.RoleDTO;
+import lombok.Data;
+import lombok.NoArgsConstructor;
+
+import java.io.Serializable;
+import java.util.List;
+import java.util.Set;
+
+/**
+ * 登录用户身份权限
+ *
+ * @author Lion
+ */
+
+@Data
+@NoArgsConstructor
+public class LoginUser implements Serializable {
+
+    private static final long serialVersionUID = 1L;
+
+    /**
+     * 用户ID
+     */
+    private Long userId;
+
+    /**
+     * 部门ID
+     */
+    private Long deptId;
+
+    /**
+     * 部门名
+     */
+    private String deptName;
+
+    /**
+     * 用户唯一标识
+     */
+    private String token;
+
+    /**
+     * 用户类型
+     */
+    private String userType;
+
+    /**
+     * 登录时间
+     */
+    private Long loginTime;
+
+    /**
+     * 过期时间
+     */
+    private Long expireTime;
+
+    /**
+     * 登录IP地址
+     */
+    private String ipaddr;
+
+    /**
+     * 登录地点
+     */
+    private String loginLocation;
+
+    /**
+     * 浏览器类型
+     */
+    private String browser;
+
+    /**
+     * 操作系统
+     */
+    private String os;
+
+    /**
+     * 菜单权限
+     */
+    private Set<String> menuPermission;
+
+    /**
+     * 角色权限
+     */
+    private Set<String> rolePermission;
+
+    /**
+     * 用户名
+     */
+    private String username;
+
+    /**
+     * 角色对象
+     */
+    private List<RoleDTO> roles;
+
+    /**
+     * 数据权限 当前角色ID
+     */
+    private Long roleId;
+
+    /**
+     * 获取登录id
+     */
+    public String getLoginId() {
+        if (userType == null) {
+            throw new IllegalArgumentException("用户类型不能为空");
+        }
+        if (userId == null) {
+            throw new IllegalArgumentException("用户ID不能为空");
+        }
+        return userType + ":" + userId;
+    }
+
+}

+ 17 - 0
secure-producting-common/src/main/java/com/customs/cq/datacenter/common/core/domain/model/RegisterBody.java

@@ -0,0 +1,17 @@
+package com.customs.cq.datacenter.common.core.domain.model;
+
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+
+/**
+ * 用户注册对象
+ *
+ * @author Lion
+ */
+@Data
+@EqualsAndHashCode(callSuper = true)
+public class RegisterBody extends LoginBody {
+
+    private String userType;
+
+}

+ 28 - 0
secure-producting-common/src/main/java/com/customs/cq/datacenter/common/core/domain/model/SmsLoginBody.java

@@ -0,0 +1,28 @@
+package com.customs.cq.datacenter.common.core.domain.model;
+
+import lombok.Data;
+
+import javax.validation.constraints.NotBlank;
+
+/**
+ * 短信登录对象
+ *
+ * @author Lion
+ */
+
+@Data
+public class SmsLoginBody {
+
+    /**
+     * 手机号
+     */
+    @NotBlank(message = "{user.phonenumber.not.blank}")
+    private String phonenumber;
+
+    /**
+     * 短信code
+     */
+    @NotBlank(message = "{sms.code.not.blank}")
+    private String smsCode;
+
+}

+ 24 - 0
secure-producting-common/src/main/java/com/customs/cq/datacenter/common/core/domain/model/XcxLoginUser.java

@@ -0,0 +1,24 @@
+package com.customs.cq.datacenter.common.core.domain.model;
+
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+import lombok.NoArgsConstructor;
+
+/**
+ * 小程序登录用户身份权限
+ *
+ * @author Lion
+ */
+@Data
+@EqualsAndHashCode(callSuper = true)
+@NoArgsConstructor
+public class XcxLoginUser extends LoginUser {
+
+    private static final long serialVersionUID = 1L;
+
+    /**
+     * openid
+     */
+    private String openid;
+
+}

+ 192 - 0
secure-producting-common/src/main/java/com/customs/cq/datacenter/common/core/mapper/BaseMapperPlus.java

@@ -0,0 +1,192 @@
+package com.customs.cq.datacenter.common.core.mapper;
+
+import cn.hutool.core.collection.CollUtil;
+import cn.hutool.core.util.ObjectUtil;
+import com.baomidou.mybatisplus.core.conditions.Wrapper;
+import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import com.baomidou.mybatisplus.core.metadata.IPage;
+import com.baomidou.mybatisplus.core.toolkit.ReflectionKit;
+import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
+import com.baomidou.mybatisplus.extension.toolkit.Db;
+import com.customs.cq.datacenter.common.utils.BeanCopyUtils;
+import org.apache.ibatis.logging.Log;
+import org.apache.ibatis.logging.LogFactory;
+
+import java.io.Serializable;
+import java.util.Collection;
+import java.util.List;
+import java.util.Map;
+
+/**
+ * 自定义 Mapper 接口, 实现 自定义扩展
+ *
+ * @param <M> mapper 泛型
+ * @param <T> table 泛型
+ * @param <V> vo 泛型
+ * @author Lion
+ * @since 2021-05-13
+ */
+@SuppressWarnings("unchecked")
+public interface BaseMapperPlus<M, T, V> extends BaseMapper<T> {
+
+    Log log = LogFactory.getLog(BaseMapperPlus.class);
+
+    default Class<V> currentVoClass() {
+        return (Class<V>) ReflectionKit.getSuperClassGenericType(this.getClass(), BaseMapperPlus.class, 2);
+    }
+
+    default Class<T> currentModelClass() {
+        return (Class<T>) ReflectionKit.getSuperClassGenericType(this.getClass(), BaseMapperPlus.class, 1);
+    }
+
+    default Class<M> currentMapperClass() {
+        return (Class<M>) ReflectionKit.getSuperClassGenericType(this.getClass(), BaseMapperPlus.class, 0);
+    }
+
+    default List<T> selectList() {
+        return this.selectList(new QueryWrapper<>());
+    }
+
+    /**
+     * 批量插入
+     */
+    default boolean insertBatch(Collection<T> entityList) {
+        return Db.saveBatch(entityList);
+    }
+
+    /**
+     * 批量更新
+     */
+    default boolean updateBatchById(Collection<T> entityList) {
+        return Db.updateBatchById(entityList);
+    }
+
+    /**
+     * 批量插入或更新
+     */
+    default boolean insertOrUpdateBatch(Collection<T> entityList) {
+        return Db.saveOrUpdateBatch(entityList);
+    }
+
+    /**
+     * 批量插入(包含限制条数)
+     */
+    default boolean insertBatch(Collection<T> entityList, int batchSize) {
+        return Db.saveBatch(entityList, batchSize);
+    }
+
+    /**
+     * 批量更新(包含限制条数)
+     */
+    default boolean updateBatchById(Collection<T> entityList, int batchSize) {
+        return Db.updateBatchById(entityList, batchSize);
+    }
+
+    /**
+     * 批量插入或更新(包含限制条数)
+     */
+    default boolean insertOrUpdateBatch(Collection<T> entityList, int batchSize) {
+        return Db.saveOrUpdateBatch(entityList, batchSize);
+    }
+
+    /**
+     * 插入或更新(包含限制条数)
+     */
+    default boolean insertOrUpdate(T entity) {
+        return Db.saveOrUpdate(entity);
+    }
+
+    default V selectVoById(Serializable id) {
+        return selectVoById(id, this.currentVoClass());
+    }
+
+    /**
+     * 根据 ID 查询
+     */
+    default <C> C selectVoById(Serializable id, Class<C> voClass) {
+        T obj = this.selectById(id);
+        if (ObjectUtil.isNull(obj)) {
+            return null;
+        }
+        return BeanCopyUtils.copy(obj, voClass);
+    }
+
+    default List<V> selectVoBatchIds(Collection<? extends Serializable> idList) {
+        return selectVoBatchIds(idList, this.currentVoClass());
+    }
+
+    /**
+     * 查询(根据ID 批量查询)
+     */
+    default <C> List<C> selectVoBatchIds(Collection<? extends Serializable> idList, Class<C> voClass) {
+        List<T> list = this.selectBatchIds(idList);
+        if (CollUtil.isEmpty(list)) {
+            return CollUtil.newArrayList();
+        }
+        return BeanCopyUtils.copyList(list, voClass);
+    }
+
+    default List<V> selectVoByMap(Map<String, Object> map) {
+        return selectVoByMap(map, this.currentVoClass());
+    }
+
+    /**
+     * 查询(根据 columnMap 条件)
+     */
+    default <C> List<C> selectVoByMap(Map<String, Object> map, Class<C> voClass) {
+        List<T> list = this.selectByMap(map);
+        if (CollUtil.isEmpty(list)) {
+            return CollUtil.newArrayList();
+        }
+        return BeanCopyUtils.copyList(list, voClass);
+    }
+
+    default V selectVoOne(Wrapper<T> wrapper) {
+        return selectVoOne(wrapper, this.currentVoClass());
+    }
+
+    /**
+     * 根据 entity 条件,查询一条记录
+     */
+    default <C> C selectVoOne(Wrapper<T> wrapper, Class<C> voClass) {
+        T obj = this.selectOne(wrapper);
+        if (ObjectUtil.isNull(obj)) {
+            return null;
+        }
+        return BeanCopyUtils.copy(obj, voClass);
+    }
+
+    default List<V> selectVoList(Wrapper<T> wrapper) {
+        return selectVoList(wrapper, this.currentVoClass());
+    }
+
+    /**
+     * 根据 entity 条件,查询全部记录
+     */
+    default <C> List<C> selectVoList(Wrapper<T> wrapper, Class<C> voClass) {
+        List<T> list = this.selectList(wrapper);
+        if (CollUtil.isEmpty(list)) {
+            return CollUtil.newArrayList();
+        }
+        return BeanCopyUtils.copyList(list, voClass);
+    }
+
+    default <P extends IPage<V>> P selectVoPage(IPage<T> page, Wrapper<T> wrapper) {
+        return selectVoPage(page, wrapper, this.currentVoClass());
+    }
+
+    /**
+     * 分页查询VO
+     */
+    default <C, P extends IPage<C>> P selectVoPage(IPage<T> page, Wrapper<T> wrapper, Class<C> voClass) {
+        IPage<T> pageData = this.selectPage(page, wrapper);
+        IPage<C> voPage = new Page<>(pageData.getCurrent(), pageData.getSize(), pageData.getTotal());
+        if (CollUtil.isEmpty(pageData.getRecords())) {
+            return (P) voPage;
+        }
+        voPage.setRecords(BeanCopyUtils.copyList(pageData.getRecords(), voClass));
+        return (P) voPage;
+    }
+
+}

+ 234 - 0
secure-producting-common/src/main/java/com/customs/cq/datacenter/common/core/mapper/BasicMapper.java

@@ -0,0 +1,234 @@
+package com.customs.cq.datacenter.common.core.mapper;
+
+import com.baomidou.mybatisplus.core.conditions.Wrapper;
+import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
+import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper;
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import com.baomidou.mybatisplus.core.metadata.IPage;
+import com.baomidou.mybatisplus.core.toolkit.Wrappers;
+import com.baomidou.mybatisplus.extension.toolkit.Db;
+import com.customs.cq.datacenter.common.model.SearchBasicDTO;
+
+import java.io.Serializable;
+import java.util.Collection;
+import java.util.List;
+import java.util.Map;
+
+public abstract class BasicMapper<T> {
+    protected BaseMapper<T> mapper;
+
+    public BasicMapper(BaseMapper<T> mapper) {
+        this.mapper = mapper;
+    }
+
+    protected LambdaQueryWrapper<T> getQuery() {
+        return Wrappers.lambdaQuery();
+    }
+
+    protected UpdateWrapper<T> getUpdate() {
+        return Wrappers.update();
+    }
+
+    /**
+     * 插入一条记录
+     *
+     * @param entity 实体对象
+     */
+    public int insert(T entity) {
+        return mapper.insert(entity);
+    }
+
+    /**
+     * 批量插入
+     *
+     * @param list 实体对象列表
+     */
+    public boolean insert(List<T> list) {
+        return Db.saveBatch(list);
+    }
+
+    /**
+     * 根据 ID 删除
+     *
+     * @param id 主键ID
+     */
+    public int deleteById(Serializable id) {
+        return mapper.deleteById(id);
+    }
+
+    /**
+     * 根据实体(ID)删除
+     *
+     * @param entity 实体对象
+     * @since 3.4.4
+     */
+    public int deleteById(T entity) {
+        return mapper.deleteById(entity);
+    }
+
+    /**
+     * 根据 columnMap 条件,删除记录
+     *
+     * @param columnMap 表字段 map 对象
+     */
+    public int deleteByMap(Map<String, Object> columnMap) {
+        return mapper.deleteByMap(columnMap);
+    }
+
+    /**
+     * 根据 entity 条件,删除记录
+     *
+     * @param queryWrapper 实体对象封装操作类(可以为 null,里面的 entity 用于生成 where 语句)
+     */
+    public int delete(Wrapper<T> queryWrapper) {
+        return mapper.delete(queryWrapper);
+    }
+
+    /**
+     * 删除(根据ID或实体 批量删除)
+     *
+     * @param idList 主键ID列表或实体列表(不能为 null 以及 empty)
+     */
+    public int deleteBatchIds(Collection<?> idList) {
+        return mapper.deleteBatchIds(idList);
+    }
+
+    /**
+     * 根据 ID 修改
+     *
+     * @param entity 实体对象
+     */
+    public int updateById(T entity) {
+        return mapper.updateById(entity);
+    }
+
+    /**
+     * 根据 whereEntity 条件,更新记录
+     *
+     * @param entity        实体对象 (set 条件值,可以为 null)
+     * @param updateWrapper 实体对象封装操作类(可以为 null,里面的 entity 用于生成 where 语句)
+     */
+    public int update(T entity, Wrapper<T> updateWrapper) {
+        return mapper.update(entity, updateWrapper);
+    }
+
+    /**
+     * 批量修改
+     *
+     * @param list 实体对象列表
+     */
+    public boolean update(List<T> list) {
+        return Db.updateBatchById(list);
+    }
+
+    /**
+     * 根据 ID 查询
+     *
+     * @param id 主键ID
+     */
+    public T selectById(Serializable id) {
+        return mapper.selectById(id);
+    }
+
+    /**
+     * 查询(根据ID 批量查询)
+     *
+     * @param idList 主键ID列表(不能为 null 以及 empty)
+     */
+    public List<T> selectBatchIds(Collection<? extends Serializable> idList) {
+        return mapper.selectBatchIds(idList);
+    }
+
+    /**
+     * 查询(根据 columnMap 条件)
+     *
+     * @param columnMap 表字段 map 对象
+     */
+    public List<T> selectByMap(Map<String, Object> columnMap) {
+        return mapper.selectByMap(columnMap);
+    }
+
+    /**
+     * 根据 entity 条件,查询一条记录
+     * <p>查询一条记录,例如 qw.last("limit 1") 限制取一条记录, 注意:多条数据会报异常</p>
+     *
+     * @param queryWrapper 实体对象封装操作类(可以为 null)
+     */
+    public T selectOne(Wrapper<T> queryWrapper) {
+        return mapper.selectOne(queryWrapper);
+    }
+
+    /**
+     * 根据 Wrapper 条件,判断是否存在记录
+     *
+     * @param queryWrapper 实体对象封装操作类
+     * @return 是否存在记录
+     */
+    public boolean exists(Wrapper<T> queryWrapper) {
+        return mapper.exists(queryWrapper);
+    }
+
+    /**
+     * 根据 Wrapper 条件,查询总记录数
+     *
+     * @param queryWrapper 实体对象封装操作类(可以为 null)
+     */
+    public Long selectCount(Wrapper<T> queryWrapper) {
+        return mapper.selectCount(queryWrapper);
+    }
+
+    /**
+     * 根据 entity 条件,查询全部记录
+     *
+     * @param queryWrapper 实体对象封装操作类(可以为 null)
+     */
+    public List<T> selectList(Wrapper<T> queryWrapper) {
+        return mapper.selectList(queryWrapper);
+    }
+
+    /**
+     * 根据 Wrapper 条件,查询全部记录
+     *
+     * @param queryWrapper 实体对象封装操作类(可以为 null)
+     */
+    public List<Map<String, Object>> selectMaps(Wrapper<T> queryWrapper) {
+        return mapper.selectMaps(queryWrapper);
+    }
+
+    /**
+     * 根据 Wrapper 条件,查询全部记录
+     * <p>注意: 只返回第一个字段的值</p>
+     *
+     * @param queryWrapper 实体对象封装操作类(可以为 null)
+     */
+    public List<Object> selectObjs(Wrapper<T> queryWrapper) {
+        return mapper.selectObjs(queryWrapper);
+    }
+
+    /**
+     * 根据 entity 条件,查询全部记录(并翻页)
+     *
+     * @param page         分页查询条件(可以为 RowBounds.DEFAULT)
+     * @param queryWrapper 实体对象封装操作类(可以为 null)
+     */
+    public <P extends IPage<T>> P selectPage(P page, Wrapper<T> queryWrapper) {
+        return mapper.selectPage(page, queryWrapper);
+    }
+
+    /**
+     * 根据 Wrapper 条件,查询全部记录(并翻页)
+     *
+     * @param page         分页查询条件
+     * @param queryWrapper 实体对象封装操作类
+     */
+    public <P extends IPage<Map<String, Object>>> P selectMapsPage(P page, Wrapper<T> queryWrapper) {
+        return mapper.selectMapsPage(page, queryWrapper);
+    }
+
+    /**
+     * 分页查询
+     *
+     * @param request 请求参数
+     */
+    public abstract IPage<T> search(SearchBasicDTO request);
+}

+ 78 - 0
secure-producting-common/src/main/java/com/customs/cq/datacenter/common/core/page/TableDataInfo.java

@@ -0,0 +1,78 @@
+package com.customs.cq.datacenter.common.core.page;
+
+import cn.hutool.http.HttpStatus;
+import com.baomidou.mybatisplus.core.metadata.IPage;
+import lombok.Data;
+import lombok.NoArgsConstructor;
+
+import java.io.Serializable;
+import java.util.List;
+
+/**
+ * 表格分页数据对象
+ *
+ * @author Lion
+ */
+
+@Data
+@NoArgsConstructor
+public class TableDataInfo<T> implements Serializable {
+    private static final long serialVersionUID = 1L;
+
+    /**
+     * 总记录数
+     */
+    private long total;
+
+    /**
+     * 列表数据
+     */
+    private List<T> rows;
+
+    /**
+     * 消息状态码
+     */
+    private int code;
+
+    /**
+     * 消息内容
+     */
+    private String msg;
+
+    /**
+     * 分页
+     *
+     * @param list  列表数据
+     * @param total 总记录数
+     */
+    public TableDataInfo(List<T> list, long total) {
+        this.rows = list;
+        this.total = total;
+    }
+
+    public static <T> TableDataInfo<T> build(IPage<T> page) {
+        TableDataInfo<T> rspData = new TableDataInfo<>();
+        rspData.setCode(HttpStatus.HTTP_OK);
+        rspData.setMsg("查询成功");
+        rspData.setRows(page.getRecords());
+        rspData.setTotal(page.getTotal());
+        return rspData;
+    }
+
+    public static <T> TableDataInfo<T> build(List<T> list) {
+        TableDataInfo<T> rspData = new TableDataInfo<>();
+        rspData.setCode(HttpStatus.HTTP_OK);
+        rspData.setMsg("查询成功");
+        rspData.setRows(list);
+        rspData.setTotal(list.size());
+        return rspData;
+    }
+
+    public static <T> TableDataInfo<T> build() {
+        TableDataInfo<T> rspData = new TableDataInfo<>();
+        rspData.setCode(HttpStatus.HTTP_OK);
+        rspData.setMsg("查询成功");
+        return rspData;
+    }
+
+}

+ 16 - 0
secure-producting-common/src/main/java/com/customs/cq/datacenter/common/core/service/BasicService.java

@@ -0,0 +1,16 @@
+package com.customs.cq.datacenter.common.core.service;
+
+import com.customs.cq.datacenter.common.constant.Constants;
+import com.customs.cq.datacenter.common.utils.NumericUtil;
+import com.customs.cq.datacenter.common.model.SearchBasicDTO;
+
+public class BasicService {
+    public void dealPager(SearchBasicDTO search) {
+        if(NumericUtil.tryParseInt(search.getLimit()).compareTo(0) < 1) {
+            search.setLimit(Constants.PAGE_SIZE_DEFAULT);
+        }
+        if(NumericUtil.tryParseInt(search.getPage()).compareTo(0) < 1) {
+            search.setPage(1);
+        }
+    }
+}

+ 18 - 0
secure-producting-common/src/main/java/com/customs/cq/datacenter/common/core/service/ConfigService.java

@@ -0,0 +1,18 @@
+package com.customs.cq.datacenter.common.core.service;
+
+/**
+ * 通用 参数配置服务
+ *
+ * @author Lion
+ */
+public interface ConfigService {
+
+    /**
+     * 根据参数 key 获取参数值
+     *
+     * @param configKey 参数 key
+     * @return 参数值
+     */
+    String getConfigValue(String configKey);
+
+}

+ 18 - 0
secure-producting-common/src/main/java/com/customs/cq/datacenter/common/core/service/DeptService.java

@@ -0,0 +1,18 @@
+package com.customs.cq.datacenter.common.core.service;
+
+/**
+ * 通用 部门服务
+ *
+ * @author Lion
+ */
+public interface DeptService {
+
+    /**
+     * 通过部门ID查询部门名称
+     *
+     * @param deptIds 部门ID串逗号分隔
+     * @return 部门名称串逗号分隔
+     */
+    String selectDeptNameByIds(String deptIds);
+
+}

+ 66 - 0
secure-producting-common/src/main/java/com/customs/cq/datacenter/common/core/service/DictService.java

@@ -0,0 +1,66 @@
+package com.customs.cq.datacenter.common.core.service;
+
+import java.util.Map;
+
+/**
+ * 通用 字典服务
+ *
+ * @author Lion
+ */
+public interface DictService {
+
+    /**
+     * 分隔符
+     */
+    String SEPARATOR = ",";
+
+    /**
+     * 根据字典类型和字典值获取字典标签
+     *
+     * @param dictType  字典类型
+     * @param dictValue 字典值
+     * @return 字典标签
+     */
+    default String getDictLabel(String dictType, String dictValue) {
+        return getDictLabel(dictType, dictValue, SEPARATOR);
+    }
+
+    /**
+     * 根据字典类型和字典标签获取字典值
+     *
+     * @param dictType  字典类型
+     * @param dictLabel 字典标签
+     * @return 字典值
+     */
+    default String getDictValue(String dictType, String dictLabel) {
+        return getDictValue(dictType, dictLabel, SEPARATOR);
+    }
+
+    /**
+     * 根据字典类型和字典值获取字典标签
+     *
+     * @param dictType  字典类型
+     * @param dictValue 字典值
+     * @param separator 分隔符
+     * @return 字典标签
+     */
+    String getDictLabel(String dictType, String dictValue, String separator);
+
+    /**
+     * 根据字典类型和字典标签获取字典值
+     *
+     * @param dictType  字典类型
+     * @param dictLabel 字典标签
+     * @param separator 分隔符
+     * @return 字典值
+     */
+    String getDictValue(String dictType, String dictLabel, String separator);
+
+    /**
+     * 获取字典下所有的字典值与标签
+     *
+     * @param dictType 字典类型
+     * @return dictValue为key,dictLabel为值组成的Map
+     */
+    Map<String, String> getAllDictByDictType(String dictType);
+}

+ 18 - 0
secure-producting-common/src/main/java/com/customs/cq/datacenter/common/core/service/OssService.java

@@ -0,0 +1,18 @@
+package com.customs.cq.datacenter.common.core.service;
+
+/**
+ * 通用 OSS服务
+ *
+ * @author Lion
+ */
+public interface OssService {
+
+    /**
+     * 通过ossId查询对应的url
+     *
+     * @param ossIds ossId串逗号分隔
+     * @return url串逗号分隔
+     */
+    String selectUrlByIds(String ossIds);
+
+}

+ 18 - 0
secure-producting-common/src/main/java/com/customs/cq/datacenter/common/core/service/SensitiveService.java

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

+ 18 - 0
secure-producting-common/src/main/java/com/customs/cq/datacenter/common/core/service/UserService.java

@@ -0,0 +1,18 @@
+package com.customs.cq.datacenter.common.core.service;
+
+/**
+ * 通用 用户服务
+ *
+ * @author Lion
+ */
+public interface UserService {
+
+    /**
+     * 通过用户ID查询用户账户
+     *
+     * @param userId 用户ID
+     * @return 用户账户
+     */
+    String selectUserNameById(Long userId);
+
+}

+ 9 - 0
secure-producting-common/src/main/java/com/customs/cq/datacenter/common/core/validate/AddGroup.java

@@ -0,0 +1,9 @@
+package com.customs.cq.datacenter.common.core.validate;
+
+/**
+ * 校验分组 add
+ *
+ * @author Lion
+ */
+public interface AddGroup {
+}

+ 9 - 0
secure-producting-common/src/main/java/com/customs/cq/datacenter/common/core/validate/EditGroup.java

@@ -0,0 +1,9 @@
+package com.customs.cq.datacenter.common.core.validate;
+
+/**
+ * 校验分组 edit
+ *
+ * @author Lion
+ */
+public interface EditGroup {
+}

+ 9 - 0
secure-producting-common/src/main/java/com/customs/cq/datacenter/common/core/validate/QueryGroup.java

@@ -0,0 +1,9 @@
+package com.customs.cq.datacenter.common.core.validate;
+
+/**
+ * 校验分组 query
+ *
+ * @author Lion
+ */
+public interface QueryGroup {
+}

+ 13 - 0
secure-producting-common/src/main/java/com/customs/cq/datacenter/common/core/vo/BasicVO.java

@@ -0,0 +1,13 @@
+package com.customs.cq.datacenter.common.core.vo;
+
+
+public interface BasicVO {
+    /**
+     * 创建时间展示
+     */
+    String getCreateTimeView();
+    /**
+     * 数据最后更新时间展示
+     */
+    String getUpdateTimeView();
+}

+ 41 - 0
secure-producting-common/src/main/java/com/customs/cq/datacenter/common/encrypt/EncryptContext.java

@@ -0,0 +1,41 @@
+package com.customs.cq.datacenter.common.encrypt;
+
+import com.customs.cq.datacenter.common.enums.AlgorithmType;
+import com.customs.cq.datacenter.common.enums.EncodeType;
+import lombok.Data;
+
+/**
+ * 加密上下文 用于encryptor传递必要的参数。
+ *
+ * @author 老马
+ * @version 4.6.0
+ */
+@Data
+public class EncryptContext {
+
+    /**
+     * 默认算法
+     */
+    private AlgorithmType algorithm;
+
+    /**
+     * 安全秘钥
+     */
+    private String password;
+
+    /**
+     * 公钥
+     */
+    private String publicKey;
+
+    /**
+     * 私钥
+     */
+    private String privateKey;
+
+    /**
+     * 编码方式,base64/hex
+     */
+    private EncodeType encode;
+
+}

+ 35 - 0
secure-producting-common/src/main/java/com/customs/cq/datacenter/common/encrypt/IEncryptor.java

@@ -0,0 +1,35 @@
+package com.customs.cq.datacenter.common.encrypt;
+
+import com.customs.cq.datacenter.common.enums.AlgorithmType;
+import com.customs.cq.datacenter.common.enums.EncodeType;
+
+/**
+ * 加解者
+ *
+ * @author 老马
+ * @version 4.6.0
+ */
+public interface IEncryptor {
+
+    /**
+     * 获得当前算法
+     */
+    AlgorithmType algorithm();
+
+    /**
+     * 加密
+     *
+     * @param value      待加密字符串
+     * @param encodeType 加密后的编码格式
+     * @return 加密后的字符串
+     */
+    String encrypt(String value, EncodeType encodeType);
+
+    /**
+     * 解密
+     *
+     * @param value      待加密字符串
+     * @return 解密后的字符串
+     */
+    String decrypt(String value);
+}

+ 18 - 0
secure-producting-common/src/main/java/com/customs/cq/datacenter/common/encrypt/encryptor/AbstractEncryptor.java

@@ -0,0 +1,18 @@
+package com.customs.cq.datacenter.common.encrypt.encryptor;
+
+import com.customs.cq.datacenter.common.encrypt.EncryptContext;
+import com.customs.cq.datacenter.common.encrypt.IEncryptor;
+
+/**
+ * 所有加密执行者的基类
+ *
+ * @author 老马
+ * @version 4.6.0
+ */
+public abstract class AbstractEncryptor implements IEncryptor {
+
+    public AbstractEncryptor(EncryptContext context) {
+        // 用户配置校验与配置注入
+    }
+
+}

+ 69 - 0
secure-producting-common/src/main/java/com/customs/cq/datacenter/common/encrypt/encryptor/AesEncryptor.java

@@ -0,0 +1,69 @@
+package com.customs.cq.datacenter.common.encrypt.encryptor;
+
+import cn.hutool.core.util.ArrayUtil;
+import cn.hutool.core.util.StrUtil;
+import cn.hutool.crypto.SecureUtil;
+import cn.hutool.crypto.symmetric.AES;
+import com.customs.cq.datacenter.common.encrypt.EncryptContext;
+import com.customs.cq.datacenter.common.enums.AlgorithmType;
+import com.customs.cq.datacenter.common.enums.EncodeType;
+
+import java.nio.charset.StandardCharsets;
+
+/**
+ * AES算法实现
+ *
+ * @author 老马
+ * @version 4.6.0
+ */
+public class AesEncryptor extends AbstractEncryptor {
+
+    private final AES aes;
+
+    public AesEncryptor(EncryptContext context) {
+        super(context);
+        String password = context.getPassword();
+        if (StrUtil.isBlank(password)) {
+            throw new IllegalArgumentException("AES没有获得秘钥信息");
+        }
+        // aes算法的秘钥要求是16位、24位、32位
+        int[] array = {16, 24, 32};
+        if (!ArrayUtil.contains(array, password.length())) {
+            throw new IllegalArgumentException("AES秘钥长度应该为16位、24位、32位,实际为" + password.length() + "位");
+        }
+        aes = SecureUtil.aes(context.getPassword().getBytes(StandardCharsets.UTF_8));
+    }
+
+    /**
+     * 获得当前算法
+     */
+    @Override
+    public AlgorithmType algorithm() {
+        return AlgorithmType.AES;
+    }
+
+    /**
+     * 加密
+     *
+     * @param value      待加密字符串
+     * @param encodeType 加密后的编码格式
+     */
+    @Override
+    public String encrypt(String value, EncodeType encodeType) {
+        if (encodeType == EncodeType.HEX) {
+            return aes.encryptHex(value);
+        } else {
+            return aes.encryptBase64(value);
+        }
+    }
+
+    /**
+     * 解密
+     *
+     * @param value      待加密字符串
+     */
+    @Override
+    public String decrypt(String value) {
+        return this.aes.decryptStr(value);
+    }
+}

+ 48 - 0
secure-producting-common/src/main/java/com/customs/cq/datacenter/common/encrypt/encryptor/Base64Encryptor.java

@@ -0,0 +1,48 @@
+package com.customs.cq.datacenter.common.encrypt.encryptor;
+
+import cn.hutool.core.codec.Base64;
+import com.customs.cq.datacenter.common.encrypt.EncryptContext;
+import com.customs.cq.datacenter.common.enums.AlgorithmType;
+import com.customs.cq.datacenter.common.enums.EncodeType;
+
+/**
+ * Base64算法实现
+ *
+ * @author 老马
+ * @version 4.6.0
+ */
+public class Base64Encryptor extends AbstractEncryptor {
+
+    public Base64Encryptor(EncryptContext context) {
+        super(context);
+    }
+
+    /**
+     * 获得当前算法
+     */
+    @Override
+    public AlgorithmType algorithm() {
+        return AlgorithmType.BASE64;
+    }
+
+    /**
+     * 加密
+     *
+     * @param value      待加密字符串
+     * @param encodeType 加密后的编码格式
+     */
+    @Override
+    public String encrypt(String value, EncodeType encodeType) {
+        return Base64.encode(value);
+    }
+
+    /**
+     * 解密
+     *
+     * @param value      待加密字符串
+     */
+    @Override
+    public String decrypt(String value) {
+        return Base64.decodeStr(value);
+    }
+}

+ 69 - 0
secure-producting-common/src/main/java/com/customs/cq/datacenter/common/encrypt/encryptor/MD5Util.java

@@ -0,0 +1,69 @@
+package com.customs.cq.datacenter.common.encrypt.encryptor;
+
+import java.security.MessageDigest;
+import java.security.NoSuchAlgorithmException;
+
+public class MD5Util {
+    private MD5Util() {
+        throw new IllegalStateException("Utility class");
+    }
+
+    /**
+     * 生成32位md5码
+     * @param content 待加密明文字符串
+     * @return 加密串
+     */
+    public static String encrypt(String content) {
+        //region 加盐方式
+        try {
+            // 得到一个信息摘要器
+            MessageDigest digest = MessageDigest.getInstance("md5");
+            byte[] result = digest.digest(content.getBytes());
+            StringBuilder sb = new StringBuilder();
+            // 把每一个byte 做一个与运算 0xff;
+            for (byte b : result) {
+                // 与运算
+                int number = b & 0xff;// 加盐
+                String str = Integer.toHexString(number);
+                if (str.length() == 1) {
+                    sb.append("0");
+                }
+                sb.append(str);
+            }
+            // 标准的md5加密后的结果
+            return sb.toString();
+        } catch (NoSuchAlgorithmException e) {
+            return "";
+        }
+        //endregion
+
+        //region 普通方式
+
+            /*char hexDigits[] = {
+                    '0', '1', '2', '3', '4', '5', '6', '7', '8', '9', 'A', 'B', 'C', 'D', 'E', 'F'
+            };
+            try {
+                byte[] btInput = content.getBytes();
+                // 获得MD5摘要算法的 MessageDigest 对象
+                MessageDigest mdInst = MessageDigest.getInstance("MD5");
+                // 使用指定的字节更新摘要
+                mdInst.update(btInput);
+                // 获得密文
+                byte[] md = mdInst.digest();
+                // 把密文转换成十六进制的字符串形式
+                int j = md.length;
+                char str[] = new char[j * 2];
+                int k = 0;
+                for (int i = 0; i < j; i++) {
+                    byte byte0 = md[i];
+                    str[k++] = hexDigits[byte0 >>> 4 & 0xf];
+                    str[k++] = hexDigits[byte0 & 0xf];
+                }
+                return new String(str);
+            } catch (Exception e) {
+                return "";
+            }*/
+
+        //endregion
+    }
+}

+ 65 - 0
secure-producting-common/src/main/java/com/customs/cq/datacenter/common/encrypt/encryptor/RsaEncryptor.java

@@ -0,0 +1,65 @@
+package com.customs.cq.datacenter.common.encrypt.encryptor;
+
+import cn.hutool.core.codec.Base64;
+import cn.hutool.crypto.SecureUtil;
+import cn.hutool.crypto.asymmetric.KeyType;
+import cn.hutool.crypto.asymmetric.RSA;
+import com.customs.cq.datacenter.common.encrypt.EncryptContext;
+import com.customs.cq.datacenter.common.enums.AlgorithmType;
+import com.customs.cq.datacenter.common.enums.EncodeType;
+import com.customs.cq.datacenter.common.utils.StringUtils;
+
+
+/**
+ * RSA算法实现
+ *
+ * @author 老马
+ * @version 4.6.0
+ */
+public class RsaEncryptor extends AbstractEncryptor {
+
+    private final RSA rsa;
+
+    public RsaEncryptor(EncryptContext context) {
+        super(context);
+        String privateKey = context.getPrivateKey();
+        String publicKey = context.getPublicKey();
+        if (StringUtils.isAnyEmpty(privateKey, publicKey)) {
+            throw new IllegalArgumentException("RSA公私钥均需要提供,公钥加密,私钥解密。");
+        }
+        this.rsa = SecureUtil.rsa(Base64.decode(privateKey), Base64.decode(publicKey));
+    }
+
+    /**
+     * 获得当前算法
+     */
+    @Override
+    public AlgorithmType algorithm() {
+        return AlgorithmType.RSA;
+    }
+
+    /**
+     * 加密
+     *
+     * @param value      待加密字符串
+     * @param encodeType 加密后的编码格式
+     */
+    @Override
+    public String encrypt(String value, EncodeType encodeType) {
+        if (encodeType == EncodeType.HEX) {
+            return rsa.encryptHex(value, KeyType.PublicKey);
+        } else {
+            return rsa.encryptBase64(value, KeyType.PublicKey);
+        }
+    }
+
+    /**
+     * 解密
+     *
+     * @param value      待加密字符串
+     */
+    @Override
+    public String decrypt(String value) {
+        return this.rsa.decryptStr(value, KeyType.PrivateKey);
+    }
+}

+ 65 - 0
secure-producting-common/src/main/java/com/customs/cq/datacenter/common/encrypt/encryptor/Sm2Encryptor.java

@@ -0,0 +1,65 @@
+package com.customs.cq.datacenter.common.encrypt.encryptor;
+
+
+import cn.hutool.core.codec.Base64;
+import cn.hutool.crypto.SmUtil;
+import cn.hutool.crypto.asymmetric.KeyType;
+import cn.hutool.crypto.asymmetric.SM2;
+import com.customs.cq.datacenter.common.encrypt.EncryptContext;
+import com.customs.cq.datacenter.common.enums.AlgorithmType;
+import com.customs.cq.datacenter.common.enums.EncodeType;
+import com.customs.cq.datacenter.common.utils.StringUtils;
+
+/**
+ * sm2算法实现
+ *
+ * @author 老马
+ * @version 4.6.0
+ */
+public class Sm2Encryptor extends AbstractEncryptor {
+
+    private final SM2 sm2;
+
+    public Sm2Encryptor(EncryptContext context) {
+        super(context);
+        String privateKey = context.getPrivateKey();
+        String publicKey = context.getPublicKey();
+        if (StringUtils.isAnyEmpty(privateKey, publicKey)) {
+            throw new IllegalArgumentException("SM2公私钥均需要提供,公钥加密,私钥解密。");
+        }
+        this.sm2 = SmUtil.sm2(Base64.decode(privateKey), Base64.decode(publicKey));
+    }
+
+    /**
+     * 获得当前算法
+     */
+    @Override
+    public AlgorithmType algorithm() {
+        return AlgorithmType.SM2;
+    }
+
+    /**
+     * 加密
+     *
+     * @param value      待加密字符串
+     * @param encodeType 加密后的编码格式
+     */
+    @Override
+    public String encrypt(String value, EncodeType encodeType) {
+        if (encodeType == EncodeType.HEX) {
+            return sm2.encryptHex(value, KeyType.PublicKey);
+        } else {
+            return sm2.encryptBase64(value, KeyType.PublicKey);
+        }
+    }
+
+    /**
+     * 解密
+     *
+     * @param value      待加密字符串
+     */
+    @Override
+    public String decrypt(String value) {
+        return this.sm2.decryptStr(value, KeyType.PrivateKey);
+    }
+}

+ 67 - 0
secure-producting-common/src/main/java/com/customs/cq/datacenter/common/encrypt/encryptor/Sm4Encryptor.java

@@ -0,0 +1,67 @@
+package com.customs.cq.datacenter.common.encrypt.encryptor;
+
+import cn.hutool.core.util.StrUtil;
+import cn.hutool.crypto.SmUtil;
+import cn.hutool.crypto.symmetric.SM4;
+import com.customs.cq.datacenter.common.encrypt.EncryptContext;
+import com.customs.cq.datacenter.common.enums.AlgorithmType;
+import com.customs.cq.datacenter.common.enums.EncodeType;
+
+import java.nio.charset.StandardCharsets;
+
+/**
+ * sm4算法实现
+ *
+ * @author 老马
+ * @version 4.6.0
+ */
+public class Sm4Encryptor extends AbstractEncryptor {
+
+    private final SM4 sm4;
+
+    public Sm4Encryptor(EncryptContext context) {
+        super(context);
+        String password = context.getPassword();
+        if (StrUtil.isBlank(password)) {
+            throw new IllegalArgumentException("SM4没有获得秘钥信息");
+        }
+        // sm4算法的秘钥要求是16位长度
+        if (16 != password.length()) {
+            throw new IllegalArgumentException("SM4秘钥长度应该为16位,实际为" + password.length() + "位");
+        }
+        this.sm4 = SmUtil.sm4(password.getBytes(StandardCharsets.UTF_8));
+    }
+
+    /**
+     * 获得当前算法
+     */
+    @Override
+    public AlgorithmType algorithm() {
+        return AlgorithmType.SM4;
+    }
+
+    /**
+     * 加密
+     *
+     * @param value      待加密字符串
+     * @param encodeType 加密后的编码格式
+     */
+    @Override
+    public String encrypt(String value, EncodeType encodeType) {
+        if (encodeType == EncodeType.HEX) {
+            return sm4.encryptHex(value);
+        } else {
+            return sm4.encryptBase64(value);
+        }
+    }
+
+    /**
+     * 解密
+     *
+     * @param value      待加密字符串
+     */
+    @Override
+    public String decrypt(String value) {
+        return this.sm4.decryptStr(value);
+    }
+}

Деякі файли не було показано, через те що забагато файлів було змінено