Browse Source

初始化

LAPTOP-FO2T5SIU\35838 1 year ago
parent
commit
552ced306a
63 changed files with 7378 additions and 10 deletions
  1. 30 10
      .gitignore
  2. 763 0
      doc/rock_base.sql
  3. 292 0
      doc/rock_settings_v3_get.xml
  4. 122 0
      doc/update.sql
  5. 403 0
      pom.xml
  6. 148 0
      pro-base/pom.xml
  7. 23 0
      pro-base/src/main/java/com/idea/ProApplication.java
  8. 67 0
      pro-base/src/main/java/com/idea/config/DataSourcesMasterConfig.java
  9. 63 0
      pro-base/src/main/java/com/idea/config/DataSourcesSlaveConfig.java
  10. 21 0
      pro-base/src/main/java/com/idea/config/FactoryUtil.java
  11. 38 0
      pro-base/src/main/java/com/idea/config/MybatisInterceptorConfig.java
  12. 58 0
      pro-base/src/main/java/com/idea/config/SqlInterceptor.java
  13. 77 0
      pro-base/src/main/java/com/idea/demo/controller/DemoApplyController.java
  14. 77 0
      pro-base/src/main/java/com/idea/demo/controller/DemoStudentController.java
  15. 30 0
      pro-base/src/main/java/com/idea/demo/mapper/DemoApplyMapper.java
  16. 31 0
      pro-base/src/main/java/com/idea/demo/mapper/DemoStudentMapper.java
  17. 98 0
      pro-base/src/main/java/com/idea/demo/model/DemoApply.java
  18. 811 0
      pro-base/src/main/java/com/idea/demo/model/DemoApplyExample.java
  19. 78 0
      pro-base/src/main/java/com/idea/demo/model/DemoStudent.java
  20. 671 0
      pro-base/src/main/java/com/idea/demo/model/DemoStudentExample.java
  21. 133 0
      pro-base/src/main/java/com/idea/demo/service/DemoApplyService.java
  22. 137 0
      pro-base/src/main/java/com/idea/demo/service/DemoStudentService.java
  23. 37 0
      pro-base/src/main/java/com/idea/kafka/KafkaConsumer.java
  24. 36 0
      pro-base/src/main/java/com/idea/kafka/KafkaProducer.java
  25. 109 0
      pro-base/src/main/java/com/idea/pro/config/ProConfig.java
  26. 59 0
      pro-base/src/main/java/com/idea/pro/config/ProSwagger.java
  27. 54 0
      pro-base/src/main/java/com/idea/pro/controller/PubController.java
  28. 27 0
      pro-base/src/main/java/com/idea/pro/service/SafeRequestInfo.java
  29. 77 0
      pro-base/src/main/java/com/slave/demo/controller/DemoClassController.java
  30. 13 0
      pro-base/src/main/java/com/slave/demo/mapper/DemoClassMapper.java
  31. 63 0
      pro-base/src/main/java/com/slave/demo/model/DemoClass.java
  32. 116 0
      pro-base/src/main/java/com/slave/demo/service/DemoClassService.java
  33. 19 0
      pro-base/src/main/resources/application.yml
  34. 273 0
      pro-base/src/main/resources/mybatis/demo/DemoApplyMapper.xml
  35. 249 0
      pro-base/src/main/resources/mybatis/demo/DemoStudentMapper.xml
  36. 5 0
      pro-base/src/main/resources/slave/demo/DemoClassMapper.xml
  37. 136 0
      pro-main/pom.xml
  38. 27 0
      pro-main/src/main/java/com/idea/MainApplication.java
  39. 23 0
      pro-main/src/main/resources/application-dev.yml
  40. 13 0
      pro-main/src/main/resources/application-prod.yml
  41. 41 0
      pro-main/src/main/resources/application-test.yml
  42. 88 0
      pro-main/src/main/resources/application.yml
  43. 28 0
      pro-main/src/main/resources/banner.txt
  44. 56 0
      pro-main/src/main/resources/logback-spring.xml
  45. 120 0
      pro-main/src/main/resources/processes/ApplyFree.bpmn
  46. 284 0
      pro-main/src/main/resources/processes/ApplyPay.bpmn
  47. 125 0
      pro-search/pom.xml
  48. 23 0
      pro-search/src/main/java/com/idea/SearchApplication.java
  49. 34 0
      pro-search/src/main/java/com/idea/search/controller/EsController.java
  50. 10 0
      pro-search/src/main/java/com/idea/search/dao/EsOpLogMapper.java
  51. 10 0
      pro-search/src/main/java/com/idea/search/dao/EsUserMapper.java
  52. 101 0
      pro-search/src/main/java/com/idea/search/pojo/OpLogRecord.java
  53. 84 0
      pro-search/src/main/java/com/idea/search/pojo/UserRecord.java
  54. 141 0
      pro-search/src/main/java/com/idea/search/service/EsService.java
  55. 34 0
      pro-search/src/main/java/com/idea/search/util/IndexTypeEnum.java
  56. 96 0
      pro-wx/pom.xml
  57. 23 0
      pro-wx/src/main/java/com/idea/pro/wx/WxApplication.java
  58. 46 0
      pro-wx/src/main/java/com/idea/pro/wx/config/WxSwagger.java
  59. 50 0
      pro-wx/src/main/java/com/idea/pro/wx/pojo/LoginRequest.java
  60. 30 0
      pro-wx/src/main/java/com/idea/pro/wx/pojo/ResponseCode.java
  61. 106 0
      pro-wx/src/main/java/com/idea/pro/wx/pojo/UserInfo.java
  62. 94 0
      pro-wx/src/main/java/com/idea/pro/wx/vo/LoginUserInfo.java
  63. 247 0
      pro-wx/src/main/java/com/idea/pro/wx/web/WxAuthController.java

+ 30 - 10
.gitignore

@@ -1,14 +1,34 @@
-# ---> Java
-*.class
+HELP.md
+target/
+gen/
+test/
 
-# Mobile Tools for Java (J2ME)
-.mtj.tmp/
+### STS ###
+.apt_generated
+.classpath
+.factorypath
+.project
+.settings
+.springBeans
+.sts4-cache
 
-# Package Files #
-*.jar
-*.war
-*.ear
+### IntelliJ IDEA ###
+.idea
+.idea/
+.log
+logs/
+*.iws
+*.iml
+*.ipr
 
-# virtual machine crash logs, see http://www.java.com/en/download/help/error_hotspot.xml
-hs_err_pid*
+### Directory ###
+/nbproject/private/
+/nbbuild/
+/dist/
+/nbdist/
+/.nb-gradle/
+build/
 
+### VS Code ###
+.vscode/
+mybatis-generator.xml

+ 763 - 0
doc/rock_base.sql

@@ -0,0 +1,763 @@
+/*
+ Navicat Premium Data Transfer
+
+ Source Server         : 章敏自营服务器2
+ Source Server Type    : MySQL
+ Source Server Version : 50717
+ Source Host           : 139.129.91.91:3306
+ Source Schema         : idea_base
+
+ Target Server Type    : MySQL
+ Target Server Version : 50717
+ File Encoding         : 65001
+
+ Date: 03/07/2022 20:19:09
+*/
+
+SET NAMES utf8mb4;
+SET FOREIGN_KEY_CHECKS = 0;
+
+-- ----------------------------
+-- Table structure for biz_dept
+-- ----------------------------
+DROP TABLE IF EXISTS `biz_dept`;
+CREATE TABLE `biz_dept`  (
+  `id` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL,
+  `dept_name` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
+  `dept_code` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
+  `comment` varchar(200) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
+  `main_id` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
+  `created_at` datetime(0) NULL DEFAULT NULL,
+  `updated_at` datetime(0) NULL DEFAULT NULL,
+  `sys_id` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
+  PRIMARY KEY (`id`) USING BTREE,
+  INDEX `main_id`(`main_id`) USING BTREE,
+  CONSTRAINT `biz_dept_ibfk_2` FOREIGN KEY (`main_id`) REFERENCES `biz_main` (`id`) ON DELETE NO ACTION ON UPDATE NO ACTION
+) ENGINE = InnoDB CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Dynamic;
+
+-- ----------------------------
+-- Table structure for biz_main
+-- ----------------------------
+DROP TABLE IF EXISTS `biz_main`;
+CREATE TABLE `biz_main`  (
+  `id` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL,
+  `pid` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '关联的上一级合作商',
+  `business_name` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '名称',
+  `business_scope` varchar(10) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '经营范围',
+  `address_code` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '址地编码',
+  `address_display` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '址地显示',
+  `address_other` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '址地其他详情',
+  `user_name_default` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '默认登录用户',
+  `legal_person` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '法人',
+  `tax_number` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '税号',
+  `bank_user` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '开户名称',
+  `bank_name` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '开户行',
+  `bank_account` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '银行账号',
+  `receipt_has` varchar(1) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '是否提供发票,0-是,1-否',
+  `receipt_type` varchar(1) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '发票类型,0-增票,1-普票',
+  `receipt_from` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '发票提供单位',
+  `contact_user` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '联系人',
+  `contact_phone` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '联系电话',
+  `contact_no` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '公司电话',
+  `specification` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '特长说明',
+  `dev_ability` text CHARACTER SET utf8 COLLATE utf8_general_ci NULL COMMENT '研发能力',
+  `type` varchar(10) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '类型,字典项',
+  `is_headquarters` varchar(10) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '是否总部',
+  `is_import_export` varchar(10) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '是否进出口',
+  `is_foreign_owned` varchar(10) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '是否外资企业',
+  `registered_category` varchar(10) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '行业分类',
+  `registered_tag` varchar(10) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '注册标识',
+  `registered_capital` varchar(10) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '注册资金',
+  `registered_at` datetime(0) NULL DEFAULT NULL COMMENT '注册时间',
+  `mail` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '邮箱',
+  `mode_code` varchar(20) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '业务模式码',
+  `fixable` varchar(1) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '1' COMMENT '0-不可删除,1-常规',
+  `status` varchar(1) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '0-启用,1-禁用',
+  `is_init` char(1) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '0-未初始化,1-已初始化',
+  `enable_at` datetime(0) NULL DEFAULT NULL COMMENT '启用时间',
+  `disable_at` datetime(0) NULL DEFAULT NULL COMMENT '禁用时间',
+  `created_from` varchar(20) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '0-平台,1-注册',
+  `created_by` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '创建人,平台创建才有创建人',
+  `created_at` datetime(0) NULL DEFAULT NULL,
+  `updated_by` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '操作人',
+  `updated_at` datetime(0) NULL DEFAULT NULL,
+  `sys_id` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
+  PRIMARY KEY (`id`) USING BTREE
+) ENGINE = InnoDB CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Dynamic;
+
+-- ----------------------------
+-- Table structure for biz_user
+-- ----------------------------
+DROP TABLE IF EXISTS `biz_user`;
+CREATE TABLE `biz_user`  (
+  `id` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL,
+  `username` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '登录用户',
+  `password` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '登录密码',
+  `disp_name` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '显示名',
+  `phone` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '手机号',
+  `gender` varchar(1) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '性别,1-男,2-女',
+  `profession` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '职务',
+  `remark` varchar(1024) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '备注说明',
+  `main_name` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
+  `main_id` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
+  `dept_id` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
+  `fixable` varchar(1) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '0-不可删除,1-常规',
+  `is_init` char(1) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '0-未初始化,1-已初始化',
+  `created_by` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
+  `created_at` datetime(0) NULL DEFAULT NULL,
+  `updated_by` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
+  `updated_at` datetime(0) NULL DEFAULT NULL,
+  `sys_id` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
+  PRIMARY KEY (`id`) USING BTREE,
+  INDEX `main_id`(`main_id`) USING BTREE,
+  CONSTRAINT `biz_user_ibfk_1` FOREIGN KEY (`main_id`) REFERENCES `biz_main` (`id`) ON DELETE NO ACTION ON UPDATE NO ACTION
+) ENGINE = InnoDB CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Dynamic;
+
+-- ----------------------------
+-- Table structure for customer_main
+-- ----------------------------
+DROP TABLE IF EXISTS `customer_main`;
+CREATE TABLE `customer_main`  (
+  `id` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL,
+  `cust_name` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '客户名称',
+  `nick_name` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
+  `img_url` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
+  `address_code` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '址地编码',
+  `address_display` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '址地编码显示',
+  `address_other` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '址地其他详情',
+  `tax_number` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '税号',
+  `bank_name` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '开户行',
+  `bank_account` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '银行账号',
+  `contact_user` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '联系人',
+  `contact_phone` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
+  `type` varchar(1) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '类型,0-企业,1-个人',
+  `biz_id` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
+  `created_at` datetime(0) NULL DEFAULT NULL,
+  `updated_at` datetime(0) NULL DEFAULT NULL,
+  PRIMARY KEY (`id`) USING BTREE,
+  INDEX `bizId`(`biz_id`) USING BTREE,
+  CONSTRAINT `customer_main_ibfk_1` FOREIGN KEY (`biz_id`) REFERENCES `biz_main` (`id`) ON DELETE NO ACTION ON UPDATE NO ACTION
+) ENGINE = InnoDB CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Dynamic;
+
+-- ----------------------------
+-- Table structure for frame_agreement
+-- ----------------------------
+DROP TABLE IF EXISTS `frame_agreement`;
+CREATE TABLE `frame_agreement`  (
+  `id` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL,
+  `agree_type` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT 'USER, PLATFORM, THIRD...',
+  `agree_version` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '版本',
+  `agree_content` text CHARACTER SET utf8 COLLATE utf8_general_ci NULL COMMENT '正文',
+  `created_at` datetime(0) NULL DEFAULT NULL,
+  `updated_at` datetime(0) NULL DEFAULT NULL,
+  PRIMARY KEY (`id`) USING BTREE
+) ENGINE = InnoDB CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Dynamic;
+
+-- ----------------------------
+-- Table structure for frame_data
+-- ----------------------------
+DROP TABLE IF EXISTS `frame_data`;
+CREATE TABLE `frame_data`  (
+  `id` varchar(255) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL,
+  `file_name` varchar(255) CHARACTER SET utf8 COLLATE utf8_bin NULL DEFAULT NULL COMMENT '文件名',
+  `file_path` varchar(255) CHARACTER SET utf8 COLLATE utf8_bin NULL DEFAULT NULL COMMENT '文件路径',
+  `file_type` varchar(255) CHARACTER SET utf8 COLLATE utf8_bin NULL DEFAULT NULL COMMENT '文件类型',
+  `file_content_type` varchar(255) CHARACTER SET utf8 COLLATE utf8_bin NULL DEFAULT NULL,
+  `created_at` datetime(0) NULL DEFAULT NULL,
+  PRIMARY KEY (`id`) USING BTREE
+) ENGINE = InnoDB CHARACTER SET = utf8 COLLATE = utf8_bin COMMENT = '文件表存储表' ROW_FORMAT = Dynamic;
+
+-- ----------------------------
+-- Table structure for frame_exclusive_user
+-- ----------------------------
+DROP TABLE IF EXISTS `frame_exclusive_user`;
+CREATE TABLE `frame_exclusive_user`  (
+  `id` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL,
+  `user_id` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '用户ID',
+  `page_table_name` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '页面名称',
+  `table_column_info` text CHARACTER SET utf8 COLLATE utf8_general_ci NULL COMMENT 'table配置',
+  `created_by` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
+  `updated_by` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
+  `created_at` datetime(0) NULL DEFAULT NULL,
+  `updated_at` datetime(0) NULL DEFAULT NULL,
+  PRIMARY KEY (`id`) USING BTREE
+) ENGINE = InnoDB CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '用户专属页面配置' ROW_FORMAT = Dynamic;
+
+-- ----------------------------
+-- Table structure for frame_file
+-- ----------------------------
+DROP TABLE IF EXISTS `frame_file`;
+CREATE TABLE `frame_file`  (
+  `id` varchar(255) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL COMMENT '主键',
+  `file_name` varchar(255) CHARACTER SET utf8 COLLATE utf8_bin NULL DEFAULT NULL COMMENT '图片名字',
+  `create_user_id` varchar(255) CHARACTER SET utf8 COLLATE utf8_bin NULL DEFAULT NULL COMMENT '创建人id',
+  `create_user_name` varchar(255) CHARACTER SET utf8 COLLATE utf8_bin NULL DEFAULT NULL COMMENT '创建人名字',
+  `create_time` datetime(0) NULL DEFAULT NULL COMMENT '创建时间',
+  `update_user_id` varchar(255) CHARACTER SET utf8 COLLATE utf8_bin NULL DEFAULT NULL COMMENT '修改人',
+  `update_user_name` varchar(255) CHARACTER SET utf8 COLLATE utf8_bin NULL DEFAULT NULL COMMENT '修改人名字',
+  `update_time` datetime(0) NULL DEFAULT NULL COMMENT '修改时间',
+  PRIMARY KEY (`id`) USING BTREE
+) ENGINE = InnoDB CHARACTER SET = utf8 COLLATE = utf8_bin COMMENT = '文件信息表' ROW_FORMAT = Dynamic;
+
+-- ----------------------------
+-- Table structure for frame_file_data
+-- ----------------------------
+DROP TABLE IF EXISTS `frame_file_data`;
+CREATE TABLE `frame_file_data`  (
+  `id` varchar(255) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL,
+  `data_id` varchar(255) CHARACTER SET utf8 COLLATE utf8_bin NULL DEFAULT NULL,
+  `file_id` varchar(255) CHARACTER SET utf8 COLLATE utf8_bin NULL DEFAULT '文件id',
+  PRIMARY KEY (`id`) USING BTREE
+) ENGINE = InnoDB CHARACTER SET = utf8 COLLATE = utf8_bin COMMENT = '文件数据外键绑定表' ROW_FORMAT = Dynamic;
+
+-- ----------------------------
+-- Table structure for frame_op_log
+-- ----------------------------
+DROP TABLE IF EXISTS `frame_op_log`;
+CREATE TABLE `frame_op_log`  (
+  `id` varchar(50) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL,
+  `title` varchar(100) CHARACTER SET utf8 COLLATE utf8_bin NULL DEFAULT NULL COMMENT '标题',
+  `method` varchar(255) CHARACTER SET utf8 COLLATE utf8_bin NULL DEFAULT NULL COMMENT '方法',
+  `oper_name` varchar(100) CHARACTER SET utf8 COLLATE utf8_bin NULL DEFAULT NULL COMMENT '操作人',
+  `oper_url` varchar(255) CHARACTER SET utf8 COLLATE utf8_bin NULL DEFAULT NULL COMMENT 'url',
+  `oper_param` varchar(1024) CHARACTER SET utf8 COLLATE utf8_bin NULL DEFAULT NULL COMMENT '参数',
+  `error_msg` varchar(1024) CHARACTER SET utf8 COLLATE utf8_bin NULL DEFAULT NULL COMMENT '错误日志',
+  `oper_time` date NULL DEFAULT NULL COMMENT '操作日期',
+  `oper_at` datetime(0) NULL DEFAULT NULL COMMENT '操作时间',
+  `oper_ip` varchar(100) CHARACTER SET utf8 COLLATE utf8_bin NULL DEFAULT NULL COMMENT 'ip',
+  PRIMARY KEY (`id`) USING BTREE
+) ENGINE = InnoDB CHARACTER SET = utf8 COLLATE = utf8_bin COMMENT = '日志记录表' ROW_FORMAT = Dynamic;
+
+-- ----------------------------
+-- Table structure for frame_permission
+-- ----------------------------
+DROP TABLE IF EXISTS `frame_permission`;
+CREATE TABLE `frame_permission`  (
+  `id` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT 'id',
+  `name` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '权限名称',
+  `descripion` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '权限描述',
+  `url` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '授权链接',
+  `pid` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '父节点id',
+  `perms` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '权限标识',
+  `type` int(11) NULL DEFAULT NULL COMMENT '类型   0:目录   1:菜单   2:按钮',
+  `icon` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '菜单图标',
+  `order_num` int(11) NULL DEFAULT NULL COMMENT '排序',
+  PRIMARY KEY (`id`) USING BTREE
+) ENGINE = InnoDB CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '权限表' ROW_FORMAT = Dynamic;
+
+-- ----------------------------
+-- Table structure for frame_permission_role
+-- ----------------------------
+DROP TABLE IF EXISTS `frame_permission_role`;
+CREATE TABLE `frame_permission_role`  (
+  `id` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL,
+  `role_id` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '角色id',
+  `permission_id` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '权限id',
+  PRIMARY KEY (`id`) USING BTREE
+) ENGINE = InnoDB CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '角色权限中间表' ROW_FORMAT = Dynamic;
+
+-- ----------------------------
+-- Table structure for frame_post
+-- ----------------------------
+DROP TABLE IF EXISTS `frame_post`;
+CREATE TABLE `frame_post`  (
+  `id` varchar(50) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL COMMENT '岗位ID',
+  `group_id` varchar(50) CHARACTER SET utf8 COLLATE utf8_bin NULL DEFAULT NULL COMMENT '集团分公司ID',
+  `post_code` varchar(64) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL COMMENT '岗位编码',
+  `post_name` varchar(50) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL COMMENT '岗位名称',
+  `post_sort` int(11) NOT NULL COMMENT '显示顺序',
+  `status` char(1) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL COMMENT '状态(0正常 1停用)',
+  `created_by` varchar(64) CHARACTER SET utf8 COLLATE utf8_bin NULL DEFAULT '' COMMENT '创建者',
+  `created_at` datetime(0) NULL DEFAULT NULL COMMENT '创建时间',
+  `updated_by` varchar(64) CHARACTER SET utf8 COLLATE utf8_bin NULL DEFAULT '' COMMENT '更新者',
+  `updated_at` datetime(0) NULL DEFAULT NULL COMMENT '更新时间',
+  `remark` varchar(500) CHARACTER SET utf8 COLLATE utf8_bin NULL DEFAULT NULL COMMENT '备注',
+  PRIMARY KEY (`id`) USING BTREE
+) ENGINE = InnoDB CHARACTER SET = utf8 COLLATE = utf8_bin COMMENT = '岗位信息表' ROW_FORMAT = Dynamic;
+
+-- ----------------------------
+-- Table structure for frame_post_user
+-- ----------------------------
+DROP TABLE IF EXISTS `frame_post_user`;
+CREATE TABLE `frame_post_user`  (
+  `user_id` varchar(50) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL COMMENT '用户ID',
+  `post_id` varchar(50) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL COMMENT '岗位ID',
+  PRIMARY KEY (`user_id`, `post_id`) USING BTREE
+) ENGINE = InnoDB CHARACTER SET = utf8 COLLATE = utf8_bin COMMENT = '用户与岗位关联表' ROW_FORMAT = Dynamic;
+
+-- ----------------------------
+-- Table structure for frame_role
+-- ----------------------------
+DROP TABLE IF EXISTS `frame_role`;
+CREATE TABLE `frame_role`  (
+  `id` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT 'id',
+  `name` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '角色名称',
+  `role_key` varchar(100) CHARACTER SET utf8 COLLATE utf8_bin NULL DEFAULT NULL COMMENT '角色权限字符串',
+  `role_sort` int(11) NULL DEFAULT NULL COMMENT '显示顺序',
+  `data_scope` char(1) CHARACTER SET utf8 COLLATE utf8_bin NULL DEFAULT '1' COMMENT '数据范围(1:全部数据权限 2:自定数据权限 3:本部门数据权限 4:本部门及以下数据权限)',
+  `status` char(1) CHARACTER SET utf8 COLLATE utf8_bin NULL DEFAULT NULL COMMENT '角色状态(0正常 1停用)',
+  `checks` text CHARACTER SET utf8 COLLATE utf8_general_ci NULL,
+  `halfChecks` text CHARACTER SET utf8 COLLATE utf8_general_ci NULL,
+  PRIMARY KEY (`id`) USING BTREE
+) ENGINE = InnoDB CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '角色表' ROW_FORMAT = Dynamic;
+
+-- ----------------------------
+-- Table structure for frame_role_data
+-- ----------------------------
+DROP TABLE IF EXISTS `frame_role_data`;
+CREATE TABLE `frame_role_data`  (
+  `id` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL,
+  `role_name` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '数据角色名称',
+  `role_key` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '数据角色关键字,上线后不可变更',
+  `created_at` datetime(0) NULL DEFAULT NULL,
+  `updated_at` datetime(0) NULL DEFAULT NULL,
+  PRIMARY KEY (`id`) USING BTREE
+) ENGINE = InnoDB CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Dynamic;
+
+-- ----------------------------
+-- Table structure for frame_role_dept
+-- ----------------------------
+DROP TABLE IF EXISTS `frame_role_dept`;
+CREATE TABLE `frame_role_dept`  (
+  `role_id` bigint(20) NOT NULL COMMENT '角色ID',
+  `dept_id` bigint(20) NOT NULL COMMENT '部门ID',
+  PRIMARY KEY (`role_id`, `dept_id`) USING BTREE
+) ENGINE = InnoDB CHARACTER SET = utf8 COLLATE = utf8_bin COMMENT = '角色和部门关联表' ROW_FORMAT = Dynamic;
+
+-- ----------------------------
+-- Table structure for frame_role_mobile
+-- ----------------------------
+DROP TABLE IF EXISTS `frame_role_mobile`;
+CREATE TABLE `frame_role_mobile`  (
+  `id` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL,
+  `role_name` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '数据角色名称',
+  `role_key` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '数据角色关键字,逗号分隔',
+  `created_at` datetime(0) NULL DEFAULT NULL,
+  `updated_at` datetime(0) NULL DEFAULT NULL,
+  PRIMARY KEY (`id`) USING BTREE
+) ENGINE = InnoDB CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Dynamic;
+
+-- ----------------------------
+-- Table structure for frame_role_user
+-- ----------------------------
+DROP TABLE IF EXISTS `frame_role_user`;
+CREATE TABLE `frame_role_user`  (
+  `id` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL,
+  `sys_user_id` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
+  `sys_role_id` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '角色id',
+  PRIMARY KEY (`id`) USING BTREE
+) ENGINE = InnoDB CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '用户角色中间表' ROW_FORMAT = Dynamic;
+
+-- ----------------------------
+-- Table structure for frame_user
+-- ----------------------------
+DROP TABLE IF EXISTS `frame_user`;
+CREATE TABLE `frame_user`  (
+  `id` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL,
+  `group_id` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '集团ID',
+  `staff_code` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '员工编号',
+  `department` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '部门ID',
+  `department_code` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '部门编码',
+  `leader` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '上级领导ID',
+  `posts` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '岗位,逗号分隔',
+  `username` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '用户账号',
+  `password` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '用户密码',
+  `truename` varchar(255) CHARACTER SET utf8 COLLATE utf8_bin NULL DEFAULT NULL COMMENT '用户姓名',
+  `gender` varchar(1) CHARACTER SET utf8 COLLATE utf8_bin NULL DEFAULT NULL COMMENT '性别,1-男,2-女',
+  `phone` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '联系电话',
+  `email` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '联系邮箱',
+  `position` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '职位',
+  `flag` varchar(10) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '标识,用于不同系统定义不同内容\r\n本系统中:\r\n0或空-非销售,1-销售人员',
+  `del_flag` char(1) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '删除标志(0代表存在 2代表删除)',
+  `status` varchar(10) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '状态:0-禁用, 1-启用',
+  `data_role` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '权限关键字,暂用于数据权限',
+  `data_role_key` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
+  `mobile_role` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '移动端权限',
+  `mobile_role_key` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
+  `sequence_no` float(11, 0) NULL DEFAULT NULL COMMENT '顺序号',
+  `secret_key` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '密钥关键字',
+  `image_data` text CHARACTER SET utf8 COLLATE utf8_general_ci NULL COMMENT '图片数据',
+  `comment` varchar(255) CHARACTER SET utf8 COLLATE utf8_bin NULL DEFAULT NULL COMMENT '备注',
+  `login_at` datetime(0) NULL DEFAULT NULL COMMENT '最后登录时间',
+  `login_ip` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '最后登录IP',
+  `is_init` char(1) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '0-未初始化,1-已初始化',
+  `createdat` datetime(0) NULL DEFAULT NULL,
+  `updatedat` datetime(0) NULL DEFAULT NULL,
+  PRIMARY KEY (`id`) USING BTREE
+) ENGINE = InnoDB CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '用户表' ROW_FORMAT = Dynamic;
+
+-- ----------------------------
+-- Table structure for frame_user_dept
+-- ----------------------------
+DROP TABLE IF EXISTS `frame_user_dept`;
+CREATE TABLE `frame_user_dept`  (
+  `id` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL,
+  `attr_id` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
+  `user_id` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
+  `dept_id` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
+  `created_at` datetime(0) NULL DEFAULT NULL,
+  PRIMARY KEY (`id`) USING BTREE
+) ENGINE = InnoDB CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Dynamic;
+
+-- ----------------------------
+-- Table structure for ops_server
+-- ----------------------------
+DROP TABLE IF EXISTS `ops_server`;
+CREATE TABLE `ops_server`  (
+  `id` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL,
+  `server_ip` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL,
+  `server_name` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
+  `serial_num` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '特征码',
+  `app_id` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
+  `app_secret` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
+  `status` varchar(10) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '当前状态',
+  `curr_cpu` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
+  `curr_memory` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
+  `last_report_at` datetime(0) NULL DEFAULT NULL COMMENT '最新上报时间',
+  `created_at` datetime(0) NULL DEFAULT NULL,
+  `updated_at` datetime(0) NULL DEFAULT NULL,
+  PRIMARY KEY (`id`) USING BTREE
+) ENGINE = InnoDB CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Dynamic;
+
+-- ----------------------------
+-- Table structure for ops_server_backup
+-- ----------------------------
+DROP TABLE IF EXISTS `ops_server_backup`;
+CREATE TABLE `ops_server_backup`  (
+  `id` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL,
+  `server_id` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL,
+  `serial_num` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
+  `backup_type` varchar(20) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT 'DB-数据库',
+  `file_id` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '备份的文件id',
+  `backup_name` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '备份名',
+  `created_at` datetime(0) NULL DEFAULT NULL,
+  PRIMARY KEY (`id`) USING BTREE
+) ENGINE = InnoDB CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Dynamic;
+
+-- ----------------------------
+-- Table structure for ops_server_record
+-- ----------------------------
+DROP TABLE IF EXISTS `ops_server_record`;
+CREATE TABLE `ops_server_record`  (
+  `id` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL,
+  `server_id` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL,
+  `serial_num` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
+  `cpu` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
+  `memory` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
+  `capacity` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
+  `jvm` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
+  `others` text CHARACTER SET utf8 COLLATE utf8_general_ci NULL,
+  `type` varchar(10) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '记录类型',
+  `created_at` datetime(0) NULL DEFAULT NULL,
+  PRIMARY KEY (`id`) USING BTREE
+) ENGINE = InnoDB CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Dynamic;
+
+-- ----------------------------
+-- Table structure for sys_agreement
+-- ----------------------------
+DROP TABLE IF EXISTS `sys_agreement`;
+CREATE TABLE `sys_agreement`  (
+  `id` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT 'id',
+  `agreement_type` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '类型',
+  `agreement` text CHARACTER SET utf8 COLLATE utf8_general_ci NULL COMMENT '协议',
+  `version` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '版本',
+  `status` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '状态',
+  `created_at` datetime(0) NULL DEFAULT NULL COMMENT '创建时间',
+  `updated_at` datetime(0) NULL DEFAULT NULL COMMENT '修改时间',
+  PRIMARY KEY (`id`) USING BTREE
+) ENGINE = InnoDB CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Dynamic;
+
+-- ----------------------------
+-- Table structure for sys_announce
+-- ----------------------------
+DROP TABLE IF EXISTS `sys_announce`;
+CREATE TABLE `sys_announce`  (
+  `id` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL,
+  `title` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '公告标题',
+  `sub_title` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '公告副标题',
+  `content` text CHARACTER SET utf8 COLLATE utf8_general_ci NULL COMMENT '公告正文',
+  `attachments` text CHARACTER SET utf8 COLLATE utf8_general_ci NULL COMMENT '公告附件',
+  `status` varchar(1) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '0-编辑中,1-发布,2-停止发布,3-过期',
+  `valid_at` datetime(0) NULL DEFAULT NULL COMMENT '生效时间',
+  `user_ids` text CHARACTER SET utf8 COLLATE utf8_general_ci NULL COMMENT '所选用户ID',
+  `dept_ids` text CHARACTER SET utf8 COLLATE utf8_general_ci NULL COMMENT '所选部门ID',
+  `created_at` datetime(0) NULL DEFAULT NULL,
+  `created_by` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
+  `updated_at` datetime(0) NULL DEFAULT NULL,
+  `sys_id` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '系统标识',
+  PRIMARY KEY (`id`) USING BTREE
+) ENGINE = InnoDB CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '通知公告表' ROW_FORMAT = Dynamic;
+
+-- ----------------------------
+-- Table structure for sys_announce_to
+-- ----------------------------
+DROP TABLE IF EXISTS `sys_announce_to`;
+CREATE TABLE `sys_announce_to`  (
+  `id` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL,
+  `announce_id` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '通知ID',
+  `user_id` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '用户ID',
+  `status` varchar(1) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '0-未读,1-已读',
+  `created_at` datetime(0) NULL DEFAULT NULL COMMENT '创建时间',
+  `sys_id` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '系统标识',
+  PRIMARY KEY (`id`) USING BTREE
+) ENGINE = InnoDB CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Dynamic;
+
+-- ----------------------------
+-- Table structure for sys_dept
+-- ----------------------------
+DROP TABLE IF EXISTS `sys_dept`;
+CREATE TABLE `sys_dept`  (
+  `id` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL,
+  `parent_id` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
+  `group_id` varchar(512) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '所属集团分公司',
+  `dept_name` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '部门名称',
+  `dept_code` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '部门编码',
+  `dept_url` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '部门logo',
+  `dept_order` int(11) NULL DEFAULT NULL COMMENT '顺序号',
+  `dept_level` int(11) NULL DEFAULT NULL COMMENT '部门层级',
+  `dept_attr` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '部门属性,字典项,多一类相关类型',
+  `changed_by` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '部门负责人',
+  `created_at` datetime(0) NULL DEFAULT NULL,
+  `updated_at` datetime(0) NULL DEFAULT NULL,
+  `sys_id` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
+  PRIMARY KEY (`id`) USING BTREE
+) ENGINE = InnoDB CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Dynamic;
+
+-- ----------------------------
+-- Table structure for sys_dept_attr
+-- ----------------------------
+DROP TABLE IF EXISTS `sys_dept_attr`;
+CREATE TABLE `sys_dept_attr`  (
+  `id` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL,
+  `attr_name` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
+  `attr_code` varchar(512) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
+  `seq_no` int(11) NULL DEFAULT NULL,
+  `created_at` datetime(0) NULL DEFAULT NULL,
+  `updated_at` datetime(0) NULL DEFAULT NULL,
+  PRIMARY KEY (`id`) USING BTREE
+) ENGINE = InnoDB CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Dynamic;
+
+-- ----------------------------
+-- Table structure for sys_dict
+-- ----------------------------
+DROP TABLE IF EXISTS `sys_dict`;
+CREATE TABLE `sys_dict`  (
+  `id` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL,
+  `dict_name` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '字典名称',
+  `dict_code` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '字典编码,唯一',
+  `dict_value` text CHARACTER SET utf8 COLLATE utf8_general_ci NULL COMMENT '字典值项',
+  `sys_id` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '归属系统id',
+  PRIMARY KEY (`id`) USING BTREE
+) ENGINE = InnoDB CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Dynamic;
+
+-- ----------------------------
+-- Table structure for sys_group
+-- ----------------------------
+DROP TABLE IF EXISTS `sys_group`;
+CREATE TABLE `sys_group`  (
+  `id` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL,
+  `name` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '分公司名',
+  `code` varchar(20) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '识别码',
+  `sequence_no` int(11) NULL DEFAULT NULL COMMENT '顺序号',
+  `comments` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '备注说明',
+  `created_by` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
+  `created_at` datetime(0) NULL DEFAULT NULL,
+  `updated_at` datetime(0) NULL DEFAULT NULL,
+  `sys_id` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
+  PRIMARY KEY (`id`) USING BTREE
+) ENGINE = InnoDB CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '集团管理' ROW_FORMAT = Dynamic;
+
+-- ----------------------------
+-- Table structure for sys_group_user
+-- ----------------------------
+DROP TABLE IF EXISTS `sys_group_user`;
+CREATE TABLE `sys_group_user`  (
+  `id` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL,
+  `group_id` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
+  `user_id` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
+  `created_at` datetime(0) NULL DEFAULT NULL,
+  `sys_id` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
+  PRIMARY KEY (`id`) USING BTREE
+) ENGINE = InnoDB CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Dynamic;
+
+-- ----------------------------
+-- Table structure for sys_holiday
+-- ----------------------------
+DROP TABLE IF EXISTS `sys_holiday`;
+CREATE TABLE `sys_holiday`  (
+  `id` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL,
+  `holiday_name` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
+  `holiday_date` varchar(20) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '假期日期, yyyy-MM-dd格式',
+  `holiday_flag` varchar(1) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '0-节假日, 1-工作日',
+  `group_id` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '集团ID',
+  `created_at` datetime(0) NULL DEFAULT NULL,
+  `updated_at` datetime(0) NULL DEFAULT NULL,
+  PRIMARY KEY (`id`) USING BTREE
+) ENGINE = InnoDB CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Dynamic;
+
+-- ----------------------------
+-- Table structure for sys_home_link
+-- ----------------------------
+DROP TABLE IF EXISTS `sys_home_link`;
+CREATE TABLE `sys_home_link`  (
+  `id` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL,
+  `link_name` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '接链名称',
+  `link_image` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '链接图标',
+  `link_url` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '链接地址',
+  `link_order` varchar(10) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '排序',
+  `link_type` varchar(20) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '链接类型',
+  `sys_id` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
+  `created_at` datetime(0) NULL DEFAULT NULL,
+  `created_by` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
+  `updated_at` datetime(0) NULL DEFAULT NULL,
+  `updated_by` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
+  PRIMARY KEY (`id`) USING BTREE
+) ENGINE = InnoDB CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Dynamic;
+
+-- ----------------------------
+-- Table structure for sys_info
+-- ----------------------------
+DROP TABLE IF EXISTS `sys_info`;
+CREATE TABLE `sys_info`  (
+  `id` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL,
+  `info_type` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '消息类型',
+  `target_id` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '目标ID',
+  `business_key` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '业务Key',
+  `business_status` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '业务状态,0-待处理,1-已处理',
+  `business_op_status` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '流程中得状态,目前特殊的是撤回,需进入其他对应页面',
+  `info_summary` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '消息概括',
+  `info_to` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '消息接收人',
+  `info_status` varchar(10) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '消息状态,0-未读,1-已读',
+  `menu_url` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '关联菜单路由',
+  `read_at` datetime(0) NULL DEFAULT NULL COMMENT '阅读时间',
+  `created_by` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '创建来源',
+  `created_at` datetime(0) NULL DEFAULT NULL COMMENT '创建时间',
+  `deal_at` datetime(0) NULL DEFAULT NULL COMMENT '处理时间',
+  PRIMARY KEY (`id`) USING BTREE
+) ENGINE = InnoDB CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Dynamic;
+
+-- ----------------------------
+-- Table structure for sys_op_log
+-- ----------------------------
+DROP TABLE IF EXISTS `sys_op_log`;
+CREATE TABLE `sys_op_log`  (
+  `id` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL,
+  `referenceId` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '关联表ID',
+  `referenceType` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '关联表EMU, 目前 ‘ENV_SENSOR’ - 是指向传感器表',
+  `comment` text CHARACTER SET utf8 COLLATE utf8_general_ci NULL COMMENT '操作事件记录',
+  `createdAt` datetime(0) NULL DEFAULT NULL COMMENT '创建时间',
+  `operByName` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
+  `operBy` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '操作人',
+  PRIMARY KEY (`id`) USING BTREE
+) ENGINE = InnoDB CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '操作记录表' ROW_FORMAT = Dynamic;
+
+-- ----------------------------
+-- Table structure for sys_param
+-- ----------------------------
+DROP TABLE IF EXISTS `sys_param`;
+CREATE TABLE `sys_param`  (
+  `id` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL,
+  `param_name` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '参数名',
+  `param_code` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '参数码',
+  `param_value` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '参数值',
+  `param_text` text CHARACTER SET utf8 COLLATE utf8_general_ci NULL COMMENT '参数值,大字段',
+  `value_type` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '参数类型:string, date(yyyy-MM-dd), datetime(yyyy-MM-dd hh:mm:ss), number',
+  `sys_id` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '系统码',
+  `created_at` datetime(0) NULL DEFAULT NULL,
+  `updated_at` datetime(0) NULL DEFAULT NULL,
+  PRIMARY KEY (`id`) USING BTREE
+) ENGINE = InnoDB CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Dynamic;
+
+-- ----------------------------
+-- Table structure for sys_zone
+-- ----------------------------
+DROP TABLE IF EXISTS `sys_zone`;
+CREATE TABLE `sys_zone`  (
+  `id` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL,
+  `parent_id` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
+  `zone_name` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '区域名称',
+  `zone_code` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '区域编码',
+  `zone_order` int(11) NULL DEFAULT NULL COMMENT '排序',
+  `zone_level` int(11) NULL DEFAULT NULL COMMENT '层次',
+  `zone_lng` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '经度',
+  `zone_lat` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '纬度',
+  `created_at` datetime(0) NULL DEFAULT NULL COMMENT '创建时间',
+  `updated_at` datetime(0) NULL DEFAULT NULL COMMENT '更新时间',
+  PRIMARY KEY (`id`) USING BTREE
+) ENGINE = InnoDB CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Dynamic;
+
+-- ----------------------------
+-- Table structure for user_account
+-- ----------------------------
+DROP TABLE IF EXISTS `user_account`;
+CREATE TABLE `user_account`  (
+  `id` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT 'ID',
+  `account` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '' COMMENT '账号',
+  `password` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '密码',
+  `avatar_url` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '头像',
+  `city` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '城市',
+  `country` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '国家',
+  `province` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '省份',
+  `gender` varchar(20) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '性别',
+  `language` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '语言',
+  `nick_name` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '昵称',
+  `open_id` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '微信openID',
+  `user_id` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '用户ID',
+  `sys_id` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '系统ID',
+  `created_at` datetime(0) NULL DEFAULT NULL COMMENT '创建时间',
+  PRIMARY KEY (`id`) USING BTREE
+) ENGINE = InnoDB CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '用户账号表' ROW_FORMAT = Dynamic;
+
+-- ----------------------------
+-- Table structure for user_main
+-- ----------------------------
+DROP TABLE IF EXISTS `user_main`;
+CREATE TABLE `user_main`  (
+  `id` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL,
+  `avatar_url` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '头像',
+  `true_name` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '真实姓名',
+  `nick_name` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '昵称',
+  `phone_no` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
+  `gender` varchar(10) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '性别',
+  `age` int(11) NULL DEFAULT NULL COMMENT '年龄',
+  `birthday` date NULL DEFAULT NULL COMMENT '生日',
+  `profession` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '职业',
+  `industry` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '从事行业',
+  `hobby` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '兴趣爱好',
+  `spec` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '特长',
+  `body_height` double NULL DEFAULT NULL COMMENT '身高(cm)',
+  `body_weight` double NULL DEFAULT NULL COMMENT '体重(kg)',
+  `identity_type` varchar(10) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '证件类型',
+  `identity_no` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '证件号',
+  `address_home` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '家庭住址',
+  `address_often` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '常住地',
+  `bill_amount` float NULL DEFAULT NULL COMMENT '消费金额累计',
+  `status` char(1) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '状态',
+  `real_name_status` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '实名状态',
+  `del_flag` char(1) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '删除(0-存在,1-删除)',
+  `user_tag` varchar(20) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '用户标签,针对业务用于各种场景',
+  `image_data` text CHARACTER SET utf8 COLLATE utf8_general_ci NULL COMMENT '图片数据',
+  `sys_id` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '系统ID',
+  `created_at` datetime(0) NULL DEFAULT NULL,
+  `updated_at` datetime(0) NULL DEFAULT NULL,
+  PRIMARY KEY (`id`) USING BTREE
+) ENGINE = InnoDB CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Dynamic;
+
+-- ----------------------------
+-- Table structure for user_relation
+-- ----------------------------
+DROP TABLE IF EXISTS `user_relation`;
+CREATE TABLE `user_relation`  (
+  `id` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL,
+  `user_id` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
+  `user_type` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '用户关联身份类型, CUSTOMER- 客户类型',
+  `reference_id` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '关联类型的对应主表ID',
+  `relation_status` varchar(1) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '0-申请中,1-身份确认,2-身份取消',
+  `apply_info` text CHARACTER SET utf8 COLLATE utf8_general_ci NULL COMMENT '申请的明细,根据申请关联类型而定',
+  `audited_at` datetime(0) NULL DEFAULT NULL COMMENT '审批时间',
+  `created_at` datetime(0) NULL DEFAULT NULL,
+  `updated_at` datetime(0) NULL DEFAULT NULL,
+  PRIMARY KEY (`id`) USING BTREE
+) ENGINE = InnoDB CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Dynamic;
+
+SET FOREIGN_KEY_CHECKS = 1;

+ 292 - 0
doc/rock_settings_v3_get.xml

@@ -0,0 +1,292 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<!--
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements.  See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership.  The ASF licenses this file
+to you 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
+
+    http://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.
+-->
+
+<!--
+ | This is the configuration file for Maven. It can be specified at two levels:
+ |
+ |  1. User Level. This settings.xml file provides configuration for a single user,
+ |                 and is normally provided in ${user.home}/.m2/settings.xml.
+ |
+ |                 NOTE: This location can be overridden with the CLI option:
+ |
+ |                 -s /path/to/user/settings.xml
+ |
+ |  2. Global Level. This settings.xml file provides configuration for all Maven
+ |                 users on a machine (assuming they're all using the same Maven
+ |                 installation). It's normally provided in
+ |                 ${maven.conf}/settings.xml.
+ |
+ |                 NOTE: This location can be overridden with the CLI option:
+ |
+ |                 -gs /path/to/global/settings.xml
+ |
+ | The sections in this sample file are intended to give you a running start at
+ | getting the most out of your Maven installation. Where appropriate, the default
+ | values (values used when the setting is not specified) are provided.
+ |
+ |-->
+<settings xmlns="http://maven.apache.org/SETTINGS/1.0.0"
+          xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+          xsi:schemaLocation="http://maven.apache.org/SETTINGS/1.0.0 http://maven.apache.org/xsd/settings-1.0.0.xsd">
+
+<!-- 配置阿里镜像库 -->
+  <!--localRepository>/Users/liuyingming/maven/apache-maven-3.5.4/repository</localRepository-->
+
+  <!-- localRepository
+   | The path to the local repository maven will use to store artifacts.
+   |
+   | Default: ${user.home}/.m2/repository
+  <localRepository>/path/to/local/repo</localRepository>
+  -->
+
+  <!-- interactiveMode
+   | This will determine whether maven prompts you when it needs input. If set to false,
+   | maven will use a sensible default value, perhaps based on some other setting, for
+   | the parameter in question.
+   |
+   | Default: true
+  <interactiveMode>true</interactiveMode>
+  -->
+
+  <!-- offline
+   | Determines whether maven should attempt to connect to the network when executing a build.
+   | This will have an effect on artifact downloads, artifact deployment, and others.
+   |
+   | Default: false
+  <offline>false</offline>
+  -->
+
+  <!-- pluginGroups
+   | This is a list of additional group identifiers that will be searched when resolving plugins by their prefix, i.e.
+   | when invoking a command line like "mvn prefix:goal". Maven will automatically add the group identifiers
+   | "org.apache.maven.plugins" and "org.codehaus.mojo" if these are not already contained in the list.
+   |-->
+  <pluginGroups>
+    <!-- pluginGroup
+     | Specifies a further group identifier to use for plugin lookup.
+    <pluginGroup>com.your.plugins</pluginGroup>
+    -->
+  </pluginGroups>
+
+  <!-- proxies
+   | This is a list of proxies which can be used on this machine to connect to the network.
+   | Unless otherwise specified (by system property or command-line switch), the first proxy
+   | specification in this list marked as active will be used.
+   |-->
+  <proxies>
+    <!-- proxy
+     | Specification for one proxy, to be used in connecting to the network.
+     |
+    <proxy>
+      <id>optional</id>
+      <active>true</active>
+      <protocol>http</protocol>
+      <username>proxyuser</username>
+      <password>proxypass</password>
+      <host>proxy.host.net</host>
+      <port>80</port>
+      <nonProxyHosts>local.net|some.host.com</nonProxyHosts>
+    </proxy>
+    -->
+  </proxies>
+
+  <!-- servers
+   | This is a list of authentication profiles, keyed by the server-id used within the system.
+   | Authentication profiles can be used whenever maven must make a connection to a remote server.
+   |-->
+  <servers>
+   <!--  server
+     | Specifies the authentication information to use when connecting to a particular server, identified by
+     | a unique name within the system (referred to by the 'id' attribute below).
+     |
+     | NOTE: You should either specify username/password OR privateKey/passphrase, since these pairings are
+     |       used together.
+     | -->
+    <server>
+      <id>rock_star</id>
+      <username>rockstar_read</username>
+      <password>rockstar_read2021</password>
+    </server>
+
+    <server>
+      <id>rock_star_snapshot</id>
+      <username>rockstar_read</username>
+      <password>rockstar_read2021</password>
+    </server>
+   
+
+    <!-- Another sample, using keys to authenticate.
+    <server>
+      <id>siteServer</id>
+      <privateKey>/path/to/private/key</privateKey>
+      <passphrase>optional; leave empty if not used.</passphrase>
+    </server>
+    -->
+  </servers>
+
+  <!-- mirrors
+   | This is a list of mirrors to be used in downloading artifacts from remote repositories.
+   |
+   | It works like this: a POM may declare a repository to use in resolving certain artifacts.
+   | However, this repository may have problems with heavy traffic at times, so people have mirrored
+   | it to several places.
+   |
+   | That repository definition will have a unique id, so we can create a mirror reference for that
+   | repository, to be used as an alternate download site. The mirror site will be the preferred
+   | server for that repository.
+   |-->
+  <mirrors>
+    <!-- mirror
+     | Specifies a repository mirror site to use instead of a given repository. The repository that
+     | this mirror serves has an ID that matches the mirrorOf element of this mirror. IDs are used
+     | for inheritance and direct lookup purposes, and must be unique across the set of mirrors.
+     |
+    <mirror>
+      <id>mirrorId</id>
+      <mirrorOf>repositoryId</mirrorOf>
+      <name>Human Readable Name for this Mirror.</name>
+      <url>http://my.repository.com/repo/path</url>
+    </mirror>
+     -->
+     <mirror>  
+      <id>rock_star_nexus</id>  
+      <mirrorOf>*</mirrorOf> 
+      <name>rock_star_nexus</name>  
+      <url>http://maven.idea-co-sf.com:12123/repository/maven-public/</url>        
+    </mirror>
+  </mirrors>
+
+  <!-- profiles
+   | This is a list of profiles which can be activated in a variety of ways, and which can modify
+   | the build process. Profiles provided in the settings.xml are intended to provide local machine-
+   | specific paths and repository locations which allow the build to work in the local environment.
+   |
+   | For example, if you have an integration testing plugin - like cactus - that needs to know where
+   | your Tomcat instance is installed, you can provide a variable here such that the variable is
+   | dereferenced during the build process to configure the cactus plugin.
+   |
+   | As noted above, profiles can be activated in a variety of ways. One way - the activeProfiles
+   | section of this document (settings.xml) - will be discussed later. Another way essentially
+   | relies on the detection of a system property, either matching a particular value for the property,
+   | or merely testing its existence. Profiles can also be activated by JDK version prefix, where a
+   | value of '1.4' might activate a profile when the build is executed on a JDK version of '1.4.2_07'.
+   | Finally, the list of active profiles can be specified directly from the command line.
+   |
+   | NOTE: For profiles defined in the settings.xml, you are restricted to specifying only artifact
+   |       repositories, plugin repositories, and free-form properties to be used as configuration
+   |       variables for plugins in the POM.
+   |
+   |-->
+  <profiles>
+    <!-- profile
+     | Specifies a set of introductions to the build process, to be activated using one or more of the
+     | mechanisms described above. For inheritance purposes, and to activate profiles via <activatedProfiles/>
+     | or the command line, profiles have to have an ID that is unique.
+     |
+     | An encouraged best practice for profile identification is to use a consistent naming convention
+     | for profiles, such as 'env-dev', 'env-test', 'env-production', 'user-jdcasey', 'user-brett', etc.
+     | This will make it more intuitive to understand what the set of introduced profiles is attempting
+     | to accomplish, particularly when you only have a list of profile id's for debug.
+     |
+     | This profile example uses the JDK version to trigger activation, and provides a JDK-specific repo.
+    <profile>
+      <id>jdk-1.4</id>
+
+      <activation>
+        <jdk>1.4</jdk>
+      </activation>
+
+      <repositories>
+        <repository>
+          <id>jdk14</id>
+          <name>Repository for JDK 1.4 builds</name>
+          <url>http://www.myhost.com/maven/jdk14</url>
+          <layout>default</layout>
+          <snapshotPolicy>always</snapshotPolicy>
+        </repository>
+      </repositories>
+    </profile>
+    -->
+    <profile>
+    	<id>rock_star</id>
+    	<repositories>
+    		<repository>
+    			<id>rock_star_nexus</id>
+    			<url>http://maven.idea-co-sf.com:12123/repository/maven-public/</url>
+    			<releases>
+    				<enabled>true</enabled>
+    			</releases>
+    			<snapshots>
+    				<enabled>true</enabled>
+    				<updatePolicy>always</updatePolicy>
+    			</snapshots>
+    		</repository>
+    	</repositories>
+    </profile>
+
+    <!--
+     | Here is another profile, activated by the system property 'target-env' with a value of 'dev',
+     | which provides a specific path to the Tomcat instance. To use this, your plugin configuration
+     | might hypothetically look like:
+     |
+     | ...
+     | <plugin>
+     |   <groupId>org.myco.myplugins</groupId>
+     |   <artifactId>myplugin</artifactId>
+     |
+     |   <configuration>
+     |     <tomcatLocation>${tomcatPath}</tomcatLocation>
+     |   </configuration>
+     | </plugin>
+     | ...
+     |
+     | NOTE: If you just wanted to inject this configuration whenever someone set 'target-env' to
+     |       anything, you could just leave off the <value/> inside the activation-property.
+     |
+    <profile>
+      <id>env-dev</id>
+
+      <activation>
+        <property>
+          <name>target-env</name>
+          <value>dev</value>
+        </property>
+      </activation>
+
+      <properties>
+        <tomcatPath>/path/to/tomcat/instance</tomcatPath>
+      </properties>
+    </profile>
+    -->
+  </profiles>
+
+  <!-- activeProfiles
+   | List of profiles that are active for all builds.
+   |
+  <activeProfiles>
+    <activeProfile>alwaysActiveProfile</activeProfile>
+    <activeProfile>anotherAlwaysActiveProfile</activeProfile>
+  </activeProfiles>
+  -->
+   <activeProfiles>
+    <activeProfile>rock_star</activeProfile>
+  </activeProfiles>
+</settings>

+ 122 - 0
doc/update.sql

@@ -0,0 +1,122 @@
+-- 2022年10月18日 frame 0.5.3 版本字段调整
+SET FOREIGN_KEY_CHECKS=0;
+
+ALTER TABLE `biz_user` ADD COLUMN `is_lock` char(1) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '0-未锁定,1-已锁定' AFTER `is_init`;
+
+ALTER TABLE `biz_user` ADD COLUMN `reset_at` datetime(0) NULL DEFAULT NULL COMMENT '密码最新重置时间' AFTER `is_lock`;
+
+ALTER TABLE `frame_user` ADD COLUMN `reset_at` datetime(0) NULL DEFAULT NULL COMMENT '密码最新重置时间' AFTER `comment`;
+
+ALTER TABLE `frame_user` ADD COLUMN `is_lock` char(1) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '0' COMMENT '0-未锁定,1-已锁定' AFTER `is_init`;
+
+ALTER TABLE `frame_user` MODIFY COLUMN `username` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '用户账号' AFTER `department_code`;
+
+ALTER TABLE `frame_user` MODIFY COLUMN `phone` varchar(30) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '联系电话' AFTER `gender`;
+
+ALTER TABLE `frame_user` MODIFY COLUMN `email` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '联系邮箱' AFTER `phone`;
+
+ALTER TABLE `frame_user` MODIFY COLUMN `leader` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '上级领导ID' AFTER `position`;
+
+ALTER TABLE `frame_user` MODIFY COLUMN `posts` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '岗位,逗号分隔' AFTER `leader`;
+
+ALTER TABLE `frame_user` MODIFY COLUMN `status` varchar(10) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '状态:0-禁用, 1-启用' AFTER `is_lock`;
+
+ALTER TABLE `frame_user` MODIFY COLUMN `flag` varchar(10) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '标识,用于不同系统定义不同内容\r\n本系统中:\r\n0或空-非销售,1-销售人员' AFTER `status`;
+
+ALTER TABLE `frame_user` MODIFY COLUMN `del_flag` char(1) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '删除标志(0代表存在 2代表删除)' AFTER `flag`;
+
+SET FOREIGN_KEY_CHECKS=1;
+
+-- 2023年9月20日
+SET FOREIGN_KEY_CHECKS=0;
+
+ALTER TABLE `idea_base`.`flow_definition` ADD COLUMN `deploy_id` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '部署ID,部署之后产生' AFTER `deploy_key`;
+
+ALTER TABLE `idea_base`.`frame_data` ADD COLUMN `thumbnail_path` varchar(255) CHARACTER SET utf8 COLLATE utf8_bin NULL DEFAULT NULL AFTER `created_at`;
+
+ALTER TABLE `idea_base`.`frame_permission` ADD COLUMN `description` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '权限描述' AFTER `name`;
+
+ALTER TABLE `idea_base`.`frame_permission` DROP COLUMN `descripion`;
+
+CREATE TABLE `idea_base`.`frame_permission_favor`  (
+  `id` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL,
+  `pid` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT 'pemission id, 权限id',
+  `uid` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT 'user id 系统用户id',
+  `path` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT 'menu path',
+  `created_at` datetime(0) NULL DEFAULT NULL,
+  PRIMARY KEY (`id`) USING BTREE
+) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci ROW_FORMAT = Dynamic;
+
+ALTER TABLE `idea_base`.`frame_role` COMMENT = '菜单角色表';
+
+ALTER TABLE `idea_base`.`frame_role` ADD COLUMN `comments` varchar(1024) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '角色说明' AFTER `halfChecks`;
+
+ALTER TABLE `idea_base`.`frame_role` ADD COLUMN `updated_at` datetime(0) NULL DEFAULT NULL AFTER `comments`;
+
+ALTER TABLE `idea_base`.`frame_role_data` COMMENT = '数据角色表';
+
+ALTER TABLE `idea_base`.`frame_role_data` ADD COLUMN `comments` varchar(1024) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '说明' AFTER `status`;
+
+ALTER TABLE `idea_base`.`frame_role_mobile` COMMENT = '移动端菜单角色表';
+
+ALTER TABLE `idea_base`.`frame_role_mobile` ADD COLUMN `status` varchar(1) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '状态, 0正常 1停用' AFTER `role_key`;
+
+ALTER TABLE `idea_base`.`frame_role_mobile` ADD COLUMN `comments` varchar(1024) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '说明' AFTER `status`;
+
+CREATE TABLE `idea_base`.`frame_role_mobile_user`  (
+  `id` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL,
+  `user_id` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
+  `role_mobile_id` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '移动端角色ID',
+  PRIMARY KEY (`id`) USING BTREE
+) ENGINE = InnoDB CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '移动端菜单角色-用户关联表' ROW_FORMAT = Dynamic;
+
+ALTER TABLE `idea_base`.`frame_user` ADD COLUMN `level` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '职级(字典)' AFTER `position`;
+
+ALTER TABLE `idea_base`.`frame_user_dept` ADD COLUMN `level` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '职级,字典' AFTER `posts`;
+
+ALTER TABLE `idea_base`.`ops_server_record` ADD INDEX `server_id_index`(`server_id`) USING BTREE;
+
+ALTER TABLE `idea_base`.`sys_dept` ADD COLUMN `charged_by` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '部门负责人' AFTER `dept_attr`;
+
+ALTER TABLE `idea_base`.`sys_dept` DROP COLUMN `changed_by`;
+
+CREATE TABLE `idea_base`.`sys_message_info`  (
+  `id` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '主键',
+  `title` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '主题',
+  `version_no` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '版本号',
+  `push_by` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '发布人id',
+  `push_name` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '发布人名称',
+  `push_time` datetime(0) NULL DEFAULT NULL COMMENT '发布时间',
+  `update_by` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '更新人id',
+  `update_name` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '更新人name',
+  `update_time` datetime(0) NULL DEFAULT NULL COMMENT '更新时间',
+  `create_by` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '创建人id',
+  `create_name` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '创建人name',
+  `create_time` datetime(0) NULL DEFAULT NULL COMMENT '创建时间',
+  `state` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '状态(0=已发布,1=待发布,2=已撤回)',
+  `annex` varchar(500) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '附件',
+  `push_state` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '发布状态(0=发布,1=暂存)',
+  `content` text CHARACTER SET utf8 COLLATE utf8_general_ci NULL COMMENT '内容',
+  PRIMARY KEY (`id`) USING BTREE
+) ENGINE = InnoDB CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Dynamic;
+
+CREATE TABLE `idea_base`.`sys_message_read`  (
+  `id` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '主键',
+  `msg_id` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '消息id',
+  `user_id` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '阅读人id',
+  `read_time` datetime(0) NULL DEFAULT NULL COMMENT '阅读时间',
+  PRIMARY KEY (`id`) USING BTREE
+) ENGINE = InnoDB CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Dynamic;
+
+CREATE TABLE `idea_base`.`sys_my_menu`  (
+  `id` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL,
+  `user_id` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '用户ID',
+  `menu_id` text CHARACTER SET utf8 COLLATE utf8_general_ci NULL COMMENT '菜单ID',
+  `created_by` varchar(64) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '创建',
+  `created_at` datetime(0) NULL DEFAULT NULL COMMENT '创建时间',
+  `updated_by` varchar(64) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '更新人',
+  `updated_at` datetime(0) NULL DEFAULT NULL COMMENT '更新时间',
+  PRIMARY KEY (`id`) USING BTREE
+) ENGINE = InnoDB CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Dynamic;
+
+SET FOREIGN_KEY_CHECKS=1;

+ 403 - 0
pom.xml

@@ -0,0 +1,403 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project xmlns="http://maven.apache.org/POM/4.0.0"
+         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+    <modelVersion>4.0.0</modelVersion>
+
+    <parent>
+        <groupId>org.springframework.boot</groupId>
+        <artifactId>spring-boot-starter-parent</artifactId>
+        <version>2.2.6.RELEASE</version>
+        <relativePath/> <!-- lookup parent from repository -->
+    </parent>
+
+    <groupId>rock.star.idea</groupId>
+    <artifactId>rock-star-idea</artifactId>
+    <version>0.1.0</version>
+    <packaging>pom</packaging>
+    <name>rock-star</name>
+    <description>Rock Star and Idea Base Platform</description>
+
+    <modules>
+        <module>pro-main</module>
+        <module>pro-base</module>
+        <module>pro-wx</module>
+        <module>pro-search</module>
+    </modules>
+
+
+    <properties>
+        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
+        <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
+        <java.version>1.8</java.version>
+        <commons.fileupload>1.3.3</commons.fileupload>
+        <commons.io>2.5</commons.io>
+        <commons.lang>2.4</commons.lang>
+        <commons.configuration>1.10</commons.configuration>
+        <mysql.version>5.1.45</mysql.version>
+        <mysql.connector>5.1.40</mysql.connector>
+        <mybatis.version>2.0.1</mybatis.version>
+        <springfox.swagger>2.7.0</springfox.swagger>
+        <springfox.swagger.ui>2.7.0</springfox.swagger.ui>
+        <pagehelper.version>5.3.0</pagehelper.version>
+        <shiro.spring>1.4.0</shiro.spring>
+        <apache.logging.log4j.core>2.10.0</apache.logging.log4j.core>
+        <log4j.version>1.2.17</log4j.version>
+        <apache.httpcomponents.httpcore>4.4.10</apache.httpcomponents.httpcore>
+        <apache.httpcomponents.httpclient>4.5.6</apache.httpcomponents.httpclient>
+        <apache.httpcomponents.httpmime>4.5.6</apache.httpcomponents.httpmime>
+        <apache.velocity>1.7</apache.velocity>
+        <alibaba.fastjson>1.1.15</alibaba.fastjson>
+        <cn.hutool>4.1.10</cn.hutool>
+        <github.penggle.kaptcha>2.3.2</github.penggle.kaptcha>
+        <dom4j.version>2.1.1</dom4j.version>
+        <java.jwt>3.4.1</java.jwt>
+        <kaptcha>2.3.2</kaptcha>
+        <binarywang.emoji.converter>0.0.1</binarywang.emoji.converter>
+        <binarywang.weixin.java.pay>3.3.0</binarywang.weixin.java.pay>
+        <binarywang.weixin.java.miniapp>3.3.0</binarywang.weixin.java.miniapp>
+        <tkmybatis>2.1.5</tkmybatis>
+        <activiti.version>6.0.0</activiti.version>
+        <aliyun.java.sdk.core>4.4.6</aliyun.java.sdk.core>
+        <aliyun.java.sdk.ecs>4.17.6</aliyun.java.sdk.ecs>
+        <bcprov.jdk15on>1.60</bcprov.jdk15on>
+        <jdom>1.1</jdom>
+        <spring.websocket>5.0.4.RELEASE</spring.websocket>
+        <spring.messaging>5.3.27</spring.messaging>
+        <rock.star.frame>0.5.11</rock.star.frame>
+        <rock.star.system>0.2.8.7</rock.star.system>
+        <rock.star.user>0.2.2</rock.star.user>
+        <rock.star.wx>0.2.3</rock.star.wx>
+        <rock.star.ops>0.1.1</rock.star.ops>
+        <rock.star.flow>0.1.4</rock.star.flow>
+    </properties>
+
+    <dependencyManagement>
+        <dependencies>
+
+            <!--子项目依赖-->
+
+            <dependency>
+                <groupId>com.rockstar.anticontrol</groupId>
+                <artifactId>rock-frame</artifactId>
+                <version>${rock.star.frame}</version>
+            </dependency>
+
+            <dependency>
+                <groupId>com.rockstar.anticontrol</groupId>
+                <artifactId>rock-system</artifactId>
+                <version>${rock.star.system}</version>
+            </dependency>
+
+            <dependency>
+                <groupId>com.rockstar.anticontrol</groupId>
+                <artifactId>rock-user</artifactId>
+                <version>${rock.star.user}</version>
+            </dependency>
+
+            <dependency>
+                <groupId>com.rockstar.anticontrol</groupId>
+                <artifactId>rock-wx</artifactId>
+                <version>${rock.star.wx}</version>
+            </dependency>
+
+            <dependency>
+                <groupId>com.rockstar.anticontrol</groupId>
+                <artifactId>rock-ops</artifactId>
+                <version>${rock.star.ops}</version>
+            </dependency>
+
+            <dependency>
+                <groupId>com.rockstar.anticontrol</groupId>
+                <artifactId>rock-flow</artifactId>
+                <version>${rock.star.flow}</version>
+            </dependency>
+
+            <dependency>
+                <groupId>rock.star.idea</groupId>
+                <artifactId>pro-main</artifactId>
+                <version>${project.version}</version>
+            </dependency>
+
+            <dependency>
+                <groupId>rock.star.idea</groupId>
+                <artifactId>pro-base</artifactId>
+                <version>${project.version}</version>
+            </dependency>
+
+            <dependency>
+                <groupId>rock.star.idea</groupId>
+                <artifactId>pro-search</artifactId>
+                <version>${project.version}</version>
+            </dependency>
+
+            <dependency>
+                <groupId>rock.star.idea</groupId>
+                <artifactId>pro-wx</artifactId>
+                <version>${project.version}</version>
+            </dependency>
+
+            <!--自选版本-->
+
+            <!-- SpringBoot集成mybatis框架 -->
+            <dependency>
+                <groupId>org.mybatis.spring.boot</groupId>
+                <artifactId>mybatis-spring-boot-starter</artifactId>
+                <version>${mybatis.version}</version>
+            </dependency>
+
+            <!-- 添加swagger2 -->
+            <dependency>
+                <groupId>io.springfox</groupId>
+                <artifactId>springfox-swagger2</artifactId>
+                <version>${springfox.swagger}</version>
+            </dependency>
+            <!-- swagger2-UI -->
+            <dependency>
+                <groupId>io.springfox</groupId>
+                <artifactId>springfox-swagger-ui</artifactId>
+                <version>${springfox.swagger.ui}</version>
+            </dependency>
+
+            <!-- pageHelper -->
+            <dependency>
+                <groupId>com.github.pagehelper</groupId>
+                <artifactId>pagehelper</artifactId>
+                <version>${pagehelper.version}</version>
+            </dependency>
+            <!-- mysql驱动7.0-->
+            <dependency>
+                <groupId>mysql</groupId>
+                <artifactId>mysql-connector-java</artifactId>
+                <version>${mysql.connector}</version>
+            </dependency>
+
+            <!-- shiro权限 -->
+            <dependency>
+                <groupId>org.apache.shiro</groupId>
+                <artifactId>shiro-spring</artifactId>
+                <version>${shiro.spring}</version>
+            </dependency>
+
+            <!--apache工具类 -->
+            <dependency>
+                <groupId>commons-lang</groupId>
+                <artifactId>commons-lang</artifactId>
+                <version>${commons.lang}</version>
+            </dependency>
+            <dependency>
+                <groupId>org.apache.logging.log4j</groupId>
+                <artifactId>log4j-core</artifactId>
+                <version>${apache.logging.log4j.core}</version>
+            </dependency>
+            <dependency>
+                <groupId>log4j</groupId>
+                <artifactId>log4j</artifactId>
+                <version>${log4j.version}</version>
+            </dependency>
+            <!-- https://mvnrepository.com/artifact/org.apache.httpcomponents/httpcore -->
+            <dependency>
+                <groupId>org.apache.httpcomponents</groupId>
+                <artifactId>httpcore</artifactId>
+                <version>${apache.httpcomponents.httpcore}</version>
+            </dependency>
+            <!-- https://mvnrepository.com/artifact/org.apache.httpcomponents/httpclient -->
+            <dependency>
+                <groupId>org.apache.httpcomponents</groupId>
+                <artifactId>httpclient</artifactId>
+                <version>${apache.httpcomponents.httpclient}</version>
+            </dependency>
+            <!-- https://mvnrepository.com/artifact/org.apache.httpcomponents/httpmime -->
+            <dependency>
+                <groupId>org.apache.httpcomponents</groupId>
+                <artifactId>httpmime</artifactId>
+                <version>${apache.httpcomponents.httpmime}</version>
+            </dependency>
+            <!-- https://mvnrepository.com/artifact/org.apache.velocity/velocity -->
+            <dependency>
+                <groupId>org.apache.velocity</groupId>
+                <artifactId>velocity</artifactId>
+                <version>${apache.velocity}</version>
+            </dependency>
+
+            <!--alibaba工具类 -->
+            <dependency>
+                <groupId>com.alibaba</groupId>
+                <artifactId>fastjson</artifactId>
+                <version>${alibaba.fastjson}</version>
+            </dependency>
+
+            <!--io常用工具类 -->
+            <dependency>
+                <groupId>commons-io</groupId>
+                <artifactId>commons-io</artifactId>
+                <version>${commons.io}</version>
+            </dependency>
+
+            <!--文件上传工具类 -->
+            <dependency>
+                <groupId>commons-fileupload</groupId>
+                <artifactId>commons-fileupload</artifactId>
+                <version>${commons.fileupload}</version>
+            </dependency>
+
+            <dependency>
+                <groupId>commons-configuration</groupId>
+                <artifactId>commons-configuration</artifactId>
+                <version>${commons.configuration}</version>
+            </dependency>
+
+            <!-- Hutool是一个Java工具包 http://hutool.cn/ -->
+            <dependency>
+                <groupId>cn.hutool</groupId>
+                <artifactId>hutool-all</artifactId>
+                <version>${cn.hutool}</version>
+            </dependency>
+
+            <!-- google验证码 -->
+            <dependency>
+                <groupId>com.github.penggle</groupId>
+                <artifactId>kaptcha</artifactId>
+                <version>${github.penggle.kaptcha}</version>
+            </dependency>
+            <dependency>
+                <groupId>org.bouncycastle</groupId>
+                <artifactId>bcprov-jdk15on</artifactId>
+                <version>${bcprov.jdk15on}</version>
+            </dependency>
+            <!-- dom -->
+            <dependency>
+                <groupId>org.dom4j</groupId>
+                <artifactId>dom4j</artifactId>
+                <version>${dom4j.version}</version>
+            </dependency>
+            <dependency>
+                <groupId>org.jdom</groupId>
+                <artifactId>jdom</artifactId>
+                <version>${jdom}</version>
+            </dependency>
+
+            <!-- WebSocket配置开始-->
+            <dependency>
+                <groupId>org.springframework</groupId>
+                <artifactId>spring-websocket</artifactId>
+                <version>${spring.websocket}</version>
+            </dependency>
+            <dependency>
+                <groupId>org.springframework</groupId>
+                <artifactId>spring-messaging</artifactId>
+                <version>${spring.messaging}</version>
+            </dependency>
+
+            <!--阿里云短信-->
+            <dependency>
+                <groupId>com.aliyun</groupId>
+                <artifactId>aliyun-java-sdk-core</artifactId>
+                <version>${aliyun.java.sdk.core}</version>
+            </dependency>
+            <dependency>
+                <groupId>com.aliyun</groupId>
+                <artifactId>aliyun-java-sdk-ecs</artifactId>
+                <version>${aliyun.java.sdk.ecs}</version>
+            </dependency>
+
+        </dependencies>
+    </dependencyManagement>
+
+    <dependencies>
+        <!-- springframework -->
+        <!-- configuration -->
+        <dependency>
+            <groupId>org.springframework.boot</groupId>
+            <artifactId>spring-boot-configuration-processor</artifactId>
+            <optional>true</optional>
+        </dependency>
+        <!-- 热部署 -->
+        <dependency>
+            <groupId>org.springframework.boot</groupId>
+            <artifactId>spring-boot-devtools</artifactId>
+            <optional>true</optional>
+        </dependency>
+        <!-- aop -->
+        <dependency>
+            <groupId>org.springframework.boot</groupId>
+            <artifactId>spring-boot-starter-aop</artifactId>
+        </dependency>
+        <!-- SpringBoot Web容器 -->
+        <dependency>
+            <groupId>org.springframework.boot</groupId>
+            <artifactId>spring-boot-starter-web</artifactId>
+        </dependency>
+        <!-- WebSocket配置开始-->
+        <dependency>
+            <groupId>org.springframework</groupId>
+            <artifactId>spring-websocket</artifactId>
+            <version>${spring.websocket}</version>
+        </dependency>
+        <dependency>
+            <groupId>org.springframework</groupId>
+            <artifactId>spring-messaging</artifactId>
+            <version>${spring.messaging}</version>
+        </dependency>
+
+        <!--GSON -->
+        <dependency>
+            <groupId>com.google.code.gson</groupId>
+            <artifactId>gson</artifactId>
+        </dependency>
+
+        <!--apache工具类 -->
+        <dependency>
+            <groupId>org.apache.commons</groupId>
+            <artifactId>commons-lang3</artifactId>
+        </dependency>
+
+        <!--swaggerUI框架-->
+        <dependency>
+            <groupId>com.github.xiaoymin</groupId>
+            <artifactId>swagger-bootstrap-ui</artifactId>
+            <version>1.9.6</version>
+        </dependency>
+
+        <dependency>
+            <groupId>org.springframework.boot</groupId>
+            <artifactId>spring-boot-starter-test</artifactId>
+            <scope>test</scope>
+            <exclusions>
+                <exclusion>
+                    <groupId>org.junit.vintage</groupId>
+                    <artifactId>junit-vintage-engine</artifactId>
+                </exclusion>
+            </exclusions>
+        </dependency>
+    </dependencies>
+
+    <build>
+        <plugins>
+            <plugin>
+                <groupId>org.springframework.boot</groupId>
+                <artifactId>spring-boot-maven-plugin</artifactId>
+                <executions>
+                    <execution>
+                        <id>repackage</id>
+                        <configuration>
+                            <executable>true</executable>
+                            <classifier>exec</classifier>
+                        </configuration>
+                    </execution>
+                </executions>
+            </plugin>
+            <plugin>
+                <groupId>org.apache.maven.plugins</groupId>
+                <artifactId>maven-compiler-plugin</artifactId>
+                <version>3.1</version>
+                <configuration>
+                    <skip>true</skip>
+                    <source>1.8</source>
+                    <target>1.8</target>
+                </configuration>
+            </plugin>
+        </plugins>
+    </build>
+
+</project>

+ 148 - 0
pro-base/pom.xml

@@ -0,0 +1,148 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project xmlns="http://maven.apache.org/POM/4.0.0"
+         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+    <parent>
+        <groupId>rock.star.idea</groupId>
+        <artifactId>rock-star-idea</artifactId>
+        <version>0.1.0</version>
+    </parent>
+    <modelVersion>4.0.0</modelVersion>
+
+    <artifactId>pro-base</artifactId>
+    <packaging>jar</packaging>
+
+    <dependencies>
+        <!-- Rock 工程依赖 -->
+        <dependency>
+            <groupId>com.rockstar.anticontrol</groupId>
+            <artifactId>rock-frame</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>com.rockstar.anticontrol</groupId>
+            <artifactId>rock-system</artifactId>
+        </dependency>
+
+        <!-- SpringBoot集成mybatis框架 -->
+        <dependency>
+            <groupId>org.mybatis.spring.boot</groupId>
+            <artifactId>mybatis-spring-boot-starter</artifactId>
+            <version>${mybatis.version}</version>
+        </dependency>
+        <!--通用mapper起步依赖-->
+        <dependency>
+            <groupId>tk.mybatis</groupId>
+            <artifactId>mapper-spring-boot-starter</artifactId>
+            <version>${tkmybatis}</version>
+        </dependency>
+
+        <!-- 文件上传依赖 -->
+        <dependency>
+            <groupId>commons-io</groupId>
+            <artifactId>commons-io</artifactId>
+            <version>1.3.2</version>
+        </dependency>
+        <dependency>
+            <groupId>commons-fileupload</groupId>
+            <artifactId>commons-fileupload</artifactId>
+            <version>1.2.1</version>
+        </dependency>
+        <!--Alibaba-Excel-->
+        <dependency>
+            <groupId>com.alibaba</groupId>
+            <artifactId>easyexcel</artifactId>
+            <version>2.1.3</version>
+        </dependency>
+        <!-- 工具包 -->
+        <dependency>
+            <groupId>cn.hutool</groupId>
+            <artifactId>hutool-all</artifactId>
+            <version>5.7.4</version>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.poi</groupId>
+            <artifactId>ooxml-schemas</artifactId>
+            <version>1.1</version>
+        </dependency>
+        <dependency>
+            <groupId>commons-io</groupId>
+            <artifactId>commons-io</artifactId>
+            <version>2.10.0</version>
+        </dependency>
+
+        <!--     -->
+        <dependency>
+            <groupId>com.qiniu</groupId>
+            <artifactId>qiniu-java-sdk</artifactId>
+            <version>[7.7.0, 7.7.99]</version>
+        </dependency>
+
+        <dependency>
+            <groupId>com.google.code.gson</groupId>
+            <artifactId>gson</artifactId>
+            <version>2.8.5</version>
+        </dependency>
+
+        <dependency>
+            <groupId>org.postgresql</groupId>
+            <artifactId>postgresql</artifactId>
+            <scope>runtime</scope>
+        </dependency>
+
+        <dependency>
+            <groupId>com.github.pagehelper</groupId>
+            <artifactId>pagehelper</artifactId>
+            <version>${pagehelper.version}</version>
+        </dependency>
+        <dependency>
+            <groupId>com.github.pagehelper</groupId>
+            <artifactId>pagehelper-spring-boot-autoconfigure</artifactId>
+            <version>1.2.3</version>
+        </dependency>
+
+        <dependency>
+            <groupId>org.springframework.kafka</groupId>
+            <artifactId>spring-kafka</artifactId>
+            <version>2.8.0</version>
+        </dependency>
+<!--        <dependency>-->
+<!--            <groupId>org.apache.kafka</groupId>-->
+<!--            <artifactId>kafka-clients</artifactId>-->
+<!--            <version>2.4.1</version>-->
+<!--        </dependency>-->
+        <dependency>
+            <groupId>org.projectlombok</groupId>
+            <artifactId>lombok</artifactId>
+        </dependency>
+    </dependencies>
+
+    <build>
+        <plugins>
+            <plugin>
+                <groupId>org.apache.maven.plugins</groupId>
+                <artifactId>maven-compiler-plugin</artifactId>
+            </plugin>
+            <plugin>
+                <groupId>org.mybatis.generator</groupId>
+                <artifactId>mybatis-generator-maven-plugin</artifactId>
+                <version>1.3.7</version>
+                <configuration>
+                    <!--允许移动生成的文件 -->
+                    <verbose>false</verbose>
+                    <!--允许覆盖生成的文件 -->
+                    <overwrite>false</overwrite>
+                    <!--配置文件的路径 -->
+                    <configurationFile>src/main/resources/mybatis-generator.xml</configurationFile>
+                </configuration>
+                <dependencies>
+                    <dependency>
+                        <groupId>mysql</groupId>
+                        <artifactId>mysql-connector-java</artifactId>
+                        <version>${mysql.version}</version>
+                    </dependency>
+                </dependencies>
+            </plugin>
+        </plugins>
+    </build>
+
+</project>

+ 23 - 0
pro-base/src/main/java/com/idea/ProApplication.java

@@ -0,0 +1,23 @@
+package com.idea;
+
+import org.mybatis.spring.annotation.MapperScan;
+import org.springframework.boot.SpringApplication;
+import org.springframework.boot.autoconfigure.SpringBootApplication;
+import org.springframework.scheduling.annotation.EnableScheduling;
+import org.springframework.transaction.annotation.EnableTransactionManagement;
+import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;
+
+@SpringBootApplication(scanBasePackages = {"com.idea","com.rockstar"})
+@MapperScan(value = {"com.rockstar.*.mapper","com.idea.*.mapper"})
+@EnableTransactionManagement
+@EnableScheduling
+public class ProApplication implements WebMvcConfigurer {
+
+    public static void main(String[] args) throws Exception {
+        SpringApplication.run(ProApplication.class, args);
+
+        System.out.println("=========================================");
+        System.out.println("|-----------  Pro 启动成功  ------------|");
+        System.out.println("=========================================");
+    }
+}

+ 67 - 0
pro-base/src/main/java/com/idea/config/DataSourcesMasterConfig.java

@@ -0,0 +1,67 @@
+package com.idea.config;
+
+import org.apache.ibatis.session.SqlSessionFactory;
+import org.mybatis.spring.SqlSessionTemplate;
+import org.mybatis.spring.annotation.MapperScan;
+import org.springframework.beans.factory.annotation.Qualifier;
+import org.springframework.boot.context.properties.ConfigurationProperties;
+import org.springframework.boot.jdbc.DataSourceBuilder;
+import org.springframework.context.annotation.Bean;
+import org.springframework.context.annotation.Configuration;
+import org.springframework.context.annotation.Primary;
+import org.springframework.jdbc.datasource.DataSourceTransactionManager;
+
+import javax.sql.DataSource;
+
+@Configuration
+@MapperScan(value = {"com.rockstar.*.mapper","com.idea.*.mapper"}, sqlSessionFactoryRef = "masterSqlSessionFactory", sqlSessionTemplateRef = "masterSqlSessionTemplate")
+public class DataSourcesMasterConfig {
+
+    //主数据源mapper xml文件夹的路径
+    private static final String MAPPER_LOCAL = "classpath*:mybatis/*/*.xml";
+    /**
+     * 是application-test.yml中的spring.datasource.master配置生效
+     * @return
+     */
+    @Bean(name = "masterDataSource")
+    @ConfigurationProperties(prefix = "spring.datasource.master")
+    @Primary
+    public DataSource masterDataSource() {
+        return DataSourceBuilder.create().build();
+    }
+
+    /**
+     * 将配置信息注入到SqlSessionFactoryBean中
+     * @param dataSource    数据库连接信息
+     * @return
+     * @throws Exception
+     */
+    @Bean(name = "masterSqlSessionFactory")
+    @Primary
+    public SqlSessionFactory masterSqlSessionFactory(@Qualifier("masterDataSource") DataSource dataSource) throws Exception {
+        return new FactoryUtil().genFactoryBean(dataSource,MAPPER_LOCAL).getObject();
+    }
+
+    /**
+     * 事务管理器,在实例化时注入主库master
+     * @param dataSource
+     * @return
+     */
+    @Bean(name = "masterTransactionManager")
+    @Primary
+    public DataSourceTransactionManager masterTransactionManager(@Qualifier("masterDataSource") DataSource dataSource) {
+        return new DataSourceTransactionManager(dataSource);
+    }
+
+    /**
+     * SqlSessionTemplate具有线程安全性
+     * @param sqlSessionFactory
+     * @return
+     * @throws Exception
+     */
+    @Bean(name = "masterSqlSessionTemplate")
+    @Primary
+    public SqlSessionTemplate masterSqlSessionTemplate(@Qualifier("masterSqlSessionFactory") SqlSessionFactory sqlSessionFactory) throws Exception {
+        return new SqlSessionTemplate(sqlSessionFactory);
+    }
+}

+ 63 - 0
pro-base/src/main/java/com/idea/config/DataSourcesSlaveConfig.java

@@ -0,0 +1,63 @@
+package com.idea.config;
+
+import org.apache.ibatis.session.SqlSessionFactory;
+import org.mybatis.spring.SqlSessionTemplate;
+import org.springframework.beans.factory.annotation.Qualifier;
+import org.springframework.boot.context.properties.ConfigurationProperties;
+import org.springframework.boot.jdbc.DataSourceBuilder;
+import org.springframework.context.annotation.Bean;
+import org.springframework.context.annotation.Configuration;
+import org.springframework.jdbc.datasource.DataSourceTransactionManager;
+import tk.mybatis.spring.annotation.MapperScan;
+
+import javax.sql.DataSource;
+
+@Configuration
+@MapperScan(basePackages = "com.slave.**.mapper", sqlSessionFactoryRef = "slaveSqlSessionFactory", sqlSessionTemplateRef = "slaveSqlSessionTemplate")
+public class DataSourcesSlaveConfig {
+
+    //主数据源mapper xml文件夹的路径
+    private static final String MAPPER_LOCAL_SLAVE = "classpath*:slave/*/*.xml";
+
+    /**
+     * 是application-test.yml中的spring.datasource.slave配置生效
+     * @return
+     */
+    @Bean(name = "slaveDataSource")
+    @ConfigurationProperties(prefix = "spring.datasource.slave")
+    public DataSource slaveDataSource() {
+        return DataSourceBuilder.create().build();
+    }
+
+    /**
+     * 将配置信息注入到SqlSessionFactoryBean中
+     * @param dataSource    数据库连接信息
+     * @return
+     * @throws Exception
+     */
+    @Bean(name = "slaveSqlSessionFactory")
+    public SqlSessionFactory slaveSqlSessionFactory(@Qualifier("slaveDataSource") DataSource dataSource) throws Exception {
+        return new FactoryUtil().genFactoryBean(dataSource,MAPPER_LOCAL_SLAVE).getObject();
+    }
+
+    /**
+     * 事务管理器,在实例化时注入主库master
+     * @param dataSource
+     * @return
+     */
+    @Bean(name = "slaveTransactionManager")
+    public DataSourceTransactionManager slaveTransactionManager(@Qualifier("slaveDataSource") DataSource dataSource) {
+        return new DataSourceTransactionManager(dataSource);
+    }
+
+    /**
+     * SqlSessionTemplate具有线程安全性
+     * @param sqlSessionFactory
+     * @return
+     * @throws Exception
+     */
+    @Bean(name = "slaveSqlSessionTemplate")
+    public SqlSessionTemplate slaveSqlSessionTemplate(@Qualifier("slaveSqlSessionFactory") SqlSessionFactory sqlSessionFactory) throws Exception {
+        return new SqlSessionTemplate(sqlSessionFactory);
+    }
+}

+ 21 - 0
pro-base/src/main/java/com/idea/config/FactoryUtil.java

@@ -0,0 +1,21 @@
+package com.idea.config;
+
+import org.mybatis.spring.SqlSessionFactoryBean;
+import org.springframework.core.io.support.PathMatchingResourcePatternResolver;
+
+import javax.sql.DataSource;
+import java.io.IOException;
+
+public class FactoryUtil {
+
+    public SqlSessionFactoryBean genFactoryBean(DataSource dataSource, String resources) throws IOException {
+        SqlSessionFactoryBean bean = new SqlSessionFactoryBean();
+        bean.setDataSource(dataSource);
+        bean.setMapperLocations(new PathMatchingResourcePatternResolver().getResources(resources));
+
+        org.apache.ibatis.session.Configuration configuration = new org.apache.ibatis.session.Configuration();
+        configuration.setMapUnderscoreToCamelCase(true);
+        bean.setConfiguration(configuration);
+        return bean;
+    }
+}

+ 38 - 0
pro-base/src/main/java/com/idea/config/MybatisInterceptorConfig.java

@@ -0,0 +1,38 @@
+package com.idea.config;
+
+import com.github.pagehelper.PageInterceptor;
+import com.github.pagehelper.autoconfigure.PageHelperProperties;
+import org.apache.ibatis.session.SqlSessionFactory;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.context.annotation.Configuration;
+
+import javax.annotation.PostConstruct;
+import java.util.List;
+
+/**
+ * 自定义mybatis拦截器配置类,自定义拦截器如有需先于PageHelper拦截器执行,需放在这
+ * 注意自定义拦截器有query,且涉及到改变入参参数值的,需在PageHelper拦截器之前执行
+ * 本配置只适用于pagehelper-spring-boot-autoconfigure 1.2.x版本,1.3以上的不知道咋写,谁想用谁来写^_^
+ * @classname CustomMybatisInterceptorConfig
+ * @date 2023年10月13日
+ */
+@Configuration
+public class MybatisInterceptorConfig {
+    @Autowired
+    private List<SqlSessionFactory> sqlSessionFactoryList;
+    @Autowired
+    private PageHelperProperties properties;
+
+
+    @PostConstruct
+    public void addPageInterceptor() {
+        SqlInterceptor baseEntityInterceptor = new SqlInterceptor();//自定义拦截器
+        PageInterceptor pageInterceptor = new PageInterceptor();
+        pageInterceptor.setProperties(this.properties.getProperties());
+        //在把PageHelper特殊配置放进去,由于close-conn 利用上面方式时,属性名就是 close-conn 而不是 closeConn,所以需要额外的一步
+        for (SqlSessionFactory sqlSessionFactory : sqlSessionFactoryList) {
+            sqlSessionFactory.getConfiguration().addInterceptor(baseEntityInterceptor);//后注册自定义拦截器,后注册的先执行(用到了责任链模式)
+        }
+    }
+
+}

+ 58 - 0
pro-base/src/main/java/com/idea/config/SqlInterceptor.java

@@ -0,0 +1,58 @@
+package com.idea.config;
+
+import org.apache.ibatis.cache.CacheKey;
+import org.apache.ibatis.executor.Executor;
+import org.apache.ibatis.mapping.BoundSql;
+import org.apache.ibatis.mapping.MappedStatement;
+import org.apache.ibatis.mapping.SqlCommandType;
+import org.apache.ibatis.plugin.*;
+import org.apache.ibatis.session.ResultHandler;
+import org.apache.ibatis.session.RowBounds;
+import org.springframework.stereotype.Component;
+
+import java.util.Properties;
+
+/**
+ * @description:
+ * @author: pengyq
+ * @date: 2023年10月13日
+ */
+@Intercepts({//注意看这个大花括号,也就这说这里可以定义多个@Signature对多个地方拦截,都用这个拦截器
+        @Signature(
+                type = Executor.class, //这是指拦截哪个接口
+                method = "query",//这个接口内的哪个方法名,不要拼错了
+                args = {MappedStatement.class, Object.class, RowBounds.class, ResultHandler.class}// 这是拦截的方法的入参,按顺序写到这,不要多也不要少,如果方法重载,可是要通过方法名和入参来确定唯一的
+        ),
+        @Signature(
+                type = Executor.class,
+                method = "query",
+                args = {MappedStatement.class, Object.class, RowBounds.class, ResultHandler.class, CacheKey.class, BoundSql.class}
+        )
+})
+@Component
+public class SqlInterceptor implements Interceptor {
+
+    @Override
+    public Object intercept(Invocation invocation) throws Throwable {
+        // 获取得到封装的映射语句对象
+        MappedStatement mappedStatement = (MappedStatement) invocation.getArgs()[0];
+        // 获取得到参数
+        Object parameterObject = invocation.getArgs()[1];
+        SqlCommandType sqlCommandType = mappedStatement.getSqlCommandType();
+        BoundSql boundSql = mappedStatement.getBoundSql(parameterObject);
+        String sql = boundSql.getSql();
+        System.out.println("PageHelper拦截,Type =" + sqlCommandType + ",\n" + sql);
+        return invocation.proceed();
+    }
+
+    @Override
+    public Object plugin(Object target) {
+        return Plugin.wrap(target, this);
+    }
+
+    @Override
+    public void setProperties(Properties properties) {
+        System.out.println(properties);
+    }
+}
+

+ 77 - 0
pro-base/src/main/java/com/idea/demo/controller/DemoApplyController.java

@@ -0,0 +1,77 @@
+package com.idea.demo.controller;
+
+import com.github.pagehelper.PageInfo;
+import com.idea.demo.model.DemoApply;
+import com.idea.demo.service.DemoApplyService;
+import com.rockstar.common.base.BaseController;
+import com.rockstar.common.domain.AjaxResult;
+import com.rockstar.frame.model.extend.DateTrans;
+import com.rockstar.frame.model.extend.TableSplitResult;
+import com.rockstar.frame.model.extend.Tablepar;
+import io.swagger.annotations.Api;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Controller;
+import org.springframework.web.bind.annotation.PathVariable;
+import org.springframework.web.bind.annotation.PostMapping;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.ResponseBody;
+
+import java.util.Date;
+
+/**
+ * Created by pengyq on 2023.
+ */
+@Controller
+@RequestMapping(value = "DemoApplyController")
+@Api(value="演示申请管理")
+public class DemoApplyController extends BaseController {
+
+    //主表
+    @Autowired
+    private DemoApplyService modelService;
+
+
+    @PostMapping(value = "list",produces = {"application/json;charset=UTF-8"})
+    @ResponseBody
+    public Object list(Tablepar tablepar, DemoApply model, DateTrans dt){
+        PageInfo<DemoApply> page= modelService.list(tablepar,model,dt);
+        TableSplitResult<DemoApply> result=new TableSplitResult<DemoApply>(page.getPageNum(), page.getTotal(), page.getList());
+        return  result;
+    }
+
+    @PostMapping(value = "listAll",produces = {"application/json;charset=UTF-8"})
+    @ResponseBody
+    public Object listAll(DemoApply model, DateTrans dt){
+        return  modelService.listAll(model,dt);
+    }
+
+    @PostMapping(value = "add",produces = {"application/json;charset=UTF-8"})
+    @ResponseBody
+    public AjaxResult add(DemoApply record){
+        record.setCreatedAt(new Date());
+        int result = modelService.insert(record);
+        return result(result);
+    }
+
+    @PostMapping(value = "remove/{id}",produces = {"application/json;charset=UTF-8"})
+    @ResponseBody
+    public AjaxResult remove(@PathVariable("id") String id){
+        int result = modelService.deleteByPrimaryKey(id);
+        return result(result);
+    }
+
+    @PostMapping(value = "edit",produces = {"application/json;charset=UTF-8"})
+    @ResponseBody
+    public AjaxResult editSave(DemoApply model){
+        int result = modelService.updateByPrimaryKeySelective(model);
+        return result(result);
+    }
+
+    @PostMapping(value = "getById",produces = {"application/json;charset=UTF-8"})
+    @ResponseBody
+    public DemoApply getById(String id) {
+        return modelService.selectByPrimaryKey(id);
+    }
+
+
+}

+ 77 - 0
pro-base/src/main/java/com/idea/demo/controller/DemoStudentController.java

@@ -0,0 +1,77 @@
+package com.idea.demo.controller;
+
+import com.github.pagehelper.PageInfo;
+import com.idea.demo.model.DemoStudent;
+import com.idea.demo.service.DemoStudentService;
+import com.rockstar.common.base.BaseController;
+import com.rockstar.common.domain.AjaxResult;
+import com.rockstar.frame.model.extend.DateTrans;
+import com.rockstar.frame.model.extend.TableSplitResult;
+import com.rockstar.frame.model.extend.Tablepar;
+import io.swagger.annotations.Api;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Controller;
+import org.springframework.web.bind.annotation.PathVariable;
+import org.springframework.web.bind.annotation.PostMapping;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.ResponseBody;
+
+import java.util.Date;
+
+/**
+ * Created by pengyq on 2020.
+ */
+@Controller
+@RequestMapping(value = "DemoStudentController")
+@Api(value="演示学生管理")
+public class DemoStudentController extends BaseController {
+
+    //主表
+    @Autowired
+    private DemoStudentService modelService;
+
+
+    @PostMapping(value = "list",produces = {"application/json;charset=UTF-8"})
+    @ResponseBody
+    public Object list(Tablepar tablepar, DemoStudent model, DateTrans dt){
+        PageInfo<DemoStudent> page= modelService.list(tablepar,model,dt);
+        TableSplitResult<DemoStudent> result=new TableSplitResult<DemoStudent>(page.getPageNum(), page.getTotal(), page.getList());
+        return  result;
+    }
+
+    @PostMapping(value = "listAll",produces = {"application/json;charset=UTF-8"})
+    @ResponseBody
+    public Object listAll(DemoStudent model, DateTrans dt){
+        return  modelService.listAll(model,dt);
+    }
+
+    @PostMapping(value = "add",produces = {"application/json;charset=UTF-8"})
+    @ResponseBody
+    public AjaxResult add(DemoStudent record){
+        record.setCreatedAt(new Date());
+        int result = modelService.insert(record);
+        return result(result);
+    }
+
+    @PostMapping(value = "remove/{id}",produces = {"application/json;charset=UTF-8"})
+    @ResponseBody
+    public AjaxResult remove(@PathVariable("id") String id){
+        int result = modelService.deleteByPrimaryKey(id);
+        return result(result);
+    }
+
+    @PostMapping(value = "edit",produces = {"application/json;charset=UTF-8"})
+    @ResponseBody
+    public AjaxResult editSave(DemoStudent model){
+        int result = modelService.updateByPrimaryKeySelective(model);
+        return result(result);
+    }
+
+    @PostMapping(value = "getById",produces = {"application/json;charset=UTF-8"})
+    @ResponseBody
+    public DemoStudent getById(String id) {
+        return modelService.selectByPrimaryKey(id);
+    }
+
+
+}

+ 30 - 0
pro-base/src/main/java/com/idea/demo/mapper/DemoApplyMapper.java

@@ -0,0 +1,30 @@
+package com.idea.demo.mapper;
+
+import com.idea.demo.model.DemoApply;
+import com.idea.demo.model.DemoApplyExample;
+import java.util.List;
+import org.apache.ibatis.annotations.Param;
+
+public interface DemoApplyMapper {
+    long countByExample(DemoApplyExample example);
+
+    int deleteByExample(DemoApplyExample example);
+
+    int deleteByPrimaryKey(String id);
+
+    int insert(DemoApply record);
+
+    int insertSelective(DemoApply record);
+
+    List<DemoApply> selectByExample(DemoApplyExample example);
+
+    DemoApply selectByPrimaryKey(String id);
+
+    int updateByExampleSelective(@Param("record") DemoApply record, @Param("example") DemoApplyExample example);
+
+    int updateByExample(@Param("record") DemoApply record, @Param("example") DemoApplyExample example);
+
+    int updateByPrimaryKeySelective(DemoApply record);
+
+    int updateByPrimaryKey(DemoApply record);
+}

+ 31 - 0
pro-base/src/main/java/com/idea/demo/mapper/DemoStudentMapper.java

@@ -0,0 +1,31 @@
+package com.idea.demo.mapper;
+
+import com.idea.demo.model.DemoStudent;
+import com.idea.demo.model.DemoStudentExample;
+import org.apache.ibatis.annotations.Param;
+
+import java.util.List;
+
+public interface DemoStudentMapper {
+    long countByExample(DemoStudentExample example);
+
+    int deleteByExample(DemoStudentExample example);
+
+    int deleteByPrimaryKey(String id);
+
+    int insert(DemoStudent record);
+
+    int insertSelective(DemoStudent record);
+
+    List<DemoStudent> selectByExample(DemoStudentExample example);
+
+    DemoStudent selectByPrimaryKey(String id);
+
+    int updateByExampleSelective(@Param("record") DemoStudent record, @Param("example") DemoStudentExample example);
+
+    int updateByExample(@Param("record") DemoStudent record, @Param("example") DemoStudentExample example);
+
+    int updateByPrimaryKeySelective(DemoStudent record);
+
+    int updateByPrimaryKey(DemoStudent record);
+}

+ 98 - 0
pro-base/src/main/java/com/idea/demo/model/DemoApply.java

@@ -0,0 +1,98 @@
+package com.idea.demo.model;
+
+import java.io.Serializable;
+import java.util.Date;
+
+public class DemoApply implements Serializable {
+    private String id;
+
+    private String title;
+
+    private String type;
+
+    private String comment;
+
+    private String status;
+
+    private Date applyAt;
+
+    private String processInstanceId;
+
+    private Date createdAt;
+
+    private String createdBy;
+
+    private static final long serialVersionUID = 1L;
+
+    public String getId() {
+        return id;
+    }
+
+    public void setId(String id) {
+        this.id = id == null ? null : id.trim();
+    }
+
+    public String getTitle() {
+        return title;
+    }
+
+    public void setTitle(String title) {
+        this.title = title == null ? null : title.trim();
+    }
+
+    public String getType() {
+        return type;
+    }
+
+    public void setType(String type) {
+        this.type = type == null ? null : type.trim();
+    }
+
+    public String getComment() {
+        return comment;
+    }
+
+    public void setComment(String comment) {
+        this.comment = comment == null ? null : comment.trim();
+    }
+
+    public String getStatus() {
+        return status;
+    }
+
+    public void setStatus(String status) {
+        this.status = status == null ? null : status.trim();
+    }
+
+    public Date getApplyAt() {
+        return applyAt;
+    }
+
+    public void setApplyAt(Date applyAt) {
+        this.applyAt = applyAt;
+    }
+
+    public String getProcessInstanceId() {
+        return processInstanceId;
+    }
+
+    public void setProcessInstanceId(String processInstanceId) {
+        this.processInstanceId = processInstanceId == null ? null : processInstanceId.trim();
+    }
+
+    public Date getCreatedAt() {
+        return createdAt;
+    }
+
+    public void setCreatedAt(Date createdAt) {
+        this.createdAt = createdAt;
+    }
+
+    public String getCreatedBy() {
+        return createdBy;
+    }
+
+    public void setCreatedBy(String createdBy) {
+        this.createdBy = createdBy == null ? null : createdBy.trim();
+    }
+}

+ 811 - 0
pro-base/src/main/java/com/idea/demo/model/DemoApplyExample.java

@@ -0,0 +1,811 @@
+package com.idea.demo.model;
+
+import java.util.ArrayList;
+import java.util.Date;
+import java.util.List;
+
+public class DemoApplyExample {
+    protected String orderByClause;
+
+    protected boolean distinct;
+
+    protected List<Criteria> oredCriteria;
+
+    public DemoApplyExample() {
+        oredCriteria = new ArrayList<Criteria>();
+    }
+
+    public void setOrderByClause(String orderByClause) {
+        this.orderByClause = orderByClause;
+    }
+
+    public String getOrderByClause() {
+        return orderByClause;
+    }
+
+    public void setDistinct(boolean distinct) {
+        this.distinct = distinct;
+    }
+
+    public boolean isDistinct() {
+        return distinct;
+    }
+
+    public List<Criteria> getOredCriteria() {
+        return oredCriteria;
+    }
+
+    public void or(Criteria criteria) {
+        oredCriteria.add(criteria);
+    }
+
+    public Criteria or() {
+        Criteria criteria = createCriteriaInternal();
+        oredCriteria.add(criteria);
+        return criteria;
+    }
+
+    public Criteria createCriteria() {
+        Criteria criteria = createCriteriaInternal();
+        if (oredCriteria.size() == 0) {
+            oredCriteria.add(criteria);
+        }
+        return criteria;
+    }
+
+    protected Criteria createCriteriaInternal() {
+        Criteria criteria = new Criteria();
+        return criteria;
+    }
+
+    public void clear() {
+        oredCriteria.clear();
+        orderByClause = null;
+        distinct = false;
+    }
+
+    protected abstract static class GeneratedCriteria {
+        protected List<Criterion> criteria;
+
+        protected GeneratedCriteria() {
+            super();
+            criteria = new ArrayList<Criterion>();
+        }
+
+        public boolean isValid() {
+            return criteria.size() > 0;
+        }
+
+        public List<Criterion> getAllCriteria() {
+            return criteria;
+        }
+
+        public List<Criterion> getCriteria() {
+            return criteria;
+        }
+
+        protected void addCriterion(String condition) {
+            if (condition == null) {
+                throw new RuntimeException("Value for condition cannot be null");
+            }
+            criteria.add(new Criterion(condition));
+        }
+
+        protected void addCriterion(String condition, Object value, String property) {
+            if (value == null) {
+                throw new RuntimeException("Value for " + property + " cannot be null");
+            }
+            criteria.add(new Criterion(condition, value));
+        }
+
+        protected void addCriterion(String condition, Object value1, Object value2, String property) {
+            if (value1 == null || value2 == null) {
+                throw new RuntimeException("Between values for " + property + " cannot be null");
+            }
+            criteria.add(new Criterion(condition, value1, value2));
+        }
+
+        public Criteria andIdIsNull() {
+            addCriterion("id is null");
+            return (Criteria) this;
+        }
+
+        public Criteria andIdIsNotNull() {
+            addCriterion("id is not null");
+            return (Criteria) this;
+        }
+
+        public Criteria andIdEqualTo(String value) {
+            addCriterion("id =", value, "id");
+            return (Criteria) this;
+        }
+
+        public Criteria andIdNotEqualTo(String value) {
+            addCriterion("id <>", value, "id");
+            return (Criteria) this;
+        }
+
+        public Criteria andIdGreaterThan(String value) {
+            addCriterion("id >", value, "id");
+            return (Criteria) this;
+        }
+
+        public Criteria andIdGreaterThanOrEqualTo(String value) {
+            addCriterion("id >=", value, "id");
+            return (Criteria) this;
+        }
+
+        public Criteria andIdLessThan(String value) {
+            addCriterion("id <", value, "id");
+            return (Criteria) this;
+        }
+
+        public Criteria andIdLessThanOrEqualTo(String value) {
+            addCriterion("id <=", value, "id");
+            return (Criteria) this;
+        }
+
+        public Criteria andIdLike(String value) {
+            addCriterion("id like", value, "id");
+            return (Criteria) this;
+        }
+
+        public Criteria andIdNotLike(String value) {
+            addCriterion("id not like", value, "id");
+            return (Criteria) this;
+        }
+
+        public Criteria andIdIn(List<String> values) {
+            addCriterion("id in", values, "id");
+            return (Criteria) this;
+        }
+
+        public Criteria andIdNotIn(List<String> values) {
+            addCriterion("id not in", values, "id");
+            return (Criteria) this;
+        }
+
+        public Criteria andIdBetween(String value1, String value2) {
+            addCriterion("id between", value1, value2, "id");
+            return (Criteria) this;
+        }
+
+        public Criteria andIdNotBetween(String value1, String value2) {
+            addCriterion("id not between", value1, value2, "id");
+            return (Criteria) this;
+        }
+
+        public Criteria andTitleIsNull() {
+            addCriterion("title is null");
+            return (Criteria) this;
+        }
+
+        public Criteria andTitleIsNotNull() {
+            addCriterion("title is not null");
+            return (Criteria) this;
+        }
+
+        public Criteria andTitleEqualTo(String value) {
+            addCriterion("title =", value, "title");
+            return (Criteria) this;
+        }
+
+        public Criteria andTitleNotEqualTo(String value) {
+            addCriterion("title <>", value, "title");
+            return (Criteria) this;
+        }
+
+        public Criteria andTitleGreaterThan(String value) {
+            addCriterion("title >", value, "title");
+            return (Criteria) this;
+        }
+
+        public Criteria andTitleGreaterThanOrEqualTo(String value) {
+            addCriterion("title >=", value, "title");
+            return (Criteria) this;
+        }
+
+        public Criteria andTitleLessThan(String value) {
+            addCriterion("title <", value, "title");
+            return (Criteria) this;
+        }
+
+        public Criteria andTitleLessThanOrEqualTo(String value) {
+            addCriterion("title <=", value, "title");
+            return (Criteria) this;
+        }
+
+        public Criteria andTitleLike(String value) {
+            addCriterion("title like", value, "title");
+            return (Criteria) this;
+        }
+
+        public Criteria andTitleNotLike(String value) {
+            addCriterion("title not like", value, "title");
+            return (Criteria) this;
+        }
+
+        public Criteria andTitleIn(List<String> values) {
+            addCriterion("title in", values, "title");
+            return (Criteria) this;
+        }
+
+        public Criteria andTitleNotIn(List<String> values) {
+            addCriterion("title not in", values, "title");
+            return (Criteria) this;
+        }
+
+        public Criteria andTitleBetween(String value1, String value2) {
+            addCriterion("title between", value1, value2, "title");
+            return (Criteria) this;
+        }
+
+        public Criteria andTitleNotBetween(String value1, String value2) {
+            addCriterion("title not between", value1, value2, "title");
+            return (Criteria) this;
+        }
+
+        public Criteria andTypeIsNull() {
+            addCriterion("type is null");
+            return (Criteria) this;
+        }
+
+        public Criteria andTypeIsNotNull() {
+            addCriterion("type is not null");
+            return (Criteria) this;
+        }
+
+        public Criteria andTypeEqualTo(String value) {
+            addCriterion("type =", value, "type");
+            return (Criteria) this;
+        }
+
+        public Criteria andTypeNotEqualTo(String value) {
+            addCriterion("type <>", value, "type");
+            return (Criteria) this;
+        }
+
+        public Criteria andTypeGreaterThan(String value) {
+            addCriterion("type >", value, "type");
+            return (Criteria) this;
+        }
+
+        public Criteria andTypeGreaterThanOrEqualTo(String value) {
+            addCriterion("type >=", value, "type");
+            return (Criteria) this;
+        }
+
+        public Criteria andTypeLessThan(String value) {
+            addCriterion("type <", value, "type");
+            return (Criteria) this;
+        }
+
+        public Criteria andTypeLessThanOrEqualTo(String value) {
+            addCriterion("type <=", value, "type");
+            return (Criteria) this;
+        }
+
+        public Criteria andTypeLike(String value) {
+            addCriterion("type like", value, "type");
+            return (Criteria) this;
+        }
+
+        public Criteria andTypeNotLike(String value) {
+            addCriterion("type not like", value, "type");
+            return (Criteria) this;
+        }
+
+        public Criteria andTypeIn(List<String> values) {
+            addCriterion("type in", values, "type");
+            return (Criteria) this;
+        }
+
+        public Criteria andTypeNotIn(List<String> values) {
+            addCriterion("type not in", values, "type");
+            return (Criteria) this;
+        }
+
+        public Criteria andTypeBetween(String value1, String value2) {
+            addCriterion("type between", value1, value2, "type");
+            return (Criteria) this;
+        }
+
+        public Criteria andTypeNotBetween(String value1, String value2) {
+            addCriterion("type not between", value1, value2, "type");
+            return (Criteria) this;
+        }
+
+        public Criteria andCommentIsNull() {
+            addCriterion("comment is null");
+            return (Criteria) this;
+        }
+
+        public Criteria andCommentIsNotNull() {
+            addCriterion("comment is not null");
+            return (Criteria) this;
+        }
+
+        public Criteria andCommentEqualTo(String value) {
+            addCriterion("comment =", value, "comment");
+            return (Criteria) this;
+        }
+
+        public Criteria andCommentNotEqualTo(String value) {
+            addCriterion("comment <>", value, "comment");
+            return (Criteria) this;
+        }
+
+        public Criteria andCommentGreaterThan(String value) {
+            addCriterion("comment >", value, "comment");
+            return (Criteria) this;
+        }
+
+        public Criteria andCommentGreaterThanOrEqualTo(String value) {
+            addCriterion("comment >=", value, "comment");
+            return (Criteria) this;
+        }
+
+        public Criteria andCommentLessThan(String value) {
+            addCriterion("comment <", value, "comment");
+            return (Criteria) this;
+        }
+
+        public Criteria andCommentLessThanOrEqualTo(String value) {
+            addCriterion("comment <=", value, "comment");
+            return (Criteria) this;
+        }
+
+        public Criteria andCommentLike(String value) {
+            addCriterion("comment like", value, "comment");
+            return (Criteria) this;
+        }
+
+        public Criteria andCommentNotLike(String value) {
+            addCriterion("comment not like", value, "comment");
+            return (Criteria) this;
+        }
+
+        public Criteria andCommentIn(List<String> values) {
+            addCriterion("comment in", values, "comment");
+            return (Criteria) this;
+        }
+
+        public Criteria andCommentNotIn(List<String> values) {
+            addCriterion("comment not in", values, "comment");
+            return (Criteria) this;
+        }
+
+        public Criteria andCommentBetween(String value1, String value2) {
+            addCriterion("comment between", value1, value2, "comment");
+            return (Criteria) this;
+        }
+
+        public Criteria andCommentNotBetween(String value1, String value2) {
+            addCriterion("comment not between", value1, value2, "comment");
+            return (Criteria) this;
+        }
+
+        public Criteria andStatusIsNull() {
+            addCriterion("status is null");
+            return (Criteria) this;
+        }
+
+        public Criteria andStatusIsNotNull() {
+            addCriterion("status is not null");
+            return (Criteria) this;
+        }
+
+        public Criteria andStatusEqualTo(String value) {
+            addCriterion("status =", value, "status");
+            return (Criteria) this;
+        }
+
+        public Criteria andStatusNotEqualTo(String value) {
+            addCriterion("status <>", value, "status");
+            return (Criteria) this;
+        }
+
+        public Criteria andStatusGreaterThan(String value) {
+            addCriterion("status >", value, "status");
+            return (Criteria) this;
+        }
+
+        public Criteria andStatusGreaterThanOrEqualTo(String value) {
+            addCriterion("status >=", value, "status");
+            return (Criteria) this;
+        }
+
+        public Criteria andStatusLessThan(String value) {
+            addCriterion("status <", value, "status");
+            return (Criteria) this;
+        }
+
+        public Criteria andStatusLessThanOrEqualTo(String value) {
+            addCriterion("status <=", value, "status");
+            return (Criteria) this;
+        }
+
+        public Criteria andStatusLike(String value) {
+            addCriterion("status like", value, "status");
+            return (Criteria) this;
+        }
+
+        public Criteria andStatusNotLike(String value) {
+            addCriterion("status not like", value, "status");
+            return (Criteria) this;
+        }
+
+        public Criteria andStatusIn(List<String> values) {
+            addCriterion("status in", values, "status");
+            return (Criteria) this;
+        }
+
+        public Criteria andStatusNotIn(List<String> values) {
+            addCriterion("status not in", values, "status");
+            return (Criteria) this;
+        }
+
+        public Criteria andStatusBetween(String value1, String value2) {
+            addCriterion("status between", value1, value2, "status");
+            return (Criteria) this;
+        }
+
+        public Criteria andStatusNotBetween(String value1, String value2) {
+            addCriterion("status not between", value1, value2, "status");
+            return (Criteria) this;
+        }
+
+        public Criteria andApplyAtIsNull() {
+            addCriterion("apply_at is null");
+            return (Criteria) this;
+        }
+
+        public Criteria andApplyAtIsNotNull() {
+            addCriterion("apply_at is not null");
+            return (Criteria) this;
+        }
+
+        public Criteria andApplyAtEqualTo(Date value) {
+            addCriterion("apply_at =", value, "applyAt");
+            return (Criteria) this;
+        }
+
+        public Criteria andApplyAtNotEqualTo(Date value) {
+            addCriterion("apply_at <>", value, "applyAt");
+            return (Criteria) this;
+        }
+
+        public Criteria andApplyAtGreaterThan(Date value) {
+            addCriterion("apply_at >", value, "applyAt");
+            return (Criteria) this;
+        }
+
+        public Criteria andApplyAtGreaterThanOrEqualTo(Date value) {
+            addCriterion("apply_at >=", value, "applyAt");
+            return (Criteria) this;
+        }
+
+        public Criteria andApplyAtLessThan(Date value) {
+            addCriterion("apply_at <", value, "applyAt");
+            return (Criteria) this;
+        }
+
+        public Criteria andApplyAtLessThanOrEqualTo(Date value) {
+            addCriterion("apply_at <=", value, "applyAt");
+            return (Criteria) this;
+        }
+
+        public Criteria andApplyAtIn(List<Date> values) {
+            addCriterion("apply_at in", values, "applyAt");
+            return (Criteria) this;
+        }
+
+        public Criteria andApplyAtNotIn(List<Date> values) {
+            addCriterion("apply_at not in", values, "applyAt");
+            return (Criteria) this;
+        }
+
+        public Criteria andApplyAtBetween(Date value1, Date value2) {
+            addCriterion("apply_at between", value1, value2, "applyAt");
+            return (Criteria) this;
+        }
+
+        public Criteria andApplyAtNotBetween(Date value1, Date value2) {
+            addCriterion("apply_at not between", value1, value2, "applyAt");
+            return (Criteria) this;
+        }
+
+        public Criteria andProcessInstanceIdIsNull() {
+            addCriterion("process_instance_id is null");
+            return (Criteria) this;
+        }
+
+        public Criteria andProcessInstanceIdIsNotNull() {
+            addCriterion("process_instance_id is not null");
+            return (Criteria) this;
+        }
+
+        public Criteria andProcessInstanceIdEqualTo(String value) {
+            addCriterion("process_instance_id =", value, "processInstanceId");
+            return (Criteria) this;
+        }
+
+        public Criteria andProcessInstanceIdNotEqualTo(String value) {
+            addCriterion("process_instance_id <>", value, "processInstanceId");
+            return (Criteria) this;
+        }
+
+        public Criteria andProcessInstanceIdGreaterThan(String value) {
+            addCriterion("process_instance_id >", value, "processInstanceId");
+            return (Criteria) this;
+        }
+
+        public Criteria andProcessInstanceIdGreaterThanOrEqualTo(String value) {
+            addCriterion("process_instance_id >=", value, "processInstanceId");
+            return (Criteria) this;
+        }
+
+        public Criteria andProcessInstanceIdLessThan(String value) {
+            addCriterion("process_instance_id <", value, "processInstanceId");
+            return (Criteria) this;
+        }
+
+        public Criteria andProcessInstanceIdLessThanOrEqualTo(String value) {
+            addCriterion("process_instance_id <=", value, "processInstanceId");
+            return (Criteria) this;
+        }
+
+        public Criteria andProcessInstanceIdLike(String value) {
+            addCriterion("process_instance_id like", value, "processInstanceId");
+            return (Criteria) this;
+        }
+
+        public Criteria andProcessInstanceIdNotLike(String value) {
+            addCriterion("process_instance_id not like", value, "processInstanceId");
+            return (Criteria) this;
+        }
+
+        public Criteria andProcessInstanceIdIn(List<String> values) {
+            addCriterion("process_instance_id in", values, "processInstanceId");
+            return (Criteria) this;
+        }
+
+        public Criteria andProcessInstanceIdNotIn(List<String> values) {
+            addCriterion("process_instance_id not in", values, "processInstanceId");
+            return (Criteria) this;
+        }
+
+        public Criteria andProcessInstanceIdBetween(String value1, String value2) {
+            addCriterion("process_instance_id between", value1, value2, "processInstanceId");
+            return (Criteria) this;
+        }
+
+        public Criteria andProcessInstanceIdNotBetween(String value1, String value2) {
+            addCriterion("process_instance_id not between", value1, value2, "processInstanceId");
+            return (Criteria) this;
+        }
+
+        public Criteria andCreatedAtIsNull() {
+            addCriterion("created_at is null");
+            return (Criteria) this;
+        }
+
+        public Criteria andCreatedAtIsNotNull() {
+            addCriterion("created_at is not null");
+            return (Criteria) this;
+        }
+
+        public Criteria andCreatedAtEqualTo(Date value) {
+            addCriterion("created_at =", value, "createdAt");
+            return (Criteria) this;
+        }
+
+        public Criteria andCreatedAtNotEqualTo(Date value) {
+            addCriterion("created_at <>", value, "createdAt");
+            return (Criteria) this;
+        }
+
+        public Criteria andCreatedAtGreaterThan(Date value) {
+            addCriterion("created_at >", value, "createdAt");
+            return (Criteria) this;
+        }
+
+        public Criteria andCreatedAtGreaterThanOrEqualTo(Date value) {
+            addCriterion("created_at >=", value, "createdAt");
+            return (Criteria) this;
+        }
+
+        public Criteria andCreatedAtLessThan(Date value) {
+            addCriterion("created_at <", value, "createdAt");
+            return (Criteria) this;
+        }
+
+        public Criteria andCreatedAtLessThanOrEqualTo(Date value) {
+            addCriterion("created_at <=", value, "createdAt");
+            return (Criteria) this;
+        }
+
+        public Criteria andCreatedAtIn(List<Date> values) {
+            addCriterion("created_at in", values, "createdAt");
+            return (Criteria) this;
+        }
+
+        public Criteria andCreatedAtNotIn(List<Date> values) {
+            addCriterion("created_at not in", values, "createdAt");
+            return (Criteria) this;
+        }
+
+        public Criteria andCreatedAtBetween(Date value1, Date value2) {
+            addCriterion("created_at between", value1, value2, "createdAt");
+            return (Criteria) this;
+        }
+
+        public Criteria andCreatedAtNotBetween(Date value1, Date value2) {
+            addCriterion("created_at not between", value1, value2, "createdAt");
+            return (Criteria) this;
+        }
+
+        public Criteria andCreatedByIsNull() {
+            addCriterion("created_by is null");
+            return (Criteria) this;
+        }
+
+        public Criteria andCreatedByIsNotNull() {
+            addCriterion("created_by is not null");
+            return (Criteria) this;
+        }
+
+        public Criteria andCreatedByEqualTo(String value) {
+            addCriterion("created_by =", value, "createdBy");
+            return (Criteria) this;
+        }
+
+        public Criteria andCreatedByNotEqualTo(String value) {
+            addCriterion("created_by <>", value, "createdBy");
+            return (Criteria) this;
+        }
+
+        public Criteria andCreatedByGreaterThan(String value) {
+            addCriterion("created_by >", value, "createdBy");
+            return (Criteria) this;
+        }
+
+        public Criteria andCreatedByGreaterThanOrEqualTo(String value) {
+            addCriterion("created_by >=", value, "createdBy");
+            return (Criteria) this;
+        }
+
+        public Criteria andCreatedByLessThan(String value) {
+            addCriterion("created_by <", value, "createdBy");
+            return (Criteria) this;
+        }
+
+        public Criteria andCreatedByLessThanOrEqualTo(String value) {
+            addCriterion("created_by <=", value, "createdBy");
+            return (Criteria) this;
+        }
+
+        public Criteria andCreatedByLike(String value) {
+            addCriterion("created_by like", value, "createdBy");
+            return (Criteria) this;
+        }
+
+        public Criteria andCreatedByNotLike(String value) {
+            addCriterion("created_by not like", value, "createdBy");
+            return (Criteria) this;
+        }
+
+        public Criteria andCreatedByIn(List<String> values) {
+            addCriterion("created_by in", values, "createdBy");
+            return (Criteria) this;
+        }
+
+        public Criteria andCreatedByNotIn(List<String> values) {
+            addCriterion("created_by not in", values, "createdBy");
+            return (Criteria) this;
+        }
+
+        public Criteria andCreatedByBetween(String value1, String value2) {
+            addCriterion("created_by between", value1, value2, "createdBy");
+            return (Criteria) this;
+        }
+
+        public Criteria andCreatedByNotBetween(String value1, String value2) {
+            addCriterion("created_by not between", value1, value2, "createdBy");
+            return (Criteria) this;
+        }
+    }
+
+    public static class Criteria extends GeneratedCriteria {
+
+        protected Criteria() {
+            super();
+        }
+    }
+
+    public static class Criterion {
+        private String condition;
+
+        private Object value;
+
+        private Object secondValue;
+
+        private boolean noValue;
+
+        private boolean singleValue;
+
+        private boolean betweenValue;
+
+        private boolean listValue;
+
+        private String typeHandler;
+
+        public String getCondition() {
+            return condition;
+        }
+
+        public Object getValue() {
+            return value;
+        }
+
+        public Object getSecondValue() {
+            return secondValue;
+        }
+
+        public boolean isNoValue() {
+            return noValue;
+        }
+
+        public boolean isSingleValue() {
+            return singleValue;
+        }
+
+        public boolean isBetweenValue() {
+            return betweenValue;
+        }
+
+        public boolean isListValue() {
+            return listValue;
+        }
+
+        public String getTypeHandler() {
+            return typeHandler;
+        }
+
+        protected Criterion(String condition) {
+            super();
+            this.condition = condition;
+            this.typeHandler = null;
+            this.noValue = true;
+        }
+
+        protected Criterion(String condition, Object value, String typeHandler) {
+            super();
+            this.condition = condition;
+            this.value = value;
+            this.typeHandler = typeHandler;
+            if (value instanceof List<?>) {
+                this.listValue = true;
+            } else {
+                this.singleValue = true;
+            }
+        }
+
+        protected Criterion(String condition, Object value) {
+            this(condition, value, null);
+        }
+
+        protected Criterion(String condition, Object value, Object secondValue, String typeHandler) {
+            super();
+            this.condition = condition;
+            this.value = value;
+            this.secondValue = secondValue;
+            this.typeHandler = typeHandler;
+            this.betweenValue = true;
+        }
+
+        protected Criterion(String condition, Object value, Object secondValue) {
+            this(condition, value, secondValue, null);
+        }
+    }
+}

+ 78 - 0
pro-base/src/main/java/com/idea/demo/model/DemoStudent.java

@@ -0,0 +1,78 @@
+package com.idea.demo.model;
+
+import java.io.Serializable;
+import java.util.Date;
+
+public class DemoStudent implements Serializable {
+    private String id;
+
+    private String name;
+
+    private String gender;
+
+    private Date birthday;
+
+    private String comment;
+
+    private Date createdAt;
+
+    private String createdBy;
+
+    private static final long serialVersionUID = 1L;
+
+    public String getId() {
+        return id;
+    }
+
+    public void setId(String id) {
+        this.id = id == null ? null : id.trim();
+    }
+
+    public String getName() {
+        return name;
+    }
+
+    public void setName(String name) {
+        this.name = name == null ? null : name.trim();
+    }
+
+    public String getGender() {
+        return gender;
+    }
+
+    public void setGender(String gender) {
+        this.gender = gender == null ? null : gender.trim();
+    }
+
+    public Date getBirthday() {
+        return birthday;
+    }
+
+    public void setBirthday(Date birthday) {
+        this.birthday = birthday;
+    }
+
+    public String getComment() {
+        return comment;
+    }
+
+    public void setComment(String comment) {
+        this.comment = comment == null ? null : comment.trim();
+    }
+
+    public Date getCreatedAt() {
+        return createdAt;
+    }
+
+    public void setCreatedAt(Date createdAt) {
+        this.createdAt = createdAt;
+    }
+
+    public String getCreatedBy() {
+        return createdBy;
+    }
+
+    public void setCreatedBy(String createdBy) {
+        this.createdBy = createdBy == null ? null : createdBy.trim();
+    }
+}

+ 671 - 0
pro-base/src/main/java/com/idea/demo/model/DemoStudentExample.java

@@ -0,0 +1,671 @@
+package com.idea.demo.model;
+
+import java.util.ArrayList;
+import java.util.Date;
+import java.util.List;
+
+public class DemoStudentExample {
+    protected String orderByClause;
+
+    protected boolean distinct;
+
+    protected List<Criteria> oredCriteria;
+
+    public DemoStudentExample() {
+        oredCriteria = new ArrayList<Criteria>();
+    }
+
+    public void setOrderByClause(String orderByClause) {
+        this.orderByClause = orderByClause;
+    }
+
+    public String getOrderByClause() {
+        return orderByClause;
+    }
+
+    public void setDistinct(boolean distinct) {
+        this.distinct = distinct;
+    }
+
+    public boolean isDistinct() {
+        return distinct;
+    }
+
+    public List<Criteria> getOredCriteria() {
+        return oredCriteria;
+    }
+
+    public void or(Criteria criteria) {
+        oredCriteria.add(criteria);
+    }
+
+    public Criteria or() {
+        Criteria criteria = createCriteriaInternal();
+        oredCriteria.add(criteria);
+        return criteria;
+    }
+
+    public Criteria createCriteria() {
+        Criteria criteria = createCriteriaInternal();
+        if (oredCriteria.size() == 0) {
+            oredCriteria.add(criteria);
+        }
+        return criteria;
+    }
+
+    protected Criteria createCriteriaInternal() {
+        Criteria criteria = new Criteria();
+        return criteria;
+    }
+
+    public void clear() {
+        oredCriteria.clear();
+        orderByClause = null;
+        distinct = false;
+    }
+
+    protected abstract static class GeneratedCriteria {
+        protected List<Criterion> criteria;
+
+        protected GeneratedCriteria() {
+            super();
+            criteria = new ArrayList<Criterion>();
+        }
+
+        public boolean isValid() {
+            return criteria.size() > 0;
+        }
+
+        public List<Criterion> getAllCriteria() {
+            return criteria;
+        }
+
+        public List<Criterion> getCriteria() {
+            return criteria;
+        }
+
+        protected void addCriterion(String condition) {
+            if (condition == null) {
+                throw new RuntimeException("Value for condition cannot be null");
+            }
+            criteria.add(new Criterion(condition));
+        }
+
+        protected void addCriterion(String condition, Object value, String property) {
+            if (value == null) {
+                throw new RuntimeException("Value for " + property + " cannot be null");
+            }
+            criteria.add(new Criterion(condition, value));
+        }
+
+        protected void addCriterion(String condition, Object value1, Object value2, String property) {
+            if (value1 == null || value2 == null) {
+                throw new RuntimeException("Between values for " + property + " cannot be null");
+            }
+            criteria.add(new Criterion(condition, value1, value2));
+        }
+
+        public Criteria andIdIsNull() {
+            addCriterion("id is null");
+            return (Criteria) this;
+        }
+
+        public Criteria andIdIsNotNull() {
+            addCriterion("id is not null");
+            return (Criteria) this;
+        }
+
+        public Criteria andIdEqualTo(String value) {
+            addCriterion("id =", value, "id");
+            return (Criteria) this;
+        }
+
+        public Criteria andIdNotEqualTo(String value) {
+            addCriterion("id <>", value, "id");
+            return (Criteria) this;
+        }
+
+        public Criteria andIdGreaterThan(String value) {
+            addCriterion("id >", value, "id");
+            return (Criteria) this;
+        }
+
+        public Criteria andIdGreaterThanOrEqualTo(String value) {
+            addCriterion("id >=", value, "id");
+            return (Criteria) this;
+        }
+
+        public Criteria andIdLessThan(String value) {
+            addCriterion("id <", value, "id");
+            return (Criteria) this;
+        }
+
+        public Criteria andIdLessThanOrEqualTo(String value) {
+            addCriterion("id <=", value, "id");
+            return (Criteria) this;
+        }
+
+        public Criteria andIdLike(String value) {
+            addCriterion("id like", value, "id");
+            return (Criteria) this;
+        }
+
+        public Criteria andIdNotLike(String value) {
+            addCriterion("id not like", value, "id");
+            return (Criteria) this;
+        }
+
+        public Criteria andIdIn(List<String> values) {
+            addCriterion("id in", values, "id");
+            return (Criteria) this;
+        }
+
+        public Criteria andIdNotIn(List<String> values) {
+            addCriterion("id not in", values, "id");
+            return (Criteria) this;
+        }
+
+        public Criteria andIdBetween(String value1, String value2) {
+            addCriterion("id between", value1, value2, "id");
+            return (Criteria) this;
+        }
+
+        public Criteria andIdNotBetween(String value1, String value2) {
+            addCriterion("id not between", value1, value2, "id");
+            return (Criteria) this;
+        }
+
+        public Criteria andNameIsNull() {
+            addCriterion("name is null");
+            return (Criteria) this;
+        }
+
+        public Criteria andNameIsNotNull() {
+            addCriterion("name is not null");
+            return (Criteria) this;
+        }
+
+        public Criteria andNameEqualTo(String value) {
+            addCriterion("name =", value, "name");
+            return (Criteria) this;
+        }
+
+        public Criteria andNameNotEqualTo(String value) {
+            addCriterion("name <>", value, "name");
+            return (Criteria) this;
+        }
+
+        public Criteria andNameGreaterThan(String value) {
+            addCriterion("name >", value, "name");
+            return (Criteria) this;
+        }
+
+        public Criteria andNameGreaterThanOrEqualTo(String value) {
+            addCriterion("name >=", value, "name");
+            return (Criteria) this;
+        }
+
+        public Criteria andNameLessThan(String value) {
+            addCriterion("name <", value, "name");
+            return (Criteria) this;
+        }
+
+        public Criteria andNameLessThanOrEqualTo(String value) {
+            addCriterion("name <=", value, "name");
+            return (Criteria) this;
+        }
+
+        public Criteria andNameLike(String value) {
+            addCriterion("name like", value, "name");
+            return (Criteria) this;
+        }
+
+        public Criteria andNameNotLike(String value) {
+            addCriterion("name not like", value, "name");
+            return (Criteria) this;
+        }
+
+        public Criteria andNameIn(List<String> values) {
+            addCriterion("name in", values, "name");
+            return (Criteria) this;
+        }
+
+        public Criteria andNameNotIn(List<String> values) {
+            addCriterion("name not in", values, "name");
+            return (Criteria) this;
+        }
+
+        public Criteria andNameBetween(String value1, String value2) {
+            addCriterion("name between", value1, value2, "name");
+            return (Criteria) this;
+        }
+
+        public Criteria andNameNotBetween(String value1, String value2) {
+            addCriterion("name not between", value1, value2, "name");
+            return (Criteria) this;
+        }
+
+        public Criteria andGenderIsNull() {
+            addCriterion("gender is null");
+            return (Criteria) this;
+        }
+
+        public Criteria andGenderIsNotNull() {
+            addCriterion("gender is not null");
+            return (Criteria) this;
+        }
+
+        public Criteria andGenderEqualTo(String value) {
+            addCriterion("gender =", value, "gender");
+            return (Criteria) this;
+        }
+
+        public Criteria andGenderNotEqualTo(String value) {
+            addCriterion("gender <>", value, "gender");
+            return (Criteria) this;
+        }
+
+        public Criteria andGenderGreaterThan(String value) {
+            addCriterion("gender >", value, "gender");
+            return (Criteria) this;
+        }
+
+        public Criteria andGenderGreaterThanOrEqualTo(String value) {
+            addCriterion("gender >=", value, "gender");
+            return (Criteria) this;
+        }
+
+        public Criteria andGenderLessThan(String value) {
+            addCriterion("gender <", value, "gender");
+            return (Criteria) this;
+        }
+
+        public Criteria andGenderLessThanOrEqualTo(String value) {
+            addCriterion("gender <=", value, "gender");
+            return (Criteria) this;
+        }
+
+        public Criteria andGenderLike(String value) {
+            addCriterion("gender like", value, "gender");
+            return (Criteria) this;
+        }
+
+        public Criteria andGenderNotLike(String value) {
+            addCriterion("gender not like", value, "gender");
+            return (Criteria) this;
+        }
+
+        public Criteria andGenderIn(List<String> values) {
+            addCriterion("gender in", values, "gender");
+            return (Criteria) this;
+        }
+
+        public Criteria andGenderNotIn(List<String> values) {
+            addCriterion("gender not in", values, "gender");
+            return (Criteria) this;
+        }
+
+        public Criteria andGenderBetween(String value1, String value2) {
+            addCriterion("gender between", value1, value2, "gender");
+            return (Criteria) this;
+        }
+
+        public Criteria andGenderNotBetween(String value1, String value2) {
+            addCriterion("gender not between", value1, value2, "gender");
+            return (Criteria) this;
+        }
+
+        public Criteria andBirthdayIsNull() {
+            addCriterion("birthday is null");
+            return (Criteria) this;
+        }
+
+        public Criteria andBirthdayIsNotNull() {
+            addCriterion("birthday is not null");
+            return (Criteria) this;
+        }
+
+        public Criteria andBirthdayEqualTo(Date value) {
+            addCriterion("birthday =", value, "birthday");
+            return (Criteria) this;
+        }
+
+        public Criteria andBirthdayNotEqualTo(Date value) {
+            addCriterion("birthday <>", value, "birthday");
+            return (Criteria) this;
+        }
+
+        public Criteria andBirthdayGreaterThan(Date value) {
+            addCriterion("birthday >", value, "birthday");
+            return (Criteria) this;
+        }
+
+        public Criteria andBirthdayGreaterThanOrEqualTo(Date value) {
+            addCriterion("birthday >=", value, "birthday");
+            return (Criteria) this;
+        }
+
+        public Criteria andBirthdayLessThan(Date value) {
+            addCriterion("birthday <", value, "birthday");
+            return (Criteria) this;
+        }
+
+        public Criteria andBirthdayLessThanOrEqualTo(Date value) {
+            addCriterion("birthday <=", value, "birthday");
+            return (Criteria) this;
+        }
+
+        public Criteria andBirthdayIn(List<Date> values) {
+            addCriterion("birthday in", values, "birthday");
+            return (Criteria) this;
+        }
+
+        public Criteria andBirthdayNotIn(List<Date> values) {
+            addCriterion("birthday not in", values, "birthday");
+            return (Criteria) this;
+        }
+
+        public Criteria andBirthdayBetween(Date value1, Date value2) {
+            addCriterion("birthday between", value1, value2, "birthday");
+            return (Criteria) this;
+        }
+
+        public Criteria andBirthdayNotBetween(Date value1, Date value2) {
+            addCriterion("birthday not between", value1, value2, "birthday");
+            return (Criteria) this;
+        }
+
+        public Criteria andCommentIsNull() {
+            addCriterion("comment is null");
+            return (Criteria) this;
+        }
+
+        public Criteria andCommentIsNotNull() {
+            addCriterion("comment is not null");
+            return (Criteria) this;
+        }
+
+        public Criteria andCommentEqualTo(String value) {
+            addCriterion("comment =", value, "comment");
+            return (Criteria) this;
+        }
+
+        public Criteria andCommentNotEqualTo(String value) {
+            addCriterion("comment <>", value, "comment");
+            return (Criteria) this;
+        }
+
+        public Criteria andCommentGreaterThan(String value) {
+            addCriterion("comment >", value, "comment");
+            return (Criteria) this;
+        }
+
+        public Criteria andCommentGreaterThanOrEqualTo(String value) {
+            addCriterion("comment >=", value, "comment");
+            return (Criteria) this;
+        }
+
+        public Criteria andCommentLessThan(String value) {
+            addCriterion("comment <", value, "comment");
+            return (Criteria) this;
+        }
+
+        public Criteria andCommentLessThanOrEqualTo(String value) {
+            addCriterion("comment <=", value, "comment");
+            return (Criteria) this;
+        }
+
+        public Criteria andCommentLike(String value) {
+            addCriterion("comment like", value, "comment");
+            return (Criteria) this;
+        }
+
+        public Criteria andCommentNotLike(String value) {
+            addCriterion("comment not like", value, "comment");
+            return (Criteria) this;
+        }
+
+        public Criteria andCommentIn(List<String> values) {
+            addCriterion("comment in", values, "comment");
+            return (Criteria) this;
+        }
+
+        public Criteria andCommentNotIn(List<String> values) {
+            addCriterion("comment not in", values, "comment");
+            return (Criteria) this;
+        }
+
+        public Criteria andCommentBetween(String value1, String value2) {
+            addCriterion("comment between", value1, value2, "comment");
+            return (Criteria) this;
+        }
+
+        public Criteria andCommentNotBetween(String value1, String value2) {
+            addCriterion("comment not between", value1, value2, "comment");
+            return (Criteria) this;
+        }
+
+        public Criteria andCreatedAtIsNull() {
+            addCriterion("created_at is null");
+            return (Criteria) this;
+        }
+
+        public Criteria andCreatedAtIsNotNull() {
+            addCriterion("created_at is not null");
+            return (Criteria) this;
+        }
+
+        public Criteria andCreatedAtEqualTo(Date value) {
+            addCriterion("created_at =", value, "createdAt");
+            return (Criteria) this;
+        }
+
+        public Criteria andCreatedAtNotEqualTo(Date value) {
+            addCriterion("created_at <>", value, "createdAt");
+            return (Criteria) this;
+        }
+
+        public Criteria andCreatedAtGreaterThan(Date value) {
+            addCriterion("created_at >", value, "createdAt");
+            return (Criteria) this;
+        }
+
+        public Criteria andCreatedAtGreaterThanOrEqualTo(Date value) {
+            addCriterion("created_at >=", value, "createdAt");
+            return (Criteria) this;
+        }
+
+        public Criteria andCreatedAtLessThan(Date value) {
+            addCriterion("created_at <", value, "createdAt");
+            return (Criteria) this;
+        }
+
+        public Criteria andCreatedAtLessThanOrEqualTo(Date value) {
+            addCriterion("created_at <=", value, "createdAt");
+            return (Criteria) this;
+        }
+
+        public Criteria andCreatedAtIn(List<Date> values) {
+            addCriterion("created_at in", values, "createdAt");
+            return (Criteria) this;
+        }
+
+        public Criteria andCreatedAtNotIn(List<Date> values) {
+            addCriterion("created_at not in", values, "createdAt");
+            return (Criteria) this;
+        }
+
+        public Criteria andCreatedAtBetween(Date value1, Date value2) {
+            addCriterion("created_at between", value1, value2, "createdAt");
+            return (Criteria) this;
+        }
+
+        public Criteria andCreatedAtNotBetween(Date value1, Date value2) {
+            addCriterion("created_at not between", value1, value2, "createdAt");
+            return (Criteria) this;
+        }
+
+        public Criteria andCreatedByIsNull() {
+            addCriterion("created_by is null");
+            return (Criteria) this;
+        }
+
+        public Criteria andCreatedByIsNotNull() {
+            addCriterion("created_by is not null");
+            return (Criteria) this;
+        }
+
+        public Criteria andCreatedByEqualTo(String value) {
+            addCriterion("created_by =", value, "createdBy");
+            return (Criteria) this;
+        }
+
+        public Criteria andCreatedByNotEqualTo(String value) {
+            addCriterion("created_by <>", value, "createdBy");
+            return (Criteria) this;
+        }
+
+        public Criteria andCreatedByGreaterThan(String value) {
+            addCriterion("created_by >", value, "createdBy");
+            return (Criteria) this;
+        }
+
+        public Criteria andCreatedByGreaterThanOrEqualTo(String value) {
+            addCriterion("created_by >=", value, "createdBy");
+            return (Criteria) this;
+        }
+
+        public Criteria andCreatedByLessThan(String value) {
+            addCriterion("created_by <", value, "createdBy");
+            return (Criteria) this;
+        }
+
+        public Criteria andCreatedByLessThanOrEqualTo(String value) {
+            addCriterion("created_by <=", value, "createdBy");
+            return (Criteria) this;
+        }
+
+        public Criteria andCreatedByLike(String value) {
+            addCriterion("created_by like", value, "createdBy");
+            return (Criteria) this;
+        }
+
+        public Criteria andCreatedByNotLike(String value) {
+            addCriterion("created_by not like", value, "createdBy");
+            return (Criteria) this;
+        }
+
+        public Criteria andCreatedByIn(List<String> values) {
+            addCriterion("created_by in", values, "createdBy");
+            return (Criteria) this;
+        }
+
+        public Criteria andCreatedByNotIn(List<String> values) {
+            addCriterion("created_by not in", values, "createdBy");
+            return (Criteria) this;
+        }
+
+        public Criteria andCreatedByBetween(String value1, String value2) {
+            addCriterion("created_by between", value1, value2, "createdBy");
+            return (Criteria) this;
+        }
+
+        public Criteria andCreatedByNotBetween(String value1, String value2) {
+            addCriterion("created_by not between", value1, value2, "createdBy");
+            return (Criteria) this;
+        }
+    }
+
+    public static class Criteria extends GeneratedCriteria {
+
+        protected Criteria() {
+            super();
+        }
+    }
+
+    public static class Criterion {
+        private String condition;
+
+        private Object value;
+
+        private Object secondValue;
+
+        private boolean noValue;
+
+        private boolean singleValue;
+
+        private boolean betweenValue;
+
+        private boolean listValue;
+
+        private String typeHandler;
+
+        public String getCondition() {
+            return condition;
+        }
+
+        public Object getValue() {
+            return value;
+        }
+
+        public Object getSecondValue() {
+            return secondValue;
+        }
+
+        public boolean isNoValue() {
+            return noValue;
+        }
+
+        public boolean isSingleValue() {
+            return singleValue;
+        }
+
+        public boolean isBetweenValue() {
+            return betweenValue;
+        }
+
+        public boolean isListValue() {
+            return listValue;
+        }
+
+        public String getTypeHandler() {
+            return typeHandler;
+        }
+
+        protected Criterion(String condition) {
+            super();
+            this.condition = condition;
+            this.typeHandler = null;
+            this.noValue = true;
+        }
+
+        protected Criterion(String condition, Object value, String typeHandler) {
+            super();
+            this.condition = condition;
+            this.value = value;
+            this.typeHandler = typeHandler;
+            if (value instanceof List<?>) {
+                this.listValue = true;
+            } else {
+                this.singleValue = true;
+            }
+        }
+
+        protected Criterion(String condition, Object value) {
+            this(condition, value, null);
+        }
+
+        protected Criterion(String condition, Object value, Object secondValue, String typeHandler) {
+            super();
+            this.condition = condition;
+            this.value = value;
+            this.secondValue = secondValue;
+            this.typeHandler = typeHandler;
+            this.betweenValue = true;
+        }
+
+        protected Criterion(String condition, Object value, Object secondValue) {
+            this(condition, value, secondValue, null);
+        }
+    }
+}

+ 133 - 0
pro-base/src/main/java/com/idea/demo/service/DemoApplyService.java

@@ -0,0 +1,133 @@
+package com.idea.demo.service;
+
+import com.github.pagehelper.PageHelper;
+import com.github.pagehelper.PageInfo;
+import com.idea.demo.mapper.DemoApplyMapper;
+import com.idea.demo.model.DemoApply;
+import com.idea.demo.model.DemoApplyExample;
+import com.rockstar.common.base.BaseService;
+import com.rockstar.common.support.Convert;
+import com.rockstar.frame.model.extend.DateTrans;
+import com.rockstar.frame.model.extend.Tablepar;
+import com.rockstar.util.SnowflakeIdWorker;
+import com.rockstar.util.StringUtils;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+
+import java.util.Date;
+import java.util.List;
+
+@Service
+public class DemoApplyService implements BaseService<DemoApply, DemoApplyExample> {
+
+    //文件mapper
+    @Autowired
+    private DemoApplyMapper modelMapper;
+
+    /**
+     * 分页查询
+     *
+     * @return
+     */
+    public PageInfo<DemoApply> list(Tablepar tablepar, DemoApply model, DateTrans dt) {
+        PageHelper.startPage(tablepar.getPageNum(), tablepar.getPageSize());
+        List<DemoApply> list = modelMapper.selectByExample(getCondition(model,dt));
+        PageInfo<DemoApply> pageInfo = new PageInfo<>(list);
+        return pageInfo;
+    }
+
+    /**
+     * 查询指定
+     *
+     * @return
+     */
+    public List<DemoApply> listAll(DemoApply model, DateTrans dt) {
+        return modelMapper.selectByExample(getCondition(model,dt));
+    }
+
+    private DemoApplyExample getCondition(DemoApply model, DateTrans dt) {
+        DemoApplyExample ex = new DemoApplyExample();
+        ex.setOrderByClause("created_at asc");
+        DemoApplyExample.Criteria criteria = ex.createCriteria();
+
+        if(StringUtils.isNotEmpty(model.getComment())){
+            criteria.andCommentLike("%"+model.getComment()+"%");
+        }
+        if(StringUtils.isNotEmpty(model.getTitle())){
+            criteria.andTitleLike("%"+model.getTitle()+"%");
+        }
+        if(StringUtils.isNotEmpty(model.getStatus())){
+            criteria.andStatusEqualTo(model.getStatus());
+        }
+        if(StringUtils.isNotEmpty(model.getType())){
+            criteria.andTypeEqualTo(model.getType());
+        }
+
+        return ex;
+    }
+
+    @Override
+    public int deleteByPrimaryKey(String ids) {
+        List<String> lista = Convert.toListStrArray(ids);
+        DemoApplyExample example = new DemoApplyExample();
+        example.createCriteria().andIdIn(lista);
+        return modelMapper.deleteByExample(example);
+    }
+
+    @Override
+    public DemoApply selectByPrimaryKey(String id) {
+        return modelMapper.selectByPrimaryKey(id);
+    }
+
+    @Override
+    public int updateByPrimaryKeySelective(DemoApply record) {
+        return modelMapper.updateByPrimaryKeySelective(record);
+    }
+
+    @Override
+    public int updateByExampleSelective(DemoApply record, DemoApplyExample example) {
+        return modelMapper.updateByExampleSelective(record, example);
+    }
+
+    @Override
+    public int updateByExample(DemoApply record, DemoApplyExample example) {
+        return modelMapper.updateByExample(record, example);
+    }
+
+    @Override
+    public List<DemoApply> selectByExample(DemoApplyExample example) {
+        return modelMapper.selectByExample(example);
+    }
+
+    @Override
+    public long countByExample(DemoApplyExample example) {
+        return modelMapper.countByExample(example);
+    }
+
+    public long countByExample(DemoApply model, DateTrans dt) {
+        return modelMapper.countByExample(getCondition(model,dt));
+    }
+
+    @Override
+    public int deleteByExample(DemoApplyExample example) {
+        return modelMapper.deleteByExample(example);
+    }
+
+    public int insert(DemoApply record){
+        record.setId(SnowflakeIdWorker.getUUID());
+        return insertWithoutId(record);
+    }
+
+    public int insertWithoutId(DemoApply record){
+        record.setCreatedAt(new Date());
+        return modelMapper.insert(record);
+    }
+
+    @Override
+    public int insertSelective(DemoApply record) {
+        record.setId(SnowflakeIdWorker.getUUID());
+        record.setCreatedAt(new Date());
+        return modelMapper.insertSelective(record);
+    }
+
+}

+ 137 - 0
pro-base/src/main/java/com/idea/demo/service/DemoStudentService.java

@@ -0,0 +1,137 @@
+package com.idea.demo.service;
+
+import com.github.pagehelper.PageHelper;
+import com.github.pagehelper.PageInfo;
+import com.idea.demo.mapper.DemoStudentMapper;
+import com.idea.demo.model.DemoStudent;
+import com.idea.demo.model.DemoStudentExample;
+import com.rockstar.common.base.BaseService;
+import com.rockstar.common.support.Convert;
+import com.rockstar.frame.model.extend.DateTrans;
+import com.rockstar.frame.model.extend.Tablepar;
+import com.rockstar.util.DateUtils;
+import com.rockstar.util.SnowflakeIdWorker;
+import com.rockstar.util.StringUtils;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+
+import java.util.Date;
+import java.util.List;
+
+@Service
+public class DemoStudentService implements BaseService<DemoStudent, DemoStudentExample> {
+
+    //文件mapper
+    @Autowired
+    private DemoStudentMapper modelMapper;
+
+    /**
+     * 分页查询
+     *
+     * @return
+     */
+    public PageInfo<DemoStudent> list(Tablepar tablepar, DemoStudent model, DateTrans dt) {
+        PageHelper.startPage(tablepar.getPageNum(), tablepar.getPageSize());
+        List<DemoStudent> list = modelMapper.selectByExample(getCondition(model,dt));
+        PageInfo<DemoStudent> pageInfo = new PageInfo<>(list);
+        return pageInfo;
+    }
+
+    /**
+     * 查询指定
+     *
+     * @return
+     */
+    public List<DemoStudent> listAll(DemoStudent model, DateTrans dt) {
+        return modelMapper.selectByExample(getCondition(model,dt));
+    }
+
+    private DemoStudentExample getCondition(DemoStudent model, DateTrans dt) {
+        DemoStudentExample ex = new DemoStudentExample();
+        ex.setOrderByClause("created_at asc");
+        DemoStudentExample.Criteria criteria = ex.createCriteria();
+
+        if(StringUtils.isNotEmpty(model.getName())){
+            criteria.andNameLike("%"+model.getName()+"%");
+        }
+        if(StringUtils.isNotEmpty(model.getGender())){
+            criteria.andGenderEqualTo(model.getGender());
+        }
+
+        if(dt != null){
+            if(StringUtils.isNotEmpty(dt.getDate_from_1())){
+                criteria.andCreatedAtGreaterThanOrEqualTo(DateUtils.string2Date(dt.getDate_from_1()));
+            }
+            if(StringUtils.isNotEmpty(dt.getDate_to_1())){
+                criteria.andCreatedAtLessThanOrEqualTo(DateUtils.string2Date(dt.getDate_to_1()));
+            }
+        }
+
+        return ex;
+    }
+
+    @Override
+    public int deleteByPrimaryKey(String ids) {
+        List<String> lista = Convert.toListStrArray(ids);
+        DemoStudentExample example = new DemoStudentExample();
+        example.createCriteria().andIdIn(lista);
+        return modelMapper.deleteByExample(example);
+    }
+
+    @Override
+    public DemoStudent selectByPrimaryKey(String id) {
+        return modelMapper.selectByPrimaryKey(id);
+    }
+
+    @Override
+    public int updateByPrimaryKeySelective(DemoStudent record) {
+        return modelMapper.updateByPrimaryKeySelective(record);
+    }
+
+    @Override
+    public int updateByExampleSelective(DemoStudent record, DemoStudentExample example) {
+        return modelMapper.updateByExampleSelective(record, example);
+    }
+
+    @Override
+    public int updateByExample(DemoStudent record, DemoStudentExample example) {
+        return modelMapper.updateByExample(record, example);
+    }
+
+    @Override
+    public List<DemoStudent> selectByExample(DemoStudentExample example) {
+        return modelMapper.selectByExample(example);
+    }
+
+    @Override
+    public long countByExample(DemoStudentExample example) {
+        return modelMapper.countByExample(example);
+    }
+
+    public long countByExample(DemoStudent model, DateTrans dt) {
+        return modelMapper.countByExample(getCondition(model,dt));
+    }
+
+    @Override
+    public int deleteByExample(DemoStudentExample example) {
+        return modelMapper.deleteByExample(example);
+    }
+
+    public int insert(DemoStudent record){
+        record.setId(SnowflakeIdWorker.getUUID());
+        return insertWithoutId(record);
+    }
+
+    public int insertWithoutId(DemoStudent record){
+        record.setCreatedAt(new Date());
+        return modelMapper.insert(record);
+    }
+
+    @Override
+    public int insertSelective(DemoStudent record) {
+        record.setId(SnowflakeIdWorker.getUUID());
+        record.setCreatedAt(new Date());
+        return modelMapper.insertSelective(record);
+    }
+
+}

+ 37 - 0
pro-base/src/main/java/com/idea/kafka/KafkaConsumer.java

@@ -0,0 +1,37 @@
+package com.idea.kafka;
+
+import lombok.AllArgsConstructor;
+import lombok.extern.slf4j.Slf4j;
+import org.apache.kafka.clients.consumer.ConsumerRecord;
+import org.springframework.kafka.annotation.KafkaListener;
+import org.springframework.stereotype.Component;
+
+/**
+ *
+ * <一句话功能简述>
+ * <功能详细描述>
+ *
+ * @author pengyq
+ * @version [版本号,2020年5月24日]
+ * @see [相关类/方法]
+ * @since [产品/模块版本]
+ */
+@Component
+@AllArgsConstructor
+@Slf4j
+public class KafkaConsumer {
+
+
+    @KafkaListener(topics = "lifeline_handle", groupId = "lifeline")
+    public void rawData(ConsumerRecord consumerRecord) {
+        Object value = consumerRecord.value();
+        Object offset = consumerRecord.offset();
+
+        if (null == value) {
+            System.err.println("kafka消费数据为空");
+        }
+        System.out.println("通行证: OffSet -> "+offset+", data -> "+(String) value);
+    }
+
+
+}

+ 36 - 0
pro-base/src/main/java/com/idea/kafka/KafkaProducer.java

@@ -0,0 +1,36 @@
+package com.idea.kafka;
+
+import lombok.AllArgsConstructor;
+import lombok.extern.slf4j.Slf4j;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.kafka.core.KafkaTemplate;
+import org.springframework.stereotype.Component;
+
+@Component
+@AllArgsConstructor
+public class KafkaProducer {
+
+    private static final Logger log = LoggerFactory.getLogger(KafkaProducer.class);
+
+    @Autowired
+    private KafkaTemplate<String, String> kafkaTemplate;
+
+    public void sendData(String data){
+
+        try {
+            for (int i = 0; i < 10; i++)
+            {
+                kafkaTemplate.send("test", "这是测试的数据==> "+data+" i ="+i );
+                Thread.sleep(1000);
+            }
+
+        }catch (Exception e){
+            e.printStackTrace();
+            log.error("出错!!!!!!!!!!!");
+        }
+
+    }
+
+}

+ 109 - 0
pro-base/src/main/java/com/idea/pro/config/ProConfig.java

@@ -0,0 +1,109 @@
+package com.idea.pro.config;
+
+import org.apache.catalina.connector.Connector;
+import org.apache.coyote.http11.Http11NioProtocol;
+import org.springframework.boot.web.embedded.tomcat.TomcatConnectorCustomizer;
+import org.springframework.boot.web.embedded.tomcat.TomcatServletWebServerFactory;
+import org.springframework.boot.web.servlet.FilterRegistrationBean;
+import org.springframework.context.annotation.Bean;
+import org.springframework.context.annotation.Configuration;
+import org.springframework.web.filter.OncePerRequestFilter;
+
+import javax.servlet.FilterChain;
+import javax.servlet.ServletException;
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+import java.io.IOException;
+
+@Configuration
+public class ProConfig {
+
+    /**
+     * Slow Attack 问题修正
+     * @return
+     */
+    @Bean
+    public TomcatServletWebServerFactory createServletFactory() {
+
+        TomcatServletWebServerFactory tomcatFactory = new TomcatServletWebServerFactory();
+
+        // tomcatFactory.setPort(8081);
+        tomcatFactory.addConnectorCustomizers(new MyTomcatConnectorCustomizer());
+
+        return tomcatFactory;
+    }
+
+
+
+    class MyTomcatConnectorCustomizer implements TomcatConnectorCustomizer {
+
+        @Override
+        public void customize(Connector connector) {
+
+            Http11NioProtocol protocol = (Http11NioProtocol) connector.getProtocolHandler();
+
+            //设置最大连接数
+            // protocol.setMaxConnections(2000);
+
+            //设置最大线程数
+            // protocol.setMaxThreads(2000);
+
+            protocol.setConnectionTimeout(8000); //就是这一句起作用了
+
+        }
+    }
+
+    /**
+     * Option问题过滤器修正
+     * @return
+     */
+    @Bean
+    public FilterRegistrationBean filterRegistration(){
+        // 新建过滤器注册类
+        FilterRegistrationBean registration = new FilterRegistrationBean();
+        // 添加自定义 过滤器
+        // 此处添加了Option问题过滤器
+        registration.setFilter(new OptionFilter());
+        // 设置过滤器的URL模式
+        registration.addUrlPatterns("/*");
+        //设置过滤器顺序
+        registration.setOrder(1);
+        return registration;
+    }
+
+    class OptionFilter extends OncePerRequestFilter {
+
+        @Override
+        protected void doFilterInternal(HttpServletRequest request, HttpServletResponse response, FilterChain filterChain)
+                throws ServletException, IOException {
+
+            if (request.getMethod().equals("OPTIONS")) {
+
+                response.sendError(HttpServletResponse.SC_METHOD_NOT_ALLOWED);
+
+            } else {
+
+                filterChain.doFilter(request, response);
+
+            }
+        }
+    }
+
+//    @Bean
+//    public ConfigurableServletWebServerFactory configurableServletWebServerFactory() {
+//        TomcatServletWebServerFactory factory = new TomcatServletWebServerFactory();
+//        factory.setProtocol("org.apache.coyote.http11.Http11NioProtocol");
+//        factory.setPort(8850);
+//        factory.addConnectorCustomizers(connector -> {
+//            Http11NioProtocol protocol = (Http11NioProtocol) connector.getProtocolHandler();
+//            protocol.setDisableUploadTimeout(false);
+//            //protocol.setAcceptCount(200);
+//            //protocol.setMaxConnections(200);
+////            protocol.setMaxHeaderCount(20000);
+////            protocol.setConnectionTimeout(20000);
+//            protocol.setMaxHttpHeaderSize(65546);
+////            protocol.setMaxSavePostSize(4194304);
+//        });
+//        return factory;
+//    }
+}

+ 59 - 0
pro-base/src/main/java/com/idea/pro/config/ProSwagger.java

@@ -0,0 +1,59 @@
+package com.idea.pro.config;
+
+import com.github.xiaoymin.swaggerbootstrapui.annotations.EnableSwaggerBootstrapUI;
+import org.springframework.context.annotation.Bean;
+import org.springframework.context.annotation.Configuration;
+import springfox.documentation.builders.ApiInfoBuilder;
+import springfox.documentation.builders.PathSelectors;
+import springfox.documentation.builders.RequestHandlerSelectors;
+import springfox.documentation.service.ApiInfo;
+import springfox.documentation.spi.DocumentationType;
+import springfox.documentation.spring.web.plugins.Docket;
+import springfox.documentation.swagger2.annotations.EnableSwagger2;
+
+/**
+ * swagger在线文档配置<br>
+ * 项目启动后可通过地址:http://host:ip/swagger-ui.html 查看在线文档
+ *
+ * @author
+ * @version 2018-07-24
+ */
+@EnableSwaggerBootstrapUI
+@Configuration
+@EnableSwagger2
+public class ProSwagger {
+
+    @Bean
+    public Docket demoDocket() {
+
+        return new Docket(DocumentationType.SWAGGER_2)
+                .groupName("demo")
+                .apiInfo(apiInfo("Demo API","样例功能API"))
+                .select()
+                .apis(RequestHandlerSelectors.basePackage("com.idea.demo.controller"))
+                .paths(PathSelectors.any())
+                .build();
+    }
+
+    @Bean
+    public Docket proDocket() {
+
+        return new Docket(DocumentationType.SWAGGER_2)
+                .groupName("pro")
+                .apiInfo(apiInfo("Project API","业务项目API"))
+                .select()
+                .apis(RequestHandlerSelectors.basePackage("com.idea.pro.controller"))
+                .paths(PathSelectors.any())
+                .build();
+    }
+
+    private ApiInfo apiInfo(String title, String desc) {
+        return new ApiInfoBuilder()
+                .title(title)
+                .description(desc)
+                .termsOfServiceUrl("http://localhost:9001")
+                .contact("pengyq")
+                .version("1.0")
+                .build();
+    }
+}

+ 54 - 0
pro-base/src/main/java/com/idea/pro/controller/PubController.java

@@ -0,0 +1,54 @@
+package com.idea.pro.controller;
+
+import com.google.code.kaptcha.Constants;
+import com.rockstar.common.log.Log;
+import com.rockstar.frame.controller.HomeController;
+import com.rockstar.shiro.authc.EasyTypeToken;
+import com.rockstar.util.Constant;
+import com.rockstar.util.StringUtils;
+import io.swagger.annotations.Api;
+import org.apache.shiro.SecurityUtils;
+import org.springframework.stereotype.Controller;
+import org.springframework.web.bind.annotation.PostMapping;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.ResponseBody;
+
+import javax.servlet.http.HttpServletRequest;
+import java.util.Map;
+import java.util.UUID;
+
+/**
+ * Created by pengyq on 2020.
+ */
+@Controller
+@RequestMapping(value = "pub")
+@Api(value="公共控制类")
+public class PubController extends HomeController {
+
+    @Log(title = "免密登录")
+    @PostMapping("/loginSecret")
+    @ResponseBody
+    public Map<String, Object> loginByKey(String userName, HttpServletRequest request) {
+
+        try {
+            Constant.getInstance().setUserType(Constant.USER_TYPE_MANAGER);
+            String code = UUID.randomUUID().toString();
+            request.getSession().setAttribute(Constants.KAPTCHA_SESSION_KEY, code);
+            Map<String, Object> view = loginView(userName, null,code,null,false,request, true, EasyTypeToken.LoginType.NOPASSWD);
+            view.put(Constant.VIEW_KEY_USER_TYPE, Constant.USER_TYPE_MANAGER);
+            view.put(Constant.VIEW_KEY_TOKEN, "admin-token");
+
+            SecurityUtils.getSubject().getSession().setTimeout(3600000L);
+            return view;
+        } catch (Exception e) {
+            String msg = "用户或密码错误";
+            if (StringUtils.isNotEmpty(e.getMessage())) {
+                msg = e.getMessage();
+            }
+            return error(msg);
+        }
+    }
+
+
+
+}

+ 27 - 0
pro-base/src/main/java/com/idea/pro/service/SafeRequestInfo.java

@@ -0,0 +1,27 @@
+package com.idea.pro.service;
+
+import cn.hutool.core.collection.CollUtil;
+import com.rockstar.common.interceptor.SafeUrlModel;
+import org.springframework.stereotype.Service;
+
+import java.util.List;
+
+@Service
+public class SafeRequestInfo implements SafeUrlModel {
+
+    private static final List<String> safeSrcUrl = CollUtil.newArrayList("http://localhost:9525/");
+
+    @Override
+    public boolean isSafe(String referer){
+        boolean flag = false;
+        for (String s : safeSrcUrl) {
+            if(flag)
+                continue;
+            if(referer.startsWith(s)){
+                flag = true;
+            }
+        }
+        return flag;
+    }
+
+}

+ 77 - 0
pro-base/src/main/java/com/slave/demo/controller/DemoClassController.java

@@ -0,0 +1,77 @@
+package com.slave.demo.controller;
+
+import com.github.pagehelper.PageInfo;
+import com.rockstar.common.base.BaseController;
+import com.rockstar.common.domain.AjaxResult;
+import com.rockstar.frame.model.extend.DateTrans;
+import com.rockstar.frame.model.extend.TableSplitResult;
+import com.rockstar.frame.model.extend.Tablepar;
+import com.slave.demo.model.DemoClass;
+import com.slave.demo.service.DemoClassService;
+import io.swagger.annotations.Api;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Controller;
+import org.springframework.web.bind.annotation.PathVariable;
+import org.springframework.web.bind.annotation.PostMapping;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.ResponseBody;
+
+import java.util.Date;
+
+/**
+ * Created by pengyq on 2023.
+ */
+@Controller
+@RequestMapping(value = "DemoClassController")
+@Api(value="演示班级管理")
+public class DemoClassController extends BaseController {
+
+    //主表
+    @Autowired
+    private DemoClassService modelService;
+
+
+    @PostMapping(value = "list",produces = {"application/json;charset=UTF-8"})
+    @ResponseBody
+    public Object list(Tablepar tablepar, DemoClass model){
+        PageInfo<DemoClass> page= modelService.list(tablepar,model);
+        TableSplitResult<DemoClass> result=new TableSplitResult<DemoClass>(page.getPageNum(), page.getTotal(), page.getList());
+        return  result;
+    }
+
+    @PostMapping(value = "listAll",produces = {"application/json;charset=UTF-8"})
+    @ResponseBody
+    public Object listAll(DemoClass model, DateTrans dt){
+        return  modelService.listAll(model);
+    }
+
+    @PostMapping(value = "add",produces = {"application/json;charset=UTF-8"})
+    @ResponseBody
+    public AjaxResult add(DemoClass record){
+        record.setCreatedAt(new Date());
+        int result = modelService.insert(record);
+        return result(result);
+    }
+
+    @PostMapping(value = "remove/{id}",produces = {"application/json;charset=UTF-8"})
+    @ResponseBody
+    public AjaxResult remove(@PathVariable("id") String id){
+        int result = modelService.deleteByPrimaryKey(id);
+        return result(result);
+    }
+
+    @PostMapping(value = "edit",produces = {"application/json;charset=UTF-8"})
+    @ResponseBody
+    public AjaxResult editSave(DemoClass model){
+        int result = modelService.updateByPrimaryKeySelective(model);
+        return result(result);
+    }
+
+    @PostMapping(value = "getById",produces = {"application/json;charset=UTF-8"})
+    @ResponseBody
+    public DemoClass getById(String id) {
+        return modelService.selectByPrimaryKey(id);
+    }
+
+
+}

+ 13 - 0
pro-base/src/main/java/com/slave/demo/mapper/DemoClassMapper.java

@@ -0,0 +1,13 @@
+package com.slave.demo.mapper;
+
+import com.slave.demo.model.DemoClass;
+import org.apache.ibatis.annotations.Param;
+import org.apache.ibatis.annotations.Select;
+import tk.mybatis.mapper.common.Mapper;
+
+public interface DemoClassMapper extends Mapper<DemoClass> {
+
+    //返回组合起来的快检+报告值
+    @Select("select * from edu_report a , quick_report_detail b WHERE a.quick_report_id = b.id AND b.id =  #{quickReportId}")
+    DemoClass reportQucikAll(@Param("quickReportId")String quickReportId);
+}

+ 63 - 0
pro-base/src/main/java/com/slave/demo/model/DemoClass.java

@@ -0,0 +1,63 @@
+package com.slave.demo.model;
+
+import javax.persistence.Id;
+import javax.persistence.Table;
+import java.io.Serializable;
+import java.util.Date;
+
+@Table(name = "demo_class")
+public class DemoClass implements Serializable {
+
+    @Id
+    private String id;
+
+    private String name;
+
+    private String grade;
+
+    private Date createdAt;
+
+    private String createdBy;
+
+    private static final long serialVersionUID = 1L;
+
+    public String getId() {
+        return id;
+    }
+
+    public void setId(String id) {
+        this.id = id == null ? null : id.trim();
+    }
+
+    public String getName() {
+        return name;
+    }
+
+    public void setName(String name) {
+        this.name = name == null ? null : name.trim();
+    }
+
+    public String getGrade() {
+        return grade;
+    }
+
+    public void setGrade(String grade) {
+        this.grade = grade == null ? null : grade.trim();
+    }
+
+    public Date getCreatedAt() {
+        return createdAt;
+    }
+
+    public void setCreatedAt(Date createdAt) {
+        this.createdAt = createdAt;
+    }
+
+    public String getCreatedBy() {
+        return createdBy;
+    }
+
+    public void setCreatedBy(String createdBy) {
+        this.createdBy = createdBy == null ? null : createdBy.trim();
+    }
+}

+ 116 - 0
pro-base/src/main/java/com/slave/demo/service/DemoClassService.java

@@ -0,0 +1,116 @@
+package com.slave.demo.service;
+
+import com.github.pagehelper.PageHelper;
+import com.github.pagehelper.PageInfo;
+import com.rockstar.frame.model.extend.Tablepar;
+import com.rockstar.util.SnowflakeIdWorker;
+import com.rockstar.util.StringUtils;
+import com.slave.demo.mapper.DemoClassMapper;
+import com.slave.demo.model.DemoClass;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+import org.springframework.transaction.annotation.Transactional;
+import tk.mybatis.mapper.entity.Example;
+
+import java.util.List;
+
+@Service
+public class DemoClassService {
+
+    //文件mapper
+    @Autowired
+    private DemoClassMapper modelMapper;
+
+    /**
+     * 分页查询+条件
+     *
+     * @return
+     */
+    public PageInfo<DemoClass> list(Tablepar tablepar, DemoClass model) {
+        PageHelper.startPage(tablepar.getPageNum(), tablepar.getPageSize());
+        List<DemoClass> list = modelMapper.selectByExample(getCondition(model));
+        PageInfo<DemoClass> pageInfo = new PageInfo<>(list);
+        return pageInfo;
+    }
+
+    /**
+     * 查询指定 条件查询
+     *
+     * @return
+     */
+    public List<DemoClass> listAll(DemoClass model) {
+        return modelMapper.selectByExample(getCondition(model));
+    }
+
+    private Example getCondition(DemoClass model) {
+        Example example = new Example(DemoClass.class);
+        Example.Criteria criteria = example.createCriteria();
+        if(StringUtils.isNotEmpty(model.getGrade())) {
+            criteria.andEqualTo("grade",model.getGrade());
+        }
+        if(StringUtils.isNotEmpty(model.getName())) {
+            criteria.andLike("name",model.getName());
+        }
+        example.orderBy("createdAt").desc();
+
+        return example;
+    }
+
+    /**
+     * 根据id删除
+     * @param ids
+     * @return
+     */
+
+
+    public int deleteByPrimaryKey(String ids) {
+        return modelMapper.deleteByPrimaryKey(ids);
+    }
+
+    /**
+     *根据id查询
+     * @param id
+     * @return
+     */
+
+    public DemoClass selectByPrimaryKey(String id) {
+        return  modelMapper.selectByPrimaryKey(id);
+    }
+
+    public int updateByPrimaryKeySelective(DemoClass model) {
+        return modelMapper.updateByPrimaryKeySelective(model);
+    }
+
+    public int updateByExampleSelective(DemoClass model,Example example) {
+        return modelMapper.updateByExampleSelective(model, example);
+    }
+
+    public int updateByExample(DemoClass model, Example example) {
+        return modelMapper.updateByExample(model, example);
+    }
+
+    public List<DemoClass> selectByExample(Example example) {
+        return modelMapper.selectByExample(example);
+    }
+
+    public long countByExample(Example example) {
+        return modelMapper.selectCountByExample(example);
+    }
+
+    public int deleteByExample(Example example) {
+        return modelMapper.deleteByExample(example);
+    }
+
+    public int insert(DemoClass model){
+        model.setId(SnowflakeIdWorker.getUUID());
+        return modelMapper.insert(model);
+    }
+
+    @Transactional(value="slaveTransactionManager")
+    public int insertSelective(DemoClass model) {
+        model.setId(SnowflakeIdWorker.getUUID());
+        return modelMapper.insertSelective(model);
+
+    }
+
+}

+ 19 - 0
pro-base/src/main/resources/application.yml

@@ -0,0 +1,19 @@
+spring:
+  profiles:
+    active: frame, system
+  messages:
+    encoding: UTF-8
+
+mybatis :
+  mapperLocations : classpath*:mybatis/*/*.xml
+  executor-type : reuse
+  type-aliases-package : com.*.model
+  configuration :
+    map-underscore-to-camel-case : true
+
+
+logging:
+  level:
+    root:  ERROR
+    org.springframework:  ERROR
+    org.mybatis:  ERROR

+ 273 - 0
pro-base/src/main/resources/mybatis/demo/DemoApplyMapper.xml

@@ -0,0 +1,273 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+<mapper namespace="com.idea.demo.mapper.DemoApplyMapper">
+  <resultMap id="BaseResultMap" type="com.idea.demo.model.DemoApply">
+    <id column="id" jdbcType="VARCHAR" property="id" />
+    <result column="title" jdbcType="VARCHAR" property="title" />
+    <result column="type" jdbcType="VARCHAR" property="type" />
+    <result column="comment" jdbcType="VARCHAR" property="comment" />
+    <result column="status" jdbcType="VARCHAR" property="status" />
+    <result column="apply_at" jdbcType="TIMESTAMP" property="applyAt" />
+    <result column="process_instance_id" jdbcType="VARCHAR" property="processInstanceId" />
+    <result column="created_at" jdbcType="TIMESTAMP" property="createdAt" />
+    <result column="created_by" jdbcType="VARCHAR" property="createdBy" />
+  </resultMap>
+  <sql id="Example_Where_Clause">
+    <where>
+      <foreach collection="oredCriteria" item="criteria" separator="or">
+        <if test="criteria.valid">
+          <trim prefix="(" prefixOverrides="and" suffix=")">
+            <foreach collection="criteria.criteria" item="criterion">
+              <choose>
+                <when test="criterion.noValue">
+                  and ${criterion.condition}
+                </when>
+                <when test="criterion.singleValue">
+                  and ${criterion.condition} #{criterion.value}
+                </when>
+                <when test="criterion.betweenValue">
+                  and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
+                </when>
+                <when test="criterion.listValue">
+                  and ${criterion.condition}
+                  <foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
+                    #{listItem}
+                  </foreach>
+                </when>
+              </choose>
+            </foreach>
+          </trim>
+        </if>
+      </foreach>
+    </where>
+  </sql>
+  <sql id="Update_By_Example_Where_Clause">
+    <where>
+      <foreach collection="example.oredCriteria" item="criteria" separator="or">
+        <if test="criteria.valid">
+          <trim prefix="(" prefixOverrides="and" suffix=")">
+            <foreach collection="criteria.criteria" item="criterion">
+              <choose>
+                <when test="criterion.noValue">
+                  and ${criterion.condition}
+                </when>
+                <when test="criterion.singleValue">
+                  and ${criterion.condition} #{criterion.value}
+                </when>
+                <when test="criterion.betweenValue">
+                  and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
+                </when>
+                <when test="criterion.listValue">
+                  and ${criterion.condition}
+                  <foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
+                    #{listItem}
+                  </foreach>
+                </when>
+              </choose>
+            </foreach>
+          </trim>
+        </if>
+      </foreach>
+    </where>
+  </sql>
+  <sql id="Base_Column_List">
+    id, title, type, comment, status, apply_at, process_instance_id, created_at, created_by
+  </sql>
+  <select id="selectByExample" parameterType="com.idea.demo.model.DemoApplyExample" resultMap="BaseResultMap">
+    select
+    <if test="distinct">
+      distinct
+    </if>
+    <include refid="Base_Column_List" />
+    from demo_apply
+    <if test="_parameter != null">
+      <include refid="Example_Where_Clause" />
+    </if>
+    <if test="orderByClause != null">
+      order by ${orderByClause}
+    </if>
+  </select>
+  <select id="selectByPrimaryKey" parameterType="java.lang.String" resultMap="BaseResultMap">
+    select 
+    <include refid="Base_Column_List" />
+    from demo_apply
+    where id = #{id,jdbcType=VARCHAR}
+  </select>
+  <delete id="deleteByPrimaryKey" parameterType="java.lang.String">
+    delete from demo_apply
+    where id = #{id,jdbcType=VARCHAR}
+  </delete>
+  <delete id="deleteByExample" parameterType="com.idea.demo.model.DemoApplyExample">
+    delete from demo_apply
+    <if test="_parameter != null">
+      <include refid="Example_Where_Clause" />
+    </if>
+  </delete>
+  <insert id="insert" parameterType="com.idea.demo.model.DemoApply">
+    <selectKey keyProperty="id" order="AFTER" resultType="java.lang.String">
+      SELECT LAST_INSERT_ID()
+    </selectKey>
+    insert into demo_apply (id, title, type, comment,
+      status, apply_at, process_instance_id, 
+      created_at, created_by)
+    values (#{id,jdbcType=VARCHAR}, #{title,jdbcType=VARCHAR}, #{type,jdbcType=VARCHAR}, #{comment,jdbcType=VARCHAR},
+      #{status,jdbcType=VARCHAR}, #{applyAt,jdbcType=TIMESTAMP}, #{processInstanceId,jdbcType=VARCHAR}, 
+      #{createdAt,jdbcType=TIMESTAMP}, #{createdBy,jdbcType=VARCHAR})
+  </insert>
+  <insert id="insertSelective" parameterType="com.idea.demo.model.DemoApply">
+    <selectKey keyProperty="id" order="AFTER" resultType="java.lang.String">
+      SELECT LAST_INSERT_ID()
+    </selectKey>
+    insert into demo_apply
+    <trim prefix="(" suffix=")" suffixOverrides=",">
+      <if test="title != null">
+        title,
+      </if>
+      <if test="type != null">
+        type,
+      </if>
+      <if test="comment != null">
+        comment,
+      </if>
+      <if test="status != null">
+        status,
+      </if>
+      <if test="applyAt != null">
+        apply_at,
+      </if>
+      <if test="processInstanceId != null">
+        process_instance_id,
+      </if>
+      <if test="createdAt != null">
+        created_at,
+      </if>
+      <if test="createdBy != null">
+        created_by,
+      </if>
+    </trim>
+    <trim prefix="values (" suffix=")" suffixOverrides=",">
+      <if test="title != null">
+        #{title,jdbcType=VARCHAR},
+      </if>
+      <if test="type != null">
+        #{type,jdbcType=VARCHAR},
+      </if>
+      <if test="comment != null">
+        #{comment,jdbcType=VARCHAR},
+      </if>
+      <if test="status != null">
+        #{status,jdbcType=VARCHAR},
+      </if>
+      <if test="applyAt != null">
+        #{applyAt,jdbcType=TIMESTAMP},
+      </if>
+      <if test="processInstanceId != null">
+        #{processInstanceId,jdbcType=VARCHAR},
+      </if>
+      <if test="createdAt != null">
+        #{createdAt,jdbcType=TIMESTAMP},
+      </if>
+      <if test="createdBy != null">
+        #{createdBy,jdbcType=VARCHAR},
+      </if>
+    </trim>
+  </insert>
+  <select id="countByExample" parameterType="com.idea.demo.model.DemoApplyExample" resultType="java.lang.Long">
+    select count(*) from demo_apply
+    <if test="_parameter != null">
+      <include refid="Example_Where_Clause" />
+    </if>
+  </select>
+  <update id="updateByExampleSelective" parameterType="map">
+    update demo_apply
+    <set>
+      <if test="record.id != null">
+        id = #{record.id,jdbcType=VARCHAR},
+      </if>
+      <if test="record.title != null">
+        title = #{record.title,jdbcType=VARCHAR},
+      </if>
+      <if test="record.type != null">
+        type = #{record.type,jdbcType=VARCHAR},
+      </if>
+      <if test="record.comment != null">
+        comment = #{record.comment,jdbcType=VARCHAR},
+      </if>
+      <if test="record.status != null">
+        status = #{record.status,jdbcType=VARCHAR},
+      </if>
+      <if test="record.applyAt != null">
+        apply_at = #{record.applyAt,jdbcType=TIMESTAMP},
+      </if>
+      <if test="record.processInstanceId != null">
+        process_instance_id = #{record.processInstanceId,jdbcType=VARCHAR},
+      </if>
+      <if test="record.createdAt != null">
+        created_at = #{record.createdAt,jdbcType=TIMESTAMP},
+      </if>
+      <if test="record.createdBy != null">
+        created_by = #{record.createdBy,jdbcType=VARCHAR},
+      </if>
+    </set>
+    <if test="_parameter != null">
+      <include refid="Update_By_Example_Where_Clause" />
+    </if>
+  </update>
+  <update id="updateByExample" parameterType="map">
+    update demo_apply
+    set id = #{record.id,jdbcType=VARCHAR},
+      title = #{record.title,jdbcType=VARCHAR},
+      type = #{record.type,jdbcType=VARCHAR},
+      comment = #{record.comment,jdbcType=VARCHAR},
+      status = #{record.status,jdbcType=VARCHAR},
+      apply_at = #{record.applyAt,jdbcType=TIMESTAMP},
+      process_instance_id = #{record.processInstanceId,jdbcType=VARCHAR},
+      created_at = #{record.createdAt,jdbcType=TIMESTAMP},
+      created_by = #{record.createdBy,jdbcType=VARCHAR}
+    <if test="_parameter != null">
+      <include refid="Update_By_Example_Where_Clause" />
+    </if>
+  </update>
+  <update id="updateByPrimaryKeySelective" parameterType="com.idea.demo.model.DemoApply">
+    update demo_apply
+    <set>
+      <if test="title != null">
+        title = #{title,jdbcType=VARCHAR},
+      </if>
+      <if test="type != null">
+        type = #{type,jdbcType=VARCHAR},
+      </if>
+      <if test="comment != null">
+        comment = #{comment,jdbcType=VARCHAR},
+      </if>
+      <if test="status != null">
+        status = #{status,jdbcType=VARCHAR},
+      </if>
+      <if test="applyAt != null">
+        apply_at = #{applyAt,jdbcType=TIMESTAMP},
+      </if>
+      <if test="processInstanceId != null">
+        process_instance_id = #{processInstanceId,jdbcType=VARCHAR},
+      </if>
+      <if test="createdAt != null">
+        created_at = #{createdAt,jdbcType=TIMESTAMP},
+      </if>
+      <if test="createdBy != null">
+        created_by = #{createdBy,jdbcType=VARCHAR},
+      </if>
+    </set>
+    where id = #{id,jdbcType=VARCHAR}
+  </update>
+  <update id="updateByPrimaryKey" parameterType="com.idea.demo.model.DemoApply">
+    update demo_apply
+    set title = #{title,jdbcType=VARCHAR},
+      type = #{type,jdbcType=VARCHAR},
+      comment = #{comment,jdbcType=VARCHAR},
+      status = #{status,jdbcType=VARCHAR},
+      apply_at = #{applyAt,jdbcType=TIMESTAMP},
+      process_instance_id = #{processInstanceId,jdbcType=VARCHAR},
+      created_at = #{createdAt,jdbcType=TIMESTAMP},
+      created_by = #{createdBy,jdbcType=VARCHAR}
+    where id = #{id,jdbcType=VARCHAR}
+  </update>
+</mapper>

+ 249 - 0
pro-base/src/main/resources/mybatis/demo/DemoStudentMapper.xml

@@ -0,0 +1,249 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+<mapper namespace="com.idea.demo.mapper.DemoStudentMapper">
+  <resultMap id="BaseResultMap" type="com.idea.demo.model.DemoStudent">
+    <id column="id" jdbcType="VARCHAR" property="id" />
+    <result column="name" jdbcType="VARCHAR" property="name" />
+    <result column="gender" jdbcType="VARCHAR" property="gender" />
+    <result column="birthday" jdbcType="TIMESTAMP" property="birthday" />
+    <result column="comment" jdbcType="VARCHAR" property="comment" />
+    <result column="created_at" jdbcType="TIMESTAMP" property="createdAt" />
+    <result column="created_by" jdbcType="VARCHAR" property="createdBy" />
+  </resultMap>
+  <sql id="Example_Where_Clause">
+    <where>
+      <foreach collection="oredCriteria" item="criteria" separator="or">
+        <if test="criteria.valid">
+          <trim prefix="(" prefixOverrides="and" suffix=")">
+            <foreach collection="criteria.criteria" item="criterion">
+              <choose>
+                <when test="criterion.noValue">
+                  and ${criterion.condition}
+                </when>
+                <when test="criterion.singleValue">
+                  and ${criterion.condition} #{criterion.value}
+                </when>
+                <when test="criterion.betweenValue">
+                  and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
+                </when>
+                <when test="criterion.listValue">
+                  and ${criterion.condition}
+                  <foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
+                    #{listItem}
+                  </foreach>
+                </when>
+              </choose>
+            </foreach>
+          </trim>
+        </if>
+      </foreach>
+    </where>
+  </sql>
+  <sql id="Update_By_Example_Where_Clause">
+    <where>
+      <foreach collection="example.oredCriteria" item="criteria" separator="or">
+        <if test="criteria.valid">
+          <trim prefix="(" prefixOverrides="and" suffix=")">
+            <foreach collection="criteria.criteria" item="criterion">
+              <choose>
+                <when test="criterion.noValue">
+                  and ${criterion.condition}
+                </when>
+                <when test="criterion.singleValue">
+                  and ${criterion.condition} #{criterion.value}
+                </when>
+                <when test="criterion.betweenValue">
+                  and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
+                </when>
+                <when test="criterion.listValue">
+                  and ${criterion.condition}
+                  <foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
+                    #{listItem}
+                  </foreach>
+                </when>
+              </choose>
+            </foreach>
+          </trim>
+        </if>
+      </foreach>
+    </where>
+  </sql>
+  <sql id="Base_Column_List">
+    id, name, gender, birthday, comment, created_at, created_by
+  </sql>
+  <select id="selectByExample" parameterType="com.idea.demo.model.DemoStudentExample" resultMap="BaseResultMap">
+    select
+    <if test="distinct">
+      distinct
+    </if>
+    <include refid="Base_Column_List" />
+    from demo_student
+    <if test="_parameter != null">
+      <include refid="Example_Where_Clause" />
+    </if>
+    <if test="orderByClause != null">
+      order by ${orderByClause}
+    </if>
+  </select>
+  <select id="selectByPrimaryKey" parameterType="java.lang.String" resultMap="BaseResultMap">
+    select 
+    <include refid="Base_Column_List" />
+    from demo_student
+    where id = #{id,jdbcType=VARCHAR}
+  </select>
+  <delete id="deleteByPrimaryKey" parameterType="java.lang.String">
+    delete from demo_student
+    where id = #{id,jdbcType=VARCHAR}
+  </delete>
+  <delete id="deleteByExample" parameterType="com.idea.demo.model.DemoStudentExample">
+    delete from demo_student
+    <if test="_parameter != null">
+      <include refid="Example_Where_Clause" />
+    </if>
+  </delete>
+  <insert id="insert" parameterType="com.idea.demo.model.DemoStudent">
+    <selectKey keyProperty="id" order="AFTER" resultType="java.lang.String">
+      SELECT LAST_INSERT_ID()
+    </selectKey>
+    insert into demo_student (id, name, gender, birthday,
+      comment, created_at, created_by
+      )
+    values (#{id,jdbcType=VARCHAR}, #{name,jdbcType=VARCHAR}, #{gender,jdbcType=VARCHAR}, #{birthday,jdbcType=TIMESTAMP},
+      #{comment,jdbcType=VARCHAR}, #{createdAt,jdbcType=TIMESTAMP}, #{createdBy,jdbcType=VARCHAR}
+      )
+  </insert>
+  <insert id="insertSelective" parameterType="com.idea.demo.model.DemoStudent">
+    <selectKey keyProperty="id" order="AFTER" resultType="java.lang.String">
+      SELECT LAST_INSERT_ID()
+    </selectKey>
+    insert into demo_student
+    <trim prefix="(" suffix=")" suffixOverrides=",">
+      <if test="id != null">
+        id,
+      </if>
+      <if test="name != null">
+        name,
+      </if>
+      <if test="gender != null">
+        gender,
+      </if>
+      <if test="birthday != null">
+        birthday,
+      </if>
+      <if test="comment != null">
+        comment,
+      </if>
+      <if test="createdAt != null">
+        created_at,
+      </if>
+      <if test="createdBy != null">
+        created_by,
+      </if>
+    </trim>
+    <trim prefix="values (" suffix=")" suffixOverrides=",">
+      <if test="id != null">
+        #{id,jdbcType=VARCHAR},
+      </if>
+      <if test="name != null">
+        #{name,jdbcType=VARCHAR},
+      </if>
+      <if test="gender != null">
+        #{gender,jdbcType=VARCHAR},
+      </if>
+      <if test="birthday != null">
+        #{birthday,jdbcType=TIMESTAMP},
+      </if>
+      <if test="comment != null">
+        #{comment,jdbcType=VARCHAR},
+      </if>
+      <if test="createdAt != null">
+        #{createdAt,jdbcType=TIMESTAMP},
+      </if>
+      <if test="createdBy != null">
+        #{createdBy,jdbcType=VARCHAR},
+      </if>
+    </trim>
+  </insert>
+  <select id="countByExample" parameterType="com.idea.demo.model.DemoStudentExample" resultType="java.lang.Long">
+    select count(*) from demo_student
+    <if test="_parameter != null">
+      <include refid="Example_Where_Clause" />
+    </if>
+  </select>
+  <update id="updateByExampleSelective" parameterType="map">
+    update demo_student
+    <set>
+      <if test="record.id != null">
+        id = #{record.id,jdbcType=VARCHAR},
+      </if>
+      <if test="record.name != null">
+        name = #{record.name,jdbcType=VARCHAR},
+      </if>
+      <if test="record.gender != null">
+        gender = #{record.gender,jdbcType=VARCHAR},
+      </if>
+      <if test="record.birthday != null">
+        birthday = #{record.birthday,jdbcType=TIMESTAMP},
+      </if>
+      <if test="record.comment != null">
+        comment = #{record.comment,jdbcType=VARCHAR},
+      </if>
+      <if test="record.createdAt != null">
+        created_at = #{record.createdAt,jdbcType=TIMESTAMP},
+      </if>
+      <if test="record.createdBy != null">
+        created_by = #{record.createdBy,jdbcType=VARCHAR},
+      </if>
+    </set>
+    <if test="_parameter != null">
+      <include refid="Update_By_Example_Where_Clause" />
+    </if>
+  </update>
+  <update id="updateByExample" parameterType="map">
+    update demo_student
+    set id = #{record.id,jdbcType=VARCHAR},
+      name = #{record.name,jdbcType=VARCHAR},
+      gender = #{record.gender,jdbcType=VARCHAR},
+      birthday = #{record.birthday,jdbcType=TIMESTAMP},
+      comment = #{record.comment,jdbcType=VARCHAR},
+      created_at = #{record.createdAt,jdbcType=TIMESTAMP},
+      created_by = #{record.createdBy,jdbcType=VARCHAR}
+    <if test="_parameter != null">
+      <include refid="Update_By_Example_Where_Clause" />
+    </if>
+  </update>
+  <update id="updateByPrimaryKeySelective" parameterType="com.idea.demo.model.DemoStudent">
+    update demo_student
+    <set>
+      <if test="name != null">
+        name = #{name,jdbcType=VARCHAR},
+      </if>
+      <if test="gender != null">
+        gender = #{gender,jdbcType=VARCHAR},
+      </if>
+      <if test="birthday != null">
+        birthday = #{birthday,jdbcType=TIMESTAMP},
+      </if>
+      <if test="comment != null">
+        comment = #{comment,jdbcType=VARCHAR},
+      </if>
+      <if test="createdAt != null">
+        created_at = #{createdAt,jdbcType=TIMESTAMP},
+      </if>
+      <if test="createdBy != null">
+        created_by = #{createdBy,jdbcType=VARCHAR},
+      </if>
+    </set>
+    where id = #{id,jdbcType=VARCHAR}
+  </update>
+  <update id="updateByPrimaryKey" parameterType="com.idea.demo.model.DemoStudent">
+    update demo_student
+    set name = #{name,jdbcType=VARCHAR},
+      gender = #{gender,jdbcType=VARCHAR},
+      birthday = #{birthday,jdbcType=TIMESTAMP},
+      comment = #{comment,jdbcType=VARCHAR},
+      created_at = #{createdAt,jdbcType=TIMESTAMP},
+      created_by = #{createdBy,jdbcType=VARCHAR}
+    where id = #{id,jdbcType=VARCHAR}
+  </update>
+</mapper>

+ 5 - 0
pro-base/src/main/resources/slave/demo/DemoClassMapper.xml

@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+<mapper namespace="com.slave.demo.mapper.DemoClassMapper">
+
+</mapper>

+ 136 - 0
pro-main/pom.xml

@@ -0,0 +1,136 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project xmlns="http://maven.apache.org/POM/4.0.0"
+         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+    <parent>
+        <groupId>rock.star.idea</groupId>
+        <artifactId>rock-star-idea</artifactId>
+        <version>0.1.0</version>
+    </parent>
+    <modelVersion>4.0.0</modelVersion>
+
+    <artifactId>pro-main</artifactId>
+    <packaging>jar</packaging>
+
+    <dependencies>
+
+        <!-- 工程依赖 -->
+        <dependency>
+            <groupId>com.rockstar.anticontrol</groupId>
+            <artifactId>rock-frame</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>com.rockstar.anticontrol</groupId>
+            <artifactId>rock-system</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>com.rockstar.anticontrol</groupId>
+            <artifactId>rock-user</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>com.rockstar.anticontrol</groupId>
+            <artifactId>rock-wx</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>rock.star.idea</groupId>
+            <artifactId>pro-base</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>rock.star.idea</groupId>
+            <artifactId>pro-wx</artifactId>
+        </dependency>
+
+<!--        <dependency>-->
+<!--            <groupId>org.springframework.kafka</groupId>-->
+<!--            <artifactId>spring-kafka</artifactId>-->
+<!--            <version>2.4.3.RELEASE</version>-->
+<!--        </dependency>-->
+<!--        <dependency>-->
+<!--            <groupId>org.apache.kafka</groupId>-->
+<!--            <artifactId>kafka-clients</artifactId>-->
+<!--            <version>2.4.1</version>-->
+<!--        </dependency>-->
+
+        <!--主从库配置还需更新ops对应得数据库properties-->
+<!--        <dependency>-->
+<!--            <groupId>com.rockstar.anticontrol</groupId>-->
+<!--            <artifactId>rock-ops</artifactId>-->
+<!--        </dependency>-->
+
+        <!--工作流和tkmybatis冲突,先注释-->
+<!--        <dependency>-->
+<!--            <groupId>com.rockstar.anticontrol</groupId>-->
+<!--            <artifactId>rock-flow</artifactId>-->
+<!--        </dependency>-->
+
+<!--        <dependency>-->
+<!--            <groupId>rock.star.idea</groupId>-->
+<!--            <artifactId>pro-search</artifactId>-->
+<!--        </dependency>-->
+
+
+        <!-- springframework -->
+        <!-- configuration -->
+        <dependency>
+            <groupId>org.springframework.boot</groupId>
+            <artifactId>spring-boot-configuration-processor</artifactId>
+            <optional>true</optional>
+        </dependency>
+        <!-- 热部署 -->
+        <dependency>
+            <groupId>org.springframework.boot</groupId>
+            <artifactId>spring-boot-devtools</artifactId>
+            <optional>true</optional>
+        </dependency>
+        <!-- aop -->
+        <dependency>
+            <groupId>org.springframework.boot</groupId>
+            <artifactId>spring-boot-starter-aop</artifactId>
+        </dependency>
+        <!-- SpringBoot Web容器 -->
+        <dependency>
+            <groupId>org.springframework.boot</groupId>
+            <artifactId>spring-boot-starter-web</artifactId>
+        </dependency>
+
+        <dependency>
+            <groupId>junit</groupId>
+            <artifactId>junit</artifactId>
+            <scope>test</scope>
+        </dependency>
+<!--        <dependency>-->
+<!--            <groupId>tk.mybatis</groupId>-->
+<!--            <artifactId>mapper-spring-boot-starter</artifactId>-->
+<!--            <version>${tkmybatis}</version>-->
+<!--            &lt;!&ndash; activiti默认使用JPA, tk的实现会出现问题,具体原因自行了解 &ndash;&gt;-->
+<!--            <exclusions>-->
+<!--                <exclusion>-->
+<!--                    <artifactId>persistence-api</artifactId>-->
+<!--                    <groupId>javax.persistence</groupId>-->
+<!--                </exclusion>-->
+<!--            </exclusions>-->
+<!--        </dependency>-->
+        <!--没有会引起mybaits plus通用mapper和activity的冲突-->
+<!--        <dependency>-->
+<!--            <groupId>org.activiti</groupId>-->
+<!--            <artifactId>activiti-spring-boot-starter-jpa</artifactId>-->
+<!--            <version>${activiti.version}</version>-->
+<!--        </dependency>-->
+
+<!--        <dependency>-->
+<!--            <groupId>org.springframework.boot</groupId>-->
+<!--            <artifactId>spring-boot-starter-data-jpa</artifactId>-->
+<!--            <version>2.2.6.RELEASE</version>-->
+<!--        </dependency>-->
+    </dependencies>
+
+    <build>
+        <plugins>
+            <plugin>
+                <groupId>org.springframework.boot</groupId>
+                <artifactId>spring-boot-maven-plugin</artifactId>
+            </plugin>
+        </plugins>
+    </build>
+
+</project>

+ 27 - 0
pro-main/src/main/java/com/idea/MainApplication.java

@@ -0,0 +1,27 @@
+package com.idea;
+
+//import org.activiti.spring.boot.SecurityAutoConfiguration;
+import org.mybatis.spring.annotation.MapperScan;
+import org.springframework.boot.SpringApplication;
+import org.springframework.boot.autoconfigure.SpringBootApplication;
+import org.springframework.boot.context.properties.EnableConfigurationProperties;
+import org.springframework.scheduling.annotation.EnableScheduling;
+import org.springframework.transaction.annotation.EnableTransactionManagement;
+import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;
+
+//@SpringBootApplication(scanBasePackages = {"com.rockstar","com.idea","com.slave"}, exclude = SecurityAutoConfiguration.class)
+@SpringBootApplication(scanBasePackages = {"com.rockstar","com.idea","com.slave"})
+@MapperScan(value = {"com.rockstar.*.mapper","com.idea.*.mapper","com.slave.*.mapper"})
+@EnableTransactionManagement
+@EnableScheduling
+@EnableConfigurationProperties
+public class MainApplication implements WebMvcConfigurer {
+
+    public static void main(String[] args) throws Exception {
+        SpringApplication.run(MainApplication.class, args);
+
+        System.out.println("=========================================");
+        System.out.println("|-----------  Main 启动成功  ------------|");
+        System.out.println("=========================================");
+    }
+}

+ 23 - 0
pro-main/src/main/resources/application-dev.yml

@@ -0,0 +1,23 @@
+# 环境 dev|test|prod|cloud
+
+#dev环境  mysql7.0
+spring :
+  datasource :
+    driverClassName : com.mysql.jdbc.Driver
+    url: jdbc:mysql://localhost:3306/idea_base?useUnicode=true&characterEncoding=UTF-8&autoReconnect=true&useSSL=false
+    username: root
+    password: 123456
+    hikari:
+      maxLifetime: 1765000
+      maximumPoolSize: 15
+  application:
+    name: search
+  data:
+    elasticsearch:
+      cluster-name: idea-es-cluster-1  # cluster_name
+      cluster-nodes: 36.134.98.30:9300    # 测试es服务器
+
+
+
+
+

+ 13 - 0
pro-main/src/main/resources/application-prod.yml

@@ -0,0 +1,13 @@
+# 环境 dev|test|prod|cloud
+
+#dev环境  mysql7.0
+spring :
+  datasource :
+    driverClassName : com.mysql.jdbc.Driver
+    url: jdbc:mysql://localhost:3306/rock_base?useUnicode=true&characterEncoding=UTF-8&autoReconnect=true&useSSL=false
+    username: root
+    password: 123456
+    hikari:
+      maxLifetime: 1765000
+      maximumPoolSize: 15
+

+ 41 - 0
pro-main/src/main/resources/application-test.yml

@@ -0,0 +1,41 @@
+# 环境 dev|test|prod|cloud
+
+#dev环境  mysql5.7
+spring:
+  datasource:
+    #主库
+    master:
+      jdbc-url: jdbc:mysql://localhost:3306/idea_base?useUnicode=true&characterEncoding=UTF-8&autoReconnect=true&useSSL=false
+      username: root
+      password: 123456
+      driver-class-name: com.mysql.jdbc.Driver
+    #从库
+#    slave:
+#      jdbc-url: jdbc:mysql://localhost:3306/idea_base?useUnicode=true&characterEncoding=UTF-8&autoReconnect=true&useSSL=false
+#      username: root
+#      password: 123456
+#      driver-class-name: com.mysql.jdbc.Driver
+    slave:
+      jdbc-url: jdbc:postgresql://47.113.226.116:5333/citylifeline_db
+      username: postgres
+      password: mygo@avemujica
+      driver-class-name: org.postgresql.Driver
+#    slave:
+#      jdbc-url: jdbc:postgresql://118.195.242.202:5333/idea_lifeline_platform
+#      username: postgres
+#      password: idea@2023
+#      driver-class-name: org.postgresql.Driver
+    hikari:
+      maxLifetime: 1765000
+      maximumPoolSize: 15
+  application:
+    name: search
+  data:
+    elasticsearch:
+      cluster-name: idea-es-cluster-1  # cluster_name
+      cluster-nodes: 36.134.98.30:9300    # 测试es服务器
+
+
+
+
+

+ 88 - 0
pro-main/src/main/resources/application.yml

@@ -0,0 +1,88 @@
+# 项目相关配置及信息
+rock:
+  #名称
+  name: IDEA Manage System
+  #版本
+  version: 1.0
+  #版权年份
+  copyrightYear: 2020
+  #上传文件尺寸 默认200M
+  fileSize: 209715200
+  #上传路径
+#  profile: /home/project/snap_manage/upload/
+  profile: e:/upload/pro/
+  # 服务器运维管理
+  ops:
+    tag: server
+    server:
+      url: http://localhost:9001
+      name: 基础运维平台
+    client:
+      id: opsTest1bc41a3cf4c2c3f1 #注意唯一性
+      name: 基础运维平台
+      os: windows #操作系统,windows, linux
+
+rock-wx:
+  sign: AIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQDz2fCOYaaU6sztFql4cOmiFRq2
+  app-id: wx6128592f2d9e84b6
+  app-secret: c945048f896e224e1fb4f2a10df799ca
+  mch-id:
+  mch-key:
+  notify-url:
+
+# 基础相关配置及信息
+server:
+  port: 9001
+
+spring:
+  profiles:
+    # 数据库源,dev/prod/test
+    active: dev
+  messages:
+    encoding: UTF-8
+  servlet:
+    multipart:
+      max-request-size: 1000MB
+      maxFileSize : 1000MB
+  mvc:   #静态文件
+    static-path-pattern : /static/**
+  jackson:
+    time-zone: GMT+8
+    date-format: yyyy-MM-dd HH:mm:ss
+  kafka:
+    bootstrap-servers: 47.92.103.21:9092
+#    bootstrap-servers: 47.99.219.40:9092
+#    bootstrap-servers: 47.113.226.116:9092
+    producer:
+      key-serializer: org.apache.kafka.common.serialization.StringSerializer
+      value-serializer: org.apache.kafka.common.serialization.StringSerializer
+    consumer:
+      key-deserializer: org.apache.kafka.common.serialization.StringDeserializer
+      value-deserializer: org.apache.kafka.common.serialization.StringDeserializer
+
+logging:
+  config: classpath:logback-spring.xml
+
+pagehelper:
+#  helperDialect:  mysql
+  reasonable: true
+  supportMethodsArguments:  true
+  params: count=countSql
+  auto-dialect: true
+  auto-runtime-dialect: true
+
+mybatis :
+  configuration :
+    map-underscore-to-camel-case : true
+#  mapperLocations : classpath*:mybatis/*/*.xml
+#  executor-type : reuse
+#  type-aliases-package : com.*.model
+
+
+
+swagger:
+  production: true
+  basic:
+    enable: true
+    username: root
+    password: test

+ 28 - 0
pro-main/src/main/resources/banner.txt

@@ -0,0 +1,28 @@
+${AnsiColor.BLACK}
+Application Version: ${rock.version}
+Spring Boot Version: ${spring-boot.version}
+
+                        基础平台系统正式起航
+////////////////////////////////////////////////////////////////////
+//                          _ooOoo_                               //
+//                         o8888888o                              //
+//                         88" . "88                              //
+//                         (| ^_^ |)                              //
+//                         O\  =  /O                              //
+//                      ____/`---'\____                           //
+//                    .'  \\|     |//  `.                         //
+//                   /  \\|||  :  |||//  \                        //
+//                  /  _||||| -:- |||||-  \                       //
+//                  |   | \\\  -  /// |   |                       //
+//                  | \_|  ''\---/''  |   |                       //
+//                  \  .-\__  `-`  ___/-. /                       //
+//                ___`. .'  /--.--\  `. . ___                     //
+//              ."" '<  `.___\_<|>_/___.'  >'"".                  //
+//            | | :  `- \`.;`\ _ /`;.`/ - ` : | |                 //
+//            \  \ `-.   \_ __\ /__ _/   .-` /  /                 //
+//      ========`-.____`-.___\_____/___.-`____.-'========         //
+//                           `=---='                              //
+//      ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^        //
+//            佛祖保佑       永不宕机     永无BUG                   //
+////////////////////////////////////////////////////////////////////
+

+ 56 - 0
pro-main/src/main/resources/logback-spring.xml

@@ -0,0 +1,56 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<configuration debug="true">
+    <contextName>logback</contextName>
+    <property name="log.path" value="logs" />
+
+    <appender name="console" class="ch.qos.logback.core.ConsoleAppender">
+        <filter class="ch.qos.logback.classic.filter.ThresholdFilter">
+            <level>debug</level>
+        </filter>
+        <encoder>
+            <pattern>%d{HH:mm:ss.SSS} %contextName [%thread] %-5level %logger{36} - %msg%n
+            </pattern>
+        </encoder>
+    </appender>
+
+    <appender name="file" class="ch.qos.logback.core.rolling.RollingFileAppender">
+        <file>${log.path}/log.log</file>
+        <rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
+            <fileNamePattern>${log.path}/log-%d{yyyy-MM-dd}.log</fileNamePattern>
+        </rollingPolicy>
+
+        <encoder>
+            <pattern>%date %level [%thread] %logger{36} [%file : %line] %msg%n
+            </pattern>
+        </encoder>
+    </appender>
+
+    <appender name="error" class="ch.qos.logback.core.rolling.RollingFileAppender">
+        <file>${log.path}/error.log</file>
+        <rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
+            <fileNamePattern>${log.path}/error-%d{yyyy-MM-dd}.log</fileNamePattern>
+        </rollingPolicy>
+
+        <encoder>
+            <pattern>%date %level [%thread] %logger{36} [%file : %line] %msg%n
+            </pattern>
+        </encoder>
+        <!-- 此日志文件只记录ERROR级别的 -->
+        <filter class="ch.qos.logback.classic.filter.LevelFilter">
+            <level>ERROR</level>
+            <onMatch>ACCEPT</onMatch>
+            <onMismatch>DENY</onMismatch>
+        </filter>
+    </appender>
+
+    <root level="ERROR">
+        <appender-ref ref="console" />
+        <appender-ref ref="file" />
+        <appender-ref ref="error" />
+    </root>
+    <logger name="org.mybatis" level="ERROR" />
+    <logger name="org.springframework" level="ERROR" />
+    <logger name="com.rockstar.frame" level="DEBUG" />
+    <logger name="com.rockstar.system" level="DEBUG" />
+    <logger name="com.rockstar" level="DEBUG" />
+</configuration>

File diff suppressed because it is too large
+ 120 - 0
pro-main/src/main/resources/processes/ApplyFree.bpmn


File diff suppressed because it is too large
+ 284 - 0
pro-main/src/main/resources/processes/ApplyPay.bpmn


+ 125 - 0
pro-search/pom.xml

@@ -0,0 +1,125 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project xmlns="http://maven.apache.org/POM/4.0.0"
+         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+    <parent>
+        <artifactId>rock-star-idea</artifactId>
+        <groupId>rock.star.idea</groupId>
+        <version>0.1.0</version>
+    </parent>
+    <modelVersion>4.0.0</modelVersion>
+
+    <artifactId>pro-search</artifactId>
+    <packaging>jar</packaging>
+
+    <dependencies>
+        <!-- 工程依赖 -->
+        <dependency>
+            <groupId>com.rockstar.anticontrol</groupId>
+            <artifactId>rock-frame</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>com.rockstar.anticontrol</groupId>
+            <artifactId>rock-system</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>rock.star.idea</groupId>
+            <artifactId>pro-base</artifactId>
+        </dependency>
+
+        <!--spring-boot依赖-->
+        <dependency>
+            <groupId>org.springframework.boot</groupId>
+            <artifactId>spring-boot-devtools</artifactId>
+            <scope>runtime</scope>
+            <optional>true</optional>
+        </dependency>
+        <dependency>
+            <groupId>org.springframework.boot</groupId>
+            <artifactId>spring-boot-configuration-processor</artifactId>
+            <optional>true</optional>
+        </dependency>
+        <dependency>
+            <groupId>org.springframework.boot</groupId>
+            <artifactId>spring-boot-starter-test</artifactId>
+            <scope>test</scope>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.httpcomponents</groupId>
+            <artifactId>httpmime</artifactId>
+        </dependency>
+
+        <!-- pageHelper -->
+        <dependency>
+            <groupId>com.github.pagehelper</groupId>
+            <artifactId>pagehelper</artifactId>
+            <version>${pagehelper.version}</version>
+        </dependency>
+
+        <!-- elasticsearch -->
+        <dependency>
+            <groupId>org.springframework.data</groupId>
+            <artifactId>spring-data-elasticsearch</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>org.springframework.boot</groupId>
+            <artifactId>spring-boot-starter-data-elasticsearch</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>org.jetbrains</groupId>
+            <artifactId>annotations</artifactId>
+            <version>RELEASE</version>
+            <scope>test</scope>
+        </dependency>
+
+        <!--消息队列的依赖-->
+        <dependency>
+            <groupId>org.springframework.boot</groupId>
+            <artifactId>spring-boot-starter-amqp</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>javax.persistence</groupId>
+            <artifactId>persistence-api</artifactId>
+            <version>1.0</version>
+        </dependency>
+        <dependency>
+            <groupId>com.alibaba</groupId>
+            <artifactId>fastjson</artifactId>
+            <version>1.2.58</version>
+            <scope>compile</scope>
+        </dependency>
+        <dependency>
+            <groupId>org.projectlombok</groupId>
+            <artifactId>lombok</artifactId>
+            <version>1.18.2</version>
+        </dependency>
+
+        <!-- 通用Mapper -->
+<!--        <dependency>-->
+<!--            <groupId>tk.mybatis</groupId>-->
+<!--            <artifactId>mapper</artifactId>-->
+<!--            <version>4.0.4</version>-->
+<!--        </dependency>-->
+<!--        <dependency>-->
+<!--            <groupId>tk.mybatis</groupId>-->
+<!--            <artifactId>mapper-spring-boot-starter</artifactId>-->
+<!--            <version>2.0.4</version>-->
+<!--        </dependency>-->
+        <dependency>
+            <groupId>mysql</groupId>
+            <artifactId>mysql-connector-java</artifactId>
+            <version>5.1.45</version>
+        </dependency>
+
+    </dependencies>
+
+    <build>
+        <plugins>
+            <plugin>
+                <groupId>org.springframework.boot</groupId>
+                <artifactId>spring-boot-maven-plugin</artifactId>
+            </plugin>
+        </plugins>
+    </build>
+
+</project>

+ 23 - 0
pro-search/src/main/java/com/idea/SearchApplication.java

@@ -0,0 +1,23 @@
+package com.idea;
+
+import org.mybatis.spring.annotation.MapperScan;
+import org.springframework.boot.SpringApplication;
+import org.springframework.boot.autoconfigure.SpringBootApplication;
+import org.springframework.scheduling.annotation.EnableScheduling;
+import org.springframework.transaction.annotation.EnableTransactionManagement;
+import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;
+
+@SpringBootApplication(scanBasePackages = {"com.idea","com.rockstar"})
+@MapperScan(value = {"com.rockstar.*.mapper","com.idea.*.mapper"})
+@EnableTransactionManagement
+@EnableScheduling
+public class SearchApplication implements WebMvcConfigurer {
+
+    public static void main(String[] args) throws Exception {
+        SpringApplication.run(SearchApplication.class, args);
+
+        System.out.println("=========================================");
+        System.out.println("|-----------  Search 启动成功  ----------|");
+        System.out.println("=========================================");
+    }
+}

+ 34 - 0
pro-search/src/main/java/com/idea/search/controller/EsController.java

@@ -0,0 +1,34 @@
+package com.idea.search.controller;
+
+
+import com.idea.search.service.EsService;
+import com.idea.search.util.IndexTypeEnum;
+import com.rockstar.common.base.BaseController;
+import com.rockstar.common.domain.AjaxResult;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.*;
+
+@RestController
+@RequestMapping("/es")
+public class EsController extends BaseController {
+
+    @Autowired
+    private EsService esService;
+
+
+    //创建索引
+    @GetMapping("/create/{index}")
+    @ResponseBody
+    public AjaxResult createIndexAndMapping(@PathVariable("index") String index) {
+        esService.createIndexAndMapping(index);
+        return success("创建索引库成功:"+index);
+    }
+
+
+
+
+
+
+
+
+}

+ 10 - 0
pro-search/src/main/java/com/idea/search/dao/EsOpLogMapper.java

@@ -0,0 +1,10 @@
+package com.idea.search.dao;
+
+
+import com.idea.search.pojo.OpLogRecord;
+import org.springframework.data.elasticsearch.repository.ElasticsearchRepository;
+
+//当前操作类型 主建类型
+public interface EsOpLogMapper extends ElasticsearchRepository<OpLogRecord,String> {
+
+}

+ 10 - 0
pro-search/src/main/java/com/idea/search/dao/EsUserMapper.java

@@ -0,0 +1,10 @@
+package com.idea.search.dao;
+
+
+import com.idea.search.pojo.UserRecord;
+import org.springframework.data.elasticsearch.repository.ElasticsearchRepository;
+
+//当前操作类型 主建类型
+public interface EsUserMapper extends ElasticsearchRepository<UserRecord,String> {
+
+}

+ 101 - 0
pro-search/src/main/java/com/idea/search/pojo/OpLogRecord.java

@@ -0,0 +1,101 @@
+package com.idea.search.pojo;
+
+import org.springframework.data.elasticsearch.annotations.Document;
+import org.springframework.data.elasticsearch.annotations.Field;
+import org.springframework.data.elasticsearch.annotations.FieldType;
+
+import javax.persistence.Id;
+
+//操作日志数据索引库
+@Document(indexName = "op_log_record", type = "docs")
+public class OpLogRecord {
+
+    //日常表id
+    @Id
+    @Field(index = true,store = true,type = FieldType.Keyword)
+    private String id;
+
+    @Field(index =true,store = true,type = FieldType.Keyword)
+    private String title;
+    @Field(index =true,store = true,type = FieldType.Keyword)
+    private String method;
+    @Field(index =true,store = true,type = FieldType.Keyword)
+    private String operName;
+    @Field(index =true,store = true,type = FieldType.Keyword)
+    private String operUrl;
+    @Field(index =true,store = true,type = FieldType.Keyword)
+    private String operParam;
+    @Field(index =true,store = true,type = FieldType.Keyword)
+    private String errorMsg;
+    @Field(index =true,store = true,type = FieldType.Keyword)
+    private String operAt;;
+
+    // field建议都是private String格式
+    // 如果某个field是需要统计,则FieldType替换成Double
+    // @Field(index =true,store = true,type = FieldType.Double)//支持 max min svg sum
+
+
+    public String getId() {
+        return id;
+    }
+
+    public void setId(String id) {
+        this.id = id;
+    }
+
+    public String getTitle() {
+        return title;
+    }
+
+    public void setTitle(String title) {
+        this.title = title;
+    }
+
+    public String getMethod() {
+        return method;
+    }
+
+    public void setMethod(String method) {
+        this.method = method;
+    }
+
+    public String getOperName() {
+        return operName;
+    }
+
+    public void setOperName(String operName) {
+        this.operName = operName;
+    }
+
+    public String getOperUrl() {
+        return operUrl;
+    }
+
+    public void setOperUrl(String operUrl) {
+        this.operUrl = operUrl;
+    }
+
+    public String getOperParam() {
+        return operParam;
+    }
+
+    public void setOperParam(String operParam) {
+        this.operParam = operParam;
+    }
+
+    public String getErrorMsg() {
+        return errorMsg;
+    }
+
+    public void setErrorMsg(String errorMsg) {
+        this.errorMsg = errorMsg;
+    }
+
+    public String getOperAt() {
+        return operAt;
+    }
+
+    public void setOperAt(String operAt) {
+        this.operAt = operAt;
+    }
+}

+ 84 - 0
pro-search/src/main/java/com/idea/search/pojo/UserRecord.java

@@ -0,0 +1,84 @@
+package com.idea.search.pojo;
+
+import org.springframework.data.elasticsearch.annotations.Document;
+import org.springframework.data.elasticsearch.annotations.Field;
+import org.springframework.data.elasticsearch.annotations.FieldType;
+
+import javax.persistence.Id;
+
+@Document(indexName = "user_record", type = "docs")
+public class UserRecord {
+
+    //日常表id
+    @Id
+    @Field(index = true,store = true,type = FieldType.Keyword)
+    private String id;
+    @Field(index = true,store = true,type = FieldType.Keyword)
+    private String username;
+    @Field(index = true,store = true,type = FieldType.Keyword)
+    private String truename;
+    @Field(index = true,store = true,type = FieldType.Keyword)
+    private String staffCode;
+    @Field(index = true,store = true,type = FieldType.Keyword)
+    private String phone;
+    @Field(index = true,store = true,type = FieldType.Double)
+    private String sequenceNo;
+    @Field(index = true,store = true,type = FieldType.Keyword)
+    private String createdat;
+
+    public String getId() {
+        return id;
+    }
+
+    public void setId(String id) {
+        this.id = id;
+    }
+
+    public String getUsername() {
+        return username;
+    }
+
+    public void setUsername(String username) {
+        this.username = username;
+    }
+
+    public String getTruename() {
+        return truename;
+    }
+
+    public void setTruename(String truename) {
+        this.truename = truename;
+    }
+
+    public String getStaffCode() {
+        return staffCode;
+    }
+
+    public void setStaffCode(String staffCode) {
+        this.staffCode = staffCode;
+    }
+
+    public String getPhone() {
+        return phone;
+    }
+
+    public void setPhone(String phone) {
+        this.phone = phone;
+    }
+
+    public String getSequenceNo() {
+        return sequenceNo;
+    }
+
+    public void setSequenceNo(String sequenceNo) {
+        this.sequenceNo = sequenceNo;
+    }
+
+    public String getCreatedat() {
+        return createdat;
+    }
+
+    public void setCreatedat(String createdat) {
+        this.createdat = createdat;
+    }
+}

+ 141 - 0
pro-search/src/main/java/com/idea/search/service/EsService.java

@@ -0,0 +1,141 @@
+package com.idea.search.service;
+
+import com.alibaba.fastjson.JSON;
+import com.idea.search.dao.EsOpLogMapper;
+import com.idea.search.pojo.OpLogRecord;
+import com.idea.search.pojo.UserRecord;
+import com.idea.search.util.IndexTypeEnum;
+import com.rockstar.frame.model.FrameOpLog;
+import com.rockstar.util.BeanUtils;
+import com.rockstar.util.DateUtils;
+import org.apache.commons.lang.StringUtils;
+import org.elasticsearch.action.search.SearchResponse;
+import org.elasticsearch.index.query.BoolQueryBuilder;
+import org.elasticsearch.index.query.Operator;
+import org.elasticsearch.index.query.QueryBuilders;
+import org.elasticsearch.search.SearchHit;
+import org.elasticsearch.search.SearchHits;
+import org.elasticsearch.search.sort.SortBuilders;
+import org.elasticsearch.search.sort.SortOrder;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.data.domain.PageRequest;
+import org.springframework.data.domain.Pageable;
+import org.springframework.data.elasticsearch.core.ElasticsearchTemplate;
+import org.springframework.data.elasticsearch.core.SearchResultMapper;
+import org.springframework.data.elasticsearch.core.aggregation.AggregatedPage;
+import org.springframework.data.elasticsearch.core.aggregation.impl.AggregatedPageImpl;
+import org.springframework.data.elasticsearch.core.query.NativeSearchQueryBuilder;
+import org.springframework.stereotype.Service;
+
+import java.util.ArrayList;
+import java.util.List;
+import java.util.Map;
+
+/**
+ * ES服务器搭建:https://blog.csdn.net/alexyangxb/article/details/115898520
+ */
+@Service
+public class EsService {
+
+    //es模板类
+    @Autowired
+    private ElasticsearchTemplate esTemplate;
+
+    @Autowired
+    private EsOpLogMapper opLogMapper;
+
+    //创建索引库结构
+    public void createIndexAndMapping(String indexCode) {
+        IndexTypeEnum typeEnum = IndexTypeEnum.getByCode(indexCode);
+        switch (typeEnum){
+            case OP_LOG:
+                esTemplate.createIndex(OpLogRecord.class); //创建索引(根据索引库映射实体类)
+                esTemplate.putMapping(OpLogRecord.class); //创建映射
+            case FRAME_USER:
+                esTemplate.createIndex(UserRecord.class); //创建索引(根据索引库映射实体类)
+                esTemplate.putMapping(UserRecord.class); //创建映射
+        }
+    }
+
+    public OpLogRecord saveOpLog(FrameOpLog opLog){
+        OpLogRecord esLog = new OpLogRecord();
+        BeanUtils.copyBeanProp(esLog, opLog);
+        esLog.setOperAt(DateUtils.formatDateTime(opLog.getOperAt()));
+        return opLogMapper.save(esLog);
+    }
+
+    public Object opLogQuery(Map<String, String> searchMap) {
+        NativeSearchQueryBuilder queryBuilder = genQueryBuilder(searchMap, 1500, true, "operAt");
+        AggregatedPage<OpLogRecord> fr = esTemplate.queryForPage(queryBuilder.build(), OpLogRecord.class, new PageResultMapper());
+        return fr.getContent();
+    }
+
+    private NativeSearchQueryBuilder genQueryBuilder(Map<String, String> searchMap, Integer totalSize, boolean isDate, String orderBy) {
+        BoolQueryBuilder boolQuery = QueryBuilders.boolQuery();//可以通过boolQuery拼接查询条件
+
+        if (!searchMap.isEmpty()) {
+            searchMap.forEach((key, value) -> {
+                if (key.equals("title")) {
+                    boolQuery.must(QueryBuilders.matchQuery("title", value).operator(Operator.AND));
+                } else if (key.equals("start")) {
+                    if (isDate) {
+                        value = value + " 00:00:00";
+                    }
+                    boolQuery.filter(QueryBuilders.rangeQuery("operAt").gte(value));
+                } else if (key.equals("end")) {
+                    if (isDate) {
+                        value = value + " 23:59:59";
+                    }
+                    boolQuery.filter(QueryBuilders.rangeQuery("operAt").lte(value));
+                } else {
+                    //过滤条件, filter()方法  termQuery() 完全条件匹配查询(精确查询)
+                    boolQuery.filter(QueryBuilders.termQuery(key, value));
+                }
+            });
+        }
+
+        NativeSearchQueryBuilder queryBuilder = new NativeSearchQueryBuilder();
+        queryBuilder.withQuery(boolQuery);//查询方法
+
+        if (null != totalSize) {//分页
+            queryBuilder.withPageable(PageRequest.of(0, totalSize));
+        }
+        if (StringUtils.isNotEmpty(orderBy)) {//排序
+            queryBuilder.withSort(SortBuilders.fieldSort(orderBy).order(SortOrder.ASC));
+        }
+
+        return queryBuilder;
+    }
+
+    class PageResultMapper implements SearchResultMapper {
+
+        public PageResultMapper() { }
+
+        @Override
+        public <T> AggregatedPage<T> mapResults(SearchResponse searchResponse, Class<T> aClass, Pageable pageable) {
+            //查询结果的相关操作 将数据查询结果的 转换为实体类
+            List<T> list = new ArrayList<>();
+            //获取查询命中结果数据
+            SearchHits hits = searchResponse.getHits();
+            if (hits != null) {
+                //不为空 有查询结果
+                for (SearchHit hit : hits) {
+                    //当前得到的对象为 得到的每一条记录
+                    //得到的 SearchHits对象转换为 实体类
+                    //用阿里json转换
+                    OpLogRecord fr = JSON.parseObject(hit.getSourceAsString(), OpLogRecord.class);
+                    list.add((T) fr);
+                }
+            }
+            /**
+             * 集合 ,分页信息,总记录数,构造
+             */
+            return new AggregatedPageImpl<T>(list, pageable, hits.getTotalHits(), searchResponse.getAggregations());
+        }
+
+        @Override
+        public <T> T mapSearchHit(SearchHit searchHit, Class<T> aClass) {
+            return null;
+        }
+    }
+}

+ 34 - 0
pro-search/src/main/java/com/idea/search/util/IndexTypeEnum.java

@@ -0,0 +1,34 @@
+package com.idea.search.util;
+
+public enum IndexTypeEnum {
+
+    OP_LOG("OP_LOG", "操作日志"),
+    FRAME_USER("FRAME_USER", "平台用户"),
+    UNKNOWN("UNKNOWN", "未知索引");
+
+    IndexTypeEnum(String code, String name) {
+        this.code = code;
+        this.name = name;
+    }
+
+    private String code;
+
+    private String name;
+
+    public static IndexTypeEnum getByCode(String code) {
+        for (IndexTypeEnum typeEnum : IndexTypeEnum.values()) {
+            if (typeEnum.code.equals(code)) {
+                return typeEnum;
+            }
+        }
+        return UNKNOWN;
+    }
+
+    public String getCode() {
+        return code;
+    }
+
+    public String getName() {
+        return name;
+    }
+}

+ 96 - 0
pro-wx/pom.xml

@@ -0,0 +1,96 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project xmlns="http://maven.apache.org/POM/4.0.0"
+         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+    <parent>
+        <groupId>rock.star.idea</groupId>
+        <artifactId>rock-star-idea</artifactId>
+        <version>0.1.0</version>
+    </parent>
+    <modelVersion>4.0.0</modelVersion>
+
+    <artifactId>pro-wx</artifactId>
+    <packaging>jar</packaging>
+
+    <dependencies>
+        <!-- 工程依赖 -->
+
+        <dependency>
+            <groupId>com.rockstar.anticontrol</groupId>
+            <artifactId>rock-frame</artifactId>
+        </dependency>
+
+        <dependency>
+            <groupId>com.rockstar.anticontrol</groupId>
+            <artifactId>rock-system</artifactId>
+        </dependency>
+
+        <dependency>
+            <groupId>com.rockstar.anticontrol</groupId>
+            <artifactId>rock-user</artifactId>
+        </dependency>
+
+        <dependency>
+            <groupId>com.rockstar.anticontrol</groupId>
+            <artifactId>rock-wx</artifactId>
+        </dependency>
+
+        <dependency>
+            <groupId>rock.star.idea</groupId>
+            <artifactId>pro-base</artifactId>
+        </dependency>
+
+        <dependency>
+            <groupId>com.github.binarywang</groupId>
+            <artifactId>weixin-java-pay</artifactId>
+            <version>${binarywang.weixin.java.pay}</version>
+            <exclusions>
+                <exclusion>
+                    <artifactId>qrcode-utils</artifactId>
+                    <groupId>com.github.binarywang</groupId>
+                </exclusion>
+            </exclusions>
+        </dependency>
+
+        <dependency>
+            <groupId>com.github.binarywang</groupId>
+            <artifactId>weixin-java-miniapp</artifactId>
+            <version>${binarywang.weixin.java.miniapp}</version>
+        </dependency>
+
+        <dependency>
+            <groupId>com.github.binarywang</groupId>
+            <artifactId>java-emoji-converter</artifactId>
+            <version>${binarywang.emoji.converter}</version>
+        </dependency>
+
+        <dependency>
+            <groupId>com.github.penggle</groupId>
+            <artifactId>kaptcha</artifactId>
+            <version>${kaptcha}</version>
+        </dependency>
+
+        <dependency>
+            <groupId>org.apache.httpcomponents</groupId>
+            <artifactId>httpmime</artifactId>
+        </dependency>
+
+        <!-- pageHelper -->
+        <dependency>
+            <groupId>com.github.pagehelper</groupId>
+            <artifactId>pagehelper</artifactId>
+            <version>${pagehelper.version}</version>
+        </dependency>
+
+    </dependencies>
+
+    <build>
+        <plugins>
+            <plugin>
+                <groupId>org.springframework.boot</groupId>
+                <artifactId>spring-boot-maven-plugin</artifactId>
+            </plugin>
+        </plugins>
+    </build>
+
+</project>

+ 23 - 0
pro-wx/src/main/java/com/idea/pro/wx/WxApplication.java

@@ -0,0 +1,23 @@
+package com.idea.pro.wx;
+
+import org.mybatis.spring.annotation.MapperScan;
+import org.springframework.boot.SpringApplication;
+import org.springframework.boot.autoconfigure.SpringBootApplication;
+import org.springframework.scheduling.annotation.EnableScheduling;
+import org.springframework.transaction.annotation.EnableTransactionManagement;
+import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;
+
+@SpringBootApplication(scanBasePackages = {"com.idea","com.rockstar"})
+@MapperScan(value = {"com.rockstar.*.mapper","com.idea.*.mapper"})
+@EnableTransactionManagement
+@EnableScheduling
+public class WxApplication implements WebMvcConfigurer {
+
+    public static void main(String[] args) throws Exception {
+        SpringApplication.run(WxApplication.class, args);
+
+        System.out.println("=========================================");
+        System.out.println("|-----------  Wx 启动成功  --------------|");
+        System.out.println("=========================================");
+    }
+}

+ 46 - 0
pro-wx/src/main/java/com/idea/pro/wx/config/WxSwagger.java

@@ -0,0 +1,46 @@
+package com.idea.pro.wx.config;
+
+import org.springframework.context.annotation.Bean;
+import org.springframework.context.annotation.Configuration;
+import springfox.documentation.builders.ApiInfoBuilder;
+import springfox.documentation.builders.PathSelectors;
+import springfox.documentation.builders.RequestHandlerSelectors;
+import springfox.documentation.service.ApiInfo;
+import springfox.documentation.spi.DocumentationType;
+import springfox.documentation.spring.web.plugins.Docket;
+import springfox.documentation.swagger2.annotations.EnableSwagger2;
+
+/**
+ * swagger在线文档配置<br>
+ * 项目启动后可通过地址:http://host:ip/swagger-ui.html 查看在线文档
+ *
+ * @author
+ * @version 2018-07-24
+ */
+
+@Configuration
+@EnableSwagger2
+public class WxSwagger {
+
+    @Bean
+    public Docket wxDocket() {
+
+        return new Docket(DocumentationType.SWAGGER_2)
+                .groupName("wx")
+                .apiInfo(wxApiInfo())
+                .select()
+                .apis(RequestHandlerSelectors.basePackage("com.idea.pro.wx.web"))
+                .paths(PathSelectors.any())
+                .build();
+    }
+
+    private ApiInfo wxApiInfo() {
+        return new ApiInfoBuilder()
+                .title("微信API")
+                .description("微信API")
+                .termsOfServiceUrl("http://localhost:9001")
+                .contact("pengyq")
+                .version("1.0")
+                .build();
+    }
+}

+ 50 - 0
pro-wx/src/main/java/com/idea/pro/wx/pojo/LoginRequest.java

@@ -0,0 +1,50 @@
+package com.idea.pro.wx.pojo;
+
+import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiModelProperty;
+
+@Api(description = "登录请求参数对象")
+public class LoginRequest {
+
+    /**
+     * 用户code
+     */
+    @ApiModelProperty(value = "微信授权登录外网获取的code,用于获取openid", name = "code", required = true)
+    private String code;
+
+    /**
+     * 登录账号
+     */
+    @ApiModelProperty(value = "登录账号", name = "userName")
+    private String userName;
+
+    /**
+     * 登录密码
+     */
+    @ApiModelProperty(value = "登录密码", name = "password")
+    private String password;
+
+    public String getCode() {
+        return code;
+    }
+
+    public void setCode(String code) {
+        this.code = code;
+    }
+
+    public String getUserName() {
+        return userName;
+    }
+
+    public void setUserName(String userName) {
+        this.userName = userName;
+    }
+
+    public String getPassword() {
+        return password;
+    }
+
+    public void setPassword(String password) {
+        this.password = password;
+    }
+}

+ 30 - 0
pro-wx/src/main/java/com/idea/pro/wx/pojo/ResponseCode.java

@@ -0,0 +1,30 @@
+package com.idea.pro.wx.pojo;
+
+public class ResponseCode {
+
+
+    public static final Integer FRAME_FILE_UPLOAD_ERROR = 600;
+    public static final Integer FRAME_FILE_UPLOAD_EMPTY = 601;
+    public static final Integer FRAME_FILE_VIEW_ERROR = 602;
+    public static final Integer FRAME_FILE_VIEW_NO_IMAGE = 603;
+
+    public static final Integer AUTH_INVALID_ACCOUNT = 700;
+    public static final Integer AUTH_CAPTCHA_UNSUPPORT = 701;
+    public static final Integer AUTH_CAPTCHA_FREQUENCY = 702;
+    public static final Integer AUTH_CAPTCHA_UNMATCH = 703;
+    public static final Integer AUTH_NAME_REGISTERED = 704;
+    public static final Integer AUTH_MOBILE_REGISTERED = 705;
+    public static final Integer AUTH_MOBILE_UNREGISTERED = 706;
+    public static final Integer AUTH_INVALID_MOBILE = 707;
+    public static final Integer AUTH_OPENID_UNACCESS = 708;
+    public static final Integer AUTH_OPENID_BINDED = 709;
+
+    public static final Integer SURVEY_ID_UNKNOWN = 710;
+    public static final Integer SURVEY_UNKNOWN = 711;
+
+    /**
+     * 登录 - 密码错误
+     */
+    public static final Integer LOGIN_PASSWORD_ERROR = 800;
+
+}

+ 106 - 0
pro-wx/src/main/java/com/idea/pro/wx/pojo/UserInfo.java

@@ -0,0 +1,106 @@
+package com.idea.pro.wx.pojo;
+
+import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiModelProperty;
+
+@Api(description = "登录用户信息")
+public class UserInfo {
+
+    /**
+     * 登录账号
+     */
+    @ApiModelProperty(value = "登录账号", name = "userName")
+    private String userName;
+
+    /**
+     * 登录密码
+     */
+    @ApiModelProperty(value = "登录密码", name = "password")
+    private String password;
+
+    /**
+     * 头像
+     */
+    @ApiModelProperty(value = "头像", name = "avatarUrl")
+    private String avatarUrl;
+
+    /**
+     * 城市
+     */
+    @ApiModelProperty(value = "城市", name = "city")
+    private String city;
+
+    /**
+     * 国家
+     */
+    @ApiModelProperty(value = "国家", name = "country")
+    private String country;
+
+    /**
+     * 省份
+     */
+    @ApiModelProperty(value = "省份", name = "province")
+    private String province;
+
+    /**
+     * 语言
+     */
+    @ApiModelProperty(value = "语言", name = "language")
+    private String language;
+
+    public String getUserName() {
+        return userName;
+    }
+
+    public void setUserName(String userName) {
+        this.userName = userName;
+    }
+
+    public String getPassword() {
+        return password;
+    }
+
+    public void setPassword(String password) {
+        this.password = password;
+    }
+
+    public String getAvatarUrl() {
+        return avatarUrl;
+    }
+
+    public void setAvatarUrl(String avatarUrl) {
+        this.avatarUrl = avatarUrl;
+    }
+
+    public String getCity() {
+        return city;
+    }
+
+    public void setCity(String city) {
+        this.city = city;
+    }
+
+    public String getCountry() {
+        return country;
+    }
+
+    public void setCountry(String country) {
+        this.country = country;
+    }
+
+    public String getProvince() {
+        return province;
+    }
+
+    public void setProvince(String province) {
+        this.province = province;
+    }
+
+    public String getLanguage() {
+        return language;
+    }
+
+    public void setLanguage(String language) {
+        this.language = language;
+    }
+}

+ 94 - 0
pro-wx/src/main/java/com/idea/pro/wx/vo/LoginUserInfo.java

@@ -0,0 +1,94 @@
+package com.idea.pro.wx.vo;
+
+public class LoginUserInfo {
+
+    private String id;
+
+    private String account;
+
+    private String avatarUrl;
+
+    private String city;
+
+    private String country;
+
+    private String province;
+
+    private String gender;
+
+    private String language;
+
+    private String nickName;
+
+    public String getId() {
+        return id;
+    }
+
+    public void setId(String id) {
+        this.id = id;
+    }
+
+    public String getAccount() {
+        return account;
+    }
+
+    public void setAccount(String account) {
+        this.account = account;
+    }
+
+    public String getAvatarUrl() {
+        return avatarUrl;
+    }
+
+    public void setAvatarUrl(String avatarUrl) {
+        this.avatarUrl = avatarUrl;
+    }
+
+    public String getCity() {
+        return city;
+    }
+
+    public void setCity(String city) {
+        this.city = city;
+    }
+
+    public String getCountry() {
+        return country;
+    }
+
+    public void setCountry(String country) {
+        this.country = country;
+    }
+
+    public String getProvince() {
+        return province;
+    }
+
+    public void setProvince(String province) {
+        this.province = province;
+    }
+
+    public String getGender() {
+        return gender;
+    }
+
+    public void setGender(String gender) {
+        this.gender = gender;
+    }
+
+    public String getLanguage() {
+        return language;
+    }
+
+    public void setLanguage(String language) {
+        this.language = language;
+    }
+
+    public String getNickName() {
+        return nickName;
+    }
+
+    public void setNickName(String nickName) {
+        this.nickName = nickName;
+    }
+}

+ 247 - 0
pro-wx/src/main/java/com/idea/pro/wx/web/WxAuthController.java

@@ -0,0 +1,247 @@
+package com.idea.pro.wx.web;
+
+import cn.binarywang.wx.miniapp.api.WxMaService;
+import cn.binarywang.wx.miniapp.bean.WxMaJscode2SessionResult;
+import com.rockstar.biz.model.BizMain;
+import com.rockstar.biz.model.BizUser;
+import com.rockstar.biz.service.BizMainService;
+import com.rockstar.frame.mapper.extend.BizMainDao;
+import com.rockstar.frame.model.FrameUser;
+import com.rockstar.h5.service.FrameWxService;
+import com.rockstar.user.model.UserAccount;
+import com.rockstar.user.model.UserMain;
+import com.rockstar.user.service.UserAccountService;
+import com.rockstar.user.service.UserMainService;
+import com.rockstar.util.*;
+import com.rockstar.wx.base.BaseWxController;
+import com.rockstar.wx.dto.UserInfo;
+import com.rockstar.wx.dto.WxLoginInfo;
+import com.rockstar.wx.pojo.LoginRequest;
+import com.rockstar.wx.service.UserTokenManager;
+import com.rockstar.wx.util.EmojiUtil;
+import me.chanjar.weixin.common.error.WxErrorException;
+import org.apache.commons.codec.digest.DigestUtils;
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.http.MediaType;
+import org.springframework.validation.annotation.Validated;
+import org.springframework.web.bind.annotation.*;
+
+import javax.servlet.http.HttpServletRequest;
+import java.lang.reflect.InvocationTargetException;
+import java.util.Date;
+import java.util.HashMap;
+import java.util.Map;
+
+/**
+ * 鉴权服务
+ */
+@RestController
+@RequestMapping("/wx/auth")
+@Validated
+public class WxAuthController extends BaseWxController {
+    private final Log logger = LogFactory.getLog(WxAuthController.class);
+    private final String sign = "AIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQDz2fCOYaaU6sztFql4cOmiFRq2";
+
+    @Autowired
+    private WxMaService wxService;
+
+    @Autowired
+    private UserAccountService accountService;
+
+    @Autowired
+    private UserMainService userMainService;
+
+
+    @Autowired
+    private BizMainDao bizMainDao;
+
+    @Autowired
+    private BizMainService bizMainService;
+
+    @Autowired
+    private FrameWxService frameWxService;
+
+
+    /**
+     * 微信登录
+     *
+     * @return 登录结果
+     */
+    @PostMapping("login_by_weixin")
+    @ResponseBody
+    public Object loginByWeixin(@RequestBody WxLoginInfo wxLoginInfo,HttpServletRequest request) throws InvocationTargetException, IllegalAccessException, WxErrorException {
+        //获取用户code
+        String code = wxLoginInfo.getCode();
+        UserInfo userInfo = wxLoginInfo.getUserInfo();
+        Integer type = wxLoginInfo.getType();
+//        String encryptedData = wxLoginInfo.getEncryptedData();
+//        String iv = wxLoginInfo.getIv();
+        if (code == null || userInfo == null) {
+            return ResponseUtil.badArgument();
+        }
+        String sessionKey = null;
+        String openId = null;
+        String uid = null;
+        String unionid = null;
+//        String bank = "";
+        try {
+            WxMaJscode2SessionResult result = this.wxService.getUserService().getSessionInfo(code);
+            openId = result.getOpenid();
+            sessionKey = result.getSessionKey();
+            unionid = result.getUnionid();
+        } catch (Exception e) {
+            e.printStackTrace();
+        }
+
+        UserAccount account = null;
+        UserMain user = null;
+        if(StringUtils.isNotEmpty(openId)){
+            account = accountService.getAccountByOpenId(openId);
+        }
+
+        if (account == null) {
+            user = new UserMain();
+            uid = SnowflakeIdWorker.getUUID();
+            user.setId(uid);
+            user.setNickName(userInfo.getNickName());
+            user.setGender(String.valueOf(userInfo.getGender()));
+            user.setCreatedAt(new Date());
+            userMainService.insertWithoutId(user);
+
+            account = new UserAccount();
+            BeanUtils.copyBeanProp(account, userInfo);
+            account.setUserId(uid);
+            account.setOpenId(openId);
+            account.setAccount(UUIDUtils.shortUUID().toUpperCase());
+            account.setPassword(MD5Util.encode(account.getAccount()));
+            account.setCreatedAt(new Date());
+            accountService.insert(account);
+
+        } else {
+            uid = account.getUserId();
+            user = userMainService.selectByPrimaryKey(account.getUserId());
+            userInfo.setNickName(user.getNickName());
+            userInfo.setAvatarUrl(user.getAvatarUrl());
+        }
+        if (sessionKey == null || openId == null) {
+            return ResponseUtil.fail();
+        }
+        String nickname = userInfo.getNickName();
+        userInfo.setNickName(EmojiUtil.emojiConverterToAlias(nickname));
+        String token = UserTokenManager.generateToken(uid);
+        Map<Object, Object> result = new HashMap<Object, Object>();
+        result.put("token", token);
+        result.put("userInfo", userInfo);
+        result.put("phone", user.getPhoneNo());
+        result.put("uid", uid);
+        return ResponseUtil.ok(result);
+    }
+
+    /**
+     * 用户登录 - H5及web登录,根据登录类型(loginRequest.getType())来判断是平台端还是商家端
+     *
+     * @return 登录结果
+     */
+    @RequestMapping(value="/login_by_app_main", method= RequestMethod.POST,produces = {MediaType.APPLICATION_JSON_VALUE})
+    @ResponseBody
+    public Object loginByMain(LoginRequest loginRequest) {
+        return login(loginRequest);
+    }
+
+    public Object login(LoginRequest loginRequest) {
+        String userName = loginRequest.getUserName();
+        String rawPassword = loginRequest.getPassword();
+
+        String type = loginRequest.getType(); //用户类型,USER-终端用户,FRAME-管理用户,BIZ-商户用户 BIZPERSON-商户用户个体户
+        String mainType = ""; //用户类型,USER-终端用户,FRAME-管理用户,BIZ-商户用户 BIZPERSON-商户用户个体户
+        if("BIZ_PERSON".equals(type)){
+            loginRequest.setType("BIZ");
+            mainType = Constant.USER_RELATION_STATUS_1;
+        }else if("BIZ".equals(type)){
+            mainType = Constant.USER_RELATION_STATUS_0;
+        }
+
+
+        if (StringUtils.isEmpty(userName)) {
+            return ResponseUtil.badArgument();
+        }
+
+        if(StringUtils.isNotEmpty(loginRequest.getCaptchaId())){
+            if (StringUtils.isBlank(loginRequest.getCode())) {
+                return ResponseUtil.fail(507, "请输入验证码");
+            }
+
+            String validCode = HomeCacheManager.getCaptcha(loginRequest.getCaptchaId());
+            if(StringUtils.isEmpty(validCode)){
+                return ResponseUtil.fail(507, "无法获取验证码信息");
+            }
+
+            if(!StringUtils.equals(validCode,loginRequest.getCode())){
+                return ResponseUtil.fail(507, "验证码不匹配");
+            }
+        }
+        Object user = frameWxService.queryUserName(userName,loginRequest.getType());
+
+        if(null==user){
+            return ResponseUtil.fail(507, "无此用户");
+        }
+
+        String password = "";
+        String uid = "";
+        BizMain biz = null;
+        if(user instanceof FrameUser){
+            password = ((FrameUser) user).getPassword();
+            uid = ((FrameUser) user).getId();
+            ((FrameUser) user).setPassword("");
+
+            if(!password.equals(DigestUtils.md5Hex(DigestUtils.md5Hex(rawPassword)))){
+                return ResponseUtil.fail(508, "用户密码错误");
+            }
+
+            if("0".equals(((FrameUser) user).getStatus())){
+                return ResponseUtil.fail(508, "该用户已被禁用");
+            }
+        }else if(user instanceof BizUser){
+            password = ((BizUser) user).getPassword();
+            uid = ((BizUser) user).getId();
+            biz = bizMainDao.selectByPrimaryKey(((BizUser) user).getMainId());
+            BizMain bizMain = bizMainService.selectByPrimaryKey(((BizUser) user).getMainId());
+            ((BizUser) user).setPassword("");
+
+            if(!password.equals(DigestUtils.md5Hex(rawPassword))){
+                return ResponseUtil.fail(508, "用户密码错误");
+            }
+
+            if("1".equals(biz.getStatus())){
+                return ResponseUtil.fail(508, "该商户已被禁用");
+            }
+
+            if(!mainType.equals(bizMain.getType())){
+                return ResponseUtil.fail(508, "用户登录体系与信息不一致");
+            }
+        }
+//
+//        if(!password.equals(DigestUtils.md5Hex(rawPassword))){
+//            return ResponseUtil.fail(508, "用户密码错误");
+//        }
+
+        String token = UserTokenManager.generateToken(uid);
+        Map<Object, Object> result = new HashMap<Object, Object>();
+        result.put("token", token);
+        result.put("user", user);
+        result.put("biz", biz);
+        result.put("uid", uid);
+        HomeCacheManager.removeCaptcha(loginRequest.getCaptchaId());
+        return ResponseUtil.ok(result);
+    }
+
+    /**
+     * 本地获取token
+     */
+    @PostMapping("getToken/")
+    public Object getToken(@RequestBody String body, HttpServletRequest request) {
+        return gotToken(body, this.sign, request);
+    }
+}