Browse Source

第一次提交

zhaojinyu 2 months ago
parent
commit
482ea054e9
100 changed files with 13556 additions and 0 deletions
  1. 10 0
      .gitignore
  2. BIN
      72crm-server.zip
  3. 24 0
      72crm.bat
  4. 46 0
      72crm.sh
  5. 56 0
      DB/seata.sql
  6. 331 0
      DB/wk_crm_nacos.sql
  7. 7183 0
      DB/wk_crm_table.sql
  8. 176 0
      DB/xxl_job.sql
  9. 181 0
      admin/pom.xml
  10. 29 0
      admin/src/main/java/com/kakarote/admin/AdminApplication.java
  11. 69 0
      admin/src/main/java/com/kakarote/admin/common/AdminCodeEnum.java
  12. 30 0
      admin/src/main/java/com/kakarote/admin/common/AdminConst.java
  13. 103 0
      admin/src/main/java/com/kakarote/admin/common/AdminModuleEnum.java
  14. 65 0
      admin/src/main/java/com/kakarote/admin/common/AdminRoleTypeEnum.java
  15. 53 0
      admin/src/main/java/com/kakarote/admin/common/AuthPasswordUtil.java
  16. 94 0
      admin/src/main/java/com/kakarote/admin/common/SmsUtil.java
  17. 45 0
      admin/src/main/java/com/kakarote/admin/common/TypeEnum.java
  18. 46 0
      admin/src/main/java/com/kakarote/admin/common/log/AdminUserLog.java
  19. 75 0
      admin/src/main/java/com/kakarote/admin/common/mq/Consumer.java
  20. 86 0
      admin/src/main/java/com/kakarote/admin/common/mq/MqConfig.java
  21. 83 0
      admin/src/main/java/com/kakarote/admin/common/mq/MyProducerBean.java
  22. 24 0
      admin/src/main/java/com/kakarote/admin/common/mq/ProducerClient.java
  23. 135 0
      admin/src/main/java/com/kakarote/admin/common/mq/ProducerUtil.java
  24. 335 0
      admin/src/main/java/com/kakarote/admin/controller/AdminConfigController.java
  25. 90 0
      admin/src/main/java/com/kakarote/admin/controller/AdminDeptController.java
  26. 177 0
      admin/src/main/java/com/kakarote/admin/controller/AdminFileController.java
  27. 80 0
      admin/src/main/java/com/kakarote/admin/controller/AdminMenuController.java
  28. 53 0
      admin/src/main/java/com/kakarote/admin/controller/AdminMessageConfigController.java
  29. 236 0
      admin/src/main/java/com/kakarote/admin/controller/AdminMessageController.java
  30. 275 0
      admin/src/main/java/com/kakarote/admin/controller/AdminRoleController.java
  31. 74 0
      admin/src/main/java/com/kakarote/admin/controller/AdminUserApplyController.java
  32. 454 0
      admin/src/main/java/com/kakarote/admin/controller/AdminUserController.java
  33. 38 0
      admin/src/main/java/com/kakarote/admin/controller/AdminUserHisTableController.java
  34. 47 0
      admin/src/main/java/com/kakarote/admin/entity/BO/AdminCloudBO.java
  35. 33 0
      admin/src/main/java/com/kakarote/admin/entity/BO/AdminCompanyBO.java
  36. 23 0
      admin/src/main/java/com/kakarote/admin/entity/BO/AdminDeleteByBatchIdBO.java
  37. 33 0
      admin/src/main/java/com/kakarote/admin/entity/BO/AdminDeptBO.java
  38. 22 0
      admin/src/main/java/com/kakarote/admin/entity/BO/AdminDeptQueryBO.java
  39. 24 0
      admin/src/main/java/com/kakarote/admin/entity/BO/AdminInitDataBO.java
  40. 24 0
      admin/src/main/java/com/kakarote/admin/entity/BO/AdminLanguagePackBO.java
  41. 25 0
      admin/src/main/java/com/kakarote/admin/entity/BO/AdminMessageQueryBO.java
  42. 22 0
      admin/src/main/java/com/kakarote/admin/entity/BO/AdminPageApplyBO.java
  43. 23 0
      admin/src/main/java/com/kakarote/admin/entity/BO/AdminPayCreateOrderBO.java
  44. 14 0
      admin/src/main/java/com/kakarote/admin/entity/BO/AdminPayOrderListBO.java
  45. 24 0
      admin/src/main/java/com/kakarote/admin/entity/BO/AdminRoleBO.java
  46. 43 0
      admin/src/main/java/com/kakarote/admin/entity/BO/AdminSaveApplyBO.java
  47. 51 0
      admin/src/main/java/com/kakarote/admin/entity/BO/AdminUserBO.java
  48. 24 0
      admin/src/main/java/com/kakarote/admin/entity/BO/AdminUserRoleBO.java
  49. 28 0
      admin/src/main/java/com/kakarote/admin/entity/BO/AdminUserStatusBO.java
  50. 23 0
      admin/src/main/java/com/kakarote/admin/entity/BO/DeptUserListByHrmBO.java
  51. 25 0
      admin/src/main/java/com/kakarote/admin/entity/BO/DeptUserListVO.java
  52. 44 0
      admin/src/main/java/com/kakarote/admin/entity/BO/DeptVO.java
  53. 29 0
      admin/src/main/java/com/kakarote/admin/entity/BO/FinanceAccountAuthSaveBO.java
  54. 38 0
      admin/src/main/java/com/kakarote/admin/entity/BO/HrmAddUserBO.java
  55. 29 0
      admin/src/main/java/com/kakarote/admin/entity/BO/LogWelcomeSpeechBO.java
  56. 34 0
      admin/src/main/java/com/kakarote/admin/entity/BO/ModuleSettingBO.java
  57. 43 0
      admin/src/main/java/com/kakarote/admin/entity/BO/QuerySysLogBO.java
  58. 24 0
      admin/src/main/java/com/kakarote/admin/entity/BO/RenameFileBO.java
  59. 27 0
      admin/src/main/java/com/kakarote/admin/entity/BO/SystemUserBO.java
  60. 35 0
      admin/src/main/java/com/kakarote/admin/entity/BO/UserBookBO.java
  61. 26 0
      admin/src/main/java/com/kakarote/admin/entity/BO/UserInfoRequestBO.java
  62. 57 0
      admin/src/main/java/com/kakarote/admin/entity/PO/AdminAttention.java
  63. 64 0
      admin/src/main/java/com/kakarote/admin/entity/PO/AdminConfig.java
  64. 72 0
      admin/src/main/java/com/kakarote/admin/entity/PO/AdminDept.java
  65. 73 0
      admin/src/main/java/com/kakarote/admin/entity/PO/AdminFile.java
  66. 55 0
      admin/src/main/java/com/kakarote/admin/entity/PO/AdminLanguagePack.java
  67. 82 0
      admin/src/main/java/com/kakarote/admin/entity/PO/AdminMenu.java
  68. 90 0
      admin/src/main/java/com/kakarote/admin/entity/PO/AdminMessage.java
  69. 65 0
      admin/src/main/java/com/kakarote/admin/entity/PO/AdminModelSort.java
  70. 97 0
      admin/src/main/java/com/kakarote/admin/entity/PO/AdminRole.java
  71. 61 0
      admin/src/main/java/com/kakarote/admin/entity/PO/AdminRoleAuth.java
  72. 58 0
      admin/src/main/java/com/kakarote/admin/entity/PO/AdminRoleMenu.java
  73. 101 0
      admin/src/main/java/com/kakarote/admin/entity/PO/AdminUser.java
  74. 65 0
      admin/src/main/java/com/kakarote/admin/entity/PO/AdminUserApply.java
  75. 67 0
      admin/src/main/java/com/kakarote/admin/entity/PO/AdminUserConfig.java
  76. 58 0
      admin/src/main/java/com/kakarote/admin/entity/PO/AdminUserHisTable.java
  77. 56 0
      admin/src/main/java/com/kakarote/admin/entity/PO/AdminUserRole.java
  78. 41 0
      admin/src/main/java/com/kakarote/admin/entity/VO/AdminDeptVO.java
  79. 34 0
      admin/src/main/java/com/kakarote/admin/entity/VO/AdminEmailVerifyVO.java
  80. 42 0
      admin/src/main/java/com/kakarote/admin/entity/VO/AdminLanguagePackVO.java
  81. 42 0
      admin/src/main/java/com/kakarote/admin/entity/VO/AdminMenuVO.java
  82. 48 0
      admin/src/main/java/com/kakarote/admin/entity/VO/AdminMessageConfigVO.java
  83. 42 0
      admin/src/main/java/com/kakarote/admin/entity/VO/AdminMessageVO.java
  84. 21 0
      admin/src/main/java/com/kakarote/admin/entity/VO/AdminOrderVO.java
  85. 34 0
      admin/src/main/java/com/kakarote/admin/entity/VO/AdminOrganizationVO.java
  86. 28 0
      admin/src/main/java/com/kakarote/admin/entity/VO/AdminRoleVO.java
  87. 35 0
      admin/src/main/java/com/kakarote/admin/entity/VO/AdminSuperUserVo.java
  88. 73 0
      admin/src/main/java/com/kakarote/admin/entity/VO/AdminUserVO.java
  89. 34 0
      admin/src/main/java/com/kakarote/admin/entity/VO/CloudConfigVO.java
  90. 36 0
      admin/src/main/java/com/kakarote/admin/entity/VO/HrmSimpleUserVO.java
  91. 59 0
      admin/src/main/java/com/kakarote/admin/entity/VO/ModuleSettingVO.java
  92. 70 0
      admin/src/main/java/com/kakarote/admin/entity/VO/UserBookVO.java
  93. 29 0
      admin/src/main/java/com/kakarote/admin/entity/VO/UserInfoVO.java
  94. 16 0
      admin/src/main/java/com/kakarote/admin/mapper/AdminAttentionMapper.java
  95. 18 0
      admin/src/main/java/com/kakarote/admin/mapper/AdminConfigMapper.java
  96. 33 0
      admin/src/main/java/com/kakarote/admin/mapper/AdminDeptMapper.java
  97. 16 0
      admin/src/main/java/com/kakarote/admin/mapper/AdminFileMapper.java
  98. 24 0
      admin/src/main/java/com/kakarote/admin/mapper/AdminLanguagePackMapper.java
  99. 51 0
      admin/src/main/java/com/kakarote/admin/mapper/AdminMenuMapper.java
  100. 16 0
      admin/src/main/java/com/kakarote/admin/mapper/AdminMessageConfigMapper.java

+ 10 - 0
.gitignore

@@ -0,0 +1,10 @@
+.DS_Store
+.idea/
+*.iml
+gateway/src/main/webapp/public/**
+logs/**
+test
+target
+*/target/**
+rebel.xml
+rebel-remote.xml

BIN
72crm-server.zip


+ 24 - 0
72crm.bat

@@ -0,0 +1,24 @@
+@echo off
+title ${project.artifactId}
+rem -------------------------------------------------------------------------
+rem
+rem 使用说明:
+rem
+rem 1: 打包时默认使用application-test.yml配置文件,如需要更改,直接更改下面的命令即可,如 -Dspring.profiles.include=core,prod
+rem
+rem -------------------------------------------------------------------------
+
+setlocal & pushd
+
+set JAVA_OPTS=-Dspring.profiles.include=core,test
+if "${project.artifactId}" == "gateway" (
+    set JAVA_OPTS =
+)
+rem -Xms分配堆最小内存,默认为物理内存的1/64;-Xmx分配最大内存,默认为物理内存的1/4 如果程序会崩溃请将此值调高
+java -Xms128m -Xmx512m -jar %JAVA_OPTS% ${project.artifactId}-${project.version}.jar
+
+endlocal & popd
+pause
+
+
+

+ 46 - 0
72crm.sh

@@ -0,0 +1,46 @@
+#!/bin/bash
+
+COMMAND="$1"
+
+if [[ "$COMMAND" != "start" ]] && [[ "$COMMAND" != "stop" ]] && [[ "$COMMAND" != "restart" ]]; then
+	echo "Usage: $0 start | stop | restart"
+	exit 0
+fi
+
+APP_BASE_PATH=$(cd `dirname $0`; pwd)
+
+function start()
+{
+    JAVA_OPTS=-Dspring.profiles.active=core,test
+    if [[ "${project.artifactId}" == "gateway" ]]; then
+    	JAVA_OPTS=
+    fi
+    # -Xms分配堆最小内存,默认为物理内存的1/64;-Xmx分配最大内存,默认为物理内存的1/4 如果程序会崩溃请将此值调高
+    nohup java -Xms128m -Xmx512m -jar ${JAVA_OPTS} ${project.artifactId}-${project.version}.jar >> /dev/null 2>&1 &
+    echo "--------项目启动成功--------"
+    echo "--------欢迎使用悟空CRM ^_^--------"
+}
+
+function stop()
+{
+    P_ID=`ps -ef | grep -w ${project.artifactId}-${project.version}.jar | grep -v "grep" | awk '{print $2}'`
+    kill $P_ID
+    echo "项目已关闭"
+}
+
+function restart()
+{
+    P_ID=`ps -ef | grep -w ${project.artifactId}-${project.version}.jar | grep -v "grep" | awk '{print $2}'`
+    start
+    sleep 25s
+    kill $P_ID
+    echo "项目重启成功"
+}
+
+if [[ "$COMMAND" == "start" ]]; then
+	start
+elif [[ "$COMMAND" == "stop" ]]; then
+    stop
+else
+    restart
+fi

+ 56 - 0
DB/seata.sql

@@ -0,0 +1,56 @@
+-- -------------------------------- The script used when storeMode is 'db' --------------------------------
+-- the table to store GlobalSession data
+CREATE TABLE IF NOT EXISTS `global_table`
+(
+    `xid`                       VARCHAR(128) NOT NULL,
+    `transaction_id`            BIGINT,
+    `status`                    TINYINT      NOT NULL,
+    `application_id`            VARCHAR(32),
+    `transaction_service_group` VARCHAR(32),
+    `transaction_name`          VARCHAR(128),
+    `timeout`                   INT,
+    `begin_time`                BIGINT,
+    `application_data`          VARCHAR(2000),
+    `gmt_create`                DATETIME,
+    `gmt_modified`              DATETIME,
+    PRIMARY KEY (`xid`),
+    KEY `idx_gmt_modified_status` (`gmt_modified`, `status`),
+    KEY `idx_transaction_id` (`transaction_id`)
+) ENGINE = InnoDB
+  DEFAULT CHARSET = utf8;
+
+-- the table to store BranchSession data
+CREATE TABLE IF NOT EXISTS `branch_table`
+(
+    `branch_id`         BIGINT       NOT NULL,
+    `xid`               VARCHAR(128) NOT NULL,
+    `transaction_id`    BIGINT,
+    `resource_group_id` VARCHAR(32),
+    `resource_id`       VARCHAR(256),
+    `branch_type`       VARCHAR(8),
+    `status`            TINYINT,
+    `client_id`         VARCHAR(64),
+    `application_data`  VARCHAR(2000),
+    `gmt_create`        DATETIME(6),
+    `gmt_modified`      DATETIME(6),
+    PRIMARY KEY (`branch_id`),
+    KEY `idx_xid` (`xid`)
+) ENGINE = InnoDB
+  DEFAULT CHARSET = utf8;
+
+-- the table to store lock data
+CREATE TABLE IF NOT EXISTS `lock_table`
+(
+    `row_key`        VARCHAR(128) NOT NULL,
+    `xid`            VARCHAR(96),
+    `transaction_id` BIGINT,
+    `branch_id`      BIGINT       NOT NULL,
+    `resource_id`    VARCHAR(256),
+    `table_name`     VARCHAR(32),
+    `pk`             VARCHAR(36),
+    `gmt_create`     DATETIME,
+    `gmt_modified`   DATETIME,
+    PRIMARY KEY (`row_key`),
+    KEY `idx_branch_id` (`branch_id`)
+) ENGINE = InnoDB
+  DEFAULT CHARSET = utf8;

+ 331 - 0
DB/wk_crm_nacos.sql

@@ -0,0 +1,331 @@
+SET NAMES utf8mb4;
+SET FOREIGN_KEY_CHECKS = 0;
+
+-- ----------------------------
+-- Table structure for config_info
+-- ----------------------------
+DROP TABLE IF EXISTS `config_info`;
+CREATE TABLE `config_info`  (
+  `id` bigint(0) NOT NULL AUTO_INCREMENT COMMENT 'id',
+  `data_id` varchar(255) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL COMMENT 'data_id',
+  `group_id` varchar(255) CHARACTER SET utf8 COLLATE utf8_bin NULL DEFAULT NULL,
+  `content` longtext CHARACTER SET utf8 COLLATE utf8_bin NOT NULL COMMENT 'content',
+  `md5` varchar(32) CHARACTER SET utf8 COLLATE utf8_bin NULL DEFAULT NULL COMMENT 'md5',
+  `gmt_create` datetime(0) NOT NULL DEFAULT CURRENT_TIMESTAMP(0) COMMENT '创建时间',
+  `gmt_modified` datetime(0) NOT NULL DEFAULT CURRENT_TIMESTAMP(0) COMMENT '修改时间',
+  `src_user` text CHARACTER SET utf8 COLLATE utf8_bin NULL COMMENT 'source user',
+  `src_ip` varchar(50) CHARACTER SET utf8 COLLATE utf8_bin NULL DEFAULT NULL COMMENT 'source ip',
+  `app_name` varchar(128) CHARACTER SET utf8 COLLATE utf8_bin NULL DEFAULT NULL,
+  `tenant_id` varchar(128) CHARACTER SET utf8 COLLATE utf8_bin NULL DEFAULT '' COMMENT '租户字段',
+  `c_desc` varchar(256) CHARACTER SET utf8 COLLATE utf8_bin NULL DEFAULT NULL,
+  `c_use` varchar(64) CHARACTER SET utf8 COLLATE utf8_bin NULL DEFAULT NULL,
+  `effect` varchar(64) CHARACTER SET utf8 COLLATE utf8_bin NULL DEFAULT NULL,
+  `type` varchar(64) CHARACTER SET utf8 COLLATE utf8_bin NULL DEFAULT NULL,
+  `c_schema` text CHARACTER SET utf8 COLLATE utf8_bin NULL,
+  PRIMARY KEY (`id`) USING BTREE,
+  UNIQUE INDEX `uk_configinfo_datagrouptenant`(`data_id`, `group_id`, `tenant_id`) USING BTREE
+) ENGINE = InnoDB CHARACTER SET = utf8 COLLATE = utf8_bin COMMENT = 'config_info' ROW_FORMAT = Dynamic;
+
+
+
+-- ----------------------------
+-- Records of config_info
+-- ----------------------------
+INSERT INTO `config_info` VALUES (1, 'service.vgroupMapping.crm_tx_group', 'SEATA_GROUP', 'default', 'c21f969b5f03d33d43e04f8f136e7682', '2020-10-12 09:06:43', '2020-10-12 09:10:53', NULL, '127.0.0.1', '', '', NULL, NULL, NULL, NULL, NULL);
+INSERT INTO `config_info` VALUES (2, 'service.vgroupMapping.admin_tx_group', 'SEATA_GROUP', 'default', 'c21f969b5f03d33d43e04f8f136e7682', '2020-10-12 09:06:43', '2020-10-12 09:10:54', NULL, '127.0.0.1', '', '', NULL, NULL, NULL, NULL, NULL);
+INSERT INTO `config_info` VALUES (3, 'store.mode', 'SEATA_GROUP', 'db', 'd77d5e503ad1439f585ac494268b351b', '2020-10-12 09:06:43', '2020-10-12 09:10:54', NULL, '127.0.0.1', '', '', NULL, NULL, NULL, NULL, NULL);
+INSERT INTO `config_info` VALUES (4, 'store.db.datasource', 'SEATA_GROUP', 'druid', '3d650fb8a5df01600281d48c47c9fa60', '2020-10-12 09:06:43', '2020-10-12 09:10:54', NULL, '127.0.0.1', '', '', NULL, NULL, NULL, NULL, NULL);
+INSERT INTO `config_info` VALUES (5, 'store.db.dbType', 'SEATA_GROUP', 'mysql', '81c3b080dad537de7e10e0987a4bf52e', '2020-10-12 09:06:43', '2020-10-12 09:10:54', NULL, '127.0.0.1', '', '', NULL, NULL, NULL, NULL, NULL);
+INSERT INTO `config_info` VALUES (6, 'store.db.driverClassName', 'SEATA_GROUP', 'com.mysql.jdbc.Driver', '683cf0c3a5a56cec94dfac94ca16d760', '2020-10-12 09:06:43', '2020-10-12 09:10:54', NULL, '127.0.0.1', '', '', NULL, NULL, NULL, NULL, NULL);
+INSERT INTO `config_info` VALUES (7, 'store.db.url', 'SEATA_GROUP', 'jdbc:mysql://127.0.0.1:3306/seata?useUnicode=true', '3c0c8ba10c3daee50a2db1dd0f397282', '2020-10-12 09:06:43', '2020-10-12 09:10:54', NULL, '127.0.0.1', '', '', NULL, NULL, NULL, NULL, NULL);
+INSERT INTO `config_info` VALUES (8, 'store.db.user', 'SEATA_GROUP', 'root', '63a9f0ea7bb98050796b649e85481845', '2020-10-12 09:06:44', '2020-10-12 09:10:54', NULL, '127.0.0.1', '', '', NULL, NULL, NULL, NULL, NULL);
+INSERT INTO `config_info` VALUES (9, 'store.db.password', 'SEATA_GROUP', 'password', '5f4dcc3b5aa765d61d8327deb882cf99', '2020-10-12 09:06:44', '2020-10-12 09:10:54', NULL, '127.0.0.1', '', '', NULL, NULL, NULL, NULL, NULL);
+INSERT INTO `config_info` VALUES (10, 'store.db.minConn', 'SEATA_GROUP', '5', 'e4da3b7fbbce2345d7772b0674a318d5', '2020-10-12 09:06:44', '2020-10-12 09:10:54', NULL, '127.0.0.1', '', '', NULL, NULL, NULL, NULL, NULL);
+INSERT INTO `config_info` VALUES (11, 'store.db.maxConn', 'SEATA_GROUP', '30', '34173cb38f07f89ddbebc2ac9128303f', '2020-10-12 09:06:44', '2020-10-12 09:10:54', NULL, '127.0.0.1', '', '', NULL, NULL, NULL, NULL, NULL);
+INSERT INTO `config_info` VALUES (12, 'store.db.globalTable', 'SEATA_GROUP', 'global_table', '8b28fb6bb4c4f984df2709381f8eba2b', '2020-10-12 09:06:44', '2020-10-12 09:10:54', NULL, '127.0.0.1', '', '', NULL, NULL, NULL, NULL, NULL);
+INSERT INTO `config_info` VALUES (13, 'store.db.branchTable', 'SEATA_GROUP', 'branch_table', '54bcdac38cf62e103fe115bcf46a660c', '2020-10-12 09:06:44', '2020-10-12 09:10:54', NULL, '127.0.0.1', '', '', NULL, NULL, NULL, NULL, NULL);
+INSERT INTO `config_info` VALUES (14, 'store.db.queryLimit', 'SEATA_GROUP', '100', 'f899139df5e1059396431415e770c6dd', '2020-10-12 09:06:44', '2020-10-12 09:10:54', NULL, '127.0.0.1', '', '', NULL, NULL, NULL, NULL, NULL);
+INSERT INTO `config_info` VALUES (15, 'store.db.lockTable', 'SEATA_GROUP', 'lock_table', '55e0cae3b6dc6696b768db90098b8f2f', '2020-10-12 09:06:44', '2020-10-12 09:10:54', NULL, '127.0.0.1', '', '', NULL, NULL, NULL, NULL, NULL);
+INSERT INTO `config_info` VALUES (16, 'store.db.maxWait', 'SEATA_GROUP', '5000', 'a35fe7f7fe8217b4369a0af4244d1fca', '2020-10-12 09:06:44', '2020-10-12 09:10:54', NULL, '127.0.0.1', '', '', NULL, NULL, NULL, NULL, NULL);
+INSERT INTO `config_info` VALUES (17, 'service.vgroupMapping.oa_tx_group', 'SEATA_GROUP', 'default', 'c21f969b5f03d33d43e04f8f136e7682', '2020-10-12 09:06:43', '2020-10-12 09:10:54', NULL, '127.0.0.1', '', '', NULL, NULL, NULL, NULL, NULL);
+INSERT INTO `config_info` VALUES (18, 'service.vgroupMapping.examine_tx_group', 'SEATA_GROUP', 'default', 'c21f969b5f03d33d43e04f8f136e7682', '2020-10-12 09:06:43', '2020-10-12 09:10:54', NULL, '127.0.0.1', '', '', NULL, NULL, NULL, NULL, NULL);
+INSERT INTO `config_info` VALUES (19, 'service.vgroupMapping.hrm_tx_group', 'SEATA_GROUP', 'default', 'c21f969b5f03d33d43e04f8f136e7682', '2020-10-12 09:06:43', '2020-10-12 09:10:54', NULL, '127.0.0.1', '', '', NULL, NULL, NULL, NULL, NULL);
+INSERT INTO `config_info` VALUES (20, 'service.vgroupMapping.jxc_tx_group', 'SEATA_GROUP', 'default', 'c21f969b5f03d33d43e04f8f136e7682', '2022-04-08 06:39:47', '2022-04-08 06:39:47', NULL, '0:0:0:0:0:0:0:1', '', '', NULL, NULL, NULL, 'text', NULL);
+
+-- Records of config_info
+-- ----------------------------
+
+-- ----------------------------
+-- Table structure for config_info_aggr
+-- ----------------------------
+DROP TABLE IF EXISTS `config_info_aggr`;
+CREATE TABLE `config_info_aggr`  (
+  `id` bigint(0) NOT NULL AUTO_INCREMENT COMMENT 'id',
+  `data_id` varchar(255) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL COMMENT 'data_id',
+  `group_id` varchar(255) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL COMMENT 'group_id',
+  `datum_id` varchar(255) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL COMMENT 'datum_id',
+  `content` longtext CHARACTER SET utf8 COLLATE utf8_bin NOT NULL COMMENT '内容',
+  `gmt_modified` datetime(0) NOT NULL COMMENT '修改时间',
+  `app_name` varchar(128) CHARACTER SET utf8 COLLATE utf8_bin NULL DEFAULT NULL,
+  `tenant_id` varchar(128) CHARACTER SET utf8 COLLATE utf8_bin NULL DEFAULT '' COMMENT '租户字段',
+  PRIMARY KEY (`id`) USING BTREE,
+  UNIQUE INDEX `uk_configinfoaggr_datagrouptenantdatum`(`data_id`, `group_id`, `tenant_id`, `datum_id`) USING BTREE
+) ENGINE = InnoDB CHARACTER SET = utf8 COLLATE = utf8_bin COMMENT = '增加租户字段' ROW_FORMAT = Dynamic;
+
+-- ----------------------------
+-- Records of config_info_aggr
+-- ----------------------------
+
+-- ----------------------------
+-- Table structure for config_info_beta
+-- ----------------------------
+DROP TABLE IF EXISTS `config_info_beta`;
+CREATE TABLE `config_info_beta`  (
+  `id` bigint(0) NOT NULL AUTO_INCREMENT COMMENT 'id',
+  `data_id` varchar(255) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL COMMENT 'data_id',
+  `group_id` varchar(128) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL COMMENT 'group_id',
+  `app_name` varchar(128) CHARACTER SET utf8 COLLATE utf8_bin NULL DEFAULT NULL COMMENT 'app_name',
+  `content` longtext CHARACTER SET utf8 COLLATE utf8_bin NOT NULL COMMENT 'content',
+  `beta_ips` varchar(1024) CHARACTER SET utf8 COLLATE utf8_bin NULL DEFAULT NULL COMMENT 'betaIps',
+  `md5` varchar(32) CHARACTER SET utf8 COLLATE utf8_bin NULL DEFAULT NULL COMMENT 'md5',
+  `gmt_create` datetime(0) NOT NULL DEFAULT CURRENT_TIMESTAMP(0) COMMENT '创建时间',
+  `gmt_modified` datetime(0) NOT NULL DEFAULT CURRENT_TIMESTAMP(0) COMMENT '修改时间',
+  `src_user` text CHARACTER SET utf8 COLLATE utf8_bin NULL COMMENT 'source user',
+  `src_ip` varchar(50) CHARACTER SET utf8 COLLATE utf8_bin NULL DEFAULT NULL COMMENT 'source ip',
+  `tenant_id` varchar(128) CHARACTER SET utf8 COLLATE utf8_bin NULL DEFAULT '' COMMENT '租户字段',
+  PRIMARY KEY (`id`) USING BTREE,
+  UNIQUE INDEX `uk_configinfobeta_datagrouptenant`(`data_id`, `group_id`, `tenant_id`) USING BTREE
+) ENGINE = InnoDB CHARACTER SET = utf8 COLLATE = utf8_bin COMMENT = 'config_info_beta' ROW_FORMAT = Dynamic;
+
+-- ----------------------------
+-- Records of config_info_beta
+-- ----------------------------
+
+-- ----------------------------
+-- Table structure for config_info_route
+-- ----------------------------
+DROP TABLE IF EXISTS `config_info_route`;
+CREATE TABLE `config_info_route`  (
+  `id` int(0) NOT NULL AUTO_INCREMENT COMMENT 'id',
+  `route_id` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '路由id',
+  `uri` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT 'uri路径',
+  `predicates` text CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '判定器',
+  `filters` text CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL COMMENT '过滤器',
+  `orders` int(0) NULL DEFAULT NULL COMMENT '排序',
+  `description` varchar(500) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '描述',
+  `intercept` int(0) NOT NULL DEFAULT 1 COMMENT '是否拦截 1 是 0 否',
+  `status` int(0) NOT NULL DEFAULT 1 COMMENT '状态:Y-有效,N-无效',
+  `create_time` datetime(0) NULL DEFAULT CURRENT_TIMESTAMP(0) COMMENT '创建时间',
+  `update_time` datetime(0) NULL DEFAULT CURRENT_TIMESTAMP(0) COMMENT '更新时间',
+  PRIMARY KEY (`id`) USING BTREE,
+  INDEX `ux_gateway_routes_uri`(`uri`) USING BTREE
+) ENGINE = InnoDB AUTO_INCREMENT = 310 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '网关路由表' ROW_FORMAT = Dynamic;
+
+-- ----------------------------
+-- Records of config_info_route
+-- ----------------------------
+INSERT INTO `config_info_route` VALUES (101, 'authorization', 'lb://authorization', '[{\"name\":\"Path\",\"args\":{\"pattern\":\"/authorization*/**\"}}]', '[]', 100, '用户认证相关接口', 0, 1, '2020-04-21 17:00:32', '2020-04-21 17:00:32');
+INSERT INTO `config_info_route` VALUES (102, 'admin', 'lb://admin', '[{\"name\":\"Path\",\"args\":{\"pattern\":\"/admin*/**\"}}]', '[]', 100, '系统管理相关接口', 1, 1, '2020-04-21 17:00:32', '2020-04-21 17:00:32');
+INSERT INTO `config_info_route` VALUES (103, 'login', 'lb://authorization/login', '[{\"name\":\"Path\",\"args\":{\"pattern\":\"/login\"}}]', '[]', 100, '用户登录相关接口', 0, 1, '2020-04-21 17:00:32', '2020-04-21 17:00:32');
+INSERT INTO `config_info_route` VALUES (104, 'logout', 'lb://authorization/logout', '[{\"name\":\"Path\",\"args\":{\"pattern\":\"/logout\"}}]', '[]', 100, '用户退出相关接口', 0, 1, '2020-04-21 17:00:32', '2020-04-21 17:00:32');
+INSERT INTO `config_info_route` VALUES (105, 'reLogin', 'lb://authorization/reLogin', '[{\"name\":\"Path\",\"args\":{\"pattern\":\"/reLogin\"}}]', '[]', 100, '用户重新登录相关接口', 0, 1, '2020-04-21 17:00:32', '2020-04-21 17:00:32');
+INSERT INTO `config_info_route` VALUES (106, 'crm', 'lb://crm', '[{\"name\":\"Path\",\"args\":{\"pattern\":\"/crm*/**\"}}]', '[]', 100, '客户管理相关接口', 1, 1, '2020-04-21 17:00:32', '2020-04-21 17:00:32');
+INSERT INTO `config_info_route` VALUES (107, 'hrm', 'lb://hrm', '[{\"name\":\"Path\",\"args\":{\"pattern\":\"/hrm*/**\"}}]', '[]', 100, '人力资源相关接口', 1, 1, '2020-04-21 17:00:32', '2020-04-21 17:00:32');
+INSERT INTO `config_info_route` VALUES (109, 'work', 'lb://work', '[{\"name\":\"Path\",\"args\":{\"pattern\":\"/work*/**\"}}]', '[]', 100, '项目管理相关接口', 1, 1, '2020-04-21 17:00:32', '2020-04-21 17:00:32');
+INSERT INTO `config_info_route` VALUES (113, 'oa', 'lb://oa', '[{\"name\":\"Path\",\"args\":{\"pattern\":\"/oa*/**\"}}]', '[]', 100, 'OA相关接口', 1, 1, '2020-04-21 17:00:32', '2020-04-21 17:00:32');
+INSERT INTO `config_info_route` VALUES (116, 'bi', 'lb://bi', '[{\"name\":\"Path\",\"args\":{\"pattern\":\"/bi*/**\"}}]', '[]', 100, '商业智能相关接口', 1, 1, '2020-04-21 17:00:32', '2020-04-21 17:00:32');
+INSERT INTO `config_info_route` VALUES (117, 'file', 'http://127.0.0.1:8012/', '[{\"name\":\"Path\",\"args\":{\"pattern\":\"/file/**\"}}]', '[{\"name\":\"StripPrefix\",\"args\":{\"parts\":\"1\"}}]', 100, '文件预览相关接口', 0, 1, '2020-04-21 17:00:32', '2020-04-21 17:00:32');
+INSERT INTO `config_info_route` VALUES (119, 'crmCallUpload', 'lb://crm/crmCall/upload', '[{\"name\":\"Path\",\"args\":{\"pattern\":\"/crmCall/upload\"}}]', '[]', 98, '呼叫中心上传接口', 0, 1, '2020-04-21 17:00:32', '2020-04-21 17:00:32');
+INSERT INTO `config_info_route` VALUES (123, 'permission', 'lb://authorization/permission', '[{\"name\":\"Path\",\"args\":{\"pattern\":\"/permission\"}}]', '[]', 100, '用户权限验证接口', 0, 1, '2020-04-21 17:00:32', '2020-04-21 17:00:32');
+INSERT INTO `config_info_route` VALUES (124, 'examine', 'lb://examine', '[{\"name\":\"Path\",\"args\":{\"pattern\":\"/examine*/**\"}}]', '[]', 100, '审批相关接口', 1, 1, '2020-04-21 17:00:32', '2020-04-21 17:00:32');
+INSERT INTO `config_info_route` VALUES (309, 'finance', 'lb://finance', '[{\"name\":\"Path\",\"args\":{\"pattern\":\"/finance*/**\"}}]', '[]', 100, '财务系统相关接口', 1, 1, '2020-04-21 17:00:32', '2020-04-21 17:00:32');
+
+-- ----------------------------
+-- Table structure for config_info_tag
+-- ----------------------------
+DROP TABLE IF EXISTS `config_info_tag`;
+CREATE TABLE `config_info_tag`  (
+  `id` bigint(0) NOT NULL AUTO_INCREMENT COMMENT 'id',
+  `data_id` varchar(255) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL COMMENT 'data_id',
+  `group_id` varchar(128) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL COMMENT 'group_id',
+  `tenant_id` varchar(128) CHARACTER SET utf8 COLLATE utf8_bin NULL DEFAULT '' COMMENT 'tenant_id',
+  `tag_id` varchar(128) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL COMMENT 'tag_id',
+  `app_name` varchar(128) CHARACTER SET utf8 COLLATE utf8_bin NULL DEFAULT NULL COMMENT 'app_name',
+  `content` longtext CHARACTER SET utf8 COLLATE utf8_bin NOT NULL COMMENT 'content',
+  `md5` varchar(32) CHARACTER SET utf8 COLLATE utf8_bin NULL DEFAULT NULL COMMENT 'md5',
+  `gmt_create` datetime(0) NOT NULL DEFAULT CURRENT_TIMESTAMP(0) COMMENT '创建时间',
+  `gmt_modified` datetime(0) NOT NULL DEFAULT CURRENT_TIMESTAMP(0) COMMENT '修改时间',
+  `src_user` text CHARACTER SET utf8 COLLATE utf8_bin NULL COMMENT 'source user',
+  `src_ip` varchar(50) CHARACTER SET utf8 COLLATE utf8_bin NULL DEFAULT NULL COMMENT 'source ip',
+  PRIMARY KEY (`id`) USING BTREE,
+  UNIQUE INDEX `uk_configinfotag_datagrouptenanttag`(`data_id`, `group_id`, `tenant_id`, `tag_id`) USING BTREE
+) ENGINE = InnoDB CHARACTER SET = utf8 COLLATE = utf8_bin COMMENT = 'config_info_tag' ROW_FORMAT = Dynamic;
+
+-- ----------------------------
+-- Records of config_info_tag
+-- ----------------------------
+
+-- ----------------------------
+-- Table structure for config_tags_relation
+-- ----------------------------
+DROP TABLE IF EXISTS `config_tags_relation`;
+CREATE TABLE `config_tags_relation`  (
+  `id` bigint(0) NOT NULL COMMENT 'id',
+  `tag_name` varchar(128) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL COMMENT 'tag_name',
+  `tag_type` varchar(64) CHARACTER SET utf8 COLLATE utf8_bin NULL DEFAULT NULL COMMENT 'tag_type',
+  `data_id` varchar(255) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL COMMENT 'data_id',
+  `group_id` varchar(128) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL COMMENT 'group_id',
+  `tenant_id` varchar(128) CHARACTER SET utf8 COLLATE utf8_bin NULL DEFAULT '' COMMENT 'tenant_id',
+  `nid` bigint(0) NOT NULL AUTO_INCREMENT,
+  PRIMARY KEY (`nid`) USING BTREE,
+  UNIQUE INDEX `uk_configtagrelation_configidtag`(`id`, `tag_name`, `tag_type`) USING BTREE,
+  INDEX `idx_tenant_id`(`tenant_id`) USING BTREE
+) ENGINE = InnoDB CHARACTER SET = utf8 COLLATE = utf8_bin COMMENT = 'config_tag_relation' ROW_FORMAT = Dynamic;
+
+-- ----------------------------
+-- Records of config_tags_relation
+-- ----------------------------
+
+-- ----------------------------
+-- Table structure for group_capacity
+-- ----------------------------
+DROP TABLE IF EXISTS `group_capacity`;
+CREATE TABLE `group_capacity`  (
+  `id` bigint(0) UNSIGNED NOT NULL AUTO_INCREMENT COMMENT '主键ID',
+  `group_id` varchar(128) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL DEFAULT '' COMMENT 'Group ID,空字符表示整个集群',
+  `quota` int(0) UNSIGNED NOT NULL DEFAULT 0 COMMENT '配额,0表示使用默认值',
+  `usage` int(0) UNSIGNED NOT NULL DEFAULT 0 COMMENT '使用量',
+  `max_size` int(0) UNSIGNED NOT NULL DEFAULT 0 COMMENT '单个配置大小上限,单位为字节,0表示使用默认值',
+  `max_aggr_count` int(0) UNSIGNED NOT NULL DEFAULT 0 COMMENT '聚合子配置最大个数,,0表示使用默认值',
+  `max_aggr_size` int(0) UNSIGNED NOT NULL DEFAULT 0 COMMENT '单个聚合数据的子配置大小上限,单位为字节,0表示使用默认值',
+  `max_history_count` int(0) UNSIGNED NOT NULL DEFAULT 0 COMMENT '最大变更历史数量',
+  `gmt_create` datetime(0) NOT NULL DEFAULT CURRENT_TIMESTAMP(0) COMMENT '创建时间',
+  `gmt_modified` datetime(0) NOT NULL DEFAULT CURRENT_TIMESTAMP(0) COMMENT '修改时间',
+  PRIMARY KEY (`id`) USING BTREE,
+  UNIQUE INDEX `uk_group_id`(`group_id`) USING BTREE
+) ENGINE = InnoDB CHARACTER SET = utf8 COLLATE = utf8_bin COMMENT = '集群、各Group容量信息表' ROW_FORMAT = Dynamic;
+
+-- ----------------------------
+-- Records of group_capacity
+-- ----------------------------
+
+-- ----------------------------
+-- Table structure for his_config_info
+-- ----------------------------
+DROP TABLE IF EXISTS `his_config_info`;
+CREATE TABLE `his_config_info`  (
+  `id` bigint(0) UNSIGNED NOT NULL,
+  `nid` bigint(0) UNSIGNED NOT NULL AUTO_INCREMENT,
+  `data_id` varchar(255) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL,
+  `group_id` varchar(128) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL,
+  `app_name` varchar(128) CHARACTER SET utf8 COLLATE utf8_bin NULL DEFAULT NULL COMMENT 'app_name',
+  `content` longtext CHARACTER SET utf8 COLLATE utf8_bin NOT NULL,
+  `md5` varchar(32) CHARACTER SET utf8 COLLATE utf8_bin NULL DEFAULT NULL,
+  `gmt_create` datetime(0) NOT NULL DEFAULT CURRENT_TIMESTAMP(0),
+  `gmt_modified` datetime(0) NOT NULL DEFAULT CURRENT_TIMESTAMP(0),
+  `src_user` text CHARACTER SET utf8 COLLATE utf8_bin NULL,
+  `src_ip` varchar(50) CHARACTER SET utf8 COLLATE utf8_bin NULL DEFAULT NULL,
+  `op_type` char(10) CHARACTER SET utf8 COLLATE utf8_bin NULL DEFAULT NULL,
+  `tenant_id` varchar(128) CHARACTER SET utf8 COLLATE utf8_bin NULL DEFAULT '' COMMENT '租户字段',
+  PRIMARY KEY (`nid`) USING BTREE,
+  INDEX `idx_gmt_create`(`gmt_create`) USING BTREE,
+  INDEX `idx_gmt_modified`(`gmt_modified`) USING BTREE,
+  INDEX `idx_did`(`data_id`) USING BTREE
+) ENGINE = InnoDB CHARACTER SET = utf8 COLLATE = utf8_bin COMMENT = '多租户改造' ROW_FORMAT = Dynamic;
+
+-- ----------------------------
+-- Records of his_config_info
+-- ----------------------------
+
+-- ----------------------------
+-- Table structure for permissions
+-- ----------------------------
+DROP TABLE IF EXISTS `permissions`;
+CREATE TABLE `permissions`  (
+  `role` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL,
+  `resource` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL,
+  `action` varchar(8) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL,
+  UNIQUE INDEX `uk_role_permission`(`role`, `resource`, `action`) USING BTREE
+) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_bin ROW_FORMAT = Dynamic;
+
+-- ----------------------------
+-- Records of permissions
+-- ----------------------------
+
+-- ----------------------------
+-- Table structure for roles
+-- ----------------------------
+DROP TABLE IF EXISTS `roles`;
+CREATE TABLE `roles`  (
+  `username` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL,
+  `role` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL,
+  UNIQUE INDEX `idx_user_role`(`username`, `role`) USING BTREE
+) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_bin ROW_FORMAT = Dynamic;
+
+-- ----------------------------
+-- Records of roles
+-- ----------------------------
+INSERT INTO `roles` VALUES ('nacos', 'ROLE_ADMIN');
+
+-- ----------------------------
+-- Table structure for tenant_capacity
+-- ----------------------------
+DROP TABLE IF EXISTS `tenant_capacity`;
+CREATE TABLE `tenant_capacity`  (
+  `id` bigint(0) UNSIGNED NOT NULL AUTO_INCREMENT COMMENT '主键ID',
+  `tenant_id` varchar(128) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL DEFAULT '' COMMENT 'Tenant ID',
+  `quota` int(0) UNSIGNED NOT NULL DEFAULT 0 COMMENT '配额,0表示使用默认值',
+  `usage` int(0) UNSIGNED NOT NULL DEFAULT 0 COMMENT '使用量',
+  `max_size` int(0) UNSIGNED NOT NULL DEFAULT 0 COMMENT '单个配置大小上限,单位为字节,0表示使用默认值',
+  `max_aggr_count` int(0) UNSIGNED NOT NULL DEFAULT 0 COMMENT '聚合子配置最大个数',
+  `max_aggr_size` int(0) UNSIGNED NOT NULL DEFAULT 0 COMMENT '单个聚合数据的子配置大小上限,单位为字节,0表示使用默认值',
+  `max_history_count` int(0) UNSIGNED NOT NULL DEFAULT 0 COMMENT '最大变更历史数量',
+  `gmt_create` datetime(0) NOT NULL DEFAULT CURRENT_TIMESTAMP(0) COMMENT '创建时间',
+  `gmt_modified` datetime(0) NOT NULL DEFAULT CURRENT_TIMESTAMP(0) COMMENT '修改时间',
+  PRIMARY KEY (`id`) USING BTREE,
+  UNIQUE INDEX `uk_tenant_id`(`tenant_id`) USING BTREE
+) ENGINE = InnoDB CHARACTER SET = utf8 COLLATE = utf8_bin COMMENT = '租户容量信息表' ROW_FORMAT = Dynamic;
+
+-- ----------------------------
+-- Records of tenant_capacity
+-- ----------------------------
+
+-- ----------------------------
+-- Table structure for tenant_info
+-- ----------------------------
+DROP TABLE IF EXISTS `tenant_info`;
+CREATE TABLE `tenant_info`  (
+  `id` bigint(0) NOT NULL AUTO_INCREMENT COMMENT 'id',
+  `kp` varchar(128) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL COMMENT 'kp',
+  `tenant_id` varchar(128) CHARACTER SET utf8 COLLATE utf8_bin NULL DEFAULT '' COMMENT 'tenant_id',
+  `tenant_name` varchar(128) CHARACTER SET utf8 COLLATE utf8_bin NULL DEFAULT '' COMMENT 'tenant_name',
+  `tenant_desc` varchar(256) CHARACTER SET utf8 COLLATE utf8_bin NULL DEFAULT NULL COMMENT 'tenant_desc',
+  `create_source` varchar(32) CHARACTER SET utf8 COLLATE utf8_bin NULL DEFAULT NULL COMMENT 'create_source',
+  `gmt_create` bigint(0) NOT NULL COMMENT '创建时间',
+  `gmt_modified` bigint(0) NOT NULL COMMENT '修改时间',
+  PRIMARY KEY (`id`) USING BTREE,
+  UNIQUE INDEX `uk_tenant_info_kptenantid`(`kp`, `tenant_id`) USING BTREE,
+  INDEX `idx_tenant_id`(`tenant_id`) USING BTREE
+) ENGINE = InnoDB CHARACTER SET = utf8 COLLATE = utf8_bin COMMENT = 'tenant_info' ROW_FORMAT = Dynamic;
+
+-- ----------------------------
+-- Records of tenant_info
+-- ----------------------------
+
+-- ----------------------------
+-- Table structure for users
+-- ----------------------------
+DROP TABLE IF EXISTS `users`;
+CREATE TABLE `users`  (
+  `username` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL,
+  `password` varchar(500) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL,
+  `enabled` tinyint(1) NOT NULL,
+  PRIMARY KEY (`username`) USING BTREE
+) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_bin ROW_FORMAT = Dynamic;
+
+-- ----------------------------
+-- Records of users
+-- ----------------------------
+INSERT INTO `users` VALUES ('nacos', '$2a$10$EuWPZHzz32dJN7jexM34MOeYirDdFAZm2kuWj7VEOJhhZkDrxfvUu', 1);
+
+SET FOREIGN_KEY_CHECKS = 1;

File diff suppressed because it is too large
+ 7183 - 0
DB/wk_crm_table.sql


+ 176 - 0
DB/xxl_job.sql

@@ -0,0 +1,176 @@
+SET NAMES utf8mb4;
+SET FOREIGN_KEY_CHECKS = 0;
+
+-- ----------------------------
+-- Table structure for xxl_job_group
+-- ----------------------------
+DROP TABLE IF EXISTS `xxl_job_group`;
+CREATE TABLE `xxl_job_group`  (
+  `id` int(11) NOT NULL AUTO_INCREMENT,
+  `app_name` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '执行器AppName',
+  `title` varchar(12) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '执行器名称',
+  `order` int(11) NOT NULL DEFAULT 0 COMMENT '排序',
+  `address_type` tinyint(4) NOT NULL DEFAULT 0 COMMENT '执行器地址类型:0=自动注册、1=手动录入',
+  `address_list` varchar(512) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '执行器地址列表,多地址逗号分隔',
+  PRIMARY KEY (`id`) USING BTREE
+) ENGINE = InnoDB AUTO_INCREMENT = 4 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci ROW_FORMAT = Dynamic;
+
+-- ----------------------------
+-- Records of xxl_job_group
+-- ----------------------------
+INSERT INTO `xxl_job_group` VALUES (3, 'wk-job', '悟空crm调度中心', 2, 0, null);
+
+-- ----------------------------
+-- Table structure for xxl_job_info
+-- ----------------------------
+DROP TABLE IF EXISTS `xxl_job_info`;
+CREATE TABLE `xxl_job_info`  (
+  `id` int(11) NOT NULL AUTO_INCREMENT,
+  `job_group` int(11) NOT NULL COMMENT '执行器主键ID',
+  `job_cron` varchar(128) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '任务执行CRON',
+  `job_desc` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL,
+  `add_time` datetime(0) NULL DEFAULT NULL,
+  `update_time` datetime(0) NULL DEFAULT NULL,
+  `author` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '作者',
+  `alarm_email` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '报警邮件',
+  `executor_route_strategy` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '执行器路由策略',
+  `executor_handler` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '执行器任务handler',
+  `executor_param` varchar(512) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '执行器任务参数',
+  `executor_block_strategy` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '阻塞处理策略',
+  `executor_timeout` int(11) NOT NULL DEFAULT 0 COMMENT '任务执行超时时间,单位秒',
+  `executor_fail_retry_count` int(11) NOT NULL DEFAULT 0 COMMENT '失败重试次数',
+  `glue_type` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT 'GLUE类型',
+  `glue_source` mediumtext CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL COMMENT 'GLUE源代码',
+  `glue_remark` varchar(128) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT 'GLUE备注',
+  `glue_updatetime` datetime(0) NULL DEFAULT NULL COMMENT 'GLUE更新时间',
+  `child_jobid` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '子任务ID,多个逗号分隔',
+  `trigger_status` tinyint(4) NOT NULL DEFAULT 0 COMMENT '调度状态:0-停止,1-运行',
+  `trigger_last_time` bigint(13) NOT NULL DEFAULT 0 COMMENT '上次调度时间',
+  `trigger_next_time` bigint(13) NOT NULL DEFAULT 0 COMMENT '下次调度时间',
+  PRIMARY KEY (`id`) USING BTREE
+) ENGINE = InnoDB AUTO_INCREMENT = 15 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci ROW_FORMAT = Dynamic;
+
+-- ----------------------------
+-- Records of xxl_job_info
+-- ----------------------------
+INSERT INTO `xxl_job_info` VALUES (11, 3, '0 0 2 * * ?', '定时放入公海', '2020-08-21 14:56:42', '2020-09-26 16:06:42', 'admin', '', 'LAST', 'CrmCustomerJob', '', 'SERIAL_EXECUTION', 7200, 0, 'BEAN', '', 'GLUE代码初始化', '2020-08-21 14:56:42', '', 1, 1601402400000, 1601488800000);
+INSERT INTO `xxl_job_info` VALUES (12, 3, '0 0 0 * * ?', '日程通知', '2020-08-24 14:43:08', '2020-09-26 16:06:35', 'admin', '', 'FIRST', 'EventNoticeJob', '', 'SERIAL_EXECUTION', 0, 0, 'BEAN', '', 'GLUE代码初始化', '2020-08-24 14:43:08', '', 1, 1601395200000, 1601481600000);
+INSERT INTO `xxl_job_info` VALUES (13, 3, '0 0 1 * * ?', '任务设置延期', '2020-08-24 14:43:43', '2020-09-26 16:06:27', 'admin', '', 'FIRST', 'TaskJob', '', 'SERIAL_EXECUTION', 0, 0, 'BEAN', '', 'GLUE代码初始化', '2020-08-24 14:43:43', '', 1, 1601398800000, 1601485200000);
+
+-- ----------------------------
+-- Table structure for xxl_job_lock
+-- ----------------------------
+DROP TABLE IF EXISTS `xxl_job_lock`;
+CREATE TABLE `xxl_job_lock`  (
+  `lock_name` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '锁名称',
+  PRIMARY KEY (`lock_name`) USING BTREE
+) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci ROW_FORMAT = Dynamic;
+
+-- ----------------------------
+-- Records of xxl_job_lock
+-- ----------------------------
+INSERT INTO `xxl_job_lock` VALUES ('schedule_lock');
+
+-- ----------------------------
+-- Table structure for xxl_job_log
+-- ----------------------------
+DROP TABLE IF EXISTS `xxl_job_log`;
+CREATE TABLE `xxl_job_log`  (
+  `id` bigint(20) NOT NULL AUTO_INCREMENT,
+  `job_group` int(11) NOT NULL COMMENT '执行器主键ID',
+  `job_id` int(11) NOT NULL COMMENT '任务,主键ID',
+  `executor_address` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '执行器地址,本次执行的地址',
+  `executor_handler` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '执行器任务handler',
+  `executor_param` varchar(512) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '执行器任务参数',
+  `executor_sharding_param` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '执行器任务分片参数,格式如 1/2',
+  `executor_fail_retry_count` int(11) NOT NULL DEFAULT 0 COMMENT '失败重试次数',
+  `trigger_time` datetime(0) NULL DEFAULT NULL COMMENT '调度-时间',
+  `trigger_code` int(11) NOT NULL COMMENT '调度-结果',
+  `trigger_msg` text CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL COMMENT '调度-日志',
+  `handle_time` datetime(0) NULL DEFAULT NULL COMMENT '执行-时间',
+  `handle_code` int(11) NOT NULL COMMENT '执行-状态',
+  `handle_msg` text CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL COMMENT '执行-日志',
+  `alarm_status` tinyint(4) NOT NULL DEFAULT 0 COMMENT '告警状态:0-默认、1-无需告警、2-告警成功、3-告警失败',
+  PRIMARY KEY (`id`) USING BTREE,
+  INDEX `I_trigger_time`(`trigger_time`) USING BTREE,
+  INDEX `I_handle_code`(`handle_code`) USING BTREE
+) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci ROW_FORMAT = Dynamic;
+
+-- ----------------------------
+-- Records of xxl_job_log
+-- ----------------------------
+
+-- ----------------------------
+-- Table structure for xxl_job_log_report
+-- ----------------------------
+DROP TABLE IF EXISTS `xxl_job_log_report`;
+CREATE TABLE `xxl_job_log_report`  (
+  `id` int(11) NOT NULL AUTO_INCREMENT,
+  `trigger_day` datetime(0) NULL DEFAULT NULL COMMENT '调度-时间',
+  `running_count` int(11) NOT NULL DEFAULT 0 COMMENT '运行中-日志数量',
+  `suc_count` int(11) NOT NULL DEFAULT 0 COMMENT '执行成功-日志数量',
+  `fail_count` int(11) NOT NULL DEFAULT 0 COMMENT '执行失败-日志数量',
+  PRIMARY KEY (`id`) USING BTREE,
+  UNIQUE INDEX `i_trigger_day`(`trigger_day`) USING BTREE
+) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci ROW_FORMAT = Dynamic;
+
+-- ----------------------------
+-- Records of xxl_job_log_report
+-- ----------------------------
+
+-- ----------------------------
+-- Table structure for xxl_job_logglue
+-- ----------------------------
+DROP TABLE IF EXISTS `xxl_job_logglue`;
+CREATE TABLE `xxl_job_logglue`  (
+  `id` int(11) NOT NULL AUTO_INCREMENT,
+  `job_id` int(11) NOT NULL COMMENT '任务,主键ID',
+  `glue_type` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT 'GLUE类型',
+  `glue_source` mediumtext CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL COMMENT 'GLUE源代码',
+  `glue_remark` varchar(128) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT 'GLUE备注',
+  `add_time` datetime(0) NULL DEFAULT NULL,
+  `update_time` datetime(0) NULL DEFAULT NULL,
+  PRIMARY KEY (`id`) USING BTREE
+) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci ROW_FORMAT = Dynamic;
+
+-- ----------------------------
+-- Records of xxl_job_logglue
+-- ----------------------------
+
+-- ----------------------------
+-- Table structure for xxl_job_registry
+-- ----------------------------
+DROP TABLE IF EXISTS `xxl_job_registry`;
+CREATE TABLE `xxl_job_registry`  (
+  `id` int(11) NOT NULL AUTO_INCREMENT,
+  `registry_group` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL,
+  `registry_key` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL,
+  `registry_value` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL,
+  `update_time` datetime(0) NULL DEFAULT NULL,
+  PRIMARY KEY (`id`) USING BTREE,
+  INDEX `i_g_k_v`(`registry_group`, `registry_key`, `registry_value`) USING BTREE
+) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci ROW_FORMAT = Dynamic;
+
+-- ----------------------------
+-- Records of xxl_job_registry
+-- ----------------------------
+-- ----------------------------
+-- Table structure for xxl_job_user
+-- ----------------------------
+DROP TABLE IF EXISTS `xxl_job_user`;
+CREATE TABLE `xxl_job_user`  (
+  `id` int(11) NOT NULL AUTO_INCREMENT,
+  `username` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '账号',
+  `password` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '密码',
+  `role` tinyint(4) NOT NULL COMMENT '角色:0-普通用户、1-管理员',
+  `permission` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '权限:执行器ID列表,多个逗号分割',
+  PRIMARY KEY (`id`) USING BTREE,
+  UNIQUE INDEX `i_username`(`username`) USING BTREE
+) ENGINE = InnoDB AUTO_INCREMENT = 2 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci ROW_FORMAT = Dynamic;
+
+-- ----------------------------
+-- Records of xxl_job_user
+-- ----------------------------
+INSERT INTO `xxl_job_user` VALUES (1, 'admin', 'e10adc3949ba59abbe56e057f20f883e', 1, NULL);
+
+SET FOREIGN_KEY_CHECKS = 1;

+ 181 - 0
admin/pom.xml

@@ -0,0 +1,181 @@
+<?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>
+	<packaging>jar</packaging>
+	<parent>
+		<groupId>com.kakarote</groupId>
+		<artifactId>wukongcrm</artifactId>
+		<version>0.0.1-SNAPSHOT</version>
+	</parent>
+
+	<artifactId>admin</artifactId>
+	<version>0.0.1-SNAPSHOT</version>
+	<name>admin</name>
+	<description>系统管理</description>
+
+
+	<dependencies>
+		<dependency>
+			<groupId>com.kakarote</groupId>
+			<artifactId>core</artifactId>
+			<version>${core.version}</version>
+		</dependency>
+		<dependency>
+			<groupId>io.seata</groupId>
+			<artifactId>seata-spring-boot-starter</artifactId>
+		</dependency>
+		<!--拼音工具-->
+		<dependency>
+			<groupId>io.github.biezhi</groupId>
+			<artifactId>TinyPinyin</artifactId>
+			<version>2.0.3.RELEASE</version>
+		</dependency>
+
+		<!--微信支付 wwl-->
+		<dependency>
+			<groupId>com.github.binarywang</groupId>
+			<artifactId>weixin-java-pay</artifactId>
+			<version>4.2.0</version>
+		</dependency>
+		<dependency>
+			<groupId>com.github.wechatpay-apiv3</groupId>
+			<artifactId>wechatpay-apache-httpclient</artifactId>
+			<version>0.4.1</version>
+		</dependency>
+		<!-- 支付宝支付 wwl ↓ -->
+		<dependency>
+			<groupId>com.alipay.sdk</groupId>
+			<artifactId>alipay-easysdk</artifactId>
+			<version>2.2.0</version>
+		</dependency>
+		<!-- 支付宝支付 wwl ↑  -->
+
+		<dependency>
+			<groupId>com.sun.mail</groupId>
+			<artifactId>javax.mail</artifactId>
+			<version>1.6.2</version>
+		</dependency>
+
+
+		<!-- -->
+		<dependency>
+			<groupId>org.apache.rocketmq</groupId>
+			<artifactId>rocketmq-spring-boot-starter</artifactId>
+			<version>2.0.3</version>
+		</dependency>
+	</dependencies>
+
+	<build>
+		<resources>
+			<resource>
+				<!-- xml放在java目录下-->
+				<directory>src/main/java/com/kakarote/${pom.artifactId}/</directory>
+				<includes>
+					<include>**/*.xml</include>
+				</includes>
+			</resource>
+			<!--解决idea不识别resources的问题-->
+			<resource>
+				<directory>src/main/resources</directory>
+				<filtering>true</filtering>
+			</resource>
+		</resources>
+		<plugins>
+
+			<!--打包jar-->
+			<plugin>
+				<groupId>org.apache.maven.plugins</groupId>
+				<artifactId>maven-jar-plugin</artifactId>
+				<configuration>
+					<archive>
+						<manifest>
+							<addClasspath>true</addClasspath>
+							<!--MANIFEST.MF 中 Class-Path 加入前缀-->
+							<classpathPrefix>lib/</classpathPrefix>
+							<!--jar包不包含唯一版本标识-->
+							<useUniqueVersions>false</useUniqueVersions>
+							<!--指定入口类-->
+							<mainClass>com.kakarote.admin.AdminApplication</mainClass>
+						</manifest>
+						<manifestEntries>
+							<!--MANIFEST.MF 中 Class-Path 加入资源文件目录-->
+							<Class-Path>./config/</Class-Path>
+						</manifestEntries>
+					</archive>
+					<outputDirectory>${project.build.directory}</outputDirectory>
+				</configuration>
+			</plugin>
+
+			<!--拷贝依赖 copy-dependencies-->
+			<plugin>
+				<groupId>org.apache.maven.plugins</groupId>
+				<artifactId>maven-dependency-plugin</artifactId>
+				<executions>
+					<execution>
+						<id>copy-dependencies</id>
+						<phase>package</phase>
+						<goals>
+							<goal>copy-dependencies</goal>
+						</goals>
+						<configuration>
+							<outputDirectory>
+								${project.build.directory}/lib/
+							</outputDirectory>
+						</configuration>
+					</execution>
+				</executions>
+			</plugin>
+
+			<!--拷贝资源文件 copy-resources-->
+			<plugin>
+				<artifactId>maven-resources-plugin</artifactId>
+				<executions>
+					<execution>
+						<id>copy-resources</id>
+						<phase>package</phase>
+						<goals>
+							<goal>copy-resources</goal>
+						</goals>
+						<configuration>
+							<resources>
+								<resource>
+									<directory>src/main/resources/</directory>
+								</resource>
+							</resources>
+							<outputDirectory>${project.build.directory}/config</outputDirectory>
+						</configuration>
+					</execution>
+				</executions>
+				<!--wwl 20220113 -->
+				<configuration>
+					<encoding>UTF-8</encoding>
+					<!-- 过滤后缀为p12的证书文件 -->
+					<nonFilteredFileExtensions>
+						<nonFilteredFileExtension>p12</nonFilteredFileExtension>
+					</nonFilteredFileExtensions>
+				</configuration>
+			</plugin>
+			<plugin>
+				<artifactId>maven-assembly-plugin</artifactId>
+				<configuration>
+					<finalName>${artifactId}</finalName>
+					<appendAssemblyId>false</appendAssemblyId>
+					<descriptors>
+						<descriptor>../assembly.xml</descriptor>
+					</descriptors>
+				</configuration>
+				<executions>
+					<execution>
+						<id>make-assembly</id>
+						<phase>package</phase>
+						<goals>
+							<goal>single</goal>
+						</goals>
+					</execution>
+				</executions>
+			</plugin>
+		</plugins>
+	</build>
+
+</project>

+ 29 - 0
admin/src/main/java/com/kakarote/admin/AdminApplication.java

@@ -0,0 +1,29 @@
+package com.kakarote.admin;
+
+import com.alicp.jetcache.anno.config.EnableCreateCacheAnnotation;
+import com.alicp.jetcache.anno.config.EnableMethodCache;
+import com.kakarote.core.CoreApplication;
+import io.seata.spring.annotation.datasource.EnableAutoDataSourceProxy;
+import org.mybatis.spring.annotation.MapperScan;
+import org.springframework.boot.SpringApplication;
+import org.springframework.boot.autoconfigure.SpringBootApplication;
+import org.springframework.cloud.client.discovery.EnableDiscoveryClient;
+import org.springframework.cloud.openfeign.EnableFeignClients;
+import org.springframework.context.annotation.ComponentScan;
+
+/**
+ * @author zhangzhiwei
+ */
+@SpringBootApplication
+@EnableAutoDataSourceProxy
+@EnableDiscoveryClient
+@EnableFeignClients(basePackageClasses = {CoreApplication.class, AdminApplication.class})
+@ComponentScan(basePackageClasses = {CoreApplication.class, AdminApplication.class})
+@MapperScan(basePackages = "com.kakarote.admin.mapper")
+@EnableMethodCache(basePackages = "com.kakarote.admin",order = -9999)
+@EnableCreateCacheAnnotation
+public class AdminApplication {
+    public static void main(String[] args) {
+        SpringApplication.run(AdminApplication.class, args);
+    }
+}

+ 69 - 0
admin/src/main/java/com/kakarote/admin/common/AdminCodeEnum.java

@@ -0,0 +1,69 @@
+package com.kakarote.admin.common;
+
+import com.kakarote.core.common.ResultCode;
+
+/**
+ * @author zhangzhiwei
+ * 管理后台响应错误代码枚举类
+ */
+
+public enum AdminCodeEnum implements ResultCode {
+    //客户模块管理
+    ADMIN_MODULE_CLOSE_ERROR(1101, "客户管理模块不能关闭"),
+    ADMIN_DATA_EXIST_ERROR(1102, "数据不存在"),
+    ADMIN_PASSWORD_INTENSITY_ERROR(1106, "密码必须由 6-20位字母、数字组成"),
+    ADMIN_USER_EXIST_ERROR(1107, "用户已存在!"),
+    ADMIN_COMPANY_USER_UPPER_LIMIT_ERROR(1108, "企业人数已达上限!"),
+    ADMIN_PARENT_USER_ERROR(1109, "这个用户的下属不能设置为直属上级!"),
+    ADMIN_PARENT_DEPT_ERROR(1110, "这个部门的下属不能设置为直属部门!"),
+    ADMIN_DEPT_REMOVE_EXIST_USER_ERROR(1111, "这个部门下有员工,不能删除!"),
+    ADMIN_DEPT_REMOVE_EXIST_DEPT_ERROR(1112, "这个部门下有下级部门,不能删除!"),
+    ADMIN_USER_NOT_ROLE_ERROR(1113, "请先给用户设置角色"),
+    ADMIN_USER_NOT_DEPT_ERROR(1114, "请先给用户设置部门"),
+    ADMIN_SUPER_USER_DISABLED_ERROR(1116, "超级管理员用户不可禁用"),
+    ADMIN_ROLE_NAME_EXIST_ERROR(1117, "角色名称已存在"),
+    ADMIN_PHONE_CODE_ERROR(1118, "手机验证码出错!"),
+    ADMIN_PHONE_REGISTER_ERROR(1119, "手机号已被注册!"),
+    ADMIN_PHONE_VERIFY_ERROR(1120, "手机号校验出错!"),
+    ADMIN_PHONE_EXIST_ERROR(1121, "手机号不存在!"),
+    ADMIN_SMS_SEND_FREQUENCY_ERROR(1122, "短信发送频率过高,请稍候再试!"),
+    ADMIN_SMS_SEND_ERROR(1123, "发送验证码失败,请稍候再试!"),
+    ADMIN_MANAGE_SMS_CODE_ERROR(1124, "短信验证码错误!"),
+    ADMIN_USER_NOT_EXIST_ERROR(1125, "用户不存在!"),
+    ADMIN_ACCOUNT_ERROR(1126, "账号不能和原账号相同!"),
+    ADMIN_PASSWORD_ERROR(1127, "密码输入错误!"),
+    ADMIN_USERNAME_EDIT_ERROR(1128, "用户名不可修改!"),
+    ADMIN_USER_HIS_TABLE_ERROR(1129, "开通人数已达上限!"),
+    ADMIN_PARENT_USER_ERROR1(1130, "直属上级不能为自己!"),
+    ADMIN_PRODUCT_DATA_ERROR(1131, "产品不存在!"),
+    ADMIN_OPEN_APPLICATION_ERROR(1132, "启用应用失败!"),
+    ADMIN_USER_NEEDS_AT_LEAST_ONE_ROLE(1133, "用户至少需要一个角色!"),
+    ADMIN_PASSWORD_EXPIRE_ERROR(1134, "密码验证已过期,请重新进行验证!"),
+    ADMIN_PASSWORD_INVALID_ERROR(1135, "无效的密码!"),
+    ADMIN_ROLE_NOT_EXIST_ERROR(1136, "请先关联角色!"),
+    ADMIN_LANGUAGE_PACK_NAME_ERROR(1137, "语言包名称有误!"),
+    ADMIN_LANGUAGE_PACK_EXIST_USER_ERROR(1138, "这个语言包有用户正在使用,不可删!"),
+    ADMIN_LANGUAGE_PACK_CHOINESE_ERROR(1139, "缺少中文语言包!"),
+    ADMIN_DEFAULT_ROLE_CANNOT_BE_DELETED(1140, "默认角色不能删除!"),
+    ADMIN_USER_REAL_NAME_EXIST_ERROR(1141, "用户姓名重复!"),
+    ADMIN_DEPT_NOT_EXIST_ERROR(1142, "部门已不存在!"),
+    ADMIN_USER_NEEDS_AT_ADMIN_ONE_ROLE(1143, "主账号不能删除管理员角色"),;
+
+    AdminCodeEnum(int code, String msg) {
+        this.code = code;
+        this.msg = msg;
+    }
+
+    private int code;
+    private String msg;
+
+    @Override
+    public int getCode() {
+        return code;
+    }
+
+    @Override
+    public String getMsg() {
+        return msg;
+    }
+}

+ 30 - 0
admin/src/main/java/com/kakarote/admin/common/AdminConst.java

@@ -0,0 +1,30 @@
+package com.kakarote.admin.common;
+
+import com.kakarote.core.common.Const;
+
+/**
+ * @author zhangzhiwei
+ * 系统管理模块的常量
+ */
+public class AdminConst extends Const {
+    /**
+     * 默认的权限缓存KEY
+     */
+    public static final String DEFAULT_AUTH_CACHE_NAME = "CRM:AUTH";
+
+    /**
+     * 默认的密码强度正则
+     */
+    public static final String DEFAULT_PASSWORD_INTENSITY = "^(?=.*[a-zA-Z])(?=.*\\d).{6,20}$";
+
+    /**
+     * 可使用人数
+     */
+    public static final Integer USER_NUM = 999;
+
+    /**
+     * 用户加密公钥
+     */
+    public static final String userPublicKey = "MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAkqKFcAQtIp4rlkB5LOMnViyVY/hhA6x0R9ftwtEXsAFu4hBZrm9txdEvxSrDCUsx3Zwv/gdimeOzTtfSKffdoE/DwllNP9Zu6nsr2kGRgPrRwjtlO+j2FOM0b9UY1SQ/bWE+a9oQL2jL9xMSbtX1xG/+HcMo1bT+pa6FNQzs3egmvMt75/jaxINPSraj4kgNFawSBk7qDBEqDYiQwtPTuaNW1YZIs++/gZHsCRgGs/JrAbxNpl7+v/+Z503I3I2rs/8eUM5d16NXR8M7vtobUDCTIiQOgRahO8WMadgFlwavyVCYhy/TBXyj5RUfWaS26LrEN3vkj4TjoJu5m9LQ5QIDAQAB";
+
+}

+ 103 - 0
admin/src/main/java/com/kakarote/admin/common/AdminModuleEnum.java

@@ -0,0 +1,103 @@
+package com.kakarote.admin.common;
+
+/**
+ * @author zhangzhiwei
+ * 模块的枚举
+ */
+
+public enum AdminModuleEnum {
+
+    /**
+     * 任务审批
+     */
+    TASK_EXAMINE("taskExamine"),
+    /**
+     * crm模块
+     */
+    CRM("crm"),
+    /**
+     * 项目管理
+     */
+    PROJECT("project"),
+    /**
+     * 日志模块
+     */
+    LOG("log"),
+    /**
+     * 通讯录模块
+     */
+    BOOK("book"),
+    /**
+     * 办公模块
+     */
+    OA("oa"),
+    /**
+     * 商业智能模块
+     */
+    BI("bi"),
+    /**
+     * 邮箱模块
+     */
+    EMAIL("email"),
+    /**
+     * 日历模块
+     */
+    CALENDAR("calendar"),
+    /**
+     * 知识库
+     */
+    KNOWLEDGE("knowledge"),
+    /**
+     * 呼叫中心
+     */
+    CALL("call"),
+
+    HRM("hrm"),
+
+    JXC("jxc"),
+    /**
+     * 财务管理
+     */
+    FINANCE("finance"),
+    /**
+     * 财务管理用
+     */
+    WORK("work"),
+    /**
+     * 财务管理用
+     */
+    MANAGE("manage"),
+
+    /**
+     * 工商信息
+     */
+    ENTERPRISE("enterprise"),
+    ;
+    private AdminModuleEnum(String value) {
+        this.value = value;
+    }
+
+    private final String value;
+
+    public String getValue() {
+        return this.value;
+    }
+
+    public static String[] getValues() {
+        String[] values = new String[values().length];
+        for (int i = 0; i < values().length; i++) {
+            values[i] = values()[i].getValue();
+        }
+        return values;
+    }
+
+    public static AdminModuleEnum parse(String module) {
+        for (AdminModuleEnum adminModuleEnum : AdminModuleEnum.values()){
+            if (adminModuleEnum.getValue().equals(module)){
+                return adminModuleEnum;
+            }
+        }
+        return null;
+    }
+
+}

+ 65 - 0
admin/src/main/java/com/kakarote/admin/common/AdminRoleTypeEnum.java

@@ -0,0 +1,65 @@
+package com.kakarote.admin.common;
+
+/**
+ * 角色类型枚举
+ *
+ * @author zhangzhiwei
+ */
+public enum AdminRoleTypeEnum {
+    /**
+     * 自定义
+     */
+    CUSTOM(0, "custom", "自定义角色"),
+    MANAGER(1, "manage", "系统管理角色"),
+    CUSTOMER_MANAGER(2, "crm", "客户管理角色"),
+    FINANCE(4, "finance", "财务管理角色"),
+    OA(7, "oa", "办公管理角色"),
+    PROJECT(8, "project", "项目管理角色"),
+    HRM(9, "hrm", "人力资源管理角色"),
+    JXC(10, "jxc", "进销存管理角色");
+
+    AdminRoleTypeEnum(Integer type, String name, String desc) {
+        this.type = type;
+        this.name = name;
+        this.desc = desc;
+    }
+
+
+    /**
+     * 类型
+     */
+    private final Integer type;
+
+    /**
+     * 名称
+     */
+    private final String name;
+
+    /**
+     * 备注
+     */
+    private final String desc;
+
+    public Integer getType() {
+        return type;
+    }
+
+    public String getName() {
+        return name;
+    }
+
+    public String getDesc() {
+        return desc;
+    }
+
+
+    public static AdminRoleTypeEnum parse(Integer type) {
+        for (AdminRoleTypeEnum typeEnum : values()) {
+            if (typeEnum.getType().equals(type)) {
+                return typeEnum;
+            }
+        }
+        return null;
+    }
+
+}

+ 53 - 0
admin/src/main/java/com/kakarote/admin/common/AuthPasswordUtil.java

@@ -0,0 +1,53 @@
+package com.kakarote.admin.common;
+
+import cn.hutool.crypto.SecureUtil;
+
+/**
+ * @author z
+ * 密码加密工具
+ */
+public class AuthPasswordUtil {
+
+    /**
+     * 验证签名是否正确
+     *
+     * @param key  key
+     * @param salt 盐
+     * @param sign 签名
+     * @return 是否正确 true为正确
+     */
+    public static boolean verify(String key, String salt, String sign) {
+        return sign.equals(sign(key, salt))||sign.equals(signP(key,salt))||sign.equals(signP2(key,salt));
+    }
+
+    /**
+     * 签名数据
+     *
+     * @param key  key
+     * @param salt 盐
+     * @return 加密后的字符串
+     */
+    public static String sign(String key, String salt) {
+        return SecureUtil.md5(key.concat("erp").concat(salt));
+    }
+
+    /**
+     * 签名数据
+     * PHP端签名
+     *
+     * @param key  key
+     * @param salt 盐
+     * @return 加密后的字符串
+     */
+    private static String signP(String key, String salt) {
+        String username=key.substring(0,11);
+        String password=key.substring(11);
+        return SecureUtil.md5(SecureUtil.md5(SecureUtil.sha1(username.concat(password)))+SecureUtil.md5(password.concat(salt)));
+    }
+
+    private static String signP2(String key, String salt) {
+        String username=key.substring(0,11);
+        String password=key.substring(11);
+        return SecureUtil.md5(SecureUtil.sha1(password)+SecureUtil.md5(password.concat(salt)));
+    }
+}

+ 94 - 0
admin/src/main/java/com/kakarote/admin/common/SmsUtil.java

@@ -0,0 +1,94 @@
+package com.kakarote.admin.common;
+
+import cn.hutool.core.util.StrUtil;
+import com.alibaba.fastjson.JSON;
+import com.alibaba.fastjson.JSONObject;
+import com.aliyuncs.CommonRequest;
+import com.aliyuncs.CommonResponse;
+import com.aliyuncs.DefaultAcsClient;
+import com.aliyuncs.IAcsClient;
+import com.aliyuncs.exceptions.ClientException;
+import com.aliyuncs.http.MethodType;
+import com.aliyuncs.profile.DefaultProfile;
+import lombok.extern.slf4j.Slf4j;
+
+@Slf4j
+public class SmsUtil {
+
+    private static final String ACCESS_KEY = "LTAI4G4ww3sp53QKF3HNh6JE";
+
+    private static final String SECRET = "NbT07b1eOdJ8DTetcXlEQPn1nLsC26";
+
+    private static final String JSON_KEY="Code";
+    private static final String JSON_MESSAGE="OK";
+
+    /**
+     * 发送验证短信
+     *
+     * @param phone phone
+     * @param code  验证码
+     * @return true为发送成功
+     */
+    public static boolean sendSms(String phone, String code) {
+        DefaultProfile profile = DefaultProfile.getProfile("cn-hangzhou", ACCESS_KEY, SECRET);
+        IAcsClient client = new DefaultAcsClient(profile);
+        CommonRequest request = new CommonRequest();
+        request.setMethod(MethodType.POST);
+        request.setDomain("dysmsapi.aliyuncs.com");
+        request.setVersion("2017-05-25");
+        request.setAction("SendSms");
+        request.putQueryParameter("RegionId", "cn-hangzhou");
+        request.putQueryParameter("PhoneNumbers", phone);
+        request.putQueryParameter("SignName", "悟空CRM");
+        request.putQueryParameter("TemplateCode", "SMS_161891139");
+        request.putQueryParameter("TemplateParam", "{\"code\":\"" + code + "\"}");
+        try {
+            CommonResponse response = client.getCommonResponse(request);
+            JSONObject object = JSON.parseObject(response.getData());
+            if (JSON_MESSAGE.equals(object.getString(JSON_KEY))) {
+                return true;
+            } else {
+                log.error("验证码发送失败:{}", object.getString("Message"));
+            }
+        } catch (ClientException e) {
+            log.error("验证码发送失败", e);
+        }
+        return false;
+    }
+
+    /**
+     * 发送云平台即将过期通知短信
+     *
+     * @param phone  手机号
+     * @param date 时间
+     * @param day 剩余天数
+     * @param companyName 企业名称
+     */
+    public static void sendMessage(String phone, String date, Integer day,String companyName) {
+        DefaultProfile profile = DefaultProfile.getProfile("cn-hangzhou", ACCESS_KEY, SECRET);
+        IAcsClient client = new DefaultAcsClient(profile);
+        CommonRequest request = new CommonRequest();
+        request.setMethod(MethodType.POST);
+        request.setDomain("dysmsapi.aliyuncs.com");
+        request.setVersion("2017-05-25");
+        request.setAction("SendSms");
+        request.putQueryParameter("RegionId", "cn-hangzhou");
+        request.putQueryParameter("PhoneNumbers", phone);
+        request.putQueryParameter("SignName", "悟空CRM");
+        request.putQueryParameter("TemplateCode", "SMS_210995338");
+        JSONObject jsonObject = new JSONObject();
+        jsonObject.put("companyName", StrUtil.subSufByLength(companyName,20));
+        jsonObject.put("date", date);
+        jsonObject.put("day", day);
+        request.putQueryParameter("TemplateParam", jsonObject.toJSONString());
+        try {
+            CommonResponse response = client.getCommonResponse(request);
+            JSONObject object = JSON.parseObject(response.getData());
+            if (!JSON_MESSAGE.equals(object.getString(JSON_KEY))) {
+                log.error("验证码发送失败:{}", object.getString("Message"));
+            }
+        } catch (ClientException e) {
+            log.error("验证码发送失败", e);
+        }
+    }
+}

+ 45 - 0
admin/src/main/java/com/kakarote/admin/common/TypeEnum.java

@@ -0,0 +1,45 @@
+package com.kakarote.admin.common;
+
+/**
+ * @创建人 xuepengfei
+ * @创建时间 2022/6/14
+ * @描述
+ */
+public enum TypeEnum {
+
+    /**
+     * 同步type类型
+     */
+    DEPT_ADD("DEPT_ADD"),
+
+    DEPT_UPDATE ("DEPT_UPDATE "),
+
+    DEPT_DELETE("DEPT_DELETE"),
+
+    USER_ADD("USER_ADD"),
+
+    USER_UPDATE("USER_UPDATE"),
+
+    USER_DELETE("USER_DELETE")
+    ;
+
+    private final String value;
+
+    private TypeEnum(String value) {
+        this.value = value;
+    }
+
+    public String getValue() {
+        return this.value;
+    }
+
+    public static TypeEnum parse(String value) {
+        for (TypeEnum typeEnum : TypeEnum.values()){
+            if (typeEnum.getValue().equals(value)){
+                return typeEnum;
+            }
+        }
+        return null;
+    }
+
+}

+ 46 - 0
admin/src/main/java/com/kakarote/admin/common/log/AdminUserLog.java

@@ -0,0 +1,46 @@
+package com.kakarote.admin.common.log;
+
+import com.kakarote.admin.entity.BO.AdminUserStatusBO;
+import com.kakarote.admin.entity.PO.AdminUser;
+import com.kakarote.admin.service.IAdminUserService;
+import com.kakarote.core.common.log.BehaviorEnum;
+import com.kakarote.core.common.log.Content;
+import com.kakarote.core.servlet.ApplicationContextHolder;
+import com.kakarote.core.utils.UserCacheUtil;
+
+import java.util.ArrayList;
+import java.util.List;
+
+public class AdminUserLog {
+
+    private IAdminUserService adminUserService = ApplicationContextHolder.getBean(IAdminUserService.class);
+
+    public Content usernameEdit(Integer id, String username, String password) {
+        AdminUser adminUser = adminUserService.getById(id);
+        return new Content(adminUser.getRealname(),"重置账号密码:"+adminUser.getRealname());
+    }
+
+    public List<Content> setUserStatus(AdminUserStatusBO adminUserStatusBO) {
+        List<Content> contentList = new ArrayList<>();
+        String detail;
+        if (adminUserStatusBO.getStatus() == 1){
+            detail = "启用了";
+        }else {
+            detail = "禁用了";
+        }
+        for (Long id : adminUserStatusBO.getIds()) {
+            String userName = UserCacheUtil.getUserName(id);
+            contentList.add(new Content(userName,detail+userName, BehaviorEnum.UPDATE));
+        }
+        return contentList;
+    }
+
+    public List<Content> resetPassword(AdminUserStatusBO adminUserStatusBO) {
+        List<Content> contentList = new ArrayList<>();
+        for (Long id : adminUserStatusBO.getIds()) {
+            String userName = UserCacheUtil.getUserName(id);
+            contentList.add(new Content(userName,"重置了密码:"+userName, BehaviorEnum.UPDATE));
+        }
+        return contentList;
+    }
+}

+ 75 - 0
admin/src/main/java/com/kakarote/admin/common/mq/Consumer.java

@@ -0,0 +1,75 @@
+package com.kakarote.admin.common.mq;
+
+import cn.hutool.core.bean.BeanUtil;
+import cn.hutool.core.util.ObjectUtil;
+import com.alibaba.fastjson.JSONObject;
+import com.aliyun.openservices.ons.api.Message;
+import com.kakarote.admin.common.TypeEnum;
+import com.kakarote.admin.entity.BO.AdminDeptBO;
+import com.kakarote.admin.entity.BO.AdminUserStatusBO;
+import com.kakarote.admin.entity.VO.AdminUserVO;
+import com.kakarote.admin.service.IAdminDeptService;
+import com.kakarote.admin.service.IAdminUserService;
+import com.kakarote.core.servlet.ApplicationContextHolder;
+import lombok.extern.slf4j.Slf4j;
+import org.apache.rocketmq.spring.annotation.RocketMQMessageListener;
+import org.apache.rocketmq.spring.core.RocketMQListener;
+import org.springframework.stereotype.Component;
+
+import java.util.List;
+import java.util.stream.Collectors;
+
+/**
+ * @创建人 xuepengfei
+ * @创建时间 2022/6/14
+ * @描述
+ */
+@Slf4j
+@Component
+@RocketMQMessageListener(topic = "synchronization",consumerGroup = "springboot-mq-consumer")
+public class Consumer implements RocketMQListener<String> {
+    @Override
+    public void onMessage(String message) {
+        log.info("Receive message:"+message);
+        JSONObject jsonObject = new JSONObject();
+        try {
+            jsonObject= JSONObject.parseObject(message);
+        }catch (Exception e){
+            e.printStackTrace();
+        }
+        String type = jsonObject.getString("type");
+        if (TypeEnum.DEPT_ADD.getValue().equals(type)){
+            //添加部门
+            AdminDeptBO adminDept = BeanUtil.copyProperties(BeanUtil.beanToMap(jsonObject.getJSONObject("entity")), AdminDeptBO.class);
+            log.info("adminDept:{}",adminDept);
+            ApplicationContextHolder.getBean(IAdminDeptService.class).addDept(adminDept);
+        }else if (TypeEnum.DEPT_UPDATE.getValue().equals(type)){
+            //修改部门
+            AdminDeptBO adminDepts = BeanUtil.copyProperties(BeanUtil.beanToMap(jsonObject.getJSONObject("entity")), AdminDeptBO.class);
+            log.info("adminDepts:{}",adminDepts);
+            ApplicationContextHolder.getBean(IAdminDeptService.class).setDept(adminDepts);
+        }else if (TypeEnum.DEPT_DELETE.getValue().equals(type)){
+            //删除部门
+            Long deptId = jsonObject.getLong("deptId");
+            ApplicationContextHolder.getBean(IAdminDeptService.class).deleteDept(deptId);
+        }else if (TypeEnum.USER_ADD.getValue().equals(type)){
+            //添加员工
+            AdminUserVO adminUserVO = BeanUtil.copyProperties(BeanUtil.beanToMap(jsonObject.getJSONObject("entity")), AdminUserVO.class);
+            log.info("adminUserVO:{}",adminUserVO);
+             ApplicationContextHolder.getBean(IAdminUserService.class).addUser(adminUserVO);
+        }else if (TypeEnum.USER_UPDATE.getValue().equals(type)){
+            //修改员工
+            AdminUserVO adminUser = BeanUtil.copyProperties(BeanUtil.beanToMap(jsonObject.getJSONObject("entity")), AdminUserVO.class);
+            log.info("adminUser:{}",adminUser);
+            ApplicationContextHolder.getBean(IAdminUserService.class).setUser(adminUser);
+        }else if (TypeEnum.USER_DELETE.getValue().equals(type)){
+            //禁用员工
+            AdminUserStatusBO adminUserStatusBO = BeanUtil.copyProperties(BeanUtil.beanToMap(jsonObject.getJSONObject("entity")), AdminUserStatusBO.class);
+            log.info("adminUserStatusBO:{}",adminUserStatusBO);
+             ApplicationContextHolder.getBean(IAdminUserService.class).setUserStatus(adminUserStatusBO);
+        }
+
+    }
+
+
+}

+ 86 - 0
admin/src/main/java/com/kakarote/admin/common/mq/MqConfig.java

@@ -0,0 +1,86 @@
+package com.kakarote.admin.common.mq;
+
+import cn.hutool.core.util.StrUtil;
+import com.aliyun.openservices.ons.api.PropertyKeyConst;
+import org.springframework.boot.context.properties.ConfigurationProperties;
+import org.springframework.context.annotation.Configuration;
+
+import java.util.Properties;
+
+/**
+ * @description:
+ * @author: zjj
+ * @date: 2021-05-18 10:53
+ */
+@Configuration
+@ConfigurationProperties(prefix = "rocketmq")
+public class MqConfig {
+	private String accessKey;
+	private String secretKey;
+	private String nameSrvAddr;
+	private String topicOne;
+	private String topicTwo;
+	private String groupId;
+
+
+	public Properties getProperties() {
+		if (StrUtil.isEmpty(accessKey)) {
+			return null;
+		}
+		Properties properties = new Properties();
+		properties.setProperty(PropertyKeyConst.AccessKey, this.accessKey);
+		properties.setProperty(PropertyKeyConst.SecretKey, this.secretKey);
+		properties.setProperty(PropertyKeyConst.NAMESRV_ADDR, this.nameSrvAddr);
+		properties.setProperty(PropertyKeyConst.GROUP_ID, this.groupId);
+		properties.setProperty(PropertyKeyConst.SendMsgTimeoutMillis, "4000");
+		return properties;
+	}
+
+	public String getAccessKey() {
+		return accessKey;
+	}
+
+	public void setAccessKey(String accessKey) {
+		this.accessKey = accessKey;
+	}
+
+	public String getSecretKey() {
+		return secretKey;
+	}
+
+	public void setSecretKey(String secretKey) {
+		this.secretKey = secretKey;
+	}
+
+	public String getNameSrvAddr() {
+		return nameSrvAddr;
+	}
+
+	public void setNameSrvAddr(String nameSrvAddr) {
+		this.nameSrvAddr = nameSrvAddr;
+	}
+
+	public String getTopicOne() {
+		return topicOne;
+	}
+
+	public void setTopicOne(String topicOne) {
+		this.topicOne = topicOne;
+	}
+
+	public String getTopicTwo() {
+		return topicTwo;
+	}
+
+	public void setTopicTwo(String topicTwo) {
+		this.topicTwo = topicTwo;
+	}
+
+	public String getGroupId() {
+		return groupId;
+	}
+
+	public void setGroupId(String groupId) {
+		this.groupId = groupId;
+	}
+}

+ 83 - 0
admin/src/main/java/com/kakarote/admin/common/mq/MyProducerBean.java

@@ -0,0 +1,83 @@
+package com.kakarote.admin.common.mq;
+
+import com.aliyun.openservices.ons.api.*;
+
+import java.util.Properties;
+import java.util.concurrent.ExecutorService;
+
+/**
+ * @author zjj
+ * @ClassName MyProducerBean.java
+ * @Description TODO
+ * @createTime 2021-09-18
+ */
+public class MyProducerBean implements Producer {
+
+    private Properties properties;
+    private Producer producer;
+
+    public MyProducerBean() {
+    }
+
+    @Override
+    public void start() {
+        if (null != this.properties) {
+            this.producer = ONSFactory.createProducer(this.properties);
+            this.producer.start();
+        }
+    }
+
+    @Override
+    public void updateCredential(Properties credentialProperties) {
+        if (this.producer != null) {
+            this.producer.updateCredential(credentialProperties);
+        }
+
+    }
+
+    @Override
+    public void shutdown() {
+        if (this.producer != null) {
+            this.producer.shutdown();
+        }
+
+    }
+
+    @Override
+    public SendResult send(Message message) {
+        return this.producer.send(message);
+    }
+
+    @Override
+    public void sendOneway(Message message) {
+        this.producer.sendOneway(message);
+    }
+
+    @Override
+    public void sendAsync(Message message, SendCallback sendCallback) {
+        this.producer.sendAsync(message, sendCallback);
+    }
+
+    @Override
+    public void setCallbackExecutor(ExecutorService callbackExecutor) {
+        this.producer.setCallbackExecutor(callbackExecutor);
+    }
+
+    public Properties getProperties() {
+        return this.properties;
+    }
+
+    public void setProperties(Properties properties) {
+        this.properties = properties;
+    }
+
+    @Override
+    public boolean isStarted() {
+        return this.producer.isStarted();
+    }
+
+    @Override
+    public boolean isClosed() {
+        return this.producer.isClosed();
+    }
+}

+ 24 - 0
admin/src/main/java/com/kakarote/admin/common/mq/ProducerClient.java

@@ -0,0 +1,24 @@
+package com.kakarote.admin.common.mq;
+
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.context.annotation.Bean;
+import org.springframework.context.annotation.Configuration;
+
+/**
+ * @description:
+ * @author: zjj
+ * @date: 2021-05-19 17:10
+ */
+@Configuration
+public class ProducerClient {
+
+	@Autowired
+	private MqConfig mqConfig;
+
+	@Bean(initMethod = "start", destroyMethod = "shutdown")
+	public MyProducerBean buildProducer() {
+		MyProducerBean producer = new MyProducerBean();
+		producer.setProperties(mqConfig.getProperties());
+		return producer;
+	}
+}

+ 135 - 0
admin/src/main/java/com/kakarote/admin/common/mq/ProducerUtil.java

@@ -0,0 +1,135 @@
+package com.kakarote.admin.common.mq;
+
+import cn.hutool.core.util.ObjectUtil;
+import cn.hutool.json.JSONUtil;
+import com.aliyun.openservices.ons.api.Message;
+import com.aliyun.openservices.ons.api.SendResult;
+import com.kakarote.core.common.enums.SystemCodeEnum;
+import com.kakarote.core.entity.MsgBodyBO;
+import com.kakarote.core.exception.CrmException;
+import lombok.extern.slf4j.Slf4j;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Component;
+
+import java.nio.charset.StandardCharsets;
+
+/**
+ * @description:
+ * @author: zjj
+ * @date: 2021-05-20 17:57
+ */
+@Slf4j
+@Component
+public class ProducerUtil {
+
+    @Autowired
+    private MyProducerBean producer;
+
+    @Autowired
+    private MqConfig mqConfig;
+
+    /**
+     * 发送消息到 topic1
+     *
+     * @param msg
+     * @return
+     */
+    public Boolean sendMsgToTopicOne(MsgBodyBO msg) {
+        try {
+            sendMsg(mqConfig.getTopicOne(), msg.getMsgTag(), msg.getMsgKey(),
+                    JSONUtil.toJsonStr(msg).getBytes(StandardCharsets.UTF_8));
+        } catch (Exception e) {
+            return false;
+        }
+        return true;
+    }
+
+    /**
+     * 发送消息到 topic2
+     *
+     * @param msg
+     * @return
+     */
+    public Boolean sendMsgToTopicTwo(MsgBodyBO msg) {
+        try {
+            sendTimeMsg(mqConfig.getTopicTwo(), msg.getMsgTag(), msg.getMsgKey(),
+                    JSONUtil.toJsonStr(msg).getBytes(StandardCharsets.UTF_8), msg.getDelayTime());
+        } catch (Exception e) {
+            return false;
+        }
+        return true;
+    }
+
+    /**
+     * 同步发送消息
+     *
+     * @param topic
+     * @param msgTag
+     * @param msgKey
+     * @param messageBody
+     * @return
+     */
+    public SendResult sendMsg(String topic, String msgTag, String msgKey, byte[] messageBody) {
+        Message msg = new Message(topic, msgTag, msgKey, messageBody);
+        log.info("MQ-Send:{}", msg);
+        return send(msg, false);
+    }
+
+    /**
+     * 同步发送定时/延时消息
+     *
+     * @param topic
+     * @param msgTag      标签,可用于消息小分类标注,对消息进行再归类
+     * @param msgKey      消息key值,建议设置全局唯一值,可不设置,不影响消息收发
+     * @param messageBody 消息body内容,生产者自定义内容,二进制形式的数据
+     * @param delayTime   服务端发送消息时间,立即发送输入0或比更早的时间,延时时间单位为毫秒(ms)
+     * @return
+     */
+    public SendResult sendTimeMsg(String topic, String msgTag, String msgKey, byte[] messageBody, Long delayTime) {
+        Message msg = new Message(topic, msgTag, msgKey, messageBody);
+        msg.setStartDeliverTime(delayTime);
+        return send(msg, false);
+    }
+
+    /**
+     * 发送单向消息
+     *
+     * @param topic
+     * @param msgTag
+     * @param msgKey
+     * @param messageBody
+     */
+    public void sendOneWayMsg(String topic, String msgTag, String msgKey, byte[] messageBody) {
+        Message msg = new Message(topic, msgTag, msgKey, messageBody);
+        this.send(msg, Boolean.TRUE);
+    }
+
+    /**
+     * 普通消息发送发放
+     *
+     * @param msg
+     * @param isOneWay 是否单向发送
+     * @return
+     */
+    private SendResult send(Message msg, Boolean isOneWay) {
+        if (ObjectUtil.isNull(producer)) {
+            return null;
+        }
+        try {
+            if (isOneWay) {
+                producer.sendOneway(msg);
+                return null;
+            } else {
+                SendResult sendResult = producer.send(msg);
+                if (ObjectUtil.isNotNull(sendResult)) {
+                    return sendResult;
+                } else {
+                    throw new CrmException(SystemCodeEnum.SEND_MSG_FAILED);
+                }
+            }
+        } catch (Exception e) {
+            throw new CrmException(SystemCodeEnum.SEND_MSG_FAILED);
+        }
+    }
+
+}

+ 335 - 0
admin/src/main/java/com/kakarote/admin/controller/AdminConfigController.java

@@ -0,0 +1,335 @@
+package com.kakarote.admin.controller;
+
+import cn.hutool.core.bean.BeanUtil;
+import com.alibaba.fastjson.JSON;
+import com.alibaba.fastjson.JSONArray;
+import com.alibaba.fastjson.JSONObject;
+import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
+import com.kakarote.admin.common.AdminCodeEnum;
+import com.kakarote.admin.common.AdminConst;
+import com.kakarote.admin.common.AdminModuleEnum;
+import com.kakarote.admin.entity.BO.AdminCompanyBO;
+import com.kakarote.admin.entity.BO.AdminInitDataBO;
+import com.kakarote.admin.entity.BO.LogWelcomeSpeechBO;
+import com.kakarote.admin.entity.BO.ModuleSettingBO;
+import com.kakarote.admin.entity.PO.AdminConfig;
+import com.kakarote.admin.entity.PO.AdminModelSort;
+import com.kakarote.admin.entity.PO.AdminUserConfig;
+import com.kakarote.admin.entity.VO.CloudConfigVO;
+import com.kakarote.admin.entity.VO.ModuleSettingVO;
+import com.kakarote.admin.service.IAdminConfigService;
+import com.kakarote.admin.service.IAdminModelSortService;
+import com.kakarote.admin.service.IAdminUserConfigService;
+import com.kakarote.admin.service.IAdminUserService;
+import com.kakarote.core.common.ApiExplain;
+import com.kakarote.core.common.Const;
+import com.kakarote.core.common.R;
+import com.kakarote.core.common.Result;
+import com.kakarote.core.utils.UserUtil;
+import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiOperation;
+import io.swagger.annotations.ApiParam;
+import org.apache.ibatis.annotations.Param;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.*;
+
+import javax.servlet.http.HttpServletRequest;
+import javax.validation.Valid;
+import java.util.ArrayList;
+import java.util.List;
+import java.util.stream.Collectors;
+
+
+/**
+ * <p>
+ * 客户规则 前端控制器
+ * </p>
+ *
+ * @author zhangzhiwei
+ * @since 2020-04-27
+ */
+@RestController
+@RequestMapping("/adminConfig")
+@Api(tags = "系统配置接口")
+public class AdminConfigController {
+
+    @Autowired
+    private IAdminConfigService adminConfigService;
+
+
+    @Autowired
+    private IAdminUserConfigService adminUserConfigService;
+
+    @Autowired
+    private IAdminUserService adminUserService;
+
+
+    @Autowired
+    private IAdminModelSortService adminModelSortService;
+
+
+    /**
+     * 设置系统配置
+     */
+    @ApiOperation(value = "设置企业配置")
+    @PostMapping("/setAdminConfig")
+    public Result setAdminConfig(@RequestBody AdminCompanyBO adminCompanyBO) {
+        adminConfigService.setAdminConfig(adminCompanyBO);
+        return Result.ok();
+    }
+
+    /**
+     * 查询企业配置
+     *
+     * @return Result
+     * @author zhangzhiwei
+     */
+    @ApiOperation(value = "查询企业配置")
+    @PostMapping("/queryAdminConfig")
+    public Result<AdminCompanyBO> queryAdminConfig() {
+        return R.ok(adminConfigService.queryAdminConfig());
+    }
+
+    @ApiOperation(value = "头部设置")
+    @PostMapping("/queryHeaderModelSort")
+    public Result<List<String>> queryHeaderModelSort() {
+        List<AdminModelSort> list = adminModelSortService.lambdaQuery().select(AdminModelSort::getModel)
+                .eq(AdminModelSort::getType, 1)
+                .eq(AdminModelSort::getUserId, UserUtil.getUserId())
+                .list();
+        return Result.ok(list.stream().map(AdminModelSort::getModel).collect(Collectors.toList()));
+    }
+
+    @ApiOperation(value = "头部设置")
+    @PostMapping("/setHeaderModelSort")
+    public Result setHeaderModelSort(@RequestBody List<String> list) {
+        List<AdminModelSort> modelSortList = new ArrayList<>();
+        for (int i = 0; i < list.size(); i++) {
+            AdminModelSort adminModelSort = new AdminModelSort();
+            adminModelSort.setType(1).setModel(list.get(i)).setSort(i).setIsHidden(0).setUserId(UserUtil.getUserId());
+            modelSortList.add(adminModelSort);
+        }
+        LambdaQueryWrapper<AdminModelSort> wrapper = new LambdaQueryWrapper<>();
+        wrapper.eq(AdminModelSort::getType, 1).eq(AdminModelSort::getUserId, UserUtil.getUserId());
+        adminModelSortService.remove(wrapper);
+        adminModelSortService.saveBatch(modelSortList, Const.BATCH_SAVE_SIZE);
+        return R.ok();
+    }
+
+    /**
+     * 查询企业模块配置
+     *
+     * @author zhangzhiwei
+     */
+    @ApiOperation(value = "查询企业模块配置")
+    @PostMapping("/queryModuleSetting")
+    public Result<List<ModuleSettingVO>> queryModuleSetting() {
+        return R.ok(adminConfigService.queryModuleSetting());
+    }
+
+    /**
+     * 设置企业模块
+     *
+     * @param moduleSetting data
+     */
+    @ApiOperation(value = "设置企业模块")
+    @PostMapping("/setModuleSetting")
+    public Result setModuleSetting(@Valid @RequestBody ModuleSettingBO moduleSetting) {
+        AdminConfig adminConfig = adminConfigService.getById(moduleSetting.getSettingId());
+        if (AdminModuleEnum.CRM.getValue().equals(adminConfig.getName())) {
+            return R.error(AdminCodeEnum.ADMIN_MODULE_CLOSE_ERROR);
+        }
+        adminConfig.setStatus(moduleSetting.getStatus());
+        adminConfigService.setModuleSetting(adminConfig);
+        return Result.ok();
+    }
+
+    @ApiOperation(value = "设置日志欢迎语")
+    @PostMapping("/setLogWelcomeSpeech")
+    public Result setLogWelcomeSpeech(@Valid @RequestBody List<String> stringList) {
+        adminConfigService.setLogWelcomeSpeech(stringList);
+        return Result.ok();
+    }
+
+    /**
+     * 获取日志欢迎语列表
+     */
+    @ApiOperation(value = "获取日志欢迎语")
+    @PostMapping("/getLogWelcomeSpeechList")
+    public Result<List<LogWelcomeSpeechBO>> getLogWelcomeSpeechList() {
+        List<LogWelcomeSpeechBO> adminConfigs = adminConfigService.getLogWelcomeSpeechList();
+        return R.ok(adminConfigs);
+    }
+
+    /**
+     * 删除配置数据
+     */
+    @ApiOperation(value = "删除配置数据")
+    @PostMapping("/deleteConfigById")
+    public Result deleteConfigById(@RequestBody @ApiParam(name = "settingId", value = "主键ID", required = true) Integer settingId) {
+        if (settingId == null) {
+            return R.error(AdminCodeEnum.ADMIN_DATA_EXIST_ERROR);
+        }
+        adminConfigService.removeById(settingId);
+        return R.ok();
+    }
+
+    /**
+     * 查询呼叫中心设置
+     */
+    @ApiOperation(value = "查询手机端模块设置")
+    @PostMapping("/queryCallModuleSetting")
+    public Result<ModuleSettingVO> queryCallModuleSetting() {
+        ModuleSettingVO moduleSettingVO = adminConfigService.queryCallModuleSetting();
+        return R.ok(moduleSettingVO);
+    }
+
+    @ApiOperation(value = "查询自定义配置")
+    @PostMapping("/queryCustomSetting/{customKey}")
+    public Result<JSONArray> queryCustomSetting(@PathVariable("customKey") String customKey) {
+        AdminUserConfig userConfig = adminUserConfigService.queryUserConfigByName(customKey);
+        if (userConfig == null) {
+            return Result.ok(new JSONArray());
+        }
+        return Result.ok(JSON.parseArray(userConfig.getValue()));
+    }
+
+    /**
+     * 修改手机端模块设置
+     */
+
+    @ApiOperation(value = "修改自定义配置")
+    @PostMapping("/setCustomSetting/{customKey}")
+    public Result queryCustomSetting(@RequestBody JSONArray json,@PathVariable("customKey") String customKey) {
+        AdminUserConfig userConfig = adminUserConfigService.queryUserConfigByName(customKey);
+        if (userConfig != null) {
+            userConfig.setValue(json.toJSONString());
+            adminUserConfigService.updateById(userConfig);
+        } else {
+            userConfig = new AdminUserConfig();
+            userConfig.setStatus(1);
+            userConfig.setName(customKey);
+            userConfig.setValue(json.toJSONString());
+            userConfig.setUserId(UserUtil.getUserId());
+            userConfig.setDescription("用户自定义参数设置");
+            adminUserConfigService.save(userConfig);
+        }
+        return R.ok();
+    }
+
+    @ApiOperation(value = "设置跟进记录常用语")
+    @PostMapping("/setActivityPhrase")
+    public Result setActivityPhrase(@RequestBody List<String> stringList) {
+        String name = "ActivityPhrase";
+        Long userId = UserUtil.getUserId();
+        String description = "跟进记录常用语";
+        adminUserConfigService.deleteUserConfigByName(name);
+        List<AdminUserConfig> adminUserConfigList = new ArrayList<>(stringList.size());
+        stringList.forEach(str -> {
+            AdminUserConfig userConfig = new AdminUserConfig();
+            userConfig.setStatus(1);
+            userConfig.setName(name);
+            userConfig.setValue(str);
+            userConfig.setUserId(userId);
+            userConfig.setDescription(description);
+            adminUserConfigList.add(userConfig);
+        });
+        adminUserConfigService.saveBatch(adminUserConfigList, AdminConst.BATCH_SAVE_SIZE);
+        return R.ok();
+    }
+
+    @ApiOperation(value = "设置跟进记录类型")
+    @PostMapping("/setRecordOptions")
+    public Result setRecordOptions(@RequestBody List<String> stringList) {
+        String name = "followRecordOption";
+        String description = "跟进记录选项";
+        adminConfigService.removeByMap(new JSONObject().fluentPut("name", name));
+        List<AdminConfig> adminUserConfigList = new ArrayList<>(stringList.size());
+        stringList.forEach(str -> {
+            AdminConfig userConfig = new AdminConfig();
+            userConfig.setStatus(1);
+            userConfig.setName(name);
+            userConfig.setValue(str);
+            userConfig.setDescription(description);
+            adminUserConfigList.add(userConfig);
+        });
+        adminConfigService.saveBatch(adminUserConfigList, AdminConst.BATCH_SAVE_SIZE);
+        return R.ok();
+    }
+
+
+    /**
+     * 查询跟进记录常用语
+     */
+    @ApiOperation(value = "查询跟进记录常用语")
+    @PostMapping("/queryActivityPhrase")
+    public Result<List<String>> queryActivityPhrase() {
+        String name = "ActivityPhrase";
+        List<AdminUserConfig> adminConfigList = adminUserConfigService.queryUserConfigListByName(name);
+        return Result.ok(adminConfigList.stream().map(AdminUserConfig::getValue).collect(Collectors.toList()));
+    }
+
+    @ApiExplain(value = "查询config配置")
+    @RequestMapping("/queryConfigByName")
+    public Result<List<com.kakarote.core.feign.admin.entity.AdminConfig>> queryConfigByName(@RequestParam("name") String name) {
+        List<AdminConfig> adminConfigs = adminConfigService.queryConfigListByName(name);
+        return Result.ok(adminConfigs.stream().map(config -> BeanUtil.copyProperties(config, com.kakarote.core.feign.admin.entity.AdminConfig.class)).collect(Collectors.toList()));
+    }
+
+    @ApiExplain(value = "查询config配置")
+    @RequestMapping("/queryFirstConfigByName")
+    public Result<com.kakarote.core.feign.admin.entity.AdminConfig> queryFirstConfigByName(@RequestParam("name") String name, HttpServletRequest request) {
+        AdminConfig config = adminConfigService.queryConfigByName(name);
+        return Result.ok(BeanUtil.copyProperties(config, com.kakarote.core.feign.admin.entity.AdminConfig.class));
+    }
+
+    @ApiExplain(value = "修改config配置")
+    @PostMapping("/updateAdminConfig")
+    public Result updateAdminConfig(@RequestBody AdminConfig adminConfig) {
+        adminConfigService.updateAdminConfig(adminConfig);
+        return R.ok();
+    }
+
+    @ApiExplain(value = "查询config配置")
+    @RequestMapping("/queryFirstConfigByNameAndValue")
+    public Result<com.kakarote.core.feign.admin.entity.AdminConfig> queryFirstConfigByNameAndValue(@RequestParam("name") String name, @RequestParam("value") String value) {
+        AdminConfig config = adminConfigService.queryFirstConfigByNameAndValue(name, value);
+        return Result.ok(BeanUtil.copyProperties(config, com.kakarote.core.feign.admin.entity.AdminConfig.class));
+    }
+
+    /**
+     * 查询跟进记录常用语
+     */
+    @ApiOperation(value = "验证密码")
+    @PostMapping("/verifyPassword")
+    public Result<String> verifyPassword(@RequestBody AdminInitDataBO adminInitDataBO) {
+        return Result.ok(adminConfigService.verifyPassword(adminInitDataBO));
+    }
+
+
+    /**
+     * 查询跟进记录常用语
+     */
+    @ApiOperation(value = "模块初始化")
+    @PostMapping("/moduleInitData")
+    public Result<Boolean> moduleInitData(@RequestBody AdminInitDataBO adminInitDataBO) {
+        return Result.ok(adminConfigService.moduleInitData(adminInitDataBO));
+    }
+
+    /**
+     * 查询企业人数配置
+     * @return data
+     */
+    @ApiOperation("查询企业配置(固定配置)")
+    @PostMapping("/queryCloudConfig")
+    public Result<CloudConfigVO> queryCloudConfig(){
+        CloudConfigVO cloudConfigVO = new CloudConfigVO();
+        cloudConfigVO.setAllNum(AdminConst.USER_NUM);
+        cloudConfigVO.setUsingNum(adminConfigService.count());
+        cloudConfigVO.setCreateTime("2020-01-01 00:00:00");
+        cloudConfigVO.setStartTime(cloudConfigVO.getCreateTime());
+        cloudConfigVO.setEndTime("2080-01-01 00:00:00");
+        return Result.ok(cloudConfigVO);
+    }
+}
+

+ 90 - 0
admin/src/main/java/com/kakarote/admin/controller/AdminDeptController.java

@@ -0,0 +1,90 @@
+package com.kakarote.admin.controller;
+
+
+import com.kakarote.admin.entity.BO.AdminDeptBO;
+import com.kakarote.admin.entity.BO.AdminDeptQueryBO;
+import com.kakarote.admin.entity.VO.AdminDeptVO;
+import com.kakarote.admin.service.IAdminDeptService;
+import com.kakarote.core.common.ApiExplain;
+import com.kakarote.core.common.R;
+import com.kakarote.core.common.Result;
+import com.kakarote.core.feign.admin.entity.SimpleDept;
+import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiOperation;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.*;
+
+import javax.validation.Valid;
+import javax.validation.constraints.NotNull;
+import java.util.List;
+
+/**
+ * <p>
+ * 部门表 前端控制器
+ * </p>
+ *
+ * @author zhangzhiwei
+ * @since 2020-04-27
+ */
+@RestController
+@RequestMapping("/adminDept")
+@Api(tags = "部门管理相关接口")
+public class AdminDeptController {
+
+    @Autowired
+    private IAdminDeptService adminDeptService;
+
+    @PostMapping("/queryDeptTree")
+    @ApiOperation("查询部门列表树")
+    public Result<List<AdminDeptVO>> queryDeptTree(@RequestBody AdminDeptQueryBO queryBO) {
+        List<AdminDeptVO> deptList = adminDeptService.queryDeptTree(queryBO);
+        return Result.ok(deptList);
+    }
+
+    @PostMapping("/addDept")
+    @ApiOperation("新增部门")
+    public Result addDept(@RequestBody @Valid AdminDeptBO adminDept) {
+        adminDeptService.addDept(adminDept);
+        return Result.ok();
+    }
+
+    @PostMapping("/setDept")
+    @ApiOperation("修改部门")
+    public Result setDept(@RequestBody @Valid AdminDeptBO adminDept) {
+        adminDeptService.setDept(adminDept);
+        return Result.ok();
+    }
+
+    @PostMapping("/deleteDept/{deptId}")
+    @ApiOperation("删除部门")
+    public Result deleteDept(@PathVariable("deptId") Long deptId) {
+        adminDeptService.deleteDept(deptId);
+        return Result.ok();
+    }
+
+    @RequestMapping("/getNameByDeptId")
+    @ApiExplain("根据部门ID获取部门名称")
+    public Result getNameByDeptId(Long deptId) {
+        return R.ok(adminDeptService.getNameByDeptId(deptId));
+    }
+
+    @RequestMapping("/getIdByDeptName")
+    @ApiExplain("根据部门名称获取部门Id")
+    public Result getIdByDeptName(String deptName) {
+        return R.ok(adminDeptService.getIdByDeptName(deptName));
+    }
+
+    @RequestMapping("/queryChildDeptId")
+    @ApiExplain("根据部门ID下的子部门")
+    public Result<List<Long>> queryChildDeptId(@NotNull Long deptId) {
+        return R.ok(adminDeptService.queryChildDept(deptId));
+    }
+
+    @PostMapping("/queryDeptByIds")
+    @ApiExplain("根据部门ID获取用户")
+    public Result<List<SimpleDept>> queryDeptByIds(@RequestBody List<Long> ids) {
+        List<SimpleDept> simpleDepts = adminDeptService.queryDeptByIds(ids);
+        return R.ok(simpleDepts);
+    }
+}
+

+ 177 - 0
admin/src/main/java/com/kakarote/admin/controller/AdminFileController.java

@@ -0,0 +1,177 @@
+package com.kakarote.admin.controller;
+
+
+import cn.hutool.core.util.NumberUtil;
+import cn.hutool.core.util.StrUtil;
+import com.kakarote.admin.entity.BO.AdminDeleteByBatchIdBO;
+import com.kakarote.admin.entity.BO.RenameFileBO;
+import com.kakarote.admin.service.IAdminFileService;
+import com.kakarote.core.common.ApiExplain;
+import com.kakarote.core.common.Result;
+import com.kakarote.core.common.enums.SystemCodeEnum;
+import com.kakarote.core.exception.CrmException;
+import com.kakarote.core.servlet.LoginFromCookie;
+import com.kakarote.core.servlet.upload.FileEntity;
+import com.kakarote.core.servlet.upload.UploadEntity;
+import com.kakarote.core.utils.UserUtil;
+import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiOperation;
+import io.swagger.annotations.ApiParam;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.*;
+import org.springframework.web.multipart.MultipartFile;
+
+import javax.servlet.http.HttpServletResponse;
+import javax.validation.constraints.NotNull;
+import java.io.IOException;
+import java.util.Collection;
+import java.util.List;
+
+/**
+ * <p>
+ * 附件表 前端控制器
+ * </p>
+ *
+ * @author zhangzhiwei
+ * @since 2020-04-27
+ */
+@RestController
+@RequestMapping("/adminFile")
+@Api(tags = "文件操作相关接口")
+public class AdminFileController {
+
+    @Autowired
+    private IAdminFileService adminFileService;
+
+    @PostMapping("/upload")
+    @ApiOperation("上传文件")
+    public Result<UploadEntity> upload(@RequestParam("file")
+                                       @ApiParam("文件") MultipartFile file,
+                                       @ApiParam("batchId") String batchId,
+                                       @ApiParam("文件类型") String type,
+                                       @RequestParam(value = "isPublic",required = false)String isPublic) throws IOException {
+        if (StrUtil.isEmpty(isPublic)){
+            isPublic = "0";
+        }
+        UploadEntity entity = adminFileService.upload(file,batchId, type,isPublic);
+        return Result.ok(entity);
+    }
+
+    @PostMapping("/uploadBySingle")
+    @ApiOperation("上传文件")
+    public Result<UploadEntity> uploadBySingle(@RequestParam("file")
+                                       @ApiParam("文件") MultipartFile file,
+                                       @ApiParam("batchId") String batchId,
+                                       @ApiParam("文件类型") String type,
+                                       @RequestParam(value = "isPublic",required = false)String isPublic) throws IOException {
+        if (StrUtil.isEmpty(isPublic)){
+            isPublic = "0";
+        }
+        UploadEntity entity = adminFileService.uploadBySingle(file,batchId, type,isPublic);
+        return Result.ok(entity);
+    }
+
+    @RequestMapping(value = "/queryFileList/{batchId}", method = RequestMethod.POST)
+    @ApiOperation(value = "通过批次ID查询文件列表", httpMethod = "POST")
+    public Result<List<FileEntity>> queryFileList(@NotNull @PathVariable String batchId) {
+        List<FileEntity> entityList = adminFileService.queryFileList(batchId);
+        return Result.ok(entityList);
+    }
+
+    @RequestMapping(value = "/queryById/{fileId}", method = RequestMethod.POST)
+    @ApiOperation(value = "通过ID查询文件", httpMethod = "POST")
+    public Result<FileEntity> queryById(@NotNull @PathVariable @ApiParam("文件ID") Long fileId) {
+        FileEntity fileEntity = adminFileService.queryById(fileId);
+        return Result.ok(fileEntity);
+    }
+
+    @RequestMapping(value = "/queryByIds", method = RequestMethod.POST)
+    @ApiOperation(value = "通过ID查询文件", httpMethod = "POST")
+    public Result<List<FileEntity>> queryByIds(@RequestBody Collection<Long> fileIds) {
+        List<FileEntity> fileEntitys = adminFileService.queryByIds(fileIds);
+        return Result.ok(fileEntitys);
+    }
+
+    @RequestMapping(value = "/queryOneByBatchId/{batchId}", method = RequestMethod.POST)
+    @ApiOperation(value = "通过批次ID查询单个文件", httpMethod = "POST")
+    public Result<FileEntity> queryOneByBatchId(@NotNull @PathVariable @ApiParam("batchId") String batchId) {
+        FileEntity fileEntity = adminFileService.queryOneByBatchId(batchId);
+        return Result.ok(fileEntity);
+    }
+
+    @RequestMapping(value = "/deleteById/{fileId}", method = RequestMethod.POST)
+    @ApiOperation(value = "通过ID删除文件", httpMethod = "POST")
+    public Result deleteById(@NotNull @PathVariable @ApiParam("文件ID") String fileId) {
+        if (NumberUtil.isLong(fileId)) {
+            adminFileService.deleteById(Long.parseLong(fileId));
+        } else {
+            AdminDeleteByBatchIdBO bo = new AdminDeleteByBatchIdBO();
+            bo.setBatchId(fileId);
+            adminFileService.deleteByBatchId(bo);
+        }
+
+        return Result.ok();
+    }
+
+    @RequestMapping(value = "/deleteByBatchId", method = RequestMethod.POST)
+    @ApiOperation(value = "通过批次ID和文件类型删除文件", httpMethod = "POST")
+    public Result deleteByBatchId(@RequestBody AdminDeleteByBatchIdBO deleteByBatchIdBO) {
+        adminFileService.deleteByBatchId(deleteByBatchIdBO);
+        return Result.ok();
+    }
+
+    @RequestMapping(value = "/deleteByBatchIds", method = RequestMethod.POST)
+    @ApiOperation(value = "通过批次ID删除文件", httpMethod = "POST")
+    public Result deleteByBatchId(@RequestBody @ApiParam("batchId") List<String> batchId) {
+        adminFileService.deleteByBatchId(batchId);
+        return Result.ok();
+    }
+
+    @RequestMapping(value = "/down/{fileId}")
+    @ApiOperation(value = "下载文件接口", httpMethod = "POST")
+    @LoginFromCookie
+    public void down(@PathVariable("fileId") @ApiParam("文件ID") Long fileId, HttpServletResponse response) {
+        if (UserUtil.getUser() == null) {
+            throw new CrmException(SystemCodeEnum.SYSTEM_NO_AUTH);
+        }
+        adminFileService.down(response, fileId);
+    }
+
+    @PostMapping(value = "/renameFileById")
+    @ApiOperation(value = "修改附件名称", httpMethod = "POST")
+    public Result renameFileById(@RequestBody RenameFileBO renameFileBO) {
+        adminFileService.renameFileById(renameFileBO);
+        return Result.ok();
+    }
+
+    @PostMapping(value = "/queryNum")
+    @ApiExplain("查询文件数量")
+    public Result<Integer> queryNum(@RequestBody List<String> batchId) {
+        Integer num = adminFileService.queryNum(batchId);
+        return Result.ok(num);
+    }
+
+    @PostMapping(value = "/queryFileList")
+    @ApiExplain("查询文件")
+    public Result<List<FileEntity>> queryFileList(@RequestBody List<String> batchIdList) {
+        List<FileEntity> fileEntities = adminFileService.queryFileList(batchIdList);
+        return Result.ok(fileEntities);
+    }
+
+
+    @PostMapping(value = "/copyJxcImg")
+    @ApiExplain("copy进销存产品详情图")
+    public Result<String> copyJxcImg(@RequestParam(value = "batchId") String batchId) {
+        String newBatchId = adminFileService.copyJxcImg(batchId);
+        return Result.ok(newBatchId);
+    }
+
+    @PostMapping(value = "/saveBatchFileEntity")
+    @ApiExplain("批量保存附件(查询附件id,修改batchId)")
+    public Result saveBatchFileEntity(@RequestParam(value = "adminFileIdList") List<String> adminFileIdList,
+                                      @RequestParam(value = "batchId") String batchId) {
+        adminFileService.saveBatchFileEntity(adminFileIdList, batchId);
+        return Result.ok();
+    }
+}
+

+ 80 - 0
admin/src/main/java/com/kakarote/admin/controller/AdminMenuController.java

@@ -0,0 +1,80 @@
+package com.kakarote.admin.controller;
+
+
+import com.alibaba.fastjson.JSONObject;
+import com.kakarote.admin.common.AdminRoleTypeEnum;
+import com.kakarote.admin.entity.PO.AdminMenu;
+import com.kakarote.admin.service.IAdminMenuService;
+import com.kakarote.core.common.Result;
+import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiOperation;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.*;
+
+import java.util.List;
+
+/**
+ * <p>
+ * 后台菜单表 前端控制器
+ * </p>
+ *
+ * @author zhangzhiwei
+ * @since 2020-04-27
+ */
+@RestController
+@RequestMapping("/adminMenu")
+@Api(tags = "菜单模块")
+public class AdminMenuController {
+
+    @Autowired
+    private IAdminMenuService adminMenuService;
+
+    @RequestMapping("/getMenuListByType/{type}")
+    @ApiOperation("根据类型查询菜单")
+    public Result<JSONObject> getMenuListByType(@PathVariable("type") Integer type) {
+        AdminRoleTypeEnum typeEnum = AdminRoleTypeEnum.parse(type);
+        JSONObject byType = adminMenuService.getMenuListByType(typeEnum);
+        return Result.ok(byType);
+    }
+
+    @RequestMapping("/queryMenuId")
+    public Result<Long> queryMenuId(@RequestParam("realm1") String realm1,@RequestParam("realm2") String realm2,
+                                       @RequestParam("realm3") String realm3){
+        Long menuId = adminMenuService.queryMenuId(realm1,realm2,realm3);
+        return Result.ok(menuId);
+
+    }
+
+    /**
+     * 通过角色列表查询菜单列表
+     * @param roleIds 角色ids
+     * @return 菜单
+     */
+    @RequestMapping("/queryMenuListByRoleIds")
+    @ApiOperation("根据角色id查询菜单")
+    public Result<List<AdminMenu>> queryMenuListByRoleIds(@RequestBody List<Long> roleIds){
+        return Result.ok(adminMenuService.queryMenuListByRoleIds(roleIds));
+    }
+
+    /**
+     * 通过角色列表查询菜单列表
+     * @return 菜单
+     */
+    @RequestMapping("/queryMenuList")
+    @ApiOperation("根据用户id公司id查询菜单")
+    public Result<List<AdminMenu>> queryMenuList(@RequestParam("userId")Long userId){
+        return Result.ok(adminMenuService.queryMenuList(userId));
+    }
+
+    /**
+     * 查询所有菜单
+     * @return
+     */
+    @RequestMapping("/queryAllMenuList")
+    @ApiOperation("通过realm查询菜单")
+    public Result<List<AdminMenu>> queryAllMenuList(){
+        return Result.ok(adminMenuService.queryAllMenuList());
+
+    }
+}
+

+ 53 - 0
admin/src/main/java/com/kakarote/admin/controller/AdminMessageConfigController.java

@@ -0,0 +1,53 @@
+package com.kakarote.admin.controller;
+
+
+import com.kakarote.admin.entity.VO.AdminMessageConfigVO;
+import com.kakarote.admin.service.IAdminMessageConfigService;
+import com.kakarote.core.common.Result;
+import com.kakarote.core.feign.admin.entity.AdminMessageConfig;
+import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiOperation;
+import io.swagger.annotations.ApiParam;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.*;
+
+import java.util.List;
+
+/**
+ * <p>
+ * 系统消息通知配置表 前端控制器
+ * </p>
+ *
+ * @author zhangzhiwei
+ * @since 2021-08-16
+ */
+@RestController
+@RequestMapping("/adminMessageConfig")
+@Api(tags = "系统消息配置相关接口")
+public class AdminMessageConfigController {
+
+    @Autowired
+    private IAdminMessageConfigService messageConfigService;
+
+    @PostMapping("/queryList/{type}")
+    @ApiOperation("查询列表")
+    public Result<List<AdminMessageConfigVO>> queryList(@ApiParam("类型 1:crm 3:进销存") @PathVariable("type") Integer type) {
+        List<AdminMessageConfigVO> configVOS = messageConfigService.queryList(type);
+        return Result.ok(configVOS);
+    }
+
+    @PostMapping("/updateConfig")
+    @ApiOperation("修改配置")
+    public Result updateConfig(@RequestBody List<AdminMessageConfigVO> adminMessageConfigVOS) {
+        messageConfigService.updateConfig(adminMessageConfigVOS);
+        return Result.ok();
+    }
+
+    @PostMapping("/getByLabelAndAction")
+    @ApiOperation("根据标签和操作获取消息配置")
+    public Result<AdminMessageConfig> getByLabelAndAction(@RequestParam("label") String label, @RequestParam("action") String action){
+        AdminMessageConfig config = messageConfigService.getByLabelAndAction(label, action);
+        return Result.ok(config);
+    }
+}
+

+ 236 - 0
admin/src/main/java/com/kakarote/admin/controller/AdminMessageController.java

@@ -0,0 +1,236 @@
+package com.kakarote.admin.controller;
+
+
+import cn.hutool.core.bean.BeanUtil;
+import cn.hutool.core.date.DateUtil;
+import cn.hutool.core.io.FileUtil;
+import cn.hutool.core.util.ObjectUtil;
+import cn.hutool.extra.servlet.ServletUtil;
+import com.alibaba.fastjson.JSONObject;
+import com.baomidou.mybatisplus.extension.conditions.update.LambdaUpdateChainWrapper;
+import com.kakarote.admin.common.AdminCodeEnum;
+import com.kakarote.admin.common.mq.ProducerUtil;
+import com.kakarote.admin.entity.BO.AdminMessageQueryBO;
+import com.kakarote.admin.entity.PO.AdminMessage;
+import com.kakarote.admin.entity.VO.AdminMessageVO;
+import com.kakarote.admin.service.IAdminMessageService;
+import com.kakarote.core.common.ApiExplain;
+import com.kakarote.core.common.Result;
+import com.kakarote.core.common.cache.AdminCacheKey;
+import com.kakarote.core.entity.BasePage;
+import com.kakarote.core.entity.MsgBodyBO;
+import com.kakarote.core.exception.CrmException;
+import com.kakarote.core.feign.admin.entity.AdminMessageBO;
+import com.kakarote.core.redis.Redis;
+import com.kakarote.core.servlet.ApplicationContextHolder;
+import com.kakarote.core.servlet.upload.FileServiceFactory;
+import com.kakarote.core.servlet.upload.UploadConfig;
+import com.kakarote.core.servlet.upload.UploadEntity;
+import com.kakarote.core.utils.UserUtil;
+import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiOperation;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.*;
+
+import javax.servlet.http.HttpServletResponse;
+import java.io.InputStream;
+
+/**
+ * <p>
+ * 系统消息表 前端控制器
+ * </p>
+ *
+ * @author zhangzhiwei
+ * @since 2020-04-27
+ */
+@RestController
+@RequestMapping("/adminMessage")
+@Api(tags = "系统消息")
+public class AdminMessageController {
+
+    @Autowired
+    private IAdminMessageService messageService;
+
+    @Autowired
+    private Redis redis;
+
+    @Autowired
+    private ProducerUtil producerUtil;
+
+    @PostMapping("/save")
+    public Result<AdminMessage> save(@RequestBody com.kakarote.core.feign.admin.entity.AdminMessage adminMessage) {
+        AdminMessage adminMessage1 = BeanUtil.copyProperties(adminMessage, AdminMessage.class);
+        if (adminMessage.getCreateTime() != null) {
+            adminMessage1.setCreateTime(DateUtil.parseLocalDateTime(adminMessage.getCreateTime()));
+        }
+        if(adminMessage.getCreateUserId() != null) {
+            adminMessage1.setCreateUserId(adminMessage.getCreateUserId());
+        } else {
+            adminMessage1.setCreateUserId(0L);
+        }
+        messageService.save(adminMessage1);
+        return Result.ok(adminMessage1);
+    }
+
+    @PostMapping("/update")
+    public Result<AdminMessage> update(@RequestBody com.kakarote.core.feign.admin.entity.AdminMessage adminMessage) {
+        AdminMessage adminMessage1 = BeanUtil.copyProperties(adminMessage, AdminMessage.class);
+        if (adminMessage.getCreateTime() != null) {
+            adminMessage1.setCreateTime(DateUtil.parseLocalDateTime(adminMessage.getCreateTime()));
+        }
+        messageService.updateById(adminMessage1);
+        return Result.ok(adminMessage1);
+    }
+
+    @PostMapping("/saveOrUpdateMessage")
+    public Result<Long> saveOrUpdateMessage(@RequestBody com.kakarote.core.feign.admin.entity.AdminMessage message) {
+        Long messageId = messageService.saveOrUpdateMessage(message);
+        return Result.ok(messageId);
+    }
+
+    @PostMapping("/queryList")
+    @ApiOperation("查询消息列表")
+    public Result<BasePage<AdminMessage>> queryList(@RequestBody AdminMessageQueryBO adminMessageBO) {
+        BasePage<AdminMessage> adminMessageBasePage = messageService.queryList(adminMessageBO);
+        return Result.ok(adminMessageBasePage);
+    }
+
+    @PostMapping("/readMessage")
+    @ApiOperation("单个标记为已读")
+    public Result readMessage(@RequestParam("messageId") Long messageId) {
+        AdminMessage byId = messageService.getById(messageId);
+        if (byId != null) {
+            byId.setIsRead(1);
+            messageService.updateById(byId);
+        }
+        return Result.ok();
+    }
+
+    @PostMapping("/readAllMessage")
+    @ApiOperation("全部标记为已读")
+    public Result readAllMessage(Integer label) {
+        LambdaUpdateChainWrapper<AdminMessage> wrapper = messageService.lambdaUpdate();
+        wrapper.set(AdminMessage::getIsRead, 1);
+        wrapper.eq(AdminMessage::getRecipientUser, UserUtil.getUserId());
+        if (label != null) {
+            wrapper.eq(AdminMessage::getLabel, label);
+        }
+        wrapper.update();
+        return Result.ok();
+    }
+
+    @PostMapping("/clear")
+    @ApiOperation("删除已读消息")
+    public Result clear(Integer label) {
+        LambdaUpdateChainWrapper<AdminMessage> wrapper = messageService.lambdaUpdate();
+        wrapper.eq(AdminMessage::getIsRead, 1);
+        wrapper.eq(AdminMessage::getRecipientUser, UserUtil.getUserId());
+        if (label != null) {
+            wrapper.eq(AdminMessage::getLabel, label);
+        }
+        wrapper.remove();
+        return Result.ok();
+    }
+
+    @PostMapping("/getById/{messageId}")
+    public Result<AdminMessage> getById(@PathVariable Long messageId) {
+        AdminMessage adminMessage = messageService.getById(messageId);
+        return Result.ok(adminMessage);
+    }
+
+    @PostMapping("/queryUnreadCount")
+    @ApiOperation("查询未读消息")
+    public Result<AdminMessageVO> queryUnreadCount() {
+        AdminMessageVO messageVO = messageService.queryUnreadCount();
+        return Result.ok(messageVO);
+    }
+
+    @PostMapping("/queryImportNum")
+    @ApiOperation("查询导入数量")
+    public Result<Integer> queryImportNum(Long messageId) {
+        if (messageId == null) {
+            return Result.ok(null);
+        }
+        boolean exists = redis.exists(AdminCacheKey.UPLOAD_EXCEL_MESSAGE_PREFIX + messageId.toString());
+        Integer num = null;
+        if (exists) {
+            num = redis.get(AdminCacheKey.UPLOAD_EXCEL_MESSAGE_PREFIX + messageId);
+        }
+        return Result.ok(num);
+    }
+
+    @PostMapping("/queryImportInfo")
+    @ApiOperation("查询导入信息")
+    public Result<JSONObject> queryImportInfo(@RequestParam("messageId") Long messageId) {
+        AdminMessage adminMessage = messageService.getById(messageId);
+        if (adminMessage != null && adminMessage.getContent() != null) {
+            String[] content = adminMessage.getContent().split(",");
+            JSONObject r = new JSONObject().
+                    fluentPut("totalSize", adminMessage.getTitle()).fluentPut("errSize", content[0]);
+            r.put("updateSize", content.length > 1 ? content[1] : 0);
+            r.put("skipSize", content.length > 2 ? content[2] : 0);
+            return Result.ok(r);
+        } else {
+            return Result.ok(new JSONObject().fluentPut("totalSize", 0)
+                    .fluentPut("errSize", 0).fluentPut("updateSize", 0).fluentPut("skipSize", 0));
+        }
+    }
+
+    @PostMapping("/downImportError")
+    @ApiOperation("下载错误模板")
+    public void downImportError(@RequestParam("messageId") Long messageId, HttpServletResponse response) {
+        String path = redis.get(AdminCacheKey.UPLOAD_EXCEL_MESSAGE_PREFIX + "file:" + messageId);
+        UploadEntity entity = new UploadEntity();
+        entity.setFileId(messageId.toString());
+        entity.setIsPublic("0");
+        entity.setPath(path);
+        try {
+            InputStream inputStream = FileServiceFactory.build().downFile(entity);
+            if (inputStream != null) {
+                final String contentType = ObjectUtil.defaultIfNull(FileUtil.getMimeType(path), "application/octet-stream");
+                if (ApplicationContextHolder.getBean(UploadConfig.class).getConfig() == 1) {
+                    ServletUtil.write(response, inputStream, contentType, path.substring(path.lastIndexOf("\\") + 1));
+                } else {
+                    ServletUtil.write(response, inputStream, contentType, path.substring(path.lastIndexOf("/") + 1));
+                }
+            }
+        } catch (Exception e) {
+            throw new CrmException(AdminCodeEnum.ADMIN_DATA_EXIST_ERROR);
+        }
+    }
+
+    @PostMapping("/sendMessage")
+    @ApiExplain("发送消息")
+    public Result sendMessage(@RequestBody AdminMessageBO adminMessageBO) {
+        messageService.addMessage(adminMessageBO);
+        return Result.ok();
+    }
+
+    @PostMapping("/deleteEventMessage")
+    @ApiExplain("删除日程消息")
+    public Result deleteEventMessage(@RequestParam("eventId") Integer eventId) {
+        messageService.deleteEventMessage(eventId);
+        return Result.ok();
+    }
+
+    @PostMapping("/deleteById/{messageId}")
+    @ApiOperation("删除通知")
+    public Result deleteById(@PathVariable("messageId") Long messageId) {
+        messageService.deleteById(messageId);
+        return Result.ok();
+    }
+
+    @PostMapping("/deleteByLabel")
+    public Result deleteByLabel(@RequestParam("label") Integer label) {
+        messageService.deleteByLabel(label);
+        return Result.ok();
+    }
+
+    @PostMapping("/sendMQMsg")
+    @ApiOperation("发送MQ消息")
+    public Result sendMQMsg(@RequestBody MsgBodyBO msgBodyBO) {
+        producerUtil.sendMsgToTopicOne(msgBodyBO);
+        return Result.ok();
+    }
+}
+

+ 275 - 0
admin/src/main/java/com/kakarote/admin/controller/AdminRoleController.java

@@ -0,0 +1,275 @@
+package com.kakarote.admin.controller;
+
+
+import com.alibaba.fastjson.JSONObject;
+import com.kakarote.admin.common.AdminRoleTypeEnum;
+import com.kakarote.admin.entity.BO.AdminRoleBO;
+import com.kakarote.admin.entity.BO.AdminUserRoleBO;
+import com.kakarote.admin.entity.PO.AdminConfig;
+import com.kakarote.admin.entity.PO.AdminModelSort;
+import com.kakarote.admin.entity.PO.AdminRole;
+import com.kakarote.admin.entity.VO.AdminRoleVO;
+import com.kakarote.admin.service.IAdminConfigService;
+import com.kakarote.admin.service.IAdminModelSortService;
+import com.kakarote.admin.service.IAdminRoleAuthService;
+import com.kakarote.admin.service.IAdminRoleService;
+import com.kakarote.core.common.ApiExplain;
+import com.kakarote.core.common.R;
+import com.kakarote.core.common.Result;
+import com.kakarote.core.utils.UserUtil;
+import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiOperation;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.*;
+
+import javax.validation.constraints.NotNull;
+import java.util.ArrayList;
+import java.util.Collection;
+import java.util.List;
+import java.util.Map;
+import java.util.stream.Collectors;
+
+/**
+ * <p>
+ * 角色表 前端控制器
+ * </p>
+ *
+ * @author zhangzhiwei
+ * @since 2020-04-27
+ */
+@RestController
+@RequestMapping("/adminRole")
+@Api(tags = "角色模块")
+public class AdminRoleController {
+    @Autowired
+    private IAdminRoleService adminRoleService;
+
+    @Autowired
+    private IAdminModelSortService adminModelSortService;
+
+    @Autowired
+    private IAdminRoleAuthService adminRoleAuthService;
+
+    @Autowired
+    private IAdminConfigService configService;
+
+    @PostMapping("/auth")
+    @ApiOperation("角色权限")
+    public Result<JSONObject> auth() {
+        JSONObject object = adminRoleService.auth(UserUtil.getUserId());
+        AdminModelSort one = adminModelSortService.lambdaQuery().select(AdminModelSort::getModel).eq(AdminModelSort::getType, 1).eq(AdminModelSort::getUserId, UserUtil.getUserId()).orderByAsc(AdminModelSort::getSort).last(" limit 1").one();
+        object.put("firstModel", one != null ? one.getModel() : "");
+        return R.ok(object);
+    }
+
+    @PostMapping("/queryNoAuthMenu")
+    @ApiOperation("获取未授权的菜单")
+    public Result<List<String>> queryNoAuthMenu(@RequestParam("userId") @NotNull Long userId) {
+        return R.ok(adminRoleService.queryNoAuthMenu(userId));
+    }
+
+    @PostMapping("/getRoleList")
+    @ApiOperation("查询新增员工时的可查询角色")
+    public Result<List<AdminRoleVO>> getRoleList(){
+        return R.ok(adminRoleService.getRoleList());
+    }
+
+    @PostMapping("/getAllRoleList")
+    @ApiOperation("全局角色查询")
+    public Result<List<AdminRoleVO>> getAllRoleList() {
+        List<AdminRoleVO> allRoleList = adminRoleService.getAllRoleList();
+        return R.ok(allRoleList);
+    }
+
+    @PostMapping("/getRoleTypeList")
+    @ApiOperation("获取角色类型列表")
+    public Result<List<Map<String, Object>>> getRoleTypeList() {
+        List<Map<String, Object>> data = new ArrayList<>(7);
+        data.add(new JSONObject().fluentPut("name", "系统管理角色").fluentPut("roleType", 1));
+        data.add(new JSONObject().fluentPut("name", "办公管理角色").fluentPut("roleType", 7));
+        data.add(new JSONObject().fluentPut("name", "客户管理角色").fluentPut("roleType", 2));
+        List<AdminConfig> adminConfigs = configService.queryConfigListByName(AdminRoleTypeEnum.HRM.getName(),AdminRoleTypeEnum.FINANCE.getName(),AdminRoleTypeEnum.JXC.getName());
+        Map<String, List<AdminConfig>> adminMap = adminConfigs.stream().collect(Collectors.groupingBy(AdminConfig::getName));
+        if(adminMap.containsKey(AdminRoleTypeEnum.HRM.getName()) && adminMap.get(AdminRoleTypeEnum.HRM.getName()).get(0).getStatus() != 0){
+            data.add(new JSONObject().fluentPut("name", "人力资源管理角色").fluentPut("roleType", 9));
+        }
+        if(adminMap.containsKey(AdminRoleTypeEnum.FINANCE.getName()) && adminMap.get(AdminRoleTypeEnum.FINANCE.getName()).get(0).getStatus() != 0){
+            data.add(new JSONObject().fluentPut("name", "财务管理角色").fluentPut("roleType", 4));
+        }
+        if(adminMap.containsKey(AdminRoleTypeEnum.JXC.getName()) && adminMap.get(AdminRoleTypeEnum.JXC.getName()).get(0).getStatus() != 0){
+            data.add(new JSONObject().fluentPut("name", "进销存管理角色").fluentPut("roleType", 10));
+        }
+        // data.add(new JSONObject().fluentPut("name", "项目管理角色").fluentPut("roleType", 8));
+        return R.ok(data);
+    }
+
+    @PostMapping("/getRoleByType/{type}")
+    @ApiOperation("通过角色类型查询角色")
+    public Result<List<AdminRole>> getRoleByType(@PathVariable("type") Integer type) {
+        AdminRoleTypeEnum roleTypeEnum = AdminRoleTypeEnum.parse(type);
+        List<AdminRole> roleByType = adminRoleService.getRoleByType(roleTypeEnum);
+        return R.ok(roleByType);
+    }
+
+    @PostMapping("/queryRoleByRoleTypeAndUserId")
+    @ApiExplain("查询当前用户在某个模块下的角色")
+    public Result<List<AdminRole>> queryRoleByRoleTypeAndUserId(@RequestParam("type") Integer type) {
+        List<AdminRole> recordList = adminRoleService.queryRoleByRoleTypeAndUserId(type);
+        return R.ok(recordList);
+    }
+
+
+    @PostMapping("/queryRoleListByUserId")
+    @ApiExplain("通过用户id查询角色")
+    public Result<List<AdminRole>> queryRoleListByUserId(@RequestBody List<Long> userIds) {
+        return R.ok(adminRoleService.queryRoleListByUserId(userIds));
+    }
+
+    @PostMapping("/queryDataType")
+    @ApiExplain("查询数据权限")
+    public Result<Integer> queryDataType(@RequestParam("userId") Long userId, @RequestParam("menuId") Long menuId) {
+        Integer dataType = adminRoleService.queryDataType(userId, menuId);
+        return R.ok(dataType);
+    }
+
+    @PostMapping("/queryUserByAuth")
+    @ApiExplain("查询数据权限")
+    public Result<Collection<Long>> queryUserByAuth(@RequestParam("userId") Long userId, @RequestParam("menuId") Long menuId) {
+        Collection<Long> longs = adminRoleService.queryUserByAuth(userId, menuId);
+        return R.ok(longs);
+    }
+
+    @PostMapping("/add")
+    @ApiOperation("添加角色")
+    public Result add(@RequestBody AdminRole adminRole) {
+        adminRoleService.add(adminRole);
+        return R.ok();
+    }
+
+    @PostMapping("/update")
+    @ApiOperation("修改角色")
+    public Result update(@RequestBody AdminRole adminRole) {
+        adminRoleService.add(adminRole);
+        return R.ok();
+    }
+
+    @PostMapping("/delete")
+    @ApiOperation("删除角色")
+    public Result delete(@RequestParam("roleId") Long roleId) {
+        adminRoleService.delete(roleId);
+        return R.ok();
+    }
+
+    @PostMapping("/copy")
+    @ApiOperation("复制角色")
+    public Result copy(@RequestParam("roleId") Long roleId) {
+        adminRoleService.copy(roleId);
+        return R.ok();
+    }
+
+    @PostMapping("/relatedDeptUser")
+    @ApiOperation("角色关联员工部门")
+    public Result relatedDeptUser(@RequestBody AdminRoleBO adminRoleBO) {
+        adminRoleService.relatedDeptUser(adminRoleBO.getUserIds(),adminRoleBO.getDeptIds(),adminRoleBO.getRoleIds());
+        return R.ok();
+    }
+
+    @PostMapping("/relatedUser")
+    @ApiOperation("角色关联员工")
+    public Result relatedUser(@RequestBody AdminRoleBO adminRoleBO) {
+        adminRoleService.relatedUser(adminRoleBO.getUserIds(), adminRoleBO.getRoleIds());
+        return R.ok();
+    }
+
+    @PostMapping("/accountUserRole")
+    @ApiOperation("账套授权角色关联员工")
+    public Result accountUserRole(@RequestBody AdminUserRoleBO userRoleBO) {
+        adminRoleService.accountUserRole(userRoleBO);
+        return R.ok();
+    }
+
+    @PostMapping("/unbindingUser")
+    @ApiOperation("取消角色关联员工")
+    public Result unbindingUser(@RequestParam("userId") Long userId, @RequestParam("roleId") Long roleId) {
+        adminRoleService.unbindingUser(userId, roleId);
+        return R.ok();
+    }
+
+    @PostMapping("/updateRoleMenu")
+    @ApiOperation("保存角色菜单关系")
+    public Result updateRoleMenu(@RequestBody AdminRole adminRole) {
+        adminRoleService.updateRoleMenu(adminRole);
+        return R.ok();
+    }
+
+    @PostMapping("/updateAuthRole/{roleId}")
+    @ApiOperation("保存角色与能看到角色的关系关系")
+    public Result updateAuthRole(@PathVariable("roleId") Long roleId,@RequestBody List<Long> authRoleIds) {
+        adminRoleAuthService.saveRoleAuth(roleId,authRoleIds);
+        return Result.ok();
+    }
+
+    @PostMapping("/queryAuthRole/{roleId}")
+    @ApiOperation("查询角色与能看到角色的关系关系")
+    public Result<List<Long>> queryAuthRole(@PathVariable("roleId") Long roleId){
+        List<Long> roleIdList = adminRoleAuthService.queryByRoleId(roleId);
+        return Result.ok(roleIdList);
+    }
+
+    @PostMapping(value = "/queryWorkRole")
+    @ApiExplain("查询项目管理角色")
+    public Result<Long> queryWorkRole(@RequestParam("label") Integer label) {
+        Long role = adminRoleService.queryWorkRole(label);
+        return R.ok(role);
+    }
+
+    @PostMapping(value = "/setWorkRole")
+    @ApiExplain("设置项目管理角色")
+    public Result setWorkRole(@RequestBody JSONObject object) {
+        adminRoleService.setWorkRole(object);
+        return R.ok();
+    }
+
+    @PostMapping(value = "/deleteWorkRole")
+    @ApiExplain("删除项目管理角色")
+    public Result deleteWorkRole(@RequestParam("roleId") Long roleId) {
+        adminRoleService.deleteWorkRole(roleId);
+        return R.ok();
+    }
+
+    @PostMapping(value = "/queryProjectRoleList")
+    @ApiOperation("查询项目管理角色列表")
+    public Result<List<AdminRole>> queryProjectRoleList() {
+        List<AdminRole> adminRoles = adminRoleService.queryProjectRoleList();
+        return R.ok(adminRoles);
+    }
+
+    @PostMapping(value = "/queryWorkRoleList")
+    @ApiOperation("查询项目管理角色列表")
+    public Result<List<AdminRole>> queryWorkRoleList() {
+        List<AdminRole> adminRoles = adminRoleService.queryRoleList();
+        return R.ok(adminRoles);
+    }
+
+    @PostMapping(value = "/queryDefaultRole")
+    @ApiOperation("查询默认角色列表")
+    public Result<AdminRole> queryDefaultRole() {
+        AdminRole adminRoles = adminRoleService.queryDefaultRole();
+        return R.ok(adminRoles);
+    }
+
+    @PostMapping("/adminRole/queryUserIdByRoleId")
+    @ApiExplain("根据角色ID查询用户列表")
+    public Result<List<Long>> queryUserIdByRoleId(@RequestParam("roleId") Long roleId){
+        List<Long> userIds = adminRoleService.queryUserIdByRoleId(roleId);
+        return R.ok(userIds);
+    }
+
+    @PostMapping(value = "/delUserRole")
+    @ApiExplain("账套员工角色单条删除")
+    public Result delUserRole(@RequestParam("userId") Long userId) {
+        adminRoleService.delUserRole(userId);
+        return R.ok();
+    }
+}
+

+ 74 - 0
admin/src/main/java/com/kakarote/admin/controller/AdminUserApplyController.java

@@ -0,0 +1,74 @@
+package com.kakarote.admin.controller;
+
+
+import com.alibaba.fastjson.JSONObject;
+import com.kakarote.admin.entity.BO.AdminPageApplyBO;
+import com.kakarote.admin.entity.BO.AdminSaveApplyBO;
+import com.kakarote.admin.service.IAdminUserApplyService;
+import com.kakarote.core.common.ParamAspect;
+import com.kakarote.core.common.R;
+import com.kakarote.core.common.Result;
+import com.kakarote.core.entity.BasePage;
+import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiOperation;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.*;
+
+import javax.validation.constraints.NotNull;
+
+/**
+ * <p>
+ * 员工申请加入企业历史表 前端控制器
+ * </p>
+ *
+ * @author zhangzhiwei
+ * @since 2021-11-06
+ */
+@RestController
+@RequestMapping("/adminUserApply")
+@Api(tags = "员工申请加入企业历史表相关接口")
+public class AdminUserApplyController {
+
+    @Autowired
+    private IAdminUserApplyService adminUserApplyService;
+
+
+    @ApiOperation("新增员工申请加入企业历史表")
+    @PostMapping("/addUserApply")
+    @ParamAspect
+    public Result addUserApply(@RequestBody AdminSaveApplyBO applyBO) {
+        adminUserApplyService.addUserApply(applyBO);
+        return R.ok();
+    }
+
+    @ApiOperation("查询员工申请列表")
+    @PostMapping("/queryPageByStatus")
+    public Result<BasePage<JSONObject>> queryPageByStatus(@RequestBody AdminPageApplyBO applyBO) {
+        BasePage<JSONObject> page = adminUserApplyService.queryPageByStatus(applyBO);
+        return R.ok(page);
+    }
+
+    @ApiOperation("审核")
+    @PostMapping("/checkUserApply")
+    public Result checkUserApply(@RequestBody AdminSaveApplyBO applyBO) {
+        adminUserApplyService.checkUserApply(applyBO);
+        return R.ok();
+    }
+
+    @ApiOperation("删除")
+    @PostMapping("/deleteUserApply")
+    public Result deleteUserApply(@RequestBody AdminSaveApplyBO applyBO) {
+        adminUserApplyService.deleteUserApply(applyBO);
+        return R.ok();
+    }
+
+    @ApiOperation("根据员工id,获取员工名称和公司名称")
+    @PostMapping("/queryJsonByUserId")
+    @ParamAspect
+    public Result<JSONObject> queryJsonByUserId(@RequestParam("userId") @NotNull Long userId) {
+      JSONObject json =   adminUserApplyService.queryJsonByUserId(userId);
+        return R.ok(json);
+    }
+
+}
+

+ 454 - 0
admin/src/main/java/com/kakarote/admin/controller/AdminUserController.java

@@ -0,0 +1,454 @@
+package com.kakarote.admin.controller;
+
+
+import cn.hutool.core.bean.BeanUtil;
+import cn.hutool.core.io.FileUtil;
+import cn.hutool.core.io.IoUtil;
+import cn.hutool.core.util.ObjectUtil;
+import cn.hutool.extra.servlet.ServletUtil;
+import com.alibaba.fastjson.JSON;
+import com.alibaba.fastjson.JSONObject;
+import com.alibaba.fastjson.util.TypeUtils;
+import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
+import com.kakarote.admin.common.AdminCodeEnum;
+import com.kakarote.admin.common.log.AdminUserLog;
+import com.kakarote.admin.entity.BO.*;
+import com.kakarote.admin.entity.PO.AdminConfig;
+import com.kakarote.admin.entity.PO.AdminUser;
+import com.kakarote.admin.entity.PO.AdminUserConfig;
+import com.kakarote.admin.entity.VO.AdminOrganizationVO;
+import com.kakarote.admin.entity.VO.AdminSuperUserVo;
+import com.kakarote.admin.entity.VO.AdminUserVO;
+import com.kakarote.admin.entity.VO.HrmSimpleUserVO;
+import com.kakarote.admin.service.*;
+import com.kakarote.core.common.*;
+import com.kakarote.core.common.log.BehaviorEnum;
+import com.kakarote.core.common.log.SysLog;
+import com.kakarote.core.common.log.SysLogHandler;
+import com.kakarote.core.entity.BasePage;
+import com.kakarote.core.entity.UserInfo;
+import com.kakarote.core.exception.NoLoginException;
+import com.kakarote.core.feign.admin.entity.SimpleUser;
+import com.kakarote.core.feign.email.EmailService;
+import com.kakarote.core.servlet.ApplicationContextHolder;
+import com.kakarote.core.servlet.upload.UploadEntity;
+import com.kakarote.core.utils.UserCacheUtil;
+import com.kakarote.core.utils.UserUtil;
+import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiOperation;
+import lombok.extern.slf4j.Slf4j;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.validation.annotation.Validated;
+import org.springframework.web.bind.annotation.*;
+import org.springframework.web.multipart.MultipartFile;
+
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+import javax.validation.constraints.NotNull;
+import java.io.BufferedInputStream;
+import java.io.File;
+import java.io.IOException;
+import java.util.*;
+import java.util.stream.Collectors;
+
+/**
+ * <p>
+ * 用户表 前端控制器
+ * </p>
+ *
+ * @author zhangzhiwei
+ * @since 2020-04-27
+ */
+@RestController
+@RequestMapping("/adminUser")
+@Api(tags = "员工管理相关接口")
+@Slf4j
+@SysLog(subModel = SubModelType.ADMIN_STAFF_MANAGEMENT,logClass = AdminUserLog.class)
+public class AdminUserController {
+
+    @Autowired
+    private IAdminUserService adminUserService;
+
+    @Autowired
+    private IAdminUserConfigService adminUserConfigService;
+
+    @Autowired
+    private IAdminFileService adminFileService;
+
+    @RequestMapping("/findByUsername")
+    @ApiOperation(value = "通过name查询用户", httpMethod = "POST")
+    public Result<List<Map<String, Object>>> findByUsername(String username, HttpServletRequest request) {
+        List<Map<String, Object>> userInfoList = adminUserService.findByUsername(username, request);
+        return Result.ok(userInfoList);
+    }
+
+    @RequestMapping("/queryUserNumInfo")
+    @ApiOperation(value = "通过name查询用户", httpMethod = "POST")
+    public Result<List<Map<String, Object>>> queryUserNumInfo(String username, HttpServletRequest request) {
+        List<Map<String, Object>> userInfoList = adminUserService.findByUsername(username, request);
+        return Result.ok(userInfoList);
+    }
+
+    @ApiOperation("通过条件分页查询员工列表")
+    @PostMapping("/queryUserList")
+    public Result<BasePage<AdminUserVO>> queryUserList(@RequestBody AdminUserBO adminUserBO) {
+        return R.ok(adminUserService.queryUserList(adminUserBO));
+    }
+
+    @ApiOperation("查询员工状态人数")
+    @PostMapping("/countNumOfUser")
+    public Result<JSONObject> countUserByLabel() {
+        return R.ok(adminUserService.countUserByLabel());
+    }
+
+    @ApiExplain("通过条件分页查询员工列表")
+    @PostMapping("/queryAllUserList")
+    public Result<List<Long>> queryAllUserList(@RequestParam(value = "type",required = false) Integer type) {
+        LambdaQueryWrapper<AdminUser> queryWrapper = new LambdaQueryWrapper<>();
+        queryWrapper.select(AdminUser::getUserId);
+        /* type=2代表不查询禁用员工 */
+        if (Objects.equals(2,type)) {
+            queryWrapper.ne(AdminUser::getStatus,0);
+        }
+        return R.ok(adminUserService.listObjs(queryWrapper, TypeUtils::castToLong));
+    }
+
+    @ApiExplain("通过条件分页查询员工列表")
+    @PostMapping("/queryAllUserInfoList")
+    public Result<List<UserInfo>> queryAllUserInfoList() {
+        List<UserInfo> userInfoList = adminUserService.queryAllUserInfoList();
+        return R.ok(userInfoList);
+    }
+
+    @PostMapping("/setUser")
+    @ApiOperation("修改用户")
+    public Result setUser(@RequestBody AdminUserVO adminUserVO) {
+        adminUserService.setUser(adminUserVO);
+        return R.ok();
+    }
+
+    @PostMapping("/setUserDept")
+    @ApiOperation("批量修改用户部门")
+    public Result setUserDept(@RequestBody AdminUserBO adminUserBO) {
+        adminUserService.setUserDept(adminUserBO);
+        return R.ok();
+    }
+
+    @PostMapping("/addUser")
+    @ApiOperation("新增用户")
+    @SysLogHandler(behavior = BehaviorEnum.SAVE,object = "#adminUserVO.realname",detail = "'新增了员工:'+#adminUserVO.realname")
+    public Result addUser(@RequestBody AdminUserVO adminUserVO) {
+        adminUserService.addUser(adminUserVO);
+        return R.ok();
+    }
+
+    @PostMapping("/usernameEdit")
+    @ApiOperation("重置登录账号")
+    @SysLogHandler(behavior = BehaviorEnum.UPDATE)
+    public Result<Integer> usernameEdit(@RequestParam("id") Long id, @RequestParam("username") String username, @RequestParam("password") String password) {
+        Integer integer = adminUserService.usernameEdit(id, username, password);
+        return R.ok(integer);
+    }
+
+    @PostMapping("/excelImport")
+    @ApiOperation("excel导入员工")
+    @SysLogHandler(behavior = BehaviorEnum.EXCEL_IMPORT,object = "excel导入员工",detail = "excel导入员工")
+    public Result<JSONObject> excelImport(@RequestParam("file") MultipartFile file) {
+        JSONObject object = adminUserService.excelImport(file);
+        return R.ok(object);
+    }
+
+    @PostMapping("/downloadExcel")
+    @ApiOperation("下载导入模板")
+    public void downloadExcel(HttpServletResponse response) throws IOException {
+        adminUserService.downloadExcel(response);
+    }
+
+    @PostMapping("/downExcel")
+    @ApiOperation("excel下载错误数据")
+    public void downExcel(@RequestParam("token") String token, HttpServletResponse response) {
+        String path = FileUtil.getTmpDirPath() + "/" + token;
+        if (FileUtil.exist(path)) {
+            File file = FileUtil.file(path);
+            final String fileName = file.getName();
+            final String contentType = ObjectUtil.defaultIfNull(FileUtil.getMimeType(fileName), "application/octet-stream");
+            BufferedInputStream in = null;
+            try {
+                in = FileUtil.getInputStream(file);
+                ServletUtil.write(response, in, contentType, "import_error.xls");
+            } finally {
+                IoUtil.close(in);
+            }
+            FileUtil.del(path);
+        }
+    }
+
+    @PostMapping("/hrmAddUser")
+    @ApiOperation("从人力资源添加员工")
+    public Result hrmAddUser(@RequestBody HrmAddUserBO hrmAddUserBO) {
+        adminUserService.hrmAddUser(hrmAddUserBO);
+        return R.ok();
+    }
+
+    @PostMapping("/setUserStatus")
+    @ApiOperation("禁用启用")
+    @SysLogHandler(behavior = BehaviorEnum.UPDATE)
+    public Result setUserStatus(@RequestBody AdminUserStatusBO adminUserStatusBO) {
+        adminUserService.setUserStatus(adminUserStatusBO);
+        return R.ok();
+    }
+
+//    @PostMapping("/activateUser")
+//    @ApiOperation("激活账号")
+//    @SysLogHandler(behavior = BehaviorEnum.UPDATE)
+//    public Result activateUser(@RequestBody AdminUserStatusBO adminUserStatusBO) {
+//        adminUserService.activateUser(adminUserStatusBO);
+//        return R.ok();
+//    }
+
+    @PostMapping("/resetPassword")
+    @ApiOperation("重置密码")
+    @SysLogHandler(behavior = BehaviorEnum.UPDATE)
+    public Result resetPassword(@RequestBody AdminUserStatusBO adminUserStatusBO) {
+        adminUserService.resetPassword(adminUserStatusBO);
+        return R.ok();
+    }
+
+    @PostMapping("/updateImg")
+    @ApiOperation("修改头像")
+    @SysLogHandler(behavior = BehaviorEnum.UPDATE,object = "修改头像",detail = "修改头像")
+    public Result updateImg(@RequestParam("file") MultipartFile file) throws IOException {
+        UploadEntity img = adminFileService.upload(file, null, "img", "0");
+        AdminUser byId = adminUserService.getById(UserUtil.getUserId());
+        byId.setImg(img.getUrl());
+        adminUserService.updateById(byId);
+        return R.ok();
+    }
+
+    @PostMapping("/updatePassword")
+    @ApiOperation("修改登录密码")
+    @SysLogHandler(behavior = BehaviorEnum.UPDATE,object = "修改登录密码",detail = "修改登录密码")
+    public Result updatePassword(@RequestParam("oldPwd") String oldPass, @RequestParam("newPwd") String newPass) {
+        AdminUser adminUser = adminUserService.getById(UserUtil.getUserId());
+        if (!UserUtil.verify(adminUser.getUsername() + oldPass, adminUser.getSalt(), adminUser.getPassword())) {
+            return R.error(AdminCodeEnum.ADMIN_PASSWORD_ERROR);
+        }
+        adminUser.setPassword(newPass);
+        return updateUser(adminUser);
+    }
+
+    @PostMapping("/updateUser")
+    @ApiOperation("修改用户信息")
+    public Result updateUser(@RequestBody AdminUser adminUser) {
+        adminUserService.updateUser(adminUser);
+        return R.ok();
+    }
+
+    @Autowired
+    private IAdminDeptService deptService;
+
+    @PostMapping("/queryLoginUser")
+    @ApiOperation("查询当前登录用户")
+    public Result<AdminUserVO> queryLoginUser(HttpServletRequest request, HttpServletResponse response) {
+        String name = "readNotice";
+        AdminUser user = adminUserService.getById(UserUtil.getUserId());
+        if (user == null) {
+            throw new NoLoginException();
+        }
+        AdminSuperUserVo adminUser = BeanUtil.copyProperties(user, AdminSuperUserVo.class);
+        adminUser.setIsAdmin(UserUtil.isAdmin());
+        AdminUserConfig userConfig = adminUserConfigService.queryUserConfigByName(name);
+        adminUser.setIsReadNotice(userConfig != null ? userConfig.getStatus() : 0);
+        adminUser.setPassword(null);
+        String deptName = deptService.getNameByDeptId(adminUser.getDeptId());
+        adminUser.setDeptName(deptName);
+        adminUser.setParentName(UserCacheUtil.getUserName(adminUser.getParentId()));
+        AdminConfig config = ApplicationContextHolder.getBean(IAdminConfigService.class).queryConfigByName("email");
+        if (config != null && config.getStatus() == 1) {
+            Integer data = ApplicationContextHolder.getBean(EmailService.class).getEmailId(adminUser.getUserId()).getData();
+            adminUser.setEmailId(data);
+        }
+        AdminUserConfig userConfigByName = adminUserConfigService.queryUserConfigByName("InitUserConfig");
+        if(userConfigByName != null){
+            adminUser.setServerUserInfo(JSON.parseObject(userConfigByName.getValue()));
+        }
+        return R.ok(adminUser);
+    }
+
+    @RequestMapping("/queryUserRoleIds")
+    @ApiExplain("查询用户角色列表")
+    public Result<List<Long>> queryUserRoleIds(@RequestParam("userId") @NotNull Long userId) {
+        return R.ok(adminUserService.queryUserRoleIds(userId));
+    }
+
+    @RequestMapping("/queryOrganizationInfo")
+    @ApiExplain("查询组织架构下员工信息")
+    public Result<AdminOrganizationVO> queryOrganizationInfo() {
+        return R.ok(adminUserService.queryOrganizationInfo());
+    }
+
+    @RequestMapping("/queryListName")
+    @ApiExplain("查询通讯录")
+    public Result queryListName(@RequestBody UserBookBO userBookBO) {
+        return R.ok(adminUserService.queryListName(userBookBO));
+    }
+
+    @RequestMapping("/attention")
+    @ApiExplain("切换关注状态")
+    public Result attention(@RequestParam("userId") Long userId) {
+        adminUserService.attention(userId);
+        return R.ok();
+    }
+
+    @RequestMapping("/queryChildUserId")
+    @ApiExplain("根据用户ID下的子用户")
+    public Result<List<Long>> queryChildUserId(@NotNull Long userId) {
+        List<Long> longList = adminUserService.queryChildUserId(userId);
+        return R.ok(longList);
+    }
+
+    @RequestMapping("/queryUserInfo")
+    @ApiOperation("查询用户信息")
+    public Result<AdminUser> queryUserInfo(@RequestParam("userId") Long userId) {
+        AdminUser byId = adminUserService.getById(userId);
+        String nameByDeptId = ApplicationContextHolder.getBean(IAdminDeptService.class).getNameByDeptId(byId.getDeptId());
+        byId.setDeptName(nameByDeptId);
+        byId.setSalt(null);
+        byId.setPassword(null);
+        return R.ok(byId);
+    }
+
+    @RequestMapping("/queryInfoByUserId")
+    @ApiExplain("根据用户ID获取用户")
+    public Result<UserInfo> queryInfoByUserId(@NotNull Long userId) {
+        AdminUser byId = adminUserService.getById(userId);
+        UserInfo userInfo = null;
+        if (byId != null) {
+            userInfo = BeanUtil.copyProperties(byId, UserInfo.class);
+            if(byId.getDeptId() != null) {
+                String nameByDeptId = UserCacheUtil.getDeptName(byId.getDeptId());
+                userInfo.setDeptName(nameByDeptId);
+            }
+            userInfo.setRoles(adminUserService.queryUserRoleIds(userInfo.getUserId()));
+        }
+        return R.ok(userInfo);
+    }
+
+    @PostMapping("/queryNormalUserByIds")
+    @ApiExplain("根据用户ID获取正常用户")
+    public Result<List<Long>> queryNormalUserByIds(@RequestBody List<Long> ids) {
+        return R.ok(adminUserService.queryNormalUserByIds(ids));
+    }
+
+
+    @PostMapping("/queryUserById")
+    @ApiExplain("根据用户ID获取用户")
+    public Result<SimpleUser> queryUserById(@RequestParam("userId") Long userId) {
+        AdminUser adminUser = adminUserService.getById(userId);
+        if(adminUser != null) {
+            adminUser.setDeptName(deptService.getNameByDeptId(adminUser.getDeptId()));
+        }
+        return R.ok(BeanUtil.copyProperties(adminUser, SimpleUser.class));
+    }
+
+    @PostMapping("/queryUserByDeptIds")
+    @ApiExplain("根据部门ID获取用户ids")
+    public Result<List<Long>> queryUserByDeptIds(@RequestBody List<Long> ids) {
+        List<Long> userIds = adminUserService.queryUserByDeptIds(ids);
+        return R.ok(userIds);
+    }
+
+    @PostMapping("/readNotice")
+    @ApiOperation("设置更新日志为已读")
+    public Result readNotice() {
+        Long userId = UserUtil.getUserId();
+        String name = "readNotice";
+        Integer count = adminUserConfigService.lambdaQuery().eq(AdminUserConfig::getUserId, userId).eq(AdminUserConfig::getName, name).count();
+        if (count > 1) {
+            adminUserConfigService.lambdaUpdate().set(AdminUserConfig::getStatus, 1).eq(AdminUserConfig::getUserId, userId).eq(AdminUserConfig::getName, name).update();
+        } else {
+            AdminUserConfig adminUserConfig = new AdminUserConfig();
+            adminUserConfig.setValue("");
+            adminUserConfig.setName(name);
+            adminUserConfig.setUserId(userId);
+            adminUserConfig.setStatus(1);
+            adminUserConfig.setDescription("升级日志阅读状态");
+            adminUserConfigService.save(adminUserConfig);
+        }
+        return R.ok();
+    }
+
+
+    @PostMapping("/queryAuthUserList")
+    @ApiOperation("查询权限下用户")
+    public Result<List<SimpleUser>> queryAuthUserList() {
+        List<SimpleUser> userList = new ArrayList<>();
+        if (UserUtil.isAdmin()) {
+            userList.addAll(adminUserService.list().stream().map(user -> BeanUtil.copyProperties(user, SimpleUser.class)).collect(Collectors.toList()));
+        } else {
+            List<Long> childUserId = adminUserService.queryChildUserId(UserUtil.getUserId());
+            userList.addAll(adminUserService.queryUserByIds(childUserId));
+        }
+        return R.ok(userList);
+    }
+
+    @PostMapping("/queryDeptUserList/{deptId}")
+    @ApiOperation("查询部门用户列表(表单使用)")
+    public Result<DeptUserListVO> queryDeptUserList(@PathVariable Long deptId) {
+        DeptUserListVO deptUserListVO = adminUserService.queryDeptUserList(deptId,true);
+        return Result.ok(deptUserListVO);
+    }
+
+    @PostMapping("/queryDeptUserByExamine/{deptId}")
+    @ApiOperation("查询部门用户列表(审批使用)")
+    public Result<DeptUserListVO> queryDeptUserByExamine(@PathVariable Long deptId) {
+        DeptUserListVO deptUserListVO = adminUserService.queryDeptUserList(deptId,false);
+        return Result.ok(deptUserListVO);
+    }
+
+    @PostMapping("/queryDeptUserListByHrm")
+    @ApiOperation("查询部门用户列表(hrm添加员工使用)")
+    public Result<Set<HrmSimpleUserVO>> queryDeptUserListByHrm(@RequestBody DeptUserListByHrmBO deptUserListByHrmBO) {
+        Set<HrmSimpleUserVO> userList = adminUserService.queryDeptUserListByHrm(deptUserListByHrmBO);
+        return Result.ok(userList);
+    }
+
+    @PostMapping("/queryUserIdByRealName")
+    @ApiOperation("查询用户id根据真实姓名")
+    public Result<List<Long>> queryUserIdByRealName(@RequestParam("realNames") List<String> realNames) {
+        List<Long> userIdList = adminUserService.queryUserIdByRealName(realNames);
+        return Result.ok(userIdList);
+    }
+
+    @PostMapping("/queryLoginUserInfo")
+    @ApiExplain("模拟查询登陆用户信息")
+    public Result<UserInfo> queryLoginUserInfo(@RequestParam("userId") Long userId) {
+        UserInfo userInfo = adminUserService.queryLoginUserInfo(userId);
+        return Result.ok(userInfo);
+    }
+
+    @PostMapping("/querySystemStatus")
+    @ApiOperation("查询当前系统初始状态")
+    @ParamAspect
+    public Result<Integer> querySystemStatus() {
+        Integer status = adminUserService.querySystemStatus();
+        return R.ok(status);
+    }
+
+    @PostMapping("/initUser")
+    @ApiOperation("初始化系统用户")
+    @ParamAspect
+    public Result initUser(@Validated @RequestBody SystemUserBO systemUserBO){
+        adminUserService.initUser(systemUserBO);
+        return R.ok();
+    }
+
+
+    @PostMapping("/queryUserIdByUserName")
+    @ApiExplain("查询用户id通过用户名")
+    public Result<Long> queryUserIdByUserName(@RequestParam("userName")String userName){
+        Long userId = adminUserService.lambdaQuery().select(AdminUser::getUserId).eq(AdminUser::getUsername, userName).oneOpt().map(AdminUser::getUserId).orElse(0L);
+        return Result.ok(userId);
+    }
+}
+

+ 38 - 0
admin/src/main/java/com/kakarote/admin/controller/AdminUserHisTableController.java

@@ -0,0 +1,38 @@
+package com.kakarote.admin.controller;
+
+import com.kakarote.admin.service.IAdminUserHisTableService;
+import com.kakarote.core.common.Result;
+import com.kakarote.core.feign.admin.entity.CallUser;
+import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiOperation;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.PostMapping;
+import org.springframework.web.bind.annotation.RequestBody;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RestController;
+
+/**
+ * @author Ian
+ * @date 2020/8/28
+ */
+@RestController
+@Api(tags = "授权坐席相关接口")
+@RequestMapping("/adminUserHisTable")
+public class AdminUserHisTableController {
+
+    @Autowired
+    private IAdminUserHisTableService adminUserHisTableService;
+
+    @PostMapping("/authorize")
+    @ApiOperation("员工坐席授权")
+    public Result<Boolean> authorize(@RequestBody CallUser callUser){
+        return Result.ok(adminUserHisTableService.authorize(callUser.getUserIds(),callUser.getState(),callUser.getHisUse()));
+    }
+
+    @PostMapping("/checkAuth")
+    @ApiOperation("判断用户是否为坐席")
+    public Result<Integer> checkAuth() {
+        return Result.ok(adminUserHisTableService.checkAuth());
+    }
+
+}

+ 47 - 0
admin/src/main/java/com/kakarote/admin/entity/BO/AdminCloudBO.java

@@ -0,0 +1,47 @@
+package com.kakarote.admin.entity.BO;
+
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+
+import javax.validation.constraints.NotNull;
+import java.util.Collections;
+import java.util.List;
+
+/**
+ * @author zhangzhiwei
+ * 云平台注册BO
+ */
+@Data
+@ApiModel("云平台注册BO")
+public class AdminCloudBO {
+
+    @ApiModelProperty("注册手机号")
+    @NotNull(message = "手机号或密码不可为空!")
+    private String phone;
+
+    @ApiModelProperty("密码")
+    @NotNull(message = "手机号或密码不可为空!")
+    private String password;
+
+    @ApiModelProperty("短信验证码")
+    private String smsCode;
+
+    @ApiModelProperty("企业名称")
+    @NotNull(message = "企业名称不能为空!")
+    private String companyName;
+
+    @ApiModelProperty("来源")
+    private String source;
+
+    @ApiModelProperty("优惠码")
+    private String discount;
+
+    @ApiModelProperty("姓名")
+    private String realname;
+
+    @ApiModelProperty("开通的应用列表")
+    private List<String> authList = Collections.emptyList();
+
+
+}

+ 33 - 0
admin/src/main/java/com/kakarote/admin/entity/BO/AdminCompanyBO.java

@@ -0,0 +1,33 @@
+package com.kakarote.admin.entity.BO;
+
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+import lombok.ToString;
+
+import javax.validation.constraints.NotEmpty;
+
+/**
+ * @author zhangzhiwei
+ * BO业务逻辑代码
+ */
+@Data
+@ToString
+@ApiModel(value="AdminCompany对象", description="云平台公司配置表")
+public class AdminCompanyBO {
+
+    @ApiModelProperty(value = "企业名称",required = true,example = "良心企业")
+    @NotEmpty
+    private String companyName;
+
+    @ApiModelProperty(value = "企业LOGO", example = "/logo")
+    private String companyLogo;
+
+    @ApiModelProperty(value = "企业登录LOGO", example = "/logo")
+    private String companyLoginLogo;
+
+
+    private String endTime;
+
+    private Integer endDay;
+}

+ 23 - 0
admin/src/main/java/com/kakarote/admin/entity/BO/AdminDeleteByBatchIdBO.java

@@ -0,0 +1,23 @@
+package com.kakarote.admin.entity.BO;
+
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Getter;
+import lombok.Setter;
+
+@Getter
+@Setter
+public class AdminDeleteByBatchIdBO {
+
+    private String batchId;
+
+    @ApiModelProperty("1 附件 2 图片")
+    private Integer type;
+
+    @Override
+    public String toString() {
+        return "AdminDeleteByBatchIdBO{" +
+                "batchId='" + batchId + '\'' +
+                ", type=" + type +
+                '}';
+    }
+}

+ 33 - 0
admin/src/main/java/com/kakarote/admin/entity/BO/AdminDeptBO.java

@@ -0,0 +1,33 @@
+package com.kakarote.admin.entity.BO;
+
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+import lombok.ToString;
+
+import javax.validation.constraints.NotNull;
+import javax.validation.constraints.Size;
+
+/**
+ * @author zhangzhiwei
+ */
+@Data
+@ToString
+@ApiModel(value="部门编辑对象", description="部门对象")
+public class AdminDeptBO {
+
+    @ApiModelProperty(value = "部门ID")
+    private Long deptId;
+
+    @ApiModelProperty(value = "上级部门ID,0为最上级")
+    @NotNull
+    private Long parentId;
+
+    @ApiModelProperty(value = "部门名称")
+    @NotNull
+    @Size(max = 20)
+    private String name;
+
+    @ApiModelProperty(value = "部门负责人")
+    private Long ownerUserId;
+}

+ 22 - 0
admin/src/main/java/com/kakarote/admin/entity/BO/AdminDeptQueryBO.java

@@ -0,0 +1,22 @@
+package com.kakarote.admin.entity.BO;
+
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import io.swagger.annotations.ApiParam;
+import lombok.Data;
+import lombok.ToString;
+
+/**
+ * @author zhangzhiwei
+ */
+@Data
+@ToString
+@ApiModel(value="部门编辑对象", description="部门对象")
+public class AdminDeptQueryBO {
+
+    @ApiParam(name = "id", value = "父级ID", required = true, example = "0")
+    private Long id;
+
+    @ApiModelProperty(value = "类型")
+    private String type;
+}

+ 24 - 0
admin/src/main/java/com/kakarote/admin/entity/BO/AdminInitDataBO.java

@@ -0,0 +1,24 @@
+package com.kakarote.admin.entity.BO;
+
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+
+import java.util.List;
+
+/**
+ * @author JiaS
+ * @date 2020/11/17
+ */
+@Data
+public class AdminInitDataBO {
+
+    @ApiModelProperty("密码")
+    private String password;
+
+    @ApiModelProperty("临时码")
+    private String temporaryCode;
+
+    @ApiModelProperty("模块")
+    private List<String> modules;
+
+}

+ 24 - 0
admin/src/main/java/com/kakarote/admin/entity/BO/AdminLanguagePackBO.java

@@ -0,0 +1,24 @@
+package com.kakarote.admin.entity.BO;
+
+import com.kakarote.core.entity.PageEntity;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+import lombok.ToString;
+
+/**
+ * @author zmj
+ * 语言包服务
+ */
+@EqualsAndHashCode(callSuper = true)
+@Data
+@ToString
+public class AdminLanguagePackBO extends PageEntity {
+
+    @ApiModelProperty(value = "语言包ID")
+    private Integer languagePackId;
+
+    @ApiModelProperty("语言包名称")
+    private String languagePackName;
+
+}

+ 25 - 0
admin/src/main/java/com/kakarote/admin/entity/BO/AdminMessageQueryBO.java

@@ -0,0 +1,25 @@
+package com.kakarote.admin.entity.BO;
+
+import com.kakarote.core.entity.PageEntity;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+
+@EqualsAndHashCode(callSuper = true)
+@Data
+@ApiModel("消息列表查询对象")
+public class AdminMessageQueryBO extends PageEntity {
+
+    @ApiModelProperty("是否已读")
+    private Integer isRead;
+
+    @ApiModelProperty("label")
+    private Integer label;
+
+    @ApiModelProperty("用户ID")
+    private Long userId;
+
+    @ApiModelProperty("type")
+    private Integer type;
+}

+ 22 - 0
admin/src/main/java/com/kakarote/admin/entity/BO/AdminPageApplyBO.java

@@ -0,0 +1,22 @@
+package com.kakarote.admin.entity.BO;
+
+import com.kakarote.core.entity.PageEntity;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+
+/**
+ * @ClassName: AdminPageApplyBO
+ * @Author: Blue
+ * @Description: AdminPageApplyBO
+ * @Date: 2021/11/8 13:19
+ */
+@EqualsAndHashCode(callSuper = true)
+@Data
+@ApiModel("查询员工申请列表查询对象")
+public class AdminPageApplyBO extends PageEntity {
+
+    @ApiModelProperty(value = "1.待审核邀请 2.已审核邀请")
+    private Integer type;
+}

+ 23 - 0
admin/src/main/java/com/kakarote/admin/entity/BO/AdminPayCreateOrderBO.java

@@ -0,0 +1,23 @@
+package com.kakarote.admin.entity.BO;
+
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+
+import java.util.List;
+
+@Data
+public class AdminPayCreateOrderBO {
+
+    @ApiModelProperty("订单id")
+    private Long orderId;
+
+    @ApiModelProperty("商品id")
+    private Long goodsId;
+
+    @ApiModelProperty("购买年份数,工商查询则是数量")
+    private Integer year;
+
+    @ApiModelProperty(value = "购买的系统列表")
+    List<String> key;
+
+}

+ 14 - 0
admin/src/main/java/com/kakarote/admin/entity/BO/AdminPayOrderListBO.java

@@ -0,0 +1,14 @@
+package com.kakarote.admin.entity.BO;
+
+import com.kakarote.core.entity.PageEntity;
+import io.swagger.annotations.ApiModel;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+
+@EqualsAndHashCode(callSuper = true)
+@Data
+@ApiModel("支付订单用户")
+public class AdminPayOrderListBO extends PageEntity {
+
+
+}

+ 24 - 0
admin/src/main/java/com/kakarote/admin/entity/BO/AdminRoleBO.java

@@ -0,0 +1,24 @@
+package com.kakarote.admin.entity.BO;
+
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+
+import java.util.List;
+
+/**
+ * @author JiaS
+ * @date 2020/11/21
+ */
+@Data
+public class AdminRoleBO {
+
+    @ApiModelProperty("人员id列表")
+    private List<Long> userIds;
+
+    @ApiModelProperty("部门id列表")
+    private List<Long> deptIds;
+
+    @ApiModelProperty("权限id列表")
+    private List<Long> roleIds;
+
+}

+ 43 - 0
admin/src/main/java/com/kakarote/admin/entity/BO/AdminSaveApplyBO.java

@@ -0,0 +1,43 @@
+package com.kakarote.admin.entity.BO;
+
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+import lombok.ToString;
+
+import java.util.List;
+
+/**
+ * @ClassName: AdminSaveApplyBO
+ * @Author: Blue
+ * @Description: AdminSaveApplyBO
+ * @Date: 2021/11/8 10:55
+ */
+@Data
+@ToString
+@EqualsAndHashCode(callSuper = false)
+@ApiModel("员工申请加入公司记录表")
+public class AdminSaveApplyBO {
+
+    @ApiModelProperty(value = "主键ID")
+    private Integer id;
+
+    @ApiModelProperty(value = "主键IDs")
+    private List<Integer> ids;
+
+    @ApiModelProperty(value = "手机号")
+    private String phone;
+
+    @ApiModelProperty(value = "名称")
+    private String realname;
+
+    @ApiModelProperty(value = "密码")
+    private String password;
+
+    @ApiModelProperty(value = "邀请ID")
+    private Long inviteUserId;
+
+    @ApiModelProperty(value = "1 审核通过 2 未审核 3 删除 4.审核拒绝")
+    private Integer status;
+}

+ 51 - 0
admin/src/main/java/com/kakarote/admin/entity/BO/AdminUserBO.java

@@ -0,0 +1,51 @@
+package com.kakarote.admin.entity.BO;
+
+import com.kakarote.core.entity.PageEntity;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+import lombok.ToString;
+
+import java.util.ArrayList;
+import java.util.List;
+
+/**
+ * @author zhangzhiwe
+ * 用户列表业务对象
+ */
+@Data
+@ToString
+@EqualsAndHashCode(callSuper = false)
+@ApiModel("用户列表查询")
+public class AdminUserBO extends PageEntity {
+
+    @ApiModelProperty(value = "类型", required = true, allowableValues = "0,1,2,3,4", example = "0")
+    private Integer label;
+
+    @ApiModelProperty("昵称")
+    private String realname;
+
+    @ApiModelProperty("昵称")
+    private Integer status;
+
+    @ApiModelProperty("角色ID")
+    private Long roleId;
+
+    @ApiModelProperty("部门ID")
+    private Long deptId;
+
+    @ApiModelProperty("部门ID列表")
+    private List<Long> deptIdList = new ArrayList<>();
+
+
+    @ApiModelProperty(value = "用户列表")
+    private List<Long> userIdList;
+
+    private Long deptOwnerUserId;
+
+    private Long userId;
+
+    @ApiModelProperty(value = "是否展示子级部门 0不需要 1 需要")
+    private Integer isNeedChild;
+}

+ 24 - 0
admin/src/main/java/com/kakarote/admin/entity/BO/AdminUserRoleBO.java

@@ -0,0 +1,24 @@
+package com.kakarote.admin.entity.BO;
+
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+import lombok.ToString;
+
+import java.util.ArrayList;
+import java.util.List;
+
+/**
+ * @author zhangzhiwe
+ * 账套保存授权员工角色
+ */
+@Data
+@ToString
+@ApiModel("账套保存授权员工角色")
+public class AdminUserRoleBO {
+
+    @ApiModelProperty("角色员工")
+    private List<FinanceAccountAuthSaveBO>  authSaveBOS = new ArrayList<>();
+
+
+}

+ 28 - 0
admin/src/main/java/com/kakarote/admin/entity/BO/AdminUserStatusBO.java

@@ -0,0 +1,28 @@
+package com.kakarote.admin.entity.BO;
+
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+import lombok.ToString;
+
+import java.util.List;
+
+/**
+ * @author zhangzhiwe
+ * 用户状态修改
+ */
+@Data
+@ToString
+@ApiModel("用户状态修改BO")
+public class AdminUserStatusBO {
+
+    @ApiModelProperty("ids")
+    private List<Long> ids;
+
+    @ApiModelProperty("状态")
+    private Integer status;
+
+    @ApiModelProperty("密码")
+    private String password;
+
+}

+ 23 - 0
admin/src/main/java/com/kakarote/admin/entity/BO/DeptUserListByHrmBO.java

@@ -0,0 +1,23 @@
+package com.kakarote.admin.entity.BO;
+
+import lombok.Getter;
+import lombok.Setter;
+
+import java.util.List;
+
+@Getter
+@Setter
+public class DeptUserListByHrmBO {
+
+    private List<Long> userIdList;
+
+    private List<Long> deptIdList;
+
+    @Override
+    public String toString() {
+        return "DeptUserListByHrmBO{" +
+                "userIdList=" + userIdList +
+                ", deptIdList=" + deptIdList +
+                '}';
+    }
+}

+ 25 - 0
admin/src/main/java/com/kakarote/admin/entity/BO/DeptUserListVO.java

@@ -0,0 +1,25 @@
+package com.kakarote.admin.entity.BO;
+
+import com.kakarote.admin.entity.VO.HrmSimpleUserVO;
+import lombok.Getter;
+import lombok.Setter;
+
+import java.util.List;
+
+@Getter
+@Setter
+public class DeptUserListVO {
+
+
+    private List<DeptVO> deptList;
+
+    private List<HrmSimpleUserVO> userList;
+
+    @Override
+    public String toString() {
+        return "DeptUserListVO{" +
+                "deptList=" + deptList +
+                ", userList=" + userList +
+                '}';
+    }
+}

+ 44 - 0
admin/src/main/java/com/kakarote/admin/entity/BO/DeptVO.java

@@ -0,0 +1,44 @@
+package com.kakarote.admin.entity.BO;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Getter;
+import lombok.Setter;
+
+@Getter
+@Setter
+public class DeptVO {
+
+
+    @ApiModelProperty(value = "部门id")
+    private Long deptId;
+
+    @ApiModelProperty(value = "父级ID 顶级部门为0")
+    private Long parentId;
+
+    @ApiModelProperty(value = "部门名称")
+    private String name;
+
+    @ApiModelProperty("当前部门在职人数")
+    private Integer currentNum;
+
+    @ApiModelProperty("在职人数")
+    private Integer allNum;
+
+    @ApiModelProperty("是否有下级部门 0 否 1 是")
+    private Integer hasChildren;
+
+    @ApiModelProperty(value = "部门负责人")
+    private Long ownerUserId;
+
+    @Override
+    public String toString() {
+        return "DeptVO{" +
+                "deptId=" + deptId +
+                ", parentId=" + parentId +
+                ", name='" + name + '\'' +
+                ", currentNum=" + currentNum +
+                ", allNum=" + allNum +
+                ", hasChildren=" + hasChildren +
+                ", ownerUserId=" + ownerUserId +
+                '}';
+    }
+}

+ 29 - 0
admin/src/main/java/com/kakarote/admin/entity/BO/FinanceAccountAuthSaveBO.java

@@ -0,0 +1,29 @@
+package com.kakarote.admin.entity.BO;
+
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+
+import java.util.List;
+
+
+/**
+ * <p>
+ * 账套表
+ * </p>
+ *
+ * @author dsc
+ * @since 2021-08-28
+ */
+@Data
+@ApiModel("账套授权保存")
+public class FinanceAccountAuthSaveBO {
+
+
+    @ApiModelProperty(value = "员工id")
+    private Long userId;
+
+    @ApiModelProperty(value = "角色id")
+    private List<Long> roleIdList;
+
+}

+ 38 - 0
admin/src/main/java/com/kakarote/admin/entity/BO/HrmAddUserBO.java

@@ -0,0 +1,38 @@
+package com.kakarote.admin.entity.BO;
+
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Getter;
+import lombok.Setter;
+
+import java.util.List;
+
+@Getter
+@Setter
+public class HrmAddUserBO {
+
+    @ApiModelProperty(value = "密码")
+    private String password;
+
+    @ApiModelProperty(value = "部门ID")
+    private Long deptId;
+
+    @ApiModelProperty("角色id")
+    private String roleId;
+
+    @ApiModelProperty(value = "上级ID")
+    private Long parentId;
+
+    @ApiModelProperty("员工id")
+    private List<Long> employeeIds;
+
+    @Override
+    public String toString() {
+        return "HrmAddUserBO{" +
+                "password='" + password + '\'' +
+                ", deptId=" + deptId +
+                ", roleId='" + roleId + '\'' +
+                ", parentId=" + parentId +
+                ", employeeIds=" + employeeIds +
+                '}';
+    }
+}

+ 29 - 0
admin/src/main/java/com/kakarote/admin/entity/BO/LogWelcomeSpeechBO.java

@@ -0,0 +1,29 @@
+package com.kakarote.admin.entity.BO;
+
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+import lombok.ToString;
+
+import javax.validation.constraints.NotNull;
+import javax.validation.constraints.Size;
+
+/**
+ * @author zhangzhiwei
+ * 模块设置VO
+ */
+@ToString
+@Data
+@ApiModel("日志欢迎语对象")
+public class LogWelcomeSpeechBO {
+
+    @ApiModelProperty(value = "设置ID", required = true)
+    @NotNull
+    private Long settingId;
+
+    @ApiModelProperty(value = "日志欢迎语", required = true)
+    @NotNull
+    @Size(max = 100)
+    private String value;
+
+}

+ 34 - 0
admin/src/main/java/com/kakarote/admin/entity/BO/ModuleSettingBO.java

@@ -0,0 +1,34 @@
+package com.kakarote.admin.entity.BO;
+
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+import lombok.ToString;
+
+import javax.validation.constraints.Max;
+import javax.validation.constraints.Min;
+import javax.validation.constraints.NotNull;
+
+/**
+ * @author zhangzhiwei
+ * 模块设置VO
+ */
+@ToString
+@Data
+@ApiModel("应用管理设置")
+public class ModuleSettingBO {
+
+    @ApiModelProperty(value = "设置ID", required = true)
+    @NotNull
+    private Long settingId;
+
+    @ApiModelProperty(value = "状态 1:启用 0:停用", required = true,allowableValues = "0,1")
+    @NotNull(message = "状态不能为空")
+    @Max(1)
+    @Min(0)
+    private Integer status;
+
+    @ApiModelProperty(value = "名称")
+    private String name;
+
+}

+ 43 - 0
admin/src/main/java/com/kakarote/admin/entity/BO/QuerySysLogBO.java

@@ -0,0 +1,43 @@
+package com.kakarote.admin.entity.BO;
+
+import com.kakarote.core.entity.PageEntity;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Getter;
+import lombok.Setter;
+
+import java.util.List;
+
+@Getter
+@Setter
+public class QuerySysLogBO extends PageEntity {
+
+    @ApiModelProperty("开始时间")
+    private String startTime;
+
+    @ApiModelProperty("结束时间")
+    private String endTime;
+
+    @ApiModelProperty("模块 [admin crm oa work hrm jxc]")
+    private String model;
+
+    @ApiModelProperty("子模块")
+    private List<Integer> subModelLabels;
+
+    @ApiModelProperty("用户id")
+    private List<Long> userIds;
+
+    @ApiModelProperty("类型 1 数据操作日志 2 系统操作日志")
+    private Integer type;
+
+    @Override
+    public String toString() {
+        return "QuerySysLogBO{" +
+                "startTime='" + startTime + '\'' +
+                ", endTime='" + endTime + '\'' +
+                ", model='" + model + '\'' +
+                ", subModelLabels=" + subModelLabels +
+                ", userIds=" + userIds +
+                ", type=" + type +
+                '}';
+    }
+}

+ 24 - 0
admin/src/main/java/com/kakarote/admin/entity/BO/RenameFileBO.java

@@ -0,0 +1,24 @@
+package com.kakarote.admin.entity.BO;
+
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Getter;
+import lombok.Setter;
+
+@Getter
+@Setter
+public class RenameFileBO {
+
+    @ApiModelProperty(value = "附件id")
+    private Long fileId;
+
+    @ApiModelProperty(value = "附件名称")
+    private String name;
+
+    @Override
+    public String toString() {
+        return "RenameFileBO{" +
+                "fileId=" + fileId +
+                ", name='" + name + '\'' +
+                '}';
+    }
+}

+ 27 - 0
admin/src/main/java/com/kakarote/admin/entity/BO/SystemUserBO.java

@@ -0,0 +1,27 @@
+package com.kakarote.admin.entity.BO;
+
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+
+import javax.validation.constraints.NotNull;
+import java.io.Serializable;
+
+/**
+ * 初始话用户BO
+ */
+@Data
+public class SystemUserBO implements Serializable {
+
+    @ApiModelProperty("用户名")
+    @NotNull
+    private String username;
+
+    @ApiModelProperty("凭证")
+    @NotNull
+    private String code;
+
+    @ApiModelProperty("密码")
+    @NotNull
+    private String password;
+}
+

+ 35 - 0
admin/src/main/java/com/kakarote/admin/entity/BO/UserBookBO.java

@@ -0,0 +1,35 @@
+package com.kakarote.admin.entity.BO;
+
+import com.kakarote.core.entity.PageEntity;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+
+/**
+ * @author wyq
+ */
+@EqualsAndHashCode(callSuper = true)
+@Data
+@ApiModel("通讯录查询")
+public class UserBookBO extends PageEntity {
+
+    @ApiModelProperty("搜索关键字")
+    private String search;
+
+    @ApiModelProperty("排列顺序 2倒序 其他是正序")
+    private Integer initial;
+
+    @ApiModelProperty("部门id")
+    private Long deptId;
+
+    @ApiModelProperty(value = "关注状态,0未关注,1已关注")
+    private Integer status;
+
+    @ApiModelProperty(value = "用户ID")
+    private Long userId;
+
+
+    @ApiModelProperty(value = "缩写字母")
+    private String acronym;
+}

+ 26 - 0
admin/src/main/java/com/kakarote/admin/entity/BO/UserInfoRequestBO.java

@@ -0,0 +1,26 @@
+package com.kakarote.admin.entity.BO;
+
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+
+import java.util.List;
+
+/**
+ * @author zjj
+ * @description: 用户信息查询请求
+ * @date 2021/8/19 15:24
+ */
+@Data
+@ApiModel(value = "用户信息查询请求BO", description = "用户信息查询请求BO")
+public class UserInfoRequestBO {
+
+    @ApiModelProperty(value = "用户ID")
+    private List<Long> userIds;
+
+    @ApiModelProperty(value = "部门ID")
+    private List<Long> deptIds;
+
+    @ApiModelProperty(value = "角色ID")
+    private List<Long> roleIds;
+}

+ 57 - 0
admin/src/main/java/com/kakarote/admin/entity/PO/AdminAttention.java

@@ -0,0 +1,57 @@
+package com.kakarote.admin.entity.PO;
+
+import com.baomidou.mybatisplus.annotation.*;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+import lombok.experimental.Accessors;
+
+import java.io.Serializable;
+import java.time.LocalDateTime;
+
+/**
+ * <p>
+ * 通讯录用户关注表
+ * </p>
+ *
+ * @author zhangzhiwei
+ * @since 2020-06-03
+ */
+@Data
+@EqualsAndHashCode(callSuper = false)
+@Accessors(chain = true)
+@TableName("wk_admin_attention")
+@ApiModel(value="AdminAttention对象", description="通讯录用户关注表")
+public class AdminAttention implements Serializable {
+
+    private static final long serialVersionUID=1L;
+
+    @TableId(value = "attention_id",type = IdType.ASSIGN_ID)
+    private Long attentionId;
+
+    @ApiModelProperty(value = "被关注人")
+    private Long beUserId;
+
+    @ApiModelProperty(value = "关注人")
+    private Long attentionUserId;
+
+
+    @ApiModelProperty(value = "创建人ID")
+    @TableField(fill = FieldFill.INSERT)
+    private Long createUserId;
+
+    @ApiModelProperty(value = "修改人ID")
+    @TableField(fill = FieldFill.UPDATE)
+    private Long updateUserId;
+
+    @ApiModelProperty(value = "创建时间")
+    @TableField(fill = FieldFill.INSERT)
+    private LocalDateTime createTime;
+
+    @ApiModelProperty(value = "更新时间")
+    @TableField(fill = FieldFill.UPDATE)
+    private LocalDateTime updateTime;
+
+
+}

+ 64 - 0
admin/src/main/java/com/kakarote/admin/entity/PO/AdminConfig.java

@@ -0,0 +1,64 @@
+package com.kakarote.admin.entity.PO;
+
+import com.baomidou.mybatisplus.annotation.*;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.*;
+import lombok.experimental.Accessors;
+
+import java.io.Serializable;
+import java.time.LocalDateTime;
+
+/**
+ * <p>
+ * 客户规则
+ * </p>
+ *
+ * @author zhangzhiwei
+ * @since 2020-06-03
+ */
+@Data
+@EqualsAndHashCode(callSuper = false)
+@Accessors(chain = true)
+@TableName("wk_admin_config")
+@Builder
+@NoArgsConstructor
+@AllArgsConstructor
+@ApiModel(value="AdminConfig对象", description="客户规则")
+public class AdminConfig implements Serializable {
+
+    private static final long serialVersionUID=1L;
+
+    @TableId(value = "setting_id",type = IdType.ASSIGN_ID)
+    private Long settingId;
+
+    @ApiModelProperty(value = "状态,0:不启用 1 : 启用")
+    private Integer status;
+
+    @ApiModelProperty(value = "设置名称")
+    private String name;
+
+    @ApiModelProperty(value = "值")
+    private String value;
+
+    @ApiModelProperty(value = "描述")
+    private String description;
+
+    @ApiModelProperty(value = "创建人ID")
+    @TableField(fill = FieldFill.INSERT)
+    private Long createUserId;
+
+    @ApiModelProperty(value = "修改人ID")
+    @TableField(fill = FieldFill.UPDATE)
+    private Long updateUserId;
+
+    @ApiModelProperty(value = "创建时间")
+    @TableField(fill = FieldFill.INSERT)
+    private LocalDateTime createTime;
+
+    @ApiModelProperty(value = "更新时间")
+    @TableField(fill = FieldFill.UPDATE)
+    private LocalDateTime updateTime;
+
+
+}

+ 72 - 0
admin/src/main/java/com/kakarote/admin/entity/PO/AdminDept.java

@@ -0,0 +1,72 @@
+package com.kakarote.admin.entity.PO;
+
+import com.baomidou.mybatisplus.annotation.*;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.*;
+import lombok.experimental.Accessors;
+
+import java.io.Serializable;
+import java.time.LocalDateTime;
+
+/**
+ * <p>
+ * 部门表
+ * </p>
+ *
+ * @author zhangzhiwei
+ * @since 2020-06-03
+ */
+@Data
+@EqualsAndHashCode(callSuper = false)
+@Accessors(chain = true)
+@TableName("wk_admin_dept")
+@ApiModel(value="AdminDept对象", description="部门表")
+@Builder
+@NoArgsConstructor
+@AllArgsConstructor
+public class AdminDept implements Serializable {
+
+    private static final long serialVersionUID=1L;
+
+    @TableId(value = "dept_id",type = IdType.ASSIGN_ID)
+    private Long deptId;
+
+    @ApiModelProperty(value = "父级ID 顶级部门为0")
+    private Long parentId;
+
+    @ApiModelProperty(value = "部门名称")
+    private String name;
+
+    @ApiModelProperty(value = "排序 越大越靠后")
+    private Integer num;
+
+    @ApiModelProperty(value = "部门备注")
+    private String remark;
+
+
+    @ApiModelProperty(value = "部门负责人")
+    private Long ownerUserId;
+
+    @ApiModelProperty("当前部门在职人数")
+    @TableField(exist = false)
+    private Integer currentNum;
+
+    @ApiModelProperty(value = "创建人ID")
+    @TableField(fill = FieldFill.INSERT)
+    private Long createUserId;
+
+    @ApiModelProperty(value = "修改人ID")
+    @TableField(fill = FieldFill.UPDATE)
+    private Long updateUserId;
+
+    @ApiModelProperty(value = "创建时间")
+    @TableField(fill = FieldFill.INSERT)
+    private LocalDateTime createTime;
+
+    @ApiModelProperty(value = "更新时间")
+    @TableField(fill = FieldFill.UPDATE)
+    private LocalDateTime updateTime;
+
+
+}

+ 73 - 0
admin/src/main/java/com/kakarote/admin/entity/PO/AdminFile.java

@@ -0,0 +1,73 @@
+package com.kakarote.admin.entity.PO;
+
+import com.baomidou.mybatisplus.annotation.*;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+import lombok.experimental.Accessors;
+
+import java.io.Serializable;
+import java.time.LocalDateTime;
+
+/**
+ * <p>
+ * 附件表
+ * </p>
+ *
+ * @author zhangzhiwei
+ * @since 2020-06-03
+ */
+@Data
+@EqualsAndHashCode(callSuper = false)
+@Accessors(chain = true)
+@TableName("wk_admin_file")
+@ApiModel(value="AdminFile对象", description="附件表")
+public class AdminFile implements Serializable {
+
+    private static final long serialVersionUID=1L;
+
+    @TableId(value = "file_id",type = IdType.ASSIGN_ID)
+    private Long fileId;
+
+    @ApiModelProperty(value = "附件名称")
+    private String name;
+
+    @ApiModelProperty(value = "附件大小(字节)")
+    private Long size;
+
+    @ApiModelProperty(value = "创建人ID")
+    @TableField(fill = FieldFill.INSERT)
+    private Long createUserId;
+
+    @ApiModelProperty(value = "创建时间")
+    @TableField(fill = FieldFill.INSERT)
+    private LocalDateTime createTime;
+
+    @ApiModelProperty(value = "文件真实路径")
+    private String path;
+
+    @ApiModelProperty(value = "文件类型,file,img")
+    private String fileType;
+
+    @ApiModelProperty(value = "1 本地 2 阿里云oss")
+    private Integer type;
+
+    @ApiModelProperty(value = "来源 0 默认 1 admin 2 crm 3 work 4 oa 5 进销存 6 hrm")
+    private Integer source;
+
+    @ApiModelProperty(value = "1 公有访问 0 私有访问")
+    private Integer isPublic;
+
+    @ApiModelProperty(value = "批次id")
+    private String batchId;
+
+    @ApiModelProperty(value = "修改人ID")
+    @TableField(fill = FieldFill.UPDATE)
+    private Long updateUserId;
+
+    @ApiModelProperty(value = "更新时间")
+    @TableField(fill = FieldFill.UPDATE)
+    private LocalDateTime updateTime;
+
+}

+ 55 - 0
admin/src/main/java/com/kakarote/admin/entity/PO/AdminLanguagePack.java

@@ -0,0 +1,55 @@
+package com.kakarote.admin.entity.PO;
+
+import com.baomidou.mybatisplus.annotation.*;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+import lombok.experimental.Accessors;
+
+import java.io.Serializable;
+import java.time.LocalDateTime;
+
+/**
+ * <p>
+ * 语言包表
+ * </p>
+ *
+ * @author zmj
+ * @since 2020-12-05
+ */
+@Data
+@EqualsAndHashCode(callSuper = false)
+@Accessors(chain = true)
+@TableName("wk_admin_language_pack")
+@ApiModel(value="AdminLanguagePack对象", description="语言包表")
+public class AdminLanguagePack implements Serializable {
+
+    private static final long serialVersionUID=1L;
+
+    @ApiModelProperty(value = "语言包id")
+    @TableId(value = "language_pack_id",type = IdType.ASSIGN_ID)
+    private Long languagePackId;
+
+    @ApiModelProperty(value = "语言包名称")
+    private String languagePackName;
+
+    @ApiModelProperty(value = "语言包内容")
+    private String languagePackContext;
+
+    @ApiModelProperty(value = "创建时间")
+    @TableField(fill = FieldFill.INSERT)
+    private LocalDateTime createTime;
+
+    @ApiModelProperty(value = "创建人ID")
+    @TableField(fill = FieldFill.INSERT)
+    private Long createUserId;
+
+    @ApiModelProperty(value = "更新时间")
+    @TableField(fill = FieldFill.UPDATE)
+    private LocalDateTime updateTime;
+
+    @ApiModelProperty(value = "修改人ID")
+    @TableField(fill = FieldFill.UPDATE)
+    private Long updateUserId;
+}

+ 82 - 0
admin/src/main/java/com/kakarote/admin/entity/PO/AdminMenu.java

@@ -0,0 +1,82 @@
+package com.kakarote.admin.entity.PO;
+
+import com.baomidou.mybatisplus.annotation.IdType;
+import com.baomidou.mybatisplus.annotation.TableField;
+import com.baomidou.mybatisplus.annotation.TableId;
+import com.baomidou.mybatisplus.annotation.TableName;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+import lombok.experimental.Accessors;
+
+import java.io.Serializable;
+import java.util.Objects;
+
+/**
+ * <p>
+ * 后台菜单表
+ * </p>
+ *
+ * @author zhangzhiwei
+ * @since 2020-06-03
+ */
+@Data
+@Accessors(chain = true)
+@TableName("wk_admin_menu")
+@ApiModel(value="AdminMenu对象", description="后台菜单表")
+public class AdminMenu implements Serializable {
+
+    private static final long serialVersionUID=1L;
+
+    @ApiModelProperty(value = "菜单ID")
+    @TableId(value = "menu_id",type = IdType.ASSIGN_ID)
+    private Long menuId;
+
+    @ApiModelProperty(value = "上级菜单ID")
+    private Long parentId;
+
+    @ApiModelProperty(value = "菜单名称")
+    private String menuName;
+
+    @ApiModelProperty(value = "权限标识")
+    private String realm;
+
+    @ApiModelProperty(value = "权限URL")
+    private String realmUrl;
+
+    @ApiModelProperty(value = "所属模块")
+    private String realmModule;
+
+    @ApiModelProperty(value = "菜单类型  1目录 2 菜单 3 按钮 4特殊")
+    private Integer menuType;
+
+    @ApiModelProperty(value = "排序(同级有效)")
+    private Integer sort;
+
+    @ApiModelProperty(value = "状态 1 启用 0 禁用")
+    private Integer status;
+
+    @ApiModelProperty(value = "菜单说明")
+    private String remarks;
+
+    @TableField(exist = false)
+    @ApiModelProperty(value = "数据权限")
+    private Integer dataType;
+
+    @Override
+    public boolean equals(Object o) {
+        if (this == o) {
+            return true;
+        }
+        if (o == null || getClass() != o.getClass()) {
+            return false;
+        }
+        AdminMenu adminMenu = (AdminMenu) o;
+        return Objects.equals(menuId, adminMenu.menuId);
+    }
+
+    @Override
+    public int hashCode() {
+        return Objects.hash(menuId);
+    }
+}

+ 90 - 0
admin/src/main/java/com/kakarote/admin/entity/PO/AdminMessage.java

@@ -0,0 +1,90 @@
+package com.kakarote.admin.entity.PO;
+
+import com.baomidou.mybatisplus.annotation.*;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+import lombok.experimental.Accessors;
+
+import java.io.Serializable;
+import java.time.LocalDateTime;
+import java.util.Date;
+
+/**
+ * <p>
+ * 系统消息表
+ * </p>
+ *
+ * @author zhangzhiwei
+ * @since 2020-06-03
+ */
+@Data
+@EqualsAndHashCode(callSuper = false)
+@Accessors(chain = true)
+@TableName("wk_admin_message")
+@ApiModel(value="AdminMessage对象", description="系统消息表")
+public class AdminMessage implements Serializable {
+
+    private static final long serialVersionUID=1L;
+
+    @ApiModelProperty(value = "消息ID")
+    @TableId(value = "message_id",type = IdType.ASSIGN_ID)
+    private Long messageId;
+
+    @ApiModelProperty(value = "消息标题")
+    private String title;
+
+    @ApiModelProperty(value = "内容")
+    private String content;
+
+    @ApiModelProperty(value = "消息大类 1 任务 2 日志 3 oa审批 4公告 5 日程 6 crm消息")
+    private Integer label;
+
+    @ApiModelProperty(value = "消息类型 详见AdminMessageEnum")
+    private Integer type;
+
+    @ApiModelProperty(value = "关联ID")
+    private Long typeId;
+
+    @ApiModelProperty(value = "消息创建者 0为系统")
+    private Long createUser;
+
+    @ApiModelProperty(value = "接收人")
+    private Long recipientUser;
+
+    @ApiModelProperty(value = "创建时间")
+    @TableField(fill = FieldFill.INSERT)
+    private LocalDateTime createTime;
+
+    @ApiModelProperty(value = "是否已读 0 未读 1 已读")
+    private Integer isRead;
+
+    @ApiModelProperty(value = "已读时间")
+    private Date readTime;
+
+    @ApiModelProperty(value = "valid")
+    @TableField(exist = false)
+    private Integer valid;
+
+    @ApiModelProperty(value = "昵称")
+    @TableField(exist = false)
+    private String realname;
+
+    @ApiModelProperty(value = "创建人ID")
+    @TableField(fill = FieldFill.INSERT)
+    private Long createUserId;
+
+    @ApiModelProperty(value = "修改人ID")
+    @TableField(fill = FieldFill.UPDATE)
+    private Long updateUserId;
+
+    @ApiModelProperty(value = "更新时间")
+    @TableField(fill = FieldFill.UPDATE)
+    private LocalDateTime updateTime;
+
+    public AdminMessage() {
+        /* 构造message对象时,默认未读,解决批量保存错误问题 */
+        this.isRead = 0;
+    }
+}

+ 65 - 0
admin/src/main/java/com/kakarote/admin/entity/PO/AdminModelSort.java

@@ -0,0 +1,65 @@
+package com.kakarote.admin.entity.PO;
+
+import com.baomidou.mybatisplus.annotation.*;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+import lombok.experimental.Accessors;
+
+import java.io.Serializable;
+import java.time.LocalDateTime;
+
+/**
+ * <p>
+ * 客户管理导航栏排序表
+ * </p>
+ *
+ * @author zhangzhiwei
+ * @since 2020-06-03
+ */
+@Data
+@EqualsAndHashCode(callSuper = false)
+@Accessors(chain = true)
+@TableName("wk_admin_model_sort")
+@ApiModel(value="AdminModelSort对象", description="客户管理导航栏排序表")
+public class AdminModelSort implements Serializable {
+
+    private static final long serialVersionUID=1L;
+
+    @TableId(value = "id",type = IdType.ASSIGN_ID)
+    private Long id;
+
+    @ApiModelProperty(value = "导航类型 1头部导航 2客户管理左侧导航")
+    private Integer type;
+
+    @ApiModelProperty(value = "模块  1仪表盘 2待办事项 3线索 4客户 5联系人 6商机 7合同 8回款 9发票 10回访 11产品 12市场活动")
+    private String model;
+
+    @ApiModelProperty(value = "排序")
+    private Integer sort;
+
+    @ApiModelProperty(value = "是否隐藏  0不隐藏 1隐藏")
+    private Integer isHidden;
+
+    @ApiModelProperty(value = "用户id")
+    private Long userId;
+
+    @ApiModelProperty(value = "创建人ID")
+    @TableField(fill = FieldFill.INSERT)
+    private Long createUserId;
+
+    @ApiModelProperty(value = "修改人ID")
+    @TableField(fill = FieldFill.UPDATE)
+    private Long updateUserId;
+
+    @ApiModelProperty(value = "创建时间")
+    @TableField(fill = FieldFill.INSERT)
+    private LocalDateTime createTime;
+
+    @ApiModelProperty(value = "更新时间")
+    @TableField(fill = FieldFill.UPDATE)
+    private LocalDateTime updateTime;
+
+
+}

+ 97 - 0
admin/src/main/java/com/kakarote/admin/entity/PO/AdminRole.java

@@ -0,0 +1,97 @@
+package com.kakarote.admin.entity.PO;
+
+import com.baomidou.mybatisplus.annotation.*;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+import lombok.NoArgsConstructor;
+import lombok.experimental.Accessors;
+
+import java.io.Serializable;
+import java.time.LocalDateTime;
+import java.util.ArrayList;
+import java.util.List;
+import java.util.Map;
+
+/**
+ * <p>
+ * 角色表
+ * </p>
+ *
+ * @author zhangzhiwei
+ * @since 2020-06-03
+ */
+@Data
+@EqualsAndHashCode(callSuper = false)
+@Accessors(chain = true)
+@TableName("wk_admin_role")
+@ApiModel(value="AdminRole对象", description="角色表")
+@NoArgsConstructor
+public class AdminRole implements Serializable {
+
+    private static final long serialVersionUID=1L;
+
+    @TableId(value = "role_id",type = IdType.ASSIGN_ID)
+    private Long roleId;
+
+    @ApiModelProperty(value = "名称")
+    private String roleName;
+
+    @ApiModelProperty(value = "0、自定义角色1、管理角色 2、客户管理角色 3、人事角色 4、财务角色 5、项目角色 8、项目自定义角色")
+    private Integer roleType;
+
+    @ApiModelProperty(value = "备注")
+    private String remark;
+
+    @ApiModelProperty(value = "1 启用 0 禁用")
+    private Integer status;
+
+    @ApiModelProperty(value = "数据权限 1、本人,2、本人及下属,3、本部门,4、本部门及下属部门,5、全部 ")
+    private Integer dataType;
+
+    @ApiModelProperty(value = "0 隐藏 1 不隐藏")
+    private Integer isHidden;
+
+    @ApiModelProperty(value = "1 系统项目管理员角色 2 项目管理角色 3 项目编辑角色 4 项目只读角色")
+    private Integer label;
+
+    @TableField(exist = false)
+    @ApiModelProperty(value = "菜单列表")
+    private Map<String,List<Long>> rules;
+
+    @TableField(exist = false)
+    @ApiModelProperty(value = "菜单id列表")
+    private List<Long> menuIds = new ArrayList<>();
+
+    @ApiModelProperty(value = "创建人ID")
+    @TableField(fill = FieldFill.INSERT)
+    private Long createUserId;
+
+    @ApiModelProperty(value = "修改人ID")
+    @TableField(fill = FieldFill.UPDATE)
+    private Long updateUserId;
+
+    @ApiModelProperty(value = "创建时间")
+    @TableField(fill = FieldFill.INSERT)
+    private LocalDateTime createTime;
+
+    @ApiModelProperty(value = "更新时间")
+    @TableField(fill = FieldFill.UPDATE)
+    private LocalDateTime updateTime;
+
+    public AdminRole(Long roleId, String roleName, Integer roleType, String remark, Integer status, Integer dataType, Integer isHidden, Integer label, Long createUserId, Long updateUserId, LocalDateTime createTime, LocalDateTime updateTime) {
+        this.roleId = roleId;
+        this.roleName = roleName;
+        this.roleType = roleType;
+        this.remark = remark;
+        this.status = status;
+        this.dataType = dataType;
+        this.isHidden = isHidden;
+        this.label = label;
+        this.createUserId = createUserId;
+        this.updateUserId = updateUserId;
+        this.createTime = createTime;
+        this.updateTime = updateTime;
+    }
+}

+ 61 - 0
admin/src/main/java/com/kakarote/admin/entity/PO/AdminRoleAuth.java

@@ -0,0 +1,61 @@
+package com.kakarote.admin.entity.PO;
+
+import com.baomidou.mybatisplus.annotation.*;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+import lombok.experimental.Accessors;
+
+import java.io.Serializable;
+import java.time.LocalDateTime;
+
+/**
+ * <p>
+ * 角色表
+ * </p>
+ *
+ * @author zhangzhiwei
+ * @since 2021-04-23
+ */
+@Data
+@EqualsAndHashCode(callSuper = false)
+@Accessors(chain = true)
+@TableName("wk_admin_role_auth")
+@ApiModel(value="AdminRoleAuth对象", description="角色表")
+public class AdminRoleAuth implements Serializable {
+
+    private static final long serialVersionUID=1L;
+
+    @TableId(value = "id",type = IdType.ASSIGN_ID)
+    private Long id;
+
+    @ApiModelProperty(value = "角色ID")
+    private Long roleId;
+
+    @ApiModelProperty(value = "菜单ID")
+    private Long menuId;
+
+    @ApiModelProperty(value = "能查询的角色ID")
+    private Long authRoleId;
+
+    @ApiModelProperty(value = "备注")
+    private String remark;
+
+    @ApiModelProperty(value = "创建人ID")
+    @TableField(fill = FieldFill.INSERT)
+    private Long createUserId;
+
+    @ApiModelProperty(value = "修改人ID")
+    @TableField(fill = FieldFill.UPDATE)
+    private Long updateUserId;
+
+    @ApiModelProperty(value = "创建时间")
+    @TableField(fill = FieldFill.INSERT)
+    private LocalDateTime createTime;
+
+    @ApiModelProperty(value = "更新时间")
+    @TableField(fill = FieldFill.UPDATE)
+    private LocalDateTime updateTime;
+
+}

+ 58 - 0
admin/src/main/java/com/kakarote/admin/entity/PO/AdminRoleMenu.java

@@ -0,0 +1,58 @@
+package com.kakarote.admin.entity.PO;
+
+import com.baomidou.mybatisplus.annotation.*;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.AllArgsConstructor;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+import lombok.NoArgsConstructor;
+import lombok.experimental.Accessors;
+
+import java.io.Serializable;
+import java.time.LocalDateTime;
+
+/**
+ * <p>
+ * 角色菜单对应关系表
+ * </p>
+ *
+ * @author zhangzhiwei
+ * @since 2020-06-03
+ */
+@Data
+@EqualsAndHashCode(callSuper = false)
+@Accessors(chain = true)
+@TableName("wk_admin_role_menu")
+@ApiModel(value="AdminRoleMenu对象", description="角色菜单对应关系表")
+@NoArgsConstructor
+@AllArgsConstructor
+public class AdminRoleMenu implements Serializable {
+
+    private static final long serialVersionUID=1L;
+
+    @TableId(value = "id",type = IdType.ASSIGN_ID)
+    private Long id;
+
+    @ApiModelProperty(value = "角色ID")
+    private Long roleId;
+
+    @ApiModelProperty(value = "菜单ID")
+    private Long menuId;
+
+    @ApiModelProperty(value = "创建人ID")
+    @TableField(fill = FieldFill.INSERT)
+    private Long createUserId;
+
+    @ApiModelProperty(value = "修改人ID")
+    @TableField(fill = FieldFill.UPDATE)
+    private Long updateUserId;
+
+    @ApiModelProperty(value = "创建时间")
+    @TableField(fill = FieldFill.INSERT)
+    private LocalDateTime createTime;
+
+    @ApiModelProperty(value = "更新时间")
+    @TableField(fill = FieldFill.UPDATE)
+    private LocalDateTime updateTime;
+}

+ 101 - 0
admin/src/main/java/com/kakarote/admin/entity/PO/AdminUser.java

@@ -0,0 +1,101 @@
+package com.kakarote.admin.entity.PO;
+
+import com.baomidou.mybatisplus.annotation.*;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+import lombok.experimental.Accessors;
+
+import java.io.Serializable;
+import java.time.LocalDateTime;
+
+/**
+ * <p>
+ * 用户表
+ * </p>
+ *
+ * @author zhangzhiwei
+ * @since 2020-06-03
+ */
+@Data
+@EqualsAndHashCode(callSuper = false)
+@Accessors(chain = true)
+@TableName("wk_admin_user")
+@ApiModel(value="AdminUser对象", description="用户表")
+public class AdminUser implements Serializable {
+
+    private static final long serialVersionUID=1L;
+
+    @ApiModelProperty(value = "主键")
+    @TableId(value = "user_id",type = IdType.ASSIGN_ID)
+    private Long userId;
+
+    @ApiModelProperty(value = "用户名")
+    private String username;
+
+    @ApiModelProperty(value = "密码")
+    private String password;
+
+    @ApiModelProperty(value = "安全符")
+    private String salt;
+
+    @ApiModelProperty(value = "头像")
+    private String img;
+
+    @ApiModelProperty(value = "创建时间")
+    @TableField(fill = FieldFill.INSERT)
+    private LocalDateTime createTime;
+
+    @ApiModelProperty(value = "真实姓名")
+    private String realname;
+
+    @ApiModelProperty(value = "员工编号")
+    private String num;
+
+    @ApiModelProperty(value = "手机号")
+    private String mobile;
+
+    @ApiModelProperty(value = "邮箱")
+    private String email;
+
+    @ApiModelProperty(value = "0 未选择 1 男 2 女 ")
+    private Integer sex;
+
+    @ApiModelProperty(value = "部门")
+    private Long deptId;
+
+    @ApiModelProperty(value = "部门名称")
+    @TableField(exist = false)
+    private String deptName;
+
+    @ApiModelProperty(value = "岗位")
+    private String post;
+
+    @ApiModelProperty(value = "状态,0禁用,1正常,2未激活")
+    private Integer status;
+
+    @ApiModelProperty(value = "直属上级ID")
+    private Long parentId;
+
+    @ApiModelProperty(value = "最后登录时间")
+    private LocalDateTime lastLoginTime;
+
+    @ApiModelProperty(value = "最后登录IP 注意兼容IPV6")
+    private String lastLoginIp;
+
+    @TableField(exist = false)
+    private String companyName;
+
+    @ApiModelProperty(value = "创建人ID")
+    @TableField(fill = FieldFill.INSERT)
+    private Long createUserId;
+
+    @ApiModelProperty(value = "修改人ID")
+    @TableField(fill = FieldFill.UPDATE)
+    private Long updateUserId;
+
+    @ApiModelProperty(value = "更新时间")
+    @TableField(fill = FieldFill.UPDATE)
+    private LocalDateTime updateTime;
+}

+ 65 - 0
admin/src/main/java/com/kakarote/admin/entity/PO/AdminUserApply.java

@@ -0,0 +1,65 @@
+package com.kakarote.admin.entity.PO;
+
+import com.baomidou.mybatisplus.annotation.*;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+import lombok.experimental.Accessors;
+
+import java.io.Serializable;
+import java.time.LocalDateTime;
+
+/**
+ * <p>
+ * 员工申请加入企业历史表
+ * </p>
+ *
+ * @author zhangzhiwei
+ * @since 2021-11-06
+ */
+@Data
+@EqualsAndHashCode(callSuper = false)
+@Accessors(chain = true)
+@TableName("wk_admin_user_apply")
+@ApiModel(value="AdminUserApply对象", description="员工申请加入企业历史表")
+public class AdminUserApply implements Serializable {
+
+    private static final long serialVersionUID=1L;
+
+    @ApiModelProperty(value = "主键ID")
+    @TableId(value = "id", type = IdType.AUTO)
+    private Integer id;
+
+    @ApiModelProperty(value = "已同步状态的用户ID")
+    @TableField("userId")
+    private Long userId;
+
+    @ApiModelProperty(value = "手机号")
+    private String phone;
+
+    @ApiModelProperty(value = "名称")
+    private String realname;
+
+    @ApiModelProperty(value = "密码")
+    private String password;
+
+    @ApiModelProperty(value = "1 已审核 2 未审核 3 删除")
+    private Integer status;
+
+    @ApiModelProperty(value = "创建时间")
+    @TableField(fill = FieldFill.INSERT)
+    private LocalDateTime createTime;
+
+    @ApiModelProperty(value = "最后修改时间")
+    @TableField(fill = FieldFill.UPDATE)
+    private LocalDateTime updateTime;
+
+    @ApiModelProperty(value = "审核人id")
+    private Long examineUserId;
+
+    @ApiModelProperty(value = "邀请ID")
+    private Long inviteUserId;
+
+
+}

+ 67 - 0
admin/src/main/java/com/kakarote/admin/entity/PO/AdminUserConfig.java

@@ -0,0 +1,67 @@
+package com.kakarote.admin.entity.PO;
+
+import com.baomidou.mybatisplus.annotation.*;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.AllArgsConstructor;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+import lombok.NoArgsConstructor;
+import lombok.experimental.Accessors;
+
+import java.io.Serializable;
+import java.time.LocalDateTime;
+
+/**
+ * <p>
+ * 用户配置表
+ * </p>
+ *
+ * @author zhangzhiwei
+ * @since 2020-06-03
+ */
+@Data
+@EqualsAndHashCode(callSuper = false)
+@Accessors(chain = true)
+@NoArgsConstructor
+@AllArgsConstructor
+@TableName("wk_admin_user_config")
+@ApiModel(value="AdminUserConfig对象", description="用户配置表")
+public class AdminUserConfig implements Serializable {
+
+    private static final long serialVersionUID=1L;
+
+    @TableId(value = "setting_id",type = IdType.ASSIGN_ID)
+    private Long settingId;
+
+    private Long userId;
+
+    @ApiModelProperty(value = "状态,0:不启用 1 : 启用")
+    private Integer status;
+
+    @ApiModelProperty(value = "设置名称")
+    private String name;
+
+    @ApiModelProperty(value = "值")
+    private String value;
+
+    @ApiModelProperty(value = "描述")
+    private String description;
+
+    @ApiModelProperty(value = "创建人ID")
+    @TableField(fill = FieldFill.INSERT)
+    private Long createUserId;
+
+    @ApiModelProperty(value = "修改人ID")
+    @TableField(fill = FieldFill.UPDATE)
+    private Long updateUserId;
+
+    @ApiModelProperty(value = "创建时间")
+    @TableField(fill = FieldFill.INSERT)
+    private LocalDateTime createTime;
+
+    @ApiModelProperty(value = "更新时间")
+    @TableField(fill = FieldFill.UPDATE)
+    private LocalDateTime updateTime;
+
+}

+ 58 - 0
admin/src/main/java/com/kakarote/admin/entity/PO/AdminUserHisTable.java

@@ -0,0 +1,58 @@
+package com.kakarote.admin.entity.PO;
+
+import com.baomidou.mybatisplus.annotation.*;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+import lombok.experimental.Accessors;
+
+import java.io.Serializable;
+import java.time.LocalDateTime;
+
+/**
+ * <p>
+ * 授权坐席
+ * </p>
+ *
+ * @author zhangzhiwei
+ * @since 2020-06-03
+ */
+@Data
+@EqualsAndHashCode(callSuper = false)
+@Accessors(chain = true)
+@TableName("wk_admin_user_his_table")
+@ApiModel(value="AdminUserHisTable对象", description="授权坐席")
+public class AdminUserHisTable implements Serializable {
+
+    private static final long serialVersionUID=1L;
+
+    @TableId(value = "his_table_id",type = IdType.ASSIGN_ID)
+    private Long hisTableId;
+
+    private Long userId;
+
+    @ApiModelProperty(value = "0 没有 1 有")
+    private Integer hisTable;
+
+    @ApiModelProperty(value = "1.坐席授权 2.设置默认名片 3.关联员工")
+    private Integer type;
+
+    @ApiModelProperty(value = "创建人ID")
+    @TableField(fill = FieldFill.INSERT)
+    private Long createUserId;
+
+    @ApiModelProperty(value = "修改人ID")
+    @TableField(fill = FieldFill.UPDATE)
+    private Long updateUserId;
+
+    @ApiModelProperty(value = "创建时间")
+    @TableField(fill = FieldFill.INSERT)
+    private LocalDateTime createTime;
+
+    @ApiModelProperty(value = "更新时间")
+    @TableField(fill = FieldFill.UPDATE)
+    private LocalDateTime updateTime;
+
+
+}

+ 56 - 0
admin/src/main/java/com/kakarote/admin/entity/PO/AdminUserRole.java

@@ -0,0 +1,56 @@
+package com.kakarote.admin.entity.PO;
+
+import com.baomidou.mybatisplus.annotation.*;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+import lombok.experimental.Accessors;
+
+import java.io.Serializable;
+import java.time.LocalDateTime;
+
+/**
+ * <p>
+ * 用户角色对应关系表
+ * </p>
+ *
+ * @author zhangzhiwei
+ * @since 2020-06-03
+ */
+@Data
+@EqualsAndHashCode(callSuper = false)
+@Accessors(chain = true)
+@TableName("wk_admin_user_role")
+@ApiModel(value="AdminUserRole对象", description="用户角色对应关系表")
+public class AdminUserRole implements Serializable {
+
+    private static final long serialVersionUID=1L;
+
+    @TableId(value = "id",type = IdType.ASSIGN_ID)
+    private Long id;
+
+    @ApiModelProperty(value = "用户ID")
+    private Long userId;
+
+    @ApiModelProperty(value = "角色ID")
+    private Long roleId;
+
+    @ApiModelProperty(value = "创建人ID")
+    @TableField(fill = FieldFill.INSERT)
+    private Long createUserId;
+
+    @ApiModelProperty(value = "修改人ID")
+    @TableField(fill = FieldFill.UPDATE)
+    private Long updateUserId;
+
+    @ApiModelProperty(value = "创建时间")
+    @TableField(fill = FieldFill.INSERT)
+    private LocalDateTime createTime;
+
+    @ApiModelProperty(value = "更新时间")
+    @TableField(fill = FieldFill.UPDATE)
+    private LocalDateTime updateTime;
+
+
+}

+ 41 - 0
admin/src/main/java/com/kakarote/admin/entity/VO/AdminDeptVO.java

@@ -0,0 +1,41 @@
+package com.kakarote.admin.entity.VO;
+
+import com.fasterxml.jackson.annotation.JsonInclude;
+import com.kakarote.core.feign.admin.entity.SimpleUser;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+
+import java.util.List;
+
+/**
+ * @author zhangzhiwei
+ */
+@Data
+@ApiModel(value="部门查询对象", description="部门对象")
+public class AdminDeptVO {
+
+    @ApiModelProperty(value = "部门ID")
+    private Long deptId;
+
+    @ApiModelProperty(value = "上级部门ID,0为最上级")
+    private Long parentId;
+
+    @ApiModelProperty(value = "部门名称")
+    private String name;
+
+    @ApiModelProperty(value = "部门负责人")
+    private Long ownerUserId;
+
+    @ApiModelProperty(value = "下级部门列表")
+    @JsonInclude(JsonInclude.Include.NON_EMPTY)
+    private List<AdminDeptVO> children;
+
+    @ApiModelProperty(value = "部门下员工列表")
+    @JsonInclude(JsonInclude.Include.NON_EMPTY)
+    private List<SimpleUser> userList;
+
+
+    @ApiModelProperty("当前部门在职人数")
+    private Integer currentNum;
+}

+ 34 - 0
admin/src/main/java/com/kakarote/admin/entity/VO/AdminEmailVerifyVO.java

@@ -0,0 +1,34 @@
+package com.kakarote.admin.entity.VO;
+
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Getter;
+import lombok.Setter;
+
+@ApiModel("邮箱验证VO")
+@Getter
+@Setter
+public class AdminEmailVerifyVO {
+
+    @ApiModelProperty("是否是管理员")
+    private boolean adminUser;
+
+    @ApiModelProperty("剩余天数")
+    private Integer expired;
+
+    @ApiModelProperty("是否已验证")
+    private boolean verify;
+
+    @ApiModelProperty("是否一致")
+    private boolean same;
+
+    @Override
+    public String toString() {
+        return "AdminEmailVerifyVO{" +
+                "adminUser=" + adminUser +
+                ", expired=" + expired +
+                ", verify=" + verify +
+                ", same=" + same +
+                '}';
+    }
+}

+ 42 - 0
admin/src/main/java/com/kakarote/admin/entity/VO/AdminLanguagePackVO.java

@@ -0,0 +1,42 @@
+package com.kakarote.admin.entity.VO;
+
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+import lombok.ToString;
+
+import java.io.Serializable;
+import java.time.LocalDateTime;
+
+/**
+ * <p>
+ * 语言包表
+ * </p>
+ *
+ * @author zmj
+ * @since 2020-12-02
+ */
+@Data
+@ToString
+@ApiModel("语言包列表查询返回")
+public class AdminLanguagePackVO implements Serializable {
+
+
+    @ApiModelProperty(value = "语言包id")
+    private Integer languagePackId;
+
+    @ApiModelProperty(value = "语言包名称")
+    private String languagePackName;
+
+    @ApiModelProperty(value = "创建人ID")
+    private Long createUserId;
+
+    @ApiModelProperty(value = "创建时间")
+    private LocalDateTime createTime;
+
+    @ApiModelProperty(value = "更新时间")
+    private LocalDateTime updateTime;
+
+    @ApiModelProperty(value = "默认语言,0,否,1,是")
+    private Integer defaultLanguage = 0;
+}

+ 42 - 0
admin/src/main/java/com/kakarote/admin/entity/VO/AdminMenuVO.java

@@ -0,0 +1,42 @@
+package com.kakarote.admin.entity.VO;
+
+import com.baomidou.mybatisplus.annotation.IdType;
+import com.baomidou.mybatisplus.annotation.TableId;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+import lombok.ToString;
+
+import java.util.List;
+
+/**
+ * @author zhangzhiwei
+ * 菜单相关VO
+ */
+@Data
+@ToString
+@ApiModel("角色列表返回")
+public class AdminMenuVO {
+    @ApiModelProperty(value = "菜单ID")
+    @TableId(value = "menu_id", type = IdType.AUTO)
+    private Long  menuId;
+
+    @ApiModelProperty(value = "上级菜单ID")
+    private Long parentId;
+
+    @ApiModelProperty(value = "菜单名称")
+    private String menuName;
+
+    @ApiModelProperty(value = "权限标识")
+    private String realm;
+
+    @ApiModelProperty(value = "菜单类型  1目录 2 菜单 3 按钮 4特殊")
+    private Integer menuType;
+
+    @ApiModelProperty(value = "备注")
+    private String remarks;
+
+    @ApiModelProperty(value = "子菜单")
+    private List<AdminMenuVO> childMenu;
+
+}

+ 48 - 0
admin/src/main/java/com/kakarote/admin/entity/VO/AdminMessageConfigVO.java

@@ -0,0 +1,48 @@
+package com.kakarote.admin.entity.VO;
+
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+
+import java.util.List;
+
+@Data
+@ApiModel(value="消息配置VO", description="系统消息通知配置")
+public class AdminMessageConfigVO {
+
+    @ApiModelProperty(value = "主键ID")
+    private Integer id;
+
+    @ApiModelProperty(value = "消息推送配置一级key,如线索,客户等")
+    private String label;
+
+    @ApiModelProperty(value = "消息推送配置二级key,如导入,转移等")
+    private String name;
+
+    @ApiModelProperty(value = "是否开启消息推送 0 否 1 是")
+    private Integer pushMessage;
+
+    @ApiModelProperty(value = "是否推送负责人 0 否 1 是")
+    private Integer pushOwnerUser;
+
+    @ApiModelProperty(value = "是否推送团队成员  0 否 1 是")
+    private Integer pushTermMember;
+
+    @ApiModelProperty(value = "是否推送上级,0为不推送,否则为上级层级")
+    private List<Integer> pushParentUserList;
+
+    @ApiModelProperty(value = "是否推送自定义用户,用户id数组,最多10位")
+    private List<Long> pushCustomUserList;
+
+    @ApiModelProperty(value = "是否推送自定义部门,部门id数组,最多10位")
+    private List<Integer> pushCustomDeptList;
+
+    @ApiModelProperty(value = "是否开启浏览器通知 0 否 1 是")
+    private Integer pushBrowser;
+
+    @ApiModelProperty(value = "是否开启短信通知 0 否 1 是")
+    private Integer pushSms;
+
+    @ApiModelProperty(value = "创建时间")
+    private String createTime;
+}

+ 42 - 0
admin/src/main/java/com/kakarote/admin/entity/VO/AdminMessageVO.java

@@ -0,0 +1,42 @@
+package com.kakarote.admin.entity.VO;
+
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.AllArgsConstructor;
+import lombok.Data;
+import lombok.NoArgsConstructor;
+
+@Data
+@ApiModel("消息数量VO")
+@AllArgsConstructor
+@NoArgsConstructor
+public class AdminMessageVO {
+
+    @ApiModelProperty("全部数量")
+    private Integer allCount;
+
+    @ApiModelProperty("公告数量")
+    private Integer announceCount;
+
+    @ApiModelProperty("审批数量")
+    private Integer examineCount;
+
+    @ApiModelProperty("任务数量")
+    private Integer taskCount;
+
+    @ApiModelProperty("日志数量")
+    private Integer logCount;
+
+    @ApiModelProperty("CRM数量")
+    private Integer crmCount;
+
+    @ApiModelProperty("日程数量")
+    private Integer eventCount;
+
+    @ApiModelProperty("知识库通知数量")
+    private Integer knowledgeCount;
+    @ApiModelProperty("HRM通知数量")
+    private Integer hrmCount;
+    @ApiModelProperty("进销存通知数量")
+    private Integer jxcCount;
+}

+ 21 - 0
admin/src/main/java/com/kakarote/admin/entity/VO/AdminOrderVO.java

@@ -0,0 +1,21 @@
+package com.kakarote.admin.entity.VO;
+
+import com.github.binarywang.wxpay.bean.order.WxPayNativeOrderResult;
+import lombok.AllArgsConstructor;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+import lombok.NoArgsConstructor;
+
+
+/**
+ * wwl
+ */
+@EqualsAndHashCode(callSuper = true)
+@Data
+@NoArgsConstructor
+@AllArgsConstructor
+public class AdminOrderVO extends WxPayNativeOrderResult{
+
+    private String outTradeNo;
+
+}

+ 34 - 0
admin/src/main/java/com/kakarote/admin/entity/VO/AdminOrganizationVO.java

@@ -0,0 +1,34 @@
+package com.kakarote.admin.entity.VO;
+
+import com.kakarote.core.feign.admin.entity.SimpleUser;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Getter;
+import lombok.Setter;
+
+import java.util.List;
+import java.util.Map;
+
+@Getter
+@Setter
+@ApiModel("组织架构信息对象")
+public class AdminOrganizationVO {
+
+    @ApiModelProperty("用户对象")
+    private Map<Character,List<SimpleUser>> userMap;
+
+    @ApiModelProperty("部门对象")
+    private List<AdminDeptVO> deptList;
+
+    @ApiModelProperty("禁用员工列表")
+    private List<SimpleUser> disableUserList;
+
+    @Override
+    public String toString() {
+        return "AdminOrganizationVO{" +
+                "userMap=" + userMap +
+                ", deptList=" + deptList +
+                ", disableUserList=" + disableUserList +
+                '}';
+    }
+}

+ 28 - 0
admin/src/main/java/com/kakarote/admin/entity/VO/AdminRoleVO.java

@@ -0,0 +1,28 @@
+package com.kakarote.admin.entity.VO;
+
+import com.kakarote.admin.entity.PO.AdminRole;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+import lombok.ToString;
+
+import java.util.List;
+
+/**
+ * @author zhangzhiwei
+ * 查询角色功能
+ */
+@Data
+@ToString
+@ApiModel("查询角色功能")
+public class AdminRoleVO {
+
+    @ApiModelProperty("parentId")
+    private Integer parentId;
+
+    @ApiModelProperty("名称")
+    private String name;
+
+    @ApiModelProperty("角色列表")
+    private List<AdminRole> list;
+}

+ 35 - 0
admin/src/main/java/com/kakarote/admin/entity/VO/AdminSuperUserVo.java

@@ -0,0 +1,35 @@
+package com.kakarote.admin.entity.VO;
+
+import com.alibaba.fastjson.JSONObject;
+
+public class AdminSuperUserVo extends AdminUserVO {
+    private JSONObject serverUserInfo;
+
+    private Integer emailId;
+
+    private Integer isReadNotice;
+
+    public JSONObject getServerUserInfo() {
+        return serverUserInfo;
+    }
+
+    public void setServerUserInfo(JSONObject serverUserInfo) {
+        this.serverUserInfo = serverUserInfo;
+    }
+
+    public Integer getEmailId() {
+        return emailId;
+    }
+
+    public void setEmailId(Integer emailId) {
+        this.emailId = emailId;
+    }
+
+    public Integer getIsReadNotice() {
+        return isReadNotice;
+    }
+
+    public void setIsReadNotice(Integer isReadNotice) {
+        this.isReadNotice = isReadNotice;
+    }
+}

+ 73 - 0
admin/src/main/java/com/kakarote/admin/entity/VO/AdminUserVO.java

@@ -0,0 +1,73 @@
+package com.kakarote.admin.entity.VO;
+
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+import lombok.ToString;
+
+/**
+ * @author zhangzhiwei
+ * 查询列表
+ */
+@Data
+@ToString
+@ApiModel("用户列表查询返回")
+public class AdminUserVO {
+
+    @ApiModelProperty("姓名")
+    private String realname;
+
+    @ApiModelProperty("用户名")
+    private String username;
+
+    @ApiModelProperty(value = "用户ID", required = true)
+    private Long userId;
+
+    @ApiModelProperty(value = "性别,0 未选择 1、男 2、女", required = true, allowableValues = "0,1,2")
+    private Integer sex;
+
+    @ApiModelProperty(value = "手机号")
+    private String mobile;
+
+    @ApiModelProperty(value = "密码")
+    private String password;
+
+    @ApiModelProperty(value = "邮箱")
+    private String email;
+
+    @ApiModelProperty(value = "部门ID")
+    private Long deptId;
+
+    @ApiModelProperty(value = "部门名称")
+    private String deptName;
+
+    @ApiModelProperty(value = "状态,0禁用,1正常,2未激活")
+    private Integer status;
+
+    @ApiModelProperty(value = "岗位")
+    private String post;
+
+    @ApiModelProperty(value = "上级ID")
+    private Long parentId;
+
+    @ApiModelProperty(value = "上级名称")
+    private String parentName;
+
+    @ApiModelProperty(value = "角色ID")
+    private String roleId;
+
+    @ApiModelProperty(value = "角色名称")
+    private String roleName;
+
+    @ApiModelProperty(value = "用户头像")
+    private String img;
+
+    @ApiModelProperty(value = "是否超级管理员")
+    private Boolean isAdmin;
+
+    @ApiModelProperty("用户标识,0 主账号 1 部门负责人 2 普通用户")
+    private Integer userIdentity = 2;
+
+    @ApiModelProperty("软呼标识")
+    private Integer hisTable;
+}

+ 34 - 0
admin/src/main/java/com/kakarote/admin/entity/VO/CloudConfigVO.java

@@ -0,0 +1,34 @@
+package com.kakarote.admin.entity.VO;
+
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+import lombok.ToString;
+
+/**
+ * @author zhangzhiwei
+ * 云平台账号配置
+ */
+@ToString
+@Data
+@ApiModel("云平台账号配置")
+public class CloudConfigVO {
+
+    @ApiModelProperty("开始时间")
+    private String startTime;
+
+    @ApiModelProperty("结束时间")
+    private String endTime;
+
+    @ApiModelProperty("可用人数")
+    private Integer allNum;
+
+    @ApiModelProperty("创建时间")
+    private String createTime;
+
+    @ApiModelProperty("已使用人数")
+    private Integer usingNum;
+
+    @ApiModelProperty("企业绑定域名")
+    private String companyDomain;
+}

+ 36 - 0
admin/src/main/java/com/kakarote/admin/entity/VO/HrmSimpleUserVO.java

@@ -0,0 +1,36 @@
+package com.kakarote.admin.entity.VO;
+
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+
+import java.io.Serializable;
+
+/**
+ * @author zhangzhiwei
+ * 简单的用户对象
+ */
+@Data
+@ApiModel("用户对象")
+public class HrmSimpleUserVO implements Serializable {
+
+    private static final long serialVersionUID=1L;
+
+    @ApiModelProperty("用户ID")
+    private Long userId;
+
+    @ApiModelProperty("头像")
+    private String img;
+
+    @ApiModelProperty("昵称")
+    private String realname;
+
+    @ApiModelProperty("岗位")
+    private String post;
+
+    @ApiModelProperty("手机号")
+    private String mobile;
+
+    @ApiModelProperty("性别")
+    private Integer sex;
+}

+ 59 - 0
admin/src/main/java/com/kakarote/admin/entity/VO/ModuleSettingVO.java

@@ -0,0 +1,59 @@
+package com.kakarote.admin.entity.VO;
+
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+import lombok.ToString;
+
+import java.time.LocalDateTime;
+
+/**
+ * @author zhangzhiwei
+ * 模块设置VO
+ */
+@ToString
+@Data
+@ApiModel("应用管理设置")
+public class ModuleSettingVO {
+
+    @ApiModelProperty(value = "设置ID", required = true)
+    private Long settingId;
+
+    @ApiModelProperty(value = "模块", required = true)
+    private String module;
+
+    @ApiModelProperty(value = "状态 1:启用 0:停用 2:试用中 3:已过期", required = true,allowableValues = "0,1,2,3")
+    private Integer status;
+
+    @ApiModelProperty(value = "类型 1:普通应用 2:增值应用 3:未发布应用 4:按次数使用应用", required = true,allowableValues = "1,2,3")
+    private String type;
+
+    @ApiModelProperty(value = "名称", required = true)
+    private String name;
+
+    @ApiModelProperty(value = "试用截止时间")
+    private LocalDateTime endTime;
+
+    @ApiModelProperty("可使用次数")
+    private Integer number;
+
+
+     /**
+      * wwl 20220122新增加字段 工商查询功能的已购买次数
+     **/
+    @ApiModelProperty("已购买次数")
+    private Integer paidNumber;
+
+    public ModuleSettingVO() {
+    }
+
+    public ModuleSettingVO(Long settingId, String module, Integer status, String type, String name, LocalDateTime endTime, Integer number) {
+        this.settingId = settingId;
+        this.module = module;
+        this.status = status;
+        this.type = type;
+        this.name = name;
+        this.endTime = endTime;
+        this.number = number;
+    }
+}

+ 70 - 0
admin/src/main/java/com/kakarote/admin/entity/VO/UserBookVO.java

@@ -0,0 +1,70 @@
+package com.kakarote.admin.entity.VO;
+
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+
+import java.io.Serializable;
+import java.time.LocalDateTime;
+
+/**
+ * @author zhangzhiwei
+ */
+@Data
+public class UserBookVO implements Serializable {
+
+    private static final long serialVersionUID=1L;
+
+    @ApiModelProperty("姓名")
+    private String realname;
+
+    @ApiModelProperty("头像")
+    private String img;
+
+    @ApiModelProperty("用户名")
+    private String username;
+
+    @ApiModelProperty(value = "用户ID", required = true)
+    private Long userId;
+
+    @ApiModelProperty(value = "性别,0 未选择 1、男 2、女", required = true, allowableValues = "0,1,2")
+    private Integer sex;
+
+    @ApiModelProperty(value = "手机号")
+    private String mobile;
+
+    @ApiModelProperty(value = "邮箱")
+    private String email;
+
+    @ApiModelProperty(value = "部门ID")
+    private Long deptId;
+
+    @ApiModelProperty(value = "部门名称")
+    private String deptName;
+
+    @ApiModelProperty(value = "关注状态,0未关注,1已关注")
+    private Integer status;
+
+    @ApiModelProperty(value = "状态,0禁用,1正常,2未激活")
+    private Integer userStatus;
+
+    @ApiModelProperty(value = "创建时间")
+    private LocalDateTime createTime;
+
+    @ApiModelProperty(value = "岗位")
+    private String post;
+
+    @ApiModelProperty(value = "上级ID")
+    private Long parentId;
+
+    @ApiModelProperty(value = "上级名称")
+    private String parentName;
+
+    @ApiModelProperty(value = "角色ID")
+    private String roleId;
+
+    @ApiModelProperty(value = "角色名称")
+    private String roleName;
+
+    @ApiModelProperty("首字母")
+    private String initial;
+}

+ 29 - 0
admin/src/main/java/com/kakarote/admin/entity/VO/UserInfoVO.java

@@ -0,0 +1,29 @@
+package com.kakarote.admin.entity.VO;
+
+import com.kakarote.core.feign.admin.entity.SimpleDept;
+import com.kakarote.core.feign.admin.entity.SimpleUser;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+
+import java.util.List;
+import java.util.Map;
+
+/**
+ * @author zjj
+ * @description: 用户信息
+ * @date 2021/8/19 15:36
+ */
+@Data
+@ApiModel("用户信息")
+public class UserInfoVO {
+
+    @ApiModelProperty(value = "用户")
+    private List<SimpleUser> users;
+
+    @ApiModelProperty(value = "部门")
+    private List<SimpleDept> depts;
+
+    @ApiModelProperty(value = "角色")
+    private List<Map<String, Object>> roles;
+}

+ 16 - 0
admin/src/main/java/com/kakarote/admin/mapper/AdminAttentionMapper.java

@@ -0,0 +1,16 @@
+package com.kakarote.admin.mapper;
+
+import com.kakarote.admin.entity.PO.AdminAttention;
+import com.kakarote.core.servlet.BaseMapper;
+
+/**
+ * <p>
+ * 通讯录用户关注表 Mapper 接口
+ * </p>
+ *
+ * @author zhangzhiwei
+ * @since 2020-04-27
+ */
+public interface AdminAttentionMapper extends BaseMapper<AdminAttention> {
+
+}

+ 18 - 0
admin/src/main/java/com/kakarote/admin/mapper/AdminConfigMapper.java

@@ -0,0 +1,18 @@
+package com.kakarote.admin.mapper;
+
+import com.kakarote.admin.entity.PO.AdminConfig;
+import com.kakarote.core.servlet.BaseMapper;
+
+/**
+ * <p>
+ * 客户规则 Mapper 接口
+ * </p>
+ *
+ * @author zhangzhiwei
+ * @since 2020-04-27
+ */
+
+public interface AdminConfigMapper extends BaseMapper<AdminConfig> {
+
+
+}

+ 33 - 0
admin/src/main/java/com/kakarote/admin/mapper/AdminDeptMapper.java

@@ -0,0 +1,33 @@
+package com.kakarote.admin.mapper;
+
+import com.baomidou.mybatisplus.annotation.SqlParser;
+import com.kakarote.admin.entity.BO.DeptVO;
+import com.kakarote.admin.entity.PO.AdminDept;
+import com.kakarote.core.servlet.BaseMapper;
+
+import java.util.List;
+
+/**
+ * <p>
+ * 部门表 Mapper 接口
+ * </p>
+ *
+ * @author zhangzhiwei
+ * @since 2020-04-27
+ */
+public interface AdminDeptMapper extends BaseMapper<AdminDept> {
+
+    @SqlParser(filter = true)
+    /**
+     * 根据公司id查询公司下的所有部门
+     * @return java.util.List<com.kakarote.admin.entity.BO.DeptVO>
+     */
+    List<DeptVO> queryDeptUserList();
+
+    @SqlParser(filter = true)
+    /**
+     * 根据公司id查询公司下的所有部门
+     * @return java.util.List<com.kakarote.admin.entity.PO.AdminDept>
+     */
+    List<AdminDept> queryDeptList();
+}

+ 16 - 0
admin/src/main/java/com/kakarote/admin/mapper/AdminFileMapper.java

@@ -0,0 +1,16 @@
+package com.kakarote.admin.mapper;
+
+import com.kakarote.admin.entity.PO.AdminFile;
+import com.kakarote.core.servlet.BaseMapper;
+
+/**
+ * <p>
+ * 附件表 Mapper 接口
+ * </p>
+ *
+ * @author zhangzhiwei
+ * @since 2020-04-27
+ */
+public interface AdminFileMapper extends BaseMapper<AdminFile> {
+
+}

+ 24 - 0
admin/src/main/java/com/kakarote/admin/mapper/AdminLanguagePackMapper.java

@@ -0,0 +1,24 @@
+package com.kakarote.admin.mapper;
+
+import com.kakarote.admin.entity.PO.AdminLanguagePack;
+import com.kakarote.admin.entity.VO.AdminLanguagePackVO;
+import com.kakarote.core.entity.BasePage;
+import com.kakarote.core.servlet.BaseMapper;
+
+/**
+ * <p>
+ * 语言包表 Mapper 接口
+ * </p>
+ *
+ * @author zmj
+ * @since 2020-12-02
+ */
+public interface AdminLanguagePackMapper extends BaseMapper<AdminLanguagePack> {
+
+    /**
+     * 查询用户列表
+     * @param page 分页参数
+     * @return data
+     */
+    BasePage<AdminLanguagePackVO> queryLanguagePackList(BasePage<AdminLanguagePackVO> page);
+}

+ 51 - 0
admin/src/main/java/com/kakarote/admin/mapper/AdminMenuMapper.java

@@ -0,0 +1,51 @@
+package com.kakarote.admin.mapper;
+
+import com.kakarote.admin.entity.PO.AdminMenu;
+import com.kakarote.core.servlet.BaseMapper;
+import org.apache.ibatis.annotations.Param;
+
+import java.util.List;
+import java.util.Map;
+
+/**
+ * <p>
+ * 后台菜单表 Mapper 接口
+ * </p>
+ *
+ * @author zhangzhiwei
+ * @since 2020-04-27
+ */
+public interface AdminMenuMapper extends BaseMapper<AdminMenu> {
+
+    /**
+     * 查询菜单列表
+     *
+     * @param userId 用户ID
+     * @return menus
+     */
+    public List<AdminMenu> queryMenuList(Long userId);
+
+    /**
+     * 根据角色id集合查询AdminMenu
+     * @param roleIds:角色id集合
+     * @return menus
+     */
+   public List<AdminMenu> queryMenuListByRoleIds(List<Long> roleIds);
+
+    /**
+     * 查询公海菜单权限
+     * @param userId 用户ID
+     * @param deptId 部门ID
+     * @return data
+     */
+    public Map<String, Long> queryPoolReadAuth(@Param("userId") Long userId, @Param("deptId") Long deptId);
+
+    /**
+     * 根据realm查询id
+     * @param realm1
+     * @param realm2
+     * @param realm3
+     * @return menu_id
+     */
+   Long queryMenuId(@Param("realm1") String realm1,@Param("realm2") String realm2,@Param("realm3") String realm3);
+}

+ 16 - 0
admin/src/main/java/com/kakarote/admin/mapper/AdminMessageConfigMapper.java

@@ -0,0 +1,16 @@
+package com.kakarote.admin.mapper;
+
+import com.kakarote.core.feign.admin.entity.AdminMessageConfig;
+import com.kakarote.core.servlet.BaseMapper;
+
+/**
+ * <p>
+ * 系统消息通知配置表 Mapper 接口
+ * </p>
+ *
+ * @author zhangzhiwei
+ * @since 2021-08-16
+ */
+public interface AdminMessageConfigMapper extends BaseMapper<AdminMessageConfig> {
+
+}

Some files were not shown because too many files changed in this diff