Просмотр исходного кода

初始化项目:添加基础代码结构

donglang 3 месяцев назад
Сommit
ba29ea781b
100 измененных файлов с 7617 добавлено и 0 удалено
  1. 29 0
      .gitignore
  2. 3 0
      .gitmodules
  3. 164 0
      README.md
  4. BIN
      framework.png
  5. 510 0
      pom.xml
  6. 96 0
      sckw-auth/pom.xml
  7. 18 0
      sckw-auth/src/main/java/com/sckw/auth/AuthApplication.java
  8. 77 0
      sckw-auth/src/main/java/com/sckw/auth/controller/AuthController.java
  9. 20 0
      sckw-auth/src/main/java/com/sckw/auth/model/vo/req/AddEntSettleReqDto.java
  10. 55 0
      sckw-auth/src/main/java/com/sckw/auth/model/vo/req/BusinessLicenseReqVo.java
  11. 125 0
      sckw-auth/src/main/java/com/sckw/auth/model/vo/req/EntAuthenticationReqVo.java
  12. 44 0
      sckw-auth/src/main/java/com/sckw/auth/model/vo/req/ForgetPasswordReqVo.java
  13. 40 0
      sckw-auth/src/main/java/com/sckw/auth/model/vo/req/GetRegisterSmsReqVo.java
  14. 47 0
      sckw-auth/src/main/java/com/sckw/auth/model/vo/req/LoginBase.java
  15. 50 0
      sckw-auth/src/main/java/com/sckw/auth/model/vo/req/LoginReqVo.java
  16. 61 0
      sckw-auth/src/main/java/com/sckw/auth/model/vo/req/RegisterReqVo.java
  17. 44 0
      sckw-auth/src/main/java/com/sckw/auth/model/vo/req/UpdatePasswordReqVo.java
  18. 31 0
      sckw-auth/src/main/java/com/sckw/auth/model/vo/res/DeptInfoResVo.java
  19. 80 0
      sckw-auth/src/main/java/com/sckw/auth/model/vo/res/EntInfoResVo.java
  20. 93 0
      sckw-auth/src/main/java/com/sckw/auth/model/vo/res/LoginResVo.java
  21. 129 0
      sckw-auth/src/main/java/com/sckw/auth/model/vo/res/LoginResVo1.java
  22. 54 0
      sckw-auth/src/main/java/com/sckw/auth/service/IAuthService.java
  23. 642 0
      sckw-auth/src/main/java/com/sckw/auth/service/impl/AuthServiceImpl.java
  24. 45 0
      sckw-auth/src/main/java/com/sckw/auth/util/AsyncFactory.java
  25. 5 0
      sckw-auth/src/main/resources/banner.txt
  26. 24 0
      sckw-auth/src/main/resources/bootstrap-dev.yml
  27. 153 0
      sckw-auth/src/main/resources/bootstrap-lfdc.yml
  28. 129 0
      sckw-auth/src/main/resources/bootstrap-local.yml
  29. 28 0
      sckw-auth/src/main/resources/bootstrap-prod.yml
  30. 29 0
      sckw-auth/src/main/resources/bootstrap-test.yml
  31. 28 0
      sckw-auth/src/main/resources/bootstrap-xcq.yml
  32. 14 0
      sckw-auth/src/main/resources/bootstrap.yml
  33. 154 0
      sckw-auth/src/main/resources/log4j2.xml
  34. 35 0
      sckw-common/pom.xml
  35. 87 0
      sckw-common/sckw-common-bom/pom.xml
  36. 182 0
      sckw-common/sckw-common-core/pom.xml
  37. 23 0
      sckw-common/sckw-common-core/src/main/java/com/sckw/core/annotation/ApiVersion.java
  38. 20 0
      sckw-common/sckw-common-core/src/main/java/com/sckw/core/annotation/Log.java
  39. 26 0
      sckw-common/sckw-common-core/src/main/java/com/sckw/core/annotation/RepeatSubmit.java
  40. 18 0
      sckw-common/sckw-common-core/src/main/java/com/sckw/core/annotation/SckwCloudApplication.java
  41. 23 0
      sckw-common/sckw-common-core/src/main/java/com/sckw/core/annotation/Sensitive.java
  42. 136 0
      sckw-common/sckw-common-core/src/main/java/com/sckw/core/aspect/DaoAspect.java
  43. 80 0
      sckw-common/sckw-common-core/src/main/java/com/sckw/core/aspect/LogAspect.java
  44. 59 0
      sckw-common/sckw-common-core/src/main/java/com/sckw/core/aspect/NoRepeatSubmitAspect.java
  45. 15 0
      sckw-common/sckw-common-core/src/main/java/com/sckw/core/common/enums/EnvConstant.java
  46. 51 0
      sckw-common/sckw-common-core/src/main/java/com/sckw/core/common/enums/StringConstant.java
  47. 67 0
      sckw-common/sckw-common-core/src/main/java/com/sckw/core/common/enums/enums/AliyunOssFileTypeEnum.java
  48. 118 0
      sckw-common/sckw-common-core/src/main/java/com/sckw/core/common/enums/enums/DictEnum.java
  49. 59 0
      sckw-common/sckw-common-core/src/main/java/com/sckw/core/common/enums/enums/DictTypeEnum.java
  50. 56 0
      sckw-common/sckw-common-core/src/main/java/com/sckw/core/common/enums/enums/FileDisposeLayoutEnum.java
  51. 78 0
      sckw-common/sckw-common-core/src/main/java/com/sckw/core/common/enums/enums/FileEnum.java
  52. 25 0
      sckw-common/sckw-common-core/src/main/java/com/sckw/core/config/JacksonConfig.java
  53. 36 0
      sckw-common/sckw-common-core/src/main/java/com/sckw/core/config/MybatisPlusConfig.java
  54. 33 0
      sckw-common/sckw-common-core/src/main/java/com/sckw/core/exception/BusinessException.java
  55. 37 0
      sckw-common/sckw-common-core/src/main/java/com/sckw/core/exception/CustomPromptException.java
  56. 145 0
      sckw-common/sckw-common-core/src/main/java/com/sckw/core/exception/GlobalSystemExceptionHandler.java
  57. 29 0
      sckw-common/sckw-common-core/src/main/java/com/sckw/core/exception/NotLoginException.java
  58. 21 0
      sckw-common/sckw-common-core/src/main/java/com/sckw/core/exception/SourceInitializeException.java
  59. 25 0
      sckw-common/sckw-common-core/src/main/java/com/sckw/core/exception/SystemException.java
  60. 25 0
      sckw-common/sckw-common-core/src/main/java/com/sckw/core/exception/TranslateException.java
  61. 38 0
      sckw-common/sckw-common-core/src/main/java/com/sckw/core/filter/ExceptionFilterConfig.java
  62. 188 0
      sckw-common/sckw-common-core/src/main/java/com/sckw/core/filter/LoginFilter.java
  63. 257 0
      sckw-common/sckw-common-core/src/main/java/com/sckw/core/filter/RequestCheckFilter.java
  64. 134 0
      sckw-common/sckw-common-core/src/main/java/com/sckw/core/filter/RequestCheckInterceptor.java
  65. 69 0
      sckw-common/sckw-common-core/src/main/java/com/sckw/core/model/auth/AbstractLoginUser.java
  66. 39 0
      sckw-common/sckw-common-core/src/main/java/com/sckw/core/model/auth/UserAccessMenuInfo.java
  67. 27 0
      sckw-common/sckw-common-core/src/main/java/com/sckw/core/model/auth/context/AbstractLoginContext.java
  68. 38 0
      sckw-common/sckw-common-core/src/main/java/com/sckw/core/model/auth/context/SignBase.java
  69. 66 0
      sckw-common/sckw-common-core/src/main/java/com/sckw/core/model/base/BaseModel.java
  70. 57 0
      sckw-common/sckw-common-core/src/main/java/com/sckw/core/model/base/IdsList.java
  71. 24 0
      sckw-common/sckw-common-core/src/main/java/com/sckw/core/model/base/TimeBase.java
  72. 40 0
      sckw-common/sckw-common-core/src/main/java/com/sckw/core/model/constant/AopSortConstants.java
  73. 322 0
      sckw-common/sckw-common-core/src/main/java/com/sckw/core/model/constant/Global.java
  74. 73 0
      sckw-common/sckw-common-core/src/main/java/com/sckw/core/model/constant/NumberConstant.java
  75. 40 0
      sckw-common/sckw-common-core/src/main/java/com/sckw/core/model/enums/AddressTypeEnum.java
  76. 58 0
      sckw-common/sckw-common-core/src/main/java/com/sckw/core/model/enums/ApprovalEnum.java
  77. 52 0
      sckw-common/sckw-common-core/src/main/java/com/sckw/core/model/enums/BannerDistrictEnum.java
  78. 246 0
      sckw-common/sckw-common-core/src/main/java/com/sckw/core/model/enums/CarWaybillEnum.java
  79. 164 0
      sckw-common/sckw-common-core/src/main/java/com/sckw/core/model/enums/CarWaybillQueryEnum.java
  80. 45 0
      sckw-common/sckw-common-core/src/main/java/com/sckw/core/model/enums/CertificateTypeEnum.java
  81. 37 0
      sckw-common/sckw-common-core/src/main/java/com/sckw/core/model/enums/ChargingTypeEnum.java
  82. 59 0
      sckw-common/sckw-common-core/src/main/java/com/sckw/core/model/enums/ClientTypeEnum.java
  83. 39 0
      sckw-common/sckw-common-core/src/main/java/com/sckw/core/model/enums/ContractStatusEnum.java
  84. 38 0
      sckw-common/sckw-common-core/src/main/java/com/sckw/core/model/enums/ContractTrackEnum.java
  85. 36 0
      sckw-common/sckw-common-core/src/main/java/com/sckw/core/model/enums/CooperateApplyTypeEnum.java
  86. 44 0
      sckw-common/sckw-common-core/src/main/java/com/sckw/core/model/enums/CooperateStatusEnum.java
  87. 40 0
      sckw-common/sckw-common-core/src/main/java/com/sckw/core/model/enums/CooperateTypeEnum.java
  88. 95 0
      sckw-common/sckw-common-core/src/main/java/com/sckw/core/model/enums/EntTypeEnum.java
  89. 35 0
      sckw-common/sckw-common-core/src/main/java/com/sckw/core/model/enums/EntryTypeEnum.java
  90. 64 0
      sckw-common/sckw-common-core/src/main/java/com/sckw/core/model/enums/GlobalTransactionalEnum.java
  91. 44 0
      sckw-common/sckw-common-core/src/main/java/com/sckw/core/model/enums/LoginMethodEnum.java
  92. 184 0
      sckw-common/sckw-common-core/src/main/java/com/sckw/core/model/enums/LogisticsOrderEnum.java
  93. 36 0
      sckw-common/sckw-common-core/src/main/java/com/sckw/core/model/enums/MenuTypeEnum.java
  94. 62 0
      sckw-common/sckw-common-core/src/main/java/com/sckw/core/model/enums/OrderRuleEnum.java
  95. 68 0
      sckw-common/sckw-common-core/src/main/java/com/sckw/core/model/enums/ProjectStatusEnum.java
  96. 62 0
      sckw-common/sckw-common-core/src/main/java/com/sckw/core/model/enums/RedisOrderGenerateEnum.java
  97. 47 0
      sckw-common/sckw-common-core/src/main/java/com/sckw/core/model/enums/SensitiveStrategy.java
  98. 35 0
      sckw-common/sckw-common-core/src/main/java/com/sckw/core/model/enums/SigningWayEnum.java
  99. 36 0
      sckw-common/sckw-common-core/src/main/java/com/sckw/core/model/enums/SystemTypeEnum.java
  100. 49 0
      sckw-common/sckw-common-core/src/main/java/com/sckw/core/model/enums/TaxRateTypeEnum.java

+ 29 - 0
.gitignore

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

+ 3 - 0
.gitmodules

@@ -0,0 +1,3 @@
+[submodule "sckw-common/sckw-service-platform"]
+	path = sckw-common/sckw-service-platform
+	url = http://git.sckaiwu.cn/17358629955/sckw-service-platform.git

+ 164 - 0
README.md

@@ -0,0 +1,164 @@
+## 平台简介
+
+开物供应链服务平台。
+
+* 采用前后端分离的模式,微服务版本。
+* 后端采用Spring Boot、Spring Cloud & Alibaba。
+* 注册中心、配置中心选型Nacos,权限认证使用Redis。
+* 流量控制框架选型Sentinel,分布式事务选型Seata。
+* 服务之间调用支持openfeign和dubbo。
+* 服务调用链路使用ZipKin,分布式任务调度quartz。
+* 多语言微服务异构使用sidecar,消息驱动服务使用stream。
+*
+
+## 架构图
+
+![framework.png](framework.png)
+
+## 技术栈
+
+| 功能          | 本框架                                                                                                     |
+|-------------|---------------------------------------------------------------------------------------------------------|
+| 前端项目        | 基于vue3 + Element UI                                                                                     
+| *后端项目结构     | 采用插件化 + 扩展包形式 结构解耦 易于扩展                                                                                 |
+| *后端代码风格     | 严格遵守Alibaba规范与项目统一配置的代码格式化                                                                              |
+| *分布式注册/配置中心 | 采用 Alibaba Nacos 源码集成便于调试扩展与二次开发 框架还为其增加了各种监控                                                           |
+| *服务网关       | 采用 SpringCloud Gateway 框架扩展了多种功能例如:内网鉴权、请求体缓存、跨域配置、请求响应日志等                                              |
+| *负载均衡       | 采用 SpringCloud Loadbalancer 扩展支持了开发团队路由 便于多团队开发调试                                                       |
+| *RPC远程调用    | 采用 全新 Apache Dubbo 3.X + OpenFeign                                                                      |
+| *分布式限流熔断    | 采用 Alibaba Sentinel 源码集成便于调试扩展与二次开发 框架还为其增加了各种监控                                                        |
+| *分布式事务      | 采用 Alibaba Seata 源码集成对接了Nacos与各种监控 简化了搭建部署流程                                                            |                                                                        |
+| 权限认证        | 采用 Sa-Token、Jwt 静态使用功能齐全 低耦合 高扩展                                                                        |
+| 权限注解        | 采用 Sa-Token 支持注解 登录校验、角色校验、权限校验、二级认证校验、HttpBasic校验、忽略校验角色与权限校验支持多种条件 如 `AND` `OR` 或 `权限 OR 角色` 等复杂表达式   |
+| *关系数据库      | 使用 MySQL                                                                                                |                                    
+| *缓存数据库      | 支持 Redis 5-7 支持大部分新功能特性 如 分布式限流、分布式队列                                                                   |                                      
+| *Redis客户端   | 采用 Redisson Redis官方推荐 基于Netty的客户端工具支持Redis 90%以上的命令 底层优化规避很多不正确的用法 例如: keys被转换为scan支持单机、哨兵、单主集群、多主集群等模式 |                       |
+| *ORM框架      | 采用 Mybatis-Plus 基于对象几乎不用写SQL全java操作 功能强大插件众多例如多租户插件 分页插件 乐观锁插件等等                                        |
+| *数据分页       | 采用 Mybatis-Plus 分页插件框架对其进行了扩展 对象化分页对象 支持多种方式传参 支持前端多排序 复杂排序                                             |
+| 数据权限        | 采用 Mybatis-Plus 插件 自行分析拼接SQL 无感式过滤只需为Mapper设置好注解条件 支持多种自定义 不限于部门角色                                      |
+| *数据脱敏       | 采用 注解 + jackson 序列化期间脱敏 支持不同模块不同的脱敏条件支持多种策略 如身份证、手机号、地址、邮箱、银行卡等 可自行扩展                                   |
+| 数据加解密       | 采用 注解 + mybatis 拦截器 对存取数据期间自动加解密支持多种策略 如BASE64、AES、RSA、SM2、SM4等                                         |         |
+| *多数据源框架     | 采用 dynamic-datasource 支持世面大部分数据库通过yml配置即可动态管理异构不同种类的数据库 也可通过前端页面添加数据源支持spel表达式从请求头参数等条件切换数据源            |
+| *多数据源事务     | 采用 dynamic-datasource 支持多数据源不同种类的数据库事务回滚                                                                |
+| 数据库连接池      | 采用 HikariCP Spring官方内置连接池 配置简单 以性能与稳定性闻名天下/Druid                                                        |
+| *数据库主键      | 采用 雪花ID 基于时间戳的 有序增长 唯一ID 再也不用为分库分表 数据合并主键冲突重复而发愁                                                        |
+| 服务端与前端消息通信  | 援用现有mqtt                                                                                                |
+| *序列化        | 采用 Jackson Spring官方内置序列化 靠谱!!!                                                                          |
+| *分布式任务调度    | 采用 Xxl-Job 天生支持分布式 统一的管理中心                                                                              |
+| 分布式日志中心     | 采用 ELK 业界成熟解决方案 实时收集所有服务的运行日志 快速发现定位问题                                                                  |
+| 分布式搜索引擎     | 采用 ElasticSearch以 Mybatis-Plus 方式操作 ElasticSearch                                                       |
+| *分布式消息队列    | 采用 SpringCloud-Stream + RabbitMQ                                                                        |
+| *文件存储       | 采用 Minio 分布式文件存储 天生支持多机、多硬盘、多分片、多副本存储支持权限管理 安全可靠 文件可加密存储(采用的aliyun-oss)                                 |
+| *短信         | 使用 spring-cloud-alicloud-sms                                                                            |
+| 短链接         | 购买现成产品                                                                                                  |
+| *接口文档       | 沿用现有接口文档系统                                                                                              |
+| 校验框架        | 采用 Validation 支持注解与工具类校验 注解支持国际化                                                                        |
+| *Excel框架    | 采用 Alibaba EasyExcel 基于插件化框架对其增加了很多功能 例如 自动合并相同内容 自动排列布局 字典翻译等                                          |
+| *工具类框架      | 采用 Hutool、Lombok 上百种工具覆盖90%的使用需求 基于注解自动生成 get set 等简化框架大量代码                                             |
+| 服务监控框架      | 采用 SpringBoot-Admin 基于SpringBoot官方 actuator 探针机制实时监控服务状态 框架还为其扩展了在线日志查看监控                               |
+| 全方位监控报警     | 采用 Prometheus、Grafana 多样化采集 多模板大屏展示 实时报警监控 提供详细的搭建文档                                                    |
+| 链路追踪        | 采用 Apache SkyWalking 还在为请求不知道去哪了 到哪出了问题而烦恼吗用了它即可实时查看请求经过的每一处每一个节点                                       |
+| 部署方式        | 支持 Docker 编排 一键搭建所有环境 让开发人员从此不再为搭建环境而烦恼                                                                 |
+| 国际化         | 基于请求头动态返回不同语种的文本内容 开发难度低 有对应的工具类 支持大部分注解内容国际化                                                           |
+
+## 系统模块
+
+~~~
+sckw-service-platform     
+├── sckw-gateway         				// 网关服务 [10010]
+├── sckw-auth            				// 登录认证中心 [10160]
+├── sckw-modules                                // 业务模块
+│       └── sckw-system                         // 系统基础服务模块 [10030]
+│       └── sckw-message                        // 消息服务 [10040]
+│       └── sckw-file                           // 文件服务 [10050]
+│       └── sckw-manage                         // 企业管理服务 [10060]
+│       └── sckw-product                        // 产品服务 [10070]
+│       └── sckw-fleet                          // 车队服务 [10080]
+│       └── sckw-order                          // 订单服务 [10090]
+│       └── sckw-transport                      // 运输服务 [10100]
+│       └── sckw-contract                       // 合同服务 [10110]
+│       └── sckw-payment                        // 支付服务 [10120]
+│       └── sckw-operation                      // 运营服务 [10130]
+│       └── sckw-report                         // 报表服务 [10140]
+│       └── sckw-task                           // 定时任务服务 [10150]
+│       └── sckw-xxx                            // xxxx服务 [10040]
+├── sckw-modules-api                    // 接口模块
+│       └── sckw-modules-bom                    // modules依赖项
+│       └── sckw-message-api                    // 消息服务接口
+│       └── sckw-system-api                     // 系统基础服务接口
+│       └── sckw-file-api                       // 系统文件服务接口
+├── sckw-common          				// 通用模块
+│       └── sckw-common-bom                     // common依赖项
+│       └── sckw-common-core                    // 核心模块
+│       └── sckw-common-datasource              // 多数据源
+│       └── sckw-common-log                     // 日志记录
+│       └── sckw-common-redis                   // 缓存服务
+│       └── sckw-common-remote                  // 资源包
+│       └── sckw-common-sidecar                 // 多语言微服务异构
+│       └── sckw-common-stream                  // 消息驱动
+│       └── sckw-common-mongo                   // mongodb
+│       └── sckw-common-xxljob                  // 任务调度
+│       └── sckw-common-excel                   // excel导入导出
+│       └── sckw-common-sentinel                // 分布式限流熔断
+│       └── sckw-common-seata                   // 分布式事务
+~~~
+
+## 运行配置
+
+Run/Debug Configurations->Modify options->Add VM options->--add-opens java.base/java.lang=ALL-UNNAMED --add-opens
+java.base/java.lang.reflect=ALL-UNNAMED
+
+## 数据库说明
+
+| 字段名             | 说明       | 表                        | 说明                   |
+|-----------------|----------|--------------------------|----------------------|
+| l_order_id      | 物流订单id   | kwt_logistics_order.id   ||
+| l_order_no      | 物流订单编号   | kwt_logistics_order      ||
+| t_order_id      | 交易订单id   | kwo_trade_order.id       ||
+| t_order_no      | 交易订单编号   | kwo_trade_order          ||
+| w_order_id      | 车辆运单id   | kwt_waybill_order.id     ||
+| w_order_no      | 车辆运单编号   | kwt_waybill_order        ||
+| l_ledger_id     | 物流订单对账id | kwp_ledger_logistics     | 字段名首字母l为logistics的缩写 |
+| t_ledger_id     | 交易订单对账id | kwp_ledger_trade         | 字段名首字母t为trade的缩写     |
+| l_settlement_id | 物流结算单id  | kwp_settlement_logistics ||
+| sl_order_no     | 物流结算单编号  | kwp_settlement_logistics ||
+| t_settlement_id | 交易结算单id  | kwp_settlement_trade     ||
+| st_order_no     | 交易结算单编号  | kwp_settlement_trade     ||
+| w_order_no      | 车辆运单编号   | kwt_waybill_order        ||
+| user_id         | 用户id     | kws_user.id              ||
+| ent_id          | 企业客户id   | kws_enterprise.id        ||
+| goods_id        | 商品id     | kwp_goods.id             ||
+| sku_id          | 商品skuId  | kwp_goods_sku.id         ||
+| driver_id       | 司机id     | kwf_driver.id            ||
+| driver_no       | 司机驾驶证号   | kwf_driver_license       ||
+| fleet_id        | 车队id     | kwf_fleet.id             ||
+| msg_id          | 消息id     | kwm_message.id           ||
+| project_id      | 项目id     | kwo_project.id           ||
+
+## 数据库常用字段
+
+| 字段名        | 字段说明             |
+|------------|------------------|
+| phone      | 手机号              |
+| name       | 名称               |
+| type       | 类型               |
+| code       | 代码               |
+| category   | 分类               |
+| title      | 标题               |
+| content    | 内容               |
+| address    | 地址               |
+| contacts   | 联系人姓名            |
+| path       | 路径               |
+| url        | 地址               |
+| image      | 图片地址             |
+| images     | 多张图片地址,使用英文逗号做分隔 |
+| remark     | 备注               |
+| start_time | 开始时间             |
+| end_time   | 结束时间             |
+| idcard     | 身份证号码            |
+| price      | 价格               |
+| unit       | 单位               |
+| price      | 价格               |
+| lat        | 维度               |
+| lng        | 经度               |
+| status     | 状态               |


+ 510 - 0
pom.xml

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

+ 96 - 0
sckw-auth/pom.xml

@@ -0,0 +1,96 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project xmlns="http://maven.apache.org/POM/4.0.0"
+         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+    <modelVersion>4.0.0</modelVersion>
+    <parent>
+        <groupId>com.sckw</groupId>
+        <artifactId>sckw-service-platform</artifactId>
+        <version>1.0.0</version>
+    </parent>
+
+    <artifactId>sckw-auth</artifactId>
+    <version>1.1.0</version>
+    <description>登录认证中心</description>
+
+    <properties>
+        <maven.compiler.source>17</maven.compiler.source>
+        <maven.compiler.target>17</maven.compiler.target>
+        <maven.compiler.compilerVersion>17</maven.compiler.compilerVersion>
+        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
+        <basic.version>1.0.0</basic.version>
+    </properties>
+
+
+    <dependencies>
+        <!-- 核心模块 -->
+        <dependency>
+            <groupId>com.sckw</groupId>
+            <artifactId>sckw-common-startup</artifactId>
+            <version>${basic.version}</version>
+        </dependency>
+
+        <dependency>
+            <groupId>com.sckw</groupId>
+            <artifactId>sckw-common-core</artifactId>
+            <version>${basic.version}</version>
+        </dependency>
+
+        <dependency>
+            <groupId>com.sckw</groupId>
+            <artifactId>sckw-common-remote</artifactId>
+            <version>${basic.version}</version>
+        </dependency>
+
+        <dependency>
+            <groupId>com.sckw</groupId>
+            <artifactId>sckw-common-redis</artifactId>
+            <version>${basic.version}</version>
+        </dependency>
+
+        <dependency>
+            <groupId>com.sckw</groupId>
+            <artifactId>sckw-system-api</artifactId>
+            <version>${basic.version}</version>
+        </dependency>
+
+        <dependency>
+            <groupId>com.sckw</groupId>
+            <artifactId>sckw-message-api</artifactId>
+            <version>${basic.version}</version>
+        </dependency>
+
+        <dependency>
+            <groupId>com.sckw</groupId>
+            <artifactId>sckw-fleet-api</artifactId>
+            <version>${basic.version}</version>
+        </dependency>
+
+
+
+    </dependencies>
+    <build>
+        <plugins>
+            <plugin>
+                <groupId>org.springframework.boot</groupId>
+                <artifactId>spring-boot-maven-plugin</artifactId>
+                <executions>
+                    <execution>
+                        <goals>
+                            <goal>repackage</goal>
+                        </goals>
+                    </execution>
+                </executions>
+                <configuration>
+                    <excludes>
+                        <exclude>
+                            <groupId>org.projectlombok</groupId>
+                            <artifactId>lombok</artifactId>
+                        </exclude>
+                    </excludes>
+                    <mainClass>com.sckw.auth.AuthApplication</mainClass>
+                </configuration>
+            </plugin>
+        </plugins>
+    </build>
+</project>

+ 18 - 0
sckw-auth/src/main/java/com/sckw/auth/AuthApplication.java

@@ -0,0 +1,18 @@
+package com.sckw.auth;
+
+import com.sckw.remote.annotation.SckwRemoteApplication;
+import com.sckw.startup.annotation.SckwCloudApplication;
+import org.springframework.boot.SpringApplication;
+
+/**
+ * @Author xucaiqin
+ * @date 2023-06-01 15:02:02
+ */
+@SckwRemoteApplication
+@SckwCloudApplication
+public class AuthApplication {
+    public static void main(String[] args) {
+        SpringApplication.run(AuthApplication.class, args);
+    }
+}
+

+ 77 - 0
sckw-auth/src/main/java/com/sckw/auth/controller/AuthController.java

@@ -0,0 +1,77 @@
+package com.sckw.auth.controller;
+
+import com.sckw.auth.model.vo.req.*;
+import com.sckw.auth.service.IAuthService;
+import com.sckw.core.model.enums.LoginMethodEnum;
+import com.sckw.core.web.constant.HttpStatus;
+import com.sckw.core.web.response.HttpResult;
+import jakarta.servlet.http.HttpServletRequest;
+import jakarta.validation.Valid;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.*;
+
+/**
+ * @desc: 用户权限
+ * @author: czh
+ * @date: 2023/6/19
+ */
+@RestController
+@RequestMapping("/auth")
+public class AuthController {
+
+    @Autowired
+    private IAuthService authService;
+
+    /**
+     * @param reqVo 登录入参
+     * @return HttpResult
+     * @desc: 用户登录
+     * @author: czh
+     * @date: 2023/6/16
+     */
+    @PostMapping("/login")
+    public HttpResult login(@Valid @RequestBody LoginReqVo reqVo, HttpServletRequest request) {
+        int systemType = request.getIntHeader("System-Type");
+        String clientType = request.getHeader("Client-Type");
+        String accessSpecial = request.getHeader("Access-Special");
+
+        reqVo.setSystemType(systemType);
+        reqVo.setClientType(clientType);
+
+        LoginBase loginBase = new LoginBase();
+        loginBase.setAccount(reqVo.getAccount());
+        loginBase.setPassword(reqVo.getPassword());
+        loginBase.setCaptcha(reqVo.getCaptcha());
+        loginBase.setSystemType(systemType);
+        loginBase.setClientType(clientType);
+        loginBase.setAccessSpecial(accessSpecial);
+        loginBase.setLoginMethod(LoginMethodEnum.ORDINARY.getValue());
+        return authService.login(loginBase);
+    }
+
+    /**
+     * @return HttpResult
+     * @desc: 根据token获取登录信息
+     * @author: czh
+     * @date: 2023/9/27
+     */
+    @PostMapping("getLoginResByToken")
+    public HttpResult getLoginResByToken(HttpServletRequest request) {
+        String clientType = request.getHeader("Client-Type");
+        String token = request.getHeader("Access-Token");
+        return HttpResult.ok(authService.getLoginResByToken(clientType, token));
+    }
+
+    /**
+     * @param id 主键ID
+     * @desc 重置密码
+     * @author zk
+     * @date 2023/06/02
+     **/
+    @PostMapping("/resetPassword")
+    public HttpResult resetPassword(@RequestParam Long id) {
+        authService.resetPassword(id);
+        return HttpResult.ok(HttpStatus.MSG_001);
+    }
+
+}

+ 20 - 0
sckw-auth/src/main/java/com/sckw/auth/model/vo/req/AddEntSettleReqDto.java

@@ -0,0 +1,20 @@
+package com.sckw.auth.model.vo.req;
+
+import lombok.Data;
+
+import java.io.Serial;
+import java.io.Serializable;
+
+/**
+ * @author czh
+ * @desc 企业入驻入参
+ * @date 2023/6/19
+ */
+@Data
+public class AddEntSettleReqDto implements Serializable {
+
+    @Serial
+    private static final long serialVersionUID = 2272172846219113723L;
+
+
+}

+ 55 - 0
sckw-auth/src/main/java/com/sckw/auth/model/vo/req/BusinessLicenseReqVo.java

@@ -0,0 +1,55 @@
+package com.sckw.auth.model.vo.req;
+
+import lombok.Data;
+
+import java.io.Serial;
+import java.io.Serializable;
+import java.util.Date;
+
+/**
+ * @author czh
+ * @desc 执照
+ * @date 2023/6/19
+ */
+@Data
+public class BusinessLicenseReqVo implements Serializable {
+
+    @Serial
+    private static final long serialVersionUID = 7847247628730819132L;
+
+    /**
+     * 执照记录id,新增时为空
+     */
+    private long id;
+
+    /**
+     * 执照编号
+     */
+    private String code;
+
+    /**
+     * 证书类型 (1联系人身份证 2法人身份证 3营业执照 4道路运输许可证 5开户许可证号 6授权证书 6电子签章授权书)
+     */
+    private int type;
+
+    /**
+     * 证书正面
+     */
+    private String certificateMain;
+
+    /**
+     * 证书反面
+     */
+    private String certificateRevolt;
+
+    /**
+     * 有效期
+     */
+    private Date validity;
+
+    /**
+     * 备注
+     */
+    private String remark;
+
+}

+ 125 - 0
sckw-auth/src/main/java/com/sckw/auth/model/vo/req/EntAuthenticationReqVo.java

@@ -0,0 +1,125 @@
+package com.sckw.auth.model.vo.req;
+
+import lombok.Data;
+
+import java.io.Serial;
+import java.io.Serializable;
+import java.util.List;
+
+/**
+ * @author czh
+ * @desc 企业认证入参
+ * @date 2023/6/19
+ */
+@Data
+public class EntAuthenticationReqVo implements Serializable {
+
+    @Serial
+    private static final long serialVersionUID = -6172558233846847201L;
+
+    /**
+     * 企业id
+     */
+    private Long entId;
+
+    /**
+     * 母公司id(当注册的公司是一家子公司时,entPid必传)
+     */
+    private Long entPid;
+
+    /**
+     * 企业名称
+     */
+    private String firmName;
+
+    /**
+     * 企业编号
+     */
+    private String code;
+
+    /**
+     * 企业联系人
+     */
+    private String contacts;
+
+    /**
+     * 联系电话
+     */
+    private String phone;
+
+    /**
+     * 法人姓名
+     */
+    private String legalName;
+
+    /**
+     * 法人电话
+     */
+    private String legalPhone;
+
+    /**
+     * 企业头像
+     */
+    private String head;
+
+    /**
+     * 企业类型 多个类型用","隔开
+     */
+    private String entTypes;
+
+    /**
+     * 企业级别
+     */
+    private String entLevel;
+
+    /**
+     * 所属一级企业
+     */
+    private String belongFirstEnt;
+
+    /**
+     * 组织机构代码
+     */
+    private String orgCode;
+
+    /**
+     * 企业地址
+     */
+    private String cityCode;
+
+    /**
+     * 详细地址
+     */
+    private String detailAddress;
+
+    /**
+     * 注册来源 (app、pc)
+     */
+    private String regSource;
+
+    /**
+     * 纬度
+     */
+    private String lat;
+
+    /**
+     * 经度
+     */
+    private String lng;
+
+    /**
+     * 专属客户经理(用户ID)
+     */
+    private long manager;
+
+    /**
+     * 备注
+     */
+    private String remark;
+
+    /**
+     * 执照集合
+     */
+    private List<BusinessLicenseReqVo> businessLicense;
+
+}

+ 44 - 0
sckw-auth/src/main/java/com/sckw/auth/model/vo/req/ForgetPasswordReqVo.java

@@ -0,0 +1,44 @@
+package com.sckw.auth.model.vo.req;
+
+import jakarta.validation.constraints.NotBlank;
+import jakarta.validation.constraints.NotNull;
+import lombok.Data;
+
+import java.io.Serial;
+import java.io.Serializable;
+
+/**
+ * @author czh
+ * @desc 忘记密码入参
+ * @date 2023/6/19
+ */
+@Data
+public class ForgetPasswordReqVo implements Serializable {
+
+    @Serial
+    private static final long serialVersionUID = 7390721321970569096L;
+
+    /**
+     * 账号
+     */
+    @NotBlank(message = "账号不能为空")
+    private String account;
+
+    /**
+     * 密码
+     */
+    @NotBlank(message = "密码不能为空")
+    private String password;
+
+    /**
+     * 验证码
+     */
+    @NotBlank(message = "验证码不能为空")
+    private String captcha;
+
+    /**
+     * 系统类型(1运营端、2企业开户)
+     */
+    private int systemType;
+
+}

+ 40 - 0
sckw-auth/src/main/java/com/sckw/auth/model/vo/req/GetRegisterSmsReqVo.java

@@ -0,0 +1,40 @@
+package com.sckw.auth.model.vo.req;
+
+import jakarta.validation.constraints.NotBlank;
+import lombok.Data;
+
+import java.io.Serial;
+import java.io.Serializable;
+
+@Data
+public class GetRegisterSmsReqVo implements Serializable {
+
+    @Serial
+    private static final long serialVersionUID = -6344151610477939870L;
+
+    /**
+     * 企业名称
+     */
+    @NotBlank(message = "企业名称不能为空")
+    private String entName;
+
+    /**
+     * 企业代表人
+     */
+    @NotBlank(message = "企业代表人不能为空")
+    private String name;
+
+    /**
+     * 手机号
+     */
+    @NotBlank(message = "联系电话不能为空")
+    private String phone;
+
+    /**
+     * 系统类型(1运营端、2企业开户)
+     */
+    private Integer systemType;
+
+
+
+}

+ 47 - 0
sckw-auth/src/main/java/com/sckw/auth/model/vo/req/LoginBase.java

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

+ 50 - 0
sckw-auth/src/main/java/com/sckw/auth/model/vo/req/LoginReqVo.java

@@ -0,0 +1,50 @@
+package com.sckw.auth.model.vo.req;
+
+import jakarta.validation.constraints.NotBlank;
+import jakarta.validation.constraints.NotNull;
+import lombok.Data;
+import org.springframework.web.bind.annotation.RequestHeader;
+
+import java.io.Serial;
+import java.io.Serializable;
+
+/**
+ * @author czh
+ * @desc 登录接口入参
+ * @date 2023/6/12
+ */
+@Data
+public class LoginReqVo implements Serializable {
+
+    @Serial
+    private static final long serialVersionUID = -6021472117198868910L;
+
+    /**
+     * 账号
+     */
+    @NotBlank(message = "账号不能为空")
+    private String account;
+
+    /**
+     * 设备类型
+     */
+//    @NotBlank(message = "设备类型不能为空")
+    private String clientType;
+
+    /**
+     * 系统类型
+     */
+//    @NotNull(message = "系统类型不能为空")
+    private Integer systemType;
+
+    /**
+     * 密码
+     */
+    private String password;
+
+    /**
+     * 验证码
+     */
+    private String captcha;
+
+}

+ 61 - 0
sckw-auth/src/main/java/com/sckw/auth/model/vo/req/RegisterReqVo.java

@@ -0,0 +1,61 @@
+package com.sckw.auth.model.vo.req;
+
+import jakarta.validation.constraints.NotBlank;
+import jakarta.validation.constraints.NotNull;
+import lombok.Data;
+
+import java.io.Serial;
+import java.io.Serializable;
+
+/**
+ * @desc: 用户注册入参
+ * @author: czh
+ * @date: 2023/6/16
+ */
+@Data
+public class RegisterReqVo implements Serializable {
+
+    @Serial
+    private static final long serialVersionUID = 2422369748989567136L;
+
+    /**
+     * 企业名称
+     */
+    @NotBlank(message = "企业名称不能为空")
+    private String entName;
+
+    /**
+     * 企业代表人
+     */
+    @NotBlank(message = "企业代表人不能为空")
+    private String name;
+
+    /**
+     * 手机号
+     */
+    @NotBlank(message = "联系电话不能为空")
+    private String phone;
+
+    /**
+     * 系统类型(1运营端、2企业开户)
+     */
+    private Integer systemType;
+
+    /**
+     * 验证码
+     */
+    @NotBlank(message = "验证码不能为空")
+    private String captcha;
+
+    /**
+     * 用户类型  0 普通用户  1管理员
+     */
+    @NotNull(message = "用户类型不能为空")
+    private Integer isMain;
+
+    /**
+     * 密码
+     */
+    private String password;
+
+}

+ 44 - 0
sckw-auth/src/main/java/com/sckw/auth/model/vo/req/UpdatePasswordReqVo.java

@@ -0,0 +1,44 @@
+package com.sckw.auth.model.vo.req;
+
+import jakarta.validation.constraints.NotBlank;
+import jakarta.validation.constraints.NotNull;
+import lombok.Data;
+
+import java.io.Serial;
+import java.io.Serializable;
+
+/**
+ * @author czh
+ * @desc 修改密码
+ * @date 2023/7/3
+ */
+@Data
+public class UpdatePasswordReqVo implements Serializable {
+
+    @Serial
+    private static final long serialVersionUID = -6273651661499793569L;
+
+    /**
+     * 账号
+     */
+    @NotNull(message = "id不能为空")
+    private Long id;
+
+    /**
+     * 旧密码
+     */
+    @NotBlank(message = "密码不能为空")
+    private String password;
+
+    /**
+     * 新密码
+     */
+    @NotBlank(message = "新密码不能为空")
+    private String newPassword;
+
+    /**
+     * 系统类型(1运营端、2企业开户)
+     */
+    private int systemType;
+
+}

+ 31 - 0
sckw-auth/src/main/java/com/sckw/auth/model/vo/res/DeptInfoResVo.java

@@ -0,0 +1,31 @@
+package com.sckw.auth.model.vo.res;
+
+import com.fasterxml.jackson.databind.annotation.JsonSerialize;
+import com.sckw.core.utils.LongToStringUtils;
+import lombok.Data;
+
+/**
+ * @author czh
+ * @desc 机构
+ * @date 2023/6/12
+ */
+@Data
+public class DeptInfoResVo {
+
+    /**
+     * 机构ID
+     */
+    @JsonSerialize(using = LongToStringUtils.class)
+    private long id;
+
+    /**
+     * 机构名称
+     */
+    private String name;
+
+    /**
+     * 是否是公司(0 机构部门/1 公司)
+     */
+    private Integer company;
+
+}

+ 80 - 0
sckw-auth/src/main/java/com/sckw/auth/model/vo/res/EntInfoResVo.java

@@ -0,0 +1,80 @@
+package com.sckw.auth.model.vo.res;
+
+import com.fasterxml.jackson.databind.annotation.JsonSerialize;
+import com.sckw.core.utils.LongToStringUtils;
+import com.sckw.system.api.model.dto.res.EntCertificateResDto;
+import lombok.Data;
+
+import java.util.Date;
+import java.util.List;
+
+/**
+ * @author czh
+ * @desc 企业
+ * @date 2023/6/12
+ */
+@Data
+public class EntInfoResVo {
+
+    /**
+     * 企业id
+     */
+    @JsonSerialize(using = LongToStringUtils.class)
+    private Long id;
+
+    /**
+     * 企业名称
+     */
+    private String firmName;
+
+    /**
+     * 资料审批状态(0未审批、1通过、2未通过、3审批中)
+     */
+    private int approval;
+
+    /**
+     * 注册时间
+     */
+    private Date regTime;
+
+    /**
+     * 是否有效
+     */
+    private Boolean valid;
+
+    /**
+     * 企业联系人
+     */
+    private String contacts;
+
+    /**
+     * 联系电话
+     */
+    private String phone;
+
+    /**
+     * 法人姓名
+     */
+    private String legalName;
+
+    /**
+     * 法人联系电话
+     */
+    private String legalPhone;
+
+    /**
+     * 机构信息
+     */
+    private List<DeptInfoResVo> deptInfo;
+
+    /**
+     * 资质信息
+     */
+    private List<EntCertificateResDto> certificateInfo;
+
+    /**
+     * 企业属性
+     */
+    private String entTypes;
+
+}

+ 93 - 0
sckw-auth/src/main/java/com/sckw/auth/model/vo/res/LoginResVo.java

@@ -0,0 +1,93 @@
+package com.sckw.auth.model.vo.res;
+
+import com.fasterxml.jackson.databind.annotation.JsonSerialize;
+import com.sckw.core.utils.LongToStringUtils;
+import com.sckw.system.api.model.dto.res.KwsRoleResDto;
+import lombok.Data;
+
+import java.io.Serial;
+import java.io.Serializable;
+import java.util.List;
+
+/**
+ * @author czh
+ * @desc 登录返参
+ * @date 2023/6/12
+ */
+@Data
+public class LoginResVo implements Serializable {
+
+    @Serial
+    private static final long serialVersionUID = 8977846403689927853L;
+
+    /**
+     * 会话token
+     */
+    private String token;
+
+    /**
+     * 用户id
+     */
+    @JsonSerialize(using = LongToStringUtils.class)
+    private long id;
+
+    /**
+     * 系统类型(1运营端、2企业开户)
+     */
+    private Integer systemType;
+
+    /**
+     * 账号
+     */
+    private String account;
+
+    /**
+     * 姓名
+     */
+    private String name;
+
+    /**
+     * 电话
+     */
+    private String phone;
+
+    /**
+     * 头像
+     */
+    private String photo;
+
+    /**
+     * 邮箱
+     */
+    private String email;
+
+    /**
+     * 推送设备id
+     */
+    private String clientId;
+
+    /**
+     * 是否是企业管理(0是 1否)
+     */
+    private Integer isMain;
+
+    /**
+     * 设备类型
+     */
+    private String clientType;
+
+    /**
+     * 状态
+     */
+    private Integer status;
+
+    /**
+     * 企业信息
+     */
+    private EntInfoResVo entInfo;
+
+    /**
+     * 角色信息
+     */
+    private List<KwsRoleResDto> roleInfo;
+}

+ 129 - 0
sckw-auth/src/main/java/com/sckw/auth/model/vo/res/LoginResVo1.java

@@ -0,0 +1,129 @@
+package com.sckw.auth.model.vo.res;
+
+import com.fasterxml.jackson.databind.annotation.JsonSerialize;
+import com.sckw.core.utils.LongToStringUtils;
+import com.sckw.system.api.model.dto.res.KwsRoleResDto;
+import lombok.Data;
+
+import java.io.Serial;
+import java.io.Serializable;
+import java.util.Date;
+import java.util.List;
+
+/**
+ * @author zk
+ * @desc TODO
+ * @date 2023/8/10 0010
+ */
+@Data
+public class LoginResVo1 implements Serializable {
+
+    /**
+     * 用户id
+     */
+    @JsonSerialize(using = LongToStringUtils.class)
+    private long id;
+
+    /**
+     * 姓名
+     */
+    private String name;
+
+    /**
+     * 账号
+     */
+    private String account;
+
+    /**
+     * 电话
+     */
+    private String phone;
+
+    /**
+     * 头像
+     */
+    private String photo;
+
+    /**
+     * 角色名称
+     */
+    private String roleName;
+
+    /**
+     * 机构名称
+     */
+    private String deptName;
+
+    /**
+     * 是否是企业管理(0是 1否)
+     */
+    private Integer isMain;
+
+    /**
+     * 状态
+     */
+    private Integer status;
+
+    /**
+     * 企业Id
+     */
+    @JsonSerialize(using = LongToStringUtils.class)
+    private Long entId;
+
+    /**
+     * 企业名称
+     */
+    private String firmName;
+
+    /**
+     * 资料审批状态(0未审批、1通过、2未通过、3审批中)
+     */
+    private Integer approval;
+
+    /**
+     * 是否有效
+     */
+    private Boolean valid;
+
+
+    /**
+     * 企业类型(名称)
+     */
+    private String entTypeNames;
+
+    /**
+     * 企业属性 (1供应商,2采购商,34PL物流,43PL物流)
+     */
+    private String entTypes;
+
+    /**
+     * 推送设备id
+     */
+    private String clientId;
+
+    /**
+     * 设备类型
+     */
+    private String clientType;
+
+    /**
+     * 系统类型(1运营端、2企业开户、3司机端)
+     */
+    private Integer systemType;
+
+    /**
+     * 设备类型
+     */
+    private String token;
+
+    /**
+     * 机构id
+     */
+    private Long deptId;
+
+    /**
+     * 岗位角色id
+     */
+    private Long roleId;
+
+}

+ 54 - 0
sckw-auth/src/main/java/com/sckw/auth/service/IAuthService.java

@@ -0,0 +1,54 @@
+package com.sckw.auth.service;
+
+import com.sckw.auth.model.vo.req.*;
+import com.sckw.auth.model.vo.res.LoginResVo1;
+import com.sckw.core.web.response.HttpResult;
+
+/**
+ * @desc: 登录
+ * @author: czh
+ * @date: 2023/6/19
+ */
+public interface IAuthService {
+
+    /**
+     * @param loginBase {}
+     * @desc 登陆
+     * @author zk
+     * @date 2023/7/26
+     **/
+    HttpResult login(LoginBase loginBase);
+
+
+    /**
+     * @param reqVo 注册入参
+     * @desc: 用户注册
+     * @author: czh
+     * @date: 2023/6/16
+     */
+    void register(RegisterReqVo reqVo);
+
+    /**
+     * @param reqDto 忘记密码入参
+     * @desc: 忘记密码
+     * @author: czh
+     * @date: 2023/6/19
+     */
+    void forgetPassword(ForgetPasswordReqVo reqDto);
+
+    /**
+     * @param id 用户id
+     * @desc: 重置密码
+     * @author: czh
+     * @date: 2023/7/3
+     */
+    void resetPassword(Long id);
+
+    /**
+     * @return LoginResVo1
+     * @desc: 根据token获取登录信息
+     * @author: czh
+     * @date: 2023/9/27
+     */
+    LoginResVo1 getLoginResByToken(String clientType, String token);
+}

+ 642 - 0
sckw-auth/src/main/java/com/sckw/auth/service/impl/AuthServiceImpl.java

@@ -0,0 +1,642 @@
+package com.sckw.auth.service.impl;
+
+import com.alibaba.fastjson.JSON;
+import com.sckw.auth.model.vo.req.ForgetPasswordReqVo;
+import com.sckw.auth.model.vo.req.LoginBase;
+import com.sckw.auth.model.vo.req.RegisterReqVo;
+import com.sckw.auth.model.vo.res.LoginResVo;
+import com.sckw.auth.model.vo.res.LoginResVo1;
+import com.sckw.auth.service.IAuthService;
+import com.sckw.auth.util.AsyncFactory;
+import com.sckw.core.common.enums.enums.DictEnum;
+import com.sckw.core.exception.SystemException;
+import com.sckw.core.model.constant.Global;
+import com.sckw.core.model.constant.NumberConstant;
+import com.sckw.core.model.enums.ClientTypeEnum;
+import com.sckw.core.model.enums.LoginMethodEnum;
+import com.sckw.core.model.enums.SystemTypeEnum;
+import com.sckw.core.utils.*;
+import com.sckw.core.web.constant.HttpStatus;
+import com.sckw.core.web.context.LoginUserHolder;
+import com.sckw.core.web.model.LoginUserInfo;
+import com.sckw.core.web.response.HttpResult;
+import com.sckw.fleet.api.RemoteFleetService;
+import com.sckw.fleet.api.model.vo.RDriverDetailVo;
+import com.sckw.redis.constant.RedisConstant;
+import com.sckw.redis.utils.RedissonUtils;
+import com.sckw.system.api.RemoteSystemService;
+import com.sckw.system.api.RemoteUserService;
+import com.sckw.system.api.model.dto.req.ForgetPasswordReqDto;
+import com.sckw.system.api.model.dto.req.RegisterReqDto;
+import com.sckw.system.api.model.dto.req.UserLoginReqDto;
+import com.sckw.system.api.model.dto.res.*;
+import lombok.extern.slf4j.Slf4j;
+import org.apache.dubbo.config.annotation.DubboReference;
+import org.redisson.api.RSet;
+import org.springframework.stereotype.Service;
+import org.springframework.transaction.annotation.Transactional;
+
+import java.util.*;
+import java.util.stream.Collectors;
+
+/**
+ * @desc: 用户权限实现类
+ * @author: czh
+ * @date: 2023/6/19
+ */
+@Slf4j
+@Service
+public class AuthServiceImpl implements IAuthService {
+
+    @DubboReference(version = "1.0.0", group = "design", check = false)
+    private RemoteUserService remoteUserService;
+
+    @DubboReference(version = "1.0.0", group = "design", check = false)
+    private RemoteSystemService systemService;
+
+    @DubboReference(version = "1.0.0", group = "design", check = false)
+    private RemoteFleetService fleetService;
+
+    @Override
+    public HttpResult login(LoginBase loginBase) {
+        if (StringUtils.isNotBlank(loginBase.getCaptcha())) {
+            loginBase.setLoginMethod(LoginMethodEnum.SMS.getValue());
+        }
+
+        /*参数校验*/
+        HttpResult result = checkParams(loginBase);
+        if (result.getCode() != HttpStatus.SUCCESS_CODE) {
+            return result;
+        }
+
+        /*运营端/企业端登录(PC/APP)*/
+        if (loginBase.getSystemType() == SystemTypeEnum.MANAGE.getCode()
+                || loginBase.getSystemType() == SystemTypeEnum.COMPANY.getCode()) {
+            return this.commonAuth(loginBase);
+        }
+
+        /*司机端*/
+        if (loginBase.getSystemType() == SystemTypeEnum.DRIVER.getCode()) {
+            return this.driverAuth(loginBase);
+        }
+
+        return HttpResult.error(HttpStatus.PARAMETERS_MISSING_CODE, HttpStatus.GLOBAL_EXCEPTION_MESSAGE);
+    }
+
+    @Override
+    @Transactional(rollbackFor = {})
+    public void register(RegisterReqVo reqVo) {
+        /*校验验证码*/
+        String key = StringUtils.format(RedisConstant.MESSAGE_SMS_VERIFY_CODE_VALUE_KEY, DictEnum.SMS_REGISTER.getValue(), reqVo.getPhone());
+        String sms = RedissonUtils.getString(key);
+        if (!reqVo.getCaptcha().equals(sms)) {
+            throw new SystemException(HttpStatus.CODE_10301, HttpStatus.CAPTCHA_ERROR);
+        }
+        RegisterReqDto registerReqDto = new RegisterReqDto();
+        BeanUtils.copyProperties(reqVo, registerReqDto);
+        remoteUserService.register(registerReqDto);
+        RedissonUtils.delete(key);
+    }
+
+    @Override
+    public void forgetPassword(ForgetPasswordReqVo reqDto) {
+        ForgetPasswordReqDto forgetPasswordReqDto = new ForgetPasswordReqDto();
+        BeanUtils.copyProperties(reqDto, forgetPasswordReqDto);
+        remoteUserService.forgetPassword(forgetPasswordReqDto);
+    }
+
+    @Override
+    public void resetPassword(Long id) {
+        remoteUserService.resetPassword(id);
+    }
+
+    /**
+     * @param loginBase {}
+     * @desc 司机账号登陆
+     * @author zk
+     * @date 2023/7/26
+     **/
+    public HttpResult driverAuth(LoginBase loginBase) {
+        /*查询用户信息**/
+        RDriverDetailVo driver = fleetService.findDriverDetai(loginBase.getAccount());
+        /*信息校验**/
+        if (driver == null) {
+            return HttpResult.error(HttpStatus.QUERY_FAIL_CODE, "账号不存在,请检查并重新输入!");
+        }
+        boolean bool = PasswordUtils.validatePassword(loginBase.getAccount() + loginBase.getPassword(), driver.getPassword(), driver.getSalt());
+        if (loginBase.getLoginMethod() == LoginMethodEnum.ORDINARY.getValue() && !bool) {
+            return HttpResult.error(HttpStatus.CODE_10301, "密码不正确,请检查并重新输入!");
+        }
+        if (driver.getStatus() == Global.YES) {
+            return HttpResult.error(HttpStatus.CODE_10301, "您的账号已冻结,如需帮助,请致电平台客服!");
+        }
+
+        //企业信息
+        EntCacheResDto enterprise = systemService.queryEntDetails(driver.getEntId());
+
+        /*生成token**/
+        String token = generateToken(loginBase, driver.getId());
+        if (StringUtils.isBlank(token)) {
+            return HttpResult.error(HttpStatus.CODE_10301, "生成密钥失败,请联系系统管理员!");
+        }
+
+        /*缓存信息**/
+        AsyncFactory.execute(new AsyncProcess(loginBase, null, driver, enterprise, remoteUserService));
+
+        /*数据组装**/
+        LoginResVo1 loginRes = new LoginResVo1();
+        loginRes.setId(driver.getId());
+        loginRes.setName(driver.getName());
+        loginRes.setAccount(loginBase.getAccount());
+        loginRes.setPhone(driver.getPhone());
+        loginRes.setStatus(driver.getStatus());
+        loginRes.setEntId(driver.getEntId());
+        loginRes.setFirmName(enterprise != null ? enterprise.getFirmName() : null);
+        loginRes.setApproval(enterprise != null ? enterprise.getApproval() : null);
+        loginRes.setEntTypeNames(enterprise != null ? enterprise.getEntTypeNames() : null);
+        loginRes.setClientType(loginBase.getClientType());
+        loginRes.setSystemType(loginBase.getSystemType());
+        loginRes.setToken(token);
+        return HttpResult.ok(loginRes);
+    }
+
+    /**
+     * @param loginBase {}
+     * @desc 运营/企业账号登陆
+     * @author zk
+     * @date 2023/7/26
+     **/
+    public HttpResult commonAuth(LoginBase loginBase) {
+        /*查询用户信息**/
+        KwsUserResDto user = systemService.queryUserDetails(loginBase.getAccount(), loginBase.getSystemType());
+
+        /*信息校验**/
+        if (user == null) {
+            return HttpResult.error(HttpStatus.QUERY_FAIL_CODE, "账号不存在,请检查并重新输入!");
+        }
+        boolean bool = PasswordUtils.validatePassword(loginBase.getAccount() + loginBase.getPassword(), user.getPassword(), user.getSalt());
+        if (loginBase.getLoginMethod() == LoginMethodEnum.ORDINARY.getValue() && !bool) {
+            return HttpResult.error(HttpStatus.CODE_10301, "密码不正确,请检查并重新输入!");
+        }
+
+        if (loginBase.getLoginMethod() == LoginMethodEnum.SMS.getValue()) {
+            String key = StringUtils.format(RedisConstant.MESSAGE_SMS_VERIFY_CODE_VALUE_KEY, DictEnum.SMS_LOGIN.getValue(), loginBase.getAccount());
+            String sms = RedissonUtils.getString(key);
+            if (!loginBase.getCaptcha().equals(sms)) {
+                throw new SystemException(HttpStatus.CODE_10301, HttpStatus.CAPTCHA_ERROR);
+            }
+        }
+
+        if (user.getStatus() == Global.YES) {
+            return HttpResult.error(HttpStatus.CODE_10301, "您的账号已冻结,如需帮助,请致电平台客服!");
+        }
+
+        //企业信息
+        EntCacheResDto enterprise = systemService.queryEntDetails(user.getEntId());
+        if (loginBase.getSystemType() == SystemTypeEnum.COMPANY.getCode()) {
+            if (enterprise == null) {
+                return HttpResult.error(HttpStatus.QUERY_FAIL_CODE, "账号没有归属企业,请检查并重新输入!");
+            }
+
+            //校验平台标识码(专场)
+            HttpResult result = checkSpecial(loginBase, enterprise);
+            if (result.getCode() != HttpStatus.SUCCESS_CODE) {
+                return result;
+            }
+        }
+        if (enterprise != null && enterprise.getStatus() == Global.YES) {
+            return HttpResult.error(HttpStatus.QUERY_FAIL_CODE, "企业已冻结,如需帮助,请致电平台客服!");
+        }
+
+
+        /*生成token**/
+        String token = generateToken(loginBase, user.getId());
+        if (StringUtils.isBlank(token)) {
+            return HttpResult.error(HttpStatus.CODE_10301, "生成密钥失败,请联系系统管理员!");
+        }
+
+        /*缓存信息**/
+        AsyncFactory.execute(new AsyncProcess(loginBase, user, null, enterprise, remoteUserService));
+
+        /*数据组装**/
+        LoginResVo1 loginRes = new LoginResVo1();
+        loginRes.setId(user.getId());
+        loginRes.setName(user.getName());
+        loginRes.setAccount(user.getAccount());
+        loginRes.setPhone(user.getPhone());
+        loginRes.setPhoto(user.getPhoto());
+        loginRes.setIsMain(user.getIsMain());
+        loginRes.setStatus(user.getStatus());
+        loginRes.setRoleName(user.getRoleName());
+        loginRes.setDeptName(user.getDeptName());
+        loginRes.setClientId(user.getClientId());
+        loginRes.setEntId(user.getEntId());
+        loginRes.setFirmName(enterprise != null ? enterprise.getFirmName() : null);
+        loginRes.setApproval(enterprise != null ? enterprise.getApproval() : null);
+        loginRes.setEntTypes(enterprise != null ? enterprise.getEntTypes() : null);
+        loginRes.setEntTypeNames(enterprise != null ? enterprise.getEntTypeNames() : null);
+        loginRes.setClientType(loginBase.getClientType());
+        loginRes.setSystemType(user.getSystemType());
+        loginRes.setToken(token);
+        loginRes.setDeptId(user.getDeptId());
+        loginRes.setRoleId(user.getRoleId());
+        if (user.getSystemType().equals(SystemTypeEnum.MANAGE.getCode())) {
+            loginRes.setValid(true);
+        } else {
+            loginRes.setValid(!Objects.isNull(enterprise) && enterprise.getValid());
+        }
+
+        return HttpResult.ok(loginRes);
+    }
+
+    /**
+     * @param params 登录参数
+     * @return 返回结构
+     * @desc 登录参数校验
+     * @author zk
+     * @date 2020/6/14 18:14
+     **/
+    public HttpResult checkParams(LoginBase params) {
+        if (StringUtils.isBlank(params.getSystemType())) {
+            return HttpResult.error(HttpStatus.PARAMETERS_MISSING_CODE, "应用服务类型不能为空!");
+        }
+        if (StringUtils.isBlank(params.getClientType())) {
+            return HttpResult.error(HttpStatus.PARAMETERS_MISSING_CODE, "客户端类型不能为空!");
+        }
+        if (StringUtils.isBlank(params.getAccessSpecial()) && params.getSystemType() != SystemTypeEnum.MANAGE.getCode()) {
+            return HttpResult.error(HttpStatus.PARAMETERS_MISSING_CODE, "平台标识不能为空!");
+        }
+        if (StringUtils.isBlank(params.getAccount())) {
+            return HttpResult.error(HttpStatus.PARAMETERS_MISSING_CODE, "请输入您的账号!");
+        }
+        if (params.getLoginMethod() == LoginMethodEnum.ORDINARY.getValue() && StringUtils.isBlank(params.getPassword())) {
+            return HttpResult.error(HttpStatus.PARAMETERS_MISSING_CODE, "请输入您的密码!");
+        }
+
+        if (params.getLoginMethod() == LoginMethodEnum.SMS.getValue() && !RegularUtils.matchs(RegularUtils.PHONE_REG, params.getAccount())) {
+            return HttpResult.error(HttpStatus.PARAMETERS_PATTERN_ERROR_CODE, "手机号格式不正确,请检查并重新输入!");
+        }
+        if (params.getLoginMethod() == LoginMethodEnum.SMS.getValue() && StringUtils.isBlank(params.getCaptcha())) {
+            return HttpResult.error(HttpStatus.PARAMETERS_MISSING_CODE, "请输入您的验证码!");
+        }
+        String key = StringUtils.format(RedisConstant.MESSAGE_SMS_VERIFY_CODE_VALUE_KEY, DictEnum.SMS_LOGIN.getValue(), params.getAccount());
+
+        RedissonUtils.putString(key, params.getCaptcha(), RedisConstant.SMS_VERIFY_CODE_VALID_TIME);
+        String smsCaptcha = RedissonUtils.getString(key);
+        if (params.getLoginMethod() == LoginMethodEnum.SMS.getValue() && StringUtils.isBlank(smsCaptcha)) {
+            return HttpResult.error(HttpStatus.PARAMETERS_MISSING_CODE, "验证码已过期,请重新获取!");
+        }
+        if (params.getLoginMethod() == LoginMethodEnum.SMS.getValue() && StringUtils.isBlank(smsCaptcha)) {
+            return HttpResult.error(HttpStatus.PARAMETERS_MISSING_CODE, "验证码已过期,请重新获取!");
+        }
+        if (params.getLoginMethod() == LoginMethodEnum.SMS.getValue() && !smsCaptcha.equals(params.getCaptcha())) {
+            return HttpResult.error(HttpStatus.UN_LOGIN_CODE, "验证码不正确,请检查并重新输入!");
+        }
+
+        return HttpResult.ok();
+    }
+
+    /**
+     * @param loginBase 登录参数
+     * @param enterprise 企业信息
+     * @return 返回校验结果
+     * @desc 专场标识码校验
+     * @author zk
+     * @date 2023/12/14
+     **/
+    public HttpResult checkSpecial(LoginBase loginBase, EntCacheResDto enterprise) {
+        /*校验*/
+        //运营端不做校验
+        if (loginBase.getSystemType() == SystemTypeEnum.MANAGE.getCode()) {
+            return HttpResult.ok();
+        }
+        //平台专场集
+        List<SpecialResVo> specialResVos = systemService.querySpecial();
+        //企业所属专场
+        String special = enterprise != null ? enterprise.getSpecial() : null;
+        //用户当前使用平台
+        String accessSpecial = loginBase.getAccessSpecial();
+        //校验是否存在专场数据
+        if (CollectionUtils.isEmpty(specialResVos)) {
+            return HttpResult.error(HttpStatus.PARAMETERS_MISSING_CODE, "系统平台标识码缺失,请联系平台系统管理员确认!");
+        }
+
+        //校验Hearder中标识码是否属于系统平台标识码
+        boolean bool = false;
+        SpecialResVo currentSpecialRes = null;
+        SpecialResVo mainSpecialRes = null;
+        for (SpecialResVo specialResVo:specialResVos) {
+            bool = specialResVo.getCode().equals(accessSpecial) || bool;
+            currentSpecialRes = specialResVo.getCode().equals(accessSpecial) ? specialResVo : currentSpecialRes;
+            mainSpecialRes = specialResVo.getIsMain() == NumberConstant.ONE ? specialResVo : mainSpecialRes;
+        }
+        if (!bool) {
+            return HttpResult.error(HttpStatus.PARAMETERS_MISSING_CODE, "系统平台标识码不正确,请联系平台系统管理员确认!");
+        }
+
+        //校验专场状态
+        if (currentSpecialRes != null && currentSpecialRes.getStatus() == Global.YES) {
+            return HttpResult.error(HttpStatus.PARAMETERS_MISSING_CODE, "您当前使用的平台暂停使用,如有疑问请联系平台系统管理员确认!");
+        }
+
+        //司机端可以登陆所有平台,只对任务数据做隔离
+        if (loginBase.getSystemType() == SystemTypeEnum.DRIVER.getCode()) {
+            return HttpResult.ok();
+        }
+
+        //校验企业非专场时,Hearder中标识码是否为主平台标识码
+        if (StringUtils.isBlank(special) ) {
+            if (currentSpecialRes != null && currentSpecialRes.getIsMain() != NumberConstant.ONE) {
+                String msg = "请进入"+ mainSpecialRes.getName() +",平台网站为"+ mainSpecialRes.getWebsite() +",如有疑问请联系平台系统管理员确认!";
+                return HttpResult.error(HttpStatus.PARAMETERS_MISSING_CODE, msg);
+            }
+        } else {
+            List<String> specials = Arrays.asList(special.split(Global.COMMA));
+            if (!specials.contains(accessSpecial)) {
+                StringBuilder msg = new StringBuilder();
+//                msg.append("请进入");
+                for (String e : specials) {
+                    specialResVos.stream().filter(ee -> {
+                        return e.equals(ee.getCode());
+                    }).map(ee -> "请进入" + ee.getName() + ",平台网站为" + ee.getWebsite() + ",").forEach(msg::append);
+                }
+                msg.append("如有疑问请联系平台系统管理员确认!");
+                return HttpResult.error(HttpStatus.PARAMETERS_MISSING_CODE, msg.toString());
+            }
+
+        }
+        return HttpResult.ok();
+    }
+
+    /**
+     * @return LoginResVo1
+     * @desc: 根据token获取登录信息
+     * @author: czh
+     * @date: 2023/9/27
+     */
+    @Override
+    public LoginResVo1 getLoginResByToken(String clientType, String token) {
+        KwsUserResDto user = systemService.queryUserDetails(LoginUserHolder.getAccount(), LoginUserHolder.getSystemType());
+        if (Objects.isNull(user)) {
+            return null;
+        }
+        EntCacheResDto enterprise = systemService.queryEntDetails(user.getEntId());
+        LoginResVo1 loginRes = new LoginResVo1();
+        loginRes.setId(user.getId());
+        loginRes.setName(user.getName());
+        loginRes.setAccount(user.getAccount());
+        loginRes.setPhone(user.getPhone());
+        loginRes.setPhoto(user.getPhoto());
+        loginRes.setIsMain(user.getIsMain());
+        loginRes.setStatus(user.getStatus());
+        loginRes.setRoleName(user.getRoleName());
+        loginRes.setDeptName(user.getDeptName());
+        loginRes.setClientId(user.getClientId());
+        loginRes.setEntId(user.getEntId());
+        loginRes.setFirmName(enterprise != null ? enterprise.getFirmName() : null);
+        loginRes.setApproval(enterprise != null ? enterprise.getApproval() : null);
+        loginRes.setEntTypes(enterprise != null ? enterprise.getEntTypes() : null);
+        loginRes.setEntTypeNames(enterprise != null ? enterprise.getEntTypeNames() : null);
+        loginRes.setSystemType(user.getSystemType());
+        loginRes.setClientType(clientType);
+        loginRes.setToken(token);
+        loginRes.setDeptId(user.getDeptId());
+        loginRes.setRoleId(user.getRoleId());
+        if (user.getSystemType().equals(SystemTypeEnum.MANAGE.getCode())) {
+            loginRes.setValid(true);
+        } else {
+            loginRes.setValid(!Objects.isNull(enterprise) && enterprise.getValid());
+        }
+        return loginRes;
+    }
+
+    /**
+     * @param loginBase {}
+     * @param userId    用户ID
+     * @desc 生成token
+     * @author zk
+     * @date 2023/8/18
+     **/
+    private String generateToken(LoginBase loginBase, Long userId) {
+        String account = loginBase.getAccount();
+        String clientType = loginBase.getClientType();
+        Integer systemType = loginBase.getSystemType();
+        String special = loginBase.getAccessSpecial();
+        Long timestamp = System.currentTimeMillis();
+        Map<String, Object> info = new HashMap<>(Global.NUMERICAL_SIXTEEN);
+        info.put("userId", userId);
+        info.put("account", account);
+        info.put("clientType", clientType);
+        info.put("systemType", systemType);
+        info.put("special", special);
+        //info.put("timestamp", timestamp);
+        String key = Global.getFullUserTokenKey(clientType, !systemType.equals(SystemTypeEnum.MANAGE.getCode()) ? special : null, userId);
+        String token = EncryUtil.encryV1(Global.PRI_KEY, JSON.toJSONString(info));
+        int expireTime = ClientTypeEnum.expireTime(loginBase.getClientType());
+        RedissonUtils.putString(key, token, expireTime);
+        return token;
+    }
+
+    static class AsyncProcess implements Runnable {
+        private final LoginBase loginBase;
+
+        private final KwsUserResDto user;
+
+        private final RDriverDetailVo driver;
+
+        private final EntCacheResDto enterprise;
+
+        private final RemoteUserService remoteUserService;
+
+        public AsyncProcess(LoginBase loginBase, KwsUserResDto user, RDriverDetailVo driver, EntCacheResDto enterprise,
+                             RemoteUserService remoteUserService) {
+            this.loginBase = loginBase;
+            this.user = user;
+            this.driver = driver;
+            this.enterprise = enterprise;
+            this.remoteUserService = remoteUserService;
+        }
+
+        @Override
+        public void run() {
+            //司机信息
+            saveDriverToCache(loginBase, driver);
+
+            //用户信息
+            saveUserToCache(loginBase, user);
+
+            //企业信息
+            saveEntToCache(enterprise);
+        }
+
+        /**
+         * @param ent 企业信息
+         * @desc: 缓存存企业信息
+         * @author: czh
+         * @date: 2023/7/3
+         */
+        private void saveEntToCache(EntCacheResDto ent) {
+            if (ent == null) {
+                return;
+            }
+            String key = Global.getFullUserEntKey(ent.getId());
+            RedissonUtils.putString(key, JSON.toJSONString(ent), Global.APP_TOKEN_EXPIRE);
+        }
+
+        /**
+         * @param loginBase 登录信息
+         * @param driver    司机信息
+         * @desc: 缓存司机信息
+         * @author: czh
+         * @date: 2023/7/3
+         */
+        private void saveDriverToCache(LoginBase loginBase, RDriverDetailVo driver) {
+            if (driver == null) {
+                return;
+            }
+            //存用户登录信息
+            LoginUserInfo loginUserInfo = new LoginUserInfo();
+            loginUserInfo.setId(driver.getId());
+            loginUserInfo.setSystemType(SystemTypeEnum.DRIVER.getCode());
+            loginUserInfo.setAccount(driver.getPhone());
+            loginUserInfo.setUserName(driver.getName());
+            loginUserInfo.setPhone(driver.getPhone());
+            loginUserInfo.setStatus(driver.getStatus());
+            loginUserInfo.setEntId(enterprise != null ? enterprise.getId() : null);
+            loginUserInfo.setEntName(enterprise != null ? enterprise.getFirmName() : null);
+            loginUserInfo.setClientType(loginBase.getClientType());
+            int expireTime = ClientTypeEnum.expireTime(loginBase.getClientType());
+            String key = Global.getFullUserLoginKey(loginUserInfo.getSystemType(), loginUserInfo.getId());
+            RedissonUtils.putString(key, JSON.toJSONString(loginUserInfo), Global.APP_TOKEN_EXPIRE);
+        }
+
+        /**
+         * @param loginBase 登录信息
+         * @param user      用户信息
+         * @desc: 缓存用户信息
+         * @author: czh
+         * @date: 2023/7/3
+         */
+        private void saveUserToCache(LoginBase loginBase, KwsUserResDto user) {
+            if (user == null) {
+                return;
+            }
+            //存用户登录信息
+            LoginUserInfo loginUserInfo = new LoginUserInfo();
+            loginUserInfo.setId(user.getId());
+            loginUserInfo.setSystemType(loginBase.getSystemType());
+            loginUserInfo.setClientType(loginBase.getClientType());
+            loginUserInfo.setAccount(user.getPhone());
+            loginUserInfo.setUserName(user.getName());
+            loginUserInfo.setPhone(user.getPhone());
+            loginUserInfo.setStatus(user.getStatus());
+            loginUserInfo.setIsMain(user.getIsMain());
+            loginUserInfo.setEntId(user.getEntId());
+            loginUserInfo.setEntName(enterprise != null ? enterprise.getFirmName() : null);
+
+            //普通用户需要填充数据权限
+            if (user.getIsMain().equals(Global.NO)) {
+                loginUserInfo.setAuthUserIdList(remoteUserService.queryAuthUserList(user.getId()));
+            } else {
+                List<FindEntUserResDto> entUser = remoteUserService.findEntUser(user.getEntId());
+                if (CollectionUtils.isNotEmpty(entUser)) {
+                    loginUserInfo.setAuthUserIdList(entUser.stream().map(FindEntUserResDto::getUserId).distinct().toList());
+                }
+            }
+            //客户经理  存储相关联企业id
+            customerManager(loginUserInfo, user, loginBase);
+            int expireTime = ClientTypeEnum.expireTime(loginBase.getClientType());
+            String key = Global.getFullUserLoginKey(loginUserInfo.getSystemType(), loginUserInfo.getId());
+            RedissonUtils.putString(key, JSON.toJSONString(loginUserInfo), Global.APP_TOKEN_EXPIRE);
+
+            //存缓存请求地址
+            saveMenusToCache(user);
+        }
+
+        private void customerManager(LoginUserInfo loginUserInfo, KwsUserResDto user, LoginBase loginBase) {
+            if (SystemTypeEnum.MANAGE.getCode().equals(loginBase.getSystemType())) {
+                List<Long> enterpriseIds = new ArrayList<>();
+                if (user.getIsMain().equals(Global.YES)) {
+                    //获取所有企业id
+                    List<Long> enterpriseIdList = remoteUserService.findAllEnterprise();
+                    if (Objects.nonNull(enterpriseIdList) && enterpriseIdList.size() > 0) {
+                        enterpriseIds.addAll(enterpriseIdList);
+                    }
+                    //获取所有运营端账号关联的企业(客户经理关联的企业)
+                    List<Long> userIds = remoteUserService.selectUserBySystemType(SystemTypeEnum.MANAGE.getCode());
+                    /**带有数据权限*/
+                    List<Long> enterpriseListByIds = remoteUserService.findEnterpriseListByIds(userIds);
+                    if (Objects.nonNull(enterpriseListByIds) && enterpriseListByIds.size() > 0) {
+                        enterpriseIds.addAll(enterpriseListByIds);
+                    }
+                    //无数据权限,运营账号(客户经理关联)关联的企业即可
+//                    enterpriseIds = remoteUserService.findEnterpriseListByUserIds(userIds);
+                } else {
+                    List<Long> serviceEnterpriseIds = remoteUserService.findEnterpriseIds(user.getId());
+                    if (Objects.nonNull(serviceEnterpriseIds) && serviceEnterpriseIds.size() > 0) {
+                        enterpriseIds.addAll(serviceEnterpriseIds);
+                    }
+                }
+                if (enterpriseIds.size() > 0) {
+                    enterpriseIds = enterpriseIds.stream().distinct().collect(Collectors.toList());
+                    String key = Global.getCustomerManagerUserLoginKey(loginUserInfo.getSystemType(), loginUserInfo.getId());
+                    RSet<Object> set = RedissonUtils.getSet(key);
+                    if (CollectionUtils.isNotEmpty(set)){
+                        RedissonUtils.delete(key);
+                    }
+                    RedissonUtils.putSet(key, enterpriseIds);
+                    loginUserInfo.setAuthEntIdList(enterpriseIds);
+                }
+            }
+        }
+
+        /**
+         * @param loginResVo 登录返参
+         * @desc: 存缓存请求地址
+         * @author: czh
+         * @date: 2023/6/28
+         */
+        private void saveMenusToCache(KwsUserResDto loginResVo) {
+            //存权限菜单
+            long id = loginResVo.getId();
+            List<UserAccessMenuInfoResDto> userAccessMenuInfo = remoteUserService.queryUserAccessMenu(id);
+            if (CollectionUtils.isEmpty(userAccessMenuInfo)) {
+                RedissonUtils.delete(Global.REDIS_SYS_MENU_PREFIX + loginResVo.getSystemType() + Global.COLON + id);
+                log.error("未查询到用户{}的菜单权限", id);
+                return;
+            }
+
+            List<String> menus = new ArrayList<>();
+            for (UserAccessMenuInfoResDto userAccessMenuInfoResDto : userAccessMenuInfo) {
+                String links = userAccessMenuInfoResDto.getLinks();
+                if (StringUtils.isNotBlank(links)) {
+                    menus.addAll(Arrays.asList(userAccessMenuInfoResDto.getLinks().split(",")));
+                }
+            }
+            RedissonUtils.putSet(Global.REDIS_SYS_MENU_PREFIX + id, menus);
+        }
+
+        /**
+         * @param loginResVo 登录返参
+         * @desc: 存登录记录信息
+         * @author: czh
+         * @date: 2023/6/28
+         */
+        private void saveLoginInfo(LoginResVo loginResVo) {
+            long userId = loginResVo.getId();
+            UserLoginReqDto currentDayLogin = remoteUserService.currentDayLogin(userId);
+            UserLoginReqDto userLoginReqDto = new UserLoginReqDto();
+            userLoginReqDto.setPid(Objects.isNull(currentDayLogin) ? "" : String.valueOf(currentDayLogin.getId()));
+            userLoginReqDto.setIp("");
+            userLoginReqDto.setUserAgent("");
+            userLoginReqDto.setUserId(loginResVo.getId());
+            userLoginReqDto.setToken(loginResVo.getToken());
+            userLoginReqDto.setValidTime("");
+            userLoginReqDto.setFirst(Objects.isNull(currentDayLogin) ? Global.YES : Global.NO);
+            userLoginReqDto.setLock(Global.NO);
+            userLoginReqDto.setType(Global.NO);
+            userLoginReqDto.setSource(loginResVo.getClientType());
+            remoteUserService.saveUserLogin(userLoginReqDto);
+        }
+    }
+}

+ 45 - 0
sckw-auth/src/main/java/com/sckw/auth/util/AsyncFactory.java

@@ -0,0 +1,45 @@
+package com.sckw.auth.util;
+
+import cn.hutool.core.thread.NamedThreadFactory;
+
+import java.util.concurrent.LinkedBlockingQueue;
+import java.util.concurrent.ThreadPoolExecutor;
+import java.util.concurrent.TimeUnit;
+
+/**
+ * @author czh
+ * @desc 异步工厂
+ * @date 2023/6/19
+ */
+public class AsyncFactory {
+
+    private AsyncFactory() {}
+
+    /**
+     * 全局访问点
+     */
+    public static void execute(Runnable runnable) {
+        ThreadPoolExecutorHolder.THREAD_POOL_EXECUTOR.execute(runnable);
+    }
+
+    /**
+     * 静态内部类创建实例(单例)
+     */
+    private static class ThreadPoolExecutorHolder {
+//        static final int CPU = Runtime.getRuntime().availableProcessors();
+        static final int CORE_POOL_SIZE = 10;
+        static final int MAXIMUM_POOL_SIZE = 15;
+        static final long KEEP_ALIVE_TIME = 1L;
+        static final TimeUnit TIME_UNIT = TimeUnit.SECONDS;
+        static final int MAX_QUEUE_NUM = 1024;
+
+        //static变量只会初始化一次
+        public static final ThreadPoolExecutor THREAD_POOL_EXECUTOR = new ThreadPoolExecutor(
+                CORE_POOL_SIZE, MAXIMUM_POOL_SIZE, KEEP_ALIVE_TIME, TIME_UNIT,
+                new LinkedBlockingQueue<>(MAX_QUEUE_NUM),
+                new NamedThreadFactory("ThreadPoolExecutorFactory-", false),
+                new ThreadPoolExecutor.AbortPolicy());
+    }
+
+
+}

+ 5 - 0
sckw-auth/src/main/resources/banner.txt

@@ -0,0 +1,5 @@
+====================================================================================================================
+
+                    欢迎使用 [sckw-auth] 开物供应链服务平台-登陆授权服务 - Powered By https://www.xxxx.com
+
+====================================================================================================================

+ 24 - 0
sckw-auth/src/main/resources/bootstrap-dev.yml

@@ -0,0 +1,24 @@
+spring:
+  cloud:
+    nacos:
+      discovery:
+        # 服务注册地址
+        server-addr: 10.10.10.230:8848
+        # 命名空间
+        namespace: sckw-service-platform-dev
+        # 共享配置
+        group: sckw-service-platform
+      config:
+        # 配置中心地址
+        server-addr: 10.10.10.230:8848
+        # 配置文件格式
+        file-extension: yaml
+        # 命名空间
+        namespace: sckw-service-platform-dev
+        # 共享配置
+        group: sckw-service-platform
+        #可以读多个配置文件  需要在同一个命名空间下面可以是不同的组
+        extension-configs:
+          - dataId: sckw-common.yml
+            group: sckw-service-platform
+            refresh: true

+ 153 - 0
sckw-auth/src/main/resources/bootstrap-lfdc.yml

@@ -0,0 +1,153 @@
+spring:
+  cloud:
+    nacos:
+      discovery:
+        # 服务注册地址
+        server-addr: 10.10.10.230:8848
+        # 命名空间
+        namespace: sckw_lfdc
+        # 共享配置
+        group: sckw-service-platform
+      config:
+        # 配置中心地址
+        server-addr: 10.10.10.230:8848
+        # 配置文件格式
+        file-extension: yaml
+        # 命名空间
+        namespace: sckw_lfdc
+        # 共享配置
+        group: sckw-service-platform
+        #可以读多个配置文件  需要在同一个命名空间下面可以是不同的组
+        extension-configs:
+          - dataId: sckw-common.yml
+            group: sckw-service-platform
+            refresh: true
+  data:
+    redis:
+      host: 10.10.10.230
+      password: dev
+      port: 6379
+      database: 1
+      timeout: 10000
+#oss上传
+aliyun:
+  oss:
+    endpoint: oss-cn-chengdu.aliyuncs.com
+    accessKeyId: LTAI5tPEbubCGq5Rdwygbz4Q
+    secret: 7mQLWMaBJeZPRV1SRGogctYGXwppjQ
+    bucket: kaiwu-saas
+#直接放行的请求链接
+links: /auth/login,/auth/register,/auth/resetPassword,/auth/updatePassword,/auth/forgetPassword,/auth/auth,/auth/smsAuth
+
+#是否允许一个账号绑定多个角色
+isBindManyRole: 0
+#
+#    sentinel:
+#      transport:
+#        client-ip: ${spring.cloud.client.ip-address} # 获取本机IP地址
+#        port: 8719  #默认8719端口,如果被占用会向上扫描。
+#        #控制台地址
+#        dashboard: 127.0.0.1:19527
+#      log:
+#        #日志路径
+#        dir: logs/sentinel
+#        # 默认将调用链路收敛,导致链路流控效果无效
+#        web-context-unify: false
+#        #持久化nacos配置中
+#      datasource:
+#        #sentinel-rule: # 唯一名称可自定义
+#        #限流
+#        flow:
+#          nacos:
+#            # 设置Nacos的连接地址、命名空间和Group ID
+#            namespace: sckw-service-platform-dev
+#            server-addr: ${spring.cloud.nacos.discovery.server-addr}
+#            # username: ${spring.cloud.nacos.discovery.username}
+#            # password: ${spring.cloud.nacos.discovery.password}
+#            # 设置Nacos中配置文件的命名规则
+#            #            data-id:  ${spring.application.name}-sentinel-flow-rules
+#            data-id: sckw-auth-sentinel-flow-rules
+#            group-id: SENTINEL_GROUP
+#            data-type: json
+#            # 必填的重要字段,指定当前规则类型是"限流"
+#            rule-type: flow
+#        #熔断
+#        degrade:
+#          nacos:
+#            namespace: sckw-service-platform-dev
+#            server-addr: ${spring.cloud.nacos.discovery.server-addr}
+#            #data-id: ${spring.application.name}-sentinel-degrade-rules
+#            data-id: sckw-auth-sentinel-degrade-rules
+#            group-id: SENTINEL_GROUP
+#            #熔断
+#            rule-type: degrade
+#      #取消慢加载
+#      eager: true
+#  data:
+#    redis:
+#      #redis机器ip
+#      host: 127.0.0.1
+#      #redis端口
+#      port: 6379
+#      #redis密码
+#      password:
+#      #数据库
+#      database: 1
+#      #redis超时时间(毫秒),如果不设置,取默认值2000
+#      timeout: 10000
+#      #最大空闲数
+#      maxIdle: 300
+#        #连接池的最大数据库连接数。设为0表示无限制,如果是jedis 2.4以后用redis.maxTotal
+#        #maxActive=600
+#        #控制一个pool可分配多少个jedis实例,用来替换上面的redis.maxActive,如果是jedis 2.4以后用该属性
+#      maxTotal: 1000
+#        #最大建立连接等待时间。如果超过此时间将接到异常。设为-1表示无限制。
+#      maxWaitMillis: 1000
+#        #连接的最小空闲时间 默认1800000毫秒(30分钟)
+#      minEvictableIdleTimeMillis: 300000
+#        #每次释放连接的最大数目,默认3
+#      numTestsPerEvictionRun: 1024
+#        #逐出扫描的时间间隔(毫秒) 如果为负数,则不运行逐出线程, 默认-1
+#      timeBetweenEvictionRunsMillis: 30000
+#        #是否在从池中取出连接前进行检验,如果检验失败,则从池中去除连接并尝试取出另一个
+#      testOnBorrow: true
+#        #在空闲时检查有效性, 默认false
+#      testWhileIdle: true
+#        #连接池最大连接数(如果配置<=0,则没有限制)
+#      jedis:
+#        pool:
+#          max-active: -1
+#  datasource:
+#    dynamic:
+#      primary: master #设置默认的数据源或者数据源组,默认值即为master
+#      strict: false #严格匹配数据源,默认false. true未匹配到指定数据源时抛异常,false使用默认数据源
+#      datasource:
+#        master:
+#          url: jdbc:mysql://10.10.10.230:3306/sckw_system?allowMultiQueries=true&useUnicode=true&characterEncoding=UTF-8&useSSL=false&serverTimezone=GMT%2B8
+#          username: sckw_dev
+#          password: Yy123...
+#          driver-class-name: com.mysql.jdbc.Driver # 3.2.0开始支持SPI可省略此配置
+#        slave_1:
+#          url: jdbc:mysql://10.10.10.230:3306/sckw_system?allowMultiQueries=true&useUnicode=true&characterEncoding=UTF-8&useSSL=false&serverTimezone=GMT%2B8
+#          username: sckw_dev
+#          password: Yy123...
+#          driver-class-name: com.mysql.jdbc.Driver
+#
+#dubbo:
+#  application:
+#    name: auth-dubbo-server
+#    # 该配置在producer-server中是没有的,但是在consumer这里要配置一下
+#    # 如果不配置这个QOS的端口,它会延用dubbo自动生成的端口,在启动的时候,QOS注册就会提示该端口已经被使用的错误
+#    # 虽然启动时有打印端口已经被使用的错误,但是依旧可以正常启动服务,并且dubbo也可以正常调用,但是为了解决启动报错还是加上这个端口
+#    # 这个也是apache官方给出的解决方案,这个端口不能给-1,它不会自动找到一个可用的端口,给-1会报错,端口1-65535自己选择一个
+#    qos-port: 3334
+#  protocol:
+#    name: dubbo
+#    # port为-1表示自动找一个可用的端口
+#    port: -1
+#  registry:
+#    address: nacos://${spring.cloud.nacos.discovery.server-addr}
+#    group: ${spring.cloud.nacos.config.group}
+#    protocol: nacos
+#
+#links: /auth/login,/kwsUser/resetPassword,/kwsUser/updatePassword,/kwsUser/forgetPassword

+ 129 - 0
sckw-auth/src/main/resources/bootstrap-local.yml

@@ -0,0 +1,129 @@
+spring:
+  cloud:
+    nacos:
+      discovery:
+        # 服务注册地址
+        server-addr: 127.0.0.1:8848
+        # 命名空间
+        namespace: sckw-service-platform-dev
+        # 共享配置
+        group: sckw-service-platform
+      config:
+        # 配置中心地址
+        server-addr: 127.0.0.1:8848
+        # 配置文件格式
+        file-extension: yaml
+        # 命名空间
+        namespace: sckw-service-platform-dev
+        # 共享配置
+        group: sckw-service-platform
+#
+#    sentinel:
+#      transport:
+#        client-ip: ${spring.cloud.client.ip-address} # 获取本机IP地址
+#        port: 8719  #默认8719端口,如果被占用会向上扫描。
+#        #控制台地址
+#        dashboard: 127.0.0.1:19527
+#      log:
+#        #日志路径
+#        dir: logs/sentinel
+#        # 默认将调用链路收敛,导致链路流控效果无效
+#        web-context-unify: false
+#        #持久化nacos配置中
+#      datasource:
+#        #sentinel-rule: # 唯一名称可自定义
+#        #限流
+#        flow:
+#          nacos:
+#            # 设置Nacos的连接地址、命名空间和Group ID
+#            namespace: sckw-service-platform-dev
+#            server-addr: ${spring.cloud.nacos.discovery.server-addr}
+#            # username: ${spring.cloud.nacos.discovery.username}
+#            # password: ${spring.cloud.nacos.discovery.password}
+#            # 设置Nacos中配置文件的命名规则
+#            #            data-id:  ${spring.application.name}-sentinel-flow-rules
+#            data-id: sckw-auth-sentinel-flow-rules
+#            group-id: SENTINEL_GROUP
+#            data-type: json
+#            # 必填的重要字段,指定当前规则类型是"限流"
+#            rule-type: flow
+#        #熔断
+#        degrade:
+#          nacos:
+#            namespace: sckw-service-platform-dev
+#            server-addr: ${spring.cloud.nacos.discovery.server-addr}
+#            #data-id: ${spring.application.name}-sentinel-degrade-rules
+#            data-id: sckw-auth-sentinel-degrade-rules
+#            group-id: SENTINEL_GROUP
+#            #熔断
+#            rule-type: degrade
+#      #取消慢加载
+#      eager: true
+#  data:
+#    redis:
+#      #redis机器ip
+#      host: 127.0.0.1
+#      #redis端口
+#      port: 6379
+#      #redis密码
+#      password:
+#      #数据库
+#      database: 1
+#      #redis超时时间(毫秒),如果不设置,取默认值2000
+#      timeout: 10000
+#      #最大空闲数
+#      maxIdle: 300
+#        #连接池的最大数据库连接数。设为0表示无限制,如果是jedis 2.4以后用redis.maxTotal
+#        #maxActive=600
+#        #控制一个pool可分配多少个jedis实例,用来替换上面的redis.maxActive,如果是jedis 2.4以后用该属性
+#      maxTotal: 1000
+#        #最大建立连接等待时间。如果超过此时间将接到异常。设为-1表示无限制。
+#      maxWaitMillis: 1000
+#        #连接的最小空闲时间 默认1800000毫秒(30分钟)
+#      minEvictableIdleTimeMillis: 300000
+#        #每次释放连接的最大数目,默认3
+#      numTestsPerEvictionRun: 1024
+#        #逐出扫描的时间间隔(毫秒) 如果为负数,则不运行逐出线程, 默认-1
+#      timeBetweenEvictionRunsMillis: 30000
+#        #是否在从池中取出连接前进行检验,如果检验失败,则从池中去除连接并尝试取出另一个
+#      testOnBorrow: true
+#        #在空闲时检查有效性, 默认false
+#      testWhileIdle: true
+#        #连接池最大连接数(如果配置<=0,则没有限制)
+#      jedis:
+#        pool:
+#          max-active: -1
+#  datasource:
+#    dynamic:
+#      primary: master #设置默认的数据源或者数据源组,默认值即为master
+#      strict: false #严格匹配数据源,默认false. true未匹配到指定数据源时抛异常,false使用默认数据源
+#      datasource:
+#        master:
+#          url: jdbc:mysql://10.10.10.230:3306/sckw_system?allowMultiQueries=true&useUnicode=true&characterEncoding=UTF-8&useSSL=false&serverTimezone=GMT%2B8
+#          username: sckw_dev
+#          password: Yy123...
+#          driver-class-name: com.mysql.jdbc.Driver # 3.2.0开始支持SPI可省略此配置
+#        slave_1:
+#          url: jdbc:mysql://10.10.10.230:3306/sckw_system?allowMultiQueries=true&useUnicode=true&characterEncoding=UTF-8&useSSL=false&serverTimezone=GMT%2B8
+#          username: sckw_dev
+#          password: Yy123...
+#          driver-class-name: com.mysql.jdbc.Driver
+#
+#dubbo:
+#  application:
+#    name: auth-dubbo-server
+#    # 该配置在producer-server中是没有的,但是在consumer这里要配置一下
+#    # 如果不配置这个QOS的端口,它会延用dubbo自动生成的端口,在启动的时候,QOS注册就会提示该端口已经被使用的错误
+#    # 虽然启动时有打印端口已经被使用的错误,但是依旧可以正常启动服务,并且dubbo也可以正常调用,但是为了解决启动报错还是加上这个端口
+#    # 这个也是apache官方给出的解决方案,这个端口不能给-1,它不会自动找到一个可用的端口,给-1会报错,端口1-65535自己选择一个
+#    qos-port: 3334
+#  protocol:
+#    name: dubbo
+#    # port为-1表示自动找一个可用的端口
+#    port: -1
+#  registry:
+#    address: nacos://${spring.cloud.nacos.discovery.server-addr}
+#    group: ${spring.cloud.nacos.config.group}
+#    protocol: nacos
+#
+#links: /auth/login,/kwsUser/resetPassword,/kwsUser/updatePassword,/kwsUser/forgetPassword

+ 28 - 0
sckw-auth/src/main/resources/bootstrap-prod.yml

@@ -0,0 +1,28 @@
+spring:
+  cloud:
+    nacos:
+      discovery:
+        # 服务注册地址
+        server-addr: @nacos.server@
+        # 命名空间
+        namespace: @nacos.namespace@
+        # 共享配置
+        group: sckw-service-platform
+      config:
+        # 配置中心地址
+        server-addr: @nacos.server@
+        # 命名空间
+        namespace: @nacos.namespace@
+        # 共享配置
+        group: sckw-service-platform
+        # 配置文件格式
+        file-extension: yaml
+        shared-configs:
+          - data-id: sckw-common.yml
+            group: sckw-common
+            refresh: true
+        #可以读多个配置文件 需要在同一个命名空间下面可以是不同的组
+        extension-configs:
+          - dataId: sckw-common.yml
+            group: sckw-service-platform
+            refresh: true

+ 29 - 0
sckw-auth/src/main/resources/bootstrap-test.yml

@@ -0,0 +1,29 @@
+spring:
+  cloud:
+    nacos:
+      discovery:
+        # 服务注册地址
+        server-addr: @nacos.server@
+        # 命名空间
+        namespace: @nacos.namespace@
+        # 共享配置
+        group: sckw-service-platform
+      config:
+        # 配置中心地址
+        server-addr: @nacos.server@
+        # 命名空间
+        namespace: @nacos.namespace@
+        # 共享配置
+        group: sckw-service-platform
+        # 配置文件格式
+        file-extension: yaml
+        shared-configs:
+          - data-id: sckw-common.yml
+            group: sckw-common
+            refresh: true
+
+        #可以读多个配置文件 需要在同一个命名空间下面可以是不同的组
+        extension-configs:
+          - dataId: sckw-common.yml
+            group: sckw-service-platform
+            refresh: true

+ 28 - 0
sckw-auth/src/main/resources/bootstrap-xcq.yml

@@ -0,0 +1,28 @@
+spring:
+  cloud:
+    nacos:
+      discovery:
+        # 服务注册地址
+        server-addr: @nacos.server@
+        # 命名空间
+        namespace: @nacos.namespace@
+        # 共享配置
+        group: sckw-service-platform
+      config:
+        # 配置中心地址
+        server-addr: @nacos.server@
+        # 命名空间
+        namespace: @nacos.namespace@
+        # 共享配置
+        group: sckw-service-platform
+        # 配置文件格式
+        file-extension: yaml
+        shared-configs:
+          - data-id: sckw-common.yml
+            group: sckw-common
+            refresh: true
+        #可以读多个配置文件  需要在同一个命名空间下面可以是不同的组
+        extension-configs:
+          - dataId: sckw-common.yml
+            group: sckw-service-platform
+            refresh: true

+ 14 - 0
sckw-auth/src/main/resources/bootstrap.yml

@@ -0,0 +1,14 @@
+server:
+  port: 10160
+
+spring:
+  application:
+    name: sckw-auth
+  profiles:
+    active: @profiles.active@
+  main:
+    allow-bean-definition-overriding: true
+
+logging:
+  level:
+    root: info

+ 154 - 0
sckw-auth/src/main/resources/log4j2.xml

@@ -0,0 +1,154 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<configuration status="info" monitorInterval="30">
+    <properties>
+        <!-- 格式化输出:%date表示日期,%thread表示线程名,%-5level:级别从左显示5个字符宽度 %msg:日志消息,%n是换行符 -->
+        <!-- %logger{36} 表示 Logger 名字最长36个字符 -->
+        <property name="LOG_PATTERN"
+                  value="%clr{%d{yyyy-MM-dd HH:mm:ss.SSS}}{faint} %clr{%5p} %clr{${sys:PID}}{magenta} %clr{---}{faint} %clr{[%t]}{faint} %clr{%c{1.}}{cyan} %clr{:}{faint} %m%n%xwEx"/>
+        <property name="LOG_WITHOUT_COLOR_PATTERN"
+                  value="%d{yyyy-MM-dd HH:mm:ss.SSS} %5p ${sys:PID}--- [%t] %c{1.} : %m%n%xwEx"/>
+        <property name="LOG_PATH" value="logs/sckw-auth"/>
+    </properties>
+    <!--DEBUG<INFO<WARNING<ERROR<CRITICAL-->
+    <!-- 先定义所有的appender(附加器)-->
+    <appenders>
+        <!-- 输出控制台的配置 -->
+        <Console name="Console" target="SYSTEM_OUT">
+            <!-- 输出日志的格式 -->
+            <PatternLayout pattern="${LOG_PATTERN}"/>
+        </Console>
+
+        <!--all级别日志-->
+        <RollingFile name="allFileAppender"
+                     fileName="${LOG_PATH}/all.log"
+                     filePattern="${LOG_PATH}/$${date:yyyy-MM}/all-%d{yyyy-MM-dd}-%i.log.gz">
+            <PatternLayout pattern="${LOG_WITHOUT_COLOR_PATTERN}"/>
+
+            <Policies>
+                <!-- 设置日志文件切分参数 -->
+                <!--<OnStartupTriggeringPolicy/>-->
+                <!--设置日志基础文件大小,超过该大小就触发日志文件滚动更新-->
+                <SizeBasedTriggeringPolicy size="100 MB"/>
+                <!--设置日志文件滚动更新的时间,依赖于文件命名filePattern的设置-->
+                <TimeBasedTriggeringPolicy/>
+            </Policies>
+            <!--设置日志的文件个数上限,不设置默认为7个,超过大小后会被覆盖;依赖于filePattern中的%i-->
+            <DefaultRolloverStrategy max="100"/>
+        </RollingFile>
+
+        <!--debug级别日志-->
+        <RollingFile name="debugFileAppender"
+                     fileName="${LOG_PATH}/debug.log"
+                     filePattern="${LOG_PATH}/$${date:yyyy-MM}/debug-%d{yyyy-MM-dd}-%i.log.gz">
+            <Filters>
+                <!--过滤掉info及更高级别日志-->
+                <ThresholdFilter level="info" onMatch="DENY" onMismatch="NEUTRAL"/>
+            </Filters>
+            <!--设置日志格式-->
+            <PatternLayout pattern="${LOG_WITHOUT_COLOR_PATTERN}"/>
+
+            <Policies>
+                <!-- 设置日志文件切分参数 -->
+                <!--<OnStartupTriggeringPolicy/>-->
+                <!--设置日志基础文件大小,超过该大小就触发日志文件滚动更新-->
+                <SizeBasedTriggeringPolicy size="100 MB"/>
+                <!--设置日志文件滚动更新的时间,依赖于文件命名filePattern的设置-->
+                <TimeBasedTriggeringPolicy/>
+            </Policies>
+            <!--设置日志的文件个数上限,不设置默认为7个,超过大小后会被覆盖;依赖于filePattern中的%i-->
+            <DefaultRolloverStrategy max="100"/>
+        </RollingFile>
+
+        <!--info级别日志-->
+        <RollingFile name="infoFileAppender"
+                     fileName="${LOG_PATH}/info.log"
+                     filePattern="${LOG_PATH}/$${date:yyyy-MM}/info-%d{yyyy-MM-dd}-%i.log.gz">
+            <Filters>
+                <!--过滤掉warn及更高级别日志-->
+                <ThresholdFilter level="warn" onMatch="DENY" onMismatch="NEUTRAL"/>
+            </Filters>
+            <!--设置日志格式-->
+            <PatternLayout pattern="${LOG_WITHOUT_COLOR_PATTERN}"/>
+
+            <Policies>
+                <!-- 设置日志文件切分参数 -->
+                <!--<OnStartupTriggeringPolicy/>-->
+                <!--设置日志基础文件大小,超过该大小就触发日志文件滚动更新-->
+                <SizeBasedTriggeringPolicy size="100 MB"/>
+                <!--设置日志文件滚动更新的时间,依赖于文件命名filePattern的设置-->
+                <TimeBasedTriggeringPolicy interval="1" modulate="true"/>
+            </Policies>
+            <!--设置日志的文件个数上限,不设置默认为7个,超过大小后会被覆盖;依赖于filePattern中的%i-->
+            <!--<DefaultRolloverStrategy max="100"/>-->
+        </RollingFile>
+
+        <!--warn级别日志-->
+        <RollingFile name="warnFileAppender"
+                     fileName="${LOG_PATH}/warn.log"
+                     filePattern="${LOG_PATH}/$${date:yyyy-MM}/warn-%d{yyyy-MM-dd}-%i.log.gz">
+            <Filters>
+                <!--过滤掉error及更高级别日志-->
+                <ThresholdFilter level="error" onMatch="DENY" onMismatch="NEUTRAL"/>
+            </Filters>
+            <!--设置日志格式-->
+            <PatternLayout pattern="${LOG_WITHOUT_COLOR_PATTERN}"/>
+
+            <Policies>
+                <!-- 设置日志文件切分参数 -->
+                <!--<OnStartupTriggeringPolicy/>-->
+                <!--设置日志基础文件大小,超过该大小就触发日志文件滚动更新-->
+                <SizeBasedTriggeringPolicy size="100 MB"/>
+                <!--设置日志文件滚动更新的时间,依赖于文件命名filePattern的设置-->
+                <TimeBasedTriggeringPolicy/>
+            </Policies>
+            <!--设置日志的文件个数上限,不设置默认为7个,超过大小后会被覆盖;依赖于filePattern中的%i-->
+            <DefaultRolloverStrategy max="100"/>
+        </RollingFile>
+
+        <!--error及更高级别日志-->
+        <RollingFile name="errorFileAppender"
+                     fileName="${LOG_PATH}/error.log"
+                     filePattern="${LOG_PATH}/$${date:yyyy-MM}/error-%d{yyyy-MM-dd}-%i.log.gz">
+            <!--设置日志格式-->
+            <PatternLayout pattern="${LOG_WITHOUT_COLOR_PATTERN}"/>
+            <Policies>
+                <!-- 设置日志文件切分参数 -->
+                <!--<OnStartupTriggeringPolicy/>-->
+                <!--设置日志基础文件大小,超过该大小就触发日志文件滚动更新-->
+                <SizeBasedTriggeringPolicy size="100 MB"/>
+                <!--设置日志文件滚动更新的时间,依赖于文件命名filePattern的设置-->
+                <TimeBasedTriggeringPolicy/>
+            </Policies>
+            <!--设置日志的文件个数上限,不设置默认为7个,超过大小后会被覆盖;依赖于filePattern中的%i-->
+            <DefaultRolloverStrategy max="100"/>
+        </RollingFile>
+
+        <!--json格式error级别日志-->
+        <RollingFile name="errorJsonAppender"
+                     fileName="${LOG_PATH}/error-json.log"
+                     filePattern="${LOG_PATH}/$${date:yyyy-MM}/error-json-%d{yyyy-MM-dd}-%i.log.gz">
+            <JSONLayout compact="true" eventEol="true" locationInfo="true"/>
+            <Policies>
+                <SizeBasedTriggeringPolicy size="100 MB"/>
+                <TimeBasedTriggeringPolicy interval="1" modulate="true"/>
+            </Policies>
+        </RollingFile>
+
+    </appenders>
+
+    <loggers>
+        <root level="debug">
+            <AppenderRef ref="allFileAppender" level="all"/>
+            <AppenderRef ref="debugFileAppender" level="debug"/>
+            <AppenderRef ref="infoFileAppender" level="info"/>
+            <AppenderRef ref="warnFileAppender" level="warn"/>
+            <AppenderRef ref="errorFileAppender" level="error"/>
+            <AppenderRef ref="errorJsonAppender" level="error"/>
+            <appender-ref ref="Console" level="info"/>
+        </root>
+        <Logger name="org.springframework" level="info"/>
+        <Logger name="com.alibaba" level="info"/>
+        <Logger name="com.baomidou" level="info"/>
+    </loggers>
+
+</configuration>

+ 35 - 0
sckw-common/pom.xml

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

+ 87 - 0
sckw-common/sckw-common-bom/pom.xml

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

+ 182 - 0
sckw-common/sckw-common-core/pom.xml

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

+ 15 - 0
sckw-common/sckw-common-core/src/main/java/com/sckw/core/common/enums/EnvConstant.java

@@ -0,0 +1,15 @@
+package com.sckw.core.common.enums;
+
+/**
+ * @desc: 环境常量
+ * @author: yzc
+ * @date: 2023-09-28 17:14
+ */
+public class EnvConstant {
+
+    public static final String LOCAL = "local";
+    public static final String DEV = "dev";
+    public static final String TEST = "test";
+    public static final String PROD = "prod";
+
+}

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

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

+ 67 - 0
sckw-common/sckw-common-core/src/main/java/com/sckw/core/common/enums/enums/AliyunOssFileTypeEnum.java

@@ -0,0 +1,67 @@
+package com.sckw.core.common.enums.enums;
+
+/**
+ * @author lfdc
+ * @version 1.0
+ * @className AliyunOssFileTypeEnum
+ * @description 阿里云文件类型
+ * @company sckw
+ * @date 2023-06-05 13:06:54
+ */
+public enum AliyunOssFileTypeEnum {
+    BMP(".bmp","image/bmp"),
+    GIF(".gif","image/gif"),
+    JPEG(".jpeg","image/jpeg"),
+    JPG(".jpg","image/jpeg"),
+    PNG(".png","image/jpeg"),
+    HTML(".html","text/html"),
+    XML(".xml","text/xml"),
+    TXT(".txt","application/octet-stream"),
+    SQL(".sql","application/octet-stream"),
+    VSD(".vsd","application/vnd.visio"),
+    PDF(".pdf","application/pdf"),
+    PPT(".ppt","application/vnd.ms-powerpoint"),
+    PPTX(".pptx","application/vnd.ms-powerpoint"),
+    DOC(".doc","application/msword"),
+    DOCX(".docx","application/msword"),
+    XLS(".xls","application/vnd.ms-excel"),
+    XLSX(".xlsx","application/vnd.ms-excel"),
+    CSV(".csv","application/vnd.ms-excel");
+
+
+    String code;
+
+
+    String text;
+
+
+    AliyunOssFileTypeEnum() {
+    }
+
+
+    AliyunOssFileTypeEnum(String code, String text) {
+        this.code = code;
+        this.text = text;
+    }
+
+
+    public String getCode() {
+        return code;
+    }
+
+
+    public void setCode(String code) {
+        this.code = code;
+    }
+
+
+    public String getText() {
+        return text;
+    }
+
+
+    public void setText(String text) {
+        this.text = text;
+    }
+
+}

+ 118 - 0
sckw-common/sckw-common-core/src/main/java/com/sckw/core/common/enums/enums/DictEnum.java

@@ -0,0 +1,118 @@
+package com.sckw.core.common.enums.enums;
+
+import lombok.AllArgsConstructor;
+import lombok.Getter;
+
+import java.util.ArrayList;
+import java.util.Comparator;
+import java.util.List;
+import java.util.stream.Collectors;
+
+/**
+ * @author lfdc
+ * @description 枚举字典
+ * @date 2023-07-07 14:07:23
+ */
+@Getter
+@AllArgsConstructor
+public enum DictEnum {
+    /**
+     *
+     */
+    SYSTEM_MSG("msg_category", "SYSTEM", "系统消息"),
+    BUSINESS_MSG("msg_category", "BUSINESS", "业务消息"),
+    SMS_REGISTER("send_sms_type", "register", "短信注册"),
+    SMS_LOGIN("send_sms_type", "login", "短信登录"),
+    SMS_UPDATE_PASSWORD("send_sms_type", "updatePassword", "短信修改密码"),
+    PRICE_TYPE_0("price_type", "0", "元/吨"),
+    PRICE_TYPE_1("price_type", "1", "元/车"),
+    WEIGHT_CAR_0("weight_car", "0", "吨/车"),
+    WEIGHT_CAR_1("weight_car", "1", "公斤/车"),
+    TRANSPORT_TYPE_0("transport_type", "0", "公斤/车"),
+    TRANSPORT_TYPE_1("transport_type", "1", "吨/车"),
+    UNIT_TYPE_0("unit_type","0", "吨"),
+    UNIT_TYPE_1("unit_type","1", "方"),
+    UNIT_TYPE_2("unit_type","2", "箱"),
+    UNIT_TYPE_3("unit_type","3", "件"),
+    UNIT_TYPE_4("unit_type","4", "其他"),
+    TAX_RATE_0("tax_rate","13", "13%"),
+    TAX_RATE_1("tax_rate","11", "11%"),
+    TAX_RATE_2("tax_rate","10", "10%"),
+    TRADE_TYPE_01("trade_type", "11", "预付款-汇付"),
+    TRADE_TYPE_02("trade_type", "12", "预付款-新生"),
+    TRADE_TYPE_03("trade_type", "13", "预付款-中信"),
+    TRADE_TYPE_1("trade_type", "2", "货到付款"),
+    TRADE_TYPE_2("trade_type", "3", "线下付款"),
+    PICKUP_TYPE_0("pickup_type", "0", "供应配送"),
+    PICKUP_TYPE_1("pickup_type", "1", "采方自提"),
+    DELIVERY_TYPE_0("delivery_type", "0", "签发交付"),
+    DELIVERY_TYPE_1("delivery_type", "1", "签收交付"),
+    TORDER_SOURCE_1("tOrder_source", "1", "采购下单"),
+    TORDER_SOURCE_2("tOrder_source", "2", "代客下单"),
+    TORDER_STATUS_0("tOrder_status", "0", "已保存"),
+    TORDER_STATUS_1("tOrder_status", "1", "待受理"),
+    TORDER_STATUS_2("tOrder_status", "2", "已退回"),
+    TORDER_STATUS_3("tOrder_status", "3", "待签约"),
+    TORDER_STATUS_4("tOrder_status", "4", "执行中"),
+    TORDER_STATUS_5("tOrder_status", "5", "已完结"),
+    TORDER_STATUS_6("tOrder_status", "6", "已对账"),
+    TORDER_STATUS_7("tOrder_status", "7", "已结算"),
+    CONTRACT_STATUS_0("contract_status", "1", "待签约"),
+    CONTRACT_STATUS_1("contract_status", "0", "已签约"),
+    SETTLEMENT_CYCLE_0("settlement_cycle", "0", "周结"),
+    SETTLEMENT_CYCLE_1("settlement_cycle", "1", "月结"),
+    SETTLEMENT_CYCLE_2("settlement_cycle", "2", "季结"),
+    SETTLEMENT_CYCLE_3("settlement_cycle", "3", "日结"),
+    SIGNING_TYPE_1("signing_type", "1", "线上签约"),
+    SIGNING_TYPE_2("signing_type", "2", "线下签约"),
+    TORDER_ADDRESS_TYPE_1("tOrder_address_type", "1", "装货地址"),
+    TORDER_ADDRESS_TYPE_2("tOrder_address_type", "2", "卸货地址"),
+    TORDER_UNIT_TYPE_1("tOrder_unit_type", "1", "采购单位"),
+    TORDER_UNIT_TYPE_2("tOrder_unit_type", "2", "销售单位"),
+    ADDRESS_TYPE_0("address_type", "0", "矿山"),
+    INDUSTRY_TYPE_0("industry_type", "0", "砂石"),
+    CLASSIFICATION_TYPE_0("classification_type", "0", "石料"),
+    CATEGORY_TYPE_0("category_type", "0", "山砂"),
+    PRODUCT_NAME_TYPE_0("product_name_type", "0", "毛石"),
+    GOODS_STATUS_0("goods_status", "0", "已保存"),
+    GOODS_STATUS_1("goods_status", "1", "上架中"),
+    GOODS_STATUS_2("goods_status", "2", "已下架"),
+    CHARGING_TYPE_1("charging_type", "1", "按装货量") ,
+    CHARGING_TYPE_2("charging_type", "2", "按卸货量") ,
+    CHARGING_TYPE_3("charging_type", "3", "按车次"),
+    CHARGING_TYPE_4("charging_type", "4", "按线路"),
+    SIGNING_WAY_1("signing_way", "1", "线上签约"),
+    SIGNING_WAY_2("signing_way", "2", "线下签约"),
+    TRANSPORT_DEMAND_STATUS_0("transport_demand_status", "0","已保存"),
+    TRANSPORT_DEMAND_STATUS_1("transport_demand_status", "1","上架中"),
+    TRANSPORT_DEMAND_STATUS_2("transport_demand_status", "2","已下架"),
+    WANT_BUY_STATUS_0("want_buy_status", "0","已保存"),
+    WANT_BUY_STATUS_1("want_buy_status", "1","上架中"),
+    WANT_BUY_STATUS_2("want_buy_status", "2","已下架"),
+    PREPAID_LIMIT_NO("prepaid_limit", "0","否"),
+    PREPAID_LIMIT_YES("prepaid_limit", "1","是"),
+    ;
+
+    private final String type;
+    private final String value;
+    private final String label;
+
+    public static String getLabel(String type, String value) {
+        for (DictEnum dict : DictEnum.values()) {
+            if (dict.getType().equals(type) && dict.getValue().equals(value)) {
+                return dict.getLabel();
+            }
+        }
+        return null;
+    }
+    public static List<DictEnum> getEnumsByType(String type) {
+        List<DictEnum> list = new ArrayList<>();
+        for (DictEnum dict : DictEnum.values()) {
+            if (dict.getType().equals(type) ) {
+                list.add(dict);
+            }
+        }
+        return list.stream().sorted(Comparator.comparing(DictEnum::getValue)).collect(Collectors.toList());
+    }
+
+}

+ 59 - 0
sckw-common/sckw-common-core/src/main/java/com/sckw/core/common/enums/enums/DictTypeEnum.java

@@ -0,0 +1,59 @@
+package com.sckw.core.common.enums.enums;
+
+import lombok.AllArgsConstructor;
+import lombok.Getter;
+
+/**
+ * @desc: 字典类型枚举
+ * @author: yzc
+ * @date: 2023-07-10 16:46
+ */
+@Getter
+@AllArgsConstructor
+public enum DictTypeEnum {
+    MSG_CATEGORY("msg_category", "消息分类"),
+    MSG_STATUS("msg_status", "消息状态"),
+    SEND_SMS_TYPE("send_sms_type", "发送短信类型"),
+    INTEGRAL_TYPE("integral_type", "积分类型"),
+    UNIT_TYPE("unit_type", "商品单位类型"),
+    UNIT_LOSS_TYPE("unit_loss_type", "货物单位与合理损耗单位"),
+    TAX_RATE("tax_rate", "商品税率"),
+    PRICE_TYPE("price_type", "运价方式"),
+    MONETARY_UNIT("monetary_unit", "货币单位"),
+    TRADE_TYPE("trade_type", "支付方式"),
+    PICKUP_TYPE("pickup_type", "提货方式"),
+    DELIVERY_TYPE("delivery_type", "交付类型"),
+    TORDER_SOURCE("tOrder_source", "交易订单来源"),
+    TRANSPORT_TYPE("transport_type", "运输方式"),
+    TORDER_STATUS("tOrder_status", "交易订单状态"),
+    CONTRACT_STATUS("contract_status", "合同状态"),
+    TORDER_ADDRESS_TYPE("tOrder_address_type", "交易订单地址类型"),
+    TORDER_UNIT_TYPE("tOrder_unit_type", "交易订单单位类型"),
+    ADDRESS_TYPE("address_type", "地址类型"),
+    INDUSTRY_TYPE("industry_type", "行业类型"),
+    SETTLEMENT_CYCLE("settlement_cycle", "结算周期"),
+    SIGNING_TYPE("signing_type", "签约方式"),
+    CLASSIFICATION_TYPE("classification_type", "分类类型"),
+    CATEGORY_TYPE("category_type", "类别类型"),
+    PRODUCT_NAME_TYPE("product_name_type", "品名类型"),
+    GOODS_STATUS("goods_status", "商品状态"),
+    CHARGING_TYPE("charging_type", "计费方式") ,
+    COLOR_TYPE("color_type", "车辆颜色"),
+    ENERGY_TYPE("energy_type", "能源类型"),
+    TRUCK_TYPE("truck_type", "车辆类型"),
+    USE_TYPE("use_type", "使用性质"),
+    APPROVED_DRIVING("approved_driving", "准驾车型"),
+    SIGNING_WAY("signing_way", "签约方式"),
+    WEIGHT_CAR("weight_car", "以车的限重"),
+    TAX_RATE_TYPE("tax_rate_type", "合理损耗单位"),
+    TRANSPORT_DEMAND_STATUS("transport_demand_status", "运需状态"),
+    PREPAID_LIMIT("prepaid_limit", "预付限额"),
+    WANT_BUY_STATUS("want_buy_status", "求购状态"),
+    ORDER_SOURCE("order_source", "订单来源"),
+    ;
+
+    private final String type;
+    private final String name;
+
+
+}

+ 56 - 0
sckw-common/sckw-common-core/src/main/java/com/sckw/core/common/enums/enums/FileDisposeLayoutEnum.java

@@ -0,0 +1,56 @@
+package com.sckw.core.common.enums.enums;
+
+/**
+ * @author lfdc
+ * @description 文件格式布局枚举
+ * @date 2023-10-07 09:10:42
+ */
+public enum FileDisposeLayoutEnum {
+
+    /**
+     * ?x-oss-process=image/resize,m_lfit,h_200,w_200
+     *
+     * 图片格式只能是:JPG、PNG、BMP、GIF、WebP、TIFF。
+     */
+
+    /**
+     * oss裁剪比例大小-左
+     */
+    OSS_ABBREVIATE_LEFT(FileEnum.FILE_STORE_TYPE_OSS.getFileType(), "?x-oss-process=image/resize,m_lfit,h_", "OSS设置文件大小"),
+
+    /**
+     * oss裁剪比例大小-右
+     */
+    OSS_ABBREVIATE_RIGHT(FileEnum.FILE_STORE_TYPE_OSS.getFileType(), ",w_", "OSS设置文件大小"),
+    /**
+     * oss按照比例缩放
+     */
+    OSS_LESSEN(FileEnum.FILE_STORE_TYPE_OSS.getFileType(), "?x-oss-process=image/resize,p_", "按百分比缩放"),
+    /**
+     * 七牛云缩略图
+     */
+    KODO_ABBREVIATE(FileEnum.FILE_STORE_TYPE_ALIYUN.getFileType(), "-indexthumb", "缩略图"),
+    ;
+
+    private final String type;
+    private final String parameter;
+    private final String description;
+
+    public String getType() {
+        return type;
+    }
+
+    public String getParameter() {
+        return parameter;
+    }
+
+    public String getDescription() {
+        return description;
+    }
+
+    FileDisposeLayoutEnum(String type, String parameter, String description) {
+        this.type = type;
+        this.parameter = parameter;
+        this.description = description;
+    }
+}

+ 78 - 0
sckw-common/sckw-common-core/src/main/java/com/sckw/core/common/enums/enums/FileEnum.java

@@ -0,0 +1,78 @@
+package com.sckw.core.common.enums.enums;
+/**
+ * @author lfdc
+ * @version 1.0
+ * @className FileEnum
+ * @description 文件上传保存地址
+ * @company sckw
+ * @date 2023-06-02 16:06:43
+ */
+public enum FileEnum {
+
+
+    /**
+     * 本地存储地址
+     */
+    Local_Address("1","/image", "本地上传保存地址"),
+    /**
+     * 用户存储地址
+     */
+    User_Address("2","/user", "用户存储地址"),
+    /**
+     * 企业存储地址
+     */
+    Enterprise_Address("3","/enterprise", "企业存储地址"),
+    /**
+     * 合同存储地址
+     */
+    CONTRACT_ADDRESS("4","/contract", "合同存储地址"),
+    /**
+     * 文件存储地址
+     */
+    DOCUMENT_ADDRESS("5","/excel", "文件存储地址"),
+
+    /**
+     * 文件存储方式-上传oss
+     */
+    FILE_STORE_TYPE_OSS("OSS","OSS","上传OSS"),
+    /**
+     文件存储方式-上传七牛云
+     *
+     */
+    FILE_STORE_TYPE_ALIYUN("kodo","qiniuyun","上传七牛云");
+
+    private final String fileType;
+    private final String fileAddress;
+    private final String fileDescription;
+
+    public String getFileType() {
+        return fileType;
+    }
+
+    public String getFileAddress() {
+        return fileAddress;
+    }
+
+    public String getFileDescription() {
+        return fileDescription;
+    }
+
+    FileEnum(String fileType, String fileAddress, String fileDescription) {
+        this.fileType = fileType;
+        this.fileAddress = fileAddress;
+        this.fileDescription = fileDescription;
+    }
+
+
+
+
+    public static String getValue(String fileType) {
+        for (FileEnum ele : FileEnum.values()) {
+            if (ele.getFileType().equals(fileType)) {
+                return ele.getFileAddress();
+            }
+        }
+        return null;
+    }
+
+}

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

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

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

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

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

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

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

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

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

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

+ 29 - 0
sckw-common/sckw-common-core/src/main/java/com/sckw/core/exception/NotLoginException.java

@@ -0,0 +1,29 @@
+package com.sckw.core.exception;
+
+import lombok.Getter;
+
+/**
+ * @Author yzc
+ * @Description 未登陆异常
+ * @createTime 2023年06月08日 10:05:00
+ */
+@Getter
+public class NotLoginException extends  RuntimeException {
+
+    /**
+     * 异常信息
+    **/
+    private String msg;
+    private Object[] param;
+
+    public NotLoginException(String msg) {
+        super(msg);
+        this.msg = msg;
+    }
+    public NotLoginException(String msg, Object... param){
+        super(msg);
+        this.msg = msg;
+        this.param=param;
+    }
+
+}

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

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

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

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

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

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

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

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

+ 188 - 0
sckw-common/sckw-common-core/src/main/java/com/sckw/core/filter/LoginFilter.java

@@ -0,0 +1,188 @@
+package com.sckw.core.filter;
+
+import com.alibaba.fastjson.JSON;
+import com.alibaba.fastjson.JSONObject;
+import com.sckw.core.model.enums.SystemTypeEnum;
+import com.sckw.core.web.config.CustomConfig;
+import com.sckw.core.exception.SystemException;
+import com.sckw.core.model.constant.Global;
+import com.sckw.core.utils.EncryUtil;
+import com.sckw.core.utils.StringUtils;
+import com.sckw.core.web.constant.HttpStatus;
+import com.sckw.core.web.constant.RequestConstant;
+import com.sckw.core.web.context.LoginUserHolder;
+import com.sckw.core.web.model.LoginEntInfo;
+import com.sckw.core.web.model.LoginUserInfo;
+import com.sckw.redis.utils.RedissonUtils;
+import jakarta.annotation.PostConstruct;
+import jakarta.servlet.*;
+import jakarta.servlet.http.HttpServletRequest;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Component;
+
+import java.io.IOException;
+import java.util.*;
+
+/**
+ * @desc: 登录过滤
+ * @author: czh
+ * @date: 2023/6/14
+ */
+@Component
+public class LoginFilter implements Filter {
+
+    private static final List<String> EXCLUDEPATH = new ArrayList<>();
+
+    @Autowired
+    CustomConfig customConfig;
+
+    /**
+     * @desc: 初始化放行路径
+     * @author: czh
+     */
+    @PostConstruct
+    private void initExcludePath() {
+        String links = customConfig.getLinks();
+        if (StringUtils.isNotBlank(links)) {
+            EXCLUDEPATH.addAll(Arrays.asList(links.split(",")));
+        }
+    }
+
+
+    /**
+     * @desc: 1、不需要token的请求直接放行
+     * 2、取token,校验
+     * 3、token校验没问题,判断当前用户角色 平台管理员直接放行
+     * 4、校验菜单权限,管理员不用校验,普通用户需要
+     * 4、菜单权限没问题,校验企业资质是否过期
+     * @author: czh
+     * @date: 2023/6/29
+     */
+    @Override
+    public void doFilter(ServletRequest servletRequest, ServletResponse servletResponse, FilterChain filterChain) throws ServletException, IOException, SystemException{
+
+        HttpServletRequest request = (HttpServletRequest) servletRequest;
+        String requestUri = request.getRequestURI();
+        /*1、不用token的接口直接放行*/
+        if (EXCLUDEPATH.contains(requestUri)) {
+            filterChain.doFilter(servletRequest, servletResponse);
+            return;
+        }
+
+        /*2、校验token有效性*/
+        //token解析后为用户id
+        String token = request.getHeader(RequestConstant.TOKEN);
+        if (StringUtils.isBlank(token)) {
+            throw new SystemException(HttpStatus.TOKEN_INVALID_CODE, HttpStatus.TOKEN_MISSING);
+        }
+
+        String key;
+        try {
+            key = EncryUtil.descry(Global.PRI_KEY, token);
+        } catch (Exception e) {
+            throw new SystemException(HttpStatus.TOKEN_INVALID_CODE, HttpStatus.TOKEN_ERROR);
+        }
+
+        //从redis获取用户信息
+        String clientType = request.getHeader(RequestConstant.CLIENT_TYPE);
+        String systemType = request.getHeader(RequestConstant.SYSTEM_TYPE);
+        String userInfo = RedissonUtils.getString(Global.getFullUserLoginKey(Integer.parseInt(systemType), Long.parseLong(key), clientType));
+        if (StringUtils.isBlank(userInfo)) {
+            throw new SystemException(HttpStatus.TOKEN_INVALID_CODE, HttpStatus.UN_LOGIN_MESSAGE);
+        }
+
+        //将redis里的用户信息存入内存中,避免业务操作多次从redis获取值*/
+        LoginUserInfo loginUserInfo = JSONObject.parseObject(userInfo, LoginUserInfo.class);
+        LoginUserHolder.set(loginUserInfo);
+        //暂时这样写一下,有的接口需要给LoginUserHolder赋值
+        if ("/kwsMenu/findMenuTree".equals(requestUri) || "/kwsDept/findDeptTree".equals(requestUri)) {
+            RedissonUtils.putString(Global.getFullUserLoginKey(Integer.parseInt(systemType), Long.parseLong(key), clientType), JSON.toJSONString(loginUserInfo), Global.PC_TOKEN_EXPIRE);
+            filterChain.doFilter(servletRequest, servletResponse);
+            LoginUserHolder.remove();
+            return;
+        }
+
+        /*3、平台管理员直接放行*/
+        if (loginUserInfo.getIsMain() == Global.YES && Integer.parseInt(systemType) == SystemTypeEnum.MANAGE.getCode()) {
+            RedissonUtils.putString(Global.getFullUserLoginKey(Integer.parseInt(systemType), Long.parseLong(key), clientType), JSON.toJSONString(loginUserInfo), Global.PC_TOKEN_EXPIRE);
+            filterChain.doFilter(servletRequest, servletResponse);
+            LoginUserHolder.remove();
+            return;
+        }
+
+        //管理员不限制权限,按钮有权限才放行
+        if (loginUserInfo.getIsMain() != Global.YES && !checkMenu(systemType + Global.COLON + key, requestUri)) {
+            LoginUserHolder.remove();
+            throw new SystemException(HttpStatus.AUTHORITY_NO_CODE, HttpStatus.ACCESS_FIAL);
+        }
+
+        /*4、企业信息等校验*/
+        //特殊处理,认证接口不校验资质
+        if (!"/kwsEnt/register".equals(requestUri)) {
+            checkEntInfo(loginUserInfo);
+        }
+
+        RedissonUtils.putString(Global.getFullUserLoginKey(Integer.parseInt(systemType), Long.parseLong(key), clientType), JSON.toJSONString(loginUserInfo), Global.PC_TOKEN_EXPIRE);
+        filterChain.doFilter(servletRequest, servletResponse);
+        LoginUserHolder.remove();
+    }
+
+    /**
+     * @param loginUserInfo 登录信息
+     *                      产品(孙平逸夫)要求,只要第一次审批通过了,之后资质过期、重新审批背驳回,也不影响权限,不控制
+     * @desc: 企业校验
+     * @author: czh
+     * @date: 2023/6/29
+     */
+    private static void checkEntInfo(LoginUserInfo loginUserInfo) {
+        /*4、如果企业资质有效期已过,企业普通用户和管理员均不能访问*/
+        Long entId = loginUserInfo.getEntId();
+        String enterpriseInfo = RedissonUtils.getString(Global.REDIS_ENTERPRISE_PREFIX + entId);
+        //正常不存在企业等信息为空还能走到这里的请求,因为只能访问放开的权限,如果有恶意请求,这里会过滤
+        if (StringUtils.isBlank(enterpriseInfo)) {
+            LoginUserHolder.remove();
+            throw new SystemException(HttpStatus.CODE_60603, HttpStatus.ENT_NOT_EXISTS);
+        }
+
+        //企业资料审批状态校验
+        LoginEntInfo loginEntInfo = JSON.parseObject(enterpriseInfo, LoginEntInfo.class);
+        if (!loginEntInfo.getValid()) {
+            LoginUserHolder.remove();
+            throw new SystemException(HttpStatus.CODE_60603, HttpStatus.ENTCERTIFICATES_INVAILD);
+        }
+        RedissonUtils.putString(Global.REDIS_ENTERPRISE_PREFIX + entId, enterpriseInfo, Global.PC_TOKEN_EXPIRE);
+//        int approval = loginEntInfo.getApproval();
+//        if (approval == ApprovalEnum.NO.getCode() || approval == ApprovalEnum.PROCESS.getCode() || approval == ApprovalEnum.PASS.getCode()) {
+//            LoginUserHolder.remove();
+//            throw new SystemException(HttpStatus.AUTHORITY_NO_CODE, HttpStatus.ACCESS_FIAL);
+//        }
+//
+//        List<EntCertificateInfo> certificateInfoList = loginEntInfo.getCertificateInfo();
+//        if (CollectionUtils.isEmpty(certificateInfoList)) {
+//            LoginUserHolder.remove();
+//            throw new SystemException(HttpStatus.AUTHORITY_NO_CODE, HttpStatus.ACCESS_FIAL);
+//        }
+//
+//        //有效期检验
+//        for (EntCertificateInfo entCertificateInfo : certificateInfoList){
+//            Date expireTime = entCertificateInfo.getExpireTime();
+//            if (DateUtil.compare(new Date(), expireTime) > 0) {
+//                LoginUserHolder.remove();
+//                throw new SystemException(HttpStatus.AUTHORITY_NO_CODE, HttpStatus.ACCESS_FIAL);
+//            }
+//        }
+    }
+
+    /**
+     * @param key 用户菜单权限key  url 当前请求url
+     * @return boolean
+     * @desc: 校验url权限
+     * @author: czh
+     * @date: 2023/6/28
+     */
+    private boolean checkMenu(String key, String url) {
+        return RedissonUtils.contains(Global.REDIS_SYS_MENU_PREFIX + key, url);
+    }
+
+
+}

+ 257 - 0
sckw-common/sckw-common-core/src/main/java/com/sckw/core/filter/RequestCheckFilter.java

@@ -0,0 +1,257 @@
+package com.sckw.core.filter;
+
+import com.alibaba.fastjson.JSON;
+import com.alibaba.fastjson2.JSONObject;
+import com.sckw.core.model.constant.Global;
+import com.sckw.core.model.enums.ClientTypeEnum;
+import com.sckw.core.model.enums.SystemTypeEnum;
+import com.sckw.core.utils.CollectionUtils;
+import com.sckw.core.utils.EncryUtil;
+import com.sckw.core.utils.NumberUtils;
+import com.sckw.core.utils.StringUtils;
+import com.sckw.core.web.config.CustomConfig;
+import com.sckw.core.web.constant.HttpStatus;
+import com.sckw.core.web.constant.RequestConstant;
+import com.sckw.core.web.context.LoginEntHolder;
+import com.sckw.core.web.context.LoginUserHolder;
+import com.sckw.core.web.model.LoginEntInfo;
+import com.sckw.core.web.model.LoginUserInfo;
+import com.sckw.core.web.response.HttpResult;
+import com.sckw.core.web.response.ResponseUtil;
+import com.sckw.redis.utils.RedissonUtils;
+import jakarta.annotation.PostConstruct;
+import jakarta.servlet.*;
+import jakarta.servlet.http.HttpServletRequest;
+import jakarta.servlet.http.HttpServletResponse;
+import org.redisson.api.RSet;
+import org.springframework.beans.factory.annotation.Autowired;
+
+import java.io.IOException;
+import java.util.*;
+
+/**
+ * @desc: 登录过滤
+ * @author: czh
+ * @date: 2023/6/14
+ */
+public class RequestCheckFilter implements Filter {
+
+    @Autowired
+    CustomConfig customConfig;
+
+    /**
+     * 直接放行不需要校验Access-Token的请求
+     */
+    private static final List<String> EXCLUDEPATH = new ArrayList<>();
+
+    /**
+     * 直接放行不需要校验Access-Special的请求
+     */
+    private static final List<String> IMPORT_PASS_PATH = new ArrayList<>();
+
+    /**
+     * 需要校验token但不用接口权限校验的请求
+     */
+    private static final List<String> WITHOUTPATH = new ArrayList<>();
+
+    private static final String REGISTER = "/kwsEnt/register";
+
+    /**
+     * @desc: 初始化放行路径
+     * @author: czh
+     */
+    @PostConstruct
+    private void initExcludePath() {
+        String links = customConfig.getLinks();
+        if (StringUtils.isNotBlank(links)) {
+            EXCLUDEPATH.addAll(Arrays.asList(links.split(Global.COMMA)));
+        }
+
+        String specialLinks = customConfig.getSpecialLinks();
+        if (StringUtils.isNotBlank(specialLinks)) {
+            IMPORT_PASS_PATH.addAll(Arrays.asList(links.split(Global.COMMA)));
+        }
+//        String withoutLinks = customConfig.getWithoutLinks();
+//        if (StringUtils.isNotBlank(withoutLinks)) {
+//            WITHOUTPATH.addAll(Arrays.asList(withoutLinks.split(Global.COMMA)));
+//        }
+    }
+
+    @Override
+    public void doFilter(ServletRequest servletRequest, ServletResponse servletResponse,
+                         FilterChain filterChain) throws IOException, ServletException {
+        HttpServletRequest request = (HttpServletRequest) servletRequest;
+        HttpServletResponse response = (HttpServletResponse) servletResponse;
+        String token = request.getHeader(RequestConstant.TOKEN);
+        String clientType = request.getHeader(RequestConstant.CLIENT_TYPE);
+        Integer systemType = request.getIntHeader(RequestConstant.SYSTEM_TYPE);
+        String accessSpecial = request.getHeader(RequestConstant.ACCESS_SPECIAL);
+        String requestUri = request.getRequestURI();
+
+        /*1、非token校验接口放行*/
+        if (EXCLUDEPATH.contains(requestUri)) {
+            filterChain.doFilter(servletRequest, servletResponse);
+            return;
+        }
+
+        /*2、校验token**/
+        /*2.1、校验token非空*/
+        HttpResult result = checkBlank(token, clientType, systemType, accessSpecial, requestUri);
+        if (result.getCode() != HttpStatus.SUCCESS_CODE) {
+            ResponseUtil.writer(response, result);
+            return;
+        }
+
+        /*2.2、token解析*/
+        Map<String, Object> tokenMap = EncryUtil.descryV2(Global.PRI_KEY, token);
+        if (tokenMap == null) {
+            ResponseUtil.writer(response, HttpResult.error(HttpStatus.TOKEN_INVALID_CODE, HttpStatus.TOKEN_INVALID_MESSAGE));
+            return;
+        }
+
+        /*2.3、从redis获取用户登录token*/
+        Long userId = StringUtils.isNotBlank(tokenMap.get("userId")) ? NumberUtils.parseLong(tokenMap.get("userId")) : null;
+        String key = Global.getFullUserTokenKey(clientType, accessSpecial, userId);
+        String redisUserToken = RedissonUtils.getString(key);
+        if (StringUtils.isBlank(redisUserToken)) {
+            ResponseUtil.writer(response, HttpResult.error(HttpStatus.TOKEN_INVALID_CODE, HttpStatus.TOKEN_INVALID_MESSAGE));
+            return;
+        }
+
+        /*2.4、请求token和redis中token不一致,说明账号在别处登录了*/
+        if (!token.equals(redisUserToken)) {
+            ResponseUtil.writer(response, HttpResult.error(HttpStatus.TOKEN_INVALID_CODE, HttpStatus.ACCOUNT_OTHER_LOGIN_MESSAGE));
+            return;
+        }
+
+        /*3、校验登录用户信息*/
+        key = Global.getFullUserLoginKey(systemType, userId);
+        String userInfoStr = RedissonUtils.getString(key);
+        LoginUserInfo loginUserInfo = StringUtils.isNotBlank(userInfoStr) ? JSON.parseObject(userInfoStr, LoginUserInfo.class) : null;
+        if (Objects.isNull(loginUserInfo)) {
+            ResponseUtil.writer(response, HttpResult.error(HttpStatus.TOKEN_INVALID_CODE, HttpStatus.TOKEN_INVALID_MESSAGE));
+            return;
+        }
+        loginUserInfo.setClientType(clientType);
+
+        //校验用户账号是否冻结
+        if (loginUserInfo.getStatus() == Global.YES) {
+            ResponseUtil.writer(response, HttpResult.error(HttpStatus.TOKEN_INVALID_CODE, "您的账号已被冻结,请联系系统管理员!"));
+            return;
+        }
+
+        /*4、登录中的企业信息*/
+        String loginEntStr = RedissonUtils.getString(Global.getFullUserEntKey(loginUserInfo.getEntId()));
+        LoginEntInfo loginEntInfo = StringUtils.isNotBlank(loginEntStr) ? JSON.parseObject(loginEntStr, LoginEntInfo.class) : null;
+        if (SystemTypeEnum.MANAGE.getCode().equals(systemType)) {
+            //redis 获取客户经理绑定企业ID
+            String managerKey = Global.getCustomerManagerUserLoginKey(SystemTypeEnum.MANAGE.getCode(), loginUserInfo.getId());
+            RSet<Object> set = RedissonUtils.getSet(managerKey);
+            if (Objects.nonNull(set)) {
+                List authUserIdList = JSONObject.parseObject(set.toString(), List.class);
+                if (CollectionUtils.isNotEmpty(authUserIdList)) {
+                    loginUserInfo.setAuthEntIdList(authUserIdList);
+                }
+            }
+            LoginUserHolder.set(loginUserInfo);
+            LoginEntHolder.set(loginEntInfo);
+            RedissonUtils.putString(Global.getFullUserTokenKey(clientType, accessSpecial, userId), token, ClientTypeEnum.expireTime(clientType));
+            RedissonUtils.putString(Global.getFullUserLoginKey(systemType, loginUserInfo.getId()), JSON.toJSONString(loginUserInfo), Global.APP_TOKEN_EXPIRE);
+            RedissonUtils.putString(Global.getFullUserEntKey(loginEntInfo.getId()), JSON.toJSONString(loginEntInfo), Global.APP_TOKEN_EXPIRE);
+            filterChain.doFilter(servletRequest, servletResponse);
+            LoginUserHolder.remove();
+            return;
+        }
+
+        if ((StringUtils.isBlank(loginEntStr) || loginEntInfo == null) && !Objects.equals(systemType, SystemTypeEnum.MANAGE.getCode())) {
+            ResponseUtil.writer(response, HttpResult.error(HttpStatus.TOKEN_INVALID_CODE, HttpStatus.UN_LOGIN_MESSAGE));
+            return;
+        } else {
+            //校验用户企业是否冻结
+            if (Objects.isNull(loginEntInfo) || loginEntInfo.getStatus() == Global.YES) {
+                ResponseUtil.writer(response, HttpResult.error(HttpStatus.TOKEN_INVALID_CODE, "您所属企业已被冻结,请联系系统管理员!"));
+                return;
+            }
+
+            //校验用户企业审批状态
+            if (!loginEntInfo.getValid() && !REGISTER.equals(requestUri)) {
+                if (loginEntInfo.getApproval() == Global.NO) {
+                    ResponseUtil.writer(response, HttpResult.error(HttpStatus.CODE_60603, HttpStatus.ENTCERTIFICATES_NOT_REGISTER));
+                    return;
+                }
+
+                if (loginEntInfo.getApproval() == Global.NUMERICAL_THREE) {
+                    ResponseUtil.writer(response, HttpResult.error(HttpStatus.CODE_60603, HttpStatus.ENTCERTIFICATES_NOT_PASS));
+                    return;
+                }
+
+                ResponseUtil.writer(response, HttpResult.error(HttpStatus.CODE_60603, HttpStatus.ENTCERTIFICATES_INVAILD));
+                return;
+            }
+        }
+
+        /*5、请求权限校验*/
+        //非管理员有接口权限才放行
+//        if (loginUserInfo.getIsMain() == Global.NO
+//                && !WITHOUTPATH.contains(requestUri)
+//                && !checkMenu(clientType, loginUserInfo.getId(), requestUri)) {
+//            ResponseUtil.writer(response, HttpResult.error(HttpStatus.AUTHORITY_NO_CODE, HttpStatus.ACCESS_FIAL));
+//            return;
+//        }
+        LoginUserHolder.set(loginUserInfo);
+        LoginEntHolder.set(loginEntInfo);
+        RedissonUtils.putString(Global.getFullUserLoginKey(systemType, loginUserInfo.getId()), JSON.toJSONString(loginUserInfo), Global.APP_TOKEN_EXPIRE);
+        RedissonUtils.putString(Global.getFullUserEntKey(loginEntInfo.getId()), JSON.toJSONString(loginEntInfo), Global.APP_TOKEN_EXPIRE);
+        RedissonUtils.putString(Global.getFullUserTokenKey(clientType, accessSpecial, userId), token, ClientTypeEnum.expireTime(clientType));
+        filterChain.doFilter(servletRequest, servletResponse);
+        LoginUserHolder.remove();
+        LoginEntHolder.remove();
+    }
+
+
+    /**
+     * @param userId 用户菜单权限key  url 当前请求url
+     * @return boolean
+     * @desc: 校验url权限
+     * @author: czh
+     * @date: 2023/6/28
+     */
+    private boolean checkMenu(String clientType, Long userId, String url) {
+        return RedissonUtils.contains(Global.REDIS_SYS_MENU_PREFIX + clientType + Global.COLON + userId, url);
+    }
+
+    /**
+     * @param token         token
+     * @param clientType    客户端类型
+     * @param systemType    系统类型
+     * @param accessSpecial 专场标识
+     * @param requestUri    请求地址
+     * @return 校验结果
+     * @desc Hearder内容校验
+     * @author zk
+     * @date 2023/12/14
+     **/
+    private HttpResult checkBlank(String token, String clientType, Integer systemType, String accessSpecial, String requestUri) {
+        if (StringUtils.isBlank(token)) {
+            return HttpResult.error(HttpStatus.PARAMETERS_MISSING_CODE, HttpStatus.UN_LOGIN_MESSAGE);
+        }
+        if (StringUtils.isBlank(clientType)) {
+            return HttpResult.error(HttpStatus.PARAMETERS_MISSING_CODE, HttpStatus.INVALID_REQUEST);
+        }
+        if (StringUtils.isBlank(systemType)) {
+            return HttpResult.error(HttpStatus.PARAMETERS_MISSING_CODE, HttpStatus.INVALID_REQUEST);
+        }
+        if (!IMPORT_PASS_PATH.contains(requestUri)) {
+            if (StringUtils.isBlank(accessSpecial) && !Objects.equals(systemType, SystemTypeEnum.MANAGE.getCode())) {
+                return HttpResult.error(HttpStatus.PARAMETERS_MISSING_CODE, HttpStatus.INVALID_REQUEST);
+            }
+        }
+        accessSpecial = !Objects.equals(systemType, SystemTypeEnum.MANAGE.getCode()) ? accessSpecial : null;
+        return HttpResult.ok();
+    }
+
+    public static void main(String[] args) {
+        Map<String, Object> tokenMap = EncryUtil.descryV2(Global.PRI_KEY, "afc3fc350d5c17e52beba3bcd631eaca9f5f440509f72b182880a429b1b9b22b53154436ec72865566320514f3a6e39389c2ed412180c90b07f6ff66c12a5e139ed05793cf37d580ae9a2a166ddd79d6b7cd10e209d78c6eee9381d878df29f7");
+        System.out.println(tokenMap);
+    }
+}

+ 134 - 0
sckw-common/sckw-common-core/src/main/java/com/sckw/core/filter/RequestCheckInterceptor.java

@@ -0,0 +1,134 @@
+//package com.sckw.core.filter;
+//
+//import com.sckw.core.annotation.RepeatSubmit;
+//import com.sckw.core.model.auth.context.LoginEnterpriseHolder;
+//import com.sckw.core.web.context.LoginUserHolder;
+//import jakarta.servlet.http.HttpServletRequest;
+//import jakarta.servlet.http.HttpServletResponse;
+//import org.springframework.beans.factory.annotation.Autowired;
+//import org.springframework.lang.Nullable;
+//import org.springframework.web.method.HandlerMethod;
+//import org.springframework.web.servlet.HandlerInterceptor;
+//
+//import java.lang.reflect.Method;
+//import java.util.Map;
+//
+///**
+// * @author zk
+// * @desc 拦截器
+// * @date 2023/8/18
+// */
+//public class RequestCheckInterceptor implements HandlerInterceptor {
+//
+//    /**
+//     * @desc 请求处理之前执行
+//     * @author zk
+//     * @date 2023/8/18
+//     **/
+//    @Override
+//    public boolean preHandle(HttpServletRequest request, HttpServletResponse response, Object handler) throws Exception {
+////        if (handler instanceof HandlerMethod) {
+////            HandlerMethod handlerMethod = (HandlerMethod) handler;
+////            Method method = handlerMethod.getMethod();
+////            //判断是否添加了防重复提交的注解
+////            RepeatSubmit annotation = method.getAnnotation(RepeatSubmit.class);
+////            if (annotation != null) {
+////                //判断该请求是否重复提交
+////                if (isRepeatSubmit(request, annotation)) {
+////                    //封装错误信息,直接返回
+////                    String message = annotation.message();
+////                    return false;
+////                }
+////            }
+////            return true;
+////        } else {
+////            return true;
+////        }
+//    }
+//
+//
+//    /**
+//     * @desc preHandle成功后执行
+//     * @author zk
+//     * @date 2023/8/18
+//     **/
+//    @Override
+//    public void afterCompletion(HttpServletRequest request, HttpServletResponse response, Object handler, @Nullable Exception ex) throws Exception {
+//        LoginUserHolder.remove();
+//        LoginEnterpriseHolder.remove();
+//    }
+//
+//
+//    public boolean isRepeatSubmit(HttpServletRequest request, RepeatSubmit annotation)
+//    {
+//        String nowParams = "";
+//        if (request instanceof RepeatedlyRequestWrapper)
+//        {
+//            RepeatedlyRequestWrapper repeatedlyRequest = (RepeatedlyRequestWrapper) request;
+//            nowParams = HttpHelper.getBodyString(repeatedlyRequest);
+//        }
+//        //获取请求参数
+//        // body参数为空,获取Parameter的数据
+//        if (StringUtils.isEmpty(nowParams))
+//        {
+//            nowParams = JSON.toJSONString(request.getParameterMap());
+//        }
+//        Map<String, Object> nowDataMap = new HashMap<String, Object>();
+//        nowDataMap.put(REPEAT_PARAMS, nowParams);
+//        nowDataMap.put(REPEAT_TIME, System.currentTimeMillis());
+//
+//        // 请求地址(作为存进Redis的key值),没有使用url是因为所有请求的前缀都是一样的(http://ip地址:端口号),微服务
+//        项目使用nginx所在服务器的IP地址和端口号,之后再转发到网关。
+//        String url = request.getRequestURI();
+//        // 唯一值(没有消息头则使用请求地址)
+//        String submitKey = StringUtils.trimToEmpty(request.getHeader(header));
+//
+//        // 唯一标识(指定key + url + 消息头) 消息头相当于登录用户的唯一标识,唯一标识主要靠token区分。
+//        String cacheRepeatKey = CacheConstants.REPEAT_SUBMIT_KEY + url + submitKey;
+//        //从Redis获取锁
+//        Object sessionObj = redisCache.getCacheObject(cacheRepeatKey);
+//        if (sessionObj != null)
+//        {
+//            Map<String, Object> sessionMap = (Map<String, Object>) sessionObj;
+//            if (sessionMap.containsKey(url))
+//            {
+//                Map<String, Object> preDataMap = (Map<String, Object>) sessionMap.get(url);
+//                //如果请求地址相同、请求参数相同而且时间间隔小于间隔时间,则视为重复请求,直接返回。
+//                if (compareParams(nowDataMap, preDataMap) && compareTime(nowDataMap, preDataMap, annotation.interval()))
+//                {
+//                    return true;
+//                }
+//            }
+//        }
+//        //如果不是重复请求则将锁存进Redis中,过期时间为所设定的时间间隔然后返回。
+//        Map<String, Object> cacheMap = new HashMap<String, Object>();
+//        cacheMap.put(url, nowDataMap);
+//        redisCache.setCacheObject(cacheRepeatKey, cacheMap, annotation.interval(), TimeUnit.MILLISECONDS);
+//        return false;
+//    }
+//
+//    /**
+//     * 判断参数是否相同
+//     */
+//    private boolean compareParams(Map<String, Object> nowMap, Map<String, Object> preMap)
+//    {
+//        String nowParams = (String) nowMap.get(REPEAT_PARAMS);
+//        String preParams = (String) preMap.get(REPEAT_PARAMS);
+//        return nowParams.equals(preParams);
+//    }
+//
+//    /**
+//     * 判断两次间隔时间
+//     */
+//    private boolean compareTime(Map<String, Object> nowMap, Map<String, Object> preMap, int interval)
+//    {
+//        long time1 = (Long) nowMap.get(REPEAT_TIME);
+//        long time2 = (Long) preMap.get(REPEAT_TIME);
+//        if ((time1 - time2) < interval)
+//        {
+//            return true;
+//        }
+//        return false;
+//    }
+//
+//}

+ 69 - 0
sckw-common/sckw-common-core/src/main/java/com/sckw/core/model/auth/AbstractLoginUser.java

@@ -0,0 +1,69 @@
+/**
+ * Copyright 2018-2020 stylefeng & fengshuonan (sn93@qq.com)
+ * <p>
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * <p>
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * <p>
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package com.sckw.core.model.auth;
+
+import java.util.Set;
+
+/**
+ * 登录中的用户信息
+ * <p>
+ * 为何类型是泛型,因为具体的项目不知道类型是什么
+ * @author fengshuonan
+ * @date 2017-11-09-下午5:47
+ */
+public interface AbstractLoginUser {
+
+    /**
+     * @description 获取用户唯一id
+     * @author fengshuonan
+     * @Date 2018/8/10 9:49
+     * @return
+     **/
+    <T> T getUserUniqueId();
+
+    /**
+     * @description 获取用户唯一id
+     * @author fengshuonan
+     * @Date 2018/8/10 9:49
+     * @return
+     **/
+    <T> T getAppId();
+
+    /**
+     * @description 获取角色id的集合
+     * @author fengshuonan
+     * @Date 2018/8/10 9:49
+     * @return
+     **/
+    <T> Set<T> getRoleIds();
+
+    /**
+     * @description 角色编码集合
+     * @author fengshuonan
+     * @Date 2018/8/10 9:49
+     * @return
+     **/
+    <T> Set<T> getRoleCodes();
+
+    /**
+     * @description 包含的资源权限url
+     * @author fengshuonan
+     * @Date 2018/8/10 9:49
+     * @return
+     **/
+    <T> Set<T> getResourceUrls();
+
+}

+ 39 - 0
sckw-common/sckw-common-core/src/main/java/com/sckw/core/model/auth/UserAccessMenuInfo.java

@@ -0,0 +1,39 @@
+package com.sckw.core.model.auth;
+
+import lombok.Data;
+
+import java.io.Serial;
+import java.io.Serializable;
+
+/**
+ * @author czh
+ * @desc 查询用户菜单返参
+ * @date 2023/6/13
+ */
+@Data
+public class UserAccessMenuInfo implements Serializable {
+
+    @Serial
+    private static final long serialVersionUID = -7179541798171846390L;
+
+    /**
+     * 菜单ID
+     */
+    private long menuId;
+
+    /**
+     * 菜单名
+     */
+    private String name;
+
+    /**
+     * 地址
+     */
+    private String url;
+
+    /**
+     * 后端接口地址
+     */
+    private String links;
+
+}

+ 27 - 0
sckw-common/sckw-common-core/src/main/java/com/sckw/core/model/auth/context/AbstractLoginContext.java

@@ -0,0 +1,27 @@
+package com.sckw.core.model.auth.context;
+
+import com.sckw.core.model.auth.AbstractLoginUser;
+
+/**
+ * 快速获取登录信息上下文
+ * @author fengshuonan
+ * @date 2018-02-05 16:58
+ */
+public interface AbstractLoginContext {
+
+    /**
+     * @description 获取当前用户的token
+     * @author fengshuonan
+     * @dae 018-02-05 9:49
+     * @return token
+     **/
+    String getCurrentUserToken();
+
+    /**
+     * @description 获取当前用户
+     * @author fengshuonan
+     * @dae 2018-02-05 9:49
+     * @return
+     **/
+    <T extends AbstractLoginUser> T getLoginUser();
+}

+ 38 - 0
sckw-common/sckw-common-core/src/main/java/com/sckw/core/model/auth/context/SignBase.java

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

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

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

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

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

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

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

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

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

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

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

+ 73 - 0
sckw-common/sckw-common-core/src/main/java/com/sckw/core/model/constant/NumberConstant.java

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

+ 40 - 0
sckw-common/sckw-common-core/src/main/java/com/sckw/core/model/enums/AddressTypeEnum.java

@@ -0,0 +1,40 @@
+package com.sckw.core.model.enums;
+
+import lombok.Getter;
+
+/**
+ * @author czh
+ * @desc 默认地址类型
+ * @date 2023/6/15
+ */
+@Getter
+public enum AddressTypeEnum {
+
+    //普通
+    NO(0, ""),
+    //装货地址
+    SHIPMENT(1, "装货"),
+    //收货地址
+    TAKE(2, "卸货"),
+    //装/卸
+    BOTH(3, "装/卸");
+
+    private final int code;
+
+    private final String name;
+
+    AddressTypeEnum(int code, String name){
+        this.code = code;
+        this.name = name;
+    }
+
+    public static AddressTypeEnum getName(int code){
+        for (AddressTypeEnum addressDefaultTypeEnum : values()) {
+            if (addressDefaultTypeEnum.getCode() == code) {
+                return addressDefaultTypeEnum;
+            }
+        }
+        return null;
+    }
+
+}

+ 58 - 0
sckw-common/sckw-common-core/src/main/java/com/sckw/core/model/enums/ApprovalEnum.java

@@ -0,0 +1,58 @@
+package com.sckw.core.model.enums;
+
+import lombok.Getter;
+
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+/**
+ * @author czh
+ * @desc 审批状态枚举
+ * @date 2023/6/15
+ */
+@Getter
+public enum ApprovalEnum {
+
+    //未审批
+    NO(0, "待认证"),
+    //通过
+    OK(1, "已认证"),
+    //未通过
+    PASS(2, "已驳回"),
+    //审批中
+    PROCESS(3, "待审批"),
+    //更新中,待审批
+    REFRESH(4, "更新中");
+
+    private final int code;
+
+    private final String name;
+
+    ApprovalEnum(int code, String name) {
+        this.code = code;
+        this.name = name;
+    }
+
+    public static String getName(int code) {
+        for (ApprovalEnum approvalEnum : values()) {
+            if (approvalEnum.getCode() == code) {
+                return approvalEnum.getName();
+            }
+        }
+        return null;
+    }
+
+    public static List<Map<String, String>> getDefaultApprovalEnum() {
+        List<Map<String, String>> list = new ArrayList<>();
+        for (ApprovalEnum approvalEnum : ApprovalEnum.values()) {
+            Map<String, String> map = new HashMap<>();
+            map.put("code", String.valueOf(approvalEnum.getCode()));
+            map.put("name", approvalEnum.getName());
+            list.add(map);
+        }
+        return list;
+    }
+
+}

+ 52 - 0
sckw-common/sckw-common-core/src/main/java/com/sckw/core/model/enums/BannerDistrictEnum.java

@@ -0,0 +1,52 @@
+package com.sckw.core.model.enums;
+
+import lombok.Getter;
+
+/**
+ * @author sky
+ * @desc 默认地址类型
+ * @date 2023/6/15
+ */
+@Getter
+public enum BannerDistrictEnum {
+
+    //首页
+    BANNER_ZERO(0, "首页"),
+    //建材市场
+    BANNER_ONE(1, "建材市场"),
+    //求购大厅
+    BANNER_TWO(2, "求购大厅"),
+    //运需广场
+    BANNER_THREE(3, "运需广场"),
+    //运力大厅
+    BANNER_FOUR(4, "运力大厅"),
+    //金融服务
+    BANNER_FIVE(5, "金融服务"),
+    //车后服务
+    BANNER_SIX(6,"车后服务"),
+    //绿智新能
+    BANNER_SEVEN(7,"绿智新能");
+
+
+
+    
+
+    private final int code;
+
+    private final String name;
+
+    BannerDistrictEnum(int code, String name){
+        this.code = code;
+        this.name = name;
+    }
+
+    public static BannerDistrictEnum getName(int code){
+        for (BannerDistrictEnum addressDefaultTypeEnum : values()) {
+            if (addressDefaultTypeEnum.getCode() == code) {
+                return addressDefaultTypeEnum;
+            }
+        }
+        return null;
+    }
+
+}

+ 246 - 0
sckw-common/sckw-common-core/src/main/java/com/sckw/core/model/enums/CarWaybillEnum.java

@@ -0,0 +1,246 @@
+package com.sckw.core.model.enums;
+
+import java.util.ArrayList;
+import java.util.List;
+
+/**
+ * @author lfdc
+ * @desc 车辆运单状态枚举
+ * @date 2023-07-14 14:07:23
+ */
+public enum CarWaybillEnum {
+    /**
+     * 待接单
+     */
+    PENDING_ORDER(101, "pendingOrder", "101", "待接单", "已指派"),
+    /**
+     * 已撤销
+     */
+    REVOKED(102, "revoked", "102", "撤回", "撤回"),
+    /**
+     * 拒接单
+     */
+    REJECT_ORDER(103, "rejectOrder", "103", "拒接单", "拒接单"),
+    /**
+     * 出车-待出车
+     */
+    PENDING_VEHICLE(201, "pendingVehicle", "201", "待出车", "确认接单"),
+    /**
+     * 出车-拒出车
+     */
+    REFUSE_TRAFFIC(202, "refuseTraffic", "202", "拒出车", "拒出车"),
+    /**
+     * 出车-已出车
+     */
+    EXIT_COMPLETED(203, "exitCompleted", "203", "已出车", "确认出车"),
+    /**
+     * 装货-到达装货点
+     */
+    WAIT_LOADING(301, "waitLoading", "301", "到达装货点", "到达装货点"),
+    /**
+     * 装货-已装货
+     */
+    COMPLETION_LOADING(302, "completionLoading", "302", "已装货", "确认装货"),
+    /**
+     * 卸货-到达卸货点
+     */
+    WAIT_UNLOADING(401, "waitUnloading", "401", "到达卸货点", "到达卸货点"),
+    /**
+     * 卸货-已卸货
+     */
+    COMPLETION_UNLOADING(402, "completionUnloading", "402", "已卸货", "确认卸货"),
+    /**
+     * 审核-待
+     */
+    APPROVAL_TREAT(501, "approvalTreat", "501", "待审核", "待审核"),
+    /**
+     * 审核-通过
+     */
+    APPROVAL_PASS(502, "approvalPass", "502", "审核通过", "审核通过"),
+    /**
+     * 审核-驳回
+     */
+    APPROVAL_NO_PASS(503, "revoked", "503", "核单驳回", "核单驳回"),
+    /**
+     * 审核-单证更新审核中
+     */
+    APPROVAL_IN(504, "approvalIn", "504", "单证更新审核中", "单证更新审核中"),
+    ;
+
+    private final Integer code;
+    private final String value;
+    private final String status;
+    private final String destination;
+    private final String alias;
+
+    public Integer getCode() {
+        return code;
+    }
+
+    public String getValue() {
+        return value;
+    }
+
+    public String getStatus() {
+        return status;
+    }
+
+    public String getAlias() {
+        return alias;
+    }
+
+    public String getDestination() {
+        return destination;
+    }
+
+    CarWaybillEnum(Integer code, String value, String status, String destination, String alias) {
+        this.code = code;
+        this.value = value;
+        this.status = status;
+        this.alias = alias;
+        this.destination = destination;
+    }
+
+    public static String getLogisticsOrderValue(Integer code) {
+        for (CarWaybillEnum waybillEnum : CarWaybillEnum.values()) {
+            if (waybillEnum.getCode().equals(code)) {
+                return waybillEnum.getValue();
+            }
+        }
+        return null;
+    }
+
+    public static String getWaybillOrderDestination(String status) {
+        for (CarWaybillEnum waybillEnum : CarWaybillEnum.values()) {
+            if (waybillEnum.getStatus().equals(status)) {
+                return waybillEnum.getDestination();
+            }
+        }
+        return null;
+    }
+
+    public static String getName(Integer code) {
+        for (CarWaybillEnum waybillEnum : CarWaybillEnum.values()) {
+            if (waybillEnum.getCode().equals(code)) {
+                return waybillEnum.getDestination();
+            }
+        }
+        return null;
+    }
+
+    public static String getAlias(Integer code) {
+        for (CarWaybillEnum waybillEnum : CarWaybillEnum.values()) {
+            if (waybillEnum.getCode().equals(code)) {
+                return waybillEnum.getAlias();
+            }
+        }
+        return null;
+    }
+
+    public static List<Integer> getCodes() {
+        List<Integer> codes = new ArrayList<>();
+        for (CarWaybillEnum waybillEnum : CarWaybillEnum.values()) {
+            codes.add(waybillEnum.getCode());
+        }
+        return codes;
+    }
+
+    public static List<String> getStringCodes() {
+        List<String> codes = new ArrayList<>();
+        for (CarWaybillEnum waybillEnum : CarWaybillEnum.values()) {
+            codes.add(waybillEnum.getStatus());
+        }
+        return codes;
+    }
+
+    /**
+     * @param code 状态码
+     * @desc 是否可以变更司机
+     * @author zk
+     * @date 2023/8/2
+     **/
+    public static boolean changeDriver(int code) {
+        return code != CarWaybillEnum.COMPLETION_UNLOADING.getCode()
+                && code != CarWaybillEnum.APPROVAL_PASS.getCode()
+                && code != CarWaybillEnum.REJECT_ORDER.getCode()
+                && code != CarWaybillEnum.REFUSE_TRAFFIC.getCode()
+                && code != CarWaybillEnum.REVOKED.getCode()
+                && code != CarWaybillEnum.APPROVAL_NO_PASS.getCode();
+    }
+
+    /**
+     * @param code 状态码
+     * @desc 是否可以变更司机
+     * @author zk
+     * @date 2023/8/2
+     **/
+    public static boolean arriveLocation(int code) {
+        return code == CarWaybillEnum.EXIT_COMPLETED.getCode()
+                || code == CarWaybillEnum.WAIT_LOADING.getCode()
+                || code == CarWaybillEnum.COMPLETION_LOADING.getCode()
+                || code == CarWaybillEnum.WAIT_UNLOADING.getCode()
+                || code == CarWaybillEnum.COMPLETION_UNLOADING.getCode();
+    }
+
+    /**
+     * @param code 状态码
+     * @desc 是否可以变更司机
+     * @author zk
+     * @date 2023/8/2
+     **/
+    public static boolean arriveLoading(int code) {
+        return code == CarWaybillEnum.WAIT_LOADING.getCode()
+                || code == CarWaybillEnum.COMPLETION_LOADING.getCode()
+                || code == CarWaybillEnum.WAIT_UNLOADING.getCode()
+                || code == CarWaybillEnum.COMPLETION_UNLOADING.getCode()
+                || code == CarWaybillEnum.APPROVAL_TREAT.getCode()
+                || code == CarWaybillEnum.APPROVAL_NO_PASS.getCode();
+    }
+
+    /**
+     * @param code 状态码
+     * @desc 是否可以变更司机
+     * @author zk
+     * @date 2023/8/2
+     **/
+    public static boolean editTicket(int code) {
+        return code == CarWaybillEnum.APPROVAL_TREAT.getCode()
+                || code == CarWaybillEnum.APPROVAL_NO_PASS.getCode()
+                || code == CarWaybillEnum.APPROVAL_IN.getCode() ;
+    }
+
+    /**
+     * @param code 状态码
+     * @desc 是否可以变更司机/车辆
+     * @author zk
+     * @date 2023/8/2
+     **/
+    public static boolean changeTruck(int code) {
+        return code == CarWaybillEnum.PENDING_ORDER.getCode()
+                || code == CarWaybillEnum.PENDING_VEHICLE.getCode();
+    }
+
+    /**
+     * 运单状态
+     * @return 状态集
+     */
+    public static List<Integer> initWaybillStatusV1() {
+        List<Integer> statuses = new ArrayList<>();
+        //statuses.add(CarWaybillEnum.PENDING_ORDER.getCode());
+        statuses.add(CarWaybillEnum.PENDING_VEHICLE.getCode());
+        statuses.add(CarWaybillEnum.EXIT_COMPLETED.getCode());
+        return statuses;
+    }
+
+    /**
+     * 运单状态
+     * @return 状态集
+     */
+    public static List<Integer> initWaybillStatusV2() {
+        List<Integer> statuses = new ArrayList<>();
+        statuses.add(CarWaybillEnum.PENDING_ORDER.getCode());
+        statuses.add(CarWaybillEnum.PENDING_VEHICLE.getCode());
+        statuses.add(CarWaybillEnum.EXIT_COMPLETED.getCode());
+        return statuses;
+    }
+}

+ 164 - 0
sckw-common/sckw-common-core/src/main/java/com/sckw/core/model/enums/CarWaybillQueryEnum.java

@@ -0,0 +1,164 @@
+package com.sckw.core.model.enums;
+
+import java.util.ArrayList;
+import java.util.List;
+
+/**
+ * @author lfdc
+ * @description 车辆运单状态枚举[仅查询使用]
+ * @date 2023-07-14 14:07:23
+ */
+public enum CarWaybillQueryEnum {
+    /**
+     * 待接单
+     */
+    PENDING_ORDER(1, "pendingOrder", "1", "待接单"),
+    /**
+     * 待出车
+     */
+    PENDING_VEHICLE(2, "pendingVehicle", "2", "待出车"),
+    /**
+     * 已出车
+     */
+    EXIT_COMPLETED(3, "exitCompleted", "3", "已出车"),
+    /**
+     * 到达装货点
+     */
+    WAIT_LOADING(4, "waitLoading", "4", "到达装货点"),
+    /**
+     * 已装货
+     */
+    COMPLETION_LOADING(5, "completionLoading", "5", "已装货"),
+    /**
+     * 到达卸货点
+     */
+    WAIT_UNLOADING(6, "waitUnloading", "6", "到达卸货点"),
+    /**
+     * 已卸货
+     */
+    COMPLETION_UNLOADING(7, "completionUnloading", "7", "已卸货"),
+    /**
+     * 已核-通过
+     */
+    APPROVAL_PASS(8, "approvalPass", "8", "审核通过"),
+    /**
+     * 拒接单
+     */
+    REJECT_ORDER(9, "rejectOrder", "9", "拒接单"),
+    /**
+     * 拒出车
+     */
+    REFUSE_TRAFFIC(10, "refuseTraffic", "10", "拒出车"),
+    /**
+     * 已撤销
+     */
+    REVOKED(11, "revoked", "11", "单趟撤回"),
+    /**
+     * 已核单-不通过[审核不通过]
+     */
+    APPROVAL_NO_PASS(12, "revoked", "12", "核单驳回"),
+    /**
+     * 单证更新审核中
+     */
+    APPROVAL_IN(13, "approvalIn", "13", "单证更新审核中"),
+
+    /**
+     * 单证审核
+     */
+    DOCUMENT_CHECK(100, "documentCheck", "100", "单证审核"),
+
+    /**
+     * 已作废
+     */
+    ABROGATE(200, "abrogate", "200", "已作废"),
+    ;
+
+    private final Integer code;
+    private final String value;
+    private final String status;
+    private final String destination;
+
+    public Integer getCode() {
+        return code;
+    }
+
+    public String getValue() {
+        return value;
+    }
+
+    public String getStatus() {
+        return status;
+    }
+
+    public String getDestination() {
+        return destination;
+    }
+
+    CarWaybillQueryEnum(Integer code, String value, String status, String destination) {
+        this.code = code;
+        this.value = value;
+        this.status = status;
+        this.destination = destination;
+    }
+
+    public static String getLogisticsOrderValue(Integer code) {
+        for (CarWaybillQueryEnum waybillEnum : CarWaybillQueryEnum.values()) {
+            if (waybillEnum.getCode().equals(code)) {
+                return waybillEnum.getValue();
+            }
+        }
+        return null;
+    }
+
+    public static String getWaybillOrderDestination(String status) {
+        for (CarWaybillQueryEnum waybillEnum : CarWaybillQueryEnum.values()) {
+            if (waybillEnum.getStatus().equals(status)) {
+                return waybillEnum.getDestination();
+            }
+        }
+        return null;
+    }
+
+    public static String getName(Integer code) {
+        for (CarWaybillQueryEnum waybillEnum : CarWaybillQueryEnum.values()) {
+            if (waybillEnum.getCode().equals(code)) {
+                return waybillEnum.getDestination();
+            }
+        }
+        return null;
+    }
+
+    public static List<Integer> getCodes() {
+        List<Integer> codes = new ArrayList<>();
+        for (CarWaybillQueryEnum waybillEnum : CarWaybillQueryEnum.values()) {
+            codes.add(waybillEnum.getCode());
+        }
+        return codes;
+    }
+
+    public static List<String> getStringCodes() {
+        List<String> codes = new ArrayList<>();
+        for (CarWaybillQueryEnum waybillEnum : CarWaybillQueryEnum.values()) {
+            codes.add(waybillEnum.getStatus());
+        }
+        return codes;
+    }
+
+    /**
+     * @param code 状态码
+     * @desc 是否可以变更司机/车辆
+     * @author zk
+     * @date 2023/8/2
+     **/
+    public static boolean changeDriverAndTruck(int code) {
+        if (code == CarWaybillQueryEnum.COMPLETION_UNLOADING.getCode()
+                || code == CarWaybillQueryEnum.APPROVAL_PASS.getCode()
+                || code == CarWaybillQueryEnum.REJECT_ORDER.getCode()
+                || code == CarWaybillQueryEnum.REFUSE_TRAFFIC.getCode()
+                || code == CarWaybillQueryEnum.REVOKED.getCode()
+                || code == CarWaybillQueryEnum.APPROVAL_NO_PASS.getCode()) {
+            return false;
+        }
+        return true;
+    }
+}

+ 45 - 0
sckw-common/sckw-common-core/src/main/java/com/sckw/core/model/enums/CertificateTypeEnum.java

@@ -0,0 +1,45 @@
+package com.sckw.core.model.enums;
+
+import lombok.Getter;
+
+/**
+ * @author czh
+ * @desc 证照类型枚举
+ * @date 2023/6/15
+ */
+@Getter
+public enum CertificateTypeEnum {
+
+    //联系人身份证
+    CONTACTS_IDCARD(1, "联系人身份证"),
+    //法人身份证
+    CORPORATION_IDCARD(2, "法人身份证"),
+    //营业执照
+    BUSINESSLICENSE(3, "营业执照"),
+    //道路运输许可证
+    ROADLICENSE(4, "道路运输许可证"),
+    //开户许可证号
+    ACCOUNT(5, "开户许可证号"),
+    //授权证书
+    AUTHORIZE(6, "授权证书"),
+    //电子签章授权书
+    SIGNATURES(7, "电子签章授权书");
+
+    private final int code;
+
+    private final String name;
+
+    CertificateTypeEnum(int code, String name){
+        this.code = code;
+        this.name = name;
+    }
+
+    public static CertificateTypeEnum getName(int code){
+        for (CertificateTypeEnum certificateTypeEnum : values()) {
+            if (certificateTypeEnum.getCode() == code) {
+                return certificateTypeEnum;
+            }
+        }
+        return null;
+    }
+}

+ 37 - 0
sckw-common/sckw-common-core/src/main/java/com/sckw/core/model/enums/ChargingTypeEnum.java

@@ -0,0 +1,37 @@
+package com.sckw.core.model.enums;
+
+import lombok.Getter;
+
+/**
+ * @author czh
+ * @desc 计费方式枚举
+ * @date 2023/7/14
+ */
+@Getter
+public enum ChargingTypeEnum {
+
+    //装货量
+    ON(1, "装货量"),
+    //卸货量
+    OFF(2, "卸货量"),
+    //车次
+    CAR(3, "车次");
+
+    private final int code;
+
+    private final String name;
+
+    ChargingTypeEnum(int code, String name){
+        this.code = code;
+        this.name = name;
+    }
+
+    public static ChargingTypeEnum getName(int code){
+        for (ChargingTypeEnum chargingTypeEnum : values()) {
+            if (chargingTypeEnum.getCode() == code) {
+                return chargingTypeEnum;
+            }
+        }
+        return null;
+    }
+}

+ 59 - 0
sckw-common/sckw-common-core/src/main/java/com/sckw/core/model/enums/ClientTypeEnum.java

@@ -0,0 +1,59 @@
+package com.sckw.core.model.enums;
+
+import com.sckw.core.model.constant.Global;
+
+/**
+ * @Description 客户端类型枚举
+ * @Author dengyinghui
+ * @Date 2019/4/16
+ */
+public enum ClientTypeEnum {
+    //浏览器-官网
+    pc("浏览器", "pc"),
+    app("app", "app"),
+    //苹果设备
+    ios("苹果设备", "ios"),
+    //安卓设备
+    android("安卓设备",  "android"),
+    //移动设备
+    mobile("移动端", "mobile"),
+    //第三方API调用
+    api("API调用", "api"),
+    //所有终端
+    terminal("终端", "terminal");
+
+    private String name;
+
+    private String value;
+
+    private ClientTypeEnum(String name, String value){
+        this.name = name;
+        this.value = value;
+    }
+
+    public String getName() {
+        return name;
+    }
+
+    public void setName(String name) {
+        this.name = name;
+    }
+
+    public String getValue() {
+        return value;
+    }
+
+    public void setValue(String value) {
+        this.value = value;
+    }
+
+    public static int expireTime(String clientType) {
+        if (clientType.equals(pc.getValue())) {
+            return Global.PC_TOKEN_EXPIRE;
+        } else if (clientType.equals(ios.getValue()) || clientType.equals(android.getValue())) {
+            return Global.APP_TOKEN_EXPIRE;
+        } else {
+            return Global.COMMON_EXPIRE;
+        }
+    }
+}

+ 39 - 0
sckw-common/sckw-common-core/src/main/java/com/sckw/core/model/enums/ContractStatusEnum.java

@@ -0,0 +1,39 @@
+package com.sckw.core.model.enums;
+
+import lombok.Getter;
+
+/**
+ * @author czh
+ * @desc 合同状态
+ * @date 2023/7/14
+ */
+@Getter
+public enum ContractStatusEnum {
+    //已签约
+    SIGNED(0, "已签约"),
+    //已完结
+    COMPLETE(2, "已完结"),
+    //已保存
+    SAVE(3, "已保存"),
+    //签约中
+    SUBMIT(1, "待签约");
+
+    private final int code;
+
+    private final String name;
+
+    ContractStatusEnum(int code, String name) {
+        this.code = code;
+        this.name = name;
+    }
+
+    public static ContractStatusEnum getName(int code) {
+        for (ContractStatusEnum contractTrackEnum : values()) {
+            if (contractTrackEnum.getCode() == code) {
+                return contractTrackEnum;
+            }
+        }
+        return null;
+    }
+
+}

+ 38 - 0
sckw-common/sckw-common-core/src/main/java/com/sckw/core/model/enums/ContractTrackEnum.java

@@ -0,0 +1,38 @@
+package com.sckw.core.model.enums;
+
+import lombok.Getter;
+
+/**
+ * @author czh
+ * @desc 合同审批状态
+ * @date 2023/7/14
+ */
+@Getter
+public enum ContractTrackEnum {
+
+    //签约中
+    SIGNING(1, "发起签约"),
+    //已签约
+    SIGNED(0, "已签约"),
+    //已完结
+    OVER(2, "已完结");
+
+    private final int code;
+
+    private final String name;
+
+    ContractTrackEnum(int code, String name) {
+        this.code = code;
+        this.name = name;
+    }
+
+    public static ContractTrackEnum getName(int code) {
+        for (ContractTrackEnum contractTrackEnum : values()) {
+            if (contractTrackEnum.getCode() == code) {
+                return contractTrackEnum;
+            }
+        }
+        return null;
+    }
+
+}

+ 36 - 0
sckw-common/sckw-common-core/src/main/java/com/sckw/core/model/enums/CooperateApplyTypeEnum.java

@@ -0,0 +1,36 @@
+package com.sckw.core.model.enums;
+
+import lombok.Getter;
+
+/**
+ * @author czh
+ * @desc 合作单位申请类型枚举
+ * @date 2023/6/15
+ */
+@Getter
+public enum CooperateApplyTypeEnum {
+
+    //我方发起
+    US(1, "我方发起"),
+    //对方发起
+    TARGET(2, "对方发起");
+
+    private final int code;
+
+    private final String name;
+
+    CooperateApplyTypeEnum(int code, String name){
+        this.code = code;
+        this.name = name;
+    }
+
+    public static CooperateApplyTypeEnum getName(int code) {
+        for (CooperateApplyTypeEnum cooperateApplyTypeEnum : values()) {
+            if (cooperateApplyTypeEnum.getCode() == code) {
+                return cooperateApplyTypeEnum;
+            }
+        }
+        return null;
+    }
+
+}

+ 44 - 0
sckw-common/sckw-common-core/src/main/java/com/sckw/core/model/enums/CooperateStatusEnum.java

@@ -0,0 +1,44 @@
+package com.sckw.core.model.enums;
+
+import lombok.Getter;
+
+import java.util.Map;
+
+/**
+ * @author czh
+ * @desc 合作状态
+ * @date 2023/6/15
+ */
+@Getter
+public enum CooperateStatusEnum {
+
+    //审核中
+    PROCESS(0, "审核中"),
+    //合作中
+    OK(1, "合作中"),
+    //已解除
+    PASS(2, "已解除"),
+    //已拒绝
+    REFUSE(3, "已驳回"),
+    //已撤销
+    CANCEL(4, "已撤销");
+
+    private final int code;
+
+    private final String name;
+
+    CooperateStatusEnum(int code, String name) {
+        this.code = code;
+        this.name = name;
+    }
+
+    public static String getName(int code) {
+        for (CooperateStatusEnum cooperateStatusEnum : values()) {
+            if (cooperateStatusEnum.getCode() == code) {
+                return cooperateStatusEnum.getName();
+            }
+        }
+        return null;
+    }
+
+}

+ 40 - 0
sckw-common/sckw-common-core/src/main/java/com/sckw/core/model/enums/CooperateTypeEnum.java

@@ -0,0 +1,40 @@
+package com.sckw.core.model.enums;
+
+import lombok.Getter;
+
+/**
+ * @author czh
+ * @desc 合作类型
+ * @date 2023/6/15
+ */
+@Getter
+public enum CooperateTypeEnum {
+
+    //供应商
+    SUPPLIER(1, "供应商"),
+    //采购商
+    PURCHASER(2, "采购商"),
+    //托运商
+    CONSIGN(3, "托运商"),
+    //承运商
+    CARRIAGE(4, "承运商");
+
+    private final int code;
+
+    private final String name;
+
+    CooperateTypeEnum(int code, String name){
+        this.code = code;
+        this.name = name;
+    }
+
+    public static CooperateTypeEnum getName(int code){
+        for (CooperateTypeEnum cooperateStatusEnum : values()) {
+            if (cooperateStatusEnum.getCode() == code) {
+                return cooperateStatusEnum;
+            }
+        }
+        return null;
+    }
+
+}

+ 95 - 0
sckw-common/sckw-common-core/src/main/java/com/sckw/core/model/enums/EntTypeEnum.java

@@ -0,0 +1,95 @@
+package com.sckw.core.model.enums;
+
+import com.sckw.core.model.constant.Global;
+import com.sckw.core.utils.StringUtils;
+import lombok.Getter;
+
+import java.util.ArrayList;
+import java.util.List;
+
+/**
+ * @author czh
+ * @desc 企业类型枚举
+ * @date 2023/6/15
+ */
+@Getter
+public enum EntTypeEnum {
+
+    //供应商
+    SUPPLIER(1, "供应商"),
+    //采购商
+    PURCHASER(2, "采购商"),
+    //4PL物流  托运 承运
+    LOGISTICS3(3, "4PL物流"),
+    //3PL物流  承运
+    LOGISTICS4(4, "3PL物流");
+
+    private final int code;
+
+    private final String name;
+
+    EntTypeEnum(int code, String name){
+        this.code = code;
+        this.name = name;
+    }
+
+    public static EntTypeEnum getName(int code) {
+        for (EntTypeEnum entTypeEnum : values()) {
+            if (entTypeEnum.getCode() == code) {
+                return entTypeEnum;
+            }
+        }
+        return null;
+    }
+
+    public static String getNames(String entTypes) {
+        List entNames = new ArrayList();
+        EntTypeEnum [] entTypeEnums = EntTypeEnum.values();
+        for (EntTypeEnum entTypeEnum:entTypeEnums) {
+            if (entTypes.contains(String.valueOf(entTypeEnum.getCode()))) {
+                entNames.add(entTypeEnum.getName());
+            }
+        }
+        return String.join(Global.COMMA, entNames);
+    }
+
+    /**
+     * @param entTypes 企业属性
+     * @desc 校验企业是否为托运单位(供应商、采购商、4P物流)
+     * @author zk
+     * @date 2023/10/7
+     **/
+    public static Boolean check(String entTypes) {
+        if (StringUtils.isBlank(entTypes)) {
+            return null;
+        }
+        return entTypes.contains(String.valueOf(EntTypeEnum.SUPPLIER.getCode()))
+                || entTypes.contains(String.valueOf(EntTypeEnum.PURCHASER.getCode()))
+                || entTypes.contains(String.valueOf(EntTypeEnum.LOGISTICS3.getCode()));
+    }
+
+    /**
+     * @param entTypes 企业属性
+     * @desc 校验企业是否为承运单位(4P物流、3P物流)
+     * @author zk
+     * @date 2023/10/7
+     **/
+    public static Boolean carrier(String entTypes) {
+        if (StringUtils.isBlank(entTypes)) {
+            return null;
+        }
+        return entTypes.contains(String.valueOf(EntTypeEnum.LOGISTICS3.getCode()))
+                || entTypes.contains(String.valueOf(EntTypeEnum.LOGISTICS4.getCode()));
+    }
+
+    /**
+     * @desc 获取企业是承运单位类型值(4P物流、3P物流)
+     * @author zk
+     * @date 2023/10/7
+     **/
+    public static String carrier() {
+        return EntTypeEnum.LOGISTICS3.getCode() + Global.COMMA + EntTypeEnum.LOGISTICS4.getCode();
+    }
+
+
+}

+ 35 - 0
sckw-common/sckw-common-core/src/main/java/com/sckw/core/model/enums/EntryTypeEnum.java

@@ -0,0 +1,35 @@
+package com.sckw.core.model.enums;
+
+import lombok.Getter;
+
+/**
+ * @author czh
+ * @desc 企业入驻方式
+ * @date 2023/6/15
+ */
+@Getter
+public enum EntryTypeEnum {
+
+    //自主入驻
+    SELF(1, "自主入驻"),
+    //平台接入
+    PLATFORM(2, "平台接入");
+
+    private final int code;
+
+    private final String name;
+
+    EntryTypeEnum(int code, String name){
+        this.code = code;
+        this.name = name;
+    }
+
+    public static EntryTypeEnum getName(int code) {
+        for (EntryTypeEnum entryTypeEnum : values()) {
+            if (entryTypeEnum.getCode() == code) {
+                return entryTypeEnum;
+            }
+        }
+        return null;
+    }
+}

+ 64 - 0
sckw-common/sckw-common-core/src/main/java/com/sckw/core/model/enums/GlobalTransactionalEnum.java

@@ -0,0 +1,64 @@
+package com.sckw.core.model.enums;
+
+import org.springframework.util.ObjectUtils;
+
+/**
+ * @author lfdc
+ * @version 1.0
+ * @className GlobalTransactionalEnum
+ * @description 全局事务枚举值
+ * @company sckw
+ * @date 2023-06-05 13:06:54
+ */
+public enum GlobalTransactionalEnum {
+    /**
+     * 默认全局事务
+     */
+    DEFAULT_TX_GROUP(1, "default_tx_group"),
+    /**
+     * 对应系统服务全局事务
+     */
+    SCKW_SYSTEM_SEATA_SERVICE_GROUP(2, "sckw-system-seata-service-group"),
+    /**
+     * 对应报表服务全局事务
+     */
+    SCKW_REPORT_SEATA_SERVICE_GROUP(3, "sckw-report-seata-service-group"),
+    /**
+     * 对应运输服务全局事务
+     */
+    SCKW_TRANSPORT_SEATA_SERVICE_GROUP(4, "sckw-transport-seata-service-group"),
+    ;
+
+    private final Integer code;
+    private final String name;
+
+    GlobalTransactionalEnum(Integer code, String name) {
+        this.code = code;
+        this.name = name;
+    }
+    public Integer getCode() {
+        return code;
+    }
+    public String getName() {
+        return name;
+    }
+    public static String getValue(Integer code) {
+        for (GlobalTransactionalEnum ele : GlobalTransactionalEnum.values()) {
+            if (ele.getCode().equals(code)) {
+                return ele.getName();
+            }
+        }
+        return null;
+    }
+    String getGlobalTransactionalEnum(Integer code) {
+        if (ObjectUtils.isEmpty(code)) {
+            return null;
+        }
+        for (GlobalTransactionalEnum globalTransactionalEnum : GlobalTransactionalEnum.values()) {
+            if (globalTransactionalEnum.getCode().equals(code)) {
+                return globalTransactionalEnum.getName();
+            }
+        }
+        return null;
+    }
+}

+ 44 - 0
sckw-common/sckw-common-core/src/main/java/com/sckw/core/model/enums/LoginMethodEnum.java

@@ -0,0 +1,44 @@
+package com.sckw.core.model.enums;
+
+/**
+ * @Description 登录类型枚举
+ * @Author zk
+ * @Date 2020/06/15
+ */
+public enum LoginMethodEnum {
+    ORDINARY(1, "账号密码登录"),
+    SMS(2,  "短信登录"),
+    ACCOUNT(3,  "账号登录");
+
+    private int value;
+
+    private String name;
+
+    /**
+     * @description 构造方法
+     * @author zk
+     * @date 2020/6/08 11:28
+     * @param value 键 name 值
+     * @return
+     **/
+    private LoginMethodEnum(int value, String name){
+        this.name = name;
+        this.value = value;
+    }
+
+    public int getValue() {
+        return value;
+    }
+
+    public void setValue(int value) {
+        this.value = value;
+    }
+
+    public String getName() {
+        return name;
+    }
+
+    public void setName(String name) {
+        this.name = name;
+    }
+}

+ 184 - 0
sckw-common/sckw-common-core/src/main/java/com/sckw/core/model/enums/LogisticsOrderEnum.java

@@ -0,0 +1,184 @@
+package com.sckw.core.model.enums;
+
+import com.sckw.core.model.constant.NumberConstant;
+import lombok.Getter;
+
+import java.util.ArrayList;
+import java.util.List;
+
+/**
+ * @author lfdc
+ * @description 物流订单-单据状态
+ * @date 2023-07-07 14:07:23
+ */
+@Getter
+public enum LogisticsOrderEnum {
+    /**
+     * 物流订单-待签约
+     */
+    TO_BE_PLANNED(0, "waitingSigning", "0", "待签约"),
+    /**
+     * 物流订单-待接单
+     */
+    PENDING_ORDER(1, "pendingOrder", "1", "待接单"),
+    /**
+     * 物流订单-待派车
+     */
+    WAIT_DELIVERY(2, "waitDelivery", "2", "待派车"),
+    /**
+     * 物流订单-运输中
+     */
+    IN_TRANSIT(3, "inTransit", "3", "运输中"),
+    /**
+     * 物流订单-已完成
+     */
+    //    WAIT_LOADING(4, "waitLoading", "4", "待装货"),
+//    WAIT_UNLOADING(5, "waitUnLoading", "5", "待卸货"),
+    HAVE_FINISHED(4, "haveFinished", "4", "已完成"),
+    /**
+     * 物流订单-已对账
+     */
+    HAVE_RECONCILED(5, "haveReconciled", "5", "已对账"),
+    /**
+     * 物流订单-已结算
+     */
+    HAVE_ALREADY_SETTLED(6, "haveAlreadySettled", "6", "已结算"),
+    /**
+     * 物流订单-已退回
+     */
+    SEND_BACK(7, "sendBack", "7", "已退回"),
+
+    REJECT_ORDER(8, "rejectOrder", "8", "已拒单"),
+
+    CANCEL_ORDER(9, "cancelOrder", "9", "已撤销"),
+    ;
+
+    private final Integer code;
+    private final String value;
+    private final String status;
+    private final String destination;
+
+    public Integer getCode() {
+        return code;
+    }
+
+    public String getValue() {
+        return value;
+    }
+
+    public String getStatus() {
+        return status;
+    }
+
+    public String getDestination() {
+        return destination;
+    }
+
+    LogisticsOrderEnum(Integer code, String value, String status, String destination) {
+        this.code = code;
+        this.value = value;
+        this.status = status;
+        this.destination = destination;
+    }
+
+    public static String getLogisticsOrderValue(Integer code) {
+        for (LogisticsOrderEnum logisticsOrderEnum : LogisticsOrderEnum.values()) {
+            if (logisticsOrderEnum.getCode().equals(code)) {
+                return logisticsOrderEnum.getValue();
+            }
+        }
+        return null;
+    }
+
+    public static String getName(Integer code) {
+        for (LogisticsOrderEnum logisticsOrderEnum : LogisticsOrderEnum.values()) {
+            if (logisticsOrderEnum.getCode().equals(code)) {
+                return logisticsOrderEnum.getDestination();
+            }
+        }
+        return null;
+    }
+
+    public static List<Integer> getCodeList() {
+        List<Integer> codeList = new ArrayList<>(NumberConstant.SIXTEEN);
+        for (LogisticsOrderEnum value : LogisticsOrderEnum.values()) {
+            codeList.add(value.getCode());
+        }
+        return codeList;
+    }
+
+    /**
+     * 获取所有的状态
+     *
+     * @return
+     */
+    public static List<String> getCodeStringList() {
+        List<String> codeList = new ArrayList<>(NumberConstant.SIXTEEN);
+        for (LogisticsOrderEnum value : LogisticsOrderEnum.values()) {
+            codeList.add(value.getStatus());
+        }
+        return codeList;
+    }
+
+
+    public static String getDestination(String status) {
+        for (LogisticsOrderEnum logisticsOrderEnum : LogisticsOrderEnum.values()) {
+            if (logisticsOrderEnum.getStatus().equals(status)) {
+                return logisticsOrderEnum.getDestination();
+            }
+        }
+        return null;
+    }
+
+    public static LogisticsOrderEnum getLogisticsOrderEnumByCode(Integer code) {
+        for (LogisticsOrderEnum logisticsOrderEnum : LogisticsOrderEnum.values()) {
+            if (logisticsOrderEnum.getCode().equals(code)) {
+                return logisticsOrderEnum;
+            }
+        }
+        return null;
+    }
+
+    public static LogisticsOrderEnum getEntityByCode(Integer code) {
+        for (LogisticsOrderEnum logisticsOrderEnum : LogisticsOrderEnum.values()) {
+            if (logisticsOrderEnum.getCode().equals(code)) {
+                return logisticsOrderEnum;
+            }
+        }
+        return null;
+    }
+
+    /**
+     * @param status 物流订单状态
+     * @description 校验物流订单是否运输完成
+     * @author zk
+     * @date 2023/7/31
+     **/
+    public static boolean transportCompleted(int status) {
+        if (status != LogisticsOrderEnum.HAVE_FINISHED.getCode()
+                && status != LogisticsOrderEnum.HAVE_RECONCILED.getCode()
+                && status != LogisticsOrderEnum.HAVE_ALREADY_SETTLED.getCode()) {
+            return false;
+        }
+        return true;
+    }
+
+
+    /**
+     * 获取编码以及注释
+     *
+     * @return
+     */
+    public static String getCodeAndDestination() {
+        StringBuilder sb = new StringBuilder();
+        for (LogisticsOrderEnum value : LogisticsOrderEnum.values()) {
+            sb.append(value.getCode()+":").append(value.destination).append(";");
+        }
+        return sb.toString();
+    }
+
+    public static void main(String[] args) {
+        String codeAndDestination = getCodeAndDestination();
+        System.out.println(codeAndDestination);
+    }
+}

+ 36 - 0
sckw-common/sckw-common-core/src/main/java/com/sckw/core/model/enums/MenuTypeEnum.java

@@ -0,0 +1,36 @@
+package com.sckw.core.model.enums;
+
+import lombok.Getter;
+
+/**
+ * @author czh
+ * @desc 菜单类型
+ * @date 2023/6/15
+ */
+@Getter
+public enum MenuTypeEnum {
+
+    //菜单
+    DIRECTORY(1, "菜单"),
+    //通过
+    BUTTON(2, "按钮");
+
+    private final int code;
+
+    private final String name;
+
+    MenuTypeEnum(int code, String name){
+        this.code = code;
+        this.name = name;
+    }
+
+    public static MenuTypeEnum getName(int code){
+        for (MenuTypeEnum menuTypeEnum : values()) {
+            if (menuTypeEnum.getCode() == code) {
+                return menuTypeEnum;
+            }
+        }
+        return null;
+    }
+
+}

+ 62 - 0
sckw-common/sckw-common-core/src/main/java/com/sckw/core/model/enums/OrderRuleEnum.java

@@ -0,0 +1,62 @@
+package com.sckw.core.model.enums;
+
+/**
+ * @author lfdc
+ * @description redis生成编号 key枚举定义
+ * @date 2023-08-25 15:07:23
+ */
+public enum OrderRuleEnum {
+
+    /**
+     * 物流订单
+     */
+    LOGISTICS_ORDER("logisticsOrder", "T", "物流订单业务类别"),
+
+    /**
+     * 贸易订单
+     */
+    TRADE_ORDER("tradeOrder", "B", "贸易订单业务类别"),
+
+    /**
+     * 运单
+     */
+    WAYBILL_ORDER("waybillOrder", "T", "运单业务类别"),
+
+    /**
+     * 对账
+     */
+    LEDGER_LOGISTICS_ORDER("ledgerLogisticsOrder", "TR", "物流对账业务类别"),
+    LEDGER_TRADE_ORDER("ledgerTradeOrder", "BR", "贸易对账业务类别"),
+
+    /**
+     * 结算
+     */
+    SETTLEMENT_LOGISTICS_ORDER("settlementLogisticsOrder", "TP", "物流结算业务类别"),
+    SETTLEMENT_TRADE_ORDER("settlementTradeOrder", "BP", "贸易结算业务类别")    ;
+
+
+    private final String value;
+    private final String code;
+    private final String destination;
+
+
+    OrderRuleEnum(String value, String code, String destination) {
+        this.value = value;
+        this.code = code;
+        this.destination = destination;
+    }
+
+    public String getValue() {
+        return value;
+    }
+
+    public String getCode() {
+        return code;
+    }
+
+    public String getDestination() {
+        return destination;
+    }
+
+
+}

+ 68 - 0
sckw-common/sckw-common-core/src/main/java/com/sckw/core/model/enums/ProjectStatusEnum.java

@@ -0,0 +1,68 @@
+package com.sckw.core.model.enums;
+
+import lombok.Getter;
+
+import java.util.HashMap;
+import java.util.Map;
+
+@Getter
+public enum ProjectStatusEnum {
+    /**
+     *
+     */
+    SET_UP(0, "立项"),
+    RUNNING(1, "施工中"),
+    FINISH(2, "已竣工"),
+    ;
+    public static Map<Integer, ProjectStatusEnum> MAPS = new HashMap<>();
+
+    static {
+        for (ProjectStatusEnum e : values()) {
+            MAPS.put(e.getCode(), e);
+        }
+    }
+
+    private final Integer code;
+    private final String name;
+
+    ProjectStatusEnum(Integer code, String name) {
+        this.code = code;
+        this.name = name;
+    }
+
+    public static ProjectStatusEnum codeOf(Integer code) {
+        for (ProjectStatusEnum logisticsOrderEnum : ProjectStatusEnum.values()) {
+            if (logisticsOrderEnum.getCode().equals(code)) {
+                return logisticsOrderEnum;
+            }
+        }
+        return null;
+    }
+
+    public static ProjectStatusEnum getProjectStatusEnumByCode(Integer code) {
+        for (ProjectStatusEnum logisticsOrderEnum : ProjectStatusEnum.values()) {
+            if (logisticsOrderEnum.getCode().equals(code)) {
+                return logisticsOrderEnum;
+            }
+        }
+        return null;
+    }
+
+    public static  String getDestination(Integer code){
+        for (ProjectStatusEnum logisticsOrderEnum : ProjectStatusEnum.values()) {
+            if (logisticsOrderEnum.getCode().equals(code)) {
+                return logisticsOrderEnum.getName();
+            }
+        }
+        return null;
+    }
+
+    public static  String getName(Integer code){
+        for (ProjectStatusEnum logisticsOrderEnum : ProjectStatusEnum.values()) {
+            if (logisticsOrderEnum.getCode().equals(code)) {
+                return logisticsOrderEnum.getName();
+            }
+        }
+        return null;
+    }
+}

+ 62 - 0
sckw-common/sckw-common-core/src/main/java/com/sckw/core/model/enums/RedisOrderGenerateEnum.java

@@ -0,0 +1,62 @@
+package com.sckw.core.model.enums;
+
+import lombok.Getter;
+
+/**
+ * @author lfdc
+ * @description redis生成编号 key枚举定义
+ * @date 2023-08-25 15:07:23
+ */
+@Getter
+public enum RedisOrderGenerateEnum {
+    /**
+     * 物流订单key
+     */
+    LOGISTICS_ORDER("logisticsOrder","logistics_order_no_generator:","物流订单key"),
+
+    /**
+     * 物流订单-分包key
+     */
+    LOGISTICS_SUBCONTRACT_ORDER("logisticsOrder","logistics_subcontract_order_no_generator:","物流订单-分包key"),
+
+    TRADE_ORDER("tradeOrder","trade_order_no_generator:","贸易订单key"),
+
+    /**
+     * 车辆运单key
+     */
+    WAYBILL_ORDER("waybillOrder","waybill_order_no_generator:","车辆运单key"),
+
+    /**
+     * 对账key
+     */
+    LEDGER_CHECKING("ledger","logistics_order_no_generator:","对账key"),
+    /**
+     * 结算key
+     */
+    SETTLEMENT_CHECKING("settlement","logistics_order_no_generator:","结算key"),
+    ;
+
+
+    private final String value;
+    private final String key;
+    private final String name;
+
+    public String getValue() {
+        return value;
+    }
+
+    public String getKey() {
+        return key;
+    }
+
+    public String getName() {
+        return name;
+    }
+
+    RedisOrderGenerateEnum(String value, String key, String name) {
+        this.value = value;
+        this.key = key;
+        this.name = name;
+    }
+
+}

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

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

+ 35 - 0
sckw-common/sckw-common-core/src/main/java/com/sckw/core/model/enums/SigningWayEnum.java

@@ -0,0 +1,35 @@
+package com.sckw.core.model.enums;
+
+import lombok.Getter;
+
+/**
+ * @author czh
+ * @desc 签约方式
+ * @date 2023/7/14
+ */
+@Getter
+public enum SigningWayEnum {
+
+    //线上签约
+    ONLINE(1, "线上签约"),
+    //线下签约
+    OFFLINE(2, "线下签约");
+
+    private final int code;
+
+    private final String name;
+
+    SigningWayEnum(int code, String name){
+        this.code = code;
+        this.name = name;
+    }
+
+    public static SigningWayEnum getName(int code){
+        for (SigningWayEnum signingWayEnum : values()) {
+            if (signingWayEnum.getCode() == code) {
+                return signingWayEnum;
+            }
+        }
+        return null;
+    }
+}

+ 36 - 0
sckw-common/sckw-common-core/src/main/java/com/sckw/core/model/enums/SystemTypeEnum.java

@@ -0,0 +1,36 @@
+package com.sckw.core.model.enums;
+
+import lombok.Getter;
+
+/**
+ * @author czh
+ * @desc 系统类型枚举
+ * @date 2023/6/15
+ */
+@Getter
+public enum SystemTypeEnum {
+    //运营端
+    MANAGE(1, "运营端"),
+    //企业开户
+    COMPANY(2, "企业端"),
+    //司机
+    DRIVER(3, "司机端");
+
+    private final Integer code;
+
+    private final String name;
+
+    SystemTypeEnum(Integer code, String name){
+        this.code = code;
+        this.name = name;
+    }
+
+    public static SystemTypeEnum getName(Integer code){
+        for (SystemTypeEnum systemTypeEnum : values()) {
+            if (systemTypeEnum.getCode().equals(code)) {
+                return systemTypeEnum;
+            }
+        }
+        return null;
+    }
+}

+ 49 - 0
sckw-common/sckw-common-core/src/main/java/com/sckw/core/model/enums/TaxRateTypeEnum.java

@@ -0,0 +1,49 @@
+package com.sckw.core.model.enums;
+
+import lombok.Data;
+
+/**
+ * desc 合理损耗单位
+ * author zk
+ * date 2023/9/4 0004
+ */
+public enum TaxRateTypeEnum {
+
+    //‰
+    PERCENT(0, "‰", 1000),
+    //%
+    MILLIMETER(1, "%", 100);
+
+    private final Integer code;
+
+    private final String name;
+
+    private final Integer value;
+
+    TaxRateTypeEnum(Integer code, String name, Integer value){
+        this.code = code;
+        this.name = name;
+        this.value = value;
+    }
+
+    public static TaxRateTypeEnum getName(Integer code){
+        for (TaxRateTypeEnum typeEnum : values()) {
+            if (typeEnum.getCode().equals(code)) {
+                return typeEnum;
+            }
+        }
+        return null;
+    }
+
+    public Integer getCode() {
+        return code;
+    }
+
+    public String getName() {
+        return name;
+    }
+
+    public Integer getValue() {
+        return value;
+    }
+}

Некоторые файлы не были показаны из-за большого количества измененных файлов