Procházet zdrojové kódy

提交服务更新

提交服务更新
zhiqiang.yu před 3 měsíci
rodič
revize
99797fdb3a
100 změnil soubory, kde provedl 8189 přidání a 19 odebrání
  1. 38 0
      .gitignore
  2. 3 0
      .idea/.gitignore
  3. 7 0
      .idea/MarsCodeWorkspaceAppSettings.xml
  4. 9 0
      .idea/encodings.xml
  5. 14 0
      .idea/misc.xml
  6. 6 0
      .idea/vcs.xml
  7. 40 19
      .idea/workspace.xml
  8. 8 0
      LICENSE
  9. 4 0
      README.md
  10. 21 0
      dockerfile
  11. 246 0
      pom.xml
  12. 33 0
      src/main/java/com/poyee/common/service/CommonApplication.java
  13. 15 0
      src/main/java/com/poyee/common/service/annotation/RequireRoles.java
  14. 17 0
      src/main/java/com/poyee/common/service/annotation/Sensitive.java
  15. 12 0
      src/main/java/com/poyee/common/service/annotation/SensitiveData.java
  16. 17 0
      src/main/java/com/poyee/common/service/annotation/View.java
  17. 21 0
      src/main/java/com/poyee/common/service/aop/AppClient.java
  18. 66 0
      src/main/java/com/poyee/common/service/aop/AppRoleAspect.java
  19. 45 0
      src/main/java/com/poyee/common/service/aop/ControllerLoggingInterceptor.java
  20. 8 0
      src/main/java/com/poyee/common/service/common/constant/Constants.java
  21. 90 0
      src/main/java/com/poyee/common/service/common/constant/HttpStatus.java
  22. 67 0
      src/main/java/com/poyee/common/service/common/core/controller/BaseController.java
  23. 184 0
      src/main/java/com/poyee/common/service/common/core/domain/AjaxResult.java
  24. 183 0
      src/main/java/com/poyee/common/service/common/core/domain/BaseEntity.java
  25. 219 0
      src/main/java/com/poyee/common/service/common/core/domain/entity/SysRole.java
  26. 332 0
      src/main/java/com/poyee/common/service/common/core/domain/entity/SysUser.java
  27. 246 0
      src/main/java/com/poyee/common/service/common/core/domain/model/LoginUser.java
  28. 9 0
      src/main/java/com/poyee/common/service/common/core/page/InData.java
  29. 140 0
      src/main/java/com/poyee/common/service/common/core/page/PageDomain.java
  30. 87 0
      src/main/java/com/poyee/common/service/common/core/page/TableDataInfo.java
  31. 55 0
      src/main/java/com/poyee/common/service/common/core/page/TableSupport.java
  32. 94 0
      src/main/java/com/poyee/common/service/common/core/text/CharsetKit.java
  33. 830 0
      src/main/java/com/poyee/common/service/common/core/text/Convert.java
  34. 86 0
      src/main/java/com/poyee/common/service/common/core/text/StrFormatter.java
  35. 74 0
      src/main/java/com/poyee/common/service/common/enums/BusinessType.java
  36. 25 0
      src/main/java/com/poyee/common/service/common/enums/OperatorType.java
  37. 86 0
      src/main/java/com/poyee/common/service/common/exception/GlobalExceptionHandler.java
  38. 12 0
      src/main/java/com/poyee/common/service/common/exception/LockException.java
  39. 9 0
      src/main/java/com/poyee/common/service/common/exception/LockedTaskException.java
  40. 66 0
      src/main/java/com/poyee/common/service/common/exception/ServiceException.java
  41. 24 0
      src/main/java/com/poyee/common/service/common/exception/UtilException.java
  42. 90 0
      src/main/java/com/poyee/common/service/common/filter/AuthenticationFilter.java
  43. 19 0
      src/main/java/com/poyee/common/service/common/user/BaseConfig.java
  44. 41 0
      src/main/java/com/poyee/common/service/common/user/CommonConfig.java
  45. 55 0
      src/main/java/com/poyee/common/service/common/user/UserInfo.java
  46. 144 0
      src/main/java/com/poyee/common/service/common/user/UserUtils.java
  47. 49 0
      src/main/java/com/poyee/common/service/common/utils/Base64Util.java
  48. 12 0
      src/main/java/com/poyee/common/service/common/utils/CanonicalHostNamePropertyDefiner.java
  49. 28 0
      src/main/java/com/poyee/common/service/common/utils/CloneUtils.java
  50. 190 0
      src/main/java/com/poyee/common/service/common/utils/DateUtils.java
  51. 60 0
      src/main/java/com/poyee/common/service/common/utils/DozerUtils.java
  52. 122 0
      src/main/java/com/poyee/common/service/common/utils/HttpUtils.java
  53. 34 0
      src/main/java/com/poyee/common/service/common/utils/JsonConvertUtils.java
  54. 58 0
      src/main/java/com/poyee/common/service/common/utils/Md5Utils.java
  55. 84 0
      src/main/java/com/poyee/common/service/common/utils/NetworkAddressUtil.java
  56. 39 0
      src/main/java/com/poyee/common/service/common/utils/PageUtils.java
  57. 61 0
      src/main/java/com/poyee/common/service/common/utils/PaginationUtil.java
  58. 103 0
      src/main/java/com/poyee/common/service/common/utils/SecurityUtils.java
  59. 159 0
      src/main/java/com/poyee/common/service/common/utils/SensitiveDataUtils.java
  60. 109 0
      src/main/java/com/poyee/common/service/common/utils/ServletUtils.java
  61. 415 0
      src/main/java/com/poyee/common/service/common/utils/StringUtils.java
  62. 48 0
      src/main/java/com/poyee/common/service/common/utils/UserType.java
  63. 334 0
      src/main/java/com/poyee/common/service/common/utils/reflect/ReflectUtils.java
  64. 55 0
      src/main/java/com/poyee/common/service/common/utils/sql/SqlUtil.java
  65. 20 0
      src/main/java/com/poyee/common/service/config/CorsConfig.java
  66. 15 0
      src/main/java/com/poyee/common/service/config/HttpConfig.java
  67. 43 0
      src/main/java/com/poyee/common/service/config/ReadinessHealthIndicator.java
  68. 32 0
      src/main/java/com/poyee/common/service/config/SecurityConfig.java
  69. 136 0
      src/main/java/com/poyee/common/service/config/SwaggerConfig.java
  70. 19 0
      src/main/java/com/poyee/common/service/config/TaskSchedulerConfig.java
  71. 20 0
      src/main/java/com/poyee/common/service/config/WebConfig.java
  72. 57 0
      src/main/java/com/poyee/common/service/forest/CommonForestClient.java
  73. 239 0
      src/main/java/com/poyee/common/service/param/CardReportDispDTO.java
  74. 319 0
      src/main/java/com/poyee/common/service/param/ForumEntity.java
  75. 282 0
      src/main/java/com/poyee/common/service/param/ForumEntityDetail.java
  76. 15 0
      src/main/java/com/poyee/common/service/param/ForumEntityDto.java
  77. 15 0
      src/main/java/com/poyee/common/service/param/ForumEntityListDto.java
  78. 11 0
      src/main/java/com/poyee/common/service/param/ForumExtendEntity.java
  79. 11 0
      src/main/java/com/poyee/common/service/param/ForumQueryEntity.java
  80. 7 0
      src/main/java/com/poyee/common/service/param/ForumQueryExtendEntity.java
  81. 9 0
      src/main/java/com/poyee/common/service/param/ForumQueryListExtendEntity.java
  82. 11 0
      src/main/java/com/poyee/common/service/param/ForumRespEntity.java
  83. 7 0
      src/main/java/com/poyee/common/service/param/InData.java
  84. 82 0
      src/main/java/com/poyee/common/service/param/LocationInfo.java
  85. 16 0
      src/main/java/com/poyee/common/service/param/QueryParam.java
  86. 13 0
      src/main/java/com/poyee/common/service/param/Response.java
  87. 166 0
      src/main/java/com/poyee/common/service/param/SenderEntity.java
  88. 17 0
      src/main/java/com/poyee/common/service/param/SyncParam.java
  89. 73 0
      src/main/java/com/poyee/common/service/param/UserInfo.java
  90. 13 0
      src/main/java/com/poyee/common/service/repo/CardReportRepository.java
  91. 87 0
      src/main/java/com/poyee/common/service/repo/Impl/CardReportSearchService.java
  92. 205 0
      src/main/java/com/poyee/common/service/repo/domain/AppUserWinCard.java
  93. 136 0
      src/main/java/com/poyee/common/service/repo/domain/CardReportDTO.java
  94. 151 0
      src/main/java/com/poyee/common/service/repo/domain/MerchantInfo.java
  95. 14 0
      src/main/java/com/poyee/common/service/repo/mapper/AppUserWinCardMapper.java
  96. 16 0
      src/main/java/com/poyee/common/service/repo/mapper/MerchantApiMapper.java
  97. 17 0
      src/main/java/com/poyee/common/service/service/ICardReportConvert.java
  98. 21 0
      src/main/java/com/poyee/common/service/service/ICardReportForumService.java
  99. 21 0
      src/main/java/com/poyee/common/service/service/IESSerchService.java
  100. 16 0
      src/main/java/com/poyee/common/service/service/IESSyncService.java

+ 38 - 0
.gitignore

@@ -0,0 +1,38 @@
+target/
+!.mvn/wrapper/maven-wrapper.jar
+!**/src/main/**/target/
+!**/src/test/**/target/
+
+### IntelliJ IDEA ###
+.idea/modules.xml
+.idea/jarRepositories.xml
+.idea/compiler.xml
+.idea/libraries/
+*.iws
+*.iml
+*.ipr
+
+### Eclipse ###
+.apt_generated
+.classpath
+.factorypath
+.project
+.settings
+.springBeans
+.sts4-cache
+
+### NetBeans ###
+/nbproject/private/
+/nbbuild/
+/dist/
+/nbdist/
+/.nb-gradle/
+build/
+!**/src/main/**/build/
+!**/src/test/**/build/
+
+### VS Code ###
+.vscode/
+
+### Mac OS ###
+.DS_Store

+ 3 - 0
.idea/.gitignore

@@ -0,0 +1,3 @@
+# Default ignored files
+/shelf/
+/workspace.xml

+ 7 - 0
.idea/MarsCodeWorkspaceAppSettings.xml

@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project version="4">
+  <component name="com.codeverse.userSettings.MarscodeWorkspaceAppSettingsState">
+    <option name="ckgOperationStatus" value="SUCCESS" />
+    <option name="progress" value="1.0" />
+  </component>
+</project>

+ 9 - 0
.idea/encodings.xml

@@ -0,0 +1,9 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project version="4">
+  <component name="Encoding">
+    <file url="file://$PROJECT_DIR$/poyee-card-report/src/main/java" charset="UTF-8" />
+    <file url="file://$PROJECT_DIR$/poyee-card-report/src/main/resources" charset="UTF-8" />
+    <file url="file://$PROJECT_DIR$/src/main/java" charset="UTF-8" />
+    <file url="file://$PROJECT_DIR$/src/main/resources" charset="UTF-8" />
+  </component>
+</project>

+ 14 - 0
.idea/misc.xml

@@ -0,0 +1,14 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project version="4">
+  <component name="ExternalStorageConfigurationManager" enabled="true" />
+  <component name="MavenProjectsManager">
+    <option name="originalFiles">
+      <list>
+        <option value="$PROJECT_DIR$/pom.xml" />
+      </list>
+    </option>
+  </component>
+  <component name="ProjectRootManager" version="2" languageLevel="JDK_17" default="true" project-jdk-name="17" project-jdk-type="JavaSDK">
+    <output url="file://$PROJECT_DIR$/out" />
+  </component>
+</project>

+ 6 - 0
.idea/vcs.xml

@@ -0,0 +1,6 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project version="4">
+  <component name="VcsDirectoryMappings">
+    <mapping directory="$PROJECT_DIR$" vcs="Git" />
+  </component>
+</project>

+ 40 - 19
.idea/workspace.xml

@@ -4,26 +4,35 @@
     <option name="autoReloadType" value="SELECTIVE" />
   </component>
   <component name="ChangeListManager">
-    <list default="true" id="ba6500c7-8f21-4904-806d-a5b5b6b52b31" name="Changes" comment="" />
+    <list default="true" id="951e08b9-9ece-4f4a-b032-590d979f4a24" name="Changes" comment="">
+      <change afterPath="$PROJECT_DIR$/.idea/.gitignore" afterDir="false" />
+      <change afterPath="$PROJECT_DIR$/.idea/MarsCodeWorkspaceAppSettings.xml" afterDir="false" />
+      <change afterPath="$PROJECT_DIR$/.idea/encodings.xml" afterDir="false" />
+      <change afterPath="$PROJECT_DIR$/.idea/misc.xml" afterDir="false" />
+      <change afterPath="$PROJECT_DIR$/.idea/vcs.xml" afterDir="false" />
+      <change afterPath="$PROJECT_DIR$/src/main/java/com/poyee/common/service/web/MvcLdapController.java" afterDir="false" />
+      <change beforePath="$PROJECT_DIR$/.idea/workspace.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/workspace.xml" afterDir="false" />
+    </list>
     <option name="SHOW_DIALOG" value="false" />
     <option name="HIGHLIGHT_CONFLICTS" value="true" />
     <option name="HIGHLIGHT_NON_ACTIVE_CHANGELIST" value="false" />
     <option name="LAST_RESOLUTION" value="IGNORE" />
   </component>
+  <component name="FileTemplateManagerImpl">
+    <option name="RECENT_TEMPLATES">
+      <list>
+        <option value="Class" />
+      </list>
+    </option>
+  </component>
   <component name="Git.Settings">
     <option name="RECENT_GIT_ROOT_PATH" value="$PROJECT_DIR$" />
   </component>
-  <component name="MavenImportPreferences">
-    <option name="importingSettings">
-      <MavenImportingSettings>
-        <option name="jdkForImporter" value="1.8" />
-      </MavenImportingSettings>
-    </option>
-  </component>
-  <component name="ProjectColorInfo"><![CDATA[{
-  "associatedIndex": 4
-}]]></component>
-  <component name="ProjectId" id="2zXgM8aPgwWeidwfOa0Q4x9CTny" />
+  <component name="ProjectColorInfo">{
+  &quot;customColor&quot;: &quot;&quot;,
+  &quot;associatedIndex&quot;: 8
+}</component>
+  <component name="ProjectId" id="32Ed9wguXdfQ3PXHp6a1neNPGTL" />
   <component name="ProjectViewState">
     <option name="hideEmptyMiddlePackages" value="true" />
     <option name="showLibraryContents" value="true" />
@@ -31,25 +40,37 @@
   <component name="PropertiesComponent"><![CDATA[{
   "keyToString": {
     "ASKED_SHARE_PROJECT_CONFIGURATION_FILES": "true",
+    "Application.poyee-common.executor": "Debug",
+    "Maven.poyee-common [install].executor": "Run",
+    "Maven.poyee-common [io.spring.javaformat:spring-javaformat-maven-plugin:0.0.39:apply].executor": "Run",
     "RunOnceActivity.ShowReadmeOnStart": "true",
     "RunOnceActivity.git.unshallow": "true",
+    "SHARE_PROJECT_CONFIGURATION_FILES": "true",
     "git-widget-placeholder": "master",
     "kotlin-language-version-configured": "true",
     "last_opened_file_path": "C:/Git/poyee-common",
-    "project.structure.last.edited": "Project",
-    "project.structure.proportion": "0.0",
-    "project.structure.side.proportion": "0.2",
-    "settings.editor.selected.configurable": "reference.settings.project.maven.importing"
+    "project.structure.last.edited": "Modules",
+    "project.structure.proportion": "0.15",
+    "project.structure.side.proportion": "0.2"
   }
 }]]></component>
+  <component name="RunManager">
+    <configuration name="poyee-common" type="Application" factoryName="Application">
+      <option name="MAIN_CLASS_NAME" value="com.poyee.common.service.CommonApplication" />
+      <module name="poyee-common" />
+      <method v="2">
+        <option name="Make" enabled="true" />
+      </method>
+    </configuration>
+  </component>
   <component name="SpellCheckerSettings" RuntimeDictionaries="0" Folders="0" CustomDictionaries="0" DefaultDictionary="application-level" UseSingleDictionary="true" transferred="true" />
   <component name="TaskManager">
     <task active="true" id="Default" summary="Default task">
-      <changelist id="ba6500c7-8f21-4904-806d-a5b5b6b52b31" name="Changes" comment="" />
-      <created>1751882780784</created>
+      <changelist id="951e08b9-9ece-4f4a-b032-590d979f4a24" name="Changes" comment="" />
+      <created>1756989517727</created>
       <option name="number" value="Default" />
       <option name="presentableId" value="Default" />
-      <updated>1751882780784</updated>
+      <updated>1756989517727</updated>
     </task>
     <servers />
   </component>

+ 8 - 0
LICENSE

@@ -0,0 +1,8 @@
+MIT License
+Copyright (c) <year> <copyright holders>
+
+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.

+ 4 - 0
README.md

@@ -0,0 +1,4 @@
+# card-report
+
+card-report
+拆卡报告搜索

+ 21 - 0
dockerfile

@@ -0,0 +1,21 @@
+# 使用 openjdk:17-alpine 作为基础镜像
+FROM openjdk:17-alpine
+
+# 设置工作目录
+WORKDIR /app
+
+
+# 安装 wget 和 tar,用于下载 Java 8
+
+
+# 下载并安装 Java 8
+
+
+# 设置 Java 8 环境变量
+EXPOSE 8095
+
+# 复制你的 Java 8 应用 JAR 文件到容器中
+COPY /target/poyee-card-report.jar /app/
+
+# 运行 Java 8 应用
+CMD ["java", "-jar", "poyee-card-report.jar"]    

+ 246 - 0
pom.xml

@@ -0,0 +1,246 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+         xmlns="http://maven.apache.org/POM/4.0.0"
+         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+    <modelVersion>4.0.0</modelVersion>
+
+    <groupId>com.poyee</groupId>
+    <artifactId>poyee-common</artifactId>
+    <version>1.0-SNAPSHOT</version>
+    <properties>
+        <maven.compiler.source>8</maven.compiler.source>
+        <maven.compiler.target>8</maven.compiler.target>
+        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
+    </properties>
+    <parent>
+        <groupId>org.springframework.boot</groupId>
+        <artifactId>spring-boot-starter-parent</artifactId>
+        <version>2.5.13</version> <!-- 可根据实际情况选择合适版本 -->
+        <relativePath/> <!-- lookup parent from repository -->
+    </parent>
+    <dependencies>
+        <dependency>
+            <groupId>org.yaml</groupId>
+            <artifactId>snakeyaml</artifactId>
+            <version>1.28</version>
+        </dependency>
+        <dependency>
+            <groupId>com.fasterxml.jackson.core</groupId>
+            <artifactId>jackson-databind</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>org.postgresql</groupId>
+            <artifactId>postgresql</artifactId>
+            <version>42.2.25</version>
+        </dependency>
+        <dependency>
+            <groupId>org.codehaus.janino</groupId>
+            <artifactId>janino</artifactId>
+            <version>3.0.12</version>
+        </dependency>
+        <dependency>
+            <groupId>org.springframework.boot</groupId>
+            <artifactId>spring-boot-starter-tomcat</artifactId>
+            <version>2.5.13</version>
+        </dependency>
+        <dependency>
+            <groupId>org.springframework.boot</groupId>
+            <artifactId>spring-boot-autoconfigure</artifactId>
+            <version>2.5.13</version>
+        </dependency>
+        <dependency>
+            <groupId>org.springframework.boot</groupId>
+            <artifactId>spring-boot-starter-actuator</artifactId>
+            <version>2.5.13</version>
+        </dependency>
+        <!-- pagehelper 分页插件 -->
+        <dependency>
+            <groupId>com.github.pagehelper</groupId>
+            <artifactId>pagehelper-spring-boot-starter</artifactId>
+            <version>1.4.1</version>
+        </dependency>
+        <dependency>
+            <groupId>com.alibaba</groupId>
+            <artifactId>druid-spring-boot-starter</artifactId>
+            <version>1.2.17</version>
+        </dependency>
+        <dependency>
+            <groupId>org.mybatis.spring.boot</groupId>
+            <artifactId>mybatis-spring-boot-starter</artifactId>
+            <version>2.2.2</version>
+        </dependency>
+        <dependency>
+            <groupId>commons-io</groupId>
+            <artifactId>commons-io</artifactId>
+            <version>2.11.0</version>
+        </dependency>
+        <dependency>
+            <groupId>commons-collections</groupId>
+            <artifactId>commons-collections</artifactId>
+            <version>3.2.2</version>
+        </dependency>
+
+        <!-- 阿里JSON解析器 -->
+        <dependency>
+            <groupId>com.alibaba</groupId>
+            <artifactId>fastjson</artifactId>
+            <version>1.2.80</version>
+        </dependency>
+
+        <!-- Swagger3依赖 -->
+        <dependency>
+            <groupId>io.springfox</groupId>
+            <artifactId>springfox-boot-starter</artifactId>
+            <version>3.0.0</version>
+            <exclusions>
+                <exclusion>
+                    <groupId>io.swagger</groupId>
+                    <artifactId>swagger-models</artifactId>
+                </exclusion>
+            </exclusions>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.commons</groupId>
+            <artifactId>commons-pool2</artifactId>
+            <version>2.6.2</version>
+        </dependency>
+        <dependency>
+            <groupId>com.google.guava</groupId>
+            <artifactId>guava</artifactId>
+            <version>33.3.1-jre</version>
+            <scope>compile</scope>
+        </dependency>
+        <dependency>
+            <groupId>org.projectlombok</groupId>
+            <artifactId>lombok</artifactId>
+            <version>1.18.36</version>
+            <scope>provided</scope>
+        </dependency>
+        <dependency>
+            <groupId>org.springframework</groupId>
+            <artifactId>spring-beans</artifactId>
+            <version>5.3.19</version>
+        </dependency>
+        <dependency>
+            <groupId>org.springframework</groupId>
+            <artifactId>spring-webmvc</artifactId>
+            <version>5.3.19</version>
+        </dependency>
+        <dependency>
+            <groupId>com.dtflys.forest</groupId>
+            <artifactId>forest-spring-boot-starter</artifactId>
+            <version>1.5.24</version>
+        </dependency>
+        <dependency>
+            <groupId>org.aspectj</groupId>
+            <artifactId>aspectjrt</artifactId>
+            <version>1.9.7</version>
+        </dependency>
+        <dependency>
+            <groupId>javax.servlet</groupId>
+            <artifactId>javax.servlet-api</artifactId>
+            <version>4.0.1</version>
+        </dependency>
+        <dependency>
+            <groupId>org.springframework.boot</groupId>
+            <artifactId>spring-boot-starter-logging</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>org.springframework.security</groupId>
+            <artifactId>spring-security-config</artifactId>
+            <version>5.6.0</version>
+        </dependency>
+        <dependency>
+            <groupId>org.springframework.security</groupId>
+            <artifactId>spring-security-web</artifactId>
+            <version>5.6.0</version>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.commons</groupId>
+            <artifactId>commons-lang3</artifactId>
+            <version>3.14.0</version>
+        </dependency>
+        <dependency>
+            <groupId>io.swagger</groupId>
+            <artifactId>swagger-models</artifactId>
+            <version>1.6.2</version>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.poi</groupId>
+            <artifactId>poi</artifactId>
+            <version>5.2.2</version>
+        </dependency>
+        <dependency>
+            <groupId>org.springframework</groupId>
+            <artifactId>spring-web</artifactId>
+            <version>5.3.19</version>
+        </dependency>
+        <dependency>
+            <groupId>cn.easy-es</groupId>
+            <artifactId>easy-es-boot-starter</artifactId>
+            <version>2.0.0-beta1</version>
+        </dependency>
+        <dependency>
+            <groupId>com.sndyuk</groupId>
+            <artifactId>logback-more-appenders</artifactId>
+            <version>1.8.5</version>
+        </dependency>
+        <dependency>
+            <groupId>org.fluentd</groupId>
+            <artifactId>fluent-logger</artifactId>
+            <version>0.3.4</version>
+        </dependency>
+        <dependency>
+            <groupId>com.github.dozermapper</groupId>
+            <artifactId>dozer-spring-boot-starter</artifactId>
+            <version>6.5.2</version>
+        </dependency>
+        <dependency>
+            <groupId>com.github.xiaoymin</groupId>
+            <artifactId>knife4j-spring-boot-starter</artifactId>
+            <version>2.0.9</version>
+        </dependency>
+        <dependency>
+            <groupId>com.baomidou</groupId>
+            <artifactId>mybatis-plus-boot-starter</artifactId>
+            <version>3.5.2</version>
+        </dependency>
+    </dependencies>
+
+    <build>
+        <plugins>
+            <plugin>
+                <groupId>io.spring.javaformat</groupId>
+                <artifactId>spring-javaformat-maven-plugin</artifactId>
+                <version>0.0.39</version>
+            </plugin>
+            <plugin>
+                <groupId>org.springframework.boot</groupId>
+                <artifactId>spring-boot-maven-plugin</artifactId>
+                <version>2.1.1.RELEASE</version>
+                <configuration>
+                    <fork>true</fork> <!-- 如果没有该配置,devtools不会生效 -->
+                    <includeSystemScope>true</includeSystemScope>
+                </configuration>
+
+                <executions>
+                    <execution>
+                        <goals>
+                            <goal>repackage</goal>
+                        </goals>
+                    </execution>
+                </executions>
+            </plugin>
+            <plugin>
+                <groupId>org.apache.maven.plugins</groupId>
+                <artifactId>maven-war-plugin</artifactId>
+                <version>3.0.0</version>
+                <configuration>
+                    <failOnMissingWebXml>false</failOnMissingWebXml>
+                    <warName>${project.artifactId}</warName>
+                </configuration>
+            </plugin>
+        </plugins>
+        <finalName>${project.artifactId}</finalName>
+    </build>
+</project>

+ 33 - 0
src/main/java/com/poyee/common/service/CommonApplication.java

@@ -0,0 +1,33 @@
+package com.poyee.common.service;
+
+import cn.easyes.starter.register.EsMapperScan;
+import lombok.extern.slf4j.Slf4j;
+import org.mybatis.spring.annotation.MapperScan;
+import org.springframework.boot.SpringApplication;
+import org.springframework.boot.autoconfigure.SpringBootApplication;
+import org.springframework.boot.autoconfigure.jackson.Jackson2ObjectMapperBuilderCustomizer;
+import org.springframework.context.annotation.Bean;
+import org.springframework.scheduling.annotation.EnableScheduling;
+import springfox.documentation.oas.annotations.EnableOpenApi;
+
+import java.util.TimeZone;
+
+@SpringBootApplication
+@EnableScheduling
+@Slf4j
+@EnableOpenApi
+@EsMapperScan("com.poyee.common.repo")
+@MapperScan("com.poyee.**.mapper")
+public class CommonApplication {
+
+	public static void main(String[] args) {
+		SpringApplication.run(com.poyee.common.service.CommonApplication.class, args);
+		log.info("(♥◠‿◠)ノ゙ app启动成功   ლ(´ڡ`ლ)゙");
+	}
+
+	@Bean
+	public Jackson2ObjectMapperBuilderCustomizer jacksonObjectMapperCustomization() {
+		return jacksonObjectMapperBuilder -> jacksonObjectMapperBuilder.timeZone(TimeZone.getTimeZone("GMT+8"));
+	}
+
+}

+ 15 - 0
src/main/java/com/poyee/common/service/annotation/RequireRoles.java

@@ -0,0 +1,15 @@
+package com.poyee.common.service.annotation;
+
+import java.lang.annotation.*;
+
+@Target({ ElementType.PARAMETER, ElementType.METHOD })
+@Retention(RetentionPolicy.RUNTIME)
+@Documented
+public @interface RequireRoles {
+
+	/**
+	 * 角色
+	 */
+	String[] value();
+
+}

+ 17 - 0
src/main/java/com/poyee/common/service/annotation/Sensitive.java

@@ -0,0 +1,17 @@
+package com.poyee.common.service.annotation;
+
+import java.lang.annotation.ElementType;
+import java.lang.annotation.Retention;
+import java.lang.annotation.RetentionPolicy;
+import java.lang.annotation.Target;
+
+@Target(ElementType.FIELD)
+@Retention(RetentionPolicy.RUNTIME)
+public @interface Sensitive {
+
+	/**
+	 * 1-仅手机号脱敏 2-取首字母脱敏
+	 */
+	int type() default 1;
+
+}

+ 12 - 0
src/main/java/com/poyee/common/service/annotation/SensitiveData.java

@@ -0,0 +1,12 @@
+package com.poyee.common.service.annotation;
+
+import java.lang.annotation.ElementType;
+import java.lang.annotation.Retention;
+import java.lang.annotation.RetentionPolicy;
+import java.lang.annotation.Target;
+
+@Target(ElementType.METHOD)
+@Retention(RetentionPolicy.RUNTIME)
+public @interface SensitiveData {
+
+}

+ 17 - 0
src/main/java/com/poyee/common/service/annotation/View.java

@@ -0,0 +1,17 @@
+package com.poyee.common.service.annotation;
+
+import java.lang.annotation.ElementType;
+import java.lang.annotation.Retention;
+import java.lang.annotation.RetentionPolicy;
+import java.lang.annotation.Target;
+
+@Target(ElementType.FIELD)
+@Retention(RetentionPolicy.RUNTIME)
+public @interface View {
+
+	/**
+	 * 1-设置为NULL
+	 */
+	int type();
+
+}

+ 21 - 0
src/main/java/com/poyee/common/service/aop/AppClient.java

@@ -0,0 +1,21 @@
+package com.poyee.common.service.aop;
+
+import com.google.common.collect.Maps;
+import lombok.extern.slf4j.Slf4j;
+import org.slf4j.MDC;
+import org.springframework.stereotype.Component;
+
+import java.util.Map;
+
+@Component
+@Slf4j
+public class AppClient {
+
+	private Map<String, Object> getDefaultHeaderMap() {
+		Map<String, Object> headerMap = Maps.newHashMap();
+		String traceId = MDC.get("traceId");
+		headerMap.put("traceid", traceId);
+		return headerMap;
+	}
+
+}

+ 66 - 0
src/main/java/com/poyee/common/service/aop/AppRoleAspect.java

@@ -0,0 +1,66 @@
+package com.poyee.common.service.aop;
+
+import com.poyee.common.service.annotation.RequireRoles;
+import com.poyee.common.service.common.user.UserInfo;
+import com.poyee.common.service.common.user.UserUtils;
+import lombok.extern.slf4j.Slf4j;
+import org.aspectj.lang.ProceedingJoinPoint;
+import org.aspectj.lang.Signature;
+import org.aspectj.lang.annotation.Around;
+import org.aspectj.lang.annotation.Aspect;
+import org.aspectj.lang.annotation.Pointcut;
+import org.aspectj.lang.reflect.MethodSignature;
+import org.springframework.stereotype.Component;
+
+import java.lang.reflect.Method;
+import java.util.*;
+
+@Slf4j
+@Aspect
+@Component
+public class AppRoleAspect {
+
+	// 配置织入点
+	@Pointcut("@annotation(cn.hobbystocks.auc.annotation.RequireRoles)")
+	public void rolePointCut() {
+	}
+
+	// @RequireRoles({"admin"})
+	@Around("cn.hobbystocks.auc.aop.AppRoleAspect.rolePointCut()")
+	public Object roleBefore(ProceedingJoinPoint pjp) throws Throwable {
+		UserInfo user = UserUtils.getSimpleUserInfo();
+		Signature signature = pjp.getSignature();
+		MethodSignature methodSignature = (MethodSignature) signature;
+		Method targetMethod = methodSignature.getMethod();
+		RequireRoles annotation = targetMethod.getAnnotation(RequireRoles.class);
+		String[] roles = annotation.value();
+		List<String> requirePermissions = Arrays.asList(roles);
+		List<String> userPermissions = new ArrayList<>();
+		String role = user.getRoleCode() != null ? user.getRoleCode() : "";
+		userPermissions.add(role);
+		List<String> permissionsList = user.getPermissionsList();
+		// if (!CollectionUtils.isEmpty(permissionsList)) {
+		// userPermissions.addAll(permissionsList);
+		// }
+		// Set<String> commonRole = getCommonElements(requirePermissions,
+		// userPermissions);
+		// if (CollectionUtils.isEmpty(commonRole)) {
+		// log.info("权限不足,用户信息:{}",user);
+		// return AjaxResult.error("权限不足!");
+		// }
+		return pjp.proceed();
+
+	}
+
+	private Set<String> getCommonElements(List<String> list1, List<String> list2) {
+		// if (CollectionUtils.isEmpty(list1) || CollectionUtils.isEmpty(list2)) {
+		// return null;
+		// }
+		Set<String> set1 = new HashSet<>(list1);
+		Set<String> set2 = new HashSet<>(list2);
+		Set<String> commonElements = new HashSet<>(set1);
+		commonElements.retainAll(set2);
+		return commonElements;
+	}
+
+}

+ 45 - 0
src/main/java/com/poyee/common/service/aop/ControllerLoggingInterceptor.java

@@ -0,0 +1,45 @@
+package com.poyee.common.service.aop;
+
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.slf4j.MDC;
+import org.springframework.stereotype.Component;
+import org.springframework.web.servlet.HandlerInterceptor;
+
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+import java.util.UUID;
+
+@Component
+public class ControllerLoggingInterceptor implements HandlerInterceptor {
+
+	private static final Logger logger = LoggerFactory.getLogger(ControllerLoggingInterceptor.class);
+
+	private static final ThreadLocal<Long> startTime = new ThreadLocal<>();
+
+	@Override
+	public boolean preHandle(HttpServletRequest request, HttpServletResponse response, Object handler)
+			throws Exception {
+		String requestURI = request.getRequestURI();
+		String method = request.getMethod();
+		String traceId = UUID.randomUUID().toString();
+		request.setAttribute("traceId", traceId);
+		MDC.put("traceId", traceId);
+		logger.info("Controller method call start: {}", requestURI);
+		startTime.set(System.currentTimeMillis());
+		return true;
+	}
+
+	@Override
+	public void afterCompletion(HttpServletRequest request, HttpServletResponse response, Object handler,
+			Exception exception) throws Exception {
+		long endTime = System.currentTimeMillis();
+		long duration = endTime - startTime.get();
+		int responseCode = response.getStatus();
+		String requestURI = request.getRequestURI();
+		logger.info("Controller method called:{} resp {} in {} ms", requestURI, responseCode, duration);
+		startTime.remove();
+		MDC.remove("traceId");
+	}
+
+}

+ 8 - 0
src/main/java/com/poyee/common/service/common/constant/Constants.java

@@ -0,0 +1,8 @@
+package com.poyee.common.service.common.constant;
+
+/**
+ * 通用常量信息
+ */
+public class Constants {
+
+}

+ 90 - 0
src/main/java/com/poyee/common/service/common/constant/HttpStatus.java

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

+ 67 - 0
src/main/java/com/poyee/common/service/common/core/controller/BaseController.java

@@ -0,0 +1,67 @@
+package com.poyee.common.service.common.core.controller;
+
+import com.github.pagehelper.PageHelper;
+import com.poyee.common.service.common.core.domain.BaseEntity;
+import com.poyee.common.service.common.core.page.PageDomain;
+import com.poyee.common.service.common.core.page.TableSupport;
+import com.poyee.common.service.common.user.UserUtils;
+import com.poyee.common.service.common.utils.DateUtils;
+import com.poyee.common.service.common.utils.PageUtils;
+import com.poyee.common.service.common.utils.sql.SqlUtil;
+import org.apache.commons.lang3.StringUtils;
+import org.springframework.web.bind.WebDataBinder;
+import org.springframework.web.bind.annotation.InitBinder;
+
+import java.beans.PropertyEditorSupport;
+import java.util.Date;
+import java.util.Objects;
+
+public class BaseController {
+
+	/**
+	 * 将前台传递过来的日期格式的字符串,自动转化为Date类型
+	 */
+	@InitBinder
+	public void initBinder(WebDataBinder binder) {
+		// Date 类型转换
+		binder.registerCustomEditor(Date.class, new PropertyEditorSupport() {
+			@Override
+			public void setAsText(String text) {
+				setValue(DateUtils.parseDate(text));
+			}
+		});
+	}
+
+	/**
+	 * 设置请求分页数据
+	 */
+	protected void startPage(BaseEntity entity) {
+		PageUtils.startPage(entity);
+	}
+
+	/**
+	 * 设置请求排序数据
+	 */
+	protected void startOrderBy() {
+		PageDomain pageDomain = TableSupport.buildPageRequest();
+		if (StringUtils.isNotEmpty(pageDomain.getOrderBy())) {
+			String orderBy = SqlUtil.escapeOrderBySql(pageDomain.getOrderBy());
+			PageHelper.orderBy(orderBy);
+		}
+	}
+
+	/**
+	 * 获取登录用户id
+	 */
+	public Integer getUserId() {
+		return UserUtils.getSimpleUserInfo().getId();
+	}
+
+	/**
+	 * 获取登录用户名
+	 */
+	public String getUsername() {
+		return Objects.requireNonNull(UserUtils.getUserInfo()).getNickname();
+	}
+
+}

+ 184 - 0
src/main/java/com/poyee/common/service/common/core/domain/AjaxResult.java

@@ -0,0 +1,184 @@
+package com.poyee.common.service.common.core.domain;
+
+import com.github.pagehelper.Page;
+import com.github.pagehelper.PageInfo;
+import com.poyee.common.service.common.constant.HttpStatus;
+import com.poyee.common.service.common.utils.PaginationUtil;
+
+import java.util.Date;
+import java.util.HashMap;
+import java.util.List;
+
+/**
+ * 操作消息提醒
+ *
+ * @author ruoyi
+ */
+public class AjaxResult extends HashMap<String, Object> {
+
+	/**
+	 * 状态码
+	 */
+	public static final String CODE_TAG = "code";
+
+	/**
+	 * 返回内容
+	 */
+	public static final String MSG_TAG = "msg";
+
+	/**
+	 * 数据对象
+	 */
+	public static final String DATA_TAG = "data";
+
+	/**
+	 * 系统时间
+	 */
+	public static final String SERVER_TIME = "serverTime";
+
+	private static final long serialVersionUID = 1L;
+
+	/**
+	 * 初始化一个新创建的 AjaxResult 对象,使其表示一个空消息。
+	 */
+	public AjaxResult() {
+		super.put(SERVER_TIME, getNow());
+	}
+
+	/**
+	 * 初始化一个新创建的 AjaxResult 对象
+	 * @param code 状态码
+	 * @param msg 返回内容
+	 */
+	public AjaxResult(int code, String msg) {
+		super.put(SERVER_TIME, getNow());
+		super.put(CODE_TAG, code);
+		super.put(MSG_TAG, msg);
+	}
+
+	/**
+	 * 初始化一个新创建的 AjaxResult 对象
+	 * @param code 状态码
+	 * @param msg 返回内容
+	 * @param data 数据对象
+	 */
+	public AjaxResult(int code, String msg, Object data) {
+		super.put(SERVER_TIME, getNow());
+		super.put(CODE_TAG, code);
+		super.put(MSG_TAG, msg);
+		// if (Objects.nonNull(data)) {
+		super.put(DATA_TAG, data);
+		// }
+	}
+
+	public static <T> AjaxResult successNewPage(List<T> list) {
+		Page<T> data = (Page<T>) list;
+		return AjaxResult.success(new PaginationUtil.PageResult<>(data.getResult(), (int) data.getTotal(),
+				data.getPageNum(), data.getPageSize()));
+	}
+
+	/**
+	 * 返回成功消息
+	 * @return 成功消息
+	 */
+	public static AjaxResult success() {
+		return AjaxResult.success("操作成功");
+	}
+
+	/**
+	 * 返回成功数据
+	 * @return 成功消息
+	 */
+	public static AjaxResult success(Object data) {
+		return AjaxResult.success("操作成功", data);
+	}
+
+	/**
+	 * 返回成功消息
+	 * @param msg 返回内容
+	 * @return 成功消息
+	 */
+	public static AjaxResult success(String msg) {
+		return AjaxResult.success(msg, null);
+	}
+
+	/**
+	 * 返回成功消息
+	 * @param msg 返回内容
+	 * @param data 数据对象
+	 * @return 成功消息
+	 */
+	public static AjaxResult success(String msg, Object data) {
+		return new AjaxResult(HttpStatus.SUCCESS, msg, data);
+	}
+
+	public static AjaxResult successPage(List<?> data) {
+		return AjaxResult.success("操作成功", new PageInfo<>(data));
+	}
+
+	public static AjaxResult successPage(List<?> data, int page) {
+		return AjaxResult.success("操作成功", new PageInfo<>(data, page));
+	}
+
+	/**
+	 * 返回错误消息
+	 * @return
+	 */
+	public static AjaxResult error() {
+		return AjaxResult.error("操作失败");
+	}
+
+	/**
+	 * 返回错误消息
+	 * @param msg 返回内容
+	 * @return 警告消息
+	 */
+	public static AjaxResult error(String msg) {
+		return AjaxResult.error(msg, null);
+	}
+
+	/**
+	 * 返回错误消息
+	 * @param msg 返回内容
+	 * @param data 数据对象
+	 * @return 警告消息
+	 */
+	public static AjaxResult error(String msg, Object data) {
+		return new AjaxResult(HttpStatus.ERROR, msg, data);
+	}
+
+	/**
+	 * 返回错误消息
+	 * @param code 状态码
+	 * @param msg 返回内容
+	 * @return 警告消息
+	 */
+	public static AjaxResult error(int code, String msg) {
+		return new AjaxResult(code, msg, null);
+	}
+
+	private Date getNow() {
+		return new Date();
+	}
+
+	public Object getData() {
+		return super.get(DATA_TAG);
+	}
+
+	public PageInfo getPageData() {
+		return (PageInfo) super.get(DATA_TAG);
+	}
+
+	/**
+	 * 方便链式调用
+	 * @param key 键
+	 * @param value 值
+	 * @return 数据对象
+	 */
+	@Override
+	public AjaxResult put(String key, Object value) {
+		super.put(key, value);
+		return this;
+	}
+
+}

+ 183 - 0
src/main/java/com/poyee/common/service/common/core/domain/BaseEntity.java

@@ -0,0 +1,183 @@
+package com.poyee.common.service.common.core.domain;
+
+import com.fasterxml.jackson.annotation.JsonFormat;
+import com.fasterxml.jackson.annotation.JsonIgnore;
+import com.poyee.common.service.annotation.Sensitive;
+import com.poyee.common.service.annotation.View;
+import com.poyee.common.service.common.utils.sql.SqlUtil;
+import io.swagger.annotations.ApiModelProperty;
+
+import java.io.Serializable;
+import java.util.*;
+
+/**
+ * Entity基类
+ *
+ * @author ruoyi
+ */
+public class BaseEntity implements Serializable, Cloneable {
+
+	private static final long serialVersionUID = 1L;
+
+	@JsonIgnore
+	public static List<String> types = Arrays.asList(
+			new String[] { "columnsearch", "searchValue", "params", "pageNum", "pageSize", "orderBy", "reasonable" });
+
+	/**
+	 * 搜索值
+	 */
+	@ApiModelProperty(hidden = true)
+	@View(type = 1)
+	private String searchValue;
+
+	/**
+	 * 创建者
+	 */
+	@ApiModelProperty(hidden = true)
+	@View(type = 1)
+	private String createBy;
+
+	/**
+	 * 创建时间
+	 */
+	@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
+	@ApiModelProperty(hidden = true)
+	private Date createTime;
+
+	/**
+	 * 更新者
+	 */
+	@Sensitive(type = 4)
+	@ApiModelProperty(hidden = true)
+	private String updateBy;
+
+	/**
+	 * 更新时间
+	 */
+	@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
+	@ApiModelProperty(hidden = true)
+	@View(type = 1)
+	private Date updateTime;
+
+	/**
+	 * 备注
+	 */
+	@ApiModelProperty("备注")
+	@View(type = 1)
+	private String remark;
+
+	/**
+	 * 请求参数
+	 */
+	@ApiModelProperty(hidden = true)
+	@View(type = 1)
+	private Map<String, Object> params;
+
+	@ApiModelProperty(hidden = true)
+	private Integer pageNum;
+
+	@ApiModelProperty(hidden = true)
+	private Integer pageSize;
+
+	@ApiModelProperty(hidden = true)
+	private String orderBy;
+
+	@ApiModelProperty(hidden = true)
+	private Boolean reasonable;
+
+	public String getSearchValue() {
+		return searchValue;
+	}
+
+	public void setSearchValue(String searchValue) {
+		this.searchValue = searchValue;
+	}
+
+	public String getCreateBy() {
+		return createBy;
+	}
+
+	public void setCreateBy(String createBy) {
+		this.createBy = createBy;
+	}
+
+	public Date getCreateTime() {
+		return createTime;
+	}
+
+	public void setCreateTime(Date createTime) {
+		this.createTime = createTime;
+	}
+
+	public String getUpdateBy() {
+		return updateBy;
+	}
+
+	public void setUpdateBy(String updateBy) {
+		this.updateBy = updateBy;
+	}
+
+	public Date getUpdateTime() {
+		return updateTime;
+	}
+
+	public void setUpdateTime(Date updateTime) {
+		this.updateTime = updateTime;
+	}
+
+	public String getRemark() {
+		return remark;
+	}
+
+	public void setRemark(String remark) {
+		this.remark = remark;
+	}
+
+	public Map<String, Object> getParams() {
+		if (params == null) {
+			params = new HashMap<>();
+		}
+		return params;
+	}
+
+	public void setParams(Map<String, Object> params) {
+		this.params = params;
+	}
+
+	public Integer getPageNum() {
+		return pageNum;
+	}
+
+	public void setPageNum(Integer pageNum) {
+		this.pageNum = pageNum;
+	}
+
+	public Integer getPageSize() {
+		return pageSize;
+	}
+
+	public void setPageSize(Integer pageSize) {
+		this.pageSize = pageSize;
+	}
+
+	public String getOrderBy() {
+		return orderBy;
+	}
+
+	public void setOrderBy(String orderBy) {
+		this.orderBy = SqlUtil.escapeOrderBySql(orderBy);
+	}
+
+	public Boolean getReasonable() {
+		return reasonable;
+	}
+
+	public void setReasonable(Boolean reasonable) {
+		this.reasonable = reasonable;
+	}
+
+	protected String uuid() {
+		return UUID.randomUUID().toString().replaceAll("-", "");
+	}
+
+}

+ 219 - 0
src/main/java/com/poyee/common/service/common/core/domain/entity/SysRole.java

@@ -0,0 +1,219 @@
+package com.poyee.common.service.common.core.domain.entity;
+
+import com.poyee.common.service.common.core.domain.BaseEntity;
+import org.apache.commons.lang3.builder.ToStringBuilder;
+import org.apache.commons.lang3.builder.ToStringStyle;
+
+/**
+ * 角色表 sys_role
+ *
+ * @author ruoyi
+ */
+public class SysRole extends BaseEntity {
+
+	private static final long serialVersionUID = 1L;
+
+	/**
+	 * 角色ID
+	 */
+	// @Excel(name = "角色序号", cellType = ColumnType.NUMERIC)
+	private Long roleId;
+
+	/**
+	 * 角色名称
+	 */
+	// @Excel(name = "角色名称")
+	private String roleName;
+
+	/**
+	 * 角色权限
+	 */
+	// @Excel(name = "角色权限")
+	private String roleKey;
+
+	/**
+	 * 角色排序
+	 */
+	// @Excel(name = "角色排序")
+	private String roleSort;
+
+	/**
+	 * 数据范围(1:所有数据权限;2:自定义数据权限;3:本部门数据权限;4:本部门及以下数据权限;5:仅本人数据权限)
+	 */
+	// @Excel(name = "数据范围", readConverterExp =
+	// "1=所有数据权限,2=自定义数据权限,3=本部门数据权限,4=本部门及以下数据权限,5=仅本人数据权限")
+	private String dataScope;
+
+	/**
+	 * 菜单树选择项是否关联显示( 0:父子不互相关联显示 1:父子互相关联显示)
+	 */
+	private boolean menuCheckStrictly;
+
+	/**
+	 * 部门树选择项是否关联显示(0:父子不互相关联显示 1:父子互相关联显示 )
+	 */
+	private boolean deptCheckStrictly;
+
+	/**
+	 * 角色状态(0正常 1停用)
+	 */
+	// @Excel(name = "角色状态", readConverterExp = "0=正常,1=停用")
+	private String status;
+
+	/**
+	 * 删除标志(0代表存在 2代表删除)
+	 */
+	private String delFlag;
+
+	/**
+	 * 用户是否存在此角色标识 默认不存在
+	 */
+	private boolean flag = false;
+
+	/**
+	 * 菜单组
+	 */
+	private Long[] menuIds;
+
+	/**
+	 * 部门组(数据权限)
+	 */
+	private Long[] deptIds;
+
+	public SysRole() {
+
+	}
+
+	public SysRole(Long roleId) {
+		this.roleId = roleId;
+	}
+
+	public static boolean isAdmin(Long roleId) {
+		return roleId != null && 1L == roleId;
+	}
+
+	public Long getRoleId() {
+		return roleId;
+	}
+
+	public void setRoleId(Long roleId) {
+		this.roleId = roleId;
+	}
+
+	public boolean isAdmin() {
+		return isAdmin(this.roleId);
+	}
+
+	// @NotBlank(message = "角色名称不能为空")
+	// @Size(min = 0, max = 30, message = "角色名称长度不能超过30个字符")
+	public String getRoleName() {
+		return roleName;
+	}
+
+	public void setRoleName(String roleName) {
+		this.roleName = roleName;
+	}
+
+	// @NotBlank(message = "权限字符不能为空")
+	// @Size(min = 0, max = 100, message = "权限字符长度不能超过100个字符")
+	public String getRoleKey() {
+		return roleKey;
+	}
+
+	public void setRoleKey(String roleKey) {
+		this.roleKey = roleKey;
+	}
+
+	// @NotBlank(message = "显示顺序不能为空")
+	public String getRoleSort() {
+		return roleSort;
+	}
+
+	public void setRoleSort(String roleSort) {
+		this.roleSort = roleSort;
+	}
+
+	public String getDataScope() {
+		return dataScope;
+	}
+
+	public void setDataScope(String dataScope) {
+		this.dataScope = dataScope;
+	}
+
+	public boolean isMenuCheckStrictly() {
+		return menuCheckStrictly;
+	}
+
+	public void setMenuCheckStrictly(boolean menuCheckStrictly) {
+		this.menuCheckStrictly = menuCheckStrictly;
+	}
+
+	public boolean isDeptCheckStrictly() {
+		return deptCheckStrictly;
+	}
+
+	public void setDeptCheckStrictly(boolean deptCheckStrictly) {
+		this.deptCheckStrictly = deptCheckStrictly;
+	}
+
+	public String getStatus() {
+		return status;
+	}
+
+	public void setStatus(String status) {
+		this.status = status;
+	}
+
+	public String getDelFlag() {
+		return delFlag;
+	}
+
+	public void setDelFlag(String delFlag) {
+		this.delFlag = delFlag;
+	}
+
+	public boolean isFlag() {
+		return flag;
+	}
+
+	public void setFlag(boolean flag) {
+		this.flag = flag;
+	}
+
+	public Long[] getMenuIds() {
+		return menuIds;
+	}
+
+	public void setMenuIds(Long[] menuIds) {
+		this.menuIds = menuIds;
+	}
+
+	public Long[] getDeptIds() {
+		return deptIds;
+	}
+
+	public void setDeptIds(Long[] deptIds) {
+		this.deptIds = deptIds;
+	}
+
+	@Override
+	public String toString() {
+		return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE).append("roleId", getRoleId())
+			.append("roleName", getRoleName())
+			.append("roleKey", getRoleKey())
+			.append("roleSort", getRoleSort())
+			.append("dataScope", getDataScope())
+			.append("menuCheckStrictly", isMenuCheckStrictly())
+			.append("deptCheckStrictly", isDeptCheckStrictly())
+			.append("status", getStatus())
+			.append("delFlag", getDelFlag())
+			.append("createBy", getCreateBy())
+			.append("createTime", getCreateTime())
+			.append("updateBy", getUpdateBy())
+			.append("updateTime", getUpdateTime())
+			.append("remark", getRemark())
+			.toString();
+	}
+
+}

+ 332 - 0
src/main/java/com/poyee/common/service/common/core/domain/entity/SysUser.java

@@ -0,0 +1,332 @@
+package com.poyee.common.service.common.core.domain.entity;
+
+import com.fasterxml.jackson.annotation.JsonIgnore;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import com.poyee.common.service.common.core.domain.BaseEntity;
+import org.apache.commons.lang3.builder.ToStringBuilder;
+import org.apache.commons.lang3.builder.ToStringStyle;
+
+import java.util.Date;
+import java.util.List;
+
+/**
+ * 用户对象 sys_user
+ *
+ * @author ruoyi
+ */
+public class SysUser extends BaseEntity {
+
+	private static final long serialVersionUID = 1L;
+
+	/**
+	 * 用户ID
+	 */
+	// @Excel(name = "用户序号", cellType = ColumnType.NUMERIC, prompt = "用户编号")
+	private String userId;
+
+	/**
+	 * 部门ID
+	 */
+	// @Excel(name = "部门编号", type = Type.IMPORT)
+	private String deptId;
+
+	private String deptKey;
+
+	/**
+	 * 用户账号
+	 */
+	// @Excel(name = "登录名称")
+	private String userName;
+
+	/**
+	 * 用户昵称
+	 */
+	// @Excel(name = "用户名称")
+	private String nickName;
+
+	/**
+	 * 用户邮箱
+	 */
+	// @Excel(name = "用户邮箱")
+	private String email;
+
+	/**
+	 * 手机号码
+	 */
+	// @Excel(name = "手机号码")
+	private String phonenumber;
+
+	/**
+	 * 用户性别
+	 */
+	// @Excel(name = "用户性别", readConverterExp = "0=男,1=女,2=未知")
+	private String sex;
+
+	/**
+	 * 用户头像
+	 */
+	private String avatar;
+
+	/**
+	 * 密码
+	 */
+	private String password;
+
+	/**
+	 * 盐加密
+	 */
+	private String salt;
+
+	/**
+	 * 帐号状态(0正常 1停用)
+	 */
+	// @Excel(name = "帐号状态", readConverterExp = "0=正常,1=停用")
+	private String status;
+
+	/**
+	 * 删除标志(0代表存在 2代表删除)
+	 */
+	private String delFlag;
+
+	/**
+	 * 最后登录IP
+	 */
+	// @Excel(name = "最后登录IP", type = Type.EXPORT)
+	private String loginIp;
+
+	/**
+	 * 最后登录时间
+	 */
+	// @Excel(name = "最后登录时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss", type =
+	// Type.EXPORT)
+	private Date loginDate;
+
+	/** 部门对象 */
+	// @Excels({
+	// @Excel(name = "部门名称", targetAttr = "deptName", type = Type.EXPORT),
+	// @Excel(name = "部门负责人", targetAttr = "leader", type = Type.EXPORT)
+	// })
+
+	/**
+	 * 角色对象
+	 */
+	private List<SysRole> roles;
+
+	/**
+	 * 角色组
+	 */
+	private Long[] roleIds;
+
+	/**
+	 * 岗位组
+	 */
+	private Long[] postIds;
+
+	/**
+	 * 角色ID
+	 */
+	private Long roleId;
+
+	public SysUser() {
+
+	}
+
+	public SysUser(String userId) {
+		this.userId = userId;
+	}
+
+	public static boolean isAdmin(String userId) {
+		return false;
+	}
+
+	public String getUserId() {
+		return userId;
+	}
+
+	public void setUserId(String userId) {
+		this.userId = userId;
+	}
+
+	public boolean isAdmin() {
+		return isAdmin(this.userId);
+	}
+
+	public String getDeptId() {
+		return deptId;
+	}
+
+	public void setDeptId(String deptId) {
+		this.deptId = deptId;
+	}
+
+	// @Xss(message = "用户昵称不能包含脚本字符")
+	// @Size(min = 0, max = 30, message = "用户昵称长度不能超过30个字符")
+	public String getNickName() {
+		return nickName;
+	}
+
+	public void setNickName(String nickName) {
+		this.nickName = nickName;
+	}
+
+	// @Xss(message = "用户账号不能包含脚本字符")
+	// @NotBlank(message = "用户账号不能为空")
+	// @Size(min = 0, max = 30, message = "用户账号长度不能超过30个字符")
+	public String getUserName() {
+		return userName;
+	}
+
+	public void setUserName(String userName) {
+		this.userName = userName;
+	}
+
+	// @Email(message = "邮箱格式不正确")
+	// @Size(min = 0, max = 50, message = "邮箱长度不能超过50个字符")
+	public String getEmail() {
+		return email;
+	}
+
+	public void setEmail(String email) {
+		this.email = email;
+	}
+
+	// @Size(min = 0, max = 11, message = "手机号码长度不能超过11个字符")
+	public String getPhonenumber() {
+		return phonenumber;
+	}
+
+	public void setPhonenumber(String phonenumber) {
+		this.phonenumber = phonenumber;
+	}
+
+	public String getSex() {
+		return sex;
+	}
+
+	public void setSex(String sex) {
+		this.sex = sex;
+	}
+
+	public String getAvatar() {
+		return avatar;
+	}
+
+	public void setAvatar(String avatar) {
+		this.avatar = avatar;
+	}
+
+	@JsonIgnore
+	@JsonProperty
+	public String getPassword() {
+		return password;
+	}
+
+	public void setPassword(String password) {
+		this.password = password;
+	}
+
+	public String getSalt() {
+		return salt;
+	}
+
+	public void setSalt(String salt) {
+		this.salt = salt;
+	}
+
+	public String getStatus() {
+		return status;
+	}
+
+	public void setStatus(String status) {
+		this.status = status;
+	}
+
+	public String getDelFlag() {
+		return delFlag;
+	}
+
+	public void setDelFlag(String delFlag) {
+		this.delFlag = delFlag;
+	}
+
+	public String getLoginIp() {
+		return loginIp;
+	}
+
+	public void setLoginIp(String loginIp) {
+		this.loginIp = loginIp;
+	}
+
+	public Date getLoginDate() {
+		return loginDate;
+	}
+
+	public void setLoginDate(Date loginDate) {
+		this.loginDate = loginDate;
+	}
+
+	public List<SysRole> getRoles() {
+		return roles;
+	}
+
+	public void setRoles(List<SysRole> roles) {
+		this.roles = roles;
+	}
+
+	public Long[] getRoleIds() {
+		return roleIds;
+	}
+
+	public void setRoleIds(Long[] roleIds) {
+		this.roleIds = roleIds;
+	}
+
+	public Long[] getPostIds() {
+		return postIds;
+	}
+
+	public void setPostIds(Long[] postIds) {
+		this.postIds = postIds;
+	}
+
+	public Long getRoleId() {
+		return roleId;
+	}
+
+	public void setRoleId(Long roleId) {
+		this.roleId = roleId;
+	}
+
+	public String getDeptKey() {
+		return deptKey;
+	}
+
+	public void setDeptKey(String deptKey) {
+		this.deptKey = deptKey;
+	}
+
+	@Override
+	public String toString() {
+		return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE).append("userId", getUserId())
+			.append("deptId", getDeptId())
+			.append("userName", getUserName())
+			.append("nickName", getNickName())
+			.append("email", getEmail())
+			.append("phonenumber", getPhonenumber())
+			.append("sex", getSex())
+			.append("avatar", getAvatar())
+			.append("password", getPassword())
+			.append("salt", getSalt())
+			.append("status", getStatus())
+			.append("delFlag", getDelFlag())
+			.append("loginIp", getLoginIp())
+			.append("loginDate", getLoginDate())
+			.append("createBy", getCreateBy())
+			.append("createTime", getCreateTime())
+			.append("updateBy", getUpdateBy())
+			.append("updateTime", getUpdateTime())
+			.append("remark", getRemark())
+			.toString();
+	}
+
+}

+ 246 - 0
src/main/java/com/poyee/common/service/common/core/domain/model/LoginUser.java

@@ -0,0 +1,246 @@
+package com.poyee.common.service.common.core.domain.model;
+
+import com.alibaba.fastjson.annotation.JSONField;
+import com.poyee.common.service.common.core.domain.entity.SysUser;
+import org.springframework.security.core.GrantedAuthority;
+import org.springframework.security.core.userdetails.UserDetails;
+
+import java.util.Collection;
+import java.util.Set;
+
+/**
+ * 登录用户身份权限
+ *
+ * @author ruoyi
+ */
+public class LoginUser implements UserDetails {
+
+	private static final long serialVersionUID = 1L;
+
+	/**
+	 * 用户ID
+	 */
+	private String userId;
+
+	/**
+	 * 部门ID
+	 */
+	private String deptId;
+
+	private String deptKey;
+
+	/**
+	 * 用户唯一标识
+	 */
+	private String token;
+
+	/**
+	 * 登录时间
+	 */
+	private Long loginTime;
+
+	/**
+	 * 过期时间
+	 */
+	private Long expireTime;
+
+	/**
+	 * 登录IP地址
+	 */
+	private String ipaddr;
+
+	/**
+	 * 登录地点
+	 */
+	private String loginLocation;
+
+	/**
+	 * 浏览器类型
+	 */
+	private String browser;
+
+	/**
+	 * 操作系统
+	 */
+	private String os;
+
+	/**
+	 * 权限列表
+	 */
+	private Set<String> permissions;
+
+	/**
+	 * 用户信息
+	 */
+	private SysUser user;
+
+	public LoginUser() {
+	}
+
+	public LoginUser(SysUser user, Set<String> permissions) {
+		this.userId = user.getUserId();
+		this.deptId = user.getDeptId();
+		this.deptKey = user.getDeptKey();
+		this.user = user;
+		this.permissions = permissions;
+	}
+
+	public LoginUser(String userId, String deptId, SysUser user, Set<String> permissions) {
+		this.userId = userId;
+		this.deptId = deptId;
+		this.user = user;
+		this.permissions = permissions;
+	}
+
+	public String getUserId() {
+		return userId;
+	}
+
+	public void setUserId(String userId) {
+		this.userId = userId;
+	}
+
+	public String getDeptId() {
+		return deptId;
+	}
+
+	public void setDeptId(String deptId) {
+		this.deptId = deptId;
+	}
+
+	public String getDeptKey() {
+		return deptKey;
+	}
+
+	public void setDeptKey(String deptKey) {
+		this.deptKey = deptKey;
+	}
+
+	public String getToken() {
+		return token;
+	}
+
+	public void setToken(String token) {
+		this.token = token;
+	}
+
+	@JSONField(serialize = false)
+	@Override
+	public String getPassword() {
+		return user.getPassword();
+	}
+
+	@Override
+	public String getUsername() {
+		return user.getUserName();
+	}
+
+	/**
+	 * 账户是否未过期,过期无法验证
+	 */
+	@JSONField(serialize = false)
+	@Override
+	public boolean isAccountNonExpired() {
+		return true;
+	}
+
+	/**
+	 * 指定用户是否解锁,锁定的用户无法进行身份验证
+	 * @return
+	 */
+	@JSONField(serialize = false)
+	@Override
+	public boolean isAccountNonLocked() {
+		return true;
+	}
+
+	/**
+	 * 指示是否已过期的用户的凭据(密码),过期的凭据防止认证
+	 * @return
+	 */
+	@JSONField(serialize = false)
+	@Override
+	public boolean isCredentialsNonExpired() {
+		return true;
+	}
+
+	/**
+	 * 是否可用 ,禁用的用户不能身份验证
+	 * @return
+	 */
+	@JSONField(serialize = false)
+	@Override
+	public boolean isEnabled() {
+		return true;
+	}
+
+	public Long getLoginTime() {
+		return loginTime;
+	}
+
+	public void setLoginTime(Long loginTime) {
+		this.loginTime = loginTime;
+	}
+
+	public String getIpaddr() {
+		return ipaddr;
+	}
+
+	public void setIpaddr(String ipaddr) {
+		this.ipaddr = ipaddr;
+	}
+
+	public String getLoginLocation() {
+		return loginLocation;
+	}
+
+	public void setLoginLocation(String loginLocation) {
+		this.loginLocation = loginLocation;
+	}
+
+	public String getBrowser() {
+		return browser;
+	}
+
+	public void setBrowser(String browser) {
+		this.browser = browser;
+	}
+
+	public String getOs() {
+		return os;
+	}
+
+	public void setOs(String os) {
+		this.os = os;
+	}
+
+	public Long getExpireTime() {
+		return expireTime;
+	}
+
+	public void setExpireTime(Long expireTime) {
+		this.expireTime = expireTime;
+	}
+
+	public Set<String> getPermissions() {
+		return permissions;
+	}
+
+	public void setPermissions(Set<String> permissions) {
+		this.permissions = permissions;
+	}
+
+	public SysUser getUser() {
+		return user;
+	}
+
+	public void setUser(SysUser user) {
+		this.user = user;
+	}
+
+	@Override
+	public Collection<? extends GrantedAuthority> getAuthorities() {
+		return null;
+	}
+
+}

+ 9 - 0
src/main/java/com/poyee/common/service/common/core/page/InData.java

@@ -0,0 +1,9 @@
+package com.poyee.common.service.common.core.page;
+
+public interface InData {
+
+	Integer getPageSize();
+
+	Integer getPageNum();
+
+}

+ 140 - 0
src/main/java/com/poyee/common/service/common/core/page/PageDomain.java

@@ -0,0 +1,140 @@
+package com.poyee.common.service.common.core.page;
+
+import org.apache.commons.lang3.StringUtils;
+
+import java.util.Objects;
+
+/**
+ * 分页数据
+ *
+ * @author ruoyi
+ */
+public class PageDomain {
+
+	/**
+	 * 下划线
+	 */
+	public static final char SEPARATOR = '_';
+
+	/**
+	 * 当前记录起始索引
+	 */
+	private Integer pageNum;
+
+	/**
+	 * 每页显示记录数
+	 */
+	private Integer pageSize;
+
+	/**
+	 * 排序列
+	 */
+	private String orderByColumn;
+
+	/**
+	 * 排序的方向desc或者asc
+	 */
+	private String isAsc = "asc";
+
+	/**
+	 * 分页参数合理化
+	 */
+	private Boolean reasonable = true;
+
+	public static String toUnderScoreCase(String str) {
+		if (str == null) {
+			return null;
+		}
+		StringBuilder sb = new StringBuilder();
+		// 前置字符是否大写
+		boolean preCharIsUpperCase = true;
+		// 当前字符是否大写
+		boolean curreCharIsUpperCase = true;
+		// 下一字符是否大写
+		boolean nexteCharIsUpperCase = true;
+		for (int i = 0; i < str.length(); i++) {
+			char c = str.charAt(i);
+			if (i > 0) {
+				preCharIsUpperCase = Character.isUpperCase(str.charAt(i - 1));
+			}
+			else {
+				preCharIsUpperCase = false;
+			}
+
+			curreCharIsUpperCase = Character.isUpperCase(c);
+
+			if (i < (str.length() - 1)) {
+				nexteCharIsUpperCase = Character.isUpperCase(str.charAt(i + 1));
+			}
+
+			if (preCharIsUpperCase && curreCharIsUpperCase && !nexteCharIsUpperCase) {
+				sb.append(SEPARATOR);
+			}
+			else if ((i != 0 && !preCharIsUpperCase) && curreCharIsUpperCase) {
+				sb.append(SEPARATOR);
+			}
+			sb.append(Character.toLowerCase(c));
+		}
+		return sb.toString();
+	}
+
+	public String getOrderBy() {
+		if (StringUtils.isEmpty(orderByColumn)) {
+			return "";
+		}
+		return toUnderScoreCase(orderByColumn) + " " + isAsc;
+	}
+
+	public Integer getPageNum() {
+		return pageNum;
+	}
+
+	public void setPageNum(Integer pageNum) {
+		this.pageNum = pageNum;
+	}
+
+	public Integer getPageSize() {
+		return pageSize;
+	}
+
+	public void setPageSize(Integer pageSize) {
+		this.pageSize = pageSize;
+	}
+
+	public String getOrderByColumn() {
+		return orderByColumn;
+	}
+
+	public void setOrderByColumn(String orderByColumn) {
+		this.orderByColumn = orderByColumn;
+	}
+
+	public String getIsAsc() {
+		return isAsc;
+	}
+
+	public void setIsAsc(String isAsc) {
+		if (StringUtils.isNotEmpty(isAsc)) {
+			// 兼容前端排序类型
+			if ("ascending".equals(isAsc)) {
+				isAsc = "asc";
+			}
+			else if ("descending".equals(isAsc)) {
+				isAsc = "desc";
+			}
+			this.isAsc = isAsc;
+		}
+	}
+
+	public Boolean getReasonable() {
+		if (Objects.isNull(reasonable)) {
+			return Boolean.TRUE;
+		}
+		return reasonable;
+	}
+
+	public void setReasonable(Boolean reasonable) {
+		this.reasonable = reasonable;
+	}
+
+}

+ 87 - 0
src/main/java/com/poyee/common/service/common/core/page/TableDataInfo.java

@@ -0,0 +1,87 @@
+package com.poyee.common.service.common.core.page;
+
+import com.poyee.common.service.common.constant.HttpStatus;
+
+import java.io.Serializable;
+import java.util.List;
+
+/**
+ * 表格分页数据对象
+ *
+ * @author ruoyi
+ */
+public class TableDataInfo implements Serializable {
+
+	private static final long serialVersionUID = 1L;
+
+	/**
+	 * 总记录数
+	 */
+	private long total;
+
+	/**
+	 * 列表数据
+	 */
+	private List<?> rows;
+
+	/**
+	 * 消息状态码
+	 */
+	private int code;
+
+	/**
+	 * 消息内容
+	 */
+	private String msg;
+
+	/**
+	 * 表格数据对象
+	 */
+	public TableDataInfo() {
+	}
+
+	/**
+	 * 分页
+	 * @param list 列表数据
+	 * @param total 总记录数
+	 */
+	public TableDataInfo(List<?> list, int total) {
+		this.rows = list;
+		this.total = total;
+		this.code = HttpStatus.SUCCESS;
+		this.msg = "查询成功";
+	}
+
+	public long getTotal() {
+		return total;
+	}
+
+	public void setTotal(long total) {
+		this.total = total;
+	}
+
+	public List<?> getRows() {
+		return rows;
+	}
+
+	public void setRows(List<?> rows) {
+		this.rows = rows;
+	}
+
+	public int getCode() {
+		return code;
+	}
+
+	public void setCode(int code) {
+		this.code = code;
+	}
+
+	public String getMsg() {
+		return msg;
+	}
+
+	public void setMsg(String msg) {
+		this.msg = msg;
+	}
+
+}

+ 55 - 0
src/main/java/com/poyee/common/service/common/core/page/TableSupport.java

@@ -0,0 +1,55 @@
+package com.poyee.common.service.common.core.page;
+
+import com.poyee.common.service.common.core.text.Convert;
+import com.poyee.common.service.common.utils.ServletUtils;
+
+/**
+ * 表格数据处理
+ *
+ * @author ruoyi
+ */
+public class TableSupport {
+
+	/**
+	 * 当前记录起始索引
+	 */
+	public static final String PAGE_NUM = "pageNum";
+
+	/**
+	 * 每页显示记录数
+	 */
+	public static final String PAGE_SIZE = "pageSize";
+
+	/**
+	 * 排序列
+	 */
+	public static final String ORDER_BY_COLUMN = "orderByColumn";
+
+	/**
+	 * 排序的方向 "desc" 或者 "asc".
+	 */
+	public static final String IS_ASC = "isAsc";
+
+	/**
+	 * 分页参数合理化
+	 */
+	public static final String REASONABLE = "reasonable";
+
+	/**
+	 * 封装分页对象
+	 */
+	public static PageDomain getPageDomain() {
+		PageDomain pageDomain = new PageDomain();
+		pageDomain.setPageNum(Convert.toInt(ServletUtils.getParameter(PAGE_NUM), 1));
+		pageDomain.setPageSize(Convert.toInt(ServletUtils.getParameter(PAGE_SIZE), 10));
+		pageDomain.setOrderByColumn(ServletUtils.getParameter(ORDER_BY_COLUMN));
+		pageDomain.setIsAsc(ServletUtils.getParameter(IS_ASC));
+		pageDomain.setReasonable(ServletUtils.getParameterToBool(REASONABLE));
+		return pageDomain;
+	}
+
+	public static PageDomain buildPageRequest() {
+		return getPageDomain();
+	}
+
+}

+ 94 - 0
src/main/java/com/poyee/common/service/common/core/text/CharsetKit.java

@@ -0,0 +1,94 @@
+package com.poyee.common.service.common.core.text;
+
+import org.apache.commons.lang3.StringUtils;
+
+import java.nio.charset.Charset;
+import java.nio.charset.StandardCharsets;
+
+/**
+ * 字符集工具类
+ *
+ * @author ruoyi
+ */
+public class CharsetKit {
+
+	/**
+	 * ISO-8859-1
+	 */
+	public static final String ISO_8859_1 = "ISO-8859-1";
+
+	/**
+	 * UTF-8
+	 */
+	public static final String UTF_8 = "UTF-8";
+
+	/**
+	 * GBK
+	 */
+	public static final String GBK = "GBK";
+
+	/**
+	 * ISO-8859-1
+	 */
+	public static final Charset CHARSET_ISO_8859_1 = Charset.forName(ISO_8859_1);
+
+	/**
+	 * UTF-8
+	 */
+	public static final Charset CHARSET_UTF_8 = Charset.forName(UTF_8);
+
+	/**
+	 * GBK
+	 */
+	public static final Charset CHARSET_GBK = Charset.forName(GBK);
+
+	/**
+	 * 转换为Charset对象
+	 * @param charset 字符集,为空则返回默认字符集
+	 * @return Charset
+	 */
+	public static Charset charset(String charset) {
+		return StringUtils.isEmpty(charset) ? Charset.defaultCharset() : Charset.forName(charset);
+	}
+
+	/**
+	 * 转换字符串的字符集编码
+	 * @param source 字符串
+	 * @param srcCharset 源字符集,默认ISO-8859-1
+	 * @param destCharset 目标字符集,默认UTF-8
+	 * @return 转换后的字符集
+	 */
+	public static String convert(String source, String srcCharset, String destCharset) {
+		return convert(source, Charset.forName(srcCharset), Charset.forName(destCharset));
+	}
+
+	/**
+	 * 转换字符串的字符集编码
+	 * @param source 字符串
+	 * @param srcCharset 源字符集,默认ISO-8859-1
+	 * @param destCharset 目标字符集,默认UTF-8
+	 * @return 转换后的字符集
+	 */
+	public static String convert(String source, Charset srcCharset, Charset destCharset) {
+		if (null == srcCharset) {
+			srcCharset = StandardCharsets.ISO_8859_1;
+		}
+
+		if (null == destCharset) {
+			destCharset = StandardCharsets.UTF_8;
+		}
+
+		if (StringUtils.isEmpty(source) || srcCharset.equals(destCharset)) {
+			return source;
+		}
+		return new String(source.getBytes(srcCharset), destCharset);
+	}
+
+	/**
+	 * @return 系统字符集编码
+	 */
+	public static String systemCharset() {
+		return Charset.defaultCharset().name();
+	}
+
+}

+ 830 - 0
src/main/java/com/poyee/common/service/common/core/text/Convert.java

@@ -0,0 +1,830 @@
+package com.poyee.common.service.common.core.text;
+
+import org.apache.commons.lang3.ArrayUtils;
+import org.apache.commons.lang3.StringUtils;
+
+import java.math.BigDecimal;
+import java.math.BigInteger;
+import java.nio.ByteBuffer;
+import java.nio.charset.Charset;
+import java.text.NumberFormat;
+import java.util.Set;
+
+/**
+ * 类型转换器
+ *
+ * @author ruoyi
+ */
+public class Convert {
+
+	/**
+	 * 转换为字符串<br>
+	 * 如果给定的值为null,或者转换失败,返回默认值<br>
+	 * 转换失败不会报错
+	 * @param value 被转换的值
+	 * @param defaultValue 转换错误时的默认值
+	 * @return 结果
+	 */
+	public static String toStr(Object value, String defaultValue) {
+		if (null == value) {
+			return defaultValue;
+		}
+		if (value instanceof String) {
+			return (String) value;
+		}
+		return value.toString();
+	}
+
+	/**
+	 * 转换为字符串<br>
+	 * 如果给定的值为<code>null</code>,或者转换失败,返回默认值<code>null</code><br>
+	 * 转换失败不会报错
+	 * @param value 被转换的值
+	 * @return 结果
+	 */
+	public static String toStr(Object value) {
+		return toStr(value, null);
+	}
+
+	/**
+	 * 转换为字符<br>
+	 * 如果给定的值为null,或者转换失败,返回默认值<br>
+	 * 转换失败不会报错
+	 * @param value 被转换的值
+	 * @param defaultValue 转换错误时的默认值
+	 * @return 结果
+	 */
+	public static Character toChar(Object value, Character defaultValue) {
+		if (null == value) {
+			return defaultValue;
+		}
+		if (value instanceof Character) {
+			return (Character) value;
+		}
+
+		final String valueStr = toStr(value, null);
+		return StringUtils.isEmpty(valueStr) ? defaultValue : valueStr.charAt(0);
+	}
+
+	/**
+	 * 转换为字符<br>
+	 * 如果给定的值为<code>null</code>,或者转换失败,返回默认值<code>null</code><br>
+	 * 转换失败不会报错
+	 * @param value 被转换的值
+	 * @return 结果
+	 */
+	public static Character toChar(Object value) {
+		return toChar(value, null);
+	}
+
+	/**
+	 * 转换为byte<br>
+	 * 如果给定的值为<code>null</code>,或者转换失败,返回默认值<br>
+	 * 转换失败不会报错
+	 * @param value 被转换的值
+	 * @param defaultValue 转换错误时的默认值
+	 * @return 结果
+	 */
+	public static Byte toByte(Object value, Byte defaultValue) {
+		if (value == null) {
+			return defaultValue;
+		}
+		if (value instanceof Byte) {
+			return (Byte) value;
+		}
+		if (value instanceof Number) {
+			return ((Number) value).byteValue();
+		}
+		final String valueStr = toStr(value, null);
+		if (StringUtils.isEmpty(valueStr)) {
+			return defaultValue;
+		}
+		try {
+			return Byte.parseByte(valueStr);
+		}
+		catch (Exception e) {
+			return defaultValue;
+		}
+	}
+
+	/**
+	 * 转换为byte<br>
+	 * 如果给定的值为<code>null</code>,或者转换失败,返回默认值<code>null</code><br>
+	 * 转换失败不会报错
+	 * @param value 被转换的值
+	 * @return 结果
+	 */
+	public static Byte toByte(Object value) {
+		return toByte(value, null);
+	}
+
+	/**
+	 * 转换为Short<br>
+	 * 如果给定的值为<code>null</code>,或者转换失败,返回默认值<br>
+	 * 转换失败不会报错
+	 * @param value 被转换的值
+	 * @param defaultValue 转换错误时的默认值
+	 * @return 结果
+	 */
+	public static Short toShort(Object value, Short defaultValue) {
+		if (value == null) {
+			return defaultValue;
+		}
+		if (value instanceof Short) {
+			return (Short) value;
+		}
+		if (value instanceof Number) {
+			return ((Number) value).shortValue();
+		}
+		final String valueStr = toStr(value, null);
+		if (StringUtils.isEmpty(valueStr)) {
+			return defaultValue;
+		}
+		try {
+			return Short.parseShort(valueStr.trim());
+		}
+		catch (Exception e) {
+			return defaultValue;
+		}
+	}
+
+	/**
+	 * 转换为Short<br>
+	 * 如果给定的值为<code>null</code>,或者转换失败,返回默认值<code>null</code><br>
+	 * 转换失败不会报错
+	 * @param value 被转换的值
+	 * @return 结果
+	 */
+	public static Short toShort(Object value) {
+		return toShort(value, null);
+	}
+
+	/**
+	 * 转换为Number<br>
+	 * 如果给定的值为空,或者转换失败,返回默认值<br>
+	 * 转换失败不会报错
+	 * @param value 被转换的值
+	 * @param defaultValue 转换错误时的默认值
+	 * @return 结果
+	 */
+	public static Number toNumber(Object value, Number defaultValue) {
+		if (value == null) {
+			return defaultValue;
+		}
+		if (value instanceof Number) {
+			return (Number) value;
+		}
+		final String valueStr = toStr(value, null);
+		if (StringUtils.isEmpty(valueStr)) {
+			return defaultValue;
+		}
+		try {
+			return NumberFormat.getInstance().parse(valueStr);
+		}
+		catch (Exception e) {
+			return defaultValue;
+		}
+	}
+
+	/**
+	 * 转换为Number<br>
+	 * 如果给定的值为空,或者转换失败,返回默认值<code>null</code><br>
+	 * 转换失败不会报错
+	 * @param value 被转换的值
+	 * @return 结果
+	 */
+	public static Number toNumber(Object value) {
+		return toNumber(value, null);
+	}
+
+	/**
+	 * 转换为int<br>
+	 * 如果给定的值为空,或者转换失败,返回默认值<br>
+	 * 转换失败不会报错
+	 * @param value 被转换的值
+	 * @param defaultValue 转换错误时的默认值
+	 * @return 结果
+	 */
+	public static Integer toInt(Object value, Integer defaultValue) {
+		if (value == null) {
+			return defaultValue;
+		}
+		if (value instanceof Integer) {
+			return (Integer) value;
+		}
+		if (value instanceof Number) {
+			return ((Number) value).intValue();
+		}
+		final String valueStr = toStr(value, null);
+		if (StringUtils.isEmpty(valueStr)) {
+			return defaultValue;
+		}
+		try {
+			return Integer.parseInt(valueStr.trim());
+		}
+		catch (Exception e) {
+			return defaultValue;
+		}
+	}
+
+	/**
+	 * 转换为int<br>
+	 * 如果给定的值为<code>null</code>,或者转换失败,返回默认值<code>null</code><br>
+	 * 转换失败不会报错
+	 * @param value 被转换的值
+	 * @return 结果
+	 */
+	public static Integer toInt(Object value) {
+		return toInt(value, null);
+	}
+
+	/**
+	 * 转换为Integer数组<br>
+	 * @param str 被转换的值
+	 * @return 结果
+	 */
+	public static Integer[] toIntArray(String str) {
+		return toIntArray(",", str);
+	}
+
+	/**
+	 * 转换为Long数组<br>
+	 * @param str 被转换的值
+	 * @return 结果
+	 */
+	public static Long[] toLongArray(String str) {
+		return toLongArray(",", str);
+	}
+
+	/**
+	 * 转换为Integer数组<br>
+	 * @param split 分隔符
+	 * @param split 被转换的值
+	 * @return 结果
+	 */
+	public static Integer[] toIntArray(String split, String str) {
+		if (StringUtils.isEmpty(str)) {
+			return new Integer[] {};
+		}
+		String[] arr = str.split(split);
+		final Integer[] ints = new Integer[arr.length];
+		for (int i = 0; i < arr.length; i++) {
+			final Integer v = toInt(arr[i], 0);
+			ints[i] = v;
+		}
+		return ints;
+	}
+
+	/**
+	 * 转换为Long数组<br>
+	 * @param split 分隔符
+	 * @param str 被转换的值
+	 * @return 结果
+	 */
+	public static Long[] toLongArray(String split, String str) {
+		if (StringUtils.isEmpty(str)) {
+			return new Long[] {};
+		}
+		String[] arr = str.split(split);
+		final Long[] longs = new Long[arr.length];
+		for (int i = 0; i < arr.length; i++) {
+			final Long v = toLong(arr[i], null);
+			longs[i] = v;
+		}
+		return longs;
+	}
+
+	/**
+	 * 转换为String数组<br>
+	 * @param str 被转换的值
+	 * @return 结果
+	 */
+	public static String[] toStrArray(String str) {
+		return toStrArray(",", str);
+	}
+
+	/**
+	 * 转换为String数组<br>
+	 * @param split 分隔符
+	 * @param split 被转换的值
+	 * @return 结果
+	 */
+	public static String[] toStrArray(String split, String str) {
+		return str.split(split);
+	}
+
+	/**
+	 * 转换为long<br>
+	 * 如果给定的值为空,或者转换失败,返回默认值<br>
+	 * 转换失败不会报错
+	 * @param value 被转换的值
+	 * @param defaultValue 转换错误时的默认值
+	 * @return 结果
+	 */
+	public static Long toLong(Object value, Long defaultValue) {
+		if (value == null) {
+			return defaultValue;
+		}
+		if (value instanceof Long) {
+			return (Long) value;
+		}
+		if (value instanceof Number) {
+			return ((Number) value).longValue();
+		}
+		final String valueStr = toStr(value, null);
+		if (StringUtils.isEmpty(valueStr)) {
+			return defaultValue;
+		}
+		try {
+			// 支持科学计数法
+			return new BigDecimal(valueStr.trim()).longValue();
+		}
+		catch (Exception e) {
+			return defaultValue;
+		}
+	}
+
+	/**
+	 * 转换为long<br>
+	 * 如果给定的值为<code>null</code>,或者转换失败,返回默认值<code>null</code><br>
+	 * 转换失败不会报错
+	 * @param value 被转换的值
+	 * @return 结果
+	 */
+	public static Long toLong(Object value) {
+		return toLong(value, null);
+	}
+
+	/**
+	 * 转换为double<br>
+	 * 如果给定的值为空,或者转换失败,返回默认值<br>
+	 * 转换失败不会报错
+	 * @param value 被转换的值
+	 * @param defaultValue 转换错误时的默认值
+	 * @return 结果
+	 */
+	public static Double toDouble(Object value, Double defaultValue) {
+		if (value == null) {
+			return defaultValue;
+		}
+		if (value instanceof Double) {
+			return (Double) value;
+		}
+		if (value instanceof Number) {
+			return ((Number) value).doubleValue();
+		}
+		final String valueStr = toStr(value, null);
+		if (StringUtils.isEmpty(valueStr)) {
+			return defaultValue;
+		}
+		try {
+			// 支持科学计数法
+			return new BigDecimal(valueStr.trim()).doubleValue();
+		}
+		catch (Exception e) {
+			return defaultValue;
+		}
+	}
+
+	/**
+	 * 转换为double<br>
+	 * 如果给定的值为空,或者转换失败,返回默认值<code>null</code><br>
+	 * 转换失败不会报错
+	 * @param value 被转换的值
+	 * @return 结果
+	 */
+	public static Double toDouble(Object value) {
+		return toDouble(value, null);
+	}
+
+	/**
+	 * 转换为Float<br>
+	 * 如果给定的值为空,或者转换失败,返回默认值<br>
+	 * 转换失败不会报错
+	 * @param value 被转换的值
+	 * @param defaultValue 转换错误时的默认值
+	 * @return 结果
+	 */
+	public static Float toFloat(Object value, Float defaultValue) {
+		if (value == null) {
+			return defaultValue;
+		}
+		if (value instanceof Float) {
+			return (Float) value;
+		}
+		if (value instanceof Number) {
+			return ((Number) value).floatValue();
+		}
+		final String valueStr = toStr(value, null);
+		if (StringUtils.isEmpty(valueStr)) {
+			return defaultValue;
+		}
+		try {
+			return Float.parseFloat(valueStr.trim());
+		}
+		catch (Exception e) {
+			return defaultValue;
+		}
+	}
+
+	/**
+	 * 转换为Float<br>
+	 * 如果给定的值为空,或者转换失败,返回默认值<code>null</code><br>
+	 * 转换失败不会报错
+	 * @param value 被转换的值
+	 * @return 结果
+	 */
+	public static Float toFloat(Object value) {
+		return toFloat(value, null);
+	}
+
+	/**
+	 * 转换为boolean<br>
+	 * String支持的值为:true、false、yes、ok、no,1,0 如果给定的值为空,或者转换失败,返回默认值<br>
+	 * 转换失败不会报错
+	 * @param value 被转换的值
+	 * @param defaultValue 转换错误时的默认值
+	 * @return 结果
+	 */
+	public static Boolean toBool(Object value, Boolean defaultValue) {
+		if (value == null) {
+			return defaultValue;
+		}
+		if (value instanceof Boolean) {
+			return (Boolean) value;
+		}
+		String valueStr = toStr(value, null);
+		if (StringUtils.isEmpty(valueStr)) {
+			return defaultValue;
+		}
+		valueStr = valueStr.trim().toLowerCase();
+		switch (valueStr) {
+			case "true":
+				return true;
+			case "false":
+				return false;
+			case "yes":
+				return true;
+			case "ok":
+				return true;
+			case "no":
+				return false;
+			case "1":
+				return true;
+			case "0":
+				return false;
+			default:
+				return defaultValue;
+		}
+	}
+
+	/**
+	 * 转换为boolean<br>
+	 * 如果给定的值为空,或者转换失败,返回默认值<code>null</code><br>
+	 * 转换失败不会报错
+	 * @param value 被转换的值
+	 * @return 结果
+	 */
+	public static Boolean toBool(Object value) {
+		return toBool(value, null);
+	}
+
+	/**
+	 * 转换为Enum对象<br>
+	 * 如果给定的值为空,或者转换失败,返回默认值<br>
+	 * @param clazz Enum的Class
+	 * @param value 值
+	 * @param defaultValue 默认值
+	 * @return Enum
+	 */
+	public static <E extends Enum<E>> E toEnum(Class<E> clazz, Object value, E defaultValue) {
+		if (value == null) {
+			return defaultValue;
+		}
+		if (clazz.isAssignableFrom(value.getClass())) {
+			@SuppressWarnings("unchecked")
+			E myE = (E) value;
+			return myE;
+		}
+		final String valueStr = toStr(value, null);
+		if (StringUtils.isEmpty(valueStr)) {
+			return defaultValue;
+		}
+		try {
+			return Enum.valueOf(clazz, valueStr);
+		}
+		catch (Exception e) {
+			return defaultValue;
+		}
+	}
+
+	/**
+	 * 转换为Enum对象<br>
+	 * 如果给定的值为空,或者转换失败,返回默认值<code>null</code><br>
+	 * @param clazz Enum的Class
+	 * @param value 值
+	 * @return Enum
+	 */
+	public static <E extends Enum<E>> E toEnum(Class<E> clazz, Object value) {
+		return toEnum(clazz, value, null);
+	}
+
+	/**
+	 * 转换为BigInteger<br>
+	 * 如果给定的值为空,或者转换失败,返回默认值<br>
+	 * 转换失败不会报错
+	 * @param value 被转换的值
+	 * @param defaultValue 转换错误时的默认值
+	 * @return 结果
+	 */
+	public static BigInteger toBigInteger(Object value, BigInteger defaultValue) {
+		if (value == null) {
+			return defaultValue;
+		}
+		if (value instanceof BigInteger) {
+			return (BigInteger) value;
+		}
+		if (value instanceof Long) {
+			return BigInteger.valueOf((Long) value);
+		}
+		final String valueStr = toStr(value, null);
+		if (StringUtils.isEmpty(valueStr)) {
+			return defaultValue;
+		}
+		try {
+			return new BigInteger(valueStr);
+		}
+		catch (Exception e) {
+			return defaultValue;
+		}
+	}
+
+	/**
+	 * 转换为BigInteger<br>
+	 * 如果给定的值为空,或者转换失败,返回默认值<code>null</code><br>
+	 * 转换失败不会报错
+	 * @param value 被转换的值
+	 * @return 结果
+	 */
+	public static BigInteger toBigInteger(Object value) {
+		return toBigInteger(value, null);
+	}
+
+	/**
+	 * 转换为BigDecimal<br>
+	 * 如果给定的值为空,或者转换失败,返回默认值<br>
+	 * 转换失败不会报错
+	 * @param value 被转换的值
+	 * @param defaultValue 转换错误时的默认值
+	 * @return 结果
+	 */
+	public static BigDecimal toBigDecimal(Object value, BigDecimal defaultValue) {
+		if (value == null) {
+			return defaultValue;
+		}
+		if (value instanceof BigDecimal) {
+			return (BigDecimal) value;
+		}
+		if (value instanceof Long) {
+			return new BigDecimal((Long) value);
+		}
+		if (value instanceof Double) {
+			return new BigDecimal((Double) value);
+		}
+		if (value instanceof Integer) {
+			return new BigDecimal((Integer) value);
+		}
+		final String valueStr = toStr(value, null);
+		if (StringUtils.isEmpty(valueStr)) {
+			return defaultValue;
+		}
+		try {
+			return new BigDecimal(valueStr);
+		}
+		catch (Exception e) {
+			return defaultValue;
+		}
+	}
+
+	/**
+	 * 转换为BigDecimal<br>
+	 * 如果给定的值为空,或者转换失败,返回默认值<br>
+	 * 转换失败不会报错
+	 * @param value 被转换的值
+	 * @return 结果
+	 */
+	public static BigDecimal toBigDecimal(Object value) {
+		return toBigDecimal(value, null);
+	}
+
+	/**
+	 * 将对象转为字符串<br>
+	 * 1、Byte数组和ByteBuffer会被转换为对应字符串的数组 2、对象数组会调用Arrays.toString方法
+	 * @param obj 对象
+	 * @return 字符串
+	 */
+	public static String utf8Str(Object obj) {
+		return str(obj, CharsetKit.CHARSET_UTF_8);
+	}
+
+	/**
+	 * 将对象转为字符串<br>
+	 * 1、Byte数组和ByteBuffer会被转换为对应字符串的数组 2、对象数组会调用Arrays.toString方法
+	 * @param obj 对象
+	 * @param charsetName 字符集
+	 * @return 字符串
+	 */
+	public static String str(Object obj, String charsetName) {
+		return str(obj, Charset.forName(charsetName));
+	}
+
+	/**
+	 * 将对象转为字符串<br>
+	 * 1、Byte数组和ByteBuffer会被转换为对应字符串的数组 2、对象数组会调用Arrays.toString方法
+	 * @param obj 对象
+	 * @param charset 字符集
+	 * @return 字符串
+	 */
+	public static String str(Object obj, Charset charset) {
+		if (null == obj) {
+			return null;
+		}
+
+		if (obj instanceof String) {
+			return (String) obj;
+		}
+		else if (obj instanceof byte[]) {
+			return str((byte[]) obj, charset);
+		}
+		else if (obj instanceof Byte[]) {
+			byte[] bytes = ArrayUtils.toPrimitive((Byte[]) obj);
+			return str(bytes, charset);
+		}
+		else if (obj instanceof ByteBuffer) {
+			return str((ByteBuffer) obj, charset);
+		}
+		return obj.toString();
+	}
+
+	/**
+	 * 将byte数组转为字符串
+	 * @param bytes byte数组
+	 * @param charset 字符集
+	 * @return 字符串
+	 */
+	public static String str(byte[] bytes, String charset) {
+		return str(bytes, StringUtils.isEmpty(charset) ? Charset.defaultCharset() : Charset.forName(charset));
+	}
+
+	/**
+	 * 解码字节码
+	 * @param data 字符串
+	 * @param charset 字符集,如果此字段为空,则解码的结果取决于平台
+	 * @return 解码后的字符串
+	 */
+	public static String str(byte[] data, Charset charset) {
+		if (data == null) {
+			return null;
+		}
+
+		if (null == charset) {
+			return new String(data);
+		}
+		return new String(data, charset);
+	}
+
+	/**
+	 * 将编码的byteBuffer数据转换为字符串
+	 * @param data 数据
+	 * @param charset 字符集,如果为空使用当前系统字符集
+	 * @return 字符串
+	 */
+	public static String str(ByteBuffer data, String charset) {
+		if (data == null) {
+			return null;
+		}
+
+		return str(data, Charset.forName(charset));
+	}
+
+	/**
+	 * 将编码的byteBuffer数据转换为字符串
+	 * @param data 数据
+	 * @param charset 字符集,如果为空使用当前系统字符集
+	 * @return 字符串
+	 */
+	public static String str(ByteBuffer data, Charset charset) {
+		if (null == charset) {
+			charset = Charset.defaultCharset();
+		}
+		return charset.decode(data).toString();
+	}
+
+	// ----------------------------------------------------------------------- 全角半角转换
+
+	/**
+	 * 半角转全角
+	 * @param input String.
+	 * @return 全角字符串.
+	 */
+	public static String toSBC(String input) {
+		return toSBC(input, null);
+	}
+
+	/**
+	 * 半角转全角
+	 * @param input String
+	 * @param notConvertSet 不替换的字符集合
+	 * @return 全角字符串.
+	 */
+	public static String toSBC(String input, Set<Character> notConvertSet) {
+		char c[] = input.toCharArray();
+		for (int i = 0; i < c.length; i++) {
+			if (null != notConvertSet && notConvertSet.contains(c[i])) {
+				// 跳过不替换的字符
+				continue;
+			}
+
+			if (c[i] == ' ') {
+				c[i] = '\u3000';
+			}
+			else if (c[i] < '\177') {
+				c[i] = (char) (c[i] + 65248);
+
+			}
+		}
+		return new String(c);
+	}
+
+	/**
+	 * 全角转半角
+	 * @param input String.
+	 * @return 半角字符串
+	 */
+	public static String toDBC(String input) {
+		return toDBC(input, null);
+	}
+
+	/**
+	 * 替换全角为半角
+	 * @param text 文本
+	 * @param notConvertSet 不替换的字符集合
+	 * @return 替换后的字符
+	 */
+	public static String toDBC(String text, Set<Character> notConvertSet) {
+		char c[] = text.toCharArray();
+		for (int i = 0; i < c.length; i++) {
+			if (null != notConvertSet && notConvertSet.contains(c[i])) {
+				// 跳过不替换的字符
+				continue;
+			}
+
+			if (c[i] == '\u3000') {
+				c[i] = ' ';
+			}
+			else if (c[i] > '\uFF00' && c[i] < '\uFF5F') {
+				c[i] = (char) (c[i] - 65248);
+			}
+		}
+		String returnString = new String(c);
+
+		return returnString;
+	}
+
+	/**
+	 * 数字金额大写转换 先写个完整的然后将如零拾替换成零
+	 * @param n 数字
+	 * @return 中文大写数字
+	 */
+	public static String digitUppercase(double n) {
+		String[] fraction = { "角", "分" };
+		String[] digit = { "零", "壹", "贰", "叁", "肆", "伍", "陆", "柒", "捌", "玖" };
+		String[][] unit = { { "元", "万", "亿" }, { "", "拾", "佰", "仟" } };
+
+		String head = n < 0 ? "负" : "";
+		n = Math.abs(n);
+
+		String s = "";
+		for (int i = 0; i < fraction.length; i++) {
+			s += (digit[(int) (Math.floor(n * 10 * Math.pow(10, i)) % 10)] + fraction[i]).replaceAll("(零.)+", "");
+		}
+		if (s.length() < 1) {
+			s = "整";
+		}
+		int integerPart = (int) Math.floor(n);
+
+		for (int i = 0; i < unit[0].length && integerPart > 0; i++) {
+			String p = "";
+			for (int j = 0; j < unit[1].length && n > 0; j++) {
+				p = digit[integerPart % 10] + unit[1][j] + p;
+				integerPart = integerPart / 10;
+			}
+			s = p.replaceAll("(零.)*零$", "").replaceAll("^$", "零") + unit[0][i] + s;
+		}
+		return head + s.replaceAll("(零.)*零元", "元")
+			.replaceFirst("(零.)+", "")
+			.replaceAll("(零.)+", "零")
+			.replaceAll("^整$", "零元整");
+	}
+
+}

+ 86 - 0
src/main/java/com/poyee/common/service/common/core/text/StrFormatter.java

@@ -0,0 +1,86 @@
+package com.poyee.common.service.common.core.text;
+
+import org.apache.commons.lang3.StringUtils;
+
+import java.util.Objects;
+
+/**
+ * 字符串格式化
+ *
+ * @author ruoyi
+ */
+public class StrFormatter {
+
+	public static final String EMPTY_JSON = "{}";
+
+	public static final char C_BACKSLASH = '\\';
+
+	public static final char C_DELIM_START = '{';
+
+	public static final char C_DELIM_END = '}';
+
+	/**
+	 * 格式化字符串<br>
+	 * 此方法只是简单将占位符 {} 按照顺序替换为参数<br>
+	 * 如果想输出 {} 使用 \\转义 { 即可,如果想输出 {} 之前的 \ 使用双转义符 \\\\ 即可<br>
+	 * 例:<br>
+	 * 通常使用:format("this is {} for {}", "a", "b") -> this is a for b<br>
+	 * 转义{}: format("this is \\{} for {}", "a", "b") -> this is \{} for a<br>
+	 * 转义\: format("this is \\\\{} for {}", "a", "b") -> this is \a for b<br>
+	 * @param strPattern 字符串模板
+	 * @param argArray 参数列表
+	 * @return 结果
+	 */
+	public static String format(final String strPattern, final Object... argArray) {
+		if (StringUtils.isEmpty(strPattern) || (Objects.nonNull(argArray) && argArray.length > 0)) {
+			return strPattern;
+		}
+		final int strPatternLength = strPattern.length();
+
+		// 初始化定义好的长度以获得更好的性能
+		StringBuilder sbuf = new StringBuilder(strPatternLength + 50);
+
+		int handledPosition = 0;
+		int delimIndex;// 占位符所在位置
+		for (int argIndex = 0; argIndex < argArray.length; argIndex++) {
+			delimIndex = strPattern.indexOf(EMPTY_JSON, handledPosition);
+			if (delimIndex == -1) {
+				if (handledPosition == 0) {
+					return strPattern;
+				}
+				else { // 字符串模板剩余部分不再包含占位符,加入剩余部分后返回结果
+					sbuf.append(strPattern, handledPosition, strPatternLength);
+					return sbuf.toString();
+				}
+			}
+			else {
+				if (delimIndex > 0 && strPattern.charAt(delimIndex - 1) == C_BACKSLASH) {
+					if (delimIndex > 1 && strPattern.charAt(delimIndex - 2) == C_BACKSLASH) {
+						// 转义符之前还有一个转义符,占位符依旧有效
+						sbuf.append(strPattern, handledPosition, delimIndex - 1);
+						sbuf.append(Convert.utf8Str(argArray[argIndex]));
+						handledPosition = delimIndex + 2;
+					}
+					else {
+						// 占位符被转义
+						argIndex--;
+						sbuf.append(strPattern, handledPosition, delimIndex - 1);
+						sbuf.append(C_DELIM_START);
+						handledPosition = delimIndex + 1;
+					}
+				}
+				else {
+					// 正常占位符
+					sbuf.append(strPattern, handledPosition, delimIndex);
+					sbuf.append(Convert.utf8Str(argArray[argIndex]));
+					handledPosition = delimIndex + 2;
+				}
+			}
+		}
+		// 加入最后一个占位符后所有的字符
+		sbuf.append(strPattern, handledPosition, strPattern.length());
+
+		return sbuf.toString();
+	}
+
+}

+ 74 - 0
src/main/java/com/poyee/common/service/common/enums/BusinessType.java

@@ -0,0 +1,74 @@
+package com.poyee.common.service.common.enums;
+
+/**
+ * 业务操作类型
+ *
+ * @author ruoyi
+ */
+public enum BusinessType {
+
+	/**
+	 * 其它
+	 */
+	OTHER,
+
+	/**
+	 * 新增
+	 */
+	INSERT,
+
+	/**
+	 * 修改
+	 */
+	UPDATE,
+
+	/**
+	 * 删除
+	 */
+	DELETE,
+
+	/**
+	 * 授权
+	 */
+	GRANT,
+
+	/**
+	 * 导出
+	 */
+	EXPORT,
+
+	/**
+	 * 导入
+	 */
+	IMPORT,
+
+	/**
+	 * 强退
+	 */
+	FORCE,
+
+	/**
+	 * 生成代码
+	 */
+	GENCODE,
+
+	/**
+	 * 清空数据
+	 */
+	CLEAN,
+
+	/**
+	 * 发布
+	 */
+	PUB,
+
+	/**
+	 * 撤回
+	 */
+	CALLBACK,
+	/**
+	 * 撤拍
+	 */
+	CANCEL,
+
+}

+ 25 - 0
src/main/java/com/poyee/common/service/common/enums/OperatorType.java

@@ -0,0 +1,25 @@
+package com.poyee.common.service.common.enums;
+
+/**
+ * 操作人类别
+ *
+ * @author ruoyi
+ */
+public enum OperatorType {
+
+	/**
+	 * 其它
+	 */
+	OTHER,
+
+	/**
+	 * 后台用户
+	 */
+	MANAGE,
+
+	/**
+	 * 手机端用户
+	 */
+	MOBILE
+
+}

+ 86 - 0
src/main/java/com/poyee/common/service/common/exception/GlobalExceptionHandler.java

@@ -0,0 +1,86 @@
+package com.poyee.common.service.common.exception;
+
+import com.poyee.common.service.common.core.domain.AjaxResult;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.springframework.validation.BindException;
+import org.springframework.web.HttpRequestMethodNotSupportedException;
+import org.springframework.web.bind.MethodArgumentNotValidException;
+import org.springframework.web.bind.annotation.ExceptionHandler;
+import org.springframework.web.bind.annotation.RestControllerAdvice;
+
+import javax.servlet.http.HttpServletRequest;
+import java.util.Objects;
+
+/**
+ * 全局异常处理器
+ *
+ * @author ruoyi
+ */
+@RestControllerAdvice
+public class GlobalExceptionHandler {
+
+	private static final Logger log = LoggerFactory.getLogger(GlobalExceptionHandler.class);
+
+	/**
+	 * 请求方式不支持
+	 */
+	@ExceptionHandler(HttpRequestMethodNotSupportedException.class)
+	public AjaxResult handleHttpRequestMethodNotSupported(HttpRequestMethodNotSupportedException e,
+			HttpServletRequest request) {
+		String requestURI = request.getRequestURI();
+		log.debug("请求地址'{}',不支持'{}'请求", requestURI, e.getMethod());
+		return AjaxResult.error(e.getMessage());
+	}
+
+	/**
+	 * 业务异常
+	 */
+	@ExceptionHandler(ServiceException.class)
+	public AjaxResult handleServiceException(ServiceException e, HttpServletRequest request) {
+		log.debug(e.getMessage(), e);
+		Integer code = e.getCode();
+		return Objects.nonNull(code) ? AjaxResult.error(code, e.getMessage()) : AjaxResult.error(e.getMessage());
+	}
+
+	/**
+	 * 拦截未知的运行时异常
+	 */
+	@ExceptionHandler(RuntimeException.class)
+	public AjaxResult handleRuntimeException(RuntimeException e, HttpServletRequest request) {
+		String requestURI = request.getRequestURI();
+		log.error("请求地址'{}',发生未知异常.", requestURI, e);
+		return AjaxResult.error("出错了");
+	}
+
+	/**
+	 * 系统异常
+	 */
+	@ExceptionHandler(Exception.class)
+	public AjaxResult handleException(Exception e, HttpServletRequest request) {
+		String requestURI = request.getRequestURI();
+		log.debug("请求地址'{}',发生系统异常.", requestURI, e);
+		return AjaxResult.error("出错了");
+	}
+
+	/**
+	 * 自定义验证异常
+	 */
+	@ExceptionHandler(BindException.class)
+	public AjaxResult handleBindException(BindException e) {
+		log.debug(e.getMessage(), e);
+		String message = e.getAllErrors().get(0).getDefaultMessage();
+		return AjaxResult.error(message);
+	}
+
+	/**
+	 * 自定义验证异常
+	 */
+	@ExceptionHandler(MethodArgumentNotValidException.class)
+	public Object handleMethodArgumentNotValidException(MethodArgumentNotValidException e) {
+		log.debug(e.getMessage(), e);
+		String message = e.getBindingResult().getFieldError().getDefaultMessage();
+		return AjaxResult.error(message);
+	}
+
+}

+ 12 - 0
src/main/java/com/poyee/common/service/common/exception/LockException.java

@@ -0,0 +1,12 @@
+package com.poyee.common.service.common.exception;
+
+public class LockException extends RuntimeException {
+
+	public LockException() {
+	}
+
+	public LockException(String message) {
+		super(message);
+	}
+
+}

+ 9 - 0
src/main/java/com/poyee/common/service/common/exception/LockedTaskException.java

@@ -0,0 +1,9 @@
+package com.poyee.common.service.common.exception;
+
+public class LockedTaskException extends RuntimeException {
+
+	public LockedTaskException(String message) {
+		super(message);
+	}
+
+}

+ 66 - 0
src/main/java/com/poyee/common/service/common/exception/ServiceException.java

@@ -0,0 +1,66 @@
+package com.poyee.common.service.common.exception;
+
+/**
+ * 业务异常
+ *
+ * @author ruoyi
+ */
+public final class ServiceException extends RuntimeException {
+
+	private static final long serialVersionUID = 1L;
+
+	/**
+	 * 错误码
+	 */
+	private Integer code;
+
+	/**
+	 * 错误提示
+	 */
+	private String message;
+
+	/**
+	 * 错误明细,内部调试错误
+	 * <p>
+	 * 和 {@link CommonResult#getDetailMessage()} 一致的设计
+	 */
+	private String detailMessage;
+
+	/**
+	 * 空构造方法,避免反序列化问题
+	 */
+	public ServiceException() {
+	}
+
+	public ServiceException(String message) {
+		this.message = message;
+	}
+
+	public ServiceException(String message, Integer code) {
+		this.message = message;
+		this.code = code;
+	}
+
+	public String getDetailMessage() {
+		return detailMessage;
+	}
+
+	public ServiceException setDetailMessage(String detailMessage) {
+		this.detailMessage = detailMessage;
+		return this;
+	}
+
+	public String getMessage() {
+		return message;
+	}
+
+	public ServiceException setMessage(String message) {
+		this.message = message;
+		return this;
+	}
+
+	public Integer getCode() {
+		return code;
+	}
+
+}

+ 24 - 0
src/main/java/com/poyee/common/service/common/exception/UtilException.java

@@ -0,0 +1,24 @@
+package com.poyee.common.service.common.exception;
+
+/**
+ * 工具类异常
+ *
+ * @author ruoyi
+ */
+public class UtilException extends RuntimeException {
+
+	private static final long serialVersionUID = 8247610319171014183L;
+
+	public UtilException(Throwable e) {
+		super(e.getMessage(), e);
+	}
+
+	public UtilException(String message) {
+		super(message);
+	}
+
+	public UtilException(String message, Throwable throwable) {
+		super(message, throwable);
+	}
+
+}

+ 90 - 0
src/main/java/com/poyee/common/service/common/filter/AuthenticationFilter.java

@@ -0,0 +1,90 @@
+package com.poyee.common.service.common.filter;
+
+import com.poyee.common.service.common.user.UserInfo;
+import com.poyee.common.service.common.user.UserUtils;
+import org.springframework.security.authentication.UsernamePasswordAuthenticationToken;
+import org.springframework.security.core.context.SecurityContextHolder;
+import org.springframework.security.web.authentication.WebAuthenticationDetailsSource;
+import org.springframework.stereotype.Component;
+import org.springframework.web.filter.OncePerRequestFilter;
+
+import javax.servlet.FilterChain;
+import javax.servlet.ServletException;
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+import java.io.IOException;
+import java.util.ArrayList;
+import java.util.Objects;
+
+/**
+ * 过滤器 获取用户权限
+ */
+@Component
+public class AuthenticationFilter extends OncePerRequestFilter {
+
+	@Override
+	protected void doFilterInternal(HttpServletRequest request, HttpServletResponse response, FilterChain chain)
+			throws ServletException, IOException {
+		String requestURI = request.getRequestURI();
+		if (requestURI.contains("search")) {
+			UsernamePasswordAuthenticationToken authentication = new UsernamePasswordAuthenticationToken("SYSTEM", null,
+					new ArrayList<>());
+			// 设置详细信息
+			authentication.setDetails(new WebAuthenticationDetailsSource().buildDetails(request));
+
+			// 将认证对象设置到 SecurityContext 中
+			SecurityContextHolder.getContext().setAuthentication(authentication);
+
+			chain.doFilter(request, response);
+		}
+		else if (requestURI.contains("cardreport")) {
+			UsernamePasswordAuthenticationToken authentication = new UsernamePasswordAuthenticationToken("SYSTEM", null,
+					new ArrayList<>());
+			// 设置详细信息
+			authentication.setDetails(new WebAuthenticationDetailsSource().buildDetails(request));
+
+			// 将认证对象设置到 SecurityContext 中
+			SecurityContextHolder.getContext().setAuthentication(authentication);
+
+			chain.doFilter(request, response);
+		}
+		else if (requestURI.contains("sync")) {
+			UsernamePasswordAuthenticationToken authentication = new UsernamePasswordAuthenticationToken("SYSTEM", null,
+					new ArrayList<>());
+			// 设置详细信息
+			authentication.setDetails(new WebAuthenticationDetailsSource().buildDetails(request));
+
+			// 将认证对象设置到 SecurityContext 中
+			SecurityContextHolder.getContext().setAuthentication(authentication);
+
+			chain.doFilter(request, response);
+		}
+		else if (requestURI.contains("delete")) {
+			UsernamePasswordAuthenticationToken authentication = new UsernamePasswordAuthenticationToken("SYSTEM", null,
+					new ArrayList<>());
+			// 设置详细信息
+			authentication.setDetails(new WebAuthenticationDetailsSource().buildDetails(request));
+
+			// 将认证对象设置到 SecurityContext 中
+			SecurityContextHolder.getContext().setAuthentication(authentication);
+
+			chain.doFilter(request, response);
+		}
+		else {
+			UserInfo userInfo = UserUtils.getSimpleUserInfo(request);
+			if (Objects.nonNull(userInfo)) {
+				// 创建认证对象,通常包含用户、凭证和权限
+				UsernamePasswordAuthenticationToken authentication = new UsernamePasswordAuthenticationToken(
+						userInfo.getNickname(), null, new ArrayList<>());
+
+				// 设置详细信息
+				authentication.setDetails(new WebAuthenticationDetailsSource().buildDetails(request));
+
+				// 将认证对象设置到 SecurityContext 中
+				SecurityContextHolder.getContext().setAuthentication(authentication);
+			}
+			chain.doFilter(request, response);
+		}
+	}
+
+}

+ 19 - 0
src/main/java/com/poyee/common/service/common/user/BaseConfig.java

@@ -0,0 +1,19 @@
+package com.poyee.common.service.common.user;
+
+import lombok.Data;
+import org.springframework.beans.factory.annotation.Value;
+import org.springframework.context.annotation.Configuration;
+
+import java.util.List;
+
+@Configuration
+@Data
+public class BaseConfig {
+
+	@Value("${hobbystocks.app-version:dev}")
+	private String env;
+
+	@Value("${hobbystocks.white.uris:}")
+	private List<String> uris;
+
+}

+ 41 - 0
src/main/java/com/poyee/common/service/common/user/CommonConfig.java

@@ -0,0 +1,41 @@
+package com.poyee.common.service.common.user;
+
+import org.springframework.context.annotation.Configuration;
+import org.springframework.util.CollectionUtils;
+
+import javax.annotation.Resource;
+import javax.servlet.http.HttpServletRequest;
+
+/**
+ * @Classname CommonConfig
+ */
+@Configuration
+public class CommonConfig {
+
+	public static final String ENV_PRO = "prod";
+
+	public static final String ENV_TEST = "test";
+
+	public static final String ENV_DEV = "dev";
+
+	public static BaseConfig _baseConfig;
+
+	public static boolean isProdEnv() {
+		return ENV_PRO.equals(_baseConfig.getEnv());
+	}
+
+	public static boolean isDevEnv() {
+		return ENV_TEST.equals(_baseConfig.getEnv());
+	}
+
+	public static boolean isWhite(HttpServletRequest request) {
+		return !CollectionUtils.isEmpty(_baseConfig.getUris())
+				&& _baseConfig.getUris().stream().anyMatch(uri -> request.getRequestURI().startsWith(uri));
+	}
+
+	@Resource
+	public void setBaseConfig(BaseConfig baseconfig) {
+		_baseConfig = baseconfig;
+	}
+
+}

+ 55 - 0
src/main/java/com/poyee/common/service/common/user/UserInfo.java

@@ -0,0 +1,55 @@
+package com.poyee.common.service.common.user;
+
+import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
+import lombok.Data;
+
+import java.io.Serializable;
+import java.util.List;
+
+/**
+ * @author by po'yi
+ * @Classname UserInfo
+ * @Description 用户信息
+ * @Date 2022/8/18 15:46
+ */
+@Data
+@JsonIgnoreProperties(ignoreUnknown = true)
+public class UserInfo implements Serializable {
+
+	private Integer id;
+
+	/**
+	 * 昵称
+	 */
+	private String nickname;
+
+	/**
+	 * 头像
+	 */
+	private String avatar;
+
+	/**
+	 * 角色code
+	 */
+	private String roleCode;
+
+	private Integer merchantId;
+
+	private String merchantName;
+
+	private String merchantAvatar;
+
+	/**
+	 * 权限
+	 */
+	private List<String> permissionsList;
+
+	private String code;
+
+	private Long point;
+
+	private Integer faceVerify;
+
+	private Integer accountStatus;
+
+}

+ 144 - 0
src/main/java/com/poyee/common/service/common/user/UserUtils.java

@@ -0,0 +1,144 @@
+package com.poyee.common.service.common.user;
+
+import com.alibaba.fastjson.JSON;
+import com.dtflys.forest.Forest;
+import com.poyee.common.service.common.utils.Base64Util;
+import com.poyee.common.service.common.utils.ServletUtils;
+import com.poyee.common.service.common.utils.StringUtils;
+import com.poyee.common.service.forest.CommonForestClient;
+import lombok.extern.slf4j.Slf4j;
+
+import javax.servlet.http.HttpServletRequest;
+import java.util.Objects;
+
+/**
+ * @author by po'yi
+ * @Classname UserUtils
+ * @Description 用户工具类
+ * @Date 2022/8/30 10:56
+ */
+@Slf4j
+public class UserUtils {
+
+	private static String URL;
+
+	public static void setUrl(String url) {
+		URL = url;
+	}
+
+	/**
+	 * 查询请求头中用户部分信息
+	 */
+	public static UserInfo getSimpleUserInfo() {
+		final HttpServletRequest request = ServletUtils.getRequest();
+		if (Objects.isNull(request)) {
+			return null;
+		}
+		String userInfoStr = request.getHeader("X-USER-BASE64");
+		log.debug("请求用户信息base64:{}", userInfoStr);
+		if (StringUtils.isEmpty(userInfoStr)) {
+			if (!CommonConfig.isWhite(ServletUtils.getRequest()) && CommonConfig.isProdEnv()) {
+				return null;
+			}
+			if (CommonConfig.isWhite(ServletUtils.getRequest()) || CommonConfig.isDevEnv()) {
+				// 必须登陆
+				UserInfo userInfo = new UserInfo();
+				userInfo.setId(-1);
+				userInfo.setNickname("18221327589");
+				userInfo.setRoleCode("shipping");
+				userInfo.setMerchantId(182);
+				return userInfo;
+			}
+			return null;
+		}
+		String user = new String(Base64Util.decode(userInfoStr));
+		log.debug("请求用户:{}", user);
+		return JSON.parseObject(user, UserInfo.class);
+	}
+
+	public static UserInfo getSimpleUserInfo(HttpServletRequest request) {
+		if (Objects.isNull(request)) {
+			return null;
+		}
+		String userInfoStr = request.getHeader("X-USER-BASE64");
+		log.debug("请求用户信息base64:{}", userInfoStr);
+		if (StringUtils.isEmpty(userInfoStr)) {
+			if (!CommonConfig.isWhite(request) && CommonConfig.isProdEnv()) {
+				return null;
+			}
+			if (CommonConfig.isWhite(request) || CommonConfig.isDevEnv()) {
+				// 必须登陆
+				UserInfo userInfo = new UserInfo();
+				userInfo.setId(-1);
+				userInfo.setNickname("18221327589");
+				userInfo.setRoleCode("shipping");
+				userInfo.setMerchantId(-1);
+				return userInfo;
+			}
+			return null;
+		}
+		String user = new String(Base64Util.decode(userInfoStr));
+		log.debug("请求用户:{}", user);
+		return JSON.parseObject(user, UserInfo.class);
+	}
+
+	public static UserInfo getUserInfo() {
+		if (!CommonConfig.isDevEnv()) {
+			UserInfo userInfo = getSimpleUserInfo();
+			try {
+				CommonForestClient client = Forest.client(CommonForestClient.class);
+				String user = client.sendGet0(URL + userInfo.getId());
+				log.debug("请求用户new:{}", user);
+				UserInfo newUserInfo = JSON.parseObject(user, UserInfo.class);
+				userInfo.setNickname(newUserInfo.getNickname());
+				userInfo.setCode(newUserInfo.getCode());
+				userInfo.setPoint(newUserInfo.getPoint());
+				userInfo.setFaceVerify(newUserInfo.getFaceVerify());
+				userInfo.setAccountStatus(newUserInfo.getAccountStatus());
+				userInfo.setAvatar(newUserInfo.getAvatar());
+			}
+			catch (Exception e) {
+				// ignore
+			}
+			return userInfo;
+		}
+		return getSimpleUserInfo();
+	}
+
+	public static UserInfo getUserInfo(Integer id) {
+		UserInfo userInfo = null;
+		try {
+			CommonForestClient client = Forest.client(CommonForestClient.class);
+			String user = client.sendGet0(URL + id);
+			log.debug("请求用户new:{}", user);
+			userInfo = JSON.parseObject(user, UserInfo.class);
+		}
+		catch (Exception e) {
+			// ignore
+		}
+		return userInfo;
+	}
+
+	public static String getCode(Integer id) {
+		UserInfo userInfo = getUserInfo(id);
+		return Objects.isNull(userInfo) ? null : userInfo.getCode();
+	}
+
+	public static Long getPoint(Integer id) {
+		UserInfo userInfo = getUserInfo(id);
+		return Objects.isNull(userInfo) ? null : userInfo.getPoint();
+	}
+
+	public static Long getPoint() {
+		UserInfo userInfo = getUserInfo();
+		return Objects.isNull(userInfo) ? 0L : userInfo.getPoint();
+	}
+
+	public static String hideUserPhone(String nickName) {
+		if (StringUtils.isNumeric(nickName)) {
+			nickName = nickName.replaceAll("(\\d{3})\\d{4}(\\d{4})", "$1****$2");
+		}
+		return nickName;
+	}
+
+}

+ 49 - 0
src/main/java/com/poyee/common/service/common/utils/Base64Util.java

@@ -0,0 +1,49 @@
+package com.poyee.common.service.common.utils;
+
+import java.util.Base64;
+
+public class Base64Util {
+
+	public static byte[] decode(String encodedText) {
+		/** 解码 */
+		final Base64.Decoder decoder = Base64.getDecoder();
+		return decoder.decode(encodedText);
+	}
+
+	/**
+	 * 编码
+	 */
+	public static String encode(byte[] data) {
+		final Base64.Encoder encoder = Base64.getEncoder();
+		return encoder.encodeToString(data);
+	}
+
+	public static String encodejson(String json) {
+		byte[] jsonBytes = json.getBytes();
+		final Base64.Encoder encoder = Base64.getEncoder();
+		return encoder.encodeToString(jsonBytes);
+	}
+
+	/**
+	 * 按字节截取字符串
+	 * @param str
+	 * @param bytes
+	 * @return
+	 */
+	public static String subStringByBytes(String str, int bytes) {
+		if (str == null || str.length() == 0) {
+			return str;
+		}
+		int len = 0;
+		for (int i = 0; i < str.length(); i++) {
+			// GBK 编码格式 中文占两个字节 UTF-8 编码格式中文占三个字节;
+			len += (str.charAt(i) > 255 ? 3 : 1);
+
+			if (len > bytes) {
+				return str.substring(0, i);
+			}
+		}
+		return str;
+	}
+
+}

+ 12 - 0
src/main/java/com/poyee/common/service/common/utils/CanonicalHostNamePropertyDefiner.java

@@ -0,0 +1,12 @@
+package com.poyee.common.service.common.utils;
+
+import ch.qos.logback.core.PropertyDefinerBase;
+
+public class CanonicalHostNamePropertyDefiner extends PropertyDefinerBase {
+
+	@Override
+	public String getPropertyValue() {
+		return new NetworkAddressUtil(getContext()).safelyGetCanonicalLocalHostName();
+	}
+
+}

+ 28 - 0
src/main/java/com/poyee/common/service/common/utils/CloneUtils.java

@@ -0,0 +1,28 @@
+package com.poyee.common.service.common.utils;
+
+import lombok.extern.slf4j.Slf4j;
+
+import java.io.ByteArrayInputStream;
+import java.io.ByteArrayOutputStream;
+import java.io.ObjectInputStream;
+import java.io.ObjectOutputStream;
+
+@Slf4j
+public class CloneUtils {
+
+	public static <T> T clone(T obj) {
+		try {
+			ByteArrayOutputStream bos = new ByteArrayOutputStream();
+			ObjectOutputStream oos = new ObjectOutputStream(bos);
+			oos.writeObject(obj);
+			ByteArrayInputStream bis = new ByteArrayInputStream(bos.toByteArray());
+			ObjectInputStream ois = new ObjectInputStream(bis);
+			return (T) ois.readObject();
+		}
+		catch (Exception e) {
+			log.error("clone error", e);
+			return null;
+		}
+	}
+
+}

+ 190 - 0
src/main/java/com/poyee/common/service/common/utils/DateUtils.java

@@ -0,0 +1,190 @@
+package com.poyee.common.service.common.utils;
+
+import org.apache.commons.lang3.time.DateFormatUtils;
+
+import java.lang.management.ManagementFactory;
+import java.text.ParseException;
+import java.text.SimpleDateFormat;
+import java.time.*;
+import java.time.format.DateTimeFormatter;
+import java.time.format.DateTimeParseException;
+import java.util.Date;
+
+/**
+ * 时间工具类
+ *
+ * @author ruoyi
+ */
+public class DateUtils extends org.apache.commons.lang3.time.DateUtils {
+
+	public static String YYYY = "yyyy";
+
+	public static String YYYY_MM = "yyyy-MM";
+
+	public static String YYYY_MM_DD = "yyyy-MM-dd";
+
+	public static String YYYYMMDDHHMMSS = "yyyyMMddHHmmss";
+
+	public static String YYYY_MM_DD_HH_MM_SS = "yyyy-MM-dd HH:mm:ss";
+
+	private static String[] parsePatterns = { "yyyy-MM-dd", "yyyy-MM-dd HH:mm:ss", "yyyy-MM-dd HH:mm", "yyyy-MM",
+			"yyyy/MM/dd", "yyyy/MM/dd HH:mm:ss", "yyyy/MM/dd HH:mm", "yyyy/MM", "yyyy.MM.dd", "yyyy.MM.dd HH:mm:ss",
+			"yyyy.MM.dd HH:mm", "yyyy.MM" };
+
+	/**
+	 * 获取当前Date型日期
+	 * @return Date() 当前日期
+	 */
+	public static Date getNowDate() {
+		return new Date();
+	}
+
+	/**
+	 * 获取当前日期, 默认格式为yyyy-MM-dd
+	 * @return String
+	 */
+	public static String getDate() {
+		return dateTimeNow(YYYY_MM_DD);
+	}
+
+	public static final String getTime() {
+		return dateTimeNow(YYYY_MM_DD_HH_MM_SS);
+	}
+
+	public static final String dateTimeNow() {
+		return dateTimeNow(YYYYMMDDHHMMSS);
+	}
+
+	public static final String dateTimeNow(final String format) {
+		return parseDateToStr(format, new Date());
+	}
+
+	public static final String dateTime(final Date date) {
+		return parseDateToStr(YYYY_MM_DD, date);
+	}
+
+	public static final String parseDateToStr(final String format, final Date date) {
+		return new SimpleDateFormat(format).format(date);
+	}
+
+	public static final Date dateTime(final String format, final String ts) {
+		try {
+			return new SimpleDateFormat(format).parse(ts);
+		}
+		catch (ParseException e) {
+			throw new RuntimeException(e);
+		}
+	}
+
+	/**
+	 * 日期路径 即年/月/日 如2018/08/08
+	 */
+	public static final String datePath() {
+		Date now = new Date();
+		return DateFormatUtils.format(now, "yyyy/MM/dd");
+	}
+
+	/**
+	 * 日期路径 即年/月/日 如20180808
+	 */
+	public static final String dateTime() {
+		Date now = new Date();
+		return DateFormatUtils.format(now, "yyyyMMdd");
+	}
+
+	/**
+	 * 日期型字符串转化为日期 格式
+	 */
+	public static Date parseDate(Object str) {
+		if (str == null) {
+			return null;
+		}
+		try {
+			return parseDate(str.toString(), parsePatterns);
+		}
+		catch (ParseException e) {
+			return null;
+		}
+	}
+
+	/**
+	 * 获取服务器启动时间
+	 */
+	public static Date getServerStartDate() {
+		long time = ManagementFactory.getRuntimeMXBean().getStartTime();
+		return new Date(time);
+	}
+
+	/**
+	 * 计算相差天数
+	 */
+	public static int differentDaysByMillisecond(Date date1, Date date2) {
+		return Math.abs((int) ((date2.getTime() - date1.getTime()) / (1000 * 3600 * 24)));
+	}
+
+	/**
+	 * 计算两个时间差
+	 */
+	public static String getDatePoor(Date endDate, Date nowDate) {
+		long nd = 1000 * 24 * 60 * 60;
+		long nh = 1000 * 60 * 60;
+		long nm = 1000 * 60;
+		// long ns = 1000;
+		// 获得两个时间的毫秒时间差异
+		long diff = endDate.getTime() - nowDate.getTime();
+		// 计算差多少天
+		long day = diff / nd;
+		// 计算差多少小时
+		long hour = diff % nd / nh;
+		// 计算差多少分钟
+		long min = diff % nd % nh / nm;
+		// 计算差多少秒//输出结果
+		// long sec = diff % nd % nh % nm / ns;
+		return day + "天" + hour + "小时" + min + "分钟";
+	}
+
+	/**
+	 * 增加 LocalDateTime ==> Date
+	 */
+	public static Date toDate(LocalDateTime temporalAccessor) {
+		ZonedDateTime zdt = temporalAccessor.atZone(ZoneId.systemDefault());
+		return Date.from(zdt.toInstant());
+	}
+
+	/**
+	 * 增加 LocalDate ==> Date
+	 */
+	public static Date toDate(LocalDate temporalAccessor) {
+		LocalDateTime localDateTime = LocalDateTime.of(temporalAccessor, LocalTime.of(0, 0, 0));
+		ZonedDateTime zdt = localDateTime.atZone(ZoneId.systemDefault());
+		return Date.from(zdt.toInstant());
+	}
+
+	public static Date getNextExecutionTime(String time) {
+		try {
+			// 解析时间字符串
+			DateTimeFormatter timeFormatter = DateTimeFormatter.ofPattern("HH:mm:ss");
+			LocalTime targetTime = LocalTime.parse(time, timeFormatter);
+
+			// 当前日期和时间
+			LocalDate today = LocalDate.now();
+			LocalTime now = LocalTime.now();
+
+			// 计算目标时间的完整日期时间
+			LocalDateTime nextExecution;
+			if (now.isAfter(targetTime)) {
+				// 当前时间已过目标时间,设置为明天的目标时间
+				nextExecution = LocalDateTime.of(today.plusDays(1), targetTime);
+			}
+			else {
+				// 当前时间未到目标时间,设置为今天的目标时间
+				nextExecution = LocalDateTime.of(today, targetTime);
+			}
+			return Date.from(nextExecution.atZone(ZoneId.systemDefault()).toInstant());
+		}
+		catch (DateTimeParseException e) {
+			throw new IllegalArgumentException("时间格式无效,请使用 HH:mm:ss 格式", e);
+		}
+	}
+
+}

+ 60 - 0
src/main/java/com/poyee/common/service/common/utils/DozerUtils.java

@@ -0,0 +1,60 @@
+package com.poyee.common.service.common.utils;
+
+import org.springframework.stereotype.Component;
+
+import java.util.ArrayList;
+import java.util.Collection;
+import java.util.List;
+import com.github.dozermapper.core.DozerBeanMapperBuilder;
+import com.github.dozermapper.core.Mapper;
+
+@Component
+public class DozerUtils {
+
+	/**
+	 * commonMapper,如果没有传mapper过来,默认使用这个 dozer/dozer-mapping.xml 是相对resources目录的路径
+	 */
+	public static Mapper mapper = DozerBeanMapperBuilder.create().build();
+
+	/**
+	 * 单个对象转换 传入需要转换的对象,返回转换后的对象 用法:CommonDozerUtil.map(dto,Destination.class)
+	 * @param source 源对象
+	 * @param destinationClass
+	 * @param <T>
+	 * @return
+	 */
+	public static <T> T map(Object source, Class<T> destinationClass) {
+		if (source != null) {
+			return mapper.map(source, destinationClass);
+		}
+		return null;
+	}
+
+	/**
+	 * list转换 用法:CommonDozerUtil.mapList(list,Destination.class)
+	 * @param sourceList
+	 * @param destinationClass
+	 * @param <T>
+	 * @return
+	 */
+	public static <T> List<T> mapList(Collection<?> sourceList, Class<T> destinationClass) {
+		List<T> destinationList = new ArrayList<>();
+		if (sourceList != null && sourceList.size() > 0) {
+			for (Object sourceObject : sourceList) {
+				T destinationObject = map(sourceObject, destinationClass);
+				destinationList.add(destinationObject);
+			}
+		}
+		return destinationList;
+	}
+
+	/**
+	 * 将对象A的值拷贝到对象B中
+	 * @param source 对象A
+	 * @param destinationObject 对象B
+	 */
+	public static void copy(Object source, Object destinationObject) {
+		mapper.map(source, destinationObject);
+	}
+
+}

+ 122 - 0
src/main/java/com/poyee/common/service/common/utils/HttpUtils.java

@@ -0,0 +1,122 @@
+package com.poyee.common.service.common.utils;
+
+import com.alibaba.fastjson.JSONObject;
+import org.apache.http.HttpEntity;
+import org.apache.http.HttpResponse;
+import org.apache.http.HttpStatus;
+import org.apache.http.client.HttpClient;
+import org.apache.http.client.methods.HttpGet;
+import org.apache.http.client.methods.HttpPost;
+import org.apache.http.entity.StringEntity;
+import org.apache.http.impl.client.HttpClients;
+import org.apache.http.util.EntityUtils;
+import org.slf4j.LoggerFactory;
+
+public class HttpUtils {
+
+	/**
+	 * @param url
+	 * @param param
+	 */
+	public static Result post(String url, String param) {
+		HttpClient client = HttpClients.createDefault();
+		HttpPost post = new HttpPost(url);
+		String rep = "";
+		LoggerFactory.getLogger("HttpUtils").info("发送请求,url:" + url + ",param:" + param);
+		try {
+			StringEntity s = new StringEntity(param, "UTF-8");
+			post.setEntity(s);
+			post.setHeader("Content-Type", "application/json;charset=utf-8");
+			HttpResponse res = client.execute(post);
+			if (res.getStatusLine().getStatusCode() == HttpStatus.SC_OK) {
+				HttpEntity entity = res.getEntity();
+				rep = EntityUtils.toString(entity, "utf-8");
+			}
+			else {
+				LoggerFactory.getLogger("HttpUtils")
+					.info("调用接口返回异常,url:" + url + ",CODE:" + res.getStatusLine().getStatusCode());
+				Result r = new Result();
+				r.setCode(res.getStatusLine().getStatusCode());
+				r.setMsg("系统异常");
+				return r;
+			}
+		}
+		catch (Exception e) {
+			LoggerFactory.getLogger("HttpUtils").error("调用接口异常:" + url);
+			throw new RuntimeException(e);
+		}
+		LoggerFactory.getLogger("HttpUtils").info("请求结果:" + rep);
+		return mapResult(rep);
+	}
+
+	public static Result get(String url) {
+		HttpClient client = HttpClients.createDefault();
+		HttpGet get = new HttpGet(url);
+		String rep = "";
+		try {
+			get.setHeader("Content-Type", "application/json;charset=utf-8");
+			HttpResponse res = client.execute(get);
+			if (res.getStatusLine().getStatusCode() == HttpStatus.SC_OK) {
+				HttpEntity entity = res.getEntity();
+				rep = EntityUtils.toString(entity, "utf-8");
+			}
+			else {
+				LoggerFactory.getLogger("HttpUtils")
+					.info("调用接口返回异常,url:" + url + "CODE:" + res.getStatusLine().getStatusCode());
+				Result r = new Result();
+				r.setCode(res.getStatusLine().getStatusCode());
+				r.setMsg("系统异常");
+				return r;
+			}
+		}
+		catch (Exception e) {
+			LoggerFactory.getLogger("HttpUtils").error("调用接口异常:" + url);
+			throw new RuntimeException(e);
+		}
+		return mapResult(rep);
+	}
+
+	private static Result mapResult(String rep) {
+		JSONObject jo = JSONObject.parseObject(rep);
+		Result r = new Result();
+		r.setCode(jo.getIntValue("code"));
+		r.setMsg(jo.getString("msg"));
+		r.setData(jo.getString("data"));
+		return r;
+	}
+
+	public static class Result {
+
+		private int code;
+
+		private String msg;
+
+		private String data;
+
+		public int getCode() {
+			return code;
+		}
+
+		public void setCode(int code) {
+			this.code = code;
+		}
+
+		public String getMsg() {
+			return msg;
+		}
+
+		public void setMsg(String msg) {
+			this.msg = msg;
+		}
+
+		public String getData() {
+			return data;
+		}
+
+		public void setData(String data) {
+			this.data = data;
+		}
+
+	}
+
+}

+ 34 - 0
src/main/java/com/poyee/common/service/common/utils/JsonConvertUtils.java

@@ -0,0 +1,34 @@
+package com.poyee.common.service.common.utils;
+
+import com.fasterxml.jackson.databind.ObjectMapper;
+import java.util.List;
+import java.util.Map;
+
+public class JsonConvertUtils {
+
+	public static <T> List<T> convertJsonDataToList(String json, Class<T> clazz) throws Exception {
+		// 创建 ObjectMapper 实例,用于处理 JSON
+		ObjectMapper objectMapper = new ObjectMapper();
+		// 将 JSON 字符串解析为 Map 对象
+		Map<String, Object> jsonMap = objectMapper.readValue(json, Map.class);
+		// 从 Map 中提取 data 字段
+		List<Object> dataList = (List<Object>) jsonMap.get("data");
+		// 将 data 字段转换为指定类型的 List
+		return objectMapper.convertValue(dataList,
+				objectMapper.getTypeFactory().constructCollectionType(List.class, clazz));
+	}
+
+	public static void main(String[] args) {
+		String json = "{\"data\": [\"item1\", \"item2\", \"item3\"]}";
+		try {
+			// 调用 convertJsonDataToList 方法将 data 部分转换为 List<String>
+			List<String> resultList = convertJsonDataToList(json, String.class);
+			// 输出转换后的 List
+			System.out.println(resultList);
+		}
+		catch (Exception e) {
+			e.printStackTrace();
+		}
+	}
+
+}

+ 58 - 0
src/main/java/com/poyee/common/service/common/utils/Md5Utils.java

@@ -0,0 +1,58 @@
+package com.poyee.common.service.common.utils;
+
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import java.security.MessageDigest;
+
+/**
+ * Md5加密方法
+ *
+ * @author zheng
+ */
+public class Md5Utils {
+
+	private static final Logger log = LoggerFactory.getLogger(Md5Utils.class);
+
+	private static byte[] md5(String s) {
+		MessageDigest algorithm;
+		try {
+			algorithm = MessageDigest.getInstance("MD5");
+			algorithm.reset();
+			algorithm.update(s.getBytes("UTF-8"));
+			byte[] messageDigest = algorithm.digest();
+			return messageDigest;
+		}
+		catch (Exception e) {
+			log.error("MD5 Error...", e);
+		}
+		return null;
+	}
+
+	private static final String toHex(byte hash[]) {
+		if (hash == null) {
+			return null;
+		}
+		StringBuffer buf = new StringBuffer(hash.length * 2);
+		int i;
+
+		for (i = 0; i < hash.length; i++) {
+			if ((hash[i] & 0xff) < 0x10) {
+				buf.append("0");
+			}
+			buf.append(Long.toString(hash[i] & 0xff, 16));
+		}
+		return buf.toString();
+	}
+
+	public static String hash(String s) {
+		try {
+			return new String(toHex(md5(s)).getBytes("UTF-8"), "UTF-8");
+		}
+		catch (Exception e) {
+			log.error("not supported charset...{}", e);
+			return s;
+		}
+	}
+
+}

+ 84 - 0
src/main/java/com/poyee/common/service/common/utils/NetworkAddressUtil.java

@@ -0,0 +1,84 @@
+package com.poyee.common.service.common.utils;
+
+import ch.qos.logback.core.Context;
+import ch.qos.logback.core.CoreConstants;
+import ch.qos.logback.core.spi.ContextAwareBase;
+
+import java.net.InetAddress;
+import java.net.NetworkInterface;
+import java.net.SocketException;
+import java.net.UnknownHostException;
+import java.util.Enumeration;
+
+public class NetworkAddressUtil extends ContextAwareBase {
+
+	public NetworkAddressUtil(Context context) {
+		setContext(context);
+	}
+
+	public static String getLocalHostName() throws UnknownHostException, SocketException {
+		try {
+			InetAddress localhost = InetAddress.getLocalHost();
+			return localhost.getHostName();
+		}
+		catch (UnknownHostException e) {
+			return getLocalAddressAsString();
+		}
+	}
+
+	public static String getCanonicalLocalHostName() throws UnknownHostException, SocketException {
+		try {
+			InetAddress localhost = InetAddress.getLocalHost();
+			return localhost.getCanonicalHostName();
+		}
+		catch (UnknownHostException e) {
+			return getLocalAddressAsString();
+		}
+	}
+
+	private static String getLocalAddressAsString() throws UnknownHostException, SocketException {
+		Enumeration<NetworkInterface> interfaces = NetworkInterface.getNetworkInterfaces();
+		while (interfaces != null && interfaces.hasMoreElements()) {
+			Enumeration<InetAddress> addresses = interfaces.nextElement().getInetAddresses();
+			while (addresses != null && addresses.hasMoreElements()) {
+				InetAddress address = addresses.nextElement();
+				if (acceptableAddress(address)) {
+					return address.getHostAddress();
+				}
+			}
+		}
+		throw new UnknownHostException();
+	}
+
+	private static boolean acceptableAddress(InetAddress address) {
+		return address != null && !address.isLoopbackAddress() && !address.isAnyLocalAddress()
+				&& !address.isLinkLocalAddress();
+	}
+
+	/**
+	 * Add the local host's name as a property
+	 */
+	public String safelyGetLocalHostName() {
+		try {
+			String localhostName = getLocalHostName();
+			return localhostName;
+		}
+		catch (UnknownHostException | SocketException | SecurityException e) {
+			addError("Failed to get local hostname", e);
+		}
+		return CoreConstants.UNKNOWN_LOCALHOST;
+	}
+
+	public String safelyGetCanonicalLocalHostName() {
+		try {
+			String localhostName = getCanonicalLocalHostName();
+			return localhostName;
+		}
+		catch (UnknownHostException | SocketException | SecurityException e) {
+			addError("Failed to get canonical local hostname", e);
+		}
+		return CoreConstants.UNKNOWN_LOCALHOST;
+
+	}
+
+}

+ 39 - 0
src/main/java/com/poyee/common/service/common/utils/PageUtils.java

@@ -0,0 +1,39 @@
+package com.poyee.common.service.common.utils;
+
+import com.github.pagehelper.PageHelper;
+import com.poyee.common.service.common.core.domain.BaseEntity;
+import com.poyee.common.service.common.utils.sql.SqlUtil;
+
+import java.util.Objects;
+
+/**
+ * 分页工具类
+ *
+ * @author ruoyi
+ */
+public class PageUtils extends PageHelper {
+
+	/**
+	 * 设置请求分页数据
+	 */
+	public static void startPage(BaseEntity entity) {
+		int pageNum = Objects.isNull(entity.getPageNum()) ? 1 : entity.getPageNum();
+		int pageSize = Objects.isNull(entity.getPageSize()) ? 100 : entity.getPageSize();
+		Boolean reasonable = Objects.isNull(entity.getReasonable()) ? true : entity.getReasonable();
+		String orderBy = SqlUtil.escapeOrderBySql(entity.getOrderBy());
+		if (Objects.nonNull(orderBy)) {
+			PageHelper.startPage(pageNum, pageSize, orderBy).setReasonable(reasonable);
+		}
+		else {
+			PageHelper.startPage(pageNum, pageSize).setReasonable(reasonable);
+		}
+	}
+
+	/**
+	 * 清理分页的线程变量
+	 */
+	public static void clearPage() {
+		PageHelper.clearPage();
+	}
+
+}

+ 61 - 0
src/main/java/com/poyee/common/service/common/utils/PaginationUtil.java

@@ -0,0 +1,61 @@
+package com.poyee.common.service.common.utils;
+
+import com.poyee.common.service.common.core.page.InData;
+
+import java.util.ArrayList;
+import java.util.List;
+
+public class PaginationUtil {
+
+	public static <T> PageResult<T> page(InData in, List<T> items) {
+		int pageSize = in.getPageSize();
+		int pageNo = in.getPageNum();
+		int totalItems = items.size();
+		int fromIndex = (pageNo - 1) * pageSize;
+		int toIndex = Math.min(fromIndex + pageSize, totalItems);
+
+		List<T> paginatedItems = new ArrayList<>();
+		if (fromIndex < totalItems) {
+			paginatedItems = items.subList(fromIndex, toIndex);
+		}
+
+		return new PageResult<>(paginatedItems, totalItems, pageNo, pageSize);
+	}
+
+	public static class PageResult<T> {
+
+		private List<T> data;
+
+		private int totalItems;
+
+		private int pageNum;
+
+		private int pageSize;
+
+		public PageResult(List<T> data, int totalItems, int pageNum, int pageSize) {
+			this.data = data;
+			this.totalItems = totalItems;
+			this.pageNum = pageNum;
+			this.pageSize = pageSize;
+		}
+
+		// Getters
+		public List<T> getItems() {
+			return data;
+		}
+
+		public int getTotalItems() {
+			return totalItems;
+		}
+
+		public int getPageNum() {
+			return pageNum;
+		}
+
+		public int getPageSize() {
+			return pageSize;
+		}
+
+	}
+
+}

+ 103 - 0
src/main/java/com/poyee/common/service/common/utils/SecurityUtils.java

@@ -0,0 +1,103 @@
+package com.poyee.common.service.common.utils;
+
+import com.poyee.common.service.common.constant.HttpStatus;
+import com.poyee.common.service.common.core.domain.model.LoginUser;
+import com.poyee.common.service.common.exception.ServiceException;
+import org.springframework.security.core.Authentication;
+import org.springframework.security.core.context.SecurityContextHolder;
+import org.springframework.security.crypto.bcrypt.BCryptPasswordEncoder;
+
+/**
+ * 安全服务工具类
+ *
+ * @author ruoyi
+ */
+public class SecurityUtils {
+
+	/**
+	 * 用户ID
+	 **/
+	public static String getUserId() {
+		try {
+			return getLoginUser().getUserId();
+		}
+		catch (Exception e) {
+			throw new ServiceException("获取用户ID异常", HttpStatus.UNAUTHORIZED);
+		}
+	}
+
+	/**
+	 * 获取部门ID
+	 **/
+	public static String getDeptId() {
+		try {
+			return getLoginUser().getDeptId();
+		}
+		catch (Exception e) {
+			throw new ServiceException("获取部门ID异常", HttpStatus.UNAUTHORIZED);
+		}
+	}
+
+	/**
+	 * 获取用户账户
+	 **/
+	public static String getUsername() {
+		try {
+			return getLoginUser().getUsername();
+		}
+		catch (Exception e) {
+			throw new ServiceException("获取用户账户异常", HttpStatus.UNAUTHORIZED);
+		}
+	}
+
+	/**
+	 * 获取用户
+	 **/
+	public static LoginUser getLoginUser() {
+		try {
+			return (LoginUser) getAuthentication().getPrincipal();
+		}
+		catch (Exception e) {
+
+			throw new ServiceException("获取用户信息异常", HttpStatus.UNAUTHORIZED);
+		}
+	}
+
+	/**
+	 * 获取Authentication
+	 */
+	public static Authentication getAuthentication() {
+		return SecurityContextHolder.getContext().getAuthentication();
+	}
+
+	/**
+	 * 生成BCryptPasswordEncoder密码
+	 * @param password 密码
+	 * @return 加密字符串
+	 */
+	public static String encryptPassword(String password) {
+		BCryptPasswordEncoder passwordEncoder = new BCryptPasswordEncoder();
+		return passwordEncoder.encode(password);
+	}
+
+	/**
+	 * 判断密码是否相同
+	 * @param rawPassword 真实密码
+	 * @param encodedPassword 加密后字符
+	 * @return 结果
+	 */
+	public static boolean matchesPassword(String rawPassword, String encodedPassword) {
+		BCryptPasswordEncoder passwordEncoder = new BCryptPasswordEncoder();
+		return passwordEncoder.matches(rawPassword, encodedPassword);
+	}
+
+	/**
+	 * 是否为管理员
+	 * @param userId 用户ID
+	 * @return 结果
+	 */
+	public static boolean isAdmin(Long userId) {
+		return userId != null && 1L == userId;
+	}
+
+}

+ 159 - 0
src/main/java/com/poyee/common/service/common/utils/SensitiveDataUtils.java

@@ -0,0 +1,159 @@
+package com.poyee.common.service.common.utils;
+
+import com.github.pagehelper.PageInfo;
+import com.poyee.common.service.annotation.Sensitive;
+import com.poyee.common.service.annotation.View;
+import com.poyee.common.service.common.user.UserUtils;
+import lombok.extern.slf4j.Slf4j;
+import org.apache.commons.lang3.StringUtils;
+
+import java.lang.reflect.Field;
+import java.util.*;
+
+/**
+ * 敏感数据处理工具类
+ */
+@Slf4j
+public class SensitiveDataUtils {
+
+	private static final String TARGET_PACKAGE_PREFIX_1 = "java";
+
+	private static final String TARGET_PACKAGE_PREFIX_2 = "jakarta";
+
+	public static void handleViewData(Object obj) {
+		Set<Object> visited = Collections.newSetFromMap(new IdentityHashMap<>());
+		try {
+			handleViewData(obj, visited);
+		}
+		catch (Exception e) {
+			log.error("数据处理异常", e);
+			throw new RuntimeException("数据处理异常");
+		}
+	}
+
+	public static <T> T handleViewDataSafe(T obj) {
+		Set<Object> visited = Collections.newSetFromMap(new IdentityHashMap<>());
+		try {
+			handleViewData(obj, visited);
+			return obj;
+		}
+		catch (Exception e) {
+			log.error("数据处理异常", e);
+			return obj;
+		}
+	}
+
+	private static void handleViewData(Object obj, Set<Object> visited) throws IllegalAccessException {
+		if (obj == null || visited.contains(obj)) {
+			return;
+		}
+
+		visited.add(obj);
+
+		if (obj instanceof Collection) {
+			for (Object item : (Collection<?>) obj) {
+				handleViewData(item, visited);
+			}
+		}
+		else if (obj instanceof Map) {
+			for (Map.Entry<?, ?> entry : ((Map<?, ?>) obj).entrySet()) {
+				handleViewData(entry.getValue(), visited);
+			}
+		}
+		else if (obj instanceof PageInfo) {
+			handlePageInfo((PageInfo<?>) obj, visited);
+		}
+		else if (obj.getClass().isArray()) {
+			int length = java.lang.reflect.Array.getLength(obj);
+			for (int i = 0; i < length; i++) {
+				handleViewData(java.lang.reflect.Array.get(obj, i), visited);
+			}
+		}
+		else if (shouldProcess(obj)) {
+			handleFields(obj, visited);
+		}
+	}
+
+	private static void handlePageInfo(PageInfo<?> pageInfo, Set<Object> visited) throws IllegalAccessException {
+		if (pageInfo == null) {
+			return;
+		}
+		// 处理PageInfo中的列表数据
+		handleViewData(pageInfo.getList(), visited);
+	}
+
+	private static void handleFields(Object obj, Set<Object> visited) throws IllegalAccessException {
+		Field[] fields = obj.getClass().getDeclaredFields();
+		for (Field field : fields) {
+			handleField(obj, visited, field);
+		}
+
+		Field[] superFields = obj.getClass().getSuperclass().getDeclaredFields();
+		for (Field field : superFields) {
+			handleField(obj, visited, field);
+		}
+	}
+
+	private static void handleField(Object obj, Set<Object> visited, Field field) throws IllegalAccessException {
+		try {
+			field.setAccessible(true);
+			Object value = field.get(obj);
+			if (field.isAnnotationPresent(Sensitive.class) && value instanceof String) {
+				Sensitive annotation = field.getAnnotation(Sensitive.class);
+				field.set(obj, maskString((String) value, annotation.type()));
+			}
+			else if (field.isAnnotationPresent(View.class)) {
+				View annotation = field.getAnnotation(View.class);
+				field.set(obj, view(value, annotation.type()));
+			}
+			else {
+				handleViewData(value, visited);
+			}
+		}
+		catch (Exception e) {
+			log.error("数据处理异常 field: " + field.getName(), e);
+			throw e;
+		}
+	}
+
+	private static Object view(Object value, int type) {
+		if (Objects.isNull(value))
+			return value;
+		if (type == 1)
+			return null;
+		return value;
+	}
+
+	private static boolean shouldProcess(Object obj) {
+		Package objPackage = obj.getClass().getPackage();
+		if (objPackage != null && (objPackage.getName().startsWith(TARGET_PACKAGE_PREFIX_1)
+				|| objPackage.getName().startsWith(TARGET_PACKAGE_PREFIX_2))) {
+			// Ignore Java
+			return false;
+		}
+		return true;
+	}
+
+	public static String maskString(String str, int type) {
+		if (type == 1) {
+			return UserUtils.hideUserPhone(str);
+		}
+		if (type == 3) {
+			return null;
+		}
+		if (type == 4) {
+			String newStr = UserUtils.hideUserPhone(str);
+			if (!StringUtils.isEmpty(newStr) && Objects.equals(newStr, str) && newStr.length() > 3) {
+				String prefix = newStr.substring(0, 2);
+				String suffix = newStr.substring(newStr.length() - 2);
+				return prefix + "***" + suffix;
+			}
+			return newStr;
+		}
+		if (StringUtils.isEmpty(str)) {
+			return str;
+		}
+		return str.charAt(0) + "**";
+	}
+
+}

+ 109 - 0
src/main/java/com/poyee/common/service/common/utils/ServletUtils.java

@@ -0,0 +1,109 @@
+package com.poyee.common.service.common.utils;
+
+import com.poyee.common.service.common.core.text.Convert;
+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;
+import javax.servlet.http.HttpSession;
+import java.io.IOException;
+import java.util.Objects;
+
+/**
+ * 客户端工具类
+ *
+ * @author ruoyi
+ */
+public class ServletUtils {
+
+	/**
+	 * 获取String参数
+	 */
+	public static String getParameter(String name) {
+		return getRequest().getParameter(name);
+	}
+
+	/**
+	 * 获取String参数
+	 */
+	public static String getParameter(String name, String defaultValue) {
+		return Convert.toStr(getRequest().getParameter(name), defaultValue);
+	}
+
+	/**
+	 * 获取Integer参数
+	 */
+	public static Integer getParameterToInt(String name) {
+		return Convert.toInt(getRequest().getParameter(name));
+	}
+
+	/**
+	 * 获取Integer参数
+	 */
+	public static Integer getParameterToInt(String name, Integer defaultValue) {
+		return Convert.toInt(getRequest().getParameter(name), defaultValue);
+	}
+
+	/**
+	 * 获取Boolean参数
+	 */
+	public static Boolean getParameterToBool(String name) {
+		return Convert.toBool(getRequest().getParameter(name));
+	}
+
+	/**
+	 * 获取Boolean参数
+	 */
+	public static Boolean getParameterToBool(String name, Boolean defaultValue) {
+		return Convert.toBool(getRequest().getParameter(name), defaultValue);
+	}
+
+	/**
+	 * 获取request
+	 */
+	public static HttpServletRequest getRequest() {
+		if (Objects.isNull(getRequestAttributes())) {
+			return null;
+		}
+		return getRequestAttributes().getRequest();
+	}
+
+	/**
+	 * 获取response
+	 */
+	public static HttpServletResponse getResponse() {
+		return getRequestAttributes().getResponse();
+	}
+
+	/**
+	 * 获取session
+	 */
+	public static HttpSession getSession() {
+		return getRequest().getSession();
+	}
+
+	public static ServletRequestAttributes getRequestAttributes() {
+		RequestAttributes attributes = RequestContextHolder.getRequestAttributes();
+		return (ServletRequestAttributes) attributes;
+	}
+
+	/**
+	 * 将字符串渲染到客户端
+	 * @param response 渲染对象
+	 * @param string 待渲染的字符串
+	 */
+	public static void renderString(HttpServletResponse response, String string) {
+		try {
+			response.setStatus(200);
+			response.setContentType("application/json");
+			response.setCharacterEncoding("utf-8");
+			response.getWriter().print(string);
+		}
+		catch (IOException e) {
+			e.printStackTrace();
+		}
+	}
+
+}

+ 415 - 0
src/main/java/com/poyee/common/service/common/utils/StringUtils.java

@@ -0,0 +1,415 @@
+package com.poyee.common.service.common.utils;
+
+import java.security.SecureRandom;
+import java.util.Collection;
+import java.util.Map;
+import java.util.Random;
+import java.util.regex.Pattern;
+
+/**
+ * 字符串工具类
+ *
+ * @author zheng
+ */
+public class StringUtils extends org.apache.commons.lang3.StringUtils {
+
+	/**
+	 * 空字符串
+	 */
+	public static final String NULLSTR = "";
+
+	/**
+	 * 下划线
+	 */
+	public static final char SEPARATOR = '_';
+
+	public static final String CHINESE_ENGLISH_DIGITS_PATTERN = "[\\p{IsHan}A-Za-z0-9]+";
+
+	/**
+	 * 检查传入的内容是否仅包含中文、英文和数字。
+	 * @param content 需要检查的内容。
+	 * @return 返回{@code true}如果内容只包含中文、英文和数字,否则返回{@code false}。
+	 */
+	public static boolean isValidChineseEnglishOnly(String content) {
+		return content != null && Pattern.compile(CHINESE_ENGLISH_DIGITS_PATTERN).matcher(content).matches();
+	}
+
+	/**
+	 * 获取参数不为空值
+	 * @param value defaultValue 要判断的value
+	 * @return value 返回值
+	 */
+	public static <T> T nvl(T value, T defaultValue) {
+		return value != null ? value : defaultValue;
+	}
+
+	/**
+	 * * 判断一个Collection是否为空, 包含List,Set,Queue
+	 * @param coll 要判断的Collection
+	 * @return true:为空 false:非空
+	 */
+	public static boolean isEmpty(Collection<?> coll) {
+		return isNull(coll) || coll.isEmpty();
+	}
+
+	/**
+	 * * 判断一个Collection是否非空,包含List,Set,Queue
+	 * @param coll 要判断的Collection
+	 * @return true:非空 false:空
+	 */
+	public static boolean isNotEmpty(Collection<?> coll) {
+		return !isEmpty(coll);
+	}
+
+	/**
+	 * * 判断一个对象数组是否为空
+	 * @param objects 要判断的对象数组 * @return true:为空 false:非空
+	 */
+	public static boolean isEmpty(Object[] objects) {
+		return isNull(objects) || (objects.length == 0);
+	}
+
+	/**
+	 * * 判断一个对象数组是否非空
+	 * @param objects 要判断的对象数组
+	 * @return true:非空 false:空
+	 */
+	public static boolean isNotEmpty(Object[] objects) {
+		return !isEmpty(objects);
+	}
+
+	/**
+	 * * 判断一个Map是否为空
+	 * @param map 要判断的Map
+	 * @return true:为空 false:非空
+	 */
+	public static boolean isEmpty(Map<?, ?> map) {
+		return isNull(map) || map.isEmpty();
+	}
+
+	/**
+	 * * 判断一个Map是否为空
+	 * @param map 要判断的Map
+	 * @return true:非空 false:空
+	 */
+	public static boolean isNotEmpty(Map<?, ?> map) {
+		return !isEmpty(map);
+	}
+
+	/**
+	 * * 判断一个字符串是否为空串
+	 * @param str String
+	 * @return true:为空 false:非空
+	 */
+	public static boolean isEmpty(String str) {
+		return isNull(str) || NULLSTR.equals(str.trim());
+	}
+
+	/**
+	 * * 判断一个字符串是否为非空串
+	 * @param str String
+	 * @return true:非空串 false:空串
+	 */
+	public static boolean isNotEmpty(String str) {
+		return !isEmpty(str);
+	}
+
+	/**
+	 * * 判断一个对象是否为空
+	 * @param object Object
+	 * @return true:为空 false:非空
+	 */
+	public static boolean isNull(Object object) {
+		return object == null;
+	}
+
+	/**
+	 * * 判断一个对象是否非空
+	 * @param object Object
+	 * @return true:非空 false:空
+	 */
+	public static boolean isNotNull(Object object) {
+		return !isNull(object);
+	}
+
+	/**
+	 * * 判断一个对象是否是数组类型(Java基本型别的数组)
+	 * @param object 对象
+	 * @return true:是数组 false:不是数组
+	 */
+	public static boolean isArray(Object object) {
+		return isNotNull(object) && object.getClass().isArray();
+	}
+
+	/**
+	 * 去空格
+	 */
+	public static String trim(String str) {
+		return (str == null ? "" : str.trim());
+	}
+
+	/**
+	 * 截取字符串
+	 * @param str 字符串
+	 * @param start 开始
+	 * @return 结果
+	 */
+	public static String substring(final String str, int start) {
+		if (str == null) {
+			return NULLSTR;
+		}
+
+		if (start < 0) {
+			start = str.length() + start;
+		}
+
+		if (start < 0) {
+			start = 0;
+		}
+		if (start > str.length()) {
+			return NULLSTR;
+		}
+
+		return str.substring(start);
+	}
+
+	/**
+	 * 截取字符串
+	 * @param str 字符串
+	 * @param start 开始
+	 * @param end 结束
+	 * @return 结果
+	 */
+	public static String substring(final String str, int start, int end) {
+		if (str == null) {
+			return NULLSTR;
+		}
+
+		if (end < 0) {
+			end = str.length() + end;
+		}
+		if (start < 0) {
+			start = str.length() + start;
+		}
+
+		if (end > str.length()) {
+			end = str.length();
+		}
+
+		if (start > end) {
+			return NULLSTR;
+		}
+
+		if (start < 0) {
+			start = 0;
+		}
+		if (end < 0) {
+			end = 0;
+		}
+
+		return str.substring(start, end);
+	}
+
+	/**
+	 * 下划线转驼峰命名
+	 */
+	public static String toUnderScoreCase(String str) {
+		if (str == null) {
+			return null;
+		}
+		StringBuilder sb = new StringBuilder();
+		// 前置字符是否大写
+		boolean preCharIsUpperCase = true;
+		// 当前字符是否大写
+		boolean curreCharIsUpperCase = true;
+		// 下一字符是否大写
+		boolean nexteCharIsUpperCase = true;
+		for (int i = 0; i < str.length(); i++) {
+			char c = str.charAt(i);
+			if (i > 0) {
+				preCharIsUpperCase = Character.isUpperCase(str.charAt(i - 1));
+			}
+			else {
+				preCharIsUpperCase = false;
+			}
+
+			curreCharIsUpperCase = Character.isUpperCase(c);
+
+			if (i < (str.length() - 1)) {
+				nexteCharIsUpperCase = Character.isUpperCase(str.charAt(i + 1));
+			}
+
+			if (preCharIsUpperCase && curreCharIsUpperCase && !nexteCharIsUpperCase) {
+				sb.append(SEPARATOR);
+			}
+			else if ((i != 0 && !preCharIsUpperCase) && curreCharIsUpperCase) {
+				sb.append(SEPARATOR);
+			}
+			sb.append(Character.toLowerCase(c));
+		}
+		return sb.toString();
+	}
+
+	/**
+	 * 是否包含字符串
+	 * @param str 验证字符串
+	 * @param strs 字符串组
+	 * @return 包含返回true
+	 */
+	public static boolean inStringIgnoreCase(String str, String... strs) {
+		if (str != null && strs != null) {
+			for (String s : strs) {
+				if (str.equalsIgnoreCase(trim(s))) {
+					return true;
+				}
+			}
+		}
+		return false;
+	}
+
+	/**
+	 * 将下划线大写方式命名的字符串转换为驼峰式。如果转换前的下划线大写方式命名的字符串为空,则返回空字符串。 例如:HELLO_WORLD->HelloWorld
+	 * @param name 转换前的下划线大写方式命名的字符串
+	 * @return 转换后的驼峰式命名的字符串
+	 */
+	public static String convertToCamelCase(String name) {
+		StringBuilder result = new StringBuilder();
+		// 快速检查
+		if (name == null || name.isEmpty()) {
+			// 没必要转换
+			return "";
+		}
+		else if (!name.contains("_")) {
+			// 不含下划线,仅将首字母大写
+			return name.substring(0, 1).toUpperCase() + name.substring(1);
+		}
+		// 用下划线将原始字符串分割
+		String[] camels = name.split("_");
+		for (String camel : camels) {
+			// 跳过原始字符串中开头、结尾的下换线或双重下划线
+			if (camel.isEmpty()) {
+				continue;
+			}
+			// 首字母大写
+			result.append(camel.substring(0, 1).toUpperCase());
+			result.append(camel.substring(1).toLowerCase());
+		}
+		return result.toString();
+	}
+
+	/**
+	 * 驼峰式命名法 例如:user_name->userName
+	 */
+	public static String toCamelCase(String s) {
+		if (s == null) {
+			return null;
+		}
+		if (s.indexOf(SEPARATOR) == -1) {
+			return s;
+		}
+		s = s.toLowerCase();
+		StringBuilder sb = new StringBuilder(s.length());
+		boolean upperCase = false;
+		for (int i = 0; i < s.length(); i++) {
+			char c = s.charAt(i);
+
+			if (c == SEPARATOR) {
+				upperCase = true;
+			}
+			else if (upperCase) {
+				sb.append(Character.toUpperCase(c));
+				upperCase = false;
+			}
+			else {
+				sb.append(c);
+			}
+		}
+		return sb.toString();
+	}
+
+	@SuppressWarnings("unchecked")
+	public static <T> T cast(Object obj) {
+		return (T) obj;
+	}
+
+	// public static void main(String[] args) {
+	// boolean result= Pattern.compile(Constants.NUM_REG).matcher("12333").find();
+	// System.out.println(result);
+	// }
+	public static Long convertToLong(String str) {
+		if (StringUtils.isEmpty(str)) {
+			return 0L;
+		}
+		try {
+			long num = Long.parseLong(str);
+			return num;
+		}
+		catch (NumberFormatException e) {
+			System.out.println("字符串不能转换为 long 类型: " + e.getMessage());
+		}
+		return 0L;
+	}
+
+	/**
+	 * 姓名脱敏
+	 * @param name 姓名
+	 * @param len 从第几个开始脱敏
+	 * @return
+	 */
+	public static String nameDesensitization(String name, int len) {
+		if (StringUtils.isEmpty(name)) {
+			return name;
+		}
+		String prefix = name.substring(0, len);
+
+		return prefix + "***";
+	}
+
+	public static String desenstiseStr(String params, int atLength) {
+		if (StringUtils.isEmpty(params)) {
+			return null;
+		}
+		params = params.replaceAll("\\*", "0");
+		int strLength = params.length();
+		if (strLength <= atLength) {
+			return params;
+		}
+		int i = strLength - atLength;
+		char[] chars = new char[i];
+		return params.replaceAll("\\w*(\\w{" + atLength + "})", new String(chars).replace(chars[0], '*') + "$1");
+	}
+
+	public static String desensitizeName(String name) {
+		// 如果姓名为空或长度小于4,不处理
+		if (name == null || name.length() < 4) {
+			return name;
+		}
+
+		int length = name.length();
+
+		if (length == 4) {
+			// 姓名正好是4个字,返回前两个字 + "***" + 后两个字
+			return name.substring(0, 2) + "***" + name.substring(2);
+		}
+		else {
+			// 否则,返回前两个字 + "***" + 最后两个字
+			return name.substring(0, 2) + "***" + name.substring(length - 2);
+		}
+	}
+
+	/**
+	 * 获取长度为 N 的随机字母+数字
+	 * @return 随机数字
+	 */
+	public static String getRandomNumber(int len) {
+		final String SYMBOLS = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz"; // 数字和26个字母组成
+		final Random RANDOM = new SecureRandom();
+		char[] nonceChars = new char[len]; // 指定长度为N位/自己可以要求设置
+
+		for (int index = 0; index < nonceChars.length; ++index) {
+			nonceChars[index] = SYMBOLS.charAt(RANDOM.nextInt(SYMBOLS.length()));
+		}
+		return new String(nonceChars);
+	}
+
+}

+ 48 - 0
src/main/java/com/poyee/common/service/common/utils/UserType.java

@@ -0,0 +1,48 @@
+package com.poyee.common.service.common.utils;
+
+/**
+ * 用户类型
+ */
+public class UserType {
+
+	// 角色
+	public static final String USER_ROLE_SHIPPING = "shipping";
+
+	public static final String USER_ROLE_GENERAL_USER = "general_user";
+
+	public static final String USER_ROLE_ADMIN = "admin";
+
+	// 拼团 publicity
+	public static final String USER_ROLE_PUBLICITY = "merchant_sub_publicity";
+
+	// 物流 delivery
+	public static final String USER_ROLE_DELIVERY = "merchant_sub_delivery";
+
+	// 主播
+	public static final String USER_ROLE_LIVING = "living";
+
+	// 运营
+	public static final String USER_ROLE_OPERATE_USER = "operate_user";
+
+	// 微信公众号
+	public static String WX_WEB = "WX_WEB";
+
+	// 微信小程序
+	public static String WX_APPLET = "WX_APPLET";
+
+	// 第三方
+	public static String THIRD = "THIRD";
+
+	// 第三方-安卓
+	public static String THIRD_APK = "THIRD_APK";
+
+	// 第三方-ios
+	public static String THIRD_APP = "THIRD_APP";
+
+	// 苹果授权登陆
+	public static String APPLE_AUTH = "APPLE_AUTH";
+
+	// 微信授权登陆
+	public static String WX_AUTH = "WX_AUTH";
+
+}

+ 334 - 0
src/main/java/com/poyee/common/service/common/utils/reflect/ReflectUtils.java

@@ -0,0 +1,334 @@
+package com.poyee.common.service.common.utils.reflect;
+
+import com.poyee.common.service.common.core.text.Convert;
+import com.poyee.common.service.common.utils.DateUtils;
+import org.apache.commons.lang3.StringUtils;
+import org.apache.commons.lang3.Validate;
+import org.apache.poi.ss.usermodel.DateUtil;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import java.lang.reflect.*;
+import java.util.Date;
+
+/**
+ * 反射工具类. 提供调用getter/setter方法, 访问私有变量, 调用私有方法, 获取泛型类型Class, 被AOP过的真实类等工具函数.
+ *
+ * @author ruoyi
+ */
+@SuppressWarnings("rawtypes")
+public class ReflectUtils {
+
+	private static final String SETTER_PREFIX = "set";
+
+	private static final String GETTER_PREFIX = "get";
+
+	private static final String CGLIB_CLASS_SEPARATOR = "$$";
+
+	private static Logger logger = LoggerFactory.getLogger(ReflectUtils.class);
+
+	/**
+	 * 调用Getter方法. 支持多级,如:对象名.对象名.方法
+	 */
+	@SuppressWarnings("unchecked")
+	public static <E> E invokeGetter(Object obj, String propertyName) {
+		Object object = obj;
+		for (String name : StringUtils.split(propertyName, ".")) {
+			String getterMethodName = GETTER_PREFIX + StringUtils.capitalize(name);
+			object = invokeMethod(object, getterMethodName, new Class[] {}, new Object[] {});
+		}
+		return (E) object;
+	}
+
+	/**
+	 * 调用Setter方法, 仅匹配方法名。 支持多级,如:对象名.对象名.方法
+	 */
+	public static <E> void invokeSetter(Object obj, String propertyName, E value) {
+		Object object = obj;
+		String[] names = StringUtils.split(propertyName, ".");
+		for (int i = 0; i < names.length; i++) {
+			if (i < names.length - 1) {
+				String getterMethodName = GETTER_PREFIX + StringUtils.capitalize(names[i]);
+				object = invokeMethod(object, getterMethodName, new Class[] {}, new Object[] {});
+			}
+			else {
+				String setterMethodName = SETTER_PREFIX + StringUtils.capitalize(names[i]);
+				invokeMethodByName(object, setterMethodName, new Object[] { value });
+			}
+		}
+	}
+
+	/**
+	 * 直接读取对象属性值, 无视private/protected修饰符, 不经过getter函数.
+	 */
+	@SuppressWarnings("unchecked")
+	public static <E> E getFieldValue(final Object obj, final String fieldName) {
+		Field field = getAccessibleField(obj, fieldName);
+		if (field == null) {
+			logger.debug("在 [" + obj.getClass() + "] 中,没有找到 [" + fieldName + "] 字段 ");
+			return null;
+		}
+		E result = null;
+		try {
+			result = (E) field.get(obj);
+		}
+		catch (IllegalAccessException e) {
+			logger.error("不可能抛出的异常{}", e.getMessage());
+		}
+		return result;
+	}
+
+	/**
+	 * 直接设置对象属性值, 无视private/protected修饰符, 不经过setter函数.
+	 */
+	public static <E> void setFieldValue(final Object obj, final String fieldName, final E value) {
+		Field field = getAccessibleField(obj, fieldName);
+		if (field == null) {
+			// throw new IllegalArgumentException("在 [" + obj.getClass() + "] 中,没有找到 [" +
+			// fieldName + "] 字段 ");
+			logger.debug("在 [" + obj.getClass() + "] 中,没有找到 [" + fieldName + "] 字段 ");
+			return;
+		}
+		try {
+			field.set(obj, value);
+		}
+		catch (IllegalAccessException e) {
+			logger.error("不可能抛出的异常: {}", e.getMessage());
+		}
+	}
+
+	/**
+	 * 直接调用对象方法, 无视private/protected修饰符.
+	 * 用于一次性调用的情况,否则应使用getAccessibleMethod()函数获得Method后反复调用. 同时匹配方法名+参数类型,
+	 */
+	@SuppressWarnings("unchecked")
+	public static <E> E invokeMethod(final Object obj, final String methodName, final Class<?>[] parameterTypes,
+			final Object[] args) {
+		if (obj == null || methodName == null) {
+			return null;
+		}
+		Method method = getAccessibleMethod(obj, methodName, parameterTypes);
+		if (method == null) {
+			logger.debug("在 [" + obj.getClass() + "] 中,没有找到 [" + methodName + "] 方法 ");
+			return null;
+		}
+		try {
+			return (E) method.invoke(obj, args);
+		}
+		catch (Exception e) {
+			String msg = "method: " + method + ", obj: " + obj + ", args: " + args + "";
+			throw convertReflectionExceptionToUnchecked(msg, e);
+		}
+	}
+
+	/**
+	 * 直接调用对象方法, 无视private/protected修饰符,
+	 * 用于一次性调用的情况,否则应使用getAccessibleMethodByName()函数获得Method后反复调用. 只匹配函数名,如果有多个同名函数调用第一个。
+	 */
+	@SuppressWarnings("unchecked")
+	public static <E> E invokeMethodByName(final Object obj, final String methodName, final Object[] args) {
+		Method method = getAccessibleMethodByName(obj, methodName, args.length);
+		if (method == null) {
+			// 如果为空不报错,直接返回空。
+			logger.debug("在 [" + obj.getClass() + "] 中,没有找到 [" + methodName + "] 方法 ");
+			return null;
+		}
+		try {
+			// 类型转换(将参数数据类型转换为目标方法参数类型)
+			Class<?>[] cs = method.getParameterTypes();
+			for (int i = 0; i < cs.length; i++) {
+				if (args[i] != null && !args[i].getClass().equals(cs[i])) {
+					if (cs[i] == String.class) {
+						args[i] = Convert.toStr(args[i]);
+						if (StringUtils.endsWith((String) args[i], ".0")) {
+							args[i] = StringUtils.substringBefore((String) args[i], ".0");
+						}
+					}
+					else if (cs[i] == Integer.class) {
+						args[i] = Convert.toInt(args[i]);
+					}
+					else if (cs[i] == Long.class) {
+						args[i] = Convert.toLong(args[i]);
+					}
+					else if (cs[i] == Double.class) {
+						args[i] = Convert.toDouble(args[i]);
+					}
+					else if (cs[i] == Float.class) {
+						args[i] = Convert.toFloat(args[i]);
+					}
+					else if (cs[i] == Date.class) {
+						if (args[i] instanceof String) {
+							args[i] = DateUtils.parseDate(args[i]);
+						}
+						else {
+							args[i] = DateUtil.getJavaDate((Double) args[i]);
+						}
+					}
+					else if (cs[i] == boolean.class || cs[i] == Boolean.class) {
+						args[i] = Convert.toBool(args[i]);
+					}
+				}
+			}
+			return (E) method.invoke(obj, args);
+		}
+		catch (Exception e) {
+			String msg = "method: " + method + ", obj: " + obj + ", args: " + args + "";
+			throw convertReflectionExceptionToUnchecked(msg, e);
+		}
+	}
+
+	/**
+	 * 循环向上转型, 获取对象的DeclaredField, 并强制设置为可访问. 如向上转型到Object仍无法找到, 返回null.
+	 */
+	public static Field getAccessibleField(final Object obj, final String fieldName) {
+		// 为空不报错。直接返回 null
+		if (obj == null) {
+			return null;
+		}
+		Validate.notBlank(fieldName, "fieldName can't be blank");
+		for (Class<?> superClass = obj.getClass(); superClass != Object.class; superClass = superClass
+			.getSuperclass()) {
+			try {
+				Field field = superClass.getDeclaredField(fieldName);
+				makeAccessible(field);
+				return field;
+			}
+			catch (NoSuchFieldException e) {
+				continue;
+			}
+		}
+		return null;
+	}
+
+	/**
+	 * 循环向上转型, 获取对象的DeclaredMethod,并强制设置为可访问. 如向上转型到Object仍无法找到, 返回null. 匹配函数名+参数类型。
+	 * 用于方法需要被多次调用的情况. 先使用本函数先取得Method,然后调用Method.invoke(Object obj, Object... args)
+	 */
+	public static Method getAccessibleMethod(final Object obj, final String methodName,
+			final Class<?>... parameterTypes) {
+		// 为空不报错。直接返回 null
+		if (obj == null) {
+			return null;
+		}
+		Validate.notBlank(methodName, "methodName can't be blank");
+		for (Class<?> searchType = obj.getClass(); searchType != Object.class; searchType = searchType
+			.getSuperclass()) {
+			try {
+				Method method = searchType.getDeclaredMethod(methodName, parameterTypes);
+				makeAccessible(method);
+				return method;
+			}
+			catch (NoSuchMethodException e) {
+				continue;
+			}
+		}
+		return null;
+	}
+
+	/**
+	 * 循环向上转型, 获取对象的DeclaredMethod,并强制设置为可访问. 如向上转型到Object仍无法找到, 返回null. 只匹配函数名。
+	 * 用于方法需要被多次调用的情况. 先使用本函数先取得Method,然后调用Method.invoke(Object obj, Object... args)
+	 */
+	public static Method getAccessibleMethodByName(final Object obj, final String methodName, int argsNum) {
+		// 为空不报错。直接返回 null
+		if (obj == null) {
+			return null;
+		}
+		Validate.notBlank(methodName, "methodName can't be blank");
+		for (Class<?> searchType = obj.getClass(); searchType != Object.class; searchType = searchType
+			.getSuperclass()) {
+			Method[] methods = searchType.getDeclaredMethods();
+			for (Method method : methods) {
+				if (method.getName().equals(methodName) && method.getParameterTypes().length == argsNum) {
+					makeAccessible(method);
+					return method;
+				}
+			}
+		}
+		return null;
+	}
+
+	/**
+	 * 改变private/protected的方法为public,尽量不调用实际改动的语句,避免JDK的SecurityManager抱怨。
+	 */
+	public static void makeAccessible(Method method) {
+		if ((!Modifier.isPublic(method.getModifiers()) || !Modifier.isPublic(method.getDeclaringClass().getModifiers()))
+				&& !method.isAccessible()) {
+			method.setAccessible(true);
+		}
+	}
+
+	/**
+	 * 改变private/protected的成员变量为public,尽量不调用实际改动的语句,避免JDK的SecurityManager抱怨。
+	 */
+	public static void makeAccessible(Field field) {
+		if ((!Modifier.isPublic(field.getModifiers()) || !Modifier.isPublic(field.getDeclaringClass().getModifiers())
+				|| Modifier.isFinal(field.getModifiers())) && !field.isAccessible()) {
+			field.setAccessible(true);
+		}
+	}
+
+	/**
+	 * 通过反射, 获得Class定义中声明的泛型参数的类型, 注意泛型必须定义在父类处 如无法找到, 返回Object.class.
+	 */
+	@SuppressWarnings("unchecked")
+	public static <T> Class<T> getClassGenricType(final Class clazz) {
+		return getClassGenricType(clazz, 0);
+	}
+
+	/**
+	 * 通过反射, 获得Class定义中声明的父类的泛型参数的类型. 如无法找到, 返回Object.class.
+	 */
+	public static Class getClassGenricType(final Class clazz, final int index) {
+		Type genType = clazz.getGenericSuperclass();
+
+		if (!(genType instanceof ParameterizedType)) {
+			logger.debug(clazz.getSimpleName() + "'s superclass not ParameterizedType");
+			return Object.class;
+		}
+
+		Type[] params = ((ParameterizedType) genType).getActualTypeArguments();
+
+		if (index >= params.length || index < 0) {
+			logger.debug("Index: " + index + ", Size of " + clazz.getSimpleName() + "'s Parameterized Type: "
+					+ params.length);
+			return Object.class;
+		}
+		if (!(params[index] instanceof Class)) {
+			logger.debug(clazz.getSimpleName() + " not set the actual class on superclass generic parameter");
+			return Object.class;
+		}
+
+		return (Class) params[index];
+	}
+
+	public static Class<?> getUserClass(Object instance) {
+		if (instance == null) {
+			throw new RuntimeException("Instance must not be null");
+		}
+		Class clazz = instance.getClass();
+		if (clazz != null && clazz.getName().contains(CGLIB_CLASS_SEPARATOR)) {
+			Class<?> superClass = clazz.getSuperclass();
+			if (superClass != null && !Object.class.equals(superClass)) {
+				return superClass;
+			}
+		}
+		return clazz;
+
+	}
+
+	/**
+	 * 将反射时的checked exception转换为unchecked exception.
+	 */
+	public static RuntimeException convertReflectionExceptionToUnchecked(String msg, Exception e) {
+		if (e instanceof IllegalAccessException || e instanceof IllegalArgumentException
+				|| e instanceof NoSuchMethodException) {
+			return new IllegalArgumentException(msg, e);
+		}
+		else if (e instanceof InvocationTargetException) {
+			return new RuntimeException(msg, ((InvocationTargetException) e).getTargetException());
+		}
+		return new RuntimeException(msg, e);
+	}
+
+}

+ 55 - 0
src/main/java/com/poyee/common/service/common/utils/sql/SqlUtil.java

@@ -0,0 +1,55 @@
+package com.poyee.common.service.common.utils.sql;
+
+import com.poyee.common.service.common.exception.UtilException;
+import org.apache.commons.lang3.StringUtils;
+
+/**
+ * sql操作工具类
+ *
+ * @author ruoyi
+ */
+public class SqlUtil {
+
+	/**
+	 * 定义常用的 sql关键字
+	 */
+	public static String SQL_REGEX = "select |insert |delete |update |drop |count |exec |chr |mid |master |truncate |char |and |declare ";
+
+	/**
+	 * 仅支持字母、数字、下划线、空格、逗号、小数点(支持多个字段排序)
+	 */
+	public static String SQL_PATTERN = "[a-zA-Z0-9_\\ \\,\\.]+";
+
+	/**
+	 * 检查字符,防止注入绕过
+	 */
+	public static String escapeOrderBySql(String value) {
+		if (StringUtils.isNotEmpty(value) && !isValidOrderBySql(value)) {
+			throw new UtilException("参数不符合规范,不能进行查询");
+		}
+		return value;
+	}
+
+	/**
+	 * 验证 order by 语法是否符合规范
+	 */
+	public static boolean isValidOrderBySql(String value) {
+		return value.matches(SQL_PATTERN);
+	}
+
+	/**
+	 * SQL关键字检查
+	 */
+	public static void filterKeyword(String value) {
+		if (StringUtils.isEmpty(value)) {
+			return;
+		}
+		String[] sqlKeywords = StringUtils.split(SQL_REGEX, "\\|");
+		for (String sqlKeyword : sqlKeywords) {
+			if (StringUtils.indexOfIgnoreCase(value, sqlKeyword) > -1) {
+				throw new UtilException("参数存在SQL注入风险");
+			}
+		}
+	}
+
+}

+ 20 - 0
src/main/java/com/poyee/common/service/config/CorsConfig.java

@@ -0,0 +1,20 @@
+package com.poyee.common.service.config;
+
+//@Configuration
+public class CorsConfig {
+
+	// @Bean
+	// public CorsFilter corsFilter() {
+	// CorsConfiguration config = new CorsConfiguration();
+	// config.addAllowedOriginPattern("*"); // 允许所有源的请求
+	// config.addAllowedHeader("*"); // 允许所有请求头
+	// config.addAllowedMethod("*"); // 允许所有请求方法
+	// config.setAllowCredentials(true); // 允许携带凭证
+	//
+	// UrlBasedCorsConfigurationSource source = new UrlBasedCorsConfigurationSource();
+	// source.registerCorsConfiguration("/**", config); // 对所有接口都有效
+	//
+	// return new CorsFilter(source);
+	// }
+
+}

+ 15 - 0
src/main/java/com/poyee/common/service/config/HttpConfig.java

@@ -0,0 +1,15 @@
+package com.poyee.common.service.config;
+
+import org.springframework.context.annotation.Bean;
+import org.springframework.context.annotation.Configuration;
+import org.springframework.web.filter.ForwardedHeaderFilter;
+
+@Configuration
+public class HttpConfig {
+
+	@Bean
+	ForwardedHeaderFilter forwardedHeaderFilter() {
+		return new ForwardedHeaderFilter();
+	}
+
+}

+ 43 - 0
src/main/java/com/poyee/common/service/config/ReadinessHealthIndicator.java

@@ -0,0 +1,43 @@
+package com.poyee.common.service.config;
+
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.boot.actuate.health.Health;
+import org.springframework.boot.actuate.health.HealthIndicator;
+import org.springframework.stereotype.Component;
+
+import javax.sql.DataSource;
+import java.sql.Connection;
+import java.sql.SQLException;
+
+@Component
+public class ReadinessHealthIndicator implements HealthIndicator {
+
+	@Autowired
+	private DataSource dataSource;
+
+	@Override
+	public Health health() {
+		// 可以检查各种依赖服务状态,比如数据库连接、Redis、外部API等
+		if (!checkDB()) {
+			return Health.down().withDetail("database", "Connection is closed").build();
+		}
+		return Health.up().build();
+	}
+
+	private boolean checkDB() {
+		try (Connection connection = dataSource.getConnection()) {
+			// 如果连接成功,则返回健康状态
+			if (!connection.isClosed()) {
+				return true;
+			}
+			else {
+				return false;
+			}
+		}
+		catch (SQLException e) {
+			// 如果连接失败,则返回不健康状态并包含错误信息
+			return false;
+		}
+	}
+
+}

+ 32 - 0
src/main/java/com/poyee/common/service/config/SecurityConfig.java

@@ -0,0 +1,32 @@
+package com.poyee.common.service.config;
+
+import com.poyee.common.service.common.filter.AuthenticationFilter;
+import org.springframework.context.annotation.Bean;
+import org.springframework.context.annotation.Configuration;
+import org.springframework.security.config.annotation.web.builders.HttpSecurity;
+import org.springframework.security.config.annotation.web.configurers.AbstractHttpConfigurer;
+import org.springframework.security.config.http.SessionCreationPolicy;
+import org.springframework.security.web.SecurityFilterChain;
+import org.springframework.security.web.authentication.UsernamePasswordAuthenticationFilter;
+
+@Configuration
+public class SecurityConfig {
+
+	private final AuthenticationFilter authenticationFilter;
+
+	public SecurityConfig(AuthenticationFilter authenticationFilter) {
+		this.authenticationFilter = authenticationFilter;
+	}
+
+	@Bean
+	public SecurityFilterChain securityFilterChain(HttpSecurity http) throws Exception {
+		http.csrf(AbstractHttpConfigurer::disable) // 禁用 CSRF
+			.sessionManagement(session -> session.sessionCreationPolicy(SessionCreationPolicy.STATELESS)) // 使用无状态会话
+			.authorizeHttpRequests(auth -> auth.antMatchers("/actuator/**").permitAll().anyRequest().authenticated() // 其他请求需要身份验证
+			)
+			.addFilterBefore(authenticationFilter, UsernamePasswordAuthenticationFilter.class); // 添加自定义过滤器
+
+		return http.build();
+	}
+
+}

+ 136 - 0
src/main/java/com/poyee/common/service/config/SwaggerConfig.java

@@ -0,0 +1,136 @@
+package com.poyee.common.service.config;
+
+import io.swagger.annotations.ApiOperation;
+import io.swagger.models.auth.In;
+import org.springframework.beans.factory.annotation.Value;
+import org.springframework.boot.web.servlet.FilterRegistrationBean;
+import org.springframework.context.annotation.Bean;
+import org.springframework.context.annotation.Configuration;
+import org.springframework.core.Ordered;
+import org.springframework.web.cors.CorsConfiguration;
+import org.springframework.web.cors.UrlBasedCorsConfigurationSource;
+import org.springframework.web.filter.CorsFilter;
+import springfox.documentation.builders.ApiInfoBuilder;
+import springfox.documentation.builders.PathSelectors;
+import springfox.documentation.builders.RequestHandlerSelectors;
+import springfox.documentation.service.*;
+import springfox.documentation.spi.DocumentationType;
+import springfox.documentation.spi.service.contexts.SecurityContext;
+import springfox.documentation.spring.web.plugins.Docket;
+
+import java.util.ArrayList;
+import java.util.List;
+
+/**
+ * Swagger2的接口配置
+ *
+ * @author ruoyi
+ */
+@Configuration
+public class SwaggerConfig {
+
+	/**
+	 * 是否开启swagger
+	 */
+	@Value("${swagger.enabled}")
+	private boolean enabled;
+
+	/**
+	 * 设置请求的统一前缀
+	 */
+	@Value("${swagger.pathMapping}")
+	private String pathMapping;
+
+	private CorsConfiguration buildConfig() {
+		CorsConfiguration corsConfiguration = new CorsConfiguration();
+
+		// 设置访问源地址
+		corsConfiguration.addAllowedOriginPattern("*");
+		// 设置访问源请求头
+		corsConfiguration.addAllowedHeader("*");
+		// 设置访问源请求方法
+		corsConfiguration.addAllowedMethod("*");
+		// 设置是否支持用户凭证
+		corsConfiguration.setAllowCredentials(true);
+		return corsConfiguration;
+	}
+
+	@Bean
+	public FilterRegistrationBean<CorsFilter> corsFilter() {
+		UrlBasedCorsConfigurationSource source = new UrlBasedCorsConfigurationSource();
+		source.registerCorsConfiguration("/**", buildConfig());
+		// 项目中有多个filter时此处设置改CorsFilter的优先执行顺序
+		FilterRegistrationBean<CorsFilter> bean = new FilterRegistrationBean<>(new CorsFilter(source));
+		bean.setOrder(Ordered.HIGHEST_PRECEDENCE);
+		return bean;
+	}
+
+	/**
+	 * 创建API
+	 */
+	@Bean
+	public Docket createRestApi() {
+		return new Docket(DocumentationType.OAS_30)
+			// 是否启用Swagger
+			.enable(enabled)
+			// 用来创建该API的基本信息,展示在文档的页面中(自定义展示的信息)
+			.apiInfo(apiInfo())
+			// 设置哪些接口暴露给Swagger展示
+			.select()
+			// 扫描所有有注解的api,用这种方式更灵活
+			.apis(RequestHandlerSelectors.withMethodAnnotation(ApiOperation.class))
+			.paths(PathSelectors.any())
+			.build()
+			/* 设置安全模式,swagger可以设置访问token */
+			.securitySchemes(securitySchemes())
+			.securityContexts(securityContexts())
+			.pathMapping(pathMapping);
+	}
+
+	/**
+	 * 安全模式,这里指定token通过Authorization头请求头传递
+	 */
+	private List<SecurityScheme> securitySchemes() {
+		List<SecurityScheme> apiKeyList = new ArrayList<SecurityScheme>();
+		apiKeyList.add(new ApiKey("Authorization", "Authorization", In.HEADER.toValue()));
+		return apiKeyList;
+	}
+
+	/**
+	 * 安全上下文
+	 */
+	private List<SecurityContext> securityContexts() {
+		List<SecurityContext> securityContexts = new ArrayList<>();
+		securityContexts.add(SecurityContext.builder()
+			.securityReferences(defaultAuth())
+			.operationSelector(o -> o.requestMappingPattern().matches("/.*"))
+			.build());
+		return securityContexts;
+	}
+
+	/**
+	 * 默认的安全上引用
+	 */
+	private List<SecurityReference> defaultAuth() {
+		AuthorizationScope authorizationScope = new AuthorizationScope("global", "accessEverything");
+		AuthorizationScope[] authorizationScopes = new AuthorizationScope[1];
+		authorizationScopes[0] = authorizationScope;
+		List<SecurityReference> securityReferences = new ArrayList<>();
+		securityReferences.add(new SecurityReference("Authorization", authorizationScopes));
+		return securityReferences;
+	}
+
+	/**
+	 * 添加摘要信息
+	 */
+	private ApiInfo apiInfo() {
+		// 用ApiInfoBuilder进行定制
+		return new ApiInfoBuilder()
+			// 设置标题
+			.title("标题:拍卖系统_接口文档")
+			// 描述
+			.description("拍卖")
+			.build();
+	}
+
+}

+ 19 - 0
src/main/java/com/poyee/common/service/config/TaskSchedulerConfig.java

@@ -0,0 +1,19 @@
+package com.poyee.common.service.config;
+
+import org.springframework.context.annotation.Bean;
+import org.springframework.context.annotation.Configuration;
+import org.springframework.scheduling.concurrent.ThreadPoolTaskScheduler;
+
+@Configuration
+public class TaskSchedulerConfig {
+
+	@Bean
+	public ThreadPoolTaskScheduler taskScheduler() {
+		ThreadPoolTaskScheduler scheduler = new ThreadPoolTaskScheduler();
+		scheduler.setPoolSize(10); // 设置线程池大小
+		scheduler.setThreadNamePrefix("DynamicTask-");
+		scheduler.initialize();
+		return scheduler;
+	}
+
+}

+ 20 - 0
src/main/java/com/poyee/common/service/config/WebConfig.java

@@ -0,0 +1,20 @@
+package com.poyee.common.service.config;
+
+import com.poyee.common.service.aop.ControllerLoggingInterceptor;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.context.annotation.Configuration;
+import org.springframework.web.servlet.config.annotation.InterceptorRegistry;
+import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;
+
+@Configuration
+public class WebConfig implements WebMvcConfigurer {
+
+	@Autowired
+	private ControllerLoggingInterceptor controllerLoggingInterceptor;
+
+	@Override
+	public void addInterceptors(InterceptorRegistry registry) {
+		// registry.addInterceptor(controllerLoggingInterceptor).addPathPatterns("/**");
+	}
+
+}

+ 57 - 0
src/main/java/com/poyee/common/service/forest/CommonForestClient.java

@@ -0,0 +1,57 @@
+package com.poyee.common.service.forest;
+
+import com.dtflys.forest.annotation.*;
+import com.dtflys.forest.http.ForestResponse;
+import com.poyee.common.service.param.ForumEntity;
+import com.poyee.common.service.param.ForumRespEntity;
+import lombok.Data;
+
+import java.io.Serializable;
+import java.util.Map;
+
+public interface CommonForestClient {
+
+	@Get("{url}")
+	String sendGet0(@Var("url") String url);
+
+	@Get("{url}")
+	<T> ForestResponse<Response<T>> sendGet(@Var("url") String url);
+
+	@Get("{url}")
+	String sendGet(@Var("url") String url, @Header Map<String, Object> headerMap, @Body Object data);
+
+	@Get("{url}")
+	String sendGetDataParam(@Var("url") String url, @Header Map<String, Object> headerMap,
+			@DataParam("extend") Object data);
+
+	@Post("{url}")
+	<T> ForestResponse<Response<T>> sendPost(@Var("url") String url, @Header Map<String, Object> headerMap,
+			@JSONBody Object data);
+
+	@Post("{url}")
+	ForumRespEntity sendForumPost(@Var("url") String url, @Header Map<String, Object> headerMap, @JSONBody Object data);
+
+	@Post("{url}")
+	String sendPost(@Var("url") String url, @JSONBody Object data);
+
+	@Put("{url}")
+	String sendPut(@Var("url") String url, @Header Map<String, Object> headerMap, @Body Object data);
+
+	@Delete("{url}")
+	String sendDel(@Var("url") String url);
+
+	@Delete("{url}")
+	String sendDel(@Var("url") String url, @Header Map<String, Object> headerMap, @JSONBody Object data);
+
+	@Data
+	class Response<T> implements Serializable {
+
+		private Integer code;
+
+		private String msg;
+
+		private T data;
+
+	}
+
+}

+ 239 - 0
src/main/java/com/poyee/common/service/param/CardReportDispDTO.java

@@ -0,0 +1,239 @@
+package com.poyee.common.service.param;
+
+import lombok.AllArgsConstructor;
+import lombok.NoArgsConstructor;
+
+import java.io.Serializable;
+
+@AllArgsConstructor
+@NoArgsConstructor
+public class CardReportDispDTO implements Serializable {
+
+	private String wcardteam;
+
+	private String year;
+
+	private String del_time;
+
+	private String num;
+
+	private String ref_code;
+
+	private Integer team_id;
+
+	private String queryname;
+
+	private String dispname;
+
+	private String set_name;
+
+	private String player_name;
+
+	private String id;
+
+	private String app_user_win_card_id;
+
+	private String ref_name;
+
+	private Integer del_flag;
+
+	private Integer top_sort;
+
+	private String card_number;
+
+	private String create_time;
+
+	private String merchant_name;
+
+	private String sku_id;
+
+	private String card_set;
+
+	private String img_url;
+
+	private String player_zn;
+
+	private Integer ref_info_id;
+
+	private Integer order_id;
+
+	private Integer status;
+
+	private String no;
+
+	private String wcardseq;
+
+	private String remark;
+
+	private Integer merchant_id;
+
+	private String sold_time;
+
+	private String manufacturer;
+
+	private Integer group_goods_id;
+
+	private Integer player_id;
+
+	private String player_name_zn;
+
+	private String zn_team;
+
+	private String version;
+
+	private String user_nickname;
+
+	private String seq;
+
+	private String player;
+
+	private String team_zn;
+
+	private String sets;
+
+	private String team;
+
+	private String card_type;
+
+	private String wcardsport;
+
+	private String timestamp;
+
+	private String merchant_avatar;
+
+	private String order_list_id;
+
+	private String sets_version;
+
+	private Integer goods_type;
+
+	private String public_time;
+
+	private String ref_type;
+
+	private String sport;
+
+	private String groupinfoid;
+
+	public String getQueryname() {
+		return queryname;
+	}
+
+	public void setQueryname(String queryname) {
+		this.queryname = queryname;
+	}
+
+	public String getDispname() {
+		return dispname;
+	}
+
+	public void setDispname(String dispname) {
+		this.dispname = dispname;
+	}
+
+	public String getSet_name() {
+		return set_name;
+	}
+
+	public void setSet_name(String set_name) {
+		this.set_name = set_name;
+	}
+
+	public String getPlayer_name() {
+		return player_name;
+	}
+
+	public void setPlayer_name(String player_name) {
+		this.player_name = player_name;
+	}
+
+	public String getId() {
+		return app_user_win_card_id;
+	}
+
+	public void setId(String id) {
+		this.id = id;
+	}
+
+	public String getMerchant_name() {
+		return merchant_name;
+	}
+
+	public void setMerchant_name(String merchant_name) {
+		this.merchant_name = merchant_name;
+	}
+
+	public String getWcardseq() {
+		return wcardseq;
+	}
+
+	public void setWcardseq(String wcardseq) {
+		this.wcardseq = wcardseq;
+	}
+
+	public String getManufacturer() {
+		return manufacturer;
+	}
+
+	public void setManufacturer(String manufacturer) {
+		this.manufacturer = manufacturer;
+	}
+
+	public String getPlayer_name_zn() {
+		return player_name_zn;
+	}
+
+	public void setPlayer_name_zn(String player_name_zn) {
+		this.player_name_zn = player_name_zn;
+	}
+
+	public String getTeam_zn() {
+		return team_zn;
+	}
+
+	public void setTeam_zn(String team_zn) {
+		this.team_zn = team_zn;
+	}
+
+	public String getTeam() {
+		return team;
+	}
+
+	public void setTeam(String team) {
+		this.team = team;
+	}
+
+	public String getWcardsport() {
+		return wcardsport;
+	}
+
+	public void setWcardsport(String wcardsport) {
+		this.wcardsport = wcardsport;
+	}
+
+	public String getGroupinfoid() {
+		return groupinfoid;
+	}
+
+	public void setGroupinfoid(String groupinfoid) {
+		this.groupinfoid = groupinfoid;
+	}
+
+	public String getImg_url() {
+		return img_url;
+	}
+
+	public void setImg_url(String img_url) {
+		this.img_url = img_url;
+	}
+
+	public String getApp_user_win_card_id() {
+		return app_user_win_card_id;
+	}
+
+	public void setApp_user_win_card_id(String app_user_win_card_id) {
+		this.app_user_win_card_id = app_user_win_card_id;
+		this.id = app_user_win_card_id;
+	}
+
+}

+ 319 - 0
src/main/java/com/poyee/common/service/param/ForumEntity.java

@@ -0,0 +1,319 @@
+package com.poyee.common.service.param;
+
+import java.util.List;
+import com.fasterxml.jackson.annotation.JsonProperty;
+
+public class ForumEntity {
+
+	private String title;
+
+	private String cover;
+
+	private String content;
+
+	private List<String> tags;
+
+	private int status;
+
+	private int mediaType;
+
+	private String sport;
+
+	private SenderEntity senderEntity;
+
+	private String scope;
+
+	private String extend;
+
+	private String groupId;
+
+	private boolean allowComment;
+
+	private String summary;
+
+	public String getGroupId() {
+		return groupId;
+	}
+
+	public void setGroupId(String groupId) {
+		this.groupId = groupId;
+	}
+
+	public String getTitle() {
+		return title;
+	}
+
+	public void setTitle(String title) {
+		this.title = title;
+	}
+
+	public String getCover() {
+		return cover;
+	}
+
+	public void setCover(String cover) {
+		this.cover = cover;
+	}
+
+	public String getContent() {
+		return content;
+	}
+
+	public void setContent(String content) {
+		this.content = content;
+	}
+
+	public List<String> getTags() {
+		return tags;
+	}
+
+	public void setTags(List<String> tags) {
+		this.tags = tags;
+	}
+
+	public int getStatus() {
+		return status;
+	}
+
+	public void setStatus(int status) {
+		this.status = status;
+	}
+
+	public int getMediaType() {
+		return mediaType;
+	}
+
+	public void setMediaType(int mediaType) {
+		this.mediaType = mediaType;
+	}
+
+	public String getSport() {
+		return sport;
+	}
+
+	public void setSport(String sport) {
+		this.sport = sport;
+	}
+
+	public SenderEntity getSenderEntity() {
+		return senderEntity;
+	}
+
+	public void setSenderEntity(SenderEntity senderEntity) {
+		this.senderEntity = senderEntity;
+	}
+
+	public String getScope() {
+		return this.scope;
+	}
+
+	public void setScope(String scope) {
+		this.scope = scope;
+	}
+
+	public String getExtend() {
+		return extend;
+	}
+
+	public void setExtend(String extend) {
+		this.extend = extend;
+	}
+
+	public boolean isAllowComment() {
+		return allowComment;
+	}
+
+	public void setAllowComment(boolean allowComment) {
+		this.allowComment = allowComment;
+	}
+
+	public String getSummary() {
+		return summary;
+	}
+
+	public void setSummary(String summary) {
+		this.summary = summary;
+	}
+
+	// 内部类,处理senderEntity字段
+	public static class SenderEntity {
+
+		@JsonProperty("id")
+		private String id;
+
+		@JsonProperty("sub")
+		private String sub;
+
+		@JsonProperty("motto")
+		private Object motto;
+
+		@JsonProperty("avatar")
+		private String avatar;
+
+		@JsonProperty("banner")
+		private Object banner;
+
+		@JsonProperty("gender")
+		private Object gender;
+
+		@JsonProperty("userId")
+		private Object userId;
+
+		@JsonProperty("birthday")
+		private Object birthday;
+
+		@JsonProperty("isFollow")
+		private Object isFollow;
+
+		@JsonProperty("location")
+		private Object location;
+
+		@JsonProperty("nickName")
+		private String nickName;
+
+		@JsonProperty("nickname")
+		private Object nickname;
+
+		@JsonProperty("roleCode")
+		private String roleCode;
+
+		@JsonProperty("merchantId")
+		private Object merchantId;
+
+		@JsonProperty("merchantName")
+		private Object merchantName;
+
+		@JsonProperty("merchantAvatar")
+		private Object merchantAvatar;
+
+		public String getId() {
+			return id;
+		}
+
+		public void setId(String id) {
+			this.id = id;
+		}
+
+		public String getSub() {
+			return sub;
+		}
+
+		public void setSub(String sub) {
+			this.sub = sub;
+		}
+
+		public Object getMotto() {
+			return motto;
+		}
+
+		public void setMotto(Object motto) {
+			this.motto = motto;
+		}
+
+		public String getAvatar() {
+			return avatar;
+		}
+
+		public void setAvatar(String avatar) {
+			this.avatar = avatar;
+		}
+
+		public Object getBanner() {
+			return banner;
+		}
+
+		public void setBanner(Object banner) {
+			this.banner = banner;
+		}
+
+		public Object getGender() {
+			return gender;
+		}
+
+		public void setGender(Object gender) {
+			this.gender = gender;
+		}
+
+		public Object getUserId() {
+			return userId;
+		}
+
+		public void setUserId(Object userId) {
+			this.userId = userId;
+		}
+
+		public Object getBirthday() {
+			return birthday;
+		}
+
+		public void setBirthday(Object birthday) {
+			this.birthday = birthday;
+		}
+
+		public Object getIsFollow() {
+			return isFollow;
+		}
+
+		public void setIsFollow(Object isFollow) {
+			this.isFollow = isFollow;
+		}
+
+		public Object getLocation() {
+			return location;
+		}
+
+		public void setLocation(Object location) {
+			this.location = location;
+		}
+
+		public String getNickName() {
+			return nickName;
+		}
+
+		public void setNickName(String nickName) {
+			this.nickName = nickName;
+		}
+
+		public Object getNickname() {
+			return nickname;
+		}
+
+		public void setNickname(Object nickname) {
+			this.nickname = nickname;
+		}
+
+		public String getRoleCode() {
+			return roleCode;
+		}
+
+		public void setRoleCode(String roleCode) {
+			this.roleCode = roleCode;
+		}
+
+		public Object getMerchantId() {
+			return merchantId;
+		}
+
+		public void setMerchantId(Object merchantId) {
+			this.merchantId = merchantId;
+		}
+
+		public Object getMerchantName() {
+			return merchantName;
+		}
+
+		public void setMerchantName(Object merchantName) {
+			this.merchantName = merchantName;
+		}
+
+		public Object getMerchantAvatar() {
+			return merchantAvatar;
+		}
+
+		public void setMerchantAvatar(Object merchantAvatar) {
+			this.merchantAvatar = merchantAvatar;
+		}
+
+	}
+
+}

+ 282 - 0
src/main/java/com/poyee/common/service/param/ForumEntityDetail.java

@@ -0,0 +1,282 @@
+package com.poyee.common.service.param;
+
+import com.fasterxml.jackson.annotation.JsonFormat;
+
+import java.util.Date;
+import java.util.List;
+
+public class ForumEntityDetail {
+
+	private Integer id;
+
+	private SenderEntity senderEntity;
+
+	private String cover;
+
+	private String title;
+
+	private String summary;
+
+	private String content;
+
+	private String location;
+
+	private List<String> tags;
+
+	private Integer mediaType;
+
+	private Boolean isTop;
+
+	private String sport;
+
+	private Integer status;
+
+	private Integer score;
+
+	private Boolean active;
+
+	private Integer commentNum;
+
+	@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
+	private Date createTime;
+
+	private Integer visibility;
+
+	private String extend;
+
+	private Boolean liked;
+
+	private Integer likeNum;
+
+	private Integer collectNum;
+
+	private List<String> associateTeam;
+
+	private Boolean isFollow;
+
+	private Boolean isCollect;
+
+	private Object scope;
+
+	private Boolean allowComment;
+
+	private String groupId;
+
+	// Getters 和 Setters
+	public String getGroupId() {
+		return groupId;
+	}
+
+	public void setGroupId(String groupId) {
+		this.groupId = groupId;
+	}
+
+	public Integer getId() {
+		return id;
+	}
+
+	public void setId(Integer id) {
+		this.id = id;
+	}
+
+	public SenderEntity getSenderEntity() {
+		return senderEntity;
+	}
+
+	public void setSenderEntity(SenderEntity senderEntity) {
+		this.senderEntity = senderEntity;
+	}
+
+	public String getCover() {
+		return cover;
+	}
+
+	public void setCover(String cover) {
+		this.cover = cover;
+	}
+
+	public String getTitle() {
+		return title;
+	}
+
+	public void setTitle(String title) {
+		this.title = title;
+	}
+
+	public String getSummary() {
+		return summary;
+	}
+
+	public void setSummary(String summary) {
+		this.summary = summary;
+	}
+
+	public String getContent() {
+		return content;
+	}
+
+	public void setContent(String content) {
+		this.content = content;
+	}
+
+	public String getLocation() {
+		return location;
+	}
+
+	public void setLocation(String location) {
+		this.location = location;
+	}
+
+	public List<String> getTags() {
+		return tags;
+	}
+
+	public void setTags(List<String> tags) {
+		this.tags = tags;
+	}
+
+	public Integer getMediaType() {
+		return mediaType;
+	}
+
+	public void setMediaType(Integer mediaType) {
+		this.mediaType = mediaType;
+	}
+
+	public Boolean getIsTop() {
+		return isTop;
+	}
+
+	public void setIsTop(Boolean top) {
+		isTop = top;
+	}
+
+	public String getSport() {
+		return sport;
+	}
+
+	public void setSport(String sport) {
+		this.sport = sport;
+	}
+
+	public Integer getStatus() {
+		return status;
+	}
+
+	public void setStatus(Integer status) {
+		this.status = status;
+	}
+
+	public Integer getScore() {
+		return score;
+	}
+
+	public void setScore(Integer score) {
+		this.score = score;
+	}
+
+	public Boolean getActive() {
+		return active;
+	}
+
+	public void setActive(Boolean active) {
+		this.active = active;
+	}
+
+	public Integer getCommentNum() {
+		return commentNum;
+	}
+
+	public void setCommentNum(Integer commentNum) {
+		this.commentNum = commentNum;
+	}
+
+	public Date getCreateTime() {
+		return createTime;
+	}
+
+	public void setCreateTime(Date createTime) {
+		this.createTime = createTime;
+	}
+
+	public Integer getVisibility() {
+		return visibility;
+	}
+
+	public void setVisibility(Integer visibility) {
+		this.visibility = visibility;
+	}
+
+	public String getExtend() {
+		return extend;
+	}
+
+	public void setExtend(String extend) {
+		this.extend = extend;
+	}
+
+	public Boolean getLiked() {
+		return liked;
+	}
+
+	public void setLiked(Boolean liked) {
+		this.liked = liked;
+	}
+
+	public Integer getLikeNum() {
+		return likeNum;
+	}
+
+	public void setLikeNum(Integer likeNum) {
+		this.likeNum = likeNum;
+	}
+
+	public Integer getCollectNum() {
+		return collectNum;
+	}
+
+	public void setCollectNum(Integer collectNum) {
+		this.collectNum = collectNum;
+	}
+
+	public List<String> getAssociateTeam() {
+		return associateTeam;
+	}
+
+	public void setAssociateTeam(List<String> associateTeam) {
+		this.associateTeam = associateTeam;
+	}
+
+	public Boolean getIsFollow() {
+		return isFollow;
+	}
+
+	public void setIsFollow(Boolean follow) {
+		isFollow = follow;
+	}
+
+	public Boolean getIsCollect() {
+		return isCollect;
+	}
+
+	public void setIsCollect(Boolean collect) {
+		isCollect = collect;
+	}
+
+	public Object getScope() {
+		return scope;
+	}
+
+	public void setScope(Object scope) {
+		this.scope = scope;
+	}
+
+	public Boolean getAllowComment() {
+		return allowComment;
+	}
+
+	public void setAllowComment(Boolean allowComment) {
+		this.allowComment = allowComment;
+	}
+
+}

+ 15 - 0
src/main/java/com/poyee/common/service/param/ForumEntityDto.java

@@ -0,0 +1,15 @@
+package com.poyee.common.service.param;
+
+import com.fasterxml.jackson.annotation.JsonProperty;
+
+import java.util.List;
+
+public class ForumEntityDto {
+
+	public int code;
+
+	public ForumEntityDetail data;
+
+	public String msg;
+
+}

+ 15 - 0
src/main/java/com/poyee/common/service/param/ForumEntityListDto.java

@@ -0,0 +1,15 @@
+package com.poyee.common.service.param;
+
+import java.util.List;
+
+public class ForumEntityListDto {
+
+	public int code;
+
+	public List<ForumEntityDetail> data;
+
+	public String msg;
+
+	public Integer total;
+
+}

+ 11 - 0
src/main/java/com/poyee/common/service/param/ForumExtendEntity.java

@@ -0,0 +1,11 @@
+package com.poyee.common.service.param;
+
+import com.fasterxml.jackson.annotation.JsonProperty;
+
+import java.util.List;
+
+public class ForumExtendEntity {
+
+	public String cardId;
+
+}

+ 11 - 0
src/main/java/com/poyee/common/service/param/ForumQueryEntity.java

@@ -0,0 +1,11 @@
+package com.poyee.common.service.param;
+
+import com.fasterxml.jackson.annotation.JsonProperty;
+
+import java.util.List;
+
+public class ForumQueryEntity {
+
+	public Long id;
+
+}

+ 7 - 0
src/main/java/com/poyee/common/service/param/ForumQueryExtendEntity.java

@@ -0,0 +1,7 @@
+package com.poyee.common.service.param;
+
+public class ForumQueryExtendEntity {
+
+	public Long extend;
+
+}

+ 9 - 0
src/main/java/com/poyee/common/service/param/ForumQueryListExtendEntity.java

@@ -0,0 +1,9 @@
+package com.poyee.common.service.param;
+
+import java.util.List;
+
+public class ForumQueryListExtendEntity {
+
+	public List<String> extend;
+
+}

+ 11 - 0
src/main/java/com/poyee/common/service/param/ForumRespEntity.java

@@ -0,0 +1,11 @@
+package com.poyee.common.service.param;
+
+public class ForumRespEntity {
+
+	private int code;
+
+	private String msg;
+
+	private Object data;
+
+}

+ 7 - 0
src/main/java/com/poyee/common/service/param/InData.java

@@ -0,0 +1,7 @@
+package com.poyee.common.service.param;
+
+import com.poyee.common.service.common.core.domain.BaseEntity;
+
+public class InData extends BaseEntity {
+
+}

+ 82 - 0
src/main/java/com/poyee/common/service/param/LocationInfo.java

@@ -0,0 +1,82 @@
+package com.poyee.common.service.param;
+
+import com.fasterxml.jackson.annotation.JsonProperty;
+
+public class LocationInfo {
+
+	@JsonProperty("country")
+	private String country;
+
+	@JsonProperty("province")
+	private String province;
+
+	@JsonProperty("city")
+	private String city;
+
+	@JsonProperty("latitude")
+	private double latitude;
+
+	@JsonProperty("longitude")
+	private double longitude;
+
+	// 无参构造函数
+	public LocationInfo() {
+	}
+
+	// 全参构造函数
+	public LocationInfo(String country, String province, String city, double latitude, double longitude) {
+		this.country = country;
+		this.province = province;
+		this.city = city;
+		this.latitude = latitude;
+		this.longitude = longitude;
+	}
+
+	// Getter 和 Setter 方法
+	public String getCountry() {
+		return country;
+	}
+
+	public void setCountry(String country) {
+		this.country = country;
+	}
+
+	public String getProvince() {
+		return province;
+	}
+
+	public void setProvince(String province) {
+		this.province = province;
+	}
+
+	public String getCity() {
+		return city;
+	}
+
+	public void setCity(String city) {
+		this.city = city;
+	}
+
+	public double getLatitude() {
+		return latitude;
+	}
+
+	public void setLatitude(double latitude) {
+		this.latitude = latitude;
+	}
+
+	public double getLongitude() {
+		return longitude;
+	}
+
+	public void setLongitude(double longitude) {
+		this.longitude = longitude;
+	}
+
+	@Override
+	public String toString() {
+		return "LocationInfo{" + "country='" + country + '\'' + ", province='" + province + '\'' + ", city='" + city
+				+ '\'' + ", latitude=" + latitude + ", longitude=" + longitude + '}';
+	}
+
+}

+ 16 - 0
src/main/java/com/poyee/common/service/param/QueryParam.java

@@ -0,0 +1,16 @@
+package com.poyee.common.service.param;
+
+import lombok.Data;
+import lombok.ToString;
+
+import java.io.Serializable;
+
+@Data
+@ToString
+public class QueryParam extends InData implements Serializable {
+
+	private String query;
+
+	private int merchantid;
+
+}

+ 13 - 0
src/main/java/com/poyee/common/service/param/Response.java

@@ -0,0 +1,13 @@
+package com.poyee.common.service.param;
+
+public class Response<T> {
+
+	private int code;
+
+	private String message;
+
+	private T data;
+
+	// 省略 getters 和 setters
+
+}

+ 166 - 0
src/main/java/com/poyee/common/service/param/SenderEntity.java

@@ -0,0 +1,166 @@
+package com.poyee.common.service.param;
+
+public class SenderEntity {
+
+	private Object userId;
+
+	private String nickname;
+
+	private String avatar;
+
+	private String motto;
+
+	private String banner;
+
+	private Object gender;
+
+	private Object birthday;
+
+	private Object location;
+
+	private Boolean isFollow;
+
+	private Object id;
+
+	private Object sub;
+
+	private String merchantAvatar;
+
+	private String merchantName;
+
+	private Object merchantId;
+
+	private Object roleCode;
+
+	private String nickName;
+
+	// Getters 和 Setters
+	public Object getUserId() {
+		return userId;
+	}
+
+	public void setUserId(Object userId) {
+		this.userId = userId;
+	}
+
+	public String getNickname() {
+		return nickname;
+	}
+
+	public void setNickname(String nickname) {
+		this.nickname = nickname;
+	}
+
+	public String getAvatar() {
+		return avatar;
+	}
+
+	public void setAvatar(String avatar) {
+		this.avatar = avatar;
+	}
+
+	public String getMotto() {
+		return motto;
+	}
+
+	public void setMotto(String motto) {
+		this.motto = motto;
+	}
+
+	public String getBanner() {
+		return banner;
+	}
+
+	public void setBanner(String banner) {
+		this.banner = banner;
+	}
+
+	public Object getGender() {
+		return gender;
+	}
+
+	public void setGender(Object gender) {
+		this.gender = gender;
+	}
+
+	public Object getBirthday() {
+		return birthday;
+	}
+
+	public void setBirthday(Object birthday) {
+		this.birthday = birthday;
+	}
+
+	public Object getLocation() {
+		return location;
+	}
+
+	public void setLocation(Object location) {
+		this.location = location;
+	}
+
+	public Boolean getIsFollow() {
+		return isFollow;
+	}
+
+	public void setIsFollow(Boolean follow) {
+		isFollow = follow;
+	}
+
+	public Object getId() {
+		return id;
+	}
+
+	public void setId(Object id) {
+		this.id = id;
+	}
+
+	public Object getSub() {
+		return sub;
+	}
+
+	public void setSub(Object sub) {
+		this.sub = sub;
+	}
+
+	public String getMerchantAvatar() {
+		return merchantAvatar;
+	}
+
+	public void setMerchantAvatar(String merchantAvatar) {
+		this.merchantAvatar = merchantAvatar;
+	}
+
+	public String getMerchantName() {
+		return merchantName;
+	}
+
+	public void setMerchantName(String merchantName) {
+		this.merchantName = merchantName;
+	}
+
+	public Object getMerchantId() {
+		return merchantId;
+	}
+
+	public void setMerchantId(Object merchantId) {
+		this.merchantId = merchantId;
+	}
+
+	public Object getRoleCode() {
+		return roleCode;
+	}
+
+	public void setRoleCode(Object roleCode) {
+		this.roleCode = roleCode;
+	}
+
+	public String getNickName() {
+		return nickName;
+	}
+
+	public void setNickName(String nickName) {
+		this.nickName = nickName;
+	}
+
+}

+ 17 - 0
src/main/java/com/poyee/common/service/param/SyncParam.java

@@ -0,0 +1,17 @@
+package com.poyee.common.service.param;
+
+import lombok.Data;
+import lombok.ToString;
+
+import java.io.Serializable;
+import java.util.List;
+
+@Data
+@ToString
+public class SyncParam implements Serializable {
+
+	private List<Integer> ids;
+
+	private String type;
+
+}

+ 73 - 0
src/main/java/com/poyee/common/service/param/UserInfo.java

@@ -0,0 +1,73 @@
+package com.poyee.common.service.param;
+
+import com.fasterxml.jackson.annotation.JsonProperty;
+
+public class UserInfo {
+
+	@JsonProperty("sub")
+	private String sub;
+
+	@JsonProperty("nickName")
+	private String nickName;
+
+	@JsonProperty("roleCode")
+	private String roleCode;
+
+	@JsonProperty("avatar")
+	private String avatar;
+
+	@JsonProperty("id")
+	private int id;
+
+	// 构造函数
+	public UserInfo() {
+	}
+
+	// Getter 和 Setter 方法
+	public String getSub() {
+		return sub;
+	}
+
+	public void setSub(String sub) {
+		this.sub = sub;
+	}
+
+	public String getNickName() {
+		return nickName;
+	}
+
+	public void setNickName(String nickName) {
+		this.nickName = nickName;
+	}
+
+	public String getRoleCode() {
+		return roleCode;
+	}
+
+	public void setRoleCode(String roleCode) {
+		this.roleCode = roleCode;
+	}
+
+	public String getAvatar() {
+		return avatar;
+	}
+
+	public void setAvatar(String avatar) {
+		this.avatar = avatar;
+	}
+
+	public int getId() {
+		return id;
+	}
+
+	public void setId(int id) {
+		this.id = id;
+	}
+
+	@Override
+	public String toString() {
+		return "UserInfo{" + "sub='" + sub + '\'' + ", nickName='" + nickName + '\'' + ", roleCode='" + roleCode + '\''
+				+ ", avatar='" + avatar + '\'' + ", id=" + id + '}';
+	}
+
+}

+ 13 - 0
src/main/java/com/poyee/common/service/repo/CardReportRepository.java

@@ -0,0 +1,13 @@
+package com.poyee.common.service.repo;
+
+import cn.easyes.core.core.BaseEsMapper;
+import com.poyee.common.service.repo.domain.CardReportDTO;
+
+import java.util.List;
+
+public interface CardReportRepository extends BaseEsMapper<CardReportDTO> {
+
+	// 可以在这里定义自定义的查询方法 queryname
+	List<CardReportDTO> findByqueryname(String name);
+
+}

+ 87 - 0
src/main/java/com/poyee/common/service/repo/Impl/CardReportSearchService.java

@@ -0,0 +1,87 @@
+
+package com.poyee.common.service.repo.Impl;
+
+import org.springframework.stereotype.Service;
+
+@Service
+public class CardReportSearchService {
+
+//	@Resource
+//	private CardReportRepository cardReportRepository;
+//
+//	/// match分词结果和text的分词结果有相同的即可,不考虑顺序
+//	public EsPageInfo<CardReportDTO> searchCardReportByName(String name, int pageNum, int pageSize) {
+//		LambdaEsQueryWrapper<CardReportDTO> wrapper = new LambdaEsQueryWrapper<>();
+//		wrapper.match(CardReportDTO::getQueryname, name);
+//		EsPageInfo<CardReportDTO> pageResult = cardReportRepository.pageQuery(wrapper, pageNum, pageSize);
+//		return pageResult;
+//	}
+//
+//	// 查询指定商家拆卡报告
+//	public EsPageInfo<CardReportDTO> searchCardReportByNameAndMerchantID(String name, int merchantID, int pageNum,
+//			int pageSize) {
+//		LambdaEsQueryWrapper<CardReportDTO> wrapper = new LambdaEsQueryWrapper<>();
+//		wrapper.match(CardReportDTO::getQueryname, name);
+//		wrapper.match(CardReportDTO::getMerchant_id, merchantID);
+//		EsPageInfo<CardReportDTO> pageResult = cardReportRepository.pageQuery(wrapper, pageNum, pageSize);
+//		return pageResult;
+//	}
+//
+//	/// 查询条件必须都是text分词中的,且不能多余,多个分词时必须连续,顺序不能颠倒
+//	public EsPageInfo<CardReportDTO> searchTermCardReportByName(String name, int pageNum, int pageSize) {
+//		LambdaEsQueryWrapper<CardReportDTO> wrapper = new LambdaEsQueryWrapper<>();
+//		wrapper.eq(CardReportDTO::getQueryname, name);
+//		EsPageInfo<CardReportDTO> pageResult = cardReportRepository.pageQuery(wrapper, pageNum, pageSize);
+//		return pageResult;
+//	}
+//
+//	/// 查询条件必须都是text分词中的,且不能多余,多个分词时必须连续,顺序不能颠倒
+//	public EsPageInfo<CardReportDTO> searchIKCardReportByName(String name, int pageNum, int pageSize)
+//			throws JsonProcessingException {
+//		LambdaEsQueryWrapper<CardReportDTO> wrapper = new LambdaEsQueryWrapper<>();
+//		// wrapper.eq(CardReportDTO::getQueryname, name);
+//
+//		// 添加原生查询语句
+//		String nativeQuery = "{" + "  \"query\": {" + "  \"bool\" : {" + "    \"must\" : [  {"
+//				+ "      \"multi_match\" : {" + "        \"query\" : \"" + name + "\","
+//				+ "        \"fields\" : [ \"queryname^1.0\", \"dispname^1.0\" ],"
+//				+ "        \"type\" : \"best_fields\"," + "        \"operator\" : \"OR\","
+//				+ "        \"analyzer\" : \"ik_max_word\"," + "        \"slop\" : 0," + "        \"prefix_length\" : 0,"
+//				+ "        \"max_expansions\" : 50," + "        \"zero_terms_query\" : \"NONE\","
+//				+ "        \"auto_generate_synonyms_phrase_query\" : true," + "        \"fuzzy_transpositions\" : true,"
+//				+ "        \"boost\" : 1.0" + "      }" + "    }]," + "    \"adjust_pure_negative\" : true,"
+//				+ "    \"boost\" : 1.0" + "  }" + "}," + "  \"sort\": ["
+//				+ "     { \"_score\": { \"order\": \"desc\" } }," + "    {"
+//				+ "      \"year.keyword\": {\"order\": \"desc\"}" + "    }" + "  ]" + "}";
+//		nativeQuery = "{\"query\":{\"bool\":{\"must\":[{\"multi_match\":{\"query\":\"" + name
+//				+ "\",\"fields\":[\"queryname^1.0\",\"dispname^1.0\"],\"type\":\"best_fields\",\"operator\":\"OR\",\"analyzer\":\"ik_max_word\",\"zero_terms_query\":\"NONE\",\"auto_generate_synonyms_phrase_query\":true,\"fuzzy_transpositions\":true,\"boost\":1.0}}],\"adjust_pure_negative\":true,\"boost\":1.0}},\"sort\":[{\"_score\":{\"order\":\"desc\"}},{\"year.keyword\":{\"order\":\"desc\"}}]}";
+//		String jsonStr = "{\"query\":{\"bool\":{\"must\":{\"multi_match\":{\"query\":\"芝加哥天空\",\"fields\":[\"queryname\"]}}}}}";
+//		// wrapper.queryStringQuery(jsonStr);
+//		wrapper.or()
+//			.match(CardReportDTO::getQueryname, name)
+//			.or()
+//			.match(CardReportDTO::getRef_name, name)
+//			.or()
+//			.match(CardReportDTO::getDispname, name);
+//		wrapper.gt("_score", 6);
+//		EsPageInfo<CardReportDTO> pageResult = cardReportRepository.pageQuery(wrapper, pageNum, pageSize);
+//		return pageResult;
+//	}
+//
+//	/// matchPhrase的分词结果必须在text字段分词中都包含且顺序必须都相同,而且必须都是连续的.
+//	public EsPageInfo<CardReportDTO> searchPhraseCardReportByName(String name, int pageNum, int pageSize) {
+//		LambdaEsQueryWrapper<CardReportDTO> wrapper = new LambdaEsQueryWrapper<>();
+//		wrapper.matchPhrase(CardReportDTO::getQueryname, name);
+//		EsPageInfo<CardReportDTO> pageResult = cardReportRepository.pageQuery(wrapper, pageNum, pageSize);
+//		return pageResult;
+//	}
+//
+//	/// queryString中的分词结果至少有一个在text字段的分词结果中,不考虑顺序
+//	public EsPageInfo<CardReportDTO> searchAllCardReportByName(String name, int pageNum, int pageSize) {
+//		LambdaEsQueryWrapper<CardReportDTO> wrapper = new LambdaEsQueryWrapper<>();
+//		wrapper.queryStringQuery(name);
+//		EsPageInfo<CardReportDTO> pageResult = cardReportRepository.pageQuery(wrapper, pageNum, pageSize);
+//		return pageResult;
+//	}
+
+}

+ 205 - 0
src/main/java/com/poyee/common/service/repo/domain/AppUserWinCard.java

@@ -0,0 +1,205 @@
+package com.poyee.common.service.repo.domain;
+
+import com.fasterxml.jackson.annotation.JsonFormat;
+import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
+import lombok.Data;
+import lombok.experimental.Accessors;
+
+import java.io.Serializable;
+import java.util.Date;
+
+/**
+ * 【请填写功能名称】对象 app_user_win_card
+ *
+ * @author tencheer
+ * @date 2023-02-23
+ */
+@Data
+@Accessors(chain = true)
+@JsonIgnoreProperties(ignoreUnknown = true)
+public class AppUserWinCard implements Serializable {
+
+	private static final long serialVersionUID = 1L;
+
+	/**
+	 * $column.columnComment
+	 */
+	private Long id;
+
+	/**
+	 * 类型:组团-group,商城订单:goods
+	 */
+	private String refType;
+
+	/**
+	 * 用户id
+	 */
+	private Integer userId;
+
+	/**
+	 * 组团id
+	 */
+	private Long refInfoId;
+
+	/**
+	 * 订单id
+	 */
+	private Long orderId;
+
+	/**
+	 * 卡密id
+	 */
+	private Long groupGoodsId;
+
+	/**
+	 * 卡密仓库类型,1为新库
+	 */
+	private Long goodsType;
+
+	/**
+	 * 关联商品id
+	 */
+	private Long skuId;
+
+	/**
+	 * 订单明细id
+	 */
+	private Long orderListId;
+
+	/**
+	 * 组队名称
+	 */
+	private String refName;
+
+	/**
+	 * 组队code
+	 */
+	private String refCode;
+
+	/**
+	 * 组队运动类型
+	 */
+	private String sport;
+
+	/**
+	 * 开售时间
+	 */
+	private Date soldTime;
+
+	/**
+	 * 序列
+	 */
+	private String setName;
+
+	/**
+	 * 队伍
+	 */
+	private String team;
+
+	/**
+	 * 队伍中文翻译
+	 */
+	private String teamZn;
+
+	/**
+	 * 球员
+	 */
+	private String playerName;
+
+	/**
+	 * 球员中文
+	 */
+	private String playerNameZn;
+
+	/**
+	 * 队伍id
+	 */
+	private Long teamId;
+
+	/**
+	 * 球员id
+	 */
+	private Long playerId;
+
+	/**
+	 * 限编
+	 */
+	private String num;
+
+	/**
+	 * 编号
+	 */
+	private String seq;
+
+	/**
+	 * 图片url,多个以逗号相连
+	 */
+	private String imgUrl;
+
+	/**
+	 * 卡片数量
+	 */
+	private Long copies;
+
+	/**
+	 * 状态
+	 */
+	private Long status;
+
+	/**
+	 * 用户昵称
+	 */
+	private String userNickname;
+
+	/**
+	 * 用户头像
+	 */
+	private String userAvatar;
+
+	/**
+	 * 商家id
+	 */
+	private Integer merchantId;
+
+	/**
+	 * 商家名称
+	 */
+	private String merchantName;
+
+	/**
+	 * 商家头像
+	 */
+	private String merchantAvatar;
+
+	/**
+	 * 好卡置顶:1,默认0
+	 */
+	private Long topSort;
+
+	/**
+	 * 卡类型
+	 */
+	private String cardType;
+
+	/**
+	 * 公示时间
+	 */
+	private Date publicTime;
+
+	/**
+	 * 创建时间
+	 */
+	@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
+	private Date createTime;
+
+	/**
+	 * 备注
+	 */
+	private String remark;
+
+	private Integer delFlag;
+
+	@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
+	private Date delTime;
+
+}

+ 136 - 0
src/main/java/com/poyee/common/service/repo/domain/CardReportDTO.java

@@ -0,0 +1,136 @@
+package com.poyee.common.service.repo.domain;
+
+import cn.easyes.annotation.IndexField;
+import cn.easyes.annotation.IndexName;
+import lombok.AllArgsConstructor;
+import lombok.Data;
+import lombok.NoArgsConstructor;
+
+import java.io.Serializable;
+
+@Data
+@AllArgsConstructor
+@NoArgsConstructor
+@IndexName("app_user_win_card")
+public class CardReportDTO implements Serializable {
+
+	private String wcardteam;
+
+	private String year;
+
+	private String del_time;
+
+	private String num;
+
+	private String ref_code;
+
+	private Integer team_id;
+
+	@IndexField(analyzer = "ik_max_word", searchAnalyzer = "ik_max_word")
+	private String queryname;
+
+	@IndexField(analyzer = "ik_max_word", searchAnalyzer = "ik_max_word")
+	private String dispname;
+
+	private Integer copies;
+
+	private String set_name;
+
+	private String player_name;
+
+	private String id;
+
+	private String app_user_win_card_id;
+
+	@IndexField(analyzer = "ik_max_word", searchAnalyzer = "ik_max_word")
+	private String ref_name;
+
+	private String user_avatar;
+
+	private Integer del_flag;
+
+	private Integer top_sort;
+
+	private String card_number;
+
+	private String create_time;
+
+	private String merchant_name;
+
+	private String sku_id;
+
+	private String card_set;
+
+	private Integer user_id;
+
+	private String img_url;
+
+	private String player_zn;
+
+	private Integer ref_info_id;
+
+	private Integer order_id;
+
+	private Integer status;
+
+	private String no;
+
+	private String wcardseq;
+
+	private String remark;
+
+	private Integer merchant_id;
+
+	private String sold_time;
+
+	private String manufacturer;
+
+	private Integer group_goods_id;
+
+	private Integer player_id;
+
+	private String player_name_zn;
+
+	private String zn_team;
+
+	private String version;
+
+	private String user_nickname;
+
+	private String seq;
+
+	private String player;
+
+	private String team_zn;
+
+	private String sets;
+
+	private String type;
+
+	private String team;
+
+	private String card_type;
+
+	private String wcardsport;
+
+	private String timestamp;
+
+	private String merchant_avatar;
+
+	private String order_list_id;
+
+	private Integer anonymous;
+
+	private String sets_version;
+
+	private Integer goods_type;
+
+	private String public_time;
+
+	private String ref_type;
+
+	private String sport;
+
+	private String groupinfoid;
+
+}

+ 151 - 0
src/main/java/com/poyee/common/service/repo/domain/MerchantInfo.java

@@ -0,0 +1,151 @@
+package com.poyee.common.service.repo.domain;
+
+import com.fasterxml.jackson.annotation.JsonIgnore;
+import lombok.Data;
+import lombok.ToString;
+
+import java.math.BigDecimal;
+
+@Data
+@ToString
+public class MerchantInfo {
+
+	private Integer id;
+
+	// 店铺编码
+	private String code;
+
+	// 店铺名称
+	private String name;
+
+	// 商家(店铺)logo 头像
+	private String avatar;
+
+	// 用户关注状态 : 0 =未关注。1=已关注,2拉黑
+	private Integer followStatus;
+
+	/** 联系人 */
+	@JsonIgnore
+	private String linkname;
+
+	/** 联系方式 */
+	@JsonIgnore
+	private String link;
+
+	/** 收货地址 */
+	private String address;
+
+	/** 详细地址 */
+	private String moreAddress;
+
+	/**
+	 * 状态
+	 */
+	private Long status;
+
+	// 粉丝数量
+	private Integer fans;
+
+	// 销量
+	private Integer saleNum;
+
+	/**
+	 * 是否绑定小程序
+	 */
+	private boolean appletAuth;
+
+	/**
+	 * 是否授权小程序直播
+	 */
+	private boolean appletLivesAuth;
+
+	/**
+	 * 小程序直播角色
+	 */
+	private String appletLivesRole;
+
+	/** 商家配置json信息 */
+	private String propJson;
+
+	/**
+	 * 商家微信号:直播使用
+	 */
+	@JsonIgnore
+	private String anchorWechat;
+
+	// 当前销售的产品(组团)数量
+	private Integer cunt;
+
+	/** 小程序:applet,企业微信:work_wx */
+	@JsonIgnore
+	private String liveType;
+
+	/** 企业微信主播,多个分号隔开; */
+	@JsonIgnore
+	private String workWechatAuth;
+
+	@JsonIgnore
+	private String livingAuthConfig;
+
+	private String mid;
+
+	private String tid;
+
+	/**
+	 * 商品售出数量
+	 */
+	private Integer goodsSoldCount;
+
+	/**
+	 * 商家快递等级 express_level
+	 */
+	@JsonIgnore
+	private String expressLevel;
+
+	private String customerQrcode;
+
+	// 精美卡片最小发货单位
+	private Integer minCardNum;
+
+	private String groupShowImgs;
+
+	private String groupShowName;
+
+	private String showConfigJson;
+
+	private boolean currentMerFlag; // 是否是当前商家:0否 1是
+
+	private Integer userId;
+
+	private String username;
+
+	private String location;
+
+	private String pointType;
+
+	private Integer refundLimitDay;
+
+	private Integer reputationScore;
+
+	/** 是否隐藏库存 */
+	@JsonIgnore
+	private Integer hideStock;
+
+	private boolean hideMerchant;
+
+	// 店铺保证金
+	private BigDecimal amount;
+
+	// shipping_cost_config
+	@JsonIgnore
+	private String shippingCostConfig;
+
+	private Integer merchantGroupId;
+
+	private String mainBusiness;
+
+	public boolean isHideMerchant() {
+		return hideStock != null && hideStock == 1;
+	}
+
+}

+ 14 - 0
src/main/java/com/poyee/common/service/repo/mapper/AppUserWinCardMapper.java

@@ -0,0 +1,14 @@
+package com.poyee.common.service.repo.mapper;
+
+import com.poyee.common.service.repo.domain.CardReportDTO;
+import org.apache.ibatis.annotations.Param;
+
+import java.util.List;
+
+public interface AppUserWinCardMapper {
+
+	public List<CardReportDTO> selectAppUserWinCardList(@Param("list") List<Long> infoIds);
+
+	public List<CardReportDTO> selectAppUserWinCardListAll();
+
+}

+ 16 - 0
src/main/java/com/poyee/common/service/repo/mapper/MerchantApiMapper.java

@@ -0,0 +1,16 @@
+package com.poyee.common.service.repo.mapper;
+
+import com.poyee.common.service.repo.domain.MerchantInfo;
+import org.apache.ibatis.annotations.Param;
+
+import java.math.BigDecimal;
+import java.util.Date;
+import java.util.List;
+
+public interface MerchantApiMapper {
+
+	public MerchantInfo getMerchantInfoById(@Param("id") Integer id);
+
+	List<MerchantInfo> getMerchantInfoByIds(@Param("ids") List<Integer> ids);
+
+}

+ 17 - 0
src/main/java/com/poyee/common/service/service/ICardReportConvert.java

@@ -0,0 +1,17 @@
+package com.poyee.common.service.service;
+
+import com.poyee.common.service.param.CardReportDispDTO;
+import com.poyee.common.service.repo.domain.CardReportDTO;
+import org.springframework.stereotype.Service;
+
+import java.util.List;
+
+public interface ICardReportConvert {
+
+	CardReportDispDTO CardReportToDispDTO(CardReportDTO dto);
+
+	List<CardReportDispDTO> CardReportToDispDTO(List<CardReportDTO> dtos);
+
+	List<String> CardReportToIdList(List<CardReportDTO> dtos);
+
+}

+ 21 - 0
src/main/java/com/poyee/common/service/service/ICardReportForumService.java

@@ -0,0 +1,21 @@
+package com.poyee.common.service.service;
+
+import com.poyee.common.service.param.ForumEntity;
+import com.poyee.common.service.param.ForumEntityDetail;
+import com.poyee.common.service.param.ForumEntityListDto;
+import com.poyee.common.service.param.SyncParam;
+import com.poyee.common.service.repo.domain.CardReportDTO;
+
+import java.util.List;
+
+public interface ICardReportForumService {
+
+	boolean sendCardReportForumData(SyncParam queryParam, List<CardReportDTO> resultList);
+
+	boolean delCardReportForumData(SyncParam queryParam);
+
+	ForumEntityDetail getForumEntity(Integer extid);
+
+	List<ForumEntityDetail> getForumEntitys(List<String> extids);
+
+}

+ 21 - 0
src/main/java/com/poyee/common/service/service/IESSerchService.java

@@ -0,0 +1,21 @@
+package com.poyee.common.service.service;
+
+import cn.easyes.core.biz.EsPageInfo;
+import com.poyee.common.service.repo.domain.CardReportDTO;
+import com.poyee.common.service.param.QueryParam;
+
+public interface IESSerchService {
+
+	EsPageInfo<CardReportDTO> getESData(QueryParam queryParam);
+
+	EsPageInfo<CardReportDTO> searchTermCardReportByName(QueryParam queryParam);
+
+	EsPageInfo<CardReportDTO> searchIKCardReportByName(QueryParam queryParam);
+
+	EsPageInfo<CardReportDTO> searchPhraseCardReportByName(QueryParam queryParam);
+
+	EsPageInfo<CardReportDTO> searchAllCardReportByName(QueryParam queryParam);
+
+	EsPageInfo<CardReportDTO> getESDataWithMerchantID(QueryParam queryParam);
+
+}

+ 16 - 0
src/main/java/com/poyee/common/service/service/IESSyncService.java

@@ -0,0 +1,16 @@
+package com.poyee.common.service.service;
+
+import com.poyee.common.service.param.SyncParam;
+import com.poyee.common.service.repo.domain.CardReportDTO;
+
+import java.util.List;
+
+public interface IESSyncService {
+
+	List<CardReportDTO> syncESData(SyncParam queryParam);
+
+	List<CardReportDTO> syncESDataAll(SyncParam queryParam);
+
+	boolean delESData(SyncParam queryParam);
+
+}

Některé soubory nejsou zobrazeny, neboť je v těchto rozdílových datech změněno mnoho souborů