Commit 286e24ad6cc6c7cee81dc78bfb8cb6f54c9f858c
Merge remote-tracking branch 'origin/develop' into develop
Showing
328 changed files
with
5150 additions
and
3723 deletions
Too many changes.
To preserve performance only 100 of 328 files are displayed.
.image/common/bpm-feature.png
0 → 100644
15.9 KB
.image/common/infra-feature.png
0 → 100644
16.5 KB
.image/common/system-feature.png
0 → 100644
13.3 KB
README.md
| ... | ... | @@ -162,6 +162,8 @@ |
| 162 | 162 | | 🚀 | 应用管理 | 管理 SSO 单点登录的应用,支持多种 OAuth2 授权方式 | |
| 163 | 163 | | 🚀 | 地区管理 | 展示省份、城市、区镇等城市信息,支持 IP 对应城市 | |
| 164 | 164 | |
| 165 | + | |
| 166 | + | |
| 165 | 167 | ### 工作流程 |
| 166 | 168 | |
| 167 | 169 | | | 功能 | 描述 | |
| ... | ... | @@ -174,6 +176,8 @@ |
| 174 | 176 | | 🚀 | 已办任务 | 查看自己【已】审批的工作任务,未来会支持回退操作 | |
| 175 | 177 | | 🚀 | OA 请假 | 作为业务自定义接入工作流的使用示例,只需创建请求对应的工作流程,即可进行审批 | |
| 176 | 178 | |
| 179 | + | |
| 180 | + | |
| 177 | 181 | ### 支付系统 |
| 178 | 182 | |
| 179 | 183 | | | 功能 | 描述 | |
| ... | ... | @@ -209,6 +213,8 @@ |
| 209 | 213 | | 🚀 | 日志服务 | 轻量级日志中心,查看远程服务器的日志 | |
| 210 | 214 | | 🚀 | 单元测试 | 基于 JUnit + Mockito 实现单元测试,保证功能的正确性、代码的质量等 | |
| 211 | 215 | |
| 216 | + | |
| 217 | + | |
| 212 | 218 | ### 数据报表 |
| 213 | 219 | |
| 214 | 220 | | | 功能 | 描述 | | ... | ... |
pom.xml
| ... | ... | @@ -21,7 +21,7 @@ |
| 21 | 21 | <!-- <module>yudao-module-mp</module>--> |
| 22 | 22 | <!-- <module>yudao-module-pay</module>--> |
| 23 | 23 | <!-- <module>yudao-module-mall</module>--> |
| 24 | -<!-- <module>yudao-module-crm</module>--> | |
| 24 | + <module>yudao-module-crm</module> | |
| 25 | 25 | <!-- <module>yudao-module-erp</module>--> |
| 26 | 26 | <!-- 示例项目 --> |
| 27 | 27 | <!-- <module>yudao-example</module>--> | ... | ... |
script/docker/docker-compose.yml
| ... | ... | @@ -50,7 +50,7 @@ services: |
| 50 | 50 | --spring.datasource.dynamic.datasource.slave.url=${SLAVE_DATASOURCE_URL:-jdbc:mysql://yudao-mysql:3306/ruoyi-vue-pro?useSSL=false&serverTimezone=Asia/Shanghai&allowPublicKeyRetrieval=true&nullCatalogMeansCurrent=true} |
| 51 | 51 | --spring.datasource.dynamic.datasource.slave.username=${SLAVE_DATASOURCE_USERNAME:-root} |
| 52 | 52 | --spring.datasource.dynamic.datasource.slave.password=${SLAVE_DATASOURCE_PASSWORD:-123456} |
| 53 | - --spring.redis.host=${REDIS_HOST:-yudao-redis} | |
| 53 | + --spring.data.redis.host=${REDIS_HOST:-yudao-redis} | |
| 54 | 54 | depends_on: |
| 55 | 55 | - mysql |
| 56 | 56 | - redis | ... | ... |
sql/mysql/optinal/Ureport.sql deleted
| 1 | --- 菜单 SQL | |
| 2 | -INSERT INTO system_menu( | |
| 3 | - name, permission, type, sort, parent_id, | |
| 4 | - path, icon, component, status, component_name | |
| 5 | -) | |
| 6 | -VALUES ( | |
| 7 | - 'Ureport2报表管理', '', 2, 0, 1281, | |
| 8 | - 'ureport-data', '', 'report/ureport/index', 0, 'UReportData' | |
| 9 | - ); | |
| 10 | - | |
| 11 | --- 按钮父菜单ID | |
| 12 | --- 暂时只支持 MySQL。如果你是 Oracle、PostgreSQL、SQLServer 的话,需要手动修改 @parentId 的部分的代码 | |
| 13 | -SELECT @parentId := LAST_INSERT_ID(); | |
| 14 | - | |
| 15 | --- 按钮 SQL | |
| 16 | -INSERT INTO system_menu( | |
| 17 | - name, permission, type, sort, parent_id, | |
| 18 | - path, icon, component, status | |
| 19 | -) | |
| 20 | -VALUES ( | |
| 21 | - 'Ureport2报表查询', 'report:ureport-data:query', 3, 1, @parentId, | |
| 22 | - '', '', '', 0 | |
| 23 | - ); | |
| 24 | -INSERT INTO system_menu( | |
| 25 | - name, permission, type, sort, parent_id, | |
| 26 | - path, icon, component, status | |
| 27 | -) | |
| 28 | -VALUES ( | |
| 29 | - 'Ureport2报表创建', 'report:ureport-data:create', 3, 2, @parentId, | |
| 30 | - '', '', '', 0 | |
| 31 | - ); | |
| 32 | -INSERT INTO system_menu( | |
| 33 | - name, permission, type, sort, parent_id, | |
| 34 | - path, icon, component, status | |
| 35 | -) | |
| 36 | -VALUES ( | |
| 37 | - 'Ureport2报表更新', 'report:ureport-data:update', 3, 3, @parentId, | |
| 38 | - '', '', '', 0 | |
| 39 | - ); | |
| 40 | -INSERT INTO system_menu( | |
| 41 | - name, permission, type, sort, parent_id, | |
| 42 | - path, icon, component, status | |
| 43 | -) | |
| 44 | -VALUES ( | |
| 45 | - 'Ureport2报表删除', 'report:ureport-data:delete', 3, 4, @parentId, | |
| 46 | - '', '', '', 0 | |
| 47 | - ); | |
| 48 | -INSERT INTO system_menu( | |
| 49 | - name, permission, type, sort, parent_id, | |
| 50 | - path, icon, component, status | |
| 51 | -) | |
| 52 | -VALUES ( | |
| 53 | - 'Ureport2报表导出', 'report:ureport-data:export', 3, 5, @parentId, | |
| 54 | - '', '', '', 0 | |
| 55 | - ); | |
| 56 | - | |
| 57 | - | |
| 58 | -DROP TABLE IF EXISTS `report_ureport_data`; | |
| 59 | -CREATE TABLE `report_ureport_data` ( | |
| 60 | - `id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT 'ID', | |
| 61 | - `name` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL COMMENT '文件名称', | |
| 62 | - `status` tinyint(4) NOT NULL COMMENT '状态', | |
| 63 | - `content` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL COMMENT '文件内容', | |
| 64 | - `remark` varchar(500) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT NULL COMMENT '备注', | |
| 65 | - `creator` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT '' COMMENT '创建者', | |
| 66 | - `create_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间', | |
| 67 | - `updater` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT '' COMMENT '更新者', | |
| 68 | - `update_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间', | |
| 69 | - `deleted` bit(1) NOT NULL DEFAULT b'0' COMMENT '是否删除', | |
| 70 | - `tenant_id` bigint(20) NOT NULL DEFAULT 0 COMMENT '租户编号', | |
| 71 | - PRIMARY KEY (`id`) USING BTREE | |
| 72 | -) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci COMMENT = 'Ureport2报表' ROW_FORMAT = Dynamic; | |
| 73 | - | |
| 74 | --- ---------------------------- | |
| 75 | --- Records of report_ureport_data | |
| 76 | --- ---------------------------- | |
| 77 | -INSERT INTO `report_ureport_data` VALUES (11, 'role.ureport.xml', 0, '<?xml version=\"1.0\" encoding=\"UTF-8\"?><ureport><cell expand=\"Down\" name=\"A1\" row=\"1\" col=\"1\"><cell-style font-size=\"10\" align=\"center\" valign=\"middle\"></cell-style><dataset-value dataset-name=\"role\" aggregate=\"group\" property=\"name\" order=\"none\" mapping-type=\"simple\"></dataset-value></cell><cell expand=\"Down\" name=\"B1\" row=\"1\" col=\"2\"><cell-style font-size=\"10\" align=\"center\" valign=\"middle\"></cell-style><dataset-value dataset-name=\"role\" aggregate=\"group\" property=\"code\" order=\"none\" mapping-type=\"simple\"></dataset-value></cell><cell expand=\"Down\" name=\"C1\" row=\"1\" col=\"3\"><cell-style font-size=\"10\" align=\"center\" valign=\"middle\"></cell-style><dataset-value dataset-name=\"role\" aggregate=\"group\" property=\"status\" order=\"none\" mapping-type=\"simple\"></dataset-value></cell><cell expand=\"None\" name=\"D1\" row=\"1\" col=\"4\"><cell-style font-size=\"10\" align=\"center\" valign=\"middle\"></cell-style><simple-value><![CDATA[]]></simple-value></cell><cell expand=\"None\" name=\"A2\" row=\"2\" col=\"1\"><cell-style font-size=\"10\" align=\"center\" valign=\"middle\"></cell-style><simple-value><![CDATA[]]></simple-value></cell><cell expand=\"None\" name=\"B2\" row=\"2\" col=\"2\"><cell-style font-size=\"10\" align=\"center\" valign=\"middle\"></cell-style><simple-value><![CDATA[]]></simple-value></cell><cell expand=\"None\" name=\"C2\" row=\"2\" col=\"3\"><cell-style font-size=\"10\" align=\"center\" valign=\"middle\"></cell-style><simple-value><![CDATA[]]></simple-value></cell><cell expand=\"None\" name=\"D2\" row=\"2\" col=\"4\"><cell-style font-size=\"10\" align=\"center\" valign=\"middle\"></cell-style><simple-value><![CDATA[]]></simple-value></cell><cell expand=\"None\" name=\"A3\" row=\"3\" col=\"1\"><cell-style font-size=\"10\" align=\"center\" valign=\"middle\"></cell-style><simple-value><![CDATA[]]></simple-value></cell><cell expand=\"None\" name=\"B3\" row=\"3\" col=\"2\"><cell-style font-size=\"10\" align=\"center\" valign=\"middle\"></cell-style><simple-value><![CDATA[]]></simple-value></cell><cell expand=\"None\" name=\"C3\" row=\"3\" col=\"3\"><cell-style font-size=\"10\" align=\"center\" valign=\"middle\"></cell-style><simple-value><![CDATA[]]></simple-value></cell><cell expand=\"None\" name=\"D3\" row=\"3\" col=\"4\"><cell-style font-size=\"10\" align=\"center\" valign=\"middle\"></cell-style><simple-value><![CDATA[]]></simple-value></cell><row row-number=\"1\" height=\"18\"/><row row-number=\"2\" height=\"18\"/><row row-number=\"3\" height=\"18\"/><column col-number=\"1\" width=\"80\"/><column col-number=\"2\" width=\"80\"/><column col-number=\"3\" width=\"80\"/><column col-number=\"4\" width=\"80\"/><datasource name=\"UReportDataSource\" type=\"buildin\"><dataset name=\"role\" type=\"sql\"><sql><![CDATA[select * from system_role]]></sql><field name=\"id\"/><field name=\"name\"/><field name=\"code\"/><field name=\"sort\"/><field name=\"data_scope\"/><field name=\"data_scope_dept_ids\"/><field name=\"status\"/><field name=\"type\"/><field name=\"remark\"/><field name=\"creator\"/><field name=\"create_time\"/><field name=\"updater\"/><field name=\"update_time\"/><field name=\"deleted\"/><field name=\"tenant_id\"/></dataset></datasource><paper type=\"A4\" left-margin=\"90\" right-margin=\"90\"\n top-margin=\"72\" bottom-margin=\"72\" paging-mode=\"fitpage\" fixrows=\"0\"\n width=\"595\" height=\"842\" orientation=\"portrait\" html-report-align=\"left\" bg-image=\"\" html-interval-refresh-value=\"0\" column-enabled=\"false\"></paper></ureport>', NULL, NULL, '2023-11-25 22:40:58', NULL, '2023-11-25 23:00:42', b'0', 0); |
sql/mysql/ruoyi-vue-pro.sql
| ... | ... | @@ -11,7 +11,7 @@ |
| 11 | 11 | Target Server Version : 80200 (8.2.0) |
| 12 | 12 | File Encoding : 65001 |
| 13 | 13 | |
| 14 | - Date: 24/03/2024 10:40:51 | |
| 14 | + Date: 07/04/2024 19:33:28 | |
| 15 | 15 | */ |
| 16 | 16 | |
| 17 | 17 | SET NAMES utf8mb4; |
| ... | ... | @@ -327,9 +327,13 @@ CREATE TABLE `infra_api_access_log` ( |
| 327 | 327 | `application_name` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL COMMENT '应用名', |
| 328 | 328 | `request_method` varchar(16) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '' COMMENT '请求方法名', |
| 329 | 329 | `request_url` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '' COMMENT '请求地址', |
| 330 | - `request_params` varchar(8000) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '' COMMENT '请求参数', | |
| 330 | + `request_params` text CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL COMMENT '请求参数', | |
| 331 | + `response_body` text CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL COMMENT '响应结果', | |
| 331 | 332 | `user_ip` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL COMMENT '用户 IP', |
| 332 | 333 | `user_agent` varchar(512) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL COMMENT '浏览器 UA', |
| 334 | + `operate_module` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT NULL COMMENT '操作模块', | |
| 335 | + `operate_name` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT NULL COMMENT '操作名', | |
| 336 | + `operate_type` tinyint NULL DEFAULT 0 COMMENT '操作分类', | |
| 333 | 337 | `begin_time` datetime NOT NULL COMMENT '开始请求时间', |
| 334 | 338 | `end_time` datetime NOT NULL COMMENT '结束请求时间', |
| 335 | 339 | `duration` int NOT NULL COMMENT '执行时长', |
| ... | ... | @@ -343,7 +347,7 @@ CREATE TABLE `infra_api_access_log` ( |
| 343 | 347 | `tenant_id` bigint NOT NULL DEFAULT 0 COMMENT '租户编号', |
| 344 | 348 | PRIMARY KEY (`id`) USING BTREE, |
| 345 | 349 | INDEX `idx_create_time`(`create_time` ASC) USING BTREE |
| 346 | -) ENGINE = InnoDB AUTO_INCREMENT = 35832 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci COMMENT = 'API 访问日志表'; | |
| 350 | +) ENGINE = InnoDB AUTO_INCREMENT = 35934 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci COMMENT = 'API 访问日志表'; | |
| 347 | 351 | |
| 348 | 352 | -- ---------------------------- |
| 349 | 353 | -- Records of infra_api_access_log |
| ... | ... | @@ -385,7 +389,7 @@ CREATE TABLE `infra_api_error_log` ( |
| 385 | 389 | `deleted` bit(1) NOT NULL DEFAULT b'0' COMMENT '是否删除', |
| 386 | 390 | `tenant_id` bigint NOT NULL DEFAULT 0 COMMENT '租户编号', |
| 387 | 391 | PRIMARY KEY (`id`) USING BTREE |
| 388 | -) ENGINE = InnoDB AUTO_INCREMENT = 16372 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci COMMENT = '系统异常日志'; | |
| 392 | +) ENGINE = InnoDB AUTO_INCREMENT = 16468 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci COMMENT = '系统异常日志'; | |
| 389 | 393 | |
| 390 | 394 | -- ---------------------------- |
| 391 | 395 | -- Records of infra_api_error_log |
| ... | ... | @@ -494,7 +498,7 @@ CREATE TABLE `infra_config` ( |
| 494 | 498 | -- Records of infra_config |
| 495 | 499 | -- ---------------------------- |
| 496 | 500 | BEGIN; |
| 497 | -INSERT INTO `infra_config` (`id`, `category`, `type`, `name`, `config_key`, `value`, `visible`, `remark`, `creator`, `create_time`, `updater`, `update_time`, `deleted`) VALUES (2, 'biz', 1, '用户管理-账号初始密码', 'sys.user.init-password', '123456', b'0', '初始化密码 123456', 'admin', '2021-01-05 17:03:48', '1', '2024-02-28 22:54:14', b'0'); | |
| 501 | +INSERT INTO `infra_config` (`id`, `category`, `type`, `name`, `config_key`, `value`, `visible`, `remark`, `creator`, `create_time`, `updater`, `update_time`, `deleted`) VALUES (2, 'biz', 1, '用户管理-账号初始密码', 'sys.user.init-password', '123456', b'0', '初始化密码 123456', 'admin', '2021-01-05 17:03:48', '1', '2024-04-03 17:22:28', b'0'); | |
| 498 | 502 | INSERT INTO `infra_config` (`id`, `category`, `type`, `name`, `config_key`, `value`, `visible`, `remark`, `creator`, `create_time`, `updater`, `update_time`, `deleted`) VALUES (7, 'url', 2, 'MySQL 监控的地址', 'url.druid', '', b'1', '', '1', '2023-04-07 13:41:16', '1', '2023-04-07 14:33:38', b'0'); |
| 499 | 503 | INSERT INTO `infra_config` (`id`, `category`, `type`, `name`, `config_key`, `value`, `visible`, `remark`, `creator`, `create_time`, `updater`, `update_time`, `deleted`) VALUES (8, 'url', 2, 'SkyWalking 监控的地址', 'url.skywalking', '', b'1', '', '1', '2023-04-07 13:41:16', '1', '2023-04-07 14:57:03', b'0'); |
| 500 | 504 | INSERT INTO `infra_config` (`id`, `category`, `type`, `name`, `config_key`, `value`, `visible`, `remark`, `creator`, `create_time`, `updater`, `update_time`, `deleted`) VALUES (9, 'url', 2, 'Spring Boot Admin 监控的地址', 'url.spring-boot-admin', '', b'1', '', '1', '2023-04-07 13:41:16', '1', '2023-04-07 14:52:07', b'0'); |
| ... | ... | @@ -690,7 +694,7 @@ CREATE TABLE `infra_file` ( |
| 690 | 694 | `update_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间', |
| 691 | 695 | `deleted` bit(1) NOT NULL DEFAULT b'0' COMMENT '是否删除', |
| 692 | 696 | PRIMARY KEY (`id`) USING BTREE |
| 693 | -) ENGINE = InnoDB AUTO_INCREMENT = 1294 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci COMMENT = '文件表'; | |
| 697 | +) ENGINE = InnoDB AUTO_INCREMENT = 1302 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci COMMENT = '文件表'; | |
| 694 | 698 | |
| 695 | 699 | -- ---------------------------- |
| 696 | 700 | -- Records of infra_file |
| ... | ... | @@ -722,7 +726,7 @@ CREATE TABLE `infra_file_config` ( |
| 722 | 726 | -- ---------------------------- |
| 723 | 727 | BEGIN; |
| 724 | 728 | INSERT INTO `infra_file_config` (`id`, `name`, `storage`, `remark`, `master`, `config`, `creator`, `create_time`, `updater`, `update_time`, `deleted`) VALUES (4, '数据库', 1, '我是数据库', b'0', '{\"@class\":\"cn.iocoder.yudao.module.infra.framework.file.core.client.db.DBFileClientConfig\",\"domain\":\"http://127.0.0.1:48080\"}', '1', '2022-03-15 23:56:24', '1', '2024-02-28 22:54:07', b'0'); |
| 725 | -INSERT INTO `infra_file_config` (`id`, `name`, `storage`, `remark`, `master`, `config`, `creator`, `create_time`, `updater`, `update_time`, `deleted`) VALUES (22, '七牛存储器', 20, '', b'1', '{\"@class\":\"cn.iocoder.yudao.framework.file.core.client.s3.S3FileClientConfig\",\"endpoint\":\"s3.cn-south-1.qiniucs.com\",\"domain\":\"http://test.yudao.iocoder.cn\",\"bucket\":\"ruoyi-vue-pro\",\"accessKey\":\"3TvrJ70gl2Gt6IBe7_IZT1F6i_k0iMuRtyEv4EyS\",\"accessSecret\":\"wd0tbVBYlp0S-ihA8Qg2hPLncoP83wyrIq24OZuY\"}', '1', '2024-01-13 22:11:12', '1', '2024-01-13 22:24:06', b'0'); | |
| 729 | +INSERT INTO `infra_file_config` (`id`, `name`, `storage`, `remark`, `master`, `config`, `creator`, `create_time`, `updater`, `update_time`, `deleted`) VALUES (22, '七牛存储器', 20, '', b'1', '{\"@class\":\"cn.iocoder.yudao.module.infra.framework.file.core.client.s3.S3FileClientConfig\",\"endpoint\":\"s3.cn-south-1.qiniucs.com\",\"domain\":\"http://test.yudao.iocoder.cn\",\"bucket\":\"ruoyi-vue-pro\",\"accessKey\":\"3TvrJ70gl2Gt6IBe7_IZT1F6i_k0iMuRtyEv4EyS\",\"accessSecret\":\"wd0tbVBYlp0S-ihA8Qg2hPLncoP83wyrIq24OZuY\"}', '1', '2024-01-13 22:11:12', '1', '2024-04-03 19:38:34', b'0'); | |
| 726 | 730 | COMMIT; |
| 727 | 731 | |
| 728 | 732 | -- ---------------------------- |
| ... | ... | @@ -740,7 +744,7 @@ CREATE TABLE `infra_file_content` ( |
| 740 | 744 | `update_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间', |
| 741 | 745 | `deleted` bit(1) NOT NULL DEFAULT b'0' COMMENT '是否删除', |
| 742 | 746 | PRIMARY KEY (`id`) USING BTREE |
| 743 | -) ENGINE = InnoDB AUTO_INCREMENT = 282 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci COMMENT = '文件表'; | |
| 747 | +) ENGINE = InnoDB AUTO_INCREMENT = 283 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci COMMENT = '文件表'; | |
| 744 | 748 | |
| 745 | 749 | -- ---------------------------- |
| 746 | 750 | -- Records of infra_file_content |
| ... | ... | @@ -846,7 +850,7 @@ BEGIN; |
| 846 | 850 | INSERT INTO `system_dept` (`id`, `name`, `parent_id`, `sort`, `leader_user_id`, `phone`, `email`, `status`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (100, '芋道源码', 0, 0, 1, '15888888888', 'ry@qq.com', 0, 'admin', '2021-01-05 17:03:47', '1', '2023-11-14 23:30:36', b'0', 1); |
| 847 | 851 | INSERT INTO `system_dept` (`id`, `name`, `parent_id`, `sort`, `leader_user_id`, `phone`, `email`, `status`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (101, '深圳总公司', 100, 1, 104, '15888888888', 'ry@qq.com', 0, 'admin', '2021-01-05 17:03:47', '1', '2023-12-02 09:53:35', b'0', 1); |
| 848 | 852 | INSERT INTO `system_dept` (`id`, `name`, `parent_id`, `sort`, `leader_user_id`, `phone`, `email`, `status`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (102, '长沙分公司', 100, 2, NULL, '15888888888', 'ry@qq.com', 0, 'admin', '2021-01-05 17:03:47', '', '2021-12-15 05:01:40', b'0', 1); |
| 849 | -INSERT INTO `system_dept` (`id`, `name`, `parent_id`, `sort`, `leader_user_id`, `phone`, `email`, `status`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (103, '研发部门', 101, 1, 104, '15888888888', 'ry@qq.com', 0, 'admin', '2021-01-05 17:03:47', '103', '2022-01-14 01:04:14', b'0', 1); | |
| 853 | +INSERT INTO `system_dept` (`id`, `name`, `parent_id`, `sort`, `leader_user_id`, `phone`, `email`, `status`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (103, '研发部门', 101, 1, 104, '15888888888', 'ry@qq.com', 0, 'admin', '2021-01-05 17:03:47', '1', '2024-03-24 20:56:04', b'0', 1); | |
| 850 | 854 | INSERT INTO `system_dept` (`id`, `name`, `parent_id`, `sort`, `leader_user_id`, `phone`, `email`, `status`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (104, '市场部门', 101, 2, NULL, '15888888888', 'ry@qq.com', 0, 'admin', '2021-01-05 17:03:47', '', '2021-12-15 05:01:38', b'0', 1); |
| 851 | 855 | INSERT INTO `system_dept` (`id`, `name`, `parent_id`, `sort`, `leader_user_id`, `phone`, `email`, `status`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (105, '测试部门', 101, 3, NULL, '15888888888', 'ry@qq.com', 0, 'admin', '2021-01-05 17:03:47', '1', '2022-05-16 20:25:15', b'0', 1); |
| 852 | 856 | INSERT INTO `system_dept` (`id`, `name`, `parent_id`, `sort`, `leader_user_id`, `phone`, `email`, `status`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (106, '财务部门', 101, 4, 103, '15888888888', 'ry@qq.com', 0, 'admin', '2021-01-05 17:03:47', '103', '2022-01-15 21:32:22', b'0', 1); |
| ... | ... | @@ -879,7 +883,7 @@ CREATE TABLE `system_dict_data` ( |
| 879 | 883 | `update_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间', |
| 880 | 884 | `deleted` bit(1) NOT NULL DEFAULT b'0' COMMENT '是否删除', |
| 881 | 885 | PRIMARY KEY (`id`) USING BTREE |
| 882 | -) ENGINE = InnoDB AUTO_INCREMENT = 1529 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci COMMENT = '字典数据表'; | |
| 886 | +) ENGINE = InnoDB AUTO_INCREMENT = 1534 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci COMMENT = '字典数据表'; | |
| 883 | 887 | |
| 884 | 888 | -- ---------------------------- |
| 885 | 889 | -- Records of system_dict_data |
| ... | ... | @@ -893,13 +897,13 @@ INSERT INTO `system_dict_data` (`id`, `sort`, `label`, `value`, `dict_type`, `st |
| 893 | 897 | INSERT INTO `system_dict_data` (`id`, `sort`, `label`, `value`, `dict_type`, `status`, `color_type`, `css_class`, `remark`, `creator`, `create_time`, `updater`, `update_time`, `deleted`) VALUES (13, 2, '自定义', '2', 'infra_config_type', 0, 'primary', '', '参数类型 - 自定义', 'admin', '2021-01-05 17:03:48', '1', '2022-02-16 19:06:07', b'0'); |
| 894 | 898 | INSERT INTO `system_dict_data` (`id`, `sort`, `label`, `value`, `dict_type`, `status`, `color_type`, `css_class`, `remark`, `creator`, `create_time`, `updater`, `update_time`, `deleted`) VALUES (14, 1, '通知', '1', 'system_notice_type', 0, 'success', '', '通知', 'admin', '2021-01-05 17:03:48', '1', '2022-02-16 13:05:57', b'0'); |
| 895 | 899 | INSERT INTO `system_dict_data` (`id`, `sort`, `label`, `value`, `dict_type`, `status`, `color_type`, `css_class`, `remark`, `creator`, `create_time`, `updater`, `update_time`, `deleted`) VALUES (15, 2, '公告', '2', 'system_notice_type', 0, 'info', '', '公告', 'admin', '2021-01-05 17:03:48', '1', '2022-02-16 13:06:01', b'0'); |
| 896 | -INSERT INTO `system_dict_data` (`id`, `sort`, `label`, `value`, `dict_type`, `status`, `color_type`, `css_class`, `remark`, `creator`, `create_time`, `updater`, `update_time`, `deleted`) VALUES (16, 0, '其它', '0', 'system_operate_type', 0, 'default', '', '其它操作', 'admin', '2021-01-05 17:03:48', '1', '2022-02-16 09:32:46', b'0'); | |
| 897 | -INSERT INTO `system_dict_data` (`id`, `sort`, `label`, `value`, `dict_type`, `status`, `color_type`, `css_class`, `remark`, `creator`, `create_time`, `updater`, `update_time`, `deleted`) VALUES (17, 1, '查询', '1', 'system_operate_type', 0, 'info', '', '查询操作', 'admin', '2021-01-05 17:03:48', '1', '2022-02-16 09:33:16', b'0'); | |
| 898 | -INSERT INTO `system_dict_data` (`id`, `sort`, `label`, `value`, `dict_type`, `status`, `color_type`, `css_class`, `remark`, `creator`, `create_time`, `updater`, `update_time`, `deleted`) VALUES (18, 2, '新增', '2', 'system_operate_type', 0, 'primary', '', '新增操作', 'admin', '2021-01-05 17:03:48', '1', '2022-02-16 09:33:13', b'0'); | |
| 899 | -INSERT INTO `system_dict_data` (`id`, `sort`, `label`, `value`, `dict_type`, `status`, `color_type`, `css_class`, `remark`, `creator`, `create_time`, `updater`, `update_time`, `deleted`) VALUES (19, 3, '修改', '3', 'system_operate_type', 0, 'warning', '', '修改操作', 'admin', '2021-01-05 17:03:48', '1', '2022-02-16 09:33:22', b'0'); | |
| 900 | -INSERT INTO `system_dict_data` (`id`, `sort`, `label`, `value`, `dict_type`, `status`, `color_type`, `css_class`, `remark`, `creator`, `create_time`, `updater`, `update_time`, `deleted`) VALUES (20, 4, '删除', '4', 'system_operate_type', 0, 'danger', '', '删除操作', 'admin', '2021-01-05 17:03:48', '1', '2022-02-16 09:33:27', b'0'); | |
| 901 | -INSERT INTO `system_dict_data` (`id`, `sort`, `label`, `value`, `dict_type`, `status`, `color_type`, `css_class`, `remark`, `creator`, `create_time`, `updater`, `update_time`, `deleted`) VALUES (22, 5, '导出', '5', 'system_operate_type', 0, 'default', '', '导出操作', 'admin', '2021-01-05 17:03:48', '1', '2022-02-16 09:33:32', b'0'); | |
| 902 | -INSERT INTO `system_dict_data` (`id`, `sort`, `label`, `value`, `dict_type`, `status`, `color_type`, `css_class`, `remark`, `creator`, `create_time`, `updater`, `update_time`, `deleted`) VALUES (23, 6, '导入', '6', 'system_operate_type', 0, 'default', '', '导入操作', 'admin', '2021-01-05 17:03:48', '1', '2022-02-16 09:33:35', b'0'); | |
| 900 | +INSERT INTO `system_dict_data` (`id`, `sort`, `label`, `value`, `dict_type`, `status`, `color_type`, `css_class`, `remark`, `creator`, `create_time`, `updater`, `update_time`, `deleted`) VALUES (16, 0, '其它', '0', 'infra_operate_type', 0, 'default', '', '其它操作', 'admin', '2021-01-05 17:03:48', '1', '2024-03-14 12:44:19', b'0'); | |
| 901 | +INSERT INTO `system_dict_data` (`id`, `sort`, `label`, `value`, `dict_type`, `status`, `color_type`, `css_class`, `remark`, `creator`, `create_time`, `updater`, `update_time`, `deleted`) VALUES (17, 1, '查询', '1', 'infra_operate_type', 0, 'info', '', '查询操作', 'admin', '2021-01-05 17:03:48', '1', '2024-03-14 12:44:20', b'0'); | |
| 902 | +INSERT INTO `system_dict_data` (`id`, `sort`, `label`, `value`, `dict_type`, `status`, `color_type`, `css_class`, `remark`, `creator`, `create_time`, `updater`, `update_time`, `deleted`) VALUES (18, 2, '新增', '2', 'infra_operate_type', 0, 'primary', '', '新增操作', 'admin', '2021-01-05 17:03:48', '1', '2024-03-14 12:44:21', b'0'); | |
| 903 | +INSERT INTO `system_dict_data` (`id`, `sort`, `label`, `value`, `dict_type`, `status`, `color_type`, `css_class`, `remark`, `creator`, `create_time`, `updater`, `update_time`, `deleted`) VALUES (19, 3, '修改', '3', 'infra_operate_type', 0, 'warning', '', '修改操作', 'admin', '2021-01-05 17:03:48', '1', '2024-03-14 12:44:22', b'0'); | |
| 904 | +INSERT INTO `system_dict_data` (`id`, `sort`, `label`, `value`, `dict_type`, `status`, `color_type`, `css_class`, `remark`, `creator`, `create_time`, `updater`, `update_time`, `deleted`) VALUES (20, 4, '删除', '4', 'infra_operate_type', 0, 'danger', '', '删除操作', 'admin', '2021-01-05 17:03:48', '1', '2024-03-14 12:44:23', b'0'); | |
| 905 | +INSERT INTO `system_dict_data` (`id`, `sort`, `label`, `value`, `dict_type`, `status`, `color_type`, `css_class`, `remark`, `creator`, `create_time`, `updater`, `update_time`, `deleted`) VALUES (22, 5, '导出', '5', 'infra_operate_type', 0, 'default', '', '导出操作', 'admin', '2021-01-05 17:03:48', '1', '2024-03-14 12:44:24', b'0'); | |
| 906 | +INSERT INTO `system_dict_data` (`id`, `sort`, `label`, `value`, `dict_type`, `status`, `color_type`, `css_class`, `remark`, `creator`, `create_time`, `updater`, `update_time`, `deleted`) VALUES (23, 6, '导入', '6', 'infra_operate_type', 0, 'default', '', '导入操作', 'admin', '2021-01-05 17:03:48', '1', '2024-03-14 12:44:25', b'0'); | |
| 903 | 907 | INSERT INTO `system_dict_data` (`id`, `sort`, `label`, `value`, `dict_type`, `status`, `color_type`, `css_class`, `remark`, `creator`, `create_time`, `updater`, `update_time`, `deleted`) VALUES (27, 1, '开启', '0', 'common_status', 0, 'primary', '', '开启状态', 'admin', '2021-01-05 17:03:48', '1', '2022-02-16 08:00:39', b'0'); |
| 904 | 908 | INSERT INTO `system_dict_data` (`id`, `sort`, `label`, `value`, `dict_type`, `status`, `color_type`, `css_class`, `remark`, `creator`, `create_time`, `updater`, `update_time`, `deleted`) VALUES (28, 2, '关闭', '1', 'common_status', 0, 'info', '', '关闭状态', 'admin', '2021-01-05 17:03:48', '1', '2022-02-16 08:00:44', b'0'); |
| 905 | 909 | INSERT INTO `system_dict_data` (`id`, `sort`, `label`, `value`, `dict_type`, `status`, `color_type`, `css_class`, `remark`, `creator`, `create_time`, `updater`, `update_time`, `deleted`) VALUES (29, 1, '目录', '1', 'system_menu_type', 0, '', '', '目录', 'admin', '2021-01-05 17:03:48', '', '2022-02-01 16:43:45', b'0'); |
| ... | ... | @@ -1253,6 +1257,11 @@ INSERT INTO `system_dict_data` (`id`, `sort`, `label`, `value`, `dict_type`, `st |
| 1253 | 1257 | INSERT INTO `system_dict_data` (`id`, `sort`, `label`, `value`, `dict_type`, `status`, `color_type`, `css_class`, `remark`, `creator`, `create_time`, `updater`, `update_time`, `deleted`) VALUES (1526, 1, 'Java 类', 'class', 'bpm_process_listener_value_type', 0, 'primary', '', '', '1', '2024-03-23 15:08:45', '1', '2024-03-23 19:14:32', b'0'); |
| 1254 | 1258 | INSERT INTO `system_dict_data` (`id`, `sort`, `label`, `value`, `dict_type`, `status`, `color_type`, `css_class`, `remark`, `creator`, `create_time`, `updater`, `update_time`, `deleted`) VALUES (1527, 2, '表达式', 'expression', 'bpm_process_listener_value_type', 0, 'success', '', '', '1', '2024-03-23 15:09:06', '1', '2024-03-23 19:14:38', b'0'); |
| 1255 | 1259 | INSERT INTO `system_dict_data` (`id`, `sort`, `label`, `value`, `dict_type`, `status`, `color_type`, `css_class`, `remark`, `creator`, `create_time`, `updater`, `update_time`, `deleted`) VALUES (1528, 3, '代理表达式', 'delegateExpression', 'bpm_process_listener_value_type', 0, 'info', '', '', '1', '2024-03-23 15:11:23', '1', '2024-03-23 19:14:41', b'0'); |
| 1260 | +INSERT INTO `system_dict_data` (`id`, `sort`, `label`, `value`, `dict_type`, `status`, `color_type`, `css_class`, `remark`, `creator`, `create_time`, `updater`, `update_time`, `deleted`) VALUES (1529, 1, '天', '1', 'date_interval', 0, '', '', '', '1', '2024-03-29 22:50:26', '1', '2024-03-29 22:50:26', b'0'); | |
| 1261 | +INSERT INTO `system_dict_data` (`id`, `sort`, `label`, `value`, `dict_type`, `status`, `color_type`, `css_class`, `remark`, `creator`, `create_time`, `updater`, `update_time`, `deleted`) VALUES (1530, 2, '周', '2', 'date_interval', 0, '', '', '', '1', '2024-03-29 22:50:36', '1', '2024-03-29 22:50:36', b'0'); | |
| 1262 | +INSERT INTO `system_dict_data` (`id`, `sort`, `label`, `value`, `dict_type`, `status`, `color_type`, `css_class`, `remark`, `creator`, `create_time`, `updater`, `update_time`, `deleted`) VALUES (1531, 3, '月', '3', 'date_interval', 0, '', '', '', '1', '2024-03-29 22:50:46', '1', '2024-03-29 22:50:54', b'0'); | |
| 1263 | +INSERT INTO `system_dict_data` (`id`, `sort`, `label`, `value`, `dict_type`, `status`, `color_type`, `css_class`, `remark`, `creator`, `create_time`, `updater`, `update_time`, `deleted`) VALUES (1532, 4, '季度', '4', 'date_interval', 0, '', '', '', '1', '2024-03-29 22:51:01', '1', '2024-03-29 22:51:01', b'0'); | |
| 1264 | +INSERT INTO `system_dict_data` (`id`, `sort`, `label`, `value`, `dict_type`, `status`, `color_type`, `css_class`, `remark`, `creator`, `create_time`, `updater`, `update_time`, `deleted`) VALUES (1533, 5, '年', '5', 'date_interval', 0, '', '', '', '1', '2024-03-29 22:51:07', '1', '2024-03-29 22:51:07', b'0'); | |
| 1256 | 1265 | COMMIT; |
| 1257 | 1266 | |
| 1258 | 1267 | -- ---------------------------- |
| ... | ... | @@ -1273,7 +1282,7 @@ CREATE TABLE `system_dict_type` ( |
| 1273 | 1282 | `deleted_time` datetime NULL DEFAULT NULL COMMENT '删除时间', |
| 1274 | 1283 | PRIMARY KEY (`id`) USING BTREE, |
| 1275 | 1284 | UNIQUE INDEX `dict_type`(`type` ASC) USING BTREE |
| 1276 | -) ENGINE = InnoDB AUTO_INCREMENT = 616 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci COMMENT = '字典类型表'; | |
| 1285 | +) ENGINE = InnoDB AUTO_INCREMENT = 617 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci COMMENT = '字典类型表'; | |
| 1277 | 1286 | |
| 1278 | 1287 | -- ---------------------------- |
| 1279 | 1288 | -- Records of system_dict_type |
| ... | ... | @@ -1282,7 +1291,7 @@ BEGIN; |
| 1282 | 1291 | INSERT INTO `system_dict_type` (`id`, `name`, `type`, `status`, `remark`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `deleted_time`) VALUES (1, '用户性别', 'system_user_sex', 0, NULL, 'admin', '2021-01-05 17:03:48', '1', '2022-05-16 20:29:32', b'0', NULL); |
| 1283 | 1292 | INSERT INTO `system_dict_type` (`id`, `name`, `type`, `status`, `remark`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `deleted_time`) VALUES (6, '参数类型', 'infra_config_type', 0, NULL, 'admin', '2021-01-05 17:03:48', '', '2022-02-01 16:36:54', b'0', NULL); |
| 1284 | 1293 | INSERT INTO `system_dict_type` (`id`, `name`, `type`, `status`, `remark`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `deleted_time`) VALUES (7, '通知类型', 'system_notice_type', 0, NULL, 'admin', '2021-01-05 17:03:48', '', '2022-02-01 16:35:26', b'0', NULL); |
| 1285 | -INSERT INTO `system_dict_type` (`id`, `name`, `type`, `status`, `remark`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `deleted_time`) VALUES (9, '操作类型', 'system_operate_type', 0, NULL, 'admin', '2021-01-05 17:03:48', '1', '2022-02-16 09:32:21', b'0', NULL); | |
| 1294 | +INSERT INTO `system_dict_type` (`id`, `name`, `type`, `status`, `remark`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `deleted_time`) VALUES (9, '操作类型', 'infra_operate_type', 0, NULL, 'admin', '2021-01-05 17:03:48', '1', '2024-03-14 12:44:01', b'0', NULL); | |
| 1286 | 1295 | INSERT INTO `system_dict_type` (`id`, `name`, `type`, `status`, `remark`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `deleted_time`) VALUES (10, '系统状态', 'common_status', 0, NULL, 'admin', '2021-01-05 17:03:48', '', '2022-02-01 16:21:28', b'0', NULL); |
| 1287 | 1296 | INSERT INTO `system_dict_type` (`id`, `name`, `type`, `status`, `remark`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `deleted_time`) VALUES (11, 'Boolean 是否类型', 'infra_boolean_string', 0, 'boolean 转是否', '', '2021-01-19 03:20:08', '', '2022-02-01 16:37:10', b'0', NULL); |
| 1288 | 1297 | INSERT INTO `system_dict_type` (`id`, `name`, `type`, `status`, `remark`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `deleted_time`) VALUES (104, '登陆结果', 'system_login_result', 0, '登陆结果', '', '2021-01-18 06:17:11', '', '2022-02-01 16:36:00', b'0', NULL); |
| ... | ... | @@ -1362,6 +1371,7 @@ INSERT INTO `system_dict_type` (`id`, `name`, `type`, `status`, `remark`, `creat |
| 1362 | 1371 | INSERT INTO `system_dict_type` (`id`, `name`, `type`, `status`, `remark`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `deleted_time`) VALUES (612, 'ERP 审批状态', 'erp_audit_status', 0, '', '1', '2024-02-06 00:00:07', '1', '2024-02-06 00:00:07', b'0', '1970-01-01 00:00:00'); |
| 1363 | 1372 | INSERT INTO `system_dict_type` (`id`, `name`, `type`, `status`, `remark`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `deleted_time`) VALUES (613, 'BPM 监听器类型', 'bpm_process_listener_type', 0, '', '1', '2024-03-23 12:52:24', '1', '2024-03-09 15:54:28', b'0', '1970-01-01 00:00:00'); |
| 1364 | 1373 | INSERT INTO `system_dict_type` (`id`, `name`, `type`, `status`, `remark`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `deleted_time`) VALUES (615, 'BPM 监听器值类型', 'bpm_process_listener_value_type', 0, '', '1', '2024-03-23 13:00:31', '1', '2024-03-23 13:00:31', b'0', '1970-01-01 00:00:00'); |
| 1374 | +INSERT INTO `system_dict_type` (`id`, `name`, `type`, `status`, `remark`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `deleted_time`) VALUES (616, '时间间隔', 'date_interval', 0, '', '1', '2024-03-29 22:50:09', '1', '2024-03-29 22:50:09', b'0', '1970-01-01 00:00:00'); | |
| 1365 | 1375 | COMMIT; |
| 1366 | 1376 | |
| 1367 | 1377 | -- ---------------------------- |
| ... | ... | @@ -1410,7 +1420,7 @@ CREATE TABLE `system_login_log` ( |
| 1410 | 1420 | `deleted` bit(1) NOT NULL DEFAULT b'0' COMMENT '是否删除', |
| 1411 | 1421 | `tenant_id` bigint NOT NULL DEFAULT 0 COMMENT '租户编号', |
| 1412 | 1422 | PRIMARY KEY (`id`) USING BTREE |
| 1413 | -) ENGINE = InnoDB AUTO_INCREMENT = 3031 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci COMMENT = '系统访问记录'; | |
| 1423 | +) ENGINE = InnoDB AUTO_INCREMENT = 3081 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci COMMENT = '系统访问记录'; | |
| 1414 | 1424 | |
| 1415 | 1425 | -- ---------------------------- |
| 1416 | 1426 | -- Records of system_login_log |
| ... | ... | @@ -1540,7 +1550,7 @@ CREATE TABLE `system_menu` ( |
| 1540 | 1550 | `update_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间', |
| 1541 | 1551 | `deleted` bit(1) NOT NULL DEFAULT b'0' COMMENT '是否删除', |
| 1542 | 1552 | PRIMARY KEY (`id`) USING BTREE |
| 1543 | -) ENGINE = InnoDB AUTO_INCREMENT = 2736 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci COMMENT = '菜单权限表'; | |
| 1553 | +) ENGINE = InnoDB AUTO_INCREMENT = 2738 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci COMMENT = '菜单权限表'; | |
| 1544 | 1554 | |
| 1545 | 1555 | -- ---------------------------- |
| 1546 | 1556 | -- Records of system_menu |
| ... | ... | @@ -2135,12 +2145,6 @@ INSERT INTO `system_menu` (`id`, `name`, `permission`, `type`, `sort`, `parent_i |
| 2135 | 2145 | INSERT INTO `system_menu` (`id`, `name`, `permission`, `type`, `sort`, `parent_id`, `path`, `icon`, `component`, `component_name`, `status`, `visible`, `keep_alive`, `always_show`, `creator`, `create_time`, `updater`, `update_time`, `deleted`) VALUES (2534, '产品分类创建', 'crm:product-category:create', 3, 2, 2532, '', '', '', '', 0, b'1', b'1', b'1', '1', '2023-12-06 12:53:41', '1', '2023-12-06 12:53:41', b'0'); |
| 2136 | 2146 | INSERT INTO `system_menu` (`id`, `name`, `permission`, `type`, `sort`, `parent_id`, `path`, `icon`, `component`, `component_name`, `status`, `visible`, `keep_alive`, `always_show`, `creator`, `create_time`, `updater`, `update_time`, `deleted`) VALUES (2535, '产品分类更新', 'crm:product-category:update', 3, 3, 2532, '', '', '', '', 0, b'1', b'1', b'1', '1', '2023-12-06 12:53:59', '1', '2023-12-06 12:53:59', b'0'); |
| 2137 | 2147 | INSERT INTO `system_menu` (`id`, `name`, `permission`, `type`, `sort`, `parent_id`, `path`, `icon`, `component`, `component_name`, `status`, `visible`, `keep_alive`, `always_show`, `creator`, `create_time`, `updater`, `update_time`, `deleted`) VALUES (2536, '产品分类删除', 'crm:product-category:delete', 3, 4, 2532, '', '', '', '', 0, b'1', b'1', b'1', '1', '2023-12-06 12:54:14', '1', '2023-12-06 12:54:14', b'0'); |
| 2138 | -INSERT INTO `system_menu` (`id`, `name`, `permission`, `type`, `sort`, `parent_id`, `path`, `icon`, `component`, `component_name`, `status`, `visible`, `keep_alive`, `always_show`, `creator`, `create_time`, `updater`, `update_time`, `deleted`) VALUES (2537, 'UReport2 报表', '', 2, 3, 1281, 'ureport-data', 'fa:line-chart', 'report/ureport/index', 'UReportData', 0, b'1', b'1', b'1', '', '2023-12-06 12:55:55', '1', '2024-02-29 12:35:02', b'0'); | |
| 2139 | -INSERT INTO `system_menu` (`id`, `name`, `permission`, `type`, `sort`, `parent_id`, `path`, `icon`, `component`, `component_name`, `status`, `visible`, `keep_alive`, `always_show`, `creator`, `create_time`, `updater`, `update_time`, `deleted`) VALUES (2538, 'Ureport2报表查询', 'report:ureport-data:query', 3, 1, 2537, '', '', '', NULL, 0, b'1', b'1', b'1', '', '2023-12-06 12:55:55', '', '2023-12-06 12:55:55', b'0'); | |
| 2140 | -INSERT INTO `system_menu` (`id`, `name`, `permission`, `type`, `sort`, `parent_id`, `path`, `icon`, `component`, `component_name`, `status`, `visible`, `keep_alive`, `always_show`, `creator`, `create_time`, `updater`, `update_time`, `deleted`) VALUES (2539, 'Ureport2报表创建', 'report:ureport-data:create', 3, 2, 2537, '', '', '', NULL, 0, b'1', b'1', b'1', '', '2023-12-06 12:55:55', '', '2023-12-06 12:55:55', b'0'); | |
| 2141 | -INSERT INTO `system_menu` (`id`, `name`, `permission`, `type`, `sort`, `parent_id`, `path`, `icon`, `component`, `component_name`, `status`, `visible`, `keep_alive`, `always_show`, `creator`, `create_time`, `updater`, `update_time`, `deleted`) VALUES (2540, 'Ureport2报表更新', 'report:ureport-data:update', 3, 3, 2537, '', '', '', NULL, 0, b'1', b'1', b'1', '', '2023-12-06 12:55:55', '', '2023-12-06 12:55:55', b'0'); | |
| 2142 | -INSERT INTO `system_menu` (`id`, `name`, `permission`, `type`, `sort`, `parent_id`, `path`, `icon`, `component`, `component_name`, `status`, `visible`, `keep_alive`, `always_show`, `creator`, `create_time`, `updater`, `update_time`, `deleted`) VALUES (2541, 'Ureport2报表删除', 'report:ureport-data:delete', 3, 4, 2537, '', '', '', NULL, 0, b'1', b'1', b'1', '', '2023-12-06 12:55:55', '', '2023-12-06 12:55:55', b'0'); | |
| 2143 | -INSERT INTO `system_menu` (`id`, `name`, `permission`, `type`, `sort`, `parent_id`, `path`, `icon`, `component`, `component_name`, `status`, `visible`, `keep_alive`, `always_show`, `creator`, `create_time`, `updater`, `update_time`, `deleted`) VALUES (2542, 'Ureport2报表导出', 'report:ureport-data:export', 3, 5, 2537, '', '', '', NULL, 0, b'1', b'1', b'1', '', '2023-12-06 12:55:55', '', '2023-12-06 12:55:55', b'0'); | |
| 2144 | 2148 | INSERT INTO `system_menu` (`id`, `name`, `permission`, `type`, `sort`, `parent_id`, `path`, `icon`, `component`, `component_name`, `status`, `visible`, `keep_alive`, `always_show`, `creator`, `create_time`, `updater`, `update_time`, `deleted`) VALUES (2543, '关联商机', 'crm:contact:create-business', 3, 10, 2416, '', '', '', '', 0, b'1', b'1', b'1', '1', '2024-01-02 17:28:25', '1', '2024-01-02 17:28:25', b'0'); |
| 2145 | 2149 | INSERT INTO `system_menu` (`id`, `name`, `permission`, `type`, `sort`, `parent_id`, `path`, `icon`, `component`, `component_name`, `status`, `visible`, `keep_alive`, `always_show`, `creator`, `create_time`, `updater`, `update_time`, `deleted`) VALUES (2544, '取关商机', 'crm:contact:delete-business', 3, 11, 2416, '', '', '', '', 0, b'1', b'1', b'1', '1', '2024-01-02 17:28:43', '1', '2024-01-02 17:28:51', b'0'); |
| 2146 | 2150 | INSERT INTO `system_menu` (`id`, `name`, `permission`, `type`, `sort`, `parent_id`, `path`, `icon`, `component`, `component_name`, `status`, `visible`, `keep_alive`, `always_show`, `creator`, `create_time`, `updater`, `update_time`, `deleted`) VALUES (2545, '商品统计', '', 2, 3, 2358, 'product', 'fa:product-hunt', 'mall/statistics/product/index', 'ProductStatistics', 0, b'1', b'1', b'1', '', '2023-12-15 18:54:28', '1', '2024-02-26 20:41:52', b'0'); |
| ... | ... | @@ -2333,6 +2337,8 @@ INSERT INTO `system_menu` (`id`, `name`, `permission`, `type`, `sort`, `parent_i |
| 2333 | 2337 | INSERT INTO `system_menu` (`id`, `name`, `permission`, `type`, `sort`, `parent_id`, `path`, `icon`, `component`, `component_name`, `status`, `visible`, `keep_alive`, `always_show`, `creator`, `create_time`, `updater`, `update_time`, `deleted`) VALUES (2733, '流程表达式创建', 'bpm:process-expression:create', 3, 2, 2731, '', '', '', NULL, 0, b'1', b'1', b'1', '', '2024-03-09 22:35:08', '', '2024-03-09 22:35:08', b'0'); |
| 2334 | 2338 | INSERT INTO `system_menu` (`id`, `name`, `permission`, `type`, `sort`, `parent_id`, `path`, `icon`, `component`, `component_name`, `status`, `visible`, `keep_alive`, `always_show`, `creator`, `create_time`, `updater`, `update_time`, `deleted`) VALUES (2734, '流程表达式更新', 'bpm:process-expression:update', 3, 3, 2731, '', '', '', NULL, 0, b'1', b'1', b'1', '', '2024-03-09 22:35:08', '', '2024-03-09 22:35:08', b'0'); |
| 2335 | 2339 | INSERT INTO `system_menu` (`id`, `name`, `permission`, `type`, `sort`, `parent_id`, `path`, `icon`, `component`, `component_name`, `status`, `visible`, `keep_alive`, `always_show`, `creator`, `create_time`, `updater`, `update_time`, `deleted`) VALUES (2735, '流程表达式删除', 'bpm:process-expression:delete', 3, 4, 2731, '', '', '', NULL, 0, b'1', b'1', b'1', '', '2024-03-09 22:35:08', '', '2024-03-09 22:35:08', b'0'); |
| 2340 | +INSERT INTO `system_menu` (`id`, `name`, `permission`, `type`, `sort`, `parent_id`, `path`, `icon`, `component`, `component_name`, `status`, `visible`, `keep_alive`, `always_show`, `creator`, `create_time`, `updater`, `update_time`, `deleted`) VALUES (2736, '员工业绩', '', 2, 3, 2560, 'performance', 'ep:dish-dot', 'crm/statistics/performance/index', 'CrmStatisticsPerformance', 0, b'1', b'1', b'1', '1', '2024-04-05 13:49:20', '1', '2024-04-05 13:49:20', b'0'); | |
| 2341 | +INSERT INTO `system_menu` (`id`, `name`, `permission`, `type`, `sort`, `parent_id`, `path`, `icon`, `component`, `component_name`, `status`, `visible`, `keep_alive`, `always_show`, `creator`, `create_time`, `updater`, `update_time`, `deleted`) VALUES (2737, '客户画像', '', 2, 4, 2560, 'portrait', 'ep:picture', 'crm/statistics/portrait/index', 'CrmStatisticsPortrait', 0, b'1', b'1', b'1', '1', '2024-04-05 13:57:40', '1', '2024-04-05 13:57:40', b'0'); | |
| 2336 | 2342 | COMMIT; |
| 2337 | 2343 | |
| 2338 | 2344 | -- ---------------------------- |
| ... | ... | @@ -2439,6 +2445,7 @@ CREATE TABLE `system_oauth2_access_token` ( |
| 2439 | 2445 | `id` bigint NOT NULL AUTO_INCREMENT COMMENT '编号', |
| 2440 | 2446 | `user_id` bigint NOT NULL COMMENT '用户编号', |
| 2441 | 2447 | `user_type` tinyint NOT NULL COMMENT '用户类型', |
| 2448 | + `user_info` varchar(512) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL COMMENT '用户信息', | |
| 2442 | 2449 | `access_token` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL COMMENT '访问令牌', |
| 2443 | 2450 | `refresh_token` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL COMMENT '刷新令牌', |
| 2444 | 2451 | `client_id` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL COMMENT '客户端编号', |
| ... | ... | @@ -2453,7 +2460,7 @@ CREATE TABLE `system_oauth2_access_token` ( |
| 2453 | 2460 | PRIMARY KEY (`id`) USING BTREE, |
| 2454 | 2461 | INDEX `idx_access_token`(`access_token` ASC) USING BTREE, |
| 2455 | 2462 | INDEX `idx_refresh_token`(`refresh_token` ASC) USING BTREE |
| 2456 | -) ENGINE = InnoDB AUTO_INCREMENT = 6042 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci COMMENT = 'OAuth2 访问令牌'; | |
| 2463 | +) ENGINE = InnoDB AUTO_INCREMENT = 6439 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci COMMENT = 'OAuth2 访问令牌'; | |
| 2457 | 2464 | |
| 2458 | 2465 | -- ---------------------------- |
| 2459 | 2466 | -- Records of system_oauth2_access_token |
| ... | ... | @@ -2575,7 +2582,7 @@ CREATE TABLE `system_oauth2_refresh_token` ( |
| 2575 | 2582 | `deleted` bit(1) NOT NULL DEFAULT b'0' COMMENT '是否删除', |
| 2576 | 2583 | `tenant_id` bigint NOT NULL DEFAULT 0 COMMENT '租户编号', |
| 2577 | 2584 | PRIMARY KEY (`id`) USING BTREE |
| 2578 | -) ENGINE = InnoDB AUTO_INCREMENT = 1415 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci COMMENT = 'OAuth2 刷新令牌'; | |
| 2585 | +) ENGINE = InnoDB AUTO_INCREMENT = 1463 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci COMMENT = 'OAuth2 刷新令牌'; | |
| 2579 | 2586 | |
| 2580 | 2587 | -- ---------------------------- |
| 2581 | 2588 | -- Records of system_oauth2_refresh_token |
| ... | ... | @@ -2592,46 +2599,6 @@ CREATE TABLE `system_operate_log` ( |
| 2592 | 2599 | `trace_id` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '' COMMENT '链路追踪编号', |
| 2593 | 2600 | `user_id` bigint NOT NULL COMMENT '用户编号', |
| 2594 | 2601 | `user_type` tinyint NOT NULL DEFAULT 0 COMMENT '用户类型', |
| 2595 | - `module` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL COMMENT '模块标题', | |
| 2596 | - `name` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL COMMENT '操作名', | |
| 2597 | - `type` bigint NOT NULL DEFAULT 0 COMMENT '操作分类', | |
| 2598 | - `content` varchar(2000) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '' COMMENT '操作内容', | |
| 2599 | - `exts` varchar(512) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '' COMMENT '拓展字段', | |
| 2600 | - `request_method` varchar(16) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT '' COMMENT '请求方法名', | |
| 2601 | - `request_url` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT '' COMMENT '请求地址', | |
| 2602 | - `user_ip` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT NULL COMMENT '用户 IP', | |
| 2603 | - `user_agent` varchar(200) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT NULL COMMENT '浏览器 UA', | |
| 2604 | - `java_method` varchar(512) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '' COMMENT 'Java 方法名', | |
| 2605 | - `java_method_args` varchar(8000) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT '' COMMENT 'Java 方法的参数', | |
| 2606 | - `start_time` datetime NOT NULL COMMENT '操作时间', | |
| 2607 | - `duration` int NOT NULL COMMENT '执行时长', | |
| 2608 | - `result_code` int NOT NULL DEFAULT 0 COMMENT '结果码', | |
| 2609 | - `result_msg` varchar(512) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT '' COMMENT '结果提示', | |
| 2610 | - `result_data` varchar(4000) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT '' COMMENT '结果数据', | |
| 2611 | - `creator` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT '' COMMENT '创建者', | |
| 2612 | - `create_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间', | |
| 2613 | - `updater` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT '' COMMENT '更新者', | |
| 2614 | - `update_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间', | |
| 2615 | - `deleted` bit(1) NOT NULL DEFAULT b'0' COMMENT '是否删除', | |
| 2616 | - `tenant_id` bigint NOT NULL DEFAULT 0 COMMENT '租户编号', | |
| 2617 | - PRIMARY KEY (`id`) USING BTREE | |
| 2618 | -) ENGINE = InnoDB AUTO_INCREMENT = 11782 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci COMMENT = '操作日志记录'; | |
| 2619 | - | |
| 2620 | --- ---------------------------- | |
| 2621 | --- Records of system_operate_log | |
| 2622 | --- ---------------------------- | |
| 2623 | -BEGIN; | |
| 2624 | -COMMIT; | |
| 2625 | - | |
| 2626 | --- ---------------------------- | |
| 2627 | --- Table structure for system_operate_log_v2 | |
| 2628 | --- ---------------------------- | |
| 2629 | -DROP TABLE IF EXISTS `system_operate_log_v2`; | |
| 2630 | -CREATE TABLE `system_operate_log_v2` ( | |
| 2631 | - `id` bigint NOT NULL AUTO_INCREMENT COMMENT '日志主键', | |
| 2632 | - `trace_id` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '' COMMENT '链路追踪编号', | |
| 2633 | - `user_id` bigint NOT NULL COMMENT '用户编号', | |
| 2634 | - `user_type` tinyint NOT NULL DEFAULT 0 COMMENT '用户类型', | |
| 2635 | 2602 | `type` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL COMMENT '操作模块类型', |
| 2636 | 2603 | `sub_type` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL COMMENT '操作名', |
| 2637 | 2604 | `biz_id` bigint NOT NULL COMMENT '操作数据模块编号', |
| ... | ... | @@ -2648,10 +2615,10 @@ CREATE TABLE `system_operate_log_v2` ( |
| 2648 | 2615 | `deleted` bit(1) NOT NULL DEFAULT b'0' COMMENT '是否删除', |
| 2649 | 2616 | `tenant_id` bigint NOT NULL DEFAULT 0 COMMENT '租户编号', |
| 2650 | 2617 | PRIMARY KEY (`id`) USING BTREE |
| 2651 | -) ENGINE = InnoDB AUTO_INCREMENT = 9018 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci COMMENT = '操作日志记录 V2 版本'; | |
| 2618 | +) ENGINE = InnoDB AUTO_INCREMENT = 9035 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci COMMENT = '操作日志记录 V2 版本'; | |
| 2652 | 2619 | |
| 2653 | 2620 | -- ---------------------------- |
| 2654 | --- Records of system_operate_log_v2 | |
| 2621 | +-- Records of system_operate_log | |
| 2655 | 2622 | -- ---------------------------- |
| 2656 | 2623 | BEGIN; |
| 2657 | 2624 | COMMIT; |
| ... | ... | @@ -2674,7 +2641,7 @@ CREATE TABLE `system_post` ( |
| 2674 | 2641 | `deleted` bit(1) NOT NULL DEFAULT b'0' COMMENT '是否删除', |
| 2675 | 2642 | `tenant_id` bigint NOT NULL DEFAULT 0 COMMENT '租户编号', |
| 2676 | 2643 | PRIMARY KEY (`id`) USING BTREE |
| 2677 | -) ENGINE = InnoDB AUTO_INCREMENT = 5 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci COMMENT = '岗位信息表'; | |
| 2644 | +) ENGINE = InnoDB AUTO_INCREMENT = 6 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci COMMENT = '岗位信息表'; | |
| 2678 | 2645 | |
| 2679 | 2646 | -- ---------------------------- |
| 2680 | 2647 | -- Records of system_post |
| ... | ... | @@ -2683,6 +2650,7 @@ BEGIN; |
| 2683 | 2650 | INSERT INTO `system_post` (`id`, `code`, `name`, `sort`, `status`, `remark`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (1, 'ceo', '董事长', 1, 0, '', 'admin', '2021-01-06 17:03:48', '1', '2023-02-11 15:19:04', b'0', 1); |
| 2684 | 2651 | INSERT INTO `system_post` (`id`, `code`, `name`, `sort`, `status`, `remark`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (2, 'se', '项目经理', 2, 0, '', 'admin', '2021-01-05 17:03:48', '1', '2023-11-15 09:18:20', b'0', 1); |
| 2685 | 2652 | INSERT INTO `system_post` (`id`, `code`, `name`, `sort`, `status`, `remark`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (4, 'user', '普通员工', 4, 0, '111', 'admin', '2021-01-05 17:03:48', '1', '2023-12-02 10:04:37', b'0', 1); |
| 2653 | +INSERT INTO `system_post` (`id`, `code`, `name`, `sort`, `status`, `remark`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (5, 'HR', '人力资源', 5, 0, '', '1', '2024-03-24 20:45:40', '1', '2024-03-24 20:45:40', b'0', 1); | |
| 2686 | 2654 | COMMIT; |
| 2687 | 2655 | |
| 2688 | 2656 | -- ---------------------------- |
| ... | ... | @@ -2706,7 +2674,7 @@ CREATE TABLE `system_role` ( |
| 2706 | 2674 | `deleted` bit(1) NOT NULL DEFAULT b'0' COMMENT '是否删除', |
| 2707 | 2675 | `tenant_id` bigint NOT NULL DEFAULT 0 COMMENT '租户编号', |
| 2708 | 2676 | PRIMARY KEY (`id`) USING BTREE |
| 2709 | -) ENGINE = InnoDB AUTO_INCREMENT = 144 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci COMMENT = '角色信息表'; | |
| 2677 | +) ENGINE = InnoDB AUTO_INCREMENT = 146 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci COMMENT = '角色信息表'; | |
| 2710 | 2678 | |
| 2711 | 2679 | -- ---------------------------- |
| 2712 | 2680 | -- Records of system_role |
| ... | ... | @@ -2715,7 +2683,7 @@ BEGIN; |
| 2715 | 2683 | INSERT INTO `system_role` (`id`, `name`, `code`, `sort`, `data_scope`, `data_scope_dept_ids`, `status`, `type`, `remark`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (1, '超级管理员', 'super_admin', 1, 1, '', 0, 1, '超级管理员', 'admin', '2021-01-05 17:03:48', '', '2022-02-22 05:08:21', b'0', 1); |
| 2716 | 2684 | INSERT INTO `system_role` (`id`, `name`, `code`, `sort`, `data_scope`, `data_scope_dept_ids`, `status`, `type`, `remark`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (2, '普通角色', 'common', 2, 2, '', 0, 1, '普通角色', 'admin', '2021-01-05 17:03:48', '', '2022-02-22 05:08:20', b'0', 1); |
| 2717 | 2685 | INSERT INTO `system_role` (`id`, `name`, `code`, `sort`, `data_scope`, `data_scope_dept_ids`, `status`, `type`, `remark`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (3, 'CRM 管理员', 'crm_admin', 2, 1, '', 0, 1, 'CRM 专属角色', '1', '2024-02-24 10:51:13', '1', '2024-02-24 02:51:32', b'0', 1); |
| 2718 | -INSERT INTO `system_role` (`id`, `name`, `code`, `sort`, `data_scope`, `data_scope_dept_ids`, `status`, `type`, `remark`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (101, '测试账号', 'test', 0, 2, '[]', 0, 2, '我想测试', '', '2021-01-06 13:49:35', '1', '2023-12-07 08:41:16', b'0', 1); | |
| 2686 | +INSERT INTO `system_role` (`id`, `name`, `code`, `sort`, `data_scope`, `data_scope_dept_ids`, `status`, `type`, `remark`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (101, '测试账号', 'test', 0, 1, '[]', 0, 2, '我想测试', '', '2021-01-06 13:49:35', '1', '2024-03-24 22:22:45', b'0', 1); | |
| 2719 | 2687 | INSERT INTO `system_role` (`id`, `name`, `code`, `sort`, `data_scope`, `data_scope_dept_ids`, `status`, `type`, `remark`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (109, '租户管理员', 'tenant_admin', 0, 1, '', 0, 1, '系统自动生成', '1', '2022-02-22 00:56:14', '1', '2022-02-22 00:56:14', b'0', 121); |
| 2720 | 2688 | INSERT INTO `system_role` (`id`, `name`, `code`, `sort`, `data_scope`, `data_scope_dept_ids`, `status`, `type`, `remark`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (110, '测试角色', 'test', 0, 1, '[]', 0, 2, '嘿嘿', '110', '2022-02-23 00:14:34', '110', '2022-02-23 13:14:58', b'0', 121); |
| 2721 | 2689 | INSERT INTO `system_role` (`id`, `name`, `code`, `sort`, `data_scope`, `data_scope_dept_ids`, `status`, `type`, `remark`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (111, '租户管理员', 'tenant_admin', 0, 1, '', 0, 1, '系统自动生成', '1', '2022-03-07 21:37:58', '1', '2022-03-07 21:37:58', b'0', 122); |
| ... | ... | @@ -2731,6 +2699,7 @@ INSERT INTO `system_role` (`id`, `name`, `code`, `sort`, `data_scope`, `data_sco |
| 2731 | 2699 | INSERT INTO `system_role` (`id`, `name`, `code`, `sort`, `data_scope`, `data_scope_dept_ids`, `status`, `type`, `remark`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (140, '租户管理员', 'tenant_admin', 0, 1, '', 0, 1, '系统自动生成', '1', '2023-12-02 23:35:05', '1', '2023-12-02 23:35:05', b'0', 151); |
| 2732 | 2700 | INSERT INTO `system_role` (`id`, `name`, `code`, `sort`, `data_scope`, `data_scope_dept_ids`, `status`, `type`, `remark`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (141, '租户管理员', 'tenant_admin', 0, 1, '', 0, 1, '系统自动生成', '1', '2023-12-30 11:43:17', '1', '2023-12-30 11:43:17', b'0', 152); |
| 2733 | 2701 | INSERT INTO `system_role` (`id`, `name`, `code`, `sort`, `data_scope`, `data_scope_dept_ids`, `status`, `type`, `remark`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (143, '租户管理员', 'tenant_admin', 0, 1, '', 0, 1, '系统自动生成', '1', '2024-02-27 21:58:25', '1', '2024-02-27 21:58:25', b'0', 153); |
| 2702 | +INSERT INTO `system_role` (`id`, `name`, `code`, `sort`, `data_scope`, `data_scope_dept_ids`, `status`, `type`, `remark`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (144, '租户管理员', 'tenant_admin', 0, 1, '', 0, 1, '系统自动生成', '1', '2024-03-30 17:52:59', '1', '2024-03-30 17:52:59', b'0', 154); | |
| 2734 | 2703 | COMMIT; |
| 2735 | 2704 | |
| 2736 | 2705 | -- ---------------------------- |
| ... | ... | @@ -2748,7 +2717,7 @@ CREATE TABLE `system_role_menu` ( |
| 2748 | 2717 | `deleted` bit(1) NOT NULL DEFAULT b'0' COMMENT '是否删除', |
| 2749 | 2718 | `tenant_id` bigint NOT NULL DEFAULT 0 COMMENT '租户编号', |
| 2750 | 2719 | PRIMARY KEY (`id`) USING BTREE |
| 2751 | -) ENGINE = InnoDB AUTO_INCREMENT = 4042 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci COMMENT = '角色和菜单关联表'; | |
| 2720 | +) ENGINE = InnoDB AUTO_INCREMENT = 4517 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci COMMENT = '角色和菜单关联表'; | |
| 2752 | 2721 | |
| 2753 | 2722 | -- ---------------------------- |
| 2754 | 2723 | -- Records of system_role_menu |
| ... | ... | @@ -4518,12 +4487,6 @@ INSERT INTO `system_role_menu` (`id`, `role_id`, `menu_id`, `creator`, `create_t |
| 4518 | 4487 | INSERT INTO `system_role_menu` (`id`, `role_id`, `menu_id`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (3845, 1, 2534, '1', '2024-01-02 17:35:25', '1', '2024-01-02 17:35:25', b'0', 1); |
| 4519 | 4488 | INSERT INTO `system_role_menu` (`id`, `role_id`, `menu_id`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (3846, 1, 2535, '1', '2024-01-02 17:35:25', '1', '2024-01-02 17:35:25', b'0', 1); |
| 4520 | 4489 | INSERT INTO `system_role_menu` (`id`, `role_id`, `menu_id`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (3847, 1, 2536, '1', '2024-01-02 17:35:25', '1', '2024-01-02 17:35:25', b'0', 1); |
| 4521 | -INSERT INTO `system_role_menu` (`id`, `role_id`, `menu_id`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (3848, 1, 2537, '1', '2024-01-02 17:35:25', '1', '2024-01-02 17:35:25', b'0', 1); | |
| 4522 | -INSERT INTO `system_role_menu` (`id`, `role_id`, `menu_id`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (3849, 1, 2538, '1', '2024-01-02 17:35:25', '1', '2024-01-02 17:35:25', b'0', 1); | |
| 4523 | -INSERT INTO `system_role_menu` (`id`, `role_id`, `menu_id`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (3850, 1, 2539, '1', '2024-01-02 17:35:25', '1', '2024-01-02 17:35:25', b'0', 1); | |
| 4524 | -INSERT INTO `system_role_menu` (`id`, `role_id`, `menu_id`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (3851, 1, 2540, '1', '2024-01-02 17:35:25', '1', '2024-01-02 17:35:25', b'0', 1); | |
| 4525 | -INSERT INTO `system_role_menu` (`id`, `role_id`, `menu_id`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (3852, 1, 2541, '1', '2024-01-02 17:35:25', '1', '2024-01-02 17:35:25', b'0', 1); | |
| 4526 | -INSERT INTO `system_role_menu` (`id`, `role_id`, `menu_id`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (3853, 1, 2542, '1', '2024-01-02 17:35:25', '1', '2024-01-02 17:35:25', b'0', 1); | |
| 4527 | 4490 | INSERT INTO `system_role_menu` (`id`, `role_id`, `menu_id`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (3854, 1, 2543, '1', '2024-01-02 17:35:25', '1', '2024-01-02 17:35:25', b'0', 1); |
| 4528 | 4491 | INSERT INTO `system_role_menu` (`id`, `role_id`, `menu_id`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (3855, 1, 2544, '1', '2024-01-02 17:35:25', '1', '2024-01-02 17:35:25', b'0', 1); |
| 4529 | 4492 | INSERT INTO `system_role_menu` (`id`, `role_id`, `menu_id`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (3856, 1, 2000, '1', '2024-01-02 17:35:25', '1', '2024-01-02 17:35:25', b'0', 1); |
| ... | ... | @@ -4712,6 +4675,481 @@ INSERT INTO `system_role_menu` (`id`, `role_id`, `menu_id`, `creator`, `create_t |
| 4712 | 4675 | INSERT INTO `system_role_menu` (`id`, `role_id`, `menu_id`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (4039, 143, 1018, '1', '2024-02-27 21:58:25', '1', '2024-02-27 21:58:25', b'0', 153); |
| 4713 | 4676 | INSERT INTO `system_role_menu` (`id`, `role_id`, `menu_id`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (4040, 143, 1019, '1', '2024-02-27 21:58:25', '1', '2024-02-27 21:58:25', b'0', 153); |
| 4714 | 4677 | INSERT INTO `system_role_menu` (`id`, `role_id`, `menu_id`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (4041, 143, 1020, '1', '2024-02-27 21:58:25', '1', '2024-02-27 21:58:25', b'0', 153); |
| 4678 | +INSERT INTO `system_role_menu` (`id`, `role_id`, `menu_id`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (4042, 144, 1, '1', '2024-03-30 17:52:59', '1', '2024-03-30 17:52:59', b'0', 154); | |
| 4679 | +INSERT INTO `system_role_menu` (`id`, `role_id`, `menu_id`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (4043, 144, 2, '1', '2024-03-30 17:52:59', '1', '2024-03-30 17:52:59', b'0', 154); | |
| 4680 | +INSERT INTO `system_role_menu` (`id`, `role_id`, `menu_id`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (4044, 144, 1031, '1', '2024-03-30 17:52:59', '1', '2024-03-30 17:52:59', b'0', 154); | |
| 4681 | +INSERT INTO `system_role_menu` (`id`, `role_id`, `menu_id`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (4045, 144, 1032, '1', '2024-03-30 17:52:59', '1', '2024-03-30 17:52:59', b'0', 154); | |
| 4682 | +INSERT INTO `system_role_menu` (`id`, `role_id`, `menu_id`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (4046, 144, 1033, '1', '2024-03-30 17:52:59', '1', '2024-03-30 17:52:59', b'0', 154); | |
| 4683 | +INSERT INTO `system_role_menu` (`id`, `role_id`, `menu_id`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (4047, 144, 1034, '1', '2024-03-30 17:52:59', '1', '2024-03-30 17:52:59', b'0', 154); | |
| 4684 | +INSERT INTO `system_role_menu` (`id`, `role_id`, `menu_id`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (4048, 144, 1035, '1', '2024-03-30 17:52:59', '1', '2024-03-30 17:52:59', b'0', 154); | |
| 4685 | +INSERT INTO `system_role_menu` (`id`, `role_id`, `menu_id`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (4049, 144, 1036, '1', '2024-03-30 17:52:59', '1', '2024-03-30 17:52:59', b'0', 154); | |
| 4686 | +INSERT INTO `system_role_menu` (`id`, `role_id`, `menu_id`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (4050, 144, 1037, '1', '2024-03-30 17:52:59', '1', '2024-03-30 17:52:59', b'0', 154); | |
| 4687 | +INSERT INTO `system_role_menu` (`id`, `role_id`, `menu_id`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (4051, 144, 1038, '1', '2024-03-30 17:52:59', '1', '2024-03-30 17:52:59', b'0', 154); | |
| 4688 | +INSERT INTO `system_role_menu` (`id`, `role_id`, `menu_id`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (4052, 144, 1039, '1', '2024-03-30 17:52:59', '1', '2024-03-30 17:52:59', b'0', 154); | |
| 4689 | +INSERT INTO `system_role_menu` (`id`, `role_id`, `menu_id`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (4053, 144, 1050, '1', '2024-03-30 17:52:59', '1', '2024-03-30 17:52:59', b'0', 154); | |
| 4690 | +INSERT INTO `system_role_menu` (`id`, `role_id`, `menu_id`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (4054, 144, 1051, '1', '2024-03-30 17:52:59', '1', '2024-03-30 17:52:59', b'0', 154); | |
| 4691 | +INSERT INTO `system_role_menu` (`id`, `role_id`, `menu_id`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (4055, 144, 1052, '1', '2024-03-30 17:52:59', '1', '2024-03-30 17:52:59', b'0', 154); | |
| 4692 | +INSERT INTO `system_role_menu` (`id`, `role_id`, `menu_id`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (4056, 144, 1053, '1', '2024-03-30 17:52:59', '1', '2024-03-30 17:52:59', b'0', 154); | |
| 4693 | +INSERT INTO `system_role_menu` (`id`, `role_id`, `menu_id`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (4057, 144, 1054, '1', '2024-03-30 17:52:59', '1', '2024-03-30 17:52:59', b'0', 154); | |
| 4694 | +INSERT INTO `system_role_menu` (`id`, `role_id`, `menu_id`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (4058, 144, 1056, '1', '2024-03-30 17:52:59', '1', '2024-03-30 17:52:59', b'0', 154); | |
| 4695 | +INSERT INTO `system_role_menu` (`id`, `role_id`, `menu_id`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (4059, 144, 1057, '1', '2024-03-30 17:52:59', '1', '2024-03-30 17:52:59', b'0', 154); | |
| 4696 | +INSERT INTO `system_role_menu` (`id`, `role_id`, `menu_id`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (4060, 144, 1058, '1', '2024-03-30 17:52:59', '1', '2024-03-30 17:52:59', b'0', 154); | |
| 4697 | +INSERT INTO `system_role_menu` (`id`, `role_id`, `menu_id`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (4061, 144, 1059, '1', '2024-03-30 17:52:59', '1', '2024-03-30 17:52:59', b'0', 154); | |
| 4698 | +INSERT INTO `system_role_menu` (`id`, `role_id`, `menu_id`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (4062, 144, 1060, '1', '2024-03-30 17:52:59', '1', '2024-03-30 17:52:59', b'0', 154); | |
| 4699 | +INSERT INTO `system_role_menu` (`id`, `role_id`, `menu_id`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (4063, 144, 1063, '1', '2024-03-30 17:52:59', '1', '2024-03-30 17:52:59', b'0', 154); | |
| 4700 | +INSERT INTO `system_role_menu` (`id`, `role_id`, `menu_id`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (4064, 144, 1064, '1', '2024-03-30 17:52:59', '1', '2024-03-30 17:52:59', b'0', 154); | |
| 4701 | +INSERT INTO `system_role_menu` (`id`, `role_id`, `menu_id`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (4065, 144, 1065, '1', '2024-03-30 17:52:59', '1', '2024-03-30 17:52:59', b'0', 154); | |
| 4702 | +INSERT INTO `system_role_menu` (`id`, `role_id`, `menu_id`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (4066, 144, 1066, '1', '2024-03-30 17:52:59', '1', '2024-03-30 17:52:59', b'0', 154); | |
| 4703 | +INSERT INTO `system_role_menu` (`id`, `role_id`, `menu_id`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (4067, 144, 1067, '1', '2024-03-30 17:52:59', '1', '2024-03-30 17:52:59', b'0', 154); | |
| 4704 | +INSERT INTO `system_role_menu` (`id`, `role_id`, `menu_id`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (4068, 144, 1070, '1', '2024-03-30 17:52:59', '1', '2024-03-30 17:52:59', b'0', 154); | |
| 4705 | +INSERT INTO `system_role_menu` (`id`, `role_id`, `menu_id`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (4069, 144, 1075, '1', '2024-03-30 17:52:59', '1', '2024-03-30 17:52:59', b'0', 154); | |
| 4706 | +INSERT INTO `system_role_menu` (`id`, `role_id`, `menu_id`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (4070, 144, 1076, '1', '2024-03-30 17:52:59', '1', '2024-03-30 17:52:59', b'0', 154); | |
| 4707 | +INSERT INTO `system_role_menu` (`id`, `role_id`, `menu_id`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (4071, 144, 1077, '1', '2024-03-30 17:52:59', '1', '2024-03-30 17:52:59', b'0', 154); | |
| 4708 | +INSERT INTO `system_role_menu` (`id`, `role_id`, `menu_id`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (4072, 144, 1078, '1', '2024-03-30 17:52:59', '1', '2024-03-30 17:52:59', b'0', 154); | |
| 4709 | +INSERT INTO `system_role_menu` (`id`, `role_id`, `menu_id`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (4073, 144, 1082, '1', '2024-03-30 17:52:59', '1', '2024-03-30 17:52:59', b'0', 154); | |
| 4710 | +INSERT INTO `system_role_menu` (`id`, `role_id`, `menu_id`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (4074, 144, 1083, '1', '2024-03-30 17:52:59', '1', '2024-03-30 17:52:59', b'0', 154); | |
| 4711 | +INSERT INTO `system_role_menu` (`id`, `role_id`, `menu_id`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (4075, 144, 1084, '1', '2024-03-30 17:52:59', '1', '2024-03-30 17:52:59', b'0', 154); | |
| 4712 | +INSERT INTO `system_role_menu` (`id`, `role_id`, `menu_id`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (4076, 144, 1085, '1', '2024-03-30 17:52:59', '1', '2024-03-30 17:52:59', b'0', 154); | |
| 4713 | +INSERT INTO `system_role_menu` (`id`, `role_id`, `menu_id`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (4077, 144, 1086, '1', '2024-03-30 17:52:59', '1', '2024-03-30 17:52:59', b'0', 154); | |
| 4714 | +INSERT INTO `system_role_menu` (`id`, `role_id`, `menu_id`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (4078, 144, 1087, '1', '2024-03-30 17:52:59', '1', '2024-03-30 17:52:59', b'0', 154); | |
| 4715 | +INSERT INTO `system_role_menu` (`id`, `role_id`, `menu_id`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (4079, 144, 1088, '1', '2024-03-30 17:52:59', '1', '2024-03-30 17:52:59', b'0', 154); | |
| 4716 | +INSERT INTO `system_role_menu` (`id`, `role_id`, `menu_id`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (4080, 144, 1089, '1', '2024-03-30 17:52:59', '1', '2024-03-30 17:52:59', b'0', 154); | |
| 4717 | +INSERT INTO `system_role_menu` (`id`, `role_id`, `menu_id`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (4081, 144, 1090, '1', '2024-03-30 17:52:59', '1', '2024-03-30 17:52:59', b'0', 154); | |
| 4718 | +INSERT INTO `system_role_menu` (`id`, `role_id`, `menu_id`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (4082, 144, 1091, '1', '2024-03-30 17:52:59', '1', '2024-03-30 17:52:59', b'0', 154); | |
| 4719 | +INSERT INTO `system_role_menu` (`id`, `role_id`, `menu_id`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (4083, 144, 1092, '1', '2024-03-30 17:52:59', '1', '2024-03-30 17:52:59', b'0', 154); | |
| 4720 | +INSERT INTO `system_role_menu` (`id`, `role_id`, `menu_id`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (4084, 144, 100, '1', '2024-03-30 17:52:59', '1', '2024-03-30 17:52:59', b'0', 154); | |
| 4721 | +INSERT INTO `system_role_menu` (`id`, `role_id`, `menu_id`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (4085, 144, 101, '1', '2024-03-30 17:52:59', '1', '2024-03-30 17:52:59', b'0', 154); | |
| 4722 | +INSERT INTO `system_role_menu` (`id`, `role_id`, `menu_id`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (4086, 144, 102, '1', '2024-03-30 17:52:59', '1', '2024-03-30 17:52:59', b'0', 154); | |
| 4723 | +INSERT INTO `system_role_menu` (`id`, `role_id`, `menu_id`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (4087, 144, 103, '1', '2024-03-30 17:52:59', '1', '2024-03-30 17:52:59', b'0', 154); | |
| 4724 | +INSERT INTO `system_role_menu` (`id`, `role_id`, `menu_id`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (4088, 144, 106, '1', '2024-03-30 17:52:59', '1', '2024-03-30 17:52:59', b'0', 154); | |
| 4725 | +INSERT INTO `system_role_menu` (`id`, `role_id`, `menu_id`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (4089, 144, 107, '1', '2024-03-30 17:52:59', '1', '2024-03-30 17:52:59', b'0', 154); | |
| 4726 | +INSERT INTO `system_role_menu` (`id`, `role_id`, `menu_id`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (4090, 144, 110, '1', '2024-03-30 17:52:59', '1', '2024-03-30 17:52:59', b'0', 154); | |
| 4727 | +INSERT INTO `system_role_menu` (`id`, `role_id`, `menu_id`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (4091, 144, 111, '1', '2024-03-30 17:52:59', '1', '2024-03-30 17:52:59', b'0', 154); | |
| 4728 | +INSERT INTO `system_role_menu` (`id`, `role_id`, `menu_id`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (4092, 144, 112, '1', '2024-03-30 17:52:59', '1', '2024-03-30 17:52:59', b'0', 154); | |
| 4729 | +INSERT INTO `system_role_menu` (`id`, `role_id`, `menu_id`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (4093, 144, 113, '1', '2024-03-30 17:52:59', '1', '2024-03-30 17:52:59', b'0', 154); | |
| 4730 | +INSERT INTO `system_role_menu` (`id`, `role_id`, `menu_id`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (4094, 144, 1138, '1', '2024-03-30 17:52:59', '1', '2024-03-30 17:52:59', b'0', 154); | |
| 4731 | +INSERT INTO `system_role_menu` (`id`, `role_id`, `menu_id`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (4095, 144, 114, '1', '2024-03-30 17:52:59', '1', '2024-03-30 17:52:59', b'0', 154); | |
| 4732 | +INSERT INTO `system_role_menu` (`id`, `role_id`, `menu_id`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (4096, 144, 1139, '1', '2024-03-30 17:52:59', '1', '2024-03-30 17:52:59', b'0', 154); | |
| 4733 | +INSERT INTO `system_role_menu` (`id`, `role_id`, `menu_id`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (4097, 144, 115, '1', '2024-03-30 17:52:59', '1', '2024-03-30 17:52:59', b'0', 154); | |
| 4734 | +INSERT INTO `system_role_menu` (`id`, `role_id`, `menu_id`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (4098, 144, 1140, '1', '2024-03-30 17:52:59', '1', '2024-03-30 17:52:59', b'0', 154); | |
| 4735 | +INSERT INTO `system_role_menu` (`id`, `role_id`, `menu_id`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (4099, 144, 116, '1', '2024-03-30 17:52:59', '1', '2024-03-30 17:52:59', b'0', 154); | |
| 4736 | +INSERT INTO `system_role_menu` (`id`, `role_id`, `menu_id`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (4100, 144, 1141, '1', '2024-03-30 17:52:59', '1', '2024-03-30 17:52:59', b'0', 154); | |
| 4737 | +INSERT INTO `system_role_menu` (`id`, `role_id`, `menu_id`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (4101, 144, 1142, '1', '2024-03-30 17:52:59', '1', '2024-03-30 17:52:59', b'0', 154); | |
| 4738 | +INSERT INTO `system_role_menu` (`id`, `role_id`, `menu_id`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (4102, 144, 1143, '1', '2024-03-30 17:52:59', '1', '2024-03-30 17:52:59', b'0', 154); | |
| 4739 | +INSERT INTO `system_role_menu` (`id`, `role_id`, `menu_id`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (4103, 144, 2472, '1', '2024-03-30 17:52:59', '1', '2024-03-30 17:52:59', b'0', 154); | |
| 4740 | +INSERT INTO `system_role_menu` (`id`, `role_id`, `menu_id`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (4104, 144, 2478, '1', '2024-03-30 17:52:59', '1', '2024-03-30 17:52:59', b'0', 154); | |
| 4741 | +INSERT INTO `system_role_menu` (`id`, `role_id`, `menu_id`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (4105, 144, 2479, '1', '2024-03-30 17:52:59', '1', '2024-03-30 17:52:59', b'0', 154); | |
| 4742 | +INSERT INTO `system_role_menu` (`id`, `role_id`, `menu_id`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (4106, 144, 2480, '1', '2024-03-30 17:52:59', '1', '2024-03-30 17:52:59', b'0', 154); | |
| 4743 | +INSERT INTO `system_role_menu` (`id`, `role_id`, `menu_id`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (4107, 144, 2481, '1', '2024-03-30 17:52:59', '1', '2024-03-30 17:52:59', b'0', 154); | |
| 4744 | +INSERT INTO `system_role_menu` (`id`, `role_id`, `menu_id`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (4108, 144, 2482, '1', '2024-03-30 17:52:59', '1', '2024-03-30 17:52:59', b'0', 154); | |
| 4745 | +INSERT INTO `system_role_menu` (`id`, `role_id`, `menu_id`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (4109, 144, 2483, '1', '2024-03-30 17:52:59', '1', '2024-03-30 17:52:59', b'0', 154); | |
| 4746 | +INSERT INTO `system_role_menu` (`id`, `role_id`, `menu_id`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (4110, 144, 2484, '1', '2024-03-30 17:52:59', '1', '2024-03-30 17:52:59', b'0', 154); | |
| 4747 | +INSERT INTO `system_role_menu` (`id`, `role_id`, `menu_id`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (4111, 144, 2485, '1', '2024-03-30 17:52:59', '1', '2024-03-30 17:52:59', b'0', 154); | |
| 4748 | +INSERT INTO `system_role_menu` (`id`, `role_id`, `menu_id`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (4112, 144, 2486, '1', '2024-03-30 17:52:59', '1', '2024-03-30 17:52:59', b'0', 154); | |
| 4749 | +INSERT INTO `system_role_menu` (`id`, `role_id`, `menu_id`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (4113, 144, 2487, '1', '2024-03-30 17:52:59', '1', '2024-03-30 17:52:59', b'0', 154); | |
| 4750 | +INSERT INTO `system_role_menu` (`id`, `role_id`, `menu_id`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (4114, 144, 2488, '1', '2024-03-30 17:52:59', '1', '2024-03-30 17:52:59', b'0', 154); | |
| 4751 | +INSERT INTO `system_role_menu` (`id`, `role_id`, `menu_id`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (4115, 144, 2489, '1', '2024-03-30 17:52:59', '1', '2024-03-30 17:52:59', b'0', 154); | |
| 4752 | +INSERT INTO `system_role_menu` (`id`, `role_id`, `menu_id`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (4116, 144, 2490, '1', '2024-03-30 17:52:59', '1', '2024-03-30 17:52:59', b'0', 154); | |
| 4753 | +INSERT INTO `system_role_menu` (`id`, `role_id`, `menu_id`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (4117, 144, 2491, '1', '2024-03-30 17:52:59', '1', '2024-03-30 17:52:59', b'0', 154); | |
| 4754 | +INSERT INTO `system_role_menu` (`id`, `role_id`, `menu_id`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (4118, 144, 2492, '1', '2024-03-30 17:52:59', '1', '2024-03-30 17:52:59', b'0', 154); | |
| 4755 | +INSERT INTO `system_role_menu` (`id`, `role_id`, `menu_id`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (4119, 144, 2493, '1', '2024-03-30 17:52:59', '1', '2024-03-30 17:52:59', b'0', 154); | |
| 4756 | +INSERT INTO `system_role_menu` (`id`, `role_id`, `menu_id`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (4120, 144, 2494, '1', '2024-03-30 17:52:59', '1', '2024-03-30 17:52:59', b'0', 154); | |
| 4757 | +INSERT INTO `system_role_menu` (`id`, `role_id`, `menu_id`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (4121, 144, 2495, '1', '2024-03-30 17:52:59', '1', '2024-03-30 17:52:59', b'0', 154); | |
| 4758 | +INSERT INTO `system_role_menu` (`id`, `role_id`, `menu_id`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (4122, 144, 2497, '1', '2024-03-30 17:52:59', '1', '2024-03-30 17:52:59', b'0', 154); | |
| 4759 | +INSERT INTO `system_role_menu` (`id`, `role_id`, `menu_id`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (4123, 144, 1224, '1', '2024-03-30 17:52:59', '1', '2024-03-30 17:52:59', b'0', 154); | |
| 4760 | +INSERT INTO `system_role_menu` (`id`, `role_id`, `menu_id`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (4124, 144, 1225, '1', '2024-03-30 17:52:59', '1', '2024-03-30 17:52:59', b'0', 154); | |
| 4761 | +INSERT INTO `system_role_menu` (`id`, `role_id`, `menu_id`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (4125, 144, 1226, '1', '2024-03-30 17:52:59', '1', '2024-03-30 17:52:59', b'0', 154); | |
| 4762 | +INSERT INTO `system_role_menu` (`id`, `role_id`, `menu_id`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (4126, 144, 1227, '1', '2024-03-30 17:52:59', '1', '2024-03-30 17:52:59', b'0', 154); | |
| 4763 | +INSERT INTO `system_role_menu` (`id`, `role_id`, `menu_id`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (4127, 144, 1228, '1', '2024-03-30 17:52:59', '1', '2024-03-30 17:52:59', b'0', 154); | |
| 4764 | +INSERT INTO `system_role_menu` (`id`, `role_id`, `menu_id`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (4128, 144, 1229, '1', '2024-03-30 17:52:59', '1', '2024-03-30 17:52:59', b'0', 154); | |
| 4765 | +INSERT INTO `system_role_menu` (`id`, `role_id`, `menu_id`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (4129, 144, 1237, '1', '2024-03-30 17:52:59', '1', '2024-03-30 17:52:59', b'0', 154); | |
| 4766 | +INSERT INTO `system_role_menu` (`id`, `role_id`, `menu_id`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (4130, 144, 1238, '1', '2024-03-30 17:52:59', '1', '2024-03-30 17:52:59', b'0', 154); | |
| 4767 | +INSERT INTO `system_role_menu` (`id`, `role_id`, `menu_id`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (4131, 144, 1239, '1', '2024-03-30 17:52:59', '1', '2024-03-30 17:52:59', b'0', 154); | |
| 4768 | +INSERT INTO `system_role_menu` (`id`, `role_id`, `menu_id`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (4132, 144, 1240, '1', '2024-03-30 17:52:59', '1', '2024-03-30 17:52:59', b'0', 154); | |
| 4769 | +INSERT INTO `system_role_menu` (`id`, `role_id`, `menu_id`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (4133, 144, 1241, '1', '2024-03-30 17:52:59', '1', '2024-03-30 17:52:59', b'0', 154); | |
| 4770 | +INSERT INTO `system_role_menu` (`id`, `role_id`, `menu_id`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (4134, 144, 1242, '1', '2024-03-30 17:52:59', '1', '2024-03-30 17:52:59', b'0', 154); | |
| 4771 | +INSERT INTO `system_role_menu` (`id`, `role_id`, `menu_id`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (4135, 144, 1243, '1', '2024-03-30 17:52:59', '1', '2024-03-30 17:52:59', b'0', 154); | |
| 4772 | +INSERT INTO `system_role_menu` (`id`, `role_id`, `menu_id`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (4136, 144, 2525, '1', '2024-03-30 17:52:59', '1', '2024-03-30 17:52:59', b'0', 154); | |
| 4773 | +INSERT INTO `system_role_menu` (`id`, `role_id`, `menu_id`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (4137, 144, 1255, '1', '2024-03-30 17:52:59', '1', '2024-03-30 17:52:59', b'0', 154); | |
| 4774 | +INSERT INTO `system_role_menu` (`id`, `role_id`, `menu_id`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (4138, 144, 1256, '1', '2024-03-30 17:52:59', '1', '2024-03-30 17:52:59', b'0', 154); | |
| 4775 | +INSERT INTO `system_role_menu` (`id`, `role_id`, `menu_id`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (4139, 144, 1001, '1', '2024-03-30 17:52:59', '1', '2024-03-30 17:52:59', b'0', 154); | |
| 4776 | +INSERT INTO `system_role_menu` (`id`, `role_id`, `menu_id`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (4140, 144, 1257, '1', '2024-03-30 17:52:59', '1', '2024-03-30 17:52:59', b'0', 154); | |
| 4777 | +INSERT INTO `system_role_menu` (`id`, `role_id`, `menu_id`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (4141, 144, 1002, '1', '2024-03-30 17:52:59', '1', '2024-03-30 17:52:59', b'0', 154); | |
| 4778 | +INSERT INTO `system_role_menu` (`id`, `role_id`, `menu_id`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (4142, 144, 1258, '1', '2024-03-30 17:52:59', '1', '2024-03-30 17:52:59', b'0', 154); | |
| 4779 | +INSERT INTO `system_role_menu` (`id`, `role_id`, `menu_id`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (4143, 144, 1003, '1', '2024-03-30 17:52:59', '1', '2024-03-30 17:52:59', b'0', 154); | |
| 4780 | +INSERT INTO `system_role_menu` (`id`, `role_id`, `menu_id`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (4144, 144, 1259, '1', '2024-03-30 17:52:59', '1', '2024-03-30 17:52:59', b'0', 154); | |
| 4781 | +INSERT INTO `system_role_menu` (`id`, `role_id`, `menu_id`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (4145, 144, 1004, '1', '2024-03-30 17:52:59', '1', '2024-03-30 17:52:59', b'0', 154); | |
| 4782 | +INSERT INTO `system_role_menu` (`id`, `role_id`, `menu_id`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (4146, 144, 1260, '1', '2024-03-30 17:52:59', '1', '2024-03-30 17:52:59', b'0', 154); | |
| 4783 | +INSERT INTO `system_role_menu` (`id`, `role_id`, `menu_id`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (4147, 144, 1005, '1', '2024-03-30 17:52:59', '1', '2024-03-30 17:52:59', b'0', 154); | |
| 4784 | +INSERT INTO `system_role_menu` (`id`, `role_id`, `menu_id`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (4148, 144, 1006, '1', '2024-03-30 17:52:59', '1', '2024-03-30 17:52:59', b'0', 154); | |
| 4785 | +INSERT INTO `system_role_menu` (`id`, `role_id`, `menu_id`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (4149, 144, 1007, '1', '2024-03-30 17:52:59', '1', '2024-03-30 17:52:59', b'0', 154); | |
| 4786 | +INSERT INTO `system_role_menu` (`id`, `role_id`, `menu_id`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (4150, 144, 1008, '1', '2024-03-30 17:52:59', '1', '2024-03-30 17:52:59', b'0', 154); | |
| 4787 | +INSERT INTO `system_role_menu` (`id`, `role_id`, `menu_id`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (4151, 144, 1009, '1', '2024-03-30 17:52:59', '1', '2024-03-30 17:52:59', b'0', 154); | |
| 4788 | +INSERT INTO `system_role_menu` (`id`, `role_id`, `menu_id`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (4152, 144, 1010, '1', '2024-03-30 17:52:59', '1', '2024-03-30 17:52:59', b'0', 154); | |
| 4789 | +INSERT INTO `system_role_menu` (`id`, `role_id`, `menu_id`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (4153, 144, 1011, '1', '2024-03-30 17:52:59', '1', '2024-03-30 17:52:59', b'0', 154); | |
| 4790 | +INSERT INTO `system_role_menu` (`id`, `role_id`, `menu_id`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (4154, 144, 1012, '1', '2024-03-30 17:52:59', '1', '2024-03-30 17:52:59', b'0', 154); | |
| 4791 | +INSERT INTO `system_role_menu` (`id`, `role_id`, `menu_id`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (4155, 144, 1013, '1', '2024-03-30 17:52:59', '1', '2024-03-30 17:52:59', b'0', 154); | |
| 4792 | +INSERT INTO `system_role_menu` (`id`, `role_id`, `menu_id`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (4156, 144, 1014, '1', '2024-03-30 17:52:59', '1', '2024-03-30 17:52:59', b'0', 154); | |
| 4793 | +INSERT INTO `system_role_menu` (`id`, `role_id`, `menu_id`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (4157, 144, 1015, '1', '2024-03-30 17:52:59', '1', '2024-03-30 17:52:59', b'0', 154); | |
| 4794 | +INSERT INTO `system_role_menu` (`id`, `role_id`, `menu_id`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (4158, 144, 1016, '1', '2024-03-30 17:52:59', '1', '2024-03-30 17:52:59', b'0', 154); | |
| 4795 | +INSERT INTO `system_role_menu` (`id`, `role_id`, `menu_id`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (4159, 144, 1017, '1', '2024-03-30 17:52:59', '1', '2024-03-30 17:52:59', b'0', 154); | |
| 4796 | +INSERT INTO `system_role_menu` (`id`, `role_id`, `menu_id`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (4160, 144, 1018, '1', '2024-03-30 17:52:59', '1', '2024-03-30 17:52:59', b'0', 154); | |
| 4797 | +INSERT INTO `system_role_menu` (`id`, `role_id`, `menu_id`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (4161, 144, 1019, '1', '2024-03-30 17:52:59', '1', '2024-03-30 17:52:59', b'0', 154); | |
| 4798 | +INSERT INTO `system_role_menu` (`id`, `role_id`, `menu_id`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (4162, 144, 1020, '1', '2024-03-30 17:52:59', '1', '2024-03-30 17:52:59', b'0', 154); | |
| 4799 | +INSERT INTO `system_role_menu` (`id`, `role_id`, `menu_id`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (4163, 109, 5, '1', '2024-03-30 17:53:17', '1', '2024-03-30 17:53:17', b'0', 121); | |
| 4800 | +INSERT INTO `system_role_menu` (`id`, `role_id`, `menu_id`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (4164, 109, 1118, '1', '2024-03-30 17:53:17', '1', '2024-03-30 17:53:17', b'0', 121); | |
| 4801 | +INSERT INTO `system_role_menu` (`id`, `role_id`, `menu_id`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (4165, 109, 1119, '1', '2024-03-30 17:53:17', '1', '2024-03-30 17:53:17', b'0', 121); | |
| 4802 | +INSERT INTO `system_role_menu` (`id`, `role_id`, `menu_id`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (4166, 109, 1120, '1', '2024-03-30 17:53:17', '1', '2024-03-30 17:53:17', b'0', 121); | |
| 4803 | +INSERT INTO `system_role_menu` (`id`, `role_id`, `menu_id`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (4167, 109, 2713, '1', '2024-03-30 17:53:17', '1', '2024-03-30 17:53:17', b'0', 121); | |
| 4804 | +INSERT INTO `system_role_menu` (`id`, `role_id`, `menu_id`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (4168, 109, 2714, '1', '2024-03-30 17:53:17', '1', '2024-03-30 17:53:17', b'0', 121); | |
| 4805 | +INSERT INTO `system_role_menu` (`id`, `role_id`, `menu_id`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (4169, 109, 2715, '1', '2024-03-30 17:53:17', '1', '2024-03-30 17:53:17', b'0', 121); | |
| 4806 | +INSERT INTO `system_role_menu` (`id`, `role_id`, `menu_id`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (4170, 109, 2716, '1', '2024-03-30 17:53:17', '1', '2024-03-30 17:53:17', b'0', 121); | |
| 4807 | +INSERT INTO `system_role_menu` (`id`, `role_id`, `menu_id`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (4171, 109, 2717, '1', '2024-03-30 17:53:17', '1', '2024-03-30 17:53:17', b'0', 121); | |
| 4808 | +INSERT INTO `system_role_menu` (`id`, `role_id`, `menu_id`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (4172, 109, 2718, '1', '2024-03-30 17:53:17', '1', '2024-03-30 17:53:17', b'0', 121); | |
| 4809 | +INSERT INTO `system_role_menu` (`id`, `role_id`, `menu_id`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (4173, 109, 2720, '1', '2024-03-30 17:53:17', '1', '2024-03-30 17:53:17', b'0', 121); | |
| 4810 | +INSERT INTO `system_role_menu` (`id`, `role_id`, `menu_id`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (4174, 109, 1185, '1', '2024-03-30 17:53:17', '1', '2024-03-30 17:53:17', b'0', 121); | |
| 4811 | +INSERT INTO `system_role_menu` (`id`, `role_id`, `menu_id`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (4175, 109, 2721, '1', '2024-03-30 17:53:17', '1', '2024-03-30 17:53:17', b'0', 121); | |
| 4812 | +INSERT INTO `system_role_menu` (`id`, `role_id`, `menu_id`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (4176, 109, 1186, '1', '2024-03-30 17:53:17', '1', '2024-03-30 17:53:17', b'0', 121); | |
| 4813 | +INSERT INTO `system_role_menu` (`id`, `role_id`, `menu_id`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (4177, 109, 2722, '1', '2024-03-30 17:53:17', '1', '2024-03-30 17:53:17', b'0', 121); | |
| 4814 | +INSERT INTO `system_role_menu` (`id`, `role_id`, `menu_id`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (4178, 109, 1187, '1', '2024-03-30 17:53:17', '1', '2024-03-30 17:53:17', b'0', 121); | |
| 4815 | +INSERT INTO `system_role_menu` (`id`, `role_id`, `menu_id`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (4179, 109, 2723, '1', '2024-03-30 17:53:17', '1', '2024-03-30 17:53:17', b'0', 121); | |
| 4816 | +INSERT INTO `system_role_menu` (`id`, `role_id`, `menu_id`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (4180, 109, 1188, '1', '2024-03-30 17:53:17', '1', '2024-03-30 17:53:17', b'0', 121); | |
| 4817 | +INSERT INTO `system_role_menu` (`id`, `role_id`, `menu_id`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (4181, 109, 2724, '1', '2024-03-30 17:53:17', '1', '2024-03-30 17:53:17', b'0', 121); | |
| 4818 | +INSERT INTO `system_role_menu` (`id`, `role_id`, `menu_id`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (4182, 109, 1189, '1', '2024-03-30 17:53:17', '1', '2024-03-30 17:53:17', b'0', 121); | |
| 4819 | +INSERT INTO `system_role_menu` (`id`, `role_id`, `menu_id`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (4183, 109, 2725, '1', '2024-03-30 17:53:17', '1', '2024-03-30 17:53:17', b'0', 121); | |
| 4820 | +INSERT INTO `system_role_menu` (`id`, `role_id`, `menu_id`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (4184, 109, 1190, '1', '2024-03-30 17:53:17', '1', '2024-03-30 17:53:17', b'0', 121); | |
| 4821 | +INSERT INTO `system_role_menu` (`id`, `role_id`, `menu_id`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (4185, 109, 2726, '1', '2024-03-30 17:53:17', '1', '2024-03-30 17:53:17', b'0', 121); | |
| 4822 | +INSERT INTO `system_role_menu` (`id`, `role_id`, `menu_id`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (4186, 109, 1191, '1', '2024-03-30 17:53:17', '1', '2024-03-30 17:53:17', b'0', 121); | |
| 4823 | +INSERT INTO `system_role_menu` (`id`, `role_id`, `menu_id`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (4187, 109, 2727, '1', '2024-03-30 17:53:17', '1', '2024-03-30 17:53:17', b'0', 121); | |
| 4824 | +INSERT INTO `system_role_menu` (`id`, `role_id`, `menu_id`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (4188, 109, 1192, '1', '2024-03-30 17:53:17', '1', '2024-03-30 17:53:17', b'0', 121); | |
| 4825 | +INSERT INTO `system_role_menu` (`id`, `role_id`, `menu_id`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (4189, 109, 2728, '1', '2024-03-30 17:53:17', '1', '2024-03-30 17:53:17', b'0', 121); | |
| 4826 | +INSERT INTO `system_role_menu` (`id`, `role_id`, `menu_id`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (4190, 109, 1193, '1', '2024-03-30 17:53:17', '1', '2024-03-30 17:53:17', b'0', 121); | |
| 4827 | +INSERT INTO `system_role_menu` (`id`, `role_id`, `menu_id`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (4191, 109, 2729, '1', '2024-03-30 17:53:17', '1', '2024-03-30 17:53:17', b'0', 121); | |
| 4828 | +INSERT INTO `system_role_menu` (`id`, `role_id`, `menu_id`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (4192, 109, 1194, '1', '2024-03-30 17:53:17', '1', '2024-03-30 17:53:17', b'0', 121); | |
| 4829 | +INSERT INTO `system_role_menu` (`id`, `role_id`, `menu_id`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (4193, 109, 2730, '1', '2024-03-30 17:53:17', '1', '2024-03-30 17:53:17', b'0', 121); | |
| 4830 | +INSERT INTO `system_role_menu` (`id`, `role_id`, `menu_id`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (4194, 109, 1195, '1', '2024-03-30 17:53:17', '1', '2024-03-30 17:53:17', b'0', 121); | |
| 4831 | +INSERT INTO `system_role_menu` (`id`, `role_id`, `menu_id`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (4195, 109, 2731, '1', '2024-03-30 17:53:17', '1', '2024-03-30 17:53:17', b'0', 121); | |
| 4832 | +INSERT INTO `system_role_menu` (`id`, `role_id`, `menu_id`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (4196, 109, 1196, '1', '2024-03-30 17:53:17', '1', '2024-03-30 17:53:17', b'0', 121); | |
| 4833 | +INSERT INTO `system_role_menu` (`id`, `role_id`, `menu_id`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (4197, 109, 2732, '1', '2024-03-30 17:53:17', '1', '2024-03-30 17:53:17', b'0', 121); | |
| 4834 | +INSERT INTO `system_role_menu` (`id`, `role_id`, `menu_id`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (4198, 109, 1197, '1', '2024-03-30 17:53:17', '1', '2024-03-30 17:53:17', b'0', 121); | |
| 4835 | +INSERT INTO `system_role_menu` (`id`, `role_id`, `menu_id`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (4199, 109, 2733, '1', '2024-03-30 17:53:17', '1', '2024-03-30 17:53:17', b'0', 121); | |
| 4836 | +INSERT INTO `system_role_menu` (`id`, `role_id`, `menu_id`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (4200, 109, 1198, '1', '2024-03-30 17:53:17', '1', '2024-03-30 17:53:17', b'0', 121); | |
| 4837 | +INSERT INTO `system_role_menu` (`id`, `role_id`, `menu_id`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (4201, 109, 2734, '1', '2024-03-30 17:53:17', '1', '2024-03-30 17:53:17', b'0', 121); | |
| 4838 | +INSERT INTO `system_role_menu` (`id`, `role_id`, `menu_id`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (4202, 109, 1199, '1', '2024-03-30 17:53:17', '1', '2024-03-30 17:53:17', b'0', 121); | |
| 4839 | +INSERT INTO `system_role_menu` (`id`, `role_id`, `menu_id`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (4203, 109, 2735, '1', '2024-03-30 17:53:17', '1', '2024-03-30 17:53:17', b'0', 121); | |
| 4840 | +INSERT INTO `system_role_menu` (`id`, `role_id`, `menu_id`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (4204, 109, 1200, '1', '2024-03-30 17:53:17', '1', '2024-03-30 17:53:17', b'0', 121); | |
| 4841 | +INSERT INTO `system_role_menu` (`id`, `role_id`, `menu_id`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (4205, 109, 1201, '1', '2024-03-30 17:53:17', '1', '2024-03-30 17:53:17', b'0', 121); | |
| 4842 | +INSERT INTO `system_role_menu` (`id`, `role_id`, `menu_id`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (4206, 109, 1202, '1', '2024-03-30 17:53:17', '1', '2024-03-30 17:53:17', b'0', 121); | |
| 4843 | +INSERT INTO `system_role_menu` (`id`, `role_id`, `menu_id`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (4207, 109, 1207, '1', '2024-03-30 17:53:17', '1', '2024-03-30 17:53:17', b'0', 121); | |
| 4844 | +INSERT INTO `system_role_menu` (`id`, `role_id`, `menu_id`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (4208, 109, 1208, '1', '2024-03-30 17:53:17', '1', '2024-03-30 17:53:17', b'0', 121); | |
| 4845 | +INSERT INTO `system_role_menu` (`id`, `role_id`, `menu_id`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (4209, 109, 1209, '1', '2024-03-30 17:53:17', '1', '2024-03-30 17:53:17', b'0', 121); | |
| 4846 | +INSERT INTO `system_role_menu` (`id`, `role_id`, `menu_id`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (4210, 109, 1210, '1', '2024-03-30 17:53:17', '1', '2024-03-30 17:53:17', b'0', 121); | |
| 4847 | +INSERT INTO `system_role_menu` (`id`, `role_id`, `menu_id`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (4211, 109, 1211, '1', '2024-03-30 17:53:17', '1', '2024-03-30 17:53:17', b'0', 121); | |
| 4848 | +INSERT INTO `system_role_menu` (`id`, `role_id`, `menu_id`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (4212, 109, 1212, '1', '2024-03-30 17:53:17', '1', '2024-03-30 17:53:17', b'0', 121); | |
| 4849 | +INSERT INTO `system_role_menu` (`id`, `role_id`, `menu_id`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (4213, 109, 1213, '1', '2024-03-30 17:53:17', '1', '2024-03-30 17:53:17', b'0', 121); | |
| 4850 | +INSERT INTO `system_role_menu` (`id`, `role_id`, `menu_id`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (4214, 109, 1215, '1', '2024-03-30 17:53:17', '1', '2024-03-30 17:53:17', b'0', 121); | |
| 4851 | +INSERT INTO `system_role_menu` (`id`, `role_id`, `menu_id`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (4215, 109, 1216, '1', '2024-03-30 17:53:17', '1', '2024-03-30 17:53:17', b'0', 121); | |
| 4852 | +INSERT INTO `system_role_menu` (`id`, `role_id`, `menu_id`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (4216, 109, 1217, '1', '2024-03-30 17:53:17', '1', '2024-03-30 17:53:17', b'0', 121); | |
| 4853 | +INSERT INTO `system_role_menu` (`id`, `role_id`, `menu_id`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (4217, 109, 1218, '1', '2024-03-30 17:53:17', '1', '2024-03-30 17:53:17', b'0', 121); | |
| 4854 | +INSERT INTO `system_role_menu` (`id`, `role_id`, `menu_id`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (4218, 109, 1219, '1', '2024-03-30 17:53:17', '1', '2024-03-30 17:53:17', b'0', 121); | |
| 4855 | +INSERT INTO `system_role_menu` (`id`, `role_id`, `menu_id`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (4219, 109, 1220, '1', '2024-03-30 17:53:17', '1', '2024-03-30 17:53:17', b'0', 121); | |
| 4856 | +INSERT INTO `system_role_menu` (`id`, `role_id`, `menu_id`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (4220, 109, 1221, '1', '2024-03-30 17:53:17', '1', '2024-03-30 17:53:17', b'0', 121); | |
| 4857 | +INSERT INTO `system_role_menu` (`id`, `role_id`, `menu_id`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (4221, 109, 1222, '1', '2024-03-30 17:53:17', '1', '2024-03-30 17:53:17', b'0', 121); | |
| 4858 | +INSERT INTO `system_role_menu` (`id`, `role_id`, `menu_id`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (4222, 111, 5, '1', '2024-03-30 17:53:18', '1', '2024-03-30 17:53:18', b'0', 122); | |
| 4859 | +INSERT INTO `system_role_menu` (`id`, `role_id`, `menu_id`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (4223, 111, 1118, '1', '2024-03-30 17:53:18', '1', '2024-03-30 17:53:18', b'0', 122); | |
| 4860 | +INSERT INTO `system_role_menu` (`id`, `role_id`, `menu_id`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (4224, 111, 1119, '1', '2024-03-30 17:53:18', '1', '2024-03-30 17:53:18', b'0', 122); | |
| 4861 | +INSERT INTO `system_role_menu` (`id`, `role_id`, `menu_id`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (4225, 111, 1120, '1', '2024-03-30 17:53:18', '1', '2024-03-30 17:53:18', b'0', 122); | |
| 4862 | +INSERT INTO `system_role_menu` (`id`, `role_id`, `menu_id`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (4226, 111, 2713, '1', '2024-03-30 17:53:18', '1', '2024-03-30 17:53:18', b'0', 122); | |
| 4863 | +INSERT INTO `system_role_menu` (`id`, `role_id`, `menu_id`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (4227, 111, 2714, '1', '2024-03-30 17:53:18', '1', '2024-03-30 17:53:18', b'0', 122); | |
| 4864 | +INSERT INTO `system_role_menu` (`id`, `role_id`, `menu_id`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (4228, 111, 2715, '1', '2024-03-30 17:53:18', '1', '2024-03-30 17:53:18', b'0', 122); | |
| 4865 | +INSERT INTO `system_role_menu` (`id`, `role_id`, `menu_id`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (4229, 111, 2716, '1', '2024-03-30 17:53:18', '1', '2024-03-30 17:53:18', b'0', 122); | |
| 4866 | +INSERT INTO `system_role_menu` (`id`, `role_id`, `menu_id`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (4230, 111, 2717, '1', '2024-03-30 17:53:18', '1', '2024-03-30 17:53:18', b'0', 122); | |
| 4867 | +INSERT INTO `system_role_menu` (`id`, `role_id`, `menu_id`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (4231, 111, 2718, '1', '2024-03-30 17:53:18', '1', '2024-03-30 17:53:18', b'0', 122); | |
| 4868 | +INSERT INTO `system_role_menu` (`id`, `role_id`, `menu_id`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (4232, 111, 2720, '1', '2024-03-30 17:53:18', '1', '2024-03-30 17:53:18', b'0', 122); | |
| 4869 | +INSERT INTO `system_role_menu` (`id`, `role_id`, `menu_id`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (4233, 111, 1185, '1', '2024-03-30 17:53:18', '1', '2024-03-30 17:53:18', b'0', 122); | |
| 4870 | +INSERT INTO `system_role_menu` (`id`, `role_id`, `menu_id`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (4234, 111, 2721, '1', '2024-03-30 17:53:18', '1', '2024-03-30 17:53:18', b'0', 122); | |
| 4871 | +INSERT INTO `system_role_menu` (`id`, `role_id`, `menu_id`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (4235, 111, 1186, '1', '2024-03-30 17:53:18', '1', '2024-03-30 17:53:18', b'0', 122); | |
| 4872 | +INSERT INTO `system_role_menu` (`id`, `role_id`, `menu_id`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (4236, 111, 2722, '1', '2024-03-30 17:53:18', '1', '2024-03-30 17:53:18', b'0', 122); | |
| 4873 | +INSERT INTO `system_role_menu` (`id`, `role_id`, `menu_id`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (4237, 111, 1187, '1', '2024-03-30 17:53:18', '1', '2024-03-30 17:53:18', b'0', 122); | |
| 4874 | +INSERT INTO `system_role_menu` (`id`, `role_id`, `menu_id`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (4238, 111, 2723, '1', '2024-03-30 17:53:18', '1', '2024-03-30 17:53:18', b'0', 122); | |
| 4875 | +INSERT INTO `system_role_menu` (`id`, `role_id`, `menu_id`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (4239, 111, 1188, '1', '2024-03-30 17:53:18', '1', '2024-03-30 17:53:18', b'0', 122); | |
| 4876 | +INSERT INTO `system_role_menu` (`id`, `role_id`, `menu_id`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (4240, 111, 2724, '1', '2024-03-30 17:53:18', '1', '2024-03-30 17:53:18', b'0', 122); | |
| 4877 | +INSERT INTO `system_role_menu` (`id`, `role_id`, `menu_id`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (4241, 111, 1189, '1', '2024-03-30 17:53:18', '1', '2024-03-30 17:53:18', b'0', 122); | |
| 4878 | +INSERT INTO `system_role_menu` (`id`, `role_id`, `menu_id`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (4242, 111, 2725, '1', '2024-03-30 17:53:18', '1', '2024-03-30 17:53:18', b'0', 122); | |
| 4879 | +INSERT INTO `system_role_menu` (`id`, `role_id`, `menu_id`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (4243, 111, 1190, '1', '2024-03-30 17:53:18', '1', '2024-03-30 17:53:18', b'0', 122); | |
| 4880 | +INSERT INTO `system_role_menu` (`id`, `role_id`, `menu_id`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (4244, 111, 2726, '1', '2024-03-30 17:53:18', '1', '2024-03-30 17:53:18', b'0', 122); | |
| 4881 | +INSERT INTO `system_role_menu` (`id`, `role_id`, `menu_id`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (4245, 111, 1191, '1', '2024-03-30 17:53:18', '1', '2024-03-30 17:53:18', b'0', 122); | |
| 4882 | +INSERT INTO `system_role_menu` (`id`, `role_id`, `menu_id`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (4246, 111, 2727, '1', '2024-03-30 17:53:18', '1', '2024-03-30 17:53:18', b'0', 122); | |
| 4883 | +INSERT INTO `system_role_menu` (`id`, `role_id`, `menu_id`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (4247, 111, 1192, '1', '2024-03-30 17:53:18', '1', '2024-03-30 17:53:18', b'0', 122); | |
| 4884 | +INSERT INTO `system_role_menu` (`id`, `role_id`, `menu_id`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (4248, 111, 2728, '1', '2024-03-30 17:53:18', '1', '2024-03-30 17:53:18', b'0', 122); | |
| 4885 | +INSERT INTO `system_role_menu` (`id`, `role_id`, `menu_id`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (4249, 111, 1193, '1', '2024-03-30 17:53:18', '1', '2024-03-30 17:53:18', b'0', 122); | |
| 4886 | +INSERT INTO `system_role_menu` (`id`, `role_id`, `menu_id`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (4250, 111, 2729, '1', '2024-03-30 17:53:18', '1', '2024-03-30 17:53:18', b'0', 122); | |
| 4887 | +INSERT INTO `system_role_menu` (`id`, `role_id`, `menu_id`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (4251, 111, 1194, '1', '2024-03-30 17:53:18', '1', '2024-03-30 17:53:18', b'0', 122); | |
| 4888 | +INSERT INTO `system_role_menu` (`id`, `role_id`, `menu_id`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (4252, 111, 2730, '1', '2024-03-30 17:53:18', '1', '2024-03-30 17:53:18', b'0', 122); | |
| 4889 | +INSERT INTO `system_role_menu` (`id`, `role_id`, `menu_id`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (4253, 111, 1195, '1', '2024-03-30 17:53:18', '1', '2024-03-30 17:53:18', b'0', 122); | |
| 4890 | +INSERT INTO `system_role_menu` (`id`, `role_id`, `menu_id`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (4254, 111, 2731, '1', '2024-03-30 17:53:18', '1', '2024-03-30 17:53:18', b'0', 122); | |
| 4891 | +INSERT INTO `system_role_menu` (`id`, `role_id`, `menu_id`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (4255, 111, 1196, '1', '2024-03-30 17:53:18', '1', '2024-03-30 17:53:18', b'0', 122); | |
| 4892 | +INSERT INTO `system_role_menu` (`id`, `role_id`, `menu_id`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (4256, 111, 2732, '1', '2024-03-30 17:53:18', '1', '2024-03-30 17:53:18', b'0', 122); | |
| 4893 | +INSERT INTO `system_role_menu` (`id`, `role_id`, `menu_id`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (4257, 111, 1197, '1', '2024-03-30 17:53:18', '1', '2024-03-30 17:53:18', b'0', 122); | |
| 4894 | +INSERT INTO `system_role_menu` (`id`, `role_id`, `menu_id`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (4258, 111, 2733, '1', '2024-03-30 17:53:18', '1', '2024-03-30 17:53:18', b'0', 122); | |
| 4895 | +INSERT INTO `system_role_menu` (`id`, `role_id`, `menu_id`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (4259, 111, 1198, '1', '2024-03-30 17:53:18', '1', '2024-03-30 17:53:18', b'0', 122); | |
| 4896 | +INSERT INTO `system_role_menu` (`id`, `role_id`, `menu_id`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (4260, 111, 2734, '1', '2024-03-30 17:53:18', '1', '2024-03-30 17:53:18', b'0', 122); | |
| 4897 | +INSERT INTO `system_role_menu` (`id`, `role_id`, `menu_id`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (4261, 111, 1199, '1', '2024-03-30 17:53:18', '1', '2024-03-30 17:53:18', b'0', 122); | |
| 4898 | +INSERT INTO `system_role_menu` (`id`, `role_id`, `menu_id`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (4262, 111, 2735, '1', '2024-03-30 17:53:18', '1', '2024-03-30 17:53:18', b'0', 122); | |
| 4899 | +INSERT INTO `system_role_menu` (`id`, `role_id`, `menu_id`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (4263, 111, 1200, '1', '2024-03-30 17:53:18', '1', '2024-03-30 17:53:18', b'0', 122); | |
| 4900 | +INSERT INTO `system_role_menu` (`id`, `role_id`, `menu_id`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (4264, 111, 1201, '1', '2024-03-30 17:53:18', '1', '2024-03-30 17:53:18', b'0', 122); | |
| 4901 | +INSERT INTO `system_role_menu` (`id`, `role_id`, `menu_id`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (4265, 111, 1202, '1', '2024-03-30 17:53:18', '1', '2024-03-30 17:53:18', b'0', 122); | |
| 4902 | +INSERT INTO `system_role_menu` (`id`, `role_id`, `menu_id`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (4266, 111, 1207, '1', '2024-03-30 17:53:18', '1', '2024-03-30 17:53:18', b'0', 122); | |
| 4903 | +INSERT INTO `system_role_menu` (`id`, `role_id`, `menu_id`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (4267, 111, 1208, '1', '2024-03-30 17:53:18', '1', '2024-03-30 17:53:18', b'0', 122); | |
| 4904 | +INSERT INTO `system_role_menu` (`id`, `role_id`, `menu_id`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (4268, 111, 1209, '1', '2024-03-30 17:53:18', '1', '2024-03-30 17:53:18', b'0', 122); | |
| 4905 | +INSERT INTO `system_role_menu` (`id`, `role_id`, `menu_id`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (4269, 111, 1210, '1', '2024-03-30 17:53:18', '1', '2024-03-30 17:53:18', b'0', 122); | |
| 4906 | +INSERT INTO `system_role_menu` (`id`, `role_id`, `menu_id`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (4270, 111, 1211, '1', '2024-03-30 17:53:18', '1', '2024-03-30 17:53:18', b'0', 122); | |
| 4907 | +INSERT INTO `system_role_menu` (`id`, `role_id`, `menu_id`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (4271, 111, 1212, '1', '2024-03-30 17:53:18', '1', '2024-03-30 17:53:18', b'0', 122); | |
| 4908 | +INSERT INTO `system_role_menu` (`id`, `role_id`, `menu_id`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (4272, 111, 1213, '1', '2024-03-30 17:53:18', '1', '2024-03-30 17:53:18', b'0', 122); | |
| 4909 | +INSERT INTO `system_role_menu` (`id`, `role_id`, `menu_id`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (4273, 111, 1215, '1', '2024-03-30 17:53:18', '1', '2024-03-30 17:53:18', b'0', 122); | |
| 4910 | +INSERT INTO `system_role_menu` (`id`, `role_id`, `menu_id`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (4274, 111, 1216, '1', '2024-03-30 17:53:18', '1', '2024-03-30 17:53:18', b'0', 122); | |
| 4911 | +INSERT INTO `system_role_menu` (`id`, `role_id`, `menu_id`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (4275, 111, 1217, '1', '2024-03-30 17:53:18', '1', '2024-03-30 17:53:18', b'0', 122); | |
| 4912 | +INSERT INTO `system_role_menu` (`id`, `role_id`, `menu_id`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (4276, 111, 1218, '1', '2024-03-30 17:53:18', '1', '2024-03-30 17:53:18', b'0', 122); | |
| 4913 | +INSERT INTO `system_role_menu` (`id`, `role_id`, `menu_id`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (4277, 111, 1219, '1', '2024-03-30 17:53:18', '1', '2024-03-30 17:53:18', b'0', 122); | |
| 4914 | +INSERT INTO `system_role_menu` (`id`, `role_id`, `menu_id`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (4278, 111, 1220, '1', '2024-03-30 17:53:18', '1', '2024-03-30 17:53:18', b'0', 122); | |
| 4915 | +INSERT INTO `system_role_menu` (`id`, `role_id`, `menu_id`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (4279, 111, 1221, '1', '2024-03-30 17:53:18', '1', '2024-03-30 17:53:18', b'0', 122); | |
| 4916 | +INSERT INTO `system_role_menu` (`id`, `role_id`, `menu_id`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (4280, 111, 1222, '1', '2024-03-30 17:53:18', '1', '2024-03-30 17:53:18', b'0', 122); | |
| 4917 | +INSERT INTO `system_role_menu` (`id`, `role_id`, `menu_id`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (4281, 140, 5, '1', '2024-03-30 17:53:18', '1', '2024-03-30 17:53:18', b'0', 151); | |
| 4918 | +INSERT INTO `system_role_menu` (`id`, `role_id`, `menu_id`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (4282, 140, 1118, '1', '2024-03-30 17:53:18', '1', '2024-03-30 17:53:18', b'0', 151); | |
| 4919 | +INSERT INTO `system_role_menu` (`id`, `role_id`, `menu_id`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (4283, 140, 1119, '1', '2024-03-30 17:53:18', '1', '2024-03-30 17:53:18', b'0', 151); | |
| 4920 | +INSERT INTO `system_role_menu` (`id`, `role_id`, `menu_id`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (4284, 140, 1120, '1', '2024-03-30 17:53:18', '1', '2024-03-30 17:53:18', b'0', 151); | |
| 4921 | +INSERT INTO `system_role_menu` (`id`, `role_id`, `menu_id`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (4285, 140, 2713, '1', '2024-03-30 17:53:18', '1', '2024-03-30 17:53:18', b'0', 151); | |
| 4922 | +INSERT INTO `system_role_menu` (`id`, `role_id`, `menu_id`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (4286, 140, 2714, '1', '2024-03-30 17:53:18', '1', '2024-03-30 17:53:18', b'0', 151); | |
| 4923 | +INSERT INTO `system_role_menu` (`id`, `role_id`, `menu_id`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (4287, 140, 2715, '1', '2024-03-30 17:53:18', '1', '2024-03-30 17:53:18', b'0', 151); | |
| 4924 | +INSERT INTO `system_role_menu` (`id`, `role_id`, `menu_id`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (4288, 140, 2716, '1', '2024-03-30 17:53:18', '1', '2024-03-30 17:53:18', b'0', 151); | |
| 4925 | +INSERT INTO `system_role_menu` (`id`, `role_id`, `menu_id`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (4289, 140, 2717, '1', '2024-03-30 17:53:18', '1', '2024-03-30 17:53:18', b'0', 151); | |
| 4926 | +INSERT INTO `system_role_menu` (`id`, `role_id`, `menu_id`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (4290, 140, 2718, '1', '2024-03-30 17:53:18', '1', '2024-03-30 17:53:18', b'0', 151); | |
| 4927 | +INSERT INTO `system_role_menu` (`id`, `role_id`, `menu_id`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (4291, 140, 2720, '1', '2024-03-30 17:53:18', '1', '2024-03-30 17:53:18', b'0', 151); | |
| 4928 | +INSERT INTO `system_role_menu` (`id`, `role_id`, `menu_id`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (4292, 140, 1185, '1', '2024-03-30 17:53:18', '1', '2024-03-30 17:53:18', b'0', 151); | |
| 4929 | +INSERT INTO `system_role_menu` (`id`, `role_id`, `menu_id`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (4293, 140, 2721, '1', '2024-03-30 17:53:18', '1', '2024-03-30 17:53:18', b'0', 151); | |
| 4930 | +INSERT INTO `system_role_menu` (`id`, `role_id`, `menu_id`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (4294, 140, 1186, '1', '2024-03-30 17:53:18', '1', '2024-03-30 17:53:18', b'0', 151); | |
| 4931 | +INSERT INTO `system_role_menu` (`id`, `role_id`, `menu_id`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (4295, 140, 2722, '1', '2024-03-30 17:53:18', '1', '2024-03-30 17:53:18', b'0', 151); | |
| 4932 | +INSERT INTO `system_role_menu` (`id`, `role_id`, `menu_id`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (4296, 140, 1187, '1', '2024-03-30 17:53:18', '1', '2024-03-30 17:53:18', b'0', 151); | |
| 4933 | +INSERT INTO `system_role_menu` (`id`, `role_id`, `menu_id`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (4297, 140, 2723, '1', '2024-03-30 17:53:18', '1', '2024-03-30 17:53:18', b'0', 151); | |
| 4934 | +INSERT INTO `system_role_menu` (`id`, `role_id`, `menu_id`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (4298, 140, 1188, '1', '2024-03-30 17:53:18', '1', '2024-03-30 17:53:18', b'0', 151); | |
| 4935 | +INSERT INTO `system_role_menu` (`id`, `role_id`, `menu_id`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (4299, 140, 2724, '1', '2024-03-30 17:53:18', '1', '2024-03-30 17:53:18', b'0', 151); | |
| 4936 | +INSERT INTO `system_role_menu` (`id`, `role_id`, `menu_id`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (4300, 140, 1189, '1', '2024-03-30 17:53:18', '1', '2024-03-30 17:53:18', b'0', 151); | |
| 4937 | +INSERT INTO `system_role_menu` (`id`, `role_id`, `menu_id`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (4301, 140, 2725, '1', '2024-03-30 17:53:18', '1', '2024-03-30 17:53:18', b'0', 151); | |
| 4938 | +INSERT INTO `system_role_menu` (`id`, `role_id`, `menu_id`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (4302, 140, 1190, '1', '2024-03-30 17:53:18', '1', '2024-03-30 17:53:18', b'0', 151); | |
| 4939 | +INSERT INTO `system_role_menu` (`id`, `role_id`, `menu_id`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (4303, 140, 2726, '1', '2024-03-30 17:53:18', '1', '2024-03-30 17:53:18', b'0', 151); | |
| 4940 | +INSERT INTO `system_role_menu` (`id`, `role_id`, `menu_id`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (4304, 140, 1191, '1', '2024-03-30 17:53:18', '1', '2024-03-30 17:53:18', b'0', 151); | |
| 4941 | +INSERT INTO `system_role_menu` (`id`, `role_id`, `menu_id`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (4305, 140, 2727, '1', '2024-03-30 17:53:18', '1', '2024-03-30 17:53:18', b'0', 151); | |
| 4942 | +INSERT INTO `system_role_menu` (`id`, `role_id`, `menu_id`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (4306, 140, 1192, '1', '2024-03-30 17:53:18', '1', '2024-03-30 17:53:18', b'0', 151); | |
| 4943 | +INSERT INTO `system_role_menu` (`id`, `role_id`, `menu_id`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (4307, 140, 2728, '1', '2024-03-30 17:53:18', '1', '2024-03-30 17:53:18', b'0', 151); | |
| 4944 | +INSERT INTO `system_role_menu` (`id`, `role_id`, `menu_id`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (4308, 140, 1193, '1', '2024-03-30 17:53:18', '1', '2024-03-30 17:53:18', b'0', 151); | |
| 4945 | +INSERT INTO `system_role_menu` (`id`, `role_id`, `menu_id`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (4309, 140, 2729, '1', '2024-03-30 17:53:18', '1', '2024-03-30 17:53:18', b'0', 151); | |
| 4946 | +INSERT INTO `system_role_menu` (`id`, `role_id`, `menu_id`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (4310, 140, 1194, '1', '2024-03-30 17:53:18', '1', '2024-03-30 17:53:18', b'0', 151); | |
| 4947 | +INSERT INTO `system_role_menu` (`id`, `role_id`, `menu_id`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (4311, 140, 2730, '1', '2024-03-30 17:53:18', '1', '2024-03-30 17:53:18', b'0', 151); | |
| 4948 | +INSERT INTO `system_role_menu` (`id`, `role_id`, `menu_id`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (4312, 140, 1195, '1', '2024-03-30 17:53:18', '1', '2024-03-30 17:53:18', b'0', 151); | |
| 4949 | +INSERT INTO `system_role_menu` (`id`, `role_id`, `menu_id`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (4313, 140, 2731, '1', '2024-03-30 17:53:18', '1', '2024-03-30 17:53:18', b'0', 151); | |
| 4950 | +INSERT INTO `system_role_menu` (`id`, `role_id`, `menu_id`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (4314, 140, 1196, '1', '2024-03-30 17:53:18', '1', '2024-03-30 17:53:18', b'0', 151); | |
| 4951 | +INSERT INTO `system_role_menu` (`id`, `role_id`, `menu_id`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (4315, 140, 2732, '1', '2024-03-30 17:53:18', '1', '2024-03-30 17:53:18', b'0', 151); | |
| 4952 | +INSERT INTO `system_role_menu` (`id`, `role_id`, `menu_id`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (4316, 140, 1197, '1', '2024-03-30 17:53:18', '1', '2024-03-30 17:53:18', b'0', 151); | |
| 4953 | +INSERT INTO `system_role_menu` (`id`, `role_id`, `menu_id`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (4317, 140, 2733, '1', '2024-03-30 17:53:18', '1', '2024-03-30 17:53:18', b'0', 151); | |
| 4954 | +INSERT INTO `system_role_menu` (`id`, `role_id`, `menu_id`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (4318, 140, 1198, '1', '2024-03-30 17:53:18', '1', '2024-03-30 17:53:18', b'0', 151); | |
| 4955 | +INSERT INTO `system_role_menu` (`id`, `role_id`, `menu_id`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (4319, 140, 2734, '1', '2024-03-30 17:53:18', '1', '2024-03-30 17:53:18', b'0', 151); | |
| 4956 | +INSERT INTO `system_role_menu` (`id`, `role_id`, `menu_id`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (4320, 140, 1199, '1', '2024-03-30 17:53:18', '1', '2024-03-30 17:53:18', b'0', 151); | |
| 4957 | +INSERT INTO `system_role_menu` (`id`, `role_id`, `menu_id`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (4321, 140, 2735, '1', '2024-03-30 17:53:18', '1', '2024-03-30 17:53:18', b'0', 151); | |
| 4958 | +INSERT INTO `system_role_menu` (`id`, `role_id`, `menu_id`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (4322, 140, 1200, '1', '2024-03-30 17:53:18', '1', '2024-03-30 17:53:18', b'0', 151); | |
| 4959 | +INSERT INTO `system_role_menu` (`id`, `role_id`, `menu_id`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (4323, 140, 1201, '1', '2024-03-30 17:53:18', '1', '2024-03-30 17:53:18', b'0', 151); | |
| 4960 | +INSERT INTO `system_role_menu` (`id`, `role_id`, `menu_id`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (4324, 140, 1202, '1', '2024-03-30 17:53:18', '1', '2024-03-30 17:53:18', b'0', 151); | |
| 4961 | +INSERT INTO `system_role_menu` (`id`, `role_id`, `menu_id`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (4325, 140, 1207, '1', '2024-03-30 17:53:18', '1', '2024-03-30 17:53:18', b'0', 151); | |
| 4962 | +INSERT INTO `system_role_menu` (`id`, `role_id`, `menu_id`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (4326, 140, 1208, '1', '2024-03-30 17:53:18', '1', '2024-03-30 17:53:18', b'0', 151); | |
| 4963 | +INSERT INTO `system_role_menu` (`id`, `role_id`, `menu_id`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (4327, 140, 1209, '1', '2024-03-30 17:53:18', '1', '2024-03-30 17:53:18', b'0', 151); | |
| 4964 | +INSERT INTO `system_role_menu` (`id`, `role_id`, `menu_id`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (4328, 140, 1210, '1', '2024-03-30 17:53:18', '1', '2024-03-30 17:53:18', b'0', 151); | |
| 4965 | +INSERT INTO `system_role_menu` (`id`, `role_id`, `menu_id`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (4329, 140, 1211, '1', '2024-03-30 17:53:18', '1', '2024-03-30 17:53:18', b'0', 151); | |
| 4966 | +INSERT INTO `system_role_menu` (`id`, `role_id`, `menu_id`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (4330, 140, 1212, '1', '2024-03-30 17:53:18', '1', '2024-03-30 17:53:18', b'0', 151); | |
| 4967 | +INSERT INTO `system_role_menu` (`id`, `role_id`, `menu_id`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (4331, 140, 1213, '1', '2024-03-30 17:53:18', '1', '2024-03-30 17:53:18', b'0', 151); | |
| 4968 | +INSERT INTO `system_role_menu` (`id`, `role_id`, `menu_id`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (4332, 140, 1215, '1', '2024-03-30 17:53:18', '1', '2024-03-30 17:53:18', b'0', 151); | |
| 4969 | +INSERT INTO `system_role_menu` (`id`, `role_id`, `menu_id`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (4333, 140, 1216, '1', '2024-03-30 17:53:18', '1', '2024-03-30 17:53:18', b'0', 151); | |
| 4970 | +INSERT INTO `system_role_menu` (`id`, `role_id`, `menu_id`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (4334, 140, 1217, '1', '2024-03-30 17:53:18', '1', '2024-03-30 17:53:18', b'0', 151); | |
| 4971 | +INSERT INTO `system_role_menu` (`id`, `role_id`, `menu_id`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (4335, 140, 1218, '1', '2024-03-30 17:53:18', '1', '2024-03-30 17:53:18', b'0', 151); | |
| 4972 | +INSERT INTO `system_role_menu` (`id`, `role_id`, `menu_id`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (4336, 140, 1219, '1', '2024-03-30 17:53:18', '1', '2024-03-30 17:53:18', b'0', 151); | |
| 4973 | +INSERT INTO `system_role_menu` (`id`, `role_id`, `menu_id`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (4337, 140, 1220, '1', '2024-03-30 17:53:18', '1', '2024-03-30 17:53:18', b'0', 151); | |
| 4974 | +INSERT INTO `system_role_menu` (`id`, `role_id`, `menu_id`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (4338, 140, 1221, '1', '2024-03-30 17:53:18', '1', '2024-03-30 17:53:18', b'0', 151); | |
| 4975 | +INSERT INTO `system_role_menu` (`id`, `role_id`, `menu_id`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (4339, 140, 1222, '1', '2024-03-30 17:53:18', '1', '2024-03-30 17:53:18', b'0', 151); | |
| 4976 | +INSERT INTO `system_role_menu` (`id`, `role_id`, `menu_id`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (4340, 141, 5, '1', '2024-03-30 17:53:18', '1', '2024-03-30 17:53:18', b'0', 152); | |
| 4977 | +INSERT INTO `system_role_menu` (`id`, `role_id`, `menu_id`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (4341, 141, 1118, '1', '2024-03-30 17:53:18', '1', '2024-03-30 17:53:18', b'0', 152); | |
| 4978 | +INSERT INTO `system_role_menu` (`id`, `role_id`, `menu_id`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (4342, 141, 1119, '1', '2024-03-30 17:53:18', '1', '2024-03-30 17:53:18', b'0', 152); | |
| 4979 | +INSERT INTO `system_role_menu` (`id`, `role_id`, `menu_id`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (4343, 141, 1120, '1', '2024-03-30 17:53:18', '1', '2024-03-30 17:53:18', b'0', 152); | |
| 4980 | +INSERT INTO `system_role_menu` (`id`, `role_id`, `menu_id`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (4344, 141, 2713, '1', '2024-03-30 17:53:18', '1', '2024-03-30 17:53:18', b'0', 152); | |
| 4981 | +INSERT INTO `system_role_menu` (`id`, `role_id`, `menu_id`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (4345, 141, 2714, '1', '2024-03-30 17:53:18', '1', '2024-03-30 17:53:18', b'0', 152); | |
| 4982 | +INSERT INTO `system_role_menu` (`id`, `role_id`, `menu_id`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (4346, 141, 2715, '1', '2024-03-30 17:53:18', '1', '2024-03-30 17:53:18', b'0', 152); | |
| 4983 | +INSERT INTO `system_role_menu` (`id`, `role_id`, `menu_id`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (4347, 141, 2716, '1', '2024-03-30 17:53:18', '1', '2024-03-30 17:53:18', b'0', 152); | |
| 4984 | +INSERT INTO `system_role_menu` (`id`, `role_id`, `menu_id`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (4348, 141, 2717, '1', '2024-03-30 17:53:18', '1', '2024-03-30 17:53:18', b'0', 152); | |
| 4985 | +INSERT INTO `system_role_menu` (`id`, `role_id`, `menu_id`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (4349, 141, 2718, '1', '2024-03-30 17:53:18', '1', '2024-03-30 17:53:18', b'0', 152); | |
| 4986 | +INSERT INTO `system_role_menu` (`id`, `role_id`, `menu_id`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (4350, 141, 2720, '1', '2024-03-30 17:53:18', '1', '2024-03-30 17:53:18', b'0', 152); | |
| 4987 | +INSERT INTO `system_role_menu` (`id`, `role_id`, `menu_id`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (4351, 141, 1185, '1', '2024-03-30 17:53:18', '1', '2024-03-30 17:53:18', b'0', 152); | |
| 4988 | +INSERT INTO `system_role_menu` (`id`, `role_id`, `menu_id`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (4352, 141, 2721, '1', '2024-03-30 17:53:18', '1', '2024-03-30 17:53:18', b'0', 152); | |
| 4989 | +INSERT INTO `system_role_menu` (`id`, `role_id`, `menu_id`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (4353, 141, 1186, '1', '2024-03-30 17:53:18', '1', '2024-03-30 17:53:18', b'0', 152); | |
| 4990 | +INSERT INTO `system_role_menu` (`id`, `role_id`, `menu_id`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (4354, 141, 2722, '1', '2024-03-30 17:53:18', '1', '2024-03-30 17:53:18', b'0', 152); | |
| 4991 | +INSERT INTO `system_role_menu` (`id`, `role_id`, `menu_id`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (4355, 141, 1187, '1', '2024-03-30 17:53:18', '1', '2024-03-30 17:53:18', b'0', 152); | |
| 4992 | +INSERT INTO `system_role_menu` (`id`, `role_id`, `menu_id`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (4356, 141, 2723, '1', '2024-03-30 17:53:18', '1', '2024-03-30 17:53:18', b'0', 152); | |
| 4993 | +INSERT INTO `system_role_menu` (`id`, `role_id`, `menu_id`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (4357, 141, 1188, '1', '2024-03-30 17:53:18', '1', '2024-03-30 17:53:18', b'0', 152); | |
| 4994 | +INSERT INTO `system_role_menu` (`id`, `role_id`, `menu_id`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (4358, 141, 2724, '1', '2024-03-30 17:53:18', '1', '2024-03-30 17:53:18', b'0', 152); | |
| 4995 | +INSERT INTO `system_role_menu` (`id`, `role_id`, `menu_id`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (4359, 141, 1189, '1', '2024-03-30 17:53:18', '1', '2024-03-30 17:53:18', b'0', 152); | |
| 4996 | +INSERT INTO `system_role_menu` (`id`, `role_id`, `menu_id`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (4360, 141, 2725, '1', '2024-03-30 17:53:18', '1', '2024-03-30 17:53:18', b'0', 152); | |
| 4997 | +INSERT INTO `system_role_menu` (`id`, `role_id`, `menu_id`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (4361, 141, 1190, '1', '2024-03-30 17:53:18', '1', '2024-03-30 17:53:18', b'0', 152); | |
| 4998 | +INSERT INTO `system_role_menu` (`id`, `role_id`, `menu_id`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (4362, 141, 2726, '1', '2024-03-30 17:53:18', '1', '2024-03-30 17:53:18', b'0', 152); | |
| 4999 | +INSERT INTO `system_role_menu` (`id`, `role_id`, `menu_id`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (4363, 141, 1191, '1', '2024-03-30 17:53:18', '1', '2024-03-30 17:53:18', b'0', 152); | |
| 5000 | +INSERT INTO `system_role_menu` (`id`, `role_id`, `menu_id`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (4364, 141, 2727, '1', '2024-03-30 17:53:18', '1', '2024-03-30 17:53:18', b'0', 152); | |
| 5001 | +INSERT INTO `system_role_menu` (`id`, `role_id`, `menu_id`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (4365, 141, 1192, '1', '2024-03-30 17:53:18', '1', '2024-03-30 17:53:18', b'0', 152); | |
| 5002 | +INSERT INTO `system_role_menu` (`id`, `role_id`, `menu_id`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (4366, 141, 2728, '1', '2024-03-30 17:53:18', '1', '2024-03-30 17:53:18', b'0', 152); | |
| 5003 | +INSERT INTO `system_role_menu` (`id`, `role_id`, `menu_id`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (4367, 141, 1193, '1', '2024-03-30 17:53:18', '1', '2024-03-30 17:53:18', b'0', 152); | |
| 5004 | +INSERT INTO `system_role_menu` (`id`, `role_id`, `menu_id`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (4368, 141, 2729, '1', '2024-03-30 17:53:18', '1', '2024-03-30 17:53:18', b'0', 152); | |
| 5005 | +INSERT INTO `system_role_menu` (`id`, `role_id`, `menu_id`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (4369, 141, 1194, '1', '2024-03-30 17:53:18', '1', '2024-03-30 17:53:18', b'0', 152); | |
| 5006 | +INSERT INTO `system_role_menu` (`id`, `role_id`, `menu_id`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (4370, 141, 2730, '1', '2024-03-30 17:53:18', '1', '2024-03-30 17:53:18', b'0', 152); | |
| 5007 | +INSERT INTO `system_role_menu` (`id`, `role_id`, `menu_id`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (4371, 141, 1195, '1', '2024-03-30 17:53:18', '1', '2024-03-30 17:53:18', b'0', 152); | |
| 5008 | +INSERT INTO `system_role_menu` (`id`, `role_id`, `menu_id`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (4372, 141, 2731, '1', '2024-03-30 17:53:18', '1', '2024-03-30 17:53:18', b'0', 152); | |
| 5009 | +INSERT INTO `system_role_menu` (`id`, `role_id`, `menu_id`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (4373, 141, 1196, '1', '2024-03-30 17:53:18', '1', '2024-03-30 17:53:18', b'0', 152); | |
| 5010 | +INSERT INTO `system_role_menu` (`id`, `role_id`, `menu_id`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (4374, 141, 2732, '1', '2024-03-30 17:53:18', '1', '2024-03-30 17:53:18', b'0', 152); | |
| 5011 | +INSERT INTO `system_role_menu` (`id`, `role_id`, `menu_id`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (4375, 141, 1197, '1', '2024-03-30 17:53:18', '1', '2024-03-30 17:53:18', b'0', 152); | |
| 5012 | +INSERT INTO `system_role_menu` (`id`, `role_id`, `menu_id`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (4376, 141, 2733, '1', '2024-03-30 17:53:18', '1', '2024-03-30 17:53:18', b'0', 152); | |
| 5013 | +INSERT INTO `system_role_menu` (`id`, `role_id`, `menu_id`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (4377, 141, 1198, '1', '2024-03-30 17:53:18', '1', '2024-03-30 17:53:18', b'0', 152); | |
| 5014 | +INSERT INTO `system_role_menu` (`id`, `role_id`, `menu_id`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (4378, 141, 2734, '1', '2024-03-30 17:53:18', '1', '2024-03-30 17:53:18', b'0', 152); | |
| 5015 | +INSERT INTO `system_role_menu` (`id`, `role_id`, `menu_id`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (4379, 141, 1199, '1', '2024-03-30 17:53:18', '1', '2024-03-30 17:53:18', b'0', 152); | |
| 5016 | +INSERT INTO `system_role_menu` (`id`, `role_id`, `menu_id`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (4380, 141, 2735, '1', '2024-03-30 17:53:18', '1', '2024-03-30 17:53:18', b'0', 152); | |
| 5017 | +INSERT INTO `system_role_menu` (`id`, `role_id`, `menu_id`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (4381, 141, 1200, '1', '2024-03-30 17:53:18', '1', '2024-03-30 17:53:18', b'0', 152); | |
| 5018 | +INSERT INTO `system_role_menu` (`id`, `role_id`, `menu_id`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (4382, 141, 1201, '1', '2024-03-30 17:53:18', '1', '2024-03-30 17:53:18', b'0', 152); | |
| 5019 | +INSERT INTO `system_role_menu` (`id`, `role_id`, `menu_id`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (4383, 141, 1202, '1', '2024-03-30 17:53:18', '1', '2024-03-30 17:53:18', b'0', 152); | |
| 5020 | +INSERT INTO `system_role_menu` (`id`, `role_id`, `menu_id`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (4384, 141, 1207, '1', '2024-03-30 17:53:18', '1', '2024-03-30 17:53:18', b'0', 152); | |
| 5021 | +INSERT INTO `system_role_menu` (`id`, `role_id`, `menu_id`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (4385, 141, 1208, '1', '2024-03-30 17:53:18', '1', '2024-03-30 17:53:18', b'0', 152); | |
| 5022 | +INSERT INTO `system_role_menu` (`id`, `role_id`, `menu_id`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (4386, 141, 1209, '1', '2024-03-30 17:53:18', '1', '2024-03-30 17:53:18', b'0', 152); | |
| 5023 | +INSERT INTO `system_role_menu` (`id`, `role_id`, `menu_id`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (4387, 141, 1210, '1', '2024-03-30 17:53:18', '1', '2024-03-30 17:53:18', b'0', 152); | |
| 5024 | +INSERT INTO `system_role_menu` (`id`, `role_id`, `menu_id`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (4388, 141, 1211, '1', '2024-03-30 17:53:18', '1', '2024-03-30 17:53:18', b'0', 152); | |
| 5025 | +INSERT INTO `system_role_menu` (`id`, `role_id`, `menu_id`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (4389, 141, 1212, '1', '2024-03-30 17:53:18', '1', '2024-03-30 17:53:18', b'0', 152); | |
| 5026 | +INSERT INTO `system_role_menu` (`id`, `role_id`, `menu_id`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (4390, 141, 1213, '1', '2024-03-30 17:53:18', '1', '2024-03-30 17:53:18', b'0', 152); | |
| 5027 | +INSERT INTO `system_role_menu` (`id`, `role_id`, `menu_id`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (4391, 141, 1215, '1', '2024-03-30 17:53:18', '1', '2024-03-30 17:53:18', b'0', 152); | |
| 5028 | +INSERT INTO `system_role_menu` (`id`, `role_id`, `menu_id`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (4392, 141, 1216, '1', '2024-03-30 17:53:18', '1', '2024-03-30 17:53:18', b'0', 152); | |
| 5029 | +INSERT INTO `system_role_menu` (`id`, `role_id`, `menu_id`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (4393, 141, 1217, '1', '2024-03-30 17:53:18', '1', '2024-03-30 17:53:18', b'0', 152); | |
| 5030 | +INSERT INTO `system_role_menu` (`id`, `role_id`, `menu_id`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (4394, 141, 1218, '1', '2024-03-30 17:53:18', '1', '2024-03-30 17:53:18', b'0', 152); | |
| 5031 | +INSERT INTO `system_role_menu` (`id`, `role_id`, `menu_id`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (4395, 141, 1219, '1', '2024-03-30 17:53:18', '1', '2024-03-30 17:53:18', b'0', 152); | |
| 5032 | +INSERT INTO `system_role_menu` (`id`, `role_id`, `menu_id`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (4396, 141, 1220, '1', '2024-03-30 17:53:18', '1', '2024-03-30 17:53:18', b'0', 152); | |
| 5033 | +INSERT INTO `system_role_menu` (`id`, `role_id`, `menu_id`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (4397, 141, 1221, '1', '2024-03-30 17:53:18', '1', '2024-03-30 17:53:18', b'0', 152); | |
| 5034 | +INSERT INTO `system_role_menu` (`id`, `role_id`, `menu_id`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (4398, 141, 1222, '1', '2024-03-30 17:53:18', '1', '2024-03-30 17:53:18', b'0', 152); | |
| 5035 | +INSERT INTO `system_role_menu` (`id`, `role_id`, `menu_id`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (4399, 143, 5, '1', '2024-03-30 17:53:18', '1', '2024-03-30 17:53:18', b'0', 153); | |
| 5036 | +INSERT INTO `system_role_menu` (`id`, `role_id`, `menu_id`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (4400, 143, 1118, '1', '2024-03-30 17:53:18', '1', '2024-03-30 17:53:18', b'0', 153); | |
| 5037 | +INSERT INTO `system_role_menu` (`id`, `role_id`, `menu_id`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (4401, 143, 1119, '1', '2024-03-30 17:53:18', '1', '2024-03-30 17:53:18', b'0', 153); | |
| 5038 | +INSERT INTO `system_role_menu` (`id`, `role_id`, `menu_id`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (4402, 143, 1120, '1', '2024-03-30 17:53:18', '1', '2024-03-30 17:53:18', b'0', 153); | |
| 5039 | +INSERT INTO `system_role_menu` (`id`, `role_id`, `menu_id`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (4403, 143, 2713, '1', '2024-03-30 17:53:18', '1', '2024-03-30 17:53:18', b'0', 153); | |
| 5040 | +INSERT INTO `system_role_menu` (`id`, `role_id`, `menu_id`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (4404, 143, 2714, '1', '2024-03-30 17:53:18', '1', '2024-03-30 17:53:18', b'0', 153); | |
| 5041 | +INSERT INTO `system_role_menu` (`id`, `role_id`, `menu_id`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (4405, 143, 2715, '1', '2024-03-30 17:53:18', '1', '2024-03-30 17:53:18', b'0', 153); | |
| 5042 | +INSERT INTO `system_role_menu` (`id`, `role_id`, `menu_id`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (4406, 143, 2716, '1', '2024-03-30 17:53:18', '1', '2024-03-30 17:53:18', b'0', 153); | |
| 5043 | +INSERT INTO `system_role_menu` (`id`, `role_id`, `menu_id`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (4407, 143, 2717, '1', '2024-03-30 17:53:18', '1', '2024-03-30 17:53:18', b'0', 153); | |
| 5044 | +INSERT INTO `system_role_menu` (`id`, `role_id`, `menu_id`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (4408, 143, 2718, '1', '2024-03-30 17:53:18', '1', '2024-03-30 17:53:18', b'0', 153); | |
| 5045 | +INSERT INTO `system_role_menu` (`id`, `role_id`, `menu_id`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (4409, 143, 2720, '1', '2024-03-30 17:53:18', '1', '2024-03-30 17:53:18', b'0', 153); | |
| 5046 | +INSERT INTO `system_role_menu` (`id`, `role_id`, `menu_id`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (4410, 143, 1185, '1', '2024-03-30 17:53:18', '1', '2024-03-30 17:53:18', b'0', 153); | |
| 5047 | +INSERT INTO `system_role_menu` (`id`, `role_id`, `menu_id`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (4411, 143, 2721, '1', '2024-03-30 17:53:18', '1', '2024-03-30 17:53:18', b'0', 153); | |
| 5048 | +INSERT INTO `system_role_menu` (`id`, `role_id`, `menu_id`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (4412, 143, 1186, '1', '2024-03-30 17:53:18', '1', '2024-03-30 17:53:18', b'0', 153); | |
| 5049 | +INSERT INTO `system_role_menu` (`id`, `role_id`, `menu_id`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (4413, 143, 2722, '1', '2024-03-30 17:53:18', '1', '2024-03-30 17:53:18', b'0', 153); | |
| 5050 | +INSERT INTO `system_role_menu` (`id`, `role_id`, `menu_id`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (4414, 143, 1187, '1', '2024-03-30 17:53:18', '1', '2024-03-30 17:53:18', b'0', 153); | |
| 5051 | +INSERT INTO `system_role_menu` (`id`, `role_id`, `menu_id`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (4415, 143, 2723, '1', '2024-03-30 17:53:18', '1', '2024-03-30 17:53:18', b'0', 153); | |
| 5052 | +INSERT INTO `system_role_menu` (`id`, `role_id`, `menu_id`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (4416, 143, 1188, '1', '2024-03-30 17:53:18', '1', '2024-03-30 17:53:18', b'0', 153); | |
| 5053 | +INSERT INTO `system_role_menu` (`id`, `role_id`, `menu_id`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (4417, 143, 2724, '1', '2024-03-30 17:53:18', '1', '2024-03-30 17:53:18', b'0', 153); | |
| 5054 | +INSERT INTO `system_role_menu` (`id`, `role_id`, `menu_id`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (4418, 143, 1189, '1', '2024-03-30 17:53:18', '1', '2024-03-30 17:53:18', b'0', 153); | |
| 5055 | +INSERT INTO `system_role_menu` (`id`, `role_id`, `menu_id`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (4419, 143, 2725, '1', '2024-03-30 17:53:18', '1', '2024-03-30 17:53:18', b'0', 153); | |
| 5056 | +INSERT INTO `system_role_menu` (`id`, `role_id`, `menu_id`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (4420, 143, 1190, '1', '2024-03-30 17:53:18', '1', '2024-03-30 17:53:18', b'0', 153); | |
| 5057 | +INSERT INTO `system_role_menu` (`id`, `role_id`, `menu_id`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (4421, 143, 2726, '1', '2024-03-30 17:53:18', '1', '2024-03-30 17:53:18', b'0', 153); | |
| 5058 | +INSERT INTO `system_role_menu` (`id`, `role_id`, `menu_id`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (4422, 143, 1191, '1', '2024-03-30 17:53:18', '1', '2024-03-30 17:53:18', b'0', 153); | |
| 5059 | +INSERT INTO `system_role_menu` (`id`, `role_id`, `menu_id`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (4423, 143, 2727, '1', '2024-03-30 17:53:18', '1', '2024-03-30 17:53:18', b'0', 153); | |
| 5060 | +INSERT INTO `system_role_menu` (`id`, `role_id`, `menu_id`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (4424, 143, 1192, '1', '2024-03-30 17:53:18', '1', '2024-03-30 17:53:18', b'0', 153); | |
| 5061 | +INSERT INTO `system_role_menu` (`id`, `role_id`, `menu_id`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (4425, 143, 2728, '1', '2024-03-30 17:53:18', '1', '2024-03-30 17:53:18', b'0', 153); | |
| 5062 | +INSERT INTO `system_role_menu` (`id`, `role_id`, `menu_id`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (4426, 143, 1193, '1', '2024-03-30 17:53:18', '1', '2024-03-30 17:53:18', b'0', 153); | |
| 5063 | +INSERT INTO `system_role_menu` (`id`, `role_id`, `menu_id`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (4427, 143, 2729, '1', '2024-03-30 17:53:18', '1', '2024-03-30 17:53:18', b'0', 153); | |
| 5064 | +INSERT INTO `system_role_menu` (`id`, `role_id`, `menu_id`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (4428, 143, 1194, '1', '2024-03-30 17:53:18', '1', '2024-03-30 17:53:18', b'0', 153); | |
| 5065 | +INSERT INTO `system_role_menu` (`id`, `role_id`, `menu_id`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (4429, 143, 2730, '1', '2024-03-30 17:53:18', '1', '2024-03-30 17:53:18', b'0', 153); | |
| 5066 | +INSERT INTO `system_role_menu` (`id`, `role_id`, `menu_id`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (4430, 143, 1195, '1', '2024-03-30 17:53:18', '1', '2024-03-30 17:53:18', b'0', 153); | |
| 5067 | +INSERT INTO `system_role_menu` (`id`, `role_id`, `menu_id`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (4431, 143, 2731, '1', '2024-03-30 17:53:18', '1', '2024-03-30 17:53:18', b'0', 153); | |
| 5068 | +INSERT INTO `system_role_menu` (`id`, `role_id`, `menu_id`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (4432, 143, 1196, '1', '2024-03-30 17:53:18', '1', '2024-03-30 17:53:18', b'0', 153); | |
| 5069 | +INSERT INTO `system_role_menu` (`id`, `role_id`, `menu_id`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (4433, 143, 2732, '1', '2024-03-30 17:53:18', '1', '2024-03-30 17:53:18', b'0', 153); | |
| 5070 | +INSERT INTO `system_role_menu` (`id`, `role_id`, `menu_id`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (4434, 143, 1197, '1', '2024-03-30 17:53:18', '1', '2024-03-30 17:53:18', b'0', 153); | |
| 5071 | +INSERT INTO `system_role_menu` (`id`, `role_id`, `menu_id`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (4435, 143, 2733, '1', '2024-03-30 17:53:18', '1', '2024-03-30 17:53:18', b'0', 153); | |
| 5072 | +INSERT INTO `system_role_menu` (`id`, `role_id`, `menu_id`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (4436, 143, 1198, '1', '2024-03-30 17:53:18', '1', '2024-03-30 17:53:18', b'0', 153); | |
| 5073 | +INSERT INTO `system_role_menu` (`id`, `role_id`, `menu_id`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (4437, 143, 2734, '1', '2024-03-30 17:53:18', '1', '2024-03-30 17:53:18', b'0', 153); | |
| 5074 | +INSERT INTO `system_role_menu` (`id`, `role_id`, `menu_id`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (4438, 143, 1199, '1', '2024-03-30 17:53:18', '1', '2024-03-30 17:53:18', b'0', 153); | |
| 5075 | +INSERT INTO `system_role_menu` (`id`, `role_id`, `menu_id`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (4439, 143, 2735, '1', '2024-03-30 17:53:18', '1', '2024-03-30 17:53:18', b'0', 153); | |
| 5076 | +INSERT INTO `system_role_menu` (`id`, `role_id`, `menu_id`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (4440, 143, 1200, '1', '2024-03-30 17:53:18', '1', '2024-03-30 17:53:18', b'0', 153); | |
| 5077 | +INSERT INTO `system_role_menu` (`id`, `role_id`, `menu_id`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (4441, 143, 1201, '1', '2024-03-30 17:53:18', '1', '2024-03-30 17:53:18', b'0', 153); | |
| 5078 | +INSERT INTO `system_role_menu` (`id`, `role_id`, `menu_id`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (4442, 143, 1202, '1', '2024-03-30 17:53:18', '1', '2024-03-30 17:53:18', b'0', 153); | |
| 5079 | +INSERT INTO `system_role_menu` (`id`, `role_id`, `menu_id`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (4443, 143, 1207, '1', '2024-03-30 17:53:18', '1', '2024-03-30 17:53:18', b'0', 153); | |
| 5080 | +INSERT INTO `system_role_menu` (`id`, `role_id`, `menu_id`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (4444, 143, 1208, '1', '2024-03-30 17:53:18', '1', '2024-03-30 17:53:18', b'0', 153); | |
| 5081 | +INSERT INTO `system_role_menu` (`id`, `role_id`, `menu_id`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (4445, 143, 1209, '1', '2024-03-30 17:53:18', '1', '2024-03-30 17:53:18', b'0', 153); | |
| 5082 | +INSERT INTO `system_role_menu` (`id`, `role_id`, `menu_id`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (4446, 143, 1210, '1', '2024-03-30 17:53:18', '1', '2024-03-30 17:53:18', b'0', 153); | |
| 5083 | +INSERT INTO `system_role_menu` (`id`, `role_id`, `menu_id`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (4447, 143, 1211, '1', '2024-03-30 17:53:18', '1', '2024-03-30 17:53:18', b'0', 153); | |
| 5084 | +INSERT INTO `system_role_menu` (`id`, `role_id`, `menu_id`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (4448, 143, 1212, '1', '2024-03-30 17:53:18', '1', '2024-03-30 17:53:18', b'0', 153); | |
| 5085 | +INSERT INTO `system_role_menu` (`id`, `role_id`, `menu_id`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (4449, 143, 1213, '1', '2024-03-30 17:53:18', '1', '2024-03-30 17:53:18', b'0', 153); | |
| 5086 | +INSERT INTO `system_role_menu` (`id`, `role_id`, `menu_id`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (4450, 143, 1215, '1', '2024-03-30 17:53:18', '1', '2024-03-30 17:53:18', b'0', 153); | |
| 5087 | +INSERT INTO `system_role_menu` (`id`, `role_id`, `menu_id`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (4451, 143, 1216, '1', '2024-03-30 17:53:18', '1', '2024-03-30 17:53:18', b'0', 153); | |
| 5088 | +INSERT INTO `system_role_menu` (`id`, `role_id`, `menu_id`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (4452, 143, 1217, '1', '2024-03-30 17:53:18', '1', '2024-03-30 17:53:18', b'0', 153); | |
| 5089 | +INSERT INTO `system_role_menu` (`id`, `role_id`, `menu_id`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (4453, 143, 1218, '1', '2024-03-30 17:53:18', '1', '2024-03-30 17:53:18', b'0', 153); | |
| 5090 | +INSERT INTO `system_role_menu` (`id`, `role_id`, `menu_id`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (4454, 143, 1219, '1', '2024-03-30 17:53:18', '1', '2024-03-30 17:53:18', b'0', 153); | |
| 5091 | +INSERT INTO `system_role_menu` (`id`, `role_id`, `menu_id`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (4455, 143, 1220, '1', '2024-03-30 17:53:18', '1', '2024-03-30 17:53:18', b'0', 153); | |
| 5092 | +INSERT INTO `system_role_menu` (`id`, `role_id`, `menu_id`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (4456, 143, 1221, '1', '2024-03-30 17:53:18', '1', '2024-03-30 17:53:18', b'0', 153); | |
| 5093 | +INSERT INTO `system_role_menu` (`id`, `role_id`, `menu_id`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (4457, 143, 1222, '1', '2024-03-30 17:53:18', '1', '2024-03-30 17:53:18', b'0', 153); | |
| 5094 | +INSERT INTO `system_role_menu` (`id`, `role_id`, `menu_id`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (4458, 144, 5, '1', '2024-03-30 17:53:18', '1', '2024-03-30 17:53:18', b'0', 154); | |
| 5095 | +INSERT INTO `system_role_menu` (`id`, `role_id`, `menu_id`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (4459, 144, 1118, '1', '2024-03-30 17:53:18', '1', '2024-03-30 17:53:18', b'0', 154); | |
| 5096 | +INSERT INTO `system_role_menu` (`id`, `role_id`, `menu_id`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (4460, 144, 1119, '1', '2024-03-30 17:53:18', '1', '2024-03-30 17:53:18', b'0', 154); | |
| 5097 | +INSERT INTO `system_role_menu` (`id`, `role_id`, `menu_id`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (4461, 144, 1120, '1', '2024-03-30 17:53:18', '1', '2024-03-30 17:53:18', b'0', 154); | |
| 5098 | +INSERT INTO `system_role_menu` (`id`, `role_id`, `menu_id`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (4462, 144, 2713, '1', '2024-03-30 17:53:18', '1', '2024-03-30 17:53:18', b'0', 154); | |
| 5099 | +INSERT INTO `system_role_menu` (`id`, `role_id`, `menu_id`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (4463, 144, 2714, '1', '2024-03-30 17:53:18', '1', '2024-03-30 17:53:18', b'0', 154); | |
| 5100 | +INSERT INTO `system_role_menu` (`id`, `role_id`, `menu_id`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (4464, 144, 2715, '1', '2024-03-30 17:53:18', '1', '2024-03-30 17:53:18', b'0', 154); | |
| 5101 | +INSERT INTO `system_role_menu` (`id`, `role_id`, `menu_id`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (4465, 144, 2716, '1', '2024-03-30 17:53:18', '1', '2024-03-30 17:53:18', b'0', 154); | |
| 5102 | +INSERT INTO `system_role_menu` (`id`, `role_id`, `menu_id`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (4466, 144, 2717, '1', '2024-03-30 17:53:18', '1', '2024-03-30 17:53:18', b'0', 154); | |
| 5103 | +INSERT INTO `system_role_menu` (`id`, `role_id`, `menu_id`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (4467, 144, 2718, '1', '2024-03-30 17:53:18', '1', '2024-03-30 17:53:18', b'0', 154); | |
| 5104 | +INSERT INTO `system_role_menu` (`id`, `role_id`, `menu_id`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (4468, 144, 2720, '1', '2024-03-30 17:53:18', '1', '2024-03-30 17:53:18', b'0', 154); | |
| 5105 | +INSERT INTO `system_role_menu` (`id`, `role_id`, `menu_id`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (4469, 144, 1185, '1', '2024-03-30 17:53:18', '1', '2024-03-30 17:53:18', b'0', 154); | |
| 5106 | +INSERT INTO `system_role_menu` (`id`, `role_id`, `menu_id`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (4470, 144, 2721, '1', '2024-03-30 17:53:18', '1', '2024-03-30 17:53:18', b'0', 154); | |
| 5107 | +INSERT INTO `system_role_menu` (`id`, `role_id`, `menu_id`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (4471, 144, 1186, '1', '2024-03-30 17:53:18', '1', '2024-03-30 17:53:18', b'0', 154); | |
| 5108 | +INSERT INTO `system_role_menu` (`id`, `role_id`, `menu_id`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (4472, 144, 2722, '1', '2024-03-30 17:53:18', '1', '2024-03-30 17:53:18', b'0', 154); | |
| 5109 | +INSERT INTO `system_role_menu` (`id`, `role_id`, `menu_id`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (4473, 144, 1187, '1', '2024-03-30 17:53:18', '1', '2024-03-30 17:53:18', b'0', 154); | |
| 5110 | +INSERT INTO `system_role_menu` (`id`, `role_id`, `menu_id`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (4474, 144, 2723, '1', '2024-03-30 17:53:18', '1', '2024-03-30 17:53:18', b'0', 154); | |
| 5111 | +INSERT INTO `system_role_menu` (`id`, `role_id`, `menu_id`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (4475, 144, 1188, '1', '2024-03-30 17:53:18', '1', '2024-03-30 17:53:18', b'0', 154); | |
| 5112 | +INSERT INTO `system_role_menu` (`id`, `role_id`, `menu_id`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (4476, 144, 2724, '1', '2024-03-30 17:53:18', '1', '2024-03-30 17:53:18', b'0', 154); | |
| 5113 | +INSERT INTO `system_role_menu` (`id`, `role_id`, `menu_id`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (4477, 144, 1189, '1', '2024-03-30 17:53:18', '1', '2024-03-30 17:53:18', b'0', 154); | |
| 5114 | +INSERT INTO `system_role_menu` (`id`, `role_id`, `menu_id`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (4478, 144, 2725, '1', '2024-03-30 17:53:18', '1', '2024-03-30 17:53:18', b'0', 154); | |
| 5115 | +INSERT INTO `system_role_menu` (`id`, `role_id`, `menu_id`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (4479, 144, 1190, '1', '2024-03-30 17:53:18', '1', '2024-03-30 17:53:18', b'0', 154); | |
| 5116 | +INSERT INTO `system_role_menu` (`id`, `role_id`, `menu_id`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (4480, 144, 2726, '1', '2024-03-30 17:53:18', '1', '2024-03-30 17:53:18', b'0', 154); | |
| 5117 | +INSERT INTO `system_role_menu` (`id`, `role_id`, `menu_id`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (4481, 144, 1191, '1', '2024-03-30 17:53:18', '1', '2024-03-30 17:53:18', b'0', 154); | |
| 5118 | +INSERT INTO `system_role_menu` (`id`, `role_id`, `menu_id`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (4482, 144, 2727, '1', '2024-03-30 17:53:18', '1', '2024-03-30 17:53:18', b'0', 154); | |
| 5119 | +INSERT INTO `system_role_menu` (`id`, `role_id`, `menu_id`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (4483, 144, 1192, '1', '2024-03-30 17:53:18', '1', '2024-03-30 17:53:18', b'0', 154); | |
| 5120 | +INSERT INTO `system_role_menu` (`id`, `role_id`, `menu_id`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (4484, 144, 2728, '1', '2024-03-30 17:53:18', '1', '2024-03-30 17:53:18', b'0', 154); | |
| 5121 | +INSERT INTO `system_role_menu` (`id`, `role_id`, `menu_id`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (4485, 144, 1193, '1', '2024-03-30 17:53:18', '1', '2024-03-30 17:53:18', b'0', 154); | |
| 5122 | +INSERT INTO `system_role_menu` (`id`, `role_id`, `menu_id`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (4486, 144, 2729, '1', '2024-03-30 17:53:18', '1', '2024-03-30 17:53:18', b'0', 154); | |
| 5123 | +INSERT INTO `system_role_menu` (`id`, `role_id`, `menu_id`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (4487, 144, 1194, '1', '2024-03-30 17:53:18', '1', '2024-03-30 17:53:18', b'0', 154); | |
| 5124 | +INSERT INTO `system_role_menu` (`id`, `role_id`, `menu_id`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (4488, 144, 2730, '1', '2024-03-30 17:53:18', '1', '2024-03-30 17:53:18', b'0', 154); | |
| 5125 | +INSERT INTO `system_role_menu` (`id`, `role_id`, `menu_id`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (4489, 144, 1195, '1', '2024-03-30 17:53:18', '1', '2024-03-30 17:53:18', b'0', 154); | |
| 5126 | +INSERT INTO `system_role_menu` (`id`, `role_id`, `menu_id`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (4490, 144, 2731, '1', '2024-03-30 17:53:18', '1', '2024-03-30 17:53:18', b'0', 154); | |
| 5127 | +INSERT INTO `system_role_menu` (`id`, `role_id`, `menu_id`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (4491, 144, 1196, '1', '2024-03-30 17:53:18', '1', '2024-03-30 17:53:18', b'0', 154); | |
| 5128 | +INSERT INTO `system_role_menu` (`id`, `role_id`, `menu_id`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (4492, 144, 2732, '1', '2024-03-30 17:53:18', '1', '2024-03-30 17:53:18', b'0', 154); | |
| 5129 | +INSERT INTO `system_role_menu` (`id`, `role_id`, `menu_id`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (4493, 144, 1197, '1', '2024-03-30 17:53:18', '1', '2024-03-30 17:53:18', b'0', 154); | |
| 5130 | +INSERT INTO `system_role_menu` (`id`, `role_id`, `menu_id`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (4494, 144, 2733, '1', '2024-03-30 17:53:18', '1', '2024-03-30 17:53:18', b'0', 154); | |
| 5131 | +INSERT INTO `system_role_menu` (`id`, `role_id`, `menu_id`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (4495, 144, 1198, '1', '2024-03-30 17:53:18', '1', '2024-03-30 17:53:18', b'0', 154); | |
| 5132 | +INSERT INTO `system_role_menu` (`id`, `role_id`, `menu_id`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (4496, 144, 2734, '1', '2024-03-30 17:53:18', '1', '2024-03-30 17:53:18', b'0', 154); | |
| 5133 | +INSERT INTO `system_role_menu` (`id`, `role_id`, `menu_id`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (4497, 144, 1199, '1', '2024-03-30 17:53:18', '1', '2024-03-30 17:53:18', b'0', 154); | |
| 5134 | +INSERT INTO `system_role_menu` (`id`, `role_id`, `menu_id`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (4498, 144, 2735, '1', '2024-03-30 17:53:18', '1', '2024-03-30 17:53:18', b'0', 154); | |
| 5135 | +INSERT INTO `system_role_menu` (`id`, `role_id`, `menu_id`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (4499, 144, 1200, '1', '2024-03-30 17:53:18', '1', '2024-03-30 17:53:18', b'0', 154); | |
| 5136 | +INSERT INTO `system_role_menu` (`id`, `role_id`, `menu_id`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (4500, 144, 1201, '1', '2024-03-30 17:53:18', '1', '2024-03-30 17:53:18', b'0', 154); | |
| 5137 | +INSERT INTO `system_role_menu` (`id`, `role_id`, `menu_id`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (4501, 144, 1202, '1', '2024-03-30 17:53:18', '1', '2024-03-30 17:53:18', b'0', 154); | |
| 5138 | +INSERT INTO `system_role_menu` (`id`, `role_id`, `menu_id`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (4502, 144, 1207, '1', '2024-03-30 17:53:18', '1', '2024-03-30 17:53:18', b'0', 154); | |
| 5139 | +INSERT INTO `system_role_menu` (`id`, `role_id`, `menu_id`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (4503, 144, 1208, '1', '2024-03-30 17:53:18', '1', '2024-03-30 17:53:18', b'0', 154); | |
| 5140 | +INSERT INTO `system_role_menu` (`id`, `role_id`, `menu_id`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (4504, 144, 1209, '1', '2024-03-30 17:53:18', '1', '2024-03-30 17:53:18', b'0', 154); | |
| 5141 | +INSERT INTO `system_role_menu` (`id`, `role_id`, `menu_id`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (4505, 144, 1210, '1', '2024-03-30 17:53:18', '1', '2024-03-30 17:53:18', b'0', 154); | |
| 5142 | +INSERT INTO `system_role_menu` (`id`, `role_id`, `menu_id`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (4506, 144, 1211, '1', '2024-03-30 17:53:18', '1', '2024-03-30 17:53:18', b'0', 154); | |
| 5143 | +INSERT INTO `system_role_menu` (`id`, `role_id`, `menu_id`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (4507, 144, 1212, '1', '2024-03-30 17:53:18', '1', '2024-03-30 17:53:18', b'0', 154); | |
| 5144 | +INSERT INTO `system_role_menu` (`id`, `role_id`, `menu_id`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (4508, 144, 1213, '1', '2024-03-30 17:53:18', '1', '2024-03-30 17:53:18', b'0', 154); | |
| 5145 | +INSERT INTO `system_role_menu` (`id`, `role_id`, `menu_id`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (4509, 144, 1215, '1', '2024-03-30 17:53:18', '1', '2024-03-30 17:53:18', b'0', 154); | |
| 5146 | +INSERT INTO `system_role_menu` (`id`, `role_id`, `menu_id`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (4510, 144, 1216, '1', '2024-03-30 17:53:18', '1', '2024-03-30 17:53:18', b'0', 154); | |
| 5147 | +INSERT INTO `system_role_menu` (`id`, `role_id`, `menu_id`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (4511, 144, 1217, '1', '2024-03-30 17:53:18', '1', '2024-03-30 17:53:18', b'0', 154); | |
| 5148 | +INSERT INTO `system_role_menu` (`id`, `role_id`, `menu_id`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (4512, 144, 1218, '1', '2024-03-30 17:53:18', '1', '2024-03-30 17:53:18', b'0', 154); | |
| 5149 | +INSERT INTO `system_role_menu` (`id`, `role_id`, `menu_id`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (4513, 144, 1219, '1', '2024-03-30 17:53:18', '1', '2024-03-30 17:53:18', b'0', 154); | |
| 5150 | +INSERT INTO `system_role_menu` (`id`, `role_id`, `menu_id`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (4514, 144, 1220, '1', '2024-03-30 17:53:18', '1', '2024-03-30 17:53:18', b'0', 154); | |
| 5151 | +INSERT INTO `system_role_menu` (`id`, `role_id`, `menu_id`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (4515, 144, 1221, '1', '2024-03-30 17:53:18', '1', '2024-03-30 17:53:18', b'0', 154); | |
| 5152 | +INSERT INTO `system_role_menu` (`id`, `role_id`, `menu_id`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (4516, 144, 1222, '1', '2024-03-30 17:53:18', '1', '2024-03-30 17:53:18', b'0', 154); | |
| 4715 | 5153 | COMMIT; |
| 4716 | 5154 | |
| 4717 | 5155 | -- ---------------------------- |
| ... | ... | @@ -4793,7 +5231,7 @@ CREATE TABLE `system_sms_code` ( |
| 4793 | 5231 | `tenant_id` bigint NOT NULL DEFAULT 0 COMMENT '租户编号', |
| 4794 | 5232 | PRIMARY KEY (`id`) USING BTREE, |
| 4795 | 5233 | INDEX `idx_mobile`(`mobile` ASC) USING BTREE COMMENT '手机号' |
| 4796 | -) ENGINE = InnoDB AUTO_INCREMENT = 613 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci COMMENT = '手机验证码'; | |
| 5234 | +) ENGINE = InnoDB AUTO_INCREMENT = 614 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci COMMENT = '手机验证码'; | |
| 4797 | 5235 | |
| 4798 | 5236 | -- ---------------------------- |
| 4799 | 5237 | -- Records of system_sms_code |
| ... | ... | @@ -4834,7 +5272,7 @@ CREATE TABLE `system_sms_log` ( |
| 4834 | 5272 | `update_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间', |
| 4835 | 5273 | `deleted` bit(1) NOT NULL DEFAULT b'0' COMMENT '是否删除', |
| 4836 | 5274 | PRIMARY KEY (`id`) USING BTREE |
| 4837 | -) ENGINE = InnoDB AUTO_INCREMENT = 911 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci COMMENT = '短信日志'; | |
| 5275 | +) ENGINE = InnoDB AUTO_INCREMENT = 948 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci COMMENT = '短信日志'; | |
| 4838 | 5276 | |
| 4839 | 5277 | -- ---------------------------- |
| 4840 | 5278 | -- Records of system_sms_log |
| ... | ... | @@ -4992,7 +5430,7 @@ CREATE TABLE `system_tenant` ( |
| 4992 | 5430 | `update_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间', |
| 4993 | 5431 | `deleted` bit(1) NOT NULL DEFAULT b'0' COMMENT '是否删除', |
| 4994 | 5432 | PRIMARY KEY (`id`) USING BTREE |
| 4995 | -) ENGINE = InnoDB AUTO_INCREMENT = 154 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci COMMENT = '租户表'; | |
| 5433 | +) ENGINE = InnoDB AUTO_INCREMENT = 155 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci COMMENT = '租户表'; | |
| 4996 | 5434 | |
| 4997 | 5435 | -- ---------------------------- |
| 4998 | 5436 | -- Records of system_tenant |
| ... | ... | @@ -5004,6 +5442,7 @@ INSERT INTO `system_tenant` (`id`, `name`, `contact_user_id`, `contact_name`, `c |
| 5004 | 5442 | INSERT INTO `system_tenant` (`id`, `name`, `contact_user_id`, `contact_name`, `contact_mobile`, `status`, `website`, `package_id`, `expire_time`, `account_count`, `creator`, `create_time`, `updater`, `update_time`, `deleted`) VALUES (151, '大租户', 126, '土豆大', NULL, 0, 'https://tudou.iocoder.cn', 111, '2023-12-08 00:00:00', 10, '1', '2023-12-02 23:35:05', '1', '2023-12-08 23:39:56', b'0'); |
| 5005 | 5443 | INSERT INTO `system_tenant` (`id`, `name`, `contact_user_id`, `contact_name`, `contact_mobile`, `status`, `website`, `package_id`, `expire_time`, `account_count`, `creator`, `create_time`, `updater`, `update_time`, `deleted`) VALUES (152, '新租户', 127, '土豆', NULL, 0, 'http://xx.iocoder.cn', 111, '2025-12-31 00:00:00', 50, '1', '2023-12-30 11:43:17', '1', '2023-12-30 11:43:17', b'0'); |
| 5006 | 5444 | INSERT INTO `system_tenant` (`id`, `name`, `contact_user_id`, `contact_name`, `contact_mobile`, `status`, `website`, `package_id`, `expire_time`, `account_count`, `creator`, `create_time`, `updater`, `update_time`, `deleted`) VALUES (153, '小明的租户', 128, 'xiaoming', '15601691301', 0, 'xiaoming.iocoder.cn', 111, '2025-12-01 00:00:00', 100, '1', '2024-02-27 21:58:25', '1', '2024-02-28 22:53:54', b'0'); |
| 5445 | +INSERT INTO `system_tenant` (`id`, `name`, `contact_user_id`, `contact_name`, `contact_mobile`, `status`, `website`, `package_id`, `expire_time`, `account_count`, `creator`, `create_time`, `updater`, `update_time`, `deleted`) VALUES (154, 'hh', 129, 'hh', NULL, 0, 'http://hh.iocoder.cn', 111, '2024-04-30 00:00:00', 123, '1', '2024-03-30 17:52:59', '1', '2024-04-03 15:06:42', b'0'); | |
| 5007 | 5446 | COMMIT; |
| 5008 | 5447 | |
| 5009 | 5448 | -- ---------------------------- |
| ... | ... | @@ -5028,7 +5467,7 @@ CREATE TABLE `system_tenant_package` ( |
| 5028 | 5467 | -- Records of system_tenant_package |
| 5029 | 5468 | -- ---------------------------- |
| 5030 | 5469 | BEGIN; |
| 5031 | -INSERT INTO `system_tenant_package` (`id`, `name`, `status`, `remark`, `menu_ids`, `creator`, `create_time`, `updater`, `update_time`, `deleted`) VALUES (111, '普通套餐', 0, '小功能', '[1,2,1031,1032,1033,1034,1035,1036,1037,1038,1039,1050,1051,1052,1053,1054,1056,1057,1058,1059,1060,1063,1064,1065,1066,1067,1070,1075,1076,1077,1078,1082,1083,1084,1085,1086,1087,1088,1089,1090,1091,1092,100,101,102,103,106,107,110,111,112,113,1138,114,1139,115,1140,116,1141,1142,1143,2472,2478,2479,2480,2481,2482,2483,2484,2485,2486,2487,2488,2489,2490,2491,2492,2493,2494,2495,2497,1224,1225,1226,1227,1228,1229,1237,1238,1239,1240,1241,1242,1243,2525,1255,1256,1001,1257,1002,1258,1003,1259,1004,1260,1005,1006,1007,1008,1009,1010,1011,1012,1013,1014,1015,1016,1017,1018,1019,1020]', '1', '2022-02-22 00:54:00', '1', '2023-12-30 11:42:36', b'0'); | |
| 5470 | +INSERT INTO `system_tenant_package` (`id`, `name`, `status`, `remark`, `menu_ids`, `creator`, `create_time`, `updater`, `update_time`, `deleted`) VALUES (111, '普通套餐', 0, '小功能', '[1,2,5,1031,1032,1033,1034,1035,1036,1037,1038,1039,1050,1051,1052,1053,1054,1056,1057,1058,1059,1060,1063,1064,1065,1066,1067,1070,1075,1076,1077,1078,1082,1083,1084,1085,1086,1087,1088,1089,1090,1091,1092,1118,1119,1120,100,101,102,103,106,107,110,111,112,113,1138,114,1139,115,1140,116,1141,1142,1143,2713,2714,2715,2716,2717,2718,2720,1185,2721,1186,2722,1187,2723,1188,2724,1189,2725,1190,2726,1191,2727,2472,1192,2728,1193,2729,1194,2730,1195,2731,1196,2732,1197,2733,2478,1198,2734,2479,1199,2735,2480,1200,2481,1201,2482,1202,2483,2484,2485,2486,2487,1207,2488,1208,2489,1209,2490,1210,2491,1211,2492,1212,2493,1213,2494,2495,1215,1216,2497,1217,1218,1219,1220,1221,1222,1224,1225,1226,1227,1228,1229,1237,1238,1239,1240,1241,1242,1243,2525,1255,1256,1001,1257,1002,1258,1003,1259,1004,1260,1005,1006,1007,1008,1009,1010,1011,1012,1013,1014,1015,1016,1017,1018,1019,1020]', '1', '2022-02-22 00:54:00', '1', '2024-03-30 17:53:17', b'0'); | |
| 5032 | 5471 | COMMIT; |
| 5033 | 5472 | |
| 5034 | 5473 | -- ---------------------------- |
| ... | ... | @@ -5046,7 +5485,7 @@ CREATE TABLE `system_user_post` ( |
| 5046 | 5485 | `deleted` bit(1) NOT NULL DEFAULT b'0' COMMENT '是否删除', |
| 5047 | 5486 | `tenant_id` bigint NOT NULL DEFAULT 0 COMMENT '租户编号', |
| 5048 | 5487 | PRIMARY KEY (`id`) USING BTREE |
| 5049 | -) ENGINE = InnoDB AUTO_INCREMENT = 119 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci COMMENT = '用户岗位表'; | |
| 5488 | +) ENGINE = InnoDB AUTO_INCREMENT = 125 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci COMMENT = '用户岗位表'; | |
| 5050 | 5489 | |
| 5051 | 5490 | -- ---------------------------- |
| 5052 | 5491 | -- Records of system_user_post |
| ... | ... | @@ -5057,7 +5496,9 @@ INSERT INTO `system_user_post` (`id`, `user_id`, `post_id`, `creator`, `create_t |
| 5057 | 5496 | INSERT INTO `system_user_post` (`id`, `user_id`, `post_id`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (115, 104, 1, '1', '2022-05-16 19:36:28', '1', '2022-05-16 19:36:28', b'0', 1); |
| 5058 | 5497 | INSERT INTO `system_user_post` (`id`, `user_id`, `post_id`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (116, 117, 2, '1', '2022-07-09 17:40:26', '1', '2022-07-09 17:40:26', b'0', 1); |
| 5059 | 5498 | INSERT INTO `system_user_post` (`id`, `user_id`, `post_id`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (117, 118, 1, '1', '2022-07-09 17:44:44', '1', '2022-07-09 17:44:44', b'0', 1); |
| 5060 | -INSERT INTO `system_user_post` (`id`, `user_id`, `post_id`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (118, 114, 1, '1', '2024-03-15 19:48:11', '1', '2024-03-15 19:48:11', b'0', 1); | |
| 5499 | +INSERT INTO `system_user_post` (`id`, `user_id`, `post_id`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (119, 114, 5, '1', '2024-03-24 20:45:51', '1', '2024-03-24 20:45:51', b'0', 1); | |
| 5500 | +INSERT INTO `system_user_post` (`id`, `user_id`, `post_id`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (123, 115, 1, '1', '2024-04-04 09:37:14', '1', '2024-04-04 09:37:14', b'0', 1); | |
| 5501 | +INSERT INTO `system_user_post` (`id`, `user_id`, `post_id`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (124, 115, 2, '1', '2024-04-04 09:37:14', '1', '2024-04-04 09:37:14', b'0', 1); | |
| 5061 | 5502 | COMMIT; |
| 5062 | 5503 | |
| 5063 | 5504 | -- ---------------------------- |
| ... | ... | @@ -5075,7 +5516,7 @@ CREATE TABLE `system_user_role` ( |
| 5075 | 5516 | `deleted` bit(1) NULL DEFAULT b'0' COMMENT '是否删除', |
| 5076 | 5517 | `tenant_id` bigint NOT NULL DEFAULT 0 COMMENT '租户编号', |
| 5077 | 5518 | PRIMARY KEY (`id`) USING BTREE |
| 5078 | -) ENGINE = InnoDB AUTO_INCREMENT = 37 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci COMMENT = '用户和角色关联表'; | |
| 5519 | +) ENGINE = InnoDB AUTO_INCREMENT = 40 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci COMMENT = '用户和角色关联表'; | |
| 5079 | 5520 | |
| 5080 | 5521 | -- ---------------------------- |
| 5081 | 5522 | -- Records of system_user_role |
| ... | ... | @@ -5093,7 +5534,6 @@ INSERT INTO `system_user_role` (`id`, `user_id`, `role_id`, `creator`, `create_t |
| 5093 | 5534 | INSERT INTO `system_user_role` (`id`, `user_id`, `role_id`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (14, 110, 109, '1', '2022-02-22 00:56:14', '1', '2022-02-22 00:56:14', b'0', 121); |
| 5094 | 5535 | INSERT INTO `system_user_role` (`id`, `user_id`, `role_id`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (15, 111, 110, '110', '2022-02-23 13:14:38', '110', '2022-02-23 13:14:38', b'0', 121); |
| 5095 | 5536 | INSERT INTO `system_user_role` (`id`, `user_id`, `role_id`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (16, 113, 111, '1', '2022-03-07 21:37:58', '1', '2022-03-07 21:37:58', b'0', 122); |
| 5096 | -INSERT INTO `system_user_role` (`id`, `user_id`, `role_id`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (17, 114, 101, '1', '2022-03-19 21:51:13', '1', '2022-03-19 21:51:13', b'0', 1); | |
| 5097 | 5537 | INSERT INTO `system_user_role` (`id`, `user_id`, `role_id`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (18, 1, 2, '1', '2022-05-12 20:39:29', '1', '2022-05-12 20:39:29', b'0', 1); |
| 5098 | 5538 | INSERT INTO `system_user_role` (`id`, `user_id`, `role_id`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (19, 116, 113, '1', '2022-05-17 10:07:10', '1', '2022-05-17 10:07:10', b'0', 124); |
| 5099 | 5539 | INSERT INTO `system_user_role` (`id`, `user_id`, `role_id`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (20, 104, 101, '1', '2022-05-28 15:43:57', '1', '2022-05-28 15:43:57', b'0', 1); |
| ... | ... | @@ -5111,6 +5551,8 @@ INSERT INTO `system_user_role` (`id`, `user_id`, `role_id`, `creator`, `create_t |
| 5111 | 5551 | INSERT INTO `system_user_role` (`id`, `user_id`, `role_id`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (34, 128, 143, '1', '2024-02-27 21:58:25', '1', '2024-02-27 21:58:25', b'0', 153); |
| 5112 | 5552 | INSERT INTO `system_user_role` (`id`, `user_id`, `role_id`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (35, 112, 1, '1', '2024-03-15 20:00:24', '1', '2024-03-15 20:00:24', b'0', 1); |
| 5113 | 5553 | INSERT INTO `system_user_role` (`id`, `user_id`, `role_id`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (36, 118, 1, '1', '2024-03-17 09:12:08', '1', '2024-03-17 09:12:08', b'0', 1); |
| 5554 | +INSERT INTO `system_user_role` (`id`, `user_id`, `role_id`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (38, 114, 101, '1', '2024-03-24 22:23:03', '1', '2024-03-24 22:23:03', b'0', 1); | |
| 5555 | +INSERT INTO `system_user_role` (`id`, `user_id`, `role_id`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (39, 129, 144, '1', '2024-03-30 17:52:59', '1', '2024-03-30 17:52:59', b'0', 154); | |
| 5114 | 5556 | COMMIT; |
| 5115 | 5557 | |
| 5116 | 5558 | -- ---------------------------- |
| ... | ... | @@ -5140,16 +5582,16 @@ CREATE TABLE `system_users` ( |
| 5140 | 5582 | `tenant_id` bigint NOT NULL DEFAULT 0 COMMENT '租户编号', |
| 5141 | 5583 | PRIMARY KEY (`id`) USING BTREE, |
| 5142 | 5584 | UNIQUE INDEX `idx_username`(`username` ASC, `update_time` ASC, `tenant_id` ASC) USING BTREE |
| 5143 | -) ENGINE = InnoDB AUTO_INCREMENT = 129 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci COMMENT = '用户信息表'; | |
| 5585 | +) ENGINE = InnoDB AUTO_INCREMENT = 131 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci COMMENT = '用户信息表'; | |
| 5144 | 5586 | |
| 5145 | 5587 | -- ---------------------------- |
| 5146 | 5588 | -- Records of system_users |
| 5147 | 5589 | -- ---------------------------- |
| 5148 | 5590 | BEGIN; |
| 5149 | -INSERT INTO `system_users` (`id`, `username`, `password`, `nickname`, `remark`, `dept_id`, `post_ids`, `email`, `mobile`, `sex`, `avatar`, `status`, `login_ip`, `login_date`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (1, 'admin', '$2a$10$mRMIYLDtRHlf6.9ipiqH1.Z.bh/R9dO9d5iHiGYPigi6r5KOoR2Wm', '芋道源码', '管理员', 103, '[1]', 'aoteman@126.com', '18818260277', 2, 'http://test.yudao.iocoder.cn/96c787a2ce88bf6d0ce3cd8b6cf5314e80e7703cd41bf4af8cd2e2909dbd6b6d.png', 0, '0:0:0:0:0:0:0:1', '2024-03-15 19:32:26', 'admin', '2021-01-05 17:03:47', NULL, '2024-03-15 19:32:26', b'0', 1); | |
| 5591 | +INSERT INTO `system_users` (`id`, `username`, `password`, `nickname`, `remark`, `dept_id`, `post_ids`, `email`, `mobile`, `sex`, `avatar`, `status`, `login_ip`, `login_date`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (1, 'admin', '$2a$10$mRMIYLDtRHlf6.9ipiqH1.Z.bh/R9dO9d5iHiGYPigi6r5KOoR2Wm', '芋道源码', '管理员', 103, '[1]', 'aoteman@126.com', '18818260277', 2, 'http://test.yudao.iocoder.cn/96c787a2ce88bf6d0ce3cd8b6cf5314e80e7703cd41bf4af8cd2e2909dbd6b6d.png', 0, '0:0:0:0:0:0:0:1', '2024-04-07 03:16:30', 'admin', '2021-01-05 17:03:47', NULL, '2024-04-07 03:16:30', b'0', 1); | |
| 5150 | 5592 | INSERT INTO `system_users` (`id`, `username`, `password`, `nickname`, `remark`, `dept_id`, `post_ids`, `email`, `mobile`, `sex`, `avatar`, `status`, `login_ip`, `login_date`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (100, 'yudao', '$2a$10$11U48RhyJ5pSBYWSn12AD./ld671.ycSzJHbyrtpeoMeYiw31eo8a', '芋道', '不要吓我', 104, '[1]', 'yudao@iocoder.cn', '15601691300', 1, '', 1, '127.0.0.1', '2022-07-09 23:03:33', '', '2021-01-07 09:07:17', NULL, '2022-07-09 23:03:33', b'0', 1); |
| 5151 | 5593 | INSERT INTO `system_users` (`id`, `username`, `password`, `nickname`, `remark`, `dept_id`, `post_ids`, `email`, `mobile`, `sex`, `avatar`, `status`, `login_ip`, `login_date`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (103, 'yuanma', '$2a$10$YMpimV4T6BtDhIaA8jSW.u8UTGBeGhc/qwXP4oxoMr4mOw9.qttt6', '源码', NULL, 106, NULL, 'yuanma@iocoder.cn', '15601701300', 0, '', 0, '0:0:0:0:0:0:0:1', '2024-03-18 21:09:04', '', '2021-01-13 23:50:35', NULL, '2024-03-18 21:09:04', b'0', 1); |
| 5152 | -INSERT INTO `system_users` (`id`, `username`, `password`, `nickname`, `remark`, `dept_id`, `post_ids`, `email`, `mobile`, `sex`, `avatar`, `status`, `login_ip`, `login_date`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (104, 'test', '$2a$04$osUERr6VErPvY3mGUh40Teb06H2pJiFuGaWFLRku82pdU713WTGFS', '测试号', NULL, 107, '[1,2]', '111@qq.com', '15601691200', 1, '', 0, '0:0:0:0:0:0:0:1', '2024-02-29 22:40:00', '', '2021-01-21 02:13:53', NULL, '2024-02-29 22:40:00', b'0', 1); | |
| 5594 | +INSERT INTO `system_users` (`id`, `username`, `password`, `nickname`, `remark`, `dept_id`, `post_ids`, `email`, `mobile`, `sex`, `avatar`, `status`, `login_ip`, `login_date`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (104, 'test', '$2a$04$KhExCYl7lx6eWWZYKsibKOZ8IBJRyuNuCcEOLQ11RYhJKgHmlSwK.', '测试号', NULL, 107, '[1,2]', '111@qq.com', '15601691200', 1, '', 0, '0:0:0:0:0:0:0:1', '2024-03-26 07:11:35', '', '2021-01-21 02:13:53', NULL, '2024-03-26 07:11:35', b'0', 1); | |
| 5153 | 5595 | INSERT INTO `system_users` (`id`, `username`, `password`, `nickname`, `remark`, `dept_id`, `post_ids`, `email`, `mobile`, `sex`, `avatar`, `status`, `login_ip`, `login_date`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (107, 'admin107', '$2a$10$dYOOBKMO93v/.ReCqzyFg.o67Tqk.bbc2bhrpyBGkIw9aypCtr2pm', '芋艿', NULL, NULL, NULL, '', '15601691300', 0, '', 0, '', NULL, '1', '2022-02-20 22:59:33', '1', '2022-02-27 08:26:51', b'0', 118); |
| 5154 | 5596 | INSERT INTO `system_users` (`id`, `username`, `password`, `nickname`, `remark`, `dept_id`, `post_ids`, `email`, `mobile`, `sex`, `avatar`, `status`, `login_ip`, `login_date`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (108, 'admin108', '$2a$10$y6mfvKoNYL1GXWak8nYwVOH.kCWqjactkzdoIDgiKl93WN3Ejg.Lu', '芋艿', NULL, NULL, NULL, '', '15601691300', 0, '', 0, '', NULL, '1', '2022-02-20 23:00:50', '1', '2022-02-27 08:26:53', b'0', 119); |
| 5155 | 5597 | INSERT INTO `system_users` (`id`, `username`, `password`, `nickname`, `remark`, `dept_id`, `post_ids`, `email`, `mobile`, `sex`, `avatar`, `status`, `login_ip`, `login_date`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (109, 'admin109', '$2a$10$JAqvH0tEc0I7dfDVBI7zyuB4E3j.uH6daIjV53.vUS6PknFkDJkuK', '芋艿', NULL, NULL, NULL, '', '15601691300', 0, '', 0, '', NULL, '1', '2022-02-20 23:11:50', '1', '2022-02-27 08:26:56', b'0', 120); |
| ... | ... | @@ -5157,14 +5599,15 @@ INSERT INTO `system_users` (`id`, `username`, `password`, `nickname`, `remark`, |
| 5157 | 5599 | INSERT INTO `system_users` (`id`, `username`, `password`, `nickname`, `remark`, `dept_id`, `post_ids`, `email`, `mobile`, `sex`, `avatar`, `status`, `login_ip`, `login_date`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (111, 'test', '$2a$10$mRMIYLDtRHlf6.9ipiqH1.Z.bh/R9dO9d5iHiGYPigi6r5KOoR2Wm', '测试用户', NULL, NULL, '[]', '', '', 0, '', 0, '0:0:0:0:0:0:0:1', '2023-12-30 11:42:17', '110', '2022-02-23 13:14:33', NULL, '2023-12-30 11:42:17', b'0', 121); |
| 5158 | 5600 | INSERT INTO `system_users` (`id`, `username`, `password`, `nickname`, `remark`, `dept_id`, `post_ids`, `email`, `mobile`, `sex`, `avatar`, `status`, `login_ip`, `login_date`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (112, 'newobject', '$2a$04$dB0z8Q819fJWz0hbaLe6B.VfHCjYgWx6LFfET5lyz3JwcqlyCkQ4C', '新对象', NULL, 100, '[]', '', '15601691235', 1, '', 0, '0:0:0:0:0:0:0:1', '2024-03-16 23:11:38', '1', '2022-02-23 19:08:03', NULL, '2024-03-16 23:11:38', b'0', 1); |
| 5159 | 5601 | INSERT INTO `system_users` (`id`, `username`, `password`, `nickname`, `remark`, `dept_id`, `post_ids`, `email`, `mobile`, `sex`, `avatar`, `status`, `login_ip`, `login_date`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (113, 'aoteman', '$2a$10$0acJOIk2D25/oC87nyclE..0lzeu9DtQ/n3geP4fkun/zIVRhHJIO', '芋道', NULL, NULL, NULL, '', '15601691300', 0, '', 0, '127.0.0.1', '2022-03-19 18:38:51', '1', '2022-03-07 21:37:58', NULL, '2022-03-19 18:38:51', b'0', 122); |
| 5160 | -INSERT INTO `system_users` (`id`, `username`, `password`, `nickname`, `remark`, `dept_id`, `post_ids`, `email`, `mobile`, `sex`, `avatar`, `status`, `login_ip`, `login_date`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (114, 'hrmgr', '$2a$10$TR4eybBioGRhBmDBWkqWLO6NIh3mzYa8KBKDDB5woiGYFVlRAi.fu', 'hr 小姐姐', NULL, NULL, '[1]', '', '15601691236', 1, '', 0, '127.0.0.1', '2022-03-19 22:15:43', '1', '2022-03-19 21:50:58', '1', '2024-03-15 19:48:11', b'0', 1); | |
| 5161 | -INSERT INTO `system_users` (`id`, `username`, `password`, `nickname`, `remark`, `dept_id`, `post_ids`, `email`, `mobile`, `sex`, `avatar`, `status`, `login_ip`, `login_date`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (115, 'aotemane', '$2a$10$/WCwGHu1eq0wOVDd/u8HweJ0gJCHyLS6T7ndCqI8UXZAQom1etk2e', '1', '11', 101, '[]', '', '15601691238', 1, '', 0, '', NULL, '1', '2022-04-30 02:55:43', '1', '2024-03-15 19:48:22', b'0', 1); | |
| 5602 | +INSERT INTO `system_users` (`id`, `username`, `password`, `nickname`, `remark`, `dept_id`, `post_ids`, `email`, `mobile`, `sex`, `avatar`, `status`, `login_ip`, `login_date`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (114, 'hrmgr', '$2a$10$TR4eybBioGRhBmDBWkqWLO6NIh3mzYa8KBKDDB5woiGYFVlRAi.fu', 'hr 小姐姐', NULL, NULL, '[5]', '', '15601691236', 1, '', 0, '0:0:0:0:0:0:0:1', '2024-03-24 22:21:05', '1', '2022-03-19 21:50:58', NULL, '2024-03-24 22:21:05', b'0', 1); | |
| 5603 | +INSERT INTO `system_users` (`id`, `username`, `password`, `nickname`, `remark`, `dept_id`, `post_ids`, `email`, `mobile`, `sex`, `avatar`, `status`, `login_ip`, `login_date`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (115, 'aotemane', '$2a$04$GcyP0Vyzb2F2Yni5PuIK9ueGxM0tkZGMtDwVRwrNbtMvorzbpNsV2', '阿呆', '11222', 102, '[1,2]', '7648@qq.com', '15601691229', 2, '', 0, '', NULL, '1', '2022-04-30 02:55:43', '1', '2024-04-04 09:37:14', b'0', 1); | |
| 5162 | 5604 | INSERT INTO `system_users` (`id`, `username`, `password`, `nickname`, `remark`, `dept_id`, `post_ids`, `email`, `mobile`, `sex`, `avatar`, `status`, `login_ip`, `login_date`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (116, '15601691302', '$2a$10$L5C4S0U6adBWMvFv1Wwl4.DI/NwYS3WIfLj5Q.Naqr5II8CmqsDZ6', '小豆', NULL, NULL, NULL, '', '', 0, '', 0, '', NULL, '1', '2022-05-17 10:07:10', '1', '2022-05-17 10:07:10', b'0', 124); |
| 5163 | 5605 | INSERT INTO `system_users` (`id`, `username`, `password`, `nickname`, `remark`, `dept_id`, `post_ids`, `email`, `mobile`, `sex`, `avatar`, `status`, `login_ip`, `login_date`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (117, 'admin123', '$2a$10$WI8Gg/lpZQIrOEZMHqka7OdFaD4Nx.B/qY8ZGTTUKrOJwaHFqibaC', '测试号', '1111', 100, '[2]', '', '15601691234', 1, '', 0, '', NULL, '1', '2022-07-09 17:40:26', '1', '2022-07-09 17:40:26', b'0', 1); |
| 5164 | -INSERT INTO `system_users` (`id`, `username`, `password`, `nickname`, `remark`, `dept_id`, `post_ids`, `email`, `mobile`, `sex`, `avatar`, `status`, `login_ip`, `login_date`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (118, 'goudan', '$2a$04$OB1SuphCdiLVRpiYRKeqH.8NYS7UIp5vmIv1W7U4w6toiFeOAATVK', '狗蛋', NULL, 103, '[1]', '', '15601691239', 2, '', 0, '0:0:0:0:0:0:0:1', '2024-03-17 09:10:27', '1', '2022-07-09 17:44:43', NULL, '2024-03-17 09:10:27', b'0', 1); | |
| 5606 | +INSERT INTO `system_users` (`id`, `username`, `password`, `nickname`, `remark`, `dept_id`, `post_ids`, `email`, `mobile`, `sex`, `avatar`, `status`, `login_ip`, `login_date`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (118, 'goudan', '$2a$04$OB1SuphCdiLVRpiYRKeqH.8NYS7UIp5vmIv1W7U4w6toiFeOAATVK', '狗蛋', NULL, 103, '[1]', '', '15601691239', 1, '', 0, '0:0:0:0:0:0:0:1', '2024-03-17 09:10:27', '1', '2022-07-09 17:44:43', '1', '2024-04-04 09:48:05', b'0', 1); | |
| 5165 | 5607 | INSERT INTO `system_users` (`id`, `username`, `password`, `nickname`, `remark`, `dept_id`, `post_ids`, `email`, `mobile`, `sex`, `avatar`, `status`, `login_ip`, `login_date`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (126, 'tudou123', '$2a$04$lecJZ/CqgknEp7mDV2d4ou0beyj1GbM3.nVEZe//8WgQpR.JBgnAu', '土豆', NULL, NULL, NULL, '', '', 0, '', 0, '', NULL, '1', '2023-12-02 23:35:05', '1', '2023-12-02 23:35:05', b'0', 151); |
| 5166 | 5608 | INSERT INTO `system_users` (`id`, `username`, `password`, `nickname`, `remark`, `dept_id`, `post_ids`, `email`, `mobile`, `sex`, `avatar`, `status`, `login_ip`, `login_date`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (127, 'admin2024', '$2a$04$cHdZ7N6AUKysa2XTUG/J/egYtAzdwtpnNpcMVHDrupt1dyn4teOku', '土豆', NULL, NULL, NULL, '', '', 0, '', 0, '0:0:0:0:0:0:0:1', '2023-12-30 11:43:28', '1', '2023-12-30 11:43:17', NULL, '2023-12-30 11:43:28', b'0', 152); |
| 5167 | 5609 | INSERT INTO `system_users` (`id`, `username`, `password`, `nickname`, `remark`, `dept_id`, `post_ids`, `email`, `mobile`, `sex`, `avatar`, `status`, `login_ip`, `login_date`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (128, 'xiaoming', '$2a$04$BRinw4an9PBGvx6K7GLNre6rWU0.1HMYHkQCN6Oir74zNFKkNKRzm', 'xiaoming', NULL, NULL, NULL, '', '15601691301', 0, '', 0, '0:0:0:0:0:0:0:1', '2024-02-29 23:48:33', '1', '2024-02-27 21:58:25', NULL, '2024-02-29 23:48:33', b'0', 153); |
| 5610 | +INSERT INTO `system_users` (`id`, `username`, `password`, `nickname`, `remark`, `dept_id`, `post_ids`, `email`, `mobile`, `sex`, `avatar`, `status`, `login_ip`, `login_date`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (129, 'hh123456', '$2a$04$8mHJM7n03bcNjtaw.IlfV.l38ikWWFJQ7NR1rHywavN7v2UyoDjwq', 'hh', NULL, NULL, NULL, '', '', 0, '', 0, '0:0:0:0:0:0:0:1', '2024-03-30 17:53:24', '1', '2024-03-30 17:52:59', NULL, '2024-03-30 17:53:24', b'0', 154); | |
| 5168 | 5611 | COMMIT; |
| 5169 | 5612 | |
| 5170 | 5613 | SET FOREIGN_KEY_CHECKS = 1; | ... | ... |
yudao-dependencies/pom.xml
| ... | ... | @@ -27,6 +27,7 @@ |
| 27 | 27 | <mybatis-plus-generator.version>3.5.5</mybatis-plus-generator.version> |
| 28 | 28 | <dynamic-datasource.version>4.3.0</dynamic-datasource.version> |
| 29 | 29 | <mybatis-plus-join.version>1.4.10</mybatis-plus-join.version> |
| 30 | + <easy-trans.version>2.2.11</easy-trans.version> | |
| 30 | 31 | <redisson.version>3.26.0</redisson.version> |
| 31 | 32 | <dm8.jdbc.version>8.1.3.62</dm8.jdbc.version> |
| 32 | 33 | <!-- 消息队列 --> |
| ... | ... | @@ -75,7 +76,6 @@ |
| 75 | 76 | <jimureport.version>1.6.6-beta2</jimureport.version> |
| 76 | 77 | <xercesImpl.version>2.12.2</xercesImpl.version> |
| 77 | 78 | <weixin-java.version>4.6.0</weixin-java.version> |
| 78 | - <ureport2.version>2.2.9</ureport2.version> | |
| 79 | 79 | </properties> |
| 80 | 80 | |
| 81 | 81 | <dependencyManagement> |
| ... | ... | @@ -91,11 +91,6 @@ |
| 91 | 91 | |
| 92 | 92 | <!-- 业务组件 --> |
| 93 | 93 | <dependency> |
| 94 | - <groupId>cn.iocoder.boot</groupId> | |
| 95 | - <artifactId>yudao-spring-boot-starter-biz-operatelog</artifactId> | |
| 96 | - <version>${revision}</version> | |
| 97 | - </dependency> | |
| 98 | - <dependency> | |
| 99 | 94 | <groupId>io.github.mouzt</groupId> |
| 100 | 95 | <artifactId>bizlog-sdk</artifactId> |
| 101 | 96 | <version>${bizlog-sdk.version}</version> |
| ... | ... | @@ -199,6 +194,32 @@ |
| 199 | 194 | </dependency> |
| 200 | 195 | |
| 201 | 196 | <dependency> |
| 197 | + <groupId>com.fhs-opensource</groupId> <!-- VO 数据翻译 --> | |
| 198 | + <artifactId>easy-trans-spring-boot-starter</artifactId> | |
| 199 | + <version>${easy-trans.version}</version> | |
| 200 | + <exclusions> | |
| 201 | + <exclusion> | |
| 202 | + <groupId>org.springframework</groupId> | |
| 203 | + <artifactId>spring-context</artifactId> | |
| 204 | + </exclusion> | |
| 205 | + <exclusion> | |
| 206 | + <groupId>org.springframework.cloud</groupId> | |
| 207 | + <artifactId>spring-cloud-commons</artifactId> | |
| 208 | + </exclusion> | |
| 209 | + </exclusions> | |
| 210 | + </dependency> | |
| 211 | + <dependency> | |
| 212 | + <groupId>com.fhs-opensource</groupId> | |
| 213 | + <artifactId>easy-trans-mybatis-plus-extend</artifactId> | |
| 214 | + <version>${easy-trans.version}</version> | |
| 215 | + </dependency> | |
| 216 | + <dependency> | |
| 217 | + <groupId>com.fhs-opensource</groupId> | |
| 218 | + <artifactId>easy-trans-anno</artifactId> | |
| 219 | + <version>${easy-trans.version}</version> | |
| 220 | + </dependency> | |
| 221 | + | |
| 222 | + <dependency> | |
| 202 | 223 | <groupId>cn.iocoder.boot</groupId> |
| 203 | 224 | <artifactId>yudao-spring-boot-starter-redis</artifactId> |
| 204 | 225 | <version>${revision}</version> |
| ... | ... | @@ -621,13 +642,6 @@ |
| 621 | 642 | <version>${xercesImpl.version}</version> |
| 622 | 643 | </dependency> |
| 623 | 644 | |
| 624 | - <!-- UReport2 报表--> | |
| 625 | - <dependency> | |
| 626 | - <groupId>com.bstek.ureport</groupId> | |
| 627 | - <artifactId>ureport2-console</artifactId> | |
| 628 | - <version>${ureport2.version}</version> | |
| 629 | - </dependency> | |
| 630 | - | |
| 631 | 645 | </dependencies> |
| 632 | 646 | </dependencyManagement> |
| 633 | 647 | ... | ... |
yudao-framework/pom.xml
| ... | ... | @@ -25,7 +25,6 @@ |
| 25 | 25 | <module>yudao-spring-boot-starter-excel</module> |
| 26 | 26 | <module>yudao-spring-boot-starter-test</module> |
| 27 | 27 | |
| 28 | - <module>yudao-spring-boot-starter-biz-operatelog</module> | |
| 29 | 28 | <module>yudao-spring-boot-starter-biz-tenant</module> |
| 30 | 29 | <module>yudao-spring-boot-starter-biz-data-permission</module> |
| 31 | 30 | <module>yudao-spring-boot-starter-biz-ip</module> | ... | ... |
yudao-framework/yudao-common/pom.xml
| ... | ... | @@ -137,6 +137,11 @@ |
| 137 | 137 | <artifactId>transmittable-thread-local</artifactId> |
| 138 | 138 | </dependency> |
| 139 | 139 | |
| 140 | + <dependency> | |
| 141 | + <groupId>com.fhs-opensource</groupId> <!-- VO 数据翻译 --> | |
| 142 | + <artifactId>easy-trans-anno</artifactId> <!-- 默认引入的原因,方便 xxx-module-api 包使用 --> | |
| 143 | + </dependency> | |
| 144 | + | |
| 140 | 145 | <!-- Test 测试相关 --> |
| 141 | 146 | <dependency> |
| 142 | 147 | <groupId>org.springframework.boot</groupId> | ... | ... |
yudao-framework/yudao-common/src/main/java/cn/iocoder/yudao/framework/common/enums/DateIntervalEnum.java
0 → 100644
| 1 | +package cn.iocoder.yudao.framework.common.enums; | |
| 2 | + | |
| 3 | +import cn.hutool.core.util.ArrayUtil; | |
| 4 | +import cn.iocoder.yudao.framework.common.core.IntArrayValuable; | |
| 5 | +import lombok.AllArgsConstructor; | |
| 6 | +import lombok.Getter; | |
| 7 | + | |
| 8 | +import java.util.Arrays; | |
| 9 | + | |
| 10 | +/** | |
| 11 | + * 时间间隔的枚举 | |
| 12 | + * | |
| 13 | + * @author dhb52 | |
| 14 | + */ | |
| 15 | +@Getter | |
| 16 | +@AllArgsConstructor | |
| 17 | +public enum DateIntervalEnum implements IntArrayValuable { | |
| 18 | + | |
| 19 | + DAY(1, "天"), | |
| 20 | + WEEK(2, "周"), | |
| 21 | + MONTH(3, "月"), | |
| 22 | + QUARTER(4, "季度"), | |
| 23 | + YEAR(5, "年") | |
| 24 | + ; | |
| 25 | + | |
| 26 | + public static final int[] ARRAYS = Arrays.stream(values()).mapToInt(DateIntervalEnum::getInterval).toArray(); | |
| 27 | + | |
| 28 | + /** | |
| 29 | + * 类型 | |
| 30 | + */ | |
| 31 | + private final Integer interval; | |
| 32 | + /** | |
| 33 | + * 名称 | |
| 34 | + */ | |
| 35 | + private final String name; | |
| 36 | + | |
| 37 | + @Override | |
| 38 | + public int[] array() { | |
| 39 | + return ARRAYS; | |
| 40 | + } | |
| 41 | + | |
| 42 | + public static DateIntervalEnum valueOf(Integer interval) { | |
| 43 | + return ArrayUtil.firstMatch(item -> item.getInterval().equals(interval), DateIntervalEnum.values()); | |
| 44 | + } | |
| 45 | + | |
| 46 | +} | |
| 0 | 47 | \ No newline at end of file | ... | ... |
yudao-framework/yudao-common/src/main/java/cn/iocoder/yudao/framework/common/util/cache/CacheUtils.java
| ... | ... | @@ -7,6 +7,7 @@ import com.google.common.cache.LoadingCache; |
| 7 | 7 | |
| 8 | 8 | import java.time.Duration; |
| 9 | 9 | import java.util.concurrent.Executor; |
| 10 | +import java.util.concurrent.ExecutorService; | |
| 10 | 11 | import java.util.concurrent.Executors; |
| 11 | 12 | |
| 12 | 13 | /** |
| ... | ... | @@ -17,8 +18,11 @@ import java.util.concurrent.Executors; |
| 17 | 18 | public class CacheUtils { |
| 18 | 19 | |
| 19 | 20 | public static <K, V> LoadingCache<K, V> buildAsyncReloadingCache(Duration duration, CacheLoader<K, V> loader) { |
| 20 | - Executor executor = Executors.newCachedThreadPool( // TODO 芋艿:可能要思考下,未来要不要做成可配置 | |
| 21 | - TtlExecutors.getDefaultDisableInheritableThreadFactory()); // TTL 保证 ThreadLocal 可以透传 | |
| 21 | + // 1. 使用 TTL 包装 ExecutorService,实现 ThreadLocal 的透传 | |
| 22 | + // https://github.com/YunaiV/ruoyi-vue-pro/issues/432 | |
| 23 | + ExecutorService executorService = Executors.newCachedThreadPool(); // TODO 芋艿:可能要思考下,未来要不要做成可配置 | |
| 24 | + Executor executor = TtlExecutors.getTtlExecutorService(executorService); | |
| 25 | + // 2. 创建 Guava LoadingCache | |
| 22 | 26 | return CacheBuilder.newBuilder() |
| 23 | 27 | // 只阻塞当前数据加载线程,其他线程返回旧值 |
| 24 | 28 | .refreshAfterWrite(duration) | ... | ... |
yudao-framework/yudao-common/src/main/java/cn/iocoder/yudao/framework/common/util/collection/CollectionUtils.java
| ... | ... | @@ -78,7 +78,7 @@ public class CollectionUtils { |
| 78 | 78 | if (CollUtil.isEmpty(from)) { |
| 79 | 79 | return new ArrayList<>(); |
| 80 | 80 | } |
| 81 | - return from.stream().flatMap(func).filter(Objects::nonNull).collect(Collectors.toList()); | |
| 81 | + return from.stream().filter(Objects::nonNull).flatMap(func).filter(Objects::nonNull).collect(Collectors.toList()); | |
| 82 | 82 | } |
| 83 | 83 | |
| 84 | 84 | public static <T, U, R> List<R> convertListByFlatMap(Collection<T> from, |
| ... | ... | @@ -87,7 +87,7 @@ public class CollectionUtils { |
| 87 | 87 | if (CollUtil.isEmpty(from)) { |
| 88 | 88 | return new ArrayList<>(); |
| 89 | 89 | } |
| 90 | - return from.stream().map(mapper).flatMap(func).filter(Objects::nonNull).collect(Collectors.toList()); | |
| 90 | + return from.stream().map(mapper).filter(Objects::nonNull).flatMap(func).filter(Objects::nonNull).collect(Collectors.toList()); | |
| 91 | 91 | } |
| 92 | 92 | |
| 93 | 93 | public static <K, V> List<V> mergeValuesFromMap(Map<K, List<V>> map) { |
| ... | ... | @@ -123,7 +123,7 @@ public class CollectionUtils { |
| 123 | 123 | if (CollUtil.isEmpty(from)) { |
| 124 | 124 | return new HashSet<>(); |
| 125 | 125 | } |
| 126 | - return from.stream().flatMap(func).filter(Objects::nonNull).collect(Collectors.toSet()); | |
| 126 | + return from.stream().filter(Objects::nonNull).flatMap(func).filter(Objects::nonNull).collect(Collectors.toSet()); | |
| 127 | 127 | } |
| 128 | 128 | |
| 129 | 129 | public static <T, U, R> Set<R> convertSetByFlatMap(Collection<T> from, |
| ... | ... | @@ -132,7 +132,7 @@ public class CollectionUtils { |
| 132 | 132 | if (CollUtil.isEmpty(from)) { |
| 133 | 133 | return new HashSet<>(); |
| 134 | 134 | } |
| 135 | - return from.stream().map(mapper).flatMap(func).filter(Objects::nonNull).collect(Collectors.toSet()); | |
| 135 | + return from.stream().map(mapper).filter(Objects::nonNull).flatMap(func).filter(Objects::nonNull).collect(Collectors.toSet()); | |
| 136 | 136 | } |
| 137 | 137 | |
| 138 | 138 | public static <T, K> Map<K, T> convertMap(Collection<T> from, Function<T, K> keyFunc) { |
| ... | ... | @@ -315,4 +315,4 @@ public class CollectionUtils { |
| 315 | 315 | return list.stream().flatMap(Collection::stream).collect(Collectors.toList()); |
| 316 | 316 | } |
| 317 | 317 | |
| 318 | 318 | -} |
| 319 | +} | |
| 319 | 320 | \ No newline at end of file | ... | ... |
yudao-framework/yudao-common/src/main/java/cn/iocoder/yudao/framework/common/util/collection/MapUtils.java
| ... | ... | @@ -2,6 +2,7 @@ package cn.iocoder.yudao.framework.common.util.collection; |
| 2 | 2 | |
| 3 | 3 | import cn.hutool.core.collection.CollUtil; |
| 4 | 4 | import cn.hutool.core.collection.CollectionUtil; |
| 5 | +import cn.hutool.core.util.ObjUtil; | |
| 5 | 6 | import cn.iocoder.yudao.framework.common.core.KeyValue; |
| 6 | 7 | import com.google.common.collect.Maps; |
| 7 | 8 | import com.google.common.collect.Multimap; |
| ... | ... | @@ -40,6 +41,7 @@ public class MapUtils { |
| 40 | 41 | |
| 41 | 42 | /** |
| 42 | 43 | * 从哈希表查找到 key 对应的 value,然后进一步处理 |
| 44 | + * key 为 null 时, 不处理 | |
| 43 | 45 | * 注意,如果查找到的 value 为 null 时,不进行处理 |
| 44 | 46 | * |
| 45 | 47 | * @param map 哈希表 |
| ... | ... | @@ -47,7 +49,7 @@ public class MapUtils { |
| 47 | 49 | * @param consumer 进一步处理的逻辑 |
| 48 | 50 | */ |
| 49 | 51 | public static <K, V> void findAndThen(Map<K, V> map, K key, Consumer<V> consumer) { |
| 50 | - if (CollUtil.isEmpty(map)) { | |
| 52 | + if (ObjUtil.isNull(key) || CollUtil.isEmpty(map)) { | |
| 51 | 53 | return; |
| 52 | 54 | } |
| 53 | 55 | V value = map.get(key); | ... | ... |
yudao-framework/yudao-common/src/main/java/cn/iocoder/yudao/framework/common/util/date/DateUtils.java
| ... | ... | @@ -27,8 +27,6 @@ public class DateUtils { |
| 27 | 27 | |
| 28 | 28 | public static final String FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND = "yyyy-MM-dd HH:mm:ss"; |
| 29 | 29 | |
| 30 | - public static final String FORMAT_HOUR_MINUTE_SECOND = "HH:mm:ss"; | |
| 31 | - | |
| 32 | 30 | /** |
| 33 | 31 | * 将 LocalDateTime 转换成 Date |
| 34 | 32 | * |
| ... | ... | @@ -67,19 +65,11 @@ public class DateUtils { |
| 67 | 65 | return new Date(System.currentTimeMillis() + duration.toMillis()); |
| 68 | 66 | } |
| 69 | 67 | |
| 70 | - public static boolean isExpired(Date time) { | |
| 71 | - return System.currentTimeMillis() > time.getTime(); | |
| 72 | - } | |
| 73 | - | |
| 74 | 68 | public static boolean isExpired(LocalDateTime time) { |
| 75 | 69 | LocalDateTime now = LocalDateTime.now(); |
| 76 | 70 | return now.isAfter(time); |
| 77 | 71 | } |
| 78 | 72 | |
| 79 | - public static long diff(Date endTime, Date startTime) { | |
| 80 | - return endTime.getTime() - startTime.getTime(); | |
| 81 | - } | |
| 82 | - | |
| 83 | 73 | /** |
| 84 | 74 | * 创建指定时间 |
| 85 | 75 | * |
| ... | ... | @@ -137,37 +127,6 @@ public class DateUtils { |
| 137 | 127 | } |
| 138 | 128 | |
| 139 | 129 | /** |
| 140 | - * 计算当期时间相差的日期 | |
| 141 | - * | |
| 142 | - * @param field 日历字段.<br/>eg:Calendar.MONTH,Calendar.DAY_OF_MONTH,<br/>Calendar.HOUR_OF_DAY等. | |
| 143 | - * @param amount 相差的数值 | |
| 144 | - * @return 计算后的日志 | |
| 145 | - */ | |
| 146 | - public static Date addDate(int field, int amount) { | |
| 147 | - return addDate(null, field, amount); | |
| 148 | - } | |
| 149 | - | |
| 150 | - /** | |
| 151 | - * 计算当期时间相差的日期 | |
| 152 | - * | |
| 153 | - * @param date 设置时间 | |
| 154 | - * @param field 日历字段 例如说,{@link Calendar#DAY_OF_MONTH} 等 | |
| 155 | - * @param amount 相差的数值 | |
| 156 | - * @return 计算后的日志 | |
| 157 | - */ | |
| 158 | - public static Date addDate(Date date, int field, int amount) { | |
| 159 | - if (amount == 0) { | |
| 160 | - return date; | |
| 161 | - } | |
| 162 | - Calendar c = Calendar.getInstance(); | |
| 163 | - if (date != null) { | |
| 164 | - c.setTime(date); | |
| 165 | - } | |
| 166 | - c.add(field, amount); | |
| 167 | - return c.getTime(); | |
| 168 | - } | |
| 169 | - | |
| 170 | - /** | |
| 171 | 130 | * 是否今天 |
| 172 | 131 | * |
| 173 | 132 | * @param date 日期 | ... | ... |
yudao-framework/yudao-common/src/main/java/cn/iocoder/yudao/framework/common/util/date/LocalDateTimeUtils.java
| 1 | 1 | package cn.iocoder.yudao.framework.common.util.date; |
| 2 | 2 | |
| 3 | +import cn.hutool.core.collection.CollUtil; | |
| 4 | +import cn.hutool.core.date.DatePattern; | |
| 3 | 5 | import cn.hutool.core.date.LocalDateTimeUtil; |
| 6 | +import cn.hutool.core.lang.Assert; | |
| 7 | +import cn.hutool.core.util.StrUtil; | |
| 8 | +import cn.iocoder.yudao.framework.common.enums.DateIntervalEnum; | |
| 4 | 9 | |
| 5 | -import java.time.Duration; | |
| 6 | -import java.time.LocalDate; | |
| 7 | -import java.time.LocalDateTime; | |
| 8 | -import java.time.LocalTime; | |
| 10 | +import java.time.*; | |
| 11 | +import java.time.format.DateTimeParseException; | |
| 9 | 12 | import java.time.temporal.ChronoUnit; |
| 10 | 13 | import java.time.temporal.TemporalAdjusters; |
| 14 | +import java.util.ArrayList; | |
| 15 | +import java.util.List; | |
| 11 | 16 | |
| 12 | 17 | /** |
| 13 | 18 | * 时间工具类,用于 {@link java.time.LocalDateTime} |
| ... | ... | @@ -21,6 +26,22 @@ public class LocalDateTimeUtils { |
| 21 | 26 | */ |
| 22 | 27 | public static LocalDateTime EMPTY = buildTime(1970, 1, 1); |
| 23 | 28 | |
| 29 | + /** | |
| 30 | + * 解析时间 | |
| 31 | + * | |
| 32 | + * 相比 {@link LocalDateTimeUtil#parse(CharSequence)} 方法来说,会尽量去解析,直到成功 | |
| 33 | + * | |
| 34 | + * @param time 时间 | |
| 35 | + * @return 时间字符串 | |
| 36 | + */ | |
| 37 | + public static LocalDateTime parse(String time) { | |
| 38 | + try { | |
| 39 | + return LocalDateTimeUtil.parse(time, DatePattern.NORM_DATE_PATTERN); | |
| 40 | + } catch (DateTimeParseException e) { | |
| 41 | + return LocalDateTimeUtil.parse(time); | |
| 42 | + } | |
| 43 | + } | |
| 44 | + | |
| 24 | 45 | public static LocalDateTime addTime(Duration duration) { |
| 25 | 46 | return LocalDateTime.now().plus(duration); |
| 26 | 47 | } |
| ... | ... | @@ -55,6 +76,21 @@ public class LocalDateTimeUtils { |
| 55 | 76 | } |
| 56 | 77 | |
| 57 | 78 | /** |
| 79 | + * 判指定断时间,是否在该时间范围内 | |
| 80 | + * | |
| 81 | + * @param startTime 开始时间 | |
| 82 | + * @param endTime 结束时间 | |
| 83 | + * @param time 指定时间 | |
| 84 | + * @return 是否 | |
| 85 | + */ | |
| 86 | + public static boolean isBetween(LocalDateTime startTime, LocalDateTime endTime, String time) { | |
| 87 | + if (startTime == null || endTime == null || time == null) { | |
| 88 | + return false; | |
| 89 | + } | |
| 90 | + return LocalDateTimeUtil.isIn(parse(time), startTime, endTime); | |
| 91 | + } | |
| 92 | + | |
| 93 | + /** | |
| 58 | 94 | * 判断当前时间是否在该时间范围内 |
| 59 | 95 | * |
| 60 | 96 | * @param startTime 开始时间 |
| ... | ... | @@ -123,6 +159,16 @@ public class LocalDateTimeUtils { |
| 123 | 159 | } |
| 124 | 160 | |
| 125 | 161 | /** |
| 162 | + * 获得指定日期所在季度 | |
| 163 | + * | |
| 164 | + * @param date 日期 | |
| 165 | + * @return 所在季度 | |
| 166 | + */ | |
| 167 | + public static int getQuarterOfYear(LocalDateTime date) { | |
| 168 | + return (date.getMonthValue() - 1) / 3 + 1; | |
| 169 | + } | |
| 170 | + | |
| 171 | + /** | |
| 126 | 172 | * 获取指定日期到现在过了几天,如果指定日期在当前日期之后,获取结果为负 |
| 127 | 173 | * |
| 128 | 174 | * @param dateTime 日期 |
| ... | ... | @@ -168,4 +214,96 @@ public class LocalDateTimeUtils { |
| 168 | 214 | return LocalDateTime.now().with(TemporalAdjusters.firstDayOfYear()).with(LocalTime.MIN); |
| 169 | 215 | } |
| 170 | 216 | |
| 217 | + public static List<LocalDateTime[]> getDateRangeList(LocalDateTime startTime, | |
| 218 | + LocalDateTime endTime, | |
| 219 | + Integer interval) { | |
| 220 | + // 1.1 找到枚举 | |
| 221 | + DateIntervalEnum intervalEnum = DateIntervalEnum.valueOf(interval); | |
| 222 | + Assert.notNull(intervalEnum, "interval({}} 找不到对应的枚举", interval); | |
| 223 | + // 1.2 将时间对齐 | |
| 224 | + startTime = LocalDateTimeUtil.beginOfDay(startTime); | |
| 225 | + endTime = LocalDateTimeUtil.endOfDay(endTime); | |
| 226 | + | |
| 227 | + // 2. 循环,生成时间范围 | |
| 228 | + List<LocalDateTime[]> timeRanges = new ArrayList<>(); | |
| 229 | + switch (intervalEnum) { | |
| 230 | + case DateIntervalEnum.DAY: | |
| 231 | + while (startTime.isBefore(endTime)) { | |
| 232 | + timeRanges.add(new LocalDateTime[]{startTime, startTime.plusDays(1).minusNanos(1)}); | |
| 233 | + startTime = startTime.plusDays(1); | |
| 234 | + } | |
| 235 | + break; | |
| 236 | + case DateIntervalEnum.WEEK: | |
| 237 | + while (startTime.isBefore(endTime)) { | |
| 238 | + LocalDateTime endOfWeek = startTime.with(DayOfWeek.SUNDAY).plusDays(1).minusNanos(1); | |
| 239 | + timeRanges.add(new LocalDateTime[]{startTime, endOfWeek}); | |
| 240 | + startTime = endOfWeek.plusNanos(1); | |
| 241 | + } | |
| 242 | + break; | |
| 243 | + case DateIntervalEnum.MONTH: | |
| 244 | + while (startTime.isBefore(endTime)) { | |
| 245 | + LocalDateTime endOfMonth = startTime.with(TemporalAdjusters.lastDayOfMonth()).plusDays(1).minusNanos(1); | |
| 246 | + timeRanges.add(new LocalDateTime[]{startTime, endOfMonth}); | |
| 247 | + startTime = endOfMonth.plusNanos(1); | |
| 248 | + } | |
| 249 | + break; | |
| 250 | + case DateIntervalEnum.QUARTER: | |
| 251 | + while (startTime.isBefore(endTime)) { | |
| 252 | + int quarterOfYear = getQuarterOfYear(startTime); | |
| 253 | + LocalDateTime quarterEnd = quarterOfYear == 4 | |
| 254 | + ? startTime.with(TemporalAdjusters.lastDayOfYear()).plusDays(1).minusNanos(1) | |
| 255 | + : startTime.withMonth(quarterOfYear * 3 + 1).withDayOfMonth(1).minusNanos(1); | |
| 256 | + timeRanges.add(new LocalDateTime[]{startTime, quarterEnd}); | |
| 257 | + startTime = quarterEnd.plusNanos(1); | |
| 258 | + } | |
| 259 | + break; | |
| 260 | + case DateIntervalEnum.YEAR: | |
| 261 | + while (startTime.isBefore(endTime)) { | |
| 262 | + LocalDateTime endOfYear = startTime.with(TemporalAdjusters.lastDayOfYear()).plusDays(1).minusNanos(1); | |
| 263 | + timeRanges.add(new LocalDateTime[]{startTime, endOfYear}); | |
| 264 | + startTime = endOfYear.plusNanos(1); | |
| 265 | + } | |
| 266 | + break; | |
| 267 | + default: | |
| 268 | + throw new IllegalArgumentException("Invalid interval: " + interval); | |
| 269 | + } | |
| 270 | + // 3. 兜底,最后一个时间,需要保持在 endTime 之前 | |
| 271 | + LocalDateTime[] lastTimeRange = CollUtil.getLast(timeRanges); | |
| 272 | + if (lastTimeRange != null) { | |
| 273 | + lastTimeRange[1] = endTime; | |
| 274 | + } | |
| 275 | + return timeRanges; | |
| 276 | + } | |
| 277 | + | |
| 278 | + /** | |
| 279 | + * 格式化时间范围 | |
| 280 | + * | |
| 281 | + * @param startTime 开始时间 | |
| 282 | + * @param endTime 结束时间 | |
| 283 | + * @param interval 时间间隔 | |
| 284 | + * @return 时间范围 | |
| 285 | + */ | |
| 286 | + public static String formatDateRange(LocalDateTime startTime, LocalDateTime endTime, Integer interval) { | |
| 287 | + // 1. 找到枚举 | |
| 288 | + DateIntervalEnum intervalEnum = DateIntervalEnum.valueOf(interval); | |
| 289 | + Assert.notNull(intervalEnum, "interval({}} 找不到对应的枚举", interval); | |
| 290 | + | |
| 291 | + // 2. 循环,生成时间范围 | |
| 292 | + switch (intervalEnum) { | |
| 293 | + case DateIntervalEnum.DAY: | |
| 294 | + return LocalDateTimeUtil.format(startTime, DatePattern.NORM_DATE_PATTERN); | |
| 295 | + case DateIntervalEnum.WEEK: | |
| 296 | + return LocalDateTimeUtil.format(startTime, DatePattern.NORM_DATE_PATTERN) | |
| 297 | + + StrUtil.format("(第 {} 周)", LocalDateTimeUtil.weekOfYear(startTime)); | |
| 298 | + case DateIntervalEnum.MONTH: | |
| 299 | + return LocalDateTimeUtil.format(startTime, DatePattern.NORM_MONTH_PATTERN); | |
| 300 | + case DateIntervalEnum.QUARTER: | |
| 301 | + return StrUtil.format("{}-Q{}", startTime.getYear(), getQuarterOfYear(startTime)); | |
| 302 | + case DateIntervalEnum.YEAR: | |
| 303 | + return LocalDateTimeUtil.format(startTime, DatePattern.NORM_YEAR_PATTERN); | |
| 304 | + default: | |
| 305 | + throw new IllegalArgumentException("Invalid interval: " + interval); | |
| 306 | + } | |
| 307 | + } | |
| 308 | + | |
| 171 | 309 | } | ... | ... |
yudao-framework/yudao-common/src/main/java/cn/iocoder/yudao/framework/common/util/spring/SpringAopUtils.java deleted
| 1 | -package cn.iocoder.yudao.framework.common.util.spring; | |
| 2 | - | |
| 3 | -import cn.hutool.core.bean.BeanUtil; | |
| 4 | -import org.springframework.aop.framework.AdvisedSupport; | |
| 5 | -import org.springframework.aop.framework.AopProxy; | |
| 6 | -import org.springframework.aop.support.AopUtils; | |
| 7 | - | |
| 8 | -/** | |
| 9 | - * Spring AOP 工具类 | |
| 10 | - * | |
| 11 | - * 参考波克尔 http://www.bubuko.com/infodetail-3471885.html 实现 | |
| 12 | - */ | |
| 13 | -public class SpringAopUtils { | |
| 14 | - | |
| 15 | - /** | |
| 16 | - * 获取代理的目标对象 | |
| 17 | - * | |
| 18 | - * @param proxy 代理对象 | |
| 19 | - * @return 目标对象 | |
| 20 | - */ | |
| 21 | - public static Object getTarget(Object proxy) throws Exception { | |
| 22 | - // 不是代理对象 | |
| 23 | - if (!AopUtils.isAopProxy(proxy)) { | |
| 24 | - return proxy; | |
| 25 | - } | |
| 26 | - // Jdk 代理 | |
| 27 | - if (AopUtils.isJdkDynamicProxy(proxy)) { | |
| 28 | - return getJdkDynamicProxyTargetObject(proxy); | |
| 29 | - } | |
| 30 | - // Cglib 代理 | |
| 31 | - return getCglibProxyTargetObject(proxy); | |
| 32 | - } | |
| 33 | - | |
| 34 | - private static Object getCglibProxyTargetObject(Object proxy) throws Exception { | |
| 35 | - Object dynamicAdvisedInterceptor = BeanUtil.getFieldValue(proxy, "CGLIB$CALLBACK_0"); | |
| 36 | - AdvisedSupport advisedSupport = (AdvisedSupport) BeanUtil.getFieldValue(dynamicAdvisedInterceptor, "advised"); | |
| 37 | - return advisedSupport.getTargetSource().getTarget(); | |
| 38 | - } | |
| 39 | - | |
| 40 | - private static Object getJdkDynamicProxyTargetObject(Object proxy) throws Exception { | |
| 41 | - AopProxy aopProxy = (AopProxy) BeanUtil.getFieldValue(proxy, "h"); | |
| 42 | - AdvisedSupport advisedSupport = (AdvisedSupport) BeanUtil.getFieldValue(aopProxy, "advised"); | |
| 43 | - return advisedSupport.getTargetSource().getTarget(); | |
| 44 | - } | |
| 45 | - | |
| 46 | -} |
yudao-framework/yudao-common/src/main/java/cn/iocoder/yudao/framework/common/util/spring/SpringUtils.java
0 → 100644
| 1 | +package cn.iocoder.yudao.framework.common.util.spring; | |
| 2 | + | |
| 3 | +import cn.hutool.extra.spring.SpringUtil; | |
| 4 | + | |
| 5 | +import java.util.Objects; | |
| 6 | + | |
| 7 | +/** | |
| 8 | + * Spring 工具类 | |
| 9 | + * | |
| 10 | + * @author 芋道源码 | |
| 11 | + */ | |
| 12 | +public class SpringUtils extends SpringUtil { | |
| 13 | + | |
| 14 | + /** | |
| 15 | + * 是否为生产环境 | |
| 16 | + * | |
| 17 | + * @return 是否生产环境 | |
| 18 | + */ | |
| 19 | + public static boolean isProd() { | |
| 20 | + String activeProfile = getActiveProfile(); | |
| 21 | + return Objects.equals("prod", activeProfile); | |
| 22 | + } | |
| 23 | + | |
| 24 | +} | ... | ... |
yudao-framework/yudao-spring-boot-starter-biz-data-permission/src/main/java/cn/iocoder/yudao/framework/datapermission/core/util/DataPermissionUtils.java
| ... | ... | @@ -4,6 +4,8 @@ import cn.iocoder.yudao.framework.datapermission.core.annotation.DataPermission; |
| 4 | 4 | import cn.iocoder.yudao.framework.datapermission.core.aop.DataPermissionContextHolder; |
| 5 | 5 | import lombok.SneakyThrows; |
| 6 | 6 | |
| 7 | +import java.util.concurrent.Callable; | |
| 8 | + | |
| 7 | 9 | /** |
| 8 | 10 | * 数据权限 Util |
| 9 | 11 | * |
| ... | ... | @@ -40,4 +42,22 @@ public class DataPermissionUtils { |
| 40 | 42 | } |
| 41 | 43 | } |
| 42 | 44 | |
| 45 | + /** | |
| 46 | + * 忽略数据权限,执行对应的逻辑 | |
| 47 | + * | |
| 48 | + * @param callable 逻辑 | |
| 49 | + * @return 执行结果 | |
| 50 | + */ | |
| 51 | + @SneakyThrows | |
| 52 | + public static <T> T executeIgnore(Callable<T> callable) { | |
| 53 | + DataPermission dataPermission = getDisableDataPermissionDisable(); | |
| 54 | + DataPermissionContextHolder.add(dataPermission); | |
| 55 | + try { | |
| 56 | + // 执行 callable | |
| 57 | + return callable.call(); | |
| 58 | + } finally { | |
| 59 | + DataPermissionContextHolder.remove(); | |
| 60 | + } | |
| 61 | + } | |
| 62 | + | |
| 43 | 63 | } | ... | ... |
yudao-framework/yudao-spring-boot-starter-biz-ip/src/main/resources/area.csv
| ... | ... | @@ -522,6 +522,29 @@ id,name,type,parentId |
| 522 | 522 | 441931,凤岗镇,4,441900 |
| 523 | 523 | 441932,长安镇,4,441900 |
| 524 | 524 | 442000,中山市,3,440000 |
| 525 | +442001,石岐街道,4,442000 | |
| 526 | +442002,东区街道,4,442000 | |
| 527 | +442003,中山港街道,4,442000 | |
| 528 | +442004,西区街道,4,442000 | |
| 529 | +442005,南区街道,4,442000 | |
| 530 | +442006,五桂山街道,4,442000 | |
| 531 | +442007,民众街道,4,442000 | |
| 532 | +442008,南朗街道,4,442000 | |
| 533 | +442009,黄圃镇,4,442000 | |
| 534 | +442010,东凤镇,4,442000 | |
| 535 | +442011,古镇镇,4,442000 | |
| 536 | +442012,沙溪镇,4,442000 | |
| 537 | +442013,坦洲镇,4,442000 | |
| 538 | +442014,港口镇,4,442000 | |
| 539 | +442015,三角镇,4,442000 | |
| 540 | +442016,横栏镇,4,442000 | |
| 541 | +442017,南头镇,4,442000 | |
| 542 | +442018,阜沙镇,4,442000 | |
| 543 | +442019,三乡镇,4,442000 | |
| 544 | +442020,板芙镇,4,442000 | |
| 545 | +442021,大涌镇,4,442000 | |
| 546 | +442022,神湾镇,4,442000 | |
| 547 | +442023,小榄镇,4,442000 | |
| 525 | 548 | 445100,潮州市,3,440000 |
| 526 | 549 | 445200,揭阳市,3,440000 |
| 527 | 550 | 445300,云浮市,3,440000 | ... | ... |
yudao-framework/yudao-spring-boot-starter-biz-operatelog/pom.xml deleted
| 1 | -<?xml version="1.0" encoding="UTF-8"?> | |
| 2 | -<project xmlns="http://maven.apache.org/POM/4.0.0" | |
| 3 | - xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | |
| 4 | - xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> | |
| 5 | - <parent> | |
| 6 | - <groupId>cn.iocoder.boot</groupId> | |
| 7 | - <artifactId>yudao-framework</artifactId> | |
| 8 | - <version>${revision}</version> | |
| 9 | - </parent> | |
| 10 | - <modelVersion>4.0.0</modelVersion> | |
| 11 | - <artifactId>yudao-spring-boot-starter-biz-operatelog</artifactId> | |
| 12 | - <packaging>jar</packaging> | |
| 13 | - | |
| 14 | - <name>${project.artifactId}</name> | |
| 15 | - <description>操作日志</description> | |
| 16 | - <url>https://github.com/YunaiV/ruoyi-vue-pro</url> | |
| 17 | - | |
| 18 | - <dependencies> | |
| 19 | - <dependency> | |
| 20 | - <groupId>cn.iocoder.boot</groupId> | |
| 21 | - <artifactId>yudao-common</artifactId> | |
| 22 | - </dependency> | |
| 23 | - | |
| 24 | - <!-- Spring 核心 --> | |
| 25 | - <dependency> | |
| 26 | - <groupId>org.springframework.boot</groupId> | |
| 27 | - <artifactId>spring-boot-starter-aop</artifactId> | |
| 28 | - </dependency> | |
| 29 | - | |
| 30 | - <!-- Web 相关 --> | |
| 31 | - <dependency> | |
| 32 | - <groupId>cn.iocoder.boot</groupId> | |
| 33 | - <artifactId>yudao-spring-boot-starter-web</artifactId> | |
| 34 | - <scope>provided</scope> | |
| 35 | - </dependency> | |
| 36 | - | |
| 37 | - <!-- 业务组件 --> | |
| 38 | - <dependency> | |
| 39 | - <groupId>cn.iocoder.boot</groupId> | |
| 40 | - <artifactId>yudao-module-system-api</artifactId> | |
| 41 | - <version>${revision}</version> | |
| 42 | - </dependency> | |
| 43 | - | |
| 44 | - <!-- 工具类相关 --> | |
| 45 | - <dependency> | |
| 46 | - <groupId>com.google.guava</groupId> | |
| 47 | - <artifactId>guava</artifactId> | |
| 48 | - </dependency> | |
| 49 | - | |
| 50 | - </dependencies> | |
| 51 | - | |
| 52 | -</project> |
yudao-framework/yudao-spring-boot-starter-biz-operatelog/src/main/java/cn/iocoder/yudao/framework/operatelog/config/YudaoOperateLogAutoConfiguration.java deleted
| 1 | -package cn.iocoder.yudao.framework.operatelog.config; | |
| 2 | - | |
| 3 | -import cn.iocoder.yudao.framework.operatelog.core.aop.OperateLogAspect; | |
| 4 | -import cn.iocoder.yudao.framework.operatelog.core.service.OperateLogFrameworkService; | |
| 5 | -import cn.iocoder.yudao.framework.operatelog.core.service.OperateLogFrameworkServiceImpl; | |
| 6 | -import cn.iocoder.yudao.module.system.api.logger.OperateLogApi; | |
| 7 | -import org.springframework.boot.autoconfigure.AutoConfiguration; | |
| 8 | -import org.springframework.context.annotation.Bean; | |
| 9 | - | |
| 10 | -@AutoConfiguration | |
| 11 | -public class YudaoOperateLogAutoConfiguration { | |
| 12 | - | |
| 13 | - @Bean | |
| 14 | - public OperateLogAspect operateLogAspect() { | |
| 15 | - return new OperateLogAspect(); | |
| 16 | - } | |
| 17 | - | |
| 18 | - @Bean | |
| 19 | - public OperateLogFrameworkService operateLogFrameworkService(OperateLogApi operateLogApi) { | |
| 20 | - return new OperateLogFrameworkServiceImpl(operateLogApi); | |
| 21 | - } | |
| 22 | - | |
| 23 | -} |
yudao-framework/yudao-spring-boot-starter-biz-operatelog/src/main/java/cn/iocoder/yudao/framework/operatelog/core/aop/OperateLogAspect.java deleted
| 1 | -package cn.iocoder.yudao.framework.operatelog.core.aop; | |
| 2 | - | |
| 3 | -import cn.hutool.core.date.LocalDateTimeUtil; | |
| 4 | -import cn.hutool.core.exceptions.ExceptionUtil; | |
| 5 | -import cn.hutool.core.util.ArrayUtil; | |
| 6 | -import cn.hutool.core.util.StrUtil; | |
| 7 | -import cn.iocoder.yudao.framework.common.enums.UserTypeEnum; | |
| 8 | -import cn.iocoder.yudao.framework.common.pojo.CommonResult; | |
| 9 | -import cn.iocoder.yudao.framework.common.util.json.JsonUtils; | |
| 10 | -import cn.iocoder.yudao.framework.common.util.monitor.TracerUtils; | |
| 11 | -import cn.iocoder.yudao.framework.common.util.servlet.ServletUtils; | |
| 12 | -import cn.iocoder.yudao.framework.operatelog.core.enums.OperateTypeEnum; | |
| 13 | -import cn.iocoder.yudao.framework.operatelog.core.service.OperateLog; | |
| 14 | -import cn.iocoder.yudao.framework.operatelog.core.service.OperateLogFrameworkService; | |
| 15 | -import cn.iocoder.yudao.framework.web.core.util.WebFrameworkUtils; | |
| 16 | -import com.google.common.collect.Maps; | |
| 17 | -import io.swagger.v3.oas.annotations.tags.Tag; | |
| 18 | -import io.swagger.v3.oas.annotations.Operation; | |
| 19 | -import lombok.extern.slf4j.Slf4j; | |
| 20 | -import org.aspectj.lang.ProceedingJoinPoint; | |
| 21 | -import org.aspectj.lang.annotation.Around; | |
| 22 | -import org.aspectj.lang.annotation.Aspect; | |
| 23 | -import org.aspectj.lang.reflect.MethodSignature; | |
| 24 | -import org.springframework.core.annotation.AnnotationUtils; | |
| 25 | -import org.springframework.validation.BindingResult; | |
| 26 | -import org.springframework.web.bind.annotation.RequestMapping; | |
| 27 | -import org.springframework.web.bind.annotation.RequestMethod; | |
| 28 | -import org.springframework.web.multipart.MultipartFile; | |
| 29 | - | |
| 30 | -import jakarta.annotation.Resource; | |
| 31 | -import jakarta.servlet.http.HttpServletRequest; | |
| 32 | -import jakarta.servlet.http.HttpServletResponse; | |
| 33 | -import java.lang.annotation.Annotation; | |
| 34 | -import java.lang.reflect.Array; | |
| 35 | -import java.time.LocalDateTime; | |
| 36 | -import java.util.*; | |
| 37 | -import java.util.function.Predicate; | |
| 38 | -import java.util.stream.IntStream; | |
| 39 | - | |
| 40 | -import static cn.iocoder.yudao.framework.common.exception.enums.GlobalErrorCodeConstants.INTERNAL_SERVER_ERROR; | |
| 41 | -import static cn.iocoder.yudao.framework.common.exception.enums.GlobalErrorCodeConstants.SUCCESS; | |
| 42 | - | |
| 43 | -/** | |
| 44 | - * 拦截使用 @OperateLog 注解,如果满足条件,则生成操作日志。 | |
| 45 | - * 满足如下任一条件,则会进行记录: | |
| 46 | - * 1. 使用 @ApiOperation + 非 @GetMapping | |
| 47 | - * 2. 使用 @OperateLog 注解 | |
| 48 | - * <p> | |
| 49 | - * 但是,如果声明 @OperateLog 注解时,将 enable 属性设置为 false 时,强制不记录。 | |
| 50 | - * | |
| 51 | - * @author 芋道源码 | |
| 52 | - */ | |
| 53 | -@Aspect | |
| 54 | -@Slf4j | |
| 55 | -public class OperateLogAspect { | |
| 56 | - | |
| 57 | - /** | |
| 58 | - * 用于记录操作内容的上下文 | |
| 59 | - * | |
| 60 | - * @see OperateLog#getContent() | |
| 61 | - */ | |
| 62 | - private static final ThreadLocal<String> CONTENT = new ThreadLocal<>(); | |
| 63 | - /** | |
| 64 | - * 用于记录拓展字段的上下文 | |
| 65 | - * | |
| 66 | - * @see OperateLog#getExts() | |
| 67 | - */ | |
| 68 | - private static final ThreadLocal<Map<String, Object>> EXTS = new ThreadLocal<>(); | |
| 69 | - | |
| 70 | - @Resource | |
| 71 | - private OperateLogFrameworkService operateLogFrameworkService; | |
| 72 | - | |
| 73 | - @Around("@annotation(operation)") | |
| 74 | - public Object around(ProceedingJoinPoint joinPoint, Operation operation) throws Throwable { | |
| 75 | - // 可能也添加了 @ApiOperation 注解 | |
| 76 | - cn.iocoder.yudao.framework.operatelog.core.annotations.OperateLog operateLog = getMethodAnnotation(joinPoint, | |
| 77 | - cn.iocoder.yudao.framework.operatelog.core.annotations.OperateLog.class); | |
| 78 | - return around0(joinPoint, operateLog, operation); | |
| 79 | - } | |
| 80 | - | |
| 81 | - @Around("!@annotation(io.swagger.v3.oas.annotations.Operation) && @annotation(operateLog)") | |
| 82 | - // 兼容处理,只添加 @OperateLog 注解的情况 | |
| 83 | - public Object around(ProceedingJoinPoint joinPoint, | |
| 84 | - cn.iocoder.yudao.framework.operatelog.core.annotations.OperateLog operateLog) throws Throwable { | |
| 85 | - return around0(joinPoint, operateLog, null); | |
| 86 | - } | |
| 87 | - | |
| 88 | - private Object around0(ProceedingJoinPoint joinPoint, | |
| 89 | - cn.iocoder.yudao.framework.operatelog.core.annotations.OperateLog operateLog, | |
| 90 | - Operation operation) throws Throwable { | |
| 91 | - // 目前,只有管理员,才记录操作日志!所以非管理员,直接调用,不进行记录 | |
| 92 | - Integer userType = WebFrameworkUtils.getLoginUserType(); | |
| 93 | - if (!Objects.equals(userType, UserTypeEnum.ADMIN.getValue())) { | |
| 94 | - return joinPoint.proceed(); | |
| 95 | - } | |
| 96 | - | |
| 97 | - // 记录开始时间 | |
| 98 | - LocalDateTime startTime = LocalDateTime.now(); | |
| 99 | - try { | |
| 100 | - // 执行原有方法 | |
| 101 | - Object result = joinPoint.proceed(); | |
| 102 | - // 记录正常执行时的操作日志 | |
| 103 | - this.log(joinPoint, operateLog, operation, startTime, result, null); | |
| 104 | - return result; | |
| 105 | - } catch (Throwable exception) { | |
| 106 | - this.log(joinPoint, operateLog, operation, startTime, null, exception); | |
| 107 | - throw exception; | |
| 108 | - } finally { | |
| 109 | - clearThreadLocal(); | |
| 110 | - } | |
| 111 | - } | |
| 112 | - | |
| 113 | - public static void setContent(String content) { | |
| 114 | - CONTENT.set(content); | |
| 115 | - } | |
| 116 | - | |
| 117 | - public static void addExt(String key, Object value) { | |
| 118 | - if (EXTS.get() == null) { | |
| 119 | - EXTS.set(new HashMap<>()); | |
| 120 | - } | |
| 121 | - EXTS.get().put(key, value); | |
| 122 | - } | |
| 123 | - | |
| 124 | - private static void clearThreadLocal() { | |
| 125 | - CONTENT.remove(); | |
| 126 | - EXTS.remove(); | |
| 127 | - } | |
| 128 | - | |
| 129 | - private void log(ProceedingJoinPoint joinPoint, | |
| 130 | - cn.iocoder.yudao.framework.operatelog.core.annotations.OperateLog operateLog, | |
| 131 | - Operation operation, | |
| 132 | - LocalDateTime startTime, Object result, Throwable exception) { | |
| 133 | - try { | |
| 134 | - // 判断不记录的情况 | |
| 135 | - if (!isLogEnable(joinPoint, operateLog)) { | |
| 136 | - return; | |
| 137 | - } | |
| 138 | - // 真正记录操作日志 | |
| 139 | - this.log0(joinPoint, operateLog, operation, startTime, result, exception); | |
| 140 | - } catch (Throwable ex) { | |
| 141 | - log.error("[log][记录操作日志时,发生异常,其中参数是 joinPoint({}) operateLog({}) apiOperation({}) result({}) exception({}) ]", | |
| 142 | - joinPoint, operateLog, operation, result, exception, ex); | |
| 143 | - } | |
| 144 | - } | |
| 145 | - | |
| 146 | - private void log0(ProceedingJoinPoint joinPoint, | |
| 147 | - cn.iocoder.yudao.framework.operatelog.core.annotations.OperateLog operateLog, | |
| 148 | - Operation operation, | |
| 149 | - LocalDateTime startTime, Object result, Throwable exception) { | |
| 150 | - OperateLog operateLogObj = new OperateLog(); | |
| 151 | - // 补全通用字段 | |
| 152 | - operateLogObj.setTraceId(TracerUtils.getTraceId()); | |
| 153 | - operateLogObj.setStartTime(startTime); | |
| 154 | - // 补充用户信息 | |
| 155 | - fillUserFields(operateLogObj); | |
| 156 | - // 补全模块信息 | |
| 157 | - fillModuleFields(operateLogObj, joinPoint, operateLog, operation); | |
| 158 | - // 补全请求信息 | |
| 159 | - fillRequestFields(operateLogObj); | |
| 160 | - // 补全方法信息 | |
| 161 | - fillMethodFields(operateLogObj, joinPoint, operateLog, startTime, result, exception); | |
| 162 | - | |
| 163 | - // 异步记录日志 | |
| 164 | - operateLogFrameworkService.createOperateLog(operateLogObj); | |
| 165 | - } | |
| 166 | - | |
| 167 | - private static void fillUserFields(OperateLog operateLogObj) { | |
| 168 | - operateLogObj.setUserId(WebFrameworkUtils.getLoginUserId()); | |
| 169 | - operateLogObj.setUserType(WebFrameworkUtils.getLoginUserType()); | |
| 170 | - } | |
| 171 | - | |
| 172 | - private static void fillModuleFields(OperateLog operateLogObj, | |
| 173 | - ProceedingJoinPoint joinPoint, | |
| 174 | - cn.iocoder.yudao.framework.operatelog.core.annotations.OperateLog operateLog, | |
| 175 | - Operation operation) { | |
| 176 | - // module 属性 | |
| 177 | - if (operateLog != null) { | |
| 178 | - operateLogObj.setModule(operateLog.module()); | |
| 179 | - } | |
| 180 | - if (StrUtil.isEmpty(operateLogObj.getModule())) { | |
| 181 | - Tag tag = getClassAnnotation(joinPoint, Tag.class); | |
| 182 | - if (tag != null) { | |
| 183 | - // 优先读取 @Tag 的 name 属性 | |
| 184 | - if (StrUtil.isNotEmpty(tag.name())) { | |
| 185 | - operateLogObj.setModule(tag.name()); | |
| 186 | - } | |
| 187 | - // 没有的话,读取 @API 的 description 属性 | |
| 188 | - if (StrUtil.isEmpty(operateLogObj.getModule()) && ArrayUtil.isNotEmpty(tag.description())) { | |
| 189 | - operateLogObj.setModule(tag.description()); | |
| 190 | - } | |
| 191 | - } | |
| 192 | - } | |
| 193 | - // name 属性 | |
| 194 | - if (operateLog != null) { | |
| 195 | - operateLogObj.setName(operateLog.name()); | |
| 196 | - } | |
| 197 | - if (StrUtil.isEmpty(operateLogObj.getName()) && operation != null) { | |
| 198 | - operateLogObj.setName(operation.summary()); | |
| 199 | - } | |
| 200 | - // type 属性 | |
| 201 | - if (operateLog != null && ArrayUtil.isNotEmpty(operateLog.type())) { | |
| 202 | - operateLogObj.setType(operateLog.type()[0].getType()); | |
| 203 | - } | |
| 204 | - if (operateLogObj.getType() == null) { | |
| 205 | - RequestMethod requestMethod = obtainFirstMatchRequestMethod(obtainRequestMethod(joinPoint)); | |
| 206 | - OperateTypeEnum operateLogType = convertOperateLogType(requestMethod); | |
| 207 | - operateLogObj.setType(operateLogType != null ? operateLogType.getType() : null); | |
| 208 | - } | |
| 209 | - // content 和 exts 属性 | |
| 210 | - operateLogObj.setContent(CONTENT.get()); | |
| 211 | - operateLogObj.setExts(EXTS.get()); | |
| 212 | - } | |
| 213 | - | |
| 214 | - private static void fillRequestFields(OperateLog operateLogObj) { | |
| 215 | - // 获得 Request 对象 | |
| 216 | - HttpServletRequest request = ServletUtils.getRequest(); | |
| 217 | - if (request == null) { | |
| 218 | - return; | |
| 219 | - } | |
| 220 | - // 补全请求信息 | |
| 221 | - operateLogObj.setRequestMethod(request.getMethod()); | |
| 222 | - operateLogObj.setRequestUrl(request.getRequestURI()); | |
| 223 | - operateLogObj.setUserIp(ServletUtils.getClientIP(request)); | |
| 224 | - operateLogObj.setUserAgent(ServletUtils.getUserAgent(request)); | |
| 225 | - } | |
| 226 | - | |
| 227 | - private static void fillMethodFields(OperateLog operateLogObj, | |
| 228 | - ProceedingJoinPoint joinPoint, | |
| 229 | - cn.iocoder.yudao.framework.operatelog.core.annotations.OperateLog operateLog, | |
| 230 | - LocalDateTime startTime, Object result, Throwable exception) { | |
| 231 | - MethodSignature methodSignature = (MethodSignature) joinPoint.getSignature(); | |
| 232 | - operateLogObj.setJavaMethod(methodSignature.toString()); | |
| 233 | - if (operateLog == null || operateLog.logArgs()) { | |
| 234 | - operateLogObj.setJavaMethodArgs(obtainMethodArgs(joinPoint)); | |
| 235 | - } | |
| 236 | - if (operateLog == null || operateLog.logResultData()) { | |
| 237 | - operateLogObj.setResultData(obtainResultData(result)); | |
| 238 | - } | |
| 239 | - operateLogObj.setDuration((int) (LocalDateTimeUtil.between(startTime, LocalDateTime.now()).toMillis())); | |
| 240 | - // (正常)处理 resultCode 和 resultMsg 字段 | |
| 241 | - if (result instanceof CommonResult) { | |
| 242 | - CommonResult<?> commonResult = (CommonResult<?>) result; | |
| 243 | - operateLogObj.setResultCode(commonResult.getCode()); | |
| 244 | - operateLogObj.setResultMsg(commonResult.getMsg()); | |
| 245 | - } else { | |
| 246 | - operateLogObj.setResultCode(SUCCESS.getCode()); | |
| 247 | - } | |
| 248 | - // (异常)处理 resultCode 和 resultMsg 字段 | |
| 249 | - if (exception != null) { | |
| 250 | - operateLogObj.setResultCode(INTERNAL_SERVER_ERROR.getCode()); | |
| 251 | - operateLogObj.setResultMsg(ExceptionUtil.getRootCauseMessage(exception)); | |
| 252 | - } | |
| 253 | - } | |
| 254 | - | |
| 255 | - private static boolean isLogEnable(ProceedingJoinPoint joinPoint, | |
| 256 | - cn.iocoder.yudao.framework.operatelog.core.annotations.OperateLog operateLog) { | |
| 257 | - // 有 @OperateLog 注解的情况下 | |
| 258 | - if (operateLog != null) { | |
| 259 | - return operateLog.enable(); | |
| 260 | - } | |
| 261 | - // 没有 @ApiOperation 注解的情况下,只记录 POST、PUT、DELETE 的情况 | |
| 262 | - return obtainFirstLogRequestMethod(obtainRequestMethod(joinPoint)) != null; | |
| 263 | - } | |
| 264 | - | |
| 265 | - private static RequestMethod obtainFirstLogRequestMethod(RequestMethod[] requestMethods) { | |
| 266 | - if (ArrayUtil.isEmpty(requestMethods)) { | |
| 267 | - return null; | |
| 268 | - } | |
| 269 | - return Arrays.stream(requestMethods).filter(requestMethod -> | |
| 270 | - requestMethod == RequestMethod.POST | |
| 271 | - || requestMethod == RequestMethod.PUT | |
| 272 | - || requestMethod == RequestMethod.DELETE) | |
| 273 | - .findFirst().orElse(null); | |
| 274 | - } | |
| 275 | - | |
| 276 | - private static RequestMethod obtainFirstMatchRequestMethod(RequestMethod[] requestMethods) { | |
| 277 | - if (ArrayUtil.isEmpty(requestMethods)) { | |
| 278 | - return null; | |
| 279 | - } | |
| 280 | - // 优先,匹配最优的 POST、PUT、DELETE | |
| 281 | - RequestMethod result = obtainFirstLogRequestMethod(requestMethods); | |
| 282 | - if (result != null) { | |
| 283 | - return result; | |
| 284 | - } | |
| 285 | - // 然后,匹配次优的 GET | |
| 286 | - result = Arrays.stream(requestMethods).filter(requestMethod -> requestMethod == RequestMethod.GET) | |
| 287 | - .findFirst().orElse(null); | |
| 288 | - if (result != null) { | |
| 289 | - return result; | |
| 290 | - } | |
| 291 | - // 兜底,获得第一个 | |
| 292 | - return requestMethods[0]; | |
| 293 | - } | |
| 294 | - | |
| 295 | - private static OperateTypeEnum convertOperateLogType(RequestMethod requestMethod) { | |
| 296 | - if (requestMethod == null) { | |
| 297 | - return null; | |
| 298 | - } | |
| 299 | - switch (requestMethod) { | |
| 300 | - case GET: | |
| 301 | - return OperateTypeEnum.GET; | |
| 302 | - case POST: | |
| 303 | - return OperateTypeEnum.CREATE; | |
| 304 | - case PUT: | |
| 305 | - return OperateTypeEnum.UPDATE; | |
| 306 | - case DELETE: | |
| 307 | - return OperateTypeEnum.DELETE; | |
| 308 | - default: | |
| 309 | - return OperateTypeEnum.OTHER; | |
| 310 | - } | |
| 311 | - } | |
| 312 | - | |
| 313 | - private static RequestMethod[] obtainRequestMethod(ProceedingJoinPoint joinPoint) { | |
| 314 | - RequestMapping requestMapping = AnnotationUtils.getAnnotation( // 使用 Spring 的工具类,可以处理 @RequestMapping 别名注解 | |
| 315 | - ((MethodSignature) joinPoint.getSignature()).getMethod(), RequestMapping.class); | |
| 316 | - return requestMapping != null ? requestMapping.method() : new RequestMethod[]{}; | |
| 317 | - } | |
| 318 | - | |
| 319 | - @SuppressWarnings("SameParameterValue") | |
| 320 | - private static <T extends Annotation> T getMethodAnnotation(ProceedingJoinPoint joinPoint, Class<T> annotationClass) { | |
| 321 | - return ((MethodSignature) joinPoint.getSignature()).getMethod().getAnnotation(annotationClass); | |
| 322 | - } | |
| 323 | - | |
| 324 | - @SuppressWarnings("SameParameterValue") | |
| 325 | - private static <T extends Annotation> T getClassAnnotation(ProceedingJoinPoint joinPoint, Class<T> annotationClass) { | |
| 326 | - return ((MethodSignature) joinPoint.getSignature()).getMethod().getDeclaringClass().getAnnotation(annotationClass); | |
| 327 | - } | |
| 328 | - | |
| 329 | - private static String obtainMethodArgs(ProceedingJoinPoint joinPoint) { | |
| 330 | - // TODO 提升:参数脱敏和忽略 | |
| 331 | - MethodSignature methodSignature = (MethodSignature) joinPoint.getSignature(); | |
| 332 | - String[] argNames = methodSignature.getParameterNames(); | |
| 333 | - Object[] argValues = joinPoint.getArgs(); | |
| 334 | - // 拼接参数 | |
| 335 | - Map<String, Object> args = Maps.newHashMapWithExpectedSize(argValues.length); | |
| 336 | - for (int i = 0; i < argNames.length; i++) { | |
| 337 | - String argName = argNames[i]; | |
| 338 | - Object argValue = argValues[i]; | |
| 339 | - // 被忽略时,标记为 ignore 字符串,避免和 null 混在一起 | |
| 340 | - args.put(argName, !isIgnoreArgs(argValue) ? argValue : "[ignore]"); | |
| 341 | - } | |
| 342 | - return JsonUtils.toJsonString(args); | |
| 343 | - } | |
| 344 | - | |
| 345 | - private static String obtainResultData(Object result) { | |
| 346 | - // TODO 提升:结果脱敏和忽略 | |
| 347 | - if (result instanceof CommonResult) { | |
| 348 | - result = ((CommonResult<?>) result).getData(); | |
| 349 | - } | |
| 350 | - return JsonUtils.toJsonString(result); | |
| 351 | - } | |
| 352 | - | |
| 353 | - private static boolean isIgnoreArgs(Object object) { | |
| 354 | - Class<?> clazz = object.getClass(); | |
| 355 | - // 处理数组的情况 | |
| 356 | - if (clazz.isArray()) { | |
| 357 | - return IntStream.range(0, Array.getLength(object)) | |
| 358 | - .anyMatch(index -> isIgnoreArgs(Array.get(object, index))); | |
| 359 | - } | |
| 360 | - // 递归,处理数组、Collection、Map 的情况 | |
| 361 | - if (Collection.class.isAssignableFrom(clazz)) { | |
| 362 | - return ((Collection<?>) object).stream() | |
| 363 | - .anyMatch((Predicate<Object>) OperateLogAspect::isIgnoreArgs); | |
| 364 | - } | |
| 365 | - if (Map.class.isAssignableFrom(clazz)) { | |
| 366 | - return isIgnoreArgs(((Map<?, ?>) object).values()); | |
| 367 | - } | |
| 368 | - // obj | |
| 369 | - return object instanceof MultipartFile | |
| 370 | - || object instanceof HttpServletRequest | |
| 371 | - || object instanceof HttpServletResponse | |
| 372 | - || object instanceof BindingResult; | |
| 373 | - } | |
| 374 | - | |
| 375 | -} |
yudao-framework/yudao-spring-boot-starter-biz-operatelog/src/main/java/cn/iocoder/yudao/framework/operatelog/core/package-info.java deleted
| 1 | -package cn.iocoder.yudao.framework.operatelog.core; |
yudao-framework/yudao-spring-boot-starter-biz-operatelog/src/main/java/cn/iocoder/yudao/framework/operatelog/core/service/OperateLog.java deleted
| 1 | -package cn.iocoder.yudao.framework.operatelog.core.service; | |
| 2 | - | |
| 3 | -import lombok.Data; | |
| 4 | - | |
| 5 | -import java.time.LocalDateTime; | |
| 6 | -import java.util.Map; | |
| 7 | - | |
| 8 | -/** | |
| 9 | - * 操作日志 | |
| 10 | - * | |
| 11 | - * @author 芋道源码 | |
| 12 | - */ | |
| 13 | -@Data | |
| 14 | -public class OperateLog { | |
| 15 | - | |
| 16 | - /** | |
| 17 | - * 链路追踪编号 | |
| 18 | - */ | |
| 19 | - private String traceId; | |
| 20 | - | |
| 21 | - /** | |
| 22 | - * 用户编号 | |
| 23 | - */ | |
| 24 | - private Long userId; | |
| 25 | - /** | |
| 26 | - * 用户类型 | |
| 27 | - */ | |
| 28 | - private Integer userType; | |
| 29 | - | |
| 30 | - /** | |
| 31 | - * 操作模块 | |
| 32 | - */ | |
| 33 | - private String module; | |
| 34 | - | |
| 35 | - /** | |
| 36 | - * 操作名 | |
| 37 | - */ | |
| 38 | - private String name; | |
| 39 | - | |
| 40 | - /** | |
| 41 | - * 操作分类 | |
| 42 | - */ | |
| 43 | - private Integer type; | |
| 44 | - | |
| 45 | - /** | |
| 46 | - * 操作明细 | |
| 47 | - */ | |
| 48 | - private String content; | |
| 49 | - | |
| 50 | - /** | |
| 51 | - * 拓展字段 | |
| 52 | - */ | |
| 53 | - private Map<String, Object> exts; | |
| 54 | - | |
| 55 | - /** | |
| 56 | - * 请求方法名 | |
| 57 | - */ | |
| 58 | - private String requestMethod; | |
| 59 | - | |
| 60 | - /** | |
| 61 | - * 请求地址 | |
| 62 | - */ | |
| 63 | - private String requestUrl; | |
| 64 | - | |
| 65 | - /** | |
| 66 | - * 用户 IP | |
| 67 | - */ | |
| 68 | - private String userIp; | |
| 69 | - | |
| 70 | - /** | |
| 71 | - * 浏览器 UserAgent | |
| 72 | - */ | |
| 73 | - private String userAgent; | |
| 74 | - | |
| 75 | - /** | |
| 76 | - * Java 方法名 | |
| 77 | - */ | |
| 78 | - private String javaMethod; | |
| 79 | - | |
| 80 | - /** | |
| 81 | - * Java 方法的参数 | |
| 82 | - */ | |
| 83 | - private String javaMethodArgs; | |
| 84 | - | |
| 85 | - /** | |
| 86 | - * 开始时间 | |
| 87 | - */ | |
| 88 | - private LocalDateTime startTime; | |
| 89 | - | |
| 90 | - /** | |
| 91 | - * 执行时长,单位:毫秒 | |
| 92 | - */ | |
| 93 | - private Integer duration; | |
| 94 | - | |
| 95 | - /** | |
| 96 | - * 结果码 | |
| 97 | - */ | |
| 98 | - private Integer resultCode; | |
| 99 | - | |
| 100 | - /** | |
| 101 | - * 结果提示 | |
| 102 | - */ | |
| 103 | - private String resultMsg; | |
| 104 | - | |
| 105 | - /** | |
| 106 | - * 结果数据 | |
| 107 | - */ | |
| 108 | - private String resultData; | |
| 109 | - | |
| 110 | -} |
yudao-framework/yudao-spring-boot-starter-biz-operatelog/src/main/java/cn/iocoder/yudao/framework/operatelog/core/service/OperateLogFrameworkService.java deleted
| 1 | -package cn.iocoder.yudao.framework.operatelog.core.service; | |
| 2 | - | |
| 3 | -/** | |
| 4 | - * 操作日志 Framework Service 接口 | |
| 5 | - * | |
| 6 | - * @author 芋道源码 | |
| 7 | - */ | |
| 8 | -public interface OperateLogFrameworkService { | |
| 9 | - | |
| 10 | - /** | |
| 11 | - * 记录操作日志 | |
| 12 | - * | |
| 13 | - * @param operateLog 操作日志请求 | |
| 14 | - */ | |
| 15 | - void createOperateLog(OperateLog operateLog); | |
| 16 | - | |
| 17 | -} |
yudao-framework/yudao-spring-boot-starter-biz-operatelog/src/main/java/cn/iocoder/yudao/framework/operatelog/core/service/OperateLogFrameworkServiceImpl.java deleted
| 1 | -package cn.iocoder.yudao.framework.operatelog.core.service; | |
| 2 | - | |
| 3 | -import cn.hutool.core.bean.BeanUtil; | |
| 4 | -import cn.iocoder.yudao.module.system.api.logger.OperateLogApi; | |
| 5 | -import cn.iocoder.yudao.module.system.api.logger.dto.OperateLogCreateReqDTO; | |
| 6 | -import lombok.RequiredArgsConstructor; | |
| 7 | -import org.springframework.scheduling.annotation.Async; | |
| 8 | - | |
| 9 | -/** | |
| 10 | - * 操作日志 Framework Service 实现类 | |
| 11 | - * | |
| 12 | - * 基于 {@link OperateLogApi} 实现,记录操作日志 | |
| 13 | - * | |
| 14 | - * @author 芋道源码 | |
| 15 | - */ | |
| 16 | -@RequiredArgsConstructor | |
| 17 | -public class OperateLogFrameworkServiceImpl implements OperateLogFrameworkService { | |
| 18 | - | |
| 19 | - private final OperateLogApi operateLogApi; | |
| 20 | - | |
| 21 | - @Override | |
| 22 | - @Async | |
| 23 | - public void createOperateLog(OperateLog operateLog) { | |
| 24 | - OperateLogCreateReqDTO reqDTO = BeanUtil.toBean(operateLog, OperateLogCreateReqDTO.class); | |
| 25 | - operateLogApi.createOperateLog(reqDTO); | |
| 26 | - } | |
| 27 | - | |
| 28 | -} |
yudao-framework/yudao-spring-boot-starter-biz-operatelog/src/main/java/cn/iocoder/yudao/framework/operatelog/core/util/OperateLogUtils.java deleted
| 1 | -package cn.iocoder.yudao.framework.operatelog.core.util; | |
| 2 | - | |
| 3 | -import cn.iocoder.yudao.framework.operatelog.core.aop.OperateLogAspect; | |
| 4 | - | |
| 5 | -/** | |
| 6 | - * 操作日志工具类 | |
| 7 | - * 目前主要的作用,是提供给业务代码,记录操作明细和拓展字段 | |
| 8 | - * | |
| 9 | - * @author 芋道源码 | |
| 10 | - */ | |
| 11 | -public class OperateLogUtils { | |
| 12 | - | |
| 13 | - public static void setContent(String content) { | |
| 14 | - OperateLogAspect.setContent(content); | |
| 15 | - } | |
| 16 | - | |
| 17 | - public static void addExt(String key, Object value) { | |
| 18 | - OperateLogAspect.addExt(key, value); | |
| 19 | - } | |
| 20 | - | |
| 21 | -} |
yudao-framework/yudao-spring-boot-starter-biz-operatelog/src/main/java/cn/iocoder/yudao/framework/operatelog/package-info.java deleted
yudao-framework/yudao-spring-boot-starter-biz-operatelog/src/main/resources/META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports deleted
yudao-framework/yudao-spring-boot-starter-biz-tenant/src/main/java/cn/iocoder/yudao/framework/tenant/core/context/TenantContextHolder.java
| 1 | 1 | package cn.iocoder.yudao.framework.tenant.core.context; |
| 2 | 2 | |
| 3 | -import cn.hutool.core.util.StrUtil; | |
| 4 | 3 | import cn.iocoder.yudao.framework.common.enums.DocumentEnum; |
| 5 | 4 | import com.alibaba.ttl.TransmittableThreadLocal; |
| 6 | 5 | |
| ... | ... | @@ -31,16 +30,6 @@ public class TenantContextHolder { |
| 31 | 30 | } |
| 32 | 31 | |
| 33 | 32 | /** |
| 34 | - * 获得租户编号 String | |
| 35 | - * | |
| 36 | - * @return 租户编号 | |
| 37 | - */ | |
| 38 | - public static String getTenantIdStr() { | |
| 39 | - Long tenantId = getTenantId(); | |
| 40 | - return StrUtil.toStringOrNull(tenantId); | |
| 41 | - } | |
| 42 | - | |
| 43 | - /** | |
| 44 | 33 | * 获得租户编号。如果不存在,则抛出 NullPointerException 异常 |
| 45 | 34 | * |
| 46 | 35 | * @return 租户编号 | ... | ... |
yudao-framework/yudao-spring-boot-starter-excel/src/main/java/cn/iocoder/yudao/framework/dict/core/DictFrameworkUtils.java
| ... | ... | @@ -11,6 +11,7 @@ import lombok.SneakyThrows; |
| 11 | 11 | import lombok.extern.slf4j.Slf4j; |
| 12 | 12 | |
| 13 | 13 | import java.time.Duration; |
| 14 | +import java.util.List; | |
| 14 | 15 | |
| 15 | 16 | /** |
| 16 | 17 | * 字典工具类 |
| ... | ... | @@ -24,6 +25,7 @@ public class DictFrameworkUtils { |
| 24 | 25 | |
| 25 | 26 | private static final DictDataRespDTO DICT_DATA_NULL = new DictDataRespDTO(); |
| 26 | 27 | |
| 28 | + // TODO @puhui999:GET_DICT_DATA_CACHE、GET_DICT_DATA_LIST_CACHE、PARSE_DICT_DATA_CACHE 这 3 个缓存是有点重叠,可以思考下,有没可能减少 1 个。微信讨论好私聊,再具体改哈 | |
| 27 | 29 | /** |
| 28 | 30 | * 针对 {@link #getDictDataLabel(String, String)} 的缓存 |
| 29 | 31 | */ |
| ... | ... | @@ -39,6 +41,20 @@ public class DictFrameworkUtils { |
| 39 | 41 | }); |
| 40 | 42 | |
| 41 | 43 | /** |
| 44 | + * 针对 {@link #getDictDataLabelList(String)} 的缓存 | |
| 45 | + */ | |
| 46 | + private static final LoadingCache<String, List<String>> GET_DICT_DATA_LIST_CACHE = CacheUtils.buildAsyncReloadingCache( | |
| 47 | + Duration.ofMinutes(1L), // 过期时间 1 分钟 | |
| 48 | + new CacheLoader<String, List<String>>() { | |
| 49 | + | |
| 50 | + @Override | |
| 51 | + public List<String> load(String dictType) { | |
| 52 | + return dictDataApi.getDictDataLabelList(dictType); | |
| 53 | + } | |
| 54 | + | |
| 55 | + }); | |
| 56 | + | |
| 57 | + /** | |
| 42 | 58 | * 针对 {@link #parseDictDataValue(String, String)} 的缓存 |
| 43 | 59 | */ |
| 44 | 60 | private static final LoadingCache<KeyValue<String, String>, DictDataRespDTO> PARSE_DICT_DATA_CACHE = CacheUtils.buildAsyncReloadingCache( |
| ... | ... | @@ -68,6 +84,11 @@ public class DictFrameworkUtils { |
| 68 | 84 | } |
| 69 | 85 | |
| 70 | 86 | @SneakyThrows |
| 87 | + public static List<String> getDictDataLabelList(String dictType) { | |
| 88 | + return GET_DICT_DATA_LIST_CACHE.get(dictType); | |
| 89 | + } | |
| 90 | + | |
| 91 | + @SneakyThrows | |
| 71 | 92 | public static String parseDictDataValue(String dictType, String label) { |
| 72 | 93 | return PARSE_DICT_DATA_CACHE.get(new KeyValue<>(dictType, label)).getValue(); |
| 73 | 94 | } | ... | ... |
yudao-framework/yudao-spring-boot-starter-excel/src/main/java/cn/iocoder/yudao/framework/excel/core/annotations/ExcelColumnSelect.java
0 → 100644
| 1 | +package cn.iocoder.yudao.framework.excel.core.annotations; | |
| 2 | + | |
| 3 | +import java.lang.annotation.*; | |
| 4 | + | |
| 5 | +/** | |
| 6 | + * 给 Excel 列添加下拉选择数据 | |
| 7 | + * | |
| 8 | + * 其中 {@link #dictType()} 和 {@link #functionName()} 二选一 | |
| 9 | + * | |
| 10 | + * @author HUIHUI | |
| 11 | + */ | |
| 12 | +@Target({ElementType.FIELD}) | |
| 13 | +@Retention(RetentionPolicy.RUNTIME) | |
| 14 | +@Inherited | |
| 15 | +public @interface ExcelColumnSelect { | |
| 16 | + | |
| 17 | + /** | |
| 18 | + * @return 字典类型 | |
| 19 | + */ | |
| 20 | + String dictType() default ""; | |
| 21 | + | |
| 22 | + /** | |
| 23 | + * @return 获取下拉数据源的方法名称 | |
| 24 | + */ | |
| 25 | + String functionName() default ""; | |
| 26 | + | |
| 27 | +} | ... | ... |
yudao-framework/yudao-spring-boot-starter-excel/src/main/java/cn/iocoder/yudao/framework/excel/core/enums/ExcelColumn.java deleted
| 1 | -package cn.iocoder.yudao.framework.excel.core.enums; | |
| 2 | - | |
| 3 | -import lombok.AllArgsConstructor; | |
| 4 | -import lombok.Getter; | |
| 5 | - | |
| 6 | -// TODO @puhui999:列表有办法通过 field name 么?主要考虑一个点,可能导入模版的顺序可能会变 | |
| 7 | -/** | |
| 8 | - * Excel 列名枚举 | |
| 9 | - * 默认枚举 26 列列名如果有需求更多的列名请自行补充 | |
| 10 | - * | |
| 11 | - * @author HUIHUI | |
| 12 | - */ | |
| 13 | -@Getter | |
| 14 | -@AllArgsConstructor | |
| 15 | -public enum ExcelColumn { | |
| 16 | - | |
| 17 | - A(0), B(1), C(2), D(3), E(4), F(5), G(6), H(7), I(8), | |
| 18 | - J(9), K(10), L(11), M(12), N(13), O(14), P(15), Q(16), | |
| 19 | - R(17), S(18), T(19), U(20), V(21), W(22), X(23), Y(24), | |
| 20 | - Z(25); | |
| 21 | - | |
| 22 | - /** | |
| 23 | - * 列索引 | |
| 24 | - */ | |
| 25 | - private final int colNum; | |
| 26 | - | |
| 27 | -} |
yudao-framework/yudao-spring-boot-starter-excel/src/main/java/cn/iocoder/yudao/framework/excel/core/function/ExcelColumnSelectFunction.java
0 → 100644
| 1 | +package cn.iocoder.yudao.framework.excel.core.function; | |
| 2 | + | |
| 3 | +import java.util.List; | |
| 4 | + | |
| 5 | +/** | |
| 6 | + * Excel 列下拉数据源获取接口 | |
| 7 | + * | |
| 8 | + * 为什么不直接解析字典还搞个接口?考虑到有的下拉数据不是从字典中获取的所有需要做一个兼容 | |
| 9 | + | |
| 10 | + * @author HUIHUI | |
| 11 | + */ | |
| 12 | +public interface ExcelColumnSelectFunction { | |
| 13 | + | |
| 14 | + /** | |
| 15 | + * 获得方法名称 | |
| 16 | + * | |
| 17 | + * @return 方法名称 | |
| 18 | + */ | |
| 19 | + String getName(); | |
| 20 | + | |
| 21 | + /** | |
| 22 | + * 获得列下拉数据源 | |
| 23 | + * | |
| 24 | + * @return 下拉数据源 | |
| 25 | + */ | |
| 26 | + List<String> getOptions(); | |
| 27 | + | |
| 28 | +} | ... | ... |
yudao-framework/yudao-spring-boot-starter-excel/src/main/java/cn/iocoder/yudao/framework/excel/core/handler/SelectSheetWriteHandler.java
| ... | ... | @@ -2,25 +2,38 @@ package cn.iocoder.yudao.framework.excel.core.handler; |
| 2 | 2 | |
| 3 | 3 | import cn.hutool.core.collection.CollUtil; |
| 4 | 4 | import cn.hutool.core.lang.Assert; |
| 5 | +import cn.hutool.core.map.MapUtil; | |
| 6 | +import cn.hutool.core.util.ObjectUtil; | |
| 7 | +import cn.hutool.core.util.StrUtil; | |
| 8 | +import cn.hutool.extra.spring.SpringUtil; | |
| 9 | +import cn.hutool.poi.excel.ExcelUtil; | |
| 5 | 10 | import cn.iocoder.yudao.framework.common.core.KeyValue; |
| 6 | -import cn.iocoder.yudao.framework.excel.core.enums.ExcelColumn; | |
| 11 | +import cn.iocoder.yudao.framework.dict.core.DictFrameworkUtils; | |
| 12 | +import cn.iocoder.yudao.framework.excel.core.annotations.ExcelColumnSelect; | |
| 13 | +import cn.iocoder.yudao.framework.excel.core.function.ExcelColumnSelectFunction; | |
| 14 | +import com.alibaba.excel.annotation.ExcelProperty; | |
| 7 | 15 | import com.alibaba.excel.write.handler.SheetWriteHandler; |
| 8 | 16 | import com.alibaba.excel.write.metadata.holder.WriteSheetHolder; |
| 9 | 17 | import com.alibaba.excel.write.metadata.holder.WriteWorkbookHolder; |
| 18 | +import lombok.extern.slf4j.Slf4j; | |
| 10 | 19 | import org.apache.poi.hssf.usermodel.HSSFDataValidation; |
| 11 | 20 | import org.apache.poi.ss.usermodel.*; |
| 12 | 21 | import org.apache.poi.ss.util.CellRangeAddressList; |
| 13 | 22 | |
| 23 | +import java.lang.reflect.Field; | |
| 14 | 24 | import java.util.Comparator; |
| 25 | +import java.util.HashMap; | |
| 15 | 26 | import java.util.List; |
| 16 | 27 | import java.util.Map; |
| 17 | -import java.util.stream.Collectors; | |
| 28 | + | |
| 29 | +import static cn.iocoder.yudao.framework.common.util.collection.CollectionUtils.convertList; | |
| 18 | 30 | |
| 19 | 31 | /** |
| 20 | 32 | * 基于固定 sheet 实现下拉框 |
| 21 | 33 | * |
| 22 | 34 | * @author HUIHUI |
| 23 | 35 | */ |
| 36 | +@Slf4j | |
| 24 | 37 | public class SelectSheetWriteHandler implements SheetWriteHandler { |
| 25 | 38 | |
| 26 | 39 | /** |
| ... | ... | @@ -36,21 +49,56 @@ public class SelectSheetWriteHandler implements SheetWriteHandler { |
| 36 | 49 | |
| 37 | 50 | private static final String DICT_SHEET_NAME = "字典sheet"; |
| 38 | 51 | |
| 39 | - // TODO @puhui999:Map<ExcelColumn, List<String>> 可以么?之前用 keyvalue 的原因,返回给前端,无法用 linkedhashmap,默认 key 会乱序 | |
| 40 | - private final List<KeyValue<ExcelColumn, List<String>>> selectMap; | |
| 52 | + /** | |
| 53 | + * key: 列 value: 下拉数据源 | |
| 54 | + */ | |
| 55 | + private final Map<Integer, List<String>> selectMap = new HashMap<>(); | |
| 41 | 56 | |
| 42 | - public SelectSheetWriteHandler(List<KeyValue<ExcelColumn, List<String>>> selectMap) { | |
| 43 | - if (CollUtil.isEmpty(selectMap)) { | |
| 44 | - this.selectMap = null; | |
| 57 | + public SelectSheetWriteHandler(Class<?> head) { | |
| 58 | + // 加载下拉数据获取接口 | |
| 59 | + Map<String, ExcelColumnSelectFunction> beansMap = SpringUtil.getBeanFactory().getBeansOfType(ExcelColumnSelectFunction.class); | |
| 60 | + if (MapUtil.isEmpty(beansMap)) { | |
| 61 | + return; | |
| 62 | + } | |
| 63 | + | |
| 64 | + // 解析下拉数据 | |
| 65 | + int colIndex = 0; | |
| 66 | + for (Field field : head.getDeclaredFields()) { | |
| 67 | + if (field.isAnnotationPresent(ExcelColumnSelect.class)) { | |
| 68 | + ExcelProperty excelProperty = field.getAnnotation(ExcelProperty.class); | |
| 69 | + if (excelProperty != null && excelProperty.index() != -1) { | |
| 70 | + colIndex = excelProperty.index(); | |
| 71 | + } | |
| 72 | + getSelectDataList(colIndex, field); | |
| 73 | + } | |
| 74 | + colIndex++; | |
| 75 | + } | |
| 76 | + } | |
| 77 | + | |
| 78 | + /** | |
| 79 | + * 获得下拉数据,并添加到 {@link #selectMap} 中 | |
| 80 | + * | |
| 81 | + * @param colIndex 列索引 | |
| 82 | + * @param field 字段 | |
| 83 | + */ | |
| 84 | + private void getSelectDataList(int colIndex, Field field) { | |
| 85 | + ExcelColumnSelect columnSelect = field.getAnnotation(ExcelColumnSelect.class); | |
| 86 | + String dictType = columnSelect.dictType(); | |
| 87 | + String functionName = columnSelect.functionName(); | |
| 88 | + Assert.isTrue(ObjectUtil.isNotEmpty(dictType) || ObjectUtil.isNotEmpty(functionName), | |
| 89 | + "Field({}) 的 @ExcelColumnSelect 注解,dictType 和 functionName 不能同时为空", field.getName()); | |
| 90 | + | |
| 91 | + // 情况一:使用 dictType 获得下拉数据 | |
| 92 | + if (StrUtil.isNotEmpty(dictType)) { // 情况一: 字典数据 (默认) | |
| 93 | + selectMap.put(colIndex, DictFrameworkUtils.getDictDataLabelList(dictType)); | |
| 45 | 94 | return; |
| 46 | 95 | } |
| 47 | - // 校验一下 key 是否唯一 | |
| 48 | - Map<String, Long> nameCounts = selectMap.stream() | |
| 49 | - .collect(Collectors.groupingBy(item -> item.getKey().name(), Collectors.counting())); | |
| 50 | - Assert.isFalse(nameCounts.entrySet().stream().allMatch(entry -> entry.getValue() > 1), "下拉数据 key 重复请排查!!!"); | |
| 51 | 96 | |
| 52 | - selectMap.sort(Comparator.comparing(item -> item.getValue().size())); // 升序不然创建下拉会报错 | |
| 53 | - this.selectMap = selectMap; | |
| 97 | + // 情况二:使用 functionName 获得下拉数据 | |
| 98 | + Map<String, ExcelColumnSelectFunction> functionMap = SpringUtil.getApplicationContext().getBeansOfType(ExcelColumnSelectFunction.class); | |
| 99 | + ExcelColumnSelectFunction function = CollUtil.findOne(functionMap.values(), item -> item.getName().equals(functionName)); | |
| 100 | + Assert.notNull(function, "未找到对应的 function({})", functionName); | |
| 101 | + selectMap.put(colIndex, function.getOptions()); | |
| 54 | 102 | } |
| 55 | 103 | |
| 56 | 104 | @Override |
| ... | ... | @@ -62,18 +110,20 @@ public class SelectSheetWriteHandler implements SheetWriteHandler { |
| 62 | 110 | // 1. 获取相应操作对象 |
| 63 | 111 | DataValidationHelper helper = writeSheetHolder.getSheet().getDataValidationHelper(); // 需要设置下拉框的 sheet 页的数据验证助手 |
| 64 | 112 | Workbook workbook = writeWorkbookHolder.getWorkbook(); // 获得工作簿 |
| 113 | + List<KeyValue<Integer, List<String>>> keyValues = convertList(selectMap.entrySet(), entry -> new KeyValue<>(entry.getKey(), entry.getValue())); | |
| 114 | + keyValues.sort(Comparator.comparing(item -> item.getValue().size())); // 升序不然创建下拉会报错 | |
| 65 | 115 | |
| 66 | 116 | // 2. 创建数据字典的 sheet 页 |
| 67 | 117 | Sheet dictSheet = workbook.createSheet(DICT_SHEET_NAME); |
| 68 | - for (KeyValue<ExcelColumn, List<String>> keyValue : selectMap) { | |
| 118 | + for (KeyValue<Integer, List<String>> keyValue : keyValues) { | |
| 69 | 119 | int rowLength = keyValue.getValue().size(); |
| 70 | - // 2.1 设置字典 sheet 页的值 每一列一个字典项 | |
| 120 | + // 2.1 设置字典 sheet 页的值,每一列一个字典项 | |
| 71 | 121 | for (int i = 0; i < rowLength; i++) { |
| 72 | 122 | Row row = dictSheet.getRow(i); |
| 73 | 123 | if (row == null) { |
| 74 | 124 | row = dictSheet.createRow(i); |
| 75 | 125 | } |
| 76 | - row.createCell(keyValue.getKey().getColNum()).setCellValue(keyValue.getValue().get(i)); | |
| 126 | + row.createCell(keyValue.getKey()).setCellValue(keyValue.getValue().get(i)); | |
| 77 | 127 | } |
| 78 | 128 | // 2.2 设置单元格下拉选择 |
| 79 | 129 | setColumnSelect(writeSheetHolder, workbook, helper, keyValue); |
| ... | ... | @@ -84,10 +134,10 @@ public class SelectSheetWriteHandler implements SheetWriteHandler { |
| 84 | 134 | * 设置单元格下拉选择 |
| 85 | 135 | */ |
| 86 | 136 | private static void setColumnSelect(WriteSheetHolder writeSheetHolder, Workbook workbook, DataValidationHelper helper, |
| 87 | - KeyValue<ExcelColumn, List<String>> keyValue) { | |
| 137 | + KeyValue<Integer, List<String>> keyValue) { | |
| 88 | 138 | // 1.1 创建可被其他单元格引用的名称 |
| 89 | 139 | Name name = workbook.createName(); |
| 90 | - String excelColumn = keyValue.getKey().name(); | |
| 140 | + String excelColumn = ExcelUtil.indexToColName(keyValue.getKey()); | |
| 91 | 141 | // 1.2 下拉框数据来源 eg:字典sheet!$B1:$B2 |
| 92 | 142 | String refers = DICT_SHEET_NAME + "!$" + excelColumn + "$1:$" + excelColumn + "$" + keyValue.getValue().size(); |
| 93 | 143 | name.setNameName("dict" + keyValue.getKey()); // 设置名称的名字 |
| ... | ... | @@ -97,7 +147,7 @@ public class SelectSheetWriteHandler implements SheetWriteHandler { |
| 97 | 147 | DataValidationConstraint constraint = helper.createFormulaListConstraint("dict" + keyValue.getKey()); // 设置引用约束 |
| 98 | 148 | // 设置下拉单元格的首行、末行、首列、末列 |
| 99 | 149 | CellRangeAddressList rangeAddressList = new CellRangeAddressList(FIRST_ROW, LAST_ROW, |
| 100 | - keyValue.getKey().getColNum(), keyValue.getKey().getColNum()); | |
| 150 | + keyValue.getKey(), keyValue.getKey()); | |
| 101 | 151 | DataValidation validation = helper.createValidation(constraint, rangeAddressList); |
| 102 | 152 | if (validation instanceof HSSFDataValidation) { |
| 103 | 153 | validation.setSuppressDropDownArrow(false); | ... | ... |
yudao-framework/yudao-spring-boot-starter-excel/src/main/java/cn/iocoder/yudao/framework/excel/core/util/ExcelUtils.java
| 1 | 1 | package cn.iocoder.yudao.framework.excel.core.util; |
| 2 | 2 | |
| 3 | -import cn.iocoder.yudao.framework.common.core.KeyValue; | |
| 4 | -import cn.iocoder.yudao.framework.excel.core.enums.ExcelColumn; | |
| 5 | 3 | import cn.iocoder.yudao.framework.excel.core.handler.SelectSheetWriteHandler; |
| 6 | 4 | import com.alibaba.excel.EasyExcel; |
| 7 | 5 | import com.alibaba.excel.converters.longconverter.LongStringConverter; |
| ... | ... | @@ -34,27 +32,11 @@ public class ExcelUtils { |
| 34 | 32 | */ |
| 35 | 33 | public static <T> void write(HttpServletResponse response, String filename, String sheetName, |
| 36 | 34 | Class<T> head, List<T> data) throws IOException { |
| 37 | - write(response, filename, sheetName, head, data, null); | |
| 38 | - } | |
| 39 | - | |
| 40 | - /** | |
| 41 | - * 将列表以 Excel 响应给前端 | |
| 42 | - * | |
| 43 | - * @param response 响应 | |
| 44 | - * @param filename 文件名 | |
| 45 | - * @param sheetName Excel sheet 名 | |
| 46 | - * @param head Excel head 头 | |
| 47 | - * @param data 数据列表哦 | |
| 48 | - * @param selectMap 下拉选择数据 Map<下拉所对应的列表名,下拉数据> | |
| 49 | - * @throws IOException 写入失败的情况 | |
| 50 | - */ | |
| 51 | - public static <T> void write(HttpServletResponse response, String filename, String sheetName, | |
| 52 | - Class<T> head, List<T> data, List<KeyValue<ExcelColumn, List<String>>> selectMap) throws IOException { | |
| 53 | 35 | // 输出 Excel |
| 54 | 36 | EasyExcel.write(response.getOutputStream(), head) |
| 55 | 37 | .autoCloseStream(false) // 不要自动关闭,交给 Servlet 自己处理 |
| 56 | 38 | .registerWriteHandler(new LongestMatchColumnWidthStyleStrategy()) // 基于 column 长度,自动适配。最大 255 宽度 |
| 57 | - .registerWriteHandler(new SelectSheetWriteHandler(selectMap)) // 基于固定 sheet 实现下拉框 | |
| 39 | + .registerWriteHandler(new SelectSheetWriteHandler(head)) // 基于固定 sheet 实现下拉框 | |
| 58 | 40 | .registerConverter(new LongStringConverter()) // 避免 Long 类型丢失精度 |
| 59 | 41 | .sheet(sheetName).doWrite(data); |
| 60 | 42 | // 设置 header 和 contentType。写在最后的原因是,避免报错时,响应 contentType 已经被修改了 | ... | ... |
yudao-framework/yudao-spring-boot-starter-mybatis/pom.xml
| ... | ... | @@ -77,6 +77,15 @@ |
| 77 | 77 | <groupId>com.github.yulichang</groupId> |
| 78 | 78 | <artifactId>mybatis-plus-join-boot-starter</artifactId> <!-- MyBatis 联表查询 --> |
| 79 | 79 | </dependency> |
| 80 | + | |
| 81 | + <dependency> | |
| 82 | + <groupId>com.fhs-opensource</groupId> <!-- VO 数据翻译 --> | |
| 83 | + <artifactId>easy-trans-spring-boot-starter</artifactId> | |
| 84 | + </dependency> | |
| 85 | + <dependency> | |
| 86 | + <groupId>com.fhs-opensource</groupId> | |
| 87 | + <artifactId>easy-trans-mybatis-plus-extend</artifactId> | |
| 88 | + </dependency> | |
| 80 | 89 | </dependencies> |
| 81 | 90 | |
| 82 | 91 | </project> | ... | ... |
yudao-framework/yudao-spring-boot-starter-mybatis/src/main/java/cn/iocoder/yudao/framework/mybatis/core/dataobject/BaseDO.java
| ... | ... | @@ -3,6 +3,8 @@ package cn.iocoder.yudao.framework.mybatis.core.dataobject; |
| 3 | 3 | import com.baomidou.mybatisplus.annotation.FieldFill; |
| 4 | 4 | import com.baomidou.mybatisplus.annotation.TableField; |
| 5 | 5 | import com.baomidou.mybatisplus.annotation.TableLogic; |
| 6 | +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; | |
| 7 | +import com.fhs.core.trans.vo.TransPojo; | |
| 6 | 8 | import lombok.Data; |
| 7 | 9 | import org.apache.ibatis.type.JdbcType; |
| 8 | 10 | |
| ... | ... | @@ -12,10 +14,14 @@ import java.time.LocalDateTime; |
| 12 | 14 | /** |
| 13 | 15 | * 基础实体对象 |
| 14 | 16 | * |
| 17 | + * 为什么实现 {@link TransPojo} 接口? | |
| 18 | + * 因为使用 Easy-Trans TransType.SIMPLE 模式,集成 MyBatis Plus 查询 | |
| 19 | + * | |
| 15 | 20 | * @author 芋道源码 |
| 16 | 21 | */ |
| 17 | 22 | @Data |
| 18 | -public abstract class BaseDO implements Serializable { | |
| 23 | +@JsonIgnoreProperties(value = "transMap") // 由于 Easy-Trans 会添加 transMap 属性,避免 Jackson 在 Spring Cache 反序列化报错 | |
| 24 | +public abstract class BaseDO implements Serializable, TransPojo { | |
| 19 | 25 | |
| 20 | 26 | /** |
| 21 | 27 | * 创建时间 | ... | ... |
yudao-framework/yudao-spring-boot-starter-mybatis/src/main/java/cn/iocoder/yudao/framework/package-info.java deleted
| 1 | -package cn.iocoder.yudao.framework; |
yudao-framework/yudao-spring-boot-starter-mybatis/src/main/java/cn/iocoder/yudao/framework/translate/config/YudaoTranslateAutoConfiguration.java
0 → 100644
| 1 | +package cn.iocoder.yudao.framework.translate.config; | |
| 2 | + | |
| 3 | +import cn.iocoder.yudao.framework.translate.core.TranslateUtils; | |
| 4 | +import com.fhs.trans.service.impl.TransService; | |
| 5 | +import org.springframework.boot.autoconfigure.AutoConfiguration; | |
| 6 | +import org.springframework.context.annotation.Bean; | |
| 7 | + | |
| 8 | +@AutoConfiguration | |
| 9 | +public class YudaoTranslateAutoConfiguration { | |
| 10 | + | |
| 11 | + @Bean | |
| 12 | + @SuppressWarnings({"InstantiationOfUtilityClass", "SpringJavaInjectionPointsAutowiringInspection"}) | |
| 13 | + public TranslateUtils translateUtils(TransService transService) { | |
| 14 | + TranslateUtils.init(transService); | |
| 15 | + return new TranslateUtils(); | |
| 16 | + } | |
| 17 | + | |
| 18 | +} | ... | ... |
yudao-framework/yudao-spring-boot-starter-mybatis/src/main/java/cn/iocoder/yudao/framework/translate/core/TranslateUtils.java
0 → 100644
| 1 | +package cn.iocoder.yudao.framework.translate.core; | |
| 2 | + | |
| 3 | +import cn.hutool.core.collection.CollUtil; | |
| 4 | +import com.fhs.core.trans.vo.VO; | |
| 5 | +import com.fhs.trans.service.impl.TransService; | |
| 6 | + | |
| 7 | +import java.util.List; | |
| 8 | + | |
| 9 | +/** | |
| 10 | + * VO 数据翻译 Utils | |
| 11 | + * | |
| 12 | + * @author 芋道源码 | |
| 13 | + */ | |
| 14 | +public class TranslateUtils { | |
| 15 | + | |
| 16 | + private static TransService transService; | |
| 17 | + | |
| 18 | + public static void init(TransService transService) { | |
| 19 | + TranslateUtils.transService = transService; | |
| 20 | + } | |
| 21 | + | |
| 22 | + /** | |
| 23 | + * 数据翻译 | |
| 24 | + * | |
| 25 | + * 使用场景:无法使用 @TransMethodResult 注解的场景,只能通过手动触发翻译 | |
| 26 | + * | |
| 27 | + * @param data 数据 | |
| 28 | + * @return 翻译结果 | |
| 29 | + */ | |
| 30 | + public static <T extends VO> List<T> translate(List<T> data) { | |
| 31 | + if (CollUtil.isNotEmpty((data))) { | |
| 32 | + transService.transBatch(data); | |
| 33 | + } | |
| 34 | + return data; | |
| 35 | + } | |
| 36 | + | |
| 37 | +} | ... | ... |
yudao-framework/yudao-spring-boot-starter-mybatis/src/main/java/cn/iocoder/yudao/framework/translate/package-info.java
0 → 100644
yudao-framework/yudao-spring-boot-starter-mybatis/src/main/resources/META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports
| 1 | 1 | cn.iocoder.yudao.framework.datasource.config.YudaoDataSourceAutoConfiguration |
| 2 | -cn.iocoder.yudao.framework.mybatis.config.YudaoMybatisAutoConfiguration | |
| 3 | 2 | \ No newline at end of file |
| 3 | +cn.iocoder.yudao.framework.mybatis.config.YudaoMybatisAutoConfiguration | |
| 4 | +cn.iocoder.yudao.framework.translate.config.YudaoTranslateAutoConfiguration | |
| 4 | 5 | \ No newline at end of file | ... | ... |
yudao-framework/yudao-spring-boot-starter-redis/src/main/java/cn/iocoder/yudao/framework/redis/core/TimeoutRedisCacheManager.java
| ... | ... | @@ -40,12 +40,15 @@ public class TimeoutRedisCacheManager extends RedisCacheManager { |
| 40 | 40 | // 核心:通过修改 cacheConfig 的过期时间,实现自定义过期时间 |
| 41 | 41 | if (cacheConfig != null) { |
| 42 | 42 | // 移除 # 后面的 : 以及后面的内容,避免影响解析 |
| 43 | - names[1] = StrUtil.subBefore(names[1], StrUtil.COLON, false); | |
| 43 | + String ttlStr = StrUtil.subBefore(names[1], StrUtil.COLON, false); // 获得 ttlStr 时间部分 | |
| 44 | + names[1] = StrUtil.subAfter(names[1], ttlStr, false); // 移除掉 ttlStr 时间部分 | |
| 44 | 45 | // 解析时间 |
| 45 | - Duration duration = parseDuration(names[1]); | |
| 46 | + Duration duration = parseDuration(ttlStr); | |
| 46 | 47 | cacheConfig = cacheConfig.entryTtl(duration); |
| 47 | 48 | } |
| 48 | - return super.createRedisCache(name, cacheConfig); | |
| 49 | + | |
| 50 | + // 创建 RedisCache 对象,需要忽略掉 ttlStr | |
| 51 | + return super.createRedisCache(names[0] + names[1], cacheConfig); | |
| 49 | 52 | } |
| 50 | 53 | |
| 51 | 54 | /** | ... | ... |
yudao-framework/yudao-spring-boot-starter-security/src/main/java/cn/iocoder/yudao/framework/operatelog/config/YudaoOperateLogV2Configuration.java renamed to yudao-framework/yudao-spring-boot-starter-security/src/main/java/cn/iocoder/yudao/framework/operatelog/config/YudaoOperateLogConfiguration.java
| ... | ... | @@ -16,7 +16,7 @@ import org.springframework.context.annotation.Primary; |
| 16 | 16 | @EnableLogRecord(tenant = "") // 貌似用不上 tenant 这玩意给个空好啦 |
| 17 | 17 | @AutoConfiguration |
| 18 | 18 | @Slf4j |
| 19 | -public class YudaoOperateLogV2Configuration { | |
| 19 | +public class YudaoOperateLogConfiguration { | |
| 20 | 20 | |
| 21 | 21 | @Bean |
| 22 | 22 | @Primary | ... | ... |
yudao-framework/yudao-spring-boot-starter-security/src/main/java/cn/iocoder/yudao/framework/operatelog/core/service/LogRecordServiceImpl.java
| ... | ... | @@ -5,7 +5,7 @@ import cn.iocoder.yudao.framework.common.util.servlet.ServletUtils; |
| 5 | 5 | import cn.iocoder.yudao.framework.security.core.LoginUser; |
| 6 | 6 | import cn.iocoder.yudao.framework.security.core.util.SecurityFrameworkUtils; |
| 7 | 7 | import cn.iocoder.yudao.module.system.api.logger.OperateLogApi; |
| 8 | -import cn.iocoder.yudao.module.system.api.logger.dto.OperateLogV2CreateReqDTO; | |
| 8 | +import cn.iocoder.yudao.module.system.api.logger.dto.OperateLogCreateReqDTO; | |
| 9 | 9 | import com.mzt.logapi.beans.LogRecord; |
| 10 | 10 | import com.mzt.logapi.service.ILogRecordService; |
| 11 | 11 | import jakarta.annotation.Resource; |
| ... | ... | @@ -30,7 +30,7 @@ public class LogRecordServiceImpl implements ILogRecordService { |
| 30 | 30 | @Override |
| 31 | 31 | public void record(LogRecord logRecord) { |
| 32 | 32 | // 1. 补全通用字段 |
| 33 | - OperateLogV2CreateReqDTO reqDTO = new OperateLogV2CreateReqDTO(); | |
| 33 | + OperateLogCreateReqDTO reqDTO = new OperateLogCreateReqDTO(); | |
| 34 | 34 | reqDTO.setTraceId(TracerUtils.getTraceId()); |
| 35 | 35 | // 补充用户信息 |
| 36 | 36 | fillUserFields(reqDTO); |
| ... | ... | @@ -40,12 +40,10 @@ public class LogRecordServiceImpl implements ILogRecordService { |
| 40 | 40 | fillRequestFields(reqDTO); |
| 41 | 41 | |
| 42 | 42 | // 2. 异步记录日志 |
| 43 | - operateLogApi.createOperateLogV2(reqDTO); | |
| 44 | - // TODO 测试结束删除或搞个开关 | |
| 45 | - log.info("操作日志 ===> {}", reqDTO); | |
| 43 | + operateLogApi.createOperateLog(reqDTO); | |
| 46 | 44 | } |
| 47 | 45 | |
| 48 | - private static void fillUserFields(OperateLogV2CreateReqDTO reqDTO) { | |
| 46 | + private static void fillUserFields(OperateLogCreateReqDTO reqDTO) { | |
| 49 | 47 | // 使用 SecurityFrameworkUtils。因为要考虑,rpc、mq、job,它其实不是 web; |
| 50 | 48 | LoginUser loginUser = SecurityFrameworkUtils.getLoginUser(); |
| 51 | 49 | if (loginUser == null) { |
| ... | ... | @@ -55,7 +53,7 @@ public class LogRecordServiceImpl implements ILogRecordService { |
| 55 | 53 | reqDTO.setUserType(loginUser.getUserType()); |
| 56 | 54 | } |
| 57 | 55 | |
| 58 | - public static void fillModuleFields(OperateLogV2CreateReqDTO reqDTO, LogRecord logRecord) { | |
| 56 | + public static void fillModuleFields(OperateLogCreateReqDTO reqDTO, LogRecord logRecord) { | |
| 59 | 57 | reqDTO.setType(logRecord.getType()); // 大模块类型,例如:CRM 客户 |
| 60 | 58 | reqDTO.setSubType(logRecord.getSubType());// 操作名称,例如:转移客户 |
| 61 | 59 | reqDTO.setBizId(Long.parseLong(logRecord.getBizNo())); // 业务编号,例如:客户编号 |
| ... | ... | @@ -63,7 +61,7 @@ public class LogRecordServiceImpl implements ILogRecordService { |
| 63 | 61 | reqDTO.setExtra(logRecord.getExtra()); // 拓展字段,有些复杂的业务,需要记录一些字段 ( JSON 格式 ),例如说,记录订单编号,{ orderId: "1"} |
| 64 | 62 | } |
| 65 | 63 | |
| 66 | - private static void fillRequestFields(OperateLogV2CreateReqDTO reqDTO) { | |
| 64 | + private static void fillRequestFields(OperateLogCreateReqDTO reqDTO) { | |
| 67 | 65 | // 获得 Request 对象 |
| 68 | 66 | HttpServletRequest request = ServletUtils.getRequest(); |
| 69 | 67 | if (request == null) { | ... | ... |
yudao-framework/yudao-spring-boot-starter-security/src/main/java/cn/iocoder/yudao/framework/security/core/LoginUser.java
| ... | ... | @@ -17,6 +17,9 @@ import java.util.Map; |
| 17 | 17 | @Data |
| 18 | 18 | public class LoginUser { |
| 19 | 19 | |
| 20 | + public static final String INFO_KEY_NICKNAME = "nickname"; | |
| 21 | + public static final String INFO_KEY_DEPT_ID = "deptId"; | |
| 22 | + | |
| 20 | 23 | /** |
| 21 | 24 | * 用户编号 |
| 22 | 25 | */ |
| ... | ... | @@ -28,6 +31,10 @@ public class LoginUser { |
| 28 | 31 | */ |
| 29 | 32 | private Integer userType; |
| 30 | 33 | /** |
| 34 | + * 额外的用户信息 | |
| 35 | + */ | |
| 36 | + private Map<String, String> info; | |
| 37 | + /** | |
| 31 | 38 | * 租户编号 |
| 32 | 39 | */ |
| 33 | 40 | private Long tenantId; | ... | ... |
yudao-framework/yudao-spring-boot-starter-security/src/main/java/cn/iocoder/yudao/framework/security/core/filter/TokenAuthenticationFilter.java
| ... | ... | @@ -83,6 +83,7 @@ public class TokenAuthenticationFilter extends OncePerRequestFilter { |
| 83 | 83 | } |
| 84 | 84 | // 构建登录用户 |
| 85 | 85 | return new LoginUser().setId(accessToken.getUserId()).setUserType(accessToken.getUserType()) |
| 86 | + .setInfo(accessToken.getUserInfo()) // 额外的用户信息 | |
| 86 | 87 | .setTenantId(accessToken.getTenantId()).setScopes(accessToken.getScopes()); |
| 87 | 88 | } catch (ServiceException serviceException) { |
| 88 | 89 | // 校验 Token 不通过时,考虑到一些接口是无需登录的,所以直接返回 null 即可 | ... | ... |
yudao-framework/yudao-spring-boot-starter-security/src/main/java/cn/iocoder/yudao/framework/security/core/util/SecurityFrameworkUtils.java
| 1 | 1 | package cn.iocoder.yudao.framework.security.core.util; |
| 2 | 2 | |
| 3 | +import cn.hutool.core.map.MapUtil; | |
| 3 | 4 | import cn.hutool.core.util.StrUtil; |
| 4 | 5 | import cn.iocoder.yudao.framework.security.core.LoginUser; |
| 5 | 6 | import cn.iocoder.yudao.framework.web.core.util.WebFrameworkUtils; |
| ... | ... | @@ -90,6 +91,28 @@ public class SecurityFrameworkUtils { |
| 90 | 91 | } |
| 91 | 92 | |
| 92 | 93 | /** |
| 94 | + * 获得当前用户的昵称,从上下文中 | |
| 95 | + * | |
| 96 | + * @return 昵称 | |
| 97 | + */ | |
| 98 | + @Nullable | |
| 99 | + public static String getLoginUserNickname() { | |
| 100 | + LoginUser loginUser = getLoginUser(); | |
| 101 | + return loginUser != null ? MapUtil.getStr(loginUser.getInfo(), LoginUser.INFO_KEY_NICKNAME) : null; | |
| 102 | + } | |
| 103 | + | |
| 104 | + /** | |
| 105 | + * 获得当前用户的部门编号,从上下文中 | |
| 106 | + * | |
| 107 | + * @return 部门编号 | |
| 108 | + */ | |
| 109 | + @Nullable | |
| 110 | + public static Long getLoginUserDeptId() { | |
| 111 | + LoginUser loginUser = getLoginUser(); | |
| 112 | + return loginUser != null ? MapUtil.getLong(loginUser.getInfo(), LoginUser.INFO_KEY_DEPT_ID) : null; | |
| 113 | + } | |
| 114 | + | |
| 115 | + /** | |
| 93 | 116 | * 设置当前用户 |
| 94 | 117 | * |
| 95 | 118 | * @param loginUser 登录用户 | ... | ... |
yudao-framework/yudao-spring-boot-starter-security/src/main/resources/META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports
| 1 | 1 | cn.iocoder.yudao.framework.security.config.YudaoSecurityAutoConfiguration |
| 2 | 2 | cn.iocoder.yudao.framework.security.config.YudaoWebSecurityConfigurerAdapter |
| 3 | -cn.iocoder.yudao.framework.operatelog.config.YudaoOperateLogV2Configuration | |
| 4 | 3 | \ No newline at end of file |
| 4 | +cn.iocoder.yudao.framework.operatelog.config.YudaoOperateLogConfiguration | |
| 5 | 5 | \ No newline at end of file | ... | ... |
yudao-framework/yudao-spring-boot-starter-web/src/main/java/cn/iocoder/yudao/framework/apilog/config/YudaoApiLogAutoConfiguration.java
| 1 | 1 | package cn.iocoder.yudao.framework.apilog.config; |
| 2 | 2 | |
| 3 | 3 | import cn.iocoder.yudao.framework.apilog.core.filter.ApiAccessLogFilter; |
| 4 | +import cn.iocoder.yudao.framework.apilog.core.interceptor.ApiAccessLogInterceptor; | |
| 4 | 5 | import cn.iocoder.yudao.framework.apilog.core.service.ApiAccessLogFrameworkService; |
| 5 | 6 | import cn.iocoder.yudao.framework.apilog.core.service.ApiAccessLogFrameworkServiceImpl; |
| 6 | 7 | import cn.iocoder.yudao.framework.apilog.core.service.ApiErrorLogFrameworkService; |
| ... | ... | @@ -10,23 +11,26 @@ import cn.iocoder.yudao.framework.web.config.WebProperties; |
| 10 | 11 | import cn.iocoder.yudao.framework.web.config.YudaoWebAutoConfiguration; |
| 11 | 12 | import cn.iocoder.yudao.module.infra.api.logger.ApiAccessLogApi; |
| 12 | 13 | import cn.iocoder.yudao.module.infra.api.logger.ApiErrorLogApi; |
| 14 | +import jakarta.servlet.Filter; | |
| 13 | 15 | import org.springframework.beans.factory.annotation.Value; |
| 14 | 16 | import org.springframework.boot.autoconfigure.AutoConfiguration; |
| 15 | 17 | import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty; |
| 16 | 18 | import org.springframework.boot.web.servlet.FilterRegistrationBean; |
| 17 | 19 | import org.springframework.context.annotation.Bean; |
| 18 | - | |
| 19 | -import jakarta.servlet.Filter; | |
| 20 | +import org.springframework.web.servlet.config.annotation.InterceptorRegistry; | |
| 21 | +import org.springframework.web.servlet.config.annotation.WebMvcConfigurer; | |
| 20 | 22 | |
| 21 | 23 | @AutoConfiguration(after = YudaoWebAutoConfiguration.class) |
| 22 | -public class YudaoApiLogAutoConfiguration { | |
| 24 | +public class YudaoApiLogAutoConfiguration implements WebMvcConfigurer { | |
| 23 | 25 | |
| 24 | 26 | @Bean |
| 27 | + @SuppressWarnings("SpringJavaInjectionPointsAutowiringInspection") | |
| 25 | 28 | public ApiAccessLogFrameworkService apiAccessLogFrameworkService(ApiAccessLogApi apiAccessLogApi) { |
| 26 | 29 | return new ApiAccessLogFrameworkServiceImpl(apiAccessLogApi); |
| 27 | 30 | } |
| 28 | 31 | |
| 29 | 32 | @Bean |
| 33 | + @SuppressWarnings("SpringJavaInjectionPointsAutowiringInspection") | |
| 30 | 34 | public ApiErrorLogFrameworkService apiErrorLogFrameworkService(ApiErrorLogApi apiErrorLogApi) { |
| 31 | 35 | return new ApiErrorLogFrameworkServiceImpl(apiErrorLogApi); |
| 32 | 36 | } |
| ... | ... | @@ -49,4 +53,9 @@ public class YudaoApiLogAutoConfiguration { |
| 49 | 53 | return bean; |
| 50 | 54 | } |
| 51 | 55 | |
| 56 | + @Override | |
| 57 | + public void addInterceptors(InterceptorRegistry registry) { | |
| 58 | + registry.addInterceptor(new ApiAccessLogInterceptor()); | |
| 59 | + } | |
| 60 | + | |
| 52 | 61 | } | ... | ... |
yudao-framework/yudao-spring-boot-starter-biz-operatelog/src/main/java/cn/iocoder/yudao/framework/operatelog/core/annotations/OperateLog.java renamed to yudao-framework/yudao-spring-boot-starter-web/src/main/java/cn/iocoder/yudao/framework/apilog/core/annotations/ApiAccessLog.java
| 1 | -package cn.iocoder.yudao.framework.operatelog.core.annotations; | |
| 1 | +package cn.iocoder.yudao.framework.apilog.core.annotations; | |
| 2 | 2 | |
| 3 | -import cn.iocoder.yudao.framework.operatelog.core.enums.OperateTypeEnum; | |
| 4 | -import io.swagger.v3.oas.annotations.Operation; | |
| 5 | -import io.swagger.v3.oas.annotations.tags.Tag; | |
| 3 | +import cn.iocoder.yudao.framework.apilog.core.enums.OperateTypeEnum; | |
| 6 | 4 | |
| 7 | 5 | import java.lang.annotation.ElementType; |
| 8 | 6 | import java.lang.annotation.Retention; |
| ... | ... | @@ -10,48 +8,58 @@ import java.lang.annotation.RetentionPolicy; |
| 10 | 8 | import java.lang.annotation.Target; |
| 11 | 9 | |
| 12 | 10 | /** |
| 13 | - * 操作日志注解 | |
| 11 | + * 访问日志注解 | |
| 14 | 12 | * |
| 15 | 13 | * @author 芋道源码 |
| 16 | 14 | */ |
| 17 | 15 | @Target({ElementType.METHOD}) |
| 18 | 16 | @Retention(RetentionPolicy.RUNTIME) |
| 19 | -public @interface OperateLog { | |
| 17 | +public @interface ApiAccessLog { | |
| 20 | 18 | |
| 21 | - // ========== 模块字段 ========== | |
| 19 | + // ========== 开关字段 ========== | |
| 22 | 20 | |
| 23 | 21 | /** |
| 24 | - * 操作模块 | |
| 22 | + * 是否记录访问日志 | |
| 23 | + */ | |
| 24 | + boolean enable() default true; | |
| 25 | + /** | |
| 26 | + * 是否记录请求参数 | |
| 25 | 27 | * |
| 26 | - * 为空时,会尝试读取 {@link Tag#name()} 属性 | |
| 28 | + * 默认记录,主要考虑请求数据一般不大。可手动设置为 false 进行关闭 | |
| 27 | 29 | */ |
| 28 | - String module() default ""; | |
| 30 | + boolean requestEnable() default true; | |
| 29 | 31 | /** |
| 30 | - * 操作名 | |
| 32 | + * 是否记录响应结果 | |
| 31 | 33 | * |
| 32 | - * 为空时,会尝试读取 {@link Operation#summary()} 属性 | |
| 34 | + * 默认不记录,主要考虑响应数据可能比较大。可手动设置为 true 进行打开 | |
| 33 | 35 | */ |
| 34 | - String name() default ""; | |
| 36 | + boolean responseEnable() default false; | |
| 35 | 37 | /** |
| 36 | - * 操作分类 | |
| 38 | + * 敏感参数数组 | |
| 37 | 39 | * |
| 38 | - * 实际并不是数组,因为枚举不能设置 null 作为默认值 | |
| 40 | + * 添加后,请求参数、响应结果不会记录该参数 | |
| 39 | 41 | */ |
| 40 | - OperateTypeEnum[] type() default {}; | |
| 42 | + String[] sanitizeKeys() default {}; | |
| 41 | 43 | |
| 42 | - // ========== 开关字段 ========== | |
| 44 | + // ========== 模块字段 ========== | |
| 43 | 45 | |
| 44 | 46 | /** |
| 45 | - * 是否记录操作日志 | |
| 47 | + * 操作模块 | |
| 48 | + * | |
| 49 | + * 为空时,会尝试读取 {@link io.swagger.v3.oas.annotations.tags.Tag#name()} 属性 | |
| 46 | 50 | */ |
| 47 | - boolean enable() default true; | |
| 51 | + String operateModule() default ""; | |
| 48 | 52 | /** |
| 49 | - * 是否记录方法参数 | |
| 53 | + * 操作名 | |
| 54 | + * | |
| 55 | + * 为空时,会尝试读取 {@link io.swagger.v3.oas.annotations.Operation#summary()} 属性 | |
| 50 | 56 | */ |
| 51 | - boolean logArgs() default true; | |
| 57 | + String operateName() default ""; | |
| 52 | 58 | /** |
| 53 | - * 是否记录方法结果的数据 | |
| 59 | + * 操作分类 | |
| 60 | + * | |
| 61 | + * 实际并不是数组,因为枚举不能设置 null 作为默认值 | |
| 54 | 62 | */ |
| 55 | - boolean logResultData() default true; | |
| 63 | + OperateTypeEnum[] operateType() default {}; | |
| 56 | 64 | |
| 57 | 65 | } | ... | ... |
yudao-framework/yudao-spring-boot-starter-biz-operatelog/src/main/java/cn/iocoder/yudao/framework/operatelog/core/enums/OperateTypeEnum.java renamed to yudao-framework/yudao-spring-boot-starter-web/src/main/java/cn/iocoder/yudao/framework/apilog/core/enums/OperateTypeEnum.java
| 1 | -package cn.iocoder.yudao.framework.operatelog.core.enums; | |
| 1 | +package cn.iocoder.yudao.framework.apilog.core.enums; | |
| 2 | 2 | |
| 3 | -import cn.iocoder.yudao.framework.operatelog.core.annotations.OperateLog; | |
| 4 | 3 | import lombok.AllArgsConstructor; |
| 5 | 4 | import lombok.Getter; |
| 6 | 5 | |
| ... | ... | @@ -15,9 +14,6 @@ public enum OperateTypeEnum { |
| 15 | 14 | |
| 16 | 15 | /** |
| 17 | 16 | * 查询 |
| 18 | - * | |
| 19 | - * 绝大多数情况下,不会记录查询动作,因为过于大量显得没有意义。 | |
| 20 | - * 在有需要的时候,通过声明 {@link OperateLog} 注解来记录 | |
| 21 | 17 | */ |
| 22 | 18 | GET(1), |
| 23 | 19 | /** | ... | ... |
yudao-framework/yudao-spring-boot-starter-web/src/main/java/cn/iocoder/yudao/framework/apilog/core/filter/ApiAccessLogFilter.java
| 1 | 1 | package cn.iocoder.yudao.framework.apilog.core.filter; |
| 2 | 2 | |
| 3 | +import cn.hutool.core.collection.CollUtil; | |
| 3 | 4 | import cn.hutool.core.date.LocalDateTimeUtil; |
| 4 | 5 | import cn.hutool.core.exceptions.ExceptionUtil; |
| 5 | 6 | import cn.hutool.core.map.MapUtil; |
| 6 | -import cn.iocoder.yudao.framework.apilog.core.service.ApiAccessLog; | |
| 7 | +import cn.hutool.core.util.ArrayUtil; | |
| 8 | +import cn.hutool.core.util.BooleanUtil; | |
| 9 | +import cn.hutool.core.util.StrUtil; | |
| 10 | +import cn.iocoder.yudao.framework.apilog.core.annotations.ApiAccessLog; | |
| 11 | +import cn.iocoder.yudao.framework.apilog.core.enums.OperateTypeEnum; | |
| 7 | 12 | import cn.iocoder.yudao.framework.apilog.core.service.ApiAccessLogFrameworkService; |
| 8 | 13 | import cn.iocoder.yudao.framework.common.exception.enums.GlobalErrorCodeConstants; |
| 9 | 14 | import cn.iocoder.yudao.framework.common.pojo.CommonResult; |
| 15 | +import cn.iocoder.yudao.framework.common.util.json.JsonUtils; | |
| 10 | 16 | import cn.iocoder.yudao.framework.common.util.monitor.TracerUtils; |
| 11 | 17 | import cn.iocoder.yudao.framework.common.util.servlet.ServletUtils; |
| 12 | 18 | import cn.iocoder.yudao.framework.web.config.WebProperties; |
| 13 | 19 | import cn.iocoder.yudao.framework.web.core.filter.ApiRequestFilter; |
| 14 | 20 | import cn.iocoder.yudao.framework.web.core.util.WebFrameworkUtils; |
| 15 | -import lombok.extern.slf4j.Slf4j; | |
| 16 | - | |
| 21 | +import cn.iocoder.yudao.module.infra.api.logger.dto.ApiAccessLogCreateReqDTO; | |
| 22 | +import com.fasterxml.jackson.databind.JsonNode; | |
| 23 | +import io.swagger.v3.oas.annotations.Operation; | |
| 24 | +import io.swagger.v3.oas.annotations.tags.Tag; | |
| 17 | 25 | import jakarta.servlet.FilterChain; |
| 18 | 26 | import jakarta.servlet.ServletException; |
| 19 | 27 | import jakarta.servlet.http.HttpServletRequest; |
| 20 | 28 | import jakarta.servlet.http.HttpServletResponse; |
| 29 | +import lombok.extern.slf4j.Slf4j; | |
| 30 | +import org.springframework.web.bind.annotation.RequestMethod; | |
| 31 | +import org.springframework.web.method.HandlerMethod; | |
| 32 | + | |
| 21 | 33 | import java.io.IOException; |
| 22 | 34 | import java.time.LocalDateTime; |
| 23 | 35 | import java.time.temporal.ChronoUnit; |
| 36 | +import java.util.Iterator; | |
| 24 | 37 | import java.util.Map; |
| 25 | 38 | |
| 39 | +import static cn.iocoder.yudao.framework.apilog.core.interceptor.ApiAccessLogInterceptor.*; | |
| 26 | 40 | import static cn.iocoder.yudao.framework.common.util.json.JsonUtils.toJsonString; |
| 27 | 41 | |
| 28 | 42 | /** |
| 29 | 43 | * API 访问日志 Filter |
| 30 | 44 | * |
| 45 | + * 目的:记录 API 访问日志到数据库中 | |
| 46 | + * | |
| 31 | 47 | * @author 芋道源码 |
| 32 | 48 | */ |
| 33 | 49 | @Slf4j |
| 34 | 50 | public class ApiAccessLogFilter extends ApiRequestFilter { |
| 35 | 51 | |
| 52 | + private static final String[] SANITIZE_KEYS = new String[]{"password", "token", "accessToken", "refreshToken"}; | |
| 53 | + | |
| 36 | 54 | private final String applicationName; |
| 37 | 55 | |
| 38 | 56 | private final ApiAccessLogFrameworkService apiAccessLogFrameworkService; |
| ... | ... | @@ -44,6 +62,7 @@ public class ApiAccessLogFilter extends ApiRequestFilter { |
| 44 | 62 | } |
| 45 | 63 | |
| 46 | 64 | @Override |
| 65 | + @SuppressWarnings("NullableProblems") | |
| 47 | 66 | protected void doFilterInternal(HttpServletRequest request, HttpServletResponse response, FilterChain filterChain) |
| 48 | 67 | throws ServletException, IOException { |
| 49 | 68 | // 获得开始时间 |
| ... | ... | @@ -66,45 +85,166 @@ public class ApiAccessLogFilter extends ApiRequestFilter { |
| 66 | 85 | |
| 67 | 86 | private void createApiAccessLog(HttpServletRequest request, LocalDateTime beginTime, |
| 68 | 87 | Map<String, String> queryString, String requestBody, Exception ex) { |
| 69 | - ApiAccessLog accessLog = new ApiAccessLog(); | |
| 88 | + ApiAccessLogCreateReqDTO accessLog = new ApiAccessLogCreateReqDTO(); | |
| 70 | 89 | try { |
| 71 | - this.buildApiAccessLogDTO(accessLog, request, beginTime, queryString, requestBody, ex); | |
| 90 | + boolean enable = buildApiAccessLog(accessLog, request, beginTime, queryString, requestBody, ex); | |
| 91 | + if (!enable) { | |
| 92 | + return; | |
| 93 | + } | |
| 72 | 94 | apiAccessLogFrameworkService.createApiAccessLog(accessLog); |
| 73 | 95 | } catch (Throwable th) { |
| 74 | 96 | log.error("[createApiAccessLog][url({}) log({}) 发生异常]", request.getRequestURI(), toJsonString(accessLog), th); |
| 75 | 97 | } |
| 76 | 98 | } |
| 77 | 99 | |
| 78 | - private void buildApiAccessLogDTO(ApiAccessLog accessLog, HttpServletRequest request, LocalDateTime beginTime, | |
| 100 | + private boolean buildApiAccessLog(ApiAccessLogCreateReqDTO accessLog, HttpServletRequest request, LocalDateTime beginTime, | |
| 79 | 101 | Map<String, String> queryString, String requestBody, Exception ex) { |
| 102 | + // 判断:是否要记录操作日志 | |
| 103 | + HandlerMethod handlerMethod = (HandlerMethod) request.getAttribute(ATTRIBUTE_HANDLER_METHOD); | |
| 104 | + ApiAccessLog accessLogAnnotation = null; | |
| 105 | + if (handlerMethod != null) { | |
| 106 | + accessLogAnnotation = handlerMethod.getMethodAnnotation(ApiAccessLog.class); | |
| 107 | + if (accessLogAnnotation != null && BooleanUtil.isFalse(accessLogAnnotation.enable())) { | |
| 108 | + return false; | |
| 109 | + } | |
| 110 | + } | |
| 111 | + | |
| 80 | 112 | // 处理用户信息 |
| 81 | - accessLog.setUserId(WebFrameworkUtils.getLoginUserId(request)); | |
| 82 | - accessLog.setUserType(WebFrameworkUtils.getLoginUserType(request)); | |
| 113 | + accessLog.setUserId(WebFrameworkUtils.getLoginUserId(request)) | |
| 114 | + .setUserType(WebFrameworkUtils.getLoginUserType(request)); | |
| 83 | 115 | // 设置访问结果 |
| 84 | 116 | CommonResult<?> result = WebFrameworkUtils.getCommonResult(request); |
| 85 | 117 | if (result != null) { |
| 86 | - accessLog.setResultCode(result.getCode()); | |
| 87 | - accessLog.setResultMsg(result.getMsg()); | |
| 118 | + accessLog.setResultCode(result.getCode()).setResultMsg(result.getMsg()); | |
| 88 | 119 | } else if (ex != null) { |
| 89 | - accessLog.setResultCode(GlobalErrorCodeConstants.INTERNAL_SERVER_ERROR.getCode()); | |
| 90 | - accessLog.setResultMsg(ExceptionUtil.getRootCauseMessage(ex)); | |
| 120 | + accessLog.setResultCode(GlobalErrorCodeConstants.INTERNAL_SERVER_ERROR.getCode()) | |
| 121 | + .setResultMsg(ExceptionUtil.getRootCauseMessage(ex)); | |
| 91 | 122 | } else { |
| 92 | - accessLog.setResultCode(0); | |
| 93 | - accessLog.setResultMsg(""); | |
| 94 | - } | |
| 95 | - // 设置其它字段 | |
| 96 | - accessLog.setTraceId(TracerUtils.getTraceId()); | |
| 97 | - accessLog.setApplicationName(applicationName); | |
| 98 | - accessLog.setRequestUrl(request.getRequestURI()); | |
| 99 | - Map<String, Object> requestParams = MapUtil.<String, Object>builder().put("query", queryString).put("body", requestBody).build(); | |
| 100 | - accessLog.setRequestParams(toJsonString(requestParams)); | |
| 101 | - accessLog.setRequestMethod(request.getMethod()); | |
| 102 | - accessLog.setUserAgent(ServletUtils.getUserAgent(request)); | |
| 103 | - accessLog.setUserIp(ServletUtils.getClientIP(request)); | |
| 123 | + accessLog.setResultCode(GlobalErrorCodeConstants.SUCCESS.getCode()).setResultMsg(""); | |
| 124 | + } | |
| 125 | + // 设置请求字段 | |
| 126 | + accessLog.setTraceId(TracerUtils.getTraceId()).setApplicationName(applicationName) | |
| 127 | + .setRequestUrl(request.getRequestURI()).setRequestMethod(request.getMethod()) | |
| 128 | + .setUserAgent(ServletUtils.getUserAgent(request)).setUserIp(ServletUtils.getClientIP(request)); | |
| 129 | + String[] sanitizeKeys = accessLogAnnotation != null ? accessLogAnnotation.sanitizeKeys() : null; | |
| 130 | + Boolean requestEnable = accessLogAnnotation != null ? accessLogAnnotation.requestEnable() : Boolean.TRUE; | |
| 131 | + if (!BooleanUtil.isFalse(requestEnable)) { // 默认记录,所以判断 !false | |
| 132 | + Map<String, Object> requestParams = MapUtil.<String, Object>builder() | |
| 133 | + .put("query", sanitizeMap(queryString, sanitizeKeys)) | |
| 134 | + .put("body", sanitizeJson(requestBody, sanitizeKeys)).build(); | |
| 135 | + accessLog.setRequestParams(toJsonString(requestParams)); | |
| 136 | + } | |
| 137 | + Boolean responseEnable = accessLogAnnotation != null ? accessLogAnnotation.responseEnable() : Boolean.FALSE; | |
| 138 | + if (BooleanUtil.isTrue(responseEnable)) { // 默认不记录,默认强制要求 true | |
| 139 | + accessLog.setResponseBody(sanitizeJson(result, sanitizeKeys)); | |
| 140 | + } | |
| 104 | 141 | // 持续时间 |
| 105 | - accessLog.setBeginTime(beginTime); | |
| 106 | - accessLog.setEndTime(LocalDateTime.now()); | |
| 107 | - accessLog.setDuration((int) LocalDateTimeUtil.between(accessLog.getBeginTime(), accessLog.getEndTime(), ChronoUnit.MILLIS)); | |
| 142 | + accessLog.setBeginTime(beginTime).setEndTime(LocalDateTime.now()) | |
| 143 | + .setDuration((int) LocalDateTimeUtil.between(accessLog.getBeginTime(), accessLog.getEndTime(), ChronoUnit.MILLIS)); | |
| 144 | + | |
| 145 | + // 操作模块 | |
| 146 | + if (handlerMethod != null) { | |
| 147 | + Tag tagAnnotation = handlerMethod.getBeanType().getAnnotation(Tag.class); | |
| 148 | + Operation operationAnnotation = handlerMethod.getMethodAnnotation(Operation.class); | |
| 149 | + String operateModule = accessLogAnnotation != null ? accessLogAnnotation.operateModule() : | |
| 150 | + tagAnnotation != null ? StrUtil.nullToDefault(tagAnnotation.name(), tagAnnotation.description()) : null; | |
| 151 | + String operateName = accessLogAnnotation != null ? accessLogAnnotation.operateName() : | |
| 152 | + operationAnnotation != null ? operationAnnotation.summary() : null; | |
| 153 | + OperateTypeEnum operateType = accessLogAnnotation != null && accessLogAnnotation.operateType().length > 0 ? | |
| 154 | + accessLogAnnotation.operateType()[0] : parseOperateLogType(request); | |
| 155 | + accessLog.setOperateModule(operateModule).setOperateName(operateName).setOperateType(operateType.getType()); | |
| 156 | + } | |
| 157 | + return true; | |
| 158 | + } | |
| 159 | + | |
| 160 | + // ========== 解析 @ApiAccessLog、@Swagger 注解 ========== | |
| 161 | + | |
| 162 | + private static OperateTypeEnum parseOperateLogType(HttpServletRequest request) { | |
| 163 | + RequestMethod requestMethod = RequestMethod.resolve(request.getMethod()); | |
| 164 | + if (requestMethod == null) { | |
| 165 | + return OperateTypeEnum.OTHER; | |
| 166 | + } | |
| 167 | + switch (requestMethod) { | |
| 168 | + case GET: | |
| 169 | + return OperateTypeEnum.GET; | |
| 170 | + case POST: | |
| 171 | + return OperateTypeEnum.CREATE; | |
| 172 | + case PUT: | |
| 173 | + return OperateTypeEnum.UPDATE; | |
| 174 | + case DELETE: | |
| 175 | + return OperateTypeEnum.DELETE; | |
| 176 | + default: | |
| 177 | + return OperateTypeEnum.OTHER; | |
| 178 | + } | |
| 179 | + } | |
| 180 | + | |
| 181 | + // ========== 请求和响应的脱敏逻辑,移除类似 password、token 等敏感字段 ========== | |
| 182 | + | |
| 183 | + private static String sanitizeMap(Map<String, ?> map, String[] sanitizeKeys) { | |
| 184 | + if (CollUtil.isNotEmpty(map)) { | |
| 185 | + return null; | |
| 186 | + } | |
| 187 | + if (sanitizeKeys != null) { | |
| 188 | + MapUtil.removeAny(map, sanitizeKeys); | |
| 189 | + } | |
| 190 | + MapUtil.removeAny(map, SANITIZE_KEYS); | |
| 191 | + return JsonUtils.toJsonString(map); | |
| 192 | + } | |
| 193 | + | |
| 194 | + private static String sanitizeJson(String jsonString, String[] sanitizeKeys) { | |
| 195 | + if (StrUtil.isEmpty(jsonString)) { | |
| 196 | + return null; | |
| 197 | + } | |
| 198 | + try { | |
| 199 | + JsonNode rootNode = JsonUtils.parseTree(jsonString); | |
| 200 | + sanitizeJson(rootNode, sanitizeKeys); | |
| 201 | + return JsonUtils.toJsonString(rootNode); | |
| 202 | + } catch (Exception e) { | |
| 203 | + // 脱敏失败的情况下,直接忽略异常,避免影响用户请求 | |
| 204 | + log.error("[sanitizeJson][脱敏({}) 发生异常]", jsonString, e); | |
| 205 | + return jsonString; | |
| 206 | + } | |
| 207 | + } | |
| 208 | + | |
| 209 | + private static String sanitizeJson(CommonResult<?> commonResult, String[] sanitizeKeys) { | |
| 210 | + if (commonResult == null) { | |
| 211 | + return null; | |
| 212 | + } | |
| 213 | + String jsonString = toJsonString(commonResult); | |
| 214 | + try { | |
| 215 | + JsonNode rootNode = JsonUtils.parseTree(jsonString); | |
| 216 | + sanitizeJson(rootNode.get("data"), sanitizeKeys); // 只处理 data 字段,不处理 code、msg 字段,避免错误被脱敏掉 | |
| 217 | + return JsonUtils.toJsonString(rootNode); | |
| 218 | + } catch (Exception e) { | |
| 219 | + // 脱敏失败的情况下,直接忽略异常,避免影响用户请求 | |
| 220 | + log.error("[sanitizeJson][脱敏({}) 发生异常]", jsonString, e); | |
| 221 | + return jsonString; | |
| 222 | + } | |
| 223 | + } | |
| 224 | + | |
| 225 | + private static void sanitizeJson(JsonNode node, String[] sanitizeKeys) { | |
| 226 | + // 情况一:数组,遍历处理 | |
| 227 | + if (node.isArray()) { | |
| 228 | + for (JsonNode childNode : node) { | |
| 229 | + sanitizeJson(childNode, sanitizeKeys); | |
| 230 | + } | |
| 231 | + return; | |
| 232 | + } | |
| 233 | + // 情况二:非 Object,只是某个值,直接返回 | |
| 234 | + if (!node.isObject()) { | |
| 235 | + return; | |
| 236 | + } | |
| 237 | + // 情况三:Object,遍历处理 | |
| 238 | + Iterator<Map.Entry<String, JsonNode>> iterator = node.properties().iterator(); | |
| 239 | + while (iterator.hasNext()) { | |
| 240 | + Map.Entry<String, JsonNode> entry = iterator.next(); | |
| 241 | + if (ArrayUtil.contains(sanitizeKeys, entry.getKey()) | |
| 242 | + || ArrayUtil.contains(SANITIZE_KEYS, entry.getKey())) { | |
| 243 | + iterator.remove(); | |
| 244 | + continue; | |
| 245 | + } | |
| 246 | + sanitizeJson(entry.getValue(), sanitizeKeys); | |
| 247 | + } | |
| 108 | 248 | } |
| 109 | 249 | |
| 110 | 250 | } | ... | ... |
yudao-framework/yudao-spring-boot-starter-web/src/main/java/cn/iocoder/yudao/framework/apilog/core/interceptor/ApiAccessLogInterceptor.java
0 → 100644
| 1 | +package cn.iocoder.yudao.framework.apilog.core.interceptor; | |
| 2 | + | |
| 3 | +import cn.hutool.core.collection.CollUtil; | |
| 4 | +import cn.hutool.core.util.StrUtil; | |
| 5 | +import cn.iocoder.yudao.framework.common.util.servlet.ServletUtils; | |
| 6 | +import cn.iocoder.yudao.framework.common.util.spring.SpringUtils; | |
| 7 | +import jakarta.servlet.http.HttpServletRequest; | |
| 8 | +import jakarta.servlet.http.HttpServletResponse; | |
| 9 | +import lombok.extern.slf4j.Slf4j; | |
| 10 | +import org.springframework.util.StopWatch; | |
| 11 | +import org.springframework.web.method.HandlerMethod; | |
| 12 | +import org.springframework.web.servlet.HandlerInterceptor; | |
| 13 | + | |
| 14 | +import java.util.Map; | |
| 15 | + | |
| 16 | +/** | |
| 17 | + * API 访问日志 Interceptor | |
| 18 | + * | |
| 19 | + * 目的:在非 prod 环境时,打印 request 和 response 两条日志到日志文件(控制台)中。 | |
| 20 | + * | |
| 21 | + * @author 芋道源码 | |
| 22 | + */ | |
| 23 | +@Slf4j | |
| 24 | +public class ApiAccessLogInterceptor implements HandlerInterceptor { | |
| 25 | + | |
| 26 | + public static final String ATTRIBUTE_HANDLER_METHOD = "HANDLER_METHOD"; | |
| 27 | + | |
| 28 | + private static final String ATTRIBUTE_STOP_WATCH = "ApiAccessLogInterceptor.StopWatch"; | |
| 29 | + | |
| 30 | + @Override | |
| 31 | + public boolean preHandle(HttpServletRequest request, HttpServletResponse response, Object handler) { | |
| 32 | + // 记录 HandlerMethod,提供给 ApiAccessLogFilter 使用 | |
| 33 | + HandlerMethod handlerMethod = handler instanceof HandlerMethod ? (HandlerMethod) handler : null; | |
| 34 | + if (handlerMethod != null) { | |
| 35 | + request.setAttribute(ATTRIBUTE_HANDLER_METHOD, handlerMethod); | |
| 36 | + } | |
| 37 | + | |
| 38 | + // 打印 request 日志 | |
| 39 | + if (!SpringUtils.isProd()) { | |
| 40 | + Map<String, String> queryString = ServletUtils.getParamMap(request); | |
| 41 | + String requestBody = ServletUtils.isJsonRequest(request) ? ServletUtils.getBody(request) : null; | |
| 42 | + if (CollUtil.isEmpty(queryString) && StrUtil.isEmpty(requestBody)) { | |
| 43 | + log.info("[preHandle][开始请求 URL({}) 无参数]", request.getRequestURI()); | |
| 44 | + } else { | |
| 45 | + log.info("[preHandle][开始请求 URL({}) 参数({})]", request.getRequestURI(), | |
| 46 | + StrUtil.nullToDefault(requestBody, queryString.toString())); | |
| 47 | + } | |
| 48 | + // 计时 | |
| 49 | + StopWatch stopWatch = new StopWatch(); | |
| 50 | + stopWatch.start(); | |
| 51 | + request.setAttribute(ATTRIBUTE_STOP_WATCH, stopWatch); | |
| 52 | + } | |
| 53 | + return true; | |
| 54 | + } | |
| 55 | + | |
| 56 | + @Override | |
| 57 | + public void afterCompletion(HttpServletRequest request, HttpServletResponse response, Object handler, Exception ex) { | |
| 58 | + // 打印 response 日志 | |
| 59 | + if (!SpringUtils.isProd()) { | |
| 60 | + StopWatch stopWatch = (StopWatch) request.getAttribute(ATTRIBUTE_STOP_WATCH); | |
| 61 | + stopWatch.stop(); | |
| 62 | + log.info("[afterCompletion][完成请求 URL({}) 耗时({} ms)]", | |
| 63 | + request.getRequestURI(), stopWatch.getTotalTimeMillis()); | |
| 64 | + } | |
| 65 | + } | |
| 66 | + | |
| 67 | +} | ... | ... |
yudao-framework/yudao-spring-boot-starter-web/src/main/java/cn/iocoder/yudao/framework/apilog/core/service/ApiAccessLog.java deleted
| 1 | -package cn.iocoder.yudao.framework.apilog.core.service; | |
| 2 | - | |
| 3 | -import lombok.Data; | |
| 4 | - | |
| 5 | -import jakarta.validation.constraints.NotNull; | |
| 6 | -import java.time.LocalDateTime; | |
| 7 | - | |
| 8 | -/** | |
| 9 | - * API 访问日志 | |
| 10 | - * | |
| 11 | - * @author 芋道源码 | |
| 12 | - */ | |
| 13 | -@Data | |
| 14 | -public class ApiAccessLog { | |
| 15 | - | |
| 16 | - /** | |
| 17 | - * 链路追踪编号 | |
| 18 | - */ | |
| 19 | - private String traceId; | |
| 20 | - /** | |
| 21 | - * 用户编号 | |
| 22 | - */ | |
| 23 | - private Long userId; | |
| 24 | - /** | |
| 25 | - * 用户类型 | |
| 26 | - */ | |
| 27 | - private Integer userType; | |
| 28 | - /** | |
| 29 | - * 应用名 | |
| 30 | - */ | |
| 31 | - @NotNull(message = "应用名不能为空") | |
| 32 | - private String applicationName; | |
| 33 | - | |
| 34 | - /** | |
| 35 | - * 请求方法名 | |
| 36 | - */ | |
| 37 | - @NotNull(message = "http 请求方法不能为空") | |
| 38 | - private String requestMethod; | |
| 39 | - /** | |
| 40 | - * 访问地址 | |
| 41 | - */ | |
| 42 | - @NotNull(message = "访问地址不能为空") | |
| 43 | - private String requestUrl; | |
| 44 | - /** | |
| 45 | - * 请求参数 | |
| 46 | - */ | |
| 47 | - @NotNull(message = "请求参数不能为空") | |
| 48 | - private String requestParams; | |
| 49 | - /** | |
| 50 | - * 用户 IP | |
| 51 | - */ | |
| 52 | - @NotNull(message = "ip 不能为空") | |
| 53 | - private String userIp; | |
| 54 | - /** | |
| 55 | - * 浏览器 UA | |
| 56 | - */ | |
| 57 | - @NotNull(message = "User-Agent 不能为空") | |
| 58 | - private String userAgent; | |
| 59 | - | |
| 60 | - /** | |
| 61 | - * 开始请求时间 | |
| 62 | - */ | |
| 63 | - @NotNull(message = "开始请求时间不能为空") | |
| 64 | - private LocalDateTime beginTime; | |
| 65 | - /** | |
| 66 | - * 结束请求时间 | |
| 67 | - */ | |
| 68 | - @NotNull(message = "结束请求时间不能为空") | |
| 69 | - private LocalDateTime endTime; | |
| 70 | - /** | |
| 71 | - * 执行时长,单位:毫秒 | |
| 72 | - */ | |
| 73 | - @NotNull(message = "执行时长不能为空") | |
| 74 | - private Integer duration; | |
| 75 | - /** | |
| 76 | - * 结果码 | |
| 77 | - */ | |
| 78 | - @NotNull(message = "错误码不能为空") | |
| 79 | - private Integer resultCode; | |
| 80 | - /** | |
| 81 | - * 结果提示 | |
| 82 | - */ | |
| 83 | - private String resultMsg; | |
| 84 | - | |
| 85 | -} |
yudao-framework/yudao-spring-boot-starter-web/src/main/java/cn/iocoder/yudao/framework/apilog/core/service/ApiAccessLogFrameworkService.java
| 1 | 1 | package cn.iocoder.yudao.framework.apilog.core.service; |
| 2 | 2 | |
| 3 | +import cn.iocoder.yudao.module.infra.api.logger.dto.ApiAccessLogCreateReqDTO; | |
| 4 | + | |
| 3 | 5 | /** |
| 4 | 6 | * API 访问日志 Framework Service 接口 |
| 5 | 7 | * |
| ... | ... | @@ -10,7 +12,8 @@ public interface ApiAccessLogFrameworkService { |
| 10 | 12 | /** |
| 11 | 13 | * 创建 API 访问日志 |
| 12 | 14 | * |
| 13 | - * @param apiAccessLog API 访问日志 | |
| 15 | + * @param reqDTO API 访问日志 | |
| 14 | 16 | */ |
| 15 | - void createApiAccessLog(ApiAccessLog apiAccessLog); | |
| 17 | + void createApiAccessLog(ApiAccessLogCreateReqDTO reqDTO); | |
| 18 | + | |
| 16 | 19 | } | ... | ... |
yudao-framework/yudao-spring-boot-starter-web/src/main/java/cn/iocoder/yudao/framework/apilog/core/service/ApiAccessLogFrameworkServiceImpl.java
| 1 | 1 | package cn.iocoder.yudao.framework.apilog.core.service; |
| 2 | 2 | |
| 3 | -import cn.hutool.core.bean.BeanUtil; | |
| 4 | 3 | import cn.iocoder.yudao.module.infra.api.logger.ApiAccessLogApi; |
| 5 | 4 | import cn.iocoder.yudao.module.infra.api.logger.dto.ApiAccessLogCreateReqDTO; |
| 6 | 5 | import lombok.RequiredArgsConstructor; |
| ... | ... | @@ -20,8 +19,7 @@ public class ApiAccessLogFrameworkServiceImpl implements ApiAccessLogFrameworkSe |
| 20 | 19 | |
| 21 | 20 | @Override |
| 22 | 21 | @Async |
| 23 | - public void createApiAccessLog(ApiAccessLog apiAccessLog) { | |
| 24 | - ApiAccessLogCreateReqDTO reqDTO = BeanUtil.copyProperties(apiAccessLog, ApiAccessLogCreateReqDTO.class); | |
| 22 | + public void createApiAccessLog(ApiAccessLogCreateReqDTO reqDTO) { | |
| 25 | 23 | apiAccessLogApi.createApiAccessLog(reqDTO); |
| 26 | 24 | } |
| 27 | 25 | ... | ... |
yudao-framework/yudao-spring-boot-starter-web/src/main/java/cn/iocoder/yudao/framework/apilog/core/service/ApiErrorLog.java deleted
| 1 | -package cn.iocoder.yudao.framework.apilog.core.service; | |
| 2 | - | |
| 3 | -import lombok.Data; | |
| 4 | - | |
| 5 | -import jakarta.validation.constraints.NotNull; | |
| 6 | -import java.time.LocalDateTime; | |
| 7 | - | |
| 8 | -/** | |
| 9 | - * API 错误日志 | |
| 10 | - * | |
| 11 | - * @author 芋道源码 | |
| 12 | - */ | |
| 13 | -@Data | |
| 14 | -public class ApiErrorLog { | |
| 15 | - | |
| 16 | - /** | |
| 17 | - * 链路编号 | |
| 18 | - */ | |
| 19 | - private String traceId; | |
| 20 | - /** | |
| 21 | - * 账号编号 | |
| 22 | - */ | |
| 23 | - private Long userId; | |
| 24 | - /** | |
| 25 | - * 用户类型 | |
| 26 | - */ | |
| 27 | - private Integer userType; | |
| 28 | - /** | |
| 29 | - * 应用名 | |
| 30 | - */ | |
| 31 | - @NotNull(message = "应用名不能为空") | |
| 32 | - private String applicationName; | |
| 33 | - | |
| 34 | - /** | |
| 35 | - * 请求方法名 | |
| 36 | - */ | |
| 37 | - @NotNull(message = "http 请求方法不能为空") | |
| 38 | - private String requestMethod; | |
| 39 | - /** | |
| 40 | - * 访问地址 | |
| 41 | - */ | |
| 42 | - @NotNull(message = "访问地址不能为空") | |
| 43 | - private String requestUrl; | |
| 44 | - /** | |
| 45 | - * 请求参数 | |
| 46 | - */ | |
| 47 | - @NotNull(message = "请求参数不能为空") | |
| 48 | - private String requestParams; | |
| 49 | - /** | |
| 50 | - * 用户 IP | |
| 51 | - */ | |
| 52 | - @NotNull(message = "ip 不能为空") | |
| 53 | - private String userIp; | |
| 54 | - /** | |
| 55 | - * 浏览器 UA | |
| 56 | - */ | |
| 57 | - @NotNull(message = "User-Agent 不能为空") | |
| 58 | - private String userAgent; | |
| 59 | - | |
| 60 | - /** | |
| 61 | - * 异常时间 | |
| 62 | - */ | |
| 63 | - @NotNull(message = "异常时间不能为空") | |
| 64 | - private LocalDateTime exceptionTime; | |
| 65 | - /** | |
| 66 | - * 异常名 | |
| 67 | - */ | |
| 68 | - @NotNull(message = "异常名不能为空") | |
| 69 | - private String exceptionName; | |
| 70 | - /** | |
| 71 | - * 异常发生的类全名 | |
| 72 | - */ | |
| 73 | - @NotNull(message = "异常发生的类全名不能为空") | |
| 74 | - private String exceptionClassName; | |
| 75 | - /** | |
| 76 | - * 异常发生的类文件 | |
| 77 | - */ | |
| 78 | - @NotNull(message = "异常发生的类文件不能为空") | |
| 79 | - private String exceptionFileName; | |
| 80 | - /** | |
| 81 | - * 异常发生的方法名 | |
| 82 | - */ | |
| 83 | - @NotNull(message = "异常发生的方法名不能为空") | |
| 84 | - private String exceptionMethodName; | |
| 85 | - /** | |
| 86 | - * 异常发生的方法所在行 | |
| 87 | - */ | |
| 88 | - @NotNull(message = "异常发生的方法所在行不能为空") | |
| 89 | - private Integer exceptionLineNumber; | |
| 90 | - /** | |
| 91 | - * 异常的栈轨迹异常的栈轨迹 | |
| 92 | - */ | |
| 93 | - @NotNull(message = "异常的栈轨迹不能为空") | |
| 94 | - private String exceptionStackTrace; | |
| 95 | - /** | |
| 96 | - * 异常导致的根消息 | |
| 97 | - */ | |
| 98 | - @NotNull(message = "异常导致的根消息不能为空") | |
| 99 | - private String exceptionRootCauseMessage; | |
| 100 | - /** | |
| 101 | - * 异常导致的消息 | |
| 102 | - */ | |
| 103 | - @NotNull(message = "异常导致的消息不能为空") | |
| 104 | - private String exceptionMessage; | |
| 105 | - | |
| 106 | - | |
| 107 | -} |
yudao-framework/yudao-spring-boot-starter-web/src/main/java/cn/iocoder/yudao/framework/apilog/core/service/ApiErrorLogFrameworkService.java
| 1 | 1 | package cn.iocoder.yudao.framework.apilog.core.service; |
| 2 | 2 | |
| 3 | +import cn.iocoder.yudao.module.infra.api.logger.dto.ApiErrorLogCreateReqDTO; | |
| 4 | + | |
| 3 | 5 | /** |
| 4 | 6 | * API 错误日志 Framework Service 接口 |
| 5 | 7 | * |
| ... | ... | @@ -10,7 +12,8 @@ public interface ApiErrorLogFrameworkService { |
| 10 | 12 | /** |
| 11 | 13 | * 创建 API 错误日志 |
| 12 | 14 | * |
| 13 | - * @param apiErrorLog API 错误日志 | |
| 15 | + * @param reqDTO API 错误日志 | |
| 14 | 16 | */ |
| 15 | - void createApiErrorLog(ApiErrorLog apiErrorLog); | |
| 17 | + void createApiErrorLog(ApiErrorLogCreateReqDTO reqDTO); | |
| 18 | + | |
| 16 | 19 | } | ... | ... |
yudao-framework/yudao-spring-boot-starter-web/src/main/java/cn/iocoder/yudao/framework/apilog/core/service/ApiErrorLogFrameworkServiceImpl.java
| 1 | 1 | package cn.iocoder.yudao.framework.apilog.core.service; |
| 2 | 2 | |
| 3 | -import cn.hutool.core.bean.BeanUtil; | |
| 4 | 3 | import cn.iocoder.yudao.module.infra.api.logger.ApiErrorLogApi; |
| 5 | 4 | import cn.iocoder.yudao.module.infra.api.logger.dto.ApiErrorLogCreateReqDTO; |
| 6 | 5 | import lombok.RequiredArgsConstructor; |
| ... | ... | @@ -20,8 +19,7 @@ public class ApiErrorLogFrameworkServiceImpl implements ApiErrorLogFrameworkServ |
| 20 | 19 | |
| 21 | 20 | @Override |
| 22 | 21 | @Async |
| 23 | - public void createApiErrorLog(ApiErrorLog apiErrorLog) { | |
| 24 | - ApiErrorLogCreateReqDTO reqDTO = BeanUtil.copyProperties(apiErrorLog, ApiErrorLogCreateReqDTO.class); | |
| 22 | + public void createApiErrorLog(ApiErrorLogCreateReqDTO reqDTO) { | |
| 25 | 23 | apiErrorLogApi.createApiErrorLog(reqDTO); |
| 26 | 24 | } |
| 27 | 25 | ... | ... |
yudao-framework/yudao-spring-boot-starter-web/src/main/java/cn/iocoder/yudao/framework/web/core/handler/GlobalExceptionHandler.java
| ... | ... | @@ -3,7 +3,6 @@ package cn.iocoder.yudao.framework.web.core.handler; |
| 3 | 3 | import cn.hutool.core.exceptions.ExceptionUtil; |
| 4 | 4 | import cn.hutool.core.map.MapUtil; |
| 5 | 5 | import cn.hutool.core.util.StrUtil; |
| 6 | -import cn.iocoder.yudao.framework.apilog.core.service.ApiErrorLog; | |
| 7 | 6 | import cn.iocoder.yudao.framework.apilog.core.service.ApiErrorLogFrameworkService; |
| 8 | 7 | import cn.iocoder.yudao.framework.common.exception.ServiceException; |
| 9 | 8 | import cn.iocoder.yudao.framework.common.pojo.CommonResult; |
| ... | ... | @@ -11,6 +10,7 @@ import cn.iocoder.yudao.framework.common.util.json.JsonUtils; |
| 11 | 10 | import cn.iocoder.yudao.framework.common.util.monitor.TracerUtils; |
| 12 | 11 | import cn.iocoder.yudao.framework.common.util.servlet.ServletUtils; |
| 13 | 12 | import cn.iocoder.yudao.framework.web.core.util.WebFrameworkUtils; |
| 13 | +import cn.iocoder.yudao.module.infra.api.logger.dto.ApiErrorLogCreateReqDTO; | |
| 14 | 14 | import lombok.AllArgsConstructor; |
| 15 | 15 | import lombok.extern.slf4j.Slf4j; |
| 16 | 16 | import org.apache.commons.lang3.exception.ExceptionUtils; |
| ... | ... | @@ -46,6 +46,7 @@ import static cn.iocoder.yudao.framework.common.exception.enums.GlobalErrorCodeC |
| 46 | 46 | @Slf4j |
| 47 | 47 | public class GlobalExceptionHandler { |
| 48 | 48 | |
| 49 | + @SuppressWarnings("SpringJavaInjectionPointsAutowiringInspection") | |
| 49 | 50 | private final String applicationName; |
| 50 | 51 | |
| 51 | 52 | private final ApiErrorLogFrameworkService apiErrorLogFrameworkService; |
| ... | ... | @@ -237,10 +238,10 @@ public class GlobalExceptionHandler { |
| 237 | 238 | |
| 238 | 239 | private void createExceptionLog(HttpServletRequest req, Throwable e) { |
| 239 | 240 | // 插入错误日志 |
| 240 | - ApiErrorLog errorLog = new ApiErrorLog(); | |
| 241 | + ApiErrorLogCreateReqDTO errorLog = new ApiErrorLogCreateReqDTO(); | |
| 241 | 242 | try { |
| 242 | 243 | // 初始化 errorLog |
| 243 | - initExceptionLog(errorLog, req, e); | |
| 244 | + buildExceptionLog(errorLog, req, e); | |
| 244 | 245 | // 执行插入 errorLog |
| 245 | 246 | apiErrorLogFrameworkService.createApiErrorLog(errorLog); |
| 246 | 247 | } catch (Throwable th) { |
| ... | ... | @@ -248,7 +249,7 @@ public class GlobalExceptionHandler { |
| 248 | 249 | } |
| 249 | 250 | } |
| 250 | 251 | |
| 251 | - private void initExceptionLog(ApiErrorLog errorLog, HttpServletRequest request, Throwable e) { | |
| 252 | + private void buildExceptionLog(ApiErrorLogCreateReqDTO errorLog, HttpServletRequest request, Throwable e) { | |
| 252 | 253 | // 处理用户信息 |
| 253 | 254 | errorLog.setUserId(WebFrameworkUtils.getLoginUserId(request)); |
| 254 | 255 | errorLog.setUserType(WebFrameworkUtils.getLoginUserType(request)); | ... | ... |
yudao-framework/yudao-spring-boot-starter-web/src/main/java/cn/iocoder/yudao/framework/xss/config/YudaoXssAutoConfiguration.java
| ... | ... | @@ -44,9 +44,11 @@ public class YudaoXssAutoConfiguration implements WebMvcConfigurer { |
| 44 | 44 | @ConditionalOnMissingBean(name = "xssJacksonCustomizer") |
| 45 | 45 | @ConditionalOnBean(ObjectMapper.class) |
| 46 | 46 | @ConditionalOnProperty(value = "yudao.xss.enable", havingValue = "true") |
| 47 | - public Jackson2ObjectMapperBuilderCustomizer xssJacksonCustomizer(XssCleaner xssCleaner) { | |
| 47 | + public Jackson2ObjectMapperBuilderCustomizer xssJacksonCustomizer(XssProperties properties, | |
| 48 | + PathMatcher pathMatcher, | |
| 49 | + XssCleaner xssCleaner) { | |
| 48 | 50 | // 在反序列化时进行 xss 过滤,可以替换使用 XssStringJsonSerializer,在序列化时进行处理 |
| 49 | - return builder -> builder.deserializerByType(String.class, new XssStringJsonDeserializer(xssCleaner)); | |
| 51 | + return builder -> builder.deserializerByType(String.class, new XssStringJsonDeserializer(properties, pathMatcher, xssCleaner)); | |
| 50 | 52 | } |
| 51 | 53 | |
| 52 | 54 | /** | ... | ... |
yudao-framework/yudao-spring-boot-starter-web/src/main/java/cn/iocoder/yudao/framework/xss/core/json/XssStringJsonDeserializer.java
| 1 | 1 | package cn.iocoder.yudao.framework.xss.core.json; |
| 2 | 2 | |
| 3 | +import cn.iocoder.yudao.framework.common.util.servlet.ServletUtils; | |
| 4 | +import cn.iocoder.yudao.framework.xss.config.XssProperties; | |
| 3 | 5 | import cn.iocoder.yudao.framework.xss.core.clean.XssCleaner; |
| 4 | 6 | import com.fasterxml.jackson.core.JsonParser; |
| 5 | 7 | import com.fasterxml.jackson.core.JsonToken; |
| 6 | 8 | import com.fasterxml.jackson.databind.DeserializationContext; |
| 7 | 9 | import com.fasterxml.jackson.databind.deser.std.StringDeserializer; |
| 10 | +import jakarta.servlet.http.HttpServletRequest; | |
| 8 | 11 | import lombok.AllArgsConstructor; |
| 9 | 12 | import lombok.extern.slf4j.Slf4j; |
| 13 | +import org.springframework.util.PathMatcher; | |
| 10 | 14 | |
| 11 | 15 | import java.io.IOException; |
| 12 | 16 | |
| ... | ... | @@ -20,10 +24,29 @@ import java.io.IOException; |
| 20 | 24 | @AllArgsConstructor |
| 21 | 25 | public class XssStringJsonDeserializer extends StringDeserializer { |
| 22 | 26 | |
| 27 | + /** | |
| 28 | + * 属性 | |
| 29 | + */ | |
| 30 | + private final XssProperties properties; | |
| 31 | + /** | |
| 32 | + * 路径匹配器 | |
| 33 | + */ | |
| 34 | + private final PathMatcher pathMatcher; | |
| 35 | + | |
| 23 | 36 | private final XssCleaner xssCleaner; |
| 24 | 37 | |
| 25 | 38 | @Override |
| 26 | 39 | public String deserialize(JsonParser p, DeserializationContext ctxt) throws IOException { |
| 40 | + // 1. 白名单 URL 的处理 | |
| 41 | + HttpServletRequest request = ServletUtils.getRequest(); | |
| 42 | + if (request != null) { | |
| 43 | + String uri = ServletUtils.getRequest().getRequestURI(); | |
| 44 | + if (properties.getExcludeUrls().stream().anyMatch(excludeUrl -> pathMatcher.match(excludeUrl, uri))) { | |
| 45 | + return p.getText(); | |
| 46 | + } | |
| 47 | + } | |
| 48 | + | |
| 49 | + // 2. 真正使用 xssCleaner 进行过滤 | |
| 27 | 50 | if (p.hasToken(JsonToken.VALUE_STRING)) { |
| 28 | 51 | return xssCleaner.clean(p.getText()); |
| 29 | 52 | } | ... | ... |
yudao-module-bpm/yudao-module-bpm-api/src/main/java/cn/iocoder/yudao/module/bpm/enums/task/BpmTaskStatustEnum.java renamed to yudao-module-bpm/yudao-module-bpm-api/src/main/java/cn/iocoder/yudao/module/bpm/enums/task/BpmTaskStatusEnum.java
yudao-module-bpm/yudao-module-bpm-biz/pom.xml
| ... | ... | @@ -30,10 +30,6 @@ |
| 30 | 30 | <!-- 业务组件 --> |
| 31 | 31 | <dependency> |
| 32 | 32 | <groupId>cn.iocoder.boot</groupId> |
| 33 | - <artifactId>yudao-spring-boot-starter-biz-operatelog</artifactId> | |
| 34 | - </dependency> | |
| 35 | - <dependency> | |
| 36 | - <groupId>cn.iocoder.boot</groupId> | |
| 37 | 33 | <artifactId>yudao-spring-boot-starter-biz-data-permission</artifactId> |
| 38 | 34 | </dependency> |
| 39 | 35 | <dependency> |
| ... | ... | @@ -69,6 +65,7 @@ |
| 69 | 65 | <groupId>cn.iocoder.boot</groupId> |
| 70 | 66 | <artifactId>yudao-spring-boot-starter-excel</artifactId> |
| 71 | 67 | </dependency> |
| 68 | + | |
| 72 | 69 | <!-- Flowable 工作流相关 --> |
| 73 | 70 | <dependency> |
| 74 | 71 | <groupId>org.flowable</groupId> | ... | ... |
yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/task/BpmTaskController.java
| ... | ... | @@ -93,7 +93,7 @@ public class BpmTaskController { |
| 93 | 93 | @GetMapping("manager-page") |
| 94 | 94 | @Operation(summary = "获取全部任务的分页", description = "用于【流程任务】菜单") |
| 95 | 95 | @PreAuthorize("@ss.hasPermission('bpm:task:mananger-query')") |
| 96 | - public CommonResult<PageResult<BpmTaskRespVO>> getDoneTaskPage(@Valid BpmTaskPageReqVO pageVO) { | |
| 96 | + public CommonResult<PageResult<BpmTaskRespVO>> getTaskManagerPage(@Valid BpmTaskPageReqVO pageVO) { | |
| 97 | 97 | PageResult<HistoricTaskInstance> pageResult = taskService.getTaskPage(getLoginUserId(), pageVO); |
| 98 | 98 | if (CollUtil.isEmpty(pageResult.getList())) { |
| 99 | 99 | return success(PageResult.empty()); | ... | ... |
yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/convert/task/BpmProcessInstanceConvert.java
| ... | ... | @@ -53,8 +53,10 @@ public interface BpmProcessInstanceConvert { |
| 53 | 53 | // user |
| 54 | 54 | if (userMap != null) { |
| 55 | 55 | AdminUserRespDTO startUser = userMap.get(NumberUtils.parseLong(pageResult.getList().get(i).getStartUserId())); |
| 56 | - respVO.setStartUser(BeanUtils.toBean(startUser, BpmProcessInstanceRespVO.User.class)); | |
| 57 | - MapUtils.findAndThen(deptMap, startUser.getDeptId(), dept -> respVO.getStartUser().setDeptName(dept.getName())); | |
| 56 | + if (startUser != null) { | |
| 57 | + respVO.setStartUser(BeanUtils.toBean(startUser, BpmProcessInstanceRespVO.User.class)); | |
| 58 | + MapUtils.findAndThen(deptMap, startUser.getDeptId(), dept -> respVO.getStartUser().setDeptName(dept.getName())); | |
| 59 | + } | |
| 58 | 60 | } |
| 59 | 61 | } |
| 60 | 62 | return vpPageResult; | ... | ... |
yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/dal/dataobject/oa/BpmOALeaveDO.java
| 1 | 1 | package cn.iocoder.yudao.module.bpm.dal.dataobject.oa; |
| 2 | 2 | |
| 3 | 3 | import cn.iocoder.yudao.framework.mybatis.core.dataobject.BaseDO; |
| 4 | -import cn.iocoder.yudao.module.bpm.enums.task.BpmTaskStatustEnum; | |
| 4 | +import cn.iocoder.yudao.module.bpm.enums.task.BpmTaskStatusEnum; | |
| 5 | 5 | import com.baomidou.mybatisplus.annotation.TableId; |
| 6 | 6 | import com.baomidou.mybatisplus.annotation.TableName; |
| 7 | 7 | import lombok.*; |
| ... | ... | @@ -57,7 +57,7 @@ public class BpmOALeaveDO extends BaseDO { |
| 57 | 57 | /** |
| 58 | 58 | * 审批结果 |
| 59 | 59 | * |
| 60 | - * 枚举 {@link BpmTaskStatustEnum} | |
| 60 | + * 枚举 {@link BpmTaskStatusEnum} | |
| 61 | 61 | * 考虑到简单,所以直接复用了 BpmProcessInstanceStatusEnum 枚举,也可以自己定义一个枚举哈 |
| 62 | 62 | */ |
| 63 | 63 | private Integer status; | ... | ... |
yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/framework/flowable/core/candidate/BpmTaskCandidateInvoker.java
| ... | ... | @@ -4,6 +4,7 @@ import cn.hutool.core.collection.CollUtil; |
| 4 | 4 | import cn.hutool.core.lang.Assert; |
| 5 | 5 | import cn.hutool.core.util.StrUtil; |
| 6 | 6 | import cn.iocoder.yudao.framework.common.enums.CommonStatusEnum; |
| 7 | +import cn.iocoder.yudao.framework.datapermission.core.annotation.DataPermission; | |
| 7 | 8 | import cn.iocoder.yudao.module.bpm.framework.flowable.core.enums.BpmTaskCandidateStrategyEnum; |
| 8 | 9 | import cn.iocoder.yudao.module.bpm.framework.flowable.core.util.BpmnModelUtils; |
| 9 | 10 | import cn.iocoder.yudao.module.system.api.user.AdminUserApi; |
| ... | ... | @@ -77,6 +78,7 @@ public class BpmTaskCandidateInvoker { |
| 77 | 78 | * @param execution 执行任务 |
| 78 | 79 | * @return 用户编号集合 |
| 79 | 80 | */ |
| 81 | + @DataPermission(enable = false) // 忽略数据权限,避免因为过滤,导致找不到候选人 | |
| 80 | 82 | public Set<Long> calculateUsers(DelegateExecution execution) { |
| 81 | 83 | Integer strategy = BpmnModelUtils.parseCandidateStrategy(execution.getCurrentFlowElement()); |
| 82 | 84 | String param = BpmnModelUtils.parseCandidateParam(execution.getCurrentFlowElement()); | ... | ... |
yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/framework/flowable/core/candidate/expression/BpmTaskAssignLeaderExpression.java
| ... | ... | @@ -34,6 +34,13 @@ public class BpmTaskAssignLeaderExpression { |
| 34 | 34 | @Resource |
| 35 | 35 | private BpmProcessInstanceService processInstanceService; |
| 36 | 36 | |
| 37 | + /** | |
| 38 | + * 计算审批的候选人 | |
| 39 | + * | |
| 40 | + * @param execution 流程执行实体 | |
| 41 | + * @param level 指定级别 | |
| 42 | + * @return 指定级别的领导 | |
| 43 | + */ | |
| 37 | 44 | public Set<Long> calculateUsers(DelegateExecution execution, int level) { |
| 38 | 45 | Assert.isTrue(level > 0, "level 必须大于 0"); |
| 39 | 46 | // 获得发起人 | ... | ... |
yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/framework/flowable/core/candidate/expression/BpmTaskAssignStartUserExpression.java
| ... | ... | @@ -4,6 +4,7 @@ import cn.iocoder.yudao.framework.common.util.collection.SetUtils; |
| 4 | 4 | import cn.iocoder.yudao.framework.common.util.number.NumberUtils; |
| 5 | 5 | import cn.iocoder.yudao.module.bpm.service.task.BpmProcessInstanceService; |
| 6 | 6 | import jakarta.annotation.Resource; |
| 7 | +import org.flowable.engine.impl.persistence.entity.ExecutionEntityImpl; | |
| 7 | 8 | import org.flowable.engine.runtime.ProcessInstance; |
| 8 | 9 | import org.springframework.stereotype.Component; |
| 9 | 10 | |
| ... | ... | @@ -20,7 +21,13 @@ public class BpmTaskAssignStartUserExpression { |
| 20 | 21 | @Resource |
| 21 | 22 | private BpmProcessInstanceService processInstanceService; |
| 22 | 23 | |
| 23 | - public Set<Long> calculateUsers(org.flowable.engine.impl.persistence.entity.ExecutionEntityImpl execution) { | |
| 24 | + /** | |
| 25 | + * 计算审批的候选人 | |
| 26 | + * | |
| 27 | + * @param execution 流程执行实体 | |
| 28 | + * @return 发起人 | |
| 29 | + */ | |
| 30 | + public Set<Long> calculateUsers(ExecutionEntityImpl execution) { | |
| 24 | 31 | ProcessInstance processInstance = processInstanceService.getProcessInstance(execution.getProcessInstanceId()); |
| 25 | 32 | Long startUserId = NumberUtils.parseLong(processInstance.getStartUserId()); |
| 26 | 33 | return SetUtils.asSet(startUserId); | ... | ... |
yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/framework/flowable/core/listener/BpmTaskEventListener.java
yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/framework/flowable/core/listener/demo/task/DemoDelegateClassTaskListener.java
| ... | ... | @@ -3,14 +3,12 @@ package cn.iocoder.yudao.module.bpm.framework.flowable.core.listener.demo.task; |
| 3 | 3 | import lombok.extern.slf4j.Slf4j; |
| 4 | 4 | import org.flowable.engine.delegate.TaskListener; |
| 5 | 5 | import org.flowable.task.service.delegate.DelegateTask; |
| 6 | -import org.springframework.stereotype.Component; | |
| 7 | 6 | |
| 8 | 7 | /** |
| 9 | 8 | * 类型为 class 的 TaskListener 监听器示例 |
| 10 | 9 | * |
| 11 | 10 | * @author 芋道源码 |
| 12 | 11 | */ |
| 13 | -@Component | |
| 14 | 12 | @Slf4j |
| 15 | 13 | public class DemoDelegateClassTaskListener implements TaskListener { |
| 16 | 14 | ... | ... |
yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/framework/flowable/core/listener/demo/task/DemoSpringExpressionTaskListener.java
| ... | ... | @@ -2,6 +2,7 @@ package cn.iocoder.yudao.module.bpm.framework.flowable.core.listener.demo.task; |
| 2 | 2 | |
| 3 | 3 | import lombok.extern.slf4j.Slf4j; |
| 4 | 4 | import org.flowable.task.service.delegate.DelegateTask; |
| 5 | +import org.springframework.stereotype.Component; | |
| 5 | 6 | |
| 6 | 7 | /** |
| 7 | 8 | * 类型为 expression 的 TaskListener 监听器示例 |
| ... | ... | @@ -9,6 +10,7 @@ import org.flowable.task.service.delegate.DelegateTask; |
| 9 | 10 | * @author 芋道源码 |
| 10 | 11 | */ |
| 11 | 12 | @Slf4j |
| 13 | +@Component | |
| 12 | 14 | public class DemoSpringExpressionTaskListener { |
| 13 | 15 | |
| 14 | 16 | public void notify(DelegateTask delegateTask) { | ... | ... |
yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/framework/flowable/core/util/FlowableUtils.java
| 1 | 1 | package cn.iocoder.yudao.module.bpm.framework.flowable.core.util; |
| 2 | 2 | |
| 3 | +import cn.iocoder.yudao.framework.tenant.core.context.TenantContextHolder; | |
| 3 | 4 | import cn.iocoder.yudao.module.bpm.framework.flowable.core.enums.BpmConstants; |
| 4 | 5 | import org.flowable.common.engine.api.delegate.Expression; |
| 5 | 6 | import org.flowable.common.engine.api.variable.VariableContainer; |
| 6 | 7 | import org.flowable.common.engine.impl.el.ExpressionManager; |
| 7 | 8 | import org.flowable.common.engine.impl.identity.Authentication; |
| 9 | +import org.flowable.engine.ProcessEngineConfiguration; | |
| 8 | 10 | import org.flowable.engine.history.HistoricProcessInstance; |
| 9 | 11 | import org.flowable.engine.impl.cfg.ProcessEngineConfigurationImpl; |
| 10 | 12 | import org.flowable.engine.impl.util.CommandContextUtil; |
| ... | ... | @@ -32,6 +34,11 @@ public class FlowableUtils { |
| 32 | 34 | Authentication.setAuthenticatedUserId(null); |
| 33 | 35 | } |
| 34 | 36 | |
| 37 | + public static String getTenantId() { | |
| 38 | + Long tenantId = TenantContextHolder.getTenantId(); | |
| 39 | + return tenantId != null ? String.valueOf(tenantId) : ProcessEngineConfiguration.NO_TENANT_ID; | |
| 40 | + } | |
| 41 | + | |
| 35 | 42 | // ========== Execution 相关的工具方法 ========== |
| 36 | 43 | |
| 37 | 44 | /** | ... | ... |
yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/service/definition/BpmModelServiceImpl.java
| ... | ... | @@ -6,7 +6,6 @@ import cn.iocoder.yudao.framework.common.pojo.PageResult; |
| 6 | 6 | import cn.iocoder.yudao.framework.common.util.json.JsonUtils; |
| 7 | 7 | import cn.iocoder.yudao.framework.common.util.object.PageUtils; |
| 8 | 8 | import cn.iocoder.yudao.framework.common.util.validation.ValidationUtils; |
| 9 | -import cn.iocoder.yudao.framework.tenant.core.context.TenantContextHolder; | |
| 10 | 9 | import cn.iocoder.yudao.module.bpm.controller.admin.definition.vo.model.BpmModelCreateReqVO; |
| 11 | 10 | import cn.iocoder.yudao.module.bpm.controller.admin.definition.vo.model.BpmModelPageReqVO; |
| 12 | 11 | import cn.iocoder.yudao.module.bpm.controller.admin.definition.vo.model.BpmModelUpdateReqVO; |
| ... | ... | @@ -15,6 +14,7 @@ import cn.iocoder.yudao.module.bpm.dal.dataobject.definition.BpmFormDO; |
| 15 | 14 | import cn.iocoder.yudao.module.bpm.enums.definition.BpmModelFormTypeEnum; |
| 16 | 15 | import cn.iocoder.yudao.module.bpm.framework.flowable.core.candidate.BpmTaskCandidateInvoker; |
| 17 | 16 | import cn.iocoder.yudao.module.bpm.framework.flowable.core.util.BpmnModelUtils; |
| 17 | +import cn.iocoder.yudao.module.bpm.framework.flowable.core.util.FlowableUtils; | |
| 18 | 18 | import cn.iocoder.yudao.module.bpm.service.definition.dto.BpmModelMetaInfoRespDTO; |
| 19 | 19 | import jakarta.annotation.Resource; |
| 20 | 20 | import jakarta.validation.Valid; |
| ... | ... | @@ -79,7 +79,7 @@ public class BpmModelServiceImpl implements BpmModelService { |
| 79 | 79 | return PageResult.empty(count); |
| 80 | 80 | } |
| 81 | 81 | List<Model> models = modelQuery |
| 82 | - .modelTenantId(TenantContextHolder.getTenantIdStr()) | |
| 82 | + .modelTenantId(FlowableUtils.getTenantId()) | |
| 83 | 83 | .orderByCreateTime().desc() |
| 84 | 84 | .listPage(PageUtils.getStart(pageVO), pageVO.getPageSize()); |
| 85 | 85 | return new PageResult<>(models, count); |
| ... | ... | @@ -100,7 +100,7 @@ public class BpmModelServiceImpl implements BpmModelService { |
| 100 | 100 | // 创建流程定义 |
| 101 | 101 | Model model = repositoryService.newModel(); |
| 102 | 102 | BpmModelConvert.INSTANCE.copyToCreateModel(model, createReqVO); |
| 103 | - model.setTenantId(TenantContextHolder.getTenantIdStr()); | |
| 103 | + model.setTenantId(FlowableUtils.getTenantId()); | |
| 104 | 104 | // 保存流程定义 |
| 105 | 105 | repositoryService.saveModel(model); |
| 106 | 106 | // 保存 BPMN XML | ... | ... |
yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/service/definition/BpmProcessDefinitionServiceImpl.java
| ... | ... | @@ -5,12 +5,12 @@ import cn.hutool.core.util.StrUtil; |
| 5 | 5 | import cn.iocoder.yudao.framework.common.pojo.PageResult; |
| 6 | 6 | import cn.iocoder.yudao.framework.common.util.object.BeanUtils; |
| 7 | 7 | import cn.iocoder.yudao.framework.common.util.object.PageUtils; |
| 8 | -import cn.iocoder.yudao.framework.tenant.core.context.TenantContextHolder; | |
| 9 | 8 | import cn.iocoder.yudao.module.bpm.controller.admin.definition.vo.process.BpmProcessDefinitionPageReqVO; |
| 10 | 9 | import cn.iocoder.yudao.module.bpm.dal.dataobject.definition.BpmFormDO; |
| 11 | 10 | import cn.iocoder.yudao.module.bpm.dal.dataobject.definition.BpmProcessDefinitionInfoDO; |
| 12 | 11 | import cn.iocoder.yudao.module.bpm.dal.mysql.definition.BpmProcessDefinitionInfoMapper; |
| 13 | 12 | import cn.iocoder.yudao.module.bpm.framework.flowable.core.enums.BpmnModelConstants; |
| 13 | +import cn.iocoder.yudao.module.bpm.framework.flowable.core.util.FlowableUtils; | |
| 14 | 14 | import cn.iocoder.yudao.module.bpm.service.definition.dto.BpmModelMetaInfoRespDTO; |
| 15 | 15 | import jakarta.annotation.Resource; |
| 16 | 16 | import lombok.extern.slf4j.Slf4j; |
| ... | ... | @@ -109,7 +109,7 @@ public class BpmProcessDefinitionServiceImpl implements BpmProcessDefinitionServ |
| 109 | 109 | Deployment deploy = repositoryService.createDeployment() |
| 110 | 110 | .key(model.getKey()).name(model.getName()).category(model.getCategory()) |
| 111 | 111 | .addBytes(model.getKey() + BpmnModelConstants.BPMN_FILE_SUFFIX, bpmnBytes) |
| 112 | - .tenantId(TenantContextHolder.getTenantIdStr()) | |
| 112 | + .tenantId(FlowableUtils.getTenantId()) | |
| 113 | 113 | .disableSchemaValidation() // 禁用 XML Schema 验证,因为有自定义的属性 |
| 114 | 114 | .deploy(); |
| 115 | 115 | |
| ... | ... | @@ -195,7 +195,7 @@ public class BpmProcessDefinitionServiceImpl implements BpmProcessDefinitionServ |
| 195 | 195 | query.active(); |
| 196 | 196 | } |
| 197 | 197 | // 执行查询 |
| 198 | - query.processDefinitionTenantId(TenantContextHolder.getTenantIdStr()); | |
| 198 | + query.processDefinitionTenantId(FlowableUtils.getTenantId()); | |
| 199 | 199 | return query.list(); |
| 200 | 200 | } |
| 201 | 201 | ... | ... |
yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/service/oa/BpmOALeaveServiceImpl.java
| ... | ... | @@ -9,7 +9,7 @@ import cn.iocoder.yudao.module.bpm.controller.admin.oa.vo.BpmOALeaveCreateReqVO; |
| 9 | 9 | import cn.iocoder.yudao.module.bpm.controller.admin.oa.vo.BpmOALeavePageReqVO; |
| 10 | 10 | import cn.iocoder.yudao.module.bpm.dal.dataobject.oa.BpmOALeaveDO; |
| 11 | 11 | import cn.iocoder.yudao.module.bpm.dal.mysql.oa.BpmOALeaveMapper; |
| 12 | -import cn.iocoder.yudao.module.bpm.enums.task.BpmTaskStatustEnum; | |
| 12 | +import cn.iocoder.yudao.module.bpm.enums.task.BpmTaskStatusEnum; | |
| 13 | 13 | import jakarta.annotation.Resource; |
| 14 | 14 | import org.springframework.stereotype.Service; |
| 15 | 15 | import org.springframework.transaction.annotation.Transactional; |
| ... | ... | @@ -48,7 +48,7 @@ public class BpmOALeaveServiceImpl implements BpmOALeaveService { |
| 48 | 48 | // 插入 OA 请假单 |
| 49 | 49 | long day = LocalDateTimeUtil.between(createReqVO.getStartTime(), createReqVO.getEndTime()).toDays(); |
| 50 | 50 | BpmOALeaveDO leave = BeanUtils.toBean(createReqVO, BpmOALeaveDO.class) |
| 51 | - .setUserId(userId).setDay(day).setStatus(BpmTaskStatustEnum.RUNNING.getStatus()); | |
| 51 | + .setUserId(userId).setDay(day).setStatus(BpmTaskStatusEnum.RUNNING.getStatus()); | |
| 52 | 52 | leaveMapper.insert(leave); |
| 53 | 53 | |
| 54 | 54 | // 发起 BPM 流程 | ... | ... |
yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/service/task/BpmProcessInstanceServiceImpl.java
| 1 | -package cn.iocoder.yudao.module.bpm.service.task; import cn.hutool.core.collection.CollUtil; import cn.hutool.core.util.ArrayUtil; import cn.hutool.core.util.StrUtil; import cn.iocoder.yudao.framework.common.pojo.PageResult; import cn.iocoder.yudao.framework.common.util.date.DateUtils; import cn.iocoder.yudao.framework.common.util.object.PageUtils; import cn.iocoder.yudao.module.bpm.api.task.dto.BpmProcessInstanceCreateReqDTO; import cn.iocoder.yudao.module.bpm.controller.admin.task.vo.instance.BpmProcessInstanceCancelReqVO; import cn.iocoder.yudao.module.bpm.controller.admin.task.vo.instance.BpmProcessInstanceCreateReqVO; import cn.iocoder.yudao.module.bpm.controller.admin.task.vo.instance.BpmProcessInstancePageReqVO; import cn.iocoder.yudao.module.bpm.convert.task.BpmProcessInstanceConvert; import cn.iocoder.yudao.module.bpm.enums.task.BpmDeleteReasonEnum; import cn.iocoder.yudao.module.bpm.enums.task.BpmProcessInstanceStatusEnum; import cn.iocoder.yudao.module.bpm.framework.flowable.core.candidate.strategy.BpmTaskCandidateStartUserSelectStrategy; import cn.iocoder.yudao.module.bpm.framework.flowable.core.enums.BpmConstants; import cn.iocoder.yudao.module.bpm.framework.flowable.core.event.BpmProcessInstanceEventPublisher; import cn.iocoder.yudao.module.bpm.framework.flowable.core.util.FlowableUtils; import cn.iocoder.yudao.module.bpm.service.definition.BpmProcessDefinitionService; import cn.iocoder.yudao.module.bpm.service.message.BpmMessageService; import cn.iocoder.yudao.module.system.api.user.AdminUserApi; import cn.iocoder.yudao.module.system.api.user.dto.AdminUserRespDTO; import jakarta.annotation.Resource; import jakarta.validation.Valid; import lombok.extern.slf4j.Slf4j; import org.flowable.bpmn.model.BpmnModel; import org.flowable.bpmn.model.UserTask; import org.flowable.engine.HistoryService; import org.flowable.engine.RuntimeService; import org.flowable.engine.delegate.event.FlowableCancelledEvent; import org.flowable.engine.history.HistoricProcessInstance; import org.flowable.engine.history.HistoricProcessInstanceQuery; import org.flowable.engine.repository.ProcessDefinition; import org.flowable.engine.runtime.ProcessInstance; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; import org.springframework.validation.annotation.Validated; import java.util.List; import java.util.Map; import java.util.Objects; import java.util.Set; import static cn.iocoder.yudao.framework.common.exception.util.ServiceExceptionUtil.exception; import static cn.iocoder.yudao.module.bpm.enums.ErrorCodeConstants.*; /** * 流程实例 Service 实现类 * * ProcessDefinition & ProcessInstance & Execution & Task 的关系: * 1. <a href="https://blog.csdn.net/bobozai86/article/details/105210414" /> * * HistoricProcessInstance & ProcessInstance 的关系: * 1. <a href=" https://my.oschina.net/843294669/blog/71902" /> * * 简单来说,前者 = 历史 + 运行中的流程实例,后者仅是运行中的流程实例 * * @author 芋道源码 */ @Service @Validated @Slf4j public class BpmProcessInstanceServiceImpl implements BpmProcessInstanceService { @Resource private RuntimeService runtimeService; @Resource private HistoryService historyService; @Resource private BpmProcessDefinitionService processDefinitionService; @Resource private BpmMessageService messageService; @Resource private AdminUserApi adminUserApi; @Resource private BpmProcessInstanceEventPublisher processInstanceEventPublisher; @Override public ProcessInstance getProcessInstance(String id) { return runtimeService.createProcessInstanceQuery() .includeProcessVariables() .processInstanceId(id) .singleResult(); } @Override public List<ProcessInstance> getProcessInstances(Set<String> ids) { return runtimeService.createProcessInstanceQuery().processInstanceIds(ids).list(); } @Override public HistoricProcessInstance getHistoricProcessInstance(String id) { return historyService.createHistoricProcessInstanceQuery().processInstanceId(id).includeProcessVariables().singleResult(); } @Override public List<HistoricProcessInstance> getHistoricProcessInstances(Set<String> ids) { return historyService.createHistoricProcessInstanceQuery().processInstanceIds(ids).list(); } @Override public PageResult<HistoricProcessInstance> getProcessInstancePage(Long userId, BpmProcessInstancePageReqVO pageReqVO) { // 通过 BpmProcessInstanceExtDO 表,先查询到对应的分页 HistoricProcessInstanceQuery processInstanceQuery = historyService.createHistoricProcessInstanceQuery() .includeProcessVariables() .orderByProcessInstanceStartTime().desc(); if (userId != null) { // 【我的流程】菜单时,需要传递该字段 processInstanceQuery.startedBy(String.valueOf(userId)); } else if (pageReqVO.getStartUserId() != null) { // 【管理流程】菜单时,才会传递该字段 processInstanceQuery.startedBy(String.valueOf(pageReqVO.getStartUserId())); } if (StrUtil.isNotEmpty(pageReqVO.getName())) { processInstanceQuery.processInstanceNameLike("%" + pageReqVO.getName() + "%"); } if (StrUtil.isNotEmpty(pageReqVO.getProcessDefinitionId())) { processInstanceQuery.processDefinitionId("%" + pageReqVO.getProcessDefinitionId() + "%"); } if (StrUtil.isNotEmpty(pageReqVO.getCategory())) { processInstanceQuery.processDefinitionCategory(pageReqVO.getCategory()); } if (pageReqVO.getStatus() != null) { processInstanceQuery.variableValueEquals(BpmConstants.PROCESS_INSTANCE_VARIABLE_STATUS, pageReqVO.getStatus()); } if (ArrayUtil.isNotEmpty(pageReqVO.getCreateTime())) { processInstanceQuery.startedAfter(DateUtils.of(pageReqVO.getCreateTime()[0])); processInstanceQuery.startedBefore(DateUtils.of(pageReqVO.getCreateTime()[1])); } // 查询数量 long processInstanceCount = processInstanceQuery.count(); if (processInstanceCount == 0) { return PageResult.empty(processInstanceCount); } // 查询列表 List<HistoricProcessInstance> processInstanceList = processInstanceQuery.listPage(PageUtils.getStart(pageReqVO), pageReqVO.getPageSize()); return new PageResult<>(processInstanceList, processInstanceCount); } @Override @Transactional(rollbackFor = Exception.class) public String createProcessInstance(Long userId, @Valid BpmProcessInstanceCreateReqVO createReqVO) { // 获得流程定义 ProcessDefinition definition = processDefinitionService.getProcessDefinition(createReqVO.getProcessDefinitionId()); // 发起流程 return createProcessInstance0(userId, definition, createReqVO.getVariables(), null, createReqVO.getStartUserSelectAssignees()); } @Override public String createProcessInstance(Long userId, @Valid BpmProcessInstanceCreateReqDTO createReqDTO) { // 获得流程定义 ProcessDefinition definition = processDefinitionService.getActiveProcessDefinition(createReqDTO.getProcessDefinitionKey()); // 发起流程 return createProcessInstance0(userId, definition, createReqDTO.getVariables(), createReqDTO.getBusinessKey(), createReqDTO.getStartUserSelectAssignees()); } private String createProcessInstance0(Long userId, ProcessDefinition definition, Map<String, Object> variables, String businessKey, Map<String, List<Long>> startUserSelectAssignees) { // 1.1 校验流程定义 if (definition == null) { throw exception(PROCESS_DEFINITION_NOT_EXISTS); } if (definition.isSuspended()) { throw exception(PROCESS_DEFINITION_IS_SUSPENDED); } // 1.2 校验发起人自选审批人 validateStartUserSelectAssignees(definition, startUserSelectAssignees); // 2. 创建流程实例 FlowableUtils.filterProcessInstanceFormVariable(variables); // 过滤一下,避免 ProcessInstance 系统级的变量被占用 variables.put(BpmConstants.PROCESS_INSTANCE_VARIABLE_STATUS, // 流程实例状态:审批中 BpmProcessInstanceStatusEnum.RUNNING.getStatus()); if (CollUtil.isNotEmpty(startUserSelectAssignees)) { variables.put(BpmConstants.PROCESS_INSTANCE_VARIABLE_START_USER_SELECT_ASSIGNEES, startUserSelectAssignees); } ProcessInstance instance = runtimeService.createProcessInstanceBuilder() .processDefinitionId(definition.getId()) .businessKey(businessKey) .name(definition.getName().trim()) .variables(variables) .start(); return instance.getId(); } private void validateStartUserSelectAssignees(ProcessDefinition definition, Map<String, List<Long>> startUserSelectAssignees) { // 1. 获得发起人自选审批人的 UserTask 列表 BpmnModel bpmnModel = processDefinitionService.getProcessDefinitionBpmnModel(definition.getId()); List<UserTask> userTaskList = BpmTaskCandidateStartUserSelectStrategy.getStartUserSelectUserTaskList(bpmnModel); if (CollUtil.isEmpty(userTaskList)) { return; } // 2. 校验发起人自选审批人的 UserTask 是否都配置了 userTaskList.forEach(userTask -> { List<Long> assignees = startUserSelectAssignees != null ? startUserSelectAssignees.get(userTask.getId()) : null; if (CollUtil.isEmpty(assignees)) { throw exception(PROCESS_INSTANCE_START_USER_SELECT_ASSIGNEES_NOT_CONFIG, userTask.getName()); } Map<Long, AdminUserRespDTO> userMap = adminUserApi.getUserMap(assignees); assignees.forEach(assignee -> { if (userMap.get(assignee) == null) { throw exception(PROCESS_INSTANCE_START_USER_SELECT_ASSIGNEES_NOT_EXISTS, userTask.getName(), assignee); } }); }); } @Override public void cancelProcessInstanceByStartUser(Long userId, @Valid BpmProcessInstanceCancelReqVO cancelReqVO) { // 1.1 校验流程实例存在 ProcessInstance instance = getProcessInstance(cancelReqVO.getId()); if (instance == null) { throw exception(PROCESS_INSTANCE_CANCEL_FAIL_NOT_EXISTS); } // 1.2 只能取消自己的 if (!Objects.equals(instance.getStartUserId(), String.valueOf(userId))) { throw exception(PROCESS_INSTANCE_CANCEL_FAIL_NOT_SELF); } // 2. 通过删除流程实例,实现流程实例的取消, // 删除流程实例,正则执行任务 ACT_RU_TASK. 任务会被删除。 deleteProcessInstance(cancelReqVO.getId(), BpmDeleteReasonEnum.CANCEL_PROCESS_INSTANCE_BY_START_USER.format(cancelReqVO.getReason())); // 3. 进一步的处理,交给 updateProcessInstanceCancel 方法 } @Override public void cancelProcessInstanceByAdmin(Long userId, BpmProcessInstanceCancelReqVO cancelReqVO) { // 1.1 校验流程实例存在 ProcessInstance instance = getProcessInstance(cancelReqVO.getId()); if (instance == null) { throw exception(PROCESS_INSTANCE_CANCEL_FAIL_NOT_EXISTS); } // 1.2 管理员取消,不用校验是否为自己的 AdminUserRespDTO user = adminUserApi.getUser(userId); // 2. 通过删除流程实例,实现流程实例的取消, // 删除流程实例,正则执行任务 ACT_RU_TASK. 任务会被删除。 deleteProcessInstance(cancelReqVO.getId(), BpmDeleteReasonEnum.CANCEL_PROCESS_INSTANCE_BY_ADMIN.format(user.getNickname(), cancelReqVO.getReason())); // 3. 进一步的处理,交给 updateProcessInstanceCancel 方法 } @Override public void updateProcessInstanceWhenCancel(FlowableCancelledEvent event) { // 1. 判断是否为 Reject 不通过。如果是,则不进行更新. // 因为,updateProcessInstanceReject 方法(审批不通过),已经进行更新了 if (BpmDeleteReasonEnum.isRejectReason((String) event.getCause())) { return; } // 2. 更新流程实例 status runtimeService.setVariable(event.getProcessInstanceId(), BpmConstants.PROCESS_INSTANCE_VARIABLE_STATUS, BpmProcessInstanceStatusEnum.CANCEL.getStatus()); // 3. 发送流程实例的状态事件 // 注意:此时如果去查询 ProcessInstance 的话,字段是不全的,所以去查询了 HistoricProcessInstance HistoricProcessInstance processInstance = getHistoricProcessInstance(event.getProcessInstanceId()); // 发送流程实例的状态事件 processInstanceEventPublisher.sendProcessInstanceResultEvent( BpmProcessInstanceConvert.INSTANCE.buildProcessInstanceStatusEvent(this, processInstance, BpmProcessInstanceStatusEnum.CANCEL.getStatus())); } @Override public void updateProcessInstanceWhenApprove(ProcessInstance instance) { // 1. 更新流程实例 status runtimeService.setVariable(instance.getId(), BpmConstants.PROCESS_INSTANCE_VARIABLE_STATUS, BpmProcessInstanceStatusEnum.APPROVE.getStatus()); // 2. 发送流程被【通过】的消息 messageService.sendMessageWhenProcessInstanceApprove(BpmProcessInstanceConvert.INSTANCE.buildProcessInstanceApproveMessage(instance)); // 3. 发送流程实例的状态事件 // 注意:此时如果去查询 ProcessInstance 的话,字段是不全的,所以去查询了 HistoricProcessInstance HistoricProcessInstance processInstance = getHistoricProcessInstance(instance.getId()); processInstanceEventPublisher.sendProcessInstanceResultEvent( BpmProcessInstanceConvert.INSTANCE.buildProcessInstanceStatusEvent(this, processInstance, BpmProcessInstanceStatusEnum.APPROVE.getStatus())); } @Override @Transactional(rollbackFor = Exception.class) public void updateProcessInstanceReject(String id, String reason) { // 1. 更新流程实例 status runtimeService.setVariable(id, BpmConstants.PROCESS_INSTANCE_VARIABLE_STATUS, BpmProcessInstanceStatusEnum.REJECT.getStatus()); // 2. 删除流程实例,以实现驳回任务时,取消整个审批流程 ProcessInstance processInstance = getProcessInstance(id); deleteProcessInstance(id, StrUtil.format(BpmDeleteReasonEnum.REJECT_TASK.format(reason))); // 3. 发送流程被【不通过】的消息 messageService.sendMessageWhenProcessInstanceReject(BpmProcessInstanceConvert.INSTANCE.buildProcessInstanceRejectMessage(processInstance, reason)); // 4. 发送流程实例的状态事件 processInstanceEventPublisher.sendProcessInstanceResultEvent( BpmProcessInstanceConvert.INSTANCE.buildProcessInstanceStatusEvent(this, processInstance, BpmProcessInstanceStatusEnum.REJECT.getStatus())); } private void deleteProcessInstance(String id, String reason) { runtimeService.deleteProcessInstance(id, reason); } } | |
| 2 | 1 | \ No newline at end of file |
| 2 | +package cn.iocoder.yudao.module.bpm.service.task; import cn.hutool.core.collection.CollUtil; import cn.hutool.core.util.ArrayUtil; import cn.hutool.core.util.StrUtil; import cn.iocoder.yudao.framework.common.pojo.PageResult; import cn.iocoder.yudao.framework.common.util.date.DateUtils; import cn.iocoder.yudao.framework.common.util.object.PageUtils; import cn.iocoder.yudao.module.bpm.api.task.dto.BpmProcessInstanceCreateReqDTO; import cn.iocoder.yudao.module.bpm.controller.admin.task.vo.instance.BpmProcessInstanceCancelReqVO; import cn.iocoder.yudao.module.bpm.controller.admin.task.vo.instance.BpmProcessInstanceCreateReqVO; import cn.iocoder.yudao.module.bpm.controller.admin.task.vo.instance.BpmProcessInstancePageReqVO; import cn.iocoder.yudao.module.bpm.convert.task.BpmProcessInstanceConvert; import cn.iocoder.yudao.module.bpm.enums.task.BpmDeleteReasonEnum; import cn.iocoder.yudao.module.bpm.enums.task.BpmProcessInstanceStatusEnum; import cn.iocoder.yudao.module.bpm.framework.flowable.core.candidate.strategy.BpmTaskCandidateStartUserSelectStrategy; import cn.iocoder.yudao.module.bpm.framework.flowable.core.enums.BpmConstants; import cn.iocoder.yudao.module.bpm.framework.flowable.core.event.BpmProcessInstanceEventPublisher; import cn.iocoder.yudao.module.bpm.framework.flowable.core.util.FlowableUtils; import cn.iocoder.yudao.module.bpm.service.definition.BpmProcessDefinitionService; import cn.iocoder.yudao.module.bpm.service.message.BpmMessageService; import cn.iocoder.yudao.module.system.api.user.AdminUserApi; import cn.iocoder.yudao.module.system.api.user.dto.AdminUserRespDTO; import jakarta.annotation.Resource; import jakarta.validation.Valid; import lombok.extern.slf4j.Slf4j; import org.flowable.bpmn.model.BpmnModel; import org.flowable.bpmn.model.UserTask; import org.flowable.engine.HistoryService; import org.flowable.engine.RuntimeService; import org.flowable.engine.delegate.event.FlowableCancelledEvent; import org.flowable.engine.history.HistoricProcessInstance; import org.flowable.engine.history.HistoricProcessInstanceQuery; import org.flowable.engine.repository.ProcessDefinition; import org.flowable.engine.runtime.ProcessInstance; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; import org.springframework.validation.annotation.Validated; import java.util.List; import java.util.Map; import java.util.Objects; import java.util.Set; import static cn.iocoder.yudao.framework.common.exception.util.ServiceExceptionUtil.exception; import static cn.iocoder.yudao.module.bpm.enums.ErrorCodeConstants.*; /** * 流程实例 Service 实现类 * * ProcessDefinition & ProcessInstance & Execution & Task 的关系: * 1. <a href="https://blog.csdn.net/bobozai86/article/details/105210414" /> * * HistoricProcessInstance & ProcessInstance 的关系: * 1. <a href=" https://my.oschina.net/843294669/blog/71902" /> * * 简单来说,前者 = 历史 + 运行中的流程实例,后者仅是运行中的流程实例 * * @author 芋道源码 */ @Service @Validated @Slf4j public class BpmProcessInstanceServiceImpl implements BpmProcessInstanceService { @Resource private RuntimeService runtimeService; @Resource private HistoryService historyService; @Resource private BpmProcessDefinitionService processDefinitionService; @Resource private BpmMessageService messageService; @Resource private AdminUserApi adminUserApi; @Resource private BpmProcessInstanceEventPublisher processInstanceEventPublisher; @Override public ProcessInstance getProcessInstance(String id) { return runtimeService.createProcessInstanceQuery() .includeProcessVariables() .processInstanceId(id) .singleResult(); } @Override public List<ProcessInstance> getProcessInstances(Set<String> ids) { return runtimeService.createProcessInstanceQuery().processInstanceIds(ids).list(); } @Override public HistoricProcessInstance getHistoricProcessInstance(String id) { return historyService.createHistoricProcessInstanceQuery().processInstanceId(id).includeProcessVariables().singleResult(); } @Override public List<HistoricProcessInstance> getHistoricProcessInstances(Set<String> ids) { return historyService.createHistoricProcessInstanceQuery().processInstanceIds(ids).list(); } @Override public PageResult<HistoricProcessInstance> getProcessInstancePage(Long userId, BpmProcessInstancePageReqVO pageReqVO) { // 通过 BpmProcessInstanceExtDO 表,先查询到对应的分页 HistoricProcessInstanceQuery processInstanceQuery = historyService.createHistoricProcessInstanceQuery() .includeProcessVariables() .processInstanceTenantId(FlowableUtils.getTenantId()) .orderByProcessInstanceStartTime().desc(); if (userId != null) { // 【我的流程】菜单时,需要传递该字段 processInstanceQuery.startedBy(String.valueOf(userId)); } else if (pageReqVO.getStartUserId() != null) { // 【管理流程】菜单时,才会传递该字段 processInstanceQuery.startedBy(String.valueOf(pageReqVO.getStartUserId())); } if (StrUtil.isNotEmpty(pageReqVO.getName())) { processInstanceQuery.processInstanceNameLike("%" + pageReqVO.getName() + "%"); } if (StrUtil.isNotEmpty(pageReqVO.getProcessDefinitionId())) { processInstanceQuery.processDefinitionId("%" + pageReqVO.getProcessDefinitionId() + "%"); } if (StrUtil.isNotEmpty(pageReqVO.getCategory())) { processInstanceQuery.processDefinitionCategory(pageReqVO.getCategory()); } if (pageReqVO.getStatus() != null) { processInstanceQuery.variableValueEquals(BpmConstants.PROCESS_INSTANCE_VARIABLE_STATUS, pageReqVO.getStatus()); } if (ArrayUtil.isNotEmpty(pageReqVO.getCreateTime())) { processInstanceQuery.startedAfter(DateUtils.of(pageReqVO.getCreateTime()[0])); processInstanceQuery.startedBefore(DateUtils.of(pageReqVO.getCreateTime()[1])); } // 查询数量 long processInstanceCount = processInstanceQuery.count(); if (processInstanceCount == 0) { return PageResult.empty(processInstanceCount); } // 查询列表 List<HistoricProcessInstance> processInstanceList = processInstanceQuery.listPage(PageUtils.getStart(pageReqVO), pageReqVO.getPageSize()); return new PageResult<>(processInstanceList, processInstanceCount); } @Override @Transactional(rollbackFor = Exception.class) public String createProcessInstance(Long userId, @Valid BpmProcessInstanceCreateReqVO createReqVO) { // 获得流程定义 ProcessDefinition definition = processDefinitionService.getProcessDefinition(createReqVO.getProcessDefinitionId()); // 发起流程 return createProcessInstance0(userId, definition, createReqVO.getVariables(), null, createReqVO.getStartUserSelectAssignees()); } @Override public String createProcessInstance(Long userId, @Valid BpmProcessInstanceCreateReqDTO createReqDTO) { // 获得流程定义 ProcessDefinition definition = processDefinitionService.getActiveProcessDefinition(createReqDTO.getProcessDefinitionKey()); // 发起流程 return createProcessInstance0(userId, definition, createReqDTO.getVariables(), createReqDTO.getBusinessKey(), createReqDTO.getStartUserSelectAssignees()); } private String createProcessInstance0(Long userId, ProcessDefinition definition, Map<String, Object> variables, String businessKey, Map<String, List<Long>> startUserSelectAssignees) { // 1.1 校验流程定义 if (definition == null) { throw exception(PROCESS_DEFINITION_NOT_EXISTS); } if (definition.isSuspended()) { throw exception(PROCESS_DEFINITION_IS_SUSPENDED); } // 1.2 校验发起人自选审批人 validateStartUserSelectAssignees(definition, startUserSelectAssignees); // 2. 创建流程实例 FlowableUtils.filterProcessInstanceFormVariable(variables); // 过滤一下,避免 ProcessInstance 系统级的变量被占用 variables.put(BpmConstants.PROCESS_INSTANCE_VARIABLE_STATUS, // 流程实例状态:审批中 BpmProcessInstanceStatusEnum.RUNNING.getStatus()); if (CollUtil.isNotEmpty(startUserSelectAssignees)) { variables.put(BpmConstants.PROCESS_INSTANCE_VARIABLE_START_USER_SELECT_ASSIGNEES, startUserSelectAssignees); } ProcessInstance instance = runtimeService.createProcessInstanceBuilder() .processDefinitionId(definition.getId()) .businessKey(businessKey) .name(definition.getName().trim()) .variables(variables) .start(); return instance.getId(); } private void validateStartUserSelectAssignees(ProcessDefinition definition, Map<String, List<Long>> startUserSelectAssignees) { // 1. 获得发起人自选审批人的 UserTask 列表 BpmnModel bpmnModel = processDefinitionService.getProcessDefinitionBpmnModel(definition.getId()); List<UserTask> userTaskList = BpmTaskCandidateStartUserSelectStrategy.getStartUserSelectUserTaskList(bpmnModel); if (CollUtil.isEmpty(userTaskList)) { return; } // 2. 校验发起人自选审批人的 UserTask 是否都配置了 userTaskList.forEach(userTask -> { List<Long> assignees = startUserSelectAssignees != null ? startUserSelectAssignees.get(userTask.getId()) : null; if (CollUtil.isEmpty(assignees)) { throw exception(PROCESS_INSTANCE_START_USER_SELECT_ASSIGNEES_NOT_CONFIG, userTask.getName()); } Map<Long, AdminUserRespDTO> userMap = adminUserApi.getUserMap(assignees); assignees.forEach(assignee -> { if (userMap.get(assignee) == null) { throw exception(PROCESS_INSTANCE_START_USER_SELECT_ASSIGNEES_NOT_EXISTS, userTask.getName(), assignee); } }); }); } @Override public void cancelProcessInstanceByStartUser(Long userId, @Valid BpmProcessInstanceCancelReqVO cancelReqVO) { // 1.1 校验流程实例存在 ProcessInstance instance = getProcessInstance(cancelReqVO.getId()); if (instance == null) { throw exception(PROCESS_INSTANCE_CANCEL_FAIL_NOT_EXISTS); } // 1.2 只能取消自己的 if (!Objects.equals(instance.getStartUserId(), String.valueOf(userId))) { throw exception(PROCESS_INSTANCE_CANCEL_FAIL_NOT_SELF); } // 2. 通过删除流程实例,实现流程实例的取消, // 删除流程实例,正则执行任务 ACT_RU_TASK. 任务会被删除。 deleteProcessInstance(cancelReqVO.getId(), BpmDeleteReasonEnum.CANCEL_PROCESS_INSTANCE_BY_START_USER.format(cancelReqVO.getReason())); // 3. 进一步的处理,交给 updateProcessInstanceCancel 方法 } @Override public void cancelProcessInstanceByAdmin(Long userId, BpmProcessInstanceCancelReqVO cancelReqVO) { // 1.1 校验流程实例存在 ProcessInstance instance = getProcessInstance(cancelReqVO.getId()); if (instance == null) { throw exception(PROCESS_INSTANCE_CANCEL_FAIL_NOT_EXISTS); } // 1.2 管理员取消,不用校验是否为自己的 AdminUserRespDTO user = adminUserApi.getUser(userId); // 2. 通过删除流程实例,实现流程实例的取消, // 删除流程实例,正则执行任务 ACT_RU_TASK. 任务会被删除。 deleteProcessInstance(cancelReqVO.getId(), BpmDeleteReasonEnum.CANCEL_PROCESS_INSTANCE_BY_ADMIN.format(user.getNickname(), cancelReqVO.getReason())); // 3. 进一步的处理,交给 updateProcessInstanceCancel 方法 } @Override public void updateProcessInstanceWhenCancel(FlowableCancelledEvent event) { // 1. 判断是否为 Reject 不通过。如果是,则不进行更新. // 因为,updateProcessInstanceReject 方法(审批不通过),已经进行更新了 if (BpmDeleteReasonEnum.isRejectReason((String) event.getCause())) { return; } // 2. 更新流程实例 status runtimeService.setVariable(event.getProcessInstanceId(), BpmConstants.PROCESS_INSTANCE_VARIABLE_STATUS, BpmProcessInstanceStatusEnum.CANCEL.getStatus()); // 3. 发送流程实例的状态事件 // 注意:此时如果去查询 ProcessInstance 的话,字段是不全的,所以去查询了 HistoricProcessInstance HistoricProcessInstance processInstance = getHistoricProcessInstance(event.getProcessInstanceId()); // 发送流程实例的状态事件 processInstanceEventPublisher.sendProcessInstanceResultEvent( BpmProcessInstanceConvert.INSTANCE.buildProcessInstanceStatusEvent(this, processInstance, BpmProcessInstanceStatusEnum.CANCEL.getStatus())); } @Override public void updateProcessInstanceWhenApprove(ProcessInstance instance) { // 1. 更新流程实例 status runtimeService.setVariable(instance.getId(), BpmConstants.PROCESS_INSTANCE_VARIABLE_STATUS, BpmProcessInstanceStatusEnum.APPROVE.getStatus()); // 2. 发送流程被【通过】的消息 messageService.sendMessageWhenProcessInstanceApprove(BpmProcessInstanceConvert.INSTANCE.buildProcessInstanceApproveMessage(instance)); // 3. 发送流程实例的状态事件 // 注意:此时如果去查询 ProcessInstance 的话,字段是不全的,所以去查询了 HistoricProcessInstance HistoricProcessInstance processInstance = getHistoricProcessInstance(instance.getId()); processInstanceEventPublisher.sendProcessInstanceResultEvent( BpmProcessInstanceConvert.INSTANCE.buildProcessInstanceStatusEvent(this, processInstance, BpmProcessInstanceStatusEnum.APPROVE.getStatus())); } @Override @Transactional(rollbackFor = Exception.class) public void updateProcessInstanceReject(String id, String reason) { // 1. 更新流程实例 status runtimeService.setVariable(id, BpmConstants.PROCESS_INSTANCE_VARIABLE_STATUS, BpmProcessInstanceStatusEnum.REJECT.getStatus()); // 2. 删除流程实例,以实现驳回任务时,取消整个审批流程 ProcessInstance processInstance = getProcessInstance(id); deleteProcessInstance(id, StrUtil.format(BpmDeleteReasonEnum.REJECT_TASK.format(reason))); // 3. 发送流程被【不通过】的消息 messageService.sendMessageWhenProcessInstanceReject(BpmProcessInstanceConvert.INSTANCE.buildProcessInstanceRejectMessage(processInstance, reason)); // 4. 发送流程实例的状态事件 processInstanceEventPublisher.sendProcessInstanceResultEvent( BpmProcessInstanceConvert.INSTANCE.buildProcessInstanceStatusEvent(this, processInstance, BpmProcessInstanceStatusEnum.REJECT.getStatus())); } private void deleteProcessInstance(String id, String reason) { runtimeService.deleteProcessInstance(id, reason); } } | |
| 3 | 3 | \ No newline at end of file | ... | ... |
yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/service/task/BpmTaskServiceImpl.java
| ... | ... | @@ -17,7 +17,7 @@ import cn.iocoder.yudao.module.bpm.convert.task.BpmTaskConvert; |
| 17 | 17 | import cn.iocoder.yudao.module.bpm.enums.task.BpmCommentTypeEnum; |
| 18 | 18 | import cn.iocoder.yudao.module.bpm.enums.task.BpmDeleteReasonEnum; |
| 19 | 19 | import cn.iocoder.yudao.module.bpm.enums.task.BpmTaskSignTypeEnum; |
| 20 | -import cn.iocoder.yudao.module.bpm.enums.task.BpmTaskStatustEnum; | |
| 20 | +import cn.iocoder.yudao.module.bpm.enums.task.BpmTaskStatusEnum; | |
| 21 | 21 | import cn.iocoder.yudao.module.bpm.framework.flowable.core.enums.BpmConstants; |
| 22 | 22 | import cn.iocoder.yudao.module.bpm.service.definition.BpmModelService; |
| 23 | 23 | import cn.iocoder.yudao.module.bpm.service.message.BpmMessageService; |
| ... | ... | @@ -134,6 +134,7 @@ public class BpmTaskServiceImpl implements BpmTaskService { |
| 134 | 134 | public PageResult<HistoricTaskInstance> getTaskPage(Long userId, BpmTaskPageReqVO pageVO) { |
| 135 | 135 | HistoricTaskInstanceQuery taskQuery = historyService.createHistoricTaskInstanceQuery() |
| 136 | 136 | .includeTaskLocalVariables() |
| 137 | + .taskTenantId(FlowableUtils.getTenantId()) | |
| 137 | 138 | .orderByHistoricTaskInstanceEndTime().desc(); // 审批时间倒序 |
| 138 | 139 | if (StrUtil.isNotBlank(pageVO.getName())) { |
| 139 | 140 | taskQuery.taskNameLike("%" + pageVO.getName() + "%"); |
| ... | ... | @@ -203,7 +204,7 @@ public class BpmTaskServiceImpl implements BpmTaskService { |
| 203 | 204 | |
| 204 | 205 | // 情况三:审批普通的任务。大多数情况下,都是这样 |
| 205 | 206 | // 3.1 更新 task 状态、原因 |
| 206 | - updateTaskStatusAndReason(task.getId(), BpmTaskStatustEnum.APPROVE.getStatus(), reqVO.getReason()); | |
| 207 | + updateTaskStatusAndReason(task.getId(), BpmTaskStatusEnum.APPROVE.getStatus(), reqVO.getReason()); | |
| 207 | 208 | // 3.2 添加评论 |
| 208 | 209 | taskService.addComment(task.getId(), task.getProcessInstanceId(), BpmCommentTypeEnum.APPROVE.getType(), |
| 209 | 210 | BpmCommentTypeEnum.APPROVE.formatComment(reqVO.getReason())); |
| ... | ... | @@ -231,14 +232,14 @@ public class BpmTaskServiceImpl implements BpmTaskService { |
| 231 | 232 | */ |
| 232 | 233 | private void approveAfterSignTask(Task task, BpmTaskApproveReqVO reqVO) { |
| 233 | 234 | // 更新父 task 状态 + 原因 |
| 234 | - updateTaskStatusAndReason(task.getId(), BpmTaskStatustEnum.APPROVING.getStatus(), reqVO.getReason()); | |
| 235 | + updateTaskStatusAndReason(task.getId(), BpmTaskStatusEnum.APPROVING.getStatus(), reqVO.getReason()); | |
| 235 | 236 | |
| 236 | 237 | // 2. 激活子任务 |
| 237 | 238 | List<Task> childrenTaskList = getTaskListByParentTaskId(task.getId()); |
| 238 | 239 | for (Task childrenTask : childrenTaskList) { |
| 239 | 240 | taskService.resolveTask(childrenTask.getId()); |
| 240 | 241 | // 更新子 task 状态 |
| 241 | - updateTaskStatus(childrenTask.getId(), BpmTaskStatustEnum.RUNNING.getStatus()); | |
| 242 | + updateTaskStatus(childrenTask.getId(), BpmTaskStatusEnum.RUNNING.getStatus()); | |
| 242 | 243 | } |
| 243 | 244 | } |
| 244 | 245 | |
| ... | ... | @@ -262,7 +263,7 @@ public class BpmTaskServiceImpl implements BpmTaskService { |
| 262 | 263 | // 1.2 只处理加签的父任务 |
| 263 | 264 | Task parentTask = validateTaskExist(parentTaskId); |
| 264 | 265 | String scopeType = parentTask.getScopeType(); |
| 265 | - if (BpmTaskSignTypeEnum.of(scopeType) == null){ | |
| 266 | + if (BpmTaskSignTypeEnum.of(scopeType) == null) { | |
| 266 | 267 | return; |
| 267 | 268 | } |
| 268 | 269 | |
| ... | ... | @@ -276,17 +277,17 @@ public class BpmTaskServiceImpl implements BpmTaskService { |
| 276 | 277 | // 3.1.1 owner 重新赋值给父任务的 assignee,这样它就可以被审批 |
| 277 | 278 | taskService.resolveTask(parentTaskId); |
| 278 | 279 | // 3.1.2 更新流程任务 status |
| 279 | - updateTaskStatus(parentTaskId, BpmTaskStatustEnum.RUNNING.getStatus()); | |
| 280 | + updateTaskStatus(parentTaskId, BpmTaskStatusEnum.RUNNING.getStatus()); | |
| 280 | 281 | // 3.2 情况二:处理向【向后】加签 |
| 281 | 282 | } else if (BpmTaskSignTypeEnum.AFTER.getType().equals(scopeType)) { |
| 282 | 283 | // 只有 parentTask 处于 APPROVING 的情况下,才可以继续 complete 完成 |
| 283 | 284 | // 否则,一个未审批的 parentTask 任务,在加签出来的任务都被减签的情况下,就直接完成审批,这样会存在问题 |
| 284 | 285 | Integer status = (Integer) parentTask.getTaskLocalVariables().get(BpmConstants.TASK_VARIABLE_STATUS); |
| 285 | - if (ObjectUtil.notEqual(status, BpmTaskStatustEnum.APPROVING.getStatus())) { | |
| 286 | + if (ObjectUtil.notEqual(status, BpmTaskStatusEnum.APPROVING.getStatus())) { | |
| 286 | 287 | return; |
| 287 | 288 | } |
| 288 | 289 | // 3.2.2 完成自己(因为它已经没有子任务,所以也可以完成) |
| 289 | - updateTaskStatus(parentTaskId, BpmTaskStatustEnum.APPROVE.getStatus()); | |
| 290 | + updateTaskStatus(parentTaskId, BpmTaskStatusEnum.APPROVE.getStatus()); | |
| 290 | 291 | taskService.complete(parentTaskId); |
| 291 | 292 | } |
| 292 | 293 | |
| ... | ... | @@ -312,7 +313,7 @@ public class BpmTaskServiceImpl implements BpmTaskService { |
| 312 | 313 | // 底层调用 TaskHelper.changeTaskAssignee(task, task.getOwner()):将 owner 设置为 assignee |
| 313 | 314 | taskService.resolveTask(task.getId()); |
| 314 | 315 | // 2.2 更新 task 状态 + 原因 |
| 315 | - updateTaskStatusAndReason(task.getId(), BpmTaskStatustEnum.RUNNING.getStatus(), reqVO.getReason()); | |
| 316 | + updateTaskStatusAndReason(task.getId(), BpmTaskStatusEnum.RUNNING.getStatus(), reqVO.getReason()); | |
| 316 | 317 | } |
| 317 | 318 | |
| 318 | 319 | @Override |
| ... | ... | @@ -327,7 +328,7 @@ public class BpmTaskServiceImpl implements BpmTaskService { |
| 327 | 328 | } |
| 328 | 329 | |
| 329 | 330 | // 2.1 更新流程实例为不通过 |
| 330 | - updateTaskStatusAndReason(task.getId(), BpmTaskStatustEnum.REJECT.getStatus(), reqVO.getReason()); | |
| 331 | + updateTaskStatusAndReason(task.getId(), BpmTaskStatusEnum.REJECT.getStatus(), reqVO.getReason()); | |
| 331 | 332 | // 2.2 添加评论 |
| 332 | 333 | taskService.addComment(task.getId(), task.getProcessInstanceId(), BpmCommentTypeEnum.REJECT.getType(), |
| 333 | 334 | BpmCommentTypeEnum.REJECT.formatComment(reqVO.getReason())); |
| ... | ... | @@ -379,7 +380,7 @@ public class BpmTaskServiceImpl implements BpmTaskService { |
| 379 | 380 | log.error("[updateTaskStatusWhenCreated][taskId({}) 已经有状态({})]", task.getId(), status); |
| 380 | 381 | return; |
| 381 | 382 | } |
| 382 | - updateTaskStatus(task.getId(), BpmTaskStatustEnum.RUNNING.getStatus()); | |
| 383 | + updateTaskStatus(task.getId(), BpmTaskStatusEnum.RUNNING.getStatus()); | |
| 383 | 384 | } |
| 384 | 385 | |
| 385 | 386 | @Override |
| ... | ... | @@ -393,11 +394,11 @@ public class BpmTaskServiceImpl implements BpmTaskService { |
| 393 | 394 | |
| 394 | 395 | // 2. 更新 task 状态 + 原因 |
| 395 | 396 | Integer status = (Integer) task.getTaskLocalVariables().get(BpmConstants.TASK_VARIABLE_STATUS); |
| 396 | - if (BpmTaskStatustEnum.isEndStatus(status)) { | |
| 397 | + if (BpmTaskStatusEnum.isEndStatus(status)) { | |
| 397 | 398 | log.error("[updateTaskStatusWhenCanceled][taskId({}) 处于结果({}),无需进行更新]", taskId, status); |
| 398 | 399 | return; |
| 399 | 400 | } |
| 400 | - updateTaskStatusAndReason(taskId, BpmTaskStatustEnum.CANCEL.getStatus(), BpmDeleteReasonEnum.CANCEL_BY_SYSTEM.getReason()); | |
| 401 | + updateTaskStatusAndReason(taskId, BpmTaskStatusEnum.CANCEL.getStatus(), BpmDeleteReasonEnum.CANCEL_BY_SYSTEM.getReason()); | |
| 401 | 402 | // 补充说明:由于 Task 被删除成 HistoricTask 后,无法通过 taskService.addComment 添加理由,所以无法存储具体的取消理由 |
| 402 | 403 | } |
| 403 | 404 | |
| ... | ... | @@ -526,7 +527,7 @@ public class BpmTaskServiceImpl implements BpmTaskService { |
| 526 | 527 | taskService.addComment(task.getId(), currentTask.getProcessInstanceId(), BpmCommentTypeEnum.RETURN.getType(), |
| 527 | 528 | BpmCommentTypeEnum.RETURN.formatComment(reqVO.getReason())); |
| 528 | 529 | // 2.2 更新 task 状态 + 原因 |
| 529 | - updateTaskStatusAndReason(task.getId(), BpmTaskStatustEnum.RETURN.getStatus(), reqVO.getReason()); | |
| 530 | + updateTaskStatusAndReason(task.getId(), BpmTaskStatusEnum.RETURN.getStatus(), reqVO.getReason()); | |
| 530 | 531 | }); |
| 531 | 532 | |
| 532 | 533 | // 3. 执行驳回 |
| ... | ... | @@ -563,7 +564,7 @@ public class BpmTaskServiceImpl implements BpmTaskService { |
| 563 | 564 | taskService.delegateTask(taskId, reqVO.getDelegateUserId().toString()); |
| 564 | 565 | // 3.3 更新 task 状态。 |
| 565 | 566 | // 为什么不更新原因?因为原因目前主要给审批通过、不通过时使用 |
| 566 | - updateTaskStatus(taskId, BpmTaskStatustEnum.DELEGATE.getStatus()); | |
| 567 | + updateTaskStatus(taskId, BpmTaskStatusEnum.DELEGATE.getStatus()); | |
| 567 | 568 | } |
| 568 | 569 | |
| 569 | 570 | @Override |
| ... | ... | @@ -617,7 +618,7 @@ public class BpmTaskServiceImpl implements BpmTaskService { |
| 617 | 618 | taskService.saveTask(taskEntity); |
| 618 | 619 | // 2.6 更新 task 状态为 WAIT,只有在向前加签的时候 |
| 619 | 620 | if (reqVO.getType().equals(BpmTaskSignTypeEnum.BEFORE.getType())) { |
| 620 | - updateTaskStatus(taskEntity.getId(), BpmTaskStatustEnum.WAIT.getStatus()); | |
| 621 | + updateTaskStatus(taskEntity.getId(), BpmTaskStatusEnum.WAIT.getStatus()); | |
| 621 | 622 | } |
| 622 | 623 | |
| 623 | 624 | // 3. 创建加签任务 |
| ... | ... | @@ -704,7 +705,7 @@ public class BpmTaskServiceImpl implements BpmTaskService { |
| 704 | 705 | |
| 705 | 706 | // 3. 向后前签,设置子任务的状态为 WAIT,因为需要等父任务审批完 |
| 706 | 707 | if (BpmTaskSignTypeEnum.AFTER.getType().equals(parentTask.getScopeType())) { |
| 707 | - updateTaskStatus(task.getId(), BpmTaskStatustEnum.WAIT.getStatus()); | |
| 708 | + updateTaskStatus(task.getId(), BpmTaskStatusEnum.WAIT.getStatus()); | |
| 708 | 709 | } |
| 709 | 710 | } |
| 710 | 711 | |
| ... | ... | @@ -728,8 +729,8 @@ public class BpmTaskServiceImpl implements BpmTaskService { |
| 728 | 729 | childTaskList.add(task); |
| 729 | 730 | // 2.2 更新子任务为已取消 |
| 730 | 731 | String cancelReason = StrUtil.format("任务被取消,原因:由于[{}]操作[减签],", cancelUser.getNickname()); |
| 731 | - childTaskList.forEach(childTask -> updateTaskStatusAndReason(childTask.getId(), BpmTaskStatustEnum.CANCEL.getStatus(), cancelReason)); | |
| 732 | - // 2.2 删除任务和所有子任务 | |
| 732 | + childTaskList.forEach(childTask -> updateTaskStatusAndReason(childTask.getId(), BpmTaskStatusEnum.CANCEL.getStatus(), cancelReason)); | |
| 733 | + // 2.3 删除任务和所有子任务 | |
| 733 | 734 | taskService.deleteTasks(convertList(childTaskList, Task::getId)); |
| 734 | 735 | |
| 735 | 736 | // 3. 记录日志到父任务中。先记录日志是因为,通过 handleParentTask 方法之后,任务可能被完成了,并且不存在了,会报异常,所以先记录 | ... | ... |
yudao-module-crm/yudao-module-crm-api/src/main/java/cn/iocoder/yudao/module/crm/enums/ErrorCodeConstants.java
| ... | ... | @@ -15,6 +15,7 @@ public interface ErrorCodeConstants { |
| 15 | 15 | ErrorCode CONTRACT_SUBMIT_FAIL_NOT_DRAFT = new ErrorCode(1_020_000_002, "合同提交审核失败,原因:合同没处在未提交状态"); |
| 16 | 16 | ErrorCode CONTRACT_UPDATE_AUDIT_STATUS_FAIL_NOT_PROCESS = new ErrorCode(1_020_000_003, "更新合同审核状态失败,原因:合同不是审核中状态"); |
| 17 | 17 | ErrorCode CONTRACT_NO_EXISTS = new ErrorCode(1_020_000_004, "生成合同序列号重复,请重试"); |
| 18 | + ErrorCode CONTRACT_DELETE_FAIL = new ErrorCode(1_020_000_005, "删除合同失败,原因:有被回款所使用"); | |
| 18 | 19 | |
| 19 | 20 | // ========== 线索管理 1-020-001-000 ========== |
| 20 | 21 | ErrorCode CLUE_NOT_EXISTS = new ErrorCode(1_020_001_000, "线索不存在"); |
| ... | ... | @@ -40,6 +41,7 @@ public interface ErrorCodeConstants { |
| 40 | 41 | ErrorCode RECEIVABLE_NO_EXISTS = new ErrorCode(1_020_004_005, "生成回款序列号重复,请重试"); |
| 41 | 42 | ErrorCode RECEIVABLE_CREATE_FAIL_CONTRACT_NOT_APPROVE = new ErrorCode(1_020_004_006, "创建回款失败,原因:合同不是审核通过状态"); |
| 42 | 43 | ErrorCode RECEIVABLE_CREATE_FAIL_PRICE_EXCEEDS_LIMIT = new ErrorCode(1_020_004_007, "创建回款失败,原因:回款金额超出合同金额,目前剩余可退:{} 元"); |
| 44 | + ErrorCode RECEIVABLE_DELETE_FAIL_IS_APPROVE = new ErrorCode(1_020_004_008, "删除回款失败,原因:回款审批已通过"); | |
| 43 | 45 | |
| 44 | 46 | // ========== 回款计划 1-020-005-000 ========== |
| 45 | 47 | ErrorCode RECEIVABLE_PLAN_NOT_EXISTS = new ErrorCode(1_020_005_000, "回款计划不存在"); |
| ... | ... | @@ -72,6 +74,7 @@ public interface ErrorCodeConstants { |
| 72 | 74 | ErrorCode CRM_PERMISSION_DELETE_DENIED = new ErrorCode(1_020_007_006, "删除数据权限失败,原因:没有权限"); |
| 73 | 75 | ErrorCode CRM_PERMISSION_DELETE_SELF_PERMISSION_FAIL_EXIST_OWNER = new ErrorCode(1_020_007_007, "删除数据权限失败,原因:不能删除负责人"); |
| 74 | 76 | ErrorCode CRM_PERMISSION_CREATE_FAIL = new ErrorCode(1_020_007_008, "创建数据权限失败,原因:所加用户已有权限"); |
| 77 | + ErrorCode CRM_PERMISSION_CREATE_FAIL_EXISTS = new ErrorCode(1_020_007_009, "同时添加数据权限失败,原因:用户【{}】已有模块【{}】数据【{}】的【{}】权限"); | |
| 75 | 78 | |
| 76 | 79 | // ========== 产品 1_020_008_000 ========== |
| 77 | 80 | ErrorCode PRODUCT_NOT_EXISTS = new ErrorCode(1_020_008_000, "产品不存在"); |
| ... | ... | @@ -100,4 +103,6 @@ public interface ErrorCodeConstants { |
| 100 | 103 | ErrorCode FOLLOW_UP_RECORD_NOT_EXISTS = new ErrorCode(1_020_013_000, "跟进记录不存在"); |
| 101 | 104 | ErrorCode FOLLOW_UP_RECORD_DELETE_DENIED = new ErrorCode(1_020_013_001, "删除跟进记录失败,原因:没有权限"); |
| 102 | 105 | |
| 106 | + // ========== 数据统计 1_020_014_000 ========== | |
| 107 | + | |
| 103 | 108 | } | ... | ... |
yudao-module-crm/yudao-module-crm-api/src/main/java/cn/iocoder/yudao/module/crm/enums/LogRecordConstants.java
| ... | ... | @@ -142,11 +142,11 @@ public interface LogRecordConstants { |
| 142 | 142 | |
| 143 | 143 | String CRM_RECEIVABLE_TYPE = "CRM 回款"; |
| 144 | 144 | String CRM_RECEIVABLE_CREATE_SUB_TYPE = "创建回款"; |
| 145 | - String CRM_RECEIVABLE_CREATE_SUCCESS = "创建了合同【{getContractById{#receivable.contractId}}】的第【{{#receivable.period}}】期回款"; | |
| 145 | + String CRM_RECEIVABLE_CREATE_SUCCESS = "创建了合同【{getContractById{#receivable.contractId}}】的{{#period != null ? '【第'+ #period +'期】' : '编号为【'+ #receivable.no +'】的'}}回款"; | |
| 146 | 146 | String CRM_RECEIVABLE_UPDATE_SUB_TYPE = "更新回款"; |
| 147 | - String CRM_RECEIVABLE_UPDATE_SUCCESS = "更新了合同【{getContractById{#receivable.contractId}}】的第【{{#receivable.period}}】期回款: {_DIFF{#updateReqVO}}"; | |
| 147 | + String CRM_RECEIVABLE_UPDATE_SUCCESS = "更新了合同【{getContractById{#receivable.contractId}}】的{{#period != null ? '【第'+ #period +'期】' : '编号为【'+ #receivable.no +'】的'}}回款: {_DIFF{#updateReqVO}}"; | |
| 148 | 148 | String CRM_RECEIVABLE_DELETE_SUB_TYPE = "删除回款"; |
| 149 | - String CRM_RECEIVABLE_DELETE_SUCCESS = "删除了合同【{getContractById{#receivable.contractId}}】的第【{{#receivable.period}}】期回款"; | |
| 149 | + String CRM_RECEIVABLE_DELETE_SUCCESS = "删除了合同【{getContractById{#receivable.contractId}}】的{{#period != null ? '【第'+ #period +'期】' : '编号为【'+ #receivable.no +'】的'}}回款"; | |
| 150 | 150 | String CRM_RECEIVABLE_SUBMIT_SUB_TYPE = "提交回款审批"; |
| 151 | 151 | String CRM_RECEIVABLE_SUBMIT_SUCCESS = "提交编号为【{{#receivableNo}}】的回款审批成功"; |
| 152 | 152 | ... | ... |
yudao-module-crm/yudao-module-crm-api/src/main/java/cn/iocoder/yudao/module/crm/enums/permission/CrmPermissionLevelEnum.java
| 1 | 1 | package cn.iocoder.yudao.module.crm.enums.permission; |
| 2 | 2 | |
| 3 | +import cn.hutool.core.collection.CollUtil; | |
| 3 | 4 | import cn.hutool.core.util.ObjUtil; |
| 4 | 5 | import cn.iocoder.yudao.framework.common.core.IntArrayValuable; |
| 5 | 6 | import lombok.AllArgsConstructor; |
| ... | ... | @@ -50,4 +51,10 @@ public enum CrmPermissionLevelEnum implements IntArrayValuable { |
| 50 | 51 | return ObjUtil.equal(WRITE.level, level); |
| 51 | 52 | } |
| 52 | 53 | |
| 54 | + public static String getNameByLevel(Integer level) { | |
| 55 | + CrmPermissionLevelEnum typeEnum = CollUtil.findOne(CollUtil.newArrayList(CrmPermissionLevelEnum.values()), | |
| 56 | + item -> ObjUtil.equal(item.level, level)); | |
| 57 | + return typeEnum == null ? null : typeEnum.getName(); | |
| 58 | + } | |
| 59 | + | |
| 53 | 60 | } | ... | ... |
yudao-module-crm/yudao-module-crm-biz/pom.xml
| ... | ... | @@ -36,10 +36,6 @@ |
| 36 | 36 | <!-- 业务组件 --> |
| 37 | 37 | <dependency> |
| 38 | 38 | <groupId>cn.iocoder.boot</groupId> |
| 39 | - <artifactId>yudao-spring-boot-starter-biz-operatelog</artifactId> | |
| 40 | - </dependency> | |
| 41 | - <dependency> | |
| 42 | - <groupId>cn.iocoder.boot</groupId> | |
| 43 | 39 | <artifactId>yudao-spring-boot-starter-biz-ip</artifactId> |
| 44 | 40 | </dependency> |
| 45 | 41 | <dependency> | ... | ... |
yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/controller/admin/business/CrmBusinessController.java
| 1 | 1 | package cn.iocoder.yudao.module.crm.controller.admin.business; |
| 2 | 2 | |
| 3 | 3 | import cn.hutool.core.collection.CollUtil; |
| 4 | +import cn.iocoder.yudao.framework.apilog.core.annotations.ApiAccessLog; | |
| 4 | 5 | import cn.iocoder.yudao.framework.common.pojo.CommonResult; |
| 5 | 6 | import cn.iocoder.yudao.framework.common.pojo.PageResult; |
| 6 | 7 | import cn.iocoder.yudao.framework.common.util.collection.MapUtils; |
| 7 | 8 | import cn.iocoder.yudao.framework.common.util.number.NumberUtils; |
| 8 | 9 | import cn.iocoder.yudao.framework.common.util.object.BeanUtils; |
| 9 | 10 | import cn.iocoder.yudao.framework.excel.core.util.ExcelUtils; |
| 10 | -import cn.iocoder.yudao.framework.operatelog.core.annotations.OperateLog; | |
| 11 | 11 | import cn.iocoder.yudao.module.crm.controller.admin.business.vo.business.*; |
| 12 | 12 | import cn.iocoder.yudao.module.crm.dal.dataobject.business.CrmBusinessDO; |
| 13 | 13 | import cn.iocoder.yudao.module.crm.dal.dataobject.business.CrmBusinessProductDO; |
| ... | ... | @@ -39,11 +39,11 @@ import java.util.List; |
| 39 | 39 | import java.util.Map; |
| 40 | 40 | import java.util.stream.Stream; |
| 41 | 41 | |
| 42 | +import static cn.iocoder.yudao.framework.apilog.core.enums.OperateTypeEnum.EXPORT; | |
| 42 | 43 | import static cn.iocoder.yudao.framework.common.exception.util.ServiceExceptionUtil.exception; |
| 43 | 44 | import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success; |
| 44 | 45 | import static cn.iocoder.yudao.framework.common.pojo.PageParam.PAGE_SIZE_NONE; |
| 45 | 46 | import static cn.iocoder.yudao.framework.common.util.collection.CollectionUtils.*; |
| 46 | -import static cn.iocoder.yudao.framework.operatelog.core.enums.OperateTypeEnum.EXPORT; | |
| 47 | 47 | import static cn.iocoder.yudao.framework.security.core.util.SecurityFrameworkUtils.getLoginUserId; |
| 48 | 48 | import static cn.iocoder.yudao.module.crm.enums.ErrorCodeConstants.CUSTOMER_NOT_EXISTS; |
| 49 | 49 | |
| ... | ... | @@ -167,7 +167,7 @@ public class CrmBusinessController { |
| 167 | 167 | @GetMapping("/export-excel") |
| 168 | 168 | @Operation(summary = "导出商机 Excel") |
| 169 | 169 | @PreAuthorize("@ss.hasPermission('crm:business:export')") |
| 170 | - @OperateLog(type = EXPORT) | |
| 170 | + @ApiAccessLog(operateType = EXPORT) | |
| 171 | 171 | public void exportBusinessExcel(@Valid CrmBusinessPageReqVO exportReqVO, |
| 172 | 172 | HttpServletResponse response) throws IOException { |
| 173 | 173 | exportReqVO.setPageSize(PAGE_SIZE_NONE); | ... | ... |
yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/controller/admin/business/vo/business/CrmBusinessSaveReqVO.java
| ... | ... | @@ -66,13 +66,13 @@ public class CrmBusinessSaveReqVO { |
| 66 | 66 | private Long contactId; // 使用场景,在【联系人详情】添加商机时,如果需要关联两者,需要传递 contactId 字段 |
| 67 | 67 | |
| 68 | 68 | @Schema(description = "产品列表") |
| 69 | - private List<Product> products; | |
| 69 | + private List<BusinessProduct> businessProducts; | |
| 70 | 70 | |
| 71 | 71 | @Schema(description = "产品列表") |
| 72 | 72 | @Data |
| 73 | 73 | @NoArgsConstructor |
| 74 | 74 | @AllArgsConstructor |
| 75 | - public static class Product { | |
| 75 | + public static class BusinessProduct { | |
| 76 | 76 | |
| 77 | 77 | @Schema(description = "产品编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "20529") |
| 78 | 78 | @NotNull(message = "产品编号不能为空") | ... | ... |
yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/controller/admin/business/vo/business/CrmBusinessTransferReqVO.java
| ... | ... | @@ -3,10 +3,14 @@ package cn.iocoder.yudao.module.crm.controller.admin.business.vo.business; |
| 3 | 3 | import cn.iocoder.yudao.module.crm.enums.permission.CrmPermissionLevelEnum; |
| 4 | 4 | import io.swagger.v3.oas.annotations.media.Schema; |
| 5 | 5 | import jakarta.validation.constraints.NotNull; |
| 6 | +import lombok.AllArgsConstructor; | |
| 6 | 7 | import lombok.Data; |
| 8 | +import lombok.NoArgsConstructor; | |
| 7 | 9 | |
| 8 | 10 | @Schema(description = "管理后台 - 商机转移 Request VO") |
| 9 | 11 | @Data |
| 12 | +@NoArgsConstructor | |
| 13 | +@AllArgsConstructor | |
| 10 | 14 | public class CrmBusinessTransferReqVO { |
| 11 | 15 | |
| 12 | 16 | @Schema(description = "商机编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "10430") | ... | ... |
yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/controller/admin/clue/CrmClueController.java
| 1 | 1 | package cn.iocoder.yudao.module.crm.controller.admin.clue; |
| 2 | 2 | |
| 3 | 3 | import cn.hutool.core.collection.CollUtil; |
| 4 | +import cn.iocoder.yudao.framework.apilog.core.annotations.ApiAccessLog; | |
| 4 | 5 | import cn.iocoder.yudao.framework.common.pojo.CommonResult; |
| 5 | 6 | import cn.iocoder.yudao.framework.common.pojo.PageResult; |
| 6 | 7 | import cn.iocoder.yudao.framework.common.util.collection.MapUtils; |
| ... | ... | @@ -8,7 +9,6 @@ import cn.iocoder.yudao.framework.common.util.number.NumberUtils; |
| 8 | 9 | import cn.iocoder.yudao.framework.common.util.object.BeanUtils; |
| 9 | 10 | import cn.iocoder.yudao.framework.excel.core.util.ExcelUtils; |
| 10 | 11 | import cn.iocoder.yudao.framework.ip.core.utils.AreaUtils; |
| 11 | -import cn.iocoder.yudao.framework.operatelog.core.annotations.OperateLog; | |
| 12 | 12 | import cn.iocoder.yudao.module.crm.controller.admin.clue.vo.CrmCluePageReqVO; |
| 13 | 13 | import cn.iocoder.yudao.module.crm.controller.admin.clue.vo.CrmClueRespVO; |
| 14 | 14 | import cn.iocoder.yudao.module.crm.controller.admin.clue.vo.CrmClueSaveReqVO; |
| ... | ... | @@ -37,11 +37,11 @@ import java.util.List; |
| 37 | 37 | import java.util.Map; |
| 38 | 38 | import java.util.stream.Stream; |
| 39 | 39 | |
| 40 | +import static cn.iocoder.yudao.framework.apilog.core.enums.OperateTypeEnum.EXPORT; | |
| 40 | 41 | import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success; |
| 41 | 42 | import static cn.iocoder.yudao.framework.common.pojo.PageParam.PAGE_SIZE_NONE; |
| 42 | 43 | import static cn.iocoder.yudao.framework.common.util.collection.CollectionUtils.convertListByFlatMap; |
| 43 | 44 | import static cn.iocoder.yudao.framework.common.util.collection.CollectionUtils.convertSet; |
| 44 | -import static cn.iocoder.yudao.framework.operatelog.core.enums.OperateTypeEnum.EXPORT; | |
| 45 | 45 | import static cn.iocoder.yudao.framework.security.core.util.SecurityFrameworkUtils.getLoginUserId; |
| 46 | 46 | import static java.util.Collections.singletonList; |
| 47 | 47 | |
| ... | ... | @@ -112,7 +112,7 @@ public class CrmClueController { |
| 112 | 112 | @GetMapping("/export-excel") |
| 113 | 113 | @Operation(summary = "导出线索 Excel") |
| 114 | 114 | @PreAuthorize("@ss.hasPermission('crm:clue:export')") |
| 115 | - @OperateLog(type = EXPORT) | |
| 115 | + @ApiAccessLog(operateType = EXPORT) | |
| 116 | 116 | public void exportClueExcel(@Valid CrmCluePageReqVO pageReqVO, HttpServletResponse response) throws IOException { |
| 117 | 117 | pageReqVO.setPageSize(PAGE_SIZE_NONE); |
| 118 | 118 | List<CrmClueDO> list = clueService.getCluePage(pageReqVO, getLoginUserId()).getList(); | ... | ... |
yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/controller/admin/contact/CrmContactController.java
| ... | ... | @@ -2,6 +2,7 @@ package cn.iocoder.yudao.module.crm.controller.admin.contact; |
| 2 | 2 | |
| 3 | 3 | import cn.hutool.core.collection.CollUtil; |
| 4 | 4 | import cn.hutool.core.lang.Assert; |
| 5 | +import cn.iocoder.yudao.framework.apilog.core.annotations.ApiAccessLog; | |
| 5 | 6 | import cn.iocoder.yudao.framework.common.pojo.CommonResult; |
| 6 | 7 | import cn.iocoder.yudao.framework.common.pojo.PageResult; |
| 7 | 8 | import cn.iocoder.yudao.framework.common.util.collection.MapUtils; |
| ... | ... | @@ -9,7 +10,6 @@ import cn.iocoder.yudao.framework.common.util.number.NumberUtils; |
| 9 | 10 | import cn.iocoder.yudao.framework.common.util.object.BeanUtils; |
| 10 | 11 | import cn.iocoder.yudao.framework.excel.core.util.ExcelUtils; |
| 11 | 12 | import cn.iocoder.yudao.framework.ip.core.utils.AreaUtils; |
| 12 | -import cn.iocoder.yudao.framework.operatelog.core.annotations.OperateLog; | |
| 13 | 13 | import cn.iocoder.yudao.module.crm.controller.admin.contact.vo.*; |
| 14 | 14 | import cn.iocoder.yudao.module.crm.dal.dataobject.contact.CrmContactDO; |
| 15 | 15 | import cn.iocoder.yudao.module.crm.dal.dataobject.customer.CrmCustomerDO; |
| ... | ... | @@ -37,11 +37,11 @@ import java.util.List; |
| 37 | 37 | import java.util.Map; |
| 38 | 38 | import java.util.stream.Stream; |
| 39 | 39 | |
| 40 | +import static cn.iocoder.yudao.framework.apilog.core.enums.OperateTypeEnum.EXPORT; | |
| 40 | 41 | import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success; |
| 41 | 42 | import static cn.iocoder.yudao.framework.common.pojo.PageParam.PAGE_SIZE_NONE; |
| 42 | 43 | import static cn.iocoder.yudao.framework.common.util.collection.CollectionUtils.*; |
| 43 | 44 | import static cn.iocoder.yudao.framework.common.util.collection.MapUtils.findAndThen; |
| 44 | -import static cn.iocoder.yudao.framework.operatelog.core.enums.OperateTypeEnum.EXPORT; | |
| 45 | 45 | import static cn.iocoder.yudao.framework.security.core.util.SecurityFrameworkUtils.getLoginUserId; |
| 46 | 46 | import static java.util.Collections.singletonList; |
| 47 | 47 | |
| ... | ... | @@ -73,7 +73,6 @@ public class CrmContactController { |
| 73 | 73 | |
| 74 | 74 | @PutMapping("/update") |
| 75 | 75 | @Operation(summary = "更新联系人") |
| 76 | - @OperateLog(enable = false) | |
| 77 | 76 | @PreAuthorize("@ss.hasPermission('crm:contact:update')") |
| 78 | 77 | public CommonResult<Boolean> updateContact(@Valid @RequestBody CrmContactSaveReqVO updateReqVO) { |
| 79 | 78 | contactService.updateContact(updateReqVO); |
| ... | ... | @@ -142,7 +141,7 @@ public class CrmContactController { |
| 142 | 141 | @GetMapping("/export-excel") |
| 143 | 142 | @Operation(summary = "导出联系人 Excel") |
| 144 | 143 | @PreAuthorize("@ss.hasPermission('crm:contact:export')") |
| 145 | - @OperateLog(type = EXPORT) | |
| 144 | + @ApiAccessLog(operateType = EXPORT) | |
| 146 | 145 | public void exportContactExcel(@Valid CrmContactPageReqVO exportReqVO, |
| 147 | 146 | HttpServletResponse response) throws IOException { |
| 148 | 147 | exportReqVO.setPageNo(PAGE_SIZE_NONE); | ... | ... |
yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/controller/admin/contact/vo/CrmContactTransferReqVO.java
| ... | ... | @@ -2,12 +2,16 @@ package cn.iocoder.yudao.module.crm.controller.admin.contact.vo; |
| 2 | 2 | |
| 3 | 3 | import cn.iocoder.yudao.module.crm.enums.permission.CrmPermissionLevelEnum; |
| 4 | 4 | import io.swagger.v3.oas.annotations.media.Schema; |
| 5 | +import lombok.AllArgsConstructor; | |
| 5 | 6 | import lombok.Data; |
| 6 | 7 | |
| 7 | 8 | import jakarta.validation.constraints.NotNull; |
| 9 | +import lombok.NoArgsConstructor; | |
| 8 | 10 | |
| 9 | 11 | @Schema(description = "管理后台 - CRM 联系人转移 Request VO") |
| 10 | 12 | @Data |
| 13 | +@NoArgsConstructor | |
| 14 | +@AllArgsConstructor | |
| 11 | 15 | public class CrmContactTransferReqVO { |
| 12 | 16 | |
| 13 | 17 | @Schema(description = "联系人编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "10430") | ... | ... |
yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/controller/admin/contract/CrmContractController.java
| ... | ... | @@ -2,6 +2,7 @@ package cn.iocoder.yudao.module.crm.controller.admin.contract; |
| 2 | 2 | |
| 3 | 3 | import cn.hutool.core.collection.CollUtil; |
| 4 | 4 | import cn.hutool.core.lang.Assert; |
| 5 | +import cn.iocoder.yudao.framework.apilog.core.annotations.ApiAccessLog; | |
| 5 | 6 | import cn.iocoder.yudao.framework.common.pojo.CommonResult; |
| 6 | 7 | import cn.iocoder.yudao.framework.common.pojo.PageParam; |
| 7 | 8 | import cn.iocoder.yudao.framework.common.pojo.PageResult; |
| ... | ... | @@ -9,7 +10,6 @@ import cn.iocoder.yudao.framework.common.util.collection.MapUtils; |
| 9 | 10 | import cn.iocoder.yudao.framework.common.util.number.NumberUtils; |
| 10 | 11 | import cn.iocoder.yudao.framework.common.util.object.BeanUtils; |
| 11 | 12 | import cn.iocoder.yudao.framework.excel.core.util.ExcelUtils; |
| 12 | -import cn.iocoder.yudao.framework.operatelog.core.annotations.OperateLog; | |
| 13 | 13 | import cn.iocoder.yudao.module.crm.controller.admin.contract.vo.contract.CrmContractPageReqVO; |
| 14 | 14 | import cn.iocoder.yudao.module.crm.controller.admin.contract.vo.contract.CrmContractRespVO; |
| 15 | 15 | import cn.iocoder.yudao.module.crm.controller.admin.contract.vo.contract.CrmContractSaveReqVO; |
| ... | ... | @@ -47,10 +47,10 @@ import java.util.List; |
| 47 | 47 | import java.util.Map; |
| 48 | 48 | import java.util.stream.Stream; |
| 49 | 49 | |
| 50 | +import static cn.iocoder.yudao.framework.apilog.core.enums.OperateTypeEnum.EXPORT; | |
| 50 | 51 | import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success; |
| 51 | 52 | import static cn.iocoder.yudao.framework.common.util.collection.CollectionUtils.*; |
| 52 | 53 | import static cn.iocoder.yudao.framework.common.util.collection.MapUtils.findAndThen; |
| 53 | -import static cn.iocoder.yudao.framework.operatelog.core.enums.OperateTypeEnum.EXPORT; | |
| 54 | 54 | import static cn.iocoder.yudao.framework.security.core.util.SecurityFrameworkUtils.getLoginUserId; |
| 55 | 55 | import static java.util.Collections.singletonList; |
| 56 | 56 | |
| ... | ... | @@ -154,7 +154,7 @@ public class CrmContractController { |
| 154 | 154 | @GetMapping("/export-excel") |
| 155 | 155 | @Operation(summary = "导出合同 Excel") |
| 156 | 156 | @PreAuthorize("@ss.hasPermission('crm:contract:export')") |
| 157 | - @OperateLog(type = EXPORT) | |
| 157 | + @ApiAccessLog(operateType = EXPORT) | |
| 158 | 158 | public void exportContractExcel(@Valid CrmContractPageReqVO exportReqVO, |
| 159 | 159 | HttpServletResponse response) throws IOException { |
| 160 | 160 | PageResult<CrmContractDO> pageResult = contractService.getContractPage(exportReqVO, getLoginUserId()); | ... | ... |
yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/controller/admin/contract/vo/contract/CrmContractTransferReqVO.java
| ... | ... | @@ -3,12 +3,16 @@ package cn.iocoder.yudao.module.crm.controller.admin.contract.vo.contract; |
| 3 | 3 | import cn.iocoder.yudao.framework.common.validation.InEnum; |
| 4 | 4 | import cn.iocoder.yudao.module.crm.enums.permission.CrmPermissionLevelEnum; |
| 5 | 5 | import io.swagger.v3.oas.annotations.media.Schema; |
| 6 | +import lombok.AllArgsConstructor; | |
| 6 | 7 | import lombok.Data; |
| 7 | 8 | |
| 8 | 9 | import jakarta.validation.constraints.NotNull; |
| 10 | +import lombok.NoArgsConstructor; | |
| 9 | 11 | |
| 10 | 12 | @Schema(description = "管理后台 - CRM 合同转移 Request VO") |
| 11 | 13 | @Data |
| 14 | +@NoArgsConstructor | |
| 15 | +@AllArgsConstructor | |
| 12 | 16 | public class CrmContractTransferReqVO { |
| 13 | 17 | |
| 14 | 18 | @Schema(description = "合同编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "10430") | ... | ... |
yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/controller/admin/customer/CrmCustomerController.java
| ... | ... | @@ -2,6 +2,7 @@ package cn.iocoder.yudao.module.crm.controller.admin.customer; |
| 2 | 2 | |
| 3 | 3 | import cn.hutool.core.collection.CollUtil; |
| 4 | 4 | import cn.hutool.core.map.MapUtil; |
| 5 | +import cn.iocoder.yudao.framework.apilog.core.annotations.ApiAccessLog; | |
| 5 | 6 | import cn.iocoder.yudao.framework.common.core.KeyValue; |
| 6 | 7 | import cn.iocoder.yudao.framework.common.pojo.CommonResult; |
| 7 | 8 | import cn.iocoder.yudao.framework.common.pojo.PageResult; |
| ... | ... | @@ -10,11 +11,8 @@ import cn.iocoder.yudao.framework.common.util.collection.MapUtils; |
| 10 | 11 | import cn.iocoder.yudao.framework.common.util.date.LocalDateTimeUtils; |
| 11 | 12 | import cn.iocoder.yudao.framework.common.util.number.NumberUtils; |
| 12 | 13 | import cn.iocoder.yudao.framework.common.util.object.BeanUtils; |
| 13 | -import cn.iocoder.yudao.framework.excel.core.enums.ExcelColumn; | |
| 14 | 14 | import cn.iocoder.yudao.framework.excel.core.util.ExcelUtils; |
| 15 | -import cn.iocoder.yudao.framework.ip.core.Area; | |
| 16 | 15 | import cn.iocoder.yudao.framework.ip.core.utils.AreaUtils; |
| 17 | -import cn.iocoder.yudao.framework.operatelog.core.annotations.OperateLog; | |
| 18 | 16 | import cn.iocoder.yudao.module.crm.controller.admin.customer.vo.customer.*; |
| 19 | 17 | import cn.iocoder.yudao.module.crm.dal.dataobject.customer.CrmCustomerDO; |
| 20 | 18 | import cn.iocoder.yudao.module.crm.dal.dataobject.customer.CrmCustomerPoolConfigDO; |
| ... | ... | @@ -38,18 +36,16 @@ import org.springframework.web.bind.annotation.*; |
| 38 | 36 | |
| 39 | 37 | import java.io.IOException; |
| 40 | 38 | import java.time.LocalDateTime; |
| 41 | -import java.util.ArrayList; | |
| 42 | 39 | import java.util.Arrays; |
| 43 | 40 | import java.util.List; |
| 44 | 41 | import java.util.Map; |
| 45 | 42 | import java.util.stream.Stream; |
| 46 | 43 | |
| 44 | +import static cn.iocoder.yudao.framework.apilog.core.enums.OperateTypeEnum.EXPORT; | |
| 47 | 45 | import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success; |
| 48 | 46 | import static cn.iocoder.yudao.framework.common.pojo.PageParam.PAGE_SIZE_NONE; |
| 49 | 47 | import static cn.iocoder.yudao.framework.common.util.collection.CollectionUtils.*; |
| 50 | -import static cn.iocoder.yudao.framework.operatelog.core.enums.OperateTypeEnum.EXPORT; | |
| 51 | 48 | import static cn.iocoder.yudao.framework.security.core.util.SecurityFrameworkUtils.getLoginUserId; |
| 52 | -import static cn.iocoder.yudao.module.crm.enums.DictTypeConstants.*; | |
| 53 | 49 | import static java.util.Collections.singletonList; |
| 54 | 50 | |
| 55 | 51 | @Tag(name = "管理后台 - CRM 客户") |
| ... | ... | @@ -67,8 +63,6 @@ public class CrmCustomerController { |
| 67 | 63 | private DeptApi deptApi; |
| 68 | 64 | @Resource |
| 69 | 65 | private AdminUserApi adminUserApi; |
| 70 | - @Resource | |
| 71 | - private DictDataApi dictDataApi; | |
| 72 | 66 | |
| 73 | 67 | @PostMapping("/create") |
| 74 | 68 | @Operation(summary = "创建客户") |
| ... | ... | @@ -142,7 +136,7 @@ public class CrmCustomerController { |
| 142 | 136 | return java.util.Collections.emptyList(); |
| 143 | 137 | } |
| 144 | 138 | // 1.1 获取创建人、负责人列表 |
| 145 | - Map<Long, AdminUserRespDTO> userMap = adminUserApi.getUserMap(convertListByFlatMap(list, | |
| 139 | + Map<Long, AdminUserRespDTO> userMap = adminUserApi.getUserMap(convertSetByFlatMap(list, | |
| 146 | 140 | contact -> Stream.of(NumberUtils.parseLong(contact.getCreator()), contact.getOwnerUserId()))); |
| 147 | 141 | Map<Long, DeptRespDTO> deptMap = deptApi.getDeptMap(convertSet(userMap.values(), AdminUserRespDTO::getDeptId)); |
| 148 | 142 | // 1.2 获取距离进入公海的时间 |
| ... | ... | @@ -242,7 +236,7 @@ public class CrmCustomerController { |
| 242 | 236 | @GetMapping("/export-excel") |
| 243 | 237 | @Operation(summary = "导出客户 Excel") |
| 244 | 238 | @PreAuthorize("@ss.hasPermission('crm:customer:export')") |
| 245 | - @OperateLog(type = EXPORT) | |
| 239 | + @ApiAccessLog(operateType = EXPORT) | |
| 246 | 240 | public void exportCustomerExcel(@Valid CrmCustomerPageReqVO pageVO, |
| 247 | 241 | HttpServletResponse response) throws IOException { |
| 248 | 242 | pageVO.setPageSize(PAGE_SIZE_NONE); // 不分页 |
| ... | ... | @@ -265,31 +259,13 @@ public class CrmCustomerController { |
| 265 | 259 | .areaId(null).detailAddress("").remark("").build() |
| 266 | 260 | ); |
| 267 | 261 | // 输出 |
| 268 | - ExcelUtils.write(response, "客户导入模板.xls", "客户列表", CrmCustomerImportExcelVO.class, list, builderSelectMap()); | |
| 269 | - } | |
| 270 | - | |
| 271 | - private List<KeyValue<ExcelColumn, List<String>>> builderSelectMap() { | |
| 272 | - List<KeyValue<ExcelColumn, List<String>>> selectMap = new ArrayList<>(); | |
| 273 | - // 获取地区下拉数据 | |
| 274 | - // TODO @puhui999:嘿嘿,这里改成省份、城市、区域,三个选项,难度大么? | |
| 275 | - Area area = AreaUtils.getArea(Area.ID_CHINA); | |
| 276 | - selectMap.add(new KeyValue<>(ExcelColumn.G, AreaUtils.getAreaNodePathList(area.getChildren()))); | |
| 277 | - // 获取客户所属行业 | |
| 278 | - List<String> customerIndustries = dictDataApi.getDictDataLabelList(CRM_CUSTOMER_INDUSTRY); | |
| 279 | - selectMap.add(new KeyValue<>(ExcelColumn.I, customerIndustries)); | |
| 280 | - // 获取客户等级 | |
| 281 | - List<String> customerLevels = dictDataApi.getDictDataLabelList(CRM_CUSTOMER_LEVEL); | |
| 282 | - selectMap.add(new KeyValue<>(ExcelColumn.J, customerLevels)); | |
| 283 | - // 获取客户来源 | |
| 284 | - List<String> customerSources = dictDataApi.getDictDataLabelList(CRM_CUSTOMER_SOURCE); | |
| 285 | - selectMap.add(new KeyValue<>(ExcelColumn.K, customerSources)); | |
| 286 | - return selectMap; | |
| 262 | + ExcelUtils.write(response, "客户导入模板.xls", "客户列表", CrmCustomerImportExcelVO.class, list); | |
| 287 | 263 | } |
| 288 | 264 | |
| 289 | 265 | @PostMapping("/import") |
| 290 | 266 | @Operation(summary = "导入客户") |
| 291 | 267 | @PreAuthorize("@ss.hasPermission('system:customer:import')") |
| 292 | - public CommonResult<CrmCustomerImportRespVO> importExcel(@Valid @RequestBody CrmCustomerImportReqVO importReqVO) | |
| 268 | + public CommonResult<CrmCustomerImportRespVO> importExcel(@Valid CrmCustomerImportReqVO importReqVO) | |
| 293 | 269 | throws Exception { |
| 294 | 270 | List<CrmCustomerImportExcelVO> list = ExcelUtils.read(importReqVO.getFile(), CrmCustomerImportExcelVO.class); |
| 295 | 271 | return success(customerService.importCustomerList(list, importReqVO)); | ... | ... |
yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/controller/admin/customer/vo/customer/CrmCustomerImportExcelVO.java
| 1 | 1 | package cn.iocoder.yudao.module.crm.controller.admin.customer.vo.customer; |
| 2 | 2 | |
| 3 | 3 | import cn.iocoder.yudao.framework.excel.core.annotations.DictFormat; |
| 4 | +import cn.iocoder.yudao.framework.excel.core.annotations.ExcelColumnSelect; | |
| 4 | 5 | import cn.iocoder.yudao.framework.excel.core.convert.AreaConvert; |
| 5 | 6 | import cn.iocoder.yudao.framework.excel.core.convert.DictConvert; |
| 7 | +import cn.iocoder.yudao.module.crm.framework.excel.core.AreaExcelColumnSelectFunction; | |
| 6 | 8 | import com.alibaba.excel.annotation.ExcelProperty; |
| 7 | 9 | import lombok.AllArgsConstructor; |
| 8 | 10 | import lombok.Builder; |
| ... | ... | @@ -41,6 +43,7 @@ public class CrmCustomerImportExcelVO { |
| 41 | 43 | private String email; |
| 42 | 44 | |
| 43 | 45 | @ExcelProperty(value = "地区", converter = AreaConvert.class) |
| 46 | + @ExcelColumnSelect(functionName = AreaExcelColumnSelectFunction.NAME) | |
| 44 | 47 | private Integer areaId; |
| 45 | 48 | |
| 46 | 49 | @ExcelProperty("详细地址") |
| ... | ... | @@ -48,14 +51,17 @@ public class CrmCustomerImportExcelVO { |
| 48 | 51 | |
| 49 | 52 | @ExcelProperty(value = "所属行业", converter = DictConvert.class) |
| 50 | 53 | @DictFormat(CRM_CUSTOMER_INDUSTRY) |
| 54 | + @ExcelColumnSelect(dictType = CRM_CUSTOMER_INDUSTRY) | |
| 51 | 55 | private Integer industryId; |
| 52 | 56 | |
| 53 | 57 | @ExcelProperty(value = "客户等级", converter = DictConvert.class) |
| 54 | 58 | @DictFormat(CRM_CUSTOMER_LEVEL) |
| 59 | + @ExcelColumnSelect(dictType = CRM_CUSTOMER_LEVEL) | |
| 55 | 60 | private Integer level; |
| 56 | 61 | |
| 57 | 62 | @ExcelProperty(value = "客户来源", converter = DictConvert.class) |
| 58 | 63 | @DictFormat(CRM_CUSTOMER_SOURCE) |
| 64 | + @ExcelColumnSelect(dictType = CRM_CUSTOMER_SOURCE) | |
| 59 | 65 | private Integer source; |
| 60 | 66 | |
| 61 | 67 | @ExcelProperty("备注") | ... | ... |
yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/controller/admin/customer/vo/customer/CrmCustomerTransferReqVO.java
| ... | ... | @@ -5,6 +5,8 @@ import io.swagger.v3.oas.annotations.media.Schema; |
| 5 | 5 | import jakarta.validation.constraints.NotNull; |
| 6 | 6 | import lombok.Data; |
| 7 | 7 | |
| 8 | +import java.util.List; | |
| 9 | + | |
| 8 | 10 | @Schema(description = "管理后台 - CRM 客户转移 Request VO") |
| 9 | 11 | @Data |
| 10 | 12 | public class CrmCustomerTransferReqVO { |
| ... | ... | @@ -28,4 +30,10 @@ public class CrmCustomerTransferReqVO { |
| 28 | 30 | @Schema(description = "老负责人加入团队后的权限级别", requiredMode = Schema.RequiredMode.REQUIRED, example = "2") |
| 29 | 31 | private Integer oldOwnerPermissionLevel; |
| 30 | 32 | |
| 33 | + /** | |
| 34 | + * 转移客户时,需要额外有【联系人】【商机】【合同】的 checkbox 选择。选中时,也一起转移 | |
| 35 | + */ | |
| 36 | + @Schema(description = "同时转移", requiredMode = Schema.RequiredMode.REQUIRED, example = "10430") | |
| 37 | + private List<Integer> toBizTypes; | |
| 38 | + | |
| 31 | 39 | } | ... | ... |
yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/controller/admin/operatelog/CrmOperateLogController.java
| ... | ... | @@ -8,7 +8,7 @@ import cn.iocoder.yudao.module.crm.controller.admin.operatelog.vo.CrmOperateLogR |
| 8 | 8 | import cn.iocoder.yudao.module.crm.enums.LogRecordConstants; |
| 9 | 9 | import cn.iocoder.yudao.module.crm.enums.common.CrmBizTypeEnum; |
| 10 | 10 | import cn.iocoder.yudao.module.system.api.logger.OperateLogApi; |
| 11 | -import cn.iocoder.yudao.module.system.api.logger.dto.OperateLogV2PageReqDTO; | |
| 11 | +import cn.iocoder.yudao.module.system.api.logger.dto.OperateLogPageReqDTO; | |
| 12 | 12 | import io.swagger.v3.oas.annotations.Operation; |
| 13 | 13 | import io.swagger.v3.oas.annotations.tags.Tag; |
| 14 | 14 | import jakarta.annotation.Resource; |
| ... | ... | @@ -55,9 +55,9 @@ public class CrmOperateLogController { |
| 55 | 55 | @Operation(summary = "获得操作日志") |
| 56 | 56 | @PreAuthorize("@ss.hasPermission('crm:operate-log:query')") |
| 57 | 57 | public CommonResult<PageResult<CrmOperateLogRespVO>> getCustomerOperateLog(@Valid CrmOperateLogPageReqVO pageReqVO) { |
| 58 | - OperateLogV2PageReqDTO reqDTO = new OperateLogV2PageReqDTO(); | |
| 58 | + OperateLogPageReqDTO reqDTO = new OperateLogPageReqDTO(); | |
| 59 | 59 | reqDTO.setPageSize(PAGE_SIZE_NONE); // 默认不分页,需要分页需注释 |
| 60 | - reqDTO.setBizType(BIZ_TYPE_MAP.get(pageReqVO.getBizType())).setBizId(pageReqVO.getBizId()); | |
| 60 | + reqDTO.setType(BIZ_TYPE_MAP.get(pageReqVO.getBizType())).setBizId(pageReqVO.getBizId()); | |
| 61 | 61 | return success(BeanUtils.toBean(operateLogApi.getOperateLogPage(reqDTO), CrmOperateLogRespVO.class)); |
| 62 | 62 | } |
| 63 | 63 | ... | ... |
yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/controller/admin/permission/CrmPermissionController.java
| 1 | 1 | package cn.iocoder.yudao.module.crm.controller.admin.permission; |
| 2 | 2 | |
| 3 | 3 | import cn.hutool.core.collection.CollUtil; |
| 4 | +import cn.hutool.extra.spring.SpringUtil; | |
| 4 | 5 | import cn.iocoder.yudao.framework.common.pojo.CommonResult; |
| 5 | 6 | import cn.iocoder.yudao.framework.common.util.collection.CollectionUtils; |
| 6 | 7 | import cn.iocoder.yudao.framework.common.util.collection.MapUtils; |
| 7 | 8 | import cn.iocoder.yudao.framework.common.util.object.BeanUtils; |
| 8 | -import cn.iocoder.yudao.module.crm.controller.admin.permission.vo.CrmPermissionCreateReqVO; | |
| 9 | 9 | import cn.iocoder.yudao.module.crm.controller.admin.permission.vo.CrmPermissionRespVO; |
| 10 | +import cn.iocoder.yudao.module.crm.controller.admin.permission.vo.CrmPermissionSaveReqVO; | |
| 10 | 11 | import cn.iocoder.yudao.module.crm.controller.admin.permission.vo.CrmPermissionUpdateReqVO; |
| 12 | +import cn.iocoder.yudao.module.crm.dal.dataobject.business.CrmBusinessDO; | |
| 13 | +import cn.iocoder.yudao.module.crm.dal.dataobject.contact.CrmContactDO; | |
| 14 | +import cn.iocoder.yudao.module.crm.dal.dataobject.contract.CrmContractDO; | |
| 11 | 15 | import cn.iocoder.yudao.module.crm.dal.dataobject.permission.CrmPermissionDO; |
| 16 | +import cn.iocoder.yudao.module.crm.enums.common.CrmBizTypeEnum; | |
| 12 | 17 | import cn.iocoder.yudao.module.crm.enums.permission.CrmPermissionLevelEnum; |
| 13 | 18 | import cn.iocoder.yudao.module.crm.framework.permission.core.annotations.CrmPermission; |
| 19 | +import cn.iocoder.yudao.module.crm.service.business.CrmBusinessService; | |
| 20 | +import cn.iocoder.yudao.module.crm.service.contact.CrmContactService; | |
| 21 | +import cn.iocoder.yudao.module.crm.service.contract.CrmContractService; | |
| 14 | 22 | import cn.iocoder.yudao.module.crm.service.permission.CrmPermissionService; |
| 15 | 23 | import cn.iocoder.yudao.module.crm.service.permission.bo.CrmPermissionCreateReqBO; |
| 16 | 24 | import cn.iocoder.yudao.module.system.api.dept.DeptApi; |
| ... | ... | @@ -27,13 +35,11 @@ import io.swagger.v3.oas.annotations.tags.Tag; |
| 27 | 35 | import jakarta.annotation.Resource; |
| 28 | 36 | import jakarta.validation.Valid; |
| 29 | 37 | import org.springframework.security.access.prepost.PreAuthorize; |
| 38 | +import org.springframework.transaction.annotation.Transactional; | |
| 30 | 39 | import org.springframework.validation.annotation.Validated; |
| 31 | 40 | import org.springframework.web.bind.annotation.*; |
| 32 | 41 | |
| 33 | -import java.util.Collection; | |
| 34 | -import java.util.Collections; | |
| 35 | -import java.util.List; | |
| 36 | -import java.util.Map; | |
| 42 | +import java.util.*; | |
| 37 | 43 | import java.util.stream.Stream; |
| 38 | 44 | |
| 39 | 45 | import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success; |
| ... | ... | @@ -50,7 +56,6 @@ public class CrmPermissionController { |
| 50 | 56 | |
| 51 | 57 | @Resource |
| 52 | 58 | private CrmPermissionService permissionService; |
| 53 | - | |
| 54 | 59 | @Resource |
| 55 | 60 | private AdminUserApi adminUserApi; |
| 56 | 61 | @Resource |
| ... | ... | @@ -61,9 +66,8 @@ public class CrmPermissionController { |
| 61 | 66 | @PostMapping("/create") |
| 62 | 67 | @Operation(summary = "创建数据权限") |
| 63 | 68 | @PreAuthorize("@ss.hasPermission('crm:permission:create')") |
| 64 | - @CrmPermission(bizTypeValue = "#reqVO.bizType", bizId = "#reqVO.bizId", level = CrmPermissionLevelEnum.OWNER) | |
| 65 | - public CommonResult<Boolean> addPermission(@Valid @RequestBody CrmPermissionCreateReqVO reqVO) { | |
| 66 | - permissionService.createPermission(BeanUtils.toBean(reqVO, CrmPermissionCreateReqBO.class)); | |
| 69 | + public CommonResult<Boolean> create(@Valid @RequestBody CrmPermissionSaveReqVO reqVO) { | |
| 70 | + permissionService.createPermission(reqVO, getLoginUserId()); | |
| 67 | 71 | return success(true); |
| 68 | 72 | } |
| 69 | 73 | ... | ... |