فهرست منبع

refactor: 以2021/07/03的生产版本为基础,进行仓库迁移

shc 4 سال پیش
والد
کامیت
3ca633644a
100فایلهای تغییر یافته به همراه7480 افزوده شده و 0 حذف شده
  1. 0 0
      LICENSE
  2. 1 0
      README.md
  3. BIN
      a.png
  4. 20 0
      db/1schema.sql
  5. 779 0
      db/2hnqzx.sql
  6. 45 0
      db/3hnqzx_ac.sql
  7. 97 0
      db/4hnqzx_job.sql
  8. 139 0
      db/5hnqzx_mp.sql
  9. 34 0
      db/6hnqzx_config.sql
  10. 31 0
      db/7hnqzx_pay.sql
  11. 40 0
      db/8hnqzx_codegen.sql
  12. 23 0
      db/Dockerfile
  13. 159 0
      db/v2.0/0205字段.sql
  14. 70 0
      db/v2.0/0205数据字典.sql
  15. 45 0
      db/v2.0/0217.sql
  16. 5 0
      db/v2.0/0302.sql
  17. 3 0
      db/v2.0/0311.sql
  18. 3 0
      db/v2.0/0323.sql
  19. 15 0
      db/v2.0/0327.sql
  20. 15 0
      db/v2.0/0406.sql
  21. 4 0
      db/v2.0/0426.sql
  22. 19 0
      db/v2.0/0428.sql
  23. 52 0
      db/v2.0/0510.sql
  24. 3 0
      db/v2.0/0524.sql
  25. 26 0
      db/v2.0/0528.sql
  26. 35 0
      db/v2.0/0531.sql
  27. 63 0
      db/v2.0/0604.sql
  28. 8 0
      db/v2.0/0616.sql
  29. 6 0
      db/v2.0/0619.sql
  30. 17 0
      db/v2.0/0621.sql
  31. 35 0
      db/v2.0/1-update.sql
  32. 51 0
      db/v2.0/12-01.sql
  33. 46 0
      db/v2.0/2-create.sql
  34. 3 0
      db/v2.0/623.sql
  35. 38 0
      db/v2121.4.16/1.sql
  36. 20 0
      db/v2121.4.16/2.sql
  37. 18 0
      db/v2121.4.16/3.sql
  38. 7 0
      db/v2121.4.16/README.md
  39. 148 0
      docker-compose.yml
  40. 18 0
      hnqz-auth/Dockerfile
  41. 256 0
      hnqz-auth/hnqz-auth.iml
  42. 129 0
      hnqz-auth/pom.xml
  43. 38 0
      hnqz-auth/src/main/java/com/qunzhixinxi/hnqz/auth/HnqzAuthApplication.java
  44. 125 0
      hnqz-auth/src/main/java/com/qunzhixinxi/hnqz/auth/config/AuthorizationServerConfig.java
  45. 427 0
      hnqz-auth/src/main/java/com/qunzhixinxi/hnqz/auth/config/HnqzTokenServices.java
  46. 103 0
      hnqz-auth/src/main/java/com/qunzhixinxi/hnqz/auth/config/WebSecurityConfigurer.java
  47. 213 0
      hnqz-auth/src/main/java/com/qunzhixinxi/hnqz/auth/endpoint/HnqzTokenEndpoint.java
  48. 77 0
      hnqz-auth/src/main/java/com/qunzhixinxi/hnqz/auth/handler/HnqzAuthenticationFailureEventHandler.java
  49. 69 0
      hnqz-auth/src/main/java/com/qunzhixinxi/hnqz/auth/handler/HnqzAuthenticationSuccessEventHandler.java
  50. 41 0
      hnqz-auth/src/main/java/com/qunzhixinxi/hnqz/auth/service/HnqzClientDetailsServiceImpl.java
  51. 123 0
      hnqz-auth/src/main/java/com/qunzhixinxi/hnqz/auth/service/HnqzUserDetailsServiceImpl.java
  52. 17 0
      hnqz-auth/src/main/resources/bootstrap.yml
  53. 87 0
      hnqz-auth/src/main/resources/logback-spring.xml
  54. 4 0
      hnqz-auth/src/main/resources/static/css/bootstrap.min.css
  55. 67 0
      hnqz-auth/src/main/resources/static/css/signin.css
  56. 51 0
      hnqz-auth/src/main/resources/templates/ftl/confirm.ftl
  57. 34 0
      hnqz-auth/src/main/resources/templates/ftl/login.ftl
  58. 12 0
      hnqz-common/hnqz-common-bom/hnqz-common-bom.iml
  59. 255 0
      hnqz-common/hnqz-common-bom/pom.xml
  60. 98 0
      hnqz-common/hnqz-common-core/hnqz-common-core.iml
  61. 70 0
      hnqz-common/hnqz-common-core/pom.xml
  62. 44 0
      hnqz-common/hnqz-common-core/src/main/java/com/qunzhixinxi/hnqz/common/core/config/JacksonConfig.java
  63. 41 0
      hnqz-common/hnqz-common-core/src/main/java/com/qunzhixinxi/hnqz/common/core/config/MessageSourceConfig.java
  64. 36 0
      hnqz-common/hnqz-common-core/src/main/java/com/qunzhixinxi/hnqz/common/core/config/RestTemplateConfig.java
  65. 83 0
      hnqz-common/hnqz-common-core/src/main/java/com/qunzhixinxi/hnqz/common/core/constant/CacheConstants.java
  66. 103 0
      hnqz-common/hnqz-common-core/src/main/java/com/qunzhixinxi/hnqz/common/core/constant/CommonConstants.java
  67. 21 0
      hnqz-common/hnqz-common-core/src/main/java/com/qunzhixinxi/hnqz/common/core/constant/PaginationConstants.java
  68. 215 0
      hnqz-common/hnqz-common-core/src/main/java/com/qunzhixinxi/hnqz/common/core/constant/SecurityConstants.java
  69. 43 0
      hnqz-common/hnqz-common-core/src/main/java/com/qunzhixinxi/hnqz/common/core/constant/ServiceNameConstants.java
  70. 36 0
      hnqz-common/hnqz-common-core/src/main/java/com/qunzhixinxi/hnqz/common/core/constant/enums/DictTypeEnum.java
  71. 81 0
      hnqz-common/hnqz-common-core/src/main/java/com/qunzhixinxi/hnqz/common/core/constant/enums/LoginTypeEnum.java
  72. 41 0
      hnqz-common/hnqz-common-core/src/main/java/com/qunzhixinxi/hnqz/common/core/constant/enums/MenuTypeEnum.java
  73. 51 0
      hnqz-common/hnqz-common-core/src/main/java/com/qunzhixinxi/hnqz/common/core/constant/enums/ProcessStatusEnum.java
  74. 51 0
      hnqz-common/hnqz-common-core/src/main/java/com/qunzhixinxi/hnqz/common/core/constant/enums/ResourceTypeEnum.java
  75. 36 0
      hnqz-common/hnqz-common-core/src/main/java/com/qunzhixinxi/hnqz/common/core/constant/enums/StyleTypeEnum.java
  76. 61 0
      hnqz-common/hnqz-common-core/src/main/java/com/qunzhixinxi/hnqz/common/core/constant/enums/TaskStatusEnum.java
  77. 49 0
      hnqz-common/hnqz-common-core/src/main/java/com/qunzhixinxi/hnqz/common/core/exception/CheckedException.java
  78. 37 0
      hnqz-common/hnqz-common-core/src/main/java/com/qunzhixinxi/hnqz/common/core/exception/ValidateCodeException.java
  79. 52 0
      hnqz-common/hnqz-common-core/src/main/java/com/qunzhixinxi/hnqz/common/core/jackson/HnqzJavaTimeModule.java
  80. 60 0
      hnqz-common/hnqz-common-core/src/main/java/com/qunzhixinxi/hnqz/common/core/sensitive/Sensitive.java
  81. 109 0
      hnqz-common/hnqz-common-core/src/main/java/com/qunzhixinxi/hnqz/common/core/sensitive/SensitiveSerialize.java
  82. 69 0
      hnqz-common/hnqz-common-core/src/main/java/com/qunzhixinxi/hnqz/common/core/sensitive/SensitiveTypeEnum.java
  83. 113 0
      hnqz-common/hnqz-common-core/src/main/java/com/qunzhixinxi/hnqz/common/core/util/ClassUtils.java
  84. 171 0
      hnqz-common/hnqz-common-core/src/main/java/com/qunzhixinxi/hnqz/common/core/util/DesensitizedUtils.java
  85. 97 0
      hnqz-common/hnqz-common-core/src/main/java/com/qunzhixinxi/hnqz/common/core/util/R.java
  86. 100 0
      hnqz-common/hnqz-common-core/src/main/java/com/qunzhixinxi/hnqz/common/core/util/SpringContextHolder.java
  87. 252 0
      hnqz-common/hnqz-common-core/src/main/java/com/qunzhixinxi/hnqz/common/core/util/WebUtils.java
  88. 5 0
      hnqz-common/hnqz-common-core/src/main/resources/META-INF/spring.factories
  89. 20 0
      hnqz-common/hnqz-common-core/src/main/resources/banner.txt
  90. 0 0
      hnqz-common/hnqz-common-core/src/main/resources/i18n/messages_zh_CN.properties
  91. 175 0
      hnqz-common/hnqz-common-data/hnqz-common-data.iml
  92. 63 0
      hnqz-common/hnqz-common-data/pom.xml
  93. 277 0
      hnqz-common/hnqz-common-data/src/main/java/com/qunzhixinxi/hnqz/common/data/cache/DefaultRedisCacheWriter.java
  94. 88 0
      hnqz-common/hnqz-common-data/src/main/java/com/qunzhixinxi/hnqz/common/data/cache/RedisAutoCacheManager.java
  95. 115 0
      hnqz-common/hnqz-common-data/src/main/java/com/qunzhixinxi/hnqz/common/data/cache/RedisCacheAutoConfiguration.java
  96. 44 0
      hnqz-common/hnqz-common-data/src/main/java/com/qunzhixinxi/hnqz/common/data/cache/RedisCacheManagerConfig.java
  97. 53 0
      hnqz-common/hnqz-common-data/src/main/java/com/qunzhixinxi/hnqz/common/data/cache/RedisTemplateConfig.java
  98. 59 0
      hnqz-common/hnqz-common-data/src/main/java/com/qunzhixinxi/hnqz/common/data/datascope/DataScope.java
  99. 55 0
      hnqz-common/hnqz-common-data/src/main/java/com/qunzhixinxi/hnqz/common/data/datascope/DataScopeFuncEnum.java
  100. 37 0
      hnqz-common/hnqz-common-data/src/main/java/com/qunzhixinxi/hnqz/common/data/datascope/DataScopeHandle.java

+ 0 - 0
LICENSE


+ 1 - 0
README.md

@@ -0,0 +1 @@
+## 协议和授权


+ 20 - 0
db/1schema.sql

@@ -0,0 +1,20 @@
+-- hnqz 核心表
+create database `hnqzx` default character set utf8mb4 collate utf8mb4_general_ci;
+
+-- hnqz 工作流相关库
+create database `hnqzx_ac` default character set utf8mb4 collate utf8mb4_general_ci;
+
+-- hnqz 任务相关库
+create database `hnqzx_job` default character set utf8mb4 collate utf8mb4_general_ci;
+
+-- hnqz 公众号管理相关库
+create database `hnqzx_mp` default character set utf8mb4 collate utf8mb4_general_ci;
+
+-- hnqz nacos配置相关库
+create database `hnqzx_config` default character set utf8mb4 collate utf8mb4_general_ci;
+
+-- hnqz pay配置相关库
+create database `hnqzx_pay` default character set utf8mb4 collate utf8mb4_general_ci;
+
+-- hnqz codegen相关库
+create database `hnqzx_codegen` default character set utf8mb4 collate utf8mb4_general_ci;

+ 779 - 0
db/2hnqzx.sql

@@ -0,0 +1,779 @@
+USE hnqzx;
+
+SET NAMES utf8mb4;
+SET FOREIGN_KEY_CHECKS = 0;
+
+-- ----------------------------
+-- Table structure for sys_dept
+-- ----------------------------
+DROP TABLE IF EXISTS `sys_dept`;
+CREATE TABLE `sys_dept` (
+  `dept_id` int(20) NOT NULL AUTO_INCREMENT,
+  `name` varchar(50) DEFAULT NULL,
+  `sort` int(11) NOT NULL DEFAULT '0' COMMENT '排序',
+  `create_time` datetime NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
+  `update_time` datetime NULL DEFAULT NULL ON UPDATE CURRENT_TIMESTAMP COMMENT '修改时间',
+  `del_flag` char(1) DEFAULT '0',
+  `parent_id` int(11) DEFAULT NULL,
+  `tenant_id` int(11) DEFAULT NULL,
+  PRIMARY KEY (`dept_id`) USING BTREE
+) ENGINE=InnoDB AUTO_INCREMENT=9 DEFAULT CHARSET=utf8mb4 COMMENT='部门管理';
+
+-- ----------------------------
+-- Records of sys_dept
+-- ----------------------------
+BEGIN;
+INSERT INTO `sys_dept` VALUES (1, '山东', 1, '2018-01-22 19:00:23', '2019-05-18 14:56:06', '0', 0, 1);
+INSERT INTO `sys_dept` VALUES (2, '沙县国际', 2, '2018-01-22 19:00:38', '2019-05-18 14:12:07', '0', 0, 1);
+INSERT INTO `sys_dept` VALUES (3, '潍坊', 3, '2018-01-22 19:00:44', '2019-05-18 14:56:11', '0', 1, 1);
+INSERT INTO `sys_dept` VALUES (4, '高新', 4, '2018-01-22 19:00:52', '2019-05-18 14:56:09', '0', 3, 1);
+INSERT INTO `sys_dept` VALUES (5, '院校', 5, '2018-01-22 19:00:57', '2019-05-18 14:56:13', '0', 4, 1);
+INSERT INTO `sys_dept` VALUES (6, '潍院', 6, '2018-01-22 19:01:06', '2019-05-18 14:56:16', '1', 5, 1);
+INSERT INTO `sys_dept` VALUES (7, '山东沙县', 7, '2018-01-22 19:01:57', '2019-05-18 14:12:17', '0', 2, 1);
+INSERT INTO `sys_dept` VALUES (8, '潍坊沙县', 8, '2018-01-22 19:02:03', '2019-05-18 14:12:19', '0', 7, 1);
+COMMIT;
+
+-- ----------------------------
+-- Table structure for sys_dept_relation
+-- ----------------------------
+DROP TABLE IF EXISTS `sys_dept_relation`;
+CREATE TABLE `sys_dept_relation` (
+  `ancestor` int(11) NOT NULL COMMENT '祖先节点',
+  `descendant` int(11) NOT NULL COMMENT '后代节点',
+  PRIMARY KEY (`ancestor`,`descendant`) USING BTREE,
+  KEY `idx1` (`ancestor`) USING BTREE,
+  KEY `idx2` (`descendant`) USING BTREE
+) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='部门关系表';
+
+-- ----------------------------
+-- Records of sys_dept_relation
+-- ----------------------------
+BEGIN;
+INSERT INTO `sys_dept_relation` VALUES (1, 1);
+INSERT INTO `sys_dept_relation` VALUES (1, 3);
+INSERT INTO `sys_dept_relation` VALUES (1, 4);
+INSERT INTO `sys_dept_relation` VALUES (1, 5);
+INSERT INTO `sys_dept_relation` VALUES (2, 2);
+INSERT INTO `sys_dept_relation` VALUES (2, 7);
+INSERT INTO `sys_dept_relation` VALUES (2, 8);
+INSERT INTO `sys_dept_relation` VALUES (2, 11);
+INSERT INTO `sys_dept_relation` VALUES (2, 12);
+INSERT INTO `sys_dept_relation` VALUES (3, 3);
+INSERT INTO `sys_dept_relation` VALUES (3, 4);
+INSERT INTO `sys_dept_relation` VALUES (3, 5);
+INSERT INTO `sys_dept_relation` VALUES (4, 4);
+INSERT INTO `sys_dept_relation` VALUES (4, 5);
+INSERT INTO `sys_dept_relation` VALUES (5, 5);
+INSERT INTO `sys_dept_relation` VALUES (7, 7);
+INSERT INTO `sys_dept_relation` VALUES (7, 8);
+INSERT INTO `sys_dept_relation` VALUES (7, 11);
+INSERT INTO `sys_dept_relation` VALUES (7, 12);
+INSERT INTO `sys_dept_relation` VALUES (8, 8);
+COMMIT;
+
+
+-- ----------------------------
+-- Table structure for sys_dict
+-- ----------------------------
+DROP TABLE IF EXISTS `sys_dict`;
+CREATE TABLE `sys_dict` (
+  `id` int(64) NOT NULL AUTO_INCREMENT COMMENT '编号',
+  `type` varchar(100) DEFAULT NULL,
+  `description` varchar(100) DEFAULT NULL,
+  `create_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
+  `update_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间',
+  `remarks` varchar(255) DEFAULT NULL,
+  `system` char(1) DEFAULT '0',
+  `del_flag` char(1) DEFAULT '0',
+  `tenant_id` int(11) NOT NULL DEFAULT '0' COMMENT '所属租户',
+  PRIMARY KEY (`id`) USING BTREE,
+  KEY `sys_dict_del_flag` (`del_flag`) USING BTREE
+) ENGINE=InnoDB AUTO_INCREMENT=19 DEFAULT CHARSET=utf8mb4 COMMENT='字典表';
+
+-- ----------------------------
+-- Records of sys_dict
+-- ----------------------------
+BEGIN;
+INSERT INTO `sys_dict` VALUES (1, 'log_type', '日志类型', '2019-03-19 11:06:44', '2019-03-19 11:06:44', '异常、正常', '1', '0', 1);
+INSERT INTO `sys_dict` VALUES (2, 'social_type', '社交登录', '2019-03-19 11:09:44', '2019-03-19 11:09:44', '微信、QQ', '1', '0', 1);
+INSERT INTO `sys_dict` VALUES (3, 'leave_status', '请假状态', '2019-03-19 11:09:44', '2019-03-19 11:09:44', '未提交、审批中、完成、驳回', '1', '0', 1);
+INSERT INTO `sys_dict` VALUES (4, 'job_type', '定时任务类型', '2019-03-19 11:22:21', '2019-03-19 11:22:21', 'quartz', '1', '0', 1);
+INSERT INTO `sys_dict` VALUES (5, 'job_status', '定时任务状态', '2019-03-19 11:24:57', '2019-03-19 11:24:57', '发布状态、运行状态', '1', '0', 1);
+INSERT INTO `sys_dict` VALUES (6, 'job_execute_status', '定时任务执行状态', '2019-03-19 11:26:15', '2019-03-19 11:26:15', '正常、异常', '1', '0', 1);
+INSERT INTO `sys_dict` VALUES (7, 'misfire_policy', '定时任务错失执行策略', '2019-03-19 11:27:19', '2019-03-19 11:27:19', '周期', '1', '0', 1);
+INSERT INTO `sys_dict` VALUES (8, 'gender', '性别', '2019-03-27 13:44:06', '2019-03-27 13:44:06', '微信用户性别', '1', '0', 1);
+INSERT INTO `sys_dict` VALUES (9, 'subscribe', '订阅状态', '2019-03-27 13:48:33', '2019-03-27 13:48:33', '公众号订阅状态', '1', '0', 1);
+INSERT INTO `sys_dict` VALUES (10, 'response_type', '回复', '2019-03-28 21:29:21', '2019-03-28 21:29:21', '微信消息是否已回复', '1', '0', 1);
+INSERT INTO `sys_dict` VALUES (11, 'param_type', '参数配置', '2019-04-29 18:20:47', '2019-04-29 18:20:47', '检索、原文、报表、安全、文档、消息、其他', '1', '0', 1);
+INSERT INTO `sys_dict` VALUES (12, 'status_type', '租户状态', '2019-05-15 16:31:08', '2019-05-15 16:31:08', '租户状态', '1', '0', 1);
+INSERT INTO `sys_dict` VALUES (13, 'dict_type', '字典类型', '2019-05-16 14:16:20', '2019-05-16 14:20:16', '系统类不能修改', '1', '0', 1);
+INSERT INTO `sys_dict` VALUES (14, 'channel_status', '支付渠道状态', '2019-05-30 16:14:43', '2019-05-30 16:14:43', '支付渠道状态(0-正常,1-冻结)', '1', '0', 1);
+INSERT INTO `sys_dict` VALUES (15, 'channel_id', '渠道编码ID', '2019-05-30 18:59:12', '2019-05-30 18:59:12', '不同的支付方式', '1', '0', 1);
+INSERT INTO `sys_dict` VALUES (16, 'order_status', '订单状态', '2019-06-27 08:17:40', '2019-06-27 08:17:40', '支付订单状态', '1', '0', 1);
+INSERT INTO `sys_dict` VALUES (17, 'grant_types', '授权类型', '2019-08-13 07:34:10', '2019-08-13 07:34:10', NULL, '1', '0', 1);
+INSERT INTO `sys_dict` VALUES (18, 'style_type', '前端风格', '2020-02-07 03:49:28', '2020-02-07 03:50:40', '0-Avue 1-element', '1', '0', 1);
+COMMIT;
+
+-- ----------------------------
+-- Table structure for sys_dict_item
+-- ----------------------------
+DROP TABLE IF EXISTS `sys_dict_item`;
+CREATE TABLE `sys_dict_item` (
+  `id` int(64) NOT NULL AUTO_INCREMENT COMMENT '编号',
+  `dict_id` int(11) NOT NULL,
+  `value` varchar(100) DEFAULT NULL,
+  `label` varchar(100) DEFAULT NULL,
+  `type` varchar(100) DEFAULT NULL,
+  `description` varchar(100) DEFAULT NULL,
+  `sort` int(10) NOT NULL DEFAULT '0' COMMENT '排序(升序)',
+  `create_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
+  `update_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间',
+  `remarks` varchar(255) DEFAULT NULL,
+  `del_flag` char(1) DEFAULT '0',
+  `tenant_id` int(11) NOT NULL DEFAULT '0' COMMENT '所属租户',
+  PRIMARY KEY (`id`) USING BTREE,
+  KEY `sys_dict_value` (`value`) USING BTREE,
+  KEY `sys_dict_label` (`label`) USING BTREE,
+  KEY `sys_dict_del_flag` (`del_flag`) USING BTREE
+) ENGINE=InnoDB AUTO_INCREMENT=58 DEFAULT CHARSET=utf8mb4 COMMENT='字典项';
+
+-- ----------------------------
+-- Records of sys_dict_item
+-- ----------------------------
+BEGIN;
+INSERT INTO `sys_dict_item` VALUES (1, 1, '9', '异常', 'log_type', '日志异常', 1, '2019-03-19 11:08:59', '2019-03-25 12:49:13', '', '0', 1);
+INSERT INTO `sys_dict_item` VALUES (2, 1, '0', '正常', 'log_type', '日志正常', 0, '2019-03-19 11:09:17', '2019-03-25 12:49:18', '', '0', 1);
+INSERT INTO `sys_dict_item` VALUES (3, 2, 'WX', '微信', 'social_type', '微信登录', 0, '2019-03-19 11:10:02', '2019-03-25 12:49:36', '', '0', 1);
+INSERT INTO `sys_dict_item` VALUES (4, 2, 'QQ', 'QQ', 'social_type', 'QQ登录', 1, '2019-03-19 11:10:14', '2019-03-25 12:49:36', '', '0', 1);
+INSERT INTO `sys_dict_item` VALUES (5, 3, '0', '未提交', 'leave_status', '未提交', 0, '2019-03-19 11:18:34', '2019-03-25 12:49:36', '', '0', 1);
+INSERT INTO `sys_dict_item` VALUES (6, 3, '1', '审批中', 'leave_status', '审批中', 1, '2019-03-19 11:18:45', '2019-03-25 12:49:36', '', '0', 1);
+INSERT INTO `sys_dict_item` VALUES (7, 3, '2', '完成', 'leave_status', '完成', 2, '2019-03-19 11:19:02', '2019-03-25 12:49:36', '', '0', 1);
+INSERT INTO `sys_dict_item` VALUES (8, 3, '9', '驳回', 'leave_status', '驳回', 9, '2019-03-19 11:19:20', '2019-03-25 12:49:36', '', '0', 1);
+INSERT INTO `sys_dict_item` VALUES (9, 4, '1', 'java类', 'job_type', 'java类', 1, '2019-03-19 11:22:37', '2019-03-25 12:49:36', '', '0', 1);
+INSERT INTO `sys_dict_item` VALUES (10, 4, '2', 'spring bean', 'job_type', 'spring bean容器实例', 2, '2019-03-19 11:23:05', '2019-03-25 12:49:36', '', '0', 1);
+INSERT INTO `sys_dict_item` VALUES (11, 4, '9', '其他', 'job_type', '其他类型', 9, '2019-03-19 11:23:31', '2019-03-25 12:49:36', '', '0', 1);
+INSERT INTO `sys_dict_item` VALUES (12, 4, '3', 'Rest 调用', 'job_type', 'Rest 调用', 3, '2019-03-19 11:23:57', '2019-03-25 12:49:36', '', '0', 1);
+INSERT INTO `sys_dict_item` VALUES (13, 4, '4', 'jar', 'job_type', 'jar类型', 4, '2019-03-19 11:24:20', '2019-03-25 12:49:36', '', '0', 1);
+INSERT INTO `sys_dict_item` VALUES (14, 5, '1', '未发布', 'job_status', '未发布', 1, '2019-03-19 11:25:18', '2019-03-25 12:49:36', '', '0', 1);
+INSERT INTO `sys_dict_item` VALUES (15, 5, '2', '运行中', 'job_status', '运行中', 2, '2019-03-19 11:25:31', '2019-03-25 12:49:36', '', '0', 1);
+INSERT INTO `sys_dict_item` VALUES (16, 5, '3', '暂停', 'job_status', '暂停', 3, '2019-03-19 11:25:42', '2019-03-25 12:49:36', '', '0', 1);
+INSERT INTO `sys_dict_item` VALUES (17, 6, '0', '正常', 'job_execute_status', '正常', 0, '2019-03-19 11:26:27', '2019-03-25 12:49:36', '', '0', 1);
+INSERT INTO `sys_dict_item` VALUES (18, 6, '1', '异常', 'job_execute_status', '异常', 1, '2019-03-19 11:26:41', '2019-03-25 12:49:36', '', '0', 1);
+INSERT INTO `sys_dict_item` VALUES (19, 7, '1', '错失周期立即执行', 'misfire_policy', '错失周期立即执行', 1, '2019-03-19 11:27:45', '2019-03-25 12:49:36', '', '0', 1);
+INSERT INTO `sys_dict_item` VALUES (20, 7, '2', '错失周期执行一次', 'misfire_policy', '错失周期执行一次', 2, '2019-03-19 11:27:57', '2019-03-25 12:49:36', '', '0', 1);
+INSERT INTO `sys_dict_item` VALUES (21, 7, '3', '下周期执行', 'misfire_policy', '下周期执行', 3, '2019-03-19 11:28:08', '2019-03-25 12:49:36', '', '0', 1);
+INSERT INTO `sys_dict_item` VALUES (22, 8, '1', '男', 'gender', '微信-男', 0, '2019-03-27 13:45:13', '2019-03-27 13:45:13', '微信-男', '0', 1);
+INSERT INTO `sys_dict_item` VALUES (23, 8, '2', '女', 'gender', '女-微信', 1, '2019-03-27 13:45:34', '2019-03-27 13:45:34', '女-微信', '0', 1);
+INSERT INTO `sys_dict_item` VALUES (24, 8, '0', '未知', 'gender', 'x性别未知', 3, '2019-03-27 13:45:57', '2019-03-27 13:45:57', 'x性别未知', '0', 1);
+INSERT INTO `sys_dict_item` VALUES (25, 9, '0', '未关注', 'subscribe', '公众号-未关注', 0, '2019-03-27 13:49:07', '2019-03-27 13:49:07', '公众号-未关注', '0', 1);
+INSERT INTO `sys_dict_item` VALUES (26, 9, '1', '已关注', 'subscribe', '公众号-已关注', 1, '2019-03-27 13:49:26', '2019-03-27 13:49:26', '公众号-已关注', '0', 1);
+INSERT INTO `sys_dict_item` VALUES (27, 10, '0', '未回复', 'response_type', '微信消息-未回复', 0, '2019-03-28 21:29:47', '2019-03-28 21:29:47', '微信消息-未回复', '0', 1);
+INSERT INTO `sys_dict_item` VALUES (28, 10, '1', '已回复', 'response_type', '微信消息-已回复', 1, '2019-03-28 21:30:08', '2019-03-28 21:30:08', '微信消息-已回复', '0', 1);
+INSERT INTO `sys_dict_item` VALUES (29, 11, '1', '检索', 'param_type', '检索', 0, '2019-04-29 18:22:17', '2019-04-29 18:22:17', '检索', '0', 1);
+INSERT INTO `sys_dict_item` VALUES (30, 11, '2', '原文', 'param_type', '原文', 0, '2019-04-29 18:22:27', '2019-04-29 18:22:27', '原文', '0', 1);
+INSERT INTO `sys_dict_item` VALUES (31, 11, '3', '报表', 'param_type', '报表', 0, '2019-04-29 18:22:36', '2019-04-29 18:22:36', '报表', '0', 1);
+INSERT INTO `sys_dict_item` VALUES (32, 11, '4', '安全', 'param_type', '安全', 0, '2019-04-29 18:22:46', '2019-04-29 18:22:46', '安全', '0', 1);
+INSERT INTO `sys_dict_item` VALUES (33, 11, '5', '文档', 'param_type', '文档', 0, '2019-04-29 18:22:56', '2019-04-29 18:22:56', '文档', '0', 1);
+INSERT INTO `sys_dict_item` VALUES (34, 11, '6', '消息', 'param_type', '消息', 0, '2019-04-29 18:23:05', '2019-04-29 18:23:05', '消息', '0', 1);
+INSERT INTO `sys_dict_item` VALUES (35, 11, '9', '其他', 'param_type', '其他', 0, '2019-04-29 18:23:16', '2019-04-29 18:23:16', '其他', '0', 1);
+INSERT INTO `sys_dict_item` VALUES (36, 11, '0', '默认', 'param_type', '默认', 0, '2019-04-29 18:23:30', '2019-04-29 18:23:30', '默认', '0', 1);
+INSERT INTO `sys_dict_item` VALUES (37, 12, '0', '正常', 'status_type', '状态正常', 0, '2019-05-15 16:31:34', '2019-05-16 22:30:46', '状态正常', '0', 1);
+INSERT INTO `sys_dict_item` VALUES (38, 12, '9', '冻结', 'status_type', '状态冻结', 1, '2019-05-15 16:31:56', '2019-05-16 22:30:50', '状态冻结', '0', 1);
+INSERT INTO `sys_dict_item` VALUES (39, 13, '1', '系统类', 'dict_type', '系统类字典', 0, '2019-05-16 14:20:40', '2019-05-16 14:20:40', '不能修改删除', '0', 1);
+INSERT INTO `sys_dict_item` VALUES (40, 13, '0', '业务类', 'dict_type', '业务类字典', 0, '2019-05-16 14:20:59', '2019-05-16 14:20:59', '可以修改', '0', 1);
+INSERT INTO `sys_dict_item` VALUES (41, 14, '0', '正常', 'channel_status', '支付渠道状态正常', 0, '2019-05-30 16:16:51', '2019-05-30 16:16:51', NULL, '0', 1);
+INSERT INTO `sys_dict_item` VALUES (42, 14, '1', '冻结', 'channel_status', '支付渠道冻结', 0, '2019-05-30 16:17:08', '2019-05-30 16:17:08', NULL, '0', 1);
+INSERT INTO `sys_dict_item` VALUES (43, 15, 'ALIPAY_WAP', '支付宝wap支付', 'channel_id', '支付宝扫码支付', 0, '2019-05-30 19:03:16', '2019-06-18 13:51:42', '支付宝wap支付', '0', 1);
+INSERT INTO `sys_dict_item` VALUES (44, 15, 'WEIXIN_MP', '微信公众号支付', 'channel_id', '微信公众号支付', 1, '2019-05-30 19:08:08', '2019-06-18 13:51:53', '微信公众号支付', '0', 1);
+INSERT INTO `sys_dict_item` VALUES (45, 16, '1', '支付成功', 'order_status', '支付成功', 1, '2019-06-27 08:18:26', '2019-06-27 08:18:26', '订单支付成功', '0', 1);
+INSERT INTO `sys_dict_item` VALUES (46, 16, '2', '支付完成', 'order_status', '订单支付完成', 2, '2019-06-27 08:18:44', '2019-06-27 08:18:44', '订单支付完成', '0', 1);
+INSERT INTO `sys_dict_item` VALUES (47, 16, '0', '待支付', 'order_status', '订单待支付', 0, '2019-06-27 08:19:02', '2019-06-27 08:19:02', '订单待支付', '0', 1);
+INSERT INTO `sys_dict_item` VALUES (48, 16, '-1', '支付失败', 'order_status', '订单支付失败', 3, '2019-06-27 08:19:37', '2019-06-27 08:19:37', '订单支付失败', '0', 1);
+INSERT INTO `sys_dict_item` VALUES (49, 2, 'GITEE', '码云', 'social_type', '码云', 2, '2019-06-28 09:59:12', '2019-06-28 09:59:12', '码云', '0', 1);
+INSERT INTO `sys_dict_item` VALUES (50, 2, 'OSC', '开源中国', 'social_type', '开源中国登录', 0, '2019-06-28 10:04:32', '2019-06-28 10:04:32', 'http://gitee.huaxiadaowei.com/#/authredirect', '0', 1);
+INSERT INTO `sys_dict_item` VALUES (51, 17, 'password', '密码模式', 'grant_types', '支持oauth密码模式', 0, '2019-08-13 07:35:28', '2019-08-13 07:35:28', NULL, '0', 1);
+INSERT INTO `sys_dict_item` VALUES (52, 17, 'authorization_code', '授权码模式', 'grant_types', 'oauth2 授权码模式', 1, '2019-08-13 07:36:07', '2019-08-13 07:36:07', NULL, '0', 1);
+INSERT INTO `sys_dict_item` VALUES (53, 17, 'client_credentials', '客户端模式', 'grant_types', 'oauth2 客户端模式', 2, '2019-08-13 07:36:30', '2019-08-13 07:36:30', NULL, '0', 1);
+INSERT INTO `sys_dict_item` VALUES (54, 17, 'refresh_token', '刷新模式', 'grant_types', 'oauth2 刷新token', 3, '2019-08-13 07:36:54', '2019-08-13 07:36:54', NULL, '0', 1);
+INSERT INTO `sys_dict_item` VALUES (55, 17, 'implicit', '简化模式', 'grant_types', 'oauth2 简化模式', 4, '2019-08-13 07:39:32', '2019-08-13 07:39:32', NULL, '0', 1);
+INSERT INTO `sys_dict_item` VALUES (56, 18, '0', 'Avue', 'style_type', 'Avue风格', 0, '2020-02-07 03:52:52', '2020-02-07 03:52:52', '', '0', 1);
+INSERT INTO `sys_dict_item` VALUES (57, 18, '1', 'element', 'style_type', 'element-ui', 1, '2020-02-07 03:53:12', '2020-02-07 03:53:12', '', '0', 1);
+COMMIT;
+
+-- ----------------------------
+-- Table structure for sys_file
+-- ----------------------------
+DROP TABLE IF EXISTS `sys_file`;
+CREATE TABLE `sys_file` (
+  `id` bigint(32) NOT NULL AUTO_INCREMENT COMMENT '编号',
+  `file_name` varchar(100) DEFAULT NULL,
+  `bucket_name` varchar(200) DEFAULT NULL,
+  `original` varchar(100) DEFAULT NULL,
+  `type` varchar(50) DEFAULT NULL,
+  `file_size` bigint(50) DEFAULT NULL COMMENT '文件大小',
+  `create_user` varchar(32) DEFAULT NULL,
+  `create_time` datetime DEFAULT CURRENT_TIMESTAMP COMMENT '上传时间',
+  `update_user` varchar(32) DEFAULT NULL,
+  `update_time` datetime DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间',
+  `del_flag` char(1) DEFAULT '0',
+  `tenant_id` int(11) DEFAULT NULL COMMENT '所属租户',
+  PRIMARY KEY (`id`) USING BTREE
+) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='文件管理表';
+
+-- ----------------------------
+-- Table structure for sys_log
+-- ----------------------------
+DROP TABLE IF EXISTS `sys_log`;
+CREATE TABLE `sys_log` (
+  `id` bigint(64) NOT NULL AUTO_INCREMENT COMMENT '编号',
+  `type` char(1) DEFAULT '0',
+  `title` varchar(255) DEFAULT NULL,
+  `service_id` varchar(32) DEFAULT NULL,
+  `create_by` varchar(255) DEFAULT NULL,
+  `create_time` datetime DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
+  `update_time` datetime DEFAULT NULL ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间',
+  `remote_addr` varchar(255) DEFAULT NULL,
+  `user_agent` varchar(1000) DEFAULT NULL,
+  `request_uri` varchar(255) DEFAULT NULL,
+  `method` varchar(10) DEFAULT NULL,
+  `params` text,
+  `time` mediumtext CHARACTER SET utf8 COMMENT '执行时间',
+  `del_flag` char(1) DEFAULT '0',
+  `exception` text,
+  `tenant_id` int(11) DEFAULT '0' COMMENT '所属租户',
+  PRIMARY KEY (`id`) USING BTREE,
+  KEY `sys_log_create_by` (`create_by`) USING BTREE,
+  KEY `sys_log_request_uri` (`request_uri`) USING BTREE,
+  KEY `sys_log_type` (`type`) USING BTREE,
+  KEY `sys_log_create_date` (`create_time`) USING BTREE
+) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='日志表';
+
+-- ----------------------------
+-- Table structure for sys_menu
+-- ----------------------------
+DROP TABLE IF EXISTS `sys_menu`;
+CREATE TABLE `sys_menu` (
+  `menu_id` int(11) NOT NULL AUTO_INCREMENT COMMENT '菜单ID',
+  `name` varchar(32) DEFAULT NULL,
+  `permission` varchar(32) DEFAULT NULL,
+  `path` varchar(128) DEFAULT NULL,
+  `parent_id` int(11) DEFAULT NULL COMMENT '父菜单ID',
+  `icon` varchar(32) DEFAULT NULL,
+  `sort` int(11) DEFAULT '1' COMMENT '排序值',
+  `keep_alive` char(1) DEFAULT '0',
+  `type` char(1) DEFAULT '0',
+  `create_time` datetime NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
+  `update_time` datetime NULL DEFAULT NULL ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间',
+  `del_flag` char(1) DEFAULT '0',
+  `tenant_id` int(11) unsigned DEFAULT NULL COMMENT '租户ID',
+  PRIMARY KEY (`menu_id`) USING BTREE
+) ENGINE=InnoDB AUTO_INCREMENT=10013 DEFAULT CHARSET=utf8mb4 COMMENT='菜单权限表';
+
+-- ----------------------------
+-- Records of sys_menu
+-- ----------------------------
+BEGIN;
+INSERT INTO `sys_menu` VALUES (1000, '权限管理', NULL, '/user', -1, 'icon-quanxianguanli', 0, '0', '0', '2018-09-28 08:29:53', '2020-03-24 08:56:32', '0', 1);
+INSERT INTO `sys_menu` VALUES (1100, '用户管理', NULL, '/admin/user/index', 1000, 'icon-yonghuguanli', 1, '0', '0', '2017-11-02 22:24:37', '2020-03-24 08:56:33', '0', 1);
+INSERT INTO `sys_menu` VALUES (1101, '用户新增', 'sys_user_add', NULL, 1100, NULL, NULL, '0', '1', '2017-11-08 09:52:09', '2020-03-24 08:56:34', '0', 1);
+INSERT INTO `sys_menu` VALUES (1102, '用户修改', 'sys_user_edit', NULL, 1100, NULL, NULL, '0', '1', '2017-11-08 09:52:48', '2020-03-24 08:56:35', '0', 1);
+INSERT INTO `sys_menu` VALUES (1103, '用户删除', 'sys_user_del', NULL, 1100, NULL, NULL, '0', '1', '2017-11-08 09:54:01', '2020-03-24 08:56:37', '0', 1);
+INSERT INTO `sys_menu` VALUES (1200, '菜单管理', NULL, '/admin/menu/index', 1000, 'icon-caidanguanli', 2, '0', '0', '2017-11-08 09:57:27', '2020-03-24 08:56:38', '0', 1);
+INSERT INTO `sys_menu` VALUES (1201, '菜单新增', 'sys_menu_add', NULL, 1200, NULL, NULL, '0', '1', '2017-11-08 10:15:53', '2020-03-24 08:56:39', '0', 1);
+INSERT INTO `sys_menu` VALUES (1202, '菜单修改', 'sys_menu_edit', NULL, 1200, NULL, NULL, '0', '1', '2017-11-08 10:16:23', '2020-03-24 08:56:40', '0', 1);
+INSERT INTO `sys_menu` VALUES (1203, '菜单删除', 'sys_menu_del', NULL, 1200, NULL, NULL, '0', '1', '2017-11-08 10:16:43', '2020-03-24 08:56:41', '0', 1);
+INSERT INTO `sys_menu` VALUES (1300, '角色管理', NULL, '/admin/role/index', 1000, 'icon-jiaoseguanli', 3, '0', '0', '2017-11-08 10:13:37', '2020-03-24 08:56:42', '0', 1);
+INSERT INTO `sys_menu` VALUES (1301, '角色新增', 'sys_role_add', NULL, 1300, NULL, NULL, '0', '1', '2017-11-08 10:14:18', '2020-03-24 08:56:43', '0', 1);
+INSERT INTO `sys_menu` VALUES (1302, '角色修改', 'sys_role_edit', NULL, 1300, NULL, NULL, '0', '1', '2017-11-08 10:14:41', '2020-03-24 08:56:43', '0', 1);
+INSERT INTO `sys_menu` VALUES (1303, '角色删除', 'sys_role_del', NULL, 1300, NULL, NULL, '0', '1', '2017-11-08 10:14:59', '2020-03-24 08:56:45', '0', 1);
+INSERT INTO `sys_menu` VALUES (1304, '分配权限', 'sys_role_perm', NULL, 1300, NULL, NULL, '0', '1', '2018-04-20 07:22:55', '2020-03-24 08:56:46', '0', 1);
+INSERT INTO `sys_menu` VALUES (1400, '部门管理', NULL, '/admin/dept/index', 1000, 'icon-web-icon-', 4, '0', '0', '2018-01-20 13:17:19', '2020-03-24 08:56:47', '0', 1);
+INSERT INTO `sys_menu` VALUES (1401, '部门新增', 'sys_dept_add', NULL, 1400, NULL, NULL, '0', '1', '2018-01-20 14:56:16', '2020-03-24 08:56:48', '0', 1);
+INSERT INTO `sys_menu` VALUES (1402, '部门修改', 'sys_dept_edit', NULL, 1400, NULL, NULL, '0', '1', '2018-01-20 14:56:59', '2020-03-24 08:56:48', '0', 1);
+INSERT INTO `sys_menu` VALUES (1403, '部门删除', 'sys_dept_del', NULL, 1400, NULL, NULL, '0', '1', '2018-01-20 14:57:28', '2020-03-24 08:56:51', '0', 1);
+INSERT INTO `sys_menu` VALUES (1500, '租户管理', '', '/admin/tenant/index', 1000, 'icon-erji-zuhushouye', 5, '0', '0', '2018-01-20 13:17:19', '2020-03-24 08:56:49', '0', 1);
+INSERT INTO `sys_menu` VALUES (1501, '租户新增', 'admin_systenant_add', NULL, 1500, '1', 0, '0', '1', '2018-05-15 21:35:18', '2020-03-24 08:56:52', '0', 1);
+INSERT INTO `sys_menu` VALUES (1502, '租户修改', 'admin_systenant_edit', NULL, 1500, '1', 1, '0', '1', '2018-05-15 21:35:18', '2020-03-24 08:56:53', '0', 1);
+INSERT INTO `sys_menu` VALUES (1503, '租户删除', 'admin_systenant_del', NULL, 1500, '1', 2, '0', '1', '2018-05-15 21:35:18', '2020-03-24 08:56:54', '0', 1);
+INSERT INTO `sys_menu` VALUES (2000, '系统管理', NULL, '/admin', -1, 'icon-xitongguanli', 1, '0', '0', '2017-11-07 20:56:00', '2020-03-24 08:56:55', '0', 1);
+INSERT INTO `sys_menu` VALUES (2100, '日志管理', NULL, '/admin/log/index', 2000, 'icon-rizhiguanli', 5, '0', '0', '2017-11-20 14:06:22', '2020-03-24 08:56:56', '0', 1);
+INSERT INTO `sys_menu` VALUES (2101, '日志删除', 'sys_log_del', NULL, 2100, NULL, NULL, '0', '1', '2017-11-20 20:37:37', '2020-03-24 08:56:58', '0', 1);
+INSERT INTO `sys_menu` VALUES (2200, '字典管理', NULL, '/admin/dict/index', 2000, 'icon-navicon-zdgl', 6, '0', '0', '2017-11-29 11:30:52', '2020-03-24 08:56:58', '0', 1);
+INSERT INTO `sys_menu` VALUES (2201, '字典删除', 'sys_dict_del', NULL, 2200, NULL, NULL, '0', '1', '2017-11-29 11:30:11', '2020-03-24 08:56:59', '0', 1);
+INSERT INTO `sys_menu` VALUES (2202, '字典新增', 'sys_dict_add', NULL, 2200, NULL, NULL, '0', '1', '2018-05-11 22:34:55', '2020-03-24 08:57:01', '0', 1);
+INSERT INTO `sys_menu` VALUES (2203, '字典修改', 'sys_dict_edit', NULL, 2200, NULL, NULL, '0', '1', '2018-05-11 22:36:03', '2020-03-24 08:57:09', '0', 1);
+INSERT INTO `sys_menu` VALUES (2210, '参数管理', NULL, '/admin/param/index', 2000, 'icon-canshu', 7, '1', '0', '2019-04-29 22:16:50', '2020-03-24 08:57:10', '0', 1);
+INSERT INTO `sys_menu` VALUES (2211, '参数新增', 'admin_syspublicparam_add', NULL, 2210, NULL, 1, '0', '1', '2019-04-29 22:17:36', '2020-03-24 08:57:11', '0', 1);
+INSERT INTO `sys_menu` VALUES (2212, '参数删除', 'admin_syspublicparam_del', NULL, 2210, NULL, 1, '0', '1', '2019-04-29 22:17:55', '2020-03-24 08:57:12', '0', 1);
+INSERT INTO `sys_menu` VALUES (2213, '参数编辑', 'admin_syspublicparam_edit', NULL, 2210, NULL, 1, '0', '1', '2019-04-29 22:18:14', '2020-03-24 08:57:13', '0', 1);
+INSERT INTO `sys_menu` VALUES (2300, '代码生成', '', '/gen/index', 10006, 'icon-weibiaoti46', 1, '0', '0', '2018-01-20 13:17:19', '2020-03-24 08:57:14', '0', 1);
+INSERT INTO `sys_menu` VALUES (2400, '终端管理', '', '/admin/client/index', 2000, 'icon-shouji', 9, '0', '0', '2018-01-20 13:17:19', '2020-03-24 08:57:15', '0', 1);
+INSERT INTO `sys_menu` VALUES (2401, '客户端新增', 'sys_client_add', NULL, 2400, '1', NULL, '0', '1', '2018-05-15 21:35:18', '2020-03-24 08:57:16', '0', 1);
+INSERT INTO `sys_menu` VALUES (2402, '客户端修改', 'sys_client_edit', NULL, 2400, NULL, NULL, '0', '1', '2018-05-15 21:37:06', '2020-03-24 08:57:16', '0', 1);
+INSERT INTO `sys_menu` VALUES (2403, '客户端删除', 'sys_client_del', NULL, 2400, NULL, NULL, '0', '1', '2018-05-15 21:39:16', '2020-03-24 08:57:17', '0', 1);
+INSERT INTO `sys_menu` VALUES (2500, '密钥管理', '', '/admin/social/index', 2000, 'icon-miyue', 10, '0', '0', '2018-01-20 13:17:19', '2020-03-24 08:57:18', '0', 1);
+INSERT INTO `sys_menu` VALUES (2501, '密钥新增', 'sys_social_details_add', NULL, 2500, '1', 0, '0', '1', '2018-05-15 21:35:18', '2020-03-24 08:57:19', '0', 1);
+INSERT INTO `sys_menu` VALUES (2502, '密钥修改', 'sys_social_details_edit', NULL, 2500, '1', 1, '0', '1', '2018-05-15 21:35:18', '2020-03-24 08:57:19', '0', 1);
+INSERT INTO `sys_menu` VALUES (2503, '密钥删除', 'sys_social_details_del', NULL, 2500, '1', 2, '0', '1', '2018-05-15 21:35:18', '2020-03-24 08:57:23', '0', 1);
+INSERT INTO `sys_menu` VALUES (2600, '令牌管理', NULL, '/admin/token/index', 2000, 'icon-denglvlingpai', 11, '0', '0', '2018-09-04 05:58:41', '2020-03-24 08:57:24', '0', 1);
+INSERT INTO `sys_menu` VALUES (2601, '令牌删除', 'sys_token_del', NULL, 2600, NULL, 1, '0', '1', '2018-09-04 05:59:50', '2020-03-24 08:57:24', '0', 1);
+INSERT INTO `sys_menu` VALUES (2700, '动态路由', NULL, '/admin/route/index', 2000, 'icon-luyou', 12, '0', '0', '2018-09-04 05:58:41', '2020-03-24 08:57:25', '0', 1);
+INSERT INTO `sys_menu` VALUES (2800, 'Quartz管理', '', '/daemon/job-manage/index', 2000, 'icon-guanwangfangwen', 8, '0', '0', '2018-01-20 13:17:19', '2020-03-24 08:57:26', '0', 1);
+INSERT INTO `sys_menu` VALUES (2810, '任务新增', 'job_sys_job_add', NULL, 2800, '1', 0, '0', '1', '2018-05-15 21:35:18', '2020-03-24 08:57:26', '0', 1);
+INSERT INTO `sys_menu` VALUES (2820, '任务修改', 'job_sys_job_edit', NULL, 2800, '1', 0, '0', '1', '2018-05-15 21:35:18', '2020-03-24 08:57:27', '0', 1);
+INSERT INTO `sys_menu` VALUES (2830, '任务删除', 'job_sys_job_del', NULL, 2800, '1', 0, '0', '1', '2018-05-15 21:35:18', '2020-03-24 08:57:28', '0', 1);
+INSERT INTO `sys_menu` VALUES (2840, '任务暂停', 'job_sys_job_shutdown_job', NULL, 2800, '1', 0, '0', '1', '2018-05-15 21:35:18', '2020-03-24 08:57:28', '0', 1);
+INSERT INTO `sys_menu` VALUES (2850, '任务开始', 'job_sys_job_start_job', NULL, 2800, '1', 0, '0', '1', '2018-05-15 21:35:18', '2020-03-24 08:57:29', '0', 1);
+INSERT INTO `sys_menu` VALUES (2860, '任务刷新', 'job_sys_job_refresh_job', NULL, 2800, '1', 0, '0', '1', '2018-05-15 21:35:18', '2020-03-24 08:57:30', '0', 1);
+INSERT INTO `sys_menu` VALUES (2870, '执行任务', 'job_sys_job_run_job', NULL, 2800, '1', 0, '0', '1', '2019-08-08 15:35:18', '2020-03-24 08:57:31', '0', 1);
+INSERT INTO `sys_menu` VALUES (3000, '系统监控', NULL, '/daemon', -1, 'icon-msnui-supervise', 2, '0', '0', '2018-07-27 01:13:21', '2020-03-24 08:57:31', '0', 1);
+INSERT INTO `sys_menu` VALUES (3100, '服务监控', NULL, 'http://127.0.0.1:5001', 3000, 'icon-server', 0, '0', '0', '2018-06-26 10:50:32', '2020-03-24 08:57:32', '0', 1);
+INSERT INTO `sys_menu` VALUES (3110, '缓存监控', NULL, '/monitor/redis/index', 3000, 'icon-qingchuhuancun', 1, '1', '0', '2019-05-08 23:51:27', '2020-03-24 08:57:33', '0', 1);
+INSERT INTO `sys_menu` VALUES (3200, '接口文档', NULL, 'http://127.0.0.1:9999/swagger-ui.html', 3000, 'icon-wendang', 1, '0', '0', '2018-06-26 10:50:32', '2020-03-24 08:57:34', '0', 1);
+INSERT INTO `sys_menu` VALUES (3300, '事务监控', NULL, '/tx/index', 3000, 'icon-gtsquanjushiwufuwuGTS', 5, '0', '0', '2018-08-19 11:02:39', '2020-03-24 08:57:34', '0', 1);
+INSERT INTO `sys_menu` VALUES (3400, '在线事务', NULL, '/tx/model', 3000, 'icon-online', 6, '0', '0', '2018-08-19 11:32:04', '2020-03-24 08:57:35', '0', 1);
+INSERT INTO `sys_menu` VALUES (3500, '文档扩展', NULL, 'http://127.0.0.1:9999/doc.html', 3000, 'icon-wendang', 2, '0', '0', '2018-06-26 10:50:32', '2020-03-24 08:57:36', '0', 1);
+INSERT INTO `sys_menu` VALUES (3600, 'Quartz日志', '', '/daemon/job-log/index', 3000, 'icon-gtsquanjushiwufuwuGTS', 8, '0', '0', '2018-01-20 13:17:19', '2020-03-24 08:57:37', '0', 1);
+INSERT INTO `sys_menu` VALUES (3700, '注册配置', NULL, '', 3000, 'icon-line', 10, '0', '0', '2018-01-25 11:08:52', '2020-03-24 08:57:37', '1', 1);
+INSERT INTO `sys_menu` VALUES (4000, '协同管理', NULL, '/activti', -1, 'icon-kuaisugongzuoliu_o', 3, '0', '0', '2018-09-26 01:38:13', '2020-03-24 08:57:39', '0', 1);
+INSERT INTO `sys_menu` VALUES (4100, '模型管理', NULL, '/activiti/index', 4000, 'icon-weibiaoti13', 1, '0', '0', '2018-09-26 01:39:07', '2020-03-24 08:57:40', '0', 1);
+INSERT INTO `sys_menu` VALUES (4101, '模型管理', 'act_model_manage', NULL, 4100, '1', 0, '0', '1', '2018-05-15 21:35:18', '2020-03-24 08:57:41', '0', 1);
+INSERT INTO `sys_menu` VALUES (4200, '流程管理', '/activiti/process', '/activiti/process', 4000, 'icon-liucheng', 2, '0', '0', '2018-09-26 06:41:05', '2020-03-24 08:57:42', '0', 1);
+INSERT INTO `sys_menu` VALUES (4201, '流程管理', 'act_process_manage', NULL, 4200, '1', 0, '0', '1', '2018-05-15 21:35:18', '2020-03-24 08:57:42', '0', 1);
+INSERT INTO `sys_menu` VALUES (4300, '请假管理', '/activiti/leave', '/activiti/leave', 4000, 'icon-qingjia', 3, '0', '0', '2018-01-20 13:17:19', '2020-03-24 08:57:43', '0', 1);
+INSERT INTO `sys_menu` VALUES (4301, '请假新增', 'act_leavebill_add', NULL, 4300, '1', 0, '0', '1', '2018-05-15 21:35:18', '2020-03-24 08:57:44', '0', 1);
+INSERT INTO `sys_menu` VALUES (4302, '请假修改', 'act_leavebill_edit', NULL, 4300, '1', 1, '0', '1', '2018-05-15 21:35:18', '2020-03-24 08:57:45', '0', 1);
+INSERT INTO `sys_menu` VALUES (4303, '请假删除', 'act_leavebill_del', NULL, 4300, '1', 2, '0', '1', '2018-05-15 21:35:18', '2020-03-24 08:57:46', '0', 1);
+INSERT INTO `sys_menu` VALUES (4400, '待办任务', '/activiti/task', '/activiti/task', 4000, 'icon-renwu', 4, '0', '0', '2018-09-27 09:52:31', '2020-03-24 08:57:48', '0', 1);
+INSERT INTO `sys_menu` VALUES (4401, '流程管理', 'act_task_manage', NULL, 4400, '1', 0, '0', '1', '2018-05-15 21:35:18', '2020-03-24 08:57:50', '0', 1);
+INSERT INTO `sys_menu` VALUES (5000, '支付管理', NULL, '/pay', -1, 'icon-pay6zhifu', 4, '0', '0', '2019-05-30 15:28:03', '2020-03-24 08:57:51', '0', 1);
+INSERT INTO `sys_menu` VALUES (5100, '渠道管理', NULL, '/pay/paychannel/index', 5000, 'icon-zhifuqudaoguanli', 1, '0', '0', '2019-05-30 15:32:17', '2020-03-24 08:57:52', '0', 1);
+INSERT INTO `sys_menu` VALUES (5110, '增加渠道', 'pay_paychannel_add', NULL, 5100, NULL, 1, '0', '1', '2019-05-30 15:46:14', '2020-03-24 08:58:07', '0', 1);
+INSERT INTO `sys_menu` VALUES (5120, '编辑渠道', 'pay_paychannel_edit', NULL, 5100, NULL, 1, '0', '1', '2019-05-30 15:46:35', '2020-03-24 08:58:08', '0', 1);
+INSERT INTO `sys_menu` VALUES (5130, '删除渠道', 'pay_paychannel_del', NULL, 5100, NULL, 1, '0', '1', '2019-05-30 15:47:08', '2020-03-24 08:58:09', '0', 1);
+INSERT INTO `sys_menu` VALUES (5200, '收银台', NULL, '/pay/cd/index', 5000, 'icon-shouyintai', 0, '0', '0', '2019-05-30 19:44:00', '2020-03-24 08:58:09', '0', 1);
+INSERT INTO `sys_menu` VALUES (5300, '商品订单', '', '/pay/goods/index', 5000, 'icon-dingdan', 2, '0', '0', '2018-01-20 13:17:19', '2020-03-24 08:58:10', '0', 1);
+INSERT INTO `sys_menu` VALUES (5310, '商品订单新增', 'generator_paygoodsorder_add', NULL, 5300, '1', 0, '0', '1', '2018-05-15 21:35:18', '2020-03-24 08:58:11', '0', 1);
+INSERT INTO `sys_menu` VALUES (5320, '商品订单修改', 'generator_paygoodsorder_edit', NULL, 5300, '1', 1, '0', '1', '2018-05-15 21:35:18', '2020-03-24 08:58:13', '0', 1);
+INSERT INTO `sys_menu` VALUES (5330, '商品订单删除', 'generator_paygoodsorder_del', NULL, 5300, '1', 2, '0', '1', '2018-05-15 21:35:18', '2020-03-24 08:58:14', '0', 1);
+INSERT INTO `sys_menu` VALUES (5400, '支付订单', '', '/pay/orders/index', 5000, 'icon-zhifu', 3, '0', '0', '2018-01-20 13:17:19', '2020-03-24 08:58:14', '0', 1);
+INSERT INTO `sys_menu` VALUES (5410, '支付订单新增', 'generator_paytradeorder_add', NULL, 5400, '1', 0, '0', '1', '2018-05-15 21:35:18', '2020-03-24 08:58:15', '0', 1);
+INSERT INTO `sys_menu` VALUES (5420, '支付订单修改', 'generator_paytradeorder_edit', NULL, 5400, '1', 1, '0', '1', '2018-05-15 21:35:18', '2020-03-24 08:58:16', '0', 1);
+INSERT INTO `sys_menu` VALUES (5430, '支付订单删除', 'generator_paytradeorder_del', NULL, 5400, '1', 2, '0', '1', '2018-05-15 21:35:18', '2020-03-24 08:58:18', '0', 1);
+INSERT INTO `sys_menu` VALUES (5500, '回调记录', '', '/pay/notify/index', 5000, 'icon-huitiao', 4, '0', '0', '2018-01-20 13:17:19', '2020-03-24 08:58:19', '0', 1);
+INSERT INTO `sys_menu` VALUES (5510, '记录新增', 'generator_paynotifyrecord_add', NULL, 5500, '1', 0, '0', '1', '2018-05-15 21:35:18', '2020-03-24 08:58:19', '0', 1);
+INSERT INTO `sys_menu` VALUES (5520, '记录修改', 'generator_paynotifyrecord_edit', NULL, 5500, '1', 1, '0', '1', '2018-05-15 21:35:18', '2020-03-24 08:58:20', '0', 1);
+INSERT INTO `sys_menu` VALUES (5530, '记录删除', 'generator_paynotifyrecord_del', NULL, 5500, '1', 2, '0', '1', '2018-05-15 21:35:18', '2020-03-24 08:58:21', '0', 1);
+INSERT INTO `sys_menu` VALUES (6000, '微信管理', NULL, '/mp', -1, 'icon-gongzhonghao', 4, '0', '0', '2018-09-26 01:38:13', '2020-03-24 08:58:21', '0', 1);
+INSERT INTO `sys_menu` VALUES (6100, '账号管理', '', '/mp/wxaccount/index', 6000, 'icon-weixincaidan', 8, '0', '0', '2018-01-20 13:17:19', '2020-03-24 08:58:22', '0', 1);
+INSERT INTO `sys_menu` VALUES (6101, '公众号新增', 'mp_wxaccount_add', '', 6100, '1', 0, '0', '1', '2018-05-15 21:35:18', '2020-03-24 08:58:23', '0', 1);
+INSERT INTO `sys_menu` VALUES (6102, '公众号修改', 'mp_wxaccount_edit', NULL, 6100, '1', 1, '0', '1', '2018-05-15 21:35:18', '2020-03-24 08:58:23', '0', 1);
+INSERT INTO `sys_menu` VALUES (6103, '公众号删除', 'mp_wxaccount_del', NULL, 6100, '1', 2, '0', '1', '2018-05-15 21:35:18', '2020-03-24 08:58:25', '0', 1);
+INSERT INTO `sys_menu` VALUES (6200, '粉丝管理', '', '/mp/wxaccountfans/index', 6000, 'icon-fensiguanli', 8, '0', '0', '2018-01-20 13:17:19', '2020-03-24 08:58:26', '0', 1);
+INSERT INTO `sys_menu` VALUES (6201, '粉丝新增', 'mp_wxaccountfans_add', NULL, 6200, '1', 0, '0', '1', '2018-05-15 21:35:18', '2020-03-24 08:58:27', '0', 1);
+INSERT INTO `sys_menu` VALUES (6202, '粉丝修改', 'mp_wxaccountfans_edit', NULL, 6200, '1', 1, '0', '1', '2018-05-15 21:35:18', '2020-03-24 08:58:30', '0', 1);
+INSERT INTO `sys_menu` VALUES (6203, '粉丝删除', 'mp_wxaccountfans_del', NULL, 6200, '1', 2, '0', '1', '2018-05-15 21:35:18', '2020-03-24 08:58:31', '0', 1);
+INSERT INTO `sys_menu` VALUES (6204, '粉丝同步', 'mp_wxaccountfans_sync', NULL, 6200, '1', 3, '0', '1', '2018-05-15 21:35:18', '2020-03-24 08:58:31', '0', 1);
+INSERT INTO `sys_menu` VALUES (6300, '消息管理', '', '/mp/wxfansmsg/index', 6000, 'icon-xiaoxiguanli', 8, '0', '0', '2018-01-20 13:17:19', '2020-03-24 08:58:31', '0', 1);
+INSERT INTO `sys_menu` VALUES (6301, '消息新增', 'mp_wxmsg_add', NULL, 6300, '1', 0, '0', '1', '2018-05-15 21:35:18', '2020-03-24 08:58:32', '0', 1);
+INSERT INTO `sys_menu` VALUES (6302, '消息修改', 'mp_wxmsg_edit', NULL, 6300, '1', 1, '0', '1', '2018-05-15 21:35:18', '2020-03-24 08:58:33', '0', 1);
+INSERT INTO `sys_menu` VALUES (6303, '消息删除', 'mp_wxmsg_del', NULL, 6300, '1', 2, '0', '1', '2018-05-15 21:35:18', '2020-03-24 08:58:33', '0', 1);
+INSERT INTO `sys_menu` VALUES (6400, '菜单设置', NULL, '/mp/wxmenu/index', 6000, 'icon-anniu_weixincaidanlianjie', 6, '0', '0', '2019-03-29 15:20:12', '2020-03-24 08:58:38', '0', 1);
+INSERT INTO `sys_menu` VALUES (6401, '保存', 'mp_wxmenu_add', NULL, 6400, NULL, 1, '0', '1', '2019-03-29 15:43:22', '2020-03-24 08:58:38', '0', 1);
+INSERT INTO `sys_menu` VALUES (6402, '发布', 'mp_wxmenu_push', NULL, 6400, NULL, 1, '0', '1', '2019-03-29 15:43:54', '2020-03-24 08:58:39', '0', 1);
+INSERT INTO `sys_menu` VALUES (6403, '删除', 'mp_wxmenu_del', NULL, 6400, NULL, 1, '0', '1', '2019-03-29 15:43:54', '2020-03-24 08:58:39', '0', 1);
+INSERT INTO `sys_menu` VALUES (6500, '运营数据', NULL, '/mp/wxstatistics/index', 6000, 'icon-zhexiantu', 7, '0', '0', '2019-04-14 00:15:35', '2020-03-24 08:58:40', '0', 1);
+INSERT INTO `sys_menu` VALUES (6600, '素材管理', NULL, '/mp/wxmaterial/index', 6000, 'icon-sucaisads', 999, '0', '0', '2020-04-27 15:25:17', '2020-05-09 03:16:13', '0', 1);
+INSERT INTO `sys_menu` VALUES (6601, '素材维护', 'mp_wxmaterial_add', NULL, 6600, NULL, 1, '0', '1', '2019-03-29 15:43:54', '2020-03-24 08:58:39', '0', 1);
+INSERT INTO `sys_menu` VALUES (6602, '素材删除', 'mp_wxmaterial_del', NULL, 6600, NULL, 1, '0', '1', '2019-03-29 15:43:54', '2020-03-24 08:58:39', '0', 1);
+INSERT INTO `sys_menu` VALUES (6700, '自动回复', NULL, '/mp/wxautoreply/index', 6000, 'icon-huifu', 998, '0', '0', '2020-04-27 15:25:17', '2020-05-09 03:16:16', '0', 1);
+INSERT INTO `sys_menu` VALUES (6701, '新增回复', 'mp_wxautoreply_add', NULL, 6700, NULL, 1, '0', '1', '2019-03-29 15:43:54', '2020-03-24 08:58:39', '0', 1);
+INSERT INTO `sys_menu` VALUES (6702, '编辑回复', 'mp_wxautoreply_edit', NULL, 6700, NULL, 1, '0', '1', '2019-03-29 15:43:54', '2020-03-24 08:58:39', '0', 1);
+INSERT INTO `sys_menu` VALUES (6703, '删除回复', 'mp_wxautoreply_del', NULL, 6700, NULL, 1, '0', '1', '2019-03-29 15:43:54', '2020-03-24 08:58:39', '0', 1);
+INSERT INTO `sys_menu` VALUES (10000, '文件管理', NULL, '/admin/file/index', 2000, 'icon-wenjianguanli', 6, '0', '0', '2019-06-25 12:44:46', '2020-03-24 08:58:41', '0', 1);
+INSERT INTO `sys_menu` VALUES (10001, '删除文件', 'sys_file_del', NULL, 10000, NULL, 1, '0', '1', '2019-06-25 13:41:41', '2020-03-24 08:58:42', '0', 1);
+INSERT INTO `sys_menu` VALUES (10002, '表单管理', '', '/gen/form', 10006, 'icon-record', 3, '0', '0', '2018-01-20 13:17:19', '2020-03-24 08:58:44', '0', 1);
+INSERT INTO `sys_menu` VALUES (10003, '表单新增', 'gen_form_add', NULL, 10002, '1', 0, '0', '1', '2018-05-15 21:35:18', '2020-03-24 08:58:45', '0', 1);
+INSERT INTO `sys_menu` VALUES (10004, '表单修改', 'gen_form_edit', NULL, 10002, '1', 1, '0', '1', '2018-05-15 21:35:18', '2020-03-24 08:58:46', '0', 1);
+INSERT INTO `sys_menu` VALUES (10005, '表单删除', 'gen_form_del', NULL, 10002, '1', 2, '0', '1', '2018-05-15 21:35:18', '2020-03-24 08:58:47', '0', 1);
+INSERT INTO `sys_menu` VALUES (10006, '开发平台', NULL, '/gen', -1, 'icon-shejiyukaifa-', 9, '0', '0', '2019-08-12 09:35:16', '2020-03-24 08:58:48', '0', 1);
+INSERT INTO `sys_menu` VALUES (10007, '数据源管理', NULL, '/gen/datasource', 10006, 'icon-mysql', 0, '0', '0', '2019-08-12 09:42:11', '2020-03-24 08:58:49', '0', 1);
+INSERT INTO `sys_menu` VALUES (10008, '表单设计', NULL, '/gen/design', 10006, 'icon-biaodanbiaoqian', 2, '0', '0', '2019-08-16 10:08:56', '2020-03-24 08:58:53', '0', 1);
+COMMIT;
+
+-- ----------------------------
+-- Table structure for sys_oauth_client_details
+-- ----------------------------
+DROP TABLE IF EXISTS `sys_oauth_client_details`;
+CREATE TABLE `sys_oauth_client_details` (
+  `id` int(11) NOT NULL AUTO_INCREMENT COMMENT 'ID',
+  `client_id` varchar(32) NOT NULL,
+  `resource_ids` varchar(256) DEFAULT NULL,
+  `client_secret` varchar(256) DEFAULT NULL,
+  `scope` varchar(256) DEFAULT NULL,
+  `authorized_grant_types` varchar(256) DEFAULT NULL,
+  `web_server_redirect_uri` varchar(256) DEFAULT NULL,
+  `authorities` varchar(256) DEFAULT NULL,
+  `access_token_validity` int(11) DEFAULT NULL,
+  `refresh_token_validity` int(11) DEFAULT NULL,
+  `additional_information` varchar(4096) DEFAULT NULL,
+  `autoapprove` varchar(256) DEFAULT NULL,
+  `del_flag` char(1) DEFAULT '0',
+  `tenant_id` int(11) NOT NULL DEFAULT '0' COMMENT '所属租户',
+   PRIMARY KEY (`id`) USING BTREE
+) ENGINE=InnoDB AUTO_INCREMENT=7 DEFAULT CHARSET=utf8mb4 COMMENT='终端信息表';
+
+-- ----------------------------
+-- Records of sys_oauth_client_details
+-- ----------------------------
+BEGIN;
+INSERT INTO `sys_oauth_client_details` VALUES (1, 'app', NULL, 'app', 'server', 'password,refresh_token,authorization_code,client_credentials,implicit', NULL, NULL, 43200, 2592001, NULL, 'true', '0', 1);
+INSERT INTO `sys_oauth_client_details` VALUES (2, 'daemon', NULL, 'daemon', 'server', 'password,refresh_token', NULL, NULL, NULL, NULL, NULL, 'true', '0', 1);
+INSERT INTO `sys_oauth_client_details` VALUES (3, 'gen', NULL, 'gen', 'server', 'password,refresh_token', NULL, NULL, NULL, NULL, NULL, 'true', '0', 1);
+INSERT INTO `sys_oauth_client_details` VALUES (4, 'mp', NULL, 'mp', 'server', 'password,refresh_token', NULL, NULL, NULL, NULL, NULL, 'true', '0', 1);
+INSERT INTO `sys_oauth_client_details` VALUES (5, 'pig', NULL, 'pig', 'server', 'password,refresh_token,authorization_code,client_credentials', 'http://localhost:4040/sso1/login,http://localhost:4041/sso1/login,http://localhost:8080/renren-admin/sys/oauth2-sso,http://localhost:8090/sys/oauth2-sso', NULL, NULL, NULL, NULL, 'false', '0', 1);
+INSERT INTO `sys_oauth_client_details` VALUES (6, 'test', NULL, 'test', 'server', 'password,refresh_token', NULL, NULL, NULL, NULL, NULL, 'true', '0', 1);
+COMMIT;
+
+-- ----------------------------
+-- Table structure for sys_public_param
+-- ----------------------------
+DROP TABLE IF EXISTS `sys_public_param`;
+CREATE TABLE `sys_public_param` (
+  `public_id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '编号',
+  `public_name` varchar(128) DEFAULT NULL,
+  `public_key` varchar(128) DEFAULT NULL,
+  `public_value` varchar(128) DEFAULT NULL,
+  `status` char(1) DEFAULT '0',
+  `validate_code` varchar(64) DEFAULT NULL,
+  `create_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
+  `update_time` datetime NULL DEFAULT NULL ON UPDATE CURRENT_TIMESTAMP COMMENT '修改时间',
+  `public_type` char(1) DEFAULT '0',
+  `system` char(1) DEFAULT '0',
+  `del_flag` char(1) DEFAULT '0',
+  `tenant_id` int(11) DEFAULT NULL COMMENT '租户ID',
+  PRIMARY KEY (`public_id`) USING BTREE
+) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='公共参数配置表';
+
+-- ----------------------------
+-- Records of sys_public_param
+-- ----------------------------
+BEGIN;
+INSERT INTO `sys_public_param` VALUES (1, '租户默认来源', 'TENANT_DEFAULT_ID', '1', '0', '', '2020-05-12 04:03:46', '2020-06-20 08:56:30', '2', '0', '1', 1);
+INSERT INTO `sys_public_param` VALUES (2, '租户默认部门名称', 'TENANT_DEFAULT_DEPTNAME', '租户默认部门', '0', '', '2020-05-12 03:36:32', NULL, '2', '1', '0', 1);
+INSERT INTO `sys_public_param` VALUES (3, '租户默认账户', 'TENANT_DEFAULT_USERNAME', 'admin', '0', '', '2020-05-12 04:05:04', NULL, '2', '1', '0', 1);
+INSERT INTO `sys_public_param` VALUES (4, '租户默认密码', 'TENANT_DEFAULT_PASSWORD', '123456', '0', '', '2020-05-12 04:05:24', NULL, '2', '1', '0', 1);
+INSERT INTO `sys_public_param` VALUES (5, '租户默认角色编码', 'TENANT_DEFAULT_ROLECODE', 'ROLE_ADMIN', '0', '', '2020-05-12 04:05:57', NULL, '2', '1', '0', 1);
+INSERT INTO `sys_public_param` VALUES (6, '租户默认角色名称', 'TENANT_DEFAULT_ROLENAME', '租户默认角色', '0', '', '2020-05-12 04:06:19', NULL, '2', '1', '0', 1);
+INSERT INTO `sys_public_param` VALUES (7, '表前缀', 'GEN_TABLE_PREFIX', 'tb_', '0', '', '2020-05-12 04:23:04', NULL, '9', '1', '0', 1);
+INSERT INTO `sys_public_param` VALUES (8, '接口文档不显示的字段', 'GEN_HIDDEN_COLUMNS', 'tenant_id', '0', '', '2020-05-12 04:25:19', NULL, '9', '1', '0', 1);
+COMMIT;
+
+-- ----------------------------
+-- Table structure for sys_role
+-- ----------------------------
+DROP TABLE IF EXISTS `sys_role`;
+CREATE TABLE `sys_role` (
+  `role_id` int(11) NOT NULL AUTO_INCREMENT,
+  `role_name` varchar(64) DEFAULT NULL,
+  `role_code` varchar(64) DEFAULT NULL,
+  `role_desc` varchar(255) DEFAULT NULL,
+  `ds_type` char(1) DEFAULT '2',
+  `ds_scope` varchar(255) DEFAULT NULL,
+  `create_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,
+  `update_time` datetime NULL DEFAULT NULL ON UPDATE CURRENT_TIMESTAMP,
+  `del_flag` char(1) DEFAULT '0',
+  `tenant_id` int(11) DEFAULT NULL,
+  PRIMARY KEY (`role_id`) USING BTREE,
+  KEY `role_idx1_role_code` (`role_code`) USING BTREE
+) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8mb4 COMMENT='系统角色表';
+
+-- ----------------------------
+-- Records of sys_role
+-- ----------------------------
+BEGIN;
+INSERT INTO `sys_role` VALUES (1, '管理员', 'ROLE_ADMIN', '管理员', '0', '2', '2017-10-29 15:45:51', '2018-12-26 14:09:11', '0', 1);
+COMMIT;
+
+-- ----------------------------
+-- Table structure for sys_role_menu
+-- ----------------------------
+DROP TABLE IF EXISTS `sys_role_menu`;
+CREATE TABLE `sys_role_menu` (
+  `role_id` int(11) NOT NULL COMMENT '角色ID',
+  `menu_id` int(11) NOT NULL COMMENT '菜单ID',
+  PRIMARY KEY (`role_id`,`menu_id`) USING BTREE
+) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='角色菜单表';
+
+-- ----------------------------
+-- Records of sys_role_menu
+-- ----------------------------
+BEGIN;
+INSERT INTO `sys_role_menu` VALUES (1, 1000);
+INSERT INTO `sys_role_menu` VALUES (1, 1100);
+INSERT INTO `sys_role_menu` VALUES (1, 1101);
+INSERT INTO `sys_role_menu` VALUES (1, 1102);
+INSERT INTO `sys_role_menu` VALUES (1, 1103);
+INSERT INTO `sys_role_menu` VALUES (1, 1200);
+INSERT INTO `sys_role_menu` VALUES (1, 1201);
+INSERT INTO `sys_role_menu` VALUES (1, 1202);
+INSERT INTO `sys_role_menu` VALUES (1, 1203);
+INSERT INTO `sys_role_menu` VALUES (1, 1300);
+INSERT INTO `sys_role_menu` VALUES (1, 1301);
+INSERT INTO `sys_role_menu` VALUES (1, 1302);
+INSERT INTO `sys_role_menu` VALUES (1, 1303);
+INSERT INTO `sys_role_menu` VALUES (1, 1304);
+INSERT INTO `sys_role_menu` VALUES (1, 1400);
+INSERT INTO `sys_role_menu` VALUES (1, 1401);
+INSERT INTO `sys_role_menu` VALUES (1, 1402);
+INSERT INTO `sys_role_menu` VALUES (1, 1403);
+INSERT INTO `sys_role_menu` VALUES (1, 1500);
+INSERT INTO `sys_role_menu` VALUES (1, 1501);
+INSERT INTO `sys_role_menu` VALUES (1, 1502);
+INSERT INTO `sys_role_menu` VALUES (1, 1503);
+INSERT INTO `sys_role_menu` VALUES (1, 2000);
+INSERT INTO `sys_role_menu` VALUES (1, 2100);
+INSERT INTO `sys_role_menu` VALUES (1, 2101);
+INSERT INTO `sys_role_menu` VALUES (1, 2200);
+INSERT INTO `sys_role_menu` VALUES (1, 2201);
+INSERT INTO `sys_role_menu` VALUES (1, 2202);
+INSERT INTO `sys_role_menu` VALUES (1, 2203);
+INSERT INTO `sys_role_menu` VALUES (1, 2210);
+INSERT INTO `sys_role_menu` VALUES (1, 2211);
+INSERT INTO `sys_role_menu` VALUES (1, 2212);
+INSERT INTO `sys_role_menu` VALUES (1, 2213);
+INSERT INTO `sys_role_menu` VALUES (1, 2300);
+INSERT INTO `sys_role_menu` VALUES (1, 2400);
+INSERT INTO `sys_role_menu` VALUES (1, 2401);
+INSERT INTO `sys_role_menu` VALUES (1, 2402);
+INSERT INTO `sys_role_menu` VALUES (1, 2403);
+INSERT INTO `sys_role_menu` VALUES (1, 2500);
+INSERT INTO `sys_role_menu` VALUES (1, 2501);
+INSERT INTO `sys_role_menu` VALUES (1, 2502);
+INSERT INTO `sys_role_menu` VALUES (1, 2503);
+INSERT INTO `sys_role_menu` VALUES (1, 2600);
+INSERT INTO `sys_role_menu` VALUES (1, 2601);
+INSERT INTO `sys_role_menu` VALUES (1, 2700);
+INSERT INTO `sys_role_menu` VALUES (1, 2800);
+INSERT INTO `sys_role_menu` VALUES (1, 2810);
+INSERT INTO `sys_role_menu` VALUES (1, 2820);
+INSERT INTO `sys_role_menu` VALUES (1, 2830);
+INSERT INTO `sys_role_menu` VALUES (1, 2840);
+INSERT INTO `sys_role_menu` VALUES (1, 2850);
+INSERT INTO `sys_role_menu` VALUES (1, 2860);
+INSERT INTO `sys_role_menu` VALUES (1, 2870);
+INSERT INTO `sys_role_menu` VALUES (1, 3000);
+INSERT INTO `sys_role_menu` VALUES (1, 3100);
+INSERT INTO `sys_role_menu` VALUES (1, 3110);
+INSERT INTO `sys_role_menu` VALUES (1, 3200);
+INSERT INTO `sys_role_menu` VALUES (1, 3300);
+INSERT INTO `sys_role_menu` VALUES (1, 3400);
+INSERT INTO `sys_role_menu` VALUES (1, 3500);
+INSERT INTO `sys_role_menu` VALUES (1, 3600);
+INSERT INTO `sys_role_menu` VALUES (1, 4000);
+INSERT INTO `sys_role_menu` VALUES (1, 4100);
+INSERT INTO `sys_role_menu` VALUES (1, 4101);
+INSERT INTO `sys_role_menu` VALUES (1, 4200);
+INSERT INTO `sys_role_menu` VALUES (1, 4201);
+INSERT INTO `sys_role_menu` VALUES (1, 4300);
+INSERT INTO `sys_role_menu` VALUES (1, 4301);
+INSERT INTO `sys_role_menu` VALUES (1, 4302);
+INSERT INTO `sys_role_menu` VALUES (1, 4303);
+INSERT INTO `sys_role_menu` VALUES (1, 4400);
+INSERT INTO `sys_role_menu` VALUES (1, 4401);
+INSERT INTO `sys_role_menu` VALUES (1, 5000);
+INSERT INTO `sys_role_menu` VALUES (1, 5100);
+INSERT INTO `sys_role_menu` VALUES (1, 5110);
+INSERT INTO `sys_role_menu` VALUES (1, 5120);
+INSERT INTO `sys_role_menu` VALUES (1, 5130);
+INSERT INTO `sys_role_menu` VALUES (1, 5200);
+INSERT INTO `sys_role_menu` VALUES (1, 5300);
+INSERT INTO `sys_role_menu` VALUES (1, 5310);
+INSERT INTO `sys_role_menu` VALUES (1, 5320);
+INSERT INTO `sys_role_menu` VALUES (1, 5330);
+INSERT INTO `sys_role_menu` VALUES (1, 5400);
+INSERT INTO `sys_role_menu` VALUES (1, 5410);
+INSERT INTO `sys_role_menu` VALUES (1, 5420);
+INSERT INTO `sys_role_menu` VALUES (1, 5430);
+INSERT INTO `sys_role_menu` VALUES (1, 5500);
+INSERT INTO `sys_role_menu` VALUES (1, 5510);
+INSERT INTO `sys_role_menu` VALUES (1, 5520);
+INSERT INTO `sys_role_menu` VALUES (1, 5530);
+INSERT INTO `sys_role_menu` VALUES (1, 6000);
+INSERT INTO `sys_role_menu` VALUES (1, 6100);
+INSERT INTO `sys_role_menu` VALUES (1, 6101);
+INSERT INTO `sys_role_menu` VALUES (1, 6102);
+INSERT INTO `sys_role_menu` VALUES (1, 6103);
+INSERT INTO `sys_role_menu` VALUES (1, 6200);
+INSERT INTO `sys_role_menu` VALUES (1, 6201);
+INSERT INTO `sys_role_menu` VALUES (1, 6202);
+INSERT INTO `sys_role_menu` VALUES (1, 6203);
+INSERT INTO `sys_role_menu` VALUES (1, 6300);
+INSERT INTO `sys_role_menu` VALUES (1, 6301);
+INSERT INTO `sys_role_menu` VALUES (1, 6302);
+INSERT INTO `sys_role_menu` VALUES (1, 6303);
+INSERT INTO `sys_role_menu` VALUES (1, 6304);
+INSERT INTO `sys_role_menu` VALUES (1, 6305);
+INSERT INTO `sys_role_menu` VALUES (1, 6400);
+INSERT INTO `sys_role_menu` VALUES (1, 6401);
+INSERT INTO `sys_role_menu` VALUES (1, 6402);
+INSERT INTO `sys_role_menu` VALUES (1, 6500);
+INSERT INTO `sys_role_menu` VALUES (1, 6600);
+INSERT INTO `sys_role_menu` VALUES (1, 6601);
+INSERT INTO `sys_role_menu` VALUES (1, 6602);
+INSERT INTO `sys_role_menu` VALUES (1, 6700);
+INSERT INTO `sys_role_menu` VALUES (1, 6701);
+INSERT INTO `sys_role_menu` VALUES (1, 6702);
+INSERT INTO `sys_role_menu` VALUES (1, 6703);
+INSERT INTO `sys_role_menu` VALUES (1, 10000);
+INSERT INTO `sys_role_menu` VALUES (1, 10001);
+INSERT INTO `sys_role_menu` VALUES (1, 10002);
+INSERT INTO `sys_role_menu` VALUES (1, 10003);
+INSERT INTO `sys_role_menu` VALUES (1, 10004);
+INSERT INTO `sys_role_menu` VALUES (1, 10005);
+INSERT INTO `sys_role_menu` VALUES (1, 10006);
+INSERT INTO `sys_role_menu` VALUES (1, 10007);
+INSERT INTO `sys_role_menu` VALUES (1, 10008);
+COMMIT;
+
+-- ----------------------------
+-- Table structure for sys_route_conf
+-- ----------------------------
+DROP TABLE IF EXISTS `sys_route_conf`;
+CREATE TABLE `sys_route_conf` (
+  `id` int(11) NOT NULL AUTO_INCREMENT COMMENT '主键',
+  `route_name` varchar(30) DEFAULT NULL,
+  `route_id` varchar(30) DEFAULT NULL,
+  `predicates` json DEFAULT NULL COMMENT '断言',
+  `filters` json DEFAULT NULL COMMENT '过滤器',
+  `uri` varchar(50) DEFAULT NULL,
+  `order` int(2) DEFAULT '0' COMMENT '排序',
+  `create_time` datetime DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
+  `update_time` datetime DEFAULT NULL ON UPDATE CURRENT_TIMESTAMP COMMENT '修改时间',
+  `del_flag` char(1) DEFAULT '0',
+  PRIMARY KEY (`id`) USING BTREE
+) ENGINE=InnoDB AUTO_INCREMENT=13 DEFAULT CHARSET=utf8mb4 COMMENT='路由配置表';
+
+-- ----------------------------
+-- Records of sys_route_conf
+-- ----------------------------
+BEGIN;
+INSERT INTO `sys_route_conf` VALUES (1, '工作流管理模块', 'hnqz-oa-platform', '[{\"args\": {\"_genkey_0\": \"/act/**\"}, \"name\": \"Path\"}]', '[]', 'lb://hnqz-oa-platform', 0, '2019-10-16 16:44:41', '2019-11-05 22:36:56', '0');
+INSERT INTO `sys_route_conf` VALUES (2, '认证中心', 'hnqz-auth', '[{\"args\": {\"_genkey_0\": \"/auth/**\"}, \"name\": \"Path\"}]', '[{\"args\": {}, \"name\": \"ValidateCodeGatewayFilter\"}, {\"args\": {}, \"name\": \"PasswordDecoderFilter\"}]', 'lb://hnqz-auth', 0, '2019-10-16 16:44:41', '2019-11-05 22:36:57', '0');
+INSERT INTO `sys_route_conf` VALUES (3, '代码生成模块', 'hnqz-codegen', '[{\"args\": {\"_genkey_0\": \"/gen/**\"}, \"name\": \"Path\"}]', '[]', 'lb://hnqz-codegen', 0, '2019-10-16 16:44:41', '2019-11-05 22:36:58', '0');
+INSERT INTO `sys_route_conf` VALUES (4, 'elastic-job定时任务模块', 'hnqz-daemon-elastic-job', '[{\"args\": {\"_genkey_0\": \"/daemon/**\"}, \"name\": \"Path\"}]', '[]', 'lb://hnqz-daemon-elastic-job', 0, '2019-10-16 16:44:41', '2019-11-05 22:36:59', '0');
+INSERT INTO `sys_route_conf` VALUES (5, 'quartz定时任务模块', 'hnqz-daemon-quartz', '[{\"args\": {\"_genkey_0\": \"/job/**\"}, \"name\": \"Path\"}]', '[]', 'lb://hnqz-daemon-quartz', 0, '2019-10-16 16:44:41', '2019-11-05 22:37:02', '0');
+INSERT INTO `sys_route_conf` VALUES (6, '分布式事务模块', 'hnqz-tx-manager', '[{\"args\": {\"_genkey_0\": \"/tx/**\"}, \"name\": \"Path\"}]', '[]', 'lb://hnqz-tx-manager', 0, '2019-10-16 16:44:41', '2019-11-05 22:37:04', '0');
+INSERT INTO `sys_route_conf` VALUES (7, '通用权限模块', 'hnqz-upms-biz', '[{\"args\": {\"_genkey_0\": \"/admin/**\"}, \"name\": \"Path\"}]', '[{\"args\": {\"key-resolver\": \"#{@remoteAddrKeyResolver}\", \"redis-rate-limiter.burstCapacity\": \"1000\", \"redis-rate-limiter.replenishRate\": \"1000\"}, \"name\": \"RequestRateLimiter\"}]', 'lb://hnqz-upms-biz', 0, '2019-10-16 16:44:41', '2019-11-05 22:37:05', '0');
+INSERT INTO `sys_route_conf` VALUES (8, '工作流长链接支持1', 'hnqz-oa-platform-ws-1', '[{\"args\": {\"_genkey_0\": \"/act/ws/info/**\"}, \"name\": \"Path\"}]', '[]', 'lb://hnqz-oa-platform', 0, '2019-10-16 16:44:41', '2019-11-05 22:37:07', '0');
+INSERT INTO `sys_route_conf` VALUES (9, '工作流长链接支持2', 'hnqz-oa-platform-ws-2', '[{\"args\": {\"_genkey_0\": \"/act/ws/**\"}, \"name\": \"Path\"}]', '[]', 'lb:ws://hnqz-oa-platform', 100, '2019-10-16 16:44:41', '2019-11-05 22:37:09', '0');
+INSERT INTO `sys_route_conf` VALUES (10, '微信公众号管理', 'hnqz-mp-platform', '[{\"args\": {\"_genkey_0\": \"/mp/**\"}, \"name\": \"Path\"}]', '[]', 'lb://hnqz-mp-platform', 0, '2019-10-16 16:44:41', '2019-11-05 22:37:12', '0');
+INSERT INTO `sys_route_conf` VALUES (11, '支付管理', 'hnqz-pay-platform', '[{\"args\": {\"_genkey_0\": \"/pay/**\"}, \"name\": \"Path\"}]', '[]', 'lb://hnqz-pay-platform', 0, '2019-10-16 16:44:41', '2019-11-05 22:37:13', '0');
+INSERT INTO `sys_route_conf` VALUES (12, '监控管理', 'hnqz-monitor', '[{\"args\": {\"_genkey_0\": \"/monitor/**\"}, \"name\": \"Path\"}]', '[]', 'lb://hnqz-monitor', 0, '2019-10-16 16:44:41', '2019-11-05 22:37:17', '0');
+COMMIT;
+
+-- ----------------------------
+-- Table structure for sys_social_details
+-- ----------------------------
+DROP TABLE IF EXISTS `sys_social_details`;
+CREATE TABLE `sys_social_details` (
+  `id` int(11) NOT NULL AUTO_INCREMENT COMMENT '主鍵',
+  `type` varchar(16) DEFAULT NULL,
+  `remark` varchar(64) DEFAULT NULL,
+  `app_id` varchar(64) DEFAULT NULL,
+  `app_secret` varchar(64) DEFAULT NULL,
+  `redirect_url` varchar(128) DEFAULT NULL,
+  `create_time` datetime DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
+  `update_time` datetime DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间',
+  `del_flag` char(1) DEFAULT '0',
+  `tenant_id` int(11) NOT NULL DEFAULT '0' COMMENT '所属租户',
+  PRIMARY KEY (`id`) USING BTREE
+) ENGINE=InnoDB AUTO_INCREMENT=5 DEFAULT CHARSET=utf8mb4 COMMENT='系统社交登录账号表';
+
+-- ----------------------------
+-- Records of sys_social_details
+-- ----------------------------
+BEGIN;
+INSERT INTO `sys_social_details` VALUES (1, 'WX', '微信互联参数', 'wxd1678d3f83b1d83a', '6ddb043f94da5d2172926abe8533504f', 'daoweicloud.com', '2018-08-16 14:24:25', '2019-03-02 09:43:13', '0', 1);
+INSERT INTO `sys_social_details` VALUES (2, 'GITEE', '码云登录', '8fc54e0e76e7842cf767c3ae3b9fdc48c03cefed27aa565ff7b2a39d142d9892', 'c544469ce78a67d9fcf9b28cd9f310b73f5cbc46a1b993e0802ad61517deb221', 'http://gitee.huaxiadaowei.com/#/authredirect', '2019-06-28 09:59:55', '2019-06-28 09:59:55', '0', 1);
+INSERT INTO `sys_social_details` VALUES (3, 'OSC', '开源中国', 'neIIqlwGsjsfsA6uxNqD', 'aOPhRuOOJNXV1x7JrTJ9qIyRCAPXoO0l', 'http://gitee.huaxiadaowei.com/#/authredirect', '2019-06-28 10:05:37', '2019-06-28 10:05:37', '0', 1);
+INSERT INTO `sys_social_details` VALUES (4, 'MINI', '小程序', 'wx6832be859d0e1cf5', '08036aef810dcb2f8ae31510910ba631', NULL, '2019-11-02 22:08:03', '2019-11-02 22:10:53', '0', 1);
+COMMIT;
+
+-- ----------------------------
+-- Table structure for sys_tenant
+-- ----------------------------
+DROP TABLE IF EXISTS `sys_tenant`;
+CREATE TABLE `sys_tenant` (
+  `id` int(11) NOT NULL AUTO_INCREMENT COMMENT '租户id',
+  `name` varchar(255) DEFAULT NULL,
+  `code` varchar(64) DEFAULT NULL,
+  `start_time` datetime DEFAULT NULL COMMENT '开始时间',
+  `end_time` datetime DEFAULT NULL COMMENT '结束时间',
+  `status` char(1) DEFAULT '0',
+  `del_flag` char(1) DEFAULT '0',
+  `create_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建',
+  `update_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间',
+  PRIMARY KEY (`id`) USING BTREE
+) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8mb4 COMMENT='租户表';
+
+-- ----------------------------
+-- Records of sys_tenant
+-- ----------------------------
+BEGIN;
+INSERT INTO `sys_tenant` VALUES (1, '北京分公司', '1', '2019-05-15 00:00:00', '2029-05-15 00:00:00', '0', '0', '2019-05-15 15:44:57', '2019-05-18 14:47:30');
+COMMIT;
+
+-- ----------------------------
+-- Table structure for sys_user
+-- ----------------------------
+DROP TABLE IF EXISTS `sys_user`;
+CREATE TABLE `sys_user` (
+  `user_id` int(11) NOT NULL AUTO_INCREMENT COMMENT '主键ID',
+  `username` varchar(64) DEFAULT NULL,
+  `password` varchar(255) DEFAULT NULL,
+  `salt` varchar(255) DEFAULT NULL,
+  `phone` varchar(20) DEFAULT NULL,
+  `avatar` varchar(255) DEFAULT NULL,
+  `dept_id` int(11) DEFAULT NULL COMMENT '部门ID',
+  `create_time` datetime NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
+  `update_time` datetime NULL DEFAULT NULL ON UPDATE CURRENT_TIMESTAMP COMMENT '修改时间',
+  `lock_flag` char(1) DEFAULT '0',
+  `del_flag` char(1) DEFAULT '0',
+  `wx_openid` varchar(32) DEFAULT NULL COMMENT '微信登录openId',
+  `mini_openid` varchar(32) DEFAULT NULL COMMENT '小程序openId',
+  `qq_openid` varchar(32) DEFAULT NULL COMMENT 'QQ openId',
+  `gitee_login` varchar(100) DEFAULT NULL COMMENT '码云 标识',
+  `osc_id` varchar(100) DEFAULT NULL COMMENT '开源中国 标识',
+  `tenant_id` int(11) NOT NULL DEFAULT '0' COMMENT '所属租户',
+  PRIMARY KEY (`user_id`) USING BTREE,
+  KEY `user_wx_openid` (`wx_openid`) USING BTREE,
+  KEY `user_qq_openid` (`qq_openid`) USING BTREE,
+  KEY `user_idx1_username` (`username`) USING BTREE
+) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8mb4 COMMENT='用户表';
+
+-- ----------------------------
+-- Records of sys_user
+-- ----------------------------
+BEGIN;
+INSERT INTO `sys_user` VALUES (1, 'admin', '$2a$10$IVzj1Wd.ZQdOIWdb1htQjexU94uoNeuk1crlQ9ExVupPi0Iy1uv.C', '', '17034642888', '/admin/sys-file/hnqz/c5a85e0770cd4fe78bc14b63b3bd05ae.jpg', 1, '2018-04-20 07:15:18', '2019-11-02 22:12:11', '0', '0', 'o_0FT0uyg_H1vVy2H0JpSwlVGhWQ', 'oBxPy5E-v82xWGsfzZVzkD3wEX64', NULL, 'log4j', '2303656', 1);
+COMMIT;
+
+-- ----------------------------
+-- Table structure for sys_user_role
+-- ----------------------------
+DROP TABLE IF EXISTS `sys_user_role`;
+CREATE TABLE `sys_user_role` (
+  `user_id` int(11) NOT NULL COMMENT '用户ID',
+  `role_id` int(11) NOT NULL COMMENT '角色ID',
+  PRIMARY KEY (`user_id`,`role_id`) USING BTREE
+) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='用户角色表';
+
+-- ----------------------------
+-- Records of sys_user_role
+-- ----------------------------
+BEGIN;
+INSERT INTO `sys_user_role` VALUES (1, 1);
+COMMIT;
+
+SET FOREIGN_KEY_CHECKS = 1;

تفاوت فایلی نمایش داده نمی شود زیرا این فایل بسیار بزرگ است
+ 45 - 0
db/3hnqzx_ac.sql


تفاوت فایلی نمایش داده نمی شود زیرا این فایل بسیار بزرگ است
+ 97 - 0
db/4hnqzx_job.sql


+ 139 - 0
db/5hnqzx_mp.sql

@@ -0,0 +1,139 @@
+USE hnqzx_mp;
+
+SET NAMES utf8mb4;
+SET FOREIGN_KEY_CHECKS = 0;
+
+-- ----------------------------
+-- Table structure for wx_account
+-- ----------------------------
+DROP TABLE IF EXISTS `wx_account`;
+CREATE TABLE `wx_account` (
+  `id` int(11) NOT NULL AUTO_INCREMENT COMMENT '主键',
+  `name` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL,
+  `account` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL,
+  `appid` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL,
+  `appsecret` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL,
+  `url` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL,
+  `token` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL,
+  `aeskey` varchar(300) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL,
+  `qr_url` varchar(200) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL,
+  `create_time` datetime DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
+  `update_time` datetime DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间',
+  `del_flag` char(1) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT '0',
+  `tenant_id` int(11) DEFAULT NULL COMMENT '租户Id',
+  PRIMARY KEY (`id`) USING BTREE
+) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci COMMENT='公众号账户表';
+
+-- ----------------------------
+-- Table structure for wx_account_fans
+-- ----------------------------
+DROP TABLE IF EXISTS `wx_account_fans`;
+CREATE TABLE `wx_account_fans` (
+  `id` int(11) NOT NULL AUTO_INCREMENT COMMENT '主键',
+  `openid` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL,
+  `subscribe_status` char(1) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT '0',
+  `subscribe_time` datetime DEFAULT NULL COMMENT '订阅时间',
+  `nickname` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL,
+  `gender` varchar(10) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL,
+  `language` varchar(30) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL,
+  `country` varchar(30) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL,
+  `province` varchar(30) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL,
+  `city` varchar(30) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL,
+  `headimg_url` varchar(500) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL,
+  `remark` varchar(500) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL,
+  `wx_account_id` int(11) DEFAULT NULL COMMENT '微信公众号ID',
+  `wx_account_name` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL,
+  `wx_account_appid` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL,
+  `create_time` datetime DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
+  `update_time` datetime DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间',
+  `del_flag` char(1) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT '0',
+  `tenant_id` int(11) DEFAULT NULL,
+  PRIMARY KEY (`id`) USING BTREE,
+  KEY `idx_1` (`openid`) USING BTREE
+) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci COMMENT='微信公众号粉丝表';
+
+-- ----------------------------
+-- Table structure for wx_auto_reply
+-- ----------------------------
+DROP TABLE IF EXISTS `wx_auto_reply`;
+CREATE TABLE `wx_auto_reply` (
+  `id` int(11) NOT NULL AUTO_INCREMENT COMMENT '主键',
+  `type` char(2) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '类型(1、关注时回复;2、消息回复;3、关键词回复)',
+  `req_key` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '关键词',
+  `req_type` char(10) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '请求消息类型(text:文本;image:图片;voice:语音;video:视频;shortvideo:小视频;location:地理位置)',
+  `rep_type` char(10) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '回复消息类型(text:文本;image:图片;voice:语音;video:视频;music:音乐;news:图文)',
+  `rep_mate` char(10) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '回复类型文本匹配类型(1、全匹配,2、半匹配)',
+  `rep_content` text CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci COMMENT '回复类型文本保存文字',
+  `rep_media_id` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '回复类型imge、voice、news、video的mediaID或音乐缩略图的媒体id',
+  `rep_name` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '回复的素材名、视频和音乐的标题',
+  `rep_desc` varchar(200) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '视频和音乐的描述',
+  `rep_url` varchar(500) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '链接',
+  `rep_hq_url` varchar(500) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '高质量链接',
+  `rep_thumb_media_id` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '缩略图的媒体id',
+  `rep_thumb_url` varchar(500) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '缩略图url',
+  `content` json DEFAULT NULL COMMENT '图文消息的内容',
+  `app_id` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '公众号ID',
+  `remark` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL COMMENT '备注',
+  `del_flag` char(1) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT '0' COMMENT '逻辑删除标记(0:显示;1:隐藏)',
+  `create_time` datetime DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
+  `update_time` datetime DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间',
+  `tenant_id` int(11) DEFAULT NULL COMMENT '租户ID',
+  PRIMARY KEY (`id`) USING BTREE
+) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci COMMENT='微信自动回复';
+
+-- ----------------------------
+-- Table structure for wx_mp_menu
+-- ----------------------------
+DROP TABLE IF EXISTS `wx_mp_menu`;
+CREATE TABLE `wx_mp_menu` (
+  `id` int(10) NOT NULL AUTO_INCREMENT COMMENT '主键',
+  `menu` json DEFAULT NULL COMMENT '菜单',
+  `wx_account_id` int(11) DEFAULT NULL COMMENT '公众号ID',
+  `wx_account_appid` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '公众号APPID',
+  `wx_account_name` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '公众号名称',
+  `create_time` datetime DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
+  `update_time` datetime DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间',
+  `del_flag` char(1) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT '0' COMMENT '删除标记',
+  `pub_flag` char(1) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT '0' COMMENT '发布标志',
+  `tenant_id` int(11) DEFAULT NULL COMMENT '租户ID',
+  PRIMARY KEY (`id`) USING BTREE
+) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci COMMENT='微信菜单表';
+
+-- ----------------------------
+-- Table structure for wx_msg
+-- ----------------------------
+DROP TABLE IF EXISTS `wx_msg`;
+CREATE TABLE `wx_msg` (
+  `id` int(11) NOT NULL AUTO_INCREMENT COMMENT '主键',
+  `app_name` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '公众号名称',
+  `app_logo` varchar(500) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '公众号logo',
+  `wx_user_id` varchar(32) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '微信用户ID',
+  `nick_name` varchar(200) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '微信用户昵称',
+  `headimg_url` varchar(1000) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '微信用户头像',
+  `type` char(2) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '消息分类(1、用户发给公众号;2、公众号发给用户;)',
+  `rep_type` char(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '消息类型(text:文本;image:图片;voice:语音;video:视频;shortvideo:小视频;location:地理位置;music:音乐;news:图文;event:推送事件)',
+  `rep_event` char(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '事件类型(subscribe:关注;unsubscribe:取关;CLICK、VIEW:菜单事件)',
+  `rep_content` text CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci COMMENT '回复类型文本保存文字、地理位置信息',
+  `rep_media_id` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '回复类型imge、voice、news、video的mediaID或音乐缩略图的媒体id',
+  `rep_name` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '回复的素材名、视频和音乐的标题',
+  `rep_desc` varchar(200) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '视频和音乐的描述',
+  `rep_url` varchar(500) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '链接',
+  `rep_hq_url` varchar(500) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '高质量链接',
+  `content` json DEFAULT NULL COMMENT '图文消息的内容',
+  `rep_thumb_media_id` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '缩略图的媒体id',
+  `rep_thumb_url` varchar(500) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '缩略图url',
+  `rep_location_x` double DEFAULT NULL COMMENT '地理位置维度',
+  `rep_location_y` double DEFAULT NULL COMMENT '地理位置经度',
+  `rep_scale` double DEFAULT NULL COMMENT '地图缩放大小',
+  `read_flag` char(2) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT '1' COMMENT '已读标记(1:是;0:否)',
+  `app_id` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '公众号ID',
+  `open_id` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '微信唯一标识',
+  `remark` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL COMMENT '备注',
+  `del_flag` char(1) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT '0' COMMENT '逻辑删除标记(0:显示;1:隐藏)',
+  `create_time` datetime DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
+  `update_time` datetime DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间',
+  `tenant_id` int(11) DEFAULT NULL COMMENT '租户ID',
+  PRIMARY KEY (`id`) USING BTREE
+) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci COMMENT='微信消息';
+
+SET FOREIGN_KEY_CHECKS = 1;

تفاوت فایلی نمایش داده نمی شود زیرا این فایل بسیار بزرگ است
+ 34 - 0
db/6hnqzx_config.sql


تفاوت فایلی نمایش داده نمی شود زیرا این فایل بسیار بزرگ است
+ 31 - 0
db/7hnqzx_pay.sql


+ 40 - 0
db/8hnqzx_codegen.sql

@@ -0,0 +1,40 @@
+USE hnqzx_codegen;
+
+SET NAMES utf8mb4;
+SET FOREIGN_KEY_CHECKS = 0;
+
+-- ----------------------------
+-- Table structure for gen_datasource_conf
+-- ----------------------------
+DROP TABLE IF EXISTS `gen_datasource_conf`;
+CREATE TABLE `gen_datasource_conf` (
+  `id` int(11) NOT NULL AUTO_INCREMENT COMMENT '主键',
+  `name` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL,
+  `url` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL,
+  `username` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL,
+  `password` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL,
+  `create_date` datetime DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
+  `update_date` datetime DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新',
+  `del_flag` char(1) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT '0',
+  `tenant_id` int(11) DEFAULT NULL COMMENT '租户ID',
+  PRIMARY KEY (`id`) USING BTREE
+) ENGINE=InnoDB AUTO_INCREMENT=7 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci COMMENT='数据源表';
+
+
+-- ----------------------------
+-- Table structure for gen_form_conf
+-- ----------------------------
+DROP TABLE IF EXISTS `gen_form_conf`;
+CREATE TABLE `gen_form_conf` (
+  `id` int(11) NOT NULL AUTO_INCREMENT COMMENT 'ID',
+  `table_name` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL,
+  `form_info` json NOT NULL COMMENT '表单信息',
+  `create_time` datetime NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
+  `update_time` datetime NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '修改时间',
+  `del_flag` char(1) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT '0',
+  `tenant_id` int(11) DEFAULT NULL COMMENT '所属租户',
+  PRIMARY KEY (`id`) USING BTREE,
+  KEY `table_name` (`table_name`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci COMMENT='表单配置';
+
+SET FOREIGN_KEY_CHECKS = 1;

+ 23 - 0
db/Dockerfile

@@ -0,0 +1,23 @@
+FROM mysql:8.0.20
+
+MAINTAINER hnqz()
+
+ENV TZ=Asia/Shanghai
+
+RUN ln -sf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone
+
+COPY ./1schema.sql /docker-entrypoint-initdb.d
+
+COPY ./2hnqzx.sql /docker-entrypoint-initdb.d
+
+COPY ./3hnqzx_ac.sql /docker-entrypoint-initdb.d
+
+COPY ./4hnqzx_job.sql /docker-entrypoint-initdb.d
+
+COPY ./5hnqzx_mp.sql /docker-entrypoint-initdb.d
+
+COPY ./6hnqzx_config.sql /docker-entrypoint-initdb.d
+
+COPY ./7hnqzx_pay.sql /docker-entrypoint-initdb.d
+
+COPY ./8hnqzx_codegen.sql /docker-entrypoint-initdb.d

+ 159 - 0
db/v2.0/0205字段.sql

@@ -0,0 +1,159 @@
+0205字段整理
+
+--wm_score_package  积分包表
+--新增字段
+ALTER TABLE `wm_score_package` ADD `package_finish_time` datetime DEFAULT NULL  COMMENT '完成时间';
+ALTER TABLE `wm_score_package` ADD `relation_score_id` varchar(11) DEFAULT NULL  COMMENT '关联积分包id';
+ALTER TABLE `wm_score_package` ADD `package_type1` varchar(11) DEFAULT NULL  COMMENT '积分包任务类型1';
+ALTER TABLE `wm_score_package` ADD `package_type2` varchar(11) DEFAULT NULL  COMMENT '积分包任务类型2';
+ALTER TABLE `wm_score_package` ADD `user_num` int(11) DEFAULT NULL  COMMENT '需求人数';
+ALTER TABLE `wm_score_package` ADD `task_num` int(11) DEFAULT NULL  COMMENT '任务个数';
+ALTER TABLE `wm_score_package` ADD `package_user_scope` varchar(11) DEFAULT NULL  COMMENT '接单对象范围';
+ALTER TABLE `wm_score_package` ADD `kfpjf` int(30)  COMMENT '可分配积分';
+ALTER TABLE `wm_score_package` ADD   `belong_date` varchar(20)    DEFAULT NULL COMMENT '所属月份';
+ALTER TABLE `wm_score_package` ADD   `allocation_date` datetime(0)  DEFAULT NULL COMMENT '分配日期';
+ALTER TABLE `wm_score_package` ADD   `pay_rate` decimal(20, 2)  DEFAULT NULL COMMENT '已支付百分比';
+ALTER TABLE `wm_score_package` ADD   `finish_rate` decimal(20, 2)  DEFAULT NULL COMMENT '已完成百分比';
+ALTER TABLE `wm_score_package` ADD   `pay_score` varchar(11)   DEFAULT NULL COMMENT '已支付积分值';
+ALTER TABLE `wm_score_package` ADD   `end_label_date` varchar(64)    DEFAULT NULL COMMENT '查询结束日期';
+ALTER TABLE `wm_score_package` ADD `score_package_name` varchar(255) DEFAULT NULL  COMMENT '积分包名称';
+ALTER TABLE `wm_score_package` ADD `related_service` varchar(11) DEFAULT NULL  COMMENT '关联服务企业';
+ALTER TABLE `wm_score_package` ADD   `package_is_conduct` varchar(1)  DEFAULT NULL COMMENT '积分包是否进行中';
+ALTER TABLE `wm_score_package` ADD `description` varchar(255) DEFAULT NULL  COMMENT '描述';
+ALTER TABLE `wm_score_package` ADD `user_score` varchar(11) DEFAULT NULL  COMMENT '个人预计包值';
+ALTER TABLE `wm_score_package` ADD `enable_type` char(1) DEFAULT 0  COMMENT '终止方式';
+ALTER TABLE `wm_score_package` ADD `is_receive` varchar(1) DEFAULT NULL  COMMENT '是否允许接单';
+ALTER TABLE `wm_score_package` ADD `rule_id` varchar(50) DEFAULT NULL  COMMENT '规则id';
+ALTER TABLE `wm_score_package` ADD   `accept_sug` varchar(20)  DEFAULT '' COMMENT '接包对象';
+ALTER TABLE `wm_score_package` ADD   `task_add_flag` varchar(1)  DEFAULT '1' COMMENT '是否可以新增任务1-可以  0-不可以';
+ALTER TABLE `wm_score_package` ADD   `settle_flag` char(1)  DEFAULT '0' COMMENT '结算状态';
+ALTER TABLE `wm_score_package` ADD   `score_package_status` varchar(11)  DEFAULT NULL COMMENT '积分包状态';
+
+--更新字段属性
+ALTER TABLE `wm_score_package` MODIFY `score` VARCHAR(11) DEFAULT NULL;
+ALTER TABLE `wm_score_package` MODIFY `drug_ent_id` VARCHAR(11) DEFAULT NULL;
+ALTER TABLE `wm_score_package` MODIFY `score_id` VARCHAR(50) DEFAULT NULL;
+ALTER TABLE `wm_score_package` MODIFY `agent_type_id` VARCHAR(1) DEFAULT NULL;
+
+
+--字段值
+package_type1--积分包任务类型2,值--1定额包 2定量包 3通用包
+package_type2--积分包任务类型2,值--1任务包 2结算包
+package_user_scope--接单对象范围,值--1仅辖内可见,2全部可见
+enable_type--终止方式(积分包的终止),值--0未终止,1全部收回 2部分收回
+is_receive--是否允许接单,值--0允许接单 1不允许接单
+task_add_flag--是否可以新增任务,值--1可以  0不可以
+settle_flag--结算状态,是否发起结算请求 值--1已经发起  0没有
+score_package_status--积分包状态,值--1已分派待申领 2已申领待审批 3进行中 4已完成待结算 5已提交结算申请  6已终止
+
+--更新sql
+--更新score_package_name 将原字段score_id,score_name的值更新到score_package_name
+update wm_score_package set score_package_name=score_id where score_id!='';
+update wm_score_package set score_package_name=score_name where score_name!='';
+
+
+
+
+--wm_score_package_status  接单审核表
+ALTER TABLE `wm_score_package_status` ADD `user_score` varchar(11) DEFAULT NULL  COMMENT '个人预计包值';
+ALTER TABLE `wm_score_package_status` ADD `enable_type` char(1) DEFAULT 0  COMMENT '终止方式';
+ALTER TABLE `wm_score_package_status` ADD `task_num` int(11)  DEFAULT NULL COMMENT '个人包任务个数';
+ALTER TABLE `wm_score_package_status` ADD `task_add_flag` varchar(1)  DEFAULT '1' COMMENT '是否可以新增任务1-可以  0-不可以';
+
+--字段值
+enable_type--终止方式(接单人的终止),值--0未终止,1全部收回 2部分收回
+task_add_flag--是否可以新增任务,值--1可以  0不可以
+
+
+
+
+--wm_task 任务表
+ALTER TABLE `wm_task` ADD `report_one_id` int(11)  DEFAULT NULL COMMENT '任务提交到一级cso的报告ID' ;
+ALTER TABLE `wm_task` ADD `report_one_approval_status` VARCHAR (32)  DEFAULT '0' COMMENT '任务提交到一级cso的报告审核状态' ;
+ALTER TABLE `wm_task` ADD `report_one_approval_opinion` varchar(2) DEFAULT NULL COMMENT '任务提交到一级cso的报告审批意见';
+ALTER TABLE `wm_task` ADD `report_one_approval_info` varchar(50) DEFAULT NULL COMMENT '任务提交到一级cso的报告审批说明';
+
+ALTER TABLE `wm_task` ADD `report_second_id` int(11)  DEFAULT NULL COMMENT '任务提交到二级cso的报告ID' ;
+ALTER TABLE `wm_task` ADD `report_second_approval_status` VARCHAR (32)  DEFAULT '0' COMMENT '任务提交到二级cso的报告审核状态' ;
+ALTER TABLE `wm_task` ADD `report_second_approval_opinion` varchar(2) DEFAULT NULL COMMENT '任务提交到二级cso的报告审批意见';
+ALTER TABLE `wm_task` ADD `report_second_approval_info` varchar(50) DEFAULT NULL COMMENT '任务提交到二级cso的报告审批说明';
+
+ALTER TABLE `wm_task` ADD `report_drug_id` int(11)  DEFAULT NULL COMMENT '任务提交到药企的报告ID' ;
+ALTER TABLE `wm_task` ADD `report_drug_approval_status` VARCHAR (32)  DEFAULT '0' COMMENT '任务提交到药企的报告审核状态' ;
+ALTER TABLE `wm_task` ADD `report_drug_approval_opinion` varchar(2) DEFAULT NULL COMMENT '任务提交到药企的报告审批意见';
+ALTER TABLE `wm_task` ADD `report_drug_approval_info` varchar(50) DEFAULT NULL COMMENT '任务提交到药企的报告审批说明';
+ALTER TABLE `wm_task` ADD  `task_status_info` varchar(500)  DEFAULT NULL COMMENT 'cso审核审核意见';
+
+--更新score_package_id,二期只用score_package_id ,所以将score_package_level1_id,score_package_level1_id的值都更新到score_package_id
+update wm_task set score_package_id=score_package_level1_id where score_package_id=null and score_package_level1_id!=null;
+update wm_task set score_package_id=score_package_drug_id where score_package_id=null  and score_package_level1_id=null and score_package_drug_id!=null;
+
+
+
+--wm_task_type
+ALTER TABLE `wm_task_type` ADD `parent_id` varchar(11) DEFAULT NULL  COMMENT '父级ID';
+
+
+--新增表
+--结算报告表
+CREATE TABLE `hnqzx`.`wm_report`  (
+  `id` int(11) NOT NULL AUTO_INCREMENT COMMENT '主键id',
+  `report_no` varchar(64) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '报告单号',
+  `drug_ent_id` int(11) NULL DEFAULT NULL COMMENT '结算企业ID',
+  `score_id` int(11) NOT NULL COMMENT '积分包ID',
+  `apply_drug_ent_id` int(11) NULL DEFAULT NULL COMMENT '申请结算企业ID',
+  `package_score` varchar(11) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '积分包值',
+  `task_number` varchar(11) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '任务数量',
+  `total_score` varchar(11) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '合计分值',
+  `report_status` varchar(2) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '报告状态',
+  `create_people` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '创建人',
+  `create_time` datetime(0) NULL DEFAULT NULL COMMENT '创建时间',
+  `approval_people` varchar(20) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '审核人',
+  `approval_time` datetime(0) NULL DEFAULT NULL COMMENT '审核时间',
+  `update_people` varchar(20) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '更新人',
+  `update_time` datetime(0) NULL DEFAULT NULL COMMENT '更新时间',
+  `del_flag` varchar(2) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '0' COMMENT '是否删除',
+  `export1` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '备用1',
+  `export2` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '备用2',
+  `export3` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '备用3',
+  PRIMARY KEY (`id`) USING BTREE
+) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '报告审核表' ROW_FORMAT = Dynamic;
+
+--积分包任务类型表
+CREATE TABLE `hnqzx`.`wm_score_task_type`  (
+  `id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '主键id',
+  `score_id` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '关联积分包id',
+  `task_type_id` varchar(11) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '有效任务类型id',
+  `type` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '积分包类型,1:定额,2定量',
+  PRIMARY KEY (`id`) USING BTREE
+) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '积分包任务类型表' ROW_FORMAT = Dynamic;
+
+
+--导入任务成员表
+CREATE TABLE `hnqzx`.`wm_import_user`  (
+  `id` int(11) NOT NULL AUTO_INCREMENT,
+  `score_id` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '积分包ID',
+  `import_name` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '姓名',
+  `import_phone` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '手机号',
+  `import_id_card_number` varchar(18) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '身份证号',
+  `user_sign` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '签名',
+  `cert_status` int(2) NULL DEFAULT NULL COMMENT '认证状态',
+  `cert_remark` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '认证结果描述',
+  `create_time` datetime(0) NULL DEFAULT NULL COMMENT '创建时间',
+  `create_user` int(11) NULL DEFAULT NULL COMMENT '创建人',
+  `del_flag` char(1) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '0' COMMENT '是否删除',
+  `real_flag` char(1) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '0' COMMENT '是否禁用',
+  PRIMARY KEY (`id`) USING BTREE
+) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '导入任务成员表' ROW_FORMAT = Dynamic;
+
+
+
+	update wm_task set report_drug_approval_status=6 where task_status=3 and (report_drug_approval_status is NULL or report_drug_approval_status=0);
+	update wm_task set report_drug_approval_opinion=1 where task_status=3 and report_drug_approval_opinion is NULL;
+
+	update wm_task set report_one_approval_status=6 where task_status=3 and (report_one_approval_status is NULL or report_one_approval_status=0);
+	update wm_task set report_one_approval_opinion=1 where task_status=3 and report_one_approval_opinion is NULL;
+
+	update wm_task set report_second_approval_status=6 where task_status=3 and (report_second_approval_status is NULL or report_second_approval_status=0);
+	update wm_task set report_one_approval_opinion=1 where task_status=3 and report_one_approval_opinion is NULL;
+

+ 70 - 0
db/v2.0/0205数据字典.sql

@@ -0,0 +1,70 @@
+
+INSERT INTO `hnqzx`.`sys_dict`( `type`, `description`, `create_time`, `update_time`, `remarks`, `system`, `del_flag`, `tenant_id`) VALUES ( 'report_status', '报告状态', '2021-01-18 19:12:11', '2021-01-18 19:12:11', '报告状态', '0', '0', 1);
+INSERT INTO `hnqzx`.`sys_dict`( `type`, `description`, `create_time`, `update_time`, `remarks`, `system`, `del_flag`, `tenant_id`) VALUES ( 'package_type1', '积分包任务类型1', '2021-01-18 19:12:11', '2021-01-19 10:19:09', '', '1', '0', 1);
+INSERT INTO `hnqzx`.`sys_dict`( `type`, `description`, `create_time`, `update_time`, `remarks`, `system`, `del_flag`, `tenant_id`) VALUES ( 'package_type2', '积分包任务类型2', '2021-01-18 19:12:11', '2021-01-19 10:19:13', '积分包任务类型2', '1', '0', 1);
+INSERT INTO `hnqzx`.`sys_dict`( `type`, `description`, `create_time`, `update_time`, `remarks`, `system`, `del_flag`, `tenant_id`) VALUES ( 'typeid', '接单对象类型', '2021-01-18 19:12:11', '2021-01-18 19:12:11', '接单对象类型', '1', '0', 1);
+INSERT INTO `hnqzx`.`sys_dict`( `type`, `description`, `create_time`, `update_time`, `remarks`, `system`, `del_flag`, `tenant_id`) VALUES ( 'package_user_scope', '接单对象范围', '2021-01-18 19:12:11', '2021-01-18 19:12:11', '接单对象范围', '1', '0', 1);
+INSERT INTO `hnqzx`.`sys_dict`( `type`, `description`, `create_time`, `update_time`, `remarks`, `system`, `del_flag`, `tenant_id`) VALUES ( 'score_task_type', '有效任务类型', '2021-01-18 19:12:11', '2021-01-18 19:12:11', '有效任务类型', '1', '0', 1);
+INSERT INTO `hnqzx`.`sys_dict`( `type`, `description`, `create_time`, `update_time`, `remarks`, `system`, `del_flag`, `tenant_id`) VALUES ( 'pgqx', '派工权限', '2020-12-21 10:50:17', '2020-12-21 10:50:17', '派工权限', '1', '0', 1);
+INSERT INTO `hnqzx`.`sys_dict`( `type`, `description`, `create_time`, `update_time`, `remarks`, `system`, `del_flag`, `tenant_id`) VALUES ( 'qylx', '企业类型', '2020-12-29 15:10:09', '2021-02-03 15:31:58', '0-CSO 1-其他', '1', '0', 1);
+INSERT INTO `hnqzx`.`sys_dict`( `type`, `description`, `create_time`, `update_time`, `remarks`, `system`, `del_flag`, `tenant_id`) VALUES ( 'cro_statu', '药企状态', '2020-12-21 11:01:07', '2021-01-19 20:06:00', 'cro状态', '1', '0', 1);
+INSERT INTO `hnqzx`.`sys_dict`( `type`, `description`, `create_time`, `update_time`, `remarks`, `system`, `del_flag`, `tenant_id`) VALUES ( 'management', '管理模式', '2021-01-20 10:40:23', '2021-01-20 10:40:23', '', '1', '0', 1);
+INSERT INTO `hnqzx`.`sys_dict`( `type`, `description`, `create_time`, `update_time`, `remarks`, `system`, `del_flag`, `tenant_id`) VALUES ( 'business_type', '企业类型', '2021-01-28 15:10:02', '2021-01-28 15:10:05', '2-药企 3,4-CSO 5-其他', '1', '0', 1);
+INSERT INTO `hnqzx`.`sys_dict`( `type`, `description`, `create_time`, `update_time`, `remarks`, `system`, `del_flag`, `tenant_id`) VALUES ( 'enable_type', '终止类型', '2021-02-03 11:50:09', '2021-02-03 11:50:09', '终止类型', '0', '0', 1);
+INSERT INTO `hnqzx`.`sys_dict`( `type`, `description`, `create_time`, `update_time`, `remarks`, `system`, `del_flag`, `tenant_id`) VALUES ( 'score_package_status', '积分包状态', '2021-02-03 14:17:23', '2021-02-03 14:17:23', '积分包状态', '0', '0', 1);
+
+
+INSERT INTO `hnqzx`.`sys_dict_item`( `dict_id`, `value`, `label`, `type`, `description`, `sort`, `create_time`, `update_time`, `remarks`, `del_flag`, `tenant_id`) VALUES ((select id from sys_dict where type ='score_task_type') , 'map', '打卡', 'task_filed_type', '打卡', 10, '2021-01-10 21:48:01', '2021-01-10 21:48:28', '打卡', '0', 1);
+INSERT INTO `hnqzx`.`sys_dict_item`( `dict_id`, `value`, `label`, `type`, `description`, `sort`, `create_time`, `update_time`, `remarks`, `del_flag`, `tenant_id`) VALUES ((select id from sys_dict where type ='score_task_type') , '1', '待提交', 'report_status', '待提交', 1, '2021-01-18 19:12:11', '2021-01-18 19:12:11', '待提交', '0', 1);
+INSERT INTO `hnqzx`.`sys_dict_item`( `dict_id`, `value`, `label`, `type`, `description`, `sort`, `create_time`, `update_time`, `remarks`, `del_flag`, `tenant_id`) VALUES ( (select id from sys_dict where type ='report_status'), '2', '已提交待审批', 'report_status', '已提交待审批', 2, '2021-01-18 19:12:11', '2021-01-18 19:12:11', '已提交待审批', '0', 1);
+INSERT INTO `hnqzx`.`sys_dict_item`( `dict_id`, `value`, `label`, `type`, `description`, `sort`, `create_time`, `update_time`, `remarks`, `del_flag`, `tenant_id`) VALUES ( (select id from sys_dict where type ='report_status'), '3', '已部分审批', 'report_status', '已部分审批', 3, '2021-01-18 19:12:11', '2021-01-18 19:12:11', '已部分审批', '0', 1);
+INSERT INTO `hnqzx`.`sys_dict_item`( `dict_id`, `value`, `label`, `type`, `description`, `sort`, `create_time`, `update_time`, `remarks`, `del_flag`, `tenant_id`) VALUES ( (select id from sys_dict where type ='report_status'), '4', '已退回', 'report_status', '已退回', 4, '2021-01-18 19:12:11', '2021-01-18 19:12:11', '已退回', '0', 1);
+INSERT INTO `hnqzx`.`sys_dict_item`( `dict_id`, `value`, `label`, `type`, `description`, `sort`, `create_time`, `update_time`, `remarks`, `del_flag`, `tenant_id`) VALUES ( (select id from sys_dict where type ='report_status'), '5', '已审批待结单', 'report_status', '已审批待结单', 5, '2021-01-18 19:12:11', '2021-01-18 19:12:11', '已审批待结单', '0', 1);
+INSERT INTO `hnqzx`.`sys_dict_item`( `dict_id`, `value`, `label`, `type`, `description`, `sort`, `create_time`, `update_time`, `remarks`, `del_flag`, `tenant_id`) VALUES ( (select id from sys_dict where type ='report_status'), '6', '已结单', 'report_status', '已结单', 6, '2021-01-18 19:12:11', '2021-01-18 19:12:11', '已结单', '0', 1);
+INSERT INTO `hnqzx`.`sys_dict_item`( `dict_id`, `value`, `label`, `type`, `description`, `sort`, `create_time`, `update_time`, `remarks`, `del_flag`, `tenant_id`) VALUES ( (select id from sys_dict where type ='package_type1'), '1', '定额包', 'package_type1', '定额包', 1, '2021-01-18 19:12:11', '2021-01-19 10:19:30', '', '0', 1);
+INSERT INTO `hnqzx`.`sys_dict_item`( `dict_id`, `value`, `label`, `type`, `description`, `sort`, `create_time`, `update_time`, `remarks`, `del_flag`, `tenant_id`) VALUES ( (select id from sys_dict where type ='package_type1'), '2', '定量包', 'package_type1', '定量包', 2, '2021-01-18 19:12:11', '2021-01-19 10:19:34', '', '0', 1);
+INSERT INTO `hnqzx`.`sys_dict_item`( `dict_id`, `value`, `label`, `type`, `description`, `sort`, `create_time`, `update_time`, `remarks`, `del_flag`, `tenant_id`) VALUES ( (select id from sys_dict where type ='package_type1'), '3', '通用', 'package_type1', '通用', 3, '2021-01-18 19:12:11', '2021-01-19 10:19:37', '通用', '0', 1);
+INSERT INTO `hnqzx`.`sys_dict_item`( `dict_id`, `value`, `label`, `type`, `description`, `sort`, `create_time`, `update_time`, `remarks`, `del_flag`, `tenant_id`) VALUES ( (select id from sys_dict where type ='package_type2'), '1', '任务包', 'package_type2', '任务包', 1, '2021-01-18 19:12:11', '2021-01-19 10:19:41', '', '0', 1);
+INSERT INTO `hnqzx`.`sys_dict_item`( `dict_id`, `value`, `label`, `type`, `description`, `sort`, `create_time`, `update_time`, `remarks`, `del_flag`, `tenant_id`) VALUES ( (select id from sys_dict where type ='package_type2'), '2', '结算包', 'package_type2', '结算包', 2, '2021-01-18 19:12:11', '2021-01-19 10:19:45', '', '0', 1);
+INSERT INTO `hnqzx`.`sys_dict_item`( `dict_id`, `value`, `label`, `type`, `description`, `sort`, `create_time`, `update_time`, `remarks`, `del_flag`, `tenant_id`) VALUES ( (select id from sys_dict where type ='typeid'), '3', '全职学术推广员', 'typeid', '全职学术推广员', 3, '2021-01-18 19:12:11', '2021-01-18 19:12:11', '', '0', 1);
+INSERT INTO `hnqzx`.`sys_dict_item`( `dict_id`, `value`, `label`, `type`, `description`, `sort`, `create_time`, `update_time`, `remarks`, `del_flag`, `tenant_id`) VALUES ( (select id from sys_dict where type ='typeid'), '4', '兼职学术推广员', 'typeid', '兼职学术推广员', 4, '2021-01-18 19:12:11', '2021-01-18 19:12:11', '兼职学术推广员', '0', 1);
+INSERT INTO `hnqzx`.`sys_dict_item`( `dict_id`, `value`, `label`, `type`, `description`, `sort`, `create_time`, `update_time`, `remarks`, `del_flag`, `tenant_id`) VALUES ( (select id from sys_dict where type ='package_user_scope'), '1', '仅内部可见', 'package_user_scope', '仅内部可见', 1, '2021-01-18 19:12:11', '2021-02-04 16:29:13', '仅辖内可见', '0', 1);
+INSERT INTO `hnqzx`.`sys_dict_item`( `dict_id`, `value`, `label`, `type`, `description`, `sort`, `create_time`, `update_time`, `remarks`, `del_flag`, `tenant_id`) VALUES ( (select id from sys_dict where type ='package_user_scope'), '2', '全部可见', 'package_user_scope', '全部可见', 2, '2021-01-18 19:12:11', '2021-02-04 16:29:13', '全部可见', '0', 1);
+INSERT INTO `hnqzx`.`sys_dict_item`( `dict_id`, `value`, `label`, `type`, `description`, `sort`, `create_time`, `update_time`, `remarks`, `del_flag`, `tenant_id`) VALUES ( (select id from sys_dict where type ='score_task_type'), 'p-1', '会议记录', 'score_task_type', '1', 1, '2021-01-18 19:12:11', '2021-01-18 19:12:11', NULL, '0', 1);
+INSERT INTO `hnqzx`.`sys_dict_item`( `dict_id`, `value`, `label`, `type`, `description`, `sort`, `create_time`, `update_time`, `remarks`, `del_flag`, `tenant_id`) VALUES ( (select id from sys_dict where type ='score_task_type'), 'p-2', '客户拜访', 'score_task_type', '1', 2, '2021-01-18 19:12:11', '2021-01-18 19:12:11', NULL, '0', 1);
+INSERT INTO `hnqzx`.`sys_dict_item`( `dict_id`, `value`, `label`, `type`, `description`, `sort`, `create_time`, `update_time`, `remarks`, `del_flag`, `tenant_id`) VALUES ( (select id from sys_dict where type ='score_task_type'), 'p-3', '市场信息收集', 'score_task_type', '1', 3, '2021-01-18 19:12:11', '2021-01-18 19:12:11', NULL, '0', 1);
+INSERT INTO `hnqzx`.`sys_dict_item`( `dict_id`, `value`, `label`, `type`, `description`, `sort`, `create_time`, `update_time`, `remarks`, `del_flag`, `tenant_id`) VALUES ( (select id from sys_dict where type ='score_task_type'), 'p-4', '产品推广', 'score_task_type', '1', 4, '2021-01-18 19:12:11', '2021-01-18 19:12:11', NULL, '0', 1);
+INSERT INTO `hnqzx`.`sys_dict_item`( `dict_id`, `value`, `label`, `type`, `description`, `sort`, `create_time`, `update_time`, `remarks`, `del_flag`, `tenant_id`) VALUES ( (select id from sys_dict where type ='score_task_type'), 'p-5', '学术信息交流', 'score_task_type', '1', 5, '2021-01-18 19:12:11', '2021-01-18 19:12:11', NULL, '0', 1);
+INSERT INTO `hnqzx`.`sys_dict_item`( `dict_id`, `value`, `label`, `type`, `description`, `sort`, `create_time`, `update_time`, `remarks`, `del_flag`, `tenant_id`) VALUES ( (select id from sys_dict where type ='score_task_type'), 'p-6', '专家咨询', 'score_task_type', '2', 6, '2021-01-18 19:12:11', '2021-01-18 19:12:11', NULL, '0', 1);
+INSERT INTO `hnqzx`.`sys_dict_item`( `dict_id`, `value`, `label`, `type`, `description`, `sort`, `create_time`, `update_time`, `remarks`, `del_flag`, `tenant_id`) VALUES ( (select id from sys_dict where type ='score_task_type'), 'p-7', '受试者管理', 'score_task_type', '2', 7, '2021-01-18 19:12:11', '2021-01-18 19:12:11', NULL, '0', 1);
+INSERT INTO `hnqzx`.`sys_dict_item`( `dict_id`, `value`, `label`, `type`, `description`, `sort`, `create_time`, `update_time`, `remarks`, `del_flag`, `tenant_id`) VALUES ( (select id from sys_dict where type ='score_task_type'), 'p-8', '医学撰写', 'score_task_type', '2', 8, '2021-01-18 19:12:11', '2021-01-18 19:12:11', NULL, '0', 1);
+INSERT INTO `hnqzx`.`sys_dict_item`( `dict_id`, `value`, `label`, `type`, `description`, `sort`, `create_time`, `update_time`, `remarks`, `del_flag`, `tenant_id`) VALUES ( (select id from sys_dict where type ='score_task_type'), 'p-9', '受试者招募', 'score_task_type', '2', 9, '2021-01-18 19:12:11', '2021-01-18 19:12:11', NULL, '0', 1);
+INSERT INTO `hnqzx`.`sys_dict_item`( `dict_id`, `value`, `label`, `type`, `description`, `sort`, `create_time`, `update_time`, `remarks`, `del_flag`, `tenant_id`) VALUES ( (select id from sys_dict where type ='score_task_type'), 'p-10', '数据管理', 'score_task_type', '2', 10, '2021-01-18 19:12:11', '2021-01-18 19:12:11', NULL, '0', 1);
+INSERT INTO `hnqzx`.`sys_dict_item`( `dict_id`, `value`, `label`, `type`, `description`, `sort`, `create_time`, `update_time`, `remarks`, `del_flag`, `tenant_id`) VALUES ( (select id from sys_dict where type ='score_task_type'), 'p-11', '统计分析', 'score_task_type', '2', 11, '2021-01-18 19:12:11', '2021-01-18 19:12:11', NULL, '0', 1);
+INSERT INTO `hnqzx`.`sys_dict_item`( `dict_id`, `value`, `label`, `type`, `description`, `sort`, `create_time`, `update_time`, `remarks`, `del_flag`, `tenant_id`) VALUES ( (select id from sys_dict where type ='score_task_type'), 'p-12', '临床监察', 'score_task_type', '2', 12, '2021-01-18 19:12:11', '2021-01-18 19:12:11', NULL, '0', 1);
+INSERT INTO `hnqzx`.`sys_dict_item`( `dict_id`, `value`, `label`, `type`, `description`, `sort`, `create_time`, `update_time`, `remarks`, `del_flag`, `tenant_id`) VALUES ( (select id from sys_dict where type ='score_task_type'), 'p-13', '通用', 'score_task_type', '2', 13, '2021-01-18 19:12:11', '2021-01-20 11:27:21', NULL, '0', 1);
+INSERT INTO `hnqzx`.`sys_dict_item`( `dict_id`, `value`, `label`, `type`, `description`, `sort`, `create_time`, `update_time`, `remarks`, `del_flag`, `tenant_id`) VALUES ( (select id from sys_dict where type ='package_finish_status'), '2', '已终止', 'package_finish_status', '已终止', 3, '2020-12-22 14:48:57', '2020-12-22 14:48:57', '', '0', 1);
+INSERT INTO `hnqzx`.`sys_dict_item`( `dict_id`, `value`, `label`, `type`, `description`, `sort`, `create_time`, `update_time`, `remarks`, `del_flag`, `tenant_id`) VALUES ( (select id from sys_dict where type ='pgqx'), '1', '有', 'pgqx', '有', 0, '2020-12-21 10:51:24', '2021-01-19 13:59:35', '', '0', 1);
+INSERT INTO `hnqzx`.`sys_dict_item`( `dict_id`, `value`, `label`, `type`, `description`, `sort`, `create_time`, `update_time`, `remarks`, `del_flag`, `tenant_id`) VALUES ( (select id from sys_dict where type ='pgqx'), '2', '无', 'pgqx', '无', 1, '2020-12-21 10:51:36', '2021-01-19 13:59:36', '', '0', 1);
+INSERT INTO `hnqzx`.`sys_dict_item`( `dict_id`, `value`, `label`, `type`, `description`, `sort`, `create_time`, `update_time`, `remarks`, `del_flag`, `tenant_id`) VALUES ( (select id from sys_dict where type ='qylx'), '0', 'CSO', 'qylx', 'CSO', 1, '2020-12-17 16:01:20', '2021-01-19 14:05:22', 'CSO', '0', 1);
+INSERT INTO `hnqzx`.`sys_dict_item`( `dict_id`, `value`, `label`, `type`, `description`, `sort`, `create_time`, `update_time`, `remarks`, `del_flag`, `tenant_id`) VALUES ( (select id from sys_dict where type ='qylx'), '1', '其他', 'qylx', '其他', 2, '2020-12-29 17:57:00', '2021-01-19 14:05:24', '其他', '0', 1);
+INSERT INTO `hnqzx`.`sys_dict_item`( `dict_id`, `value`, `label`, `type`, `description`, `sort`, `create_time`, `update_time`, `remarks`, `del_flag`, `tenant_id`) VALUES ( (select id from sys_dict where type ='cro_statu'), '0', '启用', 'cro_statu', '启用', 1, '2020-12-21 11:01:30', '2021-01-19 20:05:55', '', '0', 1);
+INSERT INTO `hnqzx`.`sys_dict_item`( `dict_id`, `value`, `label`, `type`, `description`, `sort`, `create_time`, `update_time`, `remarks`, `del_flag`, `tenant_id`) VALUES ( (select id from sys_dict where type ='cro_statu'), '1', '停用', 'cro_statu', '停用', 2, '2020-12-21 11:01:39', '2021-01-19 20:05:56', '', '0', 1);
+INSERT INTO `hnqzx`.`sys_dict_item`( `dict_id`, `value`, `label`, `type`, `description`, `sort`, `create_time`, `update_time`, `remarks`, `del_flag`, `tenant_id`) VALUES ( (select id from sys_dict where type ='management'), '1', '普通模式(默认)', 'management', '普通模式(默认)', 1, '2021-01-20 10:42:03', '2021-02-03 18:36:12', '', '0', 1);
+INSERT INTO `hnqzx`.`sys_dict_item`( `dict_id`, `value`, `label`, `type`, `description`, `sort`, `create_time`, `update_time`, `remarks`, `del_flag`, `tenant_id`) VALUES ( (select id from sys_dict where type ='management'), '2', '精细化模式-仅全职学术推广员', 'management', '精细化模式-仅全职学术推广员', 2, '2021-01-20 10:43:09', '2021-02-03 18:36:16', '', '0', 1);
+INSERT INTO `hnqzx`.`sys_dict_item`( `dict_id`, `value`, `label`, `type`, `description`, `sort`, `create_time`, `update_time`, `remarks`, `del_flag`, `tenant_id`) VALUES ( (select id from sys_dict where type ='management'), '3', '精细化模式-仅兼职学术推广员', 'management', '精细化模式-仅兼职学术推广员', 3, '2021-01-20 10:43:44', '2021-02-03 18:36:21', '', '0', 1);
+INSERT INTO `hnqzx`.`sys_dict_item`( `dict_id`, `value`, `label`, `type`, `description`, `sort`, `create_time`, `update_time`, `remarks`, `del_flag`, `tenant_id`) VALUES ( (select id from sys_dict where type ='management'), '4', '精细化模式-全部', 'management', '精细化模式-全部', 4, '2021-01-20 10:44:08', '2021-02-03 18:36:24', '', '0', 1);
+INSERT INTO `hnqzx`.`sys_dict_item`( `dict_id`, `value`, `label`, `type`, `description`, `sort`, `create_time`, `update_time`, `remarks`, `del_flag`, `tenant_id`) VALUES ( (select id from sys_dict where type ='business_type'), '2', '药企', 'business_type', '药企', 1, '2021-01-28 15:11:14', '2021-01-28 15:11:17', '药企', '0', 1);
+INSERT INTO `hnqzx`.`sys_dict_item`( `dict_id`, `value`, `label`, `type`, `description`, `sort`, `create_time`, `update_time`, `remarks`, `del_flag`, `tenant_id`) VALUES ( (select id from sys_dict where type ='business_type'), '3', 'CSO', 'business_type', 'CSO', 2, '2021-01-28 15:11:38', '2021-01-28 15:12:07', 'CSO', '0', 1);
+INSERT INTO `hnqzx`.`sys_dict_item`( `dict_id`, `value`, `label`, `type`, `description`, `sort`, `create_time`, `update_time`, `remarks`, `del_flag`, `tenant_id`) VALUES ( (select id from sys_dict where type ='business_type'), '4', 'CSO', 'business_type', 'CSO', 3, '2021-01-28 15:11:57', '2021-01-28 15:12:13', 'CSO', '0', 1);
+INSERT INTO `hnqzx`.`sys_dict_item`( `dict_id`, `value`, `label`, `type`, `description`, `sort`, `create_time`, `update_time`, `remarks`, `del_flag`, `tenant_id`) VALUES ( (select id from sys_dict where type ='business_type'), '5', '其他', 'business_type', '其他', 4, '2021-01-28 15:12:24', '2021-01-28 15:12:54', '其他', '0', 1);
+INSERT INTO `hnqzx`.`sys_dict_item`( `dict_id`, `value`, `label`, `type`, `description`, `sort`, `create_time`, `update_time`, `remarks`, `del_flag`, `tenant_id`) VALUES ( (select id from sys_dict where type ='settle_status'), '9', '待结算', 'settle_status', '待结算', 0, '2021-01-29 12:48:44', '2021-01-29 12:48:48', NULL, '0', 1);
+INSERT INTO `hnqzx`.`sys_dict_item`( `dict_id`, `value`, `label`, `type`, `description`, `sort`, `create_time`, `update_time`, `remarks`, `del_flag`, `tenant_id`) VALUES ( (select id from sys_dict where type ='enable_type'), '1', '全部收回', 'enable_type', '全部收回', 2, '2021-02-03 11:55:36', '2021-02-03 11:55:36', '全部收回', '0', 1);
+INSERT INTO `hnqzx`.`sys_dict_item`( `dict_id`, `value`, `label`, `type`, `description`, `sort`, `create_time`, `update_time`, `remarks`, `del_flag`, `tenant_id`) VALUES ( (select id from sys_dict where type ='enable_type'), '2', '部分收回', 'enable_type', '部分收回', 3, '2021-02-03 11:55:49', '2021-02-03 11:55:49', '部分收回', '0', 1);
+INSERT INTO `hnqzx`.`sys_dict_item`( `dict_id`, `value`, `label`, `type`, `description`, `sort`, `create_time`, `update_time`, `remarks`, `del_flag`, `tenant_id`) VALUES ( (select id from sys_dict where type ='enable_type'), '0', '未终止', 'enable_type', '未终止', 1, '2021-02-03 13:57:39', '2021-02-03 13:57:39', '未终止', '0', 1);
+INSERT INTO `hnqzx`.`sys_dict_item`( `dict_id`, `value`, `label`, `type`, `description`, `sort`, `create_time`, `update_time`, `remarks`, `del_flag`, `tenant_id`) VALUES ( (select id from sys_dict where type ='score_package_status'), '1', '已分派待申领', 'score_package_status', '已分派待申领', 1, '2021-02-03 14:17:45', '2021-02-03 14:17:45', '已分派待申领', '0', 1);
+INSERT INTO `hnqzx`.`sys_dict_item`( `dict_id`, `value`, `label`, `type`, `description`, `sort`, `create_time`, `update_time`, `remarks`, `del_flag`, `tenant_id`) VALUES ( (select id from sys_dict where type ='score_package_status'), '2', '已申领待审批', 'score_package_status', '已申领待审批', 2, '2021-02-03 14:18:03', '2021-02-03 14:18:03', '已申领待审批', '0', 1);
+INSERT INTO `hnqzx`.`sys_dict_item`( `dict_id`, `value`, `label`, `type`, `description`, `sort`, `create_time`, `update_time`, `remarks`, `del_flag`, `tenant_id`) VALUES ( (select id from sys_dict where type ='score_package_status'), '3', '进行中', 'score_package_status', '进行中', 3, '2021-02-03 14:18:23', '2021-02-03 14:18:23', '进行中', '0', 1);
+INSERT INTO `hnqzx`.`sys_dict_item`( `dict_id`, `value`, `label`, `type`, `description`, `sort`, `create_time`, `update_time`, `remarks`, `del_flag`, `tenant_id`) VALUES ( (select id from sys_dict where type ='score_package_status'), '4', '已完成待结算', 'score_package_status', '已完成待结算', 4, '2021-02-03 14:18:42', '2021-02-03 14:18:42', '已完成待结算', '0', 1);
+INSERT INTO `hnqzx`.`sys_dict_item`( `dict_id`, `value`, `label`, `type`, `description`, `sort`, `create_time`, `update_time`, `remarks`, `del_flag`, `tenant_id`) VALUES ( (select id from sys_dict where type ='score_package_status'), '5', '已提交结算申请', 'score_package_status', '已提交结算申请', 5, '2021-02-03 14:19:02', '2021-02-03 14:19:02', '已提交结算申请', '0', 1);
+INSERT INTO `hnqzx`.`sys_dict_item`( `dict_id`, `value`, `label`, `type`, `description`, `sort`, `create_time`, `update_time`, `remarks`, `del_flag`, `tenant_id`) VALUES ( (select id from sys_dict where type ='score_package_status'), '6', '已终止', 'score_package_status', '已终止', 6, '2021-02-03 14:19:19', '2021-02-03 14:19:19', '已终止', '0', 1);

+ 45 - 0
db/v2.0/0217.sql

@@ -0,0 +1,45 @@
+
+
+
+ALTER TABLE `sys_user` ADD `province_code` varchar(11) DEFAULT NULL  COMMENT '省份编码';
+ALTER TABLE `sys_user` ADD `city_code` varchar(11) DEFAULT NULL  COMMENT '城市编码';
+
+
+ALTER TABLE `wm_da_agent` ADD `pgqx` varchar(11) DEFAULT NULL  COMMENT '派工权限';
+ALTER TABLE `wm_da_agent` ADD `qylx` varchar(11) DEFAULT NULL  COMMENT '企业类型';
+
+update wm_da_agent set  pgqx = 1;
+update wm_da_agent set  qylx = 0;
+
+ALTER TABLE `wm_task_content` ADD `temp31` varchar(255) DEFAULT NULL  COMMENT 'temp31';
+ALTER TABLE `wm_task_content` ADD `temp32` varchar(255) DEFAULT NULL  COMMENT 'temp32';
+
+
+ALTER TABLE `wm_task` ADD `task_from` varchar(2) DEFAULT '1'  COMMENT '来源';
+
+ALTER TABLE `wm_score_package_settle_note` ADD `remark` varchar(256) DEFAULT NULL  COMMENT '结算描述';
+
+update wm_task set task_from = '1';
+
+update wm_score_package set package_user_scope = '1'
+
+update wm_score_package set package_type2 = '1';
+update wm_score_package set package_type1 = '1';
+
+update wm_score_package set task_add_flag = '0' where package_finish_status = '1';
+update wm_score_package_status s set s.task_add_flag = (
+select task_add_flag from wm_score_package p where p.id  = s.package_id );
+
+update wm_score_package set related_service =  send_package_dept_id  where typeid = 1
+update wm_score_package set accept_sug =  drug_ent_id  where typeid = 1 and send_package_dept_id = dept_id
+update wm_score_package set accept_sug =  level1_id  where typeid = 1 and send_package_dept_id != dept_id
+update wm_score_package set typeid =  0  where typeid = 1 and send_package_dept_id = dept_id
+
+
+INSERT into wm_score_package_status  (user_id,package_id ,status,dept_id,create_time)
+select xxdb_id , id ,2,dept_id ,create_time from wm_score_package where typeid = 3
+
+-- 更新药品生产企业
+ALTER TABLE `wm_da_drug_ent_drugtable` ADD `drug_ent_name` varchar(255) DEFAULT NULL  COMMENT '所属药企名称';
+ALTER TABLE `wm_da_drug_ent_drugtable` ADD `drug_ent_num` int(11) DEFAULT NULL  COMMENT '分配统计';
+UPDATE wm_da_drug_ent_drugtable e set drug_ent_name = (select entname from  wm_da_drug_ent t where  e.drug_ent_id = t.id)

+ 5 - 0
db/v2.0/0302.sql

@@ -0,0 +1,5 @@
+/**
+20210302
+ */
+
+ALTER TABLE `sys_user` ADD `user_type` varchar(2) DEFAULT '0'  COMMENT '认证方式0-人力家 1-税邦云';

+ 3 - 0
db/v2.0/0311.sql

@@ -0,0 +1,3 @@
+ALTER TABLE `sys_dept` ADD `subject_type` varchar(2) DEFAULT '0'  COMMENT '认证方式0-人力家 1-税邦云';
+ALTER TABLE `wm_da_agent` ADD `subject_type` varchar(2) DEFAULT '0'  COMMENT '认证方式0-人力家 1-税邦云';
+ALTER TABLE `wm_da_drug_ent` ADD `subject_type` varchar(2) DEFAULT '0'  COMMENT '认证方式0-人力家 1-税邦云';

+ 3 - 0
db/v2.0/0323.sql

@@ -0,0 +1,3 @@
+
+
+ALTER TABLE `sys_user` ADD `bank_card_number` varchar(19) DEFAULT null  COMMENT '银行卡号';

+ 15 - 0
db/v2.0/0327.sql

@@ -0,0 +1,15 @@
+-- 创建认证结果记录表
+CREATE TABLE sys_cert_result_record
+(
+    `id`           INT(20) AUTO_INCREMENT PRIMARY KEY,
+    `user_id`      INTEGER(20)  NOT NULL COMMENT '用户id',
+    `dept_id`      INTEGER(20)  NOT NULL COMMENT '归属体id',
+    `subject_type` INT(1)       NOT NULL COMMENT '归属类型:0-> 人力家,1-> 税邦云',
+    `method`       VARCHAR(25)  NOT NULL COMMENT '请求方法',
+    `code`         VARCHAR(5)   NULL COMMENT '状态码',
+    `status`       VARCHAR(5)   NULL COMMENT '结果码',
+    `message`      VARCHAR(256) NOT NULL COMMENT '结果信息',
+    create_time    TIMESTAMP    NOT NULL COMMENT '创建时间'
+
+)
+    COMMENT '认证结果记录表' CHARSET = utf8mb4;

+ 15 - 0
db/v2.0/0406.sql

@@ -0,0 +1,15 @@
+-- 创建主体加密器表
+CREATE TABLE `sys_dept_encryptor`
+(
+    `id`              INT(20) AUTO_INCREMENT
+        PRIMARY KEY,
+    `dept_id`         INT(20)                             NOT NULL COMMENT '主体id',
+    `ser_public_key`  VARCHAR(2048)                       NOT NULL COMMENT '服务器公钥',
+    `ser_private_key` VARCHAR(2048)                       NOT NULL COMMENT '服务器私钥',
+    `cli_public_key`  VARCHAR(2048)                       NOT NULL COMMENT '客户端公钥',
+    `cli_private_key` VARCHAR(2048)                       NOT NULL COMMENT '客户端私钥',
+    `signature`       VARCHAR(32)                         NOT NULL COMMENT '签名字符串',
+    `create_time`     TIMESTAMP DEFAULT CURRENT_TIMESTAMP NOT NULL COMMENT '创建时间',
+    `update_time`     TIMESTAMP DEFAULT CURRENT_TIMESTAMP NOT NULL COMMENT '更新时间'
+)
+    COMMENT '主体加密器' CHARSET = utf8mb4;

+ 4 - 0
db/v2.0/0426.sql

@@ -0,0 +1,4 @@
+-- 字典项新增一条数据(‘会议举办’下的‘一对一专访’,提取出来作为一级菜单展示)
+INSERT INTO `hnqzx`.`sys_dict_item` (`dict_id`, `value`, `label`, `type`, `description`, `sort`, `create_time`, `update_time`, `remarks`, `del_flag`, `tenant_id`)
+VALUES ('57', 'p-15', '一对一专访', 'score_task_type', '1', '15', NOW(), NOW(), NULL, '0', '1');
+

+ 19 - 0
db/v2.0/0428.sql

@@ -0,0 +1,19 @@
+-- 更新一对一专访的type,使其作为单独的一种类型
+UPDATE `hnqzx`.`sys_dict_item` SET `type`='meeting_type1' WHERE (`id`='78');
+
+-- 更新一对一专访的子类型,用于在详情的会议类型展示
+UPDATE `hnqzx`.`wm_task_content_config` SET `dict_group_name`='meeting_type1' WHERE (`id`='20001');
+
+-- 更新一对一专访详情字段名称
+UPDATE `hnqzx`.`wm_task_content_config` SET `task_filed_value`='专访主题' WHERE (`id`='20003');
+
+UPDATE `hnqzx`.`wm_task_content_config` SET `task_filed_value`='专访时间' WHERE (`id`='20004');
+
+UPDATE `hnqzx`.`wm_task_content_config` SET `task_filed_value`='专访总结' WHERE (`id`='20010');
+
+UPDATE `hnqzx`.`wm_task_content_config` SET `task_filed_value`='专访提纲/报告' WHERE (`id`='20006');
+
+-- 更新一对一专访详情字段,禁用会议签到表、外采费用
+UPDATE `hnqzx`.`wm_task_content_config` SET `enable_flag`='1' WHERE (`id`='20007');
+
+UPDATE `hnqzx`.`wm_task_content_config` SET `enable_flag`='1' WHERE (`id`='20009');

+ 52 - 0
db/v2.0/0510.sql

@@ -0,0 +1,52 @@
+-- 微信自动回复消息表
+CREATE TABLE `sys_wx_reply_message` (
+  `id` int(11) NOT NULL AUTO_INCREMENT COMMENT '主鍵',
+  `keyword` varchar(255) NOT NULL COMMENT '关键字',
+  `type` tinyint(1) NOT NULL COMMENT '消息类型(0:文字,1:图片,2:视频,3:图文消息)',
+  `create_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
+  `update_time` datetime NOT NULL COMMENT '更新时间',
+  `enable_flag` tinyint(1) NOT NULL DEFAULT '0' COMMENT '是否生效(0:未生效,1:生效)',
+  PRIMARY KEY (`id`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='微信自动回复消息表';
+
+-- 微信自动回复消息素材表
+CREATE TABLE `sys_wx_reply_message_media` (
+  `id` int(11) NOT NULL AUTO_INCREMENT COMMENT '主键',
+  `media_type` tinyint(1) NOT NULL COMMENT '素材类型(1:文字,2:图片,3:视频)',
+  `title` varchar(255) DEFAULT NULL COMMENT '视频的标题',
+  `introduction` varchar(255) DEFAULT NULL COMMENT '视频的描述',
+  `content` varchar(1024) DEFAULT NULL COMMENT '内容',
+  `name` varchar(255) DEFAULT NULL COMMENT '文件名称',
+  `url` varchar(512) DEFAULT NULL COMMENT 'url地址',
+  `wx_media_id` varchar(128) DEFAULT NULL COMMENT '微信素材id',
+  `sort` int(2) NOT NULL COMMENT '排序',
+  `create_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
+  `update_time` datetime NOT NULL COMMENT '更新时间',
+  PRIMARY KEY (`id`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='微信自动回复消息素材表';
+
+-- 微信消息和素材关联表
+CREATE TABLE `sys_wx_reply_message_relation` (
+  `id` int(11) NOT NULL AUTO_INCREMENT,
+  `message_id` int(11) NOT NULL COMMENT '微信消息id',
+  `message_media_id` int(11) NOT NULL COMMENT '微信消息素材id',
+  PRIMARY KEY (`id`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='微信消息和素材关联表';
+
+-- 微信账号相关数据
+INSERT INTO `hnqzx`.`sys_social_details` (`type`, `remark`, `app_id`, `app_secret`, `random_key`, `redirect_url`, `create_time`, `update_time`, `del_flag`, `tenant_id`)
+VALUES ('WX_SUBSCRIPTION', '微信公众号-服务器配置', 'AJ82mxfViTNbumFXng3Ts4yiUX1GGKTK', 'MDI0ZWFiMTc4N2NhNDE5NWFiMzU2NGZlOTc5MTVhMTI', NULL, NULL, NOW(), NOW(), '0', '1');
+
+INSERT INTO `hnqzx`.`sys_social_details` (`type`, `remark`, `app_id`, `app_secret`, `random_key`, `redirect_url`, `create_time`, `update_time`, `del_flag`, `tenant_id`)
+VALUES ('WX_ACCOUNT', '微信账号', 'wx0bea6759cc4da3e6', 'e594f51fbc6fcbed211caa3292b263fd', NULL, NULL, NOW(), NOW(), '0', '1');
+
+-- 微信自动回复后台管理菜单配置
+INSERT INTO `hnqzx`.`sys_menu` (`menu_id`, `name`, `permission`, `path`, `parent_id`, `icon`, `sort`, `keep_alive`, `type`, `create_time`, `update_time`, `del_flag`, `tenant_id`) VALUES ('10219', '智能问答', '', '/mp/wxsmartqa/index', '6000', 'icon-wendang', '1000', '0', '0', '2021-04-30 10:27:40', NULL, '0', '1');
+INSERT INTO `hnqzx`.`sys_menu` (`menu_id`, `name`, `permission`, `path`, `parent_id`, `icon`, `sort`, `keep_alive`, `type`, `create_time`, `update_time`, `del_flag`, `tenant_id`) VALUES ('10220', '新增回复', 'mp_wxsmartqa_add', NULL, '10219', NULL, '1', '0', '1', '2019-03-29 15:43:54', '2020-03-24 08:58:39', '0', '1');
+INSERT INTO `hnqzx`.`sys_menu` (`menu_id`, `name`, `permission`, `path`, `parent_id`, `icon`, `sort`, `keep_alive`, `type`, `create_time`, `update_time`, `del_flag`, `tenant_id`) VALUES ('10221', '编辑回复', 'mp_wxsmartqa_edit', NULL, '10219', NULL, '2', '0', '1', '2019-03-29 15:43:54', '2020-03-24 08:58:39', '0', '1');
+INSERT INTO `hnqzx`.`sys_menu` (`menu_id`, `name`, `permission`, `path`, `parent_id`, `icon`, `sort`, `keep_alive`, `type`, `create_time`, `update_time`, `del_flag`, `tenant_id`) VALUES ('10222', '删除回复', 'mp_wxsmartqa_del', NULL, '10219', NULL, '3', '0', '1', '2021-04-30 10:27:40', NULL, '0', '1');
+
+INSERT INTO `hnqzx`.`sys_role_menu` (`role_id`, `menu_id`) VALUES ('1', '10219');
+INSERT INTO `hnqzx`.`sys_role_menu` (`role_id`, `menu_id`) VALUES ('1', '10220');
+INSERT INTO `hnqzx`.`sys_role_menu` (`role_id`, `menu_id`) VALUES ('1', '10221');
+INSERT INTO `hnqzx`.`sys_role_menu` (`role_id`, `menu_id`) VALUES ('1', '10222');

+ 3 - 0
db/v2.0/0524.sql

@@ -0,0 +1,3 @@
+-- 部门字表新增字段dept_permissions:部门专用权限限制
+ALTER TABLE `sys_dept` ADD COLUMN `dept_permissions` VARCHAR (255) CHARACTER
+    SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '部门专用权限限制(字符串逗号分隔:0.导出)' AFTER `tax_code`;

+ 26 - 0
db/v2.0/0528.sql

@@ -0,0 +1,26 @@
+-- 字典值积分包任务类型1新增 患者教育
+INSERT INTO `hnqzx`.`sys_dict_item` (`dict_id`, `value`, `label`, `type`, `description`, `sort`, `create_time`, `update_time`, `remarks`, `del_flag`, `tenant_id`)
+VALUES ('53', '5', '患者教育', 'package_type1', '患者教育', '4', '2021-05-25 17:34:50', '2021-05-25 17:34:50', '患者教育', '0', '1');
+
+-- 字典值新增任务类型 患者教育
+INSERT INTO `hnqzx`.`sys_dict` (`id`, `type`, `description`, `create_time`, `update_time`, `remarks`, `system`, `del_flag`, `tenant_id`)
+VALUES ('71', 'task_type_hcp', '患者教育', '2021-05-28 14:05:00', '2021-05-28 14:05:00', '患者教育', '1', '0', '1');
+
+INSERT INTO `hnqzx`.`sys_dict_item` (`dict_id`, `value`, `label`, `type`, `description`, `sort`, `create_time`, `update_time`, `remarks`, `del_flag`, `tenant_id`)
+VALUES ('71', 'p-16', '患者教育', 'task_type_hcp', '2', '14', '2021-03-02 18:43:10', '2021-05-28 14:05:00', NULL, '0', '1');
+
+-- 字典值新增接单对象类型 HCP
+INSERT INTO `hnqzx`.`sys_dict` (`id`, `type`, `description`, `create_time`, `update_time`, `remarks`, `system`, `del_flag`, `tenant_id`)
+VALUES ('70', 'typeid_hcp', 'HCP', '2021-05-25 14:34:53', '2021-05-25 14:34:53', 'HCP', '1', '0', '1');
+
+INSERT INTO `hnqzx`.`sys_dict_item` (`dict_id`, `value`, `label`, `type`, `description`, `sort`, `create_time`, `update_time`, `remarks`, `del_flag`, `tenant_id`)
+VALUES ('70', '4', 'HCP', 'typeid_hcp', 'HCP', '3', '2021-05-25 14:34:53', '2021-05-25 14:34:53', 'HCP', '0', '1');
+
+-- 任务类型新增 患者教育
+INSERT INTO `hnqzx`.`wm_task_type` (`id`, `task_type_name`, `task_type_level`, `task_score_start`, `task_score_end`, `score`, `task_ent_id`, `durgent_id`, `level1_id`, `dept_id`, `del_flag`, `enable_flag`, `tenant_id`, `create_time`, `create_user`, `update_time`, `update_user`, `status`, `base_id`, `real_flag`, `rule_id`, `parent_id`)
+VALUES ('31', '患者教育', '1', '0', '0', '0', NULL, NULL, NULL, NULL, '0', '0', '1', '2021-04-06 17:40:26', NULL, NULL, NULL, '0', '患者教育', NULL, '1', 'p-16');
+
+-- 积分包表新增 数据来源类型
+ALTER TABLE `wm_score_package`
+    ADD COLUMN `source_type`  char(1) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '0' COMMENT '数据来源类型(0:手动上传,1:系统对接)' AFTER `sub_type`;
+

+ 35 - 0
db/v2.0/0531.sql

@@ -0,0 +1,35 @@
+-- 甲方请求加密信息记录
+CREATE TABLE party_a_encrypted_input_record
+(
+    id              INT(20) AUTO_INCREMENT
+        PRIMARY KEY,
+    dept_id         INT(20)                             NOT NULL COMMENT '主体id',
+    ser_public_key  VARCHAR(2048)                       NOT NULL COMMENT '请求时服务器公钥',
+    ser_private_key VARCHAR(2048)                       NOT NULL COMMENT '请求时服务器私钥',
+    cli_public_key  VARCHAR(2048)                       NOT NULL COMMENT '请求时客户端公钥',
+    cli_private_key VARCHAR(2048)                       NOT NULL COMMENT '请求时客户端私钥',
+    signature       VARCHAR(32)                         NOT NULL COMMENT '请求时签名字符串',
+    original_text   TEXT                                NOT NULL COMMENT '加密后的信息',
+    password   VARCHAR(2048)                                 NOT NULL COMMENT '密码',
+    create_time     TIMESTAMP DEFAULT CURRENT_TIMESTAMP NOT NULL COMMENT '创建时间'
+)
+    COMMENT '甲方请求加密信息记录' CHARSET = utf8mb4;
+
+-- 乙方响应结果加密信息记录
+CREATE TABLE party_b_encrypted_output_record
+(
+    id              INT(20) AUTO_INCREMENT
+        PRIMARY KEY,
+    dept_id         INT(20)                             NOT NULL COMMENT '主体id',
+    ser_public_key  VARCHAR(2048)                       NOT NULL COMMENT '请求时服务器公钥',
+    ser_private_key VARCHAR(2048)                       NOT NULL COMMENT '请求时服务器私钥',
+    cli_public_key  VARCHAR(2048)                       NOT NULL COMMENT '请求时客户端公钥',
+    cli_private_key VARCHAR(2048)                       NOT NULL COMMENT '请求时客户端私钥',
+    signature       VARCHAR(32)                         NOT NULL COMMENT '请求时签名字符串',
+    original_text   TEXT                                NOT NULL COMMENT '加密后的信息',
+    original_text   TEXT                                NOT NULL COMMENT '加密后的信息',
+     password   VARCHAR(2048)                                 NOT NULL COMMENT '密码',
+      input_id         INT(20)                             NOT NULL COMMENT '请求id',
+    create_time     TIMESTAMP DEFAULT CURRENT_TIMESTAMP NOT NULL COMMENT '创建时间'
+)
+    COMMENT '乙方响应加密信息记录' CHARSET = utf8mb4;

+ 63 - 0
db/v2.0/0604.sql

@@ -0,0 +1,63 @@
+-- 客户管理表
+CREATE TABLE `wm_af_customer` (
+  `id` int(11) NOT NULL AUTO_INCREMENT COMMENT '主键id',
+  `dept_id` int(11) DEFAULT NULL COMMENT '部门id',
+  `customer_number` varchar(20) CHARACTER SET utf8mb4 NOT NULL COMMENT '客户id',
+  `customer_name` varchar(50) CHARACTER SET utf8mb4 NOT NULL COMMENT '客户名称',
+  `customer_type` varchar(20) NOT NULL COMMENT '客户类别(0-药企、1-CSO、2-CRO、3-其他)',
+  `customer_manager` varchar(50) CHARACTER SET utf8mb4 NOT NULL COMMENT '客户经理',
+  `channel_name` varchar(50) CHARACTER SET utf8mb4 DEFAULT NULL COMMENT '渠道名称',
+  `sign_date` datetime DEFAULT NULL COMMENT '签订日期',
+  `expiration_date` datetime DEFAULT NULL COMMENT '有效期截止',
+  `customer_status` varchar(20) DEFAULT NULL COMMENT '客户状态:(0-客户备案、1-合同立项、2-签约 、3-上线)',
+  `remark` varchar(128) CHARACTER SET utf8mb4 DEFAULT NULL COMMENT '说明',
+  `contract_file` varchar(512) CHARACTER SET utf8mb4 DEFAULT NULL COMMENT '合同附件',
+  `contract_name` varchar(50) CHARACTER SET utf8mb4 DEFAULT NULL COMMENT '合同名称',
+  `create_time` datetime DEFAULT NULL COMMENT '创建时间',
+  `create_user` int(11) DEFAULT NULL COMMENT '创建人',
+  `update_time` datetime DEFAULT NULL COMMENT '更新时间',
+  `update_user` int(11) DEFAULT NULL COMMENT '更新人',
+  PRIMARY KEY (`id`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='档案-客户管理';
+
+
+
+-- GMV数据统计主表
+CREATE TABLE `wm_dept_gmv` (
+   `id` int(11) NOT NULL AUTO_INCREMENT COMMENT '主键id',
+   `dept_id` int(11) NOT NULL COMMENT '部门ID',
+   `year` char(4) NOT NULL COMMENT '年份',
+   `month` char(4) NOT NULL COMMENT '月份',
+   `update_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '修改时间',
+   PRIMARY KEY (`id`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='GMV数据统计主表';
+
+-- GMV数据统计每日记录表
+CREATE TABLE `wm_dept_gmv_record` (
+  `id` int(11) NOT NULL AUTO_INCREMENT COMMENT 'id',
+  `gmv_id` int(11) NOT NULL COMMENT 'GMV数据统计主表id',
+  `statistics_day` char(2) NOT NULL COMMENT '统计日(1-31)',
+  `gmv1` bigint(20) NOT NULL COMMENT '按积分值统计的GMV(单位:积分)',
+  `gmv1_rate` int(11) NOT NULL COMMENT 'gmv1收益率(万分之)',
+  `gmv2` bigint(20) NOT NULL COMMENT '按结算额统计的GMV(单位:分)',
+  `gmv2_rate` int(11) NOT NULL COMMENT 'gmv2收益率(万分之)',
+  `renlijia_service_charge_rate` int(11) DEFAULT NULL COMMENT '人力家服务费(万分之)',
+  `income` bigint(20) NOT NULL COMMENT '要易收益(单位:分)',
+  `update_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '修改时间',
+  PRIMARY KEY (`id`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='GMV数据统计每日记录表';
+
+-- 部门表新增字段
+ALTER TABLE `sys_dept`
+ADD COLUMN `gmv1_rate`  int(11) NULL COMMENT 'gmv1收益率(万分之)' AFTER `dept_permissions`,
+ADD COLUMN `gmv2_rate`  int(11) NULL COMMENT 'gmv2收益率(万分之)' AFTER `gmv1_rate`,
+ADD COLUMN `renlijia_service_charge_rate`  int(11) NULL COMMENT '人力家服务费(万分之)' AFTER `gmv2_rate`;
+
+-- GMV数据统计主表加GMV相关字段
+ALTER TABLE `wm_dept_gmv`
+ADD COLUMN `gmv1` bigint(20) NOT NULL COMMENT '按积分值统计的GMV(单位:积分)' AFTER `month`,
+ADD COLUMN `gmv1_rate` int(11) NOT NULL COMMENT 'gmv1收益率(万分之)' AFTER `gmv1`,
+ADD COLUMN `gmv2` bigint(20) NOT NULL COMMENT '按结算额统计的GMV(单位:分)' AFTER `gmv1_rate`,
+ADD COLUMN `gmv2_rate` int(11) NOT NULL COMMENT 'gmv2收益率(万分之)' AFTER `gmv2`,
+ADD COLUMN `renlijia_service_charge_rate` int(11) DEFAULT NULL COMMENT '人力家服务费(万分之)' AFTER `gmv2_rate`,
+ADD COLUMN `income` bigint(20) NOT NULL COMMENT '要易收益(单位:分)' AFTER `renlijia_service_charge_rate`;

+ 8 - 0
db/v2.0/0616.sql

@@ -0,0 +1,8 @@
+-- 统计主表新增gmv相关字段
+ALTER TABLE `wm_dept_gmv`
+    ADD COLUMN `gmv1` bigint(20) NOT NULL COMMENT '按积分值统计的GMV(单位:积分)' AFTER `month`,
+    ADD COLUMN `gmv1_rate` int(11) NOT NULL COMMENT 'gmv1收益率(万分之)' AFTER `gmv1`,
+    ADD COLUMN `gmv2` bigint(20) NOT NULL COMMENT '按结算额统计的GMV(单位:分)' AFTER `gmv1_rate`,
+    ADD COLUMN `gmv2_rate` int(11) NOT NULL COMMENT 'gmv2收益率(万分之)' AFTER `gmv2`,
+    ADD COLUMN `renlijia_service_charge_rate` int(11) DEFAULT NULL COMMENT '人力家服务费(万分之)' AFTER `gmv2_rate`,
+    ADD COLUMN `income` bigint(20) NOT NULL COMMENT '要易收益(单位:分)' AFTER `renlijia_service_charge_rate`;

+ 6 - 0
db/v2.0/0619.sql

@@ -0,0 +1,6 @@
+-- 部门子表添加字段
+alter table sys_dept_sub
+    add subject_user_type VARCHAR(2) null comment '税邦云用户类型id';
+
+alter table sys_dept_sub
+    add subject_invoice_category int null comment '税邦云用户类型对应的发票类目';

+ 17 - 0
db/v2.0/0621.sql

@@ -0,0 +1,17 @@
+-- 新增 CRO关联的项目管理表
+CREATE TABLE `wm_project` (
+  `id` int(11) NOT NULL AUTO_INCREMENT COMMENT '主键id',
+  `dept_id` int(11) NOT NULL COMMENT '部门id',
+  `project_number` varchar(50) NOT NULL COMMENT '项目编号',
+  `project_name` varchar(50) NOT NULL COMMENT '项目名称',
+  `delegate` varchar(50) NOT NULL COMMENT '委托方',
+  `evidence_url` varchar(512) NOT NULL COMMENT '静态证据url',
+  `sign_time` datetime NOT NULL COMMENT '项目签约时间',
+  `remark` varchar(128) DEFAULT NULL COMMENT '备注',
+  `create_time` datetime DEFAULT NULL COMMENT '创建时间',
+  `create_user` int(11) DEFAULT NULL COMMENT '创建人',
+  `update_time` datetime DEFAULT NULL COMMENT '更新时间',
+  `update_user` int(11) DEFAULT NULL COMMENT '更新人',
+  PRIMARY KEY (`id`),
+  UNIQUE KEY `dept_id_project_number_unique` (`dept_id`,`project_number`) COMMENT '部门id和项目编号联合索引'
+) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='项目管理'

+ 35 - 0
db/v2.0/1-update.sql

@@ -0,0 +1,35 @@
+-- USE hnqzx;
+
+ALTER TABLE `sys_user` ADD `id_card_number` VARCHAR (18)  COMMENT '身份证' ;
+ALTER TABLE `sys_user` ADD `user_sign` VARCHAR (255)  COMMENT '签名' ;
+ALTER TABLE `sys_user` ADD `cert_status` int(2) DEFAULT NULL  COMMENT '认证状态';
+ALTER TABLE `sys_user` ADD `cert_remark` VARCHAR(255) DEFAULT NULL  COMMENT '认证结果描述';
+
+ALTER TABLE `sys_dept` ADD `app_id` VARCHAR (32)  COMMENT '' ;
+ALTER TABLE `sys_dept` ADD `app_secret` VARCHAR (32)  COMMENT '' ;
+ALTER TABLE `sys_dept` ADD `rsa_public_key` VARCHAR(256)   COMMENT '';
+ALTER TABLE `sys_dept` ADD `query_url` VARCHAR(32)   COMMENT '';
+ALTER TABLE `sys_dept` ADD `subject_name` VARCHAR(128)   COMMENT '结算主体';
+
+ALTER TABLE `wm_score_package` ADD `statement_no` VARCHAR(64) DEFAULT NULL  COMMENT '结算单号';
+ALTER TABLE `wm_score_package` ADD `settle_status` int(2) DEFAULT NULL  COMMENT '结算状态';
+ALTER TABLE `wm_score_package` ADD `remark` VARCHAR(255) DEFAULT NULL  COMMENT '结算结果描述';
+ALTER TABLE `wm_score_package` ADD `invoice_category` varchar(50) DEFAULT NULL  COMMENT '发票类目';
+ALTER TABLE `wm_score_package` ADD `settle_amount` decimal(30,8) DEFAULT NULL COMMENT '实际结算金额';
+ALTER TABLE `wm_score_package` ADD `discount` decimal(11,4) DEFAULT NULL COMMENT '折扣';
+
+
+ALTER TABLE `wm_da_agent` ADD `js_account` VARCHAR(32) DEFAULT NULL COMMENT '结算账号 ';
+
+ALTER TABLE `wm_wk_article` ADD `read_num` int(11) DEFAULT 0   COMMENT '阅读数';
+ALTER TABLE `wm_wk_article` ADD `new_flag` int(1) DEFAULT 0  COMMENT '新标签';
+ALTER TABLE `wm_wk_article` ADD `hot_flag` int(1) DEFAULT 0  COMMENT '热门标签';
+UPDATE wm_wk_article set read_num = 0
+UPDATE wm_wk_article set new_flag = 0
+UPDATE wm_wk_article set hot_flag = 0
+
+ALTER TABLE `wm_task` ADD `compare_result` VARCHAR(2) DEFAULT NULL  COMMENT '对比结果';
+ALTER TABLE `wm_task` ADD `approval_opinion` VARCHAR(2) DEFAULT NULL  COMMENT '审批意见';
+ALTER TABLE `wm_task` ADD `approval_info` VARCHAR(500) DEFAULT NULL  COMMENT '审批说明';
+ALTER TABLE `wm_task` ADD `real_flag` char(2) DEFAULT '0'  COMMENT '是否真实';
+UPDATE wm_task set real_flag = '0'

تفاوت فایلی نمایش داده نمی شود زیرا این فایل بسیار بزرگ است
+ 51 - 0
db/v2.0/12-01.sql


+ 46 - 0
db/v2.0/2-create.sql

@@ -0,0 +1,46 @@
+CREATE TABLE `hnqzx`.`wm_import_user`  (
+  `id` int(11) NOT NULL AUTO_INCREMENT,
+  `score_id` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '积分包ID',
+  `import_name` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '姓名',
+  `import_phone` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '手机号',
+  `import_id_card_number` varchar(18) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '身份证号',
+  `user_sign` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '签名',
+  `cert_status` int(2) NULL DEFAULT NULL COMMENT '认证状态',
+  `cert_remark` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '认证结果描述',
+  `create_time` datetime(0) NULL DEFAULT NULL COMMENT '创建时间',
+  `create_user` int(11) NULL DEFAULT NULL COMMENT '创建人',
+  `del_flag` char(1) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '0' COMMENT '是否删除',
+  `real_flag` char(1) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '0' COMMENT '是否禁用',
+  PRIMARY KEY (`id`) USING BTREE
+) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '导入任务成员表' ROW_FORMAT = Dynamic;
+
+
+ALTER TABLE `wm_score_package` ADD `score_package_status` varchar(11) DEFAULT NULL  COMMENT '积分包状态';
+ALTER TABLE `wm_task` ADD `task_status_info` varchar(500) DEFAULT NULL  COMMENT 'cso审核审核意见';
+
+
+
+INSERT INTO `hnqzx`.`sys_dict`( `type`, `description`, `create_time`, `update_time`, `remarks`, `system`, `del_flag`, `tenant_id`)
+VALUES ( 'enable_type', '终止类型', '2021-02-03 11:50:09', '2021-02-03 11:50:09', '终止类型', '0', '0', 1);
+INSERT INTO `hnqzx`.`sys_dict`( `type`, `description`, `create_time`, `update_time`, `remarks`, `system`, `del_flag`, `tenant_id`)
+VALUES ( 'score_package_status', '积分包状态', '2021-02-03 14:17:23', '2021-02-03 14:17:23', '积分包状态', '0', '0', 1);
+
+
+INSERT INTO `hnqzx`.`sys_dict_item`(`id`, `dict_id`, `value`, `label`, `type`, `description`, `sort`, `create_time`, `update_time`, `remarks`, `del_flag`, `tenant_id`)
+VALUES (239, 63, '1', '全部收回', 'enable_type', '全部收回', 2, '2021-02-03 11:55:36', '2021-02-03 11:55:36', '全部收回', '0', 1);
+INSERT INTO `hnqzx`.`sys_dict_item`(`id`, `dict_id`, `value`, `label`, `type`, `description`, `sort`, `create_time`, `update_time`, `remarks`, `del_flag`, `tenant_id`)
+VALUES (240, 63, '2', '部分收回', 'enable_type', '部分收回', 3, '2021-02-03 11:55:49', '2021-02-03 11:55:49', '部分收回', '0', 1);
+INSERT INTO `hnqzx`.`sys_dict_item`(`id`, `dict_id`, `value`, `label`, `type`, `description`, `sort`, `create_time`, `update_time`, `remarks`, `del_flag`, `tenant_id`)
+VALUES (241, 63, '0', '未终止', 'enable_type', '未终止', 1, '2021-02-03 13:57:39', '2021-02-03 13:57:39', '未终止', '0', 1);
+INSERT INTO `hnqzx`.`sys_dict_item`(`id`, `dict_id`, `value`, `label`, `type`, `description`, `sort`, `create_time`, `update_time`, `remarks`, `del_flag`, `tenant_id`)
+VALUES (242, 64, '1', '已分派待申领', 'score_package_status', '已分派待申领', 1, '2021-02-03 14:17:45', '2021-02-03 14:17:45', '已分派待申领', '0', 1);
+INSERT INTO `hnqzx`.`sys_dict_item`(`id`, `dict_id`, `value`, `label`, `type`, `description`, `sort`, `create_time`, `update_time`, `remarks`, `del_flag`, `tenant_id`)
+VALUES (243, 64, '2', '已申领待审批', 'score_package_status', '已申领待审批', 2, '2021-02-03 14:18:03', '2021-02-03 14:18:03', '已申领待审批', '0', 1);
+INSERT INTO `hnqzx`.`sys_dict_item`(`id`, `dict_id`, `value`, `label`, `type`, `description`, `sort`, `create_time`, `update_time`, `remarks`, `del_flag`, `tenant_id`)
+VALUES (244, 64, '3', '进行中', 'score_package_status', '进行中', 3, '2021-02-03 14:18:23', '2021-02-03 14:18:23', '进行中', '0', 1);
+INSERT INTO `hnqzx`.`sys_dict_item`(`id`, `dict_id`, `value`, `label`, `type`, `description`, `sort`, `create_time`, `update_time`, `remarks`, `del_flag`, `tenant_id`)
+VALUES (245, 64, '4', '已完成待结算', 'score_package_status', '已完成待结算', 4, '2021-02-03 14:18:42', '2021-02-03 14:18:42', '已完成待结算', '0', 1);
+INSERT INTO `hnqzx`.`sys_dict_item`(`id`, `dict_id`, `value`, `label`, `type`, `description`, `sort`, `create_time`, `update_time`, `remarks`, `del_flag`, `tenant_id`)
+VALUES (246, 64, '5', '已提交结算申请', 'score_package_status', '已提交结算申请', 5, '2021-02-03 14:19:02', '2021-02-03 14:19:02', '已提交结算申请', '0', 1);
+INSERT INTO `hnqzx`.`sys_dict_item`(`id`, `dict_id`, `value`, `label`, `type`, `description`, `sort`, `create_time`, `update_time`, `remarks`, `del_flag`, `tenant_id`)
+VALUES (247, 64, '6', '已终止', 'score_package_status', '已终止', 6, '2021-02-03 14:19:19', '2021-02-03 14:19:19', '已终止', '0', 1);

+ 3 - 0
db/v2.0/623.sql

@@ -0,0 +1,3 @@
+-- 任务类型设置添加是否显示字段
+alter table wm_task_type
+    add display TINYINT(1) default 1 null comment '是否显示 0:不显示,1:显示';

+ 38 - 0
db/v2121.4.16/1.sql

@@ -0,0 +1,38 @@
+
+
+DROP TABLE IF EXISTS `monitoring_indicator`;
+CREATE TABLE `monitoring_indicator` (
+  `id` int(20) NOT NULL AUTO_INCREMENT,
+  `alarm_amount` decimal(18,0) NOT NULL DEFAULT '0' COMMENT '报警金额',
+  `limit_amount` decimal(18,0) NOT NULL DEFAULT '0' COMMENT '限制金额',
+  `sub_type` varchar(2) DEFAULT NULL,
+  PRIMARY KEY (`id`)
+) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8mb4 COMMENT='风险监控';
+
+
+DROP TABLE IF EXISTS `sys_dept_sub`;
+CREATE TABLE `sys_dept_sub` (
+  `sub_id` int(11) NOT NULL AUTO_INCREMENT,
+  `dept_id` int(20) NOT NULL,
+  `subject_type` varchar(2) NOT NULL DEFAULT '0' COMMENT '认证方式0-人力家 1-税邦云',
+  `app_id` varchar(32) DEFAULT NULL,
+  `app_secret` varchar(64) DEFAULT NULL,
+  `rsa_public_key` varchar(255) DEFAULT NULL,
+  `query_url` varchar(255) DEFAULT NULL,
+  `subject_name` varchar(128) DEFAULT NULL COMMENT '结算主体',
+  `limit_amount` decimal(18,2) DEFAULT NULL,
+  `enable_flag` varchar(2) DEFAULT '0',
+  PRIMARY KEY (`sub_id`)
+) ENGINE=InnoDB AUTO_INCREMENT=22 DEFAULT CHARSET=utf8mb4 COMMENT='部门结算主体管理';
+
+DROP TABLE IF EXISTS `wm_dept_budget`;
+CREATE TABLE `wm_dept_budget` (
+  `id` int(11) NOT NULL AUTO_INCREMENT,
+  `dept_id` int(11) DEFAULT NULL COMMENT '所属机构',
+  `belong_date` varchar(20) DEFAULT NULL COMMENT '预算月份',
+  `declare_dept` varchar(255) DEFAULT NULL COMMENT '申报机构',
+  `budget_type` varchar(2) DEFAULT NULL COMMENT '预算类型',
+  `budget` int(20) DEFAULT NULL COMMENT '预算值',
+  `create_time` datetime DEFAULT NULL COMMENT '创建时间',
+  PRIMARY KEY (`id`)
+) ENGINE=InnoDB AUTO_INCREMENT=6 DEFAULT CHARSET=utf8mb4 COMMENT='预算管理';

+ 20 - 0
db/v2121.4.16/2.sql

@@ -0,0 +1,20 @@
+
+
+ALTER TABLE `sys_dept` ADD `tax_code` varchar(50) DEFAULT null  COMMENT '税号';
+ALTER TABLE `wm_score_package` ADD `sub_type` varchar(2) DEFAULT null  COMMENT '结算渠道';
+ALTER TABLE `sys_user` ADD `rlj_cert_status` int(2) DEFAULT null  COMMENT '人力家认证状态';
+
+
+ALTER TABLE `wm_score_package_settle_note` ADD `task_id` varchar(20) DEFAULT null  COMMENT '任务ID';
+ALTER TABLE `wm_score_package_settle_note` ADD `category_name` varchar(128) DEFAULT null  COMMENT '开票类型名称';
+ALTER TABLE `wm_score_package_settle_note` ADD `create_time` datetime DEFAULT null  COMMENT '创建时间';
+ALTER TABLE `wm_score_package_settle_note` ADD `sub_time` datetime DEFAULT null  COMMENT '提交时间';
+ALTER TABLE `wm_score_package_settle_note` ADD `update_time` datetime DEFAULT null  COMMENT '更新时间';
+ALTER TABLE `wm_score_package_settle_note` ADD `stream_id` varchar(50) DEFAULT null  COMMENT '税邦云流水号';
+ALTER TABLE `wm_score_package_settle_note` ADD `id_card_number` varchar(20) DEFAULT null  COMMENT '身份证号';
+ALTER TABLE `wm_score_package_settle_note` ADD `sub_type` varchar(2) DEFAULT null  COMMENT '结算类型';
+
+
+ALTER TABLE sys_dept MODIFY COLUMN subject_type VARCHAR(50);
+ALTER TABLE wm_da_agent MODIFY COLUMN subject_type VARCHAR(50);
+ALTER TABLE wm_da_drug_ent MODIFY COLUMN subject_type VARCHAR(50);

+ 18 - 0
db/v2121.4.16/3.sql

@@ -0,0 +1,18 @@
+
+
+update sys_dept d set tax_code = (
+select t.zj_number  from wm_da_agent t where d.dept_id = t.dept_id
+)
+
+update sys_dept d set tax_code = (
+select t.entcode  from wm_da_drug_ent t where d.dept_id = t.dept_id
+) where tax_code is null
+
+
+update sys_user  set  rlj_cert_status = cert_status where cert_status < 10
+
+insert into sys_dept_sub (dept_id,subject_type,app_id,app_secret,rsa_public_key,query_url,subject_name,enable_flag)
+SELECT dept_id,subject_type,app_id,app_secret,rsa_public_key,query_url,subject_name,1 from sys_dept where dept_id<>1 and del_flag=0  and app_id is not null
+
+update wm_score_package_settle_note t set id_card_number  = (
+select s.id_card_number from sys_user s where t.user_id = s.user_id )

+ 7 - 0
db/v2121.4.16/README.md

@@ -0,0 +1,7 @@
+## v201.4.16修改记录
+
+1.userType 弃用
+2.subject_type  修改为数组 String[] 
+3.sys_dept 新增税号字段 sys_dept subject_type字段对应sys_dept_sub 记录
+4.人员新增 认证状态根据配置的结算渠道赋初始值
+5.人员认证状态拆分:certStatus 税邦云认证状态   rljCertStatus人力家认证状态

+ 148 - 0
docker-compose.yml

@@ -0,0 +1,148 @@
+# 使用说明 V3.8.0
+# 1. 使用docker-compose  宿主机不需要配置host来发现
+# 2. 无需修改源码,根目录  docker-compose up 即可
+# 3. 静静等待服务启动
+
+version: '2'
+services:
+  hnqz-register:
+    build:
+      context: ./hnqz-register
+    restart: always
+    container_name: hnqz-register
+    image: hnqz-register
+    ports:
+      - 8848:8848
+    extra_hosts:
+      - "hnqz-register:172.21.0.7"
+      - "hnqz-gateway:172.21.0.7"
+      - "hnqz-redis:172.21.0.7"
+      - "hnqz-zookeeper:172.21.0.7"
+      - "hnqz-xxl:172.21.0.7"
+      - "hnqz-mysql:172.21.0.7"
+      - "hnqz-sentinel:172.21.0.71"
+
+  hnqz-gateway:
+    build:
+      context: ./hnqz-gateway
+    restart: always
+    container_name: hnqz-gateway
+    image: hnqz-gateway
+    ports:
+      - 9999:9999
+    extra_hosts:
+      - "hnqz-register:172.21.0.7"
+      - "hnqz-gateway:172.21.0.7"
+      - "hnqz-redis:172.21.0.7"
+      - "hnqz-zookeeper:172.21.0.7"
+      - "hnqz-xxl:172.21.0.7"
+      - "hnqz-mysql:172.21.0.7"
+      - "hnqz-sentinel:172.21.0.71"
+
+  hnqz-auth:
+    build:
+      context: ./hnqz-auth
+    restart: always
+    container_name: hnqz-auth
+    image: hnqz-auth
+    extra_hosts:
+      - "hnqz-register:172.21.0.7"
+      - "hnqz-gateway:172.21.0.7"
+      - "hnqz-redis:172.21.0.7"
+      - "hnqz-zookeeper:172.21.0.7"
+      - "hnqz-xxl:172.21.0.7"
+      - "hnqz-mysql:172.21.0.7"
+      - "hnqz-sentinel:172.21.0.71"
+
+  hnqz-daemon-quartz:
+    build:
+      context: ./hnqz-visual/hnqz-daemon-quartz
+    restart: always
+    image: hnqz-daemon-quartz
+    container_name: hnqz-daemon-quartz
+    extra_hosts:
+      - "hnqz-register:172.21.0.7"
+      - "hnqz-gateway:172.21.0.7"
+      - "hnqz-redis:172.21.0.7"
+      - "hnqz-zookeeper:172.21.0.7"
+      - "hnqz-xxl:172.21.0.7"
+      - "hnqz-mysql:172.21.0.7"
+      - "hnqz-sentinel:172.21.0.71"
+
+  hnqz-upms:
+    build:
+      context: ./hnqz-upms/hnqz-upms-biz
+    restart: always
+    container_name: hnqz-upms
+    image: hnqz-upms
+    extra_hosts:
+      - "hnqz-register:172.21.0.7"
+      - "hnqz-gateway:172.21.0.7"
+      - "hnqz-redis:172.21.0.7"
+      - "hnqz-zookeeper:172.21.0.7"
+      - "hnqz-xxl:172.21.0.7"
+      - "hnqz-mysql:172.21.0.7"
+      - "hnqz-sentinel:172.21.0.71"
+#  hnqz-monitor:
+#    build:
+#      context: ./hnqz-visual/hnqz-monitor
+#    restart: always
+#    image: hnqz-monitor
+#    container_name: hnqz-monitor
+#    ports:
+#      - 5001:5001
+#
+
+#  hnqz-daemon-elastic-job:
+#    build:
+#      context: ./hnqz-visual/hnqz-daemon-elastic-job
+#    restart: always
+#    image: hnqz-daemon-elastic-job
+#    container_name: hnqz-daemon-elastic-job
+
+#  hnqz-codegen:
+#    build:
+#      context: ./hnqz-visual/hnqz-codegen
+#    restart: always
+#    image: hnqz-codegen
+#    container_name: hnqz-codegen
+
+#  hnqz-mp-platform:
+#    build:
+#      context: ./hnqz-visual/hnqz-mp-platform
+#    restart: always
+#    image: hnqz-mp-platform
+#    container_name: hnqz-mp-platform
+#
+#  hnqz-pay-platform:
+#    build:
+#      context: ./hnqz-visual/hnqz-pay-platform
+#    restart: always
+#    image: hnqz-pay-platform
+#    container_name: hnqz-pay-platform
+#
+#  hnqz-oa-platform:
+#    build:
+#      context: ./hnqz-visual/hnqz-oa-platform
+#    restart: always
+#    image: hnqz-oa-platform
+#    container_name: hnqz-oa-platform
+#
+#  hnqz-tx-manager:
+#    build:
+#      context: ./hnqz-visual/hnqz-tx-manager
+#    restart: always
+#    image: hnqz-tx-manager
+#    container_name: hnqz-tx-manager
+#    ports:
+#      - 5004:5004
+#      - 9998:9998
+#
+#  hnqz-sentinel:
+#    build:
+#      context: ./hnqz-visual/hnqz-sentinel-dashboard
+#    restart: always
+#    image: hnqz-sentinel
+#    container_name: hnqz-sentinel
+#    ports:
+#      - 5020:5020

+ 18 - 0
hnqz-auth/Dockerfile

@@ -0,0 +1,18 @@
+FROM pig4cloud/java:8-jre
+
+MAINTAINER
+
+ENV TZ=Asia/Shanghai
+ENV JAVA_OPTS="-Xms128m -Xmx256m -Djava.security.egd=file:/dev/./urandom"
+
+RUN ln -sf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone
+
+RUN mkdir -p /hnqz-auth
+
+WORKDIR /hnqz-auth
+
+EXPOSE 3000
+
+ADD ./target/hnqz-auth.jar ./
+
+CMD sleep 120;java $JAVA_OPTS -jar hnqz-auth.jar

+ 256 - 0
hnqz-auth/hnqz-auth.iml

@@ -0,0 +1,256 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<module org.jetbrains.idea.maven.project.MavenProjectsManager.isMavenModule="true" type="JAVA_MODULE" version="4">
+  <component name="FacetManager">
+    <facet type="web" name="Web">
+      <configuration>
+        <webroots />
+      </configuration>
+    </facet>
+    <facet type="Spring" name="Spring">
+      <configuration />
+    </facet>
+  </component>
+  <component name="NewModuleRootManager" LANGUAGE_LEVEL="JDK_1_8">
+    <output url="file://$MODULE_DIR$/target/classes" />
+    <output-test url="file://$MODULE_DIR$/target/test-classes" />
+    <content url="file://$MODULE_DIR$">
+      <sourceFolder url="file://$MODULE_DIR$/src/main/java" isTestSource="false" />
+      <sourceFolder url="file://$MODULE_DIR$/src/main/resources" type="java-resource" />
+      <excludeFolder url="file://$MODULE_DIR$/target" />
+    </content>
+    <orderEntry type="inheritedJdk" />
+    <orderEntry type="sourceFolder" forTests="false" />
+    <orderEntry type="library" name="Maven: com.alibaba.cloud:spring-cloud-starter-alibaba-nacos-discovery:2.2.1.RELEASE" level="project" />
+    <orderEntry type="library" name="Maven: com.alibaba.nacos:nacos-client:1.2.1" level="project" />
+    <orderEntry type="library" name="Maven: com.alibaba.nacos:nacos-common:1.2.1" level="project" />
+    <orderEntry type="library" name="Maven: commons-io:commons-io:2.2" level="project" />
+    <orderEntry type="library" name="Maven: org.apache.commons:commons-lang3:3.10" level="project" />
+    <orderEntry type="library" name="Maven: com.alibaba.nacos:nacos-api:1.2.1" level="project" />
+    <orderEntry type="library" name="Maven: com.alibaba:fastjson:1.2.69" level="project" />
+    <orderEntry type="library" name="Maven: com.google.guava:guava:29.0-android" level="project" />
+    <orderEntry type="library" name="Maven: com.google.guava:failureaccess:1.0.1" level="project" />
+    <orderEntry type="library" name="Maven: com.google.guava:listenablefuture:9999.0-empty-to-avoid-conflict-with-guava" level="project" />
+    <orderEntry type="library" name="Maven: com.google.code.findbugs:jsr305:3.0.2" level="project" />
+    <orderEntry type="library" name="Maven: org.checkerframework:checker-compat-qual:2.5.5" level="project" />
+    <orderEntry type="library" name="Maven: com.google.errorprone:error_prone_annotations:2.3.4" level="project" />
+    <orderEntry type="library" name="Maven: com.google.j2objc:j2objc-annotations:1.3" level="project" />
+    <orderEntry type="library" name="Maven: commons-codec:commons-codec:1.14" level="project" />
+    <orderEntry type="library" name="Maven: com.fasterxml.jackson.core:jackson-core:2.11.0" level="project" />
+    <orderEntry type="library" name="Maven: com.fasterxml.jackson.core:jackson-databind:2.11.0" level="project" />
+    <orderEntry type="library" name="Maven: com.fasterxml.jackson.core:jackson-annotations:2.11.0" level="project" />
+    <orderEntry type="library" name="Maven: io.prometheus:simpleclient:0.5.0" level="project" />
+    <orderEntry type="library" name="Maven: org.yaml:snakeyaml:1.26" level="project" />
+    <orderEntry type="library" name="Maven: com.alibaba.spring:spring-context-support:1.0.6" level="project" />
+    <orderEntry type="library" name="Maven: org.springframework.cloud:spring-cloud-commons:2.2.3.RELEASE" level="project" />
+    <orderEntry type="library" name="Maven: org.springframework.security:spring-security-crypto:5.3.3.RELEASE" level="project" />
+    <orderEntry type="library" name="Maven: org.springframework.cloud:spring-cloud-context:2.2.3.RELEASE" level="project" />
+    <orderEntry type="library" name="Maven: org.springframework.cloud:spring-cloud-starter-netflix-ribbon:2.2.3.RELEASE" level="project" />
+    <orderEntry type="library" name="Maven: org.springframework.cloud:spring-cloud-starter:2.2.3.RELEASE" level="project" />
+    <orderEntry type="library" name="Maven: org.springframework.security:spring-security-rsa:1.0.9.RELEASE" level="project" />
+    <orderEntry type="library" name="Maven: org.bouncycastle:bcpkix-jdk15on:1.64" level="project" />
+    <orderEntry type="library" name="Maven: org.bouncycastle:bcprov-jdk15on:1.64" level="project" />
+    <orderEntry type="library" name="Maven: org.springframework.cloud:spring-cloud-netflix-ribbon:2.2.3.RELEASE" level="project" />
+    <orderEntry type="library" name="Maven: org.springframework.cloud:spring-cloud-netflix-archaius:2.2.3.RELEASE" level="project" />
+    <orderEntry type="library" name="Maven: org.springframework.cloud:spring-cloud-starter-netflix-archaius:2.2.3.RELEASE" level="project" />
+    <orderEntry type="library" name="Maven: com.netflix.archaius:archaius-core:0.7.6" level="project" />
+    <orderEntry type="library" name="Maven: commons-configuration:commons-configuration:1.8" level="project" />
+    <orderEntry type="library" name="Maven: com.netflix.ribbon:ribbon:2.3.0" level="project" />
+    <orderEntry type="library" scope="RUNTIME" name="Maven: com.netflix.ribbon:ribbon-transport:2.3.0" level="project" />
+    <orderEntry type="library" scope="RUNTIME" name="Maven: io.reactivex:rxnetty-contexts:0.4.9" level="project" />
+    <orderEntry type="library" scope="RUNTIME" name="Maven: io.reactivex:rxnetty-servo:0.4.9" level="project" />
+    <orderEntry type="library" name="Maven: com.netflix.hystrix:hystrix-core:1.5.18" level="project" />
+    <orderEntry type="library" scope="RUNTIME" name="Maven: javax.inject:javax.inject:1" level="project" />
+    <orderEntry type="library" scope="RUNTIME" name="Maven: io.reactivex:rxnetty:0.4.9" level="project" />
+    <orderEntry type="library" name="Maven: com.netflix.ribbon:ribbon-core:2.3.0" level="project" />
+    <orderEntry type="library" name="Maven: commons-lang:commons-lang:2.6" level="project" />
+    <orderEntry type="library" name="Maven: com.netflix.ribbon:ribbon-httpclient:2.3.0" level="project" />
+    <orderEntry type="library" scope="RUNTIME" name="Maven: commons-collections:commons-collections:3.2.2" level="project" />
+    <orderEntry type="library" scope="RUNTIME" name="Maven: org.apache.httpcomponents:httpclient:4.5.12" level="project" />
+    <orderEntry type="library" scope="RUNTIME" name="Maven: org.apache.httpcomponents:httpcore:4.4.13" level="project" />
+    <orderEntry type="library" scope="RUNTIME" name="Maven: com.sun.jersey:jersey-client:1.19.1" level="project" />
+    <orderEntry type="library" scope="RUNTIME" name="Maven: com.sun.jersey:jersey-core:1.19.1" level="project" />
+    <orderEntry type="library" scope="RUNTIME" name="Maven: javax.ws.rs:jsr311-api:1.1.1" level="project" />
+    <orderEntry type="library" scope="RUNTIME" name="Maven: com.sun.jersey.contribs:jersey-apache-client4:1.19.1" level="project" />
+    <orderEntry type="library" scope="RUNTIME" name="Maven: com.netflix.servo:servo-core:0.12.21" level="project" />
+    <orderEntry type="library" scope="RUNTIME" name="Maven: com.netflix.netflix-commons:netflix-commons-util:0.3.0" level="project" />
+    <orderEntry type="library" name="Maven: com.netflix.ribbon:ribbon-loadbalancer:2.3.0" level="project" />
+    <orderEntry type="library" scope="RUNTIME" name="Maven: com.netflix.netflix-commons:netflix-statistics:0.1.1" level="project" />
+    <orderEntry type="library" name="Maven: io.reactivex:rxjava:1.3.8" level="project" />
+    <orderEntry type="library" name="Maven: com.alibaba.cloud:spring-cloud-starter-alibaba-nacos-config:2.2.1.RELEASE" level="project" />
+    <orderEntry type="module" module-name="hnqz-upms-api" />
+    <orderEntry type="module" module-name="hnqz-common-core" />
+    <orderEntry type="library" name="Maven: cn.hutool:hutool-all:5.3.7" level="project" />
+    <orderEntry type="library" name="Maven: javax.servlet:javax.servlet-api:4.0.1" level="project" />
+    <orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-starter-validation:2.3.1.RELEASE" level="project" />
+    <orderEntry type="library" name="Maven: org.hibernate.validator:hibernate-validator:6.1.5.Final" level="project" />
+    <orderEntry type="library" name="Maven: jakarta.validation:jakarta.validation-api:2.0.2" level="project" />
+    <orderEntry type="library" name="Maven: com.fasterxml:classmate:1.5.1" level="project" />
+    <orderEntry type="library" name="Maven: com.alibaba:transmittable-thread-local:2.11.4" level="project" />
+    <orderEntry type="library" name="Maven: io.swagger:swagger-annotations:1.5.22" level="project" />
+    <orderEntry type="library" name="Maven: com.baomidou:mybatis-plus-extension:3.3.2" level="project" />
+    <orderEntry type="library" name="Maven: com.baomidou:mybatis-plus-core:3.3.2" level="project" />
+    <orderEntry type="library" name="Maven: com.baomidou:mybatis-plus-annotation:3.3.2" level="project" />
+    <orderEntry type="library" name="Maven: com.github.jsqlparser:jsqlparser:3.1" level="project" />
+    <orderEntry type="library" name="Maven: org.mybatis:mybatis:3.5.4" level="project" />
+    <orderEntry type="library" name="Maven: org.mybatis:mybatis-spring:2.0.4" level="project" />
+    <orderEntry type="module" module-name="hnqz-common-log" />
+    <orderEntry type="library" name="Maven: org.springframework.security:spring-security-core:5.3.3.RELEASE" level="project" />
+    <orderEntry type="library" name="Maven: org.springframework:spring-aop:5.2.7.RELEASE" level="project" />
+    <orderEntry type="library" name="Maven: org.springframework:spring-beans:5.2.7.RELEASE" level="project" />
+    <orderEntry type="library" name="Maven: org.springframework:spring-context:5.2.7.RELEASE" level="project" />
+    <orderEntry type="library" name="Maven: org.springframework:spring-expression:5.2.7.RELEASE" level="project" />
+    <orderEntry type="library" name="Maven: org.springframework.security.oauth:spring-security-oauth2:2.3.6.RELEASE" level="project" />
+    <orderEntry type="library" name="Maven: org.springframework.security:spring-security-config:5.3.3.RELEASE" level="project" />
+    <orderEntry type="library" name="Maven: org.springframework.security:spring-security-web:5.3.3.RELEASE" level="project" />
+    <orderEntry type="library" name="Maven: org.codehaus.jackson:jackson-mapper-asl:1.9.13" level="project" />
+    <orderEntry type="library" name="Maven: org.codehaus.jackson:jackson-core-asl:1.9.13" level="project" />
+    <orderEntry type="module" module-name="hnqz-common-security" />
+    <orderEntry type="library" name="Maven: org.springframework.cloud:spring-cloud-starter-oauth2:2.2.2.RELEASE" level="project" />
+    <orderEntry type="library" name="Maven: org.springframework.cloud:spring-cloud-starter-security:2.2.2.RELEASE" level="project" />
+    <orderEntry type="library" name="Maven: org.springframework.cloud:spring-cloud-security:2.2.2.RELEASE" level="project" />
+    <orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-starter-security:2.3.1.RELEASE" level="project" />
+    <orderEntry type="library" name="Maven: org.springframework.security.oauth.boot:spring-security-oauth2-autoconfigure:2.1.2.RELEASE" level="project" />
+    <orderEntry type="library" name="Maven: com.sun.xml.bind:jaxb-core:2.3.0.1" level="project" />
+    <orderEntry type="library" name="Maven: com.sun.xml.bind:jaxb-impl:2.3.0.1" level="project" />
+    <orderEntry type="library" name="Maven: org.springframework.security:spring-security-jwt:1.0.9.RELEASE" level="project" />
+    <orderEntry type="library" name="Maven: javax.activation:javax.activation-api:1.2.0" level="project" />
+    <orderEntry type="library" name="Maven: javax.xml.bind:jaxb-api:2.3.1" level="project" />
+    <orderEntry type="library" name="Maven: io.github.openfeign:feign-core:10.10.1" level="project" />
+    <orderEntry type="library" name="Maven: org.aspectj:aspectjrt:1.9.5" level="project" />
+    <orderEntry type="module" module-name="hnqz-common-feign" />
+    <orderEntry type="library" name="Maven: org.springframework.cloud:spring-cloud-starter-openfeign:2.2.3.RELEASE" level="project" />
+    <orderEntry type="library" name="Maven: org.springframework.cloud:spring-cloud-openfeign-core:2.2.3.RELEASE" level="project" />
+    <orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-starter-aop:2.3.1.RELEASE" level="project" />
+    <orderEntry type="library" name="Maven: io.github.openfeign.form:feign-form-spring:3.8.0" level="project" />
+    <orderEntry type="library" name="Maven: io.github.openfeign.form:feign-form:3.8.0" level="project" />
+    <orderEntry type="library" name="Maven: commons-fileupload:commons-fileupload:1.4" level="project" />
+    <orderEntry type="library" name="Maven: io.github.openfeign:feign-slf4j:10.10.1" level="project" />
+    <orderEntry type="library" name="Maven: io.github.openfeign:feign-hystrix:10.10.1" level="project" />
+    <orderEntry type="library" name="Maven: mysql:mysql-connector-java:8.0.20" level="project" />
+    <orderEntry type="library" name="Maven: com.google.protobuf:protobuf-java:3.11.4" level="project" />
+    <orderEntry type="module" module-name="hnqz-common-data" />
+    <orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-starter-data-redis:2.3.1.RELEASE" level="project" />
+    <orderEntry type="library" name="Maven: org.springframework.data:spring-data-redis:2.3.1.RELEASE" level="project" />
+    <orderEntry type="library" name="Maven: org.springframework.data:spring-data-keyvalue:2.3.1.RELEASE" level="project" />
+    <orderEntry type="library" name="Maven: org.springframework.data:spring-data-commons:2.3.1.RELEASE" level="project" />
+    <orderEntry type="library" name="Maven: org.springframework:spring-oxm:5.2.7.RELEASE" level="project" />
+    <orderEntry type="library" name="Maven: io.lettuce:lettuce-core:5.3.1.RELEASE" level="project" />
+    <orderEntry type="library" name="Maven: io.netty:netty-common:4.1.50.Final" level="project" />
+    <orderEntry type="library" name="Maven: io.netty:netty-handler:4.1.50.Final" level="project" />
+    <orderEntry type="library" name="Maven: io.netty:netty-resolver:4.1.50.Final" level="project" />
+    <orderEntry type="library" name="Maven: io.netty:netty-buffer:4.1.50.Final" level="project" />
+    <orderEntry type="library" name="Maven: io.netty:netty-codec:4.1.50.Final" level="project" />
+    <orderEntry type="library" name="Maven: io.netty:netty-transport:4.1.50.Final" level="project" />
+    <orderEntry type="library" name="Maven: io.projectreactor:reactor-core:3.3.6.RELEASE" level="project" />
+    <orderEntry type="library" name="Maven: org.reactivestreams:reactive-streams:1.0.3" level="project" />
+    <orderEntry type="module" module-name="hnqz-common-sentinel" />
+    <orderEntry type="library" name="Maven: com.alibaba.cloud:spring-cloud-starter-alibaba-sentinel:2.2.1.RELEASE" level="project" />
+    <orderEntry type="library" name="Maven: com.alibaba.csp:sentinel-transport-simple-http:1.7.1" level="project" />
+    <orderEntry type="library" name="Maven: com.alibaba.csp:sentinel-transport-common:1.7.1" level="project" />
+    <orderEntry type="library" name="Maven: com.alibaba.csp:sentinel-datasource-extension:1.7.1" level="project" />
+    <orderEntry type="library" name="Maven: com.alibaba.csp:sentinel-annotation-aspectj:1.7.1" level="project" />
+    <orderEntry type="library" name="Maven: com.alibaba.csp:sentinel-core:1.7.1" level="project" />
+    <orderEntry type="library" name="Maven: org.aspectj:aspectjweaver:1.9.5" level="project" />
+    <orderEntry type="library" name="Maven: com.alibaba.cloud:spring-cloud-circuitbreaker-sentinel:2.2.1.RELEASE" level="project" />
+    <orderEntry type="library" name="Maven: com.alibaba.csp:sentinel-reactor-adapter:1.7.1" level="project" />
+    <orderEntry type="library" name="Maven: com.alibaba.csp:sentinel-spring-webflux-adapter:1.7.1" level="project" />
+    <orderEntry type="library" name="Maven: com.alibaba.csp:sentinel-spring-webmvc-adapter:1.7.1" level="project" />
+    <orderEntry type="library" name="Maven: com.alibaba.csp:sentinel-parameter-flow-control:1.7.1" level="project" />
+    <orderEntry type="library" name="Maven: com.googlecode.concurrentlinkedhashmap:concurrentlinkedhashmap-lru:1.4.2" level="project" />
+    <orderEntry type="library" name="Maven: com.alibaba.csp:sentinel-cluster-server-default:1.7.1" level="project" />
+    <orderEntry type="library" name="Maven: com.alibaba.csp:sentinel-cluster-common-default:1.7.1" level="project" />
+    <orderEntry type="library" name="Maven: com.alibaba.csp:sentinel-cluster-client-default:1.7.1" level="project" />
+    <orderEntry type="library" name="Maven: com.alibaba.cloud:spring-cloud-alibaba-sentinel-datasource:2.2.1.RELEASE" level="project" />
+    <orderEntry type="library" name="Maven: com.fasterxml.jackson.dataformat:jackson-dataformat-xml:2.11.0" level="project" />
+    <orderEntry type="library" name="Maven: com.fasterxml.jackson.module:jackson-module-jaxb-annotations:2.11.0" level="project" />
+    <orderEntry type="library" name="Maven: org.codehaus.woodstox:stax2-api:4.2" level="project" />
+    <orderEntry type="library" name="Maven: com.fasterxml.woodstox:woodstox-core:6.2.0" level="project" />
+    <orderEntry type="module" module-name="hnqz-common-gray" />
+    <orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-starter-jdbc:2.3.1.RELEASE" level="project" />
+    <orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-starter:2.3.1.RELEASE" level="project" />
+    <orderEntry type="library" name="Maven: org.springframework.boot:spring-boot:2.3.1.RELEASE" level="project" />
+    <orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-starter-logging:2.3.1.RELEASE" level="project" />
+    <orderEntry type="library" name="Maven: ch.qos.logback:logback-classic:1.2.3" level="project" />
+    <orderEntry type="library" name="Maven: ch.qos.logback:logback-core:1.2.3" level="project" />
+    <orderEntry type="library" name="Maven: org.apache.logging.log4j:log4j-to-slf4j:2.13.3" level="project" />
+    <orderEntry type="library" name="Maven: org.apache.logging.log4j:log4j-api:2.13.3" level="project" />
+    <orderEntry type="library" name="Maven: org.slf4j:jul-to-slf4j:1.7.30" level="project" />
+    <orderEntry type="library" name="Maven: jakarta.annotation:jakarta.annotation-api:1.3.5" level="project" />
+    <orderEntry type="library" name="Maven: com.zaxxer:HikariCP:3.4.5" level="project" />
+    <orderEntry type="library" name="Maven: org.springframework:spring-jdbc:5.2.7.RELEASE" level="project" />
+    <orderEntry type="library" name="Maven: org.springframework:spring-tx:5.2.7.RELEASE" level="project" />
+    <orderEntry type="library" name="Maven: com.alibaba:druid-spring-boot-starter:1.1.21" level="project" />
+    <orderEntry type="library" name="Maven: com.alibaba:druid:1.1.21" level="project" />
+    <orderEntry type="library" name="Maven: org.slf4j:slf4j-api:1.7.30" level="project" />
+    <orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-autoconfigure:2.3.1.RELEASE" level="project" />
+    <orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-starter-freemarker:2.3.1.RELEASE" level="project" />
+    <orderEntry type="library" name="Maven: org.freemarker:freemarker:2.3.30" level="project" />
+    <orderEntry type="library" name="Maven: org.springframework:spring-context-support:5.2.7.RELEASE" level="project" />
+    <orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-starter-web:2.3.1.RELEASE" level="project" />
+    <orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-starter-json:2.3.1.RELEASE" level="project" />
+    <orderEntry type="library" name="Maven: com.fasterxml.jackson.datatype:jackson-datatype-jdk8:2.11.0" level="project" />
+    <orderEntry type="library" name="Maven: com.fasterxml.jackson.datatype:jackson-datatype-jsr310:2.11.0" level="project" />
+    <orderEntry type="library" name="Maven: com.fasterxml.jackson.module:jackson-module-parameter-names:2.11.0" level="project" />
+    <orderEntry type="library" name="Maven: org.springframework:spring-web:5.2.7.RELEASE" level="project" />
+    <orderEntry type="library" name="Maven: org.springframework:spring-webmvc:5.2.7.RELEASE" level="project" />
+    <orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-starter-undertow:2.3.1.RELEASE" level="project" />
+    <orderEntry type="library" name="Maven: io.undertow:undertow-core:2.1.3.Final" level="project" />
+    <orderEntry type="library" name="Maven: org.jboss.logging:jboss-logging:3.4.1.Final" level="project" />
+    <orderEntry type="library" name="Maven: org.jboss.xnio:xnio-api:3.8.0.Final" level="project" />
+    <orderEntry type="library" name="Maven: org.wildfly.common:wildfly-common:1.5.2.Final" level="project" />
+    <orderEntry type="library" name="Maven: org.wildfly.client:wildfly-client-config:1.0.1.Final" level="project" />
+    <orderEntry type="library" scope="RUNTIME" name="Maven: org.jboss.xnio:xnio-nio:3.8.0.Final" level="project" />
+    <orderEntry type="library" name="Maven: org.jboss.threads:jboss-threads:3.1.0.Final" level="project" />
+    <orderEntry type="library" name="Maven: io.undertow:undertow-servlet:2.1.3.Final" level="project" />
+    <orderEntry type="library" name="Maven: org.jboss.spec.javax.annotation:jboss-annotations-api_1.3_spec:2.0.1.Final" level="project" />
+    <orderEntry type="library" name="Maven: io.undertow:undertow-websockets-jsr:2.1.3.Final" level="project" />
+    <orderEntry type="library" name="Maven: org.jboss.spec.javax.websocket:jboss-websocket-api_1.1_spec:2.0.0.Final" level="project" />
+    <orderEntry type="library" name="Maven: jakarta.servlet:jakarta.servlet-api:4.0.3" level="project" />
+    <orderEntry type="library" name="Maven: org.glassfish:jakarta.el:3.0.3" level="project" />
+    <orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-configuration-processor:2.3.1.RELEASE" level="project" />
+    <orderEntry type="library" name="Maven: com.github.ulisesbocchio:jasypt-spring-boot-starter:2.1.1" level="project" />
+    <orderEntry type="library" name="Maven: com.github.ulisesbocchio:jasypt-spring-boot:2.1.1" level="project" />
+    <orderEntry type="library" name="Maven: com.melloware:jasypt:1.9.4" level="project" />
+    <orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-starter-actuator:2.3.1.RELEASE" level="project" />
+    <orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-actuator-autoconfigure:2.3.1.RELEASE" level="project" />
+    <orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-actuator:2.3.1.RELEASE" level="project" />
+    <orderEntry type="library" name="Maven: io.micrometer:micrometer-core:1.5.1" level="project" />
+    <orderEntry type="library" name="Maven: org.hdrhistogram:HdrHistogram:2.1.12" level="project" />
+    <orderEntry type="library" scope="RUNTIME" name="Maven: org.latencyutils:LatencyUtils:2.0.3" level="project" />
+    <orderEntry type="library" name="Maven: de.codecentric:spring-boot-admin-starter-client:2.2.3" level="project" />
+    <orderEntry type="library" name="Maven: de.codecentric:spring-boot-admin-client:2.2.3" level="project" />
+    <orderEntry type="library" scope="PROVIDED" name="Maven: org.projectlombok:lombok:1.18.12" level="project" />
+    <orderEntry type="library" scope="TEST" name="Maven: org.springframework.boot:spring-boot-starter-test:2.3.1.RELEASE" level="project" />
+    <orderEntry type="library" scope="TEST" name="Maven: org.springframework.boot:spring-boot-test:2.3.1.RELEASE" level="project" />
+    <orderEntry type="library" scope="TEST" name="Maven: org.springframework.boot:spring-boot-test-autoconfigure:2.3.1.RELEASE" level="project" />
+    <orderEntry type="library" scope="TEST" name="Maven: com.jayway.jsonpath:json-path:2.4.0" level="project" />
+    <orderEntry type="library" scope="TEST" name="Maven: net.minidev:json-smart:2.3" level="project" />
+    <orderEntry type="library" scope="TEST" name="Maven: net.minidev:accessors-smart:1.2" level="project" />
+    <orderEntry type="library" scope="TEST" name="Maven: org.ow2.asm:asm:5.0.4" level="project" />
+    <orderEntry type="library" name="Maven: jakarta.xml.bind:jakarta.xml.bind-api:2.3.3" level="project" />
+    <orderEntry type="library" name="Maven: jakarta.activation:jakarta.activation-api:1.2.2" level="project" />
+    <orderEntry type="library" scope="TEST" name="Maven: org.assertj:assertj-core:3.16.1" level="project" />
+    <orderEntry type="library" scope="TEST" name="Maven: org.hamcrest:hamcrest:2.2" level="project" />
+    <orderEntry type="library" scope="TEST" name="Maven: org.junit.jupiter:junit-jupiter:5.6.2" level="project" />
+    <orderEntry type="library" scope="TEST" name="Maven: org.junit.jupiter:junit-jupiter-api:5.6.2" level="project" />
+    <orderEntry type="library" scope="TEST" name="Maven: org.opentest4j:opentest4j:1.2.0" level="project" />
+    <orderEntry type="library" scope="TEST" name="Maven: org.junit.platform:junit-platform-commons:1.6.2" level="project" />
+    <orderEntry type="library" scope="TEST" name="Maven: org.junit.jupiter:junit-jupiter-params:5.6.2" level="project" />
+    <orderEntry type="library" scope="TEST" name="Maven: org.junit.jupiter:junit-jupiter-engine:5.6.2" level="project" />
+    <orderEntry type="library" scope="TEST" name="Maven: org.junit.vintage:junit-vintage-engine:5.6.2" level="project" />
+    <orderEntry type="library" scope="TEST" name="Maven: org.apiguardian:apiguardian-api:1.1.0" level="project" />
+    <orderEntry type="library" scope="TEST" name="Maven: org.junit.platform:junit-platform-engine:1.6.2" level="project" />
+    <orderEntry type="library" scope="TEST" name="Maven: junit:junit:4.13" level="project" />
+    <orderEntry type="library" scope="TEST" name="Maven: org.mockito:mockito-core:3.3.3" level="project" />
+    <orderEntry type="library" scope="TEST" name="Maven: net.bytebuddy:byte-buddy:1.10.11" level="project" />
+    <orderEntry type="library" scope="TEST" name="Maven: net.bytebuddy:byte-buddy-agent:1.10.11" level="project" />
+    <orderEntry type="library" scope="TEST" name="Maven: org.objenesis:objenesis:2.6" level="project" />
+    <orderEntry type="library" scope="TEST" name="Maven: org.mockito:mockito-junit-jupiter:3.3.3" level="project" />
+    <orderEntry type="library" scope="TEST" name="Maven: org.skyscreamer:jsonassert:1.5.0" level="project" />
+    <orderEntry type="library" scope="TEST" name="Maven: com.vaadin.external.google:android-json:0.0.20131108.vaadin1" level="project" />
+    <orderEntry type="library" name="Maven: org.springframework:spring-core:5.2.7.RELEASE" level="project" />
+    <orderEntry type="library" name="Maven: org.springframework:spring-jcl:5.2.7.RELEASE" level="project" />
+    <orderEntry type="library" scope="TEST" name="Maven: org.springframework:spring-test:5.2.7.RELEASE" level="project" />
+    <orderEntry type="library" scope="TEST" name="Maven: org.xmlunit:xmlunit-core:2.7.0" level="project" />
+  </component>
+</module>

+ 129 - 0
hnqz-auth/pom.xml

@@ -0,0 +1,129 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+  ~
+  ~      Copyright (c) 2018-2025, hnqz All rights reserved.
+  ~
+  ~  Redistribution and use in source and binary forms, with or without
+  ~  modification, are permitted provided that the following conditions are met:
+  ~
+  ~ Redistributions of source code must retain the above copyright notice,
+  ~  this list of conditions and the following disclaimer.
+  ~  Redistributions in binary form must reproduce the above copyright
+  ~  notice, this list of conditions and the following disclaimer in the
+  ~  documentation and/or other materials provided with the distribution.
+  ~  Neither the name of the pig4cloud.com developer nor the names of its
+  ~  contributors may be used to endorse or promote products derived from
+  ~  this software without specific prior written permission.
+  ~  Author: hnqz
+  ~
+  -->
+
+<project xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://maven.apache.org/POM/4.0.0"
+		 xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+	<modelVersion>4.0.0</modelVersion>
+	<parent>
+		<groupId>com.qunzhixinxi</groupId>
+		<artifactId>hnqz</artifactId>
+		<version>3.9.0</version>
+	</parent>
+
+	<artifactId>hnqz-auth</artifactId>
+	<packaging>jar</packaging>
+
+	<description>hnqz 认证授权中心,基于 spring security oAuth2</description>
+
+	<dependencies>
+		<!--注册中心客户端-->
+		<dependency>
+			<groupId>com.alibaba.cloud</groupId>
+			<artifactId>spring-cloud-starter-alibaba-nacos-discovery</artifactId>
+		</dependency>
+		<!--配置中心客户端-->
+		<dependency>
+			<groupId>com.alibaba.cloud</groupId>
+			<artifactId>spring-cloud-starter-alibaba-nacos-config</artifactId>
+		</dependency>
+		<!--upms api、model 模块-->
+		<dependency>
+			<groupId>com.qunzhixinxi</groupId>
+			<artifactId>hnqz-upms-api</artifactId>
+		</dependency>
+		<!--log-->
+		<dependency>
+			<groupId>com.qunzhixinxi</groupId>
+			<artifactId>hnqz-common-log</artifactId>
+		</dependency>
+		<!--security-->
+		<dependency>
+			<groupId>com.qunzhixinxi</groupId>
+			<artifactId>hnqz-common-security</artifactId>
+		</dependency>
+		<!--feign 依赖-->
+		<dependency>
+			<groupId>com.qunzhixinxi</groupId>
+			<artifactId>hnqz-common-feign</artifactId>
+		</dependency>
+		<!--mysql 驱动-->
+		<dependency>
+			<groupId>mysql</groupId>
+			<artifactId>mysql-connector-java</artifactId>
+		</dependency>
+		<!--缓存操作-->
+		<dependency>
+			<groupId>com.qunzhixinxi</groupId>
+			<artifactId>hnqz-common-data</artifactId>
+		</dependency>
+		<!--sentinel 依赖-->
+		<dependency>
+			<groupId>com.qunzhixinxi</groupId>
+			<artifactId>hnqz-common-sentinel</artifactId>
+		</dependency>
+		<!--路由控制-->
+		<dependency>
+			<groupId>com.qunzhixinxi</groupId>
+			<artifactId>hnqz-common-gray</artifactId>
+		</dependency>
+		<!--JDBC相关-->
+		<dependency>
+			<groupId>org.springframework.boot</groupId>
+			<artifactId>spring-boot-starter-jdbc</artifactId>
+		</dependency>
+		<!-- druid 连接池 -->
+		<dependency>
+			<groupId>com.alibaba</groupId>
+			<artifactId>druid-spring-boot-starter</artifactId>
+		</dependency>
+		<!--freemarker-->
+		<dependency>
+			<groupId>org.springframework.boot</groupId>
+			<artifactId>spring-boot-starter-freemarker</artifactId>
+		</dependency>
+		<!--web 模块-->
+		<dependency>
+			<groupId>org.springframework.boot</groupId>
+			<artifactId>spring-boot-starter-web</artifactId>
+		</dependency>
+		<!--undertow容器-->
+		<dependency>
+			<groupId>org.springframework.boot</groupId>
+			<artifactId>spring-boot-starter-undertow</artifactId>
+		</dependency>
+	</dependencies>
+
+	<build>
+		<plugins>
+			<plugin>
+				<groupId>org.springframework.boot</groupId>
+				<artifactId>spring-boot-maven-plugin</artifactId>
+			</plugin>
+			<plugin>
+				<groupId>io.fabric8</groupId>
+				<artifactId>docker-maven-plugin</artifactId>
+				<configuration>
+					<skip>false</skip>
+				</configuration>
+			</plugin>
+		</plugins>
+	</build>
+
+</project>

+ 38 - 0
hnqz-auth/src/main/java/com/qunzhixinxi/hnqz/auth/HnqzAuthApplication.java

@@ -0,0 +1,38 @@
+/*
+ *
+ *      Copyright (c) 2018-2025, hnqz All rights reserved.
+ *
+ *  Redistribution and use in source and binary forms, with or without
+ *  modification, are permitted provided that the following conditions are met:
+ *
+ * Redistributions of source code must retain the above copyright notice,
+ *  this list of conditions and the following disclaimer.
+ *  Redistributions in binary form must reproduce the above copyright
+ *  notice, this list of conditions and the following disclaimer in the
+ *  documentation and/or other materials provided with the distribution.
+ *  Neither the name of the pig4cloud.com developer nor the names of its
+ *  contributors may be used to endorse or promote products derived from
+ *  this software without specific prior written permission.
+ *  Author: hnqz
+ *
+ */
+
+package com.qunzhixinxi.hnqz.auth;
+
+import com.qunzhixinxi.hnqz.common.feign.annotation.EnableHnqzFeignClients;
+import org.springframework.boot.SpringApplication;
+import org.springframework.cloud.client.SpringCloudApplication;
+
+/**
+ * @author hnqz
+ * @date 2020-02-08 认证授权中心
+ */
+@SpringCloudApplication
+@EnableHnqzFeignClients
+public class HnqzAuthApplication {
+
+	public static void main(String[] args) {
+		SpringApplication.run(HnqzAuthApplication.class, args);
+	}
+
+}

+ 125 - 0
hnqz-auth/src/main/java/com/qunzhixinxi/hnqz/auth/config/AuthorizationServerConfig.java

@@ -0,0 +1,125 @@
+/*
+ *
+ *      Copyright (c) 2018-2025, hnqz All rights reserved.
+ *
+ *  Redistribution and use in source and binary forms, with or without
+ *  modification, are permitted provided that the following conditions are met:
+ *
+ * Redistributions of source code must retain the above copyright notice,
+ *  this list of conditions and the following disclaimer.
+ *  Redistributions in binary form must reproduce the above copyright
+ *  notice, this list of conditions and the following disclaimer in the
+ *  documentation and/or other materials provided with the distribution.
+ *  Neither the name of the pig4cloud.com developer nor the names of its
+ *  contributors may be used to endorse or promote products derived from
+ *  this software without specific prior written permission.
+ *  Author: hnqz
+ *
+ */
+
+package com.qunzhixinxi.hnqz.auth.config;
+
+import cn.hutool.core.util.StrUtil;
+import com.qunzhixinxi.hnqz.common.core.constant.SecurityConstants;
+import com.qunzhixinxi.hnqz.common.data.tenant.TenantContextHolder;
+import com.qunzhixinxi.hnqz.common.security.component.HnqzWebResponseExceptionTranslator;
+import lombok.AllArgsConstructor;
+import lombok.SneakyThrows;
+import org.springframework.context.annotation.Bean;
+import org.springframework.context.annotation.Configuration;
+import org.springframework.data.redis.connection.RedisConnectionFactory;
+import org.springframework.http.HttpMethod;
+import org.springframework.security.authentication.AuthenticationManager;
+import org.springframework.security.authentication.ProviderManager;
+import org.springframework.security.core.userdetails.UserDetailsByNameServiceWrapper;
+import org.springframework.security.core.userdetails.UserDetailsService;
+import org.springframework.security.oauth2.config.annotation.configurers.ClientDetailsServiceConfigurer;
+import org.springframework.security.oauth2.config.annotation.web.configuration.AuthorizationServerConfigurerAdapter;
+import org.springframework.security.oauth2.config.annotation.web.configuration.EnableAuthorizationServer;
+import org.springframework.security.oauth2.config.annotation.web.configurers.AuthorizationServerEndpointsConfigurer;
+import org.springframework.security.oauth2.config.annotation.web.configurers.AuthorizationServerSecurityConfigurer;
+import org.springframework.security.oauth2.provider.ClientDetailsService;
+import org.springframework.security.oauth2.provider.OAuth2Authentication;
+import org.springframework.security.oauth2.provider.token.DefaultAuthenticationKeyGenerator;
+import org.springframework.security.oauth2.provider.token.TokenEnhancer;
+import org.springframework.security.oauth2.provider.token.TokenStore;
+import org.springframework.security.oauth2.provider.token.store.redis.RedisTokenStore;
+import org.springframework.security.web.authentication.preauth.PreAuthenticatedAuthenticationProvider;
+
+import java.util.Arrays;
+
+/**
+ * @author hnqz
+ * @date 2018/6/22 认证服务器配置
+ */
+@Configuration
+@AllArgsConstructor
+@EnableAuthorizationServer
+public class AuthorizationServerConfig extends AuthorizationServerConfigurerAdapter {
+
+	private final ClientDetailsService hnqzClientDetailsServiceImpl;
+
+	private final AuthenticationManager authenticationManagerBean;
+
+	private final RedisConnectionFactory redisConnectionFactory;
+
+	private final UserDetailsService hnqzUserDetailsService;
+
+	private final TokenEnhancer hnqzTokenEnhancer;
+
+	@Override
+	@SneakyThrows
+	public void configure(ClientDetailsServiceConfigurer clients) {
+		clients.withClientDetails(hnqzClientDetailsServiceImpl);
+	}
+
+	@Override
+	public void configure(AuthorizationServerSecurityConfigurer oauthServer) {
+		oauthServer.allowFormAuthenticationForClients().checkTokenAccess("isAuthenticated()");
+	}
+
+	@Override
+	public void configure(AuthorizationServerEndpointsConfigurer endpoints) {
+		endpoints.tokenServices(tokenServices(endpoints));
+
+		endpoints.allowedTokenEndpointRequestMethods(HttpMethod.GET, HttpMethod.POST).tokenStore(tokenStore())
+				.tokenEnhancer(hnqzTokenEnhancer).userDetailsService(hnqzUserDetailsService)
+				.authenticationManager(authenticationManagerBean).reuseRefreshTokens(false)
+				.pathMapping("/oauth/confirm_access", "/token/confirm_access")
+				.exceptionTranslator(new HnqzWebResponseExceptionTranslator());
+	}
+
+	@Bean
+	public TokenStore tokenStore() {
+		RedisTokenStore tokenStore = new RedisTokenStore(redisConnectionFactory);
+		tokenStore.setPrefix(SecurityConstants.PIGX_PREFIX + SecurityConstants.OAUTH_PREFIX);
+		tokenStore.setAuthenticationKeyGenerator(new DefaultAuthenticationKeyGenerator() {
+			@Override
+			public String extractKey(OAuth2Authentication authentication) {
+				return super.extractKey(authentication) + StrUtil.COLON + TenantContextHolder.getTenantId();
+			}
+		});
+		return tokenStore;
+	}
+
+	private HnqzTokenServices tokenServices(AuthorizationServerEndpointsConfigurer endpoints) {
+		HnqzTokenServices tokenServices = new HnqzTokenServices();
+		tokenServices.setTokenStore(tokenStore());
+		tokenServices.setSupportRefreshToken(true);//支持刷新token
+		tokenServices.setReuseRefreshToken(true);
+		tokenServices.setClientDetailsService(endpoints.getClientDetailsService());
+		tokenServices.setTokenEnhancer(hnqzTokenEnhancer);
+		addUserDetailsService(tokenServices, hnqzUserDetailsService);
+		return tokenServices;
+	}
+
+	private void addUserDetailsService(HnqzTokenServices tokenServices, UserDetailsService userDetailsService) {
+		if (userDetailsService != null) {
+			PreAuthenticatedAuthenticationProvider provider = new PreAuthenticatedAuthenticationProvider();
+			provider.setPreAuthenticatedUserDetailsService(new UserDetailsByNameServiceWrapper<>(
+					userDetailsService));
+			tokenServices.setAuthenticationManager(new ProviderManager(Arrays.asList(provider)));
+		}
+	}
+
+}

+ 427 - 0
hnqz-auth/src/main/java/com/qunzhixinxi/hnqz/auth/config/HnqzTokenServices.java

@@ -0,0 +1,427 @@
+/*
+ * Copyright 2008 Web Cohesion
+ *
+ * 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
+ *
+ * https://www.apache.org/licenses/LICENSE-2.0
+ *
+ * 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.qunzhixinxi.hnqz.auth.config;
+
+import org.springframework.beans.factory.InitializingBean;
+import org.springframework.security.authentication.AuthenticationManager;
+import org.springframework.security.core.Authentication;
+import org.springframework.security.core.AuthenticationException;
+import org.springframework.security.oauth2.common.*;
+import org.springframework.security.oauth2.common.exceptions.InvalidGrantException;
+import org.springframework.security.oauth2.common.exceptions.InvalidScopeException;
+import org.springframework.security.oauth2.common.exceptions.InvalidTokenException;
+import org.springframework.security.oauth2.provider.*;
+import org.springframework.security.oauth2.provider.token.*;
+import org.springframework.security.web.authentication.preauth.PreAuthenticatedAuthenticationToken;
+import org.springframework.transaction.annotation.Transactional;
+import org.springframework.util.Assert;
+
+import java.util.Date;
+import java.util.Set;
+import java.util.UUID;
+
+/**
+ * Base implementation for token services using random UUID values for the access token and refresh token values. The
+ * main extension point for customizations is the {@link TokenEnhancer} which will be called after the access and
+ * refresh tokens have been generated but before they are stored.
+ * <p>
+ * Persistence is delegated to a {@code TokenStore} implementation and customization of the access token to a
+ * {@link TokenEnhancer}.
+ *
+ * @author Ryan Heaton
+ * @author Luke Taylor
+ * @author Dave Syer
+ */
+public class HnqzTokenServices implements AuthorizationServerTokenServices, ResourceServerTokenServices,
+		ConsumerTokenServices, InitializingBean {
+
+	private int refreshTokenValiditySeconds = 60 * 60 * 24 * 30; // default 30 days.
+
+	private int accessTokenValiditySeconds = 60 * 60 * 12; // default 12 hours.
+
+	private boolean supportRefreshToken = false;
+
+	private boolean reuseRefreshToken = true;
+
+	private TokenStore tokenStore;
+
+	private ClientDetailsService clientDetailsService;
+
+	private TokenEnhancer accessTokenEnhancer;
+
+	private AuthenticationManager authenticationManager;
+
+	/**
+	 * Initialize these token services. If no random generator is set, one will be created.
+	 */
+	public void afterPropertiesSet() throws Exception {
+		Assert.notNull(tokenStore, "tokenStore must be set");
+	}
+
+	@Transactional
+	public OAuth2AccessToken createAccessToken(OAuth2Authentication authentication) throws AuthenticationException {
+
+		OAuth2AccessToken existingAccessToken = tokenStore.getAccessToken(authentication);
+		OAuth2RefreshToken refreshToken = null;
+		if (existingAccessToken != null) {
+			if (existingAccessToken.getRefreshToken() != null) {
+				refreshToken = existingAccessToken.getRefreshToken();
+				tokenStore.removeRefreshToken(refreshToken);
+			}
+
+			tokenStore.removeAccessToken(existingAccessToken);
+//			if (existingAccessToken.isExpired()) {
+//				if (existingAccessToken.getRefreshToken() != null) {
+//					refreshToken = existingAccessToken.getRefreshToken();
+//					// The token store could remove the refresh token when the
+//					// access token is removed, but we want to
+//					// be sure...
+//					tokenStore.removeRefreshToken(refreshToken);
+//				}
+//				tokenStore.removeAccessToken(existingAccessToken);
+//			}
+//			else {
+//				// Re-store the access token in case the authentication has changed
+//				tokenStore.storeAccessToken(existingAccessToken, authentication);
+//				return existingAccessToken;
+//			}
+		}
+
+		// Only create a new refresh token if there wasn't an existing one
+		// associated with an expired access token.
+		// Clients might be holding existing refresh tokens, so we re-use it in
+		// the case that the old access token
+		// expired.
+		if (refreshToken == null) {
+			refreshToken = createRefreshToken(authentication);
+		}
+		// But the refresh token itself might need to be re-issued if it has
+		// expired.
+		else if (refreshToken instanceof ExpiringOAuth2RefreshToken) {
+			ExpiringOAuth2RefreshToken expiring = (ExpiringOAuth2RefreshToken) refreshToken;
+			if (System.currentTimeMillis() > expiring.getExpiration().getTime()) {
+				refreshToken = createRefreshToken(authentication);
+			}
+		}
+
+		OAuth2AccessToken accessToken = createAccessToken(authentication, refreshToken);
+		tokenStore.storeAccessToken(accessToken, authentication);
+		// In case it was modified
+		refreshToken = accessToken.getRefreshToken();
+		if (refreshToken != null) {
+			tokenStore.storeRefreshToken(refreshToken, authentication);
+		}
+		return accessToken;
+
+	}
+
+	@Transactional(noRollbackFor={InvalidTokenException.class, InvalidGrantException.class})
+	public OAuth2AccessToken refreshAccessToken(String refreshTokenValue, TokenRequest tokenRequest)
+			throws AuthenticationException {
+
+		if (!supportRefreshToken) {
+			throw new InvalidGrantException("Invalid refresh token: " + refreshTokenValue);
+		}
+
+		OAuth2RefreshToken refreshToken = tokenStore.readRefreshToken(refreshTokenValue);
+		if (refreshToken == null) {
+			throw new InvalidGrantException("Invalid refresh token: " + refreshTokenValue);
+		}
+
+		OAuth2Authentication authentication = tokenStore.readAuthenticationForRefreshToken(refreshToken);
+		if (this.authenticationManager != null && !authentication.isClientOnly()) {
+			// The client has already been authenticated, but the user authentication might be old now, so give it a
+			// chance to re-authenticate.
+			Authentication user = new PreAuthenticatedAuthenticationToken(authentication.getUserAuthentication(), "", authentication.getAuthorities());
+			user = authenticationManager.authenticate(user);
+			Object details = authentication.getDetails();
+			authentication = new OAuth2Authentication(authentication.getOAuth2Request(), user);
+			authentication.setDetails(details);
+		}
+		String clientId = authentication.getOAuth2Request().getClientId();
+		if (clientId == null || !clientId.equals(tokenRequest.getClientId())) {
+			throw new InvalidGrantException("Wrong client for this refresh token: " + refreshTokenValue);
+		}
+
+		// clear out any access tokens already associated with the refresh
+		// token.
+		tokenStore.removeAccessTokenUsingRefreshToken(refreshToken);
+
+		if (isExpired(refreshToken)) {
+			tokenStore.removeRefreshToken(refreshToken);
+			throw new InvalidTokenException("Invalid refresh token (expired): " + refreshToken);
+		}
+
+		authentication = createRefreshedAuthentication(authentication, tokenRequest);
+
+		if (!reuseRefreshToken) {
+			tokenStore.removeRefreshToken(refreshToken);
+			refreshToken = createRefreshToken(authentication);
+		}
+
+		OAuth2AccessToken accessToken = createAccessToken(authentication, refreshToken);
+		tokenStore.storeAccessToken(accessToken, authentication);
+		if (!reuseRefreshToken) {
+			tokenStore.storeRefreshToken(accessToken.getRefreshToken(), authentication);
+		}
+		return accessToken;
+	}
+
+	public OAuth2AccessToken getAccessToken(OAuth2Authentication authentication) {
+		return tokenStore.getAccessToken(authentication);
+	}
+
+	/**
+	 * Create a refreshed authentication.
+	 *
+	 * @param authentication The authentication.
+	 * @param request The scope for the refreshed token.
+	 * @return The refreshed authentication.
+	 * @throws InvalidScopeException If the scope requested is invalid or wider than the original scope.
+	 */
+	private OAuth2Authentication createRefreshedAuthentication(OAuth2Authentication authentication, TokenRequest request) {
+		OAuth2Authentication narrowed = authentication;
+		Set<String> scope = request.getScope();
+		OAuth2Request clientAuth = authentication.getOAuth2Request().refresh(request);
+		if (scope != null && !scope.isEmpty()) {
+			Set<String> originalScope = clientAuth.getScope();
+			if (originalScope == null || !originalScope.containsAll(scope)) {
+				throw new InvalidScopeException("Unable to narrow the scope of the client authentication to " + scope
+						+ ".", originalScope);
+			}
+			else {
+				clientAuth = clientAuth.narrowScope(scope);
+			}
+		}
+		narrowed = new OAuth2Authentication(clientAuth, authentication.getUserAuthentication());
+		return narrowed;
+	}
+
+	protected boolean isExpired(OAuth2RefreshToken refreshToken) {
+		if (refreshToken instanceof ExpiringOAuth2RefreshToken) {
+			ExpiringOAuth2RefreshToken expiringToken = (ExpiringOAuth2RefreshToken) refreshToken;
+			return expiringToken.getExpiration() == null
+					|| System.currentTimeMillis() > expiringToken.getExpiration().getTime();
+		}
+		return false;
+	}
+
+	public OAuth2AccessToken readAccessToken(String accessToken) {
+		return tokenStore.readAccessToken(accessToken);
+	}
+
+	public OAuth2Authentication loadAuthentication(String accessTokenValue) throws AuthenticationException,
+			InvalidTokenException {
+		OAuth2AccessToken accessToken = tokenStore.readAccessToken(accessTokenValue);
+		if (accessToken == null) {
+			throw new InvalidTokenException("Invalid access token: " + accessTokenValue);
+		}
+		else if (accessToken.isExpired()) {
+			tokenStore.removeAccessToken(accessToken);
+			throw new InvalidTokenException("Access token expired: " + accessTokenValue);
+		}
+
+		OAuth2Authentication result = tokenStore.readAuthentication(accessToken);
+		if (result == null) {
+			// in case of race condition
+			throw new InvalidTokenException("Invalid access token: " + accessTokenValue);
+		}
+		if (clientDetailsService != null) {
+			String clientId = result.getOAuth2Request().getClientId();
+			try {
+				clientDetailsService.loadClientByClientId(clientId);
+			}
+			catch (ClientRegistrationException e) {
+				throw new InvalidTokenException("Client not valid: " + clientId, e);
+			}
+		}
+		return result;
+	}
+
+	public String getClientId(String tokenValue) {
+		OAuth2Authentication authentication = tokenStore.readAuthentication(tokenValue);
+		if (authentication == null) {
+			throw new InvalidTokenException("Invalid access token: " + tokenValue);
+		}
+		OAuth2Request clientAuth = authentication.getOAuth2Request();
+		if (clientAuth == null) {
+			throw new InvalidTokenException("Invalid access token (no client id): " + tokenValue);
+		}
+		return clientAuth.getClientId();
+	}
+
+	public boolean revokeToken(String tokenValue) {
+		OAuth2AccessToken accessToken = tokenStore.readAccessToken(tokenValue);
+		if (accessToken == null) {
+			return false;
+		}
+		if (accessToken.getRefreshToken() != null) {
+			tokenStore.removeRefreshToken(accessToken.getRefreshToken());
+		}
+		tokenStore.removeAccessToken(accessToken);
+		return true;
+	}
+
+	private OAuth2RefreshToken createRefreshToken(OAuth2Authentication authentication) {
+		if (!isSupportRefreshToken(authentication.getOAuth2Request())) {
+			return null;
+		}
+		int validitySeconds = getRefreshTokenValiditySeconds(authentication.getOAuth2Request());
+		String value = UUID.randomUUID().toString();
+		if (validitySeconds > 0) {
+			return new DefaultExpiringOAuth2RefreshToken(value, new Date(System.currentTimeMillis()
+					+ (validitySeconds * 1000L)));
+		}
+		return new DefaultOAuth2RefreshToken(value);
+	}
+
+	private OAuth2AccessToken createAccessToken(OAuth2Authentication authentication, OAuth2RefreshToken refreshToken) {
+		DefaultOAuth2AccessToken token = new DefaultOAuth2AccessToken(UUID.randomUUID().toString());
+		int validitySeconds = getAccessTokenValiditySeconds(authentication.getOAuth2Request());
+		if (validitySeconds > 0) {
+			token.setExpiration(new Date(System.currentTimeMillis() + (validitySeconds * 1000L)));
+		}
+		token.setRefreshToken(refreshToken);
+		token.setScope(authentication.getOAuth2Request().getScope());
+
+		return accessTokenEnhancer != null ? accessTokenEnhancer.enhance(token, authentication) : token;
+	}
+
+	/**
+	 * The access token validity period in seconds
+	 *
+	 * @param clientAuth the current authorization request
+	 * @return the access token validity period in seconds
+	 */
+	protected int getAccessTokenValiditySeconds(OAuth2Request clientAuth) {
+		if (clientDetailsService != null) {
+			ClientDetails client = clientDetailsService.loadClientByClientId(clientAuth.getClientId());
+			Integer validity = client.getAccessTokenValiditySeconds();
+			if (validity != null) {
+				return validity;
+			}
+		}
+		return accessTokenValiditySeconds;
+	}
+
+	/**
+	 * The refresh token validity period in seconds
+	 *
+	 * @param clientAuth the current authorization request
+	 * @return the refresh token validity period in seconds
+	 */
+	protected int getRefreshTokenValiditySeconds(OAuth2Request clientAuth) {
+		if (clientDetailsService != null) {
+			ClientDetails client = clientDetailsService.loadClientByClientId(clientAuth.getClientId());
+			Integer validity = client.getRefreshTokenValiditySeconds();
+			if (validity != null) {
+				return validity;
+			}
+		}
+		return refreshTokenValiditySeconds;
+	}
+
+	/**
+	 * Is a refresh token supported for this client (or the global setting if
+	 * {@link #setClientDetailsService(ClientDetailsService) clientDetailsService} is not set.
+	 *
+	 * @param clientAuth the current authorization request
+	 * @return boolean to indicate if refresh token is supported
+	 */
+	protected boolean isSupportRefreshToken(OAuth2Request clientAuth) {
+		if (clientDetailsService != null) {
+			ClientDetails client = clientDetailsService.loadClientByClientId(clientAuth.getClientId());
+			return client.getAuthorizedGrantTypes().contains("refresh_token");
+		}
+		return this.supportRefreshToken;
+	}
+
+	/**
+	 * An access token enhancer that will be applied to a new token before it is saved in the token store.
+	 *
+	 * @param accessTokenEnhancer the access token enhancer to set
+	 */
+	public void setTokenEnhancer(TokenEnhancer accessTokenEnhancer) {
+		this.accessTokenEnhancer = accessTokenEnhancer;
+	}
+
+	/**
+	 * The validity (in seconds) of the refresh token. If less than or equal to zero then the tokens will be
+	 * non-expiring.
+	 *
+	 * @param refreshTokenValiditySeconds The validity (in seconds) of the refresh token.
+	 */
+	public void setRefreshTokenValiditySeconds(int refreshTokenValiditySeconds) {
+		this.refreshTokenValiditySeconds = refreshTokenValiditySeconds;
+	}
+
+	/**
+	 * The default validity (in seconds) of the access token. Zero or negative for non-expiring tokens. If a client
+	 * details service is set the validity period will be read from the client, defaulting to this value if not defined
+	 * by the client.
+	 *
+	 * @param accessTokenValiditySeconds The validity (in seconds) of the access token.
+	 */
+	public void setAccessTokenValiditySeconds(int accessTokenValiditySeconds) {
+		this.accessTokenValiditySeconds = accessTokenValiditySeconds;
+	}
+
+	/**
+	 * Whether to support the refresh token.
+	 *
+	 * @param supportRefreshToken Whether to support the refresh token.
+	 */
+	public void setSupportRefreshToken(boolean supportRefreshToken) {
+		this.supportRefreshToken = supportRefreshToken;
+	}
+
+	/**
+	 * Whether to reuse refresh tokens (until expired).
+	 *
+	 * @param reuseRefreshToken Whether to reuse refresh tokens (until expired).
+	 */
+	public void setReuseRefreshToken(boolean reuseRefreshToken) {
+		this.reuseRefreshToken = reuseRefreshToken;
+	}
+
+	/**
+	 * The persistence strategy for token storage.
+	 *
+	 * @param tokenStore the store for access and refresh tokens.
+	 */
+	public void setTokenStore(TokenStore tokenStore) {
+		this.tokenStore = tokenStore;
+	}
+
+	/**
+	 * An authentication manager that will be used (if provided) to check the user authentication when a token is
+	 * refreshed.
+	 *
+	 * @param authenticationManager the authenticationManager to set
+	 */
+	public void setAuthenticationManager(AuthenticationManager authenticationManager) {
+		this.authenticationManager = authenticationManager;
+	}
+
+	/**
+	 * The client details service to use for looking up clients (if necessary). Optional if the access token expiry is
+	 * set globally via {@link #setAccessTokenValiditySeconds(int)}.
+	 *
+	 * @param clientDetailsService the client details service
+	 */
+	public void setClientDetailsService(ClientDetailsService clientDetailsService) {
+		this.clientDetailsService = clientDetailsService;
+	}
+
+}

+ 103 - 0
hnqz-auth/src/main/java/com/qunzhixinxi/hnqz/auth/config/WebSecurityConfigurer.java

@@ -0,0 +1,103 @@
+/*
+ *
+ *      Copyright (c) 2018-2025, hnqz All rights reserved.
+ *
+ *  Redistribution and use in source and binary forms, with or without
+ *  modification, are permitted provided that the following conditions are met:
+ *
+ * Redistributions of source code must retain the above copyright notice,
+ *  this list of conditions and the following disclaimer.
+ *  Redistributions in binary form must reproduce the above copyright
+ *  notice, this list of conditions and the following disclaimer in the
+ *  documentation and/or other materials provided with the distribution.
+ *  Neither the name of the pig4cloud.com developer nor the names of its
+ *  contributors may be used to endorse or promote products derived from
+ *  this software without specific prior written permission.
+ *  Author: hnqz
+ *
+ */
+
+package com.qunzhixinxi.hnqz.auth.config;
+
+import com.qunzhixinxi.hnqz.common.security.handler.FormAuthenticationFailureHandler;
+import com.qunzhixinxi.hnqz.common.security.handler.MobileLoginSuccessHandler;
+import com.qunzhixinxi.hnqz.common.security.mobile.MobileSecurityConfigurer;
+import lombok.SneakyThrows;
+import org.springframework.context.annotation.Bean;
+import org.springframework.context.annotation.Configuration;
+import org.springframework.context.annotation.Primary;
+import org.springframework.core.annotation.Order;
+import org.springframework.http.HttpHeaders;
+import org.springframework.security.authentication.AuthenticationManager;
+import org.springframework.security.config.annotation.web.builders.HttpSecurity;
+import org.springframework.security.config.annotation.web.builders.WebSecurity;
+import org.springframework.security.config.annotation.web.configuration.WebSecurityConfigurerAdapter;
+import org.springframework.security.crypto.factory.PasswordEncoderFactories;
+import org.springframework.security.crypto.password.PasswordEncoder;
+import org.springframework.security.web.authentication.AuthenticationFailureHandler;
+import org.springframework.security.web.authentication.AuthenticationSuccessHandler;
+
+/**
+ * @author hnqz
+ * @date 2018/6/22 认证相关配置
+ */
+@Primary
+@Order(90)
+@Configuration
+public class WebSecurityConfigurer extends WebSecurityConfigurerAdapter {
+
+	@Override
+	@SneakyThrows
+	protected void configure(HttpSecurity http) {
+		http.formLogin().loginPage("/token/login").loginProcessingUrl("/token/form")
+				.failureHandler(authenticationFailureHandler()).and().logout()
+				.logoutSuccessHandler((request, response, authentication) -> {
+					String referer = request.getHeader(HttpHeaders.REFERER);
+					response.sendRedirect(referer);
+				}).deleteCookies("JSESSIONID").invalidateHttpSession(true).and().authorizeRequests()
+				.antMatchers("/token/**", "/actuator/**", "/mobile/**").permitAll().anyRequest().authenticated().and()
+				.csrf().disable().apply(mobileSecurityConfigurer());
+	}
+
+	/**
+	 * 不拦截静态资源
+	 * @param web
+	 */
+	@Override
+	public void configure(WebSecurity web) {
+		web.ignoring().antMatchers("/css/**");
+	}
+
+	@Bean
+	@Override
+	@SneakyThrows
+	public AuthenticationManager authenticationManagerBean() {
+		return super.authenticationManagerBean();
+	}
+
+	@Bean
+	public AuthenticationFailureHandler authenticationFailureHandler() {
+		return new FormAuthenticationFailureHandler();
+	}
+
+	@Bean
+	public AuthenticationSuccessHandler mobileLoginSuccessHandler() {
+		return new MobileLoginSuccessHandler();
+	}
+
+	@Bean
+	public MobileSecurityConfigurer mobileSecurityConfigurer() {
+		return new MobileSecurityConfigurer();
+	}
+
+	/**
+	 * https://spring.io/blog/2017/11/01/spring-security-5-0-0-rc1-released#password-storage-updated
+	 * Encoded password does not look like BCrypt
+	 * @return PasswordEncoder
+	 */
+	@Bean
+	public PasswordEncoder passwordEncoder() {
+		return PasswordEncoderFactories.createDelegatingPasswordEncoder();
+	}
+
+}

+ 213 - 0
hnqz-auth/src/main/java/com/qunzhixinxi/hnqz/auth/endpoint/HnqzTokenEndpoint.java

@@ -0,0 +1,213 @@
+/*
+ *
+ *      Copyright (c) 2018-2025, hnqz All rights reserved.
+ *
+ *  Redistribution and use in source and binary forms, with or without
+ *  modification, are permitted provided that the following conditions are met:
+ *
+ * Redistributions of source code must retain the above copyright notice,
+ *  this list of conditions and the following disclaimer.
+ *  Redistributions in binary form must reproduce the above copyright
+ *  notice, this list of conditions and the following disclaimer in the
+ *  documentation and/or other materials provided with the distribution.
+ *  Neither the name of the pig4cloud.com developer nor the names of its
+ *  contributors may be used to endorse or promote products derived from
+ *  this software without specific prior written permission.
+ *  Author: hnqz
+ *
+ */
+
+package com.qunzhixinxi.hnqz.auth.endpoint;
+
+import cn.hutool.core.map.MapUtil;
+import cn.hutool.core.util.StrUtil;
+import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
+import com.qunzhixinxi.hnqz.common.core.constant.CacheConstants;
+import com.qunzhixinxi.hnqz.common.core.constant.PaginationConstants;
+import com.qunzhixinxi.hnqz.common.core.constant.SecurityConstants;
+import com.qunzhixinxi.hnqz.common.core.util.R;
+import com.qunzhixinxi.hnqz.common.data.tenant.TenantContextHolder;
+import com.qunzhixinxi.hnqz.common.security.annotation.Inner;
+import com.qunzhixinxi.hnqz.common.security.util.SecurityUtils;
+import lombok.AllArgsConstructor;
+import lombok.extern.slf4j.Slf4j;
+import org.springframework.cache.CacheManager;
+import org.springframework.data.redis.core.ConvertingCursor;
+import org.springframework.data.redis.core.Cursor;
+import org.springframework.data.redis.core.RedisTemplate;
+import org.springframework.data.redis.core.ScanOptions;
+import org.springframework.data.redis.serializer.JdkSerializationRedisSerializer;
+import org.springframework.data.redis.serializer.RedisSerializer;
+import org.springframework.data.redis.serializer.StringRedisSerializer;
+import org.springframework.http.HttpHeaders;
+import org.springframework.security.oauth2.common.OAuth2AccessToken;
+import org.springframework.security.oauth2.common.OAuth2RefreshToken;
+import org.springframework.security.oauth2.provider.AuthorizationRequest;
+import org.springframework.security.oauth2.provider.ClientDetails;
+import org.springframework.security.oauth2.provider.ClientDetailsService;
+import org.springframework.security.oauth2.provider.OAuth2Authentication;
+import org.springframework.security.oauth2.provider.token.TokenStore;
+import org.springframework.web.bind.annotation.*;
+import org.springframework.web.servlet.ModelAndView;
+
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpSession;
+import java.io.IOException;
+import java.util.ArrayList;
+import java.util.List;
+import java.util.Map;
+
+/**
+ * @author hnqz
+ * @date 2018/6/24 删除token端点
+ */
+@Slf4j
+@RestController
+@AllArgsConstructor
+@RequestMapping("/token")
+public class HnqzTokenEndpoint {
+
+	private static final String PIGX_OAUTH_ACCESS = SecurityConstants.PIGX_PREFIX + SecurityConstants.OAUTH_PREFIX
+			+ "auth_to_access:";
+
+	private final ClientDetailsService clientDetailsService;
+
+	private final RedisTemplate redisTemplate;
+
+	private final TokenStore tokenStore;
+
+	private final CacheManager cacheManager;
+
+	/**
+	 * 认证页面
+	 * @param modelAndView
+	 * @param error 表单登录失败处理回调的错误信息
+	 * @return ModelAndView
+	 */
+	@GetMapping("/login")
+	public ModelAndView require(ModelAndView modelAndView, @RequestParam(required = false) String error) {
+		modelAndView.setViewName("ftl/login");
+		modelAndView.addObject("error", error);
+		return modelAndView;
+	}
+
+	/**
+	 * 确认授权页面
+	 * @param request
+	 * @param session
+	 * @param modelAndView
+	 * @return
+	 */
+	@GetMapping("/confirm_access")
+	public ModelAndView confirm(HttpServletRequest request, HttpSession session, ModelAndView modelAndView) {
+		Map<String, Object> scopeList = (Map<String, Object>) request.getAttribute("scopes");
+		modelAndView.addObject("scopeList", scopeList.keySet());
+
+		Object auth = session.getAttribute("authorizationRequest");
+		if (auth != null) {
+			AuthorizationRequest authorizationRequest = (AuthorizationRequest) auth;
+			ClientDetails clientDetails = clientDetailsService.loadClientByClientId(authorizationRequest.getClientId());
+			modelAndView.addObject("app", clientDetails.getAdditionalInformation());
+			modelAndView.addObject("user", SecurityUtils.getUser());
+		}
+
+		modelAndView.setViewName("ftl/confirm");
+		return modelAndView;
+	}
+
+	/**
+	 * 退出token
+	 * @param authHeader Authorization
+	 */
+	@DeleteMapping("/logout")
+	public R logout(@RequestHeader(value = HttpHeaders.AUTHORIZATION, required = false) String authHeader) {
+		if (StrUtil.isBlank(authHeader)) {
+			return R.ok(Boolean.FALSE, "退出失败,token 为空");
+		}
+
+		String tokenValue = authHeader.replace(OAuth2AccessToken.BEARER_TYPE, StrUtil.EMPTY).trim();
+		return delToken(tokenValue);
+	}
+
+	/**
+	 * 令牌管理调用
+	 * @param token token
+	 * @return
+	 */
+	@Inner
+	@DeleteMapping("/{token}")
+	public R<Boolean> delToken(@PathVariable("token") String token) {
+		OAuth2AccessToken accessToken = tokenStore.readAccessToken(token);
+		if (accessToken == null || StrUtil.isBlank(accessToken.getValue())) {
+			return R.ok(Boolean.TRUE, "退出失败,token 无效");
+		}
+
+		OAuth2Authentication auth2Authentication = tokenStore.readAuthentication(accessToken);
+		// 清空用户信息
+		cacheManager.getCache(CacheConstants.USER_DETAILS).evict(auth2Authentication.getName());
+
+		// 清空access token
+		tokenStore.removeAccessToken(accessToken);
+
+		// 清空 refresh token
+		OAuth2RefreshToken refreshToken = accessToken.getRefreshToken();
+		tokenStore.removeRefreshToken(refreshToken);
+		return R.ok();
+	}
+
+	/**
+	 * 查询token
+	 * @param params 分页参数
+	 * @return
+	 */
+	@Inner
+	@PostMapping("/page")
+	public R<Page> tokenList(@RequestBody Map<String, Object> params) {
+		// 根据分页参数获取对应数据
+		String key = String.format("%s*:%s", PIGX_OAUTH_ACCESS, TenantContextHolder.getTenantId());
+		List<String> pages = findKeysForPage(key, MapUtil.getInt(params, PaginationConstants.CURRENT),
+				MapUtil.getInt(params, PaginationConstants.SIZE));
+
+		redisTemplate.setKeySerializer(new StringRedisSerializer());
+		redisTemplate.setValueSerializer(new JdkSerializationRedisSerializer());
+		Page result = new Page(MapUtil.getInt(params, PaginationConstants.CURRENT),
+				MapUtil.getInt(params, PaginationConstants.SIZE));
+		result.setRecords(redisTemplate.opsForValue().multiGet(pages));
+		result.setTotal(redisTemplate.keys(key).size());
+		return R.ok(result);
+	}
+
+	private List<String> findKeysForPage(String patternKey, int pageNum, int pageSize) {
+		ScanOptions options = ScanOptions.scanOptions().count(1000L).match(patternKey).build();
+		RedisSerializer<String> redisSerializer = (RedisSerializer<String>) redisTemplate.getKeySerializer();
+		Cursor cursor = (Cursor) redisTemplate.executeWithStickyConnection(
+				redisConnection -> new ConvertingCursor<>(redisConnection.scan(options), redisSerializer::deserialize));
+		List<String> result = new ArrayList<>();
+		int tmpIndex = 0;
+		int startIndex = (pageNum - 1) * pageSize;
+		int end = pageNum * pageSize;
+
+		assert cursor != null;
+		while (cursor.hasNext()) {
+			if (tmpIndex >= startIndex && tmpIndex < end) {
+				result.add(cursor.next().toString());
+				tmpIndex++;
+				continue;
+			}
+			if (tmpIndex >= end) {
+				break;
+			}
+			tmpIndex++;
+			cursor.next();
+		}
+
+		try {
+			cursor.close();
+		}
+		catch (IOException e) {
+			log.error("关闭cursor 失败");
+		}
+		return result;
+	}
+
+}

+ 77 - 0
hnqz-auth/src/main/java/com/qunzhixinxi/hnqz/auth/handler/HnqzAuthenticationFailureEventHandler.java

@@ -0,0 +1,77 @@
+/*
+ *    Copyright (c) 2018-2025, hnqz All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the following disclaimer.
+ * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * Neither the name of the pig4cloud.com developer nor the names of its
+ * contributors may be used to endorse or promote products derived from
+ * this software without specific prior written permission.
+ * Author: hnqz
+ */
+
+package com.qunzhixinxi.hnqz.auth.handler;
+
+import com.qunzhixinxi.hnqz.admin.api.entity.SysLog;
+import com.qunzhixinxi.hnqz.admin.api.feign.RemoteLogService;
+import com.qunzhixinxi.hnqz.common.core.constant.CommonConstants;
+import com.qunzhixinxi.hnqz.common.core.constant.SecurityConstants;
+import com.qunzhixinxi.hnqz.common.core.util.WebUtils;
+import com.qunzhixinxi.hnqz.common.log.util.SysLogUtils;
+import com.qunzhixinxi.hnqz.common.security.handler.AuthenticationFailureHandler;
+import lombok.AllArgsConstructor;
+import lombok.SneakyThrows;
+import lombok.extern.slf4j.Slf4j;
+import org.springframework.http.HttpHeaders;
+import org.springframework.scheduling.annotation.Async;
+import org.springframework.security.core.Authentication;
+import org.springframework.security.core.AuthenticationException;
+import org.springframework.stereotype.Component;
+
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+
+/**
+ * @author hnqz
+ * @date 2018/10/8
+ */
+@Slf4j
+@Component
+@AllArgsConstructor
+public class HnqzAuthenticationFailureEventHandler implements AuthenticationFailureHandler {
+
+	private final RemoteLogService logService;
+
+	/**
+	 * 异步处理,登录失败方法
+	 * <p>
+	 * @param authenticationException 登录的authentication 对象
+	 * @param authentication 登录的authenticationException 对象
+	 * @param request 请求
+	 * @param response 响应
+	 */
+	@Async
+	@Override
+	@SneakyThrows
+	public void handle(AuthenticationException authenticationException, Authentication authentication,
+			HttpServletRequest request, HttpServletResponse response) {
+		String username = authentication.getName();
+		SysLog sysLog = SysLogUtils.getSysLog(request, username);
+		sysLog.setTitle(username + "用户登录");
+		sysLog.setType(CommonConstants.STATUS_LOCK);
+		sysLog.setParams(username);
+		sysLog.setException(authenticationException.getLocalizedMessage());
+		String header = request.getHeader(HttpHeaders.AUTHORIZATION);
+		sysLog.setServiceId(WebUtils.extractClientId(header).orElse("N/A"));
+
+		logService.saveLog(sysLog, SecurityConstants.FROM_IN);
+
+		log.info("用户:{} 登录失败,异常:{}", username, authenticationException.getLocalizedMessage());
+	}
+
+}

+ 69 - 0
hnqz-auth/src/main/java/com/qunzhixinxi/hnqz/auth/handler/HnqzAuthenticationSuccessEventHandler.java

@@ -0,0 +1,69 @@
+/*
+ *    Copyright (c) 2018-2025, hnqz All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the following disclaimer.
+ * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * Neither the name of the pig4cloud.com developer nor the names of its
+ * contributors may be used to endorse or promote products derived from
+ * this software without specific prior written permission.
+ * Author: hnqz
+ */
+
+package com.qunzhixinxi.hnqz.auth.handler;
+
+import com.qunzhixinxi.hnqz.admin.api.entity.SysLog;
+import com.qunzhixinxi.hnqz.admin.api.feign.RemoteLogService;
+import com.qunzhixinxi.hnqz.common.core.constant.SecurityConstants;
+import com.qunzhixinxi.hnqz.common.core.util.WebUtils;
+import com.qunzhixinxi.hnqz.common.log.util.SysLogUtils;
+import com.qunzhixinxi.hnqz.common.security.handler.AuthenticationSuccessHandler;
+import lombok.AllArgsConstructor;
+import lombok.extern.slf4j.Slf4j;
+import org.springframework.http.HttpHeaders;
+import org.springframework.scheduling.annotation.Async;
+import org.springframework.security.core.Authentication;
+import org.springframework.stereotype.Component;
+
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+
+/**
+ * @author hnqz
+ * @date 2018/10/8
+ */
+@Slf4j
+@Component
+@AllArgsConstructor
+public class HnqzAuthenticationSuccessEventHandler implements AuthenticationSuccessHandler {
+
+	private final RemoteLogService logService;
+
+	/**
+	 * 处理登录成功方法
+	 * <p>
+	 * 获取到登录的authentication 对象
+	 * @param authentication 登录对象
+	 * @param request 请求
+	 * @param response 返回
+	 */
+	@Async
+	@Override
+	public void handle(Authentication authentication, HttpServletRequest request, HttpServletResponse response) {
+		String username = authentication.getName();
+		SysLog sysLog = SysLogUtils.getSysLog(request, username);
+		sysLog.setTitle(username + "用户登录");
+		sysLog.setParams(username);
+		String header = request.getHeader(HttpHeaders.AUTHORIZATION);
+		sysLog.setServiceId(WebUtils.extractClientId(header).orElse("N/A"));
+
+		logService.saveLog(sysLog, SecurityConstants.FROM_IN);
+		log.info("用户:{} 登录成功", username);
+	}
+
+}

+ 41 - 0
hnqz-auth/src/main/java/com/qunzhixinxi/hnqz/auth/service/HnqzClientDetailsServiceImpl.java

@@ -0,0 +1,41 @@
+package com.qunzhixinxi.hnqz.auth.service;
+
+import com.qunzhixinxi.hnqz.common.core.constant.CacheConstants;
+import com.qunzhixinxi.hnqz.common.core.constant.SecurityConstants;
+import com.qunzhixinxi.hnqz.common.data.tenant.TenantContextHolder;
+import org.springframework.cache.annotation.Cacheable;
+import org.springframework.security.oauth2.common.exceptions.InvalidClientException;
+import org.springframework.security.oauth2.provider.ClientDetails;
+import org.springframework.security.oauth2.provider.client.JdbcClientDetailsService;
+import org.springframework.stereotype.Service;
+
+import javax.sql.DataSource;
+
+/**
+ * @author hnqz
+ * @date 2020/03/25
+ * <p>
+ * 扩展 JdbcClientDetailsService 支持多租户
+ */
+@Service
+public class HnqzClientDetailsServiceImpl extends JdbcClientDetailsService {
+
+	public HnqzClientDetailsServiceImpl(DataSource dataSource) {
+		super(dataSource);
+	}
+
+	/**
+	 * 重写原生方法支持redis缓存
+	 * @param clientId
+	 * @return ClientDetails
+	 * @throws InvalidClientException
+	 */
+	@Override
+	@Cacheable(value = CacheConstants.CLIENT_DETAILS_KEY, key = "#clientId", unless = "#result == null")
+	public ClientDetails loadClientByClientId(String clientId) {
+		super.setSelectClientDetailsSql(
+				String.format(SecurityConstants.DEFAULT_SELECT_STATEMENT, TenantContextHolder.getTenantId()));
+		return super.loadClientByClientId(clientId);
+	}
+
+}

+ 123 - 0
hnqz-auth/src/main/java/com/qunzhixinxi/hnqz/auth/service/HnqzUserDetailsServiceImpl.java

@@ -0,0 +1,123 @@
+/*
+ *    Copyright (c) 2018-2025, hnqz All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the following disclaimer.
+ * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * Neither the name of the pig4cloud.com developer nor the names of its
+ * contributors may be used to endorse or promote products derived from
+ * this software without specific prior written permission.
+ * Author: hnqz
+ */
+
+package com.qunzhixinxi.hnqz.auth.service;
+
+import cn.hutool.core.util.ArrayUtil;
+import cn.hutool.core.util.StrUtil;
+import com.qunzhixinxi.hnqz.admin.api.dto.UserInfo;
+import com.qunzhixinxi.hnqz.admin.api.entity.SysUser;
+import com.qunzhixinxi.hnqz.admin.api.feign.RemoteUserService;
+import com.qunzhixinxi.hnqz.common.core.constant.CacheConstants;
+import com.qunzhixinxi.hnqz.common.core.constant.CommonConstants;
+import com.qunzhixinxi.hnqz.common.core.constant.SecurityConstants;
+import com.qunzhixinxi.hnqz.common.core.util.R;
+import com.qunzhixinxi.hnqz.common.security.service.HnqzUser;
+import com.qunzhixinxi.hnqz.common.security.service.HnqzUserDetailsService;
+import lombok.AllArgsConstructor;
+import lombok.SneakyThrows;
+import lombok.extern.slf4j.Slf4j;
+import org.springframework.cache.Cache;
+import org.springframework.cache.CacheManager;
+import org.springframework.security.core.GrantedAuthority;
+import org.springframework.security.core.authority.AuthorityUtils;
+import org.springframework.security.core.userdetails.UserDetails;
+import org.springframework.security.core.userdetails.UsernameNotFoundException;
+import org.springframework.stereotype.Service;
+
+import java.util.Arrays;
+import java.util.Collection;
+import java.util.HashSet;
+import java.util.Set;
+
+/**
+ * 用户详细信息
+ *
+ * @author hnqz
+ */
+@Slf4j
+@Service
+@AllArgsConstructor
+public class HnqzUserDetailsServiceImpl implements HnqzUserDetailsService {
+
+	private final RemoteUserService remoteUserService;
+
+	private final CacheManager cacheManager;
+
+	/**
+	 * 用户密码登录
+	 * @param username 用户名
+	 * @return
+	 * @throws UsernameNotFoundException
+	 */
+	@Override
+	@SneakyThrows
+	public UserDetails loadUserByUsername(String username) {
+		Cache cache = cacheManager.getCache(CacheConstants.USER_DETAILS);
+		if (cache != null && cache.get(username) != null) {
+			return (HnqzUser) cache.get(username).get();
+		}
+
+		R<UserInfo> result = remoteUserService.info(username, SecurityConstants.FROM_IN);
+		UserDetails userDetails = getUserDetails(result);
+		cache.put(username, userDetails);
+		return userDetails;
+	}
+
+	/**
+	 * 根据社交登录code 登录
+	 * @param inStr TYPE@CODE
+	 * @return UserDetails
+	 * @throws UsernameNotFoundException
+	 */
+	@Override
+	@SneakyThrows
+	public UserDetails loadUserBySocial(String inStr) {
+		return getUserDetails(remoteUserService.social(inStr, SecurityConstants.FROM_IN));
+	}
+
+	/**
+	 * 构建userdetails
+	 * @param result 用户信息
+	 * @return
+	 */
+	private UserDetails getUserDetails(R<UserInfo> result) {
+		if (result == null || result.getData() == null) {
+			throw new UsernameNotFoundException("用户不存在");
+		}
+
+		UserInfo info = result.getData();
+		Set<String> dbAuthsSet = new HashSet<>();
+		if (ArrayUtil.isNotEmpty(info.getRoles())) {
+			// 获取角色
+			Arrays.stream(info.getRoles()).forEach(roleId -> dbAuthsSet.add(SecurityConstants.ROLE + roleId));
+			// 获取资源
+			dbAuthsSet.addAll(Arrays.asList(info.getPermissions()));
+
+		}
+		Collection<? extends GrantedAuthority> authorities = AuthorityUtils
+				.createAuthorityList(dbAuthsSet.toArray(new String[0]));
+		SysUser user = info.getSysUser();
+		boolean enabled = StrUtil.equals(user.getLockFlag(), CommonConstants.STATUS_NORMAL);
+		// 构造security用户
+
+		return new HnqzUser(user.getUserId(), user.getDeptId(), user.getPhone(), user.getAvatar(), user.getTenantId(),
+				user.getUsername(), SecurityConstants.BCRYPT + user.getPassword(), enabled, true, true,
+				!CommonConstants.STATUS_LOCK.equals(user.getLockFlag()), authorities,user.getPlatId(),user.getDrugEntId(),info.getRoles());
+	}
+
+}

+ 17 - 0
hnqz-auth/src/main/resources/bootstrap.yml

@@ -0,0 +1,17 @@
+server:
+  port: 3000
+
+spring:
+  application:
+    name: @artifactId@
+  cloud:
+    nacos:
+      discovery:
+        server-addr: ${NACOS_HOST:hnqz-register}:${NACOS_PORT:8848}
+      config:
+        server-addr: ${spring.cloud.nacos.discovery.server-addr}
+        file-extension: yml
+        shared-configs:
+          - application-${spring.profiles.active}.${spring.cloud.nacos.config.file-extension}
+  profiles:
+    active: @profiles.active@

+ 87 - 0
hnqz-auth/src/main/resources/logback-spring.xml

@@ -0,0 +1,87 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+  ~    Copyright (c) 2018-2025, hnqz All rights reserved.
+  ~
+  ~ Redistribution and use in source and binary forms, with or without
+  ~ modification, are permitted provided that the following conditions are met:
+  ~
+  ~ Redistributions of source code must retain the above copyright notice,
+  ~ this list of conditions and the following disclaimer.
+  ~ Redistributions in binary form must reproduce the above copyright
+  ~ notice, this list of conditions and the following disclaimer in the
+  ~ documentation and/or other materials provided with the distribution.
+  ~ Neither the name of the pig4cloud.com developer nor the names of its
+  ~ contributors may be used to endorse or promote products derived from
+  ~ this software without specific prior written permission.
+  ~ Author: hnqz
+  -->
+
+<!--
+    小技巧: 在根pom里面设置统一存放路径,统一管理方便维护
+    <properties>
+        <log-path>/Users/hnqz</log-path>
+    </properties>
+    1. 其他模块加日志输出,直接copy本文件放在resources 目录即可
+    2. 注意修改 <property name="${log-path}/log.path" value=""/> 的value模块
+-->
+<configuration debug="false" scan="false">
+	<property name="log.path" value="logs/${project.artifactId}"/>
+	<!-- 彩色日志格式 -->
+	<property name="CONSOLE_LOG_PATTERN"
+			  value="${CONSOLE_LOG_PATTERN:-%clr(%d{yyyy-MM-dd HH:mm:ss.SSS}){faint} %clr(${LOG_LEVEL_PATTERN:-%5p}) %clr(${PID:- }){magenta} %clr(---){faint} %clr([%15.15t]){faint} %clr(%-40.40logger{39}){cyan} %clr(:){faint} %m%n${LOG_EXCEPTION_CONVERSION_WORD:-%wEx}}"/>
+	<!-- 彩色日志依赖的渲染类 -->
+	<conversionRule conversionWord="clr" converterClass="org.springframework.boot.logging.logback.ColorConverter"/>
+	<conversionRule conversionWord="wex"
+					converterClass="org.springframework.boot.logging.logback.WhitespaceThrowableProxyConverter"/>
+	<conversionRule conversionWord="wEx"
+					converterClass="org.springframework.boot.logging.logback.ExtendedWhitespaceThrowableProxyConverter"/>
+	<!-- Console log output -->
+	<appender name="console" class="ch.qos.logback.core.ConsoleAppender">
+		<encoder>
+			<pattern>${CONSOLE_LOG_PATTERN}</pattern>
+		</encoder>
+	</appender>
+
+	<!-- Log file debug output -->
+	<appender name="debug" class="ch.qos.logback.core.rolling.RollingFileAppender">
+		<file>${log.path}/debug.log</file>
+		<rollingPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedRollingPolicy">
+			<fileNamePattern>${log.path}/%d{yyyy-MM, aux}/debug.%d{yyyy-MM-dd}.%i.log.gz</fileNamePattern>
+			<maxFileSize>50MB</maxFileSize>
+			<maxHistory>30</maxHistory>
+		</rollingPolicy>
+		<encoder>
+			<pattern>%date [%thread] %-5level [%logger{50}] %file:%line - %msg%n</pattern>
+		</encoder>
+	</appender>
+
+	<!-- Log file error output -->
+	<appender name="error" class="ch.qos.logback.core.rolling.RollingFileAppender">
+		<file>${log.path}/error.log</file>
+		<rollingPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedRollingPolicy">
+			<fileNamePattern>${log.path}/%d{yyyy-MM}/error.%d{yyyy-MM-dd}.%i.log.gz</fileNamePattern>
+			<maxFileSize>50MB</maxFileSize>
+			<maxHistory>30</maxHistory>
+		</rollingPolicy>
+		<encoder>
+			<pattern>%date [%thread] %-5level [%logger{50}] %file:%line - %msg%n</pattern>
+		</encoder>
+		<filter class="ch.qos.logback.classic.filter.ThresholdFilter">
+			<level>ERROR</level>
+		</filter>
+	</appender>
+
+	<logger name="org.activiti.engine.impl.db" level="DEBUG">
+		<appender-ref ref="debug"/>
+	</logger>
+
+	<!--nacos 心跳 INFO 屏蔽-->
+	<logger name="com.alibaba.nacos" level="OFF">
+		<appender-ref ref="error"/>
+	</logger>
+	<!-- Level: FATAL 0  ERROR 3  WARN 4  INFO 6  DEBUG 7 -->
+	<root level="INFO">
+		<appender-ref ref="console"/>
+		<appender-ref ref="debug"/>
+	</root>
+</configuration>

تفاوت فایلی نمایش داده نمی شود زیرا این فایل بسیار بزرگ است
+ 4 - 0
hnqz-auth/src/main/resources/static/css/bootstrap.min.css


+ 67 - 0
hnqz-auth/src/main/resources/static/css/signin.css

@@ -0,0 +1,67 @@
+/*
+ *    Copyright (c) 2018-2025,  All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the following disclaimer.
+ * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * Neither the name of the pig4cloud.com developer nor the names of its
+ * contributors may be used to endorse or promote products derived from
+ * this software without specific prior written permission.
+ * Author:  ()
+ */
+
+.sign_body {
+  padding-top: 40px;
+  padding-bottom: 40px;
+  background-color: #eee;
+}
+
+.form-signin {
+  max-width: 330px;
+  padding: 15px;
+  margin: 0 auto;
+}
+.form-margin-top {
+  margin-top: 50px;
+}
+.form-signin .form-signin-heading,
+.form-signin .checkbox {
+  margin-bottom: 10px;
+}
+.form-signin .checkbox {
+  font-weight: normal;
+}
+.form-signin .form-control {
+  position: relative;
+  height: auto;
+  -webkit-box-sizing: border-box;
+     -moz-box-sizing: border-box;
+          box-sizing: border-box;
+  padding: 10px;
+  font-size: 16px;
+}
+.form-signin .form-control:focus {
+  z-index: 2;
+}
+.form-signin input[type="email"] {
+  margin-bottom: -1px;
+  border-bottom-right-radius: 0;
+  border-bottom-left-radius: 0;
+}
+.form-signin input[type="password"] {
+  margin-bottom: 10px;
+  border-top-left-radius: 0;
+  border-top-right-radius: 0;
+}
+footer{
+  text-align: center;
+  position:absolute;
+  bottom:0;
+  width:100%;
+  height:100px;
+}

+ 51 - 0
hnqz-auth/src/main/resources/templates/ftl/confirm.ftl

@@ -0,0 +1,51 @@
+<!DOCTYPE html>
+<html>
+<html>
+<head>
+    <meta charset="UTF-8"/>
+    <meta name="viewport"
+          content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no"/>
+    <title>hnqz第三方授权</title>
+    <link rel="stylesheet" type="text/css" href="/css/bootstrap.min.css"/>
+    <link rel="stylesheet" type="text/css" href="/css/signin.css"/>
+</head>
+
+<body>
+<nav class="navbar navbar-default container-fluid">
+    <div class="container">
+        <div class="navbar-header">
+            <a class="navbar-brand" href="#">开放平台</a>
+        </div>
+        <div class="collapse navbar-collapse" id="bs-example-navbar-collapse-5">
+            <p class="navbar-text navbar-right">
+                <a target="_blank" href="https://pig4cloud.com">技术支持</a>
+            </p>
+            <p class="navbar-text navbar-right">
+                <a target="_blank" href="https://pig4cloud.com">${user.username}</a>
+            </p>
+        </div>
+    </div>
+</nav>
+<div style="padding-top: 80px;width: 300px; color: #555; margin:0px auto;">
+    <form id='confirmationForm' name='confirmationForm' action="/oauth/authorize" method='post'>
+        <input name='user_oauth_approval' value='true' type='hidden'/>
+        <p>
+            <a href="${app.website!''}" target="_blank">${app.appName!'未定义应用名称'}</a> 将获得以下权限:</p>
+        <ul class="list-group">
+            <li class="list-group-item"> <span>
+              <#list scopeList as scope>
+                  <input type="hidden" name="${scope}" value="true"/>
+                  <input type="checkbox" disabled checked="checked"/><label>${scope}</label>
+              </#list>
+        </ul>
+        <p class="help-block">授权后表明你已同意 <a>服务协议</a></p>
+        <button class="btn btn-success pull-right" type="submit" id="write-email-btn">授权</button>
+        </p>
+    </form>
+</div>
+<footer>
+    <p>support by: pig4cloud.com</p>
+    <p>email: <a href="mailto:"></a>.</p>
+</footer>
+</body>
+</html>

+ 34 - 0
hnqz-auth/src/main/resources/templates/ftl/login.ftl

@@ -0,0 +1,34 @@
+<!DOCTYPE html>
+<html lang="en">
+<head>
+    <meta charset="utf-8">
+    <meta http-equiv="X-UA-Compatible" content="IE=edge">
+    <meta name="viewport" content="width=device-width, initial-scale=1">
+    <!-- The above 3 meta tags *must* come first in the head; any other head content must come *after* these tags -->
+    <meta name="description" content="">
+    <meta name="author" content="">
+
+    <title>hnqz微服务统一认证</title>
+
+    <link href="/css/bootstrap.min.css" rel="stylesheet">
+    <link href="/css/signin.css" rel="stylesheet">
+</head>
+
+<body class="sign_body">
+<div class="container form-margin-top">
+    <form class="form-signin" action="/token/form" method="post">
+        <h2 class="form-signin-heading" align="center">统一认证系统</h2>
+        <input type="text" name="username" class="form-control form-margin-top" placeholder="账号" required autofocus>
+        <input type="password" name="password" class="form-control" placeholder="密码" required>
+        <button class="btn btn-lg btn-primary btn-block" type="submit">sign in</button>
+        <#if error??>
+            <span style="color: red; ">${error}</span>
+        </#if>
+    </form>
+</div>
+<footer>
+    <p>support by: pig4cloud</p>
+    <p>email: <a href="mailto:pig4cloud@qq.com">pig4cloud@qq.com</a>.</p>
+</footer>
+</body>
+</html>

+ 12 - 0
hnqz-common/hnqz-common-bom/hnqz-common-bom.iml

@@ -0,0 +1,12 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<module org.jetbrains.idea.maven.project.MavenProjectsManager.isMavenModule="true" type="JAVA_MODULE" version="4">
+  <component name="NewModuleRootManager" LANGUAGE_LEVEL="JDK_1_8">
+    <output url="file://$MODULE_DIR$/target/classes" />
+    <output-test url="file://$MODULE_DIR$/target/test-classes" />
+    <content url="file://$MODULE_DIR$">
+      <excludeFolder url="file://$MODULE_DIR$/target" />
+    </content>
+    <orderEntry type="inheritedJdk" />
+    <orderEntry type="sourceFolder" forTests="false" />
+  </component>
+</module>

+ 255 - 0
hnqz-common/hnqz-common-bom/pom.xml

@@ -0,0 +1,255 @@
+<?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>
+		<artifactId>pigx-cloud-dependencies-parent</artifactId>
+		<groupId>com.pig4cloud</groupId>
+		<version>Hoxton.SR5</version>
+		<relativePath/>
+	</parent>
+
+	<groupId>com.qunzhixinxi</groupId>
+	<artifactId>hnqz-common-bom</artifactId>
+	<packaging>pom</packaging>
+	<version>${hnqz.version}</version>
+	<description>hnqz 公共版本控制</description>
+
+	<properties>
+		<hnqz.version>3.9.0</hnqz.version>
+		<mybatis-plus.version>3.3.2</mybatis-plus.version>
+		<dynamic-ds.version>3.0.0</dynamic-ds.version>
+		<druid.version>1.1.21</druid.version>
+		<mysql.connector.version>8.0.20</mysql.connector.version>
+		<swagger.core.version>1.5.22</swagger.core.version>
+		<mp.weixin.version>3.7.0</mp.weixin.version>
+		<ijpay.version>1.2.0</ijpay.version>
+		<groovy.version>3.0.3</groovy.version>
+		<security.oauth.version>2.3.6.RELEASE</security.oauth.version>
+		<fastjson.version>1.2.69</fastjson.version>
+		<aliyun.version>3.0.52.ALL</aliyun.version>
+	</properties>
+
+	<dependencyManagement>
+		<dependencies>
+			<dependency>
+				<groupId>com.qunzhixinxi</groupId>
+				<artifactId>hnqz-common-core</artifactId>
+				<version>${hnqz.version}</version>
+			</dependency>
+			<dependency>
+				<groupId>com.qunzhixinxi</groupId>
+				<artifactId>hnqz-common-data</artifactId>
+				<version>${hnqz.version}</version>
+			</dependency>
+			<dependency>
+				<groupId>com.qunzhixinxi</groupId>
+				<artifactId>hnqz-common-gateway</artifactId>
+				<version>${hnqz.version}</version>
+			</dependency>
+			<dependency>
+				<groupId>com.qunzhixinxi</groupId>
+				<artifactId>hnqz-common-gray</artifactId>
+				<version>${hnqz.version}</version>
+			</dependency>
+			<dependency>
+				<groupId>com.qunzhixinxi</groupId>
+				<artifactId>hnqz-common-datasource</artifactId>
+				<version>${hnqz.version}</version>
+			</dependency>
+			<dependency>
+				<groupId>com.qunzhixinxi</groupId>
+				<artifactId>hnqz-common-job</artifactId>
+				<version>${hnqz.version}</version>
+			</dependency>
+			<dependency>
+				<groupId>com.qunzhixinxi</groupId>
+				<artifactId>hnqz-common-log</artifactId>
+				<version>${hnqz.version}</version>
+			</dependency>
+			<dependency>
+				<groupId>com.qunzhixinxi</groupId>
+				<artifactId>hnqz-common-oss</artifactId>
+				<version>${hnqz.version}</version>
+			</dependency>
+			<dependency>
+				<groupId>com.qunzhixinxi</groupId>
+				<artifactId>hnqz-common-ding</artifactId>
+				<version>${hnqz.version}</version>
+			</dependency>
+			<dependency>
+				<groupId>com.qunzhixinxi</groupId>
+				<artifactId>hnqz-common-qcc</artifactId>
+				<version>${hnqz.version}</version>
+			</dependency>
+			<dependency>
+				<groupId>com.qunzhixinxi</groupId>
+				<artifactId>hnqz-common-security</artifactId>
+				<version>${hnqz.version}</version>
+			</dependency>
+			<dependency>
+				<groupId>com.qunzhixinxi</groupId>
+				<artifactId>hnqz-common-sentinel</artifactId>
+				<version>${hnqz.version}</version>
+			</dependency>
+			<dependency>
+				<groupId>com.qunzhixinxi</groupId>
+				<artifactId>hnqz-common-feign</artifactId>
+				<version>${hnqz.version}</version>
+			</dependency>
+			<dependency>
+				<groupId>com.qunzhixinxi</groupId>
+				<artifactId>hnqz-common-sequence</artifactId>
+				<version>${hnqz.version}</version>
+			</dependency>
+			<dependency>
+				<groupId>com.qunzhixinxi</groupId>
+				<artifactId>hnqz-common-swagger</artifactId>
+				<version>${hnqz.version}</version>
+			</dependency>
+			<dependency>
+				<groupId>com.qunzhixinxi</groupId>
+				<artifactId>hnqz-common-taxhelper</artifactId>
+				<version>${hnqz.version}</version>
+			</dependency>
+			<dependency>
+				<groupId>com.qunzhixinxi</groupId>
+				<artifactId>hnqz-common-transaction</artifactId>
+				<version>${hnqz.version}</version>
+			</dependency>
+			<dependency>
+				<groupId>com.qunzhixinxi</groupId>
+				<artifactId>hnqz-upms-api</artifactId>
+				<version>${hnqz.version}</version>
+			</dependency>
+			<!--mybatis plus extension,包含了mybatis plus core-->
+			<dependency>
+				<groupId>com.baomidou</groupId>
+				<artifactId>mybatis-plus-extension</artifactId>
+				<version>${mybatis-plus.version}</version>
+			</dependency>
+			<!--mybatis-->
+			<dependency>
+				<groupId>com.baomidou</groupId>
+				<artifactId>mybatis-plus-boot-starter</artifactId>
+				<version>${mybatis-plus.version}</version>
+			</dependency>
+			<dependency>
+				<groupId>com.baomidou</groupId>
+				<artifactId>dynamic-datasource-spring-boot-starter</artifactId>
+				<version>${dynamic-ds.version}</version>
+			</dependency>
+			<!-- druid 连接池 -->
+			<dependency>
+				<groupId>com.alibaba</groupId>
+				<artifactId>druid-spring-boot-starter</artifactId>
+				<version>${druid.version}</version>
+			</dependency>
+			<!--mysql 驱动-->
+			<dependency>
+				<groupId>mysql</groupId>
+				<artifactId>mysql-connector-java</artifactId>
+				<version>${mysql.connector.version}</version>
+			</dependency>
+			<!--fastjson-->
+			<dependency>
+				<groupId>com.alibaba</groupId>
+				<artifactId>fastjson</artifactId>
+				<version>${fastjson.version}</version>
+			</dependency>
+			<!--swagger 最新依赖内置版本-->
+			<dependency>
+				<groupId>io.swagger</groupId>
+				<artifactId>swagger-models</artifactId>
+				<version>${swagger.core.version}</version>
+			</dependency>
+			<dependency>
+				<groupId>io.swagger</groupId>
+				<artifactId>swagger-annotations</artifactId>
+				<version>${swagger.core.version}</version>
+			</dependency>
+			<!--微信依赖-->
+			<dependency>
+				<groupId>com.github.binarywang</groupId>
+				<artifactId>weixin-java-mp</artifactId>
+				<version>${mp.weixin.version}</version>
+			</dependency>
+			<dependency>
+				<groupId>com.github.binarywang</groupId>
+				<artifactId>weixin-java-common</artifactId>
+				<version>${mp.weixin.version}</version>
+			</dependency>
+			<!--支付相关SDK-->
+			<dependency>
+				<groupId>com.github.javen205</groupId>
+				<artifactId>IJPay</artifactId>
+				<version>${ijpay.version}</version>
+			</dependency>
+			<dependency>
+				<groupId>com.alipay.sdk</groupId>
+				<artifactId>alipay-sdk-java</artifactId>
+				<version>${aliyun.version}</version>
+			</dependency>
+			<!--定义groovy 版本-->
+			<dependency>
+				<groupId>org.codehaus.groovy</groupId>
+				<artifactId>groovy</artifactId>
+				<version>${groovy.version}</version>
+			</dependency>
+			<!--稳定版本,替代spring security bom内置-->
+			<dependency>
+				<groupId>org.springframework.security.oauth</groupId>
+				<artifactId>spring-security-oauth2</artifactId>
+				<version>${security.oauth.version}</version>
+			</dependency>
+		</dependencies>
+	</dependencyManagement>
+
+	<build>
+		<plugins>
+			<!--避免和parent bom坐标不一致 -->
+			<plugin>
+				<groupId>com.pig4cloud.plugin</groupId>
+				<artifactId>spring-cloud-maven-plugin</artifactId>
+				<version>1.1.1</version>
+				<executions>
+					<execution>
+						<phase>package</phase>
+						<goals>
+							<goal>info</goal>
+						</goals>
+					</execution>
+				</executions>
+			</plugin>
+			<!-- nothing to do, but we need this to run docker:build form project root -->
+			<plugin>
+				<groupId>io.fabric8</groupId>
+				<artifactId>docker-maven-plugin</artifactId>
+				<version>0.32.0</version>
+				<configuration>
+					<skip>true</skip>
+				</configuration>
+			</plugin>
+			<!--代码格式插件,默认使用spring 规则-->
+			<plugin>
+				<groupId>io.spring.javaformat</groupId>
+				<artifactId>spring-javaformat-maven-plugin</artifactId>
+				<version>0.0.22</version>
+			</plugin>
+		</plugins>
+	</build>
+
+	<pluginRepositories>
+		<pluginRepository>
+			<id>aliyun-plugin</id>
+			<url>https://maven.aliyun.com/repository/public</url>
+			<releases>
+				<enabled>true</enabled>
+			</releases>
+			<snapshots>
+				<enabled>false</enabled>
+			</snapshots>
+		</pluginRepository>
+	</pluginRepositories>
+</project>

+ 98 - 0
hnqz-common/hnqz-common-core/hnqz-common-core.iml

@@ -0,0 +1,98 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<module org.jetbrains.idea.maven.project.MavenProjectsManager.isMavenModule="true" type="JAVA_MODULE" version="4">
+  <component name="FacetManager">
+    <facet type="Spring" name="Spring">
+      <configuration />
+    </facet>
+  </component>
+  <component name="NewModuleRootManager" LANGUAGE_LEVEL="JDK_1_8">
+    <output url="file://$MODULE_DIR$/target/classes" />
+    <output-test url="file://$MODULE_DIR$/target/test-classes" />
+    <content url="file://$MODULE_DIR$">
+      <sourceFolder url="file://$MODULE_DIR$/src/main/java" isTestSource="false" />
+      <sourceFolder url="file://$MODULE_DIR$/src/main/resources" type="java-resource" />
+      <excludeFolder url="file://$MODULE_DIR$/target" />
+    </content>
+    <orderEntry type="inheritedJdk" />
+    <orderEntry type="sourceFolder" forTests="false" />
+    <orderEntry type="library" name="Maven: cn.hutool:hutool-all:5.3.7" level="project" />
+    <orderEntry type="library" name="Maven: javax.servlet:javax.servlet-api:4.0.1" level="project" />
+    <orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-starter-validation:2.3.1.RELEASE" level="project" />
+    <orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-starter:2.3.1.RELEASE" level="project" />
+    <orderEntry type="library" name="Maven: org.springframework.boot:spring-boot:2.3.1.RELEASE" level="project" />
+    <orderEntry type="library" name="Maven: org.springframework:spring-context:5.2.7.RELEASE" level="project" />
+    <orderEntry type="library" name="Maven: org.springframework:spring-aop:5.2.7.RELEASE" level="project" />
+    <orderEntry type="library" name="Maven: org.springframework:spring-expression:5.2.7.RELEASE" level="project" />
+    <orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-autoconfigure:2.3.1.RELEASE" level="project" />
+    <orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-starter-logging:2.3.1.RELEASE" level="project" />
+    <orderEntry type="library" name="Maven: ch.qos.logback:logback-classic:1.2.3" level="project" />
+    <orderEntry type="library" name="Maven: ch.qos.logback:logback-core:1.2.3" level="project" />
+    <orderEntry type="library" name="Maven: org.apache.logging.log4j:log4j-to-slf4j:2.13.3" level="project" />
+    <orderEntry type="library" name="Maven: org.apache.logging.log4j:log4j-api:2.13.3" level="project" />
+    <orderEntry type="library" name="Maven: org.slf4j:jul-to-slf4j:1.7.30" level="project" />
+    <orderEntry type="library" name="Maven: jakarta.annotation:jakarta.annotation-api:1.3.5" level="project" />
+    <orderEntry type="library" name="Maven: org.yaml:snakeyaml:1.26" level="project" />
+    <orderEntry type="library" name="Maven: org.glassfish:jakarta.el:3.0.3" level="project" />
+    <orderEntry type="library" name="Maven: org.hibernate.validator:hibernate-validator:6.1.5.Final" level="project" />
+    <orderEntry type="library" name="Maven: jakarta.validation:jakarta.validation-api:2.0.2" level="project" />
+    <orderEntry type="library" name="Maven: org.jboss.logging:jboss-logging:3.4.1.Final" level="project" />
+    <orderEntry type="library" name="Maven: com.fasterxml:classmate:1.5.1" level="project" />
+    <orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-starter-json:2.3.1.RELEASE" level="project" />
+    <orderEntry type="library" name="Maven: org.springframework:spring-web:5.2.7.RELEASE" level="project" />
+    <orderEntry type="library" name="Maven: org.springframework:spring-beans:5.2.7.RELEASE" level="project" />
+    <orderEntry type="library" name="Maven: com.fasterxml.jackson.core:jackson-databind:2.11.0" level="project" />
+    <orderEntry type="library" name="Maven: com.fasterxml.jackson.core:jackson-annotations:2.11.0" level="project" />
+    <orderEntry type="library" name="Maven: com.fasterxml.jackson.core:jackson-core:2.11.0" level="project" />
+    <orderEntry type="library" name="Maven: com.fasterxml.jackson.datatype:jackson-datatype-jdk8:2.11.0" level="project" />
+    <orderEntry type="library" name="Maven: com.fasterxml.jackson.datatype:jackson-datatype-jsr310:2.11.0" level="project" />
+    <orderEntry type="library" name="Maven: com.fasterxml.jackson.module:jackson-module-parameter-names:2.11.0" level="project" />
+    <orderEntry type="library" name="Maven: com.alibaba:transmittable-thread-local:2.11.4" level="project" />
+    <orderEntry type="library" name="Maven: io.swagger:swagger-annotations:1.5.22" level="project" />
+    <orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-configuration-processor:2.3.1.RELEASE" level="project" />
+    <orderEntry type="library" name="Maven: com.github.ulisesbocchio:jasypt-spring-boot-starter:2.1.1" level="project" />
+    <orderEntry type="library" name="Maven: com.github.ulisesbocchio:jasypt-spring-boot:2.1.1" level="project" />
+    <orderEntry type="library" name="Maven: com.melloware:jasypt:1.9.4" level="project" />
+    <orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-starter-actuator:2.3.1.RELEASE" level="project" />
+    <orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-actuator-autoconfigure:2.3.1.RELEASE" level="project" />
+    <orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-actuator:2.3.1.RELEASE" level="project" />
+    <orderEntry type="library" name="Maven: io.micrometer:micrometer-core:1.5.1" level="project" />
+    <orderEntry type="library" name="Maven: org.hdrhistogram:HdrHistogram:2.1.12" level="project" />
+    <orderEntry type="library" scope="RUNTIME" name="Maven: org.latencyutils:LatencyUtils:2.0.3" level="project" />
+    <orderEntry type="library" name="Maven: de.codecentric:spring-boot-admin-starter-client:2.2.3" level="project" />
+    <orderEntry type="library" name="Maven: de.codecentric:spring-boot-admin-client:2.2.3" level="project" />
+    <orderEntry type="library" scope="PROVIDED" name="Maven: org.projectlombok:lombok:1.18.12" level="project" />
+    <orderEntry type="library" scope="TEST" name="Maven: org.springframework.boot:spring-boot-starter-test:2.3.1.RELEASE" level="project" />
+    <orderEntry type="library" scope="TEST" name="Maven: org.springframework.boot:spring-boot-test:2.3.1.RELEASE" level="project" />
+    <orderEntry type="library" scope="TEST" name="Maven: org.springframework.boot:spring-boot-test-autoconfigure:2.3.1.RELEASE" level="project" />
+    <orderEntry type="library" scope="TEST" name="Maven: com.jayway.jsonpath:json-path:2.4.0" level="project" />
+    <orderEntry type="library" scope="TEST" name="Maven: net.minidev:json-smart:2.3" level="project" />
+    <orderEntry type="library" scope="TEST" name="Maven: net.minidev:accessors-smart:1.2" level="project" />
+    <orderEntry type="library" scope="TEST" name="Maven: org.ow2.asm:asm:5.0.4" level="project" />
+    <orderEntry type="library" name="Maven: org.slf4j:slf4j-api:1.7.30" level="project" />
+    <orderEntry type="library" scope="TEST" name="Maven: jakarta.xml.bind:jakarta.xml.bind-api:2.3.3" level="project" />
+    <orderEntry type="library" scope="TEST" name="Maven: jakarta.activation:jakarta.activation-api:1.2.2" level="project" />
+    <orderEntry type="library" scope="TEST" name="Maven: org.assertj:assertj-core:3.16.1" level="project" />
+    <orderEntry type="library" scope="TEST" name="Maven: org.hamcrest:hamcrest:2.2" level="project" />
+    <orderEntry type="library" scope="TEST" name="Maven: org.junit.jupiter:junit-jupiter:5.6.2" level="project" />
+    <orderEntry type="library" scope="TEST" name="Maven: org.junit.jupiter:junit-jupiter-api:5.6.2" level="project" />
+    <orderEntry type="library" scope="TEST" name="Maven: org.opentest4j:opentest4j:1.2.0" level="project" />
+    <orderEntry type="library" scope="TEST" name="Maven: org.junit.platform:junit-platform-commons:1.6.2" level="project" />
+    <orderEntry type="library" scope="TEST" name="Maven: org.junit.jupiter:junit-jupiter-params:5.6.2" level="project" />
+    <orderEntry type="library" scope="TEST" name="Maven: org.junit.jupiter:junit-jupiter-engine:5.6.2" level="project" />
+    <orderEntry type="library" scope="TEST" name="Maven: org.junit.vintage:junit-vintage-engine:5.6.2" level="project" />
+    <orderEntry type="library" scope="TEST" name="Maven: org.apiguardian:apiguardian-api:1.1.0" level="project" />
+    <orderEntry type="library" scope="TEST" name="Maven: org.junit.platform:junit-platform-engine:1.6.2" level="project" />
+    <orderEntry type="library" scope="TEST" name="Maven: junit:junit:4.13" level="project" />
+    <orderEntry type="library" scope="TEST" name="Maven: org.mockito:mockito-core:3.3.3" level="project" />
+    <orderEntry type="library" scope="TEST" name="Maven: net.bytebuddy:byte-buddy:1.10.11" level="project" />
+    <orderEntry type="library" scope="TEST" name="Maven: net.bytebuddy:byte-buddy-agent:1.10.11" level="project" />
+    <orderEntry type="library" scope="TEST" name="Maven: org.objenesis:objenesis:2.6" level="project" />
+    <orderEntry type="library" scope="TEST" name="Maven: org.mockito:mockito-junit-jupiter:3.3.3" level="project" />
+    <orderEntry type="library" scope="TEST" name="Maven: org.skyscreamer:jsonassert:1.5.0" level="project" />
+    <orderEntry type="library" scope="TEST" name="Maven: com.vaadin.external.google:android-json:0.0.20131108.vaadin1" level="project" />
+    <orderEntry type="library" name="Maven: org.springframework:spring-core:5.2.7.RELEASE" level="project" />
+    <orderEntry type="library" name="Maven: org.springframework:spring-jcl:5.2.7.RELEASE" level="project" />
+    <orderEntry type="library" scope="TEST" name="Maven: org.springframework:spring-test:5.2.7.RELEASE" level="project" />
+    <orderEntry type="library" scope="TEST" name="Maven: org.xmlunit:xmlunit-core:2.7.0" level="project" />
+  </component>
+</module>

+ 70 - 0
hnqz-common/hnqz-common-core/pom.xml

@@ -0,0 +1,70 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+  ~
+  ~      Copyright (c) 2018-2025, hnqz All rights reserved.
+  ~
+  ~  Redistribution and use in source and binary forms, with or without
+  ~  modification, are permitted provided that the following conditions are met:
+  ~
+  ~ Redistributions of source code must retain the above copyright notice,
+  ~  this list of conditions and the following disclaimer.
+  ~  Redistributions in binary form must reproduce the above copyright
+  ~  notice, this list of conditions and the following disclaimer in the
+  ~  documentation and/or other materials provided with the distribution.
+  ~  Neither the name of the pig4cloud.com developer nor the names of its
+  ~  contributors may be used to endorse or promote products derived from
+  ~  this software without specific prior written permission.
+  ~  Author: hnqz
+  ~
+  -->
+
+<project xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://maven.apache.org/POM/4.0.0"
+		 xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+	<modelVersion>4.0.0</modelVersion>
+	<parent>
+		<groupId>com.qunzhixinxi</groupId>
+		<artifactId>hnqz-common</artifactId>
+		<version>3.9.0</version>
+	</parent>
+
+	<artifactId>hnqz-common-core</artifactId>
+	<packaging>jar</packaging>
+
+	<description>hnqz 公共工具类核心包</description>
+
+
+	<dependencies>
+		<!--hutool-->
+		<dependency>
+			<groupId>cn.hutool</groupId>
+			<artifactId>hutool-all</artifactId>
+			<version>${hutool.version}</version>
+		</dependency>
+		<!--server-api-->
+		<dependency>
+			<groupId>javax.servlet</groupId>
+			<artifactId>javax.servlet-api</artifactId>
+		</dependency>
+		<!--hibernate-validator-->
+		<dependency>
+			<groupId>org.springframework.boot</groupId>
+			<artifactId>spring-boot-starter-validation</artifactId>
+		</dependency>
+		<!--json模块-->
+		<dependency>
+			<groupId>org.springframework.boot</groupId>
+			<artifactId>spring-boot-starter-json</artifactId>
+		</dependency>
+		<!--TTL-->
+		<dependency>
+			<groupId>com.alibaba</groupId>
+			<artifactId>transmittable-thread-local</artifactId>
+			<version>${ttl.version}</version>
+		</dependency>
+		<!--swagger 依赖-->
+		<dependency>
+			<groupId>io.swagger</groupId>
+			<artifactId>swagger-annotations</artifactId>
+		</dependency>
+	</dependencies>
+</project>

+ 44 - 0
hnqz-common/hnqz-common-core/src/main/java/com/qunzhixinxi/hnqz/common/core/config/JacksonConfig.java

@@ -0,0 +1,44 @@
+package com.qunzhixinxi.hnqz.common.core.config;
+
+import cn.hutool.core.date.DatePattern;
+import com.fasterxml.jackson.databind.ObjectMapper;
+import com.qunzhixinxi.hnqz.common.core.jackson.HnqzJavaTimeModule;
+import org.springframework.boot.autoconfigure.AutoConfigureBefore;
+import org.springframework.boot.autoconfigure.condition.ConditionalOnClass;
+import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean;
+import org.springframework.boot.autoconfigure.jackson.Jackson2ObjectMapperBuilderCustomizer;
+import org.springframework.boot.autoconfigure.jackson.JacksonAutoConfiguration;
+import org.springframework.context.annotation.Bean;
+import org.springframework.context.annotation.Configuration;
+
+import java.util.Locale;
+import java.util.TimeZone;
+
+/**
+ * JacksonConfig 配置时间转换规则
+ * {@link com.qunzhixinxi.hnqz.common.core.jackson.HnqzJavaTimeModule}、默认时区等
+ *
+ * @author L.cm
+ * @author hnqz
+ * @author lishangbu
+ * @date 2020-06-15
+ */
+@Configuration
+@ConditionalOnClass(ObjectMapper.class)
+@AutoConfigureBefore(JacksonAutoConfiguration.class)
+public class JacksonConfig {
+
+	private static final String ASIA_SHANGHAI = "Asia/Shanghai";
+
+	@Bean
+	@ConditionalOnMissingBean
+	public Jackson2ObjectMapperBuilderCustomizer customizer() {
+		return builder -> {
+			builder.locale(Locale.CHINA);
+			builder.timeZone(TimeZone.getTimeZone(ASIA_SHANGHAI));
+			builder.simpleDateFormat(DatePattern.NORM_DATETIME_PATTERN);
+			builder.modules(new HnqzJavaTimeModule());
+		};
+	}
+
+}

+ 41 - 0
hnqz-common/hnqz-common-core/src/main/java/com/qunzhixinxi/hnqz/common/core/config/MessageSourceConfig.java

@@ -0,0 +1,41 @@
+/*
+ *    Copyright (c) 2018-2025, hnqz All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the following disclaimer.
+ * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * Neither the name of the pig4cloud.com developer nor the names of its
+ * contributors may be used to endorse or promote products derived from
+ * this software without specific prior written permission.
+ * Author: hnqz
+ */
+
+package com.qunzhixinxi.hnqz.common.core.config;
+
+import org.springframework.context.MessageSource;
+import org.springframework.context.annotation.Bean;
+import org.springframework.context.annotation.Configuration;
+import org.springframework.context.support.ReloadableResourceBundleMessageSource;
+
+/**
+ * @author hnqz
+ * @date 2018/11/14
+ * <p>
+ * 国际化配置
+ */
+@Configuration
+public class MessageSourceConfig {
+
+	@Bean
+	public MessageSource messageSource() {
+		ReloadableResourceBundleMessageSource messageSource = new ReloadableResourceBundleMessageSource();
+		messageSource.setBasename("classpath:i18n/messages");
+		return messageSource;
+	}
+
+}

+ 36 - 0
hnqz-common/hnqz-common-core/src/main/java/com/qunzhixinxi/hnqz/common/core/config/RestTemplateConfig.java

@@ -0,0 +1,36 @@
+/*
+ *    Copyright (c) 2018-2025, hnqz All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the following disclaimer.
+ * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * Neither the name of the pig4cloud.com developer nor the names of its
+ * contributors may be used to endorse or promote products derived from
+ * this software without specific prior written permission.
+ * Author: hnqz
+ */
+
+package com.qunzhixinxi.hnqz.common.core.config;
+
+import org.springframework.context.annotation.Bean;
+import org.springframework.context.annotation.Configuration;
+import org.springframework.web.client.RestTemplate;
+
+/**
+ * @author hnqz
+ * @date 2018/8/16 RestTemplate
+ */
+@Configuration
+public class RestTemplateConfig {
+
+	@Bean
+	public RestTemplate restTemplate() {
+		return new RestTemplate();
+	}
+
+}

+ 83 - 0
hnqz-common/hnqz-common-core/src/main/java/com/qunzhixinxi/hnqz/common/core/constant/CacheConstants.java

@@ -0,0 +1,83 @@
+package com.qunzhixinxi.hnqz.common.core.constant;
+
+/**
+ * @author hnqz
+ * @date 2019-04-28
+ * <p>
+ * 缓存的key 常量
+ */
+public interface CacheConstants {
+
+	/**
+	 * 全局缓存,在缓存名称上加上该前缀表示该缓存不区分租户,比如:
+	 * <p/>
+	 * {@code @Cacheable(value = CacheConstants.GLOBALLY+CacheConstants.MENU_DETAILS, key = "#roleId  + '_menu'", unless = "#result == null")}
+	 */
+	String GLOBALLY = "gl:";
+
+	/**
+	 * 验证码前缀
+	 */
+	String DEFAULT_CODE_KEY = "DEFAULT_CODE_KEY:";
+
+	/**
+	 * 菜单信息缓存
+	 */
+	String MENU_DETAILS = "menu_details";
+
+	/**
+	 * 用户信息缓存
+	 */
+	String USER_DETAILS = "user_details";
+
+	/**
+	 * 字典信息缓存
+	 */
+	String DICT_DETAILS = "dict_details";
+
+	/**
+	 * oauth 客户端信息
+	 */
+	String CLIENT_DETAILS_KEY = "hnqz_oauth:client:details";
+
+	/**
+	 * spring boot admin 事件key
+	 */
+	String EVENT_KEY = "event_key";
+
+	/**
+	 * 路由存放
+	 */
+	String ROUTE_KEY = "gateway_route_key";
+
+	/**
+	 * redis reload 事件
+	 */
+	String ROUTE_REDIS_RELOAD_TOPIC = "gateway_redis_route_reload_topic";
+
+	/**
+	 * 内存reload 时间
+	 */
+	String ROUTE_JVM_RELOAD_TOPIC = "gateway_jvm_route_reload_topic";
+
+	/**
+	 * 公众号 reload
+	 */
+	String MP_REDIS_RELOAD_TOPIC = "mp_redis_reload_topic";
+
+	/**
+	 * 支付 reload 事件
+	 */
+	String PAY_REDIS_RELOAD_TOPIC = "pay_redis_reload_topic";
+
+	/**
+	 * 参数缓存
+	 */
+	String PARAMS_DETAILS = "params_details";
+
+	/**
+	 * 租户缓存 (不区分租户)
+	 */
+	String TENANT_DETAILS = GLOBALLY + "tenant_details";
+
+}

+ 103 - 0
hnqz-common/hnqz-common-core/src/main/java/com/qunzhixinxi/hnqz/common/core/constant/CommonConstants.java

@@ -0,0 +1,103 @@
+/*
+ *
+ *      Copyright (c) 2018-2025, hnqz All rights reserved.
+ *
+ *  Redistribution and use in source and binary forms, with or without
+ *  modification, are permitted provided that the following conditions are met:
+ *
+ * Redistributions of source code must retain the above copyright notice,
+ *  this list of conditions and the following disclaimer.
+ *  Redistributions in binary form must reproduce the above copyright
+ *  notice, this list of conditions and the following disclaimer in the
+ *  documentation and/or other materials provided with the distribution.
+ *  Neither the name of the pig4cloud.com developer nor the names of its
+ *  contributors may be used to endorse or promote products derived from
+ *  this software without specific prior written permission.
+ *  Author: hnqz
+ *
+ */
+
+package com.qunzhixinxi.hnqz.common.core.constant;
+
+/**
+ * @author hnqz
+ * @date 2017/10/29
+ */
+public interface CommonConstants {
+
+	/**
+	 * header 中租户ID
+	 */
+	String TENANT_ID = "TENANT-ID";
+
+	/**
+	 * header 中版本信息
+	 */
+	String VERSION = "VERSION";
+
+	/**
+	 * 租户ID
+	 */
+	Integer TENANT_ID_1 = 1;
+
+	/**
+	 * 删除
+	 */
+	String STATUS_DEL = "1";
+
+	/**
+	 * 正常
+	 */
+	String STATUS_NORMAL = "0";
+
+	/**
+	 * 锁定
+	 */
+	String STATUS_LOCK = "9";
+
+	/**
+	 * 菜单树根节点
+	 */
+	Integer MENU_TREE_ROOT_ID = -1;
+
+	/**
+	 * 编码
+	 */
+	String UTF8 = "UTF-8";
+
+	/**
+	 * 前端工程名
+	 */
+	String FRONT_END_PROJECT = "hnqz-ui";
+
+	/**
+	 * 后端工程名
+	 */
+	String BACK_END_PROJECT = "hnqz";
+
+	/**
+	 * 公共参数
+	 */
+	String PIG_PUBLIC_PARAM_KEY = "PIG_PUBLIC_PARAM_KEY";
+
+	/**
+	 * 成功标记
+	 */
+	Integer SUCCESS = 0;
+
+	/**
+	 * 失败标记
+	 */
+	Integer FAIL = 1;
+
+	/**
+	 * 默认存储bucket
+	 */
+	String BUCKET_NAME = "hnqz";
+
+	/**
+	 * 滑块验证码
+	 */
+	String IMAGE_CODE_TYPE = "blockPuzzle";
+
+}

+ 21 - 0
hnqz-common/hnqz-common-core/src/main/java/com/qunzhixinxi/hnqz/common/core/constant/PaginationConstants.java

@@ -0,0 +1,21 @@
+package com.qunzhixinxi.hnqz.common.core.constant;
+
+/**
+ * 分页相关的参数
+ *
+ * @author lishangbu
+ * @date 2018/11/22
+ */
+public interface PaginationConstants {
+
+	/**
+	 * 当前页
+	 */
+	String CURRENT = "current";
+
+	/**
+	 * 每页大小
+	 */
+	String SIZE = "size";
+
+}

+ 215 - 0
hnqz-common/hnqz-common-core/src/main/java/com/qunzhixinxi/hnqz/common/core/constant/SecurityConstants.java

@@ -0,0 +1,215 @@
+/*
+ *
+ *      Copyright (c) 2018-2025, hnqz All rights reserved.
+ *
+ *  Redistribution and use in source and binary forms, with or without
+ *  modification, are permitted provided that the following conditions are met:
+ *
+ * Redistributions of source code must retain the above copyright notice,
+ *  this list of conditions and the following disclaimer.
+ *  Redistributions in binary form must reproduce the above copyright
+ *  notice, this list of conditions and the following disclaimer in the
+ *  documentation and/or other materials provided with the distribution.
+ *  Neither the name of the pig4cloud.com developer nor the names of its
+ *  contributors may be used to endorse or promote products derived from
+ *  this software without specific prior written permission.
+ *  Author: hnqz
+ *
+ */
+
+package com.qunzhixinxi.hnqz.common.core.constant;
+
+/**
+ * @author hnqz
+ * @date 2017-12-18
+ */
+public interface SecurityConstants {
+
+	/**
+	 * 刷新
+	 */
+	String REFRESH_TOKEN = "refresh_token";
+
+	/**
+	 * 验证码有效期
+	 */
+	int CODE_TIME = 300;
+
+	/**
+	 * 验证码长度
+	 */
+	String CODE_SIZE = "4";
+
+	/**
+	 * 角色前缀
+	 */
+	String ROLE = "ROLE_";
+
+	/**
+	 * 前缀
+	 */
+	String PIGX_PREFIX = "hnqz_";
+
+	/**
+	 * oauth 相关前缀
+	 */
+	String OAUTH_PREFIX = "oauth:";
+
+	/**
+	 * 项目的license
+	 */
+	String PIGX_LICENSE = "made by hnqz";
+
+	/**
+	 * 内部
+	 */
+	String FROM_IN = "Y";
+
+	/**
+	 * 标志
+	 */
+	String FROM = "from";
+
+	/**
+	 * OAUTH URL
+	 */
+	String OAUTH_TOKEN_URL = "/oauth/token";
+
+	/**
+	 * 手机号登录URL
+	 */
+	String SMS_TOKEN_URL = "/mobile/token/sms";
+
+	/**
+	 * 社交登录URL
+	 */
+	String SOCIAL_TOKEN_URL = "/mobile/token/social";
+
+	/**
+	 * 自定义登录URL
+	 */
+	String MOBILE_TOKEN_URL = "/mobile/token/*";
+
+	/**
+	 * 微信获取OPENID
+	 */
+	String WX_AUTHORIZATION_CODE_URL = "https://api.weixin.qq.com/sns/oauth2/access_token"
+			+ "?appid=%s&secret=%s&code=%s&grant_type=authorization_code";
+
+	/**
+	 * 微信小程序OPENID
+	 */
+	String MINI_APP_AUTHORIZATION_CODE_URL = "https://api.weixin.qq.com/sns/jscode2session"
+			+ "?appid=%s&secret=%s&js_code=%s&grant_type=authorization_code";
+
+	/**
+	 * 码云获取token
+	 */
+	String GITEE_AUTHORIZATION_CODE_URL = "https://gitee.com/oauth/token?grant_type="
+			+ "authorization_code&code=%S&client_id=%s&redirect_uri=" + "%s&client_secret=%s";
+
+	/**
+	 * 开源中国获取token
+	 */
+	String OSC_AUTHORIZATION_CODE_URL = "https://www.oschina.net/action/openapi/token";
+
+	/**
+	 * 码云获取用户信息
+	 */
+	String GITEE_USER_INFO_URL = "https://gitee.com/api/v5/user?access_token=%s";
+
+	/**
+	 * 开源中国用户信息
+	 */
+	String OSC_USER_INFO_URL = "https://www.oschina.net/action/openapi/user?access_token=%s&dataType=json";
+
+	/**
+	 * {bcrypt} 加密的特征码
+	 */
+	String BCRYPT = "{bcrypt}";
+
+	/**
+	 * sys_oauth_client_details 表的字段,不包括client_id、client_secret
+	 */
+	String CLIENT_FIELDS = "client_id, CONCAT('{noop}',client_secret) as client_secret, resource_ids, scope, "
+			+ "authorized_grant_types, web_server_redirect_uri, authorities, access_token_validity, "
+			+ "refresh_token_validity, additional_information, autoapprove";
+
+	/**
+	 * JdbcClientDetailsService 查询语句
+	 */
+	String BASE_FIND_STATEMENT = "select " + CLIENT_FIELDS + " from sys_oauth_client_details";
+
+	/**
+	 * 按条件client_id 查询
+	 */
+	String DEFAULT_SELECT_STATEMENT = BASE_FIND_STATEMENT + " where client_id = ? and del_flag = 0 and tenant_id = %s";
+
+	/**
+	 * 资源服务器默认bean名称
+	 */
+	String RESOURCE_SERVER_CONFIGURER = "resourceServerConfigurerAdapter";
+
+	/**
+	 * 客户端模式
+	 */
+	String CLIENT_CREDENTIALS = "client_credentials";
+
+	/**
+	 * 用户ID字段
+	 */
+	String DETAILS_USER_ID = "id";
+
+	/**
+	 * 用户名
+	 */
+	String DETAILS_USERNAME = "username";
+
+	/**
+	 * 用户基本信息
+	 */
+	String DETAILS_USER = "user_info";
+
+	/**
+	 * 用户名phone
+	 */
+	String DETAILS_PHONE = "phone";
+
+	/**
+	 * 头像
+	 */
+	String DETAILS_AVATAR = "avatar";
+
+	/**
+	 * 用户部门字段
+	 */
+	String DETAILS_DEPT_ID = "deptId";
+
+	/**
+	 * 租户ID 字段
+	 */
+	String DETAILS_TENANT_ID = "tenantId";
+
+	/**
+	 * 协议字段
+	 */
+	String DETAILS_LICENSE = "license";
+
+	/**
+	 * 激活字段 兼容外围系统接入
+	 */
+	String ACTIVE = "active";
+
+	/**
+	 * AES 加密
+	 */
+	String AES = "aes";
+
+
+	String USERINFO_PLATID="platId";
+
+	String USERINFO_DRUGENTID="drugEntId";
+
+	String USERINFO_ROLES="roles";
+
+}

+ 43 - 0
hnqz-common/hnqz-common-core/src/main/java/com/qunzhixinxi/hnqz/common/core/constant/ServiceNameConstants.java

@@ -0,0 +1,43 @@
+/*
+ *
+ *      Copyright (c) 2018-2025, hnqz All rights reserved.
+ *
+ *  Redistribution and use in source and binary forms, with or without
+ *  modification, are permitted provided that the following conditions are met:
+ *
+ * Redistributions of source code must retain the above copyright notice,
+ *  this list of conditions and the following disclaimer.
+ *  Redistributions in binary form must reproduce the above copyright
+ *  notice, this list of conditions and the following disclaimer in the
+ *  documentation and/or other materials provided with the distribution.
+ *  Neither the name of the pig4cloud.com developer nor the names of its
+ *  contributors may be used to endorse or promote products derived from
+ *  this software without specific prior written permission.
+ *  Author: hnqz
+ *
+ */
+
+package com.qunzhixinxi.hnqz.common.core.constant;
+
+/**
+ * @author hnqz
+ * @date 2018年06月22日16:41:01 服务名称
+ */
+public interface ServiceNameConstants {
+
+	/**
+	 * 认证中心
+	 */
+	String AUTH_SERVICE = "hnqz-auth";
+
+	/**
+	 * UMPS模块
+	 */
+	String UPMS_SERVICE = "hnqz-upms-biz";
+
+	/**
+	 * 分布式事务协调服务
+	 */
+	String TX_MANAGER = "hnqz-tx-manager";
+
+}

+ 36 - 0
hnqz-common/hnqz-common-core/src/main/java/com/qunzhixinxi/hnqz/common/core/constant/enums/DictTypeEnum.java

@@ -0,0 +1,36 @@
+package com.qunzhixinxi.hnqz.common.core.constant.enums;
+
+import lombok.AllArgsConstructor;
+import lombok.Getter;
+
+/**
+ * @author hnqz
+ * @date 2019-05-16
+ * <p>
+ * 字典类型
+ */
+@Getter
+@AllArgsConstructor
+public enum DictTypeEnum {
+
+	/**
+	 * 字典类型-系统内置(不可修改)
+	 */
+	SYSTEM("1", "系统内置"),
+
+	/**
+	 * 字典类型-业务类型
+	 */
+	BIZ("0", "业务类");
+
+	/**
+	 * 类型
+	 */
+	private String type;
+
+	/**
+	 * 描述
+	 */
+	private String description;
+
+}

+ 81 - 0
hnqz-common/hnqz-common-core/src/main/java/com/qunzhixinxi/hnqz/common/core/constant/enums/LoginTypeEnum.java

@@ -0,0 +1,81 @@
+/*
+ *    Copyright (c) 2018-2025, hnqz All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the following disclaimer.
+ * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * Neither the name of the pig4cloud.com developer nor the names of its
+ * contributors may be used to endorse or promote products derived from
+ * this software without specific prior written permission.
+ * Author: hnqz
+ */
+
+package com.qunzhixinxi.hnqz.common.core.constant.enums;
+
+import lombok.AllArgsConstructor;
+import lombok.Getter;
+
+/**
+ * @author hnqz
+ * @date 2018/8/15 社交登录类型
+ */
+@Getter
+@AllArgsConstructor
+public enum LoginTypeEnum {
+
+	/**
+	 * 账号密码登录
+	 */
+	PWD("PWD", "账号密码登录"),
+
+	/**
+	 * 验证码登录
+	 */
+	SMS("SMS", "验证码登录"),
+
+	/**
+	 * QQ登录
+	 */
+	QQ("QQ", "QQ登录"),
+
+	/**
+	 * 微信登录
+	 */
+	WECHAT("WX", "微信登录"),
+
+	/**
+	 * 微信小程序
+	 */
+	MINI_APP("MINI", "微信小程序"),
+
+	/**
+	 * 码云登录
+	 */
+	GITEE("GITEE", "码云登录"),
+
+	/**
+	 * 开源中国登录
+	 */
+	OSC("OSC", "开源中国登录"),
+
+	/**
+	 * 税邦云
+	 */
+	TAX_HELPER("TAXHELPER", "税邦云");
+
+	/**
+	 * 类型
+	 */
+	private String type;
+
+	/**
+	 * 描述
+	 */
+	private String description;
+
+}

+ 41 - 0
hnqz-common/hnqz-common-core/src/main/java/com/qunzhixinxi/hnqz/common/core/constant/enums/MenuTypeEnum.java

@@ -0,0 +1,41 @@
+package com.qunzhixinxi.hnqz.common.core.constant.enums;
+
+import lombok.AllArgsConstructor;
+import lombok.Getter;
+
+/**
+ * @author hnqz
+ * @date 2020-02-17
+ * <p>
+ * 菜单类型
+ */
+@Getter
+@AllArgsConstructor
+public enum MenuTypeEnum {
+
+	/**
+	 * 左侧菜单
+	 */
+	LEFT_MENU("0", "left"),
+
+	/**
+	 * 顶部菜单
+	 */
+	TOP_MENU("2", "top"),
+
+	/**
+	 * 按钮
+	 */
+	BUTTON("1", "button");
+
+	/**
+	 * 类型
+	 */
+	private String type;
+
+	/**
+	 * 描述
+	 */
+	private String description;
+
+}

+ 51 - 0
hnqz-common/hnqz-common-core/src/main/java/com/qunzhixinxi/hnqz/common/core/constant/enums/ProcessStatusEnum.java

@@ -0,0 +1,51 @@
+/*
+ *    Copyright (c) 2018-2025, hnqz All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the following disclaimer.
+ * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * Neither the name of the pig4cloud.com developer nor the names of its
+ * contributors may be used to endorse or promote products derived from
+ * this software without specific prior written permission.
+ * Author: hnqz
+ */
+
+package com.qunzhixinxi.hnqz.common.core.constant.enums;
+
+import lombok.AllArgsConstructor;
+import lombok.Getter;
+
+/**
+ * @author hnqz
+ * @date 2018/9/30 流程状态
+ */
+@Getter
+@AllArgsConstructor
+public enum ProcessStatusEnum {
+
+	/**
+	 * 图片资源
+	 */
+	ACTIVE("active", "图片资源"),
+
+	/**
+	 * xml资源
+	 */
+	SUSPEND("suspend", "xml资源");
+
+	/**
+	 * 类型
+	 */
+	private final String status;
+
+	/**
+	 * 描述
+	 */
+	private final String description;
+
+}

+ 51 - 0
hnqz-common/hnqz-common-core/src/main/java/com/qunzhixinxi/hnqz/common/core/constant/enums/ResourceTypeEnum.java

@@ -0,0 +1,51 @@
+/*
+ *    Copyright (c) 2018-2025, hnqz All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the following disclaimer.
+ * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * Neither the name of the pig4cloud.com developer nor the names of its
+ * contributors may be used to endorse or promote products derived from
+ * this software without specific prior written permission.
+ * Author: hnqz
+ */
+
+package com.qunzhixinxi.hnqz.common.core.constant.enums;
+
+import lombok.AllArgsConstructor;
+import lombok.Getter;
+
+/**
+ * @author hnqz
+ * @date 2018/9/30 资源类型
+ */
+@Getter
+@AllArgsConstructor
+public enum ResourceTypeEnum {
+
+	/**
+	 * 图片资源
+	 */
+	IMAGE("image", "图片资源"),
+
+	/**
+	 * xml资源
+	 */
+	XML("xml", "xml资源");
+
+	/**
+	 * 类型
+	 */
+	private final String type;
+
+	/**
+	 * 描述
+	 */
+	private final String description;
+
+}

+ 36 - 0
hnqz-common/hnqz-common-core/src/main/java/com/qunzhixinxi/hnqz/common/core/constant/enums/StyleTypeEnum.java

@@ -0,0 +1,36 @@
+package com.qunzhixinxi.hnqz.common.core.constant.enums;
+
+import lombok.AllArgsConstructor;
+import lombok.Getter;
+
+/**
+ * @author hnqz
+ * @date 2020-01-19
+ * <p>
+ * 前端类型类型
+ */
+@Getter
+@AllArgsConstructor
+public enum StyleTypeEnum {
+
+	/**
+	 * 前端类型-avue 风格
+	 */
+	AVUE("0", "avue 风格"),
+
+	/**
+	 * 前端类型-element 风格
+	 */
+	ELEMENT("1", "element 风格");
+
+	/**
+	 * 类型
+	 */
+	private String style;
+
+	/**
+	 * 描述
+	 */
+	private String description;
+
+}

+ 61 - 0
hnqz-common/hnqz-common-core/src/main/java/com/qunzhixinxi/hnqz/common/core/constant/enums/TaskStatusEnum.java

@@ -0,0 +1,61 @@
+/*
+ *    Copyright (c) 2018-2025, hnqz All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the following disclaimer.
+ * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * Neither the name of the pig4cloud.com developer nor the names of its
+ * contributors may be used to endorse or promote products derived from
+ * this software without specific prior written permission.
+ * Author: hnqz
+ */
+
+package com.qunzhixinxi.hnqz.common.core.constant.enums;
+
+import lombok.AllArgsConstructor;
+import lombok.Getter;
+
+/**
+ * @author hnqz
+ * @date 2018/9/30 流程状态
+ */
+@Getter
+@AllArgsConstructor
+public enum TaskStatusEnum {
+
+	/**
+	 * 未提交
+	 */
+	UNSUBMIT("0", "未提交"),
+
+	/**
+	 * 审核中
+	 */
+	CHECK("1", "审核中"),
+
+	/**
+	 * 已完成
+	 */
+	COMPLETED("2", "已完成"),
+
+	/**
+	 * 驳回
+	 */
+	OVERRULE("9", "驳回");
+
+	/**
+	 * 类型
+	 */
+	private final String status;
+
+	/**
+	 * 描述
+	 */
+	private final String description;
+
+}

+ 49 - 0
hnqz-common/hnqz-common-core/src/main/java/com/qunzhixinxi/hnqz/common/core/exception/CheckedException.java

@@ -0,0 +1,49 @@
+/*
+ *
+ *      Copyright (c) 2018-2025, hnqz All rights reserved.
+ *
+ *  Redistribution and use in source and binary forms, with or without
+ *  modification, are permitted provided that the following conditions are met:
+ *
+ * Redistributions of source code must retain the above copyright notice,
+ *  this list of conditions and the following disclaimer.
+ *  Redistributions in binary form must reproduce the above copyright
+ *  notice, this list of conditions and the following disclaimer in the
+ *  documentation and/or other materials provided with the distribution.
+ *  Neither the name of the pig4cloud.com developer nor the names of its
+ *  contributors may be used to endorse or promote products derived from
+ *  this software without specific prior written permission.
+ *  Author: hnqz
+ *
+ */
+
+package com.qunzhixinxi.hnqz.common.core.exception;
+
+import lombok.NoArgsConstructor;
+
+/**
+ * @author hnqz
+ * @date 😴2018年06月22日16:21:57
+ */
+@NoArgsConstructor
+public class CheckedException extends RuntimeException {
+
+	private static final long serialVersionUID = 1L;
+
+	public CheckedException(String message) {
+		super(message);
+	}
+
+	public CheckedException(Throwable cause) {
+		super(cause);
+	}
+
+	public CheckedException(String message, Throwable cause) {
+		super(message, cause);
+	}
+
+	public CheckedException(String message, Throwable cause, boolean enableSuppression, boolean writableStackTrace) {
+		super(message, cause, enableSuppression, writableStackTrace);
+	}
+
+}

+ 37 - 0
hnqz-common/hnqz-common-core/src/main/java/com/qunzhixinxi/hnqz/common/core/exception/ValidateCodeException.java

@@ -0,0 +1,37 @@
+/*
+ *
+ *      Copyright (c) 2018-2025, hnqz All rights reserved.
+ *
+ *  Redistribution and use in source and binary forms, with or without
+ *  modification, are permitted provided that the following conditions are met:
+ *
+ * Redistributions of source code must retain the above copyright notice,
+ *  this list of conditions and the following disclaimer.
+ *  Redistributions in binary form must reproduce the above copyright
+ *  notice, this list of conditions and the following disclaimer in the
+ *  documentation and/or other materials provided with the distribution.
+ *  Neither the name of the pig4cloud.com developer nor the names of its
+ *  contributors may be used to endorse or promote products derived from
+ *  this software without specific prior written permission.
+ *  Author: hnqz
+ *
+ */
+
+package com.qunzhixinxi.hnqz.common.core.exception;
+
+/**
+ * @author hnqz
+ * @date 2018年06月22日16:22:15
+ */
+public class ValidateCodeException extends RuntimeException {
+
+	private static final long serialVersionUID = -7285211528095468156L;
+
+	public ValidateCodeException() {
+	}
+
+	public ValidateCodeException(String msg) {
+		super(msg);
+	}
+
+}

+ 52 - 0
hnqz-common/hnqz-common-core/src/main/java/com/qunzhixinxi/hnqz/common/core/jackson/HnqzJavaTimeModule.java

@@ -0,0 +1,52 @@
+package com.qunzhixinxi.hnqz.common.core.jackson;
+
+import cn.hutool.core.date.DatePattern;
+import com.fasterxml.jackson.databind.module.SimpleModule;
+import com.fasterxml.jackson.datatype.jsr310.PackageVersion;
+import com.fasterxml.jackson.datatype.jsr310.deser.LocalDateDeserializer;
+import com.fasterxml.jackson.datatype.jsr310.deser.LocalDateTimeDeserializer;
+import com.fasterxml.jackson.datatype.jsr310.deser.LocalTimeDeserializer;
+import com.fasterxml.jackson.datatype.jsr310.ser.LocalDateSerializer;
+import com.fasterxml.jackson.datatype.jsr310.ser.LocalDateTimeSerializer;
+import com.fasterxml.jackson.datatype.jsr310.ser.LocalTimeSerializer;
+
+import java.time.LocalDate;
+import java.time.LocalDateTime;
+import java.time.LocalTime;
+import java.time.format.DateTimeFormatter;
+
+/**
+ * java 8 时间默认序列化
+ *
+ * @author L.cm
+ * @author lishanbu
+ */
+public class HnqzJavaTimeModule extends SimpleModule {
+
+	public HnqzJavaTimeModule() {
+		super(PackageVersion.VERSION);
+
+		// ======================= 时间序列化规则 ===============================
+		// yyyy-MM-dd HH:mm:ss
+		this.addSerializer(LocalDateTime.class,
+				new LocalDateTimeSerializer(DateTimeFormatter.ofPattern(DatePattern.NORM_DATETIME_PATTERN)));
+		// yyyy-MM-dd
+		this.addSerializer(LocalDate.class,
+				new LocalDateSerializer(DateTimeFormatter.ofPattern(DatePattern.NORM_DATE_PATTERN)));
+		// HH:mm:ss
+		this.addSerializer(LocalTime.class,
+				new LocalTimeSerializer(DateTimeFormatter.ofPattern(DatePattern.NORM_TIME_PATTERN)));
+
+		// ======================= 时间反序列化规则 ==============================
+		// yyyy-MM-dd HH:mm:ss
+		this.addDeserializer(LocalDateTime.class,
+				new LocalDateTimeDeserializer(DateTimeFormatter.ofPattern(DatePattern.NORM_DATETIME_PATTERN)));
+		// yyyy-MM-dd
+		this.addDeserializer(LocalDate.class,
+				new LocalDateDeserializer(DateTimeFormatter.ofPattern(DatePattern.NORM_DATE_PATTERN)));
+		// HH:mm:ss
+		this.addDeserializer(LocalTime.class,
+				new LocalTimeDeserializer(DateTimeFormatter.ofPattern(DatePattern.NORM_TIME_PATTERN)));
+	}
+
+}

+ 60 - 0
hnqz-common/hnqz-common-core/src/main/java/com/qunzhixinxi/hnqz/common/core/sensitive/Sensitive.java

@@ -0,0 +1,60 @@
+/*
+ *    Copyright (c) 2018-2025, hnqz All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the following disclaimer.
+ * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * Neither the name of the pig4cloud.com developer nor the names of its
+ * contributors may be used to endorse or promote products derived from
+ * this software without specific prior written permission.
+ * Author: hnqz
+ */
+
+package com.qunzhixinxi.hnqz.common.core.sensitive;
+
+import com.fasterxml.jackson.annotation.JacksonAnnotationsInside;
+import com.fasterxml.jackson.databind.annotation.JsonSerialize;
+
+import java.lang.annotation.ElementType;
+import java.lang.annotation.Retention;
+import java.lang.annotation.RetentionPolicy;
+import java.lang.annotation.Target;
+
+/**
+ * 对象脱敏注解
+ *
+ * @author mayee
+ * @version v1.0
+ **/
+@Retention(RetentionPolicy.RUNTIME)
+@Target(ElementType.FIELD)
+@JacksonAnnotationsInside
+@JsonSerialize(using = SensitiveSerialize.class)
+public @interface Sensitive {
+
+	/**
+	 * 脱敏数据类型, 非Customer时, 将忽略 refixNoMaskLen 和 suffixNoMaskLen 和 maskStr
+	 */
+	SensitiveTypeEnum type() default SensitiveTypeEnum.CUSTOMER;
+
+	/**
+	 * 前置不需要打码的长度
+	 */
+	int prefixNoMaskLen() default 0;
+
+	/**
+	 * 后置不需要打码的长度
+	 */
+	int suffixNoMaskLen() default 0;
+
+	/**
+	 * 用什么打码
+	 */
+	String maskStr() default "*";
+
+}

+ 109 - 0
hnqz-common/hnqz-common-core/src/main/java/com/qunzhixinxi/hnqz/common/core/sensitive/SensitiveSerialize.java

@@ -0,0 +1,109 @@
+/*
+ *    Copyright (c) 2018-2025, hnqz All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the following disclaimer.
+ * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * Neither the name of the pig4cloud.com developer nor the names of its
+ * contributors may be used to endorse or promote products derived from
+ * this software without specific prior written permission.
+ * Author: hnqz
+ */
+
+package com.qunzhixinxi.hnqz.common.core.sensitive;
+
+import com.fasterxml.jackson.core.JsonGenerator;
+import com.fasterxml.jackson.databind.BeanProperty;
+import com.fasterxml.jackson.databind.JsonMappingException;
+import com.fasterxml.jackson.databind.JsonSerializer;
+import com.fasterxml.jackson.databind.SerializerProvider;
+import com.fasterxml.jackson.databind.ser.ContextualSerializer;
+import com.qunzhixinxi.hnqz.common.core.util.DesensitizedUtils;
+import lombok.AllArgsConstructor;
+import lombok.NoArgsConstructor;
+
+import java.io.IOException;
+import java.util.Objects;
+
+/**
+ * @author hnqz
+ * @date 2019-08-13
+ * <p>
+ * 脱敏序列化
+ */
+@NoArgsConstructor
+@AllArgsConstructor
+public class SensitiveSerialize extends JsonSerializer<String> implements ContextualSerializer {
+
+	private SensitiveTypeEnum type;
+
+	private Integer prefixNoMaskLen;
+
+	private Integer suffixNoMaskLen;
+
+	private String maskStr;
+
+	@Override
+	public void serialize(final String origin, final JsonGenerator jsonGenerator,
+			final SerializerProvider serializerProvider) throws IOException {
+		switch (type) {
+		case CHINESE_NAME:
+			jsonGenerator.writeString(DesensitizedUtils.chineseName(origin));
+			break;
+		case ID_CARD:
+			jsonGenerator.writeString(DesensitizedUtils.idCardNum(origin));
+			break;
+		case FIXED_PHONE:
+			jsonGenerator.writeString(DesensitizedUtils.fixedPhone(origin));
+			break;
+		case MOBILE_PHONE:
+			jsonGenerator.writeString(DesensitizedUtils.mobilePhone(origin));
+			break;
+		case ADDRESS:
+			jsonGenerator.writeString(DesensitizedUtils.address(origin));
+			break;
+		case EMAIL:
+			jsonGenerator.writeString(DesensitizedUtils.email(origin));
+			break;
+		case BANK_CARD:
+			jsonGenerator.writeString(DesensitizedUtils.bankCard(origin));
+			break;
+		case PASSWORD:
+			jsonGenerator.writeString(DesensitizedUtils.password(origin));
+			break;
+		case KEY:
+			jsonGenerator.writeString(DesensitizedUtils.key(origin));
+			break;
+		case CUSTOMER:
+			jsonGenerator.writeString(DesensitizedUtils.desValue(origin, prefixNoMaskLen, suffixNoMaskLen, maskStr));
+			break;
+		default:
+			throw new IllegalArgumentException("Unknow sensitive type enum " + type);
+		}
+	}
+
+	@Override
+	public JsonSerializer<?> createContextual(final SerializerProvider serializerProvider,
+			final BeanProperty beanProperty) throws JsonMappingException {
+		if (beanProperty != null) {
+			if (Objects.equals(beanProperty.getType().getRawClass(), String.class)) {
+				Sensitive sensitive = beanProperty.getAnnotation(Sensitive.class);
+				if (sensitive == null) {
+					sensitive = beanProperty.getContextAnnotation(Sensitive.class);
+				}
+				if (sensitive != null) {
+					return new SensitiveSerialize(sensitive.type(), sensitive.prefixNoMaskLen(),
+							sensitive.suffixNoMaskLen(), sensitive.maskStr());
+				}
+			}
+			return serializerProvider.findValueSerializer(beanProperty.getType(), beanProperty);
+		}
+		return serializerProvider.findNullValueSerializer(null);
+	}
+
+}

+ 69 - 0
hnqz-common/hnqz-common-core/src/main/java/com/qunzhixinxi/hnqz/common/core/sensitive/SensitiveTypeEnum.java

@@ -0,0 +1,69 @@
+/*
+ *    Copyright (c) 2018-2025, hnqz All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the following disclaimer.
+ * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * Neither the name of the pig4cloud.com developer nor the names of its
+ * contributors may be used to endorse or promote products derived from
+ * this software without specific prior written permission.
+ * Author: hnqz
+ */
+
+package com.qunzhixinxi.hnqz.common.core.sensitive;
+
+/**
+ * 敏感信息枚举类
+ *
+ * @author mayee
+ * @version v1.0
+ **/
+public enum SensitiveTypeEnum {
+
+	/**
+	 * 自定义
+	 */
+	CUSTOMER,
+	/**
+	 * 用户名, 刘*华, 徐*
+	 */
+	CHINESE_NAME,
+	/**
+	 * 身份证号, 110110********1234
+	 */
+	ID_CARD,
+	/**
+	 * 座机号, ****1234
+	 */
+	FIXED_PHONE,
+	/**
+	 * 手机号, 176****1234
+	 */
+	MOBILE_PHONE,
+	/**
+	 * 地址, 北京********
+	 */
+	ADDRESS,
+	/**
+	 * 电子邮件, s*****o@xx.com
+	 */
+	EMAIL,
+	/**
+	 * 银行卡, 622202************1234
+	 */
+	BANK_CARD,
+	/**
+	 * 密码, 永远是 ******, 与长度无关
+	 */
+	PASSWORD,
+	/**
+	 * 密钥, 永远是 ******, 与长度无关
+	 */
+	KEY
+
+}

+ 113 - 0
hnqz-common/hnqz-common-core/src/main/java/com/qunzhixinxi/hnqz/common/core/util/ClassUtils.java

@@ -0,0 +1,113 @@
+/*
+ *
+ *      Copyright (c) 2018-2025, hnqz All rights reserved.
+ *
+ *  Redistribution and use in source and binary forms, with or without
+ *  modification, are permitted provided that the following conditions are met:
+ *
+ * Redistributions of source code must retain the above copyright notice,
+ *  this list of conditions and the following disclaimer.
+ *  Redistributions in binary form must reproduce the above copyright
+ *  notice, this list of conditions and the following disclaimer in the
+ *  documentation and/or other materials provided with the distribution.
+ *  Neither the name of the pig4cloud.com developer nor the names of its
+ *  contributors may be used to endorse or promote products derived from
+ *  this software without specific prior written permission.
+ *  Author: hnqz
+ *
+ */
+
+package com.qunzhixinxi.hnqz.common.core.util;
+
+import lombok.experimental.UtilityClass;
+import org.springframework.core.BridgeMethodResolver;
+import org.springframework.core.DefaultParameterNameDiscoverer;
+import org.springframework.core.MethodParameter;
+import org.springframework.core.ParameterNameDiscoverer;
+import org.springframework.core.annotation.AnnotatedElementUtils;
+import org.springframework.core.annotation.SynthesizingMethodParameter;
+import org.springframework.web.method.HandlerMethod;
+
+import java.lang.annotation.Annotation;
+import java.lang.reflect.Constructor;
+import java.lang.reflect.Method;
+
+/**
+ * 类工具类
+ *
+ * @author L.cm
+ */
+@UtilityClass
+public class ClassUtils extends org.springframework.util.ClassUtils {
+
+	private final ParameterNameDiscoverer PARAMETERNAMEDISCOVERER = new DefaultParameterNameDiscoverer();
+
+	/**
+	 * 获取方法参数信息
+	 * @param constructor 构造器
+	 * @param parameterIndex 参数序号
+	 * @return {MethodParameter}
+	 */
+	public MethodParameter getMethodParameter(Constructor<?> constructor, int parameterIndex) {
+		MethodParameter methodParameter = new SynthesizingMethodParameter(constructor, parameterIndex);
+		methodParameter.initParameterNameDiscovery(PARAMETERNAMEDISCOVERER);
+		return methodParameter;
+	}
+
+	/**
+	 * 获取方法参数信息
+	 * @param method 方法
+	 * @param parameterIndex 参数序号
+	 * @return {MethodParameter}
+	 */
+	public MethodParameter getMethodParameter(Method method, int parameterIndex) {
+		MethodParameter methodParameter = new SynthesizingMethodParameter(method, parameterIndex);
+		methodParameter.initParameterNameDiscovery(PARAMETERNAMEDISCOVERER);
+		return methodParameter;
+	}
+
+	/**
+	 * 获取Annotation
+	 * @param method Method
+	 * @param annotationType 注解类
+	 * @param <A> 泛型标记
+	 * @return {Annotation}
+	 */
+	public <A extends Annotation> A getAnnotation(Method method, Class<A> annotationType) {
+		Class<?> targetClass = method.getDeclaringClass();
+		// The method may be on an interface, but we need attributes from the target
+		// class.
+		// If the target class is null, the method will be unchanged.
+		Method specificMethod = ClassUtils.getMostSpecificMethod(method, targetClass);
+		// If we are dealing with method with generic parameters, find the original
+		// method.
+		specificMethod = BridgeMethodResolver.findBridgedMethod(specificMethod);
+		// 先找方法,再找方法上的类
+		A annotation = AnnotatedElementUtils.findMergedAnnotation(specificMethod, annotationType);
+		;
+		if (null != annotation) {
+			return annotation;
+		}
+		// 获取类上面的Annotation,可能包含组合注解,故采用spring的工具类
+		return AnnotatedElementUtils.findMergedAnnotation(specificMethod.getDeclaringClass(), annotationType);
+	}
+
+	/**
+	 * 获取Annotation
+	 * @param handlerMethod HandlerMethod
+	 * @param annotationType 注解类
+	 * @param <A> 泛型标记
+	 * @return {Annotation}
+	 */
+	public <A extends Annotation> A getAnnotation(HandlerMethod handlerMethod, Class<A> annotationType) {
+		// 先找方法,再找方法上的类
+		A annotation = handlerMethod.getMethodAnnotation(annotationType);
+		if (null != annotation) {
+			return annotation;
+		}
+		// 获取类上面的Annotation,可能包含组合注解,故采用spring的工具类
+		Class<?> beanType = handlerMethod.getBeanType();
+		return AnnotatedElementUtils.findMergedAnnotation(beanType, annotationType);
+	}
+
+}

+ 171 - 0
hnqz-common/hnqz-common-core/src/main/java/com/qunzhixinxi/hnqz/common/core/util/DesensitizedUtils.java

@@ -0,0 +1,171 @@
+/*
+ *    Copyright (c) 2018-2025, hnqz All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the following disclaimer.
+ * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * Neither the name of the pig4cloud.com developer nor the names of its
+ * contributors may be used to endorse or promote products derived from
+ * this software without specific prior written permission.
+ * Author: hnqz
+ */
+
+package com.qunzhixinxi.hnqz.common.core.util;
+
+import cn.hutool.core.util.StrUtil;
+
+/**
+ * 脱敏工具类
+ *
+ * @author mayee
+ * @version v1.0
+ **/
+public class DesensitizedUtils {
+
+	/**
+	 * 对字符串进行脱敏操作
+	 * @param origin 原始字符串
+	 * @param prefixNoMaskLen 左侧需要保留几位明文字段
+	 * @param suffixNoMaskLen 右侧需要保留几位明文字段
+	 * @param maskStr 用于遮罩的字符串, 如'*'
+	 * @return 脱敏后结果
+	 */
+	public static String desValue(String origin, int prefixNoMaskLen, int suffixNoMaskLen, String maskStr) {
+		if (origin == null) {
+			return null;
+		}
+
+		StringBuilder sb = new StringBuilder();
+		for (int i = 0, n = origin.length(); i < n; i++) {
+			if (i < prefixNoMaskLen) {
+				sb.append(origin.charAt(i));
+				continue;
+			}
+			if (i > (n - suffixNoMaskLen - 1)) {
+				sb.append(origin.charAt(i));
+				continue;
+			}
+			sb.append(maskStr);
+		}
+		return sb.toString();
+	}
+
+	/**
+	 * 【中文姓名】只显示最后一个汉字,其他隐藏为星号,比如:**梦
+	 * @param fullName 姓名
+	 * @return 结果
+	 */
+	public static String chineseName(String fullName) {
+		if (fullName == null) {
+			return null;
+		}
+		return desValue(fullName, 0, 1, "*");
+	}
+
+	/**
+	 * 【身份证号】显示前六位, 四位,其他隐藏。共计18位或者15位,比如:340304*******1234
+	 * @param id 身份证号码
+	 * @return 结果
+	 */
+	public static String idCardNum(String id) {
+		return desValue(id, 6, 4, "*");
+	}
+
+	/**
+	 * 【固定电话】后四位,其他隐藏,比如 ****1234
+	 * @param num 固定电话
+	 * @return 结果
+	 */
+	public static String fixedPhone(String num) {
+		return desValue(num, 0, 4, "*");
+	}
+
+	/**
+	 * 【手机号码】前三位,后四位,其他隐藏,比如135****6810
+	 * @param num 手机号码
+	 * @return 结果
+	 */
+	public static String mobilePhone(String num) {
+		return desValue(num, 3, 4, "*");
+	}
+
+	/**
+	 * 【地址】只显示到地区,不显示详细地址,比如:北京市海淀区****
+	 * @param address 地址
+	 * @return 结果
+	 */
+	public static String address(String address) {
+		return desValue(address, 6, 0, "*");
+	}
+
+	/**
+	 * 【电子邮箱 邮箱前缀仅显示第一个字母,前缀其他隐藏,用星号代替,@及后面的地址显示,比如:d**@126.com
+	 * @param email 电子邮箱
+	 * @return 结果
+	 */
+	public static String email(String email) {
+		if (email == null) {
+			return null;
+		}
+		int index = StrUtil.indexOf(email, '@');
+		if (index <= 1) {
+			return email;
+		}
+		String preEmail = desValue(email.substring(0, index), 1, 0, "*");
+		return preEmail + email.substring(index);
+
+	}
+
+	/**
+	 * 【银行卡号】前六位,后四位,其他用星号隐藏每位1个星号,比如:622260**********1234
+	 * @param cardNum 银行卡号
+	 * @return 结果
+	 */
+	public static String bankCard(String cardNum) {
+		return desValue(cardNum, 6, 4, "*");
+	}
+
+	/**
+	 * 【密码】密码的全部字符都用*代替,比如:******
+	 * @param password 密码
+	 * @return 结果
+	 */
+	public static String password(String password) {
+		if (password == null) {
+			return null;
+		}
+		return "******";
+	}
+
+	/**
+	 * 【密钥】密钥除了最后三位,全部都用*代替,比如:***xdS 脱敏后长度为6,如果明文长度不足三位,则按实际长度显示,剩余位置补*
+	 * @param key 密钥
+	 * @return 结果
+	 */
+	public static String key(String key) {
+		if (key == null) {
+			return null;
+		}
+		int viewLength = 6;
+		StringBuilder tmpKey = new StringBuilder(desValue(key, 0, 3, "*"));
+		if (tmpKey.length() > viewLength) {
+			return tmpKey.substring(tmpKey.length() - viewLength);
+		}
+		else if (tmpKey.length() < viewLength) {
+			int buffLength = viewLength - tmpKey.length();
+			for (int i = 0; i < buffLength; i++) {
+				tmpKey.insert(0, "*");
+			}
+			return tmpKey.toString();
+		}
+		else {
+			return tmpKey.toString();
+		}
+	}
+
+}

+ 97 - 0
hnqz-common/hnqz-common-core/src/main/java/com/qunzhixinxi/hnqz/common/core/util/R.java

@@ -0,0 +1,97 @@
+/*
+ *
+ *      Copyright (c) 2018-2025, hnqz All rights reserved.
+ *
+ *  Redistribution and use in source and binary forms, with or without
+ *  modification, are permitted provided that the following conditions are met:
+ *
+ * Redistributions of source code must retain the above copyright notice,
+ *  this list of conditions and the following disclaimer.
+ *  Redistributions in binary form must reproduce the above copyright
+ *  notice, this list of conditions and the following disclaimer in the
+ *  documentation and/or other materials provided with the distribution.
+ *  Neither the name of the pig4cloud.com developer nor the names of its
+ *  contributors may be used to endorse or promote products derived from
+ *  this software without specific prior written permission.
+ *  Author: hnqz
+ *
+ */
+
+package com.qunzhixinxi.hnqz.common.core.util;
+
+import com.qunzhixinxi.hnqz.common.core.constant.CommonConstants;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.*;
+import lombok.experimental.Accessors;
+
+import java.io.Serializable;
+
+/**
+ * 响应信息主体
+ *
+ * @param <T>
+ * @author hnqz
+ */
+@Builder
+@ToString
+@NoArgsConstructor
+@AllArgsConstructor
+@Accessors(chain = true)
+@ApiModel(value = "响应信息主体")
+public class R<T> implements Serializable {
+
+	private static final long serialVersionUID = 1L;
+
+	@Getter
+	@Setter
+	@ApiModelProperty(value = "返回标记:成功标记=0,失败标记=1")
+	private int code;
+
+	@Getter
+	@Setter
+	@ApiModelProperty(value = "返回信息")
+	private String msg;
+
+	@Getter
+	@Setter
+	@ApiModelProperty(value = "数据")
+	private T data;
+
+	public static <T> R<T> ok() {
+		return restResult(null, CommonConstants.SUCCESS, null);
+	}
+
+	public static <T> R<T> ok(T data) {
+		return restResult(data, CommonConstants.SUCCESS, null);
+	}
+
+	public static <T> R<T> ok(T data, String msg) {
+		return restResult(data, CommonConstants.SUCCESS, msg);
+	}
+
+	public static <T> R<T> failed() {
+		return restResult(null, CommonConstants.FAIL, null);
+	}
+
+	public static <T> R<T> failed(String msg) {
+		return restResult(null, CommonConstants.FAIL, msg);
+	}
+
+	public static <T> R<T> failed(T data) {
+		return restResult(data, CommonConstants.FAIL, null);
+	}
+
+	public static <T> R<T> failed(T data, String msg) {
+		return restResult(data, CommonConstants.FAIL, msg);
+	}
+
+	private static <T> R<T> restResult(T data, int code, String msg) {
+		R<T> apiResult = new R<>();
+		apiResult.setCode(code);
+		apiResult.setData(data);
+		apiResult.setMsg(msg);
+		return apiResult;
+	}
+
+}

+ 100 - 0
hnqz-common/hnqz-common-core/src/main/java/com/qunzhixinxi/hnqz/common/core/util/SpringContextHolder.java

@@ -0,0 +1,100 @@
+/*
+ *
+ *      Copyright (c) 2018-2025, hnqz All rights reserved.
+ *
+ *  Redistribution and use in source and binary forms, with or without
+ *  modification, are permitted provided that the following conditions are met:
+ *
+ * Redistributions of source code must retain the above copyright notice,
+ *  this list of conditions and the following disclaimer.
+ *  Redistributions in binary form must reproduce the above copyright
+ *  notice, this list of conditions and the following disclaimer in the
+ *  documentation and/or other materials provided with the distribution.
+ *  Neither the name of the pig4cloud.com developer nor the names of its
+ *  contributors may be used to endorse or promote products derived from
+ *  this software without specific prior written permission.
+ *  Author: hnqz
+ *
+ */
+
+package com.qunzhixinxi.hnqz.common.core.util;
+
+import lombok.extern.slf4j.Slf4j;
+import org.springframework.beans.factory.DisposableBean;
+import org.springframework.context.ApplicationContext;
+import org.springframework.context.ApplicationContextAware;
+import org.springframework.context.ApplicationEvent;
+import org.springframework.context.annotation.Lazy;
+import org.springframework.stereotype.Service;
+
+/**
+ * @author hnqz
+ * @date 2018/6/27 Spring 工具类
+ */
+@Slf4j
+@Service
+@Lazy(false)
+public class SpringContextHolder implements ApplicationContextAware, DisposableBean {
+
+	private static ApplicationContext applicationContext = null;
+
+	/**
+	 * 取得存储在静态变量中的ApplicationContext.
+	 */
+	public static ApplicationContext getApplicationContext() {
+		return applicationContext;
+	}
+
+	/**
+	 * 实现ApplicationContextAware接口, 注入Context到静态变量中.
+	 */
+	@Override
+	public void setApplicationContext(ApplicationContext applicationContext) {
+		SpringContextHolder.applicationContext = applicationContext;
+	}
+
+	/**
+	 * 从静态变量applicationContext中取得Bean, 自动转型为所赋值对象的类型.
+	 */
+	@SuppressWarnings("unchecked")
+	public static <T> T getBean(String name) {
+		return (T) applicationContext.getBean(name);
+	}
+
+	/**
+	 * 从静态变量applicationContext中取得Bean, 自动转型为所赋值对象的类型.
+	 */
+	public static <T> T getBean(Class<T> requiredType) {
+		return applicationContext.getBean(requiredType);
+	}
+
+	/**
+	 * 清除SpringContextHolder中的ApplicationContext为Null.
+	 */
+	public static void clearHolder() {
+		if (log.isDebugEnabled()) {
+			log.debug("清除SpringContextHolder中的ApplicationContext:" + applicationContext);
+		}
+		applicationContext = null;
+	}
+
+	/**
+	 * 发布事件
+	 * @param event
+	 */
+	public static void publishEvent(ApplicationEvent event) {
+		if (applicationContext == null) {
+			return;
+		}
+		applicationContext.publishEvent(event);
+	}
+
+	/**
+	 * 实现DisposableBean接口, 在Context关闭时清理静态变量.
+	 */
+	@Override
+	public void destroy() {
+		SpringContextHolder.clearHolder();
+	}
+
+}

+ 252 - 0
hnqz-common/hnqz-common-core/src/main/java/com/qunzhixinxi/hnqz/common/core/util/WebUtils.java

@@ -0,0 +1,252 @@
+/*
+ *
+ *      Copyright (c) 2018-2025, hnqz All rights reserved.
+ *
+ *  Redistribution and use in source and binary forms, with or without
+ *  modification, are permitted provided that the following conditions are met:
+ *
+ * Redistributions of source code must retain the above copyright notice,
+ *  this list of conditions and the following disclaimer.
+ *  Redistributions in binary form must reproduce the above copyright
+ *  notice, this list of conditions and the following disclaimer in the
+ *  documentation and/or other materials provided with the distribution.
+ *  Neither the name of the pig4cloud.com developer nor the names of its
+ *  contributors may be used to endorse or promote products derived from
+ *  this software without specific prior written permission.
+ *  Author: hnqz
+ *
+ */
+
+package com.qunzhixinxi.hnqz.common.core.util;
+
+import cn.hutool.core.codec.Base64;
+import cn.hutool.core.util.StrUtil;
+import cn.hutool.json.JSONUtil;
+import com.qunzhixinxi.hnqz.common.core.exception.CheckedException;
+import lombok.experimental.UtilityClass;
+import lombok.extern.slf4j.Slf4j;
+import org.springframework.http.MediaType;
+import org.springframework.util.Assert;
+import org.springframework.web.bind.annotation.ResponseBody;
+import org.springframework.web.context.request.RequestAttributes;
+import org.springframework.web.context.request.RequestContextHolder;
+import org.springframework.web.context.request.ServletRequestAttributes;
+import org.springframework.web.method.HandlerMethod;
+
+import javax.servlet.http.Cookie;
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+import java.io.IOException;
+import java.io.PrintWriter;
+import java.nio.charset.StandardCharsets;
+import java.util.Optional;
+
+/**
+ * Miscellaneous utilities for web applications.
+ *
+ * @author L.cm
+ */
+@Slf4j
+@UtilityClass
+public class WebUtils extends org.springframework.web.util.WebUtils {
+
+	private final String BASIC_ = "Basic ";
+
+	private final String UNKNOWN = "unknown";
+
+	/**
+	 * 判断是否ajax请求 spring ajax 返回含有 ResponseBody 或者 RestController注解
+	 * @param handlerMethod HandlerMethod
+	 * @return 是否ajax请求
+	 */
+	public boolean isBody(HandlerMethod handlerMethod) {
+		ResponseBody responseBody = ClassUtils.getAnnotation(handlerMethod, ResponseBody.class);
+		return responseBody != null;
+	}
+
+	/**
+	 * 读取cookie
+	 * @param name cookie name
+	 * @return cookie value
+	 */
+	public String getCookieVal(String name) {
+		HttpServletRequest request = WebUtils.getRequest();
+		Assert.notNull(request, "request from RequestContextHolder is null");
+		return getCookieVal(request, name);
+	}
+
+	/**
+	 * 读取cookie
+	 * @param request HttpServletRequest
+	 * @param name cookie name
+	 * @return cookie value
+	 */
+	public String getCookieVal(HttpServletRequest request, String name) {
+		Cookie cookie = getCookie(request, name);
+		return cookie != null ? cookie.getValue() : null;
+	}
+
+	/**
+	 * 清除 某个指定的cookie
+	 * @param response HttpServletResponse
+	 * @param key cookie key
+	 */
+	public void removeCookie(HttpServletResponse response, String key) {
+		setCookie(response, key, null, 0);
+	}
+
+	/**
+	 * 设置cookie
+	 * @param response HttpServletResponse
+	 * @param name cookie name
+	 * @param value cookie value
+	 * @param maxAgeInSeconds maxage
+	 */
+	public void setCookie(HttpServletResponse response, String name, String value, int maxAgeInSeconds) {
+		Cookie cookie = new Cookie(name, value);
+		cookie.setPath("/");
+		cookie.setMaxAge(maxAgeInSeconds);
+		cookie.setHttpOnly(true);
+		response.addCookie(cookie);
+	}
+
+	/**
+	 * 获取 HttpServletRequest
+	 * @return {HttpServletRequest}
+	 */
+	public HttpServletRequest getRequest() {
+		try {
+			RequestAttributes requestAttributes = RequestContextHolder.currentRequestAttributes();
+			return ((ServletRequestAttributes) requestAttributes).getRequest();
+		}
+		catch (IllegalStateException e) {
+			return null;
+		}
+	}
+
+	/**
+	 * 获取 HttpServletResponse
+	 * @return {HttpServletResponse}
+	 */
+	public HttpServletResponse getResponse() {
+		return ((ServletRequestAttributes) RequestContextHolder.getRequestAttributes()).getResponse();
+	}
+
+	/**
+	 * 返回json
+	 * @param response HttpServletResponse
+	 * @param result 结果对象
+	 */
+	public void renderJson(HttpServletResponse response, Object result) {
+		renderJson(response, result, MediaType.APPLICATION_JSON_VALUE);
+	}
+
+	/**
+	 * 返回json
+	 * @param response HttpServletResponse
+	 * @param result 结果对象
+	 * @param contentType contentType
+	 */
+	public void renderJson(HttpServletResponse response, Object result, String contentType) {
+		response.setCharacterEncoding("UTF-8");
+		response.setContentType(contentType);
+		try (PrintWriter out = response.getWriter()) {
+			out.append(JSONUtil.toJsonStr(result));
+		}
+		catch (IOException e) {
+			log.error(e.getMessage(), e);
+		}
+	}
+
+	/**
+	 * 获取ip
+	 * @return {String}
+	 */
+	public String getIP() {
+		return getIP(WebUtils.getRequest());
+	}
+
+	/**
+	 * 获取ip
+	 * @param request HttpServletRequest
+	 * @return {String}
+	 */
+	public String getIP(HttpServletRequest request) {
+		Assert.notNull(request, "HttpServletRequest is null");
+		String ip = request.getHeader("X-Requested-For");
+		if (StrUtil.isBlank(ip) || UNKNOWN.equalsIgnoreCase(ip)) {
+			ip = request.getHeader("X-Forwarded-For");
+		}
+		if (StrUtil.isBlank(ip) || UNKNOWN.equalsIgnoreCase(ip)) {
+			ip = request.getHeader("Proxy-Client-IP");
+		}
+		if (StrUtil.isBlank(ip) || UNKNOWN.equalsIgnoreCase(ip)) {
+			ip = request.getHeader("WL-Proxy-Client-IP");
+		}
+		if (StrUtil.isBlank(ip) || UNKNOWN.equalsIgnoreCase(ip)) {
+			ip = request.getHeader("HTTP_CLIENT_IP");
+		}
+		if (StrUtil.isBlank(ip) || UNKNOWN.equalsIgnoreCase(ip)) {
+			ip = request.getHeader("HTTP_X_FORWARDED_FOR");
+		}
+		if (StrUtil.isBlank(ip) || UNKNOWN.equalsIgnoreCase(ip)) {
+			ip = request.getRemoteAddr();
+		}
+		return StrUtil.isBlank(ip) ? null : ip.split(",")[0];
+	}
+
+	/**
+	 * 解析 client id
+	 * @param header
+	 * @param defVal
+	 * @return 如果解析失败返回默认值
+	 */
+	public String extractClientId(String header, final String defVal) {
+
+		if (header == null || !header.startsWith(BASIC_)) {
+			log.debug("请求头中client信息为空: {}", header);
+			return defVal;
+		}
+		byte[] base64Token = header.substring(6).getBytes(StandardCharsets.UTF_8);
+		byte[] decoded;
+		try {
+			decoded = Base64.decode(base64Token);
+		}
+		catch (IllegalArgumentException e) {
+			log.debug("Failed to decode basic authentication token: {}", header);
+			return defVal;
+		}
+
+		String token = new String(decoded, StandardCharsets.UTF_8);
+
+		int delim = token.indexOf(":");
+
+		if (delim == -1) {
+			log.debug("Invalid basic authentication token: {}", header);
+			return defVal;
+		}
+		return token.substring(0, delim);
+	}
+
+	/**
+	 * 从请求头中解析 client id
+	 * @param header
+	 * @return
+	 */
+	public Optional<String> extractClientId(String header) {
+		return Optional.ofNullable(extractClientId(header, null));
+	}
+
+	/**
+	 * 从request 获取CLIENT_ID
+	 * @return
+	 */
+	public String getClientId(String header) {
+		String clientId = extractClientId(header, null);
+		if (clientId == null) {
+			throw new CheckedException("Invalid basic authentication token");
+		}
+		return clientId;
+	}
+
+}

+ 5 - 0
hnqz-common/hnqz-common-core/src/main/resources/META-INF/spring.factories

@@ -0,0 +1,5 @@
+org.springframework.boot.autoconfigure.EnableAutoConfiguration=\
+  com.qunzhixinxi.hnqz.common.core.config.JacksonConfig,\
+  com.qunzhixinxi.hnqz.common.core.config.MessageSourceConfig,\
+  com.qunzhixinxi.hnqz.common.core.config.RestTemplateConfig,\
+  com.qunzhixinxi.hnqz.common.core.util.SpringContextHolder

+ 20 - 0
hnqz-common/hnqz-common-core/src/main/resources/banner.txt

@@ -0,0 +1,20 @@
+${AnsiColor.BRIGHT_YELLOW}
+
+
+,-.----.
+\    /  \        ,---,
+;   :    \      /_ ./|
+|   | .\ :,---, |  ' :
+.   : |: /___/ \.  : |
+|   |  \ :.  \  \ ,' '
+|   : .  / \  ;  `  ,'
+;   | |  \  \  \    '
+|   | ;\  \  '  \   |
+:   ' | \.'   \  ;  ;
+:   : :-'      :  \  \
+|   |.'         \  ' ;
+`---'            `--`
+
+
+
+

+ 0 - 0
hnqz-common/hnqz-common-core/src/main/resources/i18n/messages_zh_CN.properties


+ 175 - 0
hnqz-common/hnqz-common-data/hnqz-common-data.iml

@@ -0,0 +1,175 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<module org.jetbrains.idea.maven.project.MavenProjectsManager.isMavenModule="true" type="JAVA_MODULE" version="4">
+  <component name="FacetManager">
+    <facet type="Spring" name="Spring">
+      <configuration />
+    </facet>
+  </component>
+  <component name="NewModuleRootManager" LANGUAGE_LEVEL="JDK_1_8">
+    <output url="file://$MODULE_DIR$/target/classes" />
+    <output-test url="file://$MODULE_DIR$/target/test-classes" />
+    <content url="file://$MODULE_DIR$">
+      <sourceFolder url="file://$MODULE_DIR$/src/main/java" isTestSource="false" />
+      <sourceFolder url="file://$MODULE_DIR$/src/main/resources" type="java-resource" />
+      <excludeFolder url="file://$MODULE_DIR$/target" />
+    </content>
+    <orderEntry type="inheritedJdk" />
+    <orderEntry type="sourceFolder" forTests="false" />
+    <orderEntry type="module" module-name="hnqz-common-core" />
+    <orderEntry type="library" name="Maven: cn.hutool:hutool-all:5.3.7" level="project" />
+    <orderEntry type="library" name="Maven: javax.servlet:javax.servlet-api:4.0.1" level="project" />
+    <orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-starter-validation:2.3.1.RELEASE" level="project" />
+    <orderEntry type="library" name="Maven: org.glassfish:jakarta.el:3.0.3" level="project" />
+    <orderEntry type="library" name="Maven: org.hibernate.validator:hibernate-validator:6.1.5.Final" level="project" />
+    <orderEntry type="library" name="Maven: jakarta.validation:jakarta.validation-api:2.0.2" level="project" />
+    <orderEntry type="library" name="Maven: org.jboss.logging:jboss-logging:3.4.1.Final" level="project" />
+    <orderEntry type="library" name="Maven: com.fasterxml:classmate:1.5.1" level="project" />
+    <orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-starter-json:2.3.1.RELEASE" level="project" />
+    <orderEntry type="library" name="Maven: org.springframework:spring-web:5.2.7.RELEASE" level="project" />
+    <orderEntry type="library" name="Maven: org.springframework:spring-beans:5.2.7.RELEASE" level="project" />
+    <orderEntry type="library" name="Maven: com.fasterxml.jackson.core:jackson-databind:2.11.0" level="project" />
+    <orderEntry type="library" name="Maven: com.fasterxml.jackson.core:jackson-annotations:2.11.0" level="project" />
+    <orderEntry type="library" name="Maven: com.fasterxml.jackson.core:jackson-core:2.11.0" level="project" />
+    <orderEntry type="library" name="Maven: com.fasterxml.jackson.datatype:jackson-datatype-jdk8:2.11.0" level="project" />
+    <orderEntry type="library" name="Maven: com.fasterxml.jackson.datatype:jackson-datatype-jsr310:2.11.0" level="project" />
+    <orderEntry type="library" name="Maven: com.fasterxml.jackson.module:jackson-module-parameter-names:2.11.0" level="project" />
+    <orderEntry type="library" name="Maven: com.alibaba:transmittable-thread-local:2.11.4" level="project" />
+    <orderEntry type="library" name="Maven: io.swagger:swagger-annotations:1.5.22" level="project" />
+    <orderEntry type="library" name="Maven: com.baomidou:mybatis-plus-extension:3.3.2" level="project" />
+    <orderEntry type="library" name="Maven: com.baomidou:mybatis-plus-core:3.3.2" level="project" />
+    <orderEntry type="library" name="Maven: com.baomidou:mybatis-plus-annotation:3.3.2" level="project" />
+    <orderEntry type="library" name="Maven: com.github.jsqlparser:jsqlparser:3.1" level="project" />
+    <orderEntry type="library" name="Maven: org.mybatis:mybatis:3.5.4" level="project" />
+    <orderEntry type="library" name="Maven: org.mybatis:mybatis-spring:2.0.4" level="project" />
+    <orderEntry type="module" module-name="hnqz-common-security" />
+    <orderEntry type="library" name="Maven: org.springframework.cloud:spring-cloud-starter-oauth2:2.2.2.RELEASE" level="project" />
+    <orderEntry type="library" name="Maven: org.springframework.cloud:spring-cloud-starter-security:2.2.2.RELEASE" level="project" />
+    <orderEntry type="library" name="Maven: org.springframework.cloud:spring-cloud-starter:2.2.3.RELEASE" level="project" />
+    <orderEntry type="library" name="Maven: org.springframework.cloud:spring-cloud-context:2.2.3.RELEASE" level="project" />
+    <orderEntry type="library" name="Maven: org.springframework.security:spring-security-rsa:1.0.9.RELEASE" level="project" />
+    <orderEntry type="library" name="Maven: org.springframework.cloud:spring-cloud-security:2.2.2.RELEASE" level="project" />
+    <orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-starter-security:2.3.1.RELEASE" level="project" />
+    <orderEntry type="library" name="Maven: org.springframework.security.oauth.boot:spring-security-oauth2-autoconfigure:2.1.2.RELEASE" level="project" />
+    <orderEntry type="library" name="Maven: com.sun.xml.bind:jaxb-core:2.3.0.1" level="project" />
+    <orderEntry type="library" name="Maven: com.sun.xml.bind:jaxb-impl:2.3.0.1" level="project" />
+    <orderEntry type="library" name="Maven: org.springframework.security.oauth:spring-security-oauth2:2.3.6.RELEASE" level="project" />
+    <orderEntry type="library" name="Maven: org.springframework:spring-webmvc:5.2.7.RELEASE" level="project" />
+    <orderEntry type="library" name="Maven: org.springframework.security:spring-security-core:5.3.3.RELEASE" level="project" />
+    <orderEntry type="library" name="Maven: org.springframework.security:spring-security-config:5.3.3.RELEASE" level="project" />
+    <orderEntry type="library" name="Maven: org.springframework.security:spring-security-web:5.3.3.RELEASE" level="project" />
+    <orderEntry type="library" name="Maven: commons-codec:commons-codec:1.14" level="project" />
+    <orderEntry type="library" name="Maven: org.codehaus.jackson:jackson-mapper-asl:1.9.13" level="project" />
+    <orderEntry type="library" name="Maven: org.codehaus.jackson:jackson-core-asl:1.9.13" level="project" />
+    <orderEntry type="library" name="Maven: org.springframework.security:spring-security-jwt:1.0.9.RELEASE" level="project" />
+    <orderEntry type="library" name="Maven: org.bouncycastle:bcpkix-jdk15on:1.56" level="project" />
+    <orderEntry type="library" name="Maven: org.bouncycastle:bcprov-jdk15on:1.56" level="project" />
+    <orderEntry type="library" name="Maven: javax.activation:javax.activation-api:1.2.0" level="project" />
+    <orderEntry type="library" name="Maven: javax.xml.bind:jaxb-api:2.3.1" level="project" />
+    <orderEntry type="library" name="Maven: io.github.openfeign:feign-core:10.10.1" level="project" />
+    <orderEntry type="library" name="Maven: org.aspectj:aspectjrt:1.9.5" level="project" />
+    <orderEntry type="module" module-name="hnqz-upms-api" />
+    <orderEntry type="module" module-name="hnqz-common-feign" />
+    <orderEntry type="library" name="Maven: org.springframework.cloud:spring-cloud-starter-openfeign:2.2.3.RELEASE" level="project" />
+    <orderEntry type="library" name="Maven: org.springframework.cloud:spring-cloud-openfeign-core:2.2.3.RELEASE" level="project" />
+    <orderEntry type="library" name="Maven: org.springframework.cloud:spring-cloud-netflix-ribbon:2.2.3.RELEASE" level="project" />
+    <orderEntry type="library" name="Maven: org.springframework.cloud:spring-cloud-netflix-archaius:2.2.3.RELEASE" level="project" />
+    <orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-starter-aop:2.3.1.RELEASE" level="project" />
+    <orderEntry type="library" name="Maven: org.aspectj:aspectjweaver:1.9.5" level="project" />
+    <orderEntry type="library" name="Maven: io.github.openfeign.form:feign-form-spring:3.8.0" level="project" />
+    <orderEntry type="library" name="Maven: io.github.openfeign.form:feign-form:3.8.0" level="project" />
+    <orderEntry type="library" name="Maven: commons-fileupload:commons-fileupload:1.4" level="project" />
+    <orderEntry type="library" name="Maven: commons-io:commons-io:2.2" level="project" />
+    <orderEntry type="library" name="Maven: org.springframework.cloud:spring-cloud-commons:2.2.3.RELEASE" level="project" />
+    <orderEntry type="library" name="Maven: org.springframework.security:spring-security-crypto:5.3.3.RELEASE" level="project" />
+    <orderEntry type="library" name="Maven: io.github.openfeign:feign-slf4j:10.10.1" level="project" />
+    <orderEntry type="library" name="Maven: io.github.openfeign:feign-hystrix:10.10.1" level="project" />
+    <orderEntry type="library" name="Maven: com.netflix.archaius:archaius-core:0.7.6" level="project" />
+    <orderEntry type="library" scope="RUNTIME" name="Maven: com.google.code.findbugs:jsr305:3.0.1" level="project" />
+    <orderEntry type="library" scope="RUNTIME" name="Maven: commons-configuration:commons-configuration:1.8" level="project" />
+    <orderEntry type="library" scope="RUNTIME" name="Maven: commons-lang:commons-lang:2.6" level="project" />
+    <orderEntry type="library" scope="RUNTIME" name="Maven: com.google.guava:guava:29.0-android" level="project" />
+    <orderEntry type="library" scope="RUNTIME" name="Maven: com.google.guava:failureaccess:1.0.1" level="project" />
+    <orderEntry type="library" scope="RUNTIME" name="Maven: com.google.guava:listenablefuture:9999.0-empty-to-avoid-conflict-with-guava" level="project" />
+    <orderEntry type="library" scope="RUNTIME" name="Maven: org.checkerframework:checker-compat-qual:2.5.5" level="project" />
+    <orderEntry type="library" scope="RUNTIME" name="Maven: com.google.errorprone:error_prone_annotations:2.3.4" level="project" />
+    <orderEntry type="library" scope="RUNTIME" name="Maven: com.google.j2objc:j2objc-annotations:1.3" level="project" />
+    <orderEntry type="library" name="Maven: com.netflix.hystrix:hystrix-core:1.5.18" level="project" />
+    <orderEntry type="library" name="Maven: io.reactivex:rxjava:1.3.8" level="project" />
+    <orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-starter-data-redis:2.3.1.RELEASE" level="project" />
+    <orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-starter:2.3.1.RELEASE" level="project" />
+    <orderEntry type="library" name="Maven: org.springframework.boot:spring-boot:2.3.1.RELEASE" level="project" />
+    <orderEntry type="library" name="Maven: org.springframework:spring-context:5.2.7.RELEASE" level="project" />
+    <orderEntry type="library" name="Maven: org.springframework:spring-expression:5.2.7.RELEASE" level="project" />
+    <orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-autoconfigure:2.3.1.RELEASE" level="project" />
+    <orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-starter-logging:2.3.1.RELEASE" level="project" />
+    <orderEntry type="library" name="Maven: ch.qos.logback:logback-classic:1.2.3" level="project" />
+    <orderEntry type="library" name="Maven: ch.qos.logback:logback-core:1.2.3" level="project" />
+    <orderEntry type="library" name="Maven: org.apache.logging.log4j:log4j-to-slf4j:2.13.3" level="project" />
+    <orderEntry type="library" name="Maven: org.apache.logging.log4j:log4j-api:2.13.3" level="project" />
+    <orderEntry type="library" name="Maven: org.slf4j:jul-to-slf4j:1.7.30" level="project" />
+    <orderEntry type="library" name="Maven: jakarta.annotation:jakarta.annotation-api:1.3.5" level="project" />
+    <orderEntry type="library" name="Maven: org.yaml:snakeyaml:1.26" level="project" />
+    <orderEntry type="library" name="Maven: org.springframework.data:spring-data-redis:2.3.1.RELEASE" level="project" />
+    <orderEntry type="library" name="Maven: org.springframework.data:spring-data-keyvalue:2.3.1.RELEASE" level="project" />
+    <orderEntry type="library" name="Maven: org.springframework.data:spring-data-commons:2.3.1.RELEASE" level="project" />
+    <orderEntry type="library" name="Maven: org.springframework:spring-tx:5.2.7.RELEASE" level="project" />
+    <orderEntry type="library" name="Maven: org.springframework:spring-oxm:5.2.7.RELEASE" level="project" />
+    <orderEntry type="library" name="Maven: org.springframework:spring-aop:5.2.7.RELEASE" level="project" />
+    <orderEntry type="library" name="Maven: org.springframework:spring-context-support:5.2.7.RELEASE" level="project" />
+    <orderEntry type="library" name="Maven: org.slf4j:slf4j-api:1.7.30" level="project" />
+    <orderEntry type="library" name="Maven: io.lettuce:lettuce-core:5.3.1.RELEASE" level="project" />
+    <orderEntry type="library" name="Maven: io.netty:netty-common:4.1.50.Final" level="project" />
+    <orderEntry type="library" name="Maven: io.netty:netty-handler:4.1.50.Final" level="project" />
+    <orderEntry type="library" name="Maven: io.netty:netty-resolver:4.1.50.Final" level="project" />
+    <orderEntry type="library" name="Maven: io.netty:netty-buffer:4.1.50.Final" level="project" />
+    <orderEntry type="library" name="Maven: io.netty:netty-codec:4.1.50.Final" level="project" />
+    <orderEntry type="library" name="Maven: io.netty:netty-transport:4.1.50.Final" level="project" />
+    <orderEntry type="library" name="Maven: io.projectreactor:reactor-core:3.3.6.RELEASE" level="project" />
+    <orderEntry type="library" name="Maven: org.reactivestreams:reactive-streams:1.0.3" level="project" />
+    <orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-configuration-processor:2.3.1.RELEASE" level="project" />
+    <orderEntry type="library" name="Maven: com.github.ulisesbocchio:jasypt-spring-boot-starter:2.1.1" level="project" />
+    <orderEntry type="library" name="Maven: com.github.ulisesbocchio:jasypt-spring-boot:2.1.1" level="project" />
+    <orderEntry type="library" name="Maven: com.melloware:jasypt:1.9.4" level="project" />
+    <orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-starter-actuator:2.3.1.RELEASE" level="project" />
+    <orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-actuator-autoconfigure:2.3.1.RELEASE" level="project" />
+    <orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-actuator:2.3.1.RELEASE" level="project" />
+    <orderEntry type="library" name="Maven: io.micrometer:micrometer-core:1.5.1" level="project" />
+    <orderEntry type="library" name="Maven: org.hdrhistogram:HdrHistogram:2.1.12" level="project" />
+    <orderEntry type="library" scope="RUNTIME" name="Maven: org.latencyutils:LatencyUtils:2.0.3" level="project" />
+    <orderEntry type="library" name="Maven: de.codecentric:spring-boot-admin-starter-client:2.2.3" level="project" />
+    <orderEntry type="library" name="Maven: de.codecentric:spring-boot-admin-client:2.2.3" level="project" />
+    <orderEntry type="library" scope="PROVIDED" name="Maven: org.projectlombok:lombok:1.18.12" level="project" />
+    <orderEntry type="library" scope="TEST" name="Maven: org.springframework.boot:spring-boot-starter-test:2.3.1.RELEASE" level="project" />
+    <orderEntry type="library" scope="TEST" name="Maven: org.springframework.boot:spring-boot-test:2.3.1.RELEASE" level="project" />
+    <orderEntry type="library" scope="TEST" name="Maven: org.springframework.boot:spring-boot-test-autoconfigure:2.3.1.RELEASE" level="project" />
+    <orderEntry type="library" scope="TEST" name="Maven: com.jayway.jsonpath:json-path:2.4.0" level="project" />
+    <orderEntry type="library" scope="TEST" name="Maven: net.minidev:json-smart:2.3" level="project" />
+    <orderEntry type="library" scope="TEST" name="Maven: net.minidev:accessors-smart:1.2" level="project" />
+    <orderEntry type="library" scope="TEST" name="Maven: org.ow2.asm:asm:5.0.4" level="project" />
+    <orderEntry type="library" scope="TEST" name="Maven: jakarta.xml.bind:jakarta.xml.bind-api:2.3.3" level="project" />
+    <orderEntry type="library" scope="TEST" name="Maven: jakarta.activation:jakarta.activation-api:1.2.2" level="project" />
+    <orderEntry type="library" scope="TEST" name="Maven: org.assertj:assertj-core:3.16.1" level="project" />
+    <orderEntry type="library" scope="TEST" name="Maven: org.hamcrest:hamcrest:2.2" level="project" />
+    <orderEntry type="library" scope="TEST" name="Maven: org.junit.jupiter:junit-jupiter:5.6.2" level="project" />
+    <orderEntry type="library" scope="TEST" name="Maven: org.junit.jupiter:junit-jupiter-api:5.6.2" level="project" />
+    <orderEntry type="library" scope="TEST" name="Maven: org.opentest4j:opentest4j:1.2.0" level="project" />
+    <orderEntry type="library" scope="TEST" name="Maven: org.junit.platform:junit-platform-commons:1.6.2" level="project" />
+    <orderEntry type="library" scope="TEST" name="Maven: org.junit.jupiter:junit-jupiter-params:5.6.2" level="project" />
+    <orderEntry type="library" scope="TEST" name="Maven: org.junit.jupiter:junit-jupiter-engine:5.6.2" level="project" />
+    <orderEntry type="library" scope="TEST" name="Maven: org.junit.vintage:junit-vintage-engine:5.6.2" level="project" />
+    <orderEntry type="library" scope="TEST" name="Maven: org.apiguardian:apiguardian-api:1.1.0" level="project" />
+    <orderEntry type="library" scope="TEST" name="Maven: org.junit.platform:junit-platform-engine:1.6.2" level="project" />
+    <orderEntry type="library" scope="TEST" name="Maven: junit:junit:4.13" level="project" />
+    <orderEntry type="library" scope="TEST" name="Maven: org.mockito:mockito-core:3.3.3" level="project" />
+    <orderEntry type="library" scope="TEST" name="Maven: net.bytebuddy:byte-buddy:1.10.11" level="project" />
+    <orderEntry type="library" scope="TEST" name="Maven: net.bytebuddy:byte-buddy-agent:1.10.11" level="project" />
+    <orderEntry type="library" scope="TEST" name="Maven: org.objenesis:objenesis:2.6" level="project" />
+    <orderEntry type="library" scope="TEST" name="Maven: org.mockito:mockito-junit-jupiter:3.3.3" level="project" />
+    <orderEntry type="library" scope="TEST" name="Maven: org.skyscreamer:jsonassert:1.5.0" level="project" />
+    <orderEntry type="library" scope="TEST" name="Maven: com.vaadin.external.google:android-json:0.0.20131108.vaadin1" level="project" />
+    <orderEntry type="library" name="Maven: org.springframework:spring-core:5.2.7.RELEASE" level="project" />
+    <orderEntry type="library" name="Maven: org.springframework:spring-jcl:5.2.7.RELEASE" level="project" />
+    <orderEntry type="library" scope="TEST" name="Maven: org.springframework:spring-test:5.2.7.RELEASE" level="project" />
+    <orderEntry type="library" scope="TEST" name="Maven: org.xmlunit:xmlunit-core:2.7.0" level="project" />
+  </component>
+</module>

+ 63 - 0
hnqz-common/hnqz-common-data/pom.xml

@@ -0,0 +1,63 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+  ~
+  ~      Copyright (c) 2018-2025, hnqz All rights reserved.
+  ~
+  ~  Redistribution and use in source and binary forms, with or without
+  ~  modification, are permitted provided that the following conditions are met:
+  ~
+  ~ Redistributions of source code must retain the above copyright notice,
+  ~  this list of conditions and the following disclaimer.
+  ~  Redistributions in binary form must reproduce the above copyright
+  ~  notice, this list of conditions and the following disclaimer in the
+  ~  documentation and/or other materials provided with the distribution.
+  ~  Neither the name of the pig4cloud.com developer nor the names of its
+  ~  contributors may be used to endorse or promote products derived from
+  ~  this software without specific prior written permission.
+  ~  Author: hnqz
+  ~
+  -->
+
+<project xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://maven.apache.org/POM/4.0.0"
+		 xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+	<modelVersion>4.0.0</modelVersion>
+	<parent>
+		<groupId>com.qunzhixinxi</groupId>
+		<artifactId>hnqz-common</artifactId>
+		<version>3.9.0</version>
+	</parent>
+
+	<artifactId>hnqz-common-data</artifactId>
+	<packaging>jar</packaging>
+
+	<description>hnqz 数据操作相关</description>
+
+
+	<dependencies>
+		<!--工具类核心包-->
+		<dependency>
+			<groupId>com.qunzhixinxi</groupId>
+			<artifactId>hnqz-common-core</artifactId>
+		</dependency>
+		<!--mybatis plus extension,包含了mybatis plus core-->
+		<dependency>
+			<groupId>com.baomidou</groupId>
+			<artifactId>mybatis-plus-extension</artifactId>
+		</dependency>
+		<!--安全依赖获取上下文信息-->
+		<dependency>
+			<groupId>com.qunzhixinxi</groupId>
+			<artifactId>hnqz-common-security</artifactId>
+		</dependency>
+		<!--feign client-->
+		<dependency>
+			<groupId>com.qunzhixinxi</groupId>
+			<artifactId>hnqz-upms-api</artifactId>
+		</dependency>
+		<!--缓存依赖-->
+		<dependency>
+			<groupId>org.springframework.boot</groupId>
+			<artifactId>spring-boot-starter-data-redis</artifactId>
+		</dependency>
+	</dependencies>
+</project>

+ 277 - 0
hnqz-common/hnqz-common-data/src/main/java/com/qunzhixinxi/hnqz/common/data/cache/DefaultRedisCacheWriter.java

@@ -0,0 +1,277 @@
+/*
+ *    Copyright (c) 2018-2025, hnqz All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the following disclaimer.
+ * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * Neither the name of the pig4cloud.com developer nor the names of its
+ * contributors may be used to endorse or promote products derived from
+ * this software without specific prior written permission.
+ * Author: hnqz
+ */
+
+package com.qunzhixinxi.hnqz.common.data.cache;
+
+import org.springframework.dao.PessimisticLockingFailureException;
+import org.springframework.data.redis.cache.RedisCacheWriter;
+import org.springframework.data.redis.connection.RedisConnection;
+import org.springframework.data.redis.connection.RedisConnectionFactory;
+import org.springframework.data.redis.connection.RedisStringCommands.SetOption;
+import org.springframework.data.redis.core.types.Expiration;
+import org.springframework.lang.Nullable;
+import org.springframework.util.Assert;
+
+import java.nio.charset.StandardCharsets;
+import java.time.Duration;
+import java.util.Collections;
+import java.util.Optional;
+import java.util.concurrent.TimeUnit;
+import java.util.function.Consumer;
+import java.util.function.Function;
+
+/**
+ * {@link RedisCacheWriter} implementation capable of reading/writing binary data from/to
+ * Redis in {@literal standalone} and {@literal cluster} environments. Works upon a given
+ * {@link RedisConnectionFactory} to obtain the actual {@link RedisConnection}. <br />
+ * {@link DefaultRedisCacheWriter} can be used in
+ * {@link RedisCacheWriter#lockingRedisCacheWriter(RedisConnectionFactory) locking} or
+ * {@link RedisCacheWriter#nonLockingRedisCacheWriter(RedisConnectionFactory) non-locking}
+ * mode. While {@literal non-locking} aims for maximum performance it may result in
+ * overlapping, non atomic, command execution for operations spanning multiple Redis
+ * interactions like {@code putIfAbsent}. The {@literal locking} counterpart prevents
+ * command overlap by setting an explicit lock key and checking against presence of this
+ * key which leads to additional requests and potential command wait times.
+ *
+ * @author Christoph Strobl
+ * @author Mark Paluch
+ * @since 2.0
+ */
+class DefaultRedisCacheWriter implements RedisCacheWriter {
+
+	private final RedisConnectionFactory connectionFactory;
+
+	private final Duration sleepTime;
+
+	/**
+	 * @param connectionFactory must not be {@literal null}.
+	 */
+	DefaultRedisCacheWriter(RedisConnectionFactory connectionFactory) {
+		this(connectionFactory, Duration.ZERO);
+	}
+
+	/**
+	 * @param connectionFactory must not be {@literal null}.
+	 * @param sleepTime sleep time between lock request attempts. Must not be
+	 * {@literal null}. Use {@link Duration#ZERO} to disable locking.
+	 */
+	private DefaultRedisCacheWriter(RedisConnectionFactory connectionFactory, Duration sleepTime) {
+
+		Assert.notNull(connectionFactory, "ConnectionFactory must not be null!");
+		Assert.notNull(sleepTime, "SleepTime must not be null!");
+
+		this.connectionFactory = connectionFactory;
+		this.sleepTime = sleepTime;
+	}
+
+	@Override
+	public void put(String name, byte[] key, byte[] value, @Nullable Duration ttl) {
+
+		Assert.notNull(name, "Name must not be null!");
+		Assert.notNull(key, "Key must not be null!");
+		Assert.notNull(value, "Value must not be null!");
+
+		execute(name, connection -> {
+
+			if (shouldExpireWithin(ttl)) {
+				connection.set(key, value, Expiration.from(ttl.toMillis(), TimeUnit.MILLISECONDS), SetOption.upsert());
+			}
+			else {
+				connection.set(key, value);
+			}
+
+			return "OK";
+		});
+	}
+
+	@Override
+	public byte[] get(String name, byte[] key) {
+
+		Assert.notNull(name, "Name must not be null!");
+		Assert.notNull(key, "Key must not be null!");
+
+		return execute(name, connection -> connection.get(key));
+	}
+
+	@Override
+	public byte[] putIfAbsent(String name, byte[] key, byte[] value, @Nullable Duration ttl) {
+
+		Assert.notNull(name, "Name must not be null!");
+		Assert.notNull(key, "Key must not be null!");
+		Assert.notNull(value, "Value must not be null!");
+
+		return execute(name, connection -> {
+
+			if (isLockingCacheWriter()) {
+				doLock(name, connection);
+			}
+
+			try {
+				if (connection.setNX(key, value)) {
+
+					if (shouldExpireWithin(ttl)) {
+						connection.pExpire(key, ttl.toMillis());
+					}
+					return null;
+				}
+
+				return connection.get(key);
+			}
+			finally {
+
+				if (isLockingCacheWriter()) {
+					doUnlock(name, connection);
+				}
+			}
+		});
+	}
+
+	@Override
+	public void remove(String name, byte[] key) {
+
+		Assert.notNull(name, "Name must not be null!");
+		Assert.notNull(key, "Key must not be null!");
+
+		execute(name, connection -> connection.del(key));
+	}
+
+	@Override
+	public void clean(String name, byte[] pattern) {
+
+		Assert.notNull(name, "Name must not be null!");
+		Assert.notNull(pattern, "Pattern must not be null!");
+
+		execute(name, connection -> {
+
+			boolean wasLocked = false;
+
+			try {
+
+				if (isLockingCacheWriter()) {
+					doLock(name, connection);
+					wasLocked = true;
+				}
+
+				byte[][] keys = Optional.ofNullable(connection.keys(pattern)).orElse(Collections.emptySet())
+						.toArray(new byte[0][]);
+
+				if (keys.length > 0) {
+					connection.del(keys);
+				}
+			}
+			finally {
+
+				if (wasLocked && isLockingCacheWriter()) {
+					doUnlock(name, connection);
+				}
+			}
+
+			return "OK";
+		});
+	}
+
+	/**
+	 * Explicitly set a write lock on a cache.
+	 * @param name the name of the cache to lock.
+	 */
+	void lock(String name) {
+		execute(name, connection -> doLock(name, connection));
+	}
+
+	/**
+	 * Explicitly remove a write lock from a cache.
+	 * @param name the name of the cache to unlock.
+	 */
+	void unlock(String name) {
+		executeLockFree(connection -> doUnlock(name, connection));
+	}
+
+	private Boolean doLock(String name, RedisConnection connection) {
+		return connection.setNX(createCacheLockKey(name), new byte[0]);
+	}
+
+	private Long doUnlock(String name, RedisConnection connection) {
+		return connection.del(createCacheLockKey(name));
+	}
+
+	boolean doCheckLock(String name, RedisConnection connection) {
+		return connection.exists(createCacheLockKey(name));
+	}
+
+	/**
+	 * @return {@literal true} if {@link RedisCacheWriter} uses locks.
+	 */
+	private boolean isLockingCacheWriter() {
+		return !sleepTime.isZero() && !sleepTime.isNegative();
+	}
+
+	private <T> T execute(String name, Function<RedisConnection, T> callback) {
+
+		RedisConnection connection = connectionFactory.getConnection();
+		try {
+
+			checkAndPotentiallyWaitUntilUnlocked(name, connection);
+			return callback.apply(connection);
+		}
+		finally {
+			connection.close();
+		}
+	}
+
+	private void executeLockFree(Consumer<RedisConnection> callback) {
+
+		RedisConnection connection = connectionFactory.getConnection();
+
+		try {
+			callback.accept(connection);
+		}
+		finally {
+			connection.close();
+		}
+	}
+
+	private void checkAndPotentiallyWaitUntilUnlocked(String name, RedisConnection connection) {
+
+		if (!isLockingCacheWriter()) {
+			return;
+		}
+
+		try {
+
+			while (doCheckLock(name, connection)) {
+				Thread.sleep(sleepTime.toMillis());
+			}
+		}
+		catch (InterruptedException ex) {
+
+			// Re-interrupt current thread, to allow other participants to react.
+			Thread.currentThread().interrupt();
+
+			throw new PessimisticLockingFailureException(
+					String.format("Interrupted while waiting to unlock cache %s", name), ex);
+		}
+	}
+
+	private static boolean shouldExpireWithin(@Nullable Duration ttl) {
+		return ttl != null && !ttl.isZero() && !ttl.isNegative();
+	}
+
+	private static byte[] createCacheLockKey(String name) {
+		return (name + "~lock").getBytes(StandardCharsets.UTF_8);
+	}
+
+}

+ 88 - 0
hnqz-common/hnqz-common-data/src/main/java/com/qunzhixinxi/hnqz/common/data/cache/RedisAutoCacheManager.java

@@ -0,0 +1,88 @@
+/*
+ *    Copyright (c) 2018-2025, hnqz All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the following disclaimer.
+ * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * Neither the name of the pig4cloud.com developer nor the names of its
+ * contributors may be used to endorse or promote products derived from
+ * this software without specific prior written permission.
+ * Author: hnqz
+ */
+
+package com.qunzhixinxi.hnqz.common.data.cache;
+
+import cn.hutool.core.util.StrUtil;
+import com.qunzhixinxi.hnqz.common.core.constant.CacheConstants;
+import com.qunzhixinxi.hnqz.common.data.tenant.TenantContextHolder;
+import lombok.extern.slf4j.Slf4j;
+import org.springframework.boot.convert.DurationStyle;
+import org.springframework.cache.Cache;
+import org.springframework.data.redis.cache.RedisCache;
+import org.springframework.data.redis.cache.RedisCacheConfiguration;
+import org.springframework.data.redis.cache.RedisCacheManager;
+import org.springframework.data.redis.cache.RedisCacheWriter;
+import org.springframework.lang.Nullable;
+
+import java.time.Duration;
+import java.time.temporal.ChronoUnit;
+import java.util.Map;
+
+/**
+ * redis cache 扩展cache name自动化配置
+ *
+ * @author L.cm
+ * @author hnqz
+ * <p>
+ * cachename = xx#ttl
+ */
+@Slf4j
+public class RedisAutoCacheManager extends RedisCacheManager {
+
+	private static final String SPLIT_FLAG = "#";
+
+	private static final int CACHE_LENGTH = 2;
+
+	RedisAutoCacheManager(RedisCacheWriter cacheWriter, RedisCacheConfiguration defaultCacheConfiguration,
+			Map<String, RedisCacheConfiguration> initialCacheConfigurations, boolean allowInFlightCacheCreation) {
+		super(cacheWriter, defaultCacheConfiguration, initialCacheConfigurations, allowInFlightCacheCreation);
+	}
+
+	@Override
+	protected RedisCache createRedisCache(String name, @Nullable RedisCacheConfiguration cacheConfig) {
+		if (StrUtil.isBlank(name) || !name.contains(SPLIT_FLAG)) {
+			return super.createRedisCache(name, cacheConfig);
+		}
+
+		String[] cacheArray = name.split(SPLIT_FLAG);
+		if (cacheArray.length < CACHE_LENGTH) {
+			return super.createRedisCache(name, cacheConfig);
+		}
+
+		if (cacheConfig != null) {
+			Duration duration = DurationStyle.detectAndParse(cacheArray[1], ChronoUnit.SECONDS);
+			cacheConfig = cacheConfig.entryTtl(duration);
+		}
+		return super.createRedisCache(name, cacheConfig);
+	}
+
+	/**
+	 * 从上下文中获取租户ID,重写@Cacheable value 值
+	 * @param name
+	 * @return
+	 */
+	@Override
+	public Cache getCache(String name) {
+		// see https://gitee.wang/pig/hnqz/issues/613
+		if (name.startsWith(CacheConstants.GLOBALLY)) {
+			return super.getCache(name);
+		}
+		return super.getCache(TenantContextHolder.getTenantId() + StrUtil.COLON + name);
+	}
+
+}

+ 115 - 0
hnqz-common/hnqz-common-data/src/main/java/com/qunzhixinxi/hnqz/common/data/cache/RedisCacheAutoConfiguration.java

@@ -0,0 +1,115 @@
+/*
+ *    Copyright (c) 2018-2025, hnqz All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the following disclaimer.
+ * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * Neither the name of the pig4cloud.com developer nor the names of its
+ * contributors may be used to endorse or promote products derived from
+ * this software without specific prior written permission.
+ * Author: hnqz
+ */
+
+package com.qunzhixinxi.hnqz.common.data.cache;
+
+import org.springframework.beans.factory.ObjectProvider;
+import org.springframework.boot.autoconfigure.AutoConfigureAfter;
+import org.springframework.boot.autoconfigure.cache.CacheManagerCustomizers;
+import org.springframework.boot.autoconfigure.cache.CacheProperties;
+import org.springframework.boot.autoconfigure.condition.ConditionalOnBean;
+import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean;
+import org.springframework.boot.autoconfigure.data.redis.RedisAutoConfiguration;
+import org.springframework.boot.context.properties.EnableConfigurationProperties;
+import org.springframework.cache.CacheManager;
+import org.springframework.context.annotation.Bean;
+import org.springframework.context.annotation.Configuration;
+import org.springframework.core.io.ResourceLoader;
+import org.springframework.data.redis.cache.RedisCacheConfiguration;
+import org.springframework.data.redis.cache.RedisCacheManager;
+import org.springframework.data.redis.connection.RedisConnectionFactory;
+import org.springframework.data.redis.serializer.JdkSerializationRedisSerializer;
+import org.springframework.data.redis.serializer.RedisSerializationContext;
+import org.springframework.lang.Nullable;
+
+import java.util.LinkedHashMap;
+import java.util.List;
+import java.util.Map;
+
+/**
+ * 扩展redis-cache支持注解cacheName添加超时时间
+ *
+ * @author L.cm
+ */
+@Configuration
+@AutoConfigureAfter({ RedisAutoConfiguration.class })
+@ConditionalOnBean({ RedisConnectionFactory.class })
+@ConditionalOnMissingBean({ CacheManager.class })
+@EnableConfigurationProperties(CacheProperties.class)
+public class RedisCacheAutoConfiguration {
+
+	private final CacheProperties cacheProperties;
+
+	private final CacheManagerCustomizers customizerInvoker;
+
+	@Nullable
+	private final RedisCacheConfiguration redisCacheConfiguration;
+
+	RedisCacheAutoConfiguration(CacheProperties cacheProperties, CacheManagerCustomizers customizerInvoker,
+			ObjectProvider<RedisCacheConfiguration> redisCacheConfiguration) {
+		this.cacheProperties = cacheProperties;
+		this.customizerInvoker = customizerInvoker;
+		this.redisCacheConfiguration = redisCacheConfiguration.getIfAvailable();
+	}
+
+	@Bean
+	public RedisCacheManager cacheManager(RedisConnectionFactory connectionFactory, ResourceLoader resourceLoader) {
+		DefaultRedisCacheWriter redisCacheWriter = new DefaultRedisCacheWriter(connectionFactory);
+		RedisCacheConfiguration cacheConfiguration = this.determineConfiguration(resourceLoader.getClassLoader());
+		List<String> cacheNames = this.cacheProperties.getCacheNames();
+		Map<String, RedisCacheConfiguration> initialCaches = new LinkedHashMap<>();
+		if (!cacheNames.isEmpty()) {
+			Map<String, RedisCacheConfiguration> cacheConfigMap = new LinkedHashMap<>(cacheNames.size());
+			cacheNames.forEach(it -> cacheConfigMap.put(it, cacheConfiguration));
+			initialCaches.putAll(cacheConfigMap);
+		}
+		RedisAutoCacheManager cacheManager = new RedisAutoCacheManager(redisCacheWriter, cacheConfiguration,
+				initialCaches, true);
+		cacheManager.setTransactionAware(false);
+		return this.customizerInvoker.customize(cacheManager);
+	}
+
+	private RedisCacheConfiguration determineConfiguration(ClassLoader classLoader) {
+		if (this.redisCacheConfiguration != null) {
+			return this.redisCacheConfiguration;
+		}
+		else {
+			CacheProperties.Redis redisProperties = this.cacheProperties.getRedis();
+			RedisCacheConfiguration config = RedisCacheConfiguration.defaultCacheConfig();
+			config = config.serializeValuesWith(RedisSerializationContext.SerializationPair
+					.fromSerializer(new JdkSerializationRedisSerializer(classLoader)));
+			if (redisProperties.getTimeToLive() != null) {
+				config = config.entryTtl(redisProperties.getTimeToLive());
+			}
+
+			if (redisProperties.getKeyPrefix() != null) {
+				config = config.prefixKeysWith(redisProperties.getKeyPrefix());
+			}
+
+			if (!redisProperties.isCacheNullValues()) {
+				config = config.disableCachingNullValues();
+			}
+
+			if (!redisProperties.isUseKeyPrefix()) {
+				config = config.disableKeyPrefix();
+			}
+
+			return config;
+		}
+	}
+
+}

+ 44 - 0
hnqz-common/hnqz-common-data/src/main/java/com/qunzhixinxi/hnqz/common/data/cache/RedisCacheManagerConfig.java

@@ -0,0 +1,44 @@
+/*
+ *    Copyright (c) 2018-2025, hnqz All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the following disclaimer.
+ * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * Neither the name of the pig4cloud.com developer nor the names of its
+ * contributors may be used to endorse or promote products derived from
+ * this software without specific prior written permission.
+ * Author: hnqz
+ */
+
+package com.qunzhixinxi.hnqz.common.data.cache;
+
+import org.springframework.beans.factory.ObjectProvider;
+import org.springframework.boot.autoconfigure.cache.CacheManagerCustomizer;
+import org.springframework.boot.autoconfigure.cache.CacheManagerCustomizers;
+import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean;
+import org.springframework.context.annotation.Bean;
+import org.springframework.context.annotation.Configuration;
+
+import java.util.List;
+
+/**
+ * CacheManagerCustomizers配置
+ *
+ * @author L.cm
+ */
+@Configuration
+@ConditionalOnMissingBean(CacheManagerCustomizers.class)
+public class RedisCacheManagerConfig {
+
+	@Bean
+	public CacheManagerCustomizers cacheManagerCustomizers(
+			ObjectProvider<List<CacheManagerCustomizer<?>>> customizers) {
+		return new CacheManagerCustomizers(customizers.getIfAvailable());
+	}
+
+}

+ 53 - 0
hnqz-common/hnqz-common-data/src/main/java/com/qunzhixinxi/hnqz/common/data/cache/RedisTemplateConfig.java

@@ -0,0 +1,53 @@
+/*
+ *    Copyright (c) 2018-2025, hnqz All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the following disclaimer.
+ * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * Neither the name of the pig4cloud.com developer nor the names of its
+ * contributors may be used to endorse or promote products derived from
+ * this software without specific prior written permission.
+ * Author: hnqz
+ */
+
+package com.qunzhixinxi.hnqz.common.data.cache;
+
+import lombok.AllArgsConstructor;
+import org.springframework.boot.autoconfigure.AutoConfigureBefore;
+import org.springframework.boot.autoconfigure.data.redis.RedisAutoConfiguration;
+import org.springframework.cache.annotation.EnableCaching;
+import org.springframework.context.annotation.Bean;
+import org.springframework.context.annotation.Configuration;
+import org.springframework.data.redis.connection.RedisConnectionFactory;
+import org.springframework.data.redis.core.RedisTemplate;
+import org.springframework.data.redis.serializer.JdkSerializationRedisSerializer;
+import org.springframework.data.redis.serializer.StringRedisSerializer;
+
+/**
+ * RedisTemplate 配置
+ *
+ * @author L.cm
+ */
+@EnableCaching
+@Configuration
+@AllArgsConstructor
+@AutoConfigureBefore(RedisAutoConfiguration.class)
+public class RedisTemplateConfig {
+
+	@Bean
+	public RedisTemplate<String, Object> redisTemplate(RedisConnectionFactory redisConnectionFactory) {
+		RedisTemplate<String, Object> redisTemplate = new RedisTemplate<>();
+		redisTemplate.setKeySerializer(new StringRedisSerializer());
+		redisTemplate.setHashKeySerializer(new StringRedisSerializer());
+		redisTemplate.setValueSerializer(new JdkSerializationRedisSerializer());
+		redisTemplate.setHashValueSerializer(new JdkSerializationRedisSerializer());
+		redisTemplate.setConnectionFactory(redisConnectionFactory);
+		return redisTemplate;
+	}
+
+}

+ 59 - 0
hnqz-common/hnqz-common-data/src/main/java/com/qunzhixinxi/hnqz/common/data/datascope/DataScope.java

@@ -0,0 +1,59 @@
+/*
+ *    Copyright (c) 2018-2025, hnqz All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the following disclaimer.
+ * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * Neither the name of the pig4cloud.com developer nor the names of its
+ * contributors may be used to endorse or promote products derived from
+ * this software without specific prior written permission.
+ * Author: hnqz
+ */
+
+package com.qunzhixinxi.hnqz.common.data.datascope;
+
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.List;
+
+/**
+ * @author hnqz
+ * @date 2018/8/30 数据权限查询参数
+ */
+@Data
+@EqualsAndHashCode(callSuper = true)
+public class DataScope extends HashMap {
+
+	/**
+	 * 限制范围的字段名称
+	 */
+	private String scopeName = "dept_id";
+
+	/**
+	 * 具体的数据范围
+	 */
+	private List<Integer> deptIds = new ArrayList<>();
+
+	/**
+	 * 是否只查询本部门
+	 */
+	private Boolean isOnly = false;
+
+	/**
+	 * 函数名称,默认 SELECT * ;
+	 *
+	 * <ul>
+	 * <li>COUNT(1)</li>
+	 * </ul>
+	 */
+	private DataScopeFuncEnum func = DataScopeFuncEnum.ALL;
+
+}

+ 55 - 0
hnqz-common/hnqz-common-data/src/main/java/com/qunzhixinxi/hnqz/common/data/datascope/DataScopeFuncEnum.java

@@ -0,0 +1,55 @@
+/*
+ *    Copyright (c) 2018-2025, hnqz All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the following disclaimer.
+ * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * Neither the name of the pig4cloud.com developer nor the names of its
+ * contributors may be used to endorse or promote products derived from
+ * this software without specific prior written permission.
+ * Author: hnqz
+ */
+
+package com.qunzhixinxi.hnqz.common.data.datascope;
+
+import lombok.AllArgsConstructor;
+import lombok.Getter;
+
+/**
+ * 数据权限函数类型
+ *
+ * @author hnqz
+ * @date 2020-06-17
+ */
+@Getter
+@AllArgsConstructor
+public enum DataScopeFuncEnum {
+
+	/**
+	 * 查询全部数据 SELECT * FROM (originSql) temp_data_scope WHERE temp_data_scope.dept_id IN
+	 * (1)
+	 */
+	ALL("*", "全部"),
+
+	/**
+	 * 查询函数COUNT SELECT COUNT(1) FROM (originSql) temp_data_scope WHERE
+	 * temp_data_scope.dept_id IN (1)
+	 */
+	COUNT("COUNT(1)", "自定义");
+
+	/**
+	 * 类型
+	 */
+	private final String type;
+
+	/**
+	 * 描述
+	 */
+	private final String description;
+
+}

+ 37 - 0
hnqz-common/hnqz-common-data/src/main/java/com/qunzhixinxi/hnqz/common/data/datascope/DataScopeHandle.java

@@ -0,0 +1,37 @@
+/*
+ *    Copyright (c) 2018-2025, hnqz All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the following disclaimer.
+ * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * Neither the name of the pig4cloud.com developer nor the names of its
+ * contributors may be used to endorse or promote products derived from
+ * this software without specific prior written permission.
+ * Author: hnqz
+ */
+
+package com.qunzhixinxi.hnqz.common.data.datascope;
+
+import java.util.List;
+
+/**
+ * @author hnqz
+ * @date 2019-09-07
+ * <p>
+ * data scope 判断处理器,抽象服务扩展
+ */
+public interface DataScopeHandle {
+
+	/**
+	 * 计算用户数据权限
+	 * @param deptList 部门ID,如果为空表示没有任何数据权限。
+	 * @return 返回true表示无需进行数据过滤处理,返回false表示需要进行数据过滤
+	 */
+	Boolean calcScope(List<Integer> deptList);
+
+}

برخی فایل ها در این مقایسه diff نمایش داده نمی شوند زیرا تعداد فایل ها بسیار زیاد است