Commit 9b9f54bb036163eab0cb34320e072f3d0d790b4f
Merge branch 'master-jdk21' of https://gitee.com/zhijiantianya/ruoyi-vue-pro into develop
# Conflicts: # yudao-dependencies/pom.xml # yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/controller/admin/customer/CrmCustomerController.java # yudao-module-erp/yudao-module-erp-biz/src/main/java/cn/iocoder/yudao/module/erp/controller/admin/purchase/ErpPurchaseOrderController.java
Showing
199 changed files
with
1792 additions
and
3279 deletions
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: 04/04/2024 01:17:25 | |
| 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 = 35925 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 = 16462 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 | -- ---------------------------- |
| ... | ... | @@ -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 |
| ... | ... | @@ -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 |
| ... | ... | @@ -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 = 3067 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci COMMENT = '系统访问记录'; | |
| 1414 | 1424 | |
| 1415 | 1425 | -- ---------------------------- |
| 1416 | 1426 | -- Records of system_login_log |
| ... | ... | @@ -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'); |
| ... | ... | @@ -2453,7 +2457,7 @@ CREATE TABLE `system_oauth2_access_token` ( |
| 2453 | 2457 | PRIMARY KEY (`id`) USING BTREE, |
| 2454 | 2458 | INDEX `idx_access_token`(`access_token` ASC) USING BTREE, |
| 2455 | 2459 | INDEX `idx_refresh_token`(`refresh_token` ASC) USING BTREE |
| 2456 | -) ENGINE = InnoDB AUTO_INCREMENT = 6042 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci COMMENT = 'OAuth2 访问令牌'; | |
| 2460 | +) ENGINE = InnoDB AUTO_INCREMENT = 6372 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci COMMENT = 'OAuth2 访问令牌'; | |
| 2457 | 2461 | |
| 2458 | 2462 | -- ---------------------------- |
| 2459 | 2463 | -- Records of system_oauth2_access_token |
| ... | ... | @@ -2575,7 +2579,7 @@ CREATE TABLE `system_oauth2_refresh_token` ( |
| 2575 | 2579 | `deleted` bit(1) NOT NULL DEFAULT b'0' COMMENT '是否删除', |
| 2576 | 2580 | `tenant_id` bigint NOT NULL DEFAULT 0 COMMENT '租户编号', |
| 2577 | 2581 | PRIMARY KEY (`id`) USING BTREE |
| 2578 | -) ENGINE = InnoDB AUTO_INCREMENT = 1415 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci COMMENT = 'OAuth2 刷新令牌'; | |
| 2582 | +) ENGINE = InnoDB AUTO_INCREMENT = 1442 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci COMMENT = 'OAuth2 刷新令牌'; | |
| 2579 | 2583 | |
| 2580 | 2584 | -- ---------------------------- |
| 2581 | 2585 | -- Records of system_oauth2_refresh_token |
| ... | ... | @@ -2592,46 +2596,6 @@ CREATE TABLE `system_operate_log` ( |
| 2592 | 2596 | `trace_id` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '' COMMENT '链路追踪编号', |
| 2593 | 2597 | `user_id` bigint NOT NULL COMMENT '用户编号', |
| 2594 | 2598 | `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 | 2599 | `type` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL COMMENT '操作模块类型', |
| 2636 | 2600 | `sub_type` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL COMMENT '操作名', |
| 2637 | 2601 | `biz_id` bigint NOT NULL COMMENT '操作数据模块编号', |
| ... | ... | @@ -2648,10 +2612,10 @@ CREATE TABLE `system_operate_log_v2` ( |
| 2648 | 2612 | `deleted` bit(1) NOT NULL DEFAULT b'0' COMMENT '是否删除', |
| 2649 | 2613 | `tenant_id` bigint NOT NULL DEFAULT 0 COMMENT '租户编号', |
| 2650 | 2614 | PRIMARY KEY (`id`) USING BTREE |
| 2651 | -) ENGINE = InnoDB AUTO_INCREMENT = 9018 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci COMMENT = '操作日志记录 V2 版本'; | |
| 2615 | +) ENGINE = InnoDB AUTO_INCREMENT = 9019 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci COMMENT = '操作日志记录 V2 版本'; | |
| 2652 | 2616 | |
| 2653 | 2617 | -- ---------------------------- |
| 2654 | --- Records of system_operate_log_v2 | |
| 2618 | +-- Records of system_operate_log | |
| 2655 | 2619 | -- ---------------------------- |
| 2656 | 2620 | BEGIN; |
| 2657 | 2621 | COMMIT; |
| ... | ... | @@ -2674,7 +2638,7 @@ CREATE TABLE `system_post` ( |
| 2674 | 2638 | `deleted` bit(1) NOT NULL DEFAULT b'0' COMMENT '是否删除', |
| 2675 | 2639 | `tenant_id` bigint NOT NULL DEFAULT 0 COMMENT '租户编号', |
| 2676 | 2640 | PRIMARY KEY (`id`) USING BTREE |
| 2677 | -) ENGINE = InnoDB AUTO_INCREMENT = 5 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci COMMENT = '岗位信息表'; | |
| 2641 | +) ENGINE = InnoDB AUTO_INCREMENT = 6 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci COMMENT = '岗位信息表'; | |
| 2678 | 2642 | |
| 2679 | 2643 | -- ---------------------------- |
| 2680 | 2644 | -- Records of system_post |
| ... | ... | @@ -2683,6 +2647,7 @@ BEGIN; |
| 2683 | 2647 | 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 | 2648 | 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 | 2649 | 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); |
| 2650 | +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 | 2651 | COMMIT; |
| 2687 | 2652 | |
| 2688 | 2653 | -- ---------------------------- |
| ... | ... | @@ -2706,7 +2671,7 @@ CREATE TABLE `system_role` ( |
| 2706 | 2671 | `deleted` bit(1) NOT NULL DEFAULT b'0' COMMENT '是否删除', |
| 2707 | 2672 | `tenant_id` bigint NOT NULL DEFAULT 0 COMMENT '租户编号', |
| 2708 | 2673 | PRIMARY KEY (`id`) USING BTREE |
| 2709 | -) ENGINE = InnoDB AUTO_INCREMENT = 144 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci COMMENT = '角色信息表'; | |
| 2674 | +) ENGINE = InnoDB AUTO_INCREMENT = 145 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci COMMENT = '角色信息表'; | |
| 2710 | 2675 | |
| 2711 | 2676 | -- ---------------------------- |
| 2712 | 2677 | -- Records of system_role |
| ... | ... | @@ -2715,7 +2680,7 @@ BEGIN; |
| 2715 | 2680 | 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 | 2681 | 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 | 2682 | 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); | |
| 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 (101, '测试账号', 'test', 0, 1, '[]', 0, 2, '我想测试', '', '2021-01-06 13:49:35', '1', '2024-03-24 22:22:45', b'0', 1); | |
| 2719 | 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 (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 | 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 (110, '测试角色', 'test', 0, 1, '[]', 0, 2, '嘿嘿', '110', '2022-02-23 00:14:34', '110', '2022-02-23 13:14:58', b'0', 121); |
| 2721 | 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 (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 +2696,7 @@ INSERT INTO `system_role` (`id`, `name`, `code`, `sort`, `data_scope`, `data_sco |
| 2731 | 2696 | 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 | 2697 | 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 | 2698 | 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); |
| 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 (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 | 2700 | COMMIT; |
| 2735 | 2701 | |
| 2736 | 2702 | -- ---------------------------- |
| ... | ... | @@ -2748,7 +2714,7 @@ CREATE TABLE `system_role_menu` ( |
| 2748 | 2714 | `deleted` bit(1) NOT NULL DEFAULT b'0' COMMENT '是否删除', |
| 2749 | 2715 | `tenant_id` bigint NOT NULL DEFAULT 0 COMMENT '租户编号', |
| 2750 | 2716 | PRIMARY KEY (`id`) USING BTREE |
| 2751 | -) ENGINE = InnoDB AUTO_INCREMENT = 4042 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci COMMENT = '角色和菜单关联表'; | |
| 2717 | +) ENGINE = InnoDB AUTO_INCREMENT = 4517 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci COMMENT = '角色和菜单关联表'; | |
| 2752 | 2718 | |
| 2753 | 2719 | -- ---------------------------- |
| 2754 | 2720 | -- Records of system_role_menu |
| ... | ... | @@ -4518,12 +4484,6 @@ INSERT INTO `system_role_menu` (`id`, `role_id`, `menu_id`, `creator`, `create_t |
| 4518 | 4484 | 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 | 4485 | 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 | 4486 | 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 | 4487 | 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 | 4488 | 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 | 4489 | 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 +4672,481 @@ INSERT INTO `system_role_menu` (`id`, `role_id`, `menu_id`, `creator`, `create_t |
| 4712 | 4672 | 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 | 4673 | 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 | 4674 | 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); |
| 4675 | +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); | |
| 4676 | +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); | |
| 4677 | +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); | |
| 4678 | +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); | |
| 4679 | +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); | |
| 4680 | +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); | |
| 4681 | +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); | |
| 4682 | +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); | |
| 4683 | +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); | |
| 4684 | +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); | |
| 4685 | +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); | |
| 4686 | +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); | |
| 4687 | +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); | |
| 4688 | +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); | |
| 4689 | +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); | |
| 4690 | +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); | |
| 4691 | +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); | |
| 4692 | +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); | |
| 4693 | +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); | |
| 4694 | +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); | |
| 4695 | +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); | |
| 4696 | +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); | |
| 4697 | +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); | |
| 4698 | +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); | |
| 4699 | +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); | |
| 4700 | +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); | |
| 4701 | +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); | |
| 4702 | +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); | |
| 4703 | +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); | |
| 4704 | +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); | |
| 4705 | +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); | |
| 4706 | +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); | |
| 4707 | +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); | |
| 4708 | +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); | |
| 4709 | +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); | |
| 4710 | +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); | |
| 4711 | +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); | |
| 4712 | +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); | |
| 4713 | +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); | |
| 4714 | +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); | |
| 4715 | +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); | |
| 4716 | +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); | |
| 4717 | +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); | |
| 4718 | +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); | |
| 4719 | +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); | |
| 4720 | +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); | |
| 4721 | +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); | |
| 4722 | +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); | |
| 4723 | +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); | |
| 4724 | +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); | |
| 4725 | +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); | |
| 4726 | +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); | |
| 4727 | +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); | |
| 4728 | +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); | |
| 4729 | +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); | |
| 4730 | +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); | |
| 4731 | +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); | |
| 4732 | +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); | |
| 4733 | +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); | |
| 4734 | +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); | |
| 4735 | +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); | |
| 4736 | +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); | |
| 4737 | +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); | |
| 4738 | +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); | |
| 4739 | +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); | |
| 4740 | +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); | |
| 4741 | +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); | |
| 4742 | +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); | |
| 4743 | +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); | |
| 4744 | +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); | |
| 4745 | +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); | |
| 4746 | +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); | |
| 4747 | +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); | |
| 4748 | +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); | |
| 4749 | +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); | |
| 4750 | +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); | |
| 4751 | +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); | |
| 4752 | +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); | |
| 4753 | +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); | |
| 4754 | +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); | |
| 4755 | +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); | |
| 4756 | +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); | |
| 4757 | +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); | |
| 4758 | +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); | |
| 4759 | +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); | |
| 4760 | +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); | |
| 4761 | +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); | |
| 4762 | +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); | |
| 4763 | +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); | |
| 4764 | +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); | |
| 4765 | +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); | |
| 4766 | +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); | |
| 4767 | +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); | |
| 4768 | +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); | |
| 4769 | +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); | |
| 4770 | +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); | |
| 4771 | +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); | |
| 4772 | +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); | |
| 4773 | +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); | |
| 4774 | +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); | |
| 4775 | +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); | |
| 4776 | +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); | |
| 4777 | +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); | |
| 4778 | +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); | |
| 4779 | +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); | |
| 4780 | +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); | |
| 4781 | +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); | |
| 4782 | +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); | |
| 4783 | +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); | |
| 4784 | +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); | |
| 4785 | +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); | |
| 4786 | +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); | |
| 4787 | +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); | |
| 4788 | +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); | |
| 4789 | +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); | |
| 4790 | +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); | |
| 4791 | +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); | |
| 4792 | +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); | |
| 4793 | +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); | |
| 4794 | +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); | |
| 4795 | +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); | |
| 4796 | +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); | |
| 4797 | +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); | |
| 4798 | +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); | |
| 4799 | +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); | |
| 4800 | +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); | |
| 4801 | +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); | |
| 4802 | +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); | |
| 4803 | +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); | |
| 4804 | +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); | |
| 4805 | +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); | |
| 4806 | +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); | |
| 4807 | +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); | |
| 4808 | +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); | |
| 4809 | +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); | |
| 4810 | +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); | |
| 4811 | +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); | |
| 4812 | +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); | |
| 4813 | +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); | |
| 4814 | +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); | |
| 4815 | +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); | |
| 4816 | +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); | |
| 4817 | +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); | |
| 4818 | +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); | |
| 4819 | +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); | |
| 4820 | +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); | |
| 4821 | +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); | |
| 4822 | +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); | |
| 4823 | +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); | |
| 4824 | +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); | |
| 4825 | +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); | |
| 4826 | +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); | |
| 4827 | +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); | |
| 4828 | +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); | |
| 4829 | +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); | |
| 4830 | +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); | |
| 4831 | +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); | |
| 4832 | +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); | |
| 4833 | +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); | |
| 4834 | +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); | |
| 4835 | +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); | |
| 4836 | +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); | |
| 4837 | +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); | |
| 4838 | +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); | |
| 4839 | +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); | |
| 4840 | +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); | |
| 4841 | +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); | |
| 4842 | +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); | |
| 4843 | +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); | |
| 4844 | +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); | |
| 4845 | +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); | |
| 4846 | +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); | |
| 4847 | +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); | |
| 4848 | +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); | |
| 4849 | +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); | |
| 4850 | +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); | |
| 4851 | +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); | |
| 4852 | +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); | |
| 4853 | +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); | |
| 4854 | +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); | |
| 4855 | +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); | |
| 4856 | +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); | |
| 4857 | +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); | |
| 4858 | +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); | |
| 4859 | +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); | |
| 4860 | +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); | |
| 4861 | +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); | |
| 4862 | +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); | |
| 4863 | +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); | |
| 4864 | +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); | |
| 4865 | +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); | |
| 4866 | +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); | |
| 4867 | +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); | |
| 4868 | +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); | |
| 4869 | +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); | |
| 4870 | +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); | |
| 4871 | +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); | |
| 4872 | +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); | |
| 4873 | +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); | |
| 4874 | +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); | |
| 4875 | +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); | |
| 4876 | +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); | |
| 4877 | +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); | |
| 4878 | +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); | |
| 4879 | +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); | |
| 4880 | +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); | |
| 4881 | +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); | |
| 4882 | +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); | |
| 4883 | +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); | |
| 4884 | +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); | |
| 4885 | +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); | |
| 4886 | +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); | |
| 4887 | +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); | |
| 4888 | +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); | |
| 4889 | +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); | |
| 4890 | +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); | |
| 4891 | +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); | |
| 4892 | +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); | |
| 4893 | +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); | |
| 4894 | +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); | |
| 4895 | +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); | |
| 4896 | +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); | |
| 4897 | +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); | |
| 4898 | +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); | |
| 4899 | +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); | |
| 4900 | +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); | |
| 4901 | +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); | |
| 4902 | +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); | |
| 4903 | +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); | |
| 4904 | +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); | |
| 4905 | +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); | |
| 4906 | +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); | |
| 4907 | +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); | |
| 4908 | +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); | |
| 4909 | +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); | |
| 4910 | +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); | |
| 4911 | +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); | |
| 4912 | +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); | |
| 4913 | +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); | |
| 4914 | +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); | |
| 4915 | +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); | |
| 4916 | +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); | |
| 4917 | +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); | |
| 4918 | +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); | |
| 4919 | +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); | |
| 4920 | +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); | |
| 4921 | +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); | |
| 4922 | +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); | |
| 4923 | +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); | |
| 4924 | +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); | |
| 4925 | +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); | |
| 4926 | +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); | |
| 4927 | +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); | |
| 4928 | +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); | |
| 4929 | +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); | |
| 4930 | +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); | |
| 4931 | +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); | |
| 4932 | +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); | |
| 4933 | +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); | |
| 4934 | +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); | |
| 4935 | +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); | |
| 4936 | +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); | |
| 4937 | +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); | |
| 4938 | +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); | |
| 4939 | +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); | |
| 4940 | +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); | |
| 4941 | +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); | |
| 4942 | +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); | |
| 4943 | +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); | |
| 4944 | +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); | |
| 4945 | +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); | |
| 4946 | +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); | |
| 4947 | +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); | |
| 4948 | +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); | |
| 4949 | +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); | |
| 4950 | +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); | |
| 4951 | +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); | |
| 4952 | +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); | |
| 4953 | +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); | |
| 4954 | +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); | |
| 4955 | +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); | |
| 4956 | +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); | |
| 4957 | +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); | |
| 4958 | +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); | |
| 4959 | +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); | |
| 4960 | +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); | |
| 4961 | +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); | |
| 4962 | +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); | |
| 4963 | +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); | |
| 4964 | +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); | |
| 4965 | +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); | |
| 4966 | +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); | |
| 4967 | +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); | |
| 4968 | +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); | |
| 4969 | +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); | |
| 4970 | +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); | |
| 4971 | +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); | |
| 4972 | +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); | |
| 4973 | +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); | |
| 4974 | +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); | |
| 4975 | +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); | |
| 4976 | +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); | |
| 4977 | +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); | |
| 4978 | +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); | |
| 4979 | +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); | |
| 4980 | +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); | |
| 4981 | +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); | |
| 4982 | +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); | |
| 4983 | +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); | |
| 4984 | +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); | |
| 4985 | +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); | |
| 4986 | +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); | |
| 4987 | +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); | |
| 4988 | +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); | |
| 4989 | +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); | |
| 4990 | +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); | |
| 4991 | +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); | |
| 4992 | +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); | |
| 4993 | +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); | |
| 4994 | +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); | |
| 4995 | +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); | |
| 4996 | +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); | |
| 4997 | +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); | |
| 4998 | +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); | |
| 4999 | +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); | |
| 5000 | +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); | |
| 5001 | +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); | |
| 5002 | +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); | |
| 5003 | +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); | |
| 5004 | +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); | |
| 5005 | +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); | |
| 5006 | +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); | |
| 5007 | +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); | |
| 5008 | +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); | |
| 5009 | +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); | |
| 5010 | +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); | |
| 5011 | +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); | |
| 5012 | +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); | |
| 5013 | +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); | |
| 5014 | +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); | |
| 5015 | +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); | |
| 5016 | +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); | |
| 5017 | +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); | |
| 5018 | +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); | |
| 5019 | +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); | |
| 5020 | +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); | |
| 5021 | +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); | |
| 5022 | +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); | |
| 5023 | +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); | |
| 5024 | +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); | |
| 5025 | +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); | |
| 5026 | +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); | |
| 5027 | +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); | |
| 5028 | +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); | |
| 5029 | +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); | |
| 5030 | +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); | |
| 5031 | +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); | |
| 5032 | +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); | |
| 5033 | +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); | |
| 5034 | +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); | |
| 5035 | +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); | |
| 5036 | +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); | |
| 5037 | +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); | |
| 5038 | +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); | |
| 5039 | +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); | |
| 5040 | +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); | |
| 5041 | +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); | |
| 5042 | +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); | |
| 5043 | +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); | |
| 5044 | +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); | |
| 5045 | +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); | |
| 5046 | +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); | |
| 5047 | +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); | |
| 5048 | +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); | |
| 5049 | +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); | |
| 5050 | +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); | |
| 5051 | +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); | |
| 5052 | +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); | |
| 5053 | +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); | |
| 5054 | +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); | |
| 5055 | +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); | |
| 5056 | +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); | |
| 5057 | +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); | |
| 5058 | +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); | |
| 5059 | +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); | |
| 5060 | +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); | |
| 5061 | +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); | |
| 5062 | +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); | |
| 5063 | +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); | |
| 5064 | +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); | |
| 5065 | +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); | |
| 5066 | +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); | |
| 5067 | +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); | |
| 5068 | +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); | |
| 5069 | +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); | |
| 5070 | +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); | |
| 5071 | +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); | |
| 5072 | +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); | |
| 5073 | +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); | |
| 5074 | +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); | |
| 5075 | +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); | |
| 5076 | +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); | |
| 5077 | +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); | |
| 5078 | +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); | |
| 5079 | +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); | |
| 5080 | +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); | |
| 5081 | +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); | |
| 5082 | +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); | |
| 5083 | +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); | |
| 5084 | +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); | |
| 5085 | +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); | |
| 5086 | +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); | |
| 5087 | +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); | |
| 5088 | +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); | |
| 5089 | +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); | |
| 5090 | +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); | |
| 5091 | +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); | |
| 5092 | +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); | |
| 5093 | +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); | |
| 5094 | +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); | |
| 5095 | +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); | |
| 5096 | +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); | |
| 5097 | +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); | |
| 5098 | +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); | |
| 5099 | +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); | |
| 5100 | +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); | |
| 5101 | +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); | |
| 5102 | +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); | |
| 5103 | +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); | |
| 5104 | +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); | |
| 5105 | +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); | |
| 5106 | +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); | |
| 5107 | +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); | |
| 5108 | +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); | |
| 5109 | +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); | |
| 5110 | +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); | |
| 5111 | +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); | |
| 5112 | +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); | |
| 5113 | +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); | |
| 5114 | +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); | |
| 5115 | +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); | |
| 5116 | +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); | |
| 5117 | +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); | |
| 5118 | +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); | |
| 5119 | +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); | |
| 5120 | +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); | |
| 5121 | +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); | |
| 5122 | +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); | |
| 5123 | +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); | |
| 5124 | +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); | |
| 5125 | +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); | |
| 5126 | +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); | |
| 5127 | +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); | |
| 5128 | +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); | |
| 5129 | +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); | |
| 5130 | +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); | |
| 5131 | +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); | |
| 5132 | +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); | |
| 5133 | +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); | |
| 5134 | +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); | |
| 5135 | +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); | |
| 5136 | +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); | |
| 5137 | +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); | |
| 5138 | +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); | |
| 5139 | +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); | |
| 5140 | +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); | |
| 5141 | +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); | |
| 5142 | +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); | |
| 5143 | +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); | |
| 5144 | +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); | |
| 5145 | +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); | |
| 5146 | +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); | |
| 5147 | +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); | |
| 5148 | +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); | |
| 5149 | +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 | 5150 | COMMIT; |
| 4716 | 5151 | |
| 4717 | 5152 | -- ---------------------------- |
| ... | ... | @@ -4793,7 +5228,7 @@ CREATE TABLE `system_sms_code` ( |
| 4793 | 5228 | `tenant_id` bigint NOT NULL DEFAULT 0 COMMENT '租户编号', |
| 4794 | 5229 | PRIMARY KEY (`id`) USING BTREE, |
| 4795 | 5230 | INDEX `idx_mobile`(`mobile` ASC) USING BTREE COMMENT '手机号' |
| 4796 | -) ENGINE = InnoDB AUTO_INCREMENT = 613 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci COMMENT = '手机验证码'; | |
| 5231 | +) ENGINE = InnoDB AUTO_INCREMENT = 614 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci COMMENT = '手机验证码'; | |
| 4797 | 5232 | |
| 4798 | 5233 | -- ---------------------------- |
| 4799 | 5234 | -- Records of system_sms_code |
| ... | ... | @@ -4834,7 +5269,7 @@ CREATE TABLE `system_sms_log` ( |
| 4834 | 5269 | `update_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间', |
| 4835 | 5270 | `deleted` bit(1) NOT NULL DEFAULT b'0' COMMENT '是否删除', |
| 4836 | 5271 | PRIMARY KEY (`id`) USING BTREE |
| 4837 | -) ENGINE = InnoDB AUTO_INCREMENT = 911 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci COMMENT = '短信日志'; | |
| 5272 | +) ENGINE = InnoDB AUTO_INCREMENT = 947 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci COMMENT = '短信日志'; | |
| 4838 | 5273 | |
| 4839 | 5274 | -- ---------------------------- |
| 4840 | 5275 | -- Records of system_sms_log |
| ... | ... | @@ -4992,7 +5427,7 @@ CREATE TABLE `system_tenant` ( |
| 4992 | 5427 | `update_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间', |
| 4993 | 5428 | `deleted` bit(1) NOT NULL DEFAULT b'0' COMMENT '是否删除', |
| 4994 | 5429 | PRIMARY KEY (`id`) USING BTREE |
| 4995 | -) ENGINE = InnoDB AUTO_INCREMENT = 154 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci COMMENT = '租户表'; | |
| 5430 | +) ENGINE = InnoDB AUTO_INCREMENT = 155 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci COMMENT = '租户表'; | |
| 4996 | 5431 | |
| 4997 | 5432 | -- ---------------------------- |
| 4998 | 5433 | -- Records of system_tenant |
| ... | ... | @@ -5004,6 +5439,7 @@ INSERT INTO `system_tenant` (`id`, `name`, `contact_user_id`, `contact_name`, `c |
| 5004 | 5439 | 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 | 5440 | 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 | 5441 | 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'); |
| 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 (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 | 5443 | COMMIT; |
| 5008 | 5444 | |
| 5009 | 5445 | -- ---------------------------- |
| ... | ... | @@ -5028,7 +5464,7 @@ CREATE TABLE `system_tenant_package` ( |
| 5028 | 5464 | -- Records of system_tenant_package |
| 5029 | 5465 | -- ---------------------------- |
| 5030 | 5466 | 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'); | |
| 5467 | +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 | 5468 | COMMIT; |
| 5033 | 5469 | |
| 5034 | 5470 | -- ---------------------------- |
| ... | ... | @@ -5046,7 +5482,7 @@ CREATE TABLE `system_user_post` ( |
| 5046 | 5482 | `deleted` bit(1) NOT NULL DEFAULT b'0' COMMENT '是否删除', |
| 5047 | 5483 | `tenant_id` bigint NOT NULL DEFAULT 0 COMMENT '租户编号', |
| 5048 | 5484 | PRIMARY KEY (`id`) USING BTREE |
| 5049 | -) ENGINE = InnoDB AUTO_INCREMENT = 119 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci COMMENT = '用户岗位表'; | |
| 5485 | +) ENGINE = InnoDB AUTO_INCREMENT = 120 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci COMMENT = '用户岗位表'; | |
| 5050 | 5486 | |
| 5051 | 5487 | -- ---------------------------- |
| 5052 | 5488 | -- Records of system_user_post |
| ... | ... | @@ -5057,7 +5493,7 @@ INSERT INTO `system_user_post` (`id`, `user_id`, `post_id`, `creator`, `create_t |
| 5057 | 5493 | 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 | 5494 | 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 | 5495 | 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); | |
| 5496 | +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); | |
| 5061 | 5497 | COMMIT; |
| 5062 | 5498 | |
| 5063 | 5499 | -- ---------------------------- |
| ... | ... | @@ -5075,7 +5511,7 @@ CREATE TABLE `system_user_role` ( |
| 5075 | 5511 | `deleted` bit(1) NULL DEFAULT b'0' COMMENT '是否删除', |
| 5076 | 5512 | `tenant_id` bigint NOT NULL DEFAULT 0 COMMENT '租户编号', |
| 5077 | 5513 | PRIMARY KEY (`id`) USING BTREE |
| 5078 | -) ENGINE = InnoDB AUTO_INCREMENT = 37 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci COMMENT = '用户和角色关联表'; | |
| 5514 | +) ENGINE = InnoDB AUTO_INCREMENT = 40 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci COMMENT = '用户和角色关联表'; | |
| 5079 | 5515 | |
| 5080 | 5516 | -- ---------------------------- |
| 5081 | 5517 | -- Records of system_user_role |
| ... | ... | @@ -5093,7 +5529,6 @@ INSERT INTO `system_user_role` (`id`, `user_id`, `role_id`, `creator`, `create_t |
| 5093 | 5529 | 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 | 5530 | 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 | 5531 | 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 | 5532 | 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 | 5533 | 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 | 5534 | 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 +5546,8 @@ INSERT INTO `system_user_role` (`id`, `user_id`, `role_id`, `creator`, `create_t |
| 5111 | 5546 | 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 | 5547 | 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 | 5548 | 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); |
| 5549 | +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); | |
| 5550 | +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 | 5551 | COMMIT; |
| 5115 | 5552 | |
| 5116 | 5553 | -- ---------------------------- |
| ... | ... | @@ -5140,16 +5577,16 @@ CREATE TABLE `system_users` ( |
| 5140 | 5577 | `tenant_id` bigint NOT NULL DEFAULT 0 COMMENT '租户编号', |
| 5141 | 5578 | PRIMARY KEY (`id`) USING BTREE, |
| 5142 | 5579 | 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 = '用户信息表'; | |
| 5580 | +) ENGINE = InnoDB AUTO_INCREMENT = 130 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci COMMENT = '用户信息表'; | |
| 5144 | 5581 | |
| 5145 | 5582 | -- ---------------------------- |
| 5146 | 5583 | -- Records of system_users |
| 5147 | 5584 | -- ---------------------------- |
| 5148 | 5585 | 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); | |
| 5586 | +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, '127.0.0.1', '2024-04-03 20:01:18', 'admin', '2021-01-05 17:03:47', NULL, '2024-04-03 20:01:18', b'0', 1); | |
| 5150 | 5587 | 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 | 5588 | 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); | |
| 5589 | +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 | 5590 | 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 | 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 (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 | 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 (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,7 +5594,7 @@ INSERT INTO `system_users` (`id`, `username`, `password`, `nickname`, `remark`, |
| 5157 | 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 (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 | 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 (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 | 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 (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); | |
| 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 (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); | |
| 5161 | 5598 | 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); |
| 5162 | 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 (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 | 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 (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); |
| ... | ... | @@ -5165,6 +5602,7 @@ INSERT INTO `system_users` (`id`, `username`, `password`, `nickname`, `remark`, |
| 5165 | 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 (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 | 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 (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 | 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 (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); |
| 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 (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 | 5606 | COMMIT; |
| 5169 | 5607 | |
| 5170 | 5608 | 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,23 +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 | - <exclusions> | |
| 630 | - <exclusion><!-- 包冲突:解决积木报表导出 Excel 报错 --> | |
| 631 | - <groupId>org.apache.poi</groupId> | |
| 632 | - <artifactId>poi</artifactId> | |
| 633 | - </exclusion> | |
| 634 | - <exclusion><!-- 包冲突:解决积木报表导出 Excel 报错 --> | |
| 635 | - <groupId>org.apache.poi</groupId> | |
| 636 | - <artifactId>poi-ooxml</artifactId> | |
| 637 | - </exclusion> | |
| 638 | - </exclusions> | |
| 639 | - </dependency> | |
| 640 | - | |
| 641 | 645 | </dependencies> |
| 642 | 646 | </dependencyManagement> |
| 643 | 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/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-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-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-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-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> | ... | ... |
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/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
| ... | ... | @@ -5,7 +5,6 @@ import cn.iocoder.yudao.framework.common.pojo.PageResult; |
| 5 | 5 | import cn.iocoder.yudao.framework.common.util.json.JsonUtils; |
| 6 | 6 | import cn.iocoder.yudao.framework.common.util.object.PageUtils; |
| 7 | 7 | import cn.iocoder.yudao.framework.common.util.validation.ValidationUtils; |
| 8 | -import cn.iocoder.yudao.framework.tenant.core.context.TenantContextHolder; | |
| 9 | 8 | import cn.iocoder.yudao.module.bpm.controller.admin.definition.vo.model.BpmModelCreateReqVO; |
| 10 | 9 | import cn.iocoder.yudao.module.bpm.controller.admin.definition.vo.model.BpmModelPageReqVO; |
| 11 | 10 | import cn.iocoder.yudao.module.bpm.controller.admin.definition.vo.model.BpmModelUpdateReqVO; |
| ... | ... | @@ -14,6 +13,7 @@ import cn.iocoder.yudao.module.bpm.dal.dataobject.definition.BpmFormDO; |
| 14 | 13 | import cn.iocoder.yudao.module.bpm.enums.definition.BpmModelFormTypeEnum; |
| 15 | 14 | import cn.iocoder.yudao.module.bpm.framework.flowable.core.candidate.BpmTaskCandidateInvoker; |
| 16 | 15 | import cn.iocoder.yudao.module.bpm.framework.flowable.core.util.BpmnModelUtils; |
| 16 | +import cn.iocoder.yudao.module.bpm.framework.flowable.core.util.FlowableUtils; | |
| 17 | 17 | import cn.iocoder.yudao.module.bpm.service.definition.dto.BpmModelMetaInfoRespDTO; |
| 18 | 18 | import jakarta.annotation.Resource; |
| 19 | 19 | import jakarta.validation.Valid; |
| ... | ... | @@ -78,7 +78,7 @@ public class BpmModelServiceImpl implements BpmModelService { |
| 78 | 78 | return PageResult.empty(count); |
| 79 | 79 | } |
| 80 | 80 | List<Model> models = modelQuery |
| 81 | - .modelTenantId(TenantContextHolder.getTenantIdStr()) | |
| 81 | + .modelTenantId(FlowableUtils.getTenantId()) | |
| 82 | 82 | .orderByCreateTime().desc() |
| 83 | 83 | .listPage(PageUtils.getStart(pageVO), pageVO.getPageSize()); |
| 84 | 84 | return new PageResult<>(models, count); |
| ... | ... | @@ -99,7 +99,7 @@ public class BpmModelServiceImpl implements BpmModelService { |
| 99 | 99 | // 创建流程定义 |
| 100 | 100 | Model model = repositoryService.newModel(); |
| 101 | 101 | BpmModelConvert.INSTANCE.copyToCreateModel(model, createReqVO); |
| 102 | - model.setTenantId(TenantContextHolder.getTenantIdStr()); | |
| 102 | + model.setTenantId(FlowableUtils.getTenantId()); | |
| 103 | 103 | // 保存流程定义 |
| 104 | 104 | repositoryService.saveModel(model); |
| 105 | 105 | // 保存 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/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
| ... | ... | @@ -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() + "%"); | ... | ... |
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/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/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/customer/CrmCustomerController.java
| ... | ... | @@ -2,6 +2,8 @@ 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; | |
| 6 | +import cn.iocoder.yudao.framework.common.core.KeyValue; | |
| 5 | 7 | import cn.iocoder.yudao.framework.common.pojo.CommonResult; |
| 6 | 8 | import cn.iocoder.yudao.framework.common.pojo.PageResult; |
| 7 | 9 | import cn.iocoder.yudao.framework.common.util.collection.CollectionUtils; |
| ... | ... | @@ -11,7 +13,6 @@ import cn.iocoder.yudao.framework.common.util.number.NumberUtils; |
| 11 | 13 | import cn.iocoder.yudao.framework.common.util.object.BeanUtils; |
| 12 | 14 | import cn.iocoder.yudao.framework.excel.core.util.ExcelUtils; |
| 13 | 15 | import cn.iocoder.yudao.framework.ip.core.utils.AreaUtils; |
| 14 | -import cn.iocoder.yudao.framework.operatelog.core.annotations.OperateLog; | |
| 15 | 16 | import cn.iocoder.yudao.module.crm.controller.admin.customer.vo.customer.*; |
| 16 | 17 | import cn.iocoder.yudao.module.crm.dal.dataobject.customer.CrmCustomerDO; |
| 17 | 18 | import cn.iocoder.yudao.module.crm.dal.dataobject.customer.CrmCustomerPoolConfigDO; |
| ... | ... | @@ -40,10 +41,10 @@ import java.util.List; |
| 40 | 41 | import java.util.Map; |
| 41 | 42 | import java.util.stream.Stream; |
| 42 | 43 | |
| 44 | +import static cn.iocoder.yudao.framework.apilog.core.enums.OperateTypeEnum.EXPORT; | |
| 43 | 45 | import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success; |
| 44 | 46 | import static cn.iocoder.yudao.framework.common.pojo.PageParam.PAGE_SIZE_NONE; |
| 45 | 47 | import static cn.iocoder.yudao.framework.common.util.collection.CollectionUtils.*; |
| 46 | -import static cn.iocoder.yudao.framework.operatelog.core.enums.OperateTypeEnum.EXPORT; | |
| 47 | 48 | import static cn.iocoder.yudao.framework.security.core.util.SecurityFrameworkUtils.getLoginUserId; |
| 48 | 49 | import static java.util.Collections.singletonList; |
| 49 | 50 | |
| ... | ... | @@ -235,7 +236,7 @@ public class CrmCustomerController { |
| 235 | 236 | @GetMapping("/export-excel") |
| 236 | 237 | @Operation(summary = "导出客户 Excel") |
| 237 | 238 | @PreAuthorize("@ss.hasPermission('crm:customer:export')") |
| 238 | - @OperateLog(type = EXPORT) | |
| 239 | + @ApiAccessLog(operateType = EXPORT) | |
| 239 | 240 | public void exportCustomerExcel(@Valid CrmCustomerPageReqVO pageVO, |
| 240 | 241 | HttpServletResponse response) throws IOException { |
| 241 | 242 | pageVO.setPageSize(PAGE_SIZE_NONE); // 不分页 |
| ... | ... | @@ -264,7 +265,7 @@ public class CrmCustomerController { |
| 264 | 265 | @PostMapping("/import") |
| 265 | 266 | @Operation(summary = "导入客户") |
| 266 | 267 | @PreAuthorize("@ss.hasPermission('system:customer:import')") |
| 267 | - public CommonResult<CrmCustomerImportRespVO> importExcel(@Valid @RequestBody CrmCustomerImportReqVO importReqVO) | |
| 268 | + public CommonResult<CrmCustomerImportRespVO> importExcel(@Valid CrmCustomerImportReqVO importReqVO) | |
| 268 | 269 | throws Exception { |
| 269 | 270 | List<CrmCustomerImportExcelVO> list = ExcelUtils.read(importReqVO.getFile(), CrmCustomerImportExcelVO.class); |
| 270 | 271 | return success(customerService.importCustomerList(list, importReqVO)); | ... | ... |
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/product/CrmProductController.java
| 1 | 1 | package cn.iocoder.yudao.module.crm.controller.admin.product; |
| 2 | 2 | |
| 3 | -import cn.hutool.core.collection.CollUtil; | |
| 3 | +import cn.iocoder.yudao.framework.apilog.core.annotations.ApiAccessLog; | |
| 4 | 4 | import cn.iocoder.yudao.framework.common.pojo.CommonResult; |
| 5 | 5 | import cn.iocoder.yudao.framework.common.pojo.PageParam; |
| 6 | 6 | import cn.iocoder.yudao.framework.common.pojo.PageResult; |
| 7 | -import cn.iocoder.yudao.framework.common.util.collection.MapUtils; | |
| 8 | 7 | import cn.iocoder.yudao.framework.common.util.object.BeanUtils; |
| 9 | 8 | import cn.iocoder.yudao.framework.excel.core.util.ExcelUtils; |
| 10 | -import cn.iocoder.yudao.framework.operatelog.core.annotations.OperateLog; | |
| 9 | +import cn.iocoder.yudao.framework.translate.core.TranslateUtils; | |
| 11 | 10 | import cn.iocoder.yudao.module.crm.controller.admin.product.vo.product.CrmProductPageReqVO; |
| 12 | 11 | import cn.iocoder.yudao.module.crm.controller.admin.product.vo.product.CrmProductRespVO; |
| 13 | 12 | import cn.iocoder.yudao.module.crm.controller.admin.product.vo.product.CrmProductSaveReqVO; |
| 14 | -import cn.iocoder.yudao.module.crm.dal.dataobject.product.CrmProductCategoryDO; | |
| 15 | 13 | import cn.iocoder.yudao.module.crm.dal.dataobject.product.CrmProductDO; |
| 16 | 14 | import cn.iocoder.yudao.module.crm.enums.product.CrmProductStatusEnum; |
| 17 | -import cn.iocoder.yudao.module.crm.service.product.CrmProductCategoryService; | |
| 18 | 15 | import cn.iocoder.yudao.module.crm.service.product.CrmProductService; |
| 19 | 16 | import cn.iocoder.yudao.module.system.api.user.AdminUserApi; |
| 20 | -import cn.iocoder.yudao.module.system.api.user.dto.AdminUserRespDTO; | |
| 21 | 17 | import io.swagger.v3.oas.annotations.Operation; |
| 22 | 18 | import io.swagger.v3.oas.annotations.Parameter; |
| 23 | 19 | import io.swagger.v3.oas.annotations.tags.Tag; |
| ... | ... | @@ -29,15 +25,11 @@ import org.springframework.validation.annotation.Validated; |
| 29 | 25 | import org.springframework.web.bind.annotation.*; |
| 30 | 26 | |
| 31 | 27 | import java.io.IOException; |
| 32 | -import java.util.Collections; | |
| 33 | 28 | import java.util.List; |
| 34 | -import java.util.Map; | |
| 35 | -import java.util.stream.Stream; | |
| 36 | 29 | |
| 30 | +import static cn.iocoder.yudao.framework.apilog.core.enums.OperateTypeEnum.EXPORT; | |
| 37 | 31 | import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success; |
| 38 | -import static cn.iocoder.yudao.framework.common.util.collection.CollectionUtils.*; | |
| 39 | -import static cn.iocoder.yudao.framework.operatelog.core.enums.OperateTypeEnum.EXPORT; | |
| 40 | -import static java.util.Collections.singletonList; | |
| 32 | +import static cn.iocoder.yudao.framework.common.util.collection.CollectionUtils.convertList; | |
| 41 | 33 | |
| 42 | 34 | @Tag(name = "管理后台 - CRM 产品") |
| 43 | 35 | @RestController |
| ... | ... | @@ -48,9 +40,6 @@ public class CrmProductController { |
| 48 | 40 | @Resource |
| 49 | 41 | private CrmProductService productService; |
| 50 | 42 | @Resource |
| 51 | - private CrmProductCategoryService productCategoryService; | |
| 52 | - | |
| 53 | - @Resource | |
| 54 | 43 | private AdminUserApi adminUserApi; |
| 55 | 44 | |
| 56 | 45 | @PostMapping("/create") |
| ... | ... | @@ -83,14 +72,7 @@ public class CrmProductController { |
| 83 | 72 | @PreAuthorize("@ss.hasPermission('crm:product:query')") |
| 84 | 73 | public CommonResult<CrmProductRespVO> getProduct(@RequestParam("id") Long id) { |
| 85 | 74 | CrmProductDO product = productService.getProduct(id); |
| 86 | - return success(buildProductDetail(product)); | |
| 87 | - } | |
| 88 | - | |
| 89 | - private CrmProductRespVO buildProductDetail(CrmProductDO product) { | |
| 90 | - if (product == null) { | |
| 91 | - return null; | |
| 92 | - } | |
| 93 | - return buildProductDetailList(singletonList(product)).get(0); | |
| 75 | + return success(BeanUtils.toBean(product, CrmProductRespVO.class)); | |
| 94 | 76 | } |
| 95 | 77 | |
| 96 | 78 | @GetMapping("/simple-list") |
| ... | ... | @@ -106,40 +88,20 @@ public class CrmProductController { |
| 106 | 88 | @PreAuthorize("@ss.hasPermission('crm:product:query')") |
| 107 | 89 | public CommonResult<PageResult<CrmProductRespVO>> getProductPage(@Valid CrmProductPageReqVO pageVO) { |
| 108 | 90 | PageResult<CrmProductDO> pageResult = productService.getProductPage(pageVO); |
| 109 | - return success(new PageResult<>(buildProductDetailList(pageResult.getList()), pageResult.getTotal())); | |
| 91 | + return success(BeanUtils.toBean(pageResult, CrmProductRespVO.class)); | |
| 110 | 92 | } |
| 111 | 93 | |
| 112 | 94 | @GetMapping("/export-excel") |
| 113 | 95 | @Operation(summary = "导出产品 Excel") |
| 114 | 96 | @PreAuthorize("@ss.hasPermission('crm:product:export')") |
| 115 | - @OperateLog(type = EXPORT) | |
| 97 | + @ApiAccessLog(operateType = EXPORT) | |
| 116 | 98 | public void exportProductExcel(@Valid CrmProductPageReqVO exportReqVO, |
| 117 | 99 | HttpServletResponse response) throws IOException { |
| 118 | 100 | exportReqVO.setPageSize(PageParam.PAGE_SIZE_NONE); |
| 119 | 101 | List<CrmProductDO> list = productService.getProductPage(exportReqVO).getList(); |
| 120 | 102 | // 导出 Excel |
| 121 | 103 | ExcelUtils.write(response, "产品.xls", "数据", CrmProductRespVO.class, |
| 122 | - buildProductDetailList(list)); | |
| 123 | - } | |
| 124 | - | |
| 125 | - private List<CrmProductRespVO> buildProductDetailList(List<CrmProductDO> list) { | |
| 126 | - if (CollUtil.isEmpty(list)) { | |
| 127 | - return Collections.emptyList(); | |
| 128 | - } | |
| 129 | - // 1.1 获得用户信息 | |
| 130 | - Map<Long, AdminUserRespDTO> userMap = adminUserApi.getUserMap( | |
| 131 | - convertSetByFlatMap(list, user -> Stream.of(Long.valueOf(user.getCreator()), user.getOwnerUserId()))); | |
| 132 | - // 1.2 获得分类信息 | |
| 133 | - Map<Long, CrmProductCategoryDO> categoryMap = productCategoryService.getProductCategoryMap( | |
| 134 | - convertSet(list, CrmProductDO::getCategoryId)); | |
| 135 | - // 2. 拼接数据 | |
| 136 | - return BeanUtils.toBean(list, CrmProductRespVO.class, productVO -> { | |
| 137 | - // 2.1 设置用户信息 | |
| 138 | - MapUtils.findAndThen(userMap, productVO.getOwnerUserId(), user -> productVO.setOwnerUserName(user.getNickname())); | |
| 139 | - MapUtils.findAndThen(userMap, Long.valueOf(productVO.getCreator()), user -> productVO.setCreatorName(user.getNickname())); | |
| 140 | - // 2.2 设置分类名称 | |
| 141 | - MapUtils.findAndThen(categoryMap, productVO.getCategoryId(), category -> productVO.setCategoryName(category.getName())); | |
| 142 | - }); | |
| 104 | + TranslateUtils.translate(BeanUtils.toBean(list, CrmProductRespVO.class))); | |
| 143 | 105 | } |
| 144 | 106 | |
| 145 | 107 | } | ... | ... |
yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/controller/admin/product/vo/product/CrmProductRespVO.java
| ... | ... | @@ -2,9 +2,13 @@ package cn.iocoder.yudao.module.crm.controller.admin.product.vo.product; |
| 2 | 2 | |
| 3 | 3 | import cn.iocoder.yudao.framework.excel.core.annotations.DictFormat; |
| 4 | 4 | import cn.iocoder.yudao.framework.excel.core.convert.DictConvert; |
| 5 | +import cn.iocoder.yudao.module.crm.dal.dataobject.product.CrmProductCategoryDO; | |
| 5 | 6 | import cn.iocoder.yudao.module.crm.enums.DictTypeConstants; |
| 6 | 7 | import com.alibaba.excel.annotation.ExcelIgnoreUnannotated; |
| 7 | 8 | import com.alibaba.excel.annotation.ExcelProperty; |
| 9 | +import com.fhs.core.trans.anno.Trans; | |
| 10 | +import com.fhs.core.trans.constant.TransType; | |
| 11 | +import com.fhs.core.trans.vo.VO; | |
| 8 | 12 | import io.swagger.v3.oas.annotations.media.Schema; |
| 9 | 13 | import lombok.Data; |
| 10 | 14 | |
| ... | ... | @@ -14,7 +18,7 @@ import java.time.LocalDateTime; |
| 14 | 18 | @Schema(description = "管理后台 - CRM 产品 Response VO") |
| 15 | 19 | @Data |
| 16 | 20 | @ExcelIgnoreUnannotated |
| 17 | -public class CrmProductRespVO { | |
| 21 | +public class CrmProductRespVO implements VO { | |
| 18 | 22 | |
| 19 | 23 | @Schema(description = "产品编号", example = "20529") |
| 20 | 24 | @ExcelProperty("产品编号") |
| ... | ... | @@ -43,6 +47,7 @@ public class CrmProductRespVO { |
| 43 | 47 | private Integer status; |
| 44 | 48 | |
| 45 | 49 | @Schema(description = "产品分类编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "2") |
| 50 | + @Trans(type = TransType.SIMPLE, target = CrmProductCategoryDO.class, fields = "name", ref = "categoryName") | |
| 46 | 51 | private Long categoryId; |
| 47 | 52 | @Schema(description = "产品分类名字", requiredMode = Schema.RequiredMode.REQUIRED, example = "衣服") |
| 48 | 53 | @ExcelProperty("产品分类") |
| ... | ... | @@ -53,12 +58,16 @@ public class CrmProductRespVO { |
| 53 | 58 | private String description; |
| 54 | 59 | |
| 55 | 60 | @Schema(description = "负责人的用户编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "31926") |
| 61 | + @Trans(type = TransType.RPC, targetClassName = "cn.iocoder.yudao.module.system.dal.dataobject.user.AdminUserDO", | |
| 62 | + fields = "nickname", ref = "ownerUserName") | |
| 56 | 63 | private Long ownerUserId; |
| 57 | 64 | @Schema(description = "负责人的用户昵称", requiredMode = Schema.RequiredMode.REQUIRED, example = "芋道源码") |
| 58 | 65 | @ExcelProperty("负责人") |
| 59 | 66 | private String ownerUserName; |
| 60 | 67 | |
| 61 | 68 | @Schema(description = "创建人编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "1024") |
| 69 | + @Trans(type = TransType.RPC, targetClassName = "cn.iocoder.yudao.module.system.dal.dataobject.user.AdminUserDO", | |
| 70 | + fields = "nickname", ref = "creatorName") | |
| 62 | 71 | private String creator; |
| 63 | 72 | @Schema(description = "创建人名字", requiredMode = Schema.RequiredMode.REQUIRED, example = "芋道源码") |
| 64 | 73 | @ExcelProperty("创建人") | ... | ... |
yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/controller/admin/receivable/CrmReceivableController.java
| ... | ... | @@ -2,13 +2,13 @@ package cn.iocoder.yudao.module.crm.controller.admin.receivable; |
| 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; |
| 8 | 9 | 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 | -import cn.iocoder.yudao.framework.operatelog.core.annotations.OperateLog; | |
| 12 | 12 | import cn.iocoder.yudao.module.crm.controller.admin.contract.vo.contract.CrmContractRespVO; |
| 13 | 13 | import cn.iocoder.yudao.module.crm.controller.admin.receivable.vo.receivable.CrmReceivablePageReqVO; |
| 14 | 14 | import cn.iocoder.yudao.module.crm.controller.admin.receivable.vo.receivable.CrmReceivableRespVO; |
| ... | ... | @@ -39,11 +39,12 @@ 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.pojo.CommonResult.success; |
| 43 | 44 | import static cn.iocoder.yudao.framework.common.pojo.PageParam.PAGE_SIZE_NONE; |
| 44 | -import static cn.iocoder.yudao.framework.common.util.collection.CollectionUtils.*; | |
| 45 | +import static cn.iocoder.yudao.framework.common.util.collection.CollectionUtils.convertListByFlatMap; | |
| 46 | +import static cn.iocoder.yudao.framework.common.util.collection.CollectionUtils.convertSet; | |
| 45 | 47 | import static cn.iocoder.yudao.framework.common.util.collection.MapUtils.findAndThen; |
| 46 | -import static cn.iocoder.yudao.framework.operatelog.core.enums.OperateTypeEnum.EXPORT; | |
| 47 | 48 | import static cn.iocoder.yudao.framework.security.core.util.SecurityFrameworkUtils.getLoginUserId; |
| 48 | 49 | |
| 49 | 50 | @Tag(name = "管理后台 - CRM 回款") |
| ... | ... | @@ -123,7 +124,7 @@ public class CrmReceivableController { |
| 123 | 124 | @GetMapping("/export-excel") |
| 124 | 125 | @Operation(summary = "导出回款 Excel") |
| 125 | 126 | @PreAuthorize("@ss.hasPermission('crm:receivable:export')") |
| 126 | - @OperateLog(type = EXPORT) | |
| 127 | + @ApiAccessLog(operateType = EXPORT) | |
| 127 | 128 | public void exportReceivableExcel(@Valid CrmReceivablePageReqVO exportReqVO, |
| 128 | 129 | HttpServletResponse response) throws IOException { |
| 129 | 130 | exportReqVO.setPageSize(PAGE_SIZE_NONE); | ... | ... |
yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/controller/admin/receivable/CrmReceivablePlanController.java
| ... | ... | @@ -2,12 +2,12 @@ package cn.iocoder.yudao.module.crm.controller.admin.receivable; |
| 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.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.receivable.vo.plan.CrmReceivablePlanPageReqVO; |
| 12 | 12 | import cn.iocoder.yudao.module.crm.controller.admin.receivable.vo.plan.CrmReceivablePlanRespVO; |
| 13 | 13 | import cn.iocoder.yudao.module.crm.controller.admin.receivable.vo.plan.CrmReceivablePlanSaveReqVO; |
| ... | ... | @@ -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.pojo.CommonResult.success; |
| 43 | 44 | import static cn.iocoder.yudao.framework.common.pojo.PageParam.PAGE_SIZE_NONE; |
| 44 | 45 | import static cn.iocoder.yudao.framework.common.util.collection.CollectionUtils.*; |
| 45 | 46 | import static cn.iocoder.yudao.framework.common.util.collection.MapUtils.findAndThen; |
| 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 | |
| 49 | 49 | @Tag(name = "管理后台 - CRM 回款计划") |
| ... | ... | @@ -123,7 +123,7 @@ public class CrmReceivablePlanController { |
| 123 | 123 | @GetMapping("/export-excel") |
| 124 | 124 | @Operation(summary = "导出回款计划 Excel") |
| 125 | 125 | @PreAuthorize("@ss.hasPermission('crm:receivable-plan:export')") |
| 126 | - @OperateLog(type = EXPORT) | |
| 126 | + @ApiAccessLog(operateType = EXPORT) | |
| 127 | 127 | public void exportReceivablePlanExcel(@Valid CrmReceivablePlanPageReqVO exportReqVO, |
| 128 | 128 | HttpServletResponse response) throws IOException { |
| 129 | 129 | exportReqVO.setPageSize(PAGE_SIZE_NONE); | ... | ... |
yudao-module-erp/yudao-module-erp-biz/pom.xml
yudao-module-erp/yudao-module-erp-biz/src/main/java/cn/iocoder/yudao/module/erp/controller/admin/finance/ErpAccountController.java
| 1 | 1 | package cn.iocoder.yudao.module.erp.controller.admin.finance; |
| 2 | 2 | |
| 3 | +import cn.iocoder.yudao.framework.apilog.core.annotations.ApiAccessLog; | |
| 3 | 4 | import cn.iocoder.yudao.framework.common.enums.CommonStatusEnum; |
| 4 | 5 | import cn.iocoder.yudao.framework.common.pojo.CommonResult; |
| 5 | 6 | import cn.iocoder.yudao.framework.common.pojo.PageParam; |
| 6 | 7 | import cn.iocoder.yudao.framework.common.pojo.PageResult; |
| 7 | 8 | import cn.iocoder.yudao.framework.common.util.object.BeanUtils; |
| 8 | 9 | import cn.iocoder.yudao.framework.excel.core.util.ExcelUtils; |
| 9 | -import cn.iocoder.yudao.framework.operatelog.core.annotations.OperateLog; | |
| 10 | 10 | import cn.iocoder.yudao.module.erp.controller.admin.finance.vo.account.ErpAccountPageReqVO; |
| 11 | 11 | import cn.iocoder.yudao.module.erp.controller.admin.finance.vo.account.ErpAccountRespVO; |
| 12 | 12 | import cn.iocoder.yudao.module.erp.controller.admin.finance.vo.account.ErpAccountSaveReqVO; |
| ... | ... | @@ -26,9 +26,9 @@ import org.springframework.web.bind.annotation.*; |
| 26 | 26 | import java.io.IOException; |
| 27 | 27 | import java.util.List; |
| 28 | 28 | |
| 29 | +import static cn.iocoder.yudao.framework.apilog.core.enums.OperateTypeEnum.EXPORT; | |
| 29 | 30 | import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success; |
| 30 | 31 | import static cn.iocoder.yudao.framework.common.util.collection.CollectionUtils.convertList; |
| 31 | -import static cn.iocoder.yudao.framework.operatelog.core.enums.OperateTypeEnum.EXPORT; | |
| 32 | 32 | |
| 33 | 33 | @Tag(name = "管理后台 - ERP 结算账户") |
| 34 | 34 | @RestController |
| ... | ... | @@ -103,7 +103,7 @@ public class ErpAccountController { |
| 103 | 103 | @GetMapping("/export-excel") |
| 104 | 104 | @Operation(summary = "导出结算账户 Excel") |
| 105 | 105 | @PreAuthorize("@ss.hasPermission('erp:account:export')") |
| 106 | - @OperateLog(type = EXPORT) | |
| 106 | + @ApiAccessLog(operateType = EXPORT) | |
| 107 | 107 | public void exportAccountExcel(@Valid ErpAccountPageReqVO pageReqVO, |
| 108 | 108 | HttpServletResponse response) throws IOException { |
| 109 | 109 | pageReqVO.setPageSize(PageParam.PAGE_SIZE_NONE); | ... | ... |
yudao-module-erp/yudao-module-erp-biz/src/main/java/cn/iocoder/yudao/module/erp/controller/admin/finance/ErpFinancePaymentController.java
| 1 | 1 | package cn.iocoder.yudao.module.erp.controller.admin.finance; |
| 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.PageParam; |
| 6 | 7 | import cn.iocoder.yudao.framework.common.pojo.PageResult; |
| ... | ... | @@ -8,7 +9,6 @@ import cn.iocoder.yudao.framework.common.util.collection.MapUtils; |
| 8 | 9 | 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 | -import cn.iocoder.yudao.framework.operatelog.core.annotations.OperateLog; | |
| 12 | 12 | import cn.iocoder.yudao.module.erp.controller.admin.finance.vo.payment.ErpFinancePaymentPageReqVO; |
| 13 | 13 | import cn.iocoder.yudao.module.erp.controller.admin.finance.vo.payment.ErpFinancePaymentRespVO; |
| 14 | 14 | import cn.iocoder.yudao.module.erp.controller.admin.finance.vo.payment.ErpFinancePaymentSaveReqVO; |
| ... | ... | @@ -36,9 +36,9 @@ import java.util.List; |
| 36 | 36 | import java.util.Map; |
| 37 | 37 | import java.util.stream.Stream; |
| 38 | 38 | |
| 39 | +import static cn.iocoder.yudao.framework.apilog.core.enums.OperateTypeEnum.EXPORT; | |
| 39 | 40 | import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success; |
| 40 | 41 | import static cn.iocoder.yudao.framework.common.util.collection.CollectionUtils.*; |
| 41 | -import static cn.iocoder.yudao.framework.operatelog.core.enums.OperateTypeEnum.EXPORT; | |
| 42 | 42 | |
| 43 | 43 | @Tag(name = "管理后台 - ERP 付款单") |
| 44 | 44 | @RestController |
| ... | ... | @@ -114,7 +114,7 @@ public class ErpFinancePaymentController { |
| 114 | 114 | @GetMapping("/export-excel") |
| 115 | 115 | @Operation(summary = "导出付款单 Excel") |
| 116 | 116 | @PreAuthorize("@ss.hasPermission('erp:finance-payment:export')") |
| 117 | - @OperateLog(type = EXPORT) | |
| 117 | + @ApiAccessLog(operateType = EXPORT) | |
| 118 | 118 | public void exportFinancePaymentExcel(@Valid ErpFinancePaymentPageReqVO pageReqVO, |
| 119 | 119 | HttpServletResponse response) throws IOException { |
| 120 | 120 | pageReqVO.setPageSize(PageParam.PAGE_SIZE_NONE); | ... | ... |
yudao-module-erp/yudao-module-erp-biz/src/main/java/cn/iocoder/yudao/module/erp/controller/admin/finance/ErpFinanceReceiptController.java
| 1 | 1 | package cn.iocoder.yudao.module.erp.controller.admin.finance; |
| 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.PageParam; |
| 6 | 7 | import cn.iocoder.yudao.framework.common.pojo.PageResult; |
| ... | ... | @@ -8,7 +9,6 @@ import cn.iocoder.yudao.framework.common.util.collection.MapUtils; |
| 8 | 9 | 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 | -import cn.iocoder.yudao.framework.operatelog.core.annotations.OperateLog; | |
| 12 | 12 | import cn.iocoder.yudao.module.erp.controller.admin.finance.vo.receipt.ErpFinanceReceiptPageReqVO; |
| 13 | 13 | import cn.iocoder.yudao.module.erp.controller.admin.finance.vo.receipt.ErpFinanceReceiptRespVO; |
| 14 | 14 | import cn.iocoder.yudao.module.erp.controller.admin.finance.vo.receipt.ErpFinanceReceiptSaveReqVO; |
| ... | ... | @@ -36,9 +36,9 @@ import java.util.List; |
| 36 | 36 | import java.util.Map; |
| 37 | 37 | import java.util.stream.Stream; |
| 38 | 38 | |
| 39 | +import static cn.iocoder.yudao.framework.apilog.core.enums.OperateTypeEnum.EXPORT; | |
| 39 | 40 | import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success; |
| 40 | 41 | import static cn.iocoder.yudao.framework.common.util.collection.CollectionUtils.*; |
| 41 | -import static cn.iocoder.yudao.framework.operatelog.core.enums.OperateTypeEnum.EXPORT; | |
| 42 | 42 | |
| 43 | 43 | @Tag(name = "管理后台 - ERP 收款单") |
| 44 | 44 | @RestController |
| ... | ... | @@ -114,7 +114,7 @@ public class ErpFinanceReceiptController { |
| 114 | 114 | @GetMapping("/export-excel") |
| 115 | 115 | @Operation(summary = "导出收款单 Excel") |
| 116 | 116 | @PreAuthorize("@ss.hasPermission('erp:finance-receipt:export')") |
| 117 | - @OperateLog(type = EXPORT) | |
| 117 | + @ApiAccessLog(operateType = EXPORT) | |
| 118 | 118 | public void exportFinanceReceiptExcel(@Valid ErpFinanceReceiptPageReqVO pageReqVO, |
| 119 | 119 | HttpServletResponse response) throws IOException { |
| 120 | 120 | pageReqVO.setPageSize(PageParam.PAGE_SIZE_NONE); | ... | ... |
yudao-module-erp/yudao-module-erp-biz/src/main/java/cn/iocoder/yudao/module/erp/controller/admin/product/ErpProductCategoryController.java
| 1 | 1 | package cn.iocoder.yudao.module.erp.controller.admin.product; |
| 2 | 2 | |
| 3 | +import cn.iocoder.yudao.framework.apilog.core.annotations.ApiAccessLog; | |
| 3 | 4 | import cn.iocoder.yudao.framework.common.enums.CommonStatusEnum; |
| 4 | 5 | import cn.iocoder.yudao.framework.common.pojo.CommonResult; |
| 5 | 6 | import cn.iocoder.yudao.framework.common.util.object.BeanUtils; |
| 6 | 7 | import cn.iocoder.yudao.framework.excel.core.util.ExcelUtils; |
| 7 | -import cn.iocoder.yudao.framework.operatelog.core.annotations.OperateLog; | |
| 8 | 8 | import cn.iocoder.yudao.module.erp.controller.admin.product.vo.category.ErpProductCategoryListReqVO; |
| 9 | 9 | import cn.iocoder.yudao.module.erp.controller.admin.product.vo.category.ErpProductCategoryRespVO; |
| 10 | 10 | import cn.iocoder.yudao.module.erp.controller.admin.product.vo.category.ErpProductCategorySaveReqVO; |
| ... | ... | @@ -23,9 +23,9 @@ import org.springframework.web.bind.annotation.*; |
| 23 | 23 | import java.io.IOException; |
| 24 | 24 | import java.util.List; |
| 25 | 25 | |
| 26 | +import static cn.iocoder.yudao.framework.apilog.core.enums.OperateTypeEnum.EXPORT; | |
| 26 | 27 | import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success; |
| 27 | 28 | import static cn.iocoder.yudao.framework.common.util.collection.CollectionUtils.convertList; |
| 28 | -import static cn.iocoder.yudao.framework.operatelog.core.enums.OperateTypeEnum.EXPORT; | |
| 29 | 29 | |
| 30 | 30 | @Tag(name = "管理后台 - ERP 产品分类") |
| 31 | 31 | @RestController |
| ... | ... | @@ -89,7 +89,7 @@ public class ErpProductCategoryController { |
| 89 | 89 | @GetMapping("/export-excel") |
| 90 | 90 | @Operation(summary = "导出产品分类 Excel") |
| 91 | 91 | @PreAuthorize("@ss.hasPermission('erp:product-category:export')") |
| 92 | - @OperateLog(type = EXPORT) | |
| 92 | + @ApiAccessLog(operateType = EXPORT) | |
| 93 | 93 | public void exportProductCategoryExcel(@Valid ErpProductCategoryListReqVO listReqVO, |
| 94 | 94 | HttpServletResponse response) throws IOException { |
| 95 | 95 | List<ErpProductCategoryDO> list = productCategoryService.getProductCategoryList(listReqVO); | ... | ... |
yudao-module-erp/yudao-module-erp-biz/src/main/java/cn/iocoder/yudao/module/erp/controller/admin/product/ErpProductController.java
| 1 | 1 | package cn.iocoder.yudao.module.erp.controller.admin.product; |
| 2 | 2 | |
| 3 | +import cn.iocoder.yudao.framework.apilog.core.annotations.ApiAccessLog; | |
| 3 | 4 | import cn.iocoder.yudao.framework.common.enums.CommonStatusEnum; |
| 4 | 5 | import cn.iocoder.yudao.framework.common.pojo.CommonResult; |
| 5 | 6 | import cn.iocoder.yudao.framework.common.pojo.PageParam; |
| 6 | 7 | import cn.iocoder.yudao.framework.common.pojo.PageResult; |
| 7 | 8 | import cn.iocoder.yudao.framework.common.util.object.BeanUtils; |
| 8 | 9 | import cn.iocoder.yudao.framework.excel.core.util.ExcelUtils; |
| 9 | -import cn.iocoder.yudao.framework.operatelog.core.annotations.OperateLog; | |
| 10 | 10 | import cn.iocoder.yudao.module.erp.controller.admin.product.vo.product.ErpProductPageReqVO; |
| 11 | 11 | import cn.iocoder.yudao.module.erp.controller.admin.product.vo.product.ErpProductRespVO; |
| 12 | 12 | import cn.iocoder.yudao.module.erp.controller.admin.product.vo.product.ProductSaveReqVO; |
| ... | ... | @@ -25,9 +25,9 @@ import org.springframework.web.bind.annotation.*; |
| 25 | 25 | import java.io.IOException; |
| 26 | 26 | import java.util.List; |
| 27 | 27 | |
| 28 | +import static cn.iocoder.yudao.framework.apilog.core.enums.OperateTypeEnum.EXPORT; | |
| 28 | 29 | import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success; |
| 29 | 30 | import static cn.iocoder.yudao.framework.common.util.collection.CollectionUtils.convertList; |
| 30 | -import static cn.iocoder.yudao.framework.operatelog.core.enums.OperateTypeEnum.EXPORT; | |
| 31 | 31 | |
| 32 | 32 | @Tag(name = "管理后台 - ERP 产品") |
| 33 | 33 | @RestController |
| ... | ... | @@ -92,7 +92,7 @@ public class ErpProductController { |
| 92 | 92 | @GetMapping("/export-excel") |
| 93 | 93 | @Operation(summary = "导出产品 Excel") |
| 94 | 94 | @PreAuthorize("@ss.hasPermission('erp:product:export')") |
| 95 | - @OperateLog(type = EXPORT) | |
| 95 | + @ApiAccessLog(operateType = EXPORT) | |
| 96 | 96 | public void exportProductExcel(@Valid ErpProductPageReqVO pageReqVO, |
| 97 | 97 | HttpServletResponse response) throws IOException { |
| 98 | 98 | pageReqVO.setPageSize(PageParam.PAGE_SIZE_NONE); | ... | ... |
yudao-module-erp/yudao-module-erp-biz/src/main/java/cn/iocoder/yudao/module/erp/controller/admin/product/ErpProductUnitController.java
| 1 | 1 | package cn.iocoder.yudao.module.erp.controller.admin.product; |
| 2 | 2 | |
| 3 | +import cn.iocoder.yudao.framework.apilog.core.annotations.ApiAccessLog; | |
| 3 | 4 | import cn.iocoder.yudao.framework.common.enums.CommonStatusEnum; |
| 4 | 5 | import cn.iocoder.yudao.framework.common.pojo.CommonResult; |
| 5 | 6 | import cn.iocoder.yudao.framework.common.pojo.PageParam; |
| 6 | 7 | import cn.iocoder.yudao.framework.common.pojo.PageResult; |
| 7 | 8 | import cn.iocoder.yudao.framework.common.util.object.BeanUtils; |
| 8 | 9 | import cn.iocoder.yudao.framework.excel.core.util.ExcelUtils; |
| 9 | -import cn.iocoder.yudao.framework.operatelog.core.annotations.OperateLog; | |
| 10 | 10 | import cn.iocoder.yudao.module.erp.controller.admin.product.vo.unit.ErpProductUnitPageReqVO; |
| 11 | 11 | import cn.iocoder.yudao.module.erp.controller.admin.product.vo.unit.ErpProductUnitRespVO; |
| 12 | 12 | import cn.iocoder.yudao.module.erp.controller.admin.product.vo.unit.ErpProductUnitSaveReqVO; |
| ... | ... | @@ -25,9 +25,9 @@ import org.springframework.web.bind.annotation.*; |
| 25 | 25 | import java.io.IOException; |
| 26 | 26 | import java.util.List; |
| 27 | 27 | |
| 28 | +import static cn.iocoder.yudao.framework.apilog.core.enums.OperateTypeEnum.EXPORT; | |
| 28 | 29 | import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success; |
| 29 | 30 | import static cn.iocoder.yudao.framework.common.util.collection.CollectionUtils.convertList; |
| 30 | -import static cn.iocoder.yudao.framework.operatelog.core.enums.OperateTypeEnum.EXPORT; | |
| 31 | 31 | |
| 32 | 32 | @Tag(name = "管理后台 - ERP 产品单位") |
| 33 | 33 | @RestController |
| ... | ... | @@ -89,7 +89,7 @@ public class ErpProductUnitController { |
| 89 | 89 | @GetMapping("/export-excel") |
| 90 | 90 | @Operation(summary = "导出产品单位 Excel") |
| 91 | 91 | @PreAuthorize("@ss.hasPermission('erp:product-unit:export')") |
| 92 | - @OperateLog(type = EXPORT) | |
| 92 | + @ApiAccessLog(operateType = EXPORT) | |
| 93 | 93 | public void exportProductUnitExcel(@Valid ErpProductUnitPageReqVO pageReqVO, |
| 94 | 94 | HttpServletResponse response) throws IOException { |
| 95 | 95 | pageReqVO.setPageSize(PageParam.PAGE_SIZE_NONE); | ... | ... |
yudao-module-erp/yudao-module-erp-biz/src/main/java/cn/iocoder/yudao/module/erp/controller/admin/purchase/ErpPurchaseInController.java
| 1 | 1 | package cn.iocoder.yudao.module.erp.controller.admin.purchase; |
| 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.PageParam; |
| 6 | 7 | import cn.iocoder.yudao.framework.common.pojo.PageResult; |
| 7 | 8 | import cn.iocoder.yudao.framework.common.util.collection.MapUtils; |
| 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.erp.controller.admin.product.vo.product.ErpProductRespVO; |
| 12 | 12 | import cn.iocoder.yudao.module.erp.controller.admin.purchase.vo.in.ErpPurchaseInPageReqVO; |
| 13 | 13 | import cn.iocoder.yudao.module.erp.controller.admin.purchase.vo.in.ErpPurchaseInRespVO; |
| ... | ... | @@ -37,10 +37,10 @@ import java.math.BigDecimal; |
| 37 | 37 | import java.util.List; |
| 38 | 38 | import java.util.Map; |
| 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.util.collection.CollectionUtils.convertMultiMap; |
| 42 | 43 | import static cn.iocoder.yudao.framework.common.util.collection.CollectionUtils.convertSet; |
| 43 | -import static cn.iocoder.yudao.framework.operatelog.core.enums.OperateTypeEnum.EXPORT; | |
| 44 | 44 | |
| 45 | 45 | @Tag(name = "管理后台 - ERP 采购入库") |
| 46 | 46 | @RestController |
| ... | ... | @@ -125,7 +125,7 @@ public class ErpPurchaseInController { |
| 125 | 125 | @GetMapping("/export-excel") |
| 126 | 126 | @Operation(summary = "导出采购入库 Excel") |
| 127 | 127 | @PreAuthorize("@ss.hasPermission('erp:purchase-in:export')") |
| 128 | - @OperateLog(type = EXPORT) | |
| 128 | + @ApiAccessLog(operateType = EXPORT) | |
| 129 | 129 | public void exportPurchaseInExcel(@Valid ErpPurchaseInPageReqVO pageReqVO, |
| 130 | 130 | HttpServletResponse response) throws IOException { |
| 131 | 131 | pageReqVO.setPageSize(PageParam.PAGE_SIZE_NONE); | ... | ... |
yudao-module-erp/yudao-module-erp-biz/src/main/java/cn/iocoder/yudao/module/erp/controller/admin/purchase/ErpPurchaseOrderController.java
| 1 | 1 | package cn.iocoder.yudao.module.erp.controller.admin.purchase; |
| 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.PageParam; |
| 6 | 7 | import cn.iocoder.yudao.framework.common.pojo.PageResult; |
| 7 | 8 | import cn.iocoder.yudao.framework.common.util.collection.MapUtils; |
| 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.erp.controller.admin.product.vo.product.ErpProductRespVO; |
| 12 | 12 | import cn.iocoder.yudao.module.erp.controller.admin.purchase.vo.order.ErpPurchaseOrderPageReqVO; |
| 13 | 13 | import cn.iocoder.yudao.module.erp.controller.admin.purchase.vo.order.ErpPurchaseOrderRespVO; |
| ... | ... | @@ -36,10 +36,10 @@ import java.math.BigDecimal; |
| 36 | 36 | import java.util.List; |
| 37 | 37 | import java.util.Map; |
| 38 | 38 | |
| 39 | +import static cn.iocoder.yudao.framework.apilog.core.enums.OperateTypeEnum.EXPORT; | |
| 39 | 40 | import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success; |
| 40 | 41 | import static cn.iocoder.yudao.framework.common.util.collection.CollectionUtils.convertMultiMap; |
| 41 | 42 | import static cn.iocoder.yudao.framework.common.util.collection.CollectionUtils.convertSet; |
| 42 | -import static cn.iocoder.yudao.framework.operatelog.core.enums.OperateTypeEnum.EXPORT; | |
| 43 | 43 | |
| 44 | 44 | @Tag(name = "管理后台 - ERP 采购订单") |
| 45 | 45 | @RestController |
| ... | ... | @@ -124,7 +124,7 @@ public class ErpPurchaseOrderController { |
| 124 | 124 | @GetMapping("/export-excel") |
| 125 | 125 | @Operation(summary = "导出采购订单 Excel") |
| 126 | 126 | @PreAuthorize("@ss.hasPermission('erp:purchase-order:export')") |
| 127 | - @OperateLog(type = EXPORT) | |
| 127 | + @ApiAccessLog(operateType = EXPORT) | |
| 128 | 128 | public void exportPurchaseOrderExcel(@Valid ErpPurchaseOrderPageReqVO pageReqVO, |
| 129 | 129 | HttpServletResponse response) throws IOException { |
| 130 | 130 | pageReqVO.setPageSize(PageParam.PAGE_SIZE_NONE); | ... | ... |
yudao-module-erp/yudao-module-erp-biz/src/main/java/cn/iocoder/yudao/module/erp/controller/admin/purchase/ErpPurchaseReturnController.java
| 1 | 1 | package cn.iocoder.yudao.module.erp.controller.admin.purchase; |
| 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.PageParam; |
| 6 | 7 | import cn.iocoder.yudao.framework.common.pojo.PageResult; |
| 7 | 8 | import cn.iocoder.yudao.framework.common.util.collection.MapUtils; |
| 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.erp.controller.admin.product.vo.product.ErpProductRespVO; |
| 12 | 12 | import cn.iocoder.yudao.module.erp.controller.admin.purchase.vo.returns.ErpPurchaseReturnPageReqVO; |
| 13 | 13 | import cn.iocoder.yudao.module.erp.controller.admin.purchase.vo.returns.ErpPurchaseReturnRespVO; |
| ... | ... | @@ -37,10 +37,10 @@ import java.math.BigDecimal; |
| 37 | 37 | import java.util.List; |
| 38 | 38 | import java.util.Map; |
| 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.util.collection.CollectionUtils.convertMultiMap; |
| 42 | 43 | import static cn.iocoder.yudao.framework.common.util.collection.CollectionUtils.convertSet; |
| 43 | -import static cn.iocoder.yudao.framework.operatelog.core.enums.OperateTypeEnum.EXPORT; | |
| 44 | 44 | |
| 45 | 45 | @Tag(name = "管理后台 - ERP 采购退货") |
| 46 | 46 | @RestController |
| ... | ... | @@ -125,7 +125,7 @@ public class ErpPurchaseReturnController { |
| 125 | 125 | @GetMapping("/export-excel") |
| 126 | 126 | @Operation(summary = "导出采购退货 Excel") |
| 127 | 127 | @PreAuthorize("@ss.hasPermission('erp:purchase-return:export')") |
| 128 | - @OperateLog(type = EXPORT) | |
| 128 | + @ApiAccessLog(operateType = EXPORT) | |
| 129 | 129 | public void exportPurchaseReturnExcel(@Valid ErpPurchaseReturnPageReqVO pageReqVO, |
| 130 | 130 | HttpServletResponse response) throws IOException { |
| 131 | 131 | pageReqVO.setPageSize(PageParam.PAGE_SIZE_NONE); | ... | ... |
yudao-module-erp/yudao-module-erp-biz/src/main/java/cn/iocoder/yudao/module/erp/controller/admin/purchase/ErpSupplierController.java
| 1 | 1 | package cn.iocoder.yudao.module.erp.controller.admin.purchase; |
| 2 | 2 | |
| 3 | +import cn.iocoder.yudao.framework.apilog.core.annotations.ApiAccessLog; | |
| 3 | 4 | import cn.iocoder.yudao.framework.common.enums.CommonStatusEnum; |
| 4 | 5 | import cn.iocoder.yudao.framework.common.pojo.CommonResult; |
| 5 | 6 | import cn.iocoder.yudao.framework.common.pojo.PageParam; |
| 6 | 7 | import cn.iocoder.yudao.framework.common.pojo.PageResult; |
| 7 | 8 | import cn.iocoder.yudao.framework.common.util.object.BeanUtils; |
| 8 | 9 | import cn.iocoder.yudao.framework.excel.core.util.ExcelUtils; |
| 9 | -import cn.iocoder.yudao.framework.operatelog.core.annotations.OperateLog; | |
| 10 | 10 | import cn.iocoder.yudao.module.erp.controller.admin.purchase.vo.supplier.ErpSupplierPageReqVO; |
| 11 | 11 | import cn.iocoder.yudao.module.erp.controller.admin.purchase.vo.supplier.ErpSupplierRespVO; |
| 12 | 12 | import cn.iocoder.yudao.module.erp.controller.admin.purchase.vo.supplier.ErpSupplierSaveReqVO; |
| ... | ... | @@ -25,9 +25,9 @@ import org.springframework.web.bind.annotation.*; |
| 25 | 25 | import java.io.IOException; |
| 26 | 26 | import java.util.List; |
| 27 | 27 | |
| 28 | +import static cn.iocoder.yudao.framework.apilog.core.enums.OperateTypeEnum.EXPORT; | |
| 28 | 29 | import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success; |
| 29 | 30 | import static cn.iocoder.yudao.framework.common.util.collection.CollectionUtils.convertList; |
| 30 | -import static cn.iocoder.yudao.framework.operatelog.core.enums.OperateTypeEnum.EXPORT; | |
| 31 | 31 | |
| 32 | 32 | @Tag(name = "管理后台 - ERP 供应商") |
| 33 | 33 | @RestController |
| ... | ... | @@ -89,7 +89,7 @@ public class ErpSupplierController { |
| 89 | 89 | @GetMapping("/export-excel") |
| 90 | 90 | @Operation(summary = "导出供应商 Excel") |
| 91 | 91 | @PreAuthorize("@ss.hasPermission('erp:supplier:export')") |
| 92 | - @OperateLog(type = EXPORT) | |
| 92 | + @ApiAccessLog(operateType = EXPORT) | |
| 93 | 93 | public void exportSupplierExcel(@Valid ErpSupplierPageReqVO pageReqVO, |
| 94 | 94 | HttpServletResponse response) throws IOException { |
| 95 | 95 | pageReqVO.setPageSize(PageParam.PAGE_SIZE_NONE); | ... | ... |
yudao-module-erp/yudao-module-erp-biz/src/main/java/cn/iocoder/yudao/module/erp/controller/admin/sale/ErpCustomerController.java
| 1 | 1 | package cn.iocoder.yudao.module.erp.controller.admin.sale; |
| 2 | 2 | |
| 3 | +import cn.iocoder.yudao.framework.apilog.core.annotations.ApiAccessLog; | |
| 3 | 4 | import cn.iocoder.yudao.framework.common.enums.CommonStatusEnum; |
| 4 | 5 | import cn.iocoder.yudao.framework.common.pojo.CommonResult; |
| 5 | 6 | import cn.iocoder.yudao.framework.common.pojo.PageParam; |
| 6 | 7 | import cn.iocoder.yudao.framework.common.pojo.PageResult; |
| 7 | 8 | import cn.iocoder.yudao.framework.common.util.object.BeanUtils; |
| 8 | 9 | import cn.iocoder.yudao.framework.excel.core.util.ExcelUtils; |
| 9 | -import cn.iocoder.yudao.framework.operatelog.core.annotations.OperateLog; | |
| 10 | 10 | import cn.iocoder.yudao.module.erp.controller.admin.sale.vo.customer.ErpCustomerPageReqVO; |
| 11 | 11 | import cn.iocoder.yudao.module.erp.controller.admin.sale.vo.customer.ErpCustomerRespVO; |
| 12 | 12 | import cn.iocoder.yudao.module.erp.controller.admin.sale.vo.customer.ErpCustomerSaveReqVO; |
| ... | ... | @@ -25,9 +25,9 @@ import org.springframework.web.bind.annotation.*; |
| 25 | 25 | import java.io.IOException; |
| 26 | 26 | import java.util.List; |
| 27 | 27 | |
| 28 | +import static cn.iocoder.yudao.framework.apilog.core.enums.OperateTypeEnum.EXPORT; | |
| 28 | 29 | import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success; |
| 29 | 30 | import static cn.iocoder.yudao.framework.common.util.collection.CollectionUtils.convertList; |
| 30 | -import static cn.iocoder.yudao.framework.operatelog.core.enums.OperateTypeEnum.EXPORT; | |
| 31 | 31 | |
| 32 | 32 | @Tag(name = "管理后台 - ERP 客户") |
| 33 | 33 | @RestController |
| ... | ... | @@ -89,7 +89,7 @@ public class ErpCustomerController { |
| 89 | 89 | @GetMapping("/export-excel") |
| 90 | 90 | @Operation(summary = "导出客户 Excel") |
| 91 | 91 | @PreAuthorize("@ss.hasPermission('erp:customer:export')") |
| 92 | - @OperateLog(type = EXPORT) | |
| 92 | + @ApiAccessLog(operateType = EXPORT) | |
| 93 | 93 | public void exportCustomerExcel(@Valid ErpCustomerPageReqVO pageReqVO, |
| 94 | 94 | HttpServletResponse response) throws IOException { |
| 95 | 95 | pageReqVO.setPageSize(PageParam.PAGE_SIZE_NONE); | ... | ... |
yudao-module-erp/yudao-module-erp-biz/src/main/java/cn/iocoder/yudao/module/erp/controller/admin/sale/ErpSaleOrderController.java
| 1 | 1 | package cn.iocoder.yudao.module.erp.controller.admin.sale; |
| 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.PageParam; |
| 6 | 7 | import cn.iocoder.yudao.framework.common.pojo.PageResult; |
| 7 | 8 | import cn.iocoder.yudao.framework.common.util.collection.MapUtils; |
| 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.erp.controller.admin.product.vo.product.ErpProductRespVO; |
| 12 | 12 | import cn.iocoder.yudao.module.erp.controller.admin.sale.vo.order.ErpSaleOrderPageReqVO; |
| 13 | 13 | import cn.iocoder.yudao.module.erp.controller.admin.sale.vo.order.ErpSaleOrderRespVO; |
| ... | ... | @@ -36,11 +36,10 @@ import java.math.BigDecimal; |
| 36 | 36 | import java.util.List; |
| 37 | 37 | import java.util.Map; |
| 38 | 38 | |
| 39 | +import static cn.iocoder.yudao.framework.apilog.core.enums.OperateTypeEnum.EXPORT; | |
| 39 | 40 | import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success; |
| 40 | 41 | import static cn.iocoder.yudao.framework.common.util.collection.CollectionUtils.convertMultiMap; |
| 41 | 42 | import static cn.iocoder.yudao.framework.common.util.collection.CollectionUtils.convertSet; |
| 42 | -import static cn.iocoder.yudao.framework.operatelog.core.enums.OperateTypeEnum.EXPORT; | |
| 43 | - | |
| 44 | 43 | |
| 45 | 44 | @Tag(name = "管理后台 - ERP 销售订单") |
| 46 | 45 | @RestController |
| ... | ... | @@ -125,7 +124,7 @@ public class ErpSaleOrderController { |
| 125 | 124 | @GetMapping("/export-excel") |
| 126 | 125 | @Operation(summary = "导出销售订单 Excel") |
| 127 | 126 | @PreAuthorize("@ss.hasPermission('erp:sale-out:export')") |
| 128 | - @OperateLog(type = EXPORT) | |
| 127 | + @ApiAccessLog(operateType = EXPORT) | |
| 129 | 128 | public void exportSaleOrderExcel(@Valid ErpSaleOrderPageReqVO pageReqVO, |
| 130 | 129 | HttpServletResponse response) throws IOException { |
| 131 | 130 | pageReqVO.setPageSize(PageParam.PAGE_SIZE_NONE); | ... | ... |
yudao-module-erp/yudao-module-erp-biz/src/main/java/cn/iocoder/yudao/module/erp/controller/admin/sale/ErpSaleOutController.java
| 1 | 1 | package cn.iocoder.yudao.module.erp.controller.admin.sale; |
| 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.PageParam; |
| 6 | 7 | import cn.iocoder.yudao.framework.common.pojo.PageResult; |
| 7 | 8 | import cn.iocoder.yudao.framework.common.util.collection.MapUtils; |
| 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.erp.controller.admin.product.vo.product.ErpProductRespVO; |
| 12 | 12 | import cn.iocoder.yudao.module.erp.controller.admin.sale.vo.out.ErpSaleOutPageReqVO; |
| 13 | 13 | import cn.iocoder.yudao.module.erp.controller.admin.sale.vo.out.ErpSaleOutRespVO; |
| ... | ... | @@ -37,10 +37,10 @@ import java.math.BigDecimal; |
| 37 | 37 | import java.util.List; |
| 38 | 38 | import java.util.Map; |
| 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.util.collection.CollectionUtils.convertMultiMap; |
| 42 | 43 | import static cn.iocoder.yudao.framework.common.util.collection.CollectionUtils.convertSet; |
| 43 | -import static cn.iocoder.yudao.framework.operatelog.core.enums.OperateTypeEnum.EXPORT; | |
| 44 | 44 | |
| 45 | 45 | @Tag(name = "管理后台 - ERP 销售出库") |
| 46 | 46 | @RestController |
| ... | ... | @@ -125,7 +125,7 @@ public class ErpSaleOutController { |
| 125 | 125 | @GetMapping("/export-excel") |
| 126 | 126 | @Operation(summary = "导出销售出库 Excel") |
| 127 | 127 | @PreAuthorize("@ss.hasPermission('erp:sale-out:export')") |
| 128 | - @OperateLog(type = EXPORT) | |
| 128 | + @ApiAccessLog(operateType = EXPORT) | |
| 129 | 129 | public void exportSaleOutExcel(@Valid ErpSaleOutPageReqVO pageReqVO, |
| 130 | 130 | HttpServletResponse response) throws IOException { |
| 131 | 131 | pageReqVO.setPageSize(PageParam.PAGE_SIZE_NONE); | ... | ... |
yudao-module-erp/yudao-module-erp-biz/src/main/java/cn/iocoder/yudao/module/erp/controller/admin/sale/ErpSaleReturnController.java
| 1 | 1 | package cn.iocoder.yudao.module.erp.controller.admin.sale; |
| 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.PageParam; |
| 6 | 7 | import cn.iocoder.yudao.framework.common.pojo.PageResult; |
| 7 | 8 | import cn.iocoder.yudao.framework.common.util.collection.MapUtils; |
| 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.erp.controller.admin.product.vo.product.ErpProductRespVO; |
| 12 | 12 | import cn.iocoder.yudao.module.erp.controller.admin.sale.vo.returns.ErpSaleReturnPageReqVO; |
| 13 | 13 | import cn.iocoder.yudao.module.erp.controller.admin.sale.vo.returns.ErpSaleReturnRespVO; |
| ... | ... | @@ -37,10 +37,10 @@ import java.math.BigDecimal; |
| 37 | 37 | import java.util.List; |
| 38 | 38 | import java.util.Map; |
| 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.util.collection.CollectionUtils.convertMultiMap; |
| 42 | 43 | import static cn.iocoder.yudao.framework.common.util.collection.CollectionUtils.convertSet; |
| 43 | -import static cn.iocoder.yudao.framework.operatelog.core.enums.OperateTypeEnum.EXPORT; | |
| 44 | 44 | |
| 45 | 45 | @Tag(name = "管理后台 - ERP 销售退货") |
| 46 | 46 | @RestController |
| ... | ... | @@ -125,7 +125,7 @@ public class ErpSaleReturnController { |
| 125 | 125 | @GetMapping("/export-excel") |
| 126 | 126 | @Operation(summary = "导出销售退货 Excel") |
| 127 | 127 | @PreAuthorize("@ss.hasPermission('erp:sale-return:export')") |
| 128 | - @OperateLog(type = EXPORT) | |
| 128 | + @ApiAccessLog(operateType = EXPORT) | |
| 129 | 129 | public void exportSaleReturnExcel(@Valid ErpSaleReturnPageReqVO pageReqVO, |
| 130 | 130 | HttpServletResponse response) throws IOException { |
| 131 | 131 | pageReqVO.setPageSize(PageParam.PAGE_SIZE_NONE); | ... | ... |
yudao-module-erp/yudao-module-erp-biz/src/main/java/cn/iocoder/yudao/module/erp/controller/admin/stock/ErpStockCheckController.java
| 1 | 1 | package cn.iocoder.yudao.module.erp.controller.admin.stock; |
| 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.PageParam; |
| 6 | 7 | import cn.iocoder.yudao.framework.common.pojo.PageResult; |
| 7 | 8 | import cn.iocoder.yudao.framework.common.util.collection.MapUtils; |
| 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.erp.controller.admin.product.vo.product.ErpProductRespVO; |
| 12 | 12 | import cn.iocoder.yudao.module.erp.controller.admin.stock.vo.check.ErpStockCheckPageReqVO; |
| 13 | 13 | import cn.iocoder.yudao.module.erp.controller.admin.stock.vo.check.ErpStockCheckRespVO; |
| ... | ... | @@ -32,10 +32,10 @@ import java.io.IOException; |
| 32 | 32 | import java.util.List; |
| 33 | 33 | import java.util.Map; |
| 34 | 34 | |
| 35 | +import static cn.iocoder.yudao.framework.apilog.core.enums.OperateTypeEnum.EXPORT; | |
| 35 | 36 | import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success; |
| 36 | 37 | import static cn.iocoder.yudao.framework.common.util.collection.CollectionUtils.convertMultiMap; |
| 37 | 38 | import static cn.iocoder.yudao.framework.common.util.collection.CollectionUtils.convertSet; |
| 38 | -import static cn.iocoder.yudao.framework.operatelog.core.enums.OperateTypeEnum.EXPORT; | |
| 39 | 39 | |
| 40 | 40 | @Tag(name = "管理后台 - ERP 库存调拨单") |
| 41 | 41 | @RestController |
| ... | ... | @@ -113,7 +113,7 @@ public class ErpStockCheckController { |
| 113 | 113 | @GetMapping("/export-excel") |
| 114 | 114 | @Operation(summary = "导出库存调拨单 Excel") |
| 115 | 115 | @PreAuthorize("@ss.hasPermission('erp:stock-check:export')") |
| 116 | - @OperateLog(type = EXPORT) | |
| 116 | + @ApiAccessLog(operateType = EXPORT) | |
| 117 | 117 | public void exportStockCheckExcel(@Valid ErpStockCheckPageReqVO pageReqVO, |
| 118 | 118 | HttpServletResponse response) throws IOException { |
| 119 | 119 | pageReqVO.setPageSize(PageParam.PAGE_SIZE_NONE); | ... | ... |
yudao-module-erp/yudao-module-erp-biz/src/main/java/cn/iocoder/yudao/module/erp/controller/admin/stock/ErpStockController.java
| 1 | 1 | package cn.iocoder.yudao.module.erp.controller.admin.stock; |
| 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.PageParam; |
| 6 | 7 | import cn.iocoder.yudao.framework.common.pojo.PageResult; |
| 7 | 8 | import cn.iocoder.yudao.framework.common.util.collection.MapUtils; |
| 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.erp.controller.admin.product.vo.product.ErpProductRespVO; |
| 12 | 12 | import cn.iocoder.yudao.module.erp.controller.admin.stock.vo.stock.ErpStockPageReqVO; |
| 13 | 13 | import cn.iocoder.yudao.module.erp.controller.admin.stock.vo.stock.ErpStockRespVO; |
| ... | ... | @@ -35,9 +35,9 @@ import java.math.BigDecimal; |
| 35 | 35 | import java.util.List; |
| 36 | 36 | import java.util.Map; |
| 37 | 37 | |
| 38 | +import static cn.iocoder.yudao.framework.apilog.core.enums.OperateTypeEnum.EXPORT; | |
| 38 | 39 | import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success; |
| 39 | 40 | import static cn.iocoder.yudao.framework.common.util.collection.CollectionUtils.convertSet; |
| 40 | -import static cn.iocoder.yudao.framework.operatelog.core.enums.OperateTypeEnum.EXPORT; | |
| 41 | 41 | |
| 42 | 42 | @Tag(name = "管理后台 - ERP 产品库存") |
| 43 | 43 | @RestController |
| ... | ... | @@ -85,7 +85,7 @@ public class ErpStockController { |
| 85 | 85 | @GetMapping("/export-excel") |
| 86 | 86 | @Operation(summary = "导出产品库存 Excel") |
| 87 | 87 | @PreAuthorize("@ss.hasPermission('erp:stock:export')") |
| 88 | - @OperateLog(type = EXPORT) | |
| 88 | + @ApiAccessLog(operateType = EXPORT) | |
| 89 | 89 | public void exportStockExcel(@Valid ErpStockPageReqVO pageReqVO, |
| 90 | 90 | HttpServletResponse response) throws IOException { |
| 91 | 91 | pageReqVO.setPageSize(PageParam.PAGE_SIZE_NONE); | ... | ... |
yudao-module-erp/yudao-module-erp-biz/src/main/java/cn/iocoder/yudao/module/erp/controller/admin/stock/ErpStockInController.java
| 1 | 1 | package cn.iocoder.yudao.module.erp.controller.admin.stock; |
| 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.PageParam; |
| 6 | 7 | import cn.iocoder.yudao.framework.common.pojo.PageResult; |
| 7 | 8 | import cn.iocoder.yudao.framework.common.util.collection.MapUtils; |
| 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.erp.controller.admin.product.vo.product.ErpProductRespVO; |
| 12 | 12 | import cn.iocoder.yudao.module.erp.controller.admin.stock.vo.in.ErpStockInPageReqVO; |
| 13 | 13 | import cn.iocoder.yudao.module.erp.controller.admin.stock.vo.in.ErpStockInRespVO; |
| 14 | 14 | import cn.iocoder.yudao.module.erp.controller.admin.stock.vo.in.ErpStockInSaveReqVO; |
| 15 | +import cn.iocoder.yudao.module.erp.dal.dataobject.purchase.ErpSupplierDO; | |
| 15 | 16 | import cn.iocoder.yudao.module.erp.dal.dataobject.stock.ErpStockDO; |
| 16 | 17 | import cn.iocoder.yudao.module.erp.dal.dataobject.stock.ErpStockInDO; |
| 17 | 18 | import cn.iocoder.yudao.module.erp.dal.dataobject.stock.ErpStockInItemDO; |
| 18 | -import cn.iocoder.yudao.module.erp.dal.dataobject.purchase.ErpSupplierDO; | |
| 19 | 19 | import cn.iocoder.yudao.module.erp.service.product.ErpProductService; |
| 20 | 20 | import cn.iocoder.yudao.module.erp.service.purchase.ErpSupplierService; |
| 21 | 21 | import cn.iocoder.yudao.module.erp.service.stock.ErpStockInService; |
| ... | ... | @@ -37,10 +37,10 @@ import java.math.BigDecimal; |
| 37 | 37 | import java.util.List; |
| 38 | 38 | import java.util.Map; |
| 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.util.collection.CollectionUtils.convertMultiMap; |
| 42 | 43 | import static cn.iocoder.yudao.framework.common.util.collection.CollectionUtils.convertSet; |
| 43 | -import static cn.iocoder.yudao.framework.operatelog.core.enums.OperateTypeEnum.EXPORT; | |
| 44 | 44 | |
| 45 | 45 | @Tag(name = "管理后台 - ERP 其它入库单") |
| 46 | 46 | @RestController |
| ... | ... | @@ -125,7 +125,7 @@ public class ErpStockInController { |
| 125 | 125 | @GetMapping("/export-excel") |
| 126 | 126 | @Operation(summary = "导出其它入库单 Excel") |
| 127 | 127 | @PreAuthorize("@ss.hasPermission('erp:stock-in:export')") |
| 128 | - @OperateLog(type = EXPORT) | |
| 128 | + @ApiAccessLog(operateType = EXPORT) | |
| 129 | 129 | public void exportStockInExcel(@Valid ErpStockInPageReqVO pageReqVO, |
| 130 | 130 | HttpServletResponse response) throws IOException { |
| 131 | 131 | pageReqVO.setPageSize(PageParam.PAGE_SIZE_NONE); | ... | ... |
yudao-module-erp/yudao-module-erp-biz/src/main/java/cn/iocoder/yudao/module/erp/controller/admin/stock/ErpStockMoveController.java
| 1 | 1 | package cn.iocoder.yudao.module.erp.controller.admin.stock; |
| 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.PageParam; |
| 6 | 7 | import cn.iocoder.yudao.framework.common.pojo.PageResult; |
| 7 | 8 | import cn.iocoder.yudao.framework.common.util.collection.MapUtils; |
| 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.erp.controller.admin.product.vo.product.ErpProductRespVO; |
| 12 | 12 | import cn.iocoder.yudao.module.erp.controller.admin.stock.vo.move.ErpStockMovePageReqVO; |
| 13 | 13 | import cn.iocoder.yudao.module.erp.controller.admin.stock.vo.move.ErpStockMoveRespVO; |
| ... | ... | @@ -35,10 +35,10 @@ import java.math.BigDecimal; |
| 35 | 35 | import java.util.List; |
| 36 | 36 | import java.util.Map; |
| 37 | 37 | |
| 38 | +import static cn.iocoder.yudao.framework.apilog.core.enums.OperateTypeEnum.EXPORT; | |
| 38 | 39 | import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success; |
| 39 | 40 | import static cn.iocoder.yudao.framework.common.util.collection.CollectionUtils.convertMultiMap; |
| 40 | 41 | import static cn.iocoder.yudao.framework.common.util.collection.CollectionUtils.convertSet; |
| 41 | -import static cn.iocoder.yudao.framework.operatelog.core.enums.OperateTypeEnum.EXPORT; | |
| 42 | 42 | |
| 43 | 43 | @Tag(name = "管理后台 - ERP 库存调拨单") |
| 44 | 44 | @RestController |
| ... | ... | @@ -121,7 +121,7 @@ public class ErpStockMoveController { |
| 121 | 121 | @GetMapping("/export-excel") |
| 122 | 122 | @Operation(summary = "导出库存调拨单 Excel") |
| 123 | 123 | @PreAuthorize("@ss.hasPermission('erp:stock-move:export')") |
| 124 | - @OperateLog(type = EXPORT) | |
| 124 | + @ApiAccessLog(operateType = EXPORT) | |
| 125 | 125 | public void exportStockMoveExcel(@Valid ErpStockMovePageReqVO pageReqVO, |
| 126 | 126 | HttpServletResponse response) throws IOException { |
| 127 | 127 | pageReqVO.setPageSize(PageParam.PAGE_SIZE_NONE); | ... | ... |
yudao-module-erp/yudao-module-erp-biz/src/main/java/cn/iocoder/yudao/module/erp/controller/admin/stock/ErpStockOutController.java
| 1 | 1 | package cn.iocoder.yudao.module.erp.controller.admin.stock; |
| 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.PageParam; |
| 6 | 7 | import cn.iocoder.yudao.framework.common.pojo.PageResult; |
| 7 | 8 | import cn.iocoder.yudao.framework.common.util.collection.MapUtils; |
| 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.erp.controller.admin.product.vo.product.ErpProductRespVO; |
| 12 | 12 | import cn.iocoder.yudao.module.erp.controller.admin.stock.vo.out.ErpStockOutPageReqVO; |
| 13 | 13 | import cn.iocoder.yudao.module.erp.controller.admin.stock.vo.out.ErpStockOutRespVO; |
| ... | ... | @@ -37,10 +37,10 @@ import java.math.BigDecimal; |
| 37 | 37 | import java.util.List; |
| 38 | 38 | import java.util.Map; |
| 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.util.collection.CollectionUtils.convertMultiMap; |
| 42 | 43 | import static cn.iocoder.yudao.framework.common.util.collection.CollectionUtils.convertSet; |
| 43 | -import static cn.iocoder.yudao.framework.operatelog.core.enums.OperateTypeEnum.EXPORT; | |
| 44 | 44 | |
| 45 | 45 | @Tag(name = "管理后台 - ERP 其它出库单") |
| 46 | 46 | @RestController |
| ... | ... | @@ -125,7 +125,7 @@ public class ErpStockOutController { |
| 125 | 125 | @GetMapping("/export-excel") |
| 126 | 126 | @Operation(summary = "导出其它出库单 Excel") |
| 127 | 127 | @PreAuthorize("@ss.hasPermission('erp:stock-out:export')") |
| 128 | - @OperateLog(type = EXPORT) | |
| 128 | + @ApiAccessLog(operateType = EXPORT) | |
| 129 | 129 | public void exportStockOutExcel(@Valid ErpStockOutPageReqVO pageReqVO, |
| 130 | 130 | HttpServletResponse response) throws IOException { |
| 131 | 131 | pageReqVO.setPageSize(PageParam.PAGE_SIZE_NONE); | ... | ... |
yudao-module-erp/yudao-module-erp-biz/src/main/java/cn/iocoder/yudao/module/erp/controller/admin/stock/ErpStockRecordController.java
| 1 | 1 | package cn.iocoder.yudao.module.erp.controller.admin.stock; |
| 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.PageParam; |
| 6 | 7 | import cn.iocoder.yudao.framework.common.pojo.PageResult; |
| 7 | 8 | import cn.iocoder.yudao.framework.common.util.collection.MapUtils; |
| 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.erp.controller.admin.product.vo.product.ErpProductRespVO; |
| 12 | 12 | import cn.iocoder.yudao.module.erp.controller.admin.stock.vo.record.ErpStockRecordPageReqVO; |
| 13 | 13 | import cn.iocoder.yudao.module.erp.controller.admin.stock.vo.record.ErpStockRecordRespVO; |
| ... | ... | @@ -35,9 +35,9 @@ import java.io.IOException; |
| 35 | 35 | import java.util.List; |
| 36 | 36 | import java.util.Map; |
| 37 | 37 | |
| 38 | +import static cn.iocoder.yudao.framework.apilog.core.enums.OperateTypeEnum.EXPORT; | |
| 38 | 39 | import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success; |
| 39 | 40 | import static cn.iocoder.yudao.framework.common.util.collection.CollectionUtils.convertSet; |
| 40 | -import static cn.iocoder.yudao.framework.operatelog.core.enums.OperateTypeEnum.EXPORT; | |
| 41 | 41 | |
| 42 | 42 | @Tag(name = "管理后台 - ERP 产品库存明细") |
| 43 | 43 | @RestController |
| ... | ... | @@ -75,7 +75,7 @@ public class ErpStockRecordController { |
| 75 | 75 | @GetMapping("/export-excel") |
| 76 | 76 | @Operation(summary = "导出产品库存明细 Excel") |
| 77 | 77 | @PreAuthorize("@ss.hasPermission('erp:stock-record:export')") |
| 78 | - @OperateLog(type = EXPORT) | |
| 78 | + @ApiAccessLog(operateType = EXPORT) | |
| 79 | 79 | public void exportStockRecordExcel(@Valid ErpStockRecordPageReqVO pageReqVO, |
| 80 | 80 | HttpServletResponse response) throws IOException { |
| 81 | 81 | pageReqVO.setPageSize(PageParam.PAGE_SIZE_NONE); | ... | ... |
yudao-module-erp/yudao-module-erp-biz/src/main/java/cn/iocoder/yudao/module/erp/controller/admin/stock/ErpWarehouseController.java
| 1 | 1 | package cn.iocoder.yudao.module.erp.controller.admin.stock; |
| 2 | 2 | |
| 3 | +import cn.iocoder.yudao.framework.apilog.core.annotations.ApiAccessLog; | |
| 3 | 4 | import cn.iocoder.yudao.framework.common.enums.CommonStatusEnum; |
| 4 | 5 | import cn.iocoder.yudao.framework.common.pojo.CommonResult; |
| 5 | 6 | import cn.iocoder.yudao.framework.common.pojo.PageParam; |
| 6 | 7 | import cn.iocoder.yudao.framework.common.pojo.PageResult; |
| 7 | 8 | import cn.iocoder.yudao.framework.common.util.object.BeanUtils; |
| 8 | 9 | import cn.iocoder.yudao.framework.excel.core.util.ExcelUtils; |
| 9 | -import cn.iocoder.yudao.framework.operatelog.core.annotations.OperateLog; | |
| 10 | -import cn.iocoder.yudao.module.erp.controller.admin.stock.vo.warehouse.ErpWarehouseSaveReqVO; | |
| 11 | 10 | import cn.iocoder.yudao.module.erp.controller.admin.stock.vo.warehouse.ErpWarehousePageReqVO; |
| 12 | 11 | import cn.iocoder.yudao.module.erp.controller.admin.stock.vo.warehouse.ErpWarehouseRespVO; |
| 12 | +import cn.iocoder.yudao.module.erp.controller.admin.stock.vo.warehouse.ErpWarehouseSaveReqVO; | |
| 13 | 13 | import cn.iocoder.yudao.module.erp.dal.dataobject.stock.ErpWarehouseDO; |
| 14 | 14 | import cn.iocoder.yudao.module.erp.service.stock.ErpWarehouseService; |
| 15 | 15 | import io.swagger.v3.oas.annotations.Operation; |
| ... | ... | @@ -26,9 +26,9 @@ import org.springframework.web.bind.annotation.*; |
| 26 | 26 | import java.io.IOException; |
| 27 | 27 | import java.util.List; |
| 28 | 28 | |
| 29 | +import static cn.iocoder.yudao.framework.apilog.core.enums.OperateTypeEnum.EXPORT; | |
| 29 | 30 | import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success; |
| 30 | 31 | import static cn.iocoder.yudao.framework.common.util.collection.CollectionUtils.convertList; |
| 31 | -import static cn.iocoder.yudao.framework.operatelog.core.enums.OperateTypeEnum.EXPORT; | |
| 32 | 32 | |
| 33 | 33 | @Tag(name = "管理后台 - ERP 仓库") |
| 34 | 34 | @RestController |
| ... | ... | @@ -103,7 +103,7 @@ public class ErpWarehouseController { |
| 103 | 103 | @GetMapping("/export-excel") |
| 104 | 104 | @Operation(summary = "导出仓库 Excel") |
| 105 | 105 | @PreAuthorize("@ss.hasPermission('erp:warehouse:export')") |
| 106 | - @OperateLog(type = EXPORT) | |
| 106 | + @ApiAccessLog(operateType = EXPORT) | |
| 107 | 107 | public void exportWarehouseExcel(@Valid ErpWarehousePageReqVO pageReqVO, |
| 108 | 108 | HttpServletResponse response) throws IOException { |
| 109 | 109 | pageReqVO.setPageSize(PageParam.PAGE_SIZE_NONE); | ... | ... |
yudao-module-infra/yudao-module-infra-api/src/main/java/cn/iocoder/yudao/module/infra/api/logger/dto/ApiAccessLogCreateReqDTO.java
| ... | ... | @@ -44,9 +44,12 @@ public class ApiAccessLogCreateReqDTO { |
| 44 | 44 | /** |
| 45 | 45 | * 请求参数 |
| 46 | 46 | */ |
| 47 | - @NotNull(message = "请求参数不能为空") | |
| 48 | 47 | private String requestParams; |
| 49 | 48 | /** |
| 49 | + * 响应结果 | |
| 50 | + */ | |
| 51 | + private String responseBody; | |
| 52 | + /** | |
| 50 | 53 | * 用户 IP |
| 51 | 54 | */ |
| 52 | 55 | @NotNull(message = "ip 不能为空") |
| ... | ... | @@ -58,6 +61,21 @@ public class ApiAccessLogCreateReqDTO { |
| 58 | 61 | private String userAgent; |
| 59 | 62 | |
| 60 | 63 | /** |
| 64 | + * 操作模块 | |
| 65 | + */ | |
| 66 | + private String operateModule; | |
| 67 | + /** | |
| 68 | + * 操作名 | |
| 69 | + */ | |
| 70 | + private String operateName; | |
| 71 | + /** | |
| 72 | + * 操作分类 | |
| 73 | + * | |
| 74 | + * 枚举,参见 OperateTypeEnum 类 | |
| 75 | + */ | |
| 76 | + private Integer operateType; | |
| 77 | + | |
| 78 | + /** | |
| 61 | 79 | * 开始请求时间 |
| 62 | 80 | */ |
| 63 | 81 | @NotNull(message = "开始请求时间不能为空") | ... | ... |
yudao-module-infra/yudao-module-infra-api/src/main/java/cn/iocoder/yudao/module/infra/enums/DictTypeConstants.java
| ... | ... | @@ -7,8 +7,6 @@ package cn.iocoder.yudao.module.infra.enums; |
| 7 | 7 | */ |
| 8 | 8 | public interface DictTypeConstants { |
| 9 | 9 | |
| 10 | - String REDIS_TIMEOUT_TYPE = "infra_redis_timeout_type"; // Redis 超时类型 | |
| 11 | - | |
| 12 | 10 | String JOB_STATUS = "infra_job_status"; // 定时任务状态的枚举 |
| 13 | 11 | String JOB_LOG_STATUS = "infra_job_log_status"; // 定时任务日志状态的枚举 |
| 14 | 12 | |
| ... | ... | @@ -17,4 +15,6 @@ public interface DictTypeConstants { |
| 17 | 15 | String CONFIG_TYPE = "infra_config_type"; // 参数配置类型 |
| 18 | 16 | String BOOLEAN_STRING = "infra_boolean_string"; // Boolean 是否类型 |
| 19 | 17 | |
| 18 | + String OPERATE_TYPE = "infra_operate_type"; // 操作类型 | |
| 19 | + | |
| 20 | 20 | } | ... | ... |
yudao-module-infra/yudao-module-infra-biz/pom.xml
| ... | ... | @@ -33,10 +33,6 @@ |
| 33 | 33 | <!-- 业务组件 --> |
| 34 | 34 | <dependency> |
| 35 | 35 | <groupId>cn.iocoder.boot</groupId> |
| 36 | - <artifactId>yudao-spring-boot-starter-biz-operatelog</artifactId> | |
| 37 | - </dependency> | |
| 38 | - <dependency> | |
| 39 | - <groupId>cn.iocoder.boot</groupId> | |
| 40 | 36 | <artifactId>yudao-spring-boot-starter-biz-tenant</artifactId> |
| 41 | 37 | </dependency> |
| 42 | 38 | ... | ... |
yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/controller/admin/config/ConfigController.java
| 1 | 1 | package cn.iocoder.yudao.module.infra.controller.admin.config; |
| 2 | 2 | |
| 3 | +import cn.iocoder.yudao.framework.apilog.core.annotations.ApiAccessLog; | |
| 3 | 4 | import cn.iocoder.yudao.framework.common.pojo.CommonResult; |
| 4 | 5 | import cn.iocoder.yudao.framework.common.pojo.PageParam; |
| 5 | 6 | import cn.iocoder.yudao.framework.common.pojo.PageResult; |
| 6 | 7 | import cn.iocoder.yudao.framework.excel.core.util.ExcelUtils; |
| 7 | -import cn.iocoder.yudao.framework.operatelog.core.annotations.OperateLog; | |
| 8 | 8 | import cn.iocoder.yudao.module.infra.controller.admin.config.vo.*; |
| 9 | 9 | import cn.iocoder.yudao.module.infra.convert.config.ConfigConvert; |
| 10 | 10 | import cn.iocoder.yudao.module.infra.dal.dataobject.config.ConfigDO; |
| ... | ... | @@ -23,9 +23,9 @@ import jakarta.validation.Valid; |
| 23 | 23 | import java.io.IOException; |
| 24 | 24 | import java.util.List; |
| 25 | 25 | |
| 26 | +import static cn.iocoder.yudao.framework.apilog.core.enums.OperateTypeEnum.EXPORT; | |
| 26 | 27 | import static cn.iocoder.yudao.framework.common.exception.util.ServiceExceptionUtil.exception; |
| 27 | 28 | import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success; |
| 28 | -import static cn.iocoder.yudao.framework.operatelog.core.enums.OperateTypeEnum.EXPORT; | |
| 29 | 29 | |
| 30 | 30 | @Tag(name = "管理后台 - 参数配置") |
| 31 | 31 | @RestController |
| ... | ... | @@ -93,7 +93,7 @@ public class ConfigController { |
| 93 | 93 | @GetMapping("/export") |
| 94 | 94 | @Operation(summary = "导出参数配置") |
| 95 | 95 | @PreAuthorize("@ss.hasPermission('infra:config:export')") |
| 96 | - @OperateLog(type = EXPORT) | |
| 96 | + @ApiAccessLog(operateType = EXPORT) | |
| 97 | 97 | public void exportConfig(@Valid ConfigPageReqVO exportReqVO, |
| 98 | 98 | HttpServletResponse response) throws IOException { |
| 99 | 99 | exportReqVO.setPageSize(PageParam.PAGE_SIZE_NONE); | ... | ... |
yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/controller/admin/demo/demo01/Demo01ContactController.java
| 1 | 1 | package cn.iocoder.yudao.module.infra.controller.admin.demo.demo01; |
| 2 | 2 | |
| 3 | +import cn.iocoder.yudao.framework.apilog.core.annotations.ApiAccessLog; | |
| 3 | 4 | import cn.iocoder.yudao.framework.common.pojo.CommonResult; |
| 4 | 5 | import cn.iocoder.yudao.framework.common.pojo.PageParam; |
| 5 | 6 | import cn.iocoder.yudao.framework.common.pojo.PageResult; |
| 6 | 7 | import cn.iocoder.yudao.framework.common.util.object.BeanUtils; |
| 7 | 8 | import cn.iocoder.yudao.framework.excel.core.util.ExcelUtils; |
| 8 | -import cn.iocoder.yudao.framework.operatelog.core.annotations.OperateLog; | |
| 9 | 9 | import cn.iocoder.yudao.module.infra.controller.admin.demo.demo01.vo.Demo01ContactPageReqVO; |
| 10 | 10 | import cn.iocoder.yudao.module.infra.controller.admin.demo.demo01.vo.Demo01ContactRespVO; |
| 11 | 11 | import cn.iocoder.yudao.module.infra.controller.admin.demo.demo01.vo.Demo01ContactSaveReqVO; |
| ... | ... | @@ -14,18 +14,18 @@ import cn.iocoder.yudao.module.infra.service.demo.demo01.Demo01ContactService; |
| 14 | 14 | import io.swagger.v3.oas.annotations.Operation; |
| 15 | 15 | import io.swagger.v3.oas.annotations.Parameter; |
| 16 | 16 | import io.swagger.v3.oas.annotations.tags.Tag; |
| 17 | +import jakarta.annotation.Resource; | |
| 18 | +import jakarta.servlet.http.HttpServletResponse; | |
| 19 | +import jakarta.validation.Valid; | |
| 17 | 20 | import org.springframework.security.access.prepost.PreAuthorize; |
| 18 | 21 | import org.springframework.validation.annotation.Validated; |
| 19 | 22 | import org.springframework.web.bind.annotation.*; |
| 20 | 23 | |
| 21 | -import jakarta.annotation.Resource; | |
| 22 | -import jakarta.servlet.http.HttpServletResponse; | |
| 23 | -import jakarta.validation.Valid; | |
| 24 | 24 | import java.io.IOException; |
| 25 | 25 | import java.util.List; |
| 26 | 26 | |
| 27 | +import static cn.iocoder.yudao.framework.apilog.core.enums.OperateTypeEnum.EXPORT; | |
| 27 | 28 | import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success; |
| 28 | -import static cn.iocoder.yudao.framework.operatelog.core.enums.OperateTypeEnum.EXPORT; | |
| 29 | 29 | |
| 30 | 30 | @Tag(name = "管理后台 - 示例联系人") |
| 31 | 31 | @RestController |
| ... | ... | @@ -80,7 +80,7 @@ public class Demo01ContactController { |
| 80 | 80 | @GetMapping("/export-excel") |
| 81 | 81 | @Operation(summary = "导出示例联系人 Excel") |
| 82 | 82 | @PreAuthorize("@ss.hasPermission('infra:demo01-contact:export')") |
| 83 | - @OperateLog(type = EXPORT) | |
| 83 | + @ApiAccessLog(operateType = EXPORT) | |
| 84 | 84 | public void exportDemo01ContactExcel(@Valid Demo01ContactPageReqVO pageReqVO, |
| 85 | 85 | HttpServletResponse response) throws IOException { |
| 86 | 86 | pageReqVO.setPageSize(PageParam.PAGE_SIZE_NONE); | ... | ... |
yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/controller/admin/demo/demo02/Demo02CategoryController.java
| 1 | 1 | package cn.iocoder.yudao.module.infra.controller.admin.demo.demo02; |
| 2 | 2 | |
| 3 | +import cn.iocoder.yudao.framework.apilog.core.annotations.ApiAccessLog; | |
| 3 | 4 | import cn.iocoder.yudao.framework.common.pojo.CommonResult; |
| 4 | 5 | import cn.iocoder.yudao.framework.common.util.object.BeanUtils; |
| 5 | 6 | import cn.iocoder.yudao.framework.excel.core.util.ExcelUtils; |
| 6 | -import cn.iocoder.yudao.framework.operatelog.core.annotations.OperateLog; | |
| 7 | 7 | import cn.iocoder.yudao.module.infra.controller.admin.demo.demo02.vo.Demo02CategoryListReqVO; |
| 8 | 8 | import cn.iocoder.yudao.module.infra.controller.admin.demo.demo02.vo.Demo02CategoryRespVO; |
| 9 | 9 | import cn.iocoder.yudao.module.infra.controller.admin.demo.demo02.vo.Demo02CategorySaveReqVO; |
| ... | ... | @@ -12,18 +12,18 @@ import cn.iocoder.yudao.module.infra.service.demo.demo02.Demo02CategoryService; |
| 12 | 12 | import io.swagger.v3.oas.annotations.Operation; |
| 13 | 13 | import io.swagger.v3.oas.annotations.Parameter; |
| 14 | 14 | import io.swagger.v3.oas.annotations.tags.Tag; |
| 15 | +import jakarta.annotation.Resource; | |
| 16 | +import jakarta.servlet.http.HttpServletResponse; | |
| 17 | +import jakarta.validation.Valid; | |
| 15 | 18 | import org.springframework.security.access.prepost.PreAuthorize; |
| 16 | 19 | import org.springframework.validation.annotation.Validated; |
| 17 | 20 | import org.springframework.web.bind.annotation.*; |
| 18 | 21 | |
| 19 | -import jakarta.annotation.Resource; | |
| 20 | -import jakarta.servlet.http.HttpServletResponse; | |
| 21 | -import jakarta.validation.Valid; | |
| 22 | 22 | import java.io.IOException; |
| 23 | 23 | import java.util.List; |
| 24 | 24 | |
| 25 | +import static cn.iocoder.yudao.framework.apilog.core.enums.OperateTypeEnum.EXPORT; | |
| 25 | 26 | import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success; |
| 26 | -import static cn.iocoder.yudao.framework.operatelog.core.enums.OperateTypeEnum.EXPORT; | |
| 27 | 27 | |
| 28 | 28 | @Tag(name = "管理后台 - 示例分类") |
| 29 | 29 | @RestController |
| ... | ... | @@ -78,7 +78,7 @@ public class Demo02CategoryController { |
| 78 | 78 | @GetMapping("/export-excel") |
| 79 | 79 | @Operation(summary = "导出示例分类 Excel") |
| 80 | 80 | @PreAuthorize("@ss.hasPermission('infra:demo02-category:export')") |
| 81 | - @OperateLog(type = EXPORT) | |
| 81 | + @ApiAccessLog(operateType = EXPORT) | |
| 82 | 82 | public void exportDemo02CategoryExcel(@Valid Demo02CategoryListReqVO listReqVO, |
| 83 | 83 | HttpServletResponse response) throws IOException { |
| 84 | 84 | List<Demo02CategoryDO> list = demo02CategoryService.getDemo02CategoryList(listReqVO); | ... | ... |
yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/controller/admin/demo/demo03/Demo03StudentController.java
| 1 | 1 | package cn.iocoder.yudao.module.infra.controller.admin.demo.demo03; |
| 2 | 2 | |
| 3 | +import cn.iocoder.yudao.framework.apilog.core.annotations.ApiAccessLog; | |
| 3 | 4 | import cn.iocoder.yudao.framework.common.pojo.CommonResult; |
| 4 | 5 | import cn.iocoder.yudao.framework.common.pojo.PageParam; |
| 5 | 6 | import cn.iocoder.yudao.framework.common.pojo.PageResult; |
| 6 | 7 | import cn.iocoder.yudao.framework.common.util.object.BeanUtils; |
| 7 | 8 | import cn.iocoder.yudao.framework.excel.core.util.ExcelUtils; |
| 8 | -import cn.iocoder.yudao.framework.operatelog.core.annotations.OperateLog; | |
| 9 | 9 | import cn.iocoder.yudao.module.infra.controller.admin.demo.demo03.vo.Demo03StudentPageReqVO; |
| 10 | 10 | import cn.iocoder.yudao.module.infra.controller.admin.demo.demo03.vo.Demo03StudentRespVO; |
| 11 | 11 | import cn.iocoder.yudao.module.infra.controller.admin.demo.demo03.vo.Demo03StudentSaveReqVO; |
| ... | ... | @@ -16,18 +16,18 @@ import cn.iocoder.yudao.module.infra.service.demo.demo03.Demo03StudentService; |
| 16 | 16 | import io.swagger.v3.oas.annotations.Operation; |
| 17 | 17 | import io.swagger.v3.oas.annotations.Parameter; |
| 18 | 18 | import io.swagger.v3.oas.annotations.tags.Tag; |
| 19 | +import jakarta.annotation.Resource; | |
| 20 | +import jakarta.servlet.http.HttpServletResponse; | |
| 21 | +import jakarta.validation.Valid; | |
| 19 | 22 | import org.springframework.security.access.prepost.PreAuthorize; |
| 20 | 23 | import org.springframework.validation.annotation.Validated; |
| 21 | 24 | import org.springframework.web.bind.annotation.*; |
| 22 | 25 | |
| 23 | -import jakarta.annotation.Resource; | |
| 24 | -import jakarta.servlet.http.HttpServletResponse; | |
| 25 | -import jakarta.validation.Valid; | |
| 26 | 26 | import java.io.IOException; |
| 27 | 27 | import java.util.List; |
| 28 | 28 | |
| 29 | +import static cn.iocoder.yudao.framework.apilog.core.enums.OperateTypeEnum.EXPORT; | |
| 29 | 30 | import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success; |
| 30 | -import static cn.iocoder.yudao.framework.operatelog.core.enums.OperateTypeEnum.EXPORT; | |
| 31 | 31 | |
| 32 | 32 | @Tag(name = "管理后台 - 学生") |
| 33 | 33 | @RestController |
| ... | ... | @@ -82,7 +82,7 @@ public class Demo03StudentController { |
| 82 | 82 | @GetMapping("/export-excel") |
| 83 | 83 | @Operation(summary = "导出学生 Excel") |
| 84 | 84 | @PreAuthorize("@ss.hasPermission('infra:demo03-student:export')") |
| 85 | - @OperateLog(type = EXPORT) | |
| 85 | + @ApiAccessLog(operateType = EXPORT) | |
| 86 | 86 | public void exportDemo03StudentExcel(@Valid Demo03StudentPageReqVO pageReqVO, |
| 87 | 87 | HttpServletResponse response) throws IOException { |
| 88 | 88 | pageReqVO.setPageSize(PageParam.PAGE_SIZE_NONE); | ... | ... |
yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/controller/admin/file/FileController.java
| ... | ... | @@ -7,7 +7,6 @@ import cn.iocoder.yudao.framework.common.pojo.CommonResult; |
| 7 | 7 | import cn.iocoder.yudao.framework.common.pojo.PageResult; |
| 8 | 8 | import cn.iocoder.yudao.framework.common.util.object.BeanUtils; |
| 9 | 9 | import cn.iocoder.yudao.framework.common.util.servlet.ServletUtils; |
| 10 | -import cn.iocoder.yudao.framework.operatelog.core.annotations.OperateLog; | |
| 11 | 10 | import cn.iocoder.yudao.module.infra.controller.admin.file.vo.file.*; |
| 12 | 11 | import cn.iocoder.yudao.module.infra.dal.dataobject.file.FileDO; |
| 13 | 12 | import cn.iocoder.yudao.module.infra.service.file.FileService; |
| ... | ... | @@ -40,7 +39,6 @@ public class FileController { |
| 40 | 39 | |
| 41 | 40 | @PostMapping("/upload") |
| 42 | 41 | @Operation(summary = "上传文件", description = "模式一:后端上传文件") |
| 43 | - @OperateLog(logArgs = false) // 上传文件,没有记录操作日志的必要 | |
| 44 | 42 | public CommonResult<String> uploadFile(FileUploadReqVO uploadReqVO) throws Exception { |
| 45 | 43 | MultipartFile file = uploadReqVO.getFile(); |
| 46 | 44 | String path = uploadReqVO.getPath(); | ... | ... |
yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/controller/admin/job/JobController.java
| 1 | 1 | package cn.iocoder.yudao.module.infra.controller.admin.job; |
| 2 | 2 | |
| 3 | +import cn.iocoder.yudao.framework.apilog.core.annotations.ApiAccessLog; | |
| 3 | 4 | import cn.iocoder.yudao.framework.common.pojo.CommonResult; |
| 4 | 5 | import cn.iocoder.yudao.framework.common.pojo.PageParam; |
| 5 | 6 | import cn.iocoder.yudao.framework.common.pojo.PageResult; |
| 6 | 7 | import cn.iocoder.yudao.framework.common.util.object.BeanUtils; |
| 7 | 8 | import cn.iocoder.yudao.framework.excel.core.util.ExcelUtils; |
| 8 | -import cn.iocoder.yudao.framework.operatelog.core.annotations.OperateLog; | |
| 9 | 9 | import cn.iocoder.yudao.framework.quartz.core.util.CronUtils; |
| 10 | 10 | import cn.iocoder.yudao.module.infra.controller.admin.job.vo.job.JobPageReqVO; |
| 11 | 11 | import cn.iocoder.yudao.module.infra.controller.admin.job.vo.job.JobRespVO; |
| ... | ... | @@ -16,21 +16,21 @@ import io.swagger.v3.oas.annotations.Operation; |
| 16 | 16 | import io.swagger.v3.oas.annotations.Parameter; |
| 17 | 17 | import io.swagger.v3.oas.annotations.Parameters; |
| 18 | 18 | import io.swagger.v3.oas.annotations.tags.Tag; |
| 19 | +import jakarta.annotation.Resource; | |
| 20 | +import jakarta.servlet.http.HttpServletResponse; | |
| 21 | +import jakarta.validation.Valid; | |
| 19 | 22 | import org.quartz.SchedulerException; |
| 20 | 23 | import org.springframework.security.access.prepost.PreAuthorize; |
| 21 | 24 | import org.springframework.validation.annotation.Validated; |
| 22 | 25 | import org.springframework.web.bind.annotation.*; |
| 23 | 26 | |
| 24 | -import jakarta.annotation.Resource; | |
| 25 | -import jakarta.servlet.http.HttpServletResponse; | |
| 26 | -import jakarta.validation.Valid; | |
| 27 | 27 | import java.io.IOException; |
| 28 | 28 | import java.time.LocalDateTime; |
| 29 | 29 | import java.util.Collections; |
| 30 | 30 | import java.util.List; |
| 31 | 31 | |
| 32 | +import static cn.iocoder.yudao.framework.apilog.core.enums.OperateTypeEnum.EXPORT; | |
| 32 | 33 | import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success; |
| 33 | -import static cn.iocoder.yudao.framework.operatelog.core.enums.OperateTypeEnum.EXPORT; | |
| 34 | 34 | |
| 35 | 35 | @Tag(name = "管理后台 - 定时任务") |
| 36 | 36 | @RestController |
| ... | ... | @@ -110,7 +110,7 @@ public class JobController { |
| 110 | 110 | @GetMapping("/export-excel") |
| 111 | 111 | @Operation(summary = "导出定时任务 Excel") |
| 112 | 112 | @PreAuthorize("@ss.hasPermission('infra:job:export')") |
| 113 | - @OperateLog(type = EXPORT) | |
| 113 | + @ApiAccessLog(operateType = EXPORT) | |
| 114 | 114 | public void exportJobExcel(@Valid JobPageReqVO exportReqVO, |
| 115 | 115 | HttpServletResponse response) throws IOException { |
| 116 | 116 | exportReqVO.setPageSize(PageParam.PAGE_SIZE_NONE); | ... | ... |
yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/controller/admin/job/JobLogController.java
| 1 | 1 | package cn.iocoder.yudao.module.infra.controller.admin.job; |
| 2 | 2 | |
| 3 | +import cn.iocoder.yudao.framework.apilog.core.annotations.ApiAccessLog; | |
| 3 | 4 | import cn.iocoder.yudao.framework.common.pojo.CommonResult; |
| 4 | 5 | import cn.iocoder.yudao.framework.common.pojo.PageParam; |
| 5 | 6 | import cn.iocoder.yudao.framework.common.pojo.PageResult; |
| 6 | 7 | import cn.iocoder.yudao.framework.common.util.object.BeanUtils; |
| 7 | 8 | import cn.iocoder.yudao.framework.excel.core.util.ExcelUtils; |
| 8 | -import cn.iocoder.yudao.framework.operatelog.core.annotations.OperateLog; | |
| 9 | 9 | import cn.iocoder.yudao.module.infra.controller.admin.job.vo.log.JobLogPageReqVO; |
| 10 | 10 | import cn.iocoder.yudao.module.infra.controller.admin.job.vo.log.JobLogRespVO; |
| 11 | 11 | import cn.iocoder.yudao.module.infra.dal.dataobject.job.JobLogDO; |
| ... | ... | @@ -13,6 +13,9 @@ import cn.iocoder.yudao.module.infra.service.job.JobLogService; |
| 13 | 13 | import io.swagger.v3.oas.annotations.Operation; |
| 14 | 14 | import io.swagger.v3.oas.annotations.Parameter; |
| 15 | 15 | import io.swagger.v3.oas.annotations.tags.Tag; |
| 16 | +import jakarta.annotation.Resource; | |
| 17 | +import jakarta.servlet.http.HttpServletResponse; | |
| 18 | +import jakarta.validation.Valid; | |
| 16 | 19 | import org.springframework.security.access.prepost.PreAuthorize; |
| 17 | 20 | import org.springframework.validation.annotation.Validated; |
| 18 | 21 | import org.springframework.web.bind.annotation.GetMapping; |
| ... | ... | @@ -20,14 +23,11 @@ import org.springframework.web.bind.annotation.RequestMapping; |
| 20 | 23 | import org.springframework.web.bind.annotation.RequestParam; |
| 21 | 24 | import org.springframework.web.bind.annotation.RestController; |
| 22 | 25 | |
| 23 | -import jakarta.annotation.Resource; | |
| 24 | -import jakarta.servlet.http.HttpServletResponse; | |
| 25 | -import jakarta.validation.Valid; | |
| 26 | 26 | import java.io.IOException; |
| 27 | 27 | import java.util.List; |
| 28 | 28 | |
| 29 | +import static cn.iocoder.yudao.framework.apilog.core.enums.OperateTypeEnum.EXPORT; | |
| 29 | 30 | import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success; |
| 30 | -import static cn.iocoder.yudao.framework.operatelog.core.enums.OperateTypeEnum.EXPORT; | |
| 31 | 31 | |
| 32 | 32 | @Tag(name = "管理后台 - 定时任务日志") |
| 33 | 33 | @RestController |
| ... | ... | @@ -58,7 +58,7 @@ public class JobLogController { |
| 58 | 58 | @GetMapping("/export-excel") |
| 59 | 59 | @Operation(summary = "导出定时任务日志 Excel") |
| 60 | 60 | @PreAuthorize("@ss.hasPermission('infra:job:export')") |
| 61 | - @OperateLog(type = EXPORT) | |
| 61 | + @ApiAccessLog(operateType = EXPORT) | |
| 62 | 62 | public void exportJobLogExcel(@Valid JobLogPageReqVO exportReqVO, |
| 63 | 63 | HttpServletResponse response) throws IOException { |
| 64 | 64 | exportReqVO.setPageSize(PageParam.PAGE_SIZE_NONE); | ... | ... |
yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/controller/admin/logger/ApiAccessLogController.java
| 1 | 1 | package cn.iocoder.yudao.module.infra.controller.admin.logger; |
| 2 | 2 | |
| 3 | +import cn.iocoder.yudao.framework.apilog.core.annotations.ApiAccessLog; | |
| 3 | 4 | import cn.iocoder.yudao.framework.common.pojo.CommonResult; |
| 4 | 5 | import cn.iocoder.yudao.framework.common.pojo.PageParam; |
| 5 | 6 | import cn.iocoder.yudao.framework.common.pojo.PageResult; |
| 6 | 7 | import cn.iocoder.yudao.framework.common.util.object.BeanUtils; |
| 7 | 8 | import cn.iocoder.yudao.framework.excel.core.util.ExcelUtils; |
| 8 | -import cn.iocoder.yudao.framework.operatelog.core.annotations.OperateLog; | |
| 9 | 9 | import cn.iocoder.yudao.module.infra.controller.admin.logger.vo.apiaccesslog.ApiAccessLogPageReqVO; |
| 10 | 10 | import cn.iocoder.yudao.module.infra.controller.admin.logger.vo.apiaccesslog.ApiAccessLogRespVO; |
| 11 | 11 | import cn.iocoder.yudao.module.infra.dal.dataobject.logger.ApiAccessLogDO; |
| ... | ... | @@ -24,8 +24,8 @@ import jakarta.validation.Valid; |
| 24 | 24 | import java.io.IOException; |
| 25 | 25 | import java.util.List; |
| 26 | 26 | |
| 27 | +import static cn.iocoder.yudao.framework.apilog.core.enums.OperateTypeEnum.EXPORT; | |
| 27 | 28 | import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success; |
| 28 | -import static cn.iocoder.yudao.framework.operatelog.core.enums.OperateTypeEnum.EXPORT; | |
| 29 | 29 | |
| 30 | 30 | @Tag(name = "管理后台 - API 访问日志") |
| 31 | 31 | @RestController |
| ... | ... | @@ -47,7 +47,7 @@ public class ApiAccessLogController { |
| 47 | 47 | @GetMapping("/export-excel") |
| 48 | 48 | @Operation(summary = "导出API 访问日志 Excel") |
| 49 | 49 | @PreAuthorize("@ss.hasPermission('infra:api-access-log:export')") |
| 50 | - @OperateLog(type = EXPORT) | |
| 50 | + @ApiAccessLog(operateType = EXPORT) | |
| 51 | 51 | public void exportApiAccessLogExcel(@Valid ApiAccessLogPageReqVO exportReqVO, |
| 52 | 52 | HttpServletResponse response) throws IOException { |
| 53 | 53 | exportReqVO.setPageSize(PageParam.PAGE_SIZE_NONE); | ... | ... |
yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/controller/admin/logger/ApiErrorLogController.java
| 1 | 1 | package cn.iocoder.yudao.module.infra.controller.admin.logger; |
| 2 | 2 | |
| 3 | +import cn.iocoder.yudao.framework.apilog.core.annotations.ApiAccessLog; | |
| 3 | 4 | import cn.iocoder.yudao.framework.common.pojo.CommonResult; |
| 4 | 5 | import cn.iocoder.yudao.framework.common.pojo.PageParam; |
| 5 | 6 | import cn.iocoder.yudao.framework.common.pojo.PageResult; |
| 6 | 7 | import cn.iocoder.yudao.framework.common.util.object.BeanUtils; |
| 7 | 8 | import cn.iocoder.yudao.framework.excel.core.util.ExcelUtils; |
| 8 | -import cn.iocoder.yudao.framework.operatelog.core.annotations.OperateLog; | |
| 9 | 9 | import cn.iocoder.yudao.module.infra.controller.admin.logger.vo.apierrorlog.ApiErrorLogPageReqVO; |
| 10 | 10 | import cn.iocoder.yudao.module.infra.controller.admin.logger.vo.apierrorlog.ApiErrorLogRespVO; |
| 11 | 11 | import cn.iocoder.yudao.module.infra.dal.dataobject.logger.ApiErrorLogDO; |
| ... | ... | @@ -24,8 +24,8 @@ import jakarta.validation.Valid; |
| 24 | 24 | import java.io.IOException; |
| 25 | 25 | import java.util.List; |
| 26 | 26 | |
| 27 | +import static cn.iocoder.yudao.framework.apilog.core.enums.OperateTypeEnum.EXPORT; | |
| 27 | 28 | import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success; |
| 28 | -import static cn.iocoder.yudao.framework.operatelog.core.enums.OperateTypeEnum.EXPORT; | |
| 29 | 29 | import static cn.iocoder.yudao.framework.security.core.util.SecurityFrameworkUtils.getLoginUserId; |
| 30 | 30 | |
| 31 | 31 | @Tag(name = "管理后台 - API 错误日志") |
| ... | ... | @@ -61,7 +61,7 @@ public class ApiErrorLogController { |
| 61 | 61 | @GetMapping("/export-excel") |
| 62 | 62 | @Operation(summary = "导出 API 错误日志 Excel") |
| 63 | 63 | @PreAuthorize("@ss.hasPermission('infra:api-error-log:export')") |
| 64 | - @OperateLog(type = EXPORT) | |
| 64 | + @ApiAccessLog(operateType = EXPORT) | |
| 65 | 65 | public void exportApiErrorLogExcel(@Valid ApiErrorLogPageReqVO exportReqVO, |
| 66 | 66 | HttpServletResponse response) throws IOException { |
| 67 | 67 | exportReqVO.setPageSize(PageParam.PAGE_SIZE_NONE); | ... | ... |
yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/controller/admin/logger/vo/apiaccesslog/ApiAccessLogRespVO.java
| ... | ... | @@ -48,6 +48,10 @@ public class ApiAccessLogRespVO { |
| 48 | 48 | @ExcelProperty("请求参数") |
| 49 | 49 | private String requestParams; |
| 50 | 50 | |
| 51 | + @Schema(description = "响应结果") | |
| 52 | + @ExcelProperty("响应结果") | |
| 53 | + private String responseBody; | |
| 54 | + | |
| 51 | 55 | @Schema(description = "用户 IP", requiredMode = Schema.RequiredMode.REQUIRED, example = "127.0.0.1") |
| 52 | 56 | @ExcelProperty("用户 IP") |
| 53 | 57 | private String userIp; |
| ... | ... | @@ -56,6 +60,19 @@ public class ApiAccessLogRespVO { |
| 56 | 60 | @ExcelProperty("浏览器 UA") |
| 57 | 61 | private String userAgent; |
| 58 | 62 | |
| 63 | + @Schema(description = "操作模块", requiredMode = Schema.RequiredMode.REQUIRED, example = "商品模块") | |
| 64 | + @ExcelProperty("操作模块") | |
| 65 | + private String operateModule; | |
| 66 | + | |
| 67 | + @Schema(description = "操作名", requiredMode = Schema.RequiredMode.REQUIRED, example = "创建商品") | |
| 68 | + @ExcelProperty("操作名") | |
| 69 | + private String operateName; | |
| 70 | + | |
| 71 | + @Schema(description = "操作分类", requiredMode = Schema.RequiredMode.REQUIRED, example = "1") | |
| 72 | + @ExcelProperty(value = "操作分类", converter = DictConvert.class) | |
| 73 | + @DictFormat(cn.iocoder.yudao.module.infra.enums.DictTypeConstants.OPERATE_TYPE) | |
| 74 | + private Integer operateType; | |
| 75 | + | |
| 59 | 76 | @Schema(description = "开始请求时间", requiredMode = Schema.RequiredMode.REQUIRED) |
| 60 | 77 | @ExcelProperty("开始请求时间") |
| 61 | 78 | private LocalDateTime beginTime; | ... | ... |
yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/dal/dataobject/logger/ApiAccessLogDO.java
| 1 | 1 | package cn.iocoder.yudao.module.infra.dal.dataobject.logger; |
| 2 | 2 | |
| 3 | +import cn.iocoder.yudao.framework.apilog.core.enums.OperateTypeEnum; | |
| 3 | 4 | import cn.iocoder.yudao.framework.common.enums.UserTypeEnum; |
| 4 | 5 | import cn.iocoder.yudao.framework.common.pojo.CommonResult; |
| 5 | 6 | import cn.iocoder.yudao.framework.mybatis.core.dataobject.BaseDO; |
| ... | ... | @@ -71,6 +72,10 @@ public class ApiAccessLogDO extends BaseDO { |
| 71 | 72 | */ |
| 72 | 73 | private String requestParams; |
| 73 | 74 | /** |
| 75 | + * 响应结果 | |
| 76 | + */ | |
| 77 | + private String responseBody; | |
| 78 | + /** | |
| 74 | 79 | * 用户 IP |
| 75 | 80 | */ |
| 76 | 81 | private String userIp; |
| ... | ... | @@ -82,6 +87,21 @@ public class ApiAccessLogDO extends BaseDO { |
| 82 | 87 | // ========== 执行相关字段 ========== |
| 83 | 88 | |
| 84 | 89 | /** |
| 90 | + * 操作模块 | |
| 91 | + */ | |
| 92 | + private String operateModule; | |
| 93 | + /** | |
| 94 | + * 操作名 | |
| 95 | + */ | |
| 96 | + private String operateName; | |
| 97 | + /** | |
| 98 | + * 操作分类 | |
| 99 | + * | |
| 100 | + * 枚举 {@link OperateTypeEnum} | |
| 101 | + */ | |
| 102 | + private Integer operateType; | |
| 103 | + | |
| 104 | + /** | |
| 85 | 105 | * 开始请求时间 |
| 86 | 106 | */ |
| 87 | 107 | private LocalDateTime beginTime; |
| ... | ... | @@ -93,6 +113,7 @@ public class ApiAccessLogDO extends BaseDO { |
| 93 | 113 | * 执行时长,单位:毫秒 |
| 94 | 114 | */ |
| 95 | 115 | private Integer duration; |
| 116 | + | |
| 96 | 117 | /** |
| 97 | 118 | * 结果码 |
| 98 | 119 | * | ... | ... |
yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/service/codegen/inner/CodegenEngine.java
| ... | ... | @@ -8,6 +8,8 @@ import cn.hutool.extra.template.TemplateConfig; |
| 8 | 8 | import cn.hutool.extra.template.TemplateEngine; |
| 9 | 9 | import cn.hutool.extra.template.engine.velocity.VelocityEngine; |
| 10 | 10 | import cn.hutool.system.SystemUtil; |
| 11 | +import cn.iocoder.yudao.framework.apilog.core.annotations.ApiAccessLog; | |
| 12 | +import cn.iocoder.yudao.framework.apilog.core.enums.OperateTypeEnum; | |
| 11 | 13 | import cn.iocoder.yudao.framework.common.exception.util.ServiceExceptionUtil; |
| 12 | 14 | import cn.iocoder.yudao.framework.common.pojo.CommonResult; |
| 13 | 15 | import cn.iocoder.yudao.framework.common.pojo.PageParam; |
| ... | ... | @@ -24,8 +26,6 @@ import cn.iocoder.yudao.framework.excel.core.util.ExcelUtils; |
| 24 | 26 | import cn.iocoder.yudao.framework.mybatis.core.dataobject.BaseDO; |
| 25 | 27 | import cn.iocoder.yudao.framework.mybatis.core.mapper.BaseMapperX; |
| 26 | 28 | import cn.iocoder.yudao.framework.mybatis.core.query.LambdaQueryWrapperX; |
| 27 | -import cn.iocoder.yudao.framework.operatelog.core.annotations.OperateLog; | |
| 28 | -import cn.iocoder.yudao.framework.operatelog.core.enums.OperateTypeEnum; | |
| 29 | 29 | import cn.iocoder.yudao.module.infra.dal.dataobject.codegen.CodegenColumnDO; |
| 30 | 30 | import cn.iocoder.yudao.module.infra.dal.dataobject.codegen.CodegenTableDO; |
| 31 | 31 | import cn.iocoder.yudao.module.infra.enums.codegen.CodegenFrontTypeEnum; |
| ... | ... | @@ -211,7 +211,7 @@ public class CodegenEngine { |
| 211 | 211 | globalBindingMap.put("LocalDateTimeUtilsClassName", LocalDateTimeUtils.class.getName()); |
| 212 | 212 | globalBindingMap.put("ObjectUtilsClassName", ObjectUtils.class.getName()); |
| 213 | 213 | globalBindingMap.put("DictConvertClassName", DictConvert.class.getName()); |
| 214 | - globalBindingMap.put("OperateLogClassName", OperateLog.class.getName()); | |
| 214 | + globalBindingMap.put("ApiAccessLogClassName", ApiAccessLog.class.getName()); | |
| 215 | 215 | globalBindingMap.put("OperateTypeEnumClassName", OperateTypeEnum.class.getName()); |
| 216 | 216 | globalBindingMap.put("BeanUtils", BeanUtils.class.getName()); |
| 217 | 217 | } | ... | ... |
yudao-module-infra/yudao-module-infra-biz/src/main/resources/codegen/java/controller/controller.vm
| ... | ... | @@ -23,7 +23,7 @@ import static ${CommonResultClassName}.success; |
| 23 | 23 | |
| 24 | 24 | import ${ExcelUtilsClassName}; |
| 25 | 25 | |
| 26 | -import ${OperateLogClassName}; | |
| 26 | +import ${ApiAccessLogClassName}; | |
| 27 | 27 | import static ${OperateTypeEnumClassName}.*; |
| 28 | 28 | |
| 29 | 29 | import ${basePackage}.module.${table.moduleName}.controller.${sceneEnum.basePackage}.${table.businessName}.vo.*; |
| ... | ... | @@ -114,7 +114,7 @@ public class ${sceneEnum.prefixClass}${table.className}Controller { |
| 114 | 114 | #if ($sceneEnum.scene == 1) |
| 115 | 115 | @PreAuthorize("@ss.hasPermission('${permissionPrefix}:export')") |
| 116 | 116 | #end |
| 117 | - @OperateLog(type = EXPORT) | |
| 117 | + @ApiAccessLog(operateType = EXPORT) | |
| 118 | 118 | #if ( $table.templateType != 2 ) |
| 119 | 119 | public void export${simpleClassName}Excel(@Valid ${sceneEnum.prefixClass}${table.className}PageReqVO pageReqVO, |
| 120 | 120 | HttpServletResponse response) throws IOException { | ... | ... |
yudao-module-infra/yudao-module-infra-biz/src/test/resources/sql/create_tables.sql
| ... | ... | @@ -94,8 +94,12 @@ CREATE TABLE IF NOT EXISTS "infra_api_access_log" ( |
| 94 | 94 | "request_method" varchar(16) not null default '', |
| 95 | 95 | "request_url" varchar(255) not null default '', |
| 96 | 96 | "request_params" varchar(8000) not null default '', |
| 97 | + "response_body" varchar(8000) not null default '', | |
| 97 | 98 | "user_ip" varchar(50) not null, |
| 98 | 99 | "user_agent" varchar(512) not null, |
| 100 | + `operate_module` varchar(50) NOT NULL, | |
| 101 | + `operate_name` varchar(50) NOT NULL, | |
| 102 | + `operate_type` bigint(4) NOT NULL DEFAULT '0', | |
| 99 | 103 | "begin_time" timestamp not null, |
| 100 | 104 | "end_time" timestamp not null, |
| 101 | 105 | "duration" integer not null, |
| ... | ... | @@ -108,7 +112,7 @@ CREATE TABLE IF NOT EXISTS "infra_api_access_log" ( |
| 108 | 112 | "deleted" bit not null default false, |
| 109 | 113 | "tenant_id" bigint not null default '0', |
| 110 | 114 | primary key ("id") |
| 111 | - ) COMMENT 'API 访问日志表'; | |
| 115 | +) COMMENT 'API 访问日志表'; | |
| 112 | 116 | |
| 113 | 117 | CREATE TABLE IF NOT EXISTS "infra_api_error_log" ( |
| 114 | 118 | "id" bigint not null GENERATED BY DEFAULT AS IDENTITY, | ... | ... |
yudao-module-mall/yudao-module-product-biz/pom.xml
yudao-module-mall/yudao-module-product-biz/src/main/java/cn/iocoder/yudao/module/product/controller/admin/spu/ProductSpuController.java
| 1 | 1 | package cn.iocoder.yudao.module.product.controller.admin.spu; |
| 2 | 2 | |
| 3 | +import cn.iocoder.yudao.framework.apilog.core.annotations.ApiAccessLog; | |
| 3 | 4 | import cn.iocoder.yudao.framework.common.pojo.CommonResult; |
| 4 | 5 | import cn.iocoder.yudao.framework.common.pojo.PageResult; |
| 5 | 6 | import cn.iocoder.yudao.framework.common.util.object.BeanUtils; |
| 6 | 7 | import cn.iocoder.yudao.framework.excel.core.util.ExcelUtils; |
| 7 | -import cn.iocoder.yudao.framework.operatelog.core.annotations.OperateLog; | |
| 8 | 8 | import cn.iocoder.yudao.module.product.controller.admin.spu.vo.*; |
| 9 | 9 | import cn.iocoder.yudao.module.product.convert.spu.ProductSpuConvert; |
| 10 | 10 | import cn.iocoder.yudao.module.product.dal.dataobject.sku.ProductSkuDO; |
| ... | ... | @@ -28,9 +28,9 @@ import java.util.Comparator; |
| 28 | 28 | import java.util.List; |
| 29 | 29 | import java.util.Map; |
| 30 | 30 | |
| 31 | +import static cn.iocoder.yudao.framework.apilog.core.enums.OperateTypeEnum.EXPORT; | |
| 31 | 32 | import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success; |
| 32 | 33 | import static cn.iocoder.yudao.framework.common.pojo.PageParam.PAGE_SIZE_NONE; |
| 33 | -import static cn.iocoder.yudao.framework.operatelog.core.enums.OperateTypeEnum.EXPORT; | |
| 34 | 34 | |
| 35 | 35 | @Tag(name = "管理后台 - 商品 SPU") |
| 36 | 36 | @RestController |
| ... | ... | @@ -127,7 +127,7 @@ public class ProductSpuController { |
| 127 | 127 | @GetMapping("/export") |
| 128 | 128 | @Operation(summary = "导出商品") |
| 129 | 129 | @PreAuthorize("@ss.hasPermission('product:spu:export')") |
| 130 | - @OperateLog(type = EXPORT) | |
| 130 | + @ApiAccessLog(operateType = EXPORT) | |
| 131 | 131 | public void exportSpuList(@Validated ProductSpuPageReqVO reqVO, |
| 132 | 132 | HttpServletResponse response) throws IOException { |
| 133 | 133 | reqVO.setPageSize(PAGE_SIZE_NONE); | ... | ... |
yudao-module-mall/yudao-module-promotion-biz/pom.xml
| ... | ... | @@ -43,10 +43,6 @@ |
| 43 | 43 | <!-- 业务组件 --> |
| 44 | 44 | <dependency> |
| 45 | 45 | <groupId>cn.iocoder.boot</groupId> |
| 46 | - <artifactId>yudao-spring-boot-starter-biz-operatelog</artifactId> | |
| 47 | - </dependency> | |
| 48 | - <dependency> | |
| 49 | - <groupId>cn.iocoder.boot</groupId> | |
| 50 | 46 | <artifactId>yudao-spring-boot-starter-biz-tenant</artifactId> |
| 51 | 47 | </dependency> |
| 52 | 48 | ... | ... |
yudao-module-mall/yudao-module-statistics-biz/pom.xml
| ... | ... | @@ -52,10 +52,6 @@ |
| 52 | 52 | <!-- 业务组件 --> |
| 53 | 53 | <dependency> |
| 54 | 54 | <groupId>cn.iocoder.boot</groupId> |
| 55 | - <artifactId>yudao-spring-boot-starter-biz-operatelog</artifactId> | |
| 56 | - </dependency> | |
| 57 | - <dependency> | |
| 58 | - <groupId>cn.iocoder.boot</groupId> | |
| 59 | 55 | <artifactId>yudao-spring-boot-starter-biz-tenant</artifactId> |
| 60 | 56 | </dependency> |
| 61 | 57 | <dependency> | ... | ... |
yudao-module-mall/yudao-module-trade-biz/pom.xml
| ... | ... | @@ -52,10 +52,6 @@ |
| 52 | 52 | <!-- 业务组件 --> |
| 53 | 53 | <dependency> |
| 54 | 54 | <groupId>cn.iocoder.boot</groupId> |
| 55 | - <artifactId>yudao-spring-boot-starter-biz-operatelog</artifactId> | |
| 56 | - </dependency> | |
| 57 | - <dependency> | |
| 58 | - <groupId>cn.iocoder.boot</groupId> | |
| 59 | 55 | <artifactId>yudao-spring-boot-starter-biz-tenant</artifactId> |
| 60 | 56 | </dependency> |
| 61 | 57 | <dependency> | ... | ... |
yudao-module-mall/yudao-module-trade-biz/src/main/java/cn/iocoder/yudao/module/trade/controller/admin/aftersale/AfterSaleController.java
| ... | ... | @@ -3,7 +3,6 @@ package cn.iocoder.yudao.module.trade.controller.admin.aftersale; |
| 3 | 3 | import cn.hutool.core.collection.CollUtil; |
| 4 | 4 | import cn.iocoder.yudao.framework.common.pojo.CommonResult; |
| 5 | 5 | import cn.iocoder.yudao.framework.common.pojo.PageResult; |
| 6 | -import cn.iocoder.yudao.framework.operatelog.core.annotations.OperateLog; | |
| 7 | 6 | import cn.iocoder.yudao.module.member.api.user.MemberUserApi; |
| 8 | 7 | import cn.iocoder.yudao.module.member.api.user.dto.MemberUserRespDTO; |
| 9 | 8 | import cn.iocoder.yudao.module.pay.api.notify.dto.PayRefundNotifyReqDTO; |
| ... | ... | @@ -135,7 +134,6 @@ public class AfterSaleController { |
| 135 | 134 | @PostMapping("/update-refunded") |
| 136 | 135 | @Operation(summary = "更新售后订单为已退款") // 由 pay-module 支付服务,进行回调,可见 PayNotifyJob |
| 137 | 136 | @PermitAll // 无需登录,安全由 PayDemoOrderService 内部校验实现 |
| 138 | - @OperateLog(enable = false) // 禁用操作日志,因为没有操作人 | |
| 139 | 137 | public CommonResult<Boolean> updateAfterRefund(@RequestBody PayRefundNotifyReqDTO notifyReqDTO) { |
| 140 | 138 | // 目前业务逻辑,不需要做任何事情 |
| 141 | 139 | // 当然,退款会有小概率会失败的情况,可以监控失败状态,进行告警 | ... | ... |
yudao-module-mall/yudao-module-trade-biz/src/main/java/cn/iocoder/yudao/module/trade/controller/admin/delivery/DeliveryExpressController.java
| 1 | 1 | package cn.iocoder.yudao.module.trade.controller.admin.delivery; |
| 2 | 2 | |
| 3 | +import cn.iocoder.yudao.framework.apilog.core.annotations.ApiAccessLog; | |
| 3 | 4 | import cn.iocoder.yudao.framework.common.enums.CommonStatusEnum; |
| 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.excel.core.util.ExcelUtils; |
| 7 | -import cn.iocoder.yudao.framework.operatelog.core.annotations.OperateLog; | |
| 8 | 8 | import cn.iocoder.yudao.module.trade.controller.admin.delivery.vo.express.*; |
| 9 | 9 | import cn.iocoder.yudao.module.trade.convert.delivery.DeliveryExpressConvert; |
| 10 | 10 | import cn.iocoder.yudao.module.trade.dal.dataobject.delivery.DeliveryExpressDO; |
| ... | ... | @@ -12,18 +12,18 @@ import cn.iocoder.yudao.module.trade.service.delivery.DeliveryExpressService; |
| 12 | 12 | import io.swagger.v3.oas.annotations.Operation; |
| 13 | 13 | import io.swagger.v3.oas.annotations.Parameter; |
| 14 | 14 | import io.swagger.v3.oas.annotations.tags.Tag; |
| 15 | +import jakarta.annotation.Resource; | |
| 16 | +import jakarta.servlet.http.HttpServletResponse; | |
| 17 | +import jakarta.validation.Valid; | |
| 15 | 18 | import org.springframework.security.access.prepost.PreAuthorize; |
| 16 | 19 | import org.springframework.validation.annotation.Validated; |
| 17 | 20 | import org.springframework.web.bind.annotation.*; |
| 18 | 21 | |
| 19 | -import jakarta.annotation.Resource; | |
| 20 | -import jakarta.servlet.http.HttpServletResponse; | |
| 21 | -import jakarta.validation.Valid; | |
| 22 | 22 | import java.io.IOException; |
| 23 | 23 | import java.util.List; |
| 24 | 24 | |
| 25 | +import static cn.iocoder.yudao.framework.apilog.core.enums.OperateTypeEnum.EXPORT; | |
| 25 | 26 | import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success; |
| 26 | -import static cn.iocoder.yudao.framework.operatelog.core.enums.OperateTypeEnum.EXPORT; | |
| 27 | 27 | |
| 28 | 28 | @Tag(name = "管理后台 - 快递公司") |
| 29 | 29 | @RestController |
| ... | ... | @@ -85,7 +85,7 @@ public class DeliveryExpressController { |
| 85 | 85 | @GetMapping("/export-excel") |
| 86 | 86 | @Operation(summary = "导出快递公司 Excel") |
| 87 | 87 | @PreAuthorize("@ss.hasPermission('trade:delivery:express:export')") |
| 88 | - @OperateLog(type = EXPORT) | |
| 88 | + @ApiAccessLog(operateType = EXPORT) | |
| 89 | 89 | public void exportDeliveryExpressExcel(@Valid DeliveryExpressExportReqVO exportReqVO, |
| 90 | 90 | HttpServletResponse response) throws IOException { |
| 91 | 91 | List<DeliveryExpressDO> list = deliveryExpressService.getDeliveryExpressList(exportReqVO); | ... | ... |
yudao-module-member/yudao-module-member-biz/pom.xml
| ... | ... | @@ -37,10 +37,6 @@ |
| 37 | 37 | <!-- 业务组件 --> |
| 38 | 38 | <dependency> |
| 39 | 39 | <groupId>cn.iocoder.boot</groupId> |
| 40 | - <artifactId>yudao-spring-boot-starter-biz-operatelog</artifactId> | |
| 41 | - </dependency> | |
| 42 | - <dependency> | |
| 43 | - <groupId>cn.iocoder.boot</groupId> | |
| 44 | 40 | <artifactId>yudao-spring-boot-starter-biz-tenant</artifactId> |
| 45 | 41 | </dependency> |
| 46 | 42 | ... | ... |
yudao-module-member/yudao-module-member-biz/src/main/java/cn/iocoder/yudao/module/member/controller/app/auth/AppAuthController.java
| ... | ... | @@ -3,7 +3,6 @@ package cn.iocoder.yudao.module.member.controller.app.auth; |
| 3 | 3 | import cn.hutool.core.util.StrUtil; |
| 4 | 4 | import cn.iocoder.yudao.framework.common.enums.UserTypeEnum; |
| 5 | 5 | import cn.iocoder.yudao.framework.common.pojo.CommonResult; |
| 6 | -import cn.iocoder.yudao.framework.operatelog.core.annotations.OperateLog; | |
| 7 | 6 | import cn.iocoder.yudao.framework.security.config.SecurityProperties; |
| 8 | 7 | import cn.iocoder.yudao.framework.security.core.util.SecurityFrameworkUtils; |
| 9 | 8 | import cn.iocoder.yudao.module.member.controller.app.auth.vo.*; |
| ... | ... | @@ -64,7 +63,6 @@ public class AppAuthController { |
| 64 | 63 | @PostMapping("/refresh-token") |
| 65 | 64 | @Operation(summary = "刷新令牌") |
| 66 | 65 | @Parameter(name = "refreshToken", description = "刷新令牌", required = true) |
| 67 | - @OperateLog(enable = false) // 避免 Post 请求被记录操作日志 | |
| 68 | 66 | public CommonResult<AppAuthLoginRespVO> refreshToken(@RequestParam("refreshToken") String refreshToken) { |
| 69 | 67 | return success(authService.refreshToken(refreshToken)); |
| 70 | 68 | } | ... | ... |
yudao-module-member/yudao-module-member-biz/src/main/java/cn/iocoder/yudao/module/member/service/level/MemberLevelServiceImpl.java
| ... | ... | @@ -241,10 +241,8 @@ public class MemberLevelServiceImpl implements MemberLevelService { |
| 241 | 241 | MemberUserDO user = memberUserService.getUser(userId); |
| 242 | 242 | Integer userExperience = ObjUtil.defaultIfNull(user.getExperience(), 0); |
| 243 | 243 | userExperience = NumberUtil.max(userExperience + experience, 0); // 防止扣出负数 |
| 244 | - MemberLevelRecordDO levelRecord = new MemberLevelRecordDO() | |
| 245 | - .setUserId(user.getId()) | |
| 246 | - .setExperience(experience) | |
| 247 | - .setUserExperience(userExperience); | |
| 244 | + MemberLevelRecordDO levelRecord = new MemberLevelRecordDO().setUserId(user.getId()) | |
| 245 | + .setExperience(experience).setUserExperience(userExperience).setLevelId(user.getLevelId()); | |
| 248 | 246 | memberExperienceRecordService.createExperienceRecord(userId, experience, userExperience, |
| 249 | 247 | bizType, bizId); |
| 250 | 248 | ... | ... |
yudao-module-mp/yudao-module-mp-biz/pom.xml
| ... | ... | @@ -37,10 +37,6 @@ |
| 37 | 37 | <!-- 业务组件 --> |
| 38 | 38 | <dependency> |
| 39 | 39 | <groupId>cn.iocoder.boot</groupId> |
| 40 | - <artifactId>yudao-spring-boot-starter-biz-operatelog</artifactId> | |
| 41 | - </dependency> | |
| 42 | - <dependency> | |
| 43 | - <groupId>cn.iocoder.boot</groupId> | |
| 44 | 40 | <artifactId>yudao-spring-boot-starter-biz-tenant</artifactId> |
| 45 | 41 | </dependency> |
| 46 | 42 | ... | ... |
yudao-module-mp/yudao-module-mp-biz/src/main/java/cn/iocoder/yudao/module/mp/controller/admin/open/MpOpenController.java
| ... | ... | @@ -2,7 +2,6 @@ package cn.iocoder.yudao.module.mp.controller.admin.open; |
| 2 | 2 | |
| 3 | 3 | import cn.hutool.core.lang.Assert; |
| 4 | 4 | import cn.hutool.core.util.StrUtil; |
| 5 | -import cn.iocoder.yudao.framework.operatelog.core.annotations.OperateLog; | |
| 6 | 5 | import cn.iocoder.yudao.framework.tenant.core.util.TenantUtils; |
| 7 | 6 | import cn.iocoder.yudao.module.mp.controller.admin.open.vo.MpOpenCheckSignatureReqVO; |
| 8 | 7 | import cn.iocoder.yudao.module.mp.controller.admin.open.vo.MpOpenHandleMessageReqVO; |
| ... | ... | @@ -63,7 +62,6 @@ public class MpOpenController { |
| 63 | 62 | */ |
| 64 | 63 | @Operation(summary = "处理消息") |
| 65 | 64 | @PostMapping(value = "/{appId}", produces = "application/xml; charset=UTF-8") |
| 66 | - @OperateLog(enable = false) // 回调地址,无需记录操作日志 | |
| 67 | 65 | public String handleMessage(@PathVariable("appId") String appId, |
| 68 | 66 | @RequestBody String content, |
| 69 | 67 | MpOpenHandleMessageReqVO reqVO) { | ... | ... |
yudao-module-mp/yudao-module-mp-biz/src/main/java/cn/iocoder/yudao/module/mp/controller/admin/user/vo/MpUserPageReqVO.java
| ... | ... | @@ -21,6 +21,9 @@ public class MpUserPageReqVO extends PageParam { |
| 21 | 21 | @Schema(description = "公众号粉丝标识,模糊匹配", example = "o6_bmjrPTlm6_2sgVt7hMZOPfL2M") |
| 22 | 22 | private String openid; |
| 23 | 23 | |
| 24 | + @Schema(description = "微信生态唯一标识,模糊匹配", example = "o6_bmjrPTlm6_2sgVt7hMZOPfL2M") | |
| 25 | + private String unionId; | |
| 26 | + | |
| 24 | 27 | @Schema(description = "公众号粉丝昵称,模糊匹配", example = "芋艿") |
| 25 | 28 | private String nickname; |
| 26 | 29 | ... | ... |
yudao-module-mp/yudao-module-mp-biz/src/main/java/cn/iocoder/yudao/module/mp/controller/admin/user/vo/MpUserRespVO.java
| ... | ... | @@ -4,7 +4,6 @@ import io.swagger.v3.oas.annotations.media.Schema; |
| 4 | 4 | import lombok.Data; |
| 5 | 5 | |
| 6 | 6 | import java.time.LocalDateTime; |
| 7 | -import java.util.Date; | |
| 8 | 7 | import java.util.List; |
| 9 | 8 | |
| 10 | 9 | @Schema(description = "管理后台 - 公众号粉丝 Response VO") |
| ... | ... | @@ -17,6 +16,9 @@ public class MpUserRespVO { |
| 17 | 16 | @Schema(description = "公众号粉丝标识", requiredMode = Schema.RequiredMode.REQUIRED, example = "o6_bmjrPTlm6_2sgVt7hMZOPfL2M") |
| 18 | 17 | private String openid; |
| 19 | 18 | |
| 19 | + @Schema(description = "微信生态唯一标识", requiredMode = Schema.RequiredMode.REQUIRED, example = "o6_bmjrPTlm6_2sgVt7hMZOPfL2M") | |
| 20 | + private String unionId; | |
| 21 | + | |
| 20 | 22 | @Schema(description = "关注状态 参见 CommonStatusEnum 枚举", requiredMode = Schema.RequiredMode.REQUIRED, example = "1") |
| 21 | 23 | private Integer subscribeStatus; |
| 22 | 24 | @Schema(description = "关注时间", requiredMode = Schema.RequiredMode.REQUIRED) | ... | ... |
yudao-module-mp/yudao-module-mp-biz/src/main/java/cn/iocoder/yudao/module/mp/convert/user/MpUserConvert.java
| ... | ... | @@ -29,6 +29,7 @@ public interface MpUserConvert { |
| 29 | 29 | |
| 30 | 30 | @Mappings(value = { |
| 31 | 31 | @Mapping(source = "openId", target = "openid"), |
| 32 | + @Mapping(source = "unionId", target = "unionId"), | |
| 32 | 33 | @Mapping(source = "headImgUrl", target = "headImageUrl"), |
| 33 | 34 | @Mapping(target = "subscribeTime", ignore = true), // 单独转换 |
| 34 | 35 | }) | ... | ... |
yudao-module-mp/yudao-module-mp-biz/src/main/java/cn/iocoder/yudao/module/mp/dal/dataobject/user/MpUserDO.java
yudao-module-pay/yudao-module-pay-biz/pom.xml
| ... | ... | @@ -32,10 +32,6 @@ |
| 32 | 32 | <!-- 业务组件 --> |
| 33 | 33 | <dependency> |
| 34 | 34 | <groupId>cn.iocoder.boot</groupId> |
| 35 | - <artifactId>yudao-spring-boot-starter-biz-operatelog</artifactId> | |
| 36 | - </dependency> | |
| 37 | - <dependency> | |
| 38 | - <groupId>cn.iocoder.boot</groupId> | |
| 39 | 35 | <artifactId>yudao-spring-boot-starter-biz-pay</artifactId> |
| 40 | 36 | <version>${revision}</version> |
| 41 | 37 | </dependency> | ... | ... |
yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/controller/admin/app/PayAppController.java
| 1 | 1 | package cn.iocoder.yudao.module.pay.controller.admin.app; |
| 2 | 2 | |
| 3 | 3 | import cn.hutool.core.collection.CollUtil; |
| 4 | +import cn.iocoder.yudao.framework.common.enums.CommonStatusEnum; | |
| 4 | 5 | import cn.iocoder.yudao.framework.common.pojo.CommonResult; |
| 5 | 6 | import cn.iocoder.yudao.framework.common.pojo.PageResult; |
| 6 | -import cn.iocoder.yudao.framework.common.util.collection.CollectionUtils; | |
| 7 | -import cn.iocoder.yudao.framework.pay.core.enums.channel.PayChannelEnum; | |
| 8 | 7 | import cn.iocoder.yudao.module.pay.controller.admin.app.vo.*; |
| 9 | 8 | import cn.iocoder.yudao.module.pay.convert.app.PayAppConvert; |
| 10 | 9 | import cn.iocoder.yudao.module.pay.dal.dataobject.app.PayAppDO; |
| ... | ... | @@ -14,14 +13,14 @@ import cn.iocoder.yudao.module.pay.service.channel.PayChannelService; |
| 14 | 13 | import io.swagger.v3.oas.annotations.Operation; |
| 15 | 14 | import io.swagger.v3.oas.annotations.Parameter; |
| 16 | 15 | import io.swagger.v3.oas.annotations.tags.Tag; |
| 16 | +import jakarta.annotation.Resource; | |
| 17 | +import jakarta.validation.Valid; | |
| 17 | 18 | import lombok.extern.slf4j.Slf4j; |
| 18 | 19 | import org.springframework.security.access.prepost.PreAuthorize; |
| 19 | 20 | import org.springframework.validation.annotation.Validated; |
| 20 | 21 | import org.springframework.web.bind.annotation.*; |
| 21 | 22 | |
| 22 | -import jakarta.annotation.Resource; | |
| 23 | -import jakarta.validation.Valid; | |
| 24 | -import java.util.*; | |
| 23 | +import java.util.List; | |
| 25 | 24 | |
| 26 | 25 | import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success; |
| 27 | 26 | import static cn.iocoder.yudao.framework.common.util.collection.CollectionUtils.convertList; |
| ... | ... | @@ -89,9 +88,10 @@ public class PayAppController { |
| 89 | 88 | return success(PageResult.empty()); |
| 90 | 89 | } |
| 91 | 90 | |
| 92 | - // 得到所有的应用编号,查出所有的渠道 | |
| 93 | - Collection<Long> appIds = convertList(pageResult.getList(), PayAppDO::getId); | |
| 94 | - List<PayChannelDO> channels = channelService.getChannelListByAppIds(appIds); | |
| 91 | + // 得到所有的应用编号,查出所有的渠道,并移除未启用的渠道 | |
| 92 | + List<PayChannelDO> channels = channelService.getChannelListByAppIds( | |
| 93 | + convertList(pageResult.getList(), PayAppDO::getId)); | |
| 94 | + channels.removeIf(channel -> !CommonStatusEnum.ENABLE.getStatus().equals(channel.getStatus())); | |
| 95 | 95 | |
| 96 | 96 | // 拼接后返回 |
| 97 | 97 | return success(PayAppConvert.INSTANCE.convertPage(pageResult, channels)); | ... | ... |
yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/controller/admin/demo/PayDemoOrderController.java
| ... | ... | @@ -3,7 +3,6 @@ package cn.iocoder.yudao.module.pay.controller.admin.demo; |
| 3 | 3 | import cn.iocoder.yudao.framework.common.pojo.CommonResult; |
| 4 | 4 | import cn.iocoder.yudao.framework.common.pojo.PageParam; |
| 5 | 5 | import cn.iocoder.yudao.framework.common.pojo.PageResult; |
| 6 | -import cn.iocoder.yudao.framework.operatelog.core.annotations.OperateLog; | |
| 7 | 6 | import cn.iocoder.yudao.module.pay.api.notify.dto.PayOrderNotifyReqDTO; |
| 8 | 7 | import cn.iocoder.yudao.module.pay.api.notify.dto.PayRefundNotifyReqDTO; |
| 9 | 8 | import cn.iocoder.yudao.module.pay.controller.admin.demo.vo.order.PayDemoOrderCreateReqVO; |
| ... | ... | @@ -50,7 +49,6 @@ public class PayDemoOrderController { |
| 50 | 49 | @PostMapping("/update-paid") |
| 51 | 50 | @Operation(summary = "更新示例订单为已支付") // 由 pay-module 支付服务,进行回调,可见 PayNotifyJob |
| 52 | 51 | @PermitAll // 无需登录,安全由 PayDemoOrderService 内部校验实现 |
| 53 | - @OperateLog(enable = false) // 禁用操作日志,因为没有操作人 | |
| 54 | 52 | public CommonResult<Boolean> updateDemoOrderPaid(@RequestBody PayOrderNotifyReqDTO notifyReqDTO) { |
| 55 | 53 | payDemoOrderService.updateDemoOrderPaid(Long.valueOf(notifyReqDTO.getMerchantOrderId()), |
| 56 | 54 | notifyReqDTO.getPayOrderId()); |
| ... | ... | @@ -68,7 +66,6 @@ public class PayDemoOrderController { |
| 68 | 66 | @PostMapping("/update-refunded") |
| 69 | 67 | @Operation(summary = "更新示例订单为已退款") // 由 pay-module 支付服务,进行回调,可见 PayNotifyJob |
| 70 | 68 | @PermitAll // 无需登录,安全由 PayDemoOrderService 内部校验实现 |
| 71 | - @OperateLog(enable = false) // 禁用操作日志,因为没有操作人 | |
| 72 | 69 | public CommonResult<Boolean> updateDemoOrderRefunded(@RequestBody PayRefundNotifyReqDTO notifyReqDTO) { |
| 73 | 70 | payDemoOrderService.updateDemoOrderRefunded(Long.valueOf(notifyReqDTO.getMerchantOrderId()), |
| 74 | 71 | notifyReqDTO.getPayRefundId()); | ... | ... |
yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/controller/admin/demo/PayDemoTransferController.java
| ... | ... | @@ -3,7 +3,6 @@ package cn.iocoder.yudao.module.pay.controller.admin.demo; |
| 3 | 3 | import cn.iocoder.yudao.framework.common.pojo.CommonResult; |
| 4 | 4 | import cn.iocoder.yudao.framework.common.pojo.PageParam; |
| 5 | 5 | import cn.iocoder.yudao.framework.common.pojo.PageResult; |
| 6 | -import cn.iocoder.yudao.framework.operatelog.core.annotations.OperateLog; | |
| 7 | 6 | import cn.iocoder.yudao.module.pay.api.notify.dto.PayTransferNotifyReqDTO; |
| 8 | 7 | import cn.iocoder.yudao.module.pay.controller.admin.demo.vo.transfer.PayDemoTransferCreateReqVO; |
| 9 | 8 | import cn.iocoder.yudao.module.pay.controller.admin.demo.vo.transfer.PayDemoTransferRespVO; |
| ... | ... | @@ -45,7 +44,6 @@ public class PayDemoTransferController { |
| 45 | 44 | @PostMapping("/update-status") |
| 46 | 45 | @Operation(summary = "更新示例转账订单的转账状态") // 由 pay-module 转账服务,进行回调 |
| 47 | 46 | @PermitAll // 无需登录,安全由 PayDemoTransferService 内部校验实现 |
| 48 | - @OperateLog(enable = false) // 禁用操作日志,因为没有操作人 | |
| 49 | 47 | public CommonResult<Boolean> updateDemoTransferStatus(@RequestBody PayTransferNotifyReqDTO notifyReqDTO) { |
| 50 | 48 | demoTransferService.updateDemoTransferStatus(Long.valueOf(notifyReqDTO.getMerchantTransferId()), |
| 51 | 49 | notifyReqDTO.getPayTransferId()); | ... | ... |
yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/controller/admin/notify/PayNotifyController.java
| ... | ... | @@ -3,7 +3,6 @@ package cn.iocoder.yudao.module.pay.controller.admin.notify; |
| 3 | 3 | import cn.hutool.core.collection.CollUtil; |
| 4 | 4 | import cn.iocoder.yudao.framework.common.pojo.CommonResult; |
| 5 | 5 | import cn.iocoder.yudao.framework.common.pojo.PageResult; |
| 6 | -import cn.iocoder.yudao.framework.operatelog.core.annotations.OperateLog; | |
| 7 | 6 | import cn.iocoder.yudao.framework.pay.core.client.PayClient; |
| 8 | 7 | import cn.iocoder.yudao.framework.pay.core.client.dto.order.PayOrderRespDTO; |
| 9 | 8 | import cn.iocoder.yudao.framework.pay.core.client.dto.refund.PayRefundRespDTO; |
| ... | ... | @@ -59,7 +58,6 @@ public class PayNotifyController { |
| 59 | 58 | @PostMapping(value = "/order/{channelId}") |
| 60 | 59 | @Operation(summary = "支付渠道的统一【支付】回调") |
| 61 | 60 | @PermitAll |
| 62 | - @OperateLog(enable = false) // 回调地址,无需记录操作日志 | |
| 63 | 61 | public String notifyOrder(@PathVariable("channelId") Long channelId, |
| 64 | 62 | @RequestParam(required = false) Map<String, String> params, |
| 65 | 63 | @RequestBody(required = false) String body) { |
| ... | ... | @@ -80,7 +78,6 @@ public class PayNotifyController { |
| 80 | 78 | @PostMapping(value = "/refund/{channelId}") |
| 81 | 79 | @Operation(summary = "支付渠道的统一【退款】回调") |
| 82 | 80 | @PermitAll |
| 83 | - @OperateLog(enable = false) // 回调地址,无需记录操作日志 | |
| 84 | 81 | public String notifyRefund(@PathVariable("channelId") Long channelId, |
| 85 | 82 | @RequestParam(required = false) Map<String, String> params, |
| 86 | 83 | @RequestBody(required = false) String body) { | ... | ... |
yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/controller/admin/order/PayOrderController.java
| 1 | 1 | package cn.iocoder.yudao.module.pay.controller.admin.order; |
| 2 | 2 | |
| 3 | 3 | import cn.hutool.core.collection.CollectionUtil; |
| 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.excel.core.util.ExcelUtils; |
| 7 | -import cn.iocoder.yudao.framework.operatelog.core.annotations.OperateLog; | |
| 8 | 8 | import cn.iocoder.yudao.framework.pay.core.enums.channel.PayChannelEnum; |
| 9 | 9 | import cn.iocoder.yudao.module.pay.controller.admin.order.vo.*; |
| 10 | 10 | import cn.iocoder.yudao.module.pay.convert.order.PayOrderConvert; |
| ... | ... | @@ -18,23 +18,23 @@ import com.google.common.collect.Maps; |
| 18 | 18 | import io.swagger.v3.oas.annotations.Operation; |
| 19 | 19 | import io.swagger.v3.oas.annotations.Parameter; |
| 20 | 20 | import io.swagger.v3.oas.annotations.tags.Tag; |
| 21 | +import jakarta.annotation.Resource; | |
| 22 | +import jakarta.servlet.http.HttpServletResponse; | |
| 23 | +import jakarta.validation.Valid; | |
| 21 | 24 | import org.springframework.security.access.prepost.PreAuthorize; |
| 22 | 25 | import org.springframework.validation.annotation.Validated; |
| 23 | 26 | import org.springframework.web.bind.annotation.*; |
| 24 | 27 | |
| 25 | -import jakarta.annotation.Resource; | |
| 26 | -import jakarta.servlet.http.HttpServletResponse; | |
| 27 | -import jakarta.validation.Valid; | |
| 28 | 28 | import java.io.IOException; |
| 29 | 29 | import java.util.ArrayList; |
| 30 | 30 | import java.util.List; |
| 31 | 31 | import java.util.Map; |
| 32 | 32 | import java.util.Objects; |
| 33 | 33 | |
| 34 | +import static cn.iocoder.yudao.framework.apilog.core.enums.OperateTypeEnum.EXPORT; | |
| 34 | 35 | import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success; |
| 35 | 36 | import static cn.iocoder.yudao.framework.common.util.collection.CollectionUtils.convertList; |
| 36 | 37 | import static cn.iocoder.yudao.framework.common.util.servlet.ServletUtils.getClientIP; |
| 37 | -import static cn.iocoder.yudao.framework.operatelog.core.enums.OperateTypeEnum.EXPORT; | |
| 38 | 38 | import static cn.iocoder.yudao.framework.web.core.util.WebFrameworkUtils.getLoginUserId; |
| 39 | 39 | import static cn.iocoder.yudao.framework.web.core.util.WebFrameworkUtils.getLoginUserType; |
| 40 | 40 | |
| ... | ... | @@ -107,7 +107,7 @@ public class PayOrderController { |
| 107 | 107 | @GetMapping("/export-excel") |
| 108 | 108 | @Operation(summary = "导出支付订单 Excel") |
| 109 | 109 | @PreAuthorize("@ss.hasPermission('pay:order:export')") |
| 110 | - @OperateLog(type = EXPORT) | |
| 110 | + @ApiAccessLog(operateType = EXPORT) | |
| 111 | 111 | public void exportOrderExcel(@Valid PayOrderExportReqVO exportReqVO, |
| 112 | 112 | HttpServletResponse response) throws IOException { |
| 113 | 113 | List<PayOrderDO> list = orderService.getOrderList(exportReqVO); | ... | ... |
yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/controller/admin/refund/PayRefundController.java
| 1 | 1 | package cn.iocoder.yudao.module.pay.controller.admin.refund; |
| 2 | 2 | |
| 3 | 3 | import cn.hutool.core.collection.CollectionUtil; |
| 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.excel.core.util.ExcelUtils; |
| 7 | -import cn.iocoder.yudao.framework.operatelog.core.annotations.OperateLog; | |
| 8 | 8 | import cn.iocoder.yudao.module.pay.controller.admin.refund.vo.*; |
| 9 | 9 | import cn.iocoder.yudao.module.pay.convert.refund.PayRefundConvert; |
| 10 | 10 | import cn.iocoder.yudao.module.pay.dal.dataobject.app.PayAppDO; |
| ... | ... | @@ -14,6 +14,9 @@ import cn.iocoder.yudao.module.pay.service.refund.PayRefundService; |
| 14 | 14 | import io.swagger.v3.oas.annotations.Operation; |
| 15 | 15 | import io.swagger.v3.oas.annotations.Parameter; |
| 16 | 16 | import io.swagger.v3.oas.annotations.tags.Tag; |
| 17 | +import jakarta.annotation.Resource; | |
| 18 | +import jakarta.servlet.http.HttpServletResponse; | |
| 19 | +import jakarta.validation.Valid; | |
| 17 | 20 | import org.springframework.security.access.prepost.PreAuthorize; |
| 18 | 21 | import org.springframework.validation.annotation.Validated; |
| 19 | 22 | import org.springframework.web.bind.annotation.GetMapping; |
| ... | ... | @@ -21,17 +24,14 @@ import org.springframework.web.bind.annotation.RequestMapping; |
| 21 | 24 | import org.springframework.web.bind.annotation.RequestParam; |
| 22 | 25 | import org.springframework.web.bind.annotation.RestController; |
| 23 | 26 | |
| 24 | -import jakarta.annotation.Resource; | |
| 25 | -import jakarta.servlet.http.HttpServletResponse; | |
| 26 | -import jakarta.validation.Valid; | |
| 27 | 27 | import java.io.IOException; |
| 28 | 28 | import java.util.ArrayList; |
| 29 | 29 | import java.util.List; |
| 30 | 30 | import java.util.Map; |
| 31 | 31 | |
| 32 | +import static cn.iocoder.yudao.framework.apilog.core.enums.OperateTypeEnum.EXPORT; | |
| 32 | 33 | import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success; |
| 33 | 34 | import static cn.iocoder.yudao.framework.common.util.collection.CollectionUtils.convertList; |
| 34 | -import static cn.iocoder.yudao.framework.operatelog.core.enums.OperateTypeEnum.EXPORT; | |
| 35 | 35 | |
| 36 | 36 | @Tag(name = "管理后台 - 退款订单") |
| 37 | 37 | @RestController |
| ... | ... | @@ -76,7 +76,7 @@ public class PayRefundController { |
| 76 | 76 | @GetMapping("/export-excel") |
| 77 | 77 | @Operation(summary = "导出退款订单 Excel") |
| 78 | 78 | @PreAuthorize("@ss.hasPermission('pay:refund:export')") |
| 79 | - @OperateLog(type = EXPORT) | |
| 79 | + @ApiAccessLog(operateType = EXPORT) | |
| 80 | 80 | public void exportRefundExcel(@Valid PayRefundExportReqVO exportReqVO, |
| 81 | 81 | HttpServletResponse response) throws IOException { |
| 82 | 82 | List<PayRefundDO> list = refundService.getRefundList(exportReqVO); | ... | ... |
yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/controller/admin/wallet/PayWalletRechargeController.java
| 1 | 1 | package cn.iocoder.yudao.module.pay.controller.admin.wallet; |
| 2 | 2 | |
| 3 | 3 | import cn.iocoder.yudao.framework.common.pojo.CommonResult; |
| 4 | -import cn.iocoder.yudao.framework.operatelog.core.annotations.OperateLog; | |
| 5 | 4 | import cn.iocoder.yudao.module.pay.api.notify.dto.PayOrderNotifyReqDTO; |
| 6 | 5 | import cn.iocoder.yudao.module.pay.api.notify.dto.PayRefundNotifyReqDTO; |
| 7 | 6 | import cn.iocoder.yudao.module.pay.service.wallet.PayWalletRechargeService; |
| ... | ... | @@ -32,7 +31,6 @@ public class PayWalletRechargeController { |
| 32 | 31 | @PostMapping("/update-paid") |
| 33 | 32 | @Operation(summary = "更新钱包充值为已充值") // 由 pay-module 支付服务,进行回调,可见 PayNotifyJob |
| 34 | 33 | @PermitAll // 无需登录, 内部校验实现 |
| 35 | - @OperateLog(enable = false) // 禁用操作日志,因为没有操作人 | |
| 36 | 34 | public CommonResult<Boolean> updateWalletRechargerPaid(@Valid @RequestBody PayOrderNotifyReqDTO notifyReqDTO) { |
| 37 | 35 | walletRechargeService.updateWalletRechargerPaid(Long.valueOf(notifyReqDTO.getMerchantOrderId()), |
| 38 | 36 | notifyReqDTO.getPayOrderId()); |
| ... | ... | @@ -51,7 +49,6 @@ public class PayWalletRechargeController { |
| 51 | 49 | @PostMapping("/update-refunded") |
| 52 | 50 | @Operation(summary = "更新钱包充值为已退款") // 由 pay-module 支付服务,进行回调,可见 PayNotifyJob |
| 53 | 51 | @PermitAll // 无需登录, 内部校验实现 |
| 54 | - @OperateLog(enable = false) // 禁用操作日志,因为没有操作人 | |
| 55 | 52 | public CommonResult<Boolean> updateWalletRechargeRefunded(@RequestBody PayRefundNotifyReqDTO notifyReqDTO) { |
| 56 | 53 | walletRechargeService.updateWalletRechargeRefunded( |
| 57 | 54 | Long.valueOf(notifyReqDTO.getMerchantOrderId()), notifyReqDTO.getPayRefundId()); | ... | ... |
yudao-module-report/yudao-module-report-api/src/main/java/cn/iocoder/yudao/module/report/enums/ErrorCodeConstants.java
| ... | ... | @@ -12,8 +12,4 @@ public interface ErrorCodeConstants { |
| 12 | 12 | // ========== GoView 模块 1-003-000-000 ========== |
| 13 | 13 | ErrorCode GO_VIEW_PROJECT_NOT_EXISTS = new ErrorCode(1_003_000_000, "GoView 项目不存在"); |
| 14 | 14 | |
| 15 | - // ========== UREPORT 模块 1-003-001-000 ========== | |
| 16 | - ErrorCode UREPORT_DATA_NOT_EXISTS = new ErrorCode(1_003_001_001, "Ureport2 报表不存在"); | |
| 17 | - ErrorCode UREPORT_DATABASE_NOT_EXISTS = new ErrorCode(1_003_001_002, "Ureport2 报表数据源不存在"); | |
| 18 | - | |
| 19 | 15 | } | ... | ... |
yudao-module-report/yudao-module-report-biz/pom.xml
| ... | ... | @@ -33,10 +33,6 @@ |
| 33 | 33 | <!-- 业务组件 --> |
| 34 | 34 | <dependency> |
| 35 | 35 | <groupId>cn.iocoder.boot</groupId> |
| 36 | - <artifactId>yudao-spring-boot-starter-biz-operatelog</artifactId> | |
| 37 | - </dependency> | |
| 38 | - <dependency> | |
| 39 | - <groupId>cn.iocoder.boot</groupId> | |
| 40 | 36 | <artifactId>yudao-spring-boot-starter-biz-tenant</artifactId> |
| 41 | 37 | </dependency> |
| 42 | 38 | |
| ... | ... | @@ -75,11 +71,6 @@ |
| 75 | 71 | </dependency> |
| 76 | 72 | |
| 77 | 73 | <dependency> |
| 78 | - <groupId>com.bstek.ureport</groupId> | |
| 79 | - <artifactId>ureport2-console</artifactId> | |
| 80 | - </dependency> | |
| 81 | - | |
| 82 | - <dependency> | |
| 83 | 74 | <groupId>cn.iocoder.boot</groupId> |
| 84 | 75 | <artifactId>yudao-spring-boot-starter-excel</artifactId> |
| 85 | 76 | </dependency> | ... | ... |
yudao-module-report/yudao-module-report-biz/src/main/java/cn/iocoder/yudao/module/report/controller/admin/goview/GoViewDataController.java
| ... | ... | @@ -3,7 +3,6 @@ package cn.iocoder.yudao.module.report.controller.admin.goview; |
| 3 | 3 | import cn.hutool.core.map.MapUtil; |
| 4 | 4 | import cn.hutool.core.util.RandomUtil; |
| 5 | 5 | import cn.iocoder.yudao.framework.common.pojo.CommonResult; |
| 6 | -import cn.iocoder.yudao.framework.operatelog.core.annotations.OperateLog; | |
| 7 | 6 | import cn.iocoder.yudao.module.report.controller.admin.goview.vo.data.GoViewDataGetBySqlReqVO; |
| 8 | 7 | import cn.iocoder.yudao.module.report.controller.admin.goview.vo.data.GoViewDataRespVO; |
| 9 | 8 | import cn.iocoder.yudao.module.report.service.goview.GoViewDataService; |
| ... | ... | @@ -35,7 +34,6 @@ public class GoViewDataController { |
| 35 | 34 | @RequestMapping("/get-by-sql") |
| 36 | 35 | @Operation(summary = "使用 SQL 查询数据") |
| 37 | 36 | @PreAuthorize("@ss.hasPermission('report:go-view-data:get-by-sql')") |
| 38 | - @OperateLog(enable = false) // 不记录操作日志,因为不需要 | |
| 39 | 37 | public CommonResult<GoViewDataRespVO> getDataBySQL(@Valid @RequestBody GoViewDataGetBySqlReqVO reqVO) { |
| 40 | 38 | return success(goViewDataService.getDataBySQL(reqVO.getSql())); |
| 41 | 39 | } |
| ... | ... | @@ -43,7 +41,6 @@ public class GoViewDataController { |
| 43 | 41 | @RequestMapping("/get-by-http") |
| 44 | 42 | @Operation(summary = "使用 HTTP 查询数据", description = "这个只是示例接口,实际应该每个查询,都要写一个接口") |
| 45 | 43 | @PreAuthorize("@ss.hasPermission('report:go-view-data:get-by-http')") |
| 46 | - @OperateLog(enable = false) // 不记录操作日志,因为不需要 | |
| 47 | 44 | public CommonResult<GoViewDataRespVO> getDataByHttp( |
| 48 | 45 | @RequestParam(required = false) Map<String, String> params, |
| 49 | 46 | @RequestBody(required = false) String body) { // params、body 按照需要去接收,这里仅仅是示例 | ... | ... |
yudao-module-report/yudao-module-report-biz/src/main/java/cn/iocoder/yudao/module/report/controller/admin/ureport/UReportDataController.java deleted
| 1 | -package cn.iocoder.yudao.module.report.controller.admin.ureport; | |
| 2 | - | |
| 3 | -import cn.iocoder.yudao.framework.common.pojo.CommonResult; | |
| 4 | -import cn.iocoder.yudao.framework.common.pojo.PageParam; | |
| 5 | -import cn.iocoder.yudao.framework.common.pojo.PageResult; | |
| 6 | -import cn.iocoder.yudao.framework.common.util.object.BeanUtils; | |
| 7 | -import cn.iocoder.yudao.framework.excel.core.util.ExcelUtils; | |
| 8 | -import cn.iocoder.yudao.framework.operatelog.core.annotations.OperateLog; | |
| 9 | -import cn.iocoder.yudao.module.report.controller.admin.ureport.vo.UReportDataPageReqVO; | |
| 10 | -import cn.iocoder.yudao.module.report.controller.admin.ureport.vo.UReportDataRespVO; | |
| 11 | -import cn.iocoder.yudao.module.report.controller.admin.ureport.vo.UReportDataSaveReqVO; | |
| 12 | -import cn.iocoder.yudao.module.report.dal.dataobject.ureport.UReportDataDO; | |
| 13 | -import cn.iocoder.yudao.module.report.service.ureport.UReportDataService; | |
| 14 | -import io.swagger.v3.oas.annotations.Operation; | |
| 15 | -import io.swagger.v3.oas.annotations.Parameter; | |
| 16 | -import io.swagger.v3.oas.annotations.tags.Tag; | |
| 17 | -import org.springframework.security.access.prepost.PreAuthorize; | |
| 18 | -import org.springframework.validation.annotation.Validated; | |
| 19 | -import org.springframework.web.bind.annotation.*; | |
| 20 | - | |
| 21 | -import jakarta.annotation.Resource; | |
| 22 | -import jakarta.servlet.http.HttpServletResponse; | |
| 23 | -import jakarta.validation.Valid; | |
| 24 | -import java.io.IOException; | |
| 25 | -import java.util.List; | |
| 26 | - | |
| 27 | -import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success; | |
| 28 | -import static cn.iocoder.yudao.framework.operatelog.core.enums.OperateTypeEnum.EXPORT; | |
| 29 | - | |
| 30 | -@Tag(name = "管理后台 - Ureport2 报表") | |
| 31 | -@RestController | |
| 32 | -@RequestMapping("/report/ureport-data") | |
| 33 | -@Validated | |
| 34 | -public class UReportDataController { | |
| 35 | - | |
| 36 | - @Resource | |
| 37 | - private UReportDataService uReportDataService; | |
| 38 | - | |
| 39 | - @PostMapping("/create") | |
| 40 | - @Operation(summary = "创建 Ureport2 报表") | |
| 41 | - @PreAuthorize("@ss.hasPermission('report:ureport-data:create')") | |
| 42 | - public CommonResult<Long> createUReportData(@Valid @RequestBody UReportDataSaveReqVO createReqVO) { | |
| 43 | - return success(uReportDataService.createUReportData(createReqVO)); | |
| 44 | - } | |
| 45 | - | |
| 46 | - @PutMapping("/update") | |
| 47 | - @Operation(summary = "更新 Ureport2 报表") | |
| 48 | - @PreAuthorize("@ss.hasPermission('report:ureport-data:update')") | |
| 49 | - public CommonResult<Boolean> updateUReportData(@Valid @RequestBody UReportDataSaveReqVO updateReqVO) { | |
| 50 | - uReportDataService.updateUReportData(updateReqVO); | |
| 51 | - return success(true); | |
| 52 | - } | |
| 53 | - | |
| 54 | - @DeleteMapping("/delete") | |
| 55 | - @Operation(summary = "删除 Ureport2 报表") | |
| 56 | - @Parameter(name = "id", description = "编号", required = true) | |
| 57 | - @PreAuthorize("@ss.hasPermission('report:ureport-data:delete')") | |
| 58 | - public CommonResult<Boolean> deleteUReportData(@RequestParam("id") Long id) { | |
| 59 | - uReportDataService.deleteUReportData(id); | |
| 60 | - return success(true); | |
| 61 | - } | |
| 62 | - | |
| 63 | - @GetMapping("/get") | |
| 64 | - @Operation(summary = "获得Ureport2报表") | |
| 65 | - @Parameter(name = "id", description = "编号", required = true, example = "1024") | |
| 66 | - @PreAuthorize("@ss.hasPermission('report:ureport-data:query')") | |
| 67 | - public CommonResult<UReportDataRespVO> getUReportData(@RequestParam("id") Long id) { | |
| 68 | - UReportDataDO uReportData = uReportDataService.getUReportData(id); | |
| 69 | - return success(BeanUtils.toBean(uReportData, UReportDataRespVO.class)); | |
| 70 | - } | |
| 71 | - | |
| 72 | - @GetMapping("/page") | |
| 73 | - @Operation(summary = "获得Ureport2报表分页") | |
| 74 | - @PreAuthorize("@ss.hasPermission('report:ureport-data:query')") | |
| 75 | - public CommonResult<PageResult<UReportDataRespVO>> getUReportDataPage(@Valid UReportDataPageReqVO pageReqVO) { | |
| 76 | - PageResult<UReportDataDO> pageResult = uReportDataService.getUReportDataPage(pageReqVO); | |
| 77 | - return success(BeanUtils.toBean(pageResult, UReportDataRespVO.class)); | |
| 78 | - } | |
| 79 | - | |
| 80 | - @GetMapping("/export-excel") | |
| 81 | - @Operation(summary = "导出 Ureport2 报表 Excel") | |
| 82 | - @PreAuthorize("@ss.hasPermission('report:ureport-data:export')") | |
| 83 | - @OperateLog(type = EXPORT) | |
| 84 | - public void exportUReportDataExcel(@Valid UReportDataPageReqVO pageReqVO, | |
| 85 | - HttpServletResponse response) throws IOException { | |
| 86 | - pageReqVO.setPageSize(PageParam.PAGE_SIZE_NONE); | |
| 87 | - List<UReportDataDO> list = uReportDataService.getUReportDataPage(pageReqVO).getList(); | |
| 88 | - // 导出 Excel | |
| 89 | - ExcelUtils.write(response, "Ureport2 报表.xls", "数据", UReportDataRespVO.class, | |
| 90 | - BeanUtils.toBean(list, UReportDataRespVO.class)); | |
| 91 | - } | |
| 92 | - | |
| 93 | -} |
yudao-module-report/yudao-module-report-biz/src/main/java/cn/iocoder/yudao/module/report/controller/admin/ureport/vo/UReportDataPageReqVO.java deleted
| 1 | -package cn.iocoder.yudao.module.report.controller.admin.ureport.vo; | |
| 2 | - | |
| 3 | -import cn.iocoder.yudao.framework.common.pojo.PageParam; | |
| 4 | -import io.swagger.v3.oas.annotations.media.Schema; | |
| 5 | -import lombok.Data; | |
| 6 | -import lombok.EqualsAndHashCode; | |
| 7 | -import lombok.ToString; | |
| 8 | -import org.springframework.format.annotation.DateTimeFormat; | |
| 9 | - | |
| 10 | -import java.time.LocalDateTime; | |
| 11 | - | |
| 12 | -import static cn.iocoder.yudao.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND; | |
| 13 | - | |
| 14 | -@Schema(description = "管理后台 - Ureport2 报表分页 Request VO") | |
| 15 | -@Data | |
| 16 | -@EqualsAndHashCode(callSuper = true) | |
| 17 | -@ToString(callSuper = true) | |
| 18 | -public class UReportDataPageReqVO extends PageParam { | |
| 19 | - | |
| 20 | - @Schema(description = "文件名称", example = "李四") | |
| 21 | - private String name; | |
| 22 | - | |
| 23 | - @Schema(description = "状态", example = "1") | |
| 24 | - private Integer status; | |
| 25 | - | |
| 26 | - @Schema(description = "备注", example = "你猜") | |
| 27 | - private String remark; | |
| 28 | - | |
| 29 | - @Schema(description = "创建时间") | |
| 30 | - @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND) | |
| 31 | - private LocalDateTime[] createTime; | |
| 32 | - | |
| 33 | -} | |
| 34 | 0 | \ No newline at end of file |
yudao-module-report/yudao-module-report-biz/src/main/java/cn/iocoder/yudao/module/report/controller/admin/ureport/vo/UReportDataRespVO.java deleted
| 1 | -package cn.iocoder.yudao.module.report.controller.admin.ureport.vo; | |
| 2 | - | |
| 3 | -import cn.iocoder.yudao.framework.excel.core.annotations.DictFormat; | |
| 4 | -import cn.iocoder.yudao.framework.excel.core.convert.DictConvert; | |
| 5 | -import cn.iocoder.yudao.module.system.enums.DictTypeConstants; | |
| 6 | -import com.alibaba.excel.annotation.ExcelIgnoreUnannotated; | |
| 7 | -import com.alibaba.excel.annotation.ExcelProperty; | |
| 8 | -import io.swagger.v3.oas.annotations.media.Schema; | |
| 9 | -import lombok.Data; | |
| 10 | - | |
| 11 | -import java.time.LocalDateTime; | |
| 12 | - | |
| 13 | -@Schema(description = "管理后台 - Ureport2 报表 Response VO") | |
| 14 | -@Data | |
| 15 | -@ExcelIgnoreUnannotated | |
| 16 | -public class UReportDataRespVO { | |
| 17 | - | |
| 18 | - @Schema(description = "ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "26175") | |
| 19 | - @ExcelProperty("ID") | |
| 20 | - private Long id; | |
| 21 | - | |
| 22 | - @Schema(description = "文件名称", requiredMode = Schema.RequiredMode.REQUIRED, example = "李四") | |
| 23 | - @ExcelProperty("文件名称") | |
| 24 | - private String name; | |
| 25 | - | |
| 26 | - @Schema(description = "状态", requiredMode = Schema.RequiredMode.REQUIRED, example = "1") | |
| 27 | - @ExcelProperty(value = "状态", converter = DictConvert.class) | |
| 28 | - @DictFormat(DictTypeConstants.COMMON_STATUS) | |
| 29 | - private Integer status; | |
| 30 | - | |
| 31 | - @Schema(description = "文件内容") | |
| 32 | - @ExcelProperty("文件内容") | |
| 33 | - private String content; | |
| 34 | - | |
| 35 | - @Schema(description = "备注", example = "你猜") | |
| 36 | - @ExcelProperty("备注") | |
| 37 | - private String remark; | |
| 38 | - | |
| 39 | - @Schema(description = "创建时间", requiredMode = Schema.RequiredMode.REQUIRED) | |
| 40 | - @ExcelProperty("创建时间") | |
| 41 | - private LocalDateTime createTime; | |
| 42 | - | |
| 43 | -} |
yudao-module-report/yudao-module-report-biz/src/main/java/cn/iocoder/yudao/module/report/controller/admin/ureport/vo/UReportDataSaveReqVO.java deleted
| 1 | -package cn.iocoder.yudao.module.report.controller.admin.ureport.vo; | |
| 2 | - | |
| 3 | -import cn.iocoder.yudao.framework.common.enums.CommonStatusEnum; | |
| 4 | -import cn.iocoder.yudao.framework.common.validation.InEnum; | |
| 5 | -import io.swagger.v3.oas.annotations.media.Schema; | |
| 6 | -import lombok.Data; | |
| 7 | - | |
| 8 | -import jakarta.validation.constraints.NotEmpty; | |
| 9 | -import jakarta.validation.constraints.NotNull; | |
| 10 | - | |
| 11 | -@Schema(description = "管理后台 - Ureport2 报表新增/修改 Request VO") | |
| 12 | -@Data | |
| 13 | -public class UReportDataSaveReqVO { | |
| 14 | - | |
| 15 | - @Schema(description = "ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "26175") | |
| 16 | - private Long id; | |
| 17 | - | |
| 18 | - @Schema(description = "文件名称", requiredMode = Schema.RequiredMode.REQUIRED, example = "李四") | |
| 19 | - @NotEmpty(message = "文件名称不能为空") | |
| 20 | - private String name; | |
| 21 | - | |
| 22 | - @Schema(description = "状态", requiredMode = Schema.RequiredMode.REQUIRED, example = "1") | |
| 23 | - @NotNull(message = "状态不能为空") | |
| 24 | - @InEnum(CommonStatusEnum.class) | |
| 25 | - private Integer status; | |
| 26 | - | |
| 27 | - @Schema(description = "文件内容") | |
| 28 | - private String content; | |
| 29 | - | |
| 30 | - @Schema(description = "备注", example = "你猜") | |
| 31 | - private String remark; | |
| 32 | - | |
| 33 | -} | |
| 34 | 0 | \ No newline at end of file |
yudao-module-report/yudao-module-report-biz/src/main/java/cn/iocoder/yudao/module/report/dal/dataobject/ureport/UReportDataDO.java deleted
| 1 | -package cn.iocoder.yudao.module.report.dal.dataobject.ureport; | |
| 2 | - | |
| 3 | -import cn.iocoder.yudao.framework.common.enums.CommonStatusEnum; | |
| 4 | -import cn.iocoder.yudao.framework.mybatis.core.dataobject.BaseDO; | |
| 5 | -import com.baomidou.mybatisplus.annotation.KeySequence; | |
| 6 | -import com.baomidou.mybatisplus.annotation.TableId; | |
| 7 | -import com.baomidou.mybatisplus.annotation.TableName; | |
| 8 | -import lombok.*; | |
| 9 | - | |
| 10 | -// TODO @赤焰:这个是不是可以支持多租户? | |
| 11 | -/** | |
| 12 | - * Ureport2 报表 DO | |
| 13 | - * | |
| 14 | - * @author 芋道源码 | |
| 15 | - */ | |
| 16 | -@TableName("report_ureport_data") | |
| 17 | -@KeySequence("report_ureport_data_seq") // 用于 Oracle、PostgreSQL、Kingbase、DB2、H2 数据库的主键自增。如果是 MySQL 等数据库,可不写。 | |
| 18 | -@Data | |
| 19 | -@EqualsAndHashCode(callSuper = true) | |
| 20 | -@ToString(callSuper = true) | |
| 21 | -@Builder | |
| 22 | -@NoArgsConstructor | |
| 23 | -@AllArgsConstructor | |
| 24 | -public class UReportDataDO extends BaseDO { | |
| 25 | - | |
| 26 | - /** | |
| 27 | - * ID | |
| 28 | - */ | |
| 29 | - @TableId | |
| 30 | - private Long id; | |
| 31 | - /** | |
| 32 | - * 文件名称 | |
| 33 | - */ | |
| 34 | - private String name; | |
| 35 | - /** | |
| 36 | - * 状态 | |
| 37 | - * | |
| 38 | - * 枚举 {@link CommonStatusEnum#getStatus()} | |
| 39 | - */ | |
| 40 | - private Integer status; | |
| 41 | - /** | |
| 42 | - * 文件内容 | |
| 43 | - */ | |
| 44 | - private String content; | |
| 45 | - /** | |
| 46 | - * 备注 | |
| 47 | - */ | |
| 48 | - private String remark; | |
| 49 | - | |
| 50 | -} |
yudao-module-report/yudao-module-report-biz/src/main/java/cn/iocoder/yudao/module/report/dal/mysql/ureport/UReportDataMapper.java deleted
| 1 | -package cn.iocoder.yudao.module.report.dal.mysql.ureport; | |
| 2 | - | |
| 3 | -import cn.iocoder.yudao.framework.common.pojo.PageResult; | |
| 4 | -import cn.iocoder.yudao.framework.mybatis.core.mapper.BaseMapperX; | |
| 5 | -import cn.iocoder.yudao.framework.mybatis.core.query.LambdaQueryWrapperX; | |
| 6 | -import cn.iocoder.yudao.module.report.controller.admin.ureport.vo.UReportDataPageReqVO; | |
| 7 | -import cn.iocoder.yudao.module.report.dal.dataobject.ureport.UReportDataDO; | |
| 8 | -import org.apache.ibatis.annotations.Mapper; | |
| 9 | - | |
| 10 | -import java.util.List; | |
| 11 | - | |
| 12 | -/** | |
| 13 | - * Ureport2报表 Mapper | |
| 14 | - * | |
| 15 | - * @author 芋道源码 | |
| 16 | - */ | |
| 17 | -@Mapper | |
| 18 | -public interface UReportDataMapper extends BaseMapperX<UReportDataDO> { | |
| 19 | - | |
| 20 | - default PageResult<UReportDataDO> selectPage(UReportDataPageReqVO reqVO) { | |
| 21 | - return selectPage(reqVO, new LambdaQueryWrapperX<UReportDataDO>() | |
| 22 | - .likeIfPresent(UReportDataDO::getName, reqVO.getName()) | |
| 23 | - .eqIfPresent(UReportDataDO::getStatus, reqVO.getStatus()) | |
| 24 | - .eqIfPresent(UReportDataDO::getRemark, reqVO.getRemark()) | |
| 25 | - .betweenIfPresent(UReportDataDO::getCreateTime, reqVO.getCreateTime()) | |
| 26 | - .orderByDesc(UReportDataDO::getId)); | |
| 27 | - } | |
| 28 | - | |
| 29 | - default List<UReportDataDO> selectListByName(String name) { | |
| 30 | - return selectList(new LambdaQueryWrapperX<UReportDataDO>() | |
| 31 | - .eqIfPresent(UReportDataDO::getName,name)); | |
| 32 | - } | |
| 33 | - | |
| 34 | - default UReportDataDO selectByName(String name){ | |
| 35 | - return selectOne(new LambdaQueryWrapperX<UReportDataDO>() | |
| 36 | - .eqIfPresent(UReportDataDO::getName,name)); | |
| 37 | - } | |
| 38 | - | |
| 39 | - default int deleteByName(String name) { | |
| 40 | - return delete(new LambdaQueryWrapperX<UReportDataDO>() | |
| 41 | - .eqIfPresent(UReportDataDO::getName,name)); | |
| 42 | - } | |
| 43 | - | |
| 44 | -} |
yudao-module-report/yudao-module-report-biz/src/main/java/cn/iocoder/yudao/module/report/framework/security/config/SecurityConfiguration.java
| 1 | 1 | package cn.iocoder.yudao.module.report.framework.security.config; |
| 2 | 2 | |
| 3 | -import cn.iocoder.yudao.framework.common.enums.WebFilterOrderEnum; | |
| 4 | 3 | import cn.iocoder.yudao.framework.security.config.AuthorizeRequestsCustomizer; |
| 5 | -import cn.iocoder.yudao.framework.security.config.SecurityProperties; | |
| 6 | 4 | import cn.iocoder.yudao.module.system.api.oauth2.OAuth2TokenApi; |
| 7 | -import org.springframework.boot.web.servlet.FilterRegistrationBean; | |
| 5 | +import jakarta.annotation.Resource; | |
| 8 | 6 | import org.springframework.context.annotation.Bean; |
| 9 | 7 | import org.springframework.context.annotation.Configuration; |
| 10 | 8 | import org.springframework.security.config.annotation.web.builders.HttpSecurity; |
| 11 | 9 | import org.springframework.security.config.annotation.web.configurers.AuthorizeHttpRequestsConfigurer; |
| 12 | -import org.springframework.security.config.annotation.web.configurers.ExpressionUrlAuthorizationConfigurer; | |
| 13 | -import org.springframework.util.StringUtils; | |
| 14 | - | |
| 15 | -import jakarta.annotation.Resource; | |
| 16 | 10 | |
| 17 | 11 | /** |
| 18 | 12 | * Report 模块的 Security 配置 |
| ... | ... | @@ -29,20 +23,8 @@ public class SecurityConfiguration { |
| 29 | 23 | @Override |
| 30 | 24 | public void customize(AuthorizeHttpRequestsConfigurer<HttpSecurity>.AuthorizationManagerRequestMatcherRegistry registry) { |
| 31 | 25 | registry.requestMatchers("/jmreport/**").permitAll(); // 积木报表 |
| 32 | - registry.requestMatchers("/ureport/**").permitAll(); // UReport 报表 | |
| 33 | 26 | } |
| 34 | 27 | }; |
| 35 | 28 | } |
| 36 | 29 | |
| 37 | - /** | |
| 38 | - * 创建 UReportFilter 过滤器,响应 header 设置 token | |
| 39 | - */ | |
| 40 | - /*@Bean | |
| 41 | - public FilterRegistrationBean<UReportFilter> uReportFilterFilterRegistrationBean() { | |
| 42 | - FilterRegistrationBean<UReportFilter> registrationBean = new FilterRegistrationBean<>(); | |
| 43 | - registrationBean.setFilter(new UReportFilter(oauth2TokenApi)); | |
| 44 | - registrationBean.setOrder(WebFilterOrderEnum.TRACE_FILTER); | |
| 45 | - return registrationBean; | |
| 46 | - }*/ | |
| 47 | - | |
| 48 | 30 | } | ... | ... |
yudao-module-report/yudao-module-report-biz/src/main/java/cn/iocoder/yudao/module/report/framework/ureport/config/UReportConfiguration.java deleted
| 1 | -package cn.iocoder.yudao.module.report.framework.ureport.config; | |
| 2 | - | |
| 3 | -import org.springframework.boot.context.properties.EnableConfigurationProperties; | |
| 4 | -import org.springframework.context.annotation.Configuration; | |
| 5 | -import org.springframework.context.annotation.ImportResource; | |
| 6 | -import org.springframework.context.annotation.PropertySource; | |
| 7 | - | |
| 8 | -/** | |
| 9 | - * UReport2 配置类 | |
| 10 | - * | |
| 11 | - * @author 赤焰 | |
| 12 | - */ | |
| 13 | -// @Configuration TODO 芋艿:JDK21 暂时不支持 UReport2,原因是 Spring Boot 3 的 javax 替换成 jakarta 了 | |
| 14 | -@ImportResource({"classpath:ureport-console-context.xml"}) | |
| 15 | -@PropertySource(value = {"classpath:ureport.properties"}) // TODO @赤焰:这个可以搞到 application.yaml 里么? | |
| 16 | -@EnableConfigurationProperties({UReportProperties.class}) | |
| 17 | -public class UReportConfiguration { | |
| 18 | - | |
| 19 | -// TODO 芋艿:JDK21 暂时不支持 UReport2,原因是 Spring Boot 3 的 javax 替换成 jakarta 了 | |
| 20 | -// @Bean | |
| 21 | -// public ServletRegistrationBean<Servlet> uReportRegistrationBean() { | |
| 22 | -// return new ServletRegistrationBean<>(new UReportServlet(), "/ureport/*"); | |
| 23 | -// } | |
| 24 | - | |
| 25 | -} |
yudao-module-report/yudao-module-report-biz/src/main/java/cn/iocoder/yudao/module/report/framework/ureport/config/UReportProperties.java deleted
| 1 | -package cn.iocoder.yudao.module.report.framework.ureport.config; | |
| 2 | - | |
| 3 | -import lombok.Data; | |
| 4 | -import org.springframework.boot.context.properties.ConfigurationProperties; | |
| 5 | - | |
| 6 | -/** | |
| 7 | - * UReport2 配置类 | |
| 8 | - * | |
| 9 | - * @author 赤焰 | |
| 10 | - */ | |
| 11 | -@Data | |
| 12 | -@ConfigurationProperties(prefix = "ureport.provider.database") | |
| 13 | -public class UReportProperties { | |
| 14 | - | |
| 15 | - // TODO @赤焰:每个字段的注释写下哈; | |
| 16 | - private String name = "数据库文件系统"; | |
| 17 | - | |
| 18 | - private String prefix = "db-"; | |
| 19 | - | |
| 20 | - private boolean disabled = false; | |
| 21 | - | |
| 22 | -} |
yudao-module-report/yudao-module-report-biz/src/main/java/cn/iocoder/yudao/module/report/framework/ureport/core/UReportDataSource.java deleted
| 1 | -package cn.iocoder.yudao.module.report.framework.ureport.core; | |
| 2 | - | |
| 3 | -import com.bstek.ureport.definition.datasource.BuildinDatasource; | |
| 4 | -import lombok.extern.slf4j.Slf4j; | |
| 5 | -import org.springframework.stereotype.Component; | |
| 6 | - | |
| 7 | -import jakarta.annotation.Resource; | |
| 8 | -import javax.sql.DataSource; | |
| 9 | -import java.sql.Connection; | |
| 10 | -import java.sql.SQLException; | |
| 11 | - | |
| 12 | -import static cn.iocoder.yudao.framework.common.exception.util.ServiceExceptionUtil.exception; | |
| 13 | -import static cn.iocoder.yudao.module.report.enums.ErrorCodeConstants.UREPORT_DATABASE_NOT_EXISTS; | |
| 14 | - | |
| 15 | -/** | |
| 16 | - * UReport2 内置数据源 | |
| 17 | - * | |
| 18 | - * @author 赤焰 | |
| 19 | - */ | |
| 20 | -@Slf4j | |
| 21 | -//@Component | |
| 22 | -public class UReportDataSource implements BuildinDatasource { | |
| 23 | - | |
| 24 | - private static final String NAME = "UReportDataSource"; | |
| 25 | - | |
| 26 | - @Resource | |
| 27 | - private DataSource dataSource; | |
| 28 | - | |
| 29 | - /** | |
| 30 | - * @return 数据源名称 | |
| 31 | - */ | |
| 32 | - @Override | |
| 33 | - public String name() { | |
| 34 | - return NAME; | |
| 35 | - } | |
| 36 | - | |
| 37 | - /** | |
| 38 | - * @return 获取连接 | |
| 39 | - */ | |
| 40 | - @Override | |
| 41 | - public Connection getConnection() { | |
| 42 | - try { | |
| 43 | - return dataSource.getConnection(); | |
| 44 | - } catch (SQLException e) { | |
| 45 | - log.error("[getConnection][获取连接失败!]", e); | |
| 46 | - throw exception(UREPORT_DATABASE_NOT_EXISTS); | |
| 47 | - } | |
| 48 | - } | |
| 49 | - | |
| 50 | -} |
yudao-module-report/yudao-module-report-biz/src/main/java/cn/iocoder/yudao/module/report/framework/ureport/core/UReportDatabaseProvider.java deleted
| 1 | -package cn.iocoder.yudao.module.report.framework.ureport.core; | |
| 2 | - | |
| 3 | -import cn.hutool.core.collection.CollUtil; | |
| 4 | -import cn.hutool.core.util.StrUtil; | |
| 5 | -import cn.iocoder.yudao.framework.common.enums.CommonStatusEnum; | |
| 6 | -import cn.iocoder.yudao.framework.common.util.date.DateUtils; | |
| 7 | -import cn.iocoder.yudao.module.report.controller.admin.ureport.vo.UReportDataSaveReqVO; | |
| 8 | -import cn.iocoder.yudao.module.report.dal.dataobject.ureport.UReportDataDO; | |
| 9 | -import cn.iocoder.yudao.module.report.framework.ureport.config.UReportProperties; | |
| 10 | -import cn.iocoder.yudao.module.report.service.ureport.UReportDataService; | |
| 11 | -import com.bstek.ureport.provider.report.ReportFile; | |
| 12 | -import com.bstek.ureport.provider.report.ReportProvider; | |
| 13 | -import lombok.Setter; | |
| 14 | -import lombok.extern.slf4j.Slf4j; | |
| 15 | -import org.springframework.beans.factory.annotation.Autowired; | |
| 16 | -import org.springframework.stereotype.Component; | |
| 17 | - | |
| 18 | -import jakarta.annotation.Resource; | |
| 19 | -import java.io.ByteArrayInputStream; | |
| 20 | -import java.io.InputStream; | |
| 21 | -import java.util.Collections; | |
| 22 | -import java.util.List; | |
| 23 | - | |
| 24 | -import static cn.iocoder.yudao.framework.common.util.collection.CollectionUtils.convertList; | |
| 25 | - | |
| 26 | -/** | |
| 27 | - * 基于数据库的 {@link ReportProvider} 实现类 | |
| 28 | - * | |
| 29 | - * @author 赤焰 | |
| 30 | - */ | |
| 31 | -// TODO @赤焰:这个 bean 的注解,交给 UReportConfiguration 搞 | |
| 32 | -//@Component | |
| 33 | -@Slf4j | |
| 34 | -@Setter | |
| 35 | -public class UReportDatabaseProvider implements ReportProvider { | |
| 36 | - | |
| 37 | - @Autowired | |
| 38 | - private UReportProperties uReportProperties; | |
| 39 | - @Resource | |
| 40 | - private UReportDataService uReportDataService; | |
| 41 | - | |
| 42 | - @Override | |
| 43 | - public InputStream loadReport(String name) { | |
| 44 | - uReportDataService.validateUReportDataExists(getCorrectName(name)); | |
| 45 | - UReportDataDO uReportDataDO = uReportDataService.selectOneByName(getCorrectName(name)); | |
| 46 | - String content = uReportDataDO.getContent(); | |
| 47 | - return new ByteArrayInputStream(content.getBytes()); | |
| 48 | - } | |
| 49 | - | |
| 50 | - @Override | |
| 51 | - public void deleteReport(String name) { | |
| 52 | - uReportDataService.deleteByName(getCorrectName(name)); | |
| 53 | - } | |
| 54 | - | |
| 55 | - @Override | |
| 56 | - public List<ReportFile> getReportFiles() { | |
| 57 | - List<UReportDataDO> list = uReportDataService.getReportDataList(); | |
| 58 | - // TODO @赤焰:这里,不用判空,CollectionUtils.convertList 已经处理了哈。 | |
| 59 | - if(CollUtil.isEmpty(list)) { | |
| 60 | - return Collections.emptyList(); | |
| 61 | - } | |
| 62 | - return convertList(list, report -> new ReportFile(report.getName(), DateUtils.of(report.getUpdateTime()))); | |
| 63 | - } | |
| 64 | - | |
| 65 | - @Override | |
| 66 | - public void saveReport(String name, String content) { | |
| 67 | - // TODO @赤焰:收到 uReportDataService 里面实现一个 saveUReportData 方法,然后这里调用即可。 | |
| 68 | - name = getCorrectName(name); | |
| 69 | - UReportDataDO uReportDataDO = uReportDataService.selectOneByName(name); | |
| 70 | - UReportDataSaveReqVO saveReqVO = new UReportDataSaveReqVO(); | |
| 71 | - if (uReportDataDO == null) { | |
| 72 | - saveReqVO.setName(name); | |
| 73 | - saveReqVO.setContent(content); | |
| 74 | - saveReqVO.setStatus(CommonStatusEnum.ENABLE.getStatus()); | |
| 75 | - uReportDataService.createUReportData(saveReqVO); | |
| 76 | - } else { | |
| 77 | - saveReqVO.setId(uReportDataDO.getId()); | |
| 78 | - saveReqVO.setName(name); | |
| 79 | - saveReqVO.setContent(content); | |
| 80 | - saveReqVO.setStatus(CommonStatusEnum.ENABLE.getStatus()); | |
| 81 | - uReportDataService.updateUReportData(saveReqVO); | |
| 82 | - } | |
| 83 | - } | |
| 84 | - | |
| 85 | - @Override | |
| 86 | - public String getName() { | |
| 87 | - return uReportProperties.getName(); | |
| 88 | - } | |
| 89 | - | |
| 90 | - @Override | |
| 91 | - public boolean disabled() { | |
| 92 | - return uReportProperties.isDisabled(); | |
| 93 | - } | |
| 94 | - | |
| 95 | - @Override | |
| 96 | - public String getPrefix() { | |
| 97 | - return uReportProperties.getPrefix(); | |
| 98 | - } | |
| 99 | - | |
| 100 | - /** | |
| 101 | - * 去除存储媒介,获取报表名字 | |
| 102 | - * | |
| 103 | - * @param name 前端传入的报表带存储媒介的名字 | |
| 104 | - * @return 表名字 | |
| 105 | - */ | |
| 106 | - private String getCorrectName(String name) { | |
| 107 | - return StrUtil.removePrefix(name,getPrefix()); | |
| 108 | - } | |
| 109 | - | |
| 110 | -} |
yudao-module-report/yudao-module-report-biz/src/main/java/cn/iocoder/yudao/module/report/framework/ureport/core/UReportFilter.java deleted
| 1 | -package cn.iocoder.yudao.module.report.framework.ureport.core; | |
| 2 | - | |
| 3 | -import cn.iocoder.yudao.framework.common.exception.ServiceException; | |
| 4 | -import cn.iocoder.yudao.framework.common.util.servlet.ServletUtils; | |
| 5 | -import cn.iocoder.yudao.framework.security.core.LoginUser; | |
| 6 | -import cn.iocoder.yudao.framework.security.core.util.SecurityFrameworkUtils; | |
| 7 | -import cn.iocoder.yudao.framework.tenant.core.context.TenantContextHolder; | |
| 8 | -import cn.iocoder.yudao.framework.web.core.util.WebFrameworkUtils; | |
| 9 | -import cn.iocoder.yudao.module.system.api.oauth2.OAuth2TokenApi; | |
| 10 | -import cn.iocoder.yudao.module.system.api.oauth2.dto.OAuth2AccessTokenCheckRespDTO; | |
| 11 | -import lombok.RequiredArgsConstructor; | |
| 12 | -import lombok.extern.slf4j.Slf4j; | |
| 13 | -import org.springframework.web.filter.OncePerRequestFilter; | |
| 14 | - | |
| 15 | -import jakarta.servlet.FilterChain; | |
| 16 | -import jakarta.servlet.ServletException; | |
| 17 | -import jakarta.servlet.http.HttpServletRequest; | |
| 18 | -import jakarta.servlet.http.HttpServletResponse; | |
| 19 | -import java.io.IOException; | |
| 20 | -import java.util.Map; | |
| 21 | - | |
| 22 | -/** | |
| 23 | - * UReport 认证过滤器 | |
| 24 | - * @author 赤焰 | |
| 25 | - */ | |
| 26 | -@Slf4j | |
| 27 | -@RequiredArgsConstructor | |
| 28 | -public class UReportFilter extends OncePerRequestFilter { | |
| 29 | - | |
| 30 | - private final static String TOKEN = "token"; | |
| 31 | - | |
| 32 | - private final OAuth2TokenApi oauth2TokenApi; | |
| 33 | - | |
| 34 | - @Override | |
| 35 | - protected void doFilterInternal(HttpServletRequest request, HttpServletResponse response, FilterChain chain) | |
| 36 | - throws ServletException, IOException { | |
| 37 | - | |
| 38 | - if(log.isDebugEnabled()){ | |
| 39 | - log.debug("UReportFilter自定义过滤器"); | |
| 40 | - } | |
| 41 | - | |
| 42 | - Map<String, String> paramMap = ServletUtils.getParamMap(request); | |
| 43 | - String requestURI = request.getRequestURI(); | |
| 44 | - boolean contains = requestURI.contains("/ureport"); | |
| 45 | - if (paramMap.containsKey(TOKEN)&&contains) { | |
| 46 | - String token = request.getParameter(TOKEN); | |
| 47 | - if(log.isDebugEnabled()){ | |
| 48 | - log.debug("UReportFilter自定义过滤器 token="+token); | |
| 49 | - } | |
| 50 | - | |
| 51 | - response.addHeader(TOKEN,token); | |
| 52 | - | |
| 53 | - TenantContextHolder.setIgnore(true); // 忽略租户,保证可查询到 token 信息 | |
| 54 | - LoginUser user = null; | |
| 55 | - try { | |
| 56 | - OAuth2AccessTokenCheckRespDTO accessToken = oauth2TokenApi.checkAccessToken(token); | |
| 57 | - if (accessToken != null) { | |
| 58 | - user = new LoginUser().setId(accessToken.getUserId()).setUserType(accessToken.getUserType()) | |
| 59 | - .setTenantId(accessToken.getTenantId()).setScopes(accessToken.getScopes()); | |
| 60 | - if (user != null) { | |
| 61 | - SecurityFrameworkUtils.setLoginUser(user, WebFrameworkUtils.getRequest()); | |
| 62 | - | |
| 63 | - // ② 参考 TenantContextWebFilter 实现(Tenant 的上下文清理,交给 TenantContextWebFilter 完成) | |
| 64 | - // 目的:基于 LoginUser 获得到的租户编号,设置到 Tenant 上下文,避免查询数据库时的报错 | |
| 65 | - TenantContextHolder.setIgnore(false); | |
| 66 | - TenantContextHolder.setTenantId(user.getTenantId()); | |
| 67 | - } | |
| 68 | - } | |
| 69 | - } catch (ServiceException ignored) { | |
| 70 | - chain.doFilter(request, response); | |
| 71 | - } | |
| 72 | - | |
| 73 | - } | |
| 74 | - | |
| 75 | - // 继续过滤 | |
| 76 | - chain.doFilter(request, response); | |
| 77 | - | |
| 78 | - } | |
| 79 | -} |
yudao-module-report/yudao-module-report-biz/src/main/java/cn/iocoder/yudao/module/report/framework/ureport/package-info.java deleted
yudao-module-report/yudao-module-report-biz/src/main/java/cn/iocoder/yudao/module/report/service/ureport/UReportDataService.java deleted
| 1 | -package cn.iocoder.yudao.module.report.service.ureport; | |
| 2 | - | |
| 3 | -import cn.iocoder.yudao.framework.common.pojo.PageResult; | |
| 4 | -import cn.iocoder.yudao.module.report.controller.admin.ureport.vo.UReportDataPageReqVO; | |
| 5 | -import cn.iocoder.yudao.module.report.controller.admin.ureport.vo.UReportDataSaveReqVO; | |
| 6 | -import cn.iocoder.yudao.module.report.dal.dataobject.ureport.UReportDataDO; | |
| 7 | - | |
| 8 | -import jakarta.validation.Valid; | |
| 9 | -import java.util.List; | |
| 10 | - | |
| 11 | -/** | |
| 12 | - * Ureport2 报表 Service 接口 | |
| 13 | - * | |
| 14 | - * @author 芋道源码 | |
| 15 | - */ | |
| 16 | -public interface UReportDataService { | |
| 17 | - | |
| 18 | - /** | |
| 19 | - * 创建 Ureport2 报表 | |
| 20 | - * | |
| 21 | - * @param createReqVO 创建信息 | |
| 22 | - * @return 编号 | |
| 23 | - */ | |
| 24 | - Long createUReportData(@Valid UReportDataSaveReqVO createReqVO); | |
| 25 | - | |
| 26 | - /** | |
| 27 | - * 更新 Ureport2 报表 | |
| 28 | - * | |
| 29 | - * @param updateReqVO 更新信息 | |
| 30 | - */ | |
| 31 | - void updateUReportData(@Valid UReportDataSaveReqVO updateReqVO); | |
| 32 | - | |
| 33 | - /** | |
| 34 | - * 删除 Ureport2 报表 | |
| 35 | - * | |
| 36 | - * @param id 编号 | |
| 37 | - */ | |
| 38 | - void deleteUReportData(Long id); | |
| 39 | - | |
| 40 | - /** | |
| 41 | - * 获得 Ureport2 报表 | |
| 42 | - * | |
| 43 | - * @param id 编号 | |
| 44 | - * @return Ureport2 报表 | |
| 45 | - */ | |
| 46 | - UReportDataDO getUReportData(Long id); | |
| 47 | - | |
| 48 | - /** | |
| 49 | - * 获得 Ureport2 报表分页 | |
| 50 | - * | |
| 51 | - * @param pageReqVO 分页查询 | |
| 52 | - * @return Ureport2 报表分页 | |
| 53 | - */ | |
| 54 | - PageResult<UReportDataDO> getUReportDataPage(UReportDataPageReqVO pageReqVO); | |
| 55 | - | |
| 56 | - // TODO @赤焰:可以不用返回 int。如果不需要哈。 | |
| 57 | - /** | |
| 58 | - * 根据名称删除报表 | |
| 59 | - * | |
| 60 | - * @param name 报表名称 | |
| 61 | - * @return | |
| 62 | - */ | |
| 63 | - int deleteByName(String name); | |
| 64 | - | |
| 65 | - // TODO @赤焰:这里直接返回 UReportDataDO 是不是更好?上层业务直接使用啦 | |
| 66 | - /** | |
| 67 | - * 根据名称校验报表是否存在 | |
| 68 | - * | |
| 69 | - * @param name 报表名称 | |
| 70 | - */ | |
| 71 | - void validateUReportDataExists(String name); | |
| 72 | - | |
| 73 | - // TODO @赤焰:这里方法名改成 getUReportDataByName。select 只用于 mapper; | |
| 74 | - /** | |
| 75 | - * 根据名称查询报表 | |
| 76 | - * | |
| 77 | - * @param name 报表名称 | |
| 78 | - * @return Ureport2 报表 | |
| 79 | - */ | |
| 80 | - UReportDataDO selectOneByName(String name); | |
| 81 | - | |
| 82 | - /** | |
| 83 | - * 获取全部报表 | |
| 84 | - * | |
| 85 | - * @return 全部报表 | |
| 86 | - */ | |
| 87 | - List<UReportDataDO> getReportDataList(); | |
| 88 | - | |
| 89 | -} |
yudao-module-report/yudao-module-report-biz/src/main/java/cn/iocoder/yudao/module/report/service/ureport/UReportDataServiceImpl.java deleted
| 1 | -package cn.iocoder.yudao.module.report.service.ureport; | |
| 2 | - | |
| 3 | -import cn.iocoder.yudao.framework.common.pojo.PageResult; | |
| 4 | -import cn.iocoder.yudao.framework.common.util.object.BeanUtils; | |
| 5 | -import cn.iocoder.yudao.module.report.controller.admin.ureport.vo.UReportDataPageReqVO; | |
| 6 | -import cn.iocoder.yudao.module.report.controller.admin.ureport.vo.UReportDataSaveReqVO; | |
| 7 | -import cn.iocoder.yudao.module.report.dal.dataobject.ureport.UReportDataDO; | |
| 8 | -import cn.iocoder.yudao.module.report.dal.mysql.ureport.UReportDataMapper; | |
| 9 | -import org.springframework.stereotype.Service; | |
| 10 | -import org.springframework.validation.annotation.Validated; | |
| 11 | - | |
| 12 | -import jakarta.annotation.Resource; | |
| 13 | -import java.util.List; | |
| 14 | - | |
| 15 | -import static cn.iocoder.yudao.framework.common.exception.util.ServiceExceptionUtil.exception; | |
| 16 | -import static cn.iocoder.yudao.module.report.enums.ErrorCodeConstants.UREPORT_DATA_NOT_EXISTS; | |
| 17 | - | |
| 18 | -/** | |
| 19 | - * Ureport2报表 Service 实现类 | |
| 20 | - * | |
| 21 | - * @author 芋道源码 | |
| 22 | - */ | |
| 23 | -@Service | |
| 24 | -@Validated | |
| 25 | -public class UReportDataServiceImpl implements UReportDataService { | |
| 26 | - | |
| 27 | - @Resource | |
| 28 | - private UReportDataMapper uReportDataMapper; | |
| 29 | - | |
| 30 | - @Override | |
| 31 | - public Long createUReportData(UReportDataSaveReqVO createReqVO) { | |
| 32 | - // TODO @赤焰:名字不要重复的校验,要加下 | |
| 33 | - UReportDataDO uReportData = BeanUtils.toBean(createReqVO, UReportDataDO.class); | |
| 34 | - uReportDataMapper.insert(uReportData); | |
| 35 | - return uReportData.getId(); | |
| 36 | - } | |
| 37 | - | |
| 38 | - @Override | |
| 39 | - public void updateUReportData(UReportDataSaveReqVO updateReqVO) { | |
| 40 | - // 校验存在 | |
| 41 | - validateUReportDataExists(updateReqVO.getId()); | |
| 42 | - // TODO @赤焰:名字不要重复的校验,要加下 | |
| 43 | - // 更新 | |
| 44 | - UReportDataDO updateObj = BeanUtils.toBean(updateReqVO, UReportDataDO.class); | |
| 45 | - uReportDataMapper.updateById(updateObj); | |
| 46 | - } | |
| 47 | - | |
| 48 | - @Override | |
| 49 | - public void deleteUReportData(Long id) { | |
| 50 | - // 校验存在 | |
| 51 | - validateUReportDataExists(id); | |
| 52 | - // 删除 | |
| 53 | - uReportDataMapper.deleteById(id); | |
| 54 | - } | |
| 55 | - | |
| 56 | - private void validateUReportDataExists(Long id) { | |
| 57 | - if (uReportDataMapper.selectById(id) == null) { | |
| 58 | - throw exception(UREPORT_DATA_NOT_EXISTS); | |
| 59 | - } | |
| 60 | - } | |
| 61 | - | |
| 62 | - @Override | |
| 63 | - public void validateUReportDataExists(String name) { | |
| 64 | - if (uReportDataMapper.selectListByName(name) == null) { | |
| 65 | - throw exception(UREPORT_DATA_NOT_EXISTS); | |
| 66 | - } | |
| 67 | - } | |
| 68 | - | |
| 69 | - @Override | |
| 70 | - public UReportDataDO getUReportData(Long id) { | |
| 71 | - return uReportDataMapper.selectById(id); | |
| 72 | - } | |
| 73 | - | |
| 74 | - @Override | |
| 75 | - public PageResult<UReportDataDO> getUReportDataPage(UReportDataPageReqVO pageReqVO) { | |
| 76 | - return uReportDataMapper.selectPage(pageReqVO); | |
| 77 | - } | |
| 78 | - | |
| 79 | - @Override | |
| 80 | - public int deleteByName(String name) { | |
| 81 | - return uReportDataMapper.deleteByName(name); | |
| 82 | - } | |
| 83 | - | |
| 84 | - @Override | |
| 85 | - public UReportDataDO selectOneByName(String name) { | |
| 86 | - return uReportDataMapper.selectByName(name); | |
| 87 | - } | |
| 88 | - | |
| 89 | - @Override | |
| 90 | - public List<UReportDataDO> getReportDataList() { | |
| 91 | - return uReportDataMapper.selectList(); | |
| 92 | - } | |
| 93 | - | |
| 94 | -} |
yudao-module-report/yudao-module-report-biz/src/main/resources/ureport.properties deleted
yudao-module-report/yudao-module-report-biz/src/test/java/cn/iocoder/yudao/module/report/service/ureport/UReportDataServiceImplTest.java deleted
| 1 | -package cn.iocoder.yudao.module.report.service.ureport; | |
| 2 | - | |
| 3 | -import cn.iocoder.yudao.framework.common.pojo.PageResult; | |
| 4 | -import cn.iocoder.yudao.framework.test.core.ut.BaseDbUnitTest; | |
| 5 | -import cn.iocoder.yudao.module.report.controller.admin.ureport.vo.UReportDataPageReqVO; | |
| 6 | -import cn.iocoder.yudao.module.report.controller.admin.ureport.vo.UReportDataSaveReqVO; | |
| 7 | -import cn.iocoder.yudao.module.report.dal.dataobject.ureport.UReportDataDO; | |
| 8 | -import cn.iocoder.yudao.module.report.dal.mysql.ureport.UReportDataMapper; | |
| 9 | -import org.junit.jupiter.api.Disabled; | |
| 10 | -import org.junit.jupiter.api.Test; | |
| 11 | -import org.springframework.context.annotation.Import; | |
| 12 | - | |
| 13 | -import jakarta.annotation.Resource; | |
| 14 | - | |
| 15 | -import static cn.iocoder.yudao.framework.common.util.date.LocalDateTimeUtils.buildBetweenTime; | |
| 16 | -import static cn.iocoder.yudao.framework.common.util.object.ObjectUtils.cloneIgnoreId; | |
| 17 | -import static cn.iocoder.yudao.framework.test.core.util.AssertUtils.assertPojoEquals; | |
| 18 | -import static cn.iocoder.yudao.framework.test.core.util.AssertUtils.assertServiceException; | |
| 19 | -import static cn.iocoder.yudao.framework.test.core.util.RandomUtils.randomLongId; | |
| 20 | -import static cn.iocoder.yudao.framework.test.core.util.RandomUtils.randomPojo; | |
| 21 | -import static cn.iocoder.yudao.module.report.enums.ErrorCodeConstants.UREPORT_DATA_NOT_EXISTS; | |
| 22 | -import static org.junit.jupiter.api.Assertions.*; | |
| 23 | - | |
| 24 | -/** | |
| 25 | - * {@link UReportDataServiceImpl} 的单元测试类 | |
| 26 | - * | |
| 27 | - * @author 芋道源码 | |
| 28 | - */ | |
| 29 | -@Disabled // TODO 芋艿:临时禁用,暂时不修复,等重构后解决 | |
| 30 | -@Import(UReportDataServiceImpl.class) | |
| 31 | -public class UReportDataServiceImplTest extends BaseDbUnitTest { | |
| 32 | - | |
| 33 | - @Resource | |
| 34 | - private UReportDataServiceImpl uReportDataService; | |
| 35 | - | |
| 36 | - @Resource | |
| 37 | - private UReportDataMapper uReportDataMapper; | |
| 38 | - | |
| 39 | - @Test | |
| 40 | - public void testCreateUReportData_success() { | |
| 41 | - // 准备参数 | |
| 42 | - UReportDataSaveReqVO createReqVO = randomPojo(UReportDataSaveReqVO.class).setId(null); | |
| 43 | - | |
| 44 | - // 调用 | |
| 45 | - Long uReportDataId = uReportDataService.createUReportData(createReqVO); | |
| 46 | - // 断言 | |
| 47 | - assertNotNull(uReportDataId); | |
| 48 | - // 校验记录的属性是否正确 | |
| 49 | - UReportDataDO uReportData = uReportDataMapper.selectById(uReportDataId); | |
| 50 | - assertPojoEquals(createReqVO, uReportData, "id"); | |
| 51 | - } | |
| 52 | - | |
| 53 | - @Test | |
| 54 | - public void testUpdateUReportData_success() { | |
| 55 | - // mock 数据 | |
| 56 | - UReportDataDO dbUReportData = randomPojo(UReportDataDO.class); | |
| 57 | - uReportDataMapper.insert(dbUReportData);// @Sql: 先插入出一条存在的数据 | |
| 58 | - // 准备参数 | |
| 59 | - UReportDataSaveReqVO updateReqVO = randomPojo(UReportDataSaveReqVO.class, o -> { | |
| 60 | - o.setId(dbUReportData.getId()); // 设置更新的 ID | |
| 61 | - }); | |
| 62 | - | |
| 63 | - // 调用 | |
| 64 | - uReportDataService.updateUReportData(updateReqVO); | |
| 65 | - // 校验是否更新正确 | |
| 66 | - UReportDataDO uReportData = uReportDataMapper.selectById(updateReqVO.getId()); // 获取最新的 | |
| 67 | - assertPojoEquals(updateReqVO, uReportData); | |
| 68 | - } | |
| 69 | - | |
| 70 | - @Test | |
| 71 | - public void testUpdateUReportData_notExists() { | |
| 72 | - // 准备参数 | |
| 73 | - UReportDataSaveReqVO updateReqVO = randomPojo(UReportDataSaveReqVO.class); | |
| 74 | - | |
| 75 | - // 调用, 并断言异常 | |
| 76 | - assertServiceException(() -> uReportDataService.updateUReportData(updateReqVO), UREPORT_DATA_NOT_EXISTS); | |
| 77 | - } | |
| 78 | - | |
| 79 | - @Test | |
| 80 | - public void testDeleteUReportData_success() { | |
| 81 | - // mock 数据 | |
| 82 | - UReportDataDO dbUReportData = randomPojo(UReportDataDO.class); | |
| 83 | - uReportDataMapper.insert(dbUReportData);// @Sql: 先插入出一条存在的数据 | |
| 84 | - // 准备参数 | |
| 85 | - Long id = dbUReportData.getId(); | |
| 86 | - | |
| 87 | - // 调用 | |
| 88 | - uReportDataService.deleteUReportData(id); | |
| 89 | - // 校验数据不存在了 | |
| 90 | - assertNull(uReportDataMapper.selectById(id)); | |
| 91 | - } | |
| 92 | - | |
| 93 | - @Test | |
| 94 | - public void testDeleteUReportData_notExists() { | |
| 95 | - // 准备参数 | |
| 96 | - Long id = randomLongId(); | |
| 97 | - | |
| 98 | - // 调用, 并断言异常 | |
| 99 | - assertServiceException(() -> uReportDataService.deleteUReportData(id), UREPORT_DATA_NOT_EXISTS); | |
| 100 | - } | |
| 101 | - | |
| 102 | - @Test | |
| 103 | - @Disabled // TODO 请修改 null 为需要的值,然后删除 @Disabled 注解 | |
| 104 | - public void testGetUReportDataPage() { | |
| 105 | - // mock 数据 | |
| 106 | - UReportDataDO dbUReportData = randomPojo(UReportDataDO.class, o -> { // 等会查询到 | |
| 107 | - o.setName(null); | |
| 108 | - o.setStatus(null); | |
| 109 | - o.setRemark(null); | |
| 110 | - o.setCreateTime(null); | |
| 111 | - }); | |
| 112 | - uReportDataMapper.insert(dbUReportData); | |
| 113 | - // 测试 name 不匹配 | |
| 114 | - uReportDataMapper.insert(cloneIgnoreId(dbUReportData, o -> o.setName(null))); | |
| 115 | - // 测试 status 不匹配 | |
| 116 | - uReportDataMapper.insert(cloneIgnoreId(dbUReportData, o -> o.setStatus(null))); | |
| 117 | - // 测试 remark 不匹配 | |
| 118 | - uReportDataMapper.insert(cloneIgnoreId(dbUReportData, o -> o.setRemark(null))); | |
| 119 | - // 测试 createTime 不匹配 | |
| 120 | - uReportDataMapper.insert(cloneIgnoreId(dbUReportData, o -> o.setCreateTime(null))); | |
| 121 | - // 准备参数 | |
| 122 | - UReportDataPageReqVO reqVO = new UReportDataPageReqVO(); | |
| 123 | - reqVO.setName(null); | |
| 124 | - reqVO.setStatus(null); | |
| 125 | - reqVO.setRemark(null); | |
| 126 | - reqVO.setCreateTime(buildBetweenTime(2023, 2, 1, 2023, 2, 28)); | |
| 127 | - | |
| 128 | - // 调用 | |
| 129 | - PageResult<UReportDataDO> pageResult = uReportDataService.getUReportDataPage(reqVO); | |
| 130 | - // 断言 | |
| 131 | - assertEquals(1, pageResult.getTotal()); | |
| 132 | - assertEquals(1, pageResult.getList().size()); | |
| 133 | - assertPojoEquals(dbUReportData, pageResult.getList().get(0)); | |
| 134 | - } | |
| 135 | - | |
| 136 | -} |
yudao-module-report/yudao-module-report-biz/src/test/resources/sql/clean.sql
yudao-module-report/yudao-module-report-biz/src/test/resources/sql/create_tables.sql
| ... | ... | @@ -12,16 +12,3 @@ CREATE TABLE IF NOT EXISTS "report_go_view_project" ( |
| 12 | 12 | "deleted" bit NOT NULL DEFAULT FALSE, |
| 13 | 13 | PRIMARY KEY ("id") |
| 14 | 14 | ) COMMENT 'GoView 项目表'; |
| 15 | -CREATE TABLE IF NOT EXISTS "report_ureport_data" ( | |
| 16 | - "id" bigint NOT NULL GENERATED BY DEFAULT AS IDENTITY, | |
| 17 | - "name" varchar NOT NULL, | |
| 18 | - "status" int NOT NULL, | |
| 19 | - "content" varchar, | |
| 20 | - "remark" varchar, | |
| 21 | - "creator" varchar DEFAULT '', | |
| 22 | - "create_time" datetime NOT NULL DEFAULT CURRENT_TIMESTAMP, | |
| 23 | - "updater" varchar DEFAULT '', | |
| 24 | - "update_time" datetime NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, | |
| 25 | - "deleted" bit NOT NULL DEFAULT FALSE, | |
| 26 | - PRIMARY KEY ("id") | |
| 27 | -) COMMENT 'Ureport2报表'; | ... | ... |
yudao-module-system/yudao-module-system-api/src/main/java/cn/iocoder/yudao/module/system/api/logger/OperateLogApi.java
| ... | ... | @@ -2,9 +2,8 @@ package cn.iocoder.yudao.module.system.api.logger; |
| 2 | 2 | |
| 3 | 3 | import cn.iocoder.yudao.framework.common.pojo.PageResult; |
| 4 | 4 | import cn.iocoder.yudao.module.system.api.logger.dto.OperateLogCreateReqDTO; |
| 5 | -import cn.iocoder.yudao.module.system.api.logger.dto.OperateLogV2CreateReqDTO; | |
| 6 | -import cn.iocoder.yudao.module.system.api.logger.dto.OperateLogV2PageReqDTO; | |
| 7 | -import cn.iocoder.yudao.module.system.api.logger.dto.OperateLogV2RespDTO; | |
| 5 | +import cn.iocoder.yudao.module.system.api.logger.dto.OperateLogPageReqDTO; | |
| 6 | +import cn.iocoder.yudao.module.system.api.logger.dto.OperateLogRespDTO; | |
| 8 | 7 | import jakarta.validation.Valid; |
| 9 | 8 | |
| 10 | 9 | /** |
| ... | ... | @@ -22,18 +21,11 @@ public interface OperateLogApi { |
| 22 | 21 | void createOperateLog(@Valid OperateLogCreateReqDTO createReqDTO); |
| 23 | 22 | |
| 24 | 23 | /** |
| 25 | - * 创建操作日志 | |
| 26 | - * | |
| 27 | - * @param createReqDTO 请求 | |
| 28 | - */ | |
| 29 | - void createOperateLogV2(@Valid OperateLogV2CreateReqDTO createReqDTO); | |
| 30 | - | |
| 31 | - /** | |
| 32 | 24 | * 获取指定模块的指定数据的操作日志分页 |
| 33 | 25 | * |
| 34 | 26 | * @param pageReqVO 请求 |
| 35 | 27 | * @return 操作日志分页 |
| 36 | 28 | */ |
| 37 | - PageResult<OperateLogV2RespDTO> getOperateLogPage(OperateLogV2PageReqDTO pageReqVO); | |
| 29 | + PageResult<OperateLogRespDTO> getOperateLogPage(OperateLogPageReqDTO pageReqVO); | |
| 38 | 30 | |
| 39 | 31 | } | ... | ... |
yudao-module-system/yudao-module-system-api/src/main/java/cn/iocoder/yudao/module/system/api/logger/dto/OperateLogCreateReqDTO.java
| 1 | 1 | package cn.iocoder.yudao.module.system.api.logger.dto; |
| 2 | 2 | |
| 3 | -import lombok.Data; | |
| 4 | - | |
| 3 | +import cn.iocoder.yudao.framework.common.enums.UserTypeEnum; | |
| 5 | 4 | import jakarta.validation.constraints.NotEmpty; |
| 6 | 5 | import jakarta.validation.constraints.NotNull; |
| 7 | -import java.time.LocalDateTime; | |
| 8 | -import java.util.Map; | |
| 6 | +import lombok.Data; | |
| 9 | 7 | |
| 10 | 8 | /** |
| 11 | - * 操作日志创建 Request DTO | |
| 9 | + * 系统操作日志 Create Request DTO | |
| 10 | + * | |
| 11 | + * @author HUIHUI | |
| 12 | 12 | */ |
| 13 | 13 | @Data |
| 14 | 14 | public class OperateLogCreateReqDTO { |
| 15 | 15 | |
| 16 | 16 | /** |
| 17 | 17 | * 链路追踪编号 |
| 18 | + * | |
| 19 | + * 一般来说,通过链路追踪编号,可以将访问日志,错误日志,链路追踪日志,logger 打印日志等,结合在一起,从而进行排错。 | |
| 18 | 20 | */ |
| 19 | 21 | private String traceId; |
| 20 | - | |
| 21 | 22 | /** |
| 22 | 23 | * 用户编号 |
| 24 | + * | |
| 25 | + * 关联 MemberUserDO 的 id 属性,或者 AdminUserDO 的 id 属性 | |
| 23 | 26 | */ |
| 24 | 27 | @NotNull(message = "用户编号不能为空") |
| 25 | 28 | private Long userId; |
| 26 | 29 | /** |
| 27 | 30 | * 用户类型 |
| 31 | + * | |
| 32 | + * 关联 {@link UserTypeEnum} | |
| 28 | 33 | */ |
| 29 | 34 | @NotNull(message = "用户类型不能为空") |
| 30 | 35 | private Integer userType; |
| 31 | - | |
| 32 | 36 | /** |
| 33 | - * 操作模块 | |
| 37 | + * 操作模块类型 | |
| 34 | 38 | */ |
| 35 | - @NotEmpty(message = "操作模块不能为空") | |
| 36 | - private String module; | |
| 37 | - | |
| 39 | + @NotEmpty(message = "操作模块类型不能为空") | |
| 40 | + private String type; | |
| 38 | 41 | /** |
| 39 | 42 | * 操作名 |
| 40 | 43 | */ |
| 41 | - @NotEmpty(message = "操作名") | |
| 42 | - private String name; | |
| 43 | - | |
| 44 | + @NotEmpty(message = "操作名不能为空") | |
| 45 | + private String subType; | |
| 44 | 46 | /** |
| 45 | - * 操作分类 | |
| 47 | + * 操作模块业务编号 | |
| 46 | 48 | */ |
| 47 | - @NotNull(message = "操作分类不能为空") | |
| 48 | - private Integer type; | |
| 49 | - | |
| 49 | + @NotNull(message = "操作模块业务编号不能为空") | |
| 50 | + private Long bizId; | |
| 50 | 51 | /** |
| 51 | - * 操作明细 | |
| 52 | + * 操作内容,记录整个操作的明细 | |
| 53 | + * 例如说,修改编号为 1 的用户信息,将性别从男改成女,将姓名从芋道改成源码。 | |
| 52 | 54 | */ |
| 53 | - private String content; | |
| 54 | - | |
| 55 | + @NotEmpty(message = "操作内容不能为空") | |
| 56 | + private String action; | |
| 55 | 57 | /** |
| 56 | - * 拓展字段 | |
| 58 | + * 拓展字段,有些复杂的业务,需要记录一些字段 ( JSON 格式 ) | |
| 59 | + * 例如说,记录订单编号,{ orderId: "1"} | |
| 57 | 60 | */ |
| 58 | - private Map<String, Object> exts; | |
| 61 | + private String extra; | |
| 59 | 62 | |
| 60 | 63 | /** |
| 61 | 64 | * 请求方法名 |
| 62 | 65 | */ |
| 63 | 66 | @NotEmpty(message = "请求方法名不能为空") |
| 64 | 67 | private String requestMethod; |
| 65 | - | |
| 66 | 68 | /** |
| 67 | 69 | * 请求地址 |
| 68 | 70 | */ |
| 69 | 71 | @NotEmpty(message = "请求地址不能为空") |
| 70 | 72 | private String requestUrl; |
| 71 | - | |
| 72 | 73 | /** |
| 73 | 74 | * 用户 IP |
| 74 | 75 | */ |
| 75 | 76 | @NotEmpty(message = "用户 IP 不能为空") |
| 76 | 77 | private String userIp; |
| 77 | - | |
| 78 | 78 | /** |
| 79 | - * 浏览器 UserAgent | |
| 79 | + * 浏览器 UA | |
| 80 | 80 | */ |
| 81 | - @NotEmpty(message = "浏览器 UserAgent 不能为空") | |
| 81 | + @NotEmpty(message = "浏览器 UA 不能为空") | |
| 82 | 82 | private String userAgent; |
| 83 | 83 | |
| 84 | - /** | |
| 85 | - * Java 方法名 | |
| 86 | - */ | |
| 87 | - @NotEmpty(message = "Java 方法名不能为空") | |
| 88 | - private String javaMethod; | |
| 89 | - | |
| 90 | - /** | |
| 91 | - * Java 方法的参数 | |
| 92 | - */ | |
| 93 | - private String javaMethodArgs; | |
| 94 | - | |
| 95 | - /** | |
| 96 | - * 开始时间 | |
| 97 | - */ | |
| 98 | - @NotNull(message = "开始时间不能为空") | |
| 99 | - private LocalDateTime startTime; | |
| 100 | - | |
| 101 | - /** | |
| 102 | - * 执行时长,单位:毫秒 | |
| 103 | - */ | |
| 104 | - @NotNull(message = "执行时长不能为空") | |
| 105 | - private Integer duration; | |
| 106 | - | |
| 107 | - /** | |
| 108 | - * 结果码 | |
| 109 | - */ | |
| 110 | - @NotNull(message = "结果码不能为空") | |
| 111 | - private Integer resultCode; | |
| 112 | - | |
| 113 | - /** | |
| 114 | - * 结果提示 | |
| 115 | - */ | |
| 116 | - private String resultMsg; | |
| 117 | - | |
| 118 | - /** | |
| 119 | - * 结果数据 | |
| 120 | - */ | |
| 121 | - private String resultData; | |
| 122 | - | |
| 123 | 84 | } | ... | ... |
yudao-module-system/yudao-module-system-api/src/main/java/cn/iocoder/yudao/module/system/api/logger/dto/OperateLogV2PageReqDTO.java renamed to yudao-module-system/yudao-module-system-api/src/main/java/cn/iocoder/yudao/module/system/api/logger/dto/OperateLogPageReqDTO.java
| ... | ... | @@ -9,12 +9,12 @@ import lombok.Data; |
| 9 | 9 | * @author HUIHUI |
| 10 | 10 | */ |
| 11 | 11 | @Data |
| 12 | -public class OperateLogV2PageReqDTO extends PageParam { | |
| 12 | +public class OperateLogPageReqDTO extends PageParam { | |
| 13 | 13 | |
| 14 | 14 | /** |
| 15 | 15 | * 模块类型 |
| 16 | 16 | */ |
| 17 | - private String bizType; | |
| 17 | + private String type; | |
| 18 | 18 | /** |
| 19 | 19 | * 模块数据编号 |
| 20 | 20 | */ | ... | ... |
yudao-module-system/yudao-module-system-api/src/main/java/cn/iocoder/yudao/module/system/api/logger/dto/OperateLogV2RespDTO.java renamed to yudao-module-system/yudao-module-system-api/src/main/java/cn/iocoder/yudao/module/system/api/logger/dto/OperateLogRespDTO.java
| 1 | 1 | package cn.iocoder.yudao.module.system.api.logger.dto; |
| 2 | 2 | |
| 3 | +import com.fhs.core.trans.anno.Trans; | |
| 4 | +import com.fhs.core.trans.constant.TransType; | |
| 5 | +import com.fhs.core.trans.vo.VO; | |
| 3 | 6 | import lombok.Data; |
| 4 | 7 | |
| 5 | 8 | import java.time.LocalDateTime; |
| ... | ... | @@ -10,15 +13,21 @@ import java.time.LocalDateTime; |
| 10 | 13 | * @author HUIHUI |
| 11 | 14 | */ |
| 12 | 15 | @Data |
| 13 | -public class OperateLogV2RespDTO { | |
| 16 | +public class OperateLogRespDTO implements VO { | |
| 14 | 17 | |
| 15 | 18 | /** |
| 19 | + * 日志编号 | |
| 20 | + */ | |
| 21 | + private Long id; | |
| 22 | + /** | |
| 16 | 23 | * 链路追踪编号 |
| 17 | 24 | */ |
| 18 | 25 | private String traceId; |
| 19 | 26 | /** |
| 20 | 27 | * 用户编号 |
| 21 | 28 | */ |
| 29 | + @Trans(type = TransType.RPC, targetClassName = "cn.iocoder.yudao.module.system.dal.dataobject.user.AdminUserDO", | |
| 30 | + fields = "nickname", ref = "userName") | |
| 22 | 31 | private Long userId; |
| 23 | 32 | /** |
| 24 | 33 | * 用户名称 | ... | ... |
yudao-module-system/yudao-module-system-api/src/main/java/cn/iocoder/yudao/module/system/api/logger/dto/OperateLogV2CreateReqDTO.java deleted
| 1 | -package cn.iocoder.yudao.module.system.api.logger.dto; | |
| 2 | - | |
| 3 | -import cn.iocoder.yudao.framework.common.enums.UserTypeEnum; | |
| 4 | -import jakarta.validation.constraints.NotEmpty; | |
| 5 | -import jakarta.validation.constraints.NotNull; | |
| 6 | -import lombok.Data; | |
| 7 | - | |
| 8 | -/** | |
| 9 | - * 系统操作日志 Create Request DTO | |
| 10 | - * | |
| 11 | - * @author HUIHUI | |
| 12 | - */ | |
| 13 | -@Data | |
| 14 | -public class OperateLogV2CreateReqDTO { | |
| 15 | - | |
| 16 | - /** | |
| 17 | - * 链路追踪编号 | |
| 18 | - * | |
| 19 | - * 一般来说,通过链路追踪编号,可以将访问日志,错误日志,链路追踪日志,logger 打印日志等,结合在一起,从而进行排错。 | |
| 20 | - */ | |
| 21 | - private String traceId; | |
| 22 | - /** | |
| 23 | - * 用户编号 | |
| 24 | - * | |
| 25 | - * 关联 MemberUserDO 的 id 属性,或者 AdminUserDO 的 id 属性 | |
| 26 | - */ | |
| 27 | - @NotNull(message = "用户编号不能为空") | |
| 28 | - private Long userId; | |
| 29 | - /** | |
| 30 | - * 用户类型 | |
| 31 | - * | |
| 32 | - * 关联 {@link UserTypeEnum} | |
| 33 | - */ | |
| 34 | - @NotNull(message = "用户类型不能为空") | |
| 35 | - private Integer userType; | |
| 36 | - /** | |
| 37 | - * 操作模块类型 | |
| 38 | - */ | |
| 39 | - @NotEmpty(message = "操作模块类型不能为空") | |
| 40 | - private String type; | |
| 41 | - /** | |
| 42 | - * 操作名 | |
| 43 | - */ | |
| 44 | - @NotEmpty(message = "操作名不能为空") | |
| 45 | - private String subType; | |
| 46 | - /** | |
| 47 | - * 操作模块业务编号 | |
| 48 | - */ | |
| 49 | - @NotNull(message = "操作模块业务编号不能为空") | |
| 50 | - private Long bizId; | |
| 51 | - /** | |
| 52 | - * 操作内容,记录整个操作的明细 | |
| 53 | - * 例如说,修改编号为 1 的用户信息,将性别从男改成女,将姓名从芋道改成源码。 | |
| 54 | - */ | |
| 55 | - @NotEmpty(message = "操作内容不能为空") | |
| 56 | - private String action; | |
| 57 | - /** | |
| 58 | - * 拓展字段,有些复杂的业务,需要记录一些字段 ( JSON 格式 ) | |
| 59 | - * 例如说,记录订单编号,{ orderId: "1"} | |
| 60 | - */ | |
| 61 | - private String extra; | |
| 62 | - | |
| 63 | - /** | |
| 64 | - * 请求方法名 | |
| 65 | - */ | |
| 66 | - @NotEmpty(message = "请求方法名不能为空") | |
| 67 | - private String requestMethod; | |
| 68 | - /** | |
| 69 | - * 请求地址 | |
| 70 | - */ | |
| 71 | - @NotEmpty(message = "请求地址不能为空") | |
| 72 | - private String requestUrl; | |
| 73 | - /** | |
| 74 | - * 用户 IP | |
| 75 | - */ | |
| 76 | - @NotEmpty(message = "用户 IP 不能为空") | |
| 77 | - private String userIp; | |
| 78 | - /** | |
| 79 | - * 浏览器 UA | |
| 80 | - */ | |
| 81 | - @NotEmpty(message = "浏览器 UA 不能为空") | |
| 82 | - private String userAgent; | |
| 83 | - | |
| 84 | -} |
yudao-module-system/yudao-module-system-api/src/main/java/cn/iocoder/yudao/module/system/enums/DictTypeConstants.java
| ... | ... | @@ -14,8 +14,6 @@ public interface DictTypeConstants { |
| 14 | 14 | |
| 15 | 15 | String USER_SEX = "system_user_sex"; // 用户性别 |
| 16 | 16 | |
| 17 | - String OPERATE_TYPE = "system_operate_type"; // 操作类型 | |
| 18 | - | |
| 19 | 17 | String LOGIN_TYPE = "system_login_type"; // 登录日志的类型 |
| 20 | 18 | String LOGIN_RESULT = "system_login_result"; // 登录结果 |
| 21 | 19 | ... | ... |
yudao-module-system/yudao-module-system-api/src/main/java/cn/iocoder/yudao/module/system/enums/ErrorCodeConstants.java
| ... | ... | @@ -125,7 +125,7 @@ public interface ErrorCodeConstants { |
| 125 | 125 | |
| 126 | 126 | ErrorCode SOCIAL_CLIENT_WEIXIN_MINI_APP_PHONE_CODE_ERROR = new ErrorCode(1_002_018_200, "获得手机号失败"); |
| 127 | 127 | ErrorCode SOCIAL_CLIENT_NOT_EXISTS = new ErrorCode(1_002_018_201, "社交客户端不存在"); |
| 128 | - ErrorCode SOCIAL_CLIENT_UNIQUE = new ErrorCode(1_002_018_201, "社交客户端已存在配置"); | |
| 128 | + ErrorCode SOCIAL_CLIENT_UNIQUE = new ErrorCode(1_002_018_202, "社交客户端已存在配置"); | |
| 129 | 129 | |
| 130 | 130 | // ========== 系统敏感词 1-002-019-000 ========= |
| 131 | 131 | ErrorCode SENSITIVE_WORD_NOT_EXISTS = new ErrorCode(1_002_019_000, "系统敏感词在所有标签中都不存在"); | ... | ... |
yudao-module-system/yudao-module-system-api/src/main/java/cn/iocoder/yudao/module/system/enums/LogRecordConstants.java
0 → 100644
| 1 | +package cn.iocoder.yudao.module.system.enums; | |
| 2 | + | |
| 3 | +/** | |
| 4 | + * System 操作日志枚举 | |
| 5 | + * 目的:统一管理,也减少 Service 里各种“复杂”字符串 | |
| 6 | + * | |
| 7 | + * @author 芋道源码 | |
| 8 | + */ | |
| 9 | +public interface LogRecordConstants { | |
| 10 | + | |
| 11 | + // ======================= SYSTEM_USER 用户 ======================= | |
| 12 | + | |
| 13 | + String SYSTEM_USER_TYPE = "SYSTEM 用户"; | |
| 14 | + String SYSTEM_USER_CREATE_SUB_TYPE = "创建用户"; | |
| 15 | + String SYSTEM_USER_CREATE_SUCCESS = "创建了用户【{{#user.nickname}}】"; | |
| 16 | + String SYSTEM_USER_UPDATE_SUB_TYPE = "更新用户"; | |
| 17 | + String SYSTEM_USER_UPDATE_SUCCESS = "更新了用户【{{#user.nickname}}】: {_DIFF{#updateReqVO}}"; | |
| 18 | + String SYSTEM_USER_DELETE_SUB_TYPE = "删除用户"; | |
| 19 | + String SYSTEM_USER_DELETE_SUCCESS = "删除了用户【{{#user.nickname}}】"; | |
| 20 | + String SYSTEM_USER_UPDATE_PASSWORD_SUB_TYPE = "重置用户密码"; | |
| 21 | + String SYSTEM_USER_UPDATE_PASSWORD_SUCCESS = "将用户【{{#user.nickname}}】的密码从【{{#user.password}}】重置为【{{#newPassword}}】"; | |
| 22 | + | |
| 23 | + // ======================= SYSTEM_ROLE 角色 ======================= | |
| 24 | + | |
| 25 | + String SYSTEM_ROLE_TYPE = "SYSTEM 角色"; | |
| 26 | + String SYSTEM_ROLE_CREATE_SUB_TYPE = "创建角色"; | |
| 27 | + String SYSTEM_ROLE_CREATE_SUCCESS = "创建了角色【{{#role.name}}】"; | |
| 28 | + String SYSTEM_ROLE_UPDATE_SUB_TYPE = "更新角色"; | |
| 29 | + String SYSTEM_ROLE_UPDATE_SUCCESS = "更新了角色【{{#role.name}}】: {_DIFF{#updateReqVO}}"; | |
| 30 | + String SYSTEM_ROLE_DELETE_SUB_TYPE = "删除角色"; | |
| 31 | + String SYSTEM_ROLE_DELETE_SUCCESS = "删除了角色【{{#role.name}}】"; | |
| 32 | + | |
| 33 | +} | ... | ... |
yudao-module-system/yudao-module-system-biz/pom.xml
| ... | ... | @@ -32,10 +32,6 @@ |
| 32 | 32 | <!-- 业务组件 --> |
| 33 | 33 | <dependency> |
| 34 | 34 | <groupId>cn.iocoder.boot</groupId> |
| 35 | - <artifactId>yudao-spring-boot-starter-biz-operatelog</artifactId> | |
| 36 | - </dependency> | |
| 37 | - <dependency> | |
| 38 | - <groupId>cn.iocoder.boot</groupId> | |
| 39 | 35 | <artifactId>yudao-spring-boot-starter-biz-data-permission</artifactId> |
| 40 | 36 | </dependency> |
| 41 | 37 | <dependency> | ... | ... |
yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/api/logger/OperateLogApiImpl.java
| 1 | 1 | package cn.iocoder.yudao.module.system.api.logger; |
| 2 | 2 | |
| 3 | -import cn.hutool.core.collection.CollUtil; | |
| 4 | 3 | import cn.iocoder.yudao.framework.common.pojo.PageResult; |
| 4 | +import cn.iocoder.yudao.framework.common.util.object.BeanUtils; | |
| 5 | 5 | import cn.iocoder.yudao.module.system.api.logger.dto.OperateLogCreateReqDTO; |
| 6 | -import cn.iocoder.yudao.module.system.api.logger.dto.OperateLogV2CreateReqDTO; | |
| 7 | -import cn.iocoder.yudao.module.system.api.logger.dto.OperateLogV2PageReqDTO; | |
| 8 | -import cn.iocoder.yudao.module.system.api.logger.dto.OperateLogV2RespDTO; | |
| 9 | -import cn.iocoder.yudao.module.system.convert.logger.OperateLogConvert; | |
| 10 | -import cn.iocoder.yudao.module.system.dal.dataobject.logger.OperateLogV2DO; | |
| 11 | -import cn.iocoder.yudao.module.system.dal.dataobject.user.AdminUserDO; | |
| 6 | +import cn.iocoder.yudao.module.system.api.logger.dto.OperateLogPageReqDTO; | |
| 7 | +import cn.iocoder.yudao.module.system.api.logger.dto.OperateLogRespDTO; | |
| 8 | +import cn.iocoder.yudao.module.system.dal.dataobject.logger.OperateLogDO; | |
| 12 | 9 | import cn.iocoder.yudao.module.system.service.logger.OperateLogService; |
| 13 | -import cn.iocoder.yudao.module.system.service.user.AdminUserService; | |
| 10 | +import com.fhs.core.trans.anno.TransMethodResult; | |
| 14 | 11 | import jakarta.annotation.Resource; |
| 15 | 12 | import org.springframework.scheduling.annotation.Async; |
| 16 | 13 | import org.springframework.stereotype.Service; |
| 17 | 14 | import org.springframework.validation.annotation.Validated; |
| 18 | 15 | |
| 19 | -import java.util.List; | |
| 20 | - | |
| 21 | -import static cn.iocoder.yudao.framework.common.util.collection.CollectionUtils.convertSet; | |
| 22 | - | |
| 23 | 16 | /** |
| 24 | 17 | * 操作日志 API 实现类 |
| 25 | 18 | * |
| ... | ... | @@ -31,31 +24,18 @@ public class OperateLogApiImpl implements OperateLogApi { |
| 31 | 24 | |
| 32 | 25 | @Resource |
| 33 | 26 | private OperateLogService operateLogService; |
| 34 | - @Resource | |
| 35 | - private AdminUserService adminUserService; | |
| 36 | 27 | |
| 37 | 28 | @Override |
| 29 | + @Async | |
| 38 | 30 | public void createOperateLog(OperateLogCreateReqDTO createReqDTO) { |
| 39 | 31 | operateLogService.createOperateLog(createReqDTO); |
| 40 | 32 | } |
| 41 | 33 | |
| 42 | 34 | @Override |
| 43 | - @Async | |
| 44 | - public void createOperateLogV2(OperateLogV2CreateReqDTO createReqDTO) { | |
| 45 | - operateLogService.createOperateLogV2(createReqDTO); | |
| 46 | - } | |
| 47 | - | |
| 48 | - @Override | |
| 49 | - public PageResult<OperateLogV2RespDTO> getOperateLogPage(OperateLogV2PageReqDTO pageReqVO) { | |
| 50 | - PageResult<OperateLogV2DO> operateLogPage = operateLogService.getOperateLogPage(pageReqVO); | |
| 51 | - if (CollUtil.isEmpty(operateLogPage.getList())) { | |
| 52 | - return PageResult.empty(); | |
| 53 | - } | |
| 54 | - | |
| 55 | - // 获取用户 | |
| 56 | - List<AdminUserDO> userList = adminUserService.getUserList( | |
| 57 | - convertSet(operateLogPage.getList(), OperateLogV2DO::getUserId)); | |
| 58 | - return OperateLogConvert.INSTANCE.convertPage(operateLogPage, userList); | |
| 35 | + @TransMethodResult | |
| 36 | + public PageResult<OperateLogRespDTO> getOperateLogPage(OperateLogPageReqDTO pageReqVO) { | |
| 37 | + PageResult<OperateLogDO> operateLogPage = operateLogService.getOperateLogPage(pageReqVO); | |
| 38 | + return BeanUtils.toBean(operateLogPage, OperateLogRespDTO.class); | |
| 59 | 39 | } |
| 60 | 40 | |
| 61 | 41 | } | ... | ... |
yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/auth/AuthController.java
| ... | ... | @@ -5,7 +5,6 @@ import cn.hutool.core.util.StrUtil; |
| 5 | 5 | import cn.iocoder.yudao.framework.common.enums.CommonStatusEnum; |
| 6 | 6 | import cn.iocoder.yudao.framework.common.enums.UserTypeEnum; |
| 7 | 7 | import cn.iocoder.yudao.framework.common.pojo.CommonResult; |
| 8 | -import cn.iocoder.yudao.framework.operatelog.core.annotations.OperateLog; | |
| 9 | 8 | import cn.iocoder.yudao.framework.security.config.SecurityProperties; |
| 10 | 9 | import cn.iocoder.yudao.framework.security.core.util.SecurityFrameworkUtils; |
| 11 | 10 | import cn.iocoder.yudao.module.system.controller.admin.auth.vo.*; |
| ... | ... | @@ -66,7 +65,6 @@ public class AuthController { |
| 66 | 65 | @PostMapping("/login") |
| 67 | 66 | @PermitAll |
| 68 | 67 | @Operation(summary = "使用账号密码登录") |
| 69 | - @OperateLog(enable = false) // 避免 Post 请求被记录操作日志 | |
| 70 | 68 | public CommonResult<AuthLoginRespVO> login(@RequestBody @Valid AuthLoginReqVO reqVO) { |
| 71 | 69 | return success(authService.login(reqVO)); |
| 72 | 70 | } |
| ... | ... | @@ -74,7 +72,6 @@ public class AuthController { |
| 74 | 72 | @PostMapping("/logout") |
| 75 | 73 | @PermitAll |
| 76 | 74 | @Operation(summary = "登出系统") |
| 77 | - @OperateLog(enable = false) // 避免 Post 请求被记录操作日志 | |
| 78 | 75 | public CommonResult<Boolean> logout(HttpServletRequest request) { |
| 79 | 76 | String token = SecurityFrameworkUtils.obtainAuthorization(request, |
| 80 | 77 | securityProperties.getTokenHeader(), securityProperties.getTokenParameter()); |
| ... | ... | @@ -88,7 +85,6 @@ public class AuthController { |
| 88 | 85 | @PermitAll |
| 89 | 86 | @Operation(summary = "刷新令牌") |
| 90 | 87 | @Parameter(name = "refreshToken", description = "刷新令牌", required = true) |
| 91 | - @OperateLog(enable = false) // 避免 Post 请求被记录操作日志 | |
| 92 | 88 | public CommonResult<AuthLoginRespVO> refreshToken(@RequestParam("refreshToken") String refreshToken) { |
| 93 | 89 | return success(authService.refreshToken(refreshToken)); |
| 94 | 90 | } |
| ... | ... | @@ -124,7 +120,6 @@ public class AuthController { |
| 124 | 120 | @PostMapping("/sms-login") |
| 125 | 121 | @PermitAll |
| 126 | 122 | @Operation(summary = "使用短信验证码登录") |
| 127 | - @OperateLog(enable = false) // 避免 Post 请求被记录操作日志 | |
| 128 | 123 | public CommonResult<AuthLoginRespVO> smsLogin(@RequestBody @Valid AuthSmsLoginReqVO reqVO) { |
| 129 | 124 | return success(authService.smsLogin(reqVO)); |
| 130 | 125 | } |
| ... | ... | @@ -132,7 +127,6 @@ public class AuthController { |
| 132 | 127 | @PostMapping("/send-sms-code") |
| 133 | 128 | @PermitAll |
| 134 | 129 | @Operation(summary = "发送手机验证码") |
| 135 | - @OperateLog(enable = false) // 避免 Post 请求被记录操作日志 | |
| 136 | 130 | public CommonResult<Boolean> sendLoginSmsCode(@RequestBody @Valid AuthSmsSendReqVO reqVO) { |
| 137 | 131 | authService.sendSmsCode(reqVO); |
| 138 | 132 | return success(true); |
| ... | ... | @@ -156,7 +150,6 @@ public class AuthController { |
| 156 | 150 | @PostMapping("/social-login") |
| 157 | 151 | @PermitAll |
| 158 | 152 | @Operation(summary = "社交快捷登录,使用 code 授权码", description = "适合未登录的用户,但是社交账号已绑定用户") |
| 159 | - @OperateLog(enable = false) // 避免 Post 请求被记录操作日志 | |
| 160 | 153 | public CommonResult<AuthLoginRespVO> socialQuickLogin(@RequestBody @Valid AuthSocialLoginReqVO reqVO) { |
| 161 | 154 | return success(authService.socialLogin(reqVO)); |
| 162 | 155 | } | ... | ... |
yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/captcha/CaptchaController.java
| ... | ... | @@ -2,7 +2,6 @@ package cn.iocoder.yudao.module.system.controller.admin.captcha; |
| 2 | 2 | |
| 3 | 3 | import cn.hutool.core.util.StrUtil; |
| 4 | 4 | import cn.iocoder.yudao.framework.common.util.servlet.ServletUtils; |
| 5 | -import cn.iocoder.yudao.framework.operatelog.core.annotations.OperateLog; | |
| 6 | 5 | import com.xingyuv.captcha.model.common.ResponseModel; |
| 7 | 6 | import com.xingyuv.captcha.model.vo.CaptchaVO; |
| 8 | 7 | import com.xingyuv.captcha.service.CaptchaService; |
| ... | ... | @@ -28,7 +27,6 @@ public class CaptchaController { |
| 28 | 27 | @PostMapping({"/get"}) |
| 29 | 28 | @Operation(summary = "获得验证码") |
| 30 | 29 | @PermitAll |
| 31 | - @OperateLog(enable = false) // 避免 Post 请求被记录操作日志 | |
| 32 | 30 | public ResponseModel get(@RequestBody CaptchaVO data, HttpServletRequest request) { |
| 33 | 31 | assert request.getRemoteHost() != null; |
| 34 | 32 | data.setBrowserInfo(getRemoteId(request)); |
| ... | ... | @@ -38,7 +36,6 @@ public class CaptchaController { |
| 38 | 36 | @PostMapping("/check") |
| 39 | 37 | @Operation(summary = "校验验证码") |
| 40 | 38 | @PermitAll |
| 41 | - @OperateLog(enable = false) // 避免 Post 请求被记录操作日志 | |
| 42 | 39 | public ResponseModel check(@RequestBody CaptchaVO data, HttpServletRequest request) { |
| 43 | 40 | data.setBrowserInfo(getRemoteId(request)); |
| 44 | 41 | return captchaService.check(data); | ... | ... |
yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/dept/PostController.java
| 1 | 1 | package cn.iocoder.yudao.module.system.controller.admin.dept; |
| 2 | 2 | |
| 3 | +import cn.iocoder.yudao.framework.apilog.core.annotations.ApiAccessLog; | |
| 3 | 4 | import cn.iocoder.yudao.framework.common.enums.CommonStatusEnum; |
| 4 | 5 | import cn.iocoder.yudao.framework.common.pojo.CommonResult; |
| 5 | 6 | import cn.iocoder.yudao.framework.common.pojo.PageParam; |
| 6 | 7 | import cn.iocoder.yudao.framework.common.pojo.PageResult; |
| 7 | 8 | import cn.iocoder.yudao.framework.common.util.object.BeanUtils; |
| 8 | 9 | import cn.iocoder.yudao.framework.excel.core.util.ExcelUtils; |
| 9 | -import cn.iocoder.yudao.framework.operatelog.core.annotations.OperateLog; | |
| 10 | 10 | import cn.iocoder.yudao.module.system.controller.admin.dept.vo.post.PostPageReqVO; |
| 11 | -import cn.iocoder.yudao.module.system.controller.admin.dept.vo.post.PostSaveReqVO; | |
| 12 | 11 | import cn.iocoder.yudao.module.system.controller.admin.dept.vo.post.PostRespVO; |
| 12 | +import cn.iocoder.yudao.module.system.controller.admin.dept.vo.post.PostSaveReqVO; | |
| 13 | 13 | import cn.iocoder.yudao.module.system.controller.admin.dept.vo.post.PostSimpleRespVO; |
| 14 | 14 | import cn.iocoder.yudao.module.system.dal.dataobject.dept.PostDO; |
| 15 | 15 | import cn.iocoder.yudao.module.system.service.dept.PostService; |
| 16 | 16 | import io.swagger.v3.oas.annotations.Operation; |
| 17 | 17 | import io.swagger.v3.oas.annotations.Parameter; |
| 18 | 18 | import io.swagger.v3.oas.annotations.tags.Tag; |
| 19 | +import jakarta.annotation.Resource; | |
| 20 | +import jakarta.servlet.http.HttpServletResponse; | |
| 21 | +import jakarta.validation.Valid; | |
| 19 | 22 | import org.springframework.security.access.prepost.PreAuthorize; |
| 20 | 23 | import org.springframework.validation.annotation.Validated; |
| 21 | 24 | import org.springframework.web.bind.annotation.*; |
| 22 | 25 | |
| 23 | -import jakarta.annotation.Resource; | |
| 24 | -import jakarta.servlet.http.HttpServletResponse; | |
| 25 | -import jakarta.validation.Valid; | |
| 26 | 26 | import java.io.IOException; |
| 27 | 27 | import java.util.Collections; |
| 28 | 28 | import java.util.Comparator; |
| 29 | 29 | import java.util.List; |
| 30 | 30 | |
| 31 | +import static cn.iocoder.yudao.framework.apilog.core.enums.OperateTypeEnum.EXPORT; | |
| 31 | 32 | import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success; |
| 32 | -import static cn.iocoder.yudao.framework.operatelog.core.enums.OperateTypeEnum.EXPORT; | |
| 33 | 33 | |
| 34 | 34 | @Tag(name = "管理后台 - 岗位") |
| 35 | 35 | @RestController |
| ... | ... | @@ -94,7 +94,7 @@ public class PostController { |
| 94 | 94 | @GetMapping("/export") |
| 95 | 95 | @Operation(summary = "岗位管理") |
| 96 | 96 | @PreAuthorize("@ss.hasPermission('system:post:export')") |
| 97 | - @OperateLog(type = EXPORT) | |
| 97 | + @ApiAccessLog(operateType = EXPORT) | |
| 98 | 98 | public void export(HttpServletResponse response, @Validated PostPageReqVO reqVO) throws IOException { |
| 99 | 99 | reqVO.setPageSize(PageParam.PAGE_SIZE_NONE); |
| 100 | 100 | List<PostDO> list = postService.getPostPage(reqVO).getList(); | ... | ... |
yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/dict/DictDataController.java
| 1 | 1 | package cn.iocoder.yudao.module.system.controller.admin.dict; |
| 2 | 2 | |
| 3 | +import cn.iocoder.yudao.framework.apilog.core.annotations.ApiAccessLog; | |
| 3 | 4 | import cn.iocoder.yudao.framework.common.enums.CommonStatusEnum; |
| 4 | 5 | import cn.iocoder.yudao.framework.common.pojo.CommonResult; |
| 5 | 6 | import cn.iocoder.yudao.framework.common.pojo.PageParam; |
| 6 | 7 | import cn.iocoder.yudao.framework.common.pojo.PageResult; |
| 7 | 8 | import cn.iocoder.yudao.framework.common.util.object.BeanUtils; |
| 8 | 9 | import cn.iocoder.yudao.framework.excel.core.util.ExcelUtils; |
| 9 | -import cn.iocoder.yudao.framework.operatelog.core.annotations.OperateLog; | |
| 10 | 10 | import cn.iocoder.yudao.module.system.controller.admin.dict.vo.data.DictDataPageReqVO; |
| 11 | 11 | import cn.iocoder.yudao.module.system.controller.admin.dict.vo.data.DictDataRespVO; |
| 12 | 12 | import cn.iocoder.yudao.module.system.controller.admin.dict.vo.data.DictDataSaveReqVO; |
| ... | ... | @@ -16,18 +16,18 @@ import cn.iocoder.yudao.module.system.service.dict.DictDataService; |
| 16 | 16 | import io.swagger.v3.oas.annotations.Operation; |
| 17 | 17 | import io.swagger.v3.oas.annotations.Parameter; |
| 18 | 18 | import io.swagger.v3.oas.annotations.tags.Tag; |
| 19 | +import jakarta.annotation.Resource; | |
| 20 | +import jakarta.servlet.http.HttpServletResponse; | |
| 21 | +import jakarta.validation.Valid; | |
| 19 | 22 | import org.springframework.security.access.prepost.PreAuthorize; |
| 20 | 23 | import org.springframework.validation.annotation.Validated; |
| 21 | 24 | import org.springframework.web.bind.annotation.*; |
| 22 | 25 | |
| 23 | -import jakarta.annotation.Resource; | |
| 24 | -import jakarta.servlet.http.HttpServletResponse; | |
| 25 | -import jakarta.validation.Valid; | |
| 26 | 26 | import java.io.IOException; |
| 27 | 27 | import java.util.List; |
| 28 | 28 | |
| 29 | +import static cn.iocoder.yudao.framework.apilog.core.enums.OperateTypeEnum.EXPORT; | |
| 29 | 30 | import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success; |
| 30 | -import static cn.iocoder.yudao.framework.operatelog.core.enums.OperateTypeEnum.EXPORT; | |
| 31 | 31 | |
| 32 | 32 | @Tag(name = "管理后台 - 字典数据") |
| 33 | 33 | @RestController |
| ... | ... | @@ -92,7 +92,7 @@ public class DictDataController { |
| 92 | 92 | @GetMapping("/export") |
| 93 | 93 | @Operation(summary = "导出字典数据") |
| 94 | 94 | @PreAuthorize("@ss.hasPermission('system:dict:export')") |
| 95 | - @OperateLog(type = EXPORT) | |
| 95 | + @ApiAccessLog(operateType = EXPORT) | |
| 96 | 96 | public void export(HttpServletResponse response, @Valid DictDataPageReqVO exportReqVO) throws IOException { |
| 97 | 97 | exportReqVO.setPageSize(PageParam.PAGE_SIZE_NONE); |
| 98 | 98 | List<DictDataDO> list = dictDataService.getDictDataPage(exportReqVO).getList(); | ... | ... |
yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/dict/DictTypeController.java
| 1 | 1 | package cn.iocoder.yudao.module.system.controller.admin.dict; |
| 2 | 2 | |
| 3 | +import cn.iocoder.yudao.framework.apilog.core.annotations.ApiAccessLog; | |
| 3 | 4 | import cn.iocoder.yudao.framework.common.pojo.CommonResult; |
| 4 | 5 | import cn.iocoder.yudao.framework.common.pojo.PageParam; |
| 5 | 6 | import cn.iocoder.yudao.framework.common.pojo.PageResult; |
| 6 | 7 | import cn.iocoder.yudao.framework.common.util.object.BeanUtils; |
| 7 | 8 | import cn.iocoder.yudao.framework.excel.core.util.ExcelUtils; |
| 8 | -import cn.iocoder.yudao.framework.operatelog.core.annotations.OperateLog; | |
| 9 | 9 | import cn.iocoder.yudao.module.system.controller.admin.dict.vo.type.DictTypePageReqVO; |
| 10 | 10 | import cn.iocoder.yudao.module.system.controller.admin.dict.vo.type.DictTypeRespVO; |
| 11 | 11 | import cn.iocoder.yudao.module.system.controller.admin.dict.vo.type.DictTypeSaveReqVO; |
| ... | ... | @@ -15,18 +15,18 @@ import cn.iocoder.yudao.module.system.service.dict.DictTypeService; |
| 15 | 15 | import io.swagger.v3.oas.annotations.Operation; |
| 16 | 16 | import io.swagger.v3.oas.annotations.Parameter; |
| 17 | 17 | import io.swagger.v3.oas.annotations.tags.Tag; |
| 18 | +import jakarta.annotation.Resource; | |
| 19 | +import jakarta.servlet.http.HttpServletResponse; | |
| 20 | +import jakarta.validation.Valid; | |
| 18 | 21 | import org.springframework.security.access.prepost.PreAuthorize; |
| 19 | 22 | import org.springframework.validation.annotation.Validated; |
| 20 | 23 | import org.springframework.web.bind.annotation.*; |
| 21 | 24 | |
| 22 | -import jakarta.annotation.Resource; | |
| 23 | -import jakarta.servlet.http.HttpServletResponse; | |
| 24 | -import jakarta.validation.Valid; | |
| 25 | 25 | import java.io.IOException; |
| 26 | 26 | import java.util.List; |
| 27 | 27 | |
| 28 | +import static cn.iocoder.yudao.framework.apilog.core.enums.OperateTypeEnum.EXPORT; | |
| 28 | 29 | import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success; |
| 29 | -import static cn.iocoder.yudao.framework.operatelog.core.enums.OperateTypeEnum.EXPORT; | |
| 30 | 30 | |
| 31 | 31 | @Tag(name = "管理后台 - 字典类型") |
| 32 | 32 | @RestController |
| ... | ... | @@ -90,7 +90,7 @@ public class DictTypeController { |
| 90 | 90 | @Operation(summary = "导出数据类型") |
| 91 | 91 | @GetMapping("/export") |
| 92 | 92 | @PreAuthorize("@ss.hasPermission('system:dict:query')") |
| 93 | - @OperateLog(type = EXPORT) | |
| 93 | + @ApiAccessLog(operateType = EXPORT) | |
| 94 | 94 | public void export(HttpServletResponse response, @Valid DictTypePageReqVO exportReqVO) throws IOException { |
| 95 | 95 | exportReqVO.setPageSize(PageParam.PAGE_SIZE_NONE); |
| 96 | 96 | List<DictTypeDO> list = dictTypeService.getDictTypePage(exportReqVO).getList(); | ... | ... |
yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/errorcode/ErrorCodeController.java
| 1 | 1 | package cn.iocoder.yudao.module.system.controller.admin.errorcode; |
| 2 | 2 | |
| 3 | +import cn.iocoder.yudao.framework.apilog.core.annotations.ApiAccessLog; | |
| 3 | 4 | import cn.iocoder.yudao.framework.common.pojo.CommonResult; |
| 4 | 5 | import cn.iocoder.yudao.framework.common.pojo.PageParam; |
| 5 | 6 | import cn.iocoder.yudao.framework.common.pojo.PageResult; |
| 6 | 7 | import cn.iocoder.yudao.framework.common.util.object.BeanUtils; |
| 7 | 8 | import cn.iocoder.yudao.framework.excel.core.util.ExcelUtils; |
| 8 | -import cn.iocoder.yudao.framework.operatelog.core.annotations.OperateLog; | |
| 9 | -import cn.iocoder.yudao.module.system.controller.admin.errorcode.vo.*; | |
| 9 | +import cn.iocoder.yudao.module.system.controller.admin.errorcode.vo.ErrorCodePageReqVO; | |
| 10 | +import cn.iocoder.yudao.module.system.controller.admin.errorcode.vo.ErrorCodeRespVO; | |
| 11 | +import cn.iocoder.yudao.module.system.controller.admin.errorcode.vo.ErrorCodeSaveReqVO; | |
| 10 | 12 | import cn.iocoder.yudao.module.system.dal.dataobject.errorcode.ErrorCodeDO; |
| 11 | 13 | import cn.iocoder.yudao.module.system.service.errorcode.ErrorCodeService; |
| 12 | -import io.swagger.v3.oas.annotations.tags.Tag; | |
| 13 | -import io.swagger.v3.oas.annotations.Parameter; | |
| 14 | 14 | import io.swagger.v3.oas.annotations.Operation; |
| 15 | +import io.swagger.v3.oas.annotations.Parameter; | |
| 16 | +import io.swagger.v3.oas.annotations.tags.Tag; | |
| 17 | +import jakarta.annotation.Resource; | |
| 18 | +import jakarta.servlet.http.HttpServletResponse; | |
| 19 | +import jakarta.validation.Valid; | |
| 15 | 20 | import org.springframework.security.access.prepost.PreAuthorize; |
| 16 | 21 | import org.springframework.validation.annotation.Validated; |
| 17 | 22 | import org.springframework.web.bind.annotation.*; |
| 18 | 23 | |
| 19 | -import jakarta.annotation.Resource; | |
| 20 | -import jakarta.servlet.http.HttpServletResponse; | |
| 21 | -import jakarta.validation.Valid; | |
| 22 | 24 | import java.io.IOException; |
| 23 | 25 | import java.util.List; |
| 24 | 26 | |
| 27 | +import static cn.iocoder.yudao.framework.apilog.core.enums.OperateTypeEnum.EXPORT; | |
| 25 | 28 | import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success; |
| 26 | -import static cn.iocoder.yudao.framework.operatelog.core.enums.OperateTypeEnum.EXPORT; | |
| 27 | 29 | |
| 28 | 30 | @Tag(name = "管理后台 - 错误码") |
| 29 | 31 | @RestController |
| ... | ... | @@ -78,7 +80,7 @@ public class ErrorCodeController { |
| 78 | 80 | @GetMapping("/export-excel") |
| 79 | 81 | @Operation(summary = "导出错误码 Excel") |
| 80 | 82 | @PreAuthorize("@ss.hasPermission('system:error-code:export')") |
| 81 | - @OperateLog(type = EXPORT) | |
| 83 | + @ApiAccessLog(operateType = EXPORT) | |
| 82 | 84 | public void exportErrorCodeExcel(@Valid ErrorCodePageReqVO exportReqVO, |
| 83 | 85 | HttpServletResponse response) throws IOException { |
| 84 | 86 | exportReqVO.setPageSize(PageParam.PAGE_SIZE_NONE); | ... | ... |
yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/logger/LoginLogController.java
| 1 | 1 | package cn.iocoder.yudao.module.system.controller.admin.logger; |
| 2 | 2 | |
| 3 | +import cn.iocoder.yudao.framework.apilog.core.annotations.ApiAccessLog; | |
| 3 | 4 | import cn.iocoder.yudao.framework.common.pojo.CommonResult; |
| 4 | 5 | import cn.iocoder.yudao.framework.common.pojo.PageParam; |
| 5 | 6 | import cn.iocoder.yudao.framework.common.pojo.PageResult; |
| 6 | 7 | import cn.iocoder.yudao.framework.common.util.object.BeanUtils; |
| 7 | 8 | import cn.iocoder.yudao.framework.excel.core.util.ExcelUtils; |
| 8 | -import cn.iocoder.yudao.framework.operatelog.core.annotations.OperateLog; | |
| 9 | 9 | import cn.iocoder.yudao.module.system.controller.admin.logger.vo.loginlog.LoginLogPageReqVO; |
| 10 | 10 | import cn.iocoder.yudao.module.system.controller.admin.logger.vo.loginlog.LoginLogRespVO; |
| 11 | 11 | import cn.iocoder.yudao.module.system.dal.dataobject.logger.LoginLogDO; |
| 12 | 12 | import cn.iocoder.yudao.module.system.service.logger.LoginLogService; |
| 13 | 13 | import io.swagger.v3.oas.annotations.Operation; |
| 14 | 14 | import io.swagger.v3.oas.annotations.tags.Tag; |
| 15 | +import jakarta.annotation.Resource; | |
| 16 | +import jakarta.servlet.http.HttpServletResponse; | |
| 17 | +import jakarta.validation.Valid; | |
| 15 | 18 | import org.springframework.security.access.prepost.PreAuthorize; |
| 16 | 19 | import org.springframework.validation.annotation.Validated; |
| 17 | 20 | import org.springframework.web.bind.annotation.GetMapping; |
| 18 | 21 | import org.springframework.web.bind.annotation.RequestMapping; |
| 19 | 22 | import org.springframework.web.bind.annotation.RestController; |
| 20 | 23 | |
| 21 | -import jakarta.annotation.Resource; | |
| 22 | -import jakarta.servlet.http.HttpServletResponse; | |
| 23 | -import jakarta.validation.Valid; | |
| 24 | 24 | import java.io.IOException; |
| 25 | 25 | import java.util.List; |
| 26 | 26 | |
| 27 | +import static cn.iocoder.yudao.framework.apilog.core.enums.OperateTypeEnum.EXPORT; | |
| 27 | 28 | import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success; |
| 28 | -import static cn.iocoder.yudao.framework.operatelog.core.enums.OperateTypeEnum.EXPORT; | |
| 29 | 29 | |
| 30 | 30 | @Tag(name = "管理后台 - 登录日志") |
| 31 | 31 | @RestController |
| ... | ... | @@ -47,7 +47,7 @@ public class LoginLogController { |
| 47 | 47 | @GetMapping("/export") |
| 48 | 48 | @Operation(summary = "导出登录日志 Excel") |
| 49 | 49 | @PreAuthorize("@ss.hasPermission('system:login-log:export')") |
| 50 | - @OperateLog(type = EXPORT) | |
| 50 | + @ApiAccessLog(operateType = EXPORT) | |
| 51 | 51 | public void exportLoginLog(HttpServletResponse response, @Valid LoginLogPageReqVO exportReqVO) throws IOException { |
| 52 | 52 | exportReqVO.setPageSize(PageParam.PAGE_SIZE_NONE); |
| 53 | 53 | List<LoginLogDO> list = loginLogService.getLoginLogPage(exportReqVO).getList(); | ... | ... |
yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/logger/OperateLogController.http
yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/logger/OperateLogController.java
| 1 | 1 | package cn.iocoder.yudao.module.system.controller.admin.logger; |
| 2 | 2 | |
| 3 | +import cn.iocoder.yudao.framework.apilog.core.annotations.ApiAccessLog; | |
| 3 | 4 | import cn.iocoder.yudao.framework.common.pojo.CommonResult; |
| 4 | 5 | import cn.iocoder.yudao.framework.common.pojo.PageParam; |
| 5 | 6 | import cn.iocoder.yudao.framework.common.pojo.PageResult; |
| 7 | +import cn.iocoder.yudao.framework.common.util.object.BeanUtils; | |
| 6 | 8 | import cn.iocoder.yudao.framework.excel.core.util.ExcelUtils; |
| 7 | -import cn.iocoder.yudao.framework.operatelog.core.annotations.OperateLog; | |
| 9 | +import cn.iocoder.yudao.framework.translate.core.TranslateUtils; | |
| 8 | 10 | import cn.iocoder.yudao.module.system.controller.admin.logger.vo.operatelog.OperateLogPageReqVO; |
| 9 | 11 | import cn.iocoder.yudao.module.system.controller.admin.logger.vo.operatelog.OperateLogRespVO; |
| 10 | -import cn.iocoder.yudao.module.system.convert.logger.OperateLogConvert; | |
| 11 | 12 | import cn.iocoder.yudao.module.system.dal.dataobject.logger.OperateLogDO; |
| 12 | -import cn.iocoder.yudao.module.system.dal.dataobject.user.AdminUserDO; | |
| 13 | 13 | import cn.iocoder.yudao.module.system.service.logger.OperateLogService; |
| 14 | -import cn.iocoder.yudao.module.system.service.user.AdminUserService; | |
| 15 | 14 | import io.swagger.v3.oas.annotations.Operation; |
| 16 | 15 | import io.swagger.v3.oas.annotations.tags.Tag; |
| 16 | +import jakarta.annotation.Resource; | |
| 17 | +import jakarta.servlet.http.HttpServletResponse; | |
| 18 | +import jakarta.validation.Valid; | |
| 17 | 19 | import org.springframework.security.access.prepost.PreAuthorize; |
| 18 | 20 | import org.springframework.validation.annotation.Validated; |
| 19 | 21 | import org.springframework.web.bind.annotation.GetMapping; |
| 20 | 22 | import org.springframework.web.bind.annotation.RequestMapping; |
| 21 | 23 | import org.springframework.web.bind.annotation.RestController; |
| 22 | 24 | |
| 23 | -import jakarta.annotation.Resource; | |
| 24 | -import jakarta.servlet.http.HttpServletResponse; | |
| 25 | -import jakarta.validation.Valid; | |
| 26 | 25 | import java.io.IOException; |
| 27 | 26 | import java.util.List; |
| 28 | -import java.util.Map; | |
| 29 | 27 | |
| 28 | +import static cn.iocoder.yudao.framework.apilog.core.enums.OperateTypeEnum.EXPORT; | |
| 30 | 29 | import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success; |
| 31 | -import static cn.iocoder.yudao.framework.common.util.collection.CollectionUtils.convertList; | |
| 32 | -import static cn.iocoder.yudao.framework.operatelog.core.enums.OperateTypeEnum.EXPORT; | |
| 33 | 30 | |
| 34 | 31 | @Tag(name = "管理后台 - 操作日志") |
| 35 | 32 | @RestController |
| ... | ... | @@ -39,33 +36,24 @@ public class OperateLogController { |
| 39 | 36 | |
| 40 | 37 | @Resource |
| 41 | 38 | private OperateLogService operateLogService; |
| 42 | - @Resource | |
| 43 | - private AdminUserService userService; | |
| 44 | 39 | |
| 45 | 40 | @GetMapping("/page") |
| 46 | 41 | @Operation(summary = "查看操作日志分页列表") |
| 47 | 42 | @PreAuthorize("@ss.hasPermission('system:operate-log:query')") |
| 48 | 43 | public CommonResult<PageResult<OperateLogRespVO>> pageOperateLog(@Valid OperateLogPageReqVO pageReqVO) { |
| 49 | 44 | PageResult<OperateLogDO> pageResult = operateLogService.getOperateLogPage(pageReqVO); |
| 50 | - // 获得拼接需要的数据 | |
| 51 | - Map<Long, AdminUserDO> userMap = userService.getUserMap( | |
| 52 | - convertList(pageResult.getList(), OperateLogDO::getUserId)); | |
| 53 | - return success(new PageResult<>(OperateLogConvert.INSTANCE.convertList(pageResult.getList(), userMap), | |
| 54 | - pageResult.getTotal())); | |
| 45 | + return success(BeanUtils.toBean(pageResult, OperateLogRespVO.class)); | |
| 55 | 46 | } |
| 56 | 47 | |
| 57 | 48 | @Operation(summary = "导出操作日志") |
| 58 | 49 | @GetMapping("/export") |
| 59 | 50 | @PreAuthorize("@ss.hasPermission('system:operate-log:export')") |
| 60 | - @OperateLog(type = EXPORT) | |
| 51 | + @ApiAccessLog(operateType = EXPORT) | |
| 61 | 52 | public void exportOperateLog(HttpServletResponse response, @Valid OperateLogPageReqVO exportReqVO) throws IOException { |
| 62 | 53 | exportReqVO.setPageSize(PageParam.PAGE_SIZE_NONE); |
| 63 | 54 | List<OperateLogDO> list = operateLogService.getOperateLogPage(exportReqVO).getList(); |
| 64 | - // 输出 | |
| 65 | - Map<Long, AdminUserDO> userMap = userService.getUserMap( | |
| 66 | - convertList(list, OperateLogDO::getUserId)); | |
| 67 | 55 | ExcelUtils.write(response, "操作日志.xls", "数据列表", OperateLogRespVO.class, |
| 68 | - OperateLogConvert.INSTANCE.convertList(list, userMap)); | |
| 56 | + TranslateUtils.translate(BeanUtils.toBean(list, OperateLogRespVO.class))); | |
| 69 | 57 | } |
| 70 | 58 | |
| 71 | 59 | } | ... | ... |
yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/logger/vo/operatelog/OperateLogPageReqVO.java
| ... | ... | @@ -13,20 +13,23 @@ import static cn.iocoder.yudao.framework.common.util.date.DateUtils.FORMAT_YEAR_ |
| 13 | 13 | @Data |
| 14 | 14 | public class OperateLogPageReqVO extends PageParam { |
| 15 | 15 | |
| 16 | - @Schema(description = "操作模块,模拟匹配", example = "订单") | |
| 17 | - private String module; | |
| 16 | + @Schema(description = "用户编号", example = "芋道") | |
| 17 | + private Long userId; | |
| 18 | + | |
| 19 | + @Schema(description = "操作模块业务编号", example = "1") | |
| 20 | + private Long bizId; | |
| 18 | 21 | |
| 19 | - @Schema(description = "用户昵称,模拟匹配", example = "芋道") | |
| 20 | - private String userNickname; | |
| 22 | + @Schema(description = "操作模块,模拟匹配", example = "订单") | |
| 23 | + private String type; | |
| 21 | 24 | |
| 22 | - @Schema(description = "操作分类,参见 OperateLogTypeEnum 枚举类", example = "1") | |
| 23 | - private Integer type; | |
| 25 | + @Schema(description = "操作名,模拟匹配", example = "创建订单") | |
| 26 | + private String subType; | |
| 24 | 27 | |
| 25 | - @Schema(description = "操作状态", example = "true") | |
| 26 | - private Boolean success; | |
| 28 | + @Schema(description = "操作明细,模拟匹配", example = "修改编号为 1 的用户信息") | |
| 29 | + private String action; | |
| 27 | 30 | |
| 28 | 31 | @Schema(description = "开始时间", example = "[2022-07-01 00:00:00,2022-07-01 23:59:59]") |
| 29 | 32 | @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND) |
| 30 | - private LocalDateTime[] startTime; | |
| 33 | + private LocalDateTime[] createTime; | |
| 31 | 34 | |
| 32 | 35 | } | ... | ... |
yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/logger/vo/operatelog/OperateLogRespVO.java
| 1 | 1 | package cn.iocoder.yudao.module.system.controller.admin.logger.vo.operatelog; |
| 2 | 2 | |
| 3 | -import cn.iocoder.yudao.framework.excel.core.annotations.DictFormat; | |
| 4 | -import cn.iocoder.yudao.framework.excel.core.convert.DictConvert; | |
| 5 | -import cn.iocoder.yudao.module.system.enums.DictTypeConstants; | |
| 3 | +import cn.iocoder.yudao.module.system.dal.dataobject.user.AdminUserDO; | |
| 6 | 4 | import com.alibaba.excel.annotation.ExcelIgnoreUnannotated; |
| 7 | 5 | import com.alibaba.excel.annotation.ExcelProperty; |
| 6 | +import com.fhs.core.trans.anno.Trans; | |
| 7 | +import com.fhs.core.trans.constant.TransType; | |
| 8 | +import com.fhs.core.trans.vo.VO; | |
| 8 | 9 | import io.swagger.v3.oas.annotations.media.Schema; |
| 10 | +import jakarta.validation.constraints.NotEmpty; | |
| 9 | 11 | import lombok.Data; |
| 10 | 12 | |
| 11 | -import jakarta.validation.constraints.NotEmpty; | |
| 12 | 13 | import java.time.LocalDateTime; |
| 13 | -import java.util.Map; | |
| 14 | 14 | |
| 15 | 15 | @Schema(description = "管理后台 - 操作日志 Response VO") |
| 16 | 16 | @Data |
| 17 | 17 | @ExcelIgnoreUnannotated |
| 18 | -public class OperateLogRespVO { | |
| 18 | +public class OperateLogRespVO implements VO { | |
| 19 | 19 | |
| 20 | 20 | @Schema(description = "日志编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "1024") |
| 21 | 21 | @ExcelProperty("日志编号") |
| ... | ... | @@ -25,30 +25,29 @@ public class OperateLogRespVO { |
| 25 | 25 | private String traceId; |
| 26 | 26 | |
| 27 | 27 | @Schema(description = "用户编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "1024") |
| 28 | + @Trans(type = TransType.SIMPLE, target = AdminUserDO.class, fields = "nickname", ref = "userName") | |
| 28 | 29 | private Long userId; |
| 29 | - | |
| 30 | 30 | @Schema(description = "用户昵称", requiredMode = Schema.RequiredMode.REQUIRED, example = "芋艿") |
| 31 | 31 | @ExcelProperty("操作人") |
| 32 | - private String userNickname; | |
| 32 | + private String userName; | |
| 33 | 33 | |
| 34 | - @Schema(description = "操作模块", requiredMode = Schema.RequiredMode.REQUIRED, example = "订单") | |
| 35 | - @ExcelProperty("操作模块") | |
| 36 | - private String module; | |
| 34 | + @Schema(description = "操作模块类型", requiredMode = Schema.RequiredMode.REQUIRED, example = "订单") | |
| 35 | + @ExcelProperty("操作模块类型") | |
| 36 | + private String type; | |
| 37 | 37 | |
| 38 | 38 | @Schema(description = "操作名", requiredMode = Schema.RequiredMode.REQUIRED, example = "创建订单") |
| 39 | 39 | @ExcelProperty("操作名") |
| 40 | - private String name; | |
| 40 | + private String subType; | |
| 41 | 41 | |
| 42 | - @Schema(description = "操作分类,参见 OperateLogTypeEnum 枚举类", requiredMode = Schema.RequiredMode.REQUIRED, example = "1") | |
| 43 | - @ExcelProperty(value = "操作类型", converter = DictConvert.class) | |
| 44 | - @DictFormat(DictTypeConstants.OPERATE_TYPE) | |
| 45 | - private Integer type; | |
| 42 | + @Schema(description = "操作模块业务编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "1") | |
| 43 | + @ExcelProperty("操作模块业务编号") | |
| 44 | + private Long bizId; | |
| 46 | 45 | |
| 47 | 46 | @Schema(description = "操作明细", example = "修改编号为 1 的用户信息,将性别从男改成女,将姓名从芋道改成源码。") |
| 48 | - private String content; | |
| 47 | + private String action; | |
| 49 | 48 | |
| 50 | 49 | @Schema(description = "拓展字段", example = "{'orderId': 1}") |
| 51 | - private Map<String, Object> exts; | |
| 50 | + private String extra; | |
| 52 | 51 | |
| 53 | 52 | @Schema(description = "请求方法名", requiredMode = Schema.RequiredMode.REQUIRED, example = "GET") |
| 54 | 53 | @NotEmpty(message = "请求方法名不能为空") |
| ... | ... | @@ -63,28 +62,7 @@ public class OperateLogRespVO { |
| 63 | 62 | @Schema(description = "浏览器 UserAgent", requiredMode = Schema.RequiredMode.REQUIRED, example = "Mozilla/5.0") |
| 64 | 63 | private String userAgent; |
| 65 | 64 | |
| 66 | - @Schema(description = "Java 方法名", requiredMode = Schema.RequiredMode.REQUIRED, example = "cn.iocoder.yudao.adminserver.UserController.save(...)") | |
| 67 | - private String javaMethod; | |
| 68 | - | |
| 69 | - @Schema(description = "Java 方法的参数") | |
| 70 | - private String javaMethodArgs; | |
| 71 | - | |
| 72 | - @Schema(description = "开始时间", requiredMode = Schema.RequiredMode.REQUIRED) | |
| 73 | - @ExcelProperty("操作日志") | |
| 74 | - private LocalDateTime startTime; | |
| 75 | - | |
| 76 | - @Schema(description = "执行时长,单位:毫秒", requiredMode = Schema.RequiredMode.REQUIRED) | |
| 77 | - @ExcelProperty("执行时长") | |
| 78 | - private Integer duration; | |
| 79 | - | |
| 80 | - @Schema(description = "结果码", requiredMode = Schema.RequiredMode.REQUIRED) | |
| 81 | - @ExcelProperty(value = "结果码") | |
| 82 | - private Integer resultCode; | |
| 83 | - | |
| 84 | - @Schema(description = "结果提示") | |
| 85 | - private String resultMsg; | |
| 86 | - | |
| 87 | - @Schema(description = "结果数据") | |
| 88 | - private String resultData; | |
| 65 | + @Schema(description = "创建时间", requiredMode = Schema.RequiredMode.REQUIRED) | |
| 66 | + private LocalDateTime createTime; | |
| 89 | 67 | |
| 90 | 68 | } | ... | ... |
yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/notify/NotifyMessageController.java
| 1 | 1 | package cn.iocoder.yudao.module.system.controller.admin.notify; |
| 2 | 2 | |
| 3 | +import cn.iocoder.yudao.framework.apilog.core.annotations.ApiAccessLog; | |
| 3 | 4 | import cn.iocoder.yudao.framework.common.enums.UserTypeEnum; |
| 4 | 5 | import cn.iocoder.yudao.framework.common.pojo.CommonResult; |
| 5 | 6 | import cn.iocoder.yudao.framework.common.pojo.PageResult; |
| ... | ... | @@ -88,6 +89,7 @@ public class NotifyMessageController { |
| 88 | 89 | |
| 89 | 90 | @GetMapping("/get-unread-count") |
| 90 | 91 | @Operation(summary = "获得当前用户的未读站内信数量") |
| 92 | + @ApiAccessLog(enable = false) // 由于前端会不断轮询该接口,记录日志没有意义 | |
| 91 | 93 | public CommonResult<Long> getUnreadNotifyMessageCount() { |
| 92 | 94 | return success(notifyMessageService.getUnreadNotifyMessageCount( |
| 93 | 95 | getLoginUserId(), UserTypeEnum.ADMIN.getValue())); | ... | ... |
yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/oauth2/OAuth2OpenController.java
| ... | ... | @@ -8,7 +8,6 @@ import cn.iocoder.yudao.framework.common.enums.UserTypeEnum; |
| 8 | 8 | import cn.iocoder.yudao.framework.common.pojo.CommonResult; |
| 9 | 9 | import cn.iocoder.yudao.framework.common.util.http.HttpUtils; |
| 10 | 10 | import cn.iocoder.yudao.framework.common.util.json.JsonUtils; |
| 11 | -import cn.iocoder.yudao.framework.operatelog.core.annotations.OperateLog; | |
| 12 | 11 | import cn.iocoder.yudao.module.system.controller.admin.oauth2.vo.open.OAuth2OpenAccessTokenRespVO; |
| 13 | 12 | import cn.iocoder.yudao.module.system.controller.admin.oauth2.vo.open.OAuth2OpenAuthorizeInfoRespVO; |
| 14 | 13 | import cn.iocoder.yudao.module.system.controller.admin.oauth2.vo.open.OAuth2OpenCheckTokenRespVO; |
| ... | ... | @@ -95,7 +94,6 @@ public class OAuth2OpenController { |
| 95 | 94 | @Parameter(name = "scope", example = "user_info"), |
| 96 | 95 | @Parameter(name = "refresh_token", example = "123424233"), |
| 97 | 96 | }) |
| 98 | - @OperateLog(enable = false) // 避免 Post 请求被记录操作日志 | |
| 99 | 97 | public CommonResult<OAuth2OpenAccessTokenRespVO> postAccessToken(HttpServletRequest request, |
| 100 | 98 | @RequestParam("grant_type") String grantType, |
| 101 | 99 | @RequestParam(value = "code", required = false) String code, // 授权码模式 |
| ... | ... | @@ -146,7 +144,6 @@ public class OAuth2OpenController { |
| 146 | 144 | @PermitAll |
| 147 | 145 | @Operation(summary = "删除访问令牌") |
| 148 | 146 | @Parameter(name = "token", required = true, description = "访问令牌", example = "biu") |
| 149 | - @OperateLog(enable = false) // 避免 Post 请求被记录操作日志 | |
| 150 | 147 | public CommonResult<Boolean> revokeToken(HttpServletRequest request, |
| 151 | 148 | @RequestParam("token") String token) { |
| 152 | 149 | // 校验客户端 |
| ... | ... | @@ -165,7 +162,6 @@ public class OAuth2OpenController { |
| 165 | 162 | @PermitAll |
| 166 | 163 | @Operation(summary = "校验访问令牌") |
| 167 | 164 | @Parameter(name = "token", required = true, description = "访问令牌", example = "biu") |
| 168 | - @OperateLog(enable = false) // 避免 Post 请求被记录操作日志 | |
| 169 | 165 | public CommonResult<OAuth2OpenCheckTokenRespVO> checkToken(HttpServletRequest request, |
| 170 | 166 | @RequestParam("token") String token) { |
| 171 | 167 | // 校验客户端 |
| ... | ... | @@ -216,7 +212,6 @@ public class OAuth2OpenController { |
| 216 | 212 | @Parameter(name = "auto_approve", required = true, description = "用户是否接受", example = "true"), |
| 217 | 213 | @Parameter(name = "state", example = "1") |
| 218 | 214 | }) |
| 219 | - @OperateLog(enable = false) // 避免 Post 请求被记录操作日志 | |
| 220 | 215 | public CommonResult<String> approveOrDeny(@RequestParam("response_type") String responseType, |
| 221 | 216 | @RequestParam("client_id") String clientId, |
| 222 | 217 | @RequestParam(value = "scope", required = false) String scope, | ... | ... |
yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/permission/RoleController.java
| 1 | 1 | package cn.iocoder.yudao.module.system.controller.admin.permission; |
| 2 | 2 | |
| 3 | +import cn.iocoder.yudao.framework.apilog.core.annotations.ApiAccessLog; | |
| 3 | 4 | import cn.iocoder.yudao.framework.common.enums.CommonStatusEnum; |
| 4 | 5 | import cn.iocoder.yudao.framework.common.pojo.CommonResult; |
| 5 | 6 | import cn.iocoder.yudao.framework.common.pojo.PageParam; |
| 6 | 7 | import cn.iocoder.yudao.framework.common.pojo.PageResult; |
| 7 | 8 | import cn.iocoder.yudao.framework.common.util.object.BeanUtils; |
| 8 | 9 | import cn.iocoder.yudao.framework.excel.core.util.ExcelUtils; |
| 9 | -import cn.iocoder.yudao.framework.operatelog.core.annotations.OperateLog; | |
| 10 | 10 | import cn.iocoder.yudao.module.system.controller.admin.permission.vo.role.*; |
| 11 | 11 | import cn.iocoder.yudao.module.system.dal.dataobject.permission.RoleDO; |
| 12 | 12 | import cn.iocoder.yudao.module.system.service.permission.RoleService; |
| 13 | 13 | import io.swagger.v3.oas.annotations.Operation; |
| 14 | 14 | import io.swagger.v3.oas.annotations.Parameter; |
| 15 | 15 | import io.swagger.v3.oas.annotations.tags.Tag; |
| 16 | +import jakarta.annotation.Resource; | |
| 17 | +import jakarta.servlet.http.HttpServletResponse; | |
| 18 | +import jakarta.validation.Valid; | |
| 16 | 19 | import org.springframework.security.access.prepost.PreAuthorize; |
| 17 | 20 | import org.springframework.validation.annotation.Validated; |
| 18 | 21 | import org.springframework.web.bind.annotation.*; |
| 19 | 22 | |
| 20 | -import jakarta.annotation.Resource; | |
| 21 | -import jakarta.servlet.http.HttpServletResponse; | |
| 22 | -import jakarta.validation.Valid; | |
| 23 | 23 | import java.io.IOException; |
| 24 | 24 | import java.util.Comparator; |
| 25 | 25 | import java.util.List; |
| 26 | 26 | |
| 27 | +import static cn.iocoder.yudao.framework.apilog.core.enums.OperateTypeEnum.EXPORT; | |
| 27 | 28 | import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success; |
| 28 | -import static cn.iocoder.yudao.framework.operatelog.core.enums.OperateTypeEnum.EXPORT; | |
| 29 | 29 | import static java.util.Collections.singleton; |
| 30 | 30 | |
| 31 | 31 | @Tag(name = "管理后台 - 角色") |
| ... | ... | @@ -52,14 +52,6 @@ public class RoleController { |
| 52 | 52 | return success(true); |
| 53 | 53 | } |
| 54 | 54 | |
| 55 | - @PutMapping("/update-status") | |
| 56 | - @Operation(summary = "修改角色状态") | |
| 57 | - @PreAuthorize("@ss.hasPermission('system:role:update')") | |
| 58 | - public CommonResult<Boolean> updateRoleStatus(@Valid @RequestBody RoleUpdateStatusReqVO reqVO) { | |
| 59 | - roleService.updateRoleStatus(reqVO.getId(), reqVO.getStatus()); | |
| 60 | - return success(true); | |
| 61 | - } | |
| 62 | - | |
| 63 | 55 | @DeleteMapping("/delete") |
| 64 | 56 | @Operation(summary = "删除角色") |
| 65 | 57 | @Parameter(name = "id", description = "角色编号", required = true, example = "1024") |
| ... | ... | @@ -87,15 +79,15 @@ public class RoleController { |
| 87 | 79 | |
| 88 | 80 | @GetMapping({"/list-all-simple", "/simple-list"}) |
| 89 | 81 | @Operation(summary = "获取角色精简信息列表", description = "只包含被开启的角色,主要用于前端的下拉选项") |
| 90 | - public CommonResult<List<RoleSimpleRespVO>> getSimpleRoleList() { | |
| 82 | + public CommonResult<List<RoleRespVO>> getSimpleRoleList() { | |
| 91 | 83 | List<RoleDO> list = roleService.getRoleListByStatus(singleton(CommonStatusEnum.ENABLE.getStatus())); |
| 92 | 84 | list.sort(Comparator.comparing(RoleDO::getSort)); |
| 93 | - return success(BeanUtils.toBean(list, RoleSimpleRespVO.class)); | |
| 85 | + return success(BeanUtils.toBean(list, RoleRespVO.class)); | |
| 94 | 86 | } |
| 95 | 87 | |
| 96 | 88 | @GetMapping("/export-excel") |
| 97 | 89 | @Operation(summary = "导出角色 Excel") |
| 98 | - @OperateLog(type = EXPORT) | |
| 90 | + @ApiAccessLog(operateType = EXPORT) | |
| 99 | 91 | @PreAuthorize("@ss.hasPermission('system:role:export')") |
| 100 | 92 | public void export(HttpServletResponse response, @Validated RolePageReqVO exportReqVO) throws IOException { |
| 101 | 93 | exportReqVO.setPageSize(PageParam.PAGE_SIZE_NONE); | ... | ... |
yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/permission/vo/role/RoleSaveReqVO.java
| 1 | 1 | package cn.iocoder.yudao.module.system.controller.admin.permission.vo.role; |
| 2 | 2 | |
| 3 | +import com.mzt.logapi.starter.annotation.DiffLogField; | |
| 3 | 4 | import io.swagger.v3.oas.annotations.media.Schema; |
| 4 | 5 | import lombok.Data; |
| 5 | 6 | |
| ... | ... | @@ -7,7 +8,7 @@ import jakarta.validation.constraints.NotBlank; |
| 7 | 8 | import jakarta.validation.constraints.NotNull; |
| 8 | 9 | import jakarta.validation.constraints.Size; |
| 9 | 10 | |
| 10 | -@Schema(description = "管理后台 - 角色创建 Request VO") | |
| 11 | +@Schema(description = "管理后台 - 角色创建/更新 Request VO") | |
| 11 | 12 | @Data |
| 12 | 13 | public class RoleSaveReqVO { |
| 13 | 14 | |
| ... | ... | @@ -16,19 +17,23 @@ public class RoleSaveReqVO { |
| 16 | 17 | |
| 17 | 18 | @Schema(description = "角色名称", requiredMode = Schema.RequiredMode.REQUIRED, example = "管理员") |
| 18 | 19 | @NotBlank(message = "角色名称不能为空") |
| 19 | - @Size(max = 30, message = "角色名称长度不能超过30个字符") | |
| 20 | + @Size(max = 30, message = "角色名称长度不能超过 30 个字符") | |
| 21 | + @DiffLogField(name = "角色名称") | |
| 20 | 22 | private String name; |
| 21 | 23 | |
| 22 | 24 | @NotBlank(message = "角色标志不能为空") |
| 23 | - @Size(max = 100, message = "角色标志长度不能超过100个字符") | |
| 25 | + @Size(max = 100, message = "角色标志长度不能超过 100 个字符") | |
| 24 | 26 | @Schema(description = "角色编码", requiredMode = Schema.RequiredMode.REQUIRED, example = "ADMIN") |
| 27 | + @DiffLogField(name = "角色标志") | |
| 25 | 28 | private String code; |
| 26 | 29 | |
| 27 | 30 | @Schema(description = "显示顺序不能为空", requiredMode = Schema.RequiredMode.REQUIRED, example = "1024") |
| 28 | 31 | @NotNull(message = "显示顺序不能为空") |
| 32 | + @DiffLogField(name = "显示顺序") | |
| 29 | 33 | private Integer sort; |
| 30 | 34 | |
| 31 | 35 | @Schema(description = "备注", example = "我是一个角色") |
| 36 | + @DiffLogField(name = "备注") | |
| 32 | 37 | private String remark; |
| 33 | 38 | |
| 34 | 39 | } | ... | ... |
yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/permission/vo/role/RoleUpdateStatusReqVO.java deleted
| 1 | -package cn.iocoder.yudao.module.system.controller.admin.permission.vo.role; | |
| 2 | - | |
| 3 | -import cn.iocoder.yudao.framework.common.enums.CommonStatusEnum; | |
| 4 | -import cn.iocoder.yudao.framework.common.validation.InEnum; | |
| 5 | -import io.swagger.v3.oas.annotations.media.Schema; | |
| 6 | -import lombok.Data; | |
| 7 | - | |
| 8 | -import jakarta.validation.constraints.NotNull; | |
| 9 | - | |
| 10 | -@Schema(description = "管理后台 - 角色更新状态 Request VO") | |
| 11 | -@Data | |
| 12 | -public class RoleUpdateStatusReqVO { | |
| 13 | - | |
| 14 | - @Schema(description = "角色编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "1024") | |
| 15 | - @NotNull(message = "角色编号不能为空") | |
| 16 | - private Long id; | |
| 17 | - | |
| 18 | - @Schema(description = "状态,见 CommonStatusEnum 枚举", requiredMode = Schema.RequiredMode.REQUIRED, example = "1") | |
| 19 | - @NotNull(message = "状态不能为空") | |
| 20 | - @InEnum(value = CommonStatusEnum.class, message = "修改状态必须是 {value}") | |
| 21 | - private Integer status; | |
| 22 | - | |
| 23 | -} |
yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/sensitiveword/SensitiveWordController.java
| 1 | 1 | package cn.iocoder.yudao.module.system.controller.admin.sensitiveword; |
| 2 | 2 | |
| 3 | +import cn.iocoder.yudao.framework.apilog.core.annotations.ApiAccessLog; | |
| 3 | 4 | import cn.iocoder.yudao.framework.common.pojo.CommonResult; |
| 4 | 5 | import cn.iocoder.yudao.framework.common.pojo.PageParam; |
| 5 | 6 | import cn.iocoder.yudao.framework.common.pojo.PageResult; |
| 6 | 7 | import cn.iocoder.yudao.framework.common.util.object.BeanUtils; |
| 7 | 8 | import cn.iocoder.yudao.framework.excel.core.util.ExcelUtils; |
| 8 | -import cn.iocoder.yudao.framework.operatelog.core.annotations.OperateLog; | |
| 9 | 9 | import cn.iocoder.yudao.module.system.controller.admin.sensitiveword.vo.SensitiveWordPageReqVO; |
| 10 | 10 | import cn.iocoder.yudao.module.system.controller.admin.sensitiveword.vo.SensitiveWordRespVO; |
| 11 | 11 | import cn.iocoder.yudao.module.system.controller.admin.sensitiveword.vo.SensitiveWordSaveVO; |
| ... | ... | @@ -14,19 +14,19 @@ import cn.iocoder.yudao.module.system.service.sensitiveword.SensitiveWordService |
| 14 | 14 | import io.swagger.v3.oas.annotations.Operation; |
| 15 | 15 | import io.swagger.v3.oas.annotations.Parameter; |
| 16 | 16 | import io.swagger.v3.oas.annotations.tags.Tag; |
| 17 | +import jakarta.annotation.Resource; | |
| 18 | +import jakarta.servlet.http.HttpServletResponse; | |
| 19 | +import jakarta.validation.Valid; | |
| 17 | 20 | import org.springframework.security.access.prepost.PreAuthorize; |
| 18 | 21 | import org.springframework.validation.annotation.Validated; |
| 19 | 22 | import org.springframework.web.bind.annotation.*; |
| 20 | 23 | |
| 21 | -import jakarta.annotation.Resource; | |
| 22 | -import jakarta.servlet.http.HttpServletResponse; | |
| 23 | -import jakarta.validation.Valid; | |
| 24 | 24 | import java.io.IOException; |
| 25 | 25 | import java.util.List; |
| 26 | 26 | import java.util.Set; |
| 27 | 27 | |
| 28 | +import static cn.iocoder.yudao.framework.apilog.core.enums.OperateTypeEnum.EXPORT; | |
| 28 | 29 | import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success; |
| 29 | -import static cn.iocoder.yudao.framework.operatelog.core.enums.OperateTypeEnum.EXPORT; | |
| 30 | 30 | |
| 31 | 31 | @Tag(name = "管理后台 - 敏感词") |
| 32 | 32 | @RestController |
| ... | ... | @@ -81,7 +81,7 @@ public class SensitiveWordController { |
| 81 | 81 | @GetMapping("/export-excel") |
| 82 | 82 | @Operation(summary = "导出敏感词 Excel") |
| 83 | 83 | @PreAuthorize("@ss.hasPermission('system:sensitive-word:export')") |
| 84 | - @OperateLog(type = EXPORT) | |
| 84 | + @ApiAccessLog(operateType = EXPORT) | |
| 85 | 85 | public void exportSensitiveWordExcel(@Valid SensitiveWordPageReqVO exportReqVO, |
| 86 | 86 | HttpServletResponse response) throws IOException { |
| 87 | 87 | exportReqVO.setPageSize(PageParam.PAGE_SIZE_NONE); | ... | ... |
yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/sms/SmsCallbackController.java
| ... | ... | @@ -2,7 +2,6 @@ package cn.iocoder.yudao.module.system.controller.admin.sms; |
| 2 | 2 | |
| 3 | 3 | import cn.iocoder.yudao.framework.common.pojo.CommonResult; |
| 4 | 4 | import cn.iocoder.yudao.framework.common.util.servlet.ServletUtils; |
| 5 | -import cn.iocoder.yudao.framework.operatelog.core.annotations.OperateLog; | |
| 6 | 5 | import cn.iocoder.yudao.module.system.framework.sms.core.enums.SmsChannelEnum; |
| 7 | 6 | import cn.iocoder.yudao.module.system.service.sms.SmsSendService; |
| 8 | 7 | import io.swagger.v3.oas.annotations.Operation; |
| ... | ... | @@ -28,7 +27,6 @@ public class SmsCallbackController { |
| 28 | 27 | @PostMapping("/aliyun") |
| 29 | 28 | @PermitAll |
| 30 | 29 | @Operation(summary = "阿里云短信的回调", description = "参见 https://help.aliyun.com/document_detail/120998.html 文档") |
| 31 | - @OperateLog(enable = false) | |
| 32 | 30 | public CommonResult<Boolean> receiveAliyunSmsStatus(HttpServletRequest request) throws Throwable { |
| 33 | 31 | String text = ServletUtils.getBody(request); |
| 34 | 32 | smsSendService.receiveSmsStatus(SmsChannelEnum.ALIYUN.getCode(), text); |
| ... | ... | @@ -38,7 +36,6 @@ public class SmsCallbackController { |
| 38 | 36 | @PostMapping("/tencent") |
| 39 | 37 | @PermitAll |
| 40 | 38 | @Operation(summary = "腾讯云短信的回调", description = "参见 https://cloud.tencent.com/document/product/382/52077 文档") |
| 41 | - @OperateLog(enable = false) | |
| 42 | 39 | public CommonResult<Boolean> receiveTencentSmsStatus(HttpServletRequest request) throws Throwable { |
| 43 | 40 | String text = ServletUtils.getBody(request); |
| 44 | 41 | smsSendService.receiveSmsStatus(SmsChannelEnum.TENCENT.getCode(), text); | ... | ... |
yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/sms/SmsLogController.java
| 1 | 1 | package cn.iocoder.yudao.module.system.controller.admin.sms; |
| 2 | 2 | |
| 3 | +import cn.iocoder.yudao.framework.apilog.core.annotations.ApiAccessLog; | |
| 3 | 4 | import cn.iocoder.yudao.framework.common.pojo.CommonResult; |
| 4 | 5 | import cn.iocoder.yudao.framework.common.pojo.PageParam; |
| 5 | 6 | import cn.iocoder.yudao.framework.common.pojo.PageResult; |
| 6 | 7 | import cn.iocoder.yudao.framework.common.util.object.BeanUtils; |
| 7 | 8 | import cn.iocoder.yudao.framework.excel.core.util.ExcelUtils; |
| 8 | -import cn.iocoder.yudao.framework.operatelog.core.annotations.OperateLog; | |
| 9 | 9 | import cn.iocoder.yudao.module.system.controller.admin.sms.vo.log.SmsLogPageReqVO; |
| 10 | 10 | import cn.iocoder.yudao.module.system.controller.admin.sms.vo.log.SmsLogRespVO; |
| 11 | 11 | import cn.iocoder.yudao.module.system.dal.dataobject.sms.SmsLogDO; |
| 12 | 12 | import cn.iocoder.yudao.module.system.service.sms.SmsLogService; |
| 13 | 13 | import io.swagger.v3.oas.annotations.Operation; |
| 14 | 14 | import io.swagger.v3.oas.annotations.tags.Tag; |
| 15 | +import jakarta.annotation.Resource; | |
| 16 | +import jakarta.servlet.http.HttpServletResponse; | |
| 17 | +import jakarta.validation.Valid; | |
| 15 | 18 | import org.springframework.security.access.prepost.PreAuthorize; |
| 16 | 19 | import org.springframework.validation.annotation.Validated; |
| 17 | 20 | import org.springframework.web.bind.annotation.GetMapping; |
| 18 | 21 | import org.springframework.web.bind.annotation.RequestMapping; |
| 19 | 22 | import org.springframework.web.bind.annotation.RestController; |
| 20 | 23 | |
| 21 | -import jakarta.annotation.Resource; | |
| 22 | -import jakarta.servlet.http.HttpServletResponse; | |
| 23 | -import jakarta.validation.Valid; | |
| 24 | 24 | import java.io.IOException; |
| 25 | 25 | import java.util.List; |
| 26 | 26 | |
| 27 | +import static cn.iocoder.yudao.framework.apilog.core.enums.OperateTypeEnum.EXPORT; | |
| 27 | 28 | import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success; |
| 28 | -import static cn.iocoder.yudao.framework.operatelog.core.enums.OperateTypeEnum.EXPORT; | |
| 29 | 29 | |
| 30 | 30 | @Tag(name = "管理后台 - 短信日志") |
| 31 | 31 | @RestController |
| ... | ... | @@ -47,7 +47,7 @@ public class SmsLogController { |
| 47 | 47 | @GetMapping("/export-excel") |
| 48 | 48 | @Operation(summary = "导出短信日志 Excel") |
| 49 | 49 | @PreAuthorize("@ss.hasPermission('system:sms-log:export')") |
| 50 | - @OperateLog(type = EXPORT) | |
| 50 | + @ApiAccessLog(operateType = EXPORT) | |
| 51 | 51 | public void exportSmsLogExcel(@Valid SmsLogPageReqVO exportReqVO, |
| 52 | 52 | HttpServletResponse response) throws IOException { |
| 53 | 53 | exportReqVO.setPageSize(PageParam.PAGE_SIZE_NONE); | ... | ... |
yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/sms/SmsTemplateController.java
| 1 | 1 | package cn.iocoder.yudao.module.system.controller.admin.sms; |
| 2 | 2 | |
| 3 | +import cn.iocoder.yudao.framework.apilog.core.annotations.ApiAccessLog; | |
| 3 | 4 | import cn.iocoder.yudao.framework.common.pojo.PageParam; |
| 4 | 5 | import cn.iocoder.yudao.framework.common.util.object.BeanUtils; |
| 5 | 6 | import cn.iocoder.yudao.module.system.controller.admin.sms.vo.template.*; |
| ... | ... | @@ -9,7 +10,6 @@ import cn.iocoder.yudao.module.system.service.sms.SmsSendService; |
| 9 | 10 | import cn.iocoder.yudao.framework.common.pojo.CommonResult; |
| 10 | 11 | import cn.iocoder.yudao.framework.common.pojo.PageResult; |
| 11 | 12 | import cn.iocoder.yudao.framework.excel.core.util.ExcelUtils; |
| 12 | -import cn.iocoder.yudao.framework.operatelog.core.annotations.OperateLog; | |
| 13 | 13 | import io.swagger.v3.oas.annotations.tags.Tag; |
| 14 | 14 | import io.swagger.v3.oas.annotations.Parameter; |
| 15 | 15 | import io.swagger.v3.oas.annotations.Operation; |
| ... | ... | @@ -22,8 +22,8 @@ import jakarta.validation.Valid; |
| 22 | 22 | import java.io.IOException; |
| 23 | 23 | import java.util.List; |
| 24 | 24 | |
| 25 | +import static cn.iocoder.yudao.framework.apilog.core.enums.OperateTypeEnum.EXPORT; | |
| 25 | 26 | import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success; |
| 26 | -import static cn.iocoder.yudao.framework.operatelog.core.enums.OperateTypeEnum.EXPORT; | |
| 27 | 27 | |
| 28 | 28 | @Tag(name = "管理后台 - 短信模板") |
| 29 | 29 | @RestController |
| ... | ... | @@ -79,7 +79,7 @@ public class SmsTemplateController { |
| 79 | 79 | @GetMapping("/export-excel") |
| 80 | 80 | @Operation(summary = "导出短信模板 Excel") |
| 81 | 81 | @PreAuthorize("@ss.hasPermission('system:sms-template:export')") |
| 82 | - @OperateLog(type = EXPORT) | |
| 82 | + @ApiAccessLog(operateType = EXPORT) | |
| 83 | 83 | public void exportSmsTemplateExcel(@Valid SmsTemplatePageReqVO exportReqVO, |
| 84 | 84 | HttpServletResponse response) throws IOException { |
| 85 | 85 | exportReqVO.setPageSize(PageParam.PAGE_SIZE_NONE); | ... | ... |
yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/tenant/TenantController.java
| 1 | 1 | package cn.iocoder.yudao.module.system.controller.admin.tenant; |
| 2 | 2 | |
| 3 | +import cn.iocoder.yudao.framework.apilog.core.annotations.ApiAccessLog; | |
| 3 | 4 | import cn.iocoder.yudao.framework.common.pojo.CommonResult; |
| 4 | 5 | import cn.iocoder.yudao.framework.common.pojo.PageParam; |
| 5 | 6 | import cn.iocoder.yudao.framework.common.pojo.PageResult; |
| 6 | 7 | import cn.iocoder.yudao.framework.common.util.object.BeanUtils; |
| 7 | 8 | import cn.iocoder.yudao.framework.excel.core.util.ExcelUtils; |
| 8 | -import cn.iocoder.yudao.framework.operatelog.core.annotations.OperateLog; | |
| 9 | 9 | import cn.iocoder.yudao.module.system.controller.admin.tenant.vo.tenant.TenantPageReqVO; |
| 10 | 10 | import cn.iocoder.yudao.module.system.controller.admin.tenant.vo.tenant.TenantRespVO; |
| 11 | 11 | import cn.iocoder.yudao.module.system.controller.admin.tenant.vo.tenant.TenantSaveReqVO; |
| ... | ... | @@ -15,18 +15,18 @@ import cn.iocoder.yudao.module.system.service.tenant.TenantService; |
| 15 | 15 | import io.swagger.v3.oas.annotations.Operation; |
| 16 | 16 | import io.swagger.v3.oas.annotations.Parameter; |
| 17 | 17 | import io.swagger.v3.oas.annotations.tags.Tag; |
| 18 | -import org.springframework.security.access.prepost.PreAuthorize; | |
| 19 | -import org.springframework.web.bind.annotation.*; | |
| 20 | - | |
| 21 | 18 | import jakarta.annotation.Resource; |
| 22 | 19 | import jakarta.annotation.security.PermitAll; |
| 23 | 20 | import jakarta.servlet.http.HttpServletResponse; |
| 24 | 21 | import jakarta.validation.Valid; |
| 22 | +import org.springframework.security.access.prepost.PreAuthorize; | |
| 23 | +import org.springframework.web.bind.annotation.*; | |
| 24 | + | |
| 25 | 25 | import java.io.IOException; |
| 26 | 26 | import java.util.List; |
| 27 | 27 | |
| 28 | +import static cn.iocoder.yudao.framework.apilog.core.enums.OperateTypeEnum.EXPORT; | |
| 28 | 29 | import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success; |
| 29 | -import static cn.iocoder.yudao.framework.operatelog.core.enums.OperateTypeEnum.EXPORT; | |
| 30 | 30 | |
| 31 | 31 | @Tag(name = "管理后台 - 租户") |
| 32 | 32 | @RestController |
| ... | ... | @@ -98,7 +98,7 @@ public class TenantController { |
| 98 | 98 | @GetMapping("/export-excel") |
| 99 | 99 | @Operation(summary = "导出租户 Excel") |
| 100 | 100 | @PreAuthorize("@ss.hasPermission('system:tenant:export')") |
| 101 | - @OperateLog(type = EXPORT) | |
| 101 | + @ApiAccessLog(operateType = EXPORT) | |
| 102 | 102 | public void exportTenantExcel(@Valid TenantPageReqVO exportReqVO, |
| 103 | 103 | HttpServletResponse response) throws IOException { |
| 104 | 104 | exportReqVO.setPageSize(PageParam.PAGE_SIZE_NONE); | ... | ... |
yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/user/UserController.java
| 1 | 1 | package cn.iocoder.yudao.module.system.controller.admin.user; |
| 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.enums.CommonStatusEnum; |
| 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; |
| 8 | 9 | import cn.iocoder.yudao.framework.excel.core.util.ExcelUtils; |
| 9 | -import cn.iocoder.yudao.framework.operatelog.core.annotations.OperateLog; | |
| 10 | 10 | import cn.iocoder.yudao.module.system.controller.admin.user.vo.user.*; |
| 11 | 11 | import cn.iocoder.yudao.module.system.convert.user.UserConvert; |
| 12 | 12 | import cn.iocoder.yudao.module.system.dal.dataobject.dept.DeptDO; |
| ... | ... | @@ -18,22 +18,22 @@ import io.swagger.v3.oas.annotations.Operation; |
| 18 | 18 | import io.swagger.v3.oas.annotations.Parameter; |
| 19 | 19 | import io.swagger.v3.oas.annotations.Parameters; |
| 20 | 20 | import io.swagger.v3.oas.annotations.tags.Tag; |
| 21 | +import jakarta.annotation.Resource; | |
| 22 | +import jakarta.servlet.http.HttpServletResponse; | |
| 23 | +import jakarta.validation.Valid; | |
| 21 | 24 | import org.springframework.security.access.prepost.PreAuthorize; |
| 22 | 25 | import org.springframework.validation.annotation.Validated; |
| 23 | 26 | import org.springframework.web.bind.annotation.*; |
| 24 | 27 | import org.springframework.web.multipart.MultipartFile; |
| 25 | 28 | |
| 26 | -import jakarta.annotation.Resource; | |
| 27 | -import jakarta.servlet.http.HttpServletResponse; | |
| 28 | -import jakarta.validation.Valid; | |
| 29 | 29 | import java.io.IOException; |
| 30 | 30 | import java.util.Arrays; |
| 31 | 31 | import java.util.List; |
| 32 | 32 | import java.util.Map; |
| 33 | 33 | |
| 34 | +import static cn.iocoder.yudao.framework.apilog.core.enums.OperateTypeEnum.EXPORT; | |
| 34 | 35 | import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success; |
| 35 | 36 | import static cn.iocoder.yudao.framework.common.util.collection.CollectionUtils.convertList; |
| 36 | -import static cn.iocoder.yudao.framework.operatelog.core.enums.OperateTypeEnum.EXPORT; | |
| 37 | 37 | |
| 38 | 38 | @Tag(name = "管理后台 - 用户") |
| 39 | 39 | @RestController |
| ... | ... | @@ -127,7 +127,7 @@ public class UserController { |
| 127 | 127 | @GetMapping("/export") |
| 128 | 128 | @Operation(summary = "导出用户") |
| 129 | 129 | @PreAuthorize("@ss.hasPermission('system:user:export')") |
| 130 | - @OperateLog(type = EXPORT) | |
| 130 | + @ApiAccessLog(operateType = EXPORT) | |
| 131 | 131 | public void exportUserList(@Validated UserPageReqVO exportReqVO, |
| 132 | 132 | HttpServletResponse response) throws IOException { |
| 133 | 133 | exportReqVO.setPageSize(PageParam.PAGE_SIZE_NONE); | ... | ... |
yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/user/vo/user/UserSaveReqVO.java
| ... | ... | @@ -2,12 +2,16 @@ package cn.iocoder.yudao.module.system.controller.admin.user.vo.user; |
| 2 | 2 | |
| 3 | 3 | import cn.hutool.core.util.ObjectUtil; |
| 4 | 4 | import cn.iocoder.yudao.framework.common.validation.Mobile; |
| 5 | +import cn.iocoder.yudao.module.system.framework.operatelog.core.DeptParseFunction; | |
| 6 | +import cn.iocoder.yudao.module.system.framework.operatelog.core.PostParseFunction; | |
| 7 | +import cn.iocoder.yudao.module.system.framework.operatelog.core.SexParseFunction; | |
| 5 | 8 | import com.fasterxml.jackson.annotation.JsonIgnore; |
| 9 | +import com.mzt.logapi.starter.annotation.DiffLogField; | |
| 6 | 10 | import io.swagger.v3.oas.annotations.media.Schema; |
| 11 | +import jakarta.validation.constraints.*; | |
| 7 | 12 | import lombok.Data; |
| 8 | 13 | import org.hibernate.validator.constraints.Length; |
| 9 | 14 | |
| 10 | -import jakarta.validation.constraints.*; | |
| 11 | 15 | import java.util.Set; |
| 12 | 16 | |
| 13 | 17 | @Schema(description = "管理后台 - 用户创建/修改 Request VO") |
| ... | ... | @@ -21,34 +25,43 @@ public class UserSaveReqVO { |
| 21 | 25 | @NotBlank(message = "用户账号不能为空") |
| 22 | 26 | @Pattern(regexp = "^[a-zA-Z0-9]{4,30}$", message = "用户账号由 数字、字母 组成") |
| 23 | 27 | @Size(min = 4, max = 30, message = "用户账号长度为 4-30 个字符") |
| 28 | + @DiffLogField(name = "用户账号") | |
| 24 | 29 | private String username; |
| 25 | 30 | |
| 26 | 31 | @Schema(description = "用户昵称", requiredMode = Schema.RequiredMode.REQUIRED, example = "芋艿") |
| 27 | 32 | @Size(max = 30, message = "用户昵称长度不能超过30个字符") |
| 33 | + @DiffLogField(name = "用户昵称") | |
| 28 | 34 | private String nickname; |
| 29 | 35 | |
| 30 | 36 | @Schema(description = "备注", example = "我是一个用户") |
| 37 | + @DiffLogField(name = "备注") | |
| 31 | 38 | private String remark; |
| 32 | 39 | |
| 33 | - @Schema(description = "部门ID", example = "我是一个用户") | |
| 40 | + @Schema(description = "部门编号", example = "我是一个用户") | |
| 41 | + @DiffLogField(name = "部门", function = DeptParseFunction.NAME) | |
| 34 | 42 | private Long deptId; |
| 35 | 43 | |
| 36 | 44 | @Schema(description = "岗位编号数组", example = "1") |
| 45 | + @DiffLogField(name = "岗位", function = PostParseFunction.NAME) | |
| 37 | 46 | private Set<Long> postIds; |
| 38 | 47 | |
| 39 | 48 | @Schema(description = "用户邮箱", example = "yudao@iocoder.cn") |
| 40 | 49 | @Email(message = "邮箱格式不正确") |
| 41 | 50 | @Size(max = 50, message = "邮箱长度不能超过 50 个字符") |
| 51 | + @DiffLogField(name = "用户邮箱") | |
| 42 | 52 | private String email; |
| 43 | 53 | |
| 44 | 54 | @Schema(description = "手机号码", example = "15601691300") |
| 45 | 55 | @Mobile |
| 56 | + @DiffLogField(name = "手机号码") | |
| 46 | 57 | private String mobile; |
| 47 | 58 | |
| 48 | 59 | @Schema(description = "用户性别,参见 SexEnum 枚举类", example = "1") |
| 60 | + @DiffLogField(name = "用户性别", function = SexParseFunction.NAME) | |
| 49 | 61 | private Integer sex; |
| 50 | 62 | |
| 51 | 63 | @Schema(description = "用户头像", example = "https://www.iocoder.cn/xxx.png") |
| 64 | + @DiffLogField(name = "用户头像") | |
| 52 | 65 | private String avatar; |
| 53 | 66 | |
| 54 | 67 | // ========== 仅【创建】时,需要传递的字段 ========== | ... | ... |
yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/convert/logger/OperateLogConvert.java deleted
| 1 | -package cn.iocoder.yudao.module.system.convert.logger; | |
| 2 | - | |
| 3 | -import cn.iocoder.yudao.framework.common.pojo.PageResult; | |
| 4 | -import cn.iocoder.yudao.framework.common.util.collection.CollectionUtils; | |
| 5 | -import cn.iocoder.yudao.framework.common.util.collection.MapUtils; | |
| 6 | -import cn.iocoder.yudao.framework.common.util.object.BeanUtils; | |
| 7 | -import cn.iocoder.yudao.module.system.api.logger.dto.OperateLogV2RespDTO; | |
| 8 | -import cn.iocoder.yudao.module.system.controller.admin.logger.vo.operatelog.OperateLogRespVO; | |
| 9 | -import cn.iocoder.yudao.module.system.dal.dataobject.logger.OperateLogDO; | |
| 10 | -import cn.iocoder.yudao.module.system.dal.dataobject.logger.OperateLogV2DO; | |
| 11 | -import cn.iocoder.yudao.module.system.dal.dataobject.user.AdminUserDO; | |
| 12 | -import org.mapstruct.Mapper; | |
| 13 | -import org.mapstruct.factory.Mappers; | |
| 14 | - | |
| 15 | -import java.util.List; | |
| 16 | -import java.util.Map; | |
| 17 | - | |
| 18 | -import static cn.iocoder.yudao.framework.common.util.collection.CollectionUtils.convertMap; | |
| 19 | -import static cn.iocoder.yudao.framework.common.util.collection.MapUtils.findAndThen; | |
| 20 | - | |
| 21 | -@Mapper | |
| 22 | -public interface OperateLogConvert { | |
| 23 | - | |
| 24 | - OperateLogConvert INSTANCE = Mappers.getMapper(OperateLogConvert.class); | |
| 25 | - | |
| 26 | - default List<OperateLogRespVO> convertList(List<OperateLogDO> list, Map<Long, AdminUserDO> userMap) { | |
| 27 | - return CollectionUtils.convertList(list, log -> { | |
| 28 | - OperateLogRespVO logVO = BeanUtils.toBean(log, OperateLogRespVO.class); | |
| 29 | - MapUtils.findAndThen(userMap, log.getUserId(), user -> logVO.setUserNickname(user.getNickname())); | |
| 30 | - return logVO; | |
| 31 | - }); | |
| 32 | - } | |
| 33 | - | |
| 34 | - default PageResult<OperateLogV2RespDTO> convertPage(PageResult<OperateLogV2DO> operateLogPage, List<AdminUserDO> userList) { | |
| 35 | - return BeanUtils.toBean(operateLogPage, OperateLogV2RespDTO.class).setList(setUserInfo(operateLogPage.getList(), userList)); | |
| 36 | - } | |
| 37 | - | |
| 38 | - OperateLogV2RespDTO convert(OperateLogV2DO operateLogV2DO); | |
| 39 | - | |
| 40 | - default List<OperateLogV2RespDTO> setUserInfo(List<OperateLogV2DO> logList, List<AdminUserDO> userList) { | |
| 41 | - Map<Long, AdminUserDO> userMap = convertMap(userList, AdminUserDO::getId); | |
| 42 | - return CollectionUtils.convertList(logList, item -> { | |
| 43 | - OperateLogV2RespDTO respDTO = convert(item); | |
| 44 | - findAndThen(userMap, item.getUserId(), user -> respDTO.setUserName(user.getNickname())); | |
| 45 | - return respDTO; | |
| 46 | - }); | |
| 47 | - } | |
| 48 | - | |
| 49 | -} |
yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/dal/dataobject/logger/OperateLogDO.java
| 1 | 1 | package cn.iocoder.yudao.module.system.dal.dataobject.logger; |
| 2 | 2 | |
| 3 | 3 | import cn.iocoder.yudao.framework.common.enums.UserTypeEnum; |
| 4 | -import cn.iocoder.yudao.framework.common.pojo.CommonResult; | |
| 5 | 4 | import cn.iocoder.yudao.framework.mybatis.core.dataobject.BaseDO; |
| 6 | -import cn.iocoder.yudao.framework.operatelog.core.enums.OperateTypeEnum; | |
| 7 | 5 | import com.baomidou.mybatisplus.annotation.KeySequence; |
| 8 | -import com.baomidou.mybatisplus.annotation.TableField; | |
| 9 | 6 | import com.baomidou.mybatisplus.annotation.TableId; |
| 10 | 7 | import com.baomidou.mybatisplus.annotation.TableName; |
| 11 | -import com.baomidou.mybatisplus.extension.handlers.JacksonTypeHandler; | |
| 12 | 8 | import lombok.Data; |
| 13 | -import lombok.EqualsAndHashCode; | |
| 14 | - | |
| 15 | -import java.time.LocalDateTime; | |
| 16 | -import java.util.Map; | |
| 17 | 9 | |
| 18 | 10 | /** |
| 19 | 11 | * 操作日志表 |
| ... | ... | @@ -23,20 +15,9 @@ import java.util.Map; |
| 23 | 15 | @TableName(value = "system_operate_log", autoResultMap = true) |
| 24 | 16 | @KeySequence("system_operate_log_seq") // 用于 Oracle、PostgreSQL、Kingbase、DB2、H2 数据库的主键自增。如果是 MySQL 等数据库,可不写。 |
| 25 | 17 | @Data |
| 26 | -@EqualsAndHashCode(callSuper = true) | |
| 27 | 18 | public class OperateLogDO extends BaseDO { |
| 28 | 19 | |
| 29 | 20 | /** |
| 30 | - * {@link #javaMethodArgs} 的最大长度 | |
| 31 | - */ | |
| 32 | - public static final Integer JAVA_METHOD_ARGS_MAX_LENGTH = 8000; | |
| 33 | - | |
| 34 | - /** | |
| 35 | - * {@link #resultData} 的最大长度 | |
| 36 | - */ | |
| 37 | - public static final Integer RESULT_MAX_LENGTH = 4000; | |
| 38 | - | |
| 39 | - /** | |
| 40 | 21 | * 日志主键 |
| 41 | 22 | */ |
| 42 | 23 | @TableId |
| ... | ... | @@ -60,30 +41,29 @@ public class OperateLogDO extends BaseDO { |
| 60 | 41 | */ |
| 61 | 42 | private Integer userType; |
| 62 | 43 | /** |
| 63 | - * 操作模块 | |
| 44 | + * 操作模块类型 | |
| 64 | 45 | */ |
| 65 | - private String module; | |
| 46 | + private String type; | |
| 66 | 47 | /** |
| 67 | 48 | * 操作名 |
| 68 | 49 | */ |
| 69 | - private String name; | |
| 50 | + private String subType; | |
| 70 | 51 | /** |
| 71 | - * 操作分类 | |
| 72 | - * | |
| 73 | - * 枚举 {@link OperateTypeEnum} | |
| 52 | + * 操作模块业务编号 | |
| 74 | 53 | */ |
| 75 | - private Integer type; | |
| 54 | + private Long bizId; | |
| 76 | 55 | /** |
| 77 | - * 操作内容,记录整个操作的明细 | |
| 56 | + * 日志内容,记录整个操作的明细 | |
| 57 | + * | |
| 78 | 58 | * 例如说,修改编号为 1 的用户信息,将性别从男改成女,将姓名从芋道改成源码。 |
| 79 | 59 | */ |
| 80 | - private String content; | |
| 60 | + private String action; | |
| 81 | 61 | /** |
| 82 | - * 拓展字段,有些复杂的业务,需要记录一些字段 | |
| 83 | - * 例如说,记录订单编号,则可以添加 key 为 "orderId",value 为订单编号 | |
| 62 | + * 拓展字段,有些复杂的业务,需要记录一些字段 ( JSON 格式 ) | |
| 63 | + * | |
| 64 | + * 例如说,记录订单编号,{ orderId: "1"} | |
| 84 | 65 | */ |
| 85 | - @TableField(typeHandler = JacksonTypeHandler.class) | |
| 86 | - private Map<String, Object> exts; | |
| 66 | + private String extra; | |
| 87 | 67 | |
| 88 | 68 | /** |
| 89 | 69 | * 请求方法名 |
| ... | ... | @@ -102,43 +82,4 @@ public class OperateLogDO extends BaseDO { |
| 102 | 82 | */ |
| 103 | 83 | private String userAgent; |
| 104 | 84 | |
| 105 | - /** | |
| 106 | - * Java 方法名 | |
| 107 | - */ | |
| 108 | - private String javaMethod; | |
| 109 | - /** | |
| 110 | - * Java 方法的参数 | |
| 111 | - * | |
| 112 | - * 实际格式为 Map<String, Object> | |
| 113 | - * 不使用 @TableField(typeHandler = FastjsonTypeHandler.class) 注解的原因是,数据库存储有长度限制,会进行裁剪,会导致 JSON 反序列化失败 | |
| 114 | - * 其中,key 为参数名,value 为参数值 | |
| 115 | - */ | |
| 116 | - private String javaMethodArgs; | |
| 117 | - /** | |
| 118 | - * 开始时间 | |
| 119 | - */ | |
| 120 | - private LocalDateTime startTime; | |
| 121 | - /** | |
| 122 | - * 执行时长,单位:毫秒 | |
| 123 | - */ | |
| 124 | - private Integer duration; | |
| 125 | - /** | |
| 126 | - * 结果码 | |
| 127 | - * | |
| 128 | - * 目前使用的 {@link CommonResult#getCode()} 属性 | |
| 129 | - */ | |
| 130 | - private Integer resultCode; | |
| 131 | - /** | |
| 132 | - * 结果提示 | |
| 133 | - * | |
| 134 | - * 目前使用的 {@link CommonResult#getMsg()} 属性 | |
| 135 | - */ | |
| 136 | - private String resultMsg; | |
| 137 | - /** | |
| 138 | - * 结果数据 | |
| 139 | - * | |
| 140 | - * 如果是对象,则使用 JSON 格式化 | |
| 141 | - */ | |
| 142 | - private String resultData; | |
| 143 | - | |
| 144 | 85 | } | ... | ... |
yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/dal/dataobject/logger/OperateLogV2DO.java deleted
| 1 | -package cn.iocoder.yudao.module.system.dal.dataobject.logger; | |
| 2 | - | |
| 3 | -import cn.iocoder.yudao.framework.common.enums.UserTypeEnum; | |
| 4 | -import cn.iocoder.yudao.framework.mybatis.core.dataobject.BaseDO; | |
| 5 | -import com.baomidou.mybatisplus.annotation.KeySequence; | |
| 6 | -import com.baomidou.mybatisplus.annotation.TableId; | |
| 7 | -import com.baomidou.mybatisplus.annotation.TableName; | |
| 8 | -import lombok.Data; | |
| 9 | -import lombok.EqualsAndHashCode; | |
| 10 | - | |
| 11 | -/** | |
| 12 | - * 操作日志表 V2 | |
| 13 | - * | |
| 14 | - * @author 芋道源码 | |
| 15 | - */ | |
| 16 | -@TableName(value = "system_operate_log_v2", autoResultMap = true) | |
| 17 | -@KeySequence("system_operate_log_seq_v2") // 用于 Oracle、PostgreSQL、Kingbase、DB2、H2 数据库的主键自增。如果是 MySQL 等数据库,可不写。 | |
| 18 | -@Data | |
| 19 | -@EqualsAndHashCode(callSuper = true) | |
| 20 | -public class OperateLogV2DO extends BaseDO { | |
| 21 | - | |
| 22 | - /** | |
| 23 | - * 日志主键 | |
| 24 | - */ | |
| 25 | - @TableId | |
| 26 | - private Long id; | |
| 27 | - /** | |
| 28 | - * 链路追踪编号 | |
| 29 | - * | |
| 30 | - * 一般来说,通过链路追踪编号,可以将访问日志,错误日志,链路追踪日志,logger 打印日志等,结合在一起,从而进行排错。 | |
| 31 | - */ | |
| 32 | - private String traceId; | |
| 33 | - /** | |
| 34 | - * 用户编号 | |
| 35 | - * | |
| 36 | - * 关联 MemberUserDO 的 id 属性,或者 AdminUserDO 的 id 属性 | |
| 37 | - */ | |
| 38 | - private Long userId; | |
| 39 | - /** | |
| 40 | - * 用户类型 | |
| 41 | - * | |
| 42 | - * 关联 {@link UserTypeEnum} | |
| 43 | - */ | |
| 44 | - private Integer userType; | |
| 45 | - /** | |
| 46 | - * 操作模块类型 | |
| 47 | - */ | |
| 48 | - private String type; | |
| 49 | - /** | |
| 50 | - * 操作名 | |
| 51 | - */ | |
| 52 | - private String subType; | |
| 53 | - /** | |
| 54 | - * 操作模块业务编号 | |
| 55 | - */ | |
| 56 | - private Long bizId; | |
| 57 | - /** | |
| 58 | - * 日志内容,记录整个操作的明细 | |
| 59 | - * | |
| 60 | - * 例如说,修改编号为 1 的用户信息,将性别从男改成女,将姓名从芋道改成源码。 | |
| 61 | - */ | |
| 62 | - private String action; | |
| 63 | - /** | |
| 64 | - * 拓展字段,有些复杂的业务,需要记录一些字段 ( JSON 格式 ) | |
| 65 | - * | |
| 66 | - * 例如说,记录订单编号,{ orderId: "1"} | |
| 67 | - */ | |
| 68 | - private String extra; | |
| 69 | - | |
| 70 | - /** | |
| 71 | - * 请求方法名 | |
| 72 | - */ | |
| 73 | - private String requestMethod; | |
| 74 | - /** | |
| 75 | - * 请求地址 | |
| 76 | - */ | |
| 77 | - private String requestUrl; | |
| 78 | - /** | |
| 79 | - * 用户 IP | |
| 80 | - */ | |
| 81 | - private String userIp; | |
| 82 | - /** | |
| 83 | - * 浏览器 UA | |
| 84 | - */ | |
| 85 | - private String userAgent; | |
| 86 | - | |
| 87 | -} |
yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/dal/mysql/logger/OperateLogMapper.java
| 1 | 1 | package cn.iocoder.yudao.module.system.dal.mysql.logger; |
| 2 | 2 | |
| 3 | -import cn.iocoder.yudao.framework.common.exception.enums.GlobalErrorCodeConstants; | |
| 4 | 3 | import cn.iocoder.yudao.framework.common.pojo.PageResult; |
| 5 | 4 | import cn.iocoder.yudao.framework.mybatis.core.mapper.BaseMapperX; |
| 6 | 5 | import cn.iocoder.yudao.framework.mybatis.core.query.LambdaQueryWrapperX; |
| 6 | +import cn.iocoder.yudao.module.system.api.logger.dto.OperateLogPageReqDTO; | |
| 7 | 7 | import cn.iocoder.yudao.module.system.controller.admin.logger.vo.operatelog.OperateLogPageReqVO; |
| 8 | 8 | import cn.iocoder.yudao.module.system.dal.dataobject.logger.OperateLogDO; |
| 9 | 9 | import org.apache.ibatis.annotations.Mapper; |
| 10 | 10 | |
| 11 | -import java.util.Collection; | |
| 12 | - | |
| 13 | 11 | @Mapper |
| 14 | 12 | public interface OperateLogMapper extends BaseMapperX<OperateLogDO> { |
| 15 | 13 | |
| 16 | - default PageResult<OperateLogDO> selectPage(OperateLogPageReqVO reqVO, Collection<Long> userIds) { | |
| 17 | - LambdaQueryWrapperX<OperateLogDO> query = new LambdaQueryWrapperX<OperateLogDO>() | |
| 18 | - .likeIfPresent(OperateLogDO::getModule, reqVO.getModule()) | |
| 19 | - .inIfPresent(OperateLogDO::getUserId, userIds) | |
| 20 | - .eqIfPresent(OperateLogDO::getType, reqVO.getType()) | |
| 21 | - .betweenIfPresent(OperateLogDO::getStartTime, reqVO.getStartTime()); | |
| 22 | - if (Boolean.TRUE.equals(reqVO.getSuccess())) { | |
| 23 | - query.eq(OperateLogDO::getResultCode, GlobalErrorCodeConstants.SUCCESS.getCode()); | |
| 24 | - } else if (Boolean.FALSE.equals(reqVO.getSuccess())) { | |
| 25 | - query.gt(OperateLogDO::getResultCode, GlobalErrorCodeConstants.SUCCESS.getCode()); | |
| 26 | - } | |
| 27 | - query.orderByDesc(OperateLogDO::getId); // 降序 | |
| 28 | - return selectPage(reqVO, query); | |
| 14 | + default PageResult<OperateLogDO> selectPage(OperateLogPageReqVO pageReqDTO) { | |
| 15 | + return selectPage(pageReqDTO, new LambdaQueryWrapperX<OperateLogDO>() | |
| 16 | + .eqIfPresent(OperateLogDO::getUserId, pageReqDTO.getUserId()) | |
| 17 | + .eqIfPresent(OperateLogDO::getBizId, pageReqDTO.getBizId()) | |
| 18 | + .likeIfPresent(OperateLogDO::getType, pageReqDTO.getType()) | |
| 19 | + .likeIfPresent(OperateLogDO::getSubType, pageReqDTO.getSubType()) | |
| 20 | + .likeIfPresent(OperateLogDO::getAction, pageReqDTO.getAction()) | |
| 21 | + .betweenIfPresent(OperateLogDO::getCreateTime, pageReqDTO.getCreateTime()) | |
| 22 | + .orderByDesc(OperateLogDO::getId)); | |
| 23 | + } | |
| 24 | + | |
| 25 | + default PageResult<OperateLogDO> selectPage(OperateLogPageReqDTO pageReqDTO) { | |
| 26 | + return selectPage(pageReqDTO, new LambdaQueryWrapperX<OperateLogDO>() | |
| 27 | + .eqIfPresent(OperateLogDO::getType, pageReqDTO.getType()) | |
| 28 | + .eqIfPresent(OperateLogDO::getBizId, pageReqDTO.getBizId()) | |
| 29 | + .eqIfPresent(OperateLogDO::getUserId, pageReqDTO.getUserId()) | |
| 30 | + .orderByDesc(OperateLogDO::getId)); | |
| 29 | 31 | } |
| 30 | 32 | |
| 31 | 33 | } | ... | ... |
yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/dal/mysql/logger/OperateLogV2Mapper.java deleted
| 1 | -package cn.iocoder.yudao.module.system.dal.mysql.logger; | |
| 2 | - | |
| 3 | -import cn.iocoder.yudao.framework.common.pojo.PageResult; | |
| 4 | -import cn.iocoder.yudao.framework.mybatis.core.mapper.BaseMapperX; | |
| 5 | -import cn.iocoder.yudao.framework.mybatis.core.query.LambdaQueryWrapperX; | |
| 6 | -import cn.iocoder.yudao.module.system.api.logger.dto.OperateLogV2PageReqDTO; | |
| 7 | -import cn.iocoder.yudao.module.system.dal.dataobject.logger.OperateLogV2DO; | |
| 8 | -import org.apache.ibatis.annotations.Mapper; | |
| 9 | - | |
| 10 | -@Mapper | |
| 11 | -public interface OperateLogV2Mapper extends BaseMapperX<OperateLogV2DO> { | |
| 12 | - | |
| 13 | - default PageResult<OperateLogV2DO> selectPage(OperateLogV2PageReqDTO pageReqDTO) { | |
| 14 | - return selectPage(pageReqDTO, new LambdaQueryWrapperX<OperateLogV2DO>() | |
| 15 | - .eqIfPresent(OperateLogV2DO::getType, pageReqDTO.getBizType()) | |
| 16 | - .eqIfPresent(OperateLogV2DO::getBizId, pageReqDTO.getBizId()) | |
| 17 | - .eqIfPresent(OperateLogV2DO::getUserId, pageReqDTO.getUserId()) | |
| 18 | - .orderByDesc(OperateLogV2DO::getId)); | |
| 19 | - } | |
| 20 | - | |
| 21 | -} |
yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/framework/operatelog/core/AdminUserParseFunction.java
| 1 | 1 | package cn.iocoder.yudao.module.system.framework.operatelog.core; |
| 2 | 2 | |
| 3 | +import cn.hutool.core.convert.Convert; | |
| 3 | 4 | import cn.hutool.core.util.StrUtil; |
| 4 | -import cn.iocoder.yudao.module.system.api.user.AdminUserApi; | |
| 5 | -import cn.iocoder.yudao.module.system.api.user.dto.AdminUserRespDTO; | |
| 5 | +import cn.iocoder.yudao.module.system.dal.dataobject.user.AdminUserDO; | |
| 6 | +import cn.iocoder.yudao.module.system.service.user.AdminUserService; | |
| 6 | 7 | import com.mzt.logapi.service.IParseFunction; |
| 7 | 8 | import jakarta.annotation.Resource; |
| 8 | 9 | import lombok.extern.slf4j.Slf4j; |
| ... | ... | @@ -20,7 +21,7 @@ public class AdminUserParseFunction implements IParseFunction { |
| 20 | 21 | public static final String NAME = "getAdminUserById"; |
| 21 | 22 | |
| 22 | 23 | @Resource |
| 23 | - private AdminUserApi adminUserApi; | |
| 24 | + private AdminUserService adminUserService; | |
| 24 | 25 | |
| 25 | 26 | @Override |
| 26 | 27 | public String functionName() { |
| ... | ... | @@ -34,7 +35,7 @@ public class AdminUserParseFunction implements IParseFunction { |
| 34 | 35 | } |
| 35 | 36 | |
| 36 | 37 | // 获取用户信息 |
| 37 | - AdminUserRespDTO user = adminUserApi.getUser(Long.parseLong(value.toString())); | |
| 38 | + AdminUserDO user = adminUserService.getUser(Convert.toLong(value)); | |
| 38 | 39 | if (user == null) { |
| 39 | 40 | log.warn("[apply][获取用户{{}}为空", value); |
| 40 | 41 | return ""; | ... | ... |
yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/framework/operatelog/core/AreaParseFunction.java
| 1 | 1 | package cn.iocoder.yudao.module.system.framework.operatelog.core; |
| 2 | 2 | |
| 3 | +import cn.hutool.core.convert.Convert; | |
| 3 | 4 | import cn.hutool.core.util.StrUtil; |
| 4 | 5 | import cn.iocoder.yudao.framework.ip.core.utils.AreaUtils; |
| 5 | 6 | import com.mzt.logapi.service.IParseFunction; |
| ... | ... | @@ -32,7 +33,7 @@ public class AreaParseFunction implements IParseFunction { |
| 32 | 33 | if (StrUtil.isEmptyIfStr(value)) { |
| 33 | 34 | return ""; |
| 34 | 35 | } |
| 35 | - return AreaUtils.format(Integer.parseInt(value.toString())); | |
| 36 | + return AreaUtils.format(Convert.toInt(value)); | |
| 36 | 37 | } |
| 37 | 38 | |
| 38 | 39 | } | ... | ... |
yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/framework/operatelog/core/DeptParseFunction.java
| 1 | 1 | package cn.iocoder.yudao.module.system.framework.operatelog.core; |
| 2 | 2 | |
| 3 | +import cn.hutool.core.convert.Convert; | |
| 3 | 4 | import cn.hutool.core.util.StrUtil; |
| 4 | -import cn.iocoder.yudao.module.system.api.dept.DeptApi; | |
| 5 | -import cn.iocoder.yudao.module.system.api.dept.dto.DeptRespDTO; | |
| 5 | +import cn.iocoder.yudao.module.system.dal.dataobject.dept.DeptDO; | |
| 6 | +import cn.iocoder.yudao.module.system.service.dept.DeptService; | |
| 6 | 7 | import com.mzt.logapi.service.IParseFunction; |
| 7 | 8 | import jakarta.annotation.Resource; |
| 8 | 9 | import lombok.extern.slf4j.Slf4j; |
| 9 | 10 | import org.springframework.stereotype.Component; |
| 10 | 11 | |
| 11 | 12 | /** |
| 12 | - * 管理员名字的 {@link IParseFunction} 实现类 | |
| 13 | + * 部门名字的 {@link IParseFunction} 实现类 | |
| 13 | 14 | * |
| 14 | 15 | * @author HUIHUI |
| 15 | 16 | */ |
| ... | ... | @@ -20,7 +21,7 @@ public class DeptParseFunction implements IParseFunction { |
| 20 | 21 | public static final String NAME = "getDeptById"; |
| 21 | 22 | |
| 22 | 23 | @Resource |
| 23 | - private DeptApi deptApi; | |
| 24 | + private DeptService deptService; | |
| 24 | 25 | |
| 25 | 26 | @Override |
| 26 | 27 | public String functionName() { |
| ... | ... | @@ -34,7 +35,7 @@ public class DeptParseFunction implements IParseFunction { |
| 34 | 35 | } |
| 35 | 36 | |
| 36 | 37 | // 获取部门信息 |
| 37 | - DeptRespDTO dept = deptApi.getDept(Long.parseLong(value.toString())); | |
| 38 | + DeptDO dept = deptService.getDept(Convert.toLong(value)); | |
| 38 | 39 | if (dept == null) { |
| 39 | 40 | log.warn("[apply][获取部门{{}}为空", value); |
| 40 | 41 | return ""; | ... | ... |
yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/framework/operatelog/core/PostParseFunction.java
0 → 100644
| 1 | +package cn.iocoder.yudao.module.system.framework.operatelog.core; | |
| 2 | + | |
| 3 | +import cn.hutool.core.convert.Convert; | |
| 4 | +import cn.hutool.core.util.StrUtil; | |
| 5 | +import cn.iocoder.yudao.module.system.dal.dataobject.dept.PostDO; | |
| 6 | +import cn.iocoder.yudao.module.system.service.dept.PostService; | |
| 7 | +import com.mzt.logapi.service.IParseFunction; | |
| 8 | +import jakarta.annotation.Resource; | |
| 9 | +import lombok.extern.slf4j.Slf4j; | |
| 10 | +import org.springframework.stereotype.Component; | |
| 11 | + | |
| 12 | +/** | |
| 13 | + * 岗位名字的 {@link IParseFunction} 实现类 | |
| 14 | + * | |
| 15 | + * @author HUIHUI | |
| 16 | + */ | |
| 17 | +@Slf4j | |
| 18 | +@Component | |
| 19 | +public class PostParseFunction implements IParseFunction { | |
| 20 | + | |
| 21 | + public static final String NAME = "getPostById"; | |
| 22 | + | |
| 23 | + @Resource | |
| 24 | + private PostService postService; | |
| 25 | + | |
| 26 | + @Override | |
| 27 | + public String functionName() { | |
| 28 | + return NAME; | |
| 29 | + } | |
| 30 | + | |
| 31 | + @Override | |
| 32 | + public String apply(Object value) { | |
| 33 | + if (StrUtil.isEmptyIfStr(value)) { | |
| 34 | + return ""; | |
| 35 | + } | |
| 36 | + | |
| 37 | + // 获取岗位信息 | |
| 38 | + PostDO post = postService.getPost(Convert.toLong(value)); | |
| 39 | + if (post == null) { | |
| 40 | + log.warn("[apply][获取岗位{{}}为空", value); | |
| 41 | + return ""; | |
| 42 | + } | |
| 43 | + return post.getName(); | |
| 44 | + } | |
| 45 | + | |
| 46 | +} | ... | ... |
yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/framework/operatelog/package-info.java
yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/service/logger/OperateLogService.java
| ... | ... | @@ -2,11 +2,9 @@ package cn.iocoder.yudao.module.system.service.logger; |
| 2 | 2 | |
| 3 | 3 | import cn.iocoder.yudao.framework.common.pojo.PageResult; |
| 4 | 4 | import cn.iocoder.yudao.module.system.api.logger.dto.OperateLogCreateReqDTO; |
| 5 | -import cn.iocoder.yudao.module.system.api.logger.dto.OperateLogV2CreateReqDTO; | |
| 6 | -import cn.iocoder.yudao.module.system.api.logger.dto.OperateLogV2PageReqDTO; | |
| 5 | +import cn.iocoder.yudao.module.system.api.logger.dto.OperateLogPageReqDTO; | |
| 7 | 6 | import cn.iocoder.yudao.module.system.controller.admin.logger.vo.operatelog.OperateLogPageReqVO; |
| 8 | 7 | import cn.iocoder.yudao.module.system.dal.dataobject.logger.OperateLogDO; |
| 9 | -import cn.iocoder.yudao.module.system.dal.dataobject.logger.OperateLogV2DO; | |
| 10 | 8 | |
| 11 | 9 | /** |
| 12 | 10 | * 操作日志 Service 接口 |
| ... | ... | @@ -18,7 +16,7 @@ public interface OperateLogService { |
| 18 | 16 | /** |
| 19 | 17 | * 记录操作日志 |
| 20 | 18 | * |
| 21 | - * @param createReqDTO 操作日志请求 | |
| 19 | + * @param createReqDTO 创建请求 | |
| 22 | 20 | */ |
| 23 | 21 | void createOperateLog(OperateLogCreateReqDTO createReqDTO); |
| 24 | 22 | |
| ... | ... | @@ -30,21 +28,12 @@ public interface OperateLogService { |
| 30 | 28 | */ |
| 31 | 29 | PageResult<OperateLogDO> getOperateLogPage(OperateLogPageReqVO pageReqVO); |
| 32 | 30 | |
| 33 | - // ======================= LOG V2 ======================= | |
| 34 | - | |
| 35 | - /** | |
| 36 | - * 记录操作日志 V2 | |
| 37 | - * | |
| 38 | - * @param createReqDTO 创建请求 | |
| 39 | - */ | |
| 40 | - void createOperateLogV2(OperateLogV2CreateReqDTO createReqDTO); | |
| 41 | - | |
| 42 | 31 | /** |
| 43 | 32 | * 获得操作日志分页列表 |
| 44 | 33 | * |
| 45 | 34 | * @param pageReqVO 分页条件 |
| 46 | 35 | * @return 操作日志分页列表 |
| 47 | 36 | */ |
| 48 | - PageResult<OperateLogV2DO> getOperateLogPage(OperateLogV2PageReqDTO pageReqVO); | |
| 37 | + PageResult<OperateLogDO> getOperateLogPage(OperateLogPageReqDTO pageReqVO); | |
| 49 | 38 | |
| 50 | 39 | } | ... | ... |
yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/service/logger/OperateLogServiceImpl.java
| 1 | 1 | package cn.iocoder.yudao.module.system.service.logger; |
| 2 | 2 | |
| 3 | -import cn.hutool.core.collection.CollUtil; | |
| 4 | -import cn.hutool.core.util.StrUtil; | |
| 5 | 3 | import cn.iocoder.yudao.framework.common.pojo.PageResult; |
| 6 | 4 | import cn.iocoder.yudao.framework.common.util.object.BeanUtils; |
| 7 | -import cn.iocoder.yudao.framework.common.util.string.StrUtils; | |
| 8 | 5 | import cn.iocoder.yudao.module.system.api.logger.dto.OperateLogCreateReqDTO; |
| 9 | -import cn.iocoder.yudao.module.system.api.logger.dto.OperateLogV2CreateReqDTO; | |
| 10 | -import cn.iocoder.yudao.module.system.api.logger.dto.OperateLogV2PageReqDTO; | |
| 6 | +import cn.iocoder.yudao.module.system.api.logger.dto.OperateLogPageReqDTO; | |
| 11 | 7 | import cn.iocoder.yudao.module.system.controller.admin.logger.vo.operatelog.OperateLogPageReqVO; |
| 12 | 8 | import cn.iocoder.yudao.module.system.dal.dataobject.logger.OperateLogDO; |
| 13 | -import cn.iocoder.yudao.module.system.dal.dataobject.logger.OperateLogV2DO; | |
| 14 | -import cn.iocoder.yudao.module.system.dal.dataobject.user.AdminUserDO; | |
| 15 | 9 | import cn.iocoder.yudao.module.system.dal.mysql.logger.OperateLogMapper; |
| 16 | -import cn.iocoder.yudao.module.system.dal.mysql.logger.OperateLogV2Mapper; | |
| 17 | -import cn.iocoder.yudao.module.system.service.user.AdminUserService; | |
| 18 | 10 | import jakarta.annotation.Resource; |
| 19 | 11 | import lombok.extern.slf4j.Slf4j; |
| 20 | 12 | import org.springframework.stereotype.Service; |
| 21 | 13 | import org.springframework.validation.annotation.Validated; |
| 22 | 14 | |
| 23 | -import java.util.Collection; | |
| 24 | - | |
| 25 | -import static cn.iocoder.yudao.framework.common.util.collection.CollectionUtils.convertSet; | |
| 26 | -import static cn.iocoder.yudao.module.system.dal.dataobject.logger.OperateLogDO.JAVA_METHOD_ARGS_MAX_LENGTH; | |
| 27 | -import static cn.iocoder.yudao.module.system.dal.dataobject.logger.OperateLogDO.RESULT_MAX_LENGTH; | |
| 28 | - | |
| 29 | 15 | /** |
| 30 | 16 | * 操作日志 Service 实现类 |
| 31 | 17 | * |
| ... | ... | @@ -38,45 +24,21 @@ public class OperateLogServiceImpl implements OperateLogService { |
| 38 | 24 | |
| 39 | 25 | @Resource |
| 40 | 26 | private OperateLogMapper operateLogMapper; |
| 41 | - @Resource | |
| 42 | - private OperateLogV2Mapper operateLogV2Mapper; | |
| 43 | - | |
| 44 | - @Resource | |
| 45 | - private AdminUserService userService; | |
| 46 | 27 | |
| 47 | 28 | @Override |
| 48 | 29 | public void createOperateLog(OperateLogCreateReqDTO createReqDTO) { |
| 49 | 30 | OperateLogDO log = BeanUtils.toBean(createReqDTO, OperateLogDO.class); |
| 50 | - log.setJavaMethodArgs(StrUtils.maxLength(log.getJavaMethodArgs(), JAVA_METHOD_ARGS_MAX_LENGTH)); | |
| 51 | - log.setResultData(StrUtils.maxLength(log.getResultData(), RESULT_MAX_LENGTH)); | |
| 52 | 31 | operateLogMapper.insert(log); |
| 53 | 32 | } |
| 54 | 33 | |
| 55 | 34 | @Override |
| 56 | 35 | public PageResult<OperateLogDO> getOperateLogPage(OperateLogPageReqVO pageReqVO) { |
| 57 | - // 处理基于用户昵称的查询 | |
| 58 | - Collection<Long> userIds = null; | |
| 59 | - if (StrUtil.isNotEmpty(pageReqVO.getUserNickname())) { | |
| 60 | - userIds = convertSet(userService.getUserListByNickname(pageReqVO.getUserNickname()), AdminUserDO::getId); | |
| 61 | - if (CollUtil.isEmpty(userIds)) { | |
| 62 | - return PageResult.empty(); | |
| 63 | - } | |
| 64 | - } | |
| 65 | - // 查询分页 | |
| 66 | - return operateLogMapper.selectPage(pageReqVO, userIds); | |
| 67 | - } | |
| 68 | - | |
| 69 | - // ======================= LOG V2 ======================= | |
| 70 | - | |
| 71 | - @Override | |
| 72 | - public void createOperateLogV2(OperateLogV2CreateReqDTO createReqDTO) { | |
| 73 | - OperateLogV2DO log = BeanUtils.toBean(createReqDTO, OperateLogV2DO.class); | |
| 74 | - operateLogV2Mapper.insert(log); | |
| 36 | + return operateLogMapper.selectPage(pageReqVO); | |
| 75 | 37 | } |
| 76 | 38 | |
| 77 | 39 | @Override |
| 78 | - public PageResult<OperateLogV2DO> getOperateLogPage(OperateLogV2PageReqDTO pageReqDTO) { | |
| 79 | - return operateLogV2Mapper.selectPage(pageReqDTO); | |
| 40 | + public PageResult<OperateLogDO> getOperateLogPage(OperateLogPageReqDTO pageReqDTO) { | |
| 41 | + return operateLogMapper.selectPage(pageReqDTO); | |
| 80 | 42 | } |
| 81 | 43 | |
| 82 | 44 | } | ... | ... |
yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/service/permission/RoleService.java
| ... | ... | @@ -41,14 +41,6 @@ public interface RoleService { |
| 41 | 41 | void deleteRole(Long id); |
| 42 | 42 | |
| 43 | 43 | /** |
| 44 | - * 更新角色状态 | |
| 45 | - * | |
| 46 | - * @param id 角色编号 | |
| 47 | - * @param status 状态 | |
| 48 | - */ | |
| 49 | - void updateRoleStatus(Long id, Integer status); | |
| 50 | - | |
| 51 | - /** | |
| 52 | 44 | * 设置角色的数据权限 |
| 53 | 45 | * |
| 54 | 46 | * @param id 角色编号 | ... | ... |
yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/service/permission/RoleServiceImpl.java
| ... | ... | @@ -17,6 +17,8 @@ import cn.iocoder.yudao.module.system.enums.permission.DataScopeEnum; |
| 17 | 17 | import cn.iocoder.yudao.module.system.enums.permission.RoleCodeEnum; |
| 18 | 18 | import cn.iocoder.yudao.module.system.enums.permission.RoleTypeEnum; |
| 19 | 19 | import com.google.common.annotations.VisibleForTesting; |
| 20 | +import com.mzt.logapi.context.LogRecordContext; | |
| 21 | +import com.mzt.logapi.starter.annotation.LogRecord; | |
| 20 | 22 | import lombok.extern.slf4j.Slf4j; |
| 21 | 23 | import org.springframework.cache.annotation.CacheEvict; |
| 22 | 24 | import org.springframework.cache.annotation.Cacheable; |
| ... | ... | @@ -30,6 +32,7 @@ import java.util.*; |
| 30 | 32 | import static cn.iocoder.yudao.framework.common.exception.util.ServiceExceptionUtil.exception; |
| 31 | 33 | import static cn.iocoder.yudao.framework.common.util.collection.CollectionUtils.convertMap; |
| 32 | 34 | import static cn.iocoder.yudao.module.system.enums.ErrorCodeConstants.*; |
| 35 | +import static cn.iocoder.yudao.module.system.enums.LogRecordConstants.*; | |
| 33 | 36 | |
| 34 | 37 | /** |
| 35 | 38 | * 角色 Service 实现类 |
| ... | ... | @@ -48,41 +51,40 @@ public class RoleServiceImpl implements RoleService { |
| 48 | 51 | |
| 49 | 52 | @Override |
| 50 | 53 | @Transactional(rollbackFor = Exception.class) |
| 54 | + @LogRecord(type = SYSTEM_ROLE_TYPE, subType = SYSTEM_ROLE_CREATE_SUB_TYPE, bizNo = "{{#role.id}}", | |
| 55 | + success = SYSTEM_ROLE_CREATE_SUCCESS) | |
| 51 | 56 | public Long createRole(RoleSaveReqVO createReqVO, Integer type) { |
| 52 | - // 校验角色 | |
| 57 | + // 1. 校验角色 | |
| 53 | 58 | validateRoleDuplicate(createReqVO.getName(), createReqVO.getCode(), null); |
| 54 | - // 插入到数据库 | |
| 55 | - RoleDO role = BeanUtils.toBean(createReqVO, RoleDO.class); | |
| 56 | - role.setType(ObjectUtil.defaultIfNull(type, RoleTypeEnum.CUSTOM.getType())); | |
| 57 | - role.setStatus(CommonStatusEnum.ENABLE.getStatus()); | |
| 58 | - role.setDataScope(DataScopeEnum.ALL.getScope()); // 默认可查看所有数据。原因是,可能一些项目不需要项目权限 | |
| 59 | + | |
| 60 | + // 2. 插入到数据库 | |
| 61 | + RoleDO role = BeanUtils.toBean(createReqVO, RoleDO.class) | |
| 62 | + .setType(ObjectUtil.defaultIfNull(type, RoleTypeEnum.CUSTOM.getType())) | |
| 63 | + .setStatus(CommonStatusEnum.ENABLE.getStatus()) | |
| 64 | + .setDataScope(DataScopeEnum.ALL.getScope()); // 默认可查看所有数据。原因是,可能一些项目不需要项目权限 | |
| 59 | 65 | roleMapper.insert(role); |
| 60 | - // 返回 | |
| 66 | + | |
| 67 | + // 3. 记录操作日志上下文 | |
| 68 | + LogRecordContext.putVariable("role", role); | |
| 61 | 69 | return role.getId(); |
| 62 | 70 | } |
| 63 | 71 | |
| 64 | 72 | @Override |
| 65 | 73 | @CacheEvict(value = RedisKeyConstants.ROLE, key = "#updateReqVO.id") |
| 74 | + @LogRecord(type = SYSTEM_ROLE_TYPE, subType = SYSTEM_ROLE_UPDATE_SUB_TYPE, bizNo = "{{#updateReqVO.id}}", | |
| 75 | + success = SYSTEM_ROLE_UPDATE_SUCCESS) | |
| 66 | 76 | public void updateRole(RoleSaveReqVO updateReqVO) { |
| 67 | - // 校验是否可以更新 | |
| 68 | - validateRoleForUpdate(updateReqVO.getId()); | |
| 69 | - // 校验角色的唯一字段是否重复 | |
| 77 | + // 1.1 校验是否可以更新 | |
| 78 | + RoleDO role = validateRoleForUpdate(updateReqVO.getId()); | |
| 79 | + // 1.2 校验角色的唯一字段是否重复 | |
| 70 | 80 | validateRoleDuplicate(updateReqVO.getName(), updateReqVO.getCode(), updateReqVO.getId()); |
| 71 | 81 | |
| 72 | - // 更新到数据库 | |
| 82 | + // 2. 更新到数据库 | |
| 73 | 83 | RoleDO updateObj = BeanUtils.toBean(updateReqVO, RoleDO.class); |
| 74 | 84 | roleMapper.updateById(updateObj); |
| 75 | - } | |
| 76 | - | |
| 77 | - @Override | |
| 78 | - @CacheEvict(value = RedisKeyConstants.ROLE, key = "#id") | |
| 79 | - public void updateRoleStatus(Long id, Integer status) { | |
| 80 | - // 校验是否可以更新 | |
| 81 | - validateRoleForUpdate(id); | |
| 82 | 85 | |
| 83 | - // 更新状态 | |
| 84 | - RoleDO updateObj = new RoleDO().setId(id).setStatus(status); | |
| 85 | - roleMapper.updateById(updateObj); | |
| 86 | + // 3. 记录操作日志上下文 | |
| 87 | + LogRecordContext.putVariable("role", role); | |
| 86 | 88 | } |
| 87 | 89 | |
| 88 | 90 | @Override |
| ... | ... | @@ -102,13 +104,19 @@ public class RoleServiceImpl implements RoleService { |
| 102 | 104 | @Override |
| 103 | 105 | @Transactional(rollbackFor = Exception.class) |
| 104 | 106 | @CacheEvict(value = RedisKeyConstants.ROLE, key = "#id") |
| 107 | + @LogRecord(type = SYSTEM_ROLE_TYPE, subType = SYSTEM_ROLE_DELETE_SUB_TYPE, bizNo = "{{#id}}", | |
| 108 | + success = SYSTEM_ROLE_DELETE_SUCCESS) | |
| 105 | 109 | public void deleteRole(Long id) { |
| 106 | - // 校验是否可以更新 | |
| 107 | - validateRoleForUpdate(id); | |
| 108 | - // 标记删除 | |
| 110 | + // 1. 校验是否可以更新 | |
| 111 | + RoleDO role = validateRoleForUpdate(id); | |
| 112 | + | |
| 113 | + // 2.1 标记删除 | |
| 109 | 114 | roleMapper.deleteById(id); |
| 110 | - // 删除相关数据 | |
| 115 | + // 2.2 删除相关数据 | |
| 111 | 116 | permissionService.processRoleDeleted(id); |
| 117 | + | |
| 118 | + // 3. 记录操作日志上下文 | |
| 119 | + LogRecordContext.putVariable("role", role); | |
| 112 | 120 | } |
| 113 | 121 | |
| 114 | 122 | /** |
| ... | ... | @@ -149,15 +157,16 @@ public class RoleServiceImpl implements RoleService { |
| 149 | 157 | * @param id 角色编号 |
| 150 | 158 | */ |
| 151 | 159 | @VisibleForTesting |
| 152 | - void validateRoleForUpdate(Long id) { | |
| 153 | - RoleDO roleDO = roleMapper.selectById(id); | |
| 154 | - if (roleDO == null) { | |
| 160 | + RoleDO validateRoleForUpdate(Long id) { | |
| 161 | + RoleDO role = roleMapper.selectById(id); | |
| 162 | + if (role == null) { | |
| 155 | 163 | throw exception(ROLE_NOT_EXISTS); |
| 156 | 164 | } |
| 157 | 165 | // 内置角色,不允许删除 |
| 158 | - if (RoleTypeEnum.SYSTEM.getType().equals(roleDO.getType())) { | |
| 166 | + if (RoleTypeEnum.SYSTEM.getType().equals(role.getType())) { | |
| 159 | 167 | throw exception(ROLE_CAN_NOT_UPDATE_SYSTEM_TYPE_ROLE); |
| 160 | 168 | } |
| 169 | + return role; | |
| 161 | 170 | } |
| 162 | 171 | |
| 163 | 172 | @Override | ... | ... |
yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/service/user/AdminUserServiceImpl.java
| ... | ... | @@ -27,6 +27,10 @@ import cn.iocoder.yudao.module.system.service.dept.PostService; |
| 27 | 27 | import cn.iocoder.yudao.module.system.service.permission.PermissionService; |
| 28 | 28 | import cn.iocoder.yudao.module.system.service.tenant.TenantService; |
| 29 | 29 | import com.google.common.annotations.VisibleForTesting; |
| 30 | +import com.mzt.logapi.context.LogRecordContext; | |
| 31 | +import com.mzt.logapi.service.impl.DiffParseFunction; | |
| 32 | +import com.mzt.logapi.starter.annotation.LogRecord; | |
| 33 | +import jakarta.annotation.Resource; | |
| 30 | 34 | import lombok.extern.slf4j.Slf4j; |
| 31 | 35 | import org.springframework.beans.factory.annotation.Value; |
| 32 | 36 | import org.springframework.context.annotation.Lazy; |
| ... | ... | @@ -34,7 +38,6 @@ import org.springframework.security.crypto.password.PasswordEncoder; |
| 34 | 38 | import org.springframework.stereotype.Service; |
| 35 | 39 | import org.springframework.transaction.annotation.Transactional; |
| 36 | 40 | |
| 37 | -import jakarta.annotation.Resource; | |
| 38 | 41 | import java.io.InputStream; |
| 39 | 42 | import java.time.LocalDateTime; |
| 40 | 43 | import java.util.*; |
| ... | ... | @@ -43,6 +46,7 @@ import static cn.iocoder.yudao.framework.common.exception.util.ServiceExceptionU |
| 43 | 46 | import static cn.iocoder.yudao.framework.common.util.collection.CollectionUtils.convertList; |
| 44 | 47 | import static cn.iocoder.yudao.framework.common.util.collection.CollectionUtils.convertSet; |
| 45 | 48 | import static cn.iocoder.yudao.module.system.enums.ErrorCodeConstants.*; |
| 49 | +import static cn.iocoder.yudao.module.system.enums.LogRecordConstants.*; | |
| 46 | 50 | |
| 47 | 51 | /** |
| 48 | 52 | * 后台用户 Service 实现类 |
| ... | ... | @@ -79,42 +83,54 @@ public class AdminUserServiceImpl implements AdminUserService { |
| 79 | 83 | |
| 80 | 84 | @Override |
| 81 | 85 | @Transactional(rollbackFor = Exception.class) |
| 86 | + @LogRecord(type = SYSTEM_USER_TYPE, subType = SYSTEM_USER_CREATE_SUB_TYPE, bizNo = "{{#user.id}}", | |
| 87 | + success = SYSTEM_USER_CREATE_SUCCESS) | |
| 82 | 88 | public Long createUser(UserSaveReqVO createReqVO) { |
| 83 | - // 校验账户配合 | |
| 89 | + // 1.1 校验账户配合 | |
| 84 | 90 | tenantService.handleTenantInfo(tenant -> { |
| 85 | 91 | long count = userMapper.selectCount(); |
| 86 | 92 | if (count >= tenant.getAccountCount()) { |
| 87 | 93 | throw exception(USER_COUNT_MAX, tenant.getAccountCount()); |
| 88 | 94 | } |
| 89 | 95 | }); |
| 90 | - // 校验正确性 | |
| 96 | + // 1.2 校验正确性 | |
| 91 | 97 | validateUserForCreateOrUpdate(null, createReqVO.getUsername(), |
| 92 | 98 | createReqVO.getMobile(), createReqVO.getEmail(), createReqVO.getDeptId(), createReqVO.getPostIds()); |
| 93 | - // 插入用户 | |
| 99 | + // 2.1 插入用户 | |
| 94 | 100 | AdminUserDO user = BeanUtils.toBean(createReqVO, AdminUserDO.class); |
| 95 | 101 | user.setStatus(CommonStatusEnum.ENABLE.getStatus()); // 默认开启 |
| 96 | 102 | user.setPassword(encodePassword(createReqVO.getPassword())); // 加密密码 |
| 97 | 103 | userMapper.insert(user); |
| 98 | - // 插入关联岗位 | |
| 104 | + // 2.2 插入关联岗位 | |
| 99 | 105 | if (CollectionUtil.isNotEmpty(user.getPostIds())) { |
| 100 | 106 | userPostMapper.insertBatch(convertList(user.getPostIds(), |
| 101 | 107 | postId -> new UserPostDO().setUserId(user.getId()).setPostId(postId))); |
| 102 | 108 | } |
| 109 | + | |
| 110 | + // 3. 记录操作日志上下文 | |
| 111 | + LogRecordContext.putVariable("user", user); | |
| 103 | 112 | return user.getId(); |
| 104 | 113 | } |
| 105 | 114 | |
| 106 | 115 | @Override |
| 107 | 116 | @Transactional(rollbackFor = Exception.class) |
| 117 | + @LogRecord(type = SYSTEM_USER_TYPE, subType = SYSTEM_USER_UPDATE_SUB_TYPE, bizNo = "{{#updateReqVO.id}}", | |
| 118 | + success = SYSTEM_USER_UPDATE_SUCCESS) | |
| 108 | 119 | public void updateUser(UserSaveReqVO updateReqVO) { |
| 109 | 120 | updateReqVO.setPassword(null); // 特殊:此处不更新密码 |
| 110 | - // 校验正确性 | |
| 111 | - validateUserForCreateOrUpdate(updateReqVO.getId(), updateReqVO.getUsername(), | |
| 121 | + // 1. 校验正确性 | |
| 122 | + AdminUserDO oldUser = validateUserForCreateOrUpdate(updateReqVO.getId(), updateReqVO.getUsername(), | |
| 112 | 123 | updateReqVO.getMobile(), updateReqVO.getEmail(), updateReqVO.getDeptId(), updateReqVO.getPostIds()); |
| 113 | - // 更新用户 | |
| 124 | + | |
| 125 | + // 2.1 更新用户 | |
| 114 | 126 | AdminUserDO updateObj = BeanUtils.toBean(updateReqVO, AdminUserDO.class); |
| 115 | 127 | userMapper.updateById(updateObj); |
| 116 | - // 更新岗位 | |
| 128 | + // 2.2 更新岗位 | |
| 117 | 129 | updateUserPost(updateReqVO, updateObj); |
| 130 | + | |
| 131 | + // 3. 记录操作日志上下文 | |
| 132 | + LogRecordContext.putVariable(DiffParseFunction.OLD_OBJECT, BeanUtils.toBean(oldUser, UserSaveReqVO.class)); | |
| 133 | + LogRecordContext.putVariable("user", oldUser); | |
| 118 | 134 | } |
| 119 | 135 | |
| 120 | 136 | private void updateUserPost(UserSaveReqVO reqVO, AdminUserDO updateObj) { |
| ... | ... | @@ -124,7 +140,7 @@ public class AdminUserServiceImpl implements AdminUserService { |
| 124 | 140 | Set<Long> postIds = CollUtil.emptyIfNull(updateObj.getPostIds()); |
| 125 | 141 | Collection<Long> createPostIds = CollUtil.subtract(postIds, dbPostIds); |
| 126 | 142 | Collection<Long> deletePostIds = CollUtil.subtract(dbPostIds, postIds); |
| 127 | - // 执行新增和删除。对于已经授权的菜单,不用做任何处理 | |
| 143 | + // 执行新增和删除。对于已经授权的岗位,不用做任何处理 | |
| 128 | 144 | if (!CollectionUtil.isEmpty(createPostIds)) { |
| 129 | 145 | userPostMapper.insertBatch(convertList(createPostIds, |
| 130 | 146 | postId -> new UserPostDO().setUserId(userId).setPostId(postId))); |
| ... | ... | @@ -173,14 +189,21 @@ public class AdminUserServiceImpl implements AdminUserService { |
| 173 | 189 | } |
| 174 | 190 | |
| 175 | 191 | @Override |
| 192 | + @LogRecord(type = SYSTEM_USER_TYPE, subType = SYSTEM_USER_UPDATE_PASSWORD_SUB_TYPE, bizNo = "{{#id}}", | |
| 193 | + success = SYSTEM_USER_UPDATE_PASSWORD_SUCCESS) | |
| 176 | 194 | public void updateUserPassword(Long id, String password) { |
| 177 | - // 校验用户存在 | |
| 178 | - validateUserExists(id); | |
| 179 | - // 更新密码 | |
| 195 | + // 1. 校验用户存在 | |
| 196 | + AdminUserDO user = validateUserExists(id); | |
| 197 | + | |
| 198 | + // 2. 更新密码 | |
| 180 | 199 | AdminUserDO updateObj = new AdminUserDO(); |
| 181 | 200 | updateObj.setId(id); |
| 182 | 201 | updateObj.setPassword(encodePassword(password)); // 加密密码 |
| 183 | 202 | userMapper.updateById(updateObj); |
| 203 | + | |
| 204 | + // 3. 记录操作日志上下文 | |
| 205 | + LogRecordContext.putVariable("user", user); | |
| 206 | + LogRecordContext.putVariable("newPassword", updateObj.getPassword()); | |
| 184 | 207 | } |
| 185 | 208 | |
| 186 | 209 | @Override |
| ... | ... | @@ -196,15 +219,21 @@ public class AdminUserServiceImpl implements AdminUserService { |
| 196 | 219 | |
| 197 | 220 | @Override |
| 198 | 221 | @Transactional(rollbackFor = Exception.class) |
| 222 | + @LogRecord(type = SYSTEM_USER_TYPE, subType = SYSTEM_USER_DELETE_SUB_TYPE, bizNo = "{{#id}}", | |
| 223 | + success = SYSTEM_USER_DELETE_SUCCESS) | |
| 199 | 224 | public void deleteUser(Long id) { |
| 200 | - // 校验用户存在 | |
| 201 | - validateUserExists(id); | |
| 202 | - // 删除用户 | |
| 225 | + // 1. 校验用户存在 | |
| 226 | + AdminUserDO user = validateUserExists(id); | |
| 227 | + | |
| 228 | + // 2.1 删除用户 | |
| 203 | 229 | userMapper.deleteById(id); |
| 204 | - // 删除用户关联数据 | |
| 230 | + // 2.2 删除用户关联数据 | |
| 205 | 231 | permissionService.processUserDeleted(id); |
| 206 | - // 删除用户岗位 | |
| 232 | + // 2.2 删除用户岗位 | |
| 207 | 233 | userPostMapper.deleteByUserId(id); |
| 234 | + | |
| 235 | + // 3. 记录操作日志上下文 | |
| 236 | + LogRecordContext.putVariable("user", user); | |
| 208 | 237 | } |
| 209 | 238 | |
| 210 | 239 | @Override |
| ... | ... | @@ -294,12 +323,12 @@ public class AdminUserServiceImpl implements AdminUserService { |
| 294 | 323 | return deptIds; |
| 295 | 324 | } |
| 296 | 325 | |
| 297 | - private void validateUserForCreateOrUpdate(Long id, String username, String mobile, String email, | |
| 326 | + private AdminUserDO validateUserForCreateOrUpdate(Long id, String username, String mobile, String email, | |
| 298 | 327 | Long deptId, Set<Long> postIds) { |
| 299 | 328 | // 关闭数据权限,避免因为没有数据权限,查询不到数据,进而导致唯一校验不正确 |
| 300 | - DataPermissionUtils.executeIgnore(() -> { | |
| 329 | + return DataPermissionUtils.executeIgnore(() -> { | |
| 301 | 330 | // 校验用户存在 |
| 302 | - validateUserExists(id); | |
| 331 | + AdminUserDO user = validateUserExists(id); | |
| 303 | 332 | // 校验用户名唯一 |
| 304 | 333 | validateUsernameUnique(id, username); |
| 305 | 334 | // 校验手机号唯一 |
| ... | ... | @@ -310,18 +339,20 @@ public class AdminUserServiceImpl implements AdminUserService { |
| 310 | 339 | deptService.validateDeptList(CollectionUtils.singleton(deptId)); |
| 311 | 340 | // 校验岗位处于开启状态 |
| 312 | 341 | postService.validatePostList(postIds); |
| 342 | + return user; | |
| 313 | 343 | }); |
| 314 | 344 | } |
| 315 | 345 | |
| 316 | 346 | @VisibleForTesting |
| 317 | - void validateUserExists(Long id) { | |
| 347 | + AdminUserDO validateUserExists(Long id) { | |
| 318 | 348 | if (id == null) { |
| 319 | - return; | |
| 349 | + return null; | |
| 320 | 350 | } |
| 321 | 351 | AdminUserDO user = userMapper.selectById(id); |
| 322 | 352 | if (user == null) { |
| 323 | 353 | throw exception(USER_NOT_EXISTS); |
| 324 | 354 | } |
| 355 | + return user; | |
| 325 | 356 | } |
| 326 | 357 | |
| 327 | 358 | @VisibleForTesting | ... | ... |
yudao-module-system/yudao-module-system-biz/src/test/java/cn/iocoder/yudao/module/system/service/logger/OperateLogServiceImplTest.java
| 1 | 1 | package cn.iocoder.yudao.module.system.service.logger; |
| 2 | 2 | |
| 3 | -import cn.hutool.core.map.MapUtil; | |
| 4 | -import cn.iocoder.yudao.framework.common.enums.CommonStatusEnum; | |
| 5 | -import cn.iocoder.yudao.framework.common.enums.UserTypeEnum; | |
| 6 | -import cn.iocoder.yudao.framework.common.exception.enums.GlobalErrorCodeConstants; | |
| 7 | 3 | import cn.iocoder.yudao.framework.common.pojo.PageResult; |
| 8 | -import cn.iocoder.yudao.framework.operatelog.core.enums.OperateTypeEnum; | |
| 9 | 4 | import cn.iocoder.yudao.framework.test.core.ut.BaseDbUnitTest; |
| 10 | 5 | import cn.iocoder.yudao.framework.test.core.util.RandomUtils; |
| 11 | 6 | import cn.iocoder.yudao.module.system.api.logger.dto.OperateLogCreateReqDTO; |
| 7 | +import cn.iocoder.yudao.module.system.api.logger.dto.OperateLogPageReqDTO; | |
| 12 | 8 | import cn.iocoder.yudao.module.system.controller.admin.logger.vo.operatelog.OperateLogPageReqVO; |
| 13 | 9 | import cn.iocoder.yudao.module.system.dal.dataobject.logger.OperateLogDO; |
| 14 | -import cn.iocoder.yudao.module.system.dal.dataobject.user.AdminUserDO; | |
| 15 | 10 | import cn.iocoder.yudao.module.system.dal.mysql.logger.OperateLogMapper; |
| 16 | -import cn.iocoder.yudao.module.system.service.user.AdminUserService; | |
| 11 | +import jakarta.annotation.Resource; | |
| 17 | 12 | import org.junit.jupiter.api.Test; |
| 18 | -import org.springframework.boot.test.mock.mockito.MockBean; | |
| 19 | 13 | import org.springframework.context.annotation.Import; |
| 20 | 14 | |
| 21 | -import jakarta.annotation.Resource; | |
| 22 | -import java.util.Collections; | |
| 23 | - | |
| 24 | -import static cn.hutool.core.util.RandomUtil.randomEle; | |
| 25 | -import static cn.iocoder.yudao.framework.common.exception.enums.GlobalErrorCodeConstants.BAD_REQUEST; | |
| 26 | 15 | import static cn.iocoder.yudao.framework.common.util.date.LocalDateTimeUtils.buildBetweenTime; |
| 27 | 16 | import static cn.iocoder.yudao.framework.common.util.date.LocalDateTimeUtils.buildTime; |
| 28 | 17 | import static cn.iocoder.yudao.framework.common.util.object.ObjectUtils.cloneIgnoreId; |
| 29 | 18 | import static cn.iocoder.yudao.framework.test.core.util.AssertUtils.assertPojoEquals; |
| 30 | -import static cn.iocoder.yudao.framework.test.core.util.RandomUtils.randomLongId; | |
| 31 | 19 | import static org.junit.jupiter.api.Assertions.assertEquals; |
| 32 | -import static org.mockito.Mockito.when; | |
| 33 | 20 | |
| 34 | 21 | @Import({OperateLogServiceImpl.class}) |
| 35 | 22 | public class OperateLogServiceImplTest extends BaseDbUnitTest { |
| ... | ... | @@ -40,13 +27,9 @@ public class OperateLogServiceImplTest extends BaseDbUnitTest { |
| 40 | 27 | @Resource |
| 41 | 28 | private OperateLogMapper operateLogMapper; |
| 42 | 29 | |
| 43 | - @MockBean | |
| 44 | - private AdminUserService userService; | |
| 45 | - | |
| 46 | 30 | @Test |
| 47 | 31 | public void testCreateOperateLog() { |
| 48 | - OperateLogCreateReqDTO reqVO = RandomUtils.randomPojo(OperateLogCreateReqDTO.class, | |
| 49 | - o -> o.setExts(MapUtil.<String, Object>builder("orderId", randomLongId()).build())); | |
| 32 | + OperateLogCreateReqDTO reqVO = RandomUtils.randomPojo(OperateLogCreateReqDTO.class); | |
| 50 | 33 | |
| 51 | 34 | // 调研 |
| 52 | 35 | operateLogServiceImpl.createOperateLog(reqVO); |
| ... | ... | @@ -56,44 +39,38 @@ public class OperateLogServiceImplTest extends BaseDbUnitTest { |
| 56 | 39 | } |
| 57 | 40 | |
| 58 | 41 | @Test |
| 59 | - public void testGetOperateLogPage() { | |
| 60 | - // mock(用户信息) | |
| 61 | - AdminUserDO user = RandomUtils.randomPojo(AdminUserDO.class, o -> { | |
| 62 | - o.setNickname("wang"); | |
| 63 | - o.setStatus(CommonStatusEnum.ENABLE.getStatus()); | |
| 64 | - }); | |
| 65 | - when(userService.getUserListByNickname("wang")).thenReturn(Collections.singletonList(user)); | |
| 66 | - Long userId = user.getId(); | |
| 67 | - | |
| 42 | + public void testGetOperateLogPage_vo() { | |
| 68 | 43 | // 构造操作日志 |
| 69 | 44 | OperateLogDO operateLogDO = RandomUtils.randomPojo(OperateLogDO.class, o -> { |
| 70 | - o.setUserId(userId); | |
| 71 | - o.setUserType(randomEle(UserTypeEnum.values()).getValue()); | |
| 72 | - o.setModule("order"); | |
| 73 | - o.setType(OperateTypeEnum.CREATE.getType()); | |
| 74 | - o.setStartTime(buildTime(2021, 3, 6)); | |
| 75 | - o.setResultCode(GlobalErrorCodeConstants.SUCCESS.getCode()); | |
| 76 | - o.setExts(MapUtil.<String, Object>builder("orderId", randomLongId()).build()); | |
| 45 | + o.setUserId(2048L); | |
| 46 | + o.setBizId(999L); | |
| 47 | + o.setType("订单"); | |
| 48 | + o.setSubType("创建订单"); | |
| 49 | + o.setAction("修改编号为 1 的用户信息"); | |
| 50 | + o.setCreateTime(buildTime(2021, 3, 6)); | |
| 77 | 51 | }); |
| 78 | 52 | operateLogMapper.insert(operateLogDO); |
| 79 | 53 | // 测试 userId 不匹配 |
| 80 | - operateLogMapper.insert(cloneIgnoreId(operateLogDO, o -> o.setUserId(userId + 1))); | |
| 81 | - // 测试 module 不匹配 | |
| 82 | - operateLogMapper.insert(cloneIgnoreId(operateLogDO, o -> o.setModule("user"))); | |
| 54 | + operateLogMapper.insert(cloneIgnoreId(operateLogDO, o -> o.setUserId(1024L))); | |
| 55 | + // 测试 bizId 不匹配 | |
| 56 | + operateLogMapper.insert(cloneIgnoreId(operateLogDO, o -> o.setBizId(888L))); | |
| 83 | 57 | // 测试 type 不匹配 |
| 84 | - operateLogMapper.insert(cloneIgnoreId(operateLogDO, o -> o.setType(OperateTypeEnum.IMPORT.getType()))); | |
| 58 | + operateLogMapper.insert(cloneIgnoreId(operateLogDO, o -> o.setType("退款"))); | |
| 59 | + // 测试 subType 不匹配 | |
| 60 | + operateLogMapper.insert(cloneIgnoreId(operateLogDO, o -> o.setSubType("创建退款"))); | |
| 61 | + // 测试 action 不匹配 | |
| 62 | + operateLogMapper.insert(cloneIgnoreId(operateLogDO, o -> o.setAction("修改编号为 1 退款信息"))); | |
| 85 | 63 | // 测试 createTime 不匹配 |
| 86 | - operateLogMapper.insert(cloneIgnoreId(operateLogDO, o -> o.setStartTime(buildTime(2021, 2, 6)))); | |
| 87 | - // 测试 resultCode 不匹配 | |
| 88 | - operateLogMapper.insert(cloneIgnoreId(operateLogDO, o -> o.setResultCode(BAD_REQUEST.getCode()))); | |
| 64 | + operateLogMapper.insert(cloneIgnoreId(operateLogDO, o -> o.setCreateTime(buildTime(2021, 2, 6)))); | |
| 89 | 65 | |
| 90 | 66 | // 构造调用参数 |
| 91 | 67 | OperateLogPageReqVO reqVO = new OperateLogPageReqVO(); |
| 92 | - reqVO.setUserNickname("wang"); | |
| 93 | - reqVO.setModule("order"); | |
| 94 | - reqVO.setType(OperateTypeEnum.CREATE.getType()); | |
| 95 | - reqVO.setStartTime(buildBetweenTime(2021, 3, 5, 2021, 3, 7)); | |
| 96 | - reqVO.setSuccess(true); | |
| 68 | + reqVO.setUserId(2048L); | |
| 69 | + reqVO.setBizId(999L); | |
| 70 | + reqVO.setType("订"); | |
| 71 | + reqVO.setSubType("订单"); | |
| 72 | + reqVO.setAction("用户信息"); | |
| 73 | + reqVO.setCreateTime(buildBetweenTime(2021, 3, 5, 2021, 3, 7)); | |
| 97 | 74 | |
| 98 | 75 | // 调用 |
| 99 | 76 | PageResult<OperateLogDO> pageResult = operateLogServiceImpl.getOperateLogPage(reqVO); |
| ... | ... | @@ -103,4 +80,34 @@ public class OperateLogServiceImplTest extends BaseDbUnitTest { |
| 103 | 80 | assertPojoEquals(operateLogDO, pageResult.getList().get(0)); |
| 104 | 81 | } |
| 105 | 82 | |
| 83 | + @Test | |
| 84 | + public void testGetOperateLogPage_dto() { | |
| 85 | + // 构造操作日志 | |
| 86 | + OperateLogDO operateLogDO = RandomUtils.randomPojo(OperateLogDO.class, o -> { | |
| 87 | + o.setUserId(2048L); | |
| 88 | + o.setBizId(999L); | |
| 89 | + o.setType("订单"); | |
| 90 | + }); | |
| 91 | + operateLogMapper.insert(operateLogDO); | |
| 92 | + // 测试 userId 不匹配 | |
| 93 | + operateLogMapper.insert(cloneIgnoreId(operateLogDO, o -> o.setUserId(1024L))); | |
| 94 | + // 测试 bizId 不匹配 | |
| 95 | + operateLogMapper.insert(cloneIgnoreId(operateLogDO, o -> o.setBizId(888L))); | |
| 96 | + // 测试 type 不匹配 | |
| 97 | + operateLogMapper.insert(cloneIgnoreId(operateLogDO, o -> o.setType("退款"))); | |
| 98 | + | |
| 99 | + // 构造调用参数 | |
| 100 | + OperateLogPageReqDTO reqDTO = new OperateLogPageReqDTO(); | |
| 101 | + reqDTO.setUserId(2048L); | |
| 102 | + reqDTO.setBizId(999L); | |
| 103 | + reqDTO.setType("订单"); | |
| 104 | + | |
| 105 | + // 调用 | |
| 106 | + PageResult<OperateLogDO> pageResult = operateLogServiceImpl.getOperateLogPage(reqDTO); | |
| 107 | + // 断言,只查到了一条符合条件的 | |
| 108 | + assertEquals(1, pageResult.getTotal()); | |
| 109 | + assertEquals(1, pageResult.getList().size()); | |
| 110 | + assertPojoEquals(operateLogDO, pageResult.getList().get(0)); | |
| 111 | + } | |
| 112 | + | |
| 106 | 113 | } | ... | ... |
yudao-module-system/yudao-module-system-biz/src/test/java/cn/iocoder/yudao/module/system/service/permission/RoleServiceImplTest.java
| ... | ... | @@ -80,23 +80,6 @@ public class RoleServiceImplTest extends BaseDbUnitTest { |
| 80 | 80 | } |
| 81 | 81 | |
| 82 | 82 | @Test |
| 83 | - public void testUpdateRoleStatus() { | |
| 84 | - // mock 数据 | |
| 85 | - RoleDO roleDO = randomPojo(RoleDO.class, o -> o.setStatus(CommonStatusEnum.ENABLE.getStatus()) | |
| 86 | - .setType(RoleTypeEnum.CUSTOM.getType())); | |
| 87 | - roleMapper.insert(roleDO); | |
| 88 | - | |
| 89 | - // 准备参数 | |
| 90 | - Long roleId = roleDO.getId(); | |
| 91 | - | |
| 92 | - // 调用 | |
| 93 | - roleService.updateRoleStatus(roleId, CommonStatusEnum.DISABLE.getStatus()); | |
| 94 | - // 断言 | |
| 95 | - RoleDO dbRoleDO = roleMapper.selectById(roleId); | |
| 96 | - assertEquals(CommonStatusEnum.DISABLE.getStatus(), dbRoleDO.getStatus()); | |
| 97 | - } | |
| 98 | - | |
| 99 | - @Test | |
| 100 | 83 | public void testUpdateRoleDataScope() { |
| 101 | 84 | // mock 数据 |
| 102 | 85 | RoleDO roleDO = randomPojo(RoleDO.class, o -> o.setType(RoleTypeEnum.CUSTOM.getType())); | ... | ... |
yudao-module-system/yudao-module-system-biz/src/test/resources/sql/create_tables.sql
| ... | ... | @@ -202,22 +202,15 @@ CREATE TABLE IF NOT EXISTS `system_operate_log` ( |
| 202 | 202 | `trace_id` varchar(64) NOT NULL DEFAULT '', |
| 203 | 203 | `user_id` bigint(20) NOT NULL, |
| 204 | 204 | "user_type" tinyint not null default '0', |
| 205 | - `module` varchar(50) NOT NULL, | |
| 206 | - `name` varchar(50) NOT NULL, | |
| 207 | - `type` bigint(4) NOT NULL DEFAULT '0', | |
| 208 | - `content` varchar(2000) NOT NULL DEFAULT '', | |
| 209 | - `exts` varchar(512) NOT NULL DEFAULT '', | |
| 205 | + `type` varchar(50) NOT NULL, | |
| 206 | + `sub_type` varchar(50) NOT NULL, | |
| 207 | + `biz_id` bigint(20) NOT NULL, | |
| 208 | + `action` varchar(2000) NOT NULL DEFAULT '', | |
| 209 | + `extra` varchar(512) NOT NULL DEFAULT '', | |
| 210 | 210 | `request_method` varchar(16) DEFAULT '', |
| 211 | 211 | `request_url` varchar(255) DEFAULT '', |
| 212 | 212 | `user_ip` varchar(50) DEFAULT NULL, |
| 213 | 213 | `user_agent` varchar(200) DEFAULT NULL, |
| 214 | - `java_method` varchar(512) NOT NULL DEFAULT '', | |
| 215 | - `java_method_args` varchar(8000) DEFAULT '', | |
| 216 | - `start_time` datetime NOT NULL, | |
| 217 | - `duration` int(11) NOT NULL, | |
| 218 | - `result_code` int(11) NOT NULL DEFAULT '0', | |
| 219 | - `result_msg` varchar(512) DEFAULT '', | |
| 220 | - `result_data` varchar(4000) DEFAULT '', | |
| 221 | 214 | `creator` varchar(64) DEFAULT '', |
| 222 | 215 | `create_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP, |
| 223 | 216 | `updater` varchar(64) DEFAULT '', | ... | ... |
yudao-server/src/main/resources/application-local.yaml
| ... | ... | @@ -268,17 +268,3 @@ justauth: |
| 268 | 268 | prefix: 'social_auth_state:' # 缓存前缀,目前只对 Redis 缓存生效,默认 JUSTAUTH::STATE:: |
| 269 | 269 | timeout: 24h # 超时时长,目前只对 Redis 缓存生效,默认 3 分钟 |
| 270 | 270 | |
| 271 | -# TODO 赤焰:这个配置的目的是? | |
| 272 | -#ureport配置 | |
| 273 | -#ureport: | |
| 274 | -# disableHttpSessionReportCache: true #是否禁用 | |
| 275 | -# disableFileProvider: true #是否禁用 | |
| 276 | -# debug: true | |
| 277 | -# fileStoreDir: D://ureport//files | |
| 278 | -# provider: | |
| 279 | -# database: | |
| 280 | -# disabled: true | |
| 281 | -# file: | |
| 282 | -# disabled: true | |
| 283 | - | |
| 284 | - | ... | ... |
yudao-server/src/main/resources/application.yaml
| ... | ... | @@ -91,6 +91,12 @@ spring: |
| 91 | 91 | redis: |
| 92 | 92 | repositories: |
| 93 | 93 | enabled: false # 项目未使用到 Spring Data Redis 的 Repository,所以直接禁用,保证启动速度 |
| 94 | + | |
| 95 | +# VO 转换(数据翻译)相关 | |
| 96 | +easy-trans: | |
| 97 | + is-enable-global: true # 启用全局翻译(拦截所有 SpringMVC ResponseBody 进行自动翻译 )。如果对于性能要求很高可关闭此配置,或通过 @IgnoreTrans 忽略某个接口 | |
| 98 | + is-enable-cloud: false # 禁用 TransType.RPC 微服务模式 | |
| 99 | + | |
| 94 | 100 | --- #################### 验证码相关配置 #################### |
| 95 | 101 | |
| 96 | 102 | aj: |
| ... | ... | @@ -194,7 +200,6 @@ yudao: |
| 194 | 200 | - /admin-api/system/sms/callback/* # 短信回调接口,无法带上租户编号 |
| 195 | 201 | - /admin-api/pay/notify/** # 支付回调通知,不携带租户编号 |
| 196 | 202 | - /jmreport/* # 积木报表,无法携带租户编号 |
| 197 | - - /ureport/* # UReport 报表,无法携带租户编号 | |
| 198 | 203 | - /admin-api/mp/open/** # 微信公众号开放平台,微信回调接口,无法携带租户编号 |
| 199 | 204 | ignore-tables: |
| 200 | 205 | - system_tenant |
| ... | ... | @@ -233,7 +238,6 @@ yudao: |
| 233 | 238 | - jimu_report_link |
| 234 | 239 | - jimu_report_map |
| 235 | 240 | - jimu_report_share |
| 236 | - - report_ureport_data | |
| 237 | 241 | - rep_demo_dxtj |
| 238 | 242 | - rep_demo_employee |
| 239 | 243 | - rep_demo_gongsi |
| ... | ... | @@ -266,10 +270,4 @@ debug: false |
| 266 | 270 | # 积木报表配置 |
| 267 | 271 | jeecg: |
| 268 | 272 | jmreport: |
| 269 | - saas-mode: tenant | |
| 270 | - | |
| 271 | -# UReport 配置 | |
| 272 | -ureport: | |
| 273 | - provider: | |
| 274 | - database: | |
| 275 | - disabled: false | |
| 273 | + saas-mode: tenant | |
| 276 | 274 | \ No newline at end of file | ... | ... |