Compare commits
52 Commits
v2026.03(j
...
master
| Author | SHA1 | Date |
|---|---|---|
|
|
d67f91a63e | |
|
|
f6b769fc2d | |
|
|
36fbb9a68b | |
|
|
25a823fe82 | |
|
|
3314376e59 | |
|
|
050edb2db7 | |
|
|
5088b8c2e2 | |
|
|
8637b2a28f | |
|
|
1702fc1acb | |
|
|
d5ab0b06a7 | |
|
|
5cf473d48e | |
|
|
9d1dd25bc7 | |
|
|
63cae8bc31 | |
|
|
568b0c29c0 | |
|
|
3f07aa3cd2 | |
|
|
42133c7141 | |
|
|
ff2dd155a6 | |
|
|
a53558cf4b | |
|
|
52e883d5be | |
|
|
32c353c53d | |
|
|
de4abc2f5f | |
|
|
9db40c8b80 | |
|
|
e657805544 | |
|
|
3e8eca7b8d | |
|
|
4b8346ec80 | |
|
|
e3e1b2b3d5 | |
|
|
3ba4104542 | |
|
|
23c934f727 | |
|
|
61bfcdfa00 | |
|
|
915885c825 | |
|
|
c8b85ad8a7 | |
|
|
63e6880a10 | |
|
|
4dabfea1df | |
|
|
11a6a049fd | |
|
|
d545eb5631 | |
|
|
1f7f85bddb | |
|
|
8f3b6cb0aa | |
|
|
6780ed6879 | |
|
|
d07426e43f | |
|
|
996ac02c0b | |
|
|
e3a34d9067 | |
|
|
116b6766b3 | |
|
|
6b91b4169d | |
|
|
8c7087ca2a | |
|
|
3e5e60ce96 | |
|
|
f57f0c551c | |
|
|
e1b3589bff | |
|
|
d66d1fcac0 | |
|
|
5fe868e096 | |
|
|
c3125dbc92 | |
|
|
adbcc60225 | |
|
|
2fe63be6c9 |
Binary file not shown.
|
Before Width: | Height: | Size: 64 KiB After Width: | Height: | Size: 41 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 216 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 54 KiB |
15
README.md
15
README.md
|
|
@ -31,8 +31,8 @@
|
||||||
| 【完整版】[yudao-cloud](https://gitee.com/zhijiantianya/yudao-cloud) | [`master`](https://gitee.com/zhijiantianya/yudao-cloud/tree/master/) 分支 | [`master-jdk17`](https://gitee.com/zhijiantianya/yudao-cloud/tree/master-jdk17/) 分支 |
|
| 【完整版】[yudao-cloud](https://gitee.com/zhijiantianya/yudao-cloud) | [`master`](https://gitee.com/zhijiantianya/yudao-cloud/tree/master/) 分支 | [`master-jdk17`](https://gitee.com/zhijiantianya/yudao-cloud/tree/master-jdk17/) 分支 |
|
||||||
| 【精简版】[yudao-cloud-mini](https://gitee.com/yudaocode/yudao-cloud-mini) | [`master`](https://gitee.com/yudaocode/yudao-cloud-mini/tree/master/) 分支 | [`master-jdk17`](https://gitee.com/yudaocode/yudao-cloud-mini/tree/master-jdk17/) 分支 |
|
| 【精简版】[yudao-cloud-mini](https://gitee.com/yudaocode/yudao-cloud-mini) | [`master`](https://gitee.com/yudaocode/yudao-cloud-mini/tree/master/) 分支 | [`master-jdk17`](https://gitee.com/yudaocode/yudao-cloud-mini/tree/master-jdk17/) 分支 |
|
||||||
|
|
||||||
* 【完整版】:包括系统功能、基础设施、会员中心、数据报表、工作流程、商城系统、微信公众号、CRM、ERP、MES、AI 大模型、IoT 物联网 等功能
|
* 【完整版】:包括系统功能、基础设施、会员中心、数据报表、工作流程、商城系统、微信公众号、CRM、ERP、WMS、MES、AI 大模型、IoT 物联网 等功能
|
||||||
* 【精简版】:只包括系统功能、基础设施功能,不包括会员中心、数据报表、工作流程、商城系统、微信公众号、CRM、ERP、MES、AI 大模型、IoT 物联网 等功能
|
* 【精简版】:只包括系统功能、基础设施功能,不包括会员中心、数据报表、工作流程、商城系统、微信公众号、CRM、ERP、WMS、MES、AI 大模型、IoT 物联网 等功能
|
||||||
|
|
||||||
可参考 [《迁移文档》](https://cloud.iocoder.cn/migrate-module/) ,只需要 5-10 分钟,即可将【完整版】按需迁移到【精简版】
|
可参考 [《迁移文档》](https://cloud.iocoder.cn/migrate-module/) ,只需要 5-10 分钟,即可将【完整版】按需迁移到【精简版】
|
||||||
|
|
||||||
|
|
@ -115,7 +115,7 @@
|
||||||
|
|
||||||
* 通用模块(必选):系统功能、基础设施
|
* 通用模块(必选):系统功能、基础设施
|
||||||
* 通用模块(可选):工作流程、支付系统、数据报表、会员中心
|
* 通用模块(可选):工作流程、支付系统、数据报表、会员中心
|
||||||
* 业务系统(按需):ERP 系统、CRM 系统、MES 系统、商城系统、微信公众号、AI 大模型、IoT 物联网
|
* 业务系统(按需):Mall 电子商城、OA 办公自动化、ERP 企业资源计划系统、WMS 仓库管理系统、CRM 客户关系管理、CMS 内容管理系统、MES 执行制造系统、AI 大模型平台、IoT 物联网系统、IM 即时通讯系统、Mobile 手机移动端、Report 数据大屏
|
||||||
|
|
||||||
> 友情提示:本项目基于 RuoYi-Vue 修改,**重构优化**后端的代码,**美化**前端的界面。
|
> 友情提示:本项目基于 RuoYi-Vue 修改,**重构优化**后端的代码,**美化**前端的界面。
|
||||||
>
|
>
|
||||||
|
|
@ -273,6 +273,14 @@
|
||||||
|
|
||||||

|

|
||||||
|
|
||||||
|
### WMS 系统
|
||||||
|
|
||||||
|
演示地址:<https://cloud.iocoder.cn/wms-preview/>
|
||||||
|
|
||||||
|

|
||||||
|
|
||||||
|

|
||||||
|
|
||||||
### CRM 系统
|
### CRM 系统
|
||||||
|
|
||||||
演示地址:<https://cloud.iocoder.cn/crm-preview/>
|
演示地址:<https://cloud.iocoder.cn/crm-preview/>
|
||||||
|
|
@ -321,6 +329,7 @@
|
||||||
| `yudao-module-erp` | ERP 系统的 Module 模块 |
|
| `yudao-module-erp` | ERP 系统的 Module 模块 |
|
||||||
| `yudao-module-crm` | CRM 系统的 Module 模块 |
|
| `yudao-module-crm` | CRM 系统的 Module 模块 |
|
||||||
| `yudao-module-mes` | MES 系统的 Module 模块 |
|
| `yudao-module-mes` | MES 系统的 Module 模块 |
|
||||||
|
| `yudao-module-wms` | WMS 系统的 Module 模块 |
|
||||||
| `yudao-module-ai` | AI 大模型的 Module 模块 |
|
| `yudao-module-ai` | AI 大模型的 Module 模块 |
|
||||||
| `yudao-module-iot` | IoT 物联网的 Module 模块 |
|
| `yudao-module-iot` | IoT 物联网的 Module 模块 |
|
||||||
| `yudao-module-mp` | 微信公众号的 Module 模块 |
|
| `yudao-module-mp` | 微信公众号的 Module 模块 |
|
||||||
|
|
|
||||||
3
pom.xml
3
pom.xml
|
|
@ -26,6 +26,7 @@
|
||||||
<module>yudao-module-crm</module>
|
<module>yudao-module-crm</module>
|
||||||
<module>yudao-module-iot</module>
|
<module>yudao-module-iot</module>
|
||||||
<module>yudao-module-mes</module>
|
<module>yudao-module-mes</module>
|
||||||
|
<module>yudao-module-wms</module>
|
||||||
<!-- 友情提示:基于 Spring AI 实现 LLM 大模型的接入,需要使用 JDK17 版本,详细可见 https://doc.iocoder.cn/ai/build/ -->
|
<!-- 友情提示:基于 Spring AI 实现 LLM 大模型的接入,需要使用 JDK17 版本,详细可见 https://doc.iocoder.cn/ai/build/ -->
|
||||||
<!-- <module>yudao-module-ai</module>-->
|
<!-- <module>yudao-module-ai</module>-->
|
||||||
</modules>
|
</modules>
|
||||||
|
|
@ -35,7 +36,7 @@
|
||||||
<url>https://github.com/YunaiV/ruoyi-vue-pro</url>
|
<url>https://github.com/YunaiV/ruoyi-vue-pro</url>
|
||||||
|
|
||||||
<properties>
|
<properties>
|
||||||
<revision>2026.03-jdk8-SNAPSHOT</revision>
|
<revision>2026.04-jdk8-SNAPSHOT</revision>
|
||||||
<!-- Maven 相关 -->
|
<!-- Maven 相关 -->
|
||||||
<java.version>1.8</java.version>
|
<java.version>1.8</java.version>
|
||||||
<maven.compiler.source>${java.version}</maven.compiler.source>
|
<maven.compiler.source>${java.version}</maven.compiler.source>
|
||||||
|
|
|
||||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
|
|
@ -11,7 +11,7 @@
|
||||||
Target Server Version : 80200 (8.2.0)
|
Target Server Version : 80200 (8.2.0)
|
||||||
File Encoding : 65001
|
File Encoding : 65001
|
||||||
|
|
||||||
Date: 18/04/2026 11:02:29
|
Date: 16/05/2026 06:24:32
|
||||||
*/
|
*/
|
||||||
|
|
||||||
SET NAMES utf8mb4;
|
SET NAMES utf8mb4;
|
||||||
|
|
@ -49,7 +49,7 @@ CREATE TABLE `infra_api_access_log` (
|
||||||
`tenant_id` bigint NOT NULL DEFAULT 0 COMMENT '租户编号',
|
`tenant_id` bigint NOT NULL DEFAULT 0 COMMENT '租户编号',
|
||||||
PRIMARY KEY (`id`) USING BTREE,
|
PRIMARY KEY (`id`) USING BTREE,
|
||||||
INDEX `idx_create_time`(`create_time` ASC) USING BTREE
|
INDEX `idx_create_time`(`create_time` ASC) USING BTREE
|
||||||
) ENGINE = InnoDB AUTO_INCREMENT = 36233 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci COMMENT = 'API 访问日志表';
|
) ENGINE = InnoDB AUTO_INCREMENT = 36301 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci COMMENT = 'API 访问日志表';
|
||||||
|
|
||||||
-- ----------------------------
|
-- ----------------------------
|
||||||
-- Records of infra_api_access_log
|
-- Records of infra_api_access_log
|
||||||
|
|
@ -92,7 +92,7 @@ CREATE TABLE `infra_api_error_log` (
|
||||||
`tenant_id` bigint NOT NULL DEFAULT 0 COMMENT '租户编号',
|
`tenant_id` bigint NOT NULL DEFAULT 0 COMMENT '租户编号',
|
||||||
PRIMARY KEY (`id`) USING BTREE,
|
PRIMARY KEY (`id`) USING BTREE,
|
||||||
INDEX `idx_create_time`(`create_time` ASC) USING BTREE
|
INDEX `idx_create_time`(`create_time` ASC) USING BTREE
|
||||||
) ENGINE = InnoDB AUTO_INCREMENT = 23726 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci COMMENT = '系统异常日志';
|
) ENGINE = InnoDB AUTO_INCREMENT = 23883 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci COMMENT = '系统异常日志';
|
||||||
|
|
||||||
-- ----------------------------
|
-- ----------------------------
|
||||||
-- Records of infra_api_error_log
|
-- Records of infra_api_error_log
|
||||||
|
|
@ -253,7 +253,7 @@ CREATE TABLE `infra_file` (
|
||||||
`update_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间',
|
`update_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间',
|
||||||
`deleted` bit(1) NOT NULL DEFAULT b'0' COMMENT '是否删除',
|
`deleted` bit(1) NOT NULL DEFAULT b'0' COMMENT '是否删除',
|
||||||
PRIMARY KEY (`id`) USING BTREE
|
PRIMARY KEY (`id`) USING BTREE
|
||||||
) ENGINE = InnoDB AUTO_INCREMENT = 2167 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci COMMENT = '文件表';
|
) ENGINE = InnoDB AUTO_INCREMENT = 2216 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci COMMENT = '文件表';
|
||||||
|
|
||||||
-- ----------------------------
|
-- ----------------------------
|
||||||
-- Records of infra_file
|
-- Records of infra_file
|
||||||
|
|
@ -462,7 +462,7 @@ CREATE TABLE `system_dict_data` (
|
||||||
`update_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间',
|
`update_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间',
|
||||||
`deleted` bit(1) NOT NULL DEFAULT b'0' COMMENT '是否删除',
|
`deleted` bit(1) NOT NULL DEFAULT b'0' COMMENT '是否删除',
|
||||||
PRIMARY KEY (`id`) USING BTREE
|
PRIMARY KEY (`id`) USING BTREE
|
||||||
) ENGINE = InnoDB AUTO_INCREMENT = 3449 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci COMMENT = '字典数据表';
|
) ENGINE = InnoDB AUTO_INCREMENT = 1061096 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci COMMENT = '字典数据表';
|
||||||
|
|
||||||
-- ----------------------------
|
-- ----------------------------
|
||||||
-- Records of system_dict_data
|
-- Records of system_dict_data
|
||||||
|
|
@ -1367,11 +1367,6 @@ INSERT INTO `system_dict_data` (`id`, `sort`, `label`, `value`, `dict_type`, `st
|
||||||
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 (3426, 3, '待上架', '3', 'mes_wm_return_sales_status', 0, 'primary', '', '', '1', '2026-04-03 17:20:25', '1', '2026-04-03 17:20:25', b'0');
|
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 (3426, 3, '待上架', '3', 'mes_wm_return_sales_status', 0, 'primary', '', '', '1', '2026-04-03 17:20:25', '1', '2026-04-03 17:20:25', b'0');
|
||||||
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 (3427, 4, '已完成', '4', 'mes_wm_return_sales_status', 0, 'success', '', '', '1', '2026-04-03 17:20:25', '1', '2026-04-03 17:20:25', b'0');
|
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 (3427, 4, '已完成', '4', 'mes_wm_return_sales_status', 0, 'success', '', '', '1', '2026-04-03 17:20:25', '1', '2026-04-03 17:20:25', b'0');
|
||||||
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 (3428, 5, '已取消', '5', 'mes_wm_return_sales_status', 0, 'danger', '', '', '1', '2026-04-03 17:20:25', '1', '2026-04-03 17:20:25', b'0');
|
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 (3428, 5, '已取消', '5', 'mes_wm_return_sales_status', 0, 'danger', '', '', '1', '2026-04-03 17:20:25', '1', '2026-04-03 17:20:25', b'0');
|
||||||
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 (3429, 1, '尺寸', '1', 'mes_defect_type', 0, '', '', '', '1', '2026-04-04 12:49:51', '1', '2026-04-09 15:03:20', b'0');
|
|
||||||
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 (3430, 2, '外观', '2', 'mes_defect_type', 0, '', '', '', '1', '2026-04-04 12:49:51', '1', '2026-04-09 15:03:20', b'0');
|
|
||||||
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 (3431, 3, '重量', '3', 'mes_defect_type', 0, '', '', '', '1', '2026-04-04 12:49:51', '1', '2026-04-09 15:03:20', b'0');
|
|
||||||
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 (3432, 4, '性能', '4', 'mes_defect_type', 0, '', '', '', '1', '2026-04-04 12:49:51', '1', '2026-04-09 15:03:20', b'0');
|
|
||||||
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 (3433, 5, '成分', '5', 'mes_defect_type', 0, '', '', '', '1', '2026-04-04 12:49:51', '1', '2026-04-09 15:03:20', b'0');
|
|
||||||
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 (3436, 1, '上工', '1', 'mes_pro_work_record_type', 0, 'success', '', '', '1', '2026-04-05 14:07:27', '1', '2026-04-05 14:07:27', b'0');
|
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 (3436, 1, '上工', '1', 'mes_pro_work_record_type', 0, 'success', '', '', '1', '2026-04-05 14:07:27', '1', '2026-04-05 14:07:27', b'0');
|
||||||
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 (3437, 2, '下工', '2', 'mes_pro_work_record_type', 0, 'danger', '', '', '1', '2026-04-05 14:07:27', '1', '2026-04-05 14:07:27', b'0');
|
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 (3437, 2, '下工', '2', 'mes_pro_work_record_type', 0, 'danger', '', '', '1', '2026-04-05 14:07:27', '1', '2026-04-05 14:07:27', b'0');
|
||||||
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 (3443, 1, '草稿', '0', 'mes_wm_product_produce_status', 0, 'info', '', '草稿状态', '1', '2026-04-05 15:53:46', '1', '2026-04-05 15:53:46', b'0');
|
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 (3443, 1, '草稿', '0', 'mes_wm_product_produce_status', 0, 'info', '', '草稿状态', '1', '2026-04-05 15:53:46', '1', '2026-04-05 15:53:46', b'0');
|
||||||
|
|
@ -1380,6 +1375,87 @@ INSERT INTO `system_dict_data` (`id`, `sort`, `label`, `value`, `dict_type`, `st
|
||||||
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 (3446, 0, 'è‰ç¨¿', '0', 'mes_pro_task_status', 0, '', '', NULL, '1', '2026-04-16 09:47:00', '1', '2026-04-16 09:47:00', b'0');
|
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 (3446, 0, 'è‰ç¨¿', '0', 'mes_pro_task_status', 0, '', '', NULL, '1', '2026-04-16 09:47:00', '1', '2026-04-16 09:47:00', b'0');
|
||||||
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 (3447, 1, '已完æˆ', '4', 'mes_pro_task_status', 0, '', '', NULL, '1', '2026-04-16 09:47:00', '1', '2026-04-16 09:47:00', b'0');
|
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 (3447, 1, '已完æˆ', '4', 'mes_pro_task_status', 0, '', '', NULL, '1', '2026-04-16 09:47:00', '1', '2026-04-16 09:47:00', b'0');
|
||||||
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 (3448, 2, '已喿¶ˆ', '5', 'mes_pro_task_status', 0, '', '', NULL, '1', '2026-04-16 09:47:00', '1', '2026-04-16 09:47:00', b'0');
|
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 (3448, 2, '已喿¶ˆ', '5', 'mes_pro_task_status', 0, '', '', NULL, '1', '2026-04-16 09:47:00', '1', '2026-04-16 09:47:00', b'0');
|
||||||
|
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 (3520, 1, '未读', '0', 'im_private_message_status', 0, 'warning', '', '私聊=未读,群聊=正常', 'admin', '2026-04-30 11:35:07', 'admin', '2026-04-30 15:14:36', b'0');
|
||||||
|
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 (3521, 2, '已撤回', '2', 'im_private_message_status', 0, 'danger', '', 'RECALL', 'admin', '2026-04-30 11:35:07', 'admin', '2026-04-30 15:14:36', b'0');
|
||||||
|
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 (3522, 3, '已读', '3', 'im_private_message_status', 0, 'success', '', 'READ(仅私聊)', 'admin', '2026-04-30 11:35:07', 'admin', '2026-04-30 15:14:36', b'0');
|
||||||
|
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 (3525, 1, '正常', '0', 'im_group_message_status', 0, 'success', '', '群聊正常(初始状态)', 'admin', '2026-04-30 15:14:36', 'admin', '2026-04-30 15:14:36', b'0');
|
||||||
|
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 (3526, 2, '已撤回', '2', 'im_group_message_status', 0, 'danger', '', '群聊已撤回', 'admin', '2026-04-30 15:14:36', 'admin', '2026-04-30 15:14:36', b'0');
|
||||||
|
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 (3530, 1, '不需要回执', '0', 'im_group_message_receipt_status', 0, 'info', '', 'NO_RECEIPT', 'admin', '2026-04-30 11:35:07', 'admin', '2026-04-30 11:35:07', b'0');
|
||||||
|
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 (3531, 2, '待完成', '1', 'im_group_message_receipt_status', 0, 'warning', '', 'PENDING', 'admin', '2026-04-30 11:35:07', 'admin', '2026-04-30 11:35:07', b'0');
|
||||||
|
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 (3532, 3, '已完成', '2', 'im_group_message_receipt_status', 0, 'success', '', 'DONE', 'admin', '2026-04-30 11:35:07', 'admin', '2026-04-30 11:35:07', b'0');
|
||||||
|
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 (3540, 1, '正常', '0', 'im_friend_status', 0, 'success', '', '正常好友关系', 'admin', '2026-04-30 11:35:07', 'admin', '2026-04-30 11:35:07', b'0');
|
||||||
|
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 (3541, 2, '已删除', '1', 'im_friend_status', 0, 'danger', '', '已删除好友关系', 'admin', '2026-04-30 11:35:07', 'admin', '2026-04-30 11:35:07', b'0');
|
||||||
|
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 (3550, 1, '正常', '0', 'im_group_status', 0, 'success', '', '群正常', 'admin', '2026-04-30 11:35:07', 'admin', '2026-04-30 11:35:07', b'0');
|
||||||
|
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 (3551, 2, '已解散', '1', 'im_group_status', 0, 'info', '', '群已解散', 'admin', '2026-04-30 11:35:07', 'admin', '2026-04-30 11:35:07', b'0');
|
||||||
|
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 (3552, 1, '群主', '1', 'im_group_member_role', 0, 'primary', '', NULL, '1', '2026-05-02 02:14:12', '1', '2026-05-02 02:14:12', b'0');
|
||||||
|
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 (3553, 2, '管理员', '2', 'im_group_member_role', 0, 'warning', '', NULL, '1', '2026-05-02 02:14:12', '1', '2026-05-02 02:14:12', b'0');
|
||||||
|
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 (3554, 3, '普通成员', '3', 'im_group_member_role', 0, 'info', '', NULL, '1', '2026-05-02 02:14:12', '1', '2026-05-02 02:14:12', b'0');
|
||||||
|
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 (3555, 1, '搜索', '1', 'im_friend_add_source', 0, 'default', '', NULL, '1', '2026-05-04 02:43:41', '1', '2026-05-05 11:46:57', b'0');
|
||||||
|
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 (3556, 2, '群聊', '2', 'im_friend_add_source', 0, 'default', '', NULL, '1', '2026-05-04 02:43:41', '1', '2026-05-05 11:46:53', b'0');
|
||||||
|
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 (3557, 3, '扫码', '3', 'im_friend_add_source', 0, 'default', '', NULL, '1', '2026-05-04 02:43:41', '1', '2026-05-05 11:46:50', b'0');
|
||||||
|
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 (3558, 4, '名片', '4', 'im_friend_add_source', 0, 'default', '', NULL, '1', '2026-05-04 02:43:41', '1', '2026-05-05 11:46:48', b'0');
|
||||||
|
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 (3559, 1, '等待验证', '0', 'im_friend_request_handle_result', 0, 'warning', '', NULL, '1', '2026-05-04 02:43:41', '1', '2026-05-04 02:43:41', b'0');
|
||||||
|
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 (3560, 2, '已添加', '1', 'im_friend_request_handle_result', 0, 'success', '', NULL, '1', '2026-05-04 02:43:41', '1', '2026-05-04 02:43:41', b'0');
|
||||||
|
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 (3561, 3, '已拒绝', '2', 'im_friend_request_handle_result', 0, 'info', '', NULL, '1', '2026-05-04 02:43:41', '1', '2026-05-04 02:43:41', b'0');
|
||||||
|
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 (3562, 101, '文本', '101', 'im_message_type', 0, '', '', NULL, 'admin', '2026-05-05 11:52:30', 'admin', '2026-05-05 11:52:30', b'0');
|
||||||
|
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 (3563, 102, '图片', '102', 'im_message_type', 0, 'success', '', NULL, 'admin', '2026-05-05 11:52:30', 'admin', '2026-05-05 11:52:30', b'0');
|
||||||
|
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 (3564, 103, '语音', '103', 'im_message_type', 0, 'warning', '', NULL, 'admin', '2026-05-05 11:52:30', 'admin', '2026-05-05 11:52:30', b'0');
|
||||||
|
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 (3565, 104, '视频', '104', 'im_message_type', 0, 'warning', '', NULL, 'admin', '2026-05-05 11:52:30', 'admin', '2026-05-05 11:52:30', b'0');
|
||||||
|
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 (3566, 105, '文件', '105', 'im_message_type', 0, 'info', '', NULL, 'admin', '2026-05-05 11:52:30', 'admin', '2026-05-05 11:52:30', b'0');
|
||||||
|
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 (3568, 2101, '撤回', '2101', 'im_message_type', 0, 'danger', '', NULL, 'admin', '2026-05-05 11:52:30', 'admin', '2026-05-05 11:52:30', b'0');
|
||||||
|
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 (3569, 2200, '回执', '2200', 'im_message_type', 0, 'warning', '', NULL, 'admin', '2026-05-05 11:52:30', 'admin', '2026-05-05 11:52:30', b'0');
|
||||||
|
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 (3570, 2201, '已读', '2201', 'im_message_type', 0, 'success', '', NULL, 'admin', '2026-05-05 11:52:30', 'admin', '2026-05-05 11:52:30', b'0');
|
||||||
|
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 (3571, 1501, '群创建', '1501', 'im_message_type', 0, 'success', '', NULL, 'admin', '2026-05-05 11:52:30', 'admin', '2026-05-05 11:52:30', b'0');
|
||||||
|
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 (3572, 1502, '群信息变更', '1502', 'im_message_type', 0, 'success', '', NULL, 'admin', '2026-05-05 11:52:30', 'admin', '2026-05-05 11:52:30', b'0');
|
||||||
|
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 (3573, 1503, '入群申请', '1503', 'im_message_type', 0, 'success', '', NULL, 'admin', '2026-05-05 11:52:30', 'admin', '2026-05-05 11:52:30', b'0');
|
||||||
|
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 (3574, 1504, '成员退群', '1504', 'im_message_type', 0, 'success', '', NULL, 'admin', '2026-05-05 11:52:30', 'admin', '2026-05-05 11:52:30', b'0');
|
||||||
|
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 (3575, 1505, '入群申请通过', '1505', 'im_message_type', 0, 'success', '', NULL, 'admin', '2026-05-05 11:52:30', 'admin', '2026-05-05 11:52:30', b'0');
|
||||||
|
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 (3576, 1506, '入群申请拒绝', '1506', 'im_message_type', 0, 'success', '', NULL, 'admin', '2026-05-05 11:52:30', 'admin', '2026-05-05 11:52:30', b'0');
|
||||||
|
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 (3577, 1507, '群主转让', '1507', 'im_message_type', 0, 'success', '', NULL, 'admin', '2026-05-05 11:52:30', 'admin', '2026-05-05 11:52:30', b'0');
|
||||||
|
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 (3578, 1508, '成员被移出', '1508', 'im_message_type', 0, 'success', '', NULL, 'admin', '2026-05-05 11:52:30', 'admin', '2026-05-05 11:52:30', b'0');
|
||||||
|
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 (3579, 1509, '成员加入', '1509', 'im_message_type', 0, 'success', '', NULL, 'admin', '2026-05-05 11:52:30', 'admin', '2026-05-05 11:52:30', b'0');
|
||||||
|
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 (3580, 1510, '自由进群', '1510', 'im_message_type', 0, 'success', '', NULL, 'admin', '2026-05-05 11:52:30', 'admin', '2026-05-05 11:52:30', b'0');
|
||||||
|
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 (3581, 1511, '群解散', '1511', 'im_message_type', 0, 'success', '', NULL, 'admin', '2026-05-05 11:52:30', 'admin', '2026-05-05 11:52:30', b'0');
|
||||||
|
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 (3582, 1512, '成员禁言', '1512', 'im_message_type', 0, 'success', '', NULL, 'admin', '2026-05-05 11:52:30', 'admin', '2026-05-05 11:52:30', b'0');
|
||||||
|
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 (3583, 1513, '成员取消禁言', '1513', 'im_message_type', 0, 'success', '', NULL, 'admin', '2026-05-05 11:52:30', 'admin', '2026-05-05 11:52:30', b'0');
|
||||||
|
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 (3584, 1514, '全群禁言', '1514', 'im_message_type', 0, 'success', '', NULL, 'admin', '2026-05-05 11:52:30', 'admin', '2026-05-05 11:52:30', b'0');
|
||||||
|
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 (3585, 1515, '全群取消禁言', '1515', 'im_message_type', 0, 'success', '', NULL, 'admin', '2026-05-05 11:52:30', 'admin', '2026-05-05 11:52:30', b'0');
|
||||||
|
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 (3586, 1516, '成员昵称变更', '1516', 'im_message_type', 0, 'success', '', NULL, 'admin', '2026-05-05 11:52:30', 'admin', '2026-05-05 11:52:30', b'0');
|
||||||
|
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 (3587, 1517, '添加管理员', '1517', 'im_message_type', 0, 'success', '', NULL, 'admin', '2026-05-05 11:52:30', 'admin', '2026-05-05 11:52:30', b'0');
|
||||||
|
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 (3588, 1518, '撤销管理员', '1518', 'im_message_type', 0, 'success', '', NULL, 'admin', '2026-05-05 11:52:30', 'admin', '2026-05-05 11:52:30', b'0');
|
||||||
|
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 (3589, 1519, '群公告变更', '1519', 'im_message_type', 0, 'success', '', NULL, 'admin', '2026-05-05 11:52:30', 'admin', '2026-05-05 11:52:30', b'0');
|
||||||
|
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 (3590, 1520, '群名变更', '1520', 'im_message_type', 0, 'success', '', NULL, 'admin', '2026-05-05 11:52:30', 'admin', '2026-05-05 11:52:30', b'0');
|
||||||
|
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 (3591, 1531, '群消息置顶', '1531', 'im_message_type', 0, 'success', '', NULL, 'admin', '2026-05-05 11:52:30', 'admin', '2026-05-05 11:52:30', b'0');
|
||||||
|
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 (3592, 1532, '群消息取消置顶', '1532', 'im_message_type', 0, 'success', '', NULL, 'admin', '2026-05-05 11:52:30', 'admin', '2026-05-05 11:52:30', b'0');
|
||||||
|
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 (3593, 1533, '群封禁变更', '1533', 'im_message_type', 0, 'success', '', NULL, 'admin', '2026-05-05 11:52:30', 'admin', '2026-05-05 11:52:30', b'0');
|
||||||
|
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 (3594, 1204, '新增好友', '1204', 'im_message_type', 0, 'success', '', NULL, 'admin', '2026-05-05 13:26:53', 'admin', '2026-05-05 13:26:53', b'0');
|
||||||
|
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 (3595, 1205, '好友被删除', '1205', 'im_message_type', 0, 'warning', '', NULL, 'admin', '2026-05-05 13:26:53', 'admin', '2026-05-05 13:26:53', b'0');
|
||||||
|
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 (3596, 1, '搜索', '1', 'im_group_add_source', 0, '', '', NULL, '', '2026-05-06 09:26:36', '', '2026-05-06 09:26:36', b'0');
|
||||||
|
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 (3597, 2, '邀请', '2', 'im_group_add_source', 0, '', '', NULL, '', '2026-05-06 09:26:36', '', '2026-05-06 09:26:36', b'0');
|
||||||
|
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 (3598, 3, '扫码', '3', 'im_group_add_source', 0, '', '', NULL, '', '2026-05-06 09:26:36', '', '2026-05-06 09:26:36', b'0');
|
||||||
|
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 (3599, 4, '分享链接', '4', 'im_group_add_source', 0, '', '', NULL, '', '2026-05-06 09:26:36', '', '2026-05-06 09:26:36', b'0');
|
||||||
|
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 (3600, 1, '未处理', '0', 'im_group_request_handle_result', 0, '', '', NULL, '', '2026-05-06 09:26:36', '', '2026-05-06 09:26:36', b'0');
|
||||||
|
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 (3601, 2, '同意', '1', 'im_group_request_handle_result', 0, '', '', NULL, '', '2026-05-06 09:26:36', '', '2026-05-06 09:26:36', b'0');
|
||||||
|
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 (3602, 3, '拒绝', '2', 'im_group_request_handle_result', 0, '', '', NULL, '', '2026-05-06 09:26:36', '', '2026-05-06 09:26:36', b'0');
|
||||||
|
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 (1061051, 1, '客户', '1', 'merchant_type', 0, 'primary', '', '客户', '1', '2026-05-10 15:26:09', '1', '2026-05-10 15:26:09', b'0');
|
||||||
|
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 (1061052, 2, '供应商', '2', 'merchant_type', 0, 'success', '', '供应商', '1', '2026-05-10 15:26:09', '1', '2026-05-10 15:26:09', b'0');
|
||||||
|
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 (1061053, 3, '客户/供应商', '3', 'merchant_type', 0, 'warning', '', '客户/供应商', '1', '2026-05-10 15:26:09', '1', '2026-05-10 15:26:09', b'0');
|
||||||
|
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 (1061061, 1, '入库单', '1', 'wms_order_type', 0, 'success', '', '', '1', '2026-05-10 17:51:46', '1', '2026-05-14 08:14:09', b'0');
|
||||||
|
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 (1061062, 2, '出库单', '2', 'wms_order_type', 0, 'danger', '', '', '1', '2026-05-10 17:51:46', '1', '2026-05-14 08:14:09', b'0');
|
||||||
|
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 (1061063, 3, '移库单', '3', 'wms_order_type', 0, 'primary', '', '', '1', '2026-05-10 17:51:46', '1', '2026-05-14 08:14:09', b'0');
|
||||||
|
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 (1061064, 4, '盘库单', '4', 'wms_order_type', 0, 'warning', '', '', '1', '2026-05-10 17:51:46', '1', '2026-05-14 08:14:09', b'0');
|
||||||
|
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 (1061071, 1, '草稿', '0', 'wms_order_status', 0, 'info', '', '草稿', '1', '2026-05-12 13:40:29', '1', '2026-05-12 13:40:29', b'0');
|
||||||
|
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 (1061072, 2, '已完成', '4', 'wms_order_status', 0, 'success', '', '已完成', '1', '2026-05-12 13:40:29', '1', '2026-05-12 13:40:29', b'0');
|
||||||
|
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 (1061073, 3, '已作废', '5', 'wms_order_status', 0, 'danger', '', '已作废', '1', '2026-05-12 13:40:29', '1', '2026-05-12 13:40:29', b'0');
|
||||||
|
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 (1061081, 1, '生产入库', '100', 'wms_receipt_order_type', 0, 'success', '', '', '1', '2026-05-11 11:21:49', '1', '2026-05-14 02:21:20', b'0');
|
||||||
|
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 (1061082, 2, '采购入库', '101', 'wms_receipt_order_type', 0, 'primary', '', '', '1', '2026-05-11 11:21:49', '1', '2026-05-14 02:21:20', b'0');
|
||||||
|
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 (1061083, 3, '退货入库', '102', 'wms_receipt_order_type', 0, 'warning', '', '', '1', '2026-05-11 11:21:49', '1', '2026-05-14 02:21:20', b'0');
|
||||||
|
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 (1061084, 4, '归还入库', '103', 'wms_receipt_order_type', 0, 'info', '', '', '1', '2026-05-13 16:02:33', '1', '2026-05-14 02:21:20', b'0');
|
||||||
|
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 (1061091, 1, '退货出库', '200', 'wms_shipment_order_type', 0, 'warning', '', '退货出库', '1', '2026-05-12 17:48:35', '1', '2026-05-12 17:48:35', b'0');
|
||||||
|
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 (1061092, 2, '销售出库', '201', 'wms_shipment_order_type', 0, 'primary', '', '销售出库', '1', '2026-05-12 17:48:35', '1', '2026-05-12 17:48:35', b'0');
|
||||||
|
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 (1061093, 3, '生产出库', '202', 'wms_shipment_order_type', 0, 'success', '', '生产出库', '1', '2026-05-12 17:48:35', '1', '2026-05-12 17:48:35', b'0');
|
||||||
|
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 (1061094, 1, 'è¯éŸ³', '1', 'im_rtc_call_media_type', 0, '', '', 'è¯éŸ³é€šè¯', 'admin', '2026-05-14 13:48:31', 'admin', '2026-05-14 13:48:31', b'0');
|
||||||
|
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 (1061095, 2, '视频', '2', 'im_rtc_call_media_type', 0, '', '', '视频通è¯', 'admin', '2026-05-14 13:48:31', 'admin', '2026-05-14 13:48:31', b'0');
|
||||||
COMMIT;
|
COMMIT;
|
||||||
|
|
||||||
-- ----------------------------
|
-- ----------------------------
|
||||||
|
|
@ -1399,7 +1475,7 @@ CREATE TABLE `system_dict_type` (
|
||||||
`deleted` bit(1) NOT NULL DEFAULT b'0' COMMENT '是否删除',
|
`deleted` bit(1) NOT NULL DEFAULT b'0' COMMENT '是否删除',
|
||||||
`deleted_time` datetime NULL DEFAULT NULL COMMENT '删除时间',
|
`deleted_time` datetime NULL DEFAULT NULL COMMENT '删除时间',
|
||||||
PRIMARY KEY (`id`) USING BTREE
|
PRIMARY KEY (`id`) USING BTREE
|
||||||
) ENGINE = InnoDB AUTO_INCREMENT = 2139 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci COMMENT = '字典类型表';
|
) ENGINE = InnoDB AUTO_INCREMENT = 1061092 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci COMMENT = '字典类型表';
|
||||||
|
|
||||||
-- ----------------------------
|
-- ----------------------------
|
||||||
-- Records of system_dict_type
|
-- Records of system_dict_type
|
||||||
|
|
@ -1588,9 +1664,25 @@ INSERT INTO `system_dict_type` (`id`, `name`, `type`, `status`, `remark`, `creat
|
||||||
INSERT INTO `system_dict_type` (`id`, `name`, `type`, `status`, `remark`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `deleted_time`) VALUES (2131, 'MES 发货通知单状态', 'mes_wm_sales_notice_status', 0, 'MES 发货通知单状态', '1', '2026-03-30 08:54:30', '1', '2026-04-05 15:53:46', b'0', NULL);
|
INSERT INTO `system_dict_type` (`id`, `name`, `type`, `status`, `remark`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `deleted_time`) VALUES (2131, 'MES 发货通知单状态', 'mes_wm_sales_notice_status', 0, 'MES 发货通知单状态', '1', '2026-03-30 08:54:30', '1', '2026-04-05 15:53:46', b'0', NULL);
|
||||||
INSERT INTO `system_dict_type` (`id`, `name`, `type`, `status`, `remark`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `deleted_time`) VALUES (2132, 'MES 杂项出库单状态', 'mes_wm_misc_issue_status', 0, '杂项出库单状态', '1', '2026-03-30 15:00:18', '1', '2026-04-05 15:05:41', b'0', NULL);
|
INSERT INTO `system_dict_type` (`id`, `name`, `type`, `status`, `remark`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `deleted_time`) VALUES (2132, 'MES 杂项出库单状态', 'mes_wm_misc_issue_status', 0, '杂项出库单状态', '1', '2026-03-30 15:00:18', '1', '2026-04-05 15:05:41', b'0', NULL);
|
||||||
INSERT INTO `system_dict_type` (`id`, `name`, `type`, `status`, `remark`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `deleted_time`) VALUES (2133, 'MES 销售退货单状态', 'mes_wm_return_sales_status', 0, 'MES 销售退货单状态枚举', '1', '2026-04-03 17:20:25', '1', '2026-04-05 15:05:39', b'0', NULL);
|
INSERT INTO `system_dict_type` (`id`, `name`, `type`, `status`, `remark`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `deleted_time`) VALUES (2133, 'MES 销售退货单状态', 'mes_wm_return_sales_status', 0, 'MES 销售退货单状态枚举', '1', '2026-04-03 17:20:25', '1', '2026-04-05 15:05:39', b'0', NULL);
|
||||||
INSERT INTO `system_dict_type` (`id`, `name`, `type`, `status`, `remark`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `deleted_time`) VALUES (2134, 'MES 缺陷检测项类型', 'mes_defect_type', 0, '缺陷模块的检测项类型字典', '1', '2026-04-04 12:49:51', '1', '2026-04-04 12:49:51', b'0', NULL);
|
|
||||||
INSERT INTO `system_dict_type` (`id`, `name`, `type`, `status`, `remark`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `deleted_time`) VALUES (2135, 'MES 上下工状态类型', 'mes_pro_work_record_type', 0, 'MES 上下工状态类型', '1', '2026-04-05 14:07:27', '1', '2026-04-05 14:07:27', b'0', NULL);
|
INSERT INTO `system_dict_type` (`id`, `name`, `type`, `status`, `remark`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `deleted_time`) VALUES (2135, 'MES 上下工状态类型', 'mes_pro_work_record_type', 0, 'MES 上下工状态类型', '1', '2026-04-05 14:07:27', '1', '2026-04-05 14:07:27', b'0', NULL);
|
||||||
INSERT INTO `system_dict_type` (`id`, `name`, `type`, `status`, `remark`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `deleted_time`) VALUES (2138, 'MES 生产入库单状态', 'mes_wm_product_produce_status', 0, 'MES 生产入库单状态', '1', '2026-04-05 15:53:46', '1', '2026-04-05 15:53:46', b'0', '1970-01-01 00:00:00');
|
INSERT INTO `system_dict_type` (`id`, `name`, `type`, `status`, `remark`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `deleted_time`) VALUES (2138, 'MES 生产入库单状态', 'mes_wm_product_produce_status', 0, 'MES 生产入库单状态', '1', '2026-04-05 15:53:46', '1', '2026-04-05 15:53:46', b'0', '1970-01-01 00:00:00');
|
||||||
|
INSERT INTO `system_dict_type` (`id`, `name`, `type`, `status`, `remark`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `deleted_time`) VALUES (2200, 'IM 消息类型', 'im_message_type', 0, '对应 ImMessageTypeEnum', 'admin', '2026-04-30 11:35:07', 'admin', '2026-04-30 11:35:07', b'0', NULL);
|
||||||
|
INSERT INTO `system_dict_type` (`id`, `name`, `type`, `status`, `remark`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `deleted_time`) VALUES (2201, 'IM 私聊消息状态', 'im_private_message_status', 0, '对应 ImMessageStatusEnum;私聊 0=未读 / 2=已撤回 / 3=已读', 'admin', '2026-04-30 11:35:07', 'admin', '2026-04-30 15:14:36', b'0', NULL);
|
||||||
|
INSERT INTO `system_dict_type` (`id`, `name`, `type`, `status`, `remark`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `deleted_time`) VALUES (2202, 'IM 群消息回执状态', 'im_group_message_receipt_status', 0, '对应 ImGroupMessageReceiptStatusEnum', 'admin', '2026-04-30 11:35:07', 'admin', '2026-04-30 11:35:07', b'0', NULL);
|
||||||
|
INSERT INTO `system_dict_type` (`id`, `name`, `type`, `status`, `remark`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `deleted_time`) VALUES (2203, 'IM 好友状态', 'im_friend_status', 0, '0=正常 / 1=已删除', 'admin', '2026-04-30 11:35:07', 'admin', '2026-04-30 11:35:07', b'0', NULL);
|
||||||
|
INSERT INTO `system_dict_type` (`id`, `name`, `type`, `status`, `remark`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `deleted_time`) VALUES (2204, 'IM 群状态', 'im_group_status', 0, '0=正常 / 1=已解散', 'admin', '2026-04-30 11:35:07', 'admin', '2026-04-30 11:35:07', b'0', NULL);
|
||||||
|
INSERT INTO `system_dict_type` (`id`, `name`, `type`, `status`, `remark`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `deleted_time`) VALUES (2205, 'IM 群聊消息状态', 'im_group_message_status', 0, '对应 ImMessageStatusEnum;群聊 0=正常 / 2=已撤回(无未读概念)', 'admin', '2026-04-30 15:14:36', 'admin', '2026-04-30 15:14:36', b'0', NULL);
|
||||||
|
INSERT INTO `system_dict_type` (`id`, `name`, `type`, `status`, `remark`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `deleted_time`) VALUES (2206, 'IM 群成员角色', 'im_group_member_role', 0, NULL, '1', '2026-05-02 02:14:12', '1', '2026-05-02 02:14:12', b'0', NULL);
|
||||||
|
INSERT INTO `system_dict_type` (`id`, `name`, `type`, `status`, `remark`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `deleted_time`) VALUES (2207, 'IM 好友添加来源', 'im_friend_add_source', 0, NULL, '1', '2026-05-04 02:43:41', '1', '2026-05-04 02:43:41', b'0', NULL);
|
||||||
|
INSERT INTO `system_dict_type` (`id`, `name`, `type`, `status`, `remark`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `deleted_time`) VALUES (2208, 'IM 好友申请处理结果', 'im_friend_request_handle_result', 0, NULL, '1', '2026-05-04 02:43:41', '1', '2026-05-04 02:43:41', b'0', NULL);
|
||||||
|
INSERT INTO `system_dict_type` (`id`, `name`, `type`, `status`, `remark`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `deleted_time`) VALUES (2209, 'IM 加群来源', 'im_group_add_source', 0, NULL, '', '2026-05-06 09:26:36', '', '2026-05-06 09:26:36', b'0', NULL);
|
||||||
|
INSERT INTO `system_dict_type` (`id`, `name`, `type`, `status`, `remark`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `deleted_time`) VALUES (2210, 'IM 加群申请处理结果', 'im_group_request_handle_result', 0, NULL, '', '2026-05-06 09:26:36', '', '2026-05-06 09:26:36', b'0', NULL);
|
||||||
|
INSERT INTO `system_dict_type` (`id`, `name`, `type`, `status`, `remark`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `deleted_time`) VALUES (1061050, '往来企业类型', 'merchant_type', 0, 'WMS 往来企业类型', '1', '2026-05-10 15:26:09', '1', '2026-05-10 15:26:09', b'0', NULL);
|
||||||
|
INSERT INTO `system_dict_type` (`id`, `name`, `type`, `status`, `remark`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `deleted_time`) VALUES (1061060, 'WMS 单据类型', 'wms_order_type', 0, 'WMS 单据类型', '1', '2026-05-10 17:51:46', '1', '2026-05-14 08:14:09', b'0', NULL);
|
||||||
|
INSERT INTO `system_dict_type` (`id`, `name`, `type`, `status`, `remark`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `deleted_time`) VALUES (1061070, 'WMS 单据状态', 'wms_order_status', 0, 'WMS 单据状态', '1', '2026-05-12 13:40:29', '1', '2026-05-12 13:40:29', b'0', NULL);
|
||||||
|
INSERT INTO `system_dict_type` (`id`, `name`, `type`, `status`, `remark`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `deleted_time`) VALUES (1061080, '入库单类型', 'wms_receipt_order_type', 0, 'WMS 入库单类型', '1', '2026-05-11 11:21:49', '1', '2026-05-12 13:40:29', b'0', NULL);
|
||||||
|
INSERT INTO `system_dict_type` (`id`, `name`, `type`, `status`, `remark`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `deleted_time`) VALUES (1061090, '出库单类型', 'wms_shipment_order_type', 0, 'WMS 出库单类型', '1', '2026-05-12 17:48:35', '1', '2026-05-12 17:48:35', b'0', NULL);
|
||||||
|
INSERT INTO `system_dict_type` (`id`, `name`, `type`, `status`, `remark`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `deleted_time`) VALUES (1061091, 'IM 通è¯åª’体类型', 'im_rtc_call_media_type', 0, NULL, 'admin', '2026-05-14 13:48:31', 'admin', '2026-05-14 13:48:31', b'0', NULL);
|
||||||
COMMIT;
|
COMMIT;
|
||||||
|
|
||||||
-- ----------------------------
|
-- ----------------------------
|
||||||
|
|
@ -1616,7 +1708,7 @@ CREATE TABLE `system_login_log` (
|
||||||
PRIMARY KEY (`id`) USING BTREE,
|
PRIMARY KEY (`id`) USING BTREE,
|
||||||
INDEX `idx_username`(`username` ASC) USING BTREE,
|
INDEX `idx_username`(`username` ASC) USING BTREE,
|
||||||
INDEX `idx_create_time`(`create_time` ASC) USING BTREE
|
INDEX `idx_create_time`(`create_time` ASC) USING BTREE
|
||||||
) ENGINE = InnoDB AUTO_INCREMENT = 4512 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci COMMENT = '系统访问记录';
|
) ENGINE = InnoDB AUTO_INCREMENT = 4557 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci COMMENT = '系统访问记录';
|
||||||
|
|
||||||
-- ----------------------------
|
-- ----------------------------
|
||||||
-- Records of system_login_log
|
-- Records of system_login_log
|
||||||
|
|
@ -1749,7 +1841,7 @@ CREATE TABLE `system_menu` (
|
||||||
`update_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间',
|
`update_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间',
|
||||||
`deleted` bit(1) NOT NULL DEFAULT b'0' COMMENT '是否删除',
|
`deleted` bit(1) NOT NULL DEFAULT b'0' COMMENT '是否删除',
|
||||||
PRIMARY KEY (`id`) USING BTREE
|
PRIMARY KEY (`id`) USING BTREE
|
||||||
) ENGINE = InnoDB AUTO_INCREMENT = 5986 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci COMMENT = '菜单权限表';
|
) ENGINE = InnoDB AUTO_INCREMENT = 6611 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci COMMENT = '菜单权限表';
|
||||||
|
|
||||||
-- ----------------------------
|
-- ----------------------------
|
||||||
-- Records of system_menu
|
-- Records of system_menu
|
||||||
|
|
@ -2691,7 +2783,7 @@ INSERT INTO `system_menu` (`id`, `name`, `permission`, `type`, `sort`, `parent_i
|
||||||
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 (5044, '删除模版消息', 'mp:message-template:delete', 3, 2, 5042, '', '', '', '', 0, b'1', b'1', b'1', '1', '2025-11-26 17:00:31', '1', '2025-11-26 18:45:05', b'0');
|
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 (5044, '删除模版消息', 'mp:message-template:delete', 3, 2, 5042, '', '', '', '', 0, b'1', b'1', b'1', '1', '2025-11-26 17:00:31', '1', '2025-11-26 18:45:05', b'0');
|
||||||
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 (5045, '同步公众号模板', 'mp:message-template:sync', 3, 3, 5042, '', '', '', '', 0, b'1', b'1', b'1', '1', '2025-11-26 17:00:55', '1', '2025-11-26 17:00:55', b'0');
|
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 (5045, '同步公众号模板', 'mp:message-template:sync', 3, 3, 5042, '', '', '', '', 0, b'1', b'1', b'1', '1', '2025-11-26 17:00:55', '1', '2025-11-26 17:00:55', b'0');
|
||||||
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 (5046, '给粉丝发送模版消息', 'mp:message-template:send', 3, 4, 5042, '', '', '', '', 0, b'1', b'1', b'1', '1', '2025-11-26 17:01:11', '1', '2025-11-26 17:01:11', b'0');
|
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 (5046, '给粉丝发送模版消息', 'mp:message-template:send', 3, 4, 5042, '', '', '', '', 0, b'1', b'1', b'1', '1', '2025-11-26 17:01:11', '1', '2025-11-26 17:01:11', b'0');
|
||||||
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 (5100, 'MES 系统', '', 1, 500, 0, '/mes', 'ep:cpu', '', '', 0, b'1', b'1', b'1', '1', '2026-02-15 00:39:57', '1', '2026-04-05 23:22:56', b'0');
|
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 (5100, 'MES 系统', '', 1, 320, 0, '/mes', 'ep:cpu', '', '', 0, b'1', b'1', b'1', '1', '2026-02-15 00:39:57', '1', '2026-05-09 16:19:51', b'0');
|
||||||
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 (5101, '基础数据', '', 1, 10, 5100, 'md', 'ep:data-analysis', '', '', 0, b'1', b'1', b'1', '1', '2026-02-15 00:40:13', '1', '2026-02-15 00:40:13', b'0');
|
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 (5101, '基础数据', '', 1, 10, 5100, 'md', 'ep:data-analysis', '', '', 0, b'1', b'1', b'1', '1', '2026-02-15 00:40:13', '1', '2026-02-15 00:40:13', b'0');
|
||||||
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 (5110, '物料产品分类', '', 2, 2, 5101, 'item-type', 'ep:files', 'mes/md/item/type/index', 'MesMdItemType', 0, b'1', b'1', b'1', '1', '2026-02-15 00:40:13', '1', '2026-02-15 13:58:29', b'0');
|
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 (5110, '物料产品分类', '', 2, 2, 5101, 'item-type', 'ep:files', 'mes/md/item/type/index', 'MesMdItemType', 0, b'1', b'1', b'1', '1', '2026-02-15 00:40:13', '1', '2026-02-15 13:58:29', b'0');
|
||||||
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 (5111, '分类查询', 'mes:md-item-type:query', 3, 1, 5110, '', '', '', '', 0, b'1', b'1', b'1', '1', '2026-02-15 00:40:13', '1', '2026-02-15 00:40:13', b'0');
|
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 (5111, '分类查询', 'mes:md-item-type:query', 3, 1, 5110, '', '', '', '', 0, b'1', b'1', b'1', '1', '2026-02-15 00:40:13', '1', '2026-02-15 00:40:13', b'0');
|
||||||
|
|
@ -3076,6 +3168,108 @@ INSERT INTO `system_menu` (`id`, `name`, `permission`, `type`, `sort`, `parent_i
|
||||||
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 (5983, '工作记录导出', 'mes:pro-workrecord:export', 3, 2, 5981, '', '', '', '', 0, b'1', b'1', b'1', '1', '2026-04-05 14:08:44', '1', '2026-04-05 14:08:44', b'0');
|
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 (5983, '工作记录导出', 'mes:pro-workrecord:export', 3, 2, 5981, '', '', '', '', 0, b'1', b'1', b'1', '1', '2026-04-05 14:08:44', '1', '2026-04-05 14:08:44', b'0');
|
||||||
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 (5984, '上工下工', 'mes:pro-workrecord:clock', 3, 3, 5981, '', '', '', '', 0, b'1', b'1', b'1', '1', '2026-04-05 14:08:44', '1', '2026-04-05 14:08:44', b'0');
|
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 (5984, '上工下工', 'mes:pro-workrecord:clock', 3, 3, 5981, '', '', '', '', 0, b'1', b'1', b'1', '1', '2026-04-05 14:08:44', '1', '2026-04-05 14:08:44', b'0');
|
||||||
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 (5985, 'MES 首页', 'mes:home:query', 2, 0, 5100, 'mes/home/index', 'ep:home-filled', 'mes/home/index', 'MesHome', 0, b'1', b'1', b'1', '1', '2026-04-05 23:24:03', '1', '2026-04-06 01:20:52', b'0');
|
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 (5985, 'MES 首页', 'mes:home:query', 2, 0, 5100, 'mes/home/index', 'ep:home-filled', 'mes/home/index', 'MesHome', 0, b'1', b'1', b'1', '1', '2026-04-05 23:24:03', '1', '2026-04-06 01:20:52', b'0');
|
||||||
|
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 (6400, 'WMS 系统', '', 1, 310, 0, '/wms', 'ep:box', '', '', 0, b'1', b'1', b'1', '1', '2026-05-09 16:11:01', '1', '2026-05-09 16:11:01', b'0');
|
||||||
|
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 (6401, '基础数据', '', 1, 6, 6400, 'md', 'ep:files', '', '', 0, b'1', b'1', b'1', '1', '2026-05-09 16:11:01', '1', '2026-05-12 17:48:35', b'0');
|
||||||
|
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 (6402, '仓库管理', '', 2, 1, 6401, 'warehouse', 'ep:office-building', 'wms/md/warehouse/index', 'WmsWarehouse', 0, b'1', b'1', b'1', '1', '2026-05-09 16:11:01', '1', '2026-05-10 00:54:16', b'0');
|
||||||
|
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 (6403, '仓库查询', 'wms:warehouse:query', 3, 1, 6402, '', '', '', '', 0, b'1', b'1', b'1', '1', '2026-05-09 16:11:01', '1', '2026-05-09 16:11:01', b'0');
|
||||||
|
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 (6404, '仓库创建', 'wms:warehouse:create', 3, 2, 6402, '', '', '', '', 0, b'1', b'1', b'1', '1', '2026-05-09 16:11:01', '1', '2026-05-09 16:11:01', b'0');
|
||||||
|
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 (6405, '仓库更新', 'wms:warehouse:update', 3, 3, 6402, '', '', '', '', 0, b'1', b'1', b'1', '1', '2026-05-09 16:11:01', '1', '2026-05-09 16:11:01', b'0');
|
||||||
|
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 (6406, '仓库删除', 'wms:warehouse:delete', 3, 4, 6402, '', '', '', '', 0, b'1', b'1', b'1', '1', '2026-05-09 16:11:01', '1', '2026-05-09 16:11:01', b'0');
|
||||||
|
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 (6411, '商品品牌', '', 2, 3, 6401, 'item/brand', 'ep:price-tag', 'wms/md/item/brand/index', 'WmsItemBrand', 0, b'1', b'1', b'1', '1', '2026-05-10 01:43:12', '1', '2026-05-10 02:12:51', b'0');
|
||||||
|
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 (6412, '品牌查询', 'wms:item-brand:query', 3, 1, 6411, '', '', '', '', 0, b'1', b'1', b'1', '1', '2026-05-10 01:43:12', '1', '2026-05-10 01:43:12', b'0');
|
||||||
|
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 (6413, '品牌创建', 'wms:item-brand:create', 3, 2, 6411, '', '', '', '', 0, b'1', b'1', b'1', '1', '2026-05-10 01:43:12', '1', '2026-05-10 01:43:12', b'0');
|
||||||
|
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 (6414, '品牌更新', 'wms:item-brand:update', 3, 3, 6411, '', '', '', '', 0, b'1', b'1', b'1', '1', '2026-05-10 01:43:12', '1', '2026-05-10 01:43:12', b'0');
|
||||||
|
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 (6415, '品牌删除', 'wms:item-brand:delete', 3, 4, 6411, '', '', '', '', 0, b'1', b'1', b'1', '1', '2026-05-10 01:43:12', '1', '2026-05-10 01:43:12', b'0');
|
||||||
|
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 (6416, '品牌导出', 'wms:item-brand:export', 3, 5, 6411, '', '', '', '', 0, b'1', b'1', b'1', '1', '2026-05-10 01:43:12', '1', '2026-05-10 01:43:12', b'0');
|
||||||
|
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 (6417, '仓库导出', 'wms:warehouse:export', 3, 5, 6402, '', '', '', '', 0, b'1', b'1', b'1', '1', '2026-05-10 02:42:47', '1', '2026-05-10 02:42:47', b'0');
|
||||||
|
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 (6419, '商品分类', '', 2, 2, 6401, 'item/category', 'ep:folder', 'wms/md/item/category/index', 'WmsItemCategory', 0, b'1', b'1', b'1', '1', '2026-05-10 07:14:18', '1', '2026-05-10 07:14:18', b'0');
|
||||||
|
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 (6420, '分类查询', 'wms:item-category:query', 3, 1, 6419, '', '', '', NULL, 0, b'1', b'1', b'1', '1', '2026-05-10 07:14:18', '1', '2026-05-10 07:14:18', b'0');
|
||||||
|
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 (6421, '分类创建', 'wms:item-category:create', 3, 2, 6419, '', '', '', NULL, 0, b'1', b'1', b'1', '1', '2026-05-10 07:14:18', '1', '2026-05-10 07:14:18', b'0');
|
||||||
|
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 (6422, '分类更新', 'wms:item-category:update', 3, 3, 6419, '', '', '', NULL, 0, b'1', b'1', b'1', '1', '2026-05-10 07:14:18', '1', '2026-05-10 07:14:18', b'0');
|
||||||
|
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 (6423, '分类删除', 'wms:item-category:delete', 3, 4, 6419, '', '', '', NULL, 0, b'1', b'1', b'1', '1', '2026-05-10 07:14:18', '1', '2026-05-10 07:14:18', b'0');
|
||||||
|
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 (6424, '商品管理', '', 2, 4, 6401, 'item', 'ep:goods', 'wms/md/item/index', 'WmsItem', 0, b'1', b'1', b'1', '1', '2026-05-10 09:15:34', '1', '2026-05-10 09:15:34', b'0');
|
||||||
|
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 (6425, '商品查询', 'wms:item:query', 3, 1, 6424, '', '', '', NULL, 0, b'1', b'1', b'1', '1', '2026-05-10 09:15:34', '1', '2026-05-10 09:15:34', b'0');
|
||||||
|
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 (6426, '商品创建', 'wms:item:create', 3, 2, 6424, '', '', '', NULL, 0, b'1', b'1', b'1', '1', '2026-05-10 09:15:34', '1', '2026-05-10 09:15:34', b'0');
|
||||||
|
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 (6427, '商品更新', 'wms:item:update', 3, 3, 6424, '', '', '', NULL, 0, b'1', b'1', b'1', '1', '2026-05-10 09:15:34', '1', '2026-05-10 09:15:34', b'0');
|
||||||
|
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 (6428, '商品删除', 'wms:item:delete', 3, 4, 6424, '', '', '', NULL, 0, b'1', b'1', b'1', '1', '2026-05-10 09:15:34', '1', '2026-05-10 09:15:34', b'0');
|
||||||
|
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 (6429, '商品导出', 'wms:item:export', 3, 5, 6424, '', '', '', NULL, 0, b'1', b'1', b'1', '1', '2026-05-10 09:15:34', '1', '2026-05-10 09:15:34', b'0');
|
||||||
|
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 (6430, '往来企业', '', 2, 5, 6401, 'merchant', 'ep:office-building', 'wms/md/merchant/index', 'WmsMerchant', 0, b'1', b'1', b'1', '1', '2026-05-10 15:26:09', '1', '2026-05-10 15:48:07', b'0');
|
||||||
|
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 (6431, '往来企业查询', 'wms:merchant:query', 3, 1, 6430, '', '', '', NULL, 0, b'1', b'1', b'1', '1', '2026-05-10 15:26:09', '1', '2026-05-10 15:26:09', b'0');
|
||||||
|
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 (6432, '往来企业创建', 'wms:merchant:create', 3, 2, 6430, '', '', '', NULL, 0, b'1', b'1', b'1', '1', '2026-05-10 15:26:09', '1', '2026-05-10 15:26:09', b'0');
|
||||||
|
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 (6433, '往来企业更新', 'wms:merchant:update', 3, 3, 6430, '', '', '', NULL, 0, b'1', b'1', b'1', '1', '2026-05-10 15:26:09', '1', '2026-05-10 15:26:09', b'0');
|
||||||
|
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 (6434, '往来企业删除', 'wms:merchant:delete', 3, 4, 6430, '', '', '', NULL, 0, b'1', b'1', b'1', '1', '2026-05-10 15:26:09', '1', '2026-05-10 15:26:09', b'0');
|
||||||
|
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 (6435, '往来企业导出', 'wms:merchant:export', 3, 5, 6430, '', '', '', NULL, 0, b'1', b'1', b'1', '1', '2026-05-10 15:26:09', '1', '2026-05-10 15:26:09', b'0');
|
||||||
|
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 (6440, '库存管理', '', 1, 5, 6400, 'inventory', 'ep:box', '', '', 0, b'1', b'1', b'1', '1', '2026-05-10 17:51:46', '1', '2026-05-13 01:23:11', b'0');
|
||||||
|
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 (6441, '库存统计', '', 2, 1, 6440, 'index', 'ep:data-board', 'wms/inventory/index/index', 'WmsInventory', 0, b'1', b'1', b'1', '1', '2026-05-10 17:51:46', '1', '2026-05-11 02:08:28', b'0');
|
||||||
|
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 (6442, '库存统计查询', 'wms:inventory:query', 3, 1, 6441, '', '', '', NULL, 0, b'1', b'1', b'1', '1', '2026-05-10 17:51:46', '1', '2026-05-11 00:30:41', b'0');
|
||||||
|
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 (6445, '库存流水', '', 2, 2, 6440, 'history', 'ep:document', 'wms/inventory/history/index', 'WmsInventoryHistory', 0, b'1', b'1', b'1', '1', '2026-05-10 17:51:46', '1', '2026-05-14 07:59:15', b'0');
|
||||||
|
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 (6446, '库存流水查询', 'wms:inventory-history:query', 3, 1, 6445, '', '', '', NULL, 0, b'1', b'1', b'1', '1', '2026-05-10 17:51:46', '1', '2026-05-11 00:29:15', b'0');
|
||||||
|
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 (6451, '入库管理', '', 2, 1, 6400, 'receipt', 'ep:download', 'wms/order/receipt/index', 'WmsReceiptOrder', 0, b'1', b'1', b'1', '1', '2026-05-11 11:58:58', '1', '2026-05-11 16:58:02', b'0');
|
||||||
|
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 (6452, '入库单查询', 'wms:receipt-order:query', 3, 1, 6451, '', '', '', NULL, 0, b'1', b'1', b'1', '1', '2026-05-11 11:58:58', '1', '2026-05-11 16:58:02', b'0');
|
||||||
|
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 (6453, '入库单创建', 'wms:receipt-order:create', 3, 2, 6451, '', '', '', NULL, 0, b'1', b'1', b'1', '1', '2026-05-11 11:58:58', '1', '2026-05-11 16:58:02', b'0');
|
||||||
|
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 (6454, '入库单更新', 'wms:receipt-order:update', 3, 3, 6451, '', '', '', NULL, 0, b'1', b'1', b'1', '1', '2026-05-11 11:58:58', '1', '2026-05-11 16:58:02', b'0');
|
||||||
|
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 (6455, '入库单删除', 'wms:receipt-order:delete', 3, 4, 6451, '', '', '', NULL, 0, b'1', b'1', b'1', '1', '2026-05-11 11:58:58', '1', '2026-05-11 16:58:02', b'0');
|
||||||
|
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 (6456, '入库单完成入库', 'wms:receipt-order:complete', 3, 5, 6451, '', '', '', NULL, 0, b'1', b'1', b'1', '1', '2026-05-11 11:58:58', '1', '2026-05-11 16:58:02', b'0');
|
||||||
|
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 (6457, '入库单作废', 'wms:receipt-order:cancel', 3, 6, 6451, '', '', '', NULL, 0, b'1', b'1', b'1', '1', '2026-05-11 11:58:58', '1', '2026-05-12 16:27:16', b'0');
|
||||||
|
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 (6458, '入库单导出', 'wms:receipt-order:export', 3, 7, 6451, '', '', '', NULL, 0, b'1', b'1', b'1', '1', '2026-05-11 16:58:02', '1', '2026-05-12 16:27:16', b'0');
|
||||||
|
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 (6461, '出库管理', '', 2, 2, 6400, 'shipment', 'ep:upload', 'wms/order/shipment/index', 'WmsShipmentOrder', 0, b'1', b'1', b'1', '1', '2026-05-12 17:48:35', '1', '2026-05-12 17:48:35', b'0');
|
||||||
|
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 (6462, '出库单查询', 'wms:shipment-order:query', 3, 1, 6461, '', '', '', NULL, 0, b'1', b'1', b'1', '1', '2026-05-12 17:48:35', '1', '2026-05-12 17:48:35', b'0');
|
||||||
|
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 (6463, '出库单创建', 'wms:shipment-order:create', 3, 2, 6461, '', '', '', NULL, 0, b'1', b'1', b'1', '1', '2026-05-12 17:48:35', '1', '2026-05-12 17:48:35', b'0');
|
||||||
|
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 (6464, '出库单更新', 'wms:shipment-order:update', 3, 3, 6461, '', '', '', NULL, 0, b'1', b'1', b'1', '1', '2026-05-12 17:48:35', '1', '2026-05-12 17:48:35', b'0');
|
||||||
|
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 (6465, '出库单删除', 'wms:shipment-order:delete', 3, 4, 6461, '', '', '', NULL, 0, b'1', b'1', b'1', '1', '2026-05-12 17:48:35', '1', '2026-05-12 17:48:35', b'0');
|
||||||
|
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 (6466, '出库单完成出库', 'wms:shipment-order:complete', 3, 5, 6461, '', '', '', NULL, 0, b'1', b'1', b'1', '1', '2026-05-12 17:48:35', '1', '2026-05-12 17:48:35', b'0');
|
||||||
|
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 (6467, '出库单作废', 'wms:shipment-order:cancel', 3, 6, 6461, '', '', '', NULL, 0, b'1', b'1', b'1', '1', '2026-05-12 17:48:35', '1', '2026-05-12 17:48:35', b'0');
|
||||||
|
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 (6468, '出库单导出', 'wms:shipment-order:export', 3, 7, 6461, '', '', '', NULL, 0, b'1', b'1', b'1', '1', '2026-05-12 17:48:35', '1', '2026-05-12 17:48:35', b'0');
|
||||||
|
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 (6470, '移库管理', '', 2, 3, 6400, 'movement', 'ep:sort', 'wms/order/movement/index', 'WmsMovementOrder', 0, b'1', b'1', b'1', '1', '2026-05-13 01:23:11', '1', '2026-05-14 02:21:20', b'0');
|
||||||
|
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 (6471, '移库单查询', 'wms:movement-order:query', 3, 1, 6470, '', '#', NULL, NULL, 0, b'1', b'1', b'1', '1', '2026-05-13 01:23:11', '1', '2026-05-14 02:21:20', b'0');
|
||||||
|
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 (6472, '移库单创建', 'wms:movement-order:create', 3, 2, 6470, '', '#', NULL, NULL, 0, b'1', b'1', b'1', '1', '2026-05-13 01:23:11', '1', '2026-05-14 02:21:20', b'0');
|
||||||
|
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 (6473, '移库单更新', 'wms:movement-order:update', 3, 3, 6470, '', '#', NULL, NULL, 0, b'1', b'1', b'1', '1', '2026-05-13 01:23:11', '1', '2026-05-14 02:21:20', b'0');
|
||||||
|
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 (6474, '移库单删除', 'wms:movement-order:delete', 3, 4, 6470, '', '#', NULL, NULL, 0, b'1', b'1', b'1', '1', '2026-05-13 01:23:11', '1', '2026-05-14 02:21:20', b'0');
|
||||||
|
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 (6475, '移库单完成移库', 'wms:movement-order:complete', 3, 5, 6470, '', '#', NULL, NULL, 0, b'1', b'1', b'1', '1', '2026-05-13 01:23:11', '1', '2026-05-14 02:21:20', b'0');
|
||||||
|
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 (6476, '移库单作废', 'wms:movement-order:cancel', 3, 6, 6470, '', '#', NULL, NULL, 0, b'1', b'1', b'1', '1', '2026-05-13 01:23:11', '1', '2026-05-14 02:21:20', b'0');
|
||||||
|
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 (6477, '移库单导出', 'wms:movement-order:export', 3, 7, 6470, '', '#', NULL, NULL, 0, b'1', b'1', b'1', '1', '2026-05-13 01:23:11', '1', '2026-05-14 02:21:20', b'0');
|
||||||
|
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 (6480, '盘库管理', '', 2, 4, 6400, 'check', 'ep:circle-check-filled', 'wms/order/check/index', 'WmsCheckOrder', 0, b'1', b'1', b'1', '1', '2026-05-13 01:23:11', '1', '2026-05-14 02:21:20', b'0');
|
||||||
|
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 (6481, '盘库单查询', 'wms:check-order:query', 3, 1, 6480, '', '#', NULL, NULL, 0, b'1', b'1', b'1', '1', '2026-05-13 01:23:11', '1', '2026-05-14 02:21:20', b'0');
|
||||||
|
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 (6482, '盘库单创建', 'wms:check-order:create', 3, 2, 6480, '', '#', NULL, NULL, 0, b'1', b'1', b'1', '1', '2026-05-13 01:23:11', '1', '2026-05-14 02:21:20', b'0');
|
||||||
|
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 (6483, '盘库单更新', 'wms:check-order:update', 3, 3, 6480, '', '#', NULL, NULL, 0, b'1', b'1', b'1', '1', '2026-05-13 01:23:11', '1', '2026-05-14 02:21:20', b'0');
|
||||||
|
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 (6484, '盘库单删除', 'wms:check-order:delete', 3, 4, 6480, '', '#', NULL, NULL, 0, b'1', b'1', b'1', '1', '2026-05-13 01:23:11', '1', '2026-05-14 02:21:20', b'0');
|
||||||
|
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 (6485, '盘库单完成盘库', 'wms:check-order:complete', 3, 5, 6480, '', '#', NULL, NULL, 0, b'1', b'1', b'1', '1', '2026-05-13 01:23:11', '1', '2026-05-14 02:21:20', b'0');
|
||||||
|
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 (6486, '盘库单作废', 'wms:check-order:cancel', 3, 6, 6480, '', '#', NULL, NULL, 0, b'1', b'1', b'1', '1', '2026-05-13 01:23:11', '1', '2026-05-14 02:21:20', b'0');
|
||||||
|
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 (6487, '盘库单导出', 'wms:check-order:export', 3, 7, 6480, '', '#', NULL, NULL, 0, b'1', b'1', b'1', '1', '2026-05-13 01:23:11', '1', '2026-05-14 02:21:20', b'0');
|
||||||
|
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 (6490, 'WMS 首页', 'wms:home:query', 2, 0, 6400, 'home', 'ep:home-filled', 'wms/home/index', 'WmsHome', 0, b'1', b'1', b'1', '1', '2026-05-14 09:34:27', '1', '2026-05-14 10:05:06', b'0');
|
||||||
|
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 (6500, 'IM 即时通讯', '', 1, 501, 0, '/im', 'ep:chat-dot-round', NULL, NULL, 0, b'1', b'1', b'1', 'admin', '2026-04-30 09:11:20', '1', '2026-05-09 16:19:34', b'0');
|
||||||
|
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 (6510, '数据统计', 'im:manager:statistics:query', 2, 10, 6500, 'statistics', 'ep:trend-charts', 'im/manager/statistics/index', 'ImStatistics', 0, b'1', b'1', b'1', 'admin', '2026-04-30 09:11:20', '1', '2026-04-30 19:35:54', b'0');
|
||||||
|
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 (6515, '好友申请', 'im:manager:friend-request:query', 2, 20, 6600, 'friend-request', 'ep:document', 'im/manager/friend/request/index', 'ImFriendRequest', 0, b'1', b'1', b'1', '1', '2026-05-05 11:15:48', '1', '2026-05-07 00:40:35', b'0');
|
||||||
|
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 (6520, '好友列表', 'im:manager:friend:list', 2, 10, 6600, 'friend', 'ep:user', 'im/manager/friend/index', 'ImFriend', 0, b'1', b'1', b'1', 'admin', '2026-04-30 09:11:20', '1', '2026-05-07 00:40:35', b'0');
|
||||||
|
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 (6521, '好友查询', 'im:manager:friend:query', 3, 10, 6520, '', '', NULL, NULL, 0, b'1', b'1', b'1', 'admin', '2026-04-30 09:11:20', 'admin', '2026-04-30 09:11:20', b'0');
|
||||||
|
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 (6530, '好友消息', 'im:manager:message:private:list', 2, 30, 6600, 'message', 'ep:chat-dot-square', 'im/manager/message/private/index', 'ImPrivateMessage', 0, b'1', b'1', b'1', 'admin', '2026-04-30 09:11:20', '1', '2026-05-07 00:40:35', b'0');
|
||||||
|
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 (6531, '私聊消息查询', 'im:manager:message:query', 3, 10, 6530, '', '', NULL, NULL, 0, b'1', b'1', b'1', 'admin', '2026-04-30 09:11:20', 'admin', '2026-04-30 09:11:20', b'0');
|
||||||
|
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 (6540, '群聊列表', 'im:manager:group:list', 2, 10, 6610, 'list', 'ep:user-filled', 'im/manager/group/index', 'ImGroup', 0, b'1', b'1', b'1', 'admin', '2026-04-30 09:11:20', '1', '2026-05-07 00:40:35', b'0');
|
||||||
|
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 (6541, '群组查询', 'im:manager:group:query', 3, 10, 6540, '', '', NULL, NULL, 0, b'1', b'1', b'1', 'admin', '2026-04-30 09:11:20', 'admin', '2026-04-30 09:11:20', b'0');
|
||||||
|
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 (6542, '群组封禁/解封', 'im:manager:group:ban', 3, 20, 6540, '', '', NULL, NULL, 0, b'1', b'1', b'1', 'admin', '2026-04-30 09:11:20', 'admin', '2026-04-30 09:11:20', b'0');
|
||||||
|
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 (6545, '群聊申请', 'im:manager:group-request:query', 2, 20, 6610, 'request', 'ep:document', 'im/manager/group/request/index', 'ImGroupRequest', 0, b'1', b'1', b'1', '1', '2026-05-07 00:31:35', '1', '2026-05-07 00:40:35', b'0');
|
||||||
|
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 (6550, '群聊消息', 'im:manager:message:group:list', 2, 30, 6610, 'message', 'ep:chat-line-round', 'im/manager/message/group/index', 'ImGroupMessage', 0, b'1', b'1', b'1', 'admin', '2026-04-30 09:11:20', '1', '2026-05-07 00:40:35', b'0');
|
||||||
|
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 (6551, '群聊消息查询', 'im:manager:message:query', 3, 10, 6550, '', '', NULL, NULL, 0, b'1', b'1', b'1', 'admin', '2026-04-30 09:11:20', 'admin', '2026-04-30 09:11:20', b'0');
|
||||||
|
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 (6560, '敏感词管理', 'im:manager:sensitive-word:list', 2, 60, 6500, 'sensitive-word', 'ep:warning', 'im/manager/sensitiveword/index', 'ImSensitiveWord', 0, b'1', b'1', b'1', 'admin', '2026-04-30 09:11:20', '1', '2026-04-30 22:25:48', b'0');
|
||||||
|
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 (6561, '敏感词查询', 'im:manager:sensitive-word:query', 3, 10, 6560, '', '', NULL, NULL, 0, b'1', b'1', b'1', 'admin', '2026-04-30 09:11:20', 'admin', '2026-04-30 09:11:20', b'0');
|
||||||
|
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 (6562, '敏感词新增', 'im:manager:sensitive-word:create', 3, 20, 6560, '', '', NULL, NULL, 0, b'1', b'1', b'1', 'admin', '2026-04-30 09:11:20', 'admin', '2026-04-30 09:11:20', b'0');
|
||||||
|
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 (6563, '敏感词修改', 'im:manager:sensitive-word:update', 3, 30, 6560, '', '', NULL, NULL, 0, b'1', b'1', b'1', 'admin', '2026-04-30 09:11:20', 'admin', '2026-04-30 09:11:20', b'0');
|
||||||
|
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 (6564, '敏感词删除', 'im:manager:sensitive-word:delete', 3, 40, 6560, '', '', NULL, NULL, 0, b'1', b'1', b'1', 'admin', '2026-04-30 09:11:20', 'admin', '2026-04-30 09:11:20', b'0');
|
||||||
|
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 (6570, '表情管理', '', 1, 70, 6500, 'face', 'ep:magic-stick', NULL, NULL, 0, b'1', b'1', b'1', '', '2026-05-06 13:56:08', '', '2026-05-06 13:56:08', b'0');
|
||||||
|
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 (6571, '系统表情', 'im:manager:face-pack:list', 2, 10, 6570, 'pack', 'ep:picture', 'im/manager/face/pack/index', 'ImManagerFacePack', 0, b'1', b'1', b'1', '', '2026-05-06 13:56:08', '', '2026-05-06 13:56:08', b'0');
|
||||||
|
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 (6572, '表情包查询', 'im:manager:face-pack:query', 3, 10, 6571, '', '', '', '', 0, b'1', b'1', b'1', '', '2026-05-06 13:56:08', '', '2026-05-06 13:56:08', b'0');
|
||||||
|
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 (6573, '表情包创建', 'im:manager:face-pack:create', 3, 20, 6571, '', '', '', '', 0, b'1', b'1', b'1', '', '2026-05-06 13:56:08', '', '2026-05-06 13:56:08', b'0');
|
||||||
|
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 (6574, '表情包修改', 'im:manager:face-pack:update', 3, 30, 6571, '', '', '', '', 0, b'1', b'1', b'1', '', '2026-05-06 13:56:08', '', '2026-05-06 13:56:08', b'0');
|
||||||
|
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 (6575, '表情包删除', 'im:manager:face-pack:delete', 3, 40, 6571, '', '', '', '', 0, b'1', b'1', b'1', '', '2026-05-06 13:56:08', '', '2026-05-06 13:56:08', b'0');
|
||||||
|
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 (6576, '表情图查询', 'im:manager:face-pack-item:query', 3, 50, 6571, '', '', '', '', 0, b'1', b'1', b'1', '', '2026-05-06 13:56:08', '', '2026-05-06 13:56:08', b'0');
|
||||||
|
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 (6577, '表情图创建', 'im:manager:face-pack-item:create', 3, 60, 6571, '', '', '', '', 0, b'1', b'1', b'1', '', '2026-05-06 13:56:08', '', '2026-05-06 13:56:08', b'0');
|
||||||
|
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 (6578, '表情图修改', 'im:manager:face-pack-item:update', 3, 70, 6571, '', '', '', '', 0, b'1', b'1', b'1', '', '2026-05-06 13:56:08', '', '2026-05-06 13:56:08', b'0');
|
||||||
|
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 (6579, '表情图删除', 'im:manager:face-pack-item:delete', 3, 80, 6571, '', '', '', '', 0, b'1', b'1', b'1', '', '2026-05-06 13:56:08', '', '2026-05-06 13:56:08', b'0');
|
||||||
|
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 (6580, '用户表情', 'im:manager:face-user-item:list', 2, 20, 6570, 'user-item', 'ep:user', 'im/manager/face/userItem/index', 'ImManagerFaceUserItem', 0, b'1', b'1', b'1', '', '2026-05-06 13:56:08', '', '2026-05-06 14:24:20', b'0');
|
||||||
|
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 (6581, '用户表情查询', 'im:manager:face-user-item:query', 3, 10, 6580, '', '', '', '', 0, b'1', b'1', b'1', '', '2026-05-06 13:56:08', '', '2026-05-06 13:56:08', b'0');
|
||||||
|
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 (6582, '用户表情删除', 'im:manager:face-user-item:delete', 3, 20, 6580, '', '', '', '', 0, b'1', b'1', b'1', '', '2026-05-06 13:56:08', '', '2026-05-06 13:56:08', b'0');
|
||||||
|
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 (6600, '私聊管理', '', 1, 20, 6500, 'private', 'ep:chat-round', NULL, NULL, 0, b'1', b'1', b'1', '1', '2026-05-07 00:40:35', '1', '2026-05-07 00:40:35', b'0');
|
||||||
|
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 (6610, '群聊管理', '', 1, 30, 6500, 'group', 'ep:chat-line-round', NULL, NULL, 0, b'1', b'1', b'1', '1', '2026-05-07 00:40:35', '1', '2026-05-07 00:40:35', b'0');
|
||||||
COMMIT;
|
COMMIT;
|
||||||
|
|
||||||
-- ----------------------------
|
-- ----------------------------
|
||||||
|
|
@ -3102,7 +3296,7 @@ CREATE TABLE `system_notice` (
|
||||||
-- ----------------------------
|
-- ----------------------------
|
||||||
BEGIN;
|
BEGIN;
|
||||||
INSERT INTO `system_notice` (`id`, `title`, `content`, `type`, `status`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (1, '芋道的公众', '<p>新版本内容133222</p>', 1, 0, 'admin', '2021-01-05 17:03:48', '\"1\"', '2025-08-31 09:38:22', b'0', 1);
|
INSERT INTO `system_notice` (`id`, `title`, `content`, `type`, `status`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (1, '芋道的公众', '<p>新版本内容133222</p>', 1, 0, 'admin', '2021-01-05 17:03:48', '\"1\"', '2025-08-31 09:38:22', b'0', 1);
|
||||||
INSERT INTO `system_notice` (`id`, `title`, `content`, `type`, `status`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (2, '维护通知:2018-07-01 系统凌晨维护', '<p><img src=\"http://test.yudao.iocoder.cn/b7cb3cf49b4b3258bf7309a09dd2f4e5.jpg\" alt=\"\" data-href=\"\">11112222<img src=\"http://test.yudao.iocoder.cn/fe44fc7bdb82ca421184b2eebbaee9e2148d4a1827479a4eb4521e11d2a062ba.png\" alt=\"image\" data-href=\"http://test.yudao.iocoder.cn/fe44fc7bdb82ca421184b2eebbaee9e2148d4a1827479a4eb4521e11d2a062ba.png\">3333</p>', 2, 1, 'admin', '2021-01-05 17:03:48', '1', '2025-04-18 23:56:40', b'0', 1);
|
INSERT INTO `system_notice` (`id`, `title`, `content`, `type`, `status`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (2, '维护通知:2018-07-01 系统凌晨维护', '<p><img src=\"http://test.yudao.iocoder.cn/b7cb3cf49b4b3258bf7309a09dd2f4e5.jpg\" alt=\"\" data-href=\"\">11112222<img src=\"http://test.yudao.iocoder.cn/fe44fc7bdb82ca421184b2eebbaee9e2148d4a1827479a4eb4521e11d2a062ba.png\" alt=\"image\" data-href=\"http://test.yudao.iocoder.cn/fe44fc7bdb82ca421184b2eebbaee9e2148d4a1827479a4eb4521e11d2a062ba.png\">3333</p>\n<p><img src=\"http://test.yudao.iocoder.cn/20260503/备份.jpg\" alt=\"\" width=\"258\" height=\"258\"><img src=\"http://test.yudao.iocoder.cn/20260503/萌萌的皮卡丘.png\"></p>', 2, 1, 'admin', '2021-01-05 17:03:48', '1', '2026-05-03 23:07:48', b'0', 1);
|
||||||
INSERT INTO `system_notice` (`id`, `title`, `content`, `type`, `status`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (4, '我是测试标题', '<p>哈哈哈哈123</p>', 1, 0, '110', '2022-02-22 01:01:25', '110', '2022-02-22 01:01:46', b'0', 121);
|
INSERT INTO `system_notice` (`id`, `title`, `content`, `type`, `status`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (4, '我是测试标题', '<p>哈哈哈哈123</p>', 1, 0, '110', '2022-02-22 01:01:25', '110', '2022-02-22 01:01:46', b'0', 121);
|
||||||
COMMIT;
|
COMMIT;
|
||||||
|
|
||||||
|
|
@ -3198,7 +3392,7 @@ CREATE TABLE `system_oauth2_access_token` (
|
||||||
PRIMARY KEY (`id`) USING BTREE,
|
PRIMARY KEY (`id`) USING BTREE,
|
||||||
INDEX `idx_access_token`(`access_token` ASC) USING BTREE,
|
INDEX `idx_access_token`(`access_token` ASC) USING BTREE,
|
||||||
INDEX `idx_refresh_token`(`refresh_token` ASC) USING BTREE
|
INDEX `idx_refresh_token`(`refresh_token` ASC) USING BTREE
|
||||||
) ENGINE = InnoDB AUTO_INCREMENT = 51247 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci COMMENT = 'OAuth2 访问令牌';
|
) ENGINE = InnoDB AUTO_INCREMENT = 54457 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci COMMENT = 'OAuth2 访问令牌';
|
||||||
|
|
||||||
-- ----------------------------
|
-- ----------------------------
|
||||||
-- Records of system_oauth2_access_token
|
-- Records of system_oauth2_access_token
|
||||||
|
|
@ -3324,7 +3518,7 @@ CREATE TABLE `system_oauth2_refresh_token` (
|
||||||
`tenant_id` bigint NOT NULL DEFAULT 0 COMMENT '租户编号',
|
`tenant_id` bigint NOT NULL DEFAULT 0 COMMENT '租户编号',
|
||||||
PRIMARY KEY (`id`) USING BTREE,
|
PRIMARY KEY (`id`) USING BTREE,
|
||||||
INDEX `idx_refresh_token`(`refresh_token` ASC) USING BTREE
|
INDEX `idx_refresh_token`(`refresh_token` ASC) USING BTREE
|
||||||
) ENGINE = InnoDB AUTO_INCREMENT = 2553 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci COMMENT = 'OAuth2 刷新令牌';
|
) ENGINE = InnoDB AUTO_INCREMENT = 2590 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci COMMENT = 'OAuth2 刷新令牌';
|
||||||
|
|
||||||
-- ----------------------------
|
-- ----------------------------
|
||||||
-- Records of system_oauth2_refresh_token
|
-- Records of system_oauth2_refresh_token
|
||||||
|
|
@ -3360,7 +3554,7 @@ CREATE TABLE `system_operate_log` (
|
||||||
PRIMARY KEY (`id`) USING BTREE,
|
PRIMARY KEY (`id`) USING BTREE,
|
||||||
INDEX `idx_user_id`(`user_id` ASC) USING BTREE,
|
INDEX `idx_user_id`(`user_id` ASC) USING BTREE,
|
||||||
INDEX `idx_create_time`(`create_time` ASC) USING BTREE
|
INDEX `idx_create_time`(`create_time` ASC) USING BTREE
|
||||||
) ENGINE = InnoDB AUTO_INCREMENT = 9193 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci COMMENT = '操作日志记录 V2 版本';
|
) ENGINE = InnoDB AUTO_INCREMENT = 9194 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci COMMENT = '操作日志记录 V2 版本';
|
||||||
|
|
||||||
-- ----------------------------
|
-- ----------------------------
|
||||||
-- Records of system_operate_log
|
-- Records of system_operate_log
|
||||||
|
|
@ -3449,7 +3643,7 @@ CREATE TABLE `system_role_menu` (
|
||||||
`tenant_id` bigint NOT NULL DEFAULT 0 COMMENT '租户编号',
|
`tenant_id` bigint NOT NULL DEFAULT 0 COMMENT '租户编号',
|
||||||
PRIMARY KEY (`id`) USING BTREE,
|
PRIMARY KEY (`id`) USING BTREE,
|
||||||
INDEX `idx_role_id`(`role_id` ASC) USING BTREE
|
INDEX `idx_role_id`(`role_id` ASC) USING BTREE
|
||||||
) ENGINE = InnoDB AUTO_INCREMENT = 6365 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci COMMENT = '角色和菜单关联表';
|
) ENGINE = InnoDB AUTO_INCREMENT = 6381 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci COMMENT = '角色和菜单关联表';
|
||||||
|
|
||||||
-- ----------------------------
|
-- ----------------------------
|
||||||
-- Records of system_role_menu
|
-- Records of system_role_menu
|
||||||
|
|
@ -4341,6 +4535,14 @@ INSERT INTO `system_role_menu` (`id`, `role_id`, `menu_id`, `creator`, `create_t
|
||||||
INSERT INTO `system_role_menu` (`id`, `role_id`, `menu_id`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (6362, 109, 5811, '', '2026-03-30 03:13:05', '', '2026-03-30 03:13:05', b'0', 121);
|
INSERT INTO `system_role_menu` (`id`, `role_id`, `menu_id`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (6362, 109, 5811, '', '2026-03-30 03:13:05', '', '2026-03-30 03:13:05', b'0', 121);
|
||||||
INSERT INTO `system_role_menu` (`id`, `role_id`, `menu_id`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (6363, 111, 5811, '', '2026-03-30 03:13:05', '', '2026-03-30 03:13:05', b'0', 122);
|
INSERT INTO `system_role_menu` (`id`, `role_id`, `menu_id`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (6363, 111, 5811, '', '2026-03-30 03:13:05', '', '2026-03-30 03:13:05', b'0', 122);
|
||||||
INSERT INTO `system_role_menu` (`id`, `role_id`, `menu_id`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (6364, 155, 5811, '', '2026-03-30 03:13:05', '', '2026-03-30 03:13:05', b'0', 1);
|
INSERT INTO `system_role_menu` (`id`, `role_id`, `menu_id`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (6364, 155, 5811, '', '2026-03-30 03:13:05', '', '2026-03-30 03:13:05', b'0', 1);
|
||||||
|
INSERT INTO `system_role_menu` (`id`, `role_id`, `menu_id`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (6365, 2, 6400, '1', '2026-05-09 16:11:01', '1', '2026-05-09 16:11:01', b'0', 1);
|
||||||
|
INSERT INTO `system_role_menu` (`id`, `role_id`, `menu_id`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (6366, 2, 6401, '1', '2026-05-09 16:11:01', '1', '2026-05-09 16:11:01', b'0', 1);
|
||||||
|
INSERT INTO `system_role_menu` (`id`, `role_id`, `menu_id`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (6367, 2, 6402, '1', '2026-05-09 16:11:01', '1', '2026-05-09 16:11:01', b'0', 1);
|
||||||
|
INSERT INTO `system_role_menu` (`id`, `role_id`, `menu_id`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (6368, 2, 6403, '1', '2026-05-09 16:11:01', '1', '2026-05-09 16:11:01', b'0', 1);
|
||||||
|
INSERT INTO `system_role_menu` (`id`, `role_id`, `menu_id`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (6369, 2, 6404, '1', '2026-05-09 16:11:01', '1', '2026-05-09 16:11:01', b'0', 1);
|
||||||
|
INSERT INTO `system_role_menu` (`id`, `role_id`, `menu_id`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (6370, 2, 6405, '1', '2026-05-09 16:11:01', '1', '2026-05-09 16:11:01', b'0', 1);
|
||||||
|
INSERT INTO `system_role_menu` (`id`, `role_id`, `menu_id`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (6371, 2, 6406, '1', '2026-05-09 16:11:01', '1', '2026-05-09 16:11:01', b'0', 1);
|
||||||
|
INSERT INTO `system_role_menu` (`id`, `role_id`, `menu_id`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (6380, 2, 6490, '1', '2026-05-14 09:36:12', '1', '2026-05-14 09:36:12', b'0', 1);
|
||||||
COMMIT;
|
COMMIT;
|
||||||
|
|
||||||
-- ----------------------------
|
-- ----------------------------
|
||||||
|
|
@ -4436,7 +4638,7 @@ CREATE TABLE `system_sms_log` (
|
||||||
`update_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间',
|
`update_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间',
|
||||||
`deleted` bit(1) NOT NULL DEFAULT b'0' COMMENT '是否删除',
|
`deleted` bit(1) NOT NULL DEFAULT b'0' COMMENT '是否删除',
|
||||||
PRIMARY KEY (`id`) USING BTREE
|
PRIMARY KEY (`id`) USING BTREE
|
||||||
) ENGINE = InnoDB AUTO_INCREMENT = 1549 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci COMMENT = '短信日志';
|
) ENGINE = InnoDB AUTO_INCREMENT = 1553 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci COMMENT = '短信日志';
|
||||||
|
|
||||||
-- ----------------------------
|
-- ----------------------------
|
||||||
-- Records of system_sms_log
|
-- Records of system_sms_log
|
||||||
|
|
@ -4756,10 +4958,10 @@ CREATE TABLE `system_users` (
|
||||||
-- Records of system_users
|
-- Records of system_users
|
||||||
-- ----------------------------
|
-- ----------------------------
|
||||||
BEGIN;
|
BEGIN;
|
||||||
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$04$.vd8nPeLwxt6hnSzmAoAyul8BOLX7Cib6QhcxRe30rfvrIPQHH1OG', '芋道源码', '管理员', 103, '[1,2]', '13aoteman@126.com', '18818260272', 1, 'http://test.yudao.iocoder.cn/user/avatar/20251220/blob_1766215463801.jpg', 0, '0:0:0:0:0:0:0:1', '2026-04-17 08:47:40', 'admin', '2021-01-05 17:03:47', NULL, '2026-04-17 08:47:40', b'0', 1);
|
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$04$.vd8nPeLwxt6hnSzmAoAyul8BOLX7Cib6QhcxRe30rfvrIPQHH1OG', '芋道源码', '管理员', 103, '[1,2]', '13aoteman@126.com', '18818260272', 1, 'http://test.yudao.iocoder.cn/user/avatar/20251220/blob_1766215463801.jpg', 0, '0:0:0:0:0:0:0:1', '2026-05-15 22:24:39', 'admin', '2021-01-05 17:03:47', NULL, '2026-05-15 22:24:39', b'0', 1);
|
||||||
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$04$h.aaPKgO.odHepnk5PCsWeEwKdojFWdTItxGKfx1r0e1CSeBzsTJ6', '芋道', '不要吓我', 104, '[1]', 'yudao@iocoder.cn', '15601691300', 1, NULL, 0, '0:0:0:0:0:0:0:1', '2025-12-15 21:47:26', '', '2021-01-07 09:07:17', NULL, '2025-12-15 21:47:26', b'0', 1);
|
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$04$.vd8nPeLwxt6hnSzmAoAyul8BOLX7Cib6QhcxRe30rfvrIPQHH1OG', '芋道', '不要吓我', 104, '[1]', 'yudao@iocoder.cn', '15601691300', 1, NULL, 0, '0:0:0:0:0:0:0:1', '2026-04-19 17:40:55', '', '2021-01-07 09:07:17', NULL, '2026-04-19 17:40:55', b'0', 1);
|
||||||
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$04$fUBSmjKCPYAUmnMzOb6qE.eZCGPhHi1JmAKclODbfS/O7fHOl2bH6', '源码', NULL, 106, NULL, 'yuanma@iocoder.cn', '15601701300', 0, NULL, 0, '0:0:0:0:0:0:0:1', '2024-08-11 17:48:12', '', '2021-01-13 23:50:35', '1', '2025-07-09 23:41:58', b'0', 1);
|
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$04$k/d6mc0nySN0i2udwcI8Ee8V5aM5OHixBRbQfXmPuFTUl3Zf/DBs.', '源码', NULL, 106, NULL, 'yuanma@iocoder.cn', '15601701300', 0, NULL, 0, '0:0:0:0:0:0:0:1', '2026-04-27 13:19:27', '', '2021-01-13 23:50:35', NULL, '2026-04-27 13:19:27', b'0', 1);
|
||||||
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$BrwaYn303hjA/6TnXqdGoOLhyHOAA0bVrAFu6.1dJKycqKUnIoRz2', '测试号', NULL, 107, '[1,2]', '111@qq.com', '15601691200', 1, NULL, 0, '0:0:0:0:0:0:0:1', '2026-01-04 18:09:54', '', '2021-01-21 02:13:53', NULL, '2026-01-04 18:09:54', b'0', 1);
|
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$BrwaYn303hjA/6TnXqdGoOLhyHOAA0bVrAFu6.1dJKycqKUnIoRz2', '测试号', NULL, 107, '[1,2]', '111@qq.com', '15601691200', 1, NULL, 0, '0:0:0:0:0:0:0:1', '2026-05-09 09:57:13', '', '2021-01-21 02:13:53', NULL, '2026-05-09 09:57:13', b'0', 1);
|
||||||
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, NULL, 0, '', NULL, '1', '2022-02-20 22:59:33', '1', '2025-04-21 14:23:08', b'0', 118);
|
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, NULL, 0, '', NULL, '1', '2022-02-20 22:59:33', '1', '2025-04-21 14:23:08', b'0', 118);
|
||||||
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, NULL, 0, '', NULL, '1', '2022-02-20 23:00:50', '1', '2025-04-21 14:23:08', b'0', 119);
|
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, NULL, 0, '', NULL, '1', '2022-02-20 23:00:50', '1', '2025-04-21 14:23:08', b'0', 119);
|
||||||
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, NULL, 0, '', NULL, '1', '2022-02-20 23:11:50', '1', '2025-04-21 14:23:08', b'0', 120);
|
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, NULL, 0, '', NULL, '1', '2022-02-20 23:11:50', '1', '2025-04-21 14:23:08', b'0', 120);
|
||||||
|
|
|
||||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
|
|
@ -62,6 +62,10 @@ def load_and_clean(sql_file: str) -> str:
|
||||||
content = open(sql_file, encoding="utf-8").read()
|
content = open(sql_file, encoding="utf-8").read()
|
||||||
for replace_pair in REPLACE_PAIR_LIST:
|
for replace_pair in REPLACE_PAIR_LIST:
|
||||||
content = content.replace(*replace_pair)
|
content = content.replace(*replace_pair)
|
||||||
|
# 移除所有 CHARACTER SET / COLLATE 变体 (utf8mb3、utf8 等)
|
||||||
|
content = re.sub(r" CHARACTER SET \w+ COLLATE \w+", "", content)
|
||||||
|
content = re.sub(r" CHARACTER SET \w+", "", content)
|
||||||
|
content = re.sub(r" COLLATE \w+", "", content)
|
||||||
# 移除索引字段的前缀长度定义,例如: `name`(32) -> `name`
|
# 移除索引字段的前缀长度定义,例如: `name`(32) -> `name`
|
||||||
# 移除索引定义上的 USING BTREE COMMENT 部分
|
# 移除索引定义上的 USING BTREE COMMENT 部分
|
||||||
# 相关 issue:https://t.zsxq.com/96IFc 、https://t.zsxq.com/rC3A3
|
# 相关 issue:https://t.zsxq.com/96IFc 、https://t.zsxq.com/rC3A3
|
||||||
|
|
@ -77,7 +81,11 @@ class Convertor(ABC):
|
||||||
self.src = src
|
self.src = src
|
||||||
self.db_type = db_type
|
self.db_type = db_type
|
||||||
self.content = load_and_clean(self.src)
|
self.content = load_and_clean(self.src)
|
||||||
self.table_script_list = re.findall(r"CREATE TABLE [^;]*;", self.content)
|
# original_content 保留原始 COMMENT 信息,用于注释提取
|
||||||
|
self.original_content = open(src, encoding="utf-8").read()
|
||||||
|
# 剥离列级 COMMENT 以避免 COMMENT 值内的分号截断 CREATE TABLE 正则
|
||||||
|
content_no_comment = re.sub(r" COMMENT '(?:[^'\\]|\\.)*'", "", self.content)
|
||||||
|
self.table_script_list = re.findall(r"CREATE TABLE [^;]*;", content_no_comment)
|
||||||
|
|
||||||
@abstractmethod
|
@abstractmethod
|
||||||
def translate_type(self, type: str, size: Optional[Union[int, Tuple[int]]]) -> str:
|
def translate_type(self, type: str, size: Optional[Union[int, Tuple[int]]]) -> str:
|
||||||
|
|
@ -182,7 +190,8 @@ class Convertor(ABC):
|
||||||
head = head.strip().replace("`", "").lower()
|
head = head.strip().replace("`", "").lower()
|
||||||
tail = tail.strip().replace(r"\"", '"')
|
tail = tail.strip().replace(r"\"", '"')
|
||||||
# tail = tail.replace("b'0'", "'0'").replace("b'1'", "'1'")
|
# tail = tail.replace("b'0'", "'0'").replace("b'1'", "'1'")
|
||||||
yield f"INSERT INTO {table_name.lower()} {head} VALUES {tail}"
|
col_part = f" {head}" if head else ""
|
||||||
|
yield f"INSERT INTO {table_name.lower()}{col_part} VALUES {tail}"
|
||||||
|
|
||||||
@staticmethod
|
@staticmethod
|
||||||
def index(ddl: Dict) -> Generator:
|
def index(ddl: Dict) -> Generator:
|
||||||
|
|
@ -227,7 +236,8 @@ class Convertor(ABC):
|
||||||
yield field, comment_string
|
yield field, comment_string
|
||||||
|
|
||||||
def table_comment(self, table_sql: str) -> str:
|
def table_comment(self, table_sql: str) -> str:
|
||||||
match = re.search(r"COMMENT \='([^']+)';", table_sql)
|
# 兼容 COMMENT='xxx' / COMMENT = 'xxx' 等等号两侧空格变体;允许 COMMENT 内含转义单引号
|
||||||
|
match = re.search(r"COMMENT\s*=\s*'((?:[^'\\]|\\.)*)'", table_sql)
|
||||||
return match.group(1) if match else None
|
return match.group(1) if match else None
|
||||||
|
|
||||||
def print(self):
|
def print(self):
|
||||||
|
|
@ -251,7 +261,9 @@ class Convertor(ABC):
|
||||||
|
|
||||||
error_scripts = []
|
error_scripts = []
|
||||||
for table_sql in self.table_script_list:
|
for table_sql in self.table_script_list:
|
||||||
ddl = DDLParser(table_sql.replace("`", "")).run()
|
# 剥离 COMMENT 子句避免 DDLParser 无法处理中文等特殊字符
|
||||||
|
table_sql_for_parse = re.sub(r"\s+COMMENT\s+'[^']*'", "", table_sql)
|
||||||
|
ddl = DDLParser(table_sql_for_parse.replace("`", "")).run()
|
||||||
|
|
||||||
# 如果parse失败, 需要跟进
|
# 如果parse失败, 需要跟进
|
||||||
if len(ddl) == 0:
|
if len(ddl) == 0:
|
||||||
|
|
@ -266,17 +278,23 @@ class Convertor(ABC):
|
||||||
continue
|
continue
|
||||||
|
|
||||||
# 解析注释
|
# 解析注释
|
||||||
|
# 从原始 SQL 提取注释(支持中文等 DDLParser 不能处理的内容)
|
||||||
|
# 按表名定位完整建表段(以「换行 + )」起始的 ENGINE 行作为终止),避免被列 COMMENT 内的分号截断
|
||||||
|
orig_match = re.search(
|
||||||
|
rf"CREATE TABLE\s+`{re.escape(table_name)}`[\s\S]*?\n\)[^;]*;",
|
||||||
|
self.original_content,
|
||||||
|
flags=re.IGNORECASE,
|
||||||
|
)
|
||||||
|
orig_table_sql = orig_match.group() if orig_match else table_sql
|
||||||
|
comments_dict = dict(Convertor.filed_comments(orig_table_sql))
|
||||||
for column in table_ddl["columns"]:
|
for column in table_ddl["columns"]:
|
||||||
column["comment"] = bytes(column["comment"], "utf-8").decode(
|
column["comment"] = comments_dict.get(column["name"], "")
|
||||||
r"unicode_escape"
|
table_ddl["comment"] = self.table_comment(orig_table_sql) or ""
|
||||||
)[1:-1]
|
|
||||||
table_ddl["comment"] = bytes(table_ddl["comment"], "utf-8").decode(
|
|
||||||
r"unicode_escape"
|
|
||||||
)[1:-1]
|
|
||||||
|
|
||||||
# 为每个表生成个6个基本部分
|
# 为每个表生成个6个基本部分
|
||||||
create = self.gen_create(table_ddl)
|
create = self.gen_create(table_ddl)
|
||||||
pk = self.gen_pk(table_name)
|
has_id = any(col["name"].lower() == "id" for col in table_ddl["columns"])
|
||||||
|
pk = self.gen_pk(table_name) if has_id else ""
|
||||||
uk = self.gen_uk(table_ddl)
|
uk = self.gen_uk(table_ddl)
|
||||||
index = self.gen_index(table_ddl)
|
index = self.gen_index(table_ddl)
|
||||||
comment = self.gen_comment(table_ddl)
|
comment = self.gen_comment(table_ddl)
|
||||||
|
|
@ -320,25 +338,31 @@ class PostgreSQLConvertor(Convertor):
|
||||||
|
|
||||||
if type == "varchar":
|
if type == "varchar":
|
||||||
return f"varchar({size})"
|
return f"varchar({size})"
|
||||||
if type in ("int", "int unsigned"):
|
if type in ("int", "int unsigned", "int unsigned zerofill"):
|
||||||
return "int4"
|
return "int4"
|
||||||
if type in ("bigint", "bigint unsigned"):
|
if type in ("bigint", "bigint unsigned"):
|
||||||
return "int8"
|
return "int8"
|
||||||
if type == "datetime":
|
if type in ("tinyint", "smallint", "tinyint unsigned"):
|
||||||
|
return "int2"
|
||||||
|
if type in ("datetime", "timestamp null"):
|
||||||
return "timestamp"
|
return "timestamp"
|
||||||
|
if type == "date":
|
||||||
|
return "date"
|
||||||
|
if type == "json":
|
||||||
|
return "jsonb"
|
||||||
|
if type == "double":
|
||||||
|
return "double precision"
|
||||||
if type == "timestamp":
|
if type == "timestamp":
|
||||||
return f"timestamp({size})"
|
return f"timestamp({size})" if size else "timestamp"
|
||||||
if type == "bit":
|
if type == "bit":
|
||||||
return "bool"
|
return "bool"
|
||||||
if type in ("tinyint", "smallint"):
|
|
||||||
return "int2"
|
|
||||||
if type in ("text", "longtext"):
|
if type in ("text", "longtext"):
|
||||||
return "text"
|
return "text"
|
||||||
if type in ("blob", "mediumblob"):
|
if type in ("blob", "mediumblob", "longblob"):
|
||||||
return "bytea"
|
return "bytea"
|
||||||
if type == "decimal":
|
if type == "decimal":
|
||||||
return (
|
return (
|
||||||
f"numeric({','.join(str(s) for s in size)})" if len(size) else "numeric"
|
f"numeric({','.join(str(s) for s in size)})" if size and len(size) else "numeric"
|
||||||
)
|
)
|
||||||
|
|
||||||
def gen_create(self, ddl: Dict) -> str:
|
def gen_create(self, ddl: Dict) -> str:
|
||||||
|
|
@ -351,6 +375,10 @@ class PostgreSQLConvertor(Convertor):
|
||||||
|
|
||||||
type = col["type"].lower()
|
type = col["type"].lower()
|
||||||
full_type = self.translate_type(type, col["size"])
|
full_type = self.translate_type(type, col["size"])
|
||||||
|
if full_type is None:
|
||||||
|
raise NotImplementedError(
|
||||||
|
f"未支持的类型: '{col['type']}' (列: {name}, 表: {ddl['table_name']})"
|
||||||
|
)
|
||||||
nullable = "NULL" if col["nullable"] else "NOT NULL"
|
nullable = "NULL" if col["nullable"] else "NOT NULL"
|
||||||
default = f"DEFAULT {col['default']}" if col["default"] is not None else ""
|
default = f"DEFAULT {col['default']}" if col["default"] is not None else ""
|
||||||
return f"{name} {full_type} {nullable} {default}"
|
return f"{name} {full_type} {nullable} {default}"
|
||||||
|
|
@ -407,6 +435,8 @@ CREATE TABLE {table_name} (
|
||||||
"""生成 insert 语句,以及根据最后的 insert id+1 生成 Sequence"""
|
"""生成 insert 语句,以及根据最后的 insert id+1 生成 Sequence"""
|
||||||
|
|
||||||
inserts = list(Convertor.inserts(table_name, self.content))
|
inserts = list(Convertor.inserts(table_name, self.content))
|
||||||
|
# 转换 MySQL 字符串转义为 PostgreSQL 格式:\\ -> \,\' -> ''
|
||||||
|
inserts = [re.sub(r"\\\\|\\'", lambda m: "\\" if m.group() == "\\\\" else "''", s) for s in inserts]
|
||||||
## 生成 insert 脚本
|
## 生成 insert 脚本
|
||||||
script = ""
|
script = ""
|
||||||
last_id = 0
|
last_id = 0
|
||||||
|
|
|
||||||
|
|
@ -14,30 +14,30 @@
|
||||||
<url>https://github.com/YunaiV/ruoyi-vue-pro</url>
|
<url>https://github.com/YunaiV/ruoyi-vue-pro</url>
|
||||||
|
|
||||||
<properties>
|
<properties>
|
||||||
<revision>2026.03-jdk8-SNAPSHOT</revision>
|
<revision>2026.04-jdk8-SNAPSHOT</revision>
|
||||||
<flatten-maven-plugin.version>1.6.0</flatten-maven-plugin.version>
|
<flatten-maven-plugin.version>1.6.0</flatten-maven-plugin.version>
|
||||||
<!-- 统一依赖管理 -->
|
<!-- 统一依赖管理 -->
|
||||||
<spring.framework.version>5.3.39</spring.framework.version>
|
<spring.framework.version>5.3.39</spring.framework.version>
|
||||||
<spring.security.version>5.8.16</spring.security.version>
|
<spring.security.version>5.8.16</spring.security.version>
|
||||||
<spring.boot.version>2.7.18</spring.boot.version>
|
<spring.boot.version>2.7.18</spring.boot.version>
|
||||||
<spring.cloud.version>2021.0.9</spring.cloud.version>
|
<spring.cloud.version>2021.0.9</spring.cloud.version> <!-- Spring Boot 2.X 最多使用 2021.0.9 版本 -->
|
||||||
<spring.cloud.alibaba.version>2021.0.6.2</spring.cloud.alibaba.version>
|
<spring.cloud.alibaba.version>2021.0.6.2</spring.cloud.alibaba.version> <!-- Spring Boot 2.X 最多使用 2021.0.6.2 版本 -->
|
||||||
<!-- Web 相关 -->
|
<!-- Web 相关 -->
|
||||||
<servlet.versoin>2.5</servlet.versoin>
|
<servlet.versoin>2.5</servlet.versoin>
|
||||||
<springdoc.version>1.8.0</springdoc.version>
|
<springdoc.version>1.8.0</springdoc.version>
|
||||||
<knife4j.version>4.5.0</knife4j.version>
|
<knife4j.version>4.5.0</knife4j.version>
|
||||||
<!-- DB 相关 -->
|
<!-- DB 相关 -->
|
||||||
<druid.version>1.2.27</druid.version>
|
<druid.version>1.2.28</druid.version>
|
||||||
<mybatis.version>3.5.19</mybatis.version>
|
<mybatis.version>3.5.19</mybatis.version>
|
||||||
<mybatis-plus.version>3.5.15</mybatis-plus.version>
|
<mybatis-plus.version>3.5.16</mybatis-plus.version>
|
||||||
<mybatis-plus-join.version>1.5.5</mybatis-plus-join.version>
|
<mybatis-plus-join.version>1.5.7</mybatis-plus-join.version>
|
||||||
<dynamic-datasource.version>4.5.0</dynamic-datasource.version>
|
<dynamic-datasource.version>4.5.0</dynamic-datasource.version>
|
||||||
<easy-trans.version>3.0.6</easy-trans.version>
|
<easy-trans.version>3.0.6</easy-trans.version>
|
||||||
<redisson.version>3.52.0</redisson.version>
|
<redisson.version>4.3.1</redisson.version>
|
||||||
<dm8.jdbc.version>8.1.3.140</dm8.jdbc.version>
|
<dm8.jdbc.version>8.1.3.140</dm8.jdbc.version>
|
||||||
<kingbase.jdbc.version>8.6.0</kingbase.jdbc.version>
|
<kingbase.jdbc.version>9.0.1.jre7</kingbase.jdbc.version>
|
||||||
<opengauss.jdbc.version>5.1.0</opengauss.jdbc.version>
|
<opengauss.jdbc.version>7.0.0-RC3-og</opengauss.jdbc.version>
|
||||||
<taos.version>3.7.9</taos.version>
|
<taos.version>3.8.3</taos.version>
|
||||||
<!-- 消息队列 -->
|
<!-- 消息队列 -->
|
||||||
<rocketmq-spring.version>2.3.5</rocketmq-spring.version>
|
<rocketmq-spring.version>2.3.5</rocketmq-spring.version>
|
||||||
<!-- RPC 相关 -->
|
<!-- RPC 相关 -->
|
||||||
|
|
@ -55,39 +55,41 @@
|
||||||
<jedis-mock.version>1.1.12</jedis-mock.version>
|
<jedis-mock.version>1.1.12</jedis-mock.version>
|
||||||
<mockito-inline.version>4.11.0</mockito-inline.version>
|
<mockito-inline.version>4.11.0</mockito-inline.version>
|
||||||
<!-- Bpm 工作流相关 -->
|
<!-- Bpm 工作流相关 -->
|
||||||
<flowable.version>6.8.0</flowable.version>
|
<flowable.version>6.8.1</flowable.version>
|
||||||
<!-- 工具类相关 -->
|
<!-- 工具类相关 -->
|
||||||
<anji-plus-captcha.version>1.4.0</anji-plus-captcha.version>
|
<anji-plus-captcha.version>1.4.0</anji-plus-captcha.version>
|
||||||
<jsoup.version>1.21.2</jsoup.version>
|
<jsoup.version>1.22.2</jsoup.version>
|
||||||
<lombok.version>1.18.42</lombok.version>
|
<lombok.version>1.18.46</lombok.version>
|
||||||
<mapstruct.version>1.6.3</mapstruct.version>
|
<mapstruct.version>1.6.3</mapstruct.version>
|
||||||
<hutool-5.version>5.8.42</hutool-5.version>
|
<hutool-5.version>5.8.44</hutool-5.version>
|
||||||
<fastexcel.version>1.3.0</fastexcel.version>
|
<fastexcel.version>1.3.0</fastexcel.version>
|
||||||
<velocity.version>2.4</velocity.version> <!-- JDK8 不能从 2.4 升级到 2.4.1,会报包不存在!!!! -->
|
<velocity.version>2.4</velocity.version> <!-- JDK8 不能从 2.4 升级到 2.4.1,会报包不存在!!!! -->
|
||||||
<fastjson.version>1.2.83</fastjson.version>
|
<fastjson.version>1.2.83</fastjson.version>
|
||||||
<guava.version>33.5.0-jre</guava.version>
|
<guava.version>33.6.0-jre</guava.version>
|
||||||
<transmittable-thread-local.version>2.14.5</transmittable-thread-local.version>
|
<transmittable-thread-local.version>2.14.5</transmittable-thread-local.version>
|
||||||
<commons-net.version>3.12.0</commons-net.version>
|
<commons-net.version>3.13.0</commons-net.version>
|
||||||
<commons-lang3.version>3.20.0</commons-lang3.version>
|
<commons-lang3.version>3.20.0</commons-lang3.version>
|
||||||
<jsch.version>2.27.7</jsch.version>
|
<jsch.version>2.28.2</jsch.version>
|
||||||
<tika-core.version>2.9.3</tika-core.version> <!-- JDK8 不能从 2.9.3 升级到 3.X,会报 JDK8 不支持 -->
|
<tika-core.version>2.9.3</tika-core.version> <!-- JDK8 不能从 2.9.3 升级到 3.X,会报 JDK8 不支持 -->
|
||||||
<ip2region.version>2.7.0</ip2region.version>
|
<ip2region.version>2.7.0</ip2region.version>
|
||||||
<bizlog-sdk.version>3.0.6</bizlog-sdk.version>
|
<bizlog-sdk.version>3.0.6</bizlog-sdk.version>
|
||||||
<reflections.version>0.10.2</reflections.version>
|
<reflections.version>0.10.2</reflections.version>
|
||||||
<netty.version>4.2.9.Final</netty.version>
|
<netty.version>4.2.12.Final</netty.version>
|
||||||
<mqtt.version>1.2.5</mqtt.version>
|
<mqtt.version>1.2.5</mqtt.version>
|
||||||
<vertx.version>4.5.22</vertx.version>
|
<vertx.version>4.5.26</vertx.version>
|
||||||
<okhttp.version>4.12.0</okhttp.version>
|
<okhttp.version>4.12.0</okhttp.version>
|
||||||
<californium.version>3.12.0</californium.version>
|
<californium.version>3.14.0</californium.version>
|
||||||
<j2mod.version>3.2.1</j2mod.version>
|
<j2mod.version>3.3.0</j2mod.version>
|
||||||
|
<httpclient5.version>5.5.2</httpclient5.version> <!-- WxJava 4.8.x 需要 HttpClient5 5.4+,Spring Boot 2.7 默认 5.1.4 不兼容 -->
|
||||||
|
<httpcore5.version>5.3.6</httpcore5.version> <!-- 配套 httpclient5 5.5.2,Spring Boot 2.7 默认 5.1.5 不兼容 -->
|
||||||
<!-- 三方云服务相关 -->
|
<!-- 三方云服务相关 -->
|
||||||
<awssdk.version>2.40.15</awssdk.version>
|
<awssdk.version>2.44.0</awssdk.version>
|
||||||
<justauth.version>1.16.7</justauth.version>
|
<justauth.version>1.16.7</justauth.version>
|
||||||
<justauth-starter.version>1.4.0</justauth-starter.version>
|
<justauth-starter.version>1.4.0</justauth-starter.version>
|
||||||
<jimureport.version>2.1.3</jimureport.version>
|
<jimureport.version>2.3.2</jimureport.version>
|
||||||
<jimubi.version>2.3.0</jimubi.version>
|
<jimubi.version>2.3.2</jimubi.version>
|
||||||
<weixin-java.version>4.7.9-20251224.161447</weixin-java.version>
|
<weixin-java.version>4.8.2-20260501.180637</weixin-java.version>
|
||||||
<alipay-sdk-java.version>4.40.607.ALL</alipay-sdk-java.version>
|
<alipay-sdk-java.version>4.40.771.ALL</alipay-sdk-java.version>
|
||||||
<!-- 专属于 JDK8 安全漏洞升级 -->
|
<!-- 专属于 JDK8 安全漏洞升级 -->
|
||||||
<logback.version>1.2.13</logback.version> <!-- 无法使用 1.3.X 版本,启动会报错 -->
|
<logback.version>1.2.13</logback.version> <!-- 无法使用 1.3.X 版本,启动会报错 -->
|
||||||
</properties>
|
</properties>
|
||||||
|
|
@ -308,7 +310,7 @@
|
||||||
<exclusion>
|
<exclusion>
|
||||||
<groupId>org.redisson</groupId>
|
<groupId>org.redisson</groupId>
|
||||||
<!-- 使用 redisson-spring-data-27 替代,解决 Tuple NoClassDefFoundError 报错 -->
|
<!-- 使用 redisson-spring-data-27 替代,解决 Tuple NoClassDefFoundError 报错 -->
|
||||||
<artifactId>redisson-spring-data-35</artifactId>
|
<artifactId>redisson-spring-data-40</artifactId> <!-- Redisson 4.x 默认依赖 spring-data-40,排除后使用 spring-data-27 适配 Spring Boot 2.7 -->
|
||||||
</exclusion>
|
</exclusion>
|
||||||
</exclusions>
|
</exclusions>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
|
@ -679,6 +681,23 @@
|
||||||
<version>${j2mod.version}</version>
|
<version>${j2mod.version}</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
|
||||||
|
<!-- WxJava 4.8.x 需要 HttpClient5 5.4+,覆盖 Spring Boot 2.7 默认的 5.1.4 -->
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.apache.httpcomponents.client5</groupId>
|
||||||
|
<artifactId>httpclient5</artifactId>
|
||||||
|
<version>${httpclient5.version}</version>
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.apache.httpcomponents.core5</groupId>
|
||||||
|
<artifactId>httpcore5</artifactId>
|
||||||
|
<version>${httpcore5.version}</version>
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.apache.httpcomponents.core5</groupId>
|
||||||
|
<artifactId>httpcore5-h2</artifactId>
|
||||||
|
<version>${httpcore5.version}</version>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
<!-- 三方云服务相关 -->
|
<!-- 三方云服务相关 -->
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>software.amazon.awssdk</groupId>
|
<groupId>software.amazon.awssdk</groupId>
|
||||||
|
|
|
||||||
|
|
@ -302,6 +302,21 @@ public class LocalDateTimeUtils {
|
||||||
return timeRanges;
|
return timeRanges;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取从开始日期起的日期列表
|
||||||
|
*
|
||||||
|
* @param startDate 开始日期
|
||||||
|
* @param days 天数
|
||||||
|
* @return 日期列表,包含开始日期
|
||||||
|
*/
|
||||||
|
public static List<LocalDate> getDateList(LocalDate startDate, int days) {
|
||||||
|
List<LocalDate> dateList = new ArrayList<>(days);
|
||||||
|
for (int i = 0; i < days; i++) {
|
||||||
|
dateList.add(startDate.plusDays(i));
|
||||||
|
}
|
||||||
|
return dateList;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 格式化时间范围
|
* 格式化时间范围
|
||||||
*
|
*
|
||||||
|
|
|
||||||
|
|
@ -1,9 +1,7 @@
|
||||||
package cn.iocoder.yudao.framework.common.util.http;
|
package cn.iocoder.yudao.framework.common.util.http;
|
||||||
|
|
||||||
import cn.hutool.core.codec.Base64;
|
import cn.hutool.core.codec.Base64;
|
||||||
import cn.hutool.core.map.TableMap;
|
|
||||||
import cn.hutool.core.net.url.UrlBuilder;
|
import cn.hutool.core.net.url.UrlBuilder;
|
||||||
import cn.hutool.core.util.ReflectUtil;
|
|
||||||
import cn.hutool.core.util.StrUtil;
|
import cn.hutool.core.util.StrUtil;
|
||||||
import cn.hutool.http.HttpRequest;
|
import cn.hutool.http.HttpRequest;
|
||||||
import cn.hutool.http.HttpResponse;
|
import cn.hutool.http.HttpResponse;
|
||||||
|
|
@ -66,14 +64,10 @@ public class HttpUtils {
|
||||||
return URLDecoder.decode(encoded, StandardCharsets.UTF_8.name());
|
return URLDecoder.decode(encoded, StandardCharsets.UTF_8.name());
|
||||||
}
|
}
|
||||||
|
|
||||||
@SuppressWarnings("unchecked")
|
|
||||||
public static String replaceUrlQuery(String url, String key, String value) {
|
public static String replaceUrlQuery(String url, String key, String value) {
|
||||||
UrlBuilder builder = UrlBuilder.of(url, Charset.defaultCharset());
|
UrlBuilder builder = UrlBuilder.of(url, Charset.defaultCharset());
|
||||||
// 先移除
|
// 先移除;再添加
|
||||||
TableMap<CharSequence, CharSequence> query = (TableMap<CharSequence, CharSequence>)
|
builder.getQuery().remove(key);
|
||||||
ReflectUtil.getFieldValue(builder.getQuery(), "query");
|
|
||||||
query.remove(key);
|
|
||||||
// 后添加
|
|
||||||
builder.addQuery(key, value);
|
builder.addQuery(key, value);
|
||||||
return builder.build();
|
return builder.build();
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -173,6 +173,24 @@ public class JsonUtils {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 解析 JSON 字符串成指定类型的对象,如果解析失败,则返回 null
|
||||||
|
*
|
||||||
|
* @param text 字符串
|
||||||
|
* @param clazz 类型
|
||||||
|
* @return 指定类型的对象
|
||||||
|
*/
|
||||||
|
public static <T> T parseObjectQuietly(String text, Class<T> clazz) {
|
||||||
|
if (StrUtil.isEmpty(text)) {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
try {
|
||||||
|
return objectMapper.readValue(text, clazz);
|
||||||
|
} catch (IOException e) {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
public static <T> List<T> parseArray(String text, Class<T> clazz) {
|
public static <T> List<T> parseArray(String text, Class<T> clazz) {
|
||||||
if (StrUtil.isEmpty(text)) {
|
if (StrUtil.isEmpty(text)) {
|
||||||
return new ArrayList<>();
|
return new ArrayList<>();
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,52 @@
|
||||||
|
package cn.iocoder.yudao.framework.common.util.http;
|
||||||
|
|
||||||
|
import org.junit.jupiter.api.Test;
|
||||||
|
|
||||||
|
import static org.junit.jupiter.api.Assertions.assertEquals;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* {@link HttpUtils} 的单元测试
|
||||||
|
*/
|
||||||
|
public class HttpUtilsTest {
|
||||||
|
|
||||||
|
@Test
|
||||||
|
public void testReplaceUrlQuery_replace() {
|
||||||
|
// 准备参数
|
||||||
|
String url = "https://www.iocoder.cn/path?a=1&b=2";
|
||||||
|
// 调用
|
||||||
|
String result = HttpUtils.replaceUrlQuery(url, "a", "3");
|
||||||
|
// 断言:被替换的 key 会移到末尾,原顺序的其它参数保留
|
||||||
|
assertEquals("https://www.iocoder.cn/path?b=2&a=3", result);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
public void testReplaceUrlQuery_add() {
|
||||||
|
// 准备参数
|
||||||
|
String url = "https://www.iocoder.cn/path?a=1";
|
||||||
|
// 调用
|
||||||
|
String result = HttpUtils.replaceUrlQuery(url, "b", "2");
|
||||||
|
// 断言
|
||||||
|
assertEquals("https://www.iocoder.cn/path?a=1&b=2", result);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
public void testReplaceUrlQuery_noQuery() {
|
||||||
|
// 准备参数:原 URL 没有 query
|
||||||
|
String url = "https://www.iocoder.cn/path";
|
||||||
|
// 调用
|
||||||
|
String result = HttpUtils.replaceUrlQuery(url, "a", "1");
|
||||||
|
// 断言
|
||||||
|
assertEquals("https://www.iocoder.cn/path?a=1", result);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
public void testReplaceUrlQuery_emptyValue() {
|
||||||
|
// 准备参数:value 为空字符串
|
||||||
|
String url = "https://www.iocoder.cn/path?a=1";
|
||||||
|
// 调用
|
||||||
|
String result = HttpUtils.replaceUrlQuery(url, "a", "");
|
||||||
|
// 断言:保留 key,value 为空
|
||||||
|
assertEquals("https://www.iocoder.cn/path?a=", result);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
File diff suppressed because it is too large
Load Diff
|
|
@ -5,7 +5,12 @@ import cn.iocoder.yudao.framework.ip.core.Area;
|
||||||
import cn.iocoder.yudao.framework.ip.core.enums.AreaTypeEnum;
|
import cn.iocoder.yudao.framework.ip.core.enums.AreaTypeEnum;
|
||||||
import org.junit.jupiter.api.Test;
|
import org.junit.jupiter.api.Test;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
import static org.junit.jupiter.api.Assertions.assertEquals;
|
import static org.junit.jupiter.api.Assertions.assertEquals;
|
||||||
|
import static org.junit.jupiter.api.Assertions.assertNotNull;
|
||||||
|
import static org.junit.jupiter.api.Assertions.assertNull;
|
||||||
|
import static org.junit.jupiter.api.Assertions.assertTrue;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* {@link AreaUtils} 的单元测试
|
* {@link AreaUtils} 的单元测试
|
||||||
|
|
@ -31,6 +36,46 @@ public class AreaUtilsTest {
|
||||||
assertEquals(AreaUtils.format(110105), "北京市 北京市 朝阳区");
|
assertEquals(AreaUtils.format(110105), "北京市 北京市 朝阳区");
|
||||||
assertEquals(AreaUtils.format(1), "中国");
|
assertEquals(AreaUtils.format(1), "中国");
|
||||||
assertEquals(AreaUtils.format(2), "蒙古");
|
assertEquals(AreaUtils.format(2), "蒙古");
|
||||||
|
// 中国台湾省:省/市/区三级
|
||||||
|
assertEquals(AreaUtils.format(710101), "台湾省 台北市 中正区");
|
||||||
|
// 自定义分隔符
|
||||||
|
assertEquals(AreaUtils.format(110105, "/"), "北京市/北京市/朝阳区");
|
||||||
|
// 不存在的编号
|
||||||
|
assertNull(AreaUtils.format(-1));
|
||||||
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
public void testParseArea() {
|
||||||
|
// 调用:通过路径解析得到地区
|
||||||
|
Area area = AreaUtils.parseArea("北京市/北京市/朝阳区");
|
||||||
|
// 断言
|
||||||
|
assertNotNull(area);
|
||||||
|
assertEquals(area.getId(), 110105);
|
||||||
|
// 路径不存在时返回 null
|
||||||
|
assertNull(AreaUtils.parseArea("不存在/路径"));
|
||||||
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
public void testGetParentIdByType() {
|
||||||
|
// 调用:朝阳区向上找省
|
||||||
|
Integer provinceId = AreaUtils.getParentIdByType(110105, AreaTypeEnum.PROVINCE);
|
||||||
|
// 断言
|
||||||
|
assertEquals(provinceId, 110000);
|
||||||
|
// 自身就是目标类型
|
||||||
|
assertEquals(AreaUtils.getParentIdByType(110000, AreaTypeEnum.PROVINCE), 110000);
|
||||||
|
// 不存在的编号返回 null
|
||||||
|
assertNull(AreaUtils.getParentIdByType(-1, AreaTypeEnum.PROVINCE));
|
||||||
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
public void testGetByType() {
|
||||||
|
// 调用:获取所有省份
|
||||||
|
List<Area> provinces = AreaUtils.getByType(AreaTypeEnum.PROVINCE, area -> area);
|
||||||
|
// 断言:包含北京、台湾、香港、澳门
|
||||||
|
assertTrue(provinces.stream().anyMatch(area -> "北京市".equals(area.getName())));
|
||||||
|
assertTrue(provinces.stream().anyMatch(area -> "台湾省".equals(area.getName())));
|
||||||
|
assertTrue(provinces.stream().anyMatch(area -> "香港特别行政区".equals(area.getName())));
|
||||||
|
assertTrue(provinces.stream().anyMatch(area -> "澳门特别行政区".equals(area.getName())));
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -119,6 +119,31 @@ public interface BaseMapperX<T> extends MPJBaseMapper<T> {
|
||||||
return selectOne(new LambdaQueryWrapper<T>().eq(field1, value1).eq(field2, value2).eq(field3, value3));
|
return selectOne(new LambdaQueryWrapper<T>().eq(field1, value1).eq(field2, value2).eq(field3, value3));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获得满足条件的一条记录,并使用 FOR UPDATE 锁定。
|
||||||
|
*
|
||||||
|
* 注意:需要在事务中调用,否则锁会立即释放。
|
||||||
|
*
|
||||||
|
* @param queryWrapper 查询条件
|
||||||
|
* @return 实体
|
||||||
|
*/
|
||||||
|
default T selectOneForUpdate(LambdaQueryWrapper<T> queryWrapper) {
|
||||||
|
return selectOne(queryWrapper.last("FOR UPDATE"));
|
||||||
|
}
|
||||||
|
|
||||||
|
default T selectOneForUpdate(SFunction<T, ?> field, Object value) {
|
||||||
|
return selectOneForUpdate(new LambdaQueryWrapper<T>().eq(field, value));
|
||||||
|
}
|
||||||
|
|
||||||
|
default T selectOneForUpdate(SFunction<T, ?> field1, Object value1, SFunction<T, ?> field2, Object value2) {
|
||||||
|
return selectOneForUpdate(new LambdaQueryWrapper<T>().eq(field1, value1).eq(field2, value2));
|
||||||
|
}
|
||||||
|
|
||||||
|
default T selectOneForUpdate(SFunction<T, ?> field1, Object value1, SFunction<T, ?> field2, Object value2,
|
||||||
|
SFunction<T, ?> field3, Object value3) {
|
||||||
|
return selectOneForUpdate(new LambdaQueryWrapper<T>().eq(field1, value1).eq(field2, value2).eq(field3, value3));
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 获取满足条件的第 1 条记录
|
* 获取满足条件的第 1 条记录
|
||||||
*
|
*
|
||||||
|
|
|
||||||
|
|
@ -36,6 +36,17 @@
|
||||||
<groupId>io.github.openfeign</groupId>
|
<groupId>io.github.openfeign</groupId>
|
||||||
<artifactId>feign-okhttp</artifactId>
|
<artifactId>feign-okhttp</artifactId>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
<!--
|
||||||
|
TODO 芋艿:WxJava 4.8.x 的 AbstractWxMpConfigStorageConfiguration 仍引用了 HttpClient 4.x 的
|
||||||
|
org.apache.http.ssl.TrustStrategy 类。升级 Spring Cloud Alibaba 到 2025.0.0.0 后,Nacos 不再
|
||||||
|
传递 HttpClient 4.x(httpcore),导致 ClassNotFoundException。
|
||||||
|
临时解决:显式引入 httpclient 4.x。待 WxJava 修复后移除。
|
||||||
|
-->
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.apache.httpcomponents</groupId>
|
||||||
|
<artifactId>httpclient</artifactId>
|
||||||
|
<version>4.5.14</version>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
<!-- 工具相关 -->
|
<!-- 工具相关 -->
|
||||||
<dependency>
|
<dependency>
|
||||||
|
|
|
||||||
|
|
@ -37,8 +37,14 @@ public class BannerApplicationRunner implements ApplicationRunner {
|
||||||
System.out.println("[商城系统 yudao-module-mall 教程][参考 https://cloud.iocoder.cn/mall/build/ 开启]");
|
System.out.println("[商城系统 yudao-module-mall 教程][参考 https://cloud.iocoder.cn/mall/build/ 开启]");
|
||||||
// ERP 系统
|
// ERP 系统
|
||||||
System.out.println("[ERP 系统 yudao-module-erp - 教程][参考 https://cloud.iocoder.cn/erp/build/ 开启]");
|
System.out.println("[ERP 系统 yudao-module-erp - 教程][参考 https://cloud.iocoder.cn/erp/build/ 开启]");
|
||||||
|
// WMS 仓库管理系统
|
||||||
|
System.out.println("[WMS 仓库管理系统 yudao-module-wms - 教程][参考 https://cloud.iocoder.cn/wms/build/ 开启]");
|
||||||
// CRM 系统
|
// CRM 系统
|
||||||
System.out.println("[CRM 系统 yudao-module-crm - 教程][参考 https://cloud.iocoder.cn/crm/build/ 开启]");
|
System.out.println("[CRM 系统 yudao-module-crm - 教程][参考 https://cloud.iocoder.cn/crm/build/ 开启]");
|
||||||
|
// MES 系统
|
||||||
|
System.out.println("[MES 系统 yudao-module-mes - 教程][参考 https://cloud.iocoder.cn/mes/build/ 开启]");
|
||||||
|
// IM 即时通讯
|
||||||
|
System.out.println("[IM 即时通讯 yudao-module-im - 教程][参考 https://cloud.iocoder.cn/im/build/ 开启]");
|
||||||
// 微信公众号
|
// 微信公众号
|
||||||
System.out.println("[微信公众号 yudao-module-mp 教程][参考 https://cloud.iocoder.cn/mp/build/ 开启]");
|
System.out.println("[微信公众号 yudao-module-mp 教程][参考 https://cloud.iocoder.cn/mp/build/ 开启]");
|
||||||
// 支付平台
|
// 支付平台
|
||||||
|
|
|
||||||
|
|
@ -410,25 +410,43 @@ public class GlobalExceptionHandler {
|
||||||
return CommonResult.error(NOT_IMPLEMENTED.getCode(),
|
return CommonResult.error(NOT_IMPLEMENTED.getCode(),
|
||||||
"[ERP 系统 yudao-module-erp - 表结构未导入][参考 https://cloud.iocoder.cn/erp/build/ 开启]");
|
"[ERP 系统 yudao-module-erp - 表结构未导入][参考 https://cloud.iocoder.cn/erp/build/ 开启]");
|
||||||
}
|
}
|
||||||
// 6. CRM 系统
|
// 6. WMS 仓库管理系统
|
||||||
|
if (message.contains("wms_")) {
|
||||||
|
log.error("[WMS 仓库管理系统 yudao-module-wms - 表结构未导入][参考 https://cloud.iocoder.cn/wms/build/ 开启]");
|
||||||
|
return CommonResult.error(NOT_IMPLEMENTED.getCode(),
|
||||||
|
"[WMS 仓库管理系统 yudao-module-wms - 表结构未导入][参考 https://cloud.iocoder.cn/wms/build/ 开启]");
|
||||||
|
}
|
||||||
|
// 7. CRM 系统
|
||||||
if (message.contains("crm_")) {
|
if (message.contains("crm_")) {
|
||||||
log.error("[CRM 系统 yudao-module-crm - 表结构未导入][参考 https://cloud.iocoder.cn/crm/build/ 开启]");
|
log.error("[CRM 系统 yudao-module-crm - 表结构未导入][参考 https://cloud.iocoder.cn/crm/build/ 开启]");
|
||||||
return CommonResult.error(NOT_IMPLEMENTED.getCode(),
|
return CommonResult.error(NOT_IMPLEMENTED.getCode(),
|
||||||
"[CRM 系统 yudao-module-crm - 表结构未导入][参考 https://cloud.iocoder.cn/crm/build/ 开启]");
|
"[CRM 系统 yudao-module-crm - 表结构未导入][参考 https://cloud.iocoder.cn/crm/build/ 开启]");
|
||||||
}
|
}
|
||||||
// 7. 支付平台
|
// 8. MES 系统
|
||||||
|
if (message.contains("mes_")) {
|
||||||
|
log.error("[MES 系统 yudao-module-mes - 表结构未导入][参考 https://cloud.iocoder.cn/mes/build/ 开启]");
|
||||||
|
return CommonResult.error(NOT_IMPLEMENTED.getCode(),
|
||||||
|
"[MES 系统 yudao-module-mes - 表结构未导入][参考 https://cloud.iocoder.cn/mes/build/ 开启]");
|
||||||
|
}
|
||||||
|
// 9. IM 即时通讯
|
||||||
|
if (message.contains("im_")) {
|
||||||
|
log.error("[IM 即时通讯 yudao-module-im - 表结构未导入][参考 https://cloud.iocoder.cn/im/build/ 开启]");
|
||||||
|
return CommonResult.error(NOT_IMPLEMENTED.getCode(),
|
||||||
|
"[IM 即时通讯 yudao-module-im - 表结构未导入][参考 https://cloud.iocoder.cn/im/build/ 开启]");
|
||||||
|
}
|
||||||
|
// 10. 支付平台
|
||||||
if (message.contains("pay_")) {
|
if (message.contains("pay_")) {
|
||||||
log.error("[支付模块 yudao-module-pay - 表结构未导入][参考 https://cloud.iocoder.cn/pay/build/ 开启]");
|
log.error("[支付模块 yudao-module-pay - 表结构未导入][参考 https://cloud.iocoder.cn/pay/build/ 开启]");
|
||||||
return CommonResult.error(NOT_IMPLEMENTED.getCode(),
|
return CommonResult.error(NOT_IMPLEMENTED.getCode(),
|
||||||
"[支付模块 yudao-module-pay - 表结构未导入][参考 https://cloud.iocoder.cn/pay/build/ 开启]");
|
"[支付模块 yudao-module-pay - 表结构未导入][参考 https://cloud.iocoder.cn/pay/build/ 开启]");
|
||||||
}
|
}
|
||||||
// 8. AI 大模型
|
// 11. AI 大模型
|
||||||
if (message.contains("ai_")) {
|
if (message.contains("ai_")) {
|
||||||
log.error("[AI 大模型 yudao-module-ai - 表结构未导入][参考 https://cloud.iocoder.cn/ai/build/ 开启]");
|
log.error("[AI 大模型 yudao-module-ai - 表结构未导入][参考 https://cloud.iocoder.cn/ai/build/ 开启]");
|
||||||
return CommonResult.error(NOT_IMPLEMENTED.getCode(),
|
return CommonResult.error(NOT_IMPLEMENTED.getCode(),
|
||||||
"[AI 大模型 yudao-module-ai - 表结构未导入][参考 https://cloud.iocoder.cn/ai/build/ 开启]");
|
"[AI 大模型 yudao-module-ai - 表结构未导入][参考 https://cloud.iocoder.cn/ai/build/ 开启]");
|
||||||
}
|
}
|
||||||
// 9. IoT 物联网
|
// 12. IoT 物联网
|
||||||
if (message.contains("iot_")) {
|
if (message.contains("iot_")) {
|
||||||
log.error("[IoT 物联网 yudao-module-iot - 表结构未导入][参考 https://doc.iocoder.cn/iot/build/ 开启]");
|
log.error("[IoT 物联网 yudao-module-iot - 表结构未导入][参考 https://doc.iocoder.cn/iot/build/ 开启]");
|
||||||
return CommonResult.error(NOT_IMPLEMENTED.getCode(),
|
return CommonResult.error(NOT_IMPLEMENTED.getCode(),
|
||||||
|
|
|
||||||
|
|
@ -39,8 +39,14 @@ public class BannerApplicationRunner implements ApplicationRunner {
|
||||||
System.out.println("[商城系统 yudao-module-mall 教程][参考 https://cloud.iocoder.cn/mall/build/ 开启]");
|
System.out.println("[商城系统 yudao-module-mall 教程][参考 https://cloud.iocoder.cn/mall/build/ 开启]");
|
||||||
// ERP 系统
|
// ERP 系统
|
||||||
System.out.println("[ERP 系统 yudao-module-erp - 教程][参考 https://cloud.iocoder.cn/erp/build/ 开启]");
|
System.out.println("[ERP 系统 yudao-module-erp - 教程][参考 https://cloud.iocoder.cn/erp/build/ 开启]");
|
||||||
|
// WMS 仓库管理系统
|
||||||
|
System.out.println("[WMS 仓库管理系统 yudao-module-wms - 教程][参考 https://cloud.iocoder.cn/wms/build/ 开启]");
|
||||||
// CRM 系统
|
// CRM 系统
|
||||||
System.out.println("[CRM 系统 yudao-module-crm - 教程][参考 https://cloud.iocoder.cn/crm/build/ 开启]");
|
System.out.println("[CRM 系统 yudao-module-crm - 教程][参考 https://cloud.iocoder.cn/crm/build/ 开启]");
|
||||||
|
// MES 系统
|
||||||
|
System.out.println("[MES 系统 yudao-module-mes - 教程][参考 https://cloud.iocoder.cn/mes/build/ 开启]");
|
||||||
|
// IM 即时通讯
|
||||||
|
System.out.println("[IM 即时通讯 yudao-module-im - 教程][参考 https://cloud.iocoder.cn/im/build/ 开启]");
|
||||||
// 微信公众号
|
// 微信公众号
|
||||||
System.out.println("[微信公众号 yudao-module-mp 教程][参考 https://cloud.iocoder.cn/mp/build/ 开启]");
|
System.out.println("[微信公众号 yudao-module-mp 教程][参考 https://cloud.iocoder.cn/mp/build/ 开启]");
|
||||||
// 支付平台
|
// 支付平台
|
||||||
|
|
|
||||||
|
|
@ -199,6 +199,13 @@ spring:
|
||||||
- Path=/admin-api/mes/**
|
- Path=/admin-api/mes/**
|
||||||
filters:
|
filters:
|
||||||
- RewritePath=/admin-api/mes/v3/api-docs, /v3/api-docs # 配置,保证转发到 /v3/api-docs
|
- RewritePath=/admin-api/mes/v3/api-docs, /v3/api-docs # 配置,保证转发到 /v3/api-docs
|
||||||
|
## wms-server 服务
|
||||||
|
- id: wms-admin-api # 路由的编号
|
||||||
|
uri: grayLb://wms-server
|
||||||
|
predicates: # 断言,作为路由的匹配条件,对应 RouteDefinition 数组
|
||||||
|
- Path=/admin-api/wms/**
|
||||||
|
filters:
|
||||||
|
- RewritePath=/admin-api/wms/v3/api-docs, /v3/api-docs # 配置,保证转发到 /v3/api-docs
|
||||||
x-forwarded:
|
x-forwarded:
|
||||||
prefix-enabled: false # 避免 Swagger 重复带上额外的 /admin-api/system 前缀
|
prefix-enabled: false # 避免 Swagger 重复带上额外的 /admin-api/system 前缀
|
||||||
default-filters: # 全局过滤器,对应 GatewayFilterDefinition 数组
|
default-filters: # 全局过滤器,对应 GatewayFilterDefinition 数组
|
||||||
|
|
@ -261,9 +268,12 @@ knife4j:
|
||||||
- name: mes-server
|
- name: mes-server
|
||||||
service-name: mes-server
|
service-name: mes-server
|
||||||
url: /admin-api/mes/v3/api-docs
|
url: /admin-api/mes/v3/api-docs
|
||||||
|
- name: wms-server
|
||||||
|
service-name: wms-server
|
||||||
|
url: /admin-api/wms/v3/api-docs
|
||||||
|
|
||||||
--- #################### 芋道相关配置 ####################
|
--- #################### 芋道相关配置 ####################
|
||||||
|
|
||||||
yudao:
|
yudao:
|
||||||
info:
|
info:
|
||||||
version: 1.0.0
|
version: 1.0.0
|
||||||
|
|
|
||||||
|
|
@ -19,9 +19,9 @@
|
||||||
国外:OpenAI、Ollama、Midjourney、StableDiffusion、Suno
|
国外:OpenAI、Ollama、Midjourney、StableDiffusion、Suno
|
||||||
</description>
|
</description>
|
||||||
<properties>
|
<properties>
|
||||||
<spring-ai.version>1.1.2</spring-ai.version>
|
<spring-ai.version>1.1.5</spring-ai.version>
|
||||||
<!-- https://mvnrepository.com/artifact/com.alibaba.cloud.ai/spring-ai-alibaba -->
|
<!-- https://mvnrepository.com/artifact/com.alibaba.cloud.ai/spring-ai-alibaba -->
|
||||||
<alibaba-ai.version>1.1.0.0-RC2</alibaba-ai.version>
|
<alibaba-ai.version>1.1.2.2</alibaba-ai.version>
|
||||||
<tinyflow.version>1.2.6</tinyflow.version>
|
<tinyflow.version>1.2.6</tinyflow.version>
|
||||||
</properties>
|
</properties>
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -83,6 +83,15 @@ public class AiKnowledgeSegmentController {
|
||||||
return success(true);
|
return success(true);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@DeleteMapping("/delete")
|
||||||
|
@Operation(summary = "删除段落")
|
||||||
|
@Parameter(name = "id", description = "段落编号", required = true, example = "1024")
|
||||||
|
@PreAuthorize("@ss.hasPermission('ai:knowledge:delete')")
|
||||||
|
public CommonResult<Boolean> deleteKnowledgeSegment(@RequestParam("id") Long id) {
|
||||||
|
segmentService.deleteKnowledgeSegment(id);
|
||||||
|
return success(true);
|
||||||
|
}
|
||||||
|
|
||||||
@GetMapping("/split")
|
@GetMapping("/split")
|
||||||
@Operation(summary = "切片内容")
|
@Operation(summary = "切片内容")
|
||||||
@Parameters({
|
@Parameters({
|
||||||
|
|
|
||||||
|
|
@ -109,6 +109,7 @@ public class AiImageServiceImpl implements AiImageService {
|
||||||
}
|
}
|
||||||
|
|
||||||
@Async
|
@Async
|
||||||
|
@SuppressWarnings("ConstantValue")
|
||||||
public void executeDrawImage(AiImageDO image, AiImageDrawReqVO reqVO, AiModelDO model) {
|
public void executeDrawImage(AiImageDO image, AiImageDrawReqVO reqVO, AiModelDO model) {
|
||||||
try {
|
try {
|
||||||
// 1.1 构建请求
|
// 1.1 构建请求
|
||||||
|
|
@ -164,8 +165,8 @@ public class AiImageServiceImpl implements AiImageService {
|
||||||
.build();
|
.build();
|
||||||
} else if (ObjUtil.equal(model.getPlatform(), AiPlatformEnum.TONG_YI.getPlatform())) {
|
} else if (ObjUtil.equal(model.getPlatform(), AiPlatformEnum.TONG_YI.getPlatform())) {
|
||||||
return DashScopeImageOptions.builder()
|
return DashScopeImageOptions.builder()
|
||||||
.withModel(model.getModel()).withN(1)
|
.model(model.getModel()).n(1)
|
||||||
.withHeight(draw.getHeight()).withWidth(draw.getWidth())
|
.height(draw.getHeight()).width(draw.getWidth())
|
||||||
.build();
|
.build();
|
||||||
} else if (ObjUtil.equal(model.getPlatform(), AiPlatformEnum.YI_YAN.getPlatform())) {
|
} else if (ObjUtil.equal(model.getPlatform(), AiPlatformEnum.YI_YAN.getPlatform())) {
|
||||||
return QianFanImageOptions.builder()
|
return QianFanImageOptions.builder()
|
||||||
|
|
|
||||||
|
|
@ -98,6 +98,13 @@ public interface AiKnowledgeSegmentService {
|
||||||
*/
|
*/
|
||||||
void updateKnowledgeSegmentStatus(AiKnowledgeSegmentUpdateStatusReqVO reqVO);
|
void updateKnowledgeSegmentStatus(AiKnowledgeSegmentUpdateStatusReqVO reqVO);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除知识库段落
|
||||||
|
*
|
||||||
|
* @param id 段落编号
|
||||||
|
*/
|
||||||
|
void deleteKnowledgeSegment(Long id);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 重新索引知识库下的所有文档段落
|
* 重新索引知识库下的所有文档段落
|
||||||
*
|
*
|
||||||
|
|
|
||||||
|
|
@ -141,6 +141,19 @@ public class AiKnowledgeSegmentServiceImpl implements AiKnowledgeSegmentService
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void deleteKnowledgeSegment(Long id) {
|
||||||
|
// 1. 校验段落存在
|
||||||
|
AiKnowledgeSegmentDO segment = validateKnowledgeSegmentExists(id);
|
||||||
|
|
||||||
|
// 2. 删除向量
|
||||||
|
VectorStore vectorStore = getVectorStoreById(segment.getKnowledgeId());
|
||||||
|
deleteVectorStore(vectorStore, segment);
|
||||||
|
|
||||||
|
// 3. 删除段落记录
|
||||||
|
segmentMapper.deleteById(id);
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void deleteKnowledgeSegmentByDocumentId(Long documentId) {
|
public void deleteKnowledgeSegmentByDocumentId(Long documentId) {
|
||||||
// 1. 查询需要删除的段落
|
// 1. 查询需要删除的段落
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,9 @@
|
||||||
package cn.iocoder.yudao.module.ai.util;
|
package cn.iocoder.yudao.module.ai.util;
|
||||||
|
|
||||||
|
import cn.hutool.core.map.MapUtil;
|
||||||
import cn.hutool.core.util.ObjUtil;
|
import cn.hutool.core.util.ObjUtil;
|
||||||
import cn.hutool.core.util.StrUtil;
|
import cn.hutool.core.util.StrUtil;
|
||||||
|
import cn.iocoder.yudao.framework.common.util.collection.SetUtils;
|
||||||
import cn.iocoder.yudao.framework.security.core.util.SecurityFrameworkUtils;
|
import cn.iocoder.yudao.framework.security.core.util.SecurityFrameworkUtils;
|
||||||
import cn.iocoder.yudao.framework.tenant.core.context.TenantContextHolder;
|
import cn.iocoder.yudao.framework.tenant.core.context.TenantContextHolder;
|
||||||
import cn.iocoder.yudao.module.ai.enums.model.AiPlatformEnum;
|
import cn.iocoder.yudao.module.ai.enums.model.AiPlatformEnum;
|
||||||
|
|
@ -33,6 +35,28 @@ public class AiUtils {
|
||||||
public static final String TOOL_CONTEXT_LOGIN_USER = "LOGIN_USER";
|
public static final String TOOL_CONTEXT_LOGIN_USER = "LOGIN_USER";
|
||||||
public static final String TOOL_CONTEXT_TENANT_ID = "TENANT_ID";
|
public static final String TOOL_CONTEXT_TENANT_ID = "TENANT_ID";
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 通义千问支持多模态的模型
|
||||||
|
*
|
||||||
|
* @see <a href="https://bailian.console.aliyun.com/cn-beijing/?tab=model#/model-market/all?providers=qwen&capabilities=VU">模型广场</a>
|
||||||
|
* @see <a href="https://help.aliyun.com/zh/model-studio/error-code#error-url">必须开启 withMultiModel 参数</a>
|
||||||
|
*/
|
||||||
|
public static final Set<String> TONG_YI_MULTI_MODELS = SetUtils.asSet(
|
||||||
|
// qwen3.5 / 3.6 系列(统一多模态主干)
|
||||||
|
"qwen3.6-plus", "qwen3.6-flash",
|
||||||
|
"qwen3.5-plus", "qwen3.5-flash",
|
||||||
|
// qwen-vl 视觉理解
|
||||||
|
"qwen3-vl-plus", "qwen3-vl-flash",
|
||||||
|
"qwen-vl-max", "qwen-vl-plus",
|
||||||
|
"qwen2.5-vl-72b-instruct", "qwen2.5-vl-32b-instruct",
|
||||||
|
"qwen2.5-vl-7b-instruct", "qwen2.5-vl-3b-instruct",
|
||||||
|
// qvq 视觉推理
|
||||||
|
"qvq-max", "qvq-plus",
|
||||||
|
// qwen-omni 全模态
|
||||||
|
"qwen3.5-omni-plus", "qwen3.5-omni-flash",
|
||||||
|
"qwen3-omni-flash", "qwen-omni-turbo"
|
||||||
|
);
|
||||||
|
|
||||||
public static ChatOptions buildChatOptions(AiPlatformEnum platform, String model, Double temperature, Integer maxTokens) {
|
public static ChatOptions buildChatOptions(AiPlatformEnum platform, String model, Double temperature, Integer maxTokens) {
|
||||||
return buildChatOptions(platform, model, temperature, maxTokens, null, null);
|
return buildChatOptions(platform, model, temperature, maxTokens, null, null);
|
||||||
}
|
}
|
||||||
|
|
@ -44,9 +68,10 @@ public class AiUtils {
|
||||||
// noinspection EnhancedSwitchMigration
|
// noinspection EnhancedSwitchMigration
|
||||||
switch (platform) {
|
switch (platform) {
|
||||||
case TONG_YI:
|
case TONG_YI:
|
||||||
return DashScopeChatOptions.builder().withModel(model).withTemperature(temperature).withMaxToken(maxTokens)
|
return DashScopeChatOptions.builder().model(model).temperature(temperature).maxToken(maxTokens)
|
||||||
.withEnableThinking(true) // TODO 芋艿:默认都开启 thinking 模式,后续可以让用户配置
|
.enableThinking(true) // TODO 芋艿:默认都开启 thinking 模式,后续可以让用户配置
|
||||||
.withToolCallbacks(toolCallbacks).withToolContext(toolContext).build();
|
.multiModel(TONG_YI_MULTI_MODELS.contains(model)) // 是否多模态模型
|
||||||
|
.toolCallbacks(toolCallbacks).toolContext(toolContext).build();
|
||||||
case YI_YAN:
|
case YI_YAN:
|
||||||
return QianFanChatOptions.builder().model(model).temperature(temperature).maxTokens(maxTokens).build();
|
return QianFanChatOptions.builder().model(model).temperature(temperature).maxTokens(maxTokens).build();
|
||||||
case DEEP_SEEK:
|
case DEEP_SEEK:
|
||||||
|
|
@ -125,10 +150,13 @@ public class AiUtils {
|
||||||
|| response.getResult().getOutput() == null) {
|
|| response.getResult().getOutput() == null) {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
if (response.getResult().getOutput() instanceof DeepSeekAssistantMessage) {
|
AssistantMessage output = response.getResult().getOutput();
|
||||||
return ((DeepSeekAssistantMessage) (response.getResult().getOutput())).getReasoningContent();
|
// DeepSeek 通过专属 AssistantMessage 暴露 reasoningContent
|
||||||
|
if (output instanceof DeepSeekAssistantMessage) {
|
||||||
|
return ((DeepSeekAssistantMessage) output).getReasoningContent();
|
||||||
}
|
}
|
||||||
return null;
|
// 通义千问等通过 metadata 透传 reasoningContent
|
||||||
|
return MapUtil.getStr(output.getMetadata(), "reasoningContent");
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
@ -103,7 +103,7 @@ xxl:
|
||||||
# Lock4j 配置项
|
# Lock4j 配置项
|
||||||
lock4j:
|
lock4j:
|
||||||
acquire-timeout: 3000 # 获取分布式锁超时时间,默认为 3000 毫秒
|
acquire-timeout: 3000 # 获取分布式锁超时时间,默认为 3000 毫秒
|
||||||
expire: 30000 # 分布式锁的超时时间,默认为 30 毫秒
|
expire: 30000 # 分布式锁的超时时间,默认为 30000 毫秒
|
||||||
|
|
||||||
--- #################### 监控相关配置 ####################
|
--- #################### 监控相关配置 ####################
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -98,7 +98,7 @@ xxl:
|
||||||
# Lock4j 配置项
|
# Lock4j 配置项
|
||||||
lock4j:
|
lock4j:
|
||||||
acquire-timeout: 3000 # 获取分布式锁超时时间,默认为 3000 毫秒
|
acquire-timeout: 3000 # 获取分布式锁超时时间,默认为 3000 毫秒
|
||||||
expire: 30000 # 分布式锁的超时时间,默认为 30 毫秒
|
expire: 30000 # 分布式锁的超时时间,默认为 30000 毫秒
|
||||||
|
|
||||||
--- #################### 监控相关配置 ####################
|
--- #################### 监控相关配置 ####################
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -34,15 +34,15 @@ public class TongYiChatModelTests {
|
||||||
|
|
||||||
private final DashScopeChatModel chatModel = DashScopeChatModel.builder()
|
private final DashScopeChatModel chatModel = DashScopeChatModel.builder()
|
||||||
.dashScopeApi(DashScopeApi.builder()
|
.dashScopeApi(DashScopeApi.builder()
|
||||||
.apiKey("sk-47aa124781be4bfb95244cc62f63f7d0")
|
.apiKey("sk-cd9f39e99ea54840bd1888282325f55a") // https://bailian.console.aliyun.com/cn-beijing/?tab=model#/api-key 获取密钥
|
||||||
.build())
|
.build())
|
||||||
.defaultOptions(DashScopeChatOptions.builder()
|
.defaultOptions(DashScopeChatOptions.builder()
|
||||||
// .withModel("qwen1.5-72b-chat") // 模型
|
.multiModel(true) // 注意:当使用 qwen3.6-plus 等多模态模型,需要设置为 true,可见 https://help.aliyun.com/zh/model-studio/error-code#error-url 链接
|
||||||
.withModel("qwen3-235b-a22b-thinking-2507") // 模型
|
.model("qwen3.6-plus") // 模型
|
||||||
// .withModel("deepseek-r1") // 模型(deepseek-r1)
|
// .model("deepseek-r1") // 模型(deepseek-r1)
|
||||||
// .withModel("deepseek-v3") // 模型(deepseek-v3)
|
// .model("deepseek-v3") // 模型(deepseek-v3)
|
||||||
// .withModel("deepseek-r1-distill-qwen-1.5b") // 模型(deepseek-r1-distill-qwen-1.5b)
|
// .model("deepseek-r1-distill-qwen-1.5b") // 模型(deepseek-r1-distill-qwen-1.5b)
|
||||||
// .withEnableThinking(true)
|
// .enableThinking(true)
|
||||||
.build())
|
.build())
|
||||||
.build();
|
.build();
|
||||||
|
|
||||||
|
|
@ -85,9 +85,9 @@ public class TongYiChatModelTests {
|
||||||
List<Message> messages = new ArrayList<>();
|
List<Message> messages = new ArrayList<>();
|
||||||
messages.add(new UserMessage("详细分析下,如何设计一个电商系统?"));
|
messages.add(new UserMessage("详细分析下,如何设计一个电商系统?"));
|
||||||
DashScopeChatOptions options = DashScopeChatOptions.builder()
|
DashScopeChatOptions options = DashScopeChatOptions.builder()
|
||||||
.withModel("qwen3-235b-a22b-thinking-2507")
|
.model("qwen3.6-plus").multiModel(true)
|
||||||
// .withModel("qwen-max-2025-01-25")
|
// .withModel("qwen-max-2025-01-25")
|
||||||
.withEnableThinking(true) // 必须设置,否则会报错
|
.enableThinking(true) // 必须设置,否则会报错
|
||||||
.build();
|
.build();
|
||||||
|
|
||||||
// 调用
|
// 调用
|
||||||
|
|
@ -112,8 +112,8 @@ public class TongYiChatModelTests {
|
||||||
Document document01 = new Document("abc");
|
Document document01 = new Document("abc");
|
||||||
Document document02 = new Document("sapring");
|
Document document02 = new Document("sapring");
|
||||||
RerankOptions options = DashScopeRerankOptions.builder()
|
RerankOptions options = DashScopeRerankOptions.builder()
|
||||||
.withTopN(1)
|
.topN(1)
|
||||||
.withModel("gte-rerank-v2")
|
.model("gte-rerank-v2")
|
||||||
.build();
|
.build();
|
||||||
RerankRequest rerankRequest = new RerankRequest(
|
RerankRequest rerankRequest = new RerankRequest(
|
||||||
query,
|
query,
|
||||||
|
|
|
||||||
|
|
@ -12,23 +12,34 @@ import org.springframework.ai.image.ImageResponse;
|
||||||
/**
|
/**
|
||||||
* {@link DashScopeImageModel} 集成测试类
|
* {@link DashScopeImageModel} 集成测试类
|
||||||
*
|
*
|
||||||
|
* TODO @芋艿:注:spring-ai-alibaba-dashscope(1.1.2.2)的 {@code DashScopeImageApi#resolveImagePath} 未给 {@code wan2.7-image} 加路由分支,
|
||||||
|
* 会落到默认的 {@code text2image/image-synthesis} 异步端点 + 旧版 {@code prompt} 入参,
|
||||||
|
* 而该模型实际要求 {@code multimodal-generation/generation} 同步端点 + {@code messages} 入参,
|
||||||
|
* 端点、异步头、入参结构全部对不上,所以走 SDK 直接调用必失败。
|
||||||
|
*
|
||||||
|
* 临时方案:改用 SDK 已支持的 {@code wan2.6-image}(异步)或 {@code qwen-image}(同步);
|
||||||
|
* 或在项目内同包同名覆盖 {@code DashScopeImageApi},把 {@code wan2.7*} 也路由到 {@code wan2.6-image} 那条 {@code image-generation/generation} 异步分支。
|
||||||
|
*
|
||||||
* @author fansili
|
* @author fansili
|
||||||
*/
|
*/
|
||||||
public class TongYiImagesModelTest {
|
public class TongYiImagesModelTest {
|
||||||
|
|
||||||
private final DashScopeImageModel imageModel = DashScopeImageModel.builder()
|
private final DashScopeImageModel imageModel = DashScopeImageModel.builder()
|
||||||
.dashScopeApi(DashScopeImageApi.builder()
|
.dashScopeApi(DashScopeImageApi.builder()
|
||||||
.apiKey("sk-47aa124781be4bfb95244cc62f63f7d0")
|
.apiKey("sk-cd9f39e99ea54840bd1888282325f55a") // https://bailian.console.aliyun.com/cn-beijing/?tab=model#/api-key 获取密钥
|
||||||
.build())
|
.build())
|
||||||
.build();
|
.build();
|
||||||
|
|
||||||
|
// TODO @芋艿:
|
||||||
@Test
|
@Test
|
||||||
@Disabled
|
@Disabled
|
||||||
public void imageCallTest() {
|
public void imageCallTest() {
|
||||||
// 准备参数
|
// 准备参数
|
||||||
ImageOptions options = DashScopeImageOptions.builder()
|
ImageOptions options = DashScopeImageOptions.builder()
|
||||||
.withModel("wanx-v1")
|
.model("wan2.7-image")
|
||||||
.withHeight(256).withWidth(256)
|
// .withSize("2k")
|
||||||
|
.height(768).width(768)
|
||||||
|
.n(1)
|
||||||
.build();
|
.build();
|
||||||
ImagePrompt prompt = new ImagePrompt("中国长城!", options);
|
ImagePrompt prompt = new ImagePrompt("中国长城!", options);
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,38 @@
|
||||||
|
package cn.iocoder.yudao.module.bpm.enums.definition;
|
||||||
|
|
||||||
|
import lombok.Getter;
|
||||||
|
import lombok.RequiredArgsConstructor;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* BPM 条件表达式操作符枚举
|
||||||
|
*
|
||||||
|
* @author Lesan
|
||||||
|
*/
|
||||||
|
@RequiredArgsConstructor
|
||||||
|
@Getter
|
||||||
|
public enum BpmConditionOpCodeEnum {
|
||||||
|
|
||||||
|
EQ("==", "等于", " var:getOrDefault(%s, null) == %s "),
|
||||||
|
NE("!=", "不等于", " var:getOrDefault(%s, null) != %s "),
|
||||||
|
GT(">", "大于", " var:getOrDefault(%s, null) > %s "),
|
||||||
|
GE(">=", "大于等于", " var:getOrDefault(%s, null) >= %s "),
|
||||||
|
LT("<", "小于", " var:getOrDefault(%s, null) < %s "),
|
||||||
|
LE("<=", "小于等于", " var:getOrDefault(%s, null) <= %s "),
|
||||||
|
|
||||||
|
CONTAINS("contain", "包含", " var:contains(%s, %s) "),
|
||||||
|
NOT_CONTAINS("!contain", "不包含", " !var:contains(%s, %s) ");
|
||||||
|
|
||||||
|
private final String code;
|
||||||
|
private final String des;
|
||||||
|
private final String symbol;
|
||||||
|
|
||||||
|
public static BpmConditionOpCodeEnum fromCode(String code) {
|
||||||
|
for (BpmConditionOpCodeEnum op : BpmConditionOpCodeEnum.values()) {
|
||||||
|
if (op.code.equalsIgnoreCase(code)) {
|
||||||
|
return op;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
throw new IllegalArgumentException("未知操作符: " + code);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
@ -2,6 +2,8 @@ package cn.iocoder.yudao.module.bpm.controller.admin.definition.vo.form;
|
||||||
|
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 流程表单字段 VO
|
* 流程表单字段 VO
|
||||||
*/
|
*/
|
||||||
|
|
@ -20,5 +22,9 @@ public class BpmFormFieldVO {
|
||||||
* 字段标题
|
* 字段标题
|
||||||
*/
|
*/
|
||||||
private String title;
|
private String title;
|
||||||
|
/**
|
||||||
|
* 子表单字段(处理布局组件)
|
||||||
|
*/
|
||||||
|
private List<BpmFormFieldVO> children;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -66,15 +66,15 @@ public class BpmProcessInstanceCopyController {
|
||||||
Map<String, HistoricProcessInstance> processInstanceMap = processInstanceService.getHistoricProcessInstanceMap(
|
Map<String, HistoricProcessInstance> processInstanceMap = processInstanceService.getHistoricProcessInstanceMap(
|
||||||
convertSet(pageResult.getList(), BpmProcessInstanceCopyDO::getProcessInstanceId));
|
convertSet(pageResult.getList(), BpmProcessInstanceCopyDO::getProcessInstanceId));
|
||||||
Map<Long, AdminUserRespDTO> userMap = adminUserApi.getUserMap(convertListByFlatMap(pageResult.getList(),
|
Map<Long, AdminUserRespDTO> userMap = adminUserApi.getUserMap(convertListByFlatMap(pageResult.getList(),
|
||||||
copy -> Stream.of(copy.getStartUserId(), Long.parseLong(copy.getCreator()))));
|
copy -> Stream.of(copy.getStartUserId(), copy.getUserId())));
|
||||||
Map<String, BpmProcessDefinitionInfoDO> processDefinitionInfoMap = processDefinitionService.getProcessDefinitionInfoMap(
|
Map<String, BpmProcessDefinitionInfoDO> processDefinitionInfoMap = processDefinitionService.getProcessDefinitionInfoMap(
|
||||||
convertSet(pageResult.getList(), BpmProcessInstanceCopyDO::getProcessDefinitionId));
|
convertSet(pageResult.getList(), BpmProcessInstanceCopyDO::getProcessDefinitionId));
|
||||||
return success(convertPage(pageResult, copy -> {
|
return success(convertPage(pageResult, copy -> {
|
||||||
BpmProcessInstanceCopyRespVO copyVO = BeanUtils.toBean(copy, BpmProcessInstanceCopyRespVO.class);
|
BpmProcessInstanceCopyRespVO copyVO = BeanUtils.toBean(copy, BpmProcessInstanceCopyRespVO.class);
|
||||||
MapUtils.findAndThen(userMap, Long.valueOf(copy.getCreator()),
|
MapUtils.findAndThen(userMap, copy.getUserId(),
|
||||||
user -> copyVO.setStartUser(BeanUtils.toBean(user, UserSimpleBaseVO.class)));
|
|
||||||
MapUtils.findAndThen(userMap, copy.getStartUserId(),
|
|
||||||
user -> copyVO.setCreateUser(BeanUtils.toBean(user, UserSimpleBaseVO.class)));
|
user -> copyVO.setCreateUser(BeanUtils.toBean(user, UserSimpleBaseVO.class)));
|
||||||
|
MapUtils.findAndThen(userMap, copy.getStartUserId(),
|
||||||
|
user -> copyVO.setStartUser(BeanUtils.toBean(user, UserSimpleBaseVO.class)));
|
||||||
MapUtils.findAndThen(processInstanceMap, copyVO.getProcessInstanceId(),
|
MapUtils.findAndThen(processInstanceMap, copyVO.getProcessInstanceId(),
|
||||||
processInstance -> {
|
processInstance -> {
|
||||||
copyVO.setSummary(FlowableUtils.getSummary(
|
copyVO.setSummary(FlowableUtils.getSummary(
|
||||||
|
|
|
||||||
|
|
@ -42,7 +42,7 @@ public class BpmOALeaveDO extends BaseDO {
|
||||||
/**
|
/**
|
||||||
* 请假类型
|
* 请假类型
|
||||||
*/
|
*/
|
||||||
private String type;
|
private Integer type;
|
||||||
/**
|
/**
|
||||||
* 原因
|
* 原因
|
||||||
*/
|
*/
|
||||||
|
|
|
||||||
|
|
@ -7,10 +7,10 @@ import org.springframework.stereotype.Component;
|
||||||
/**
|
/**
|
||||||
* 根据流程变量 variable 的类型,转换参数的值
|
* 根据流程变量 variable 的类型,转换参数的值
|
||||||
*
|
*
|
||||||
* 目前用于 ConditionNodeConvert 的 buildConditionExpression 方法中
|
* @deprecated 已无调用方
|
||||||
*
|
|
||||||
* @author jason
|
* @author jason
|
||||||
*/
|
*/
|
||||||
|
@Deprecated // TODO @芋艿:兼容老版本,预计 27 年删除;
|
||||||
@Component
|
@Component
|
||||||
public class VariableConvertByTypeExpressionFunction extends AbstractFlowableVariableExpressionFunction {
|
public class VariableConvertByTypeExpressionFunction extends AbstractFlowableVariableExpressionFunction {
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -2,6 +2,7 @@ package cn.iocoder.yudao.module.bpm.framework.flowable.core.util;
|
||||||
|
|
||||||
import cn.hutool.core.map.MapUtil;
|
import cn.hutool.core.map.MapUtil;
|
||||||
import cn.hutool.core.util.ObjectUtil;
|
import cn.hutool.core.util.ObjectUtil;
|
||||||
|
import cn.hutool.core.util.StrUtil;
|
||||||
import cn.hutool.extra.spring.SpringUtil;
|
import cn.hutool.extra.spring.SpringUtil;
|
||||||
import cn.iocoder.yudao.framework.common.core.KeyValue;
|
import cn.iocoder.yudao.framework.common.core.KeyValue;
|
||||||
import cn.iocoder.yudao.framework.common.util.json.JsonUtils;
|
import cn.iocoder.yudao.framework.common.util.json.JsonUtils;
|
||||||
|
|
@ -247,9 +248,7 @@ public class FlowableUtils {
|
||||||
Map<String, BpmFormFieldVO> formFieldsMap = new HashMap<>();
|
Map<String, BpmFormFieldVO> formFieldsMap = new HashMap<>();
|
||||||
processDefinitionInfo.getFormFields().forEach(formFieldStr -> {
|
processDefinitionInfo.getFormFields().forEach(formFieldStr -> {
|
||||||
BpmFormFieldVO formField = JsonUtils.parseObject(formFieldStr, BpmFormFieldVO.class);
|
BpmFormFieldVO formField = JsonUtils.parseObject(formFieldStr, BpmFormFieldVO.class);
|
||||||
if (formField != null) {
|
parseFormField(formField, formFieldsMap);
|
||||||
formFieldsMap.put(formField.getField(), formField);
|
|
||||||
}
|
|
||||||
});
|
});
|
||||||
|
|
||||||
// 情况一:当自定义了摘要
|
// 情况一:当自定义了摘要
|
||||||
|
|
@ -273,6 +272,26 @@ public class FlowableUtils {
|
||||||
.collect(Collectors.toList());
|
.collect(Collectors.toList());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 递归解析表单字段
|
||||||
|
*/
|
||||||
|
private static void parseFormField(BpmFormFieldVO formField, Map<String, BpmFormFieldVO> formFieldsMap) {
|
||||||
|
if (formField == null) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
// 如果存在 children -> 说明是布局组件
|
||||||
|
if (formField.getChildren() != null && !formField.getChildren().isEmpty()) {
|
||||||
|
for (BpmFormFieldVO child : formField.getChildren()) {
|
||||||
|
parseFormField(child, formFieldsMap);
|
||||||
|
}
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
// 真实字段才加入 map
|
||||||
|
if (StrUtil.isNotBlank(formField.getField())) {
|
||||||
|
formFieldsMap.put(formField.getField(), formField);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// ========== Task 相关的工具方法 ==========
|
// ========== Task 相关的工具方法 ==========
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
||||||
|
|
@ -707,10 +707,9 @@ public class SimpleModelUtils {
|
||||||
List<String> list = convertList(item.getRules(), (rule) -> {
|
List<String> list = convertList(item.getRules(), (rule) -> {
|
||||||
String rightSide = NumberUtil.isNumber(rule.getRightSide()) ? rule.getRightSide()
|
String rightSide = NumberUtil.isNumber(rule.getRightSide()) ? rule.getRightSide()
|
||||||
: "\"" + rule.getRightSide() + "\""; // 如果非数值类型加引号
|
: "\"" + rule.getRightSide() + "\""; // 如果非数值类型加引号
|
||||||
return String.format(" vars:getOrDefault(%s, null) %s var:convertByType(%s,%s) ",
|
return String.format(BpmConditionOpCodeEnum.fromCode(rule.getOpCode()).getSymbol(),
|
||||||
rule.getLeftSide(), // 左侧:读取变量
|
rule.getLeftSide(), // 左侧:读取变量
|
||||||
rule.getOpCode(), // 中间:操作符,比较
|
rightSide); // 右侧:取值变量
|
||||||
rule.getLeftSide(), rightSide); // 右侧:转换变量,VariableConvertByTypeExpressionFunction
|
|
||||||
});
|
});
|
||||||
// 构造条件组的表达式
|
// 构造条件组的表达式
|
||||||
Boolean and = item.getAnd();
|
Boolean and = item.getAnd();
|
||||||
|
|
|
||||||
|
|
@ -1,46 +0,0 @@
|
||||||
package cn.iocoder.yudao.module.bpm.service.definition.dto;
|
|
||||||
|
|
||||||
import cn.iocoder.yudao.module.bpm.enums.definition.BpmModelFormTypeEnum;
|
|
||||||
import lombok.Data;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* BPM 流程 MetaInfo Response DTO
|
|
||||||
* 主要用于 { Model#setMetaInfo(String)} 的存储
|
|
||||||
*
|
|
||||||
* 最终,它的字段和 {@link cn.iocoder.yudao.module.bpm.dal.dataobject.definition.BpmProcessDefinitionInfoDO} 是一致的
|
|
||||||
*
|
|
||||||
* @author 芋道源码
|
|
||||||
*/
|
|
||||||
@Data
|
|
||||||
public class BpmModelMetaInfoRespDTO {
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 流程图标
|
|
||||||
*/
|
|
||||||
private String icon;
|
|
||||||
/**
|
|
||||||
* 流程描述
|
|
||||||
*/
|
|
||||||
private String description;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 表单类型
|
|
||||||
*/
|
|
||||||
private Integer formType;
|
|
||||||
/**
|
|
||||||
* 表单编号
|
|
||||||
* 在表单类型为 {@link BpmModelFormTypeEnum#NORMAL} 时
|
|
||||||
*/
|
|
||||||
private Long formId;
|
|
||||||
/**
|
|
||||||
* 自定义表单的提交路径,使用 Vue 的路由地址
|
|
||||||
* 在表单类型为 {@link BpmModelFormTypeEnum#CUSTOM} 时
|
|
||||||
*/
|
|
||||||
private String formCustomCreatePath;
|
|
||||||
/**
|
|
||||||
* 自定义表单的查看路径,使用 Vue 的路由地址
|
|
||||||
* 在表单类型为 {@link BpmModelFormTypeEnum#CUSTOM} 时
|
|
||||||
*/
|
|
||||||
private String formCustomViewPath;
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
@ -87,7 +87,7 @@ xxl:
|
||||||
# Lock4j 配置项
|
# Lock4j 配置项
|
||||||
lock4j:
|
lock4j:
|
||||||
acquire-timeout: 3000 # 获取分布式锁超时时间,默认为 3000 毫秒
|
acquire-timeout: 3000 # 获取分布式锁超时时间,默认为 3000 毫秒
|
||||||
expire: 30000 # 分布式锁的超时时间,默认为 30 毫秒
|
expire: 30000 # 分布式锁的超时时间,默认为 30000 毫秒
|
||||||
|
|
||||||
--- #################### 监控相关配置 ####################
|
--- #################### 监控相关配置 ####################
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -98,7 +98,7 @@ xxl:
|
||||||
# Lock4j 配置项
|
# Lock4j 配置项
|
||||||
lock4j:
|
lock4j:
|
||||||
acquire-timeout: 3000 # 获取分布式锁超时时间,默认为 3000 毫秒
|
acquire-timeout: 3000 # 获取分布式锁超时时间,默认为 3000 毫秒
|
||||||
expire: 30000 # 分布式锁的超时时间,默认为 30 毫秒
|
expire: 30000 # 分布式锁的超时时间,默认为 30000 毫秒
|
||||||
|
|
||||||
--- #################### 监控相关配置 ####################
|
--- #################### 监控相关配置 ####################
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -87,7 +87,7 @@ xxl:
|
||||||
# Lock4j 配置项
|
# Lock4j 配置项
|
||||||
lock4j:
|
lock4j:
|
||||||
acquire-timeout: 3000 # 获取分布式锁超时时间,默认为 3000 毫秒
|
acquire-timeout: 3000 # 获取分布式锁超时时间,默认为 3000 毫秒
|
||||||
expire: 30000 # 分布式锁的超时时间,默认为 30 毫秒
|
expire: 30000 # 分布式锁的超时时间,默认为 30000 毫秒
|
||||||
|
|
||||||
--- #################### 监控相关配置 ####################
|
--- #################### 监控相关配置 ####################
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -96,7 +96,7 @@ xxl:
|
||||||
# Lock4j 配置项
|
# Lock4j 配置项
|
||||||
lock4j:
|
lock4j:
|
||||||
acquire-timeout: 3000 # 获取分布式锁超时时间,默认为 3000 毫秒
|
acquire-timeout: 3000 # 获取分布式锁超时时间,默认为 3000 毫秒
|
||||||
expire: 30000 # 分布式锁的超时时间,默认为 30 毫秒
|
expire: 30000 # 分布式锁的超时时间,默认为 30000 毫秒
|
||||||
|
|
||||||
--- #################### 监控相关配置 ####################
|
--- #################### 监控相关配置 ####################
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -87,7 +87,7 @@ xxl:
|
||||||
# Lock4j 配置项
|
# Lock4j 配置项
|
||||||
lock4j:
|
lock4j:
|
||||||
acquire-timeout: 3000 # 获取分布式锁超时时间,默认为 3000 毫秒
|
acquire-timeout: 3000 # 获取分布式锁超时时间,默认为 3000 毫秒
|
||||||
expire: 30000 # 分布式锁的超时时间,默认为 30 毫秒
|
expire: 30000 # 分布式锁的超时时间,默认为 30000 毫秒
|
||||||
|
|
||||||
--- #################### 监控相关配置 ####################
|
--- #################### 监控相关配置 ####################
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -96,7 +96,7 @@ xxl:
|
||||||
# Lock4j 配置项
|
# Lock4j 配置项
|
||||||
lock4j:
|
lock4j:
|
||||||
acquire-timeout: 3000 # 获取分布式锁超时时间,默认为 3000 毫秒
|
acquire-timeout: 3000 # 获取分布式锁超时时间,默认为 3000 毫秒
|
||||||
expire: 30000 # 分布式锁的超时时间,默认为 30 毫秒
|
expire: 30000 # 分布式锁的超时时间,默认为 30000 毫秒
|
||||||
|
|
||||||
--- #################### 监控相关配置 ####################
|
--- #################### 监控相关配置 ####################
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -55,4 +55,10 @@ public class CodegenProperties {
|
||||||
@NotNull(message = "是否生成单元测试不能为空")
|
@NotNull(message = "是否生成单元测试不能为空")
|
||||||
private Boolean unitTestEnable;
|
private Boolean unitTestEnable;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 是否生成 Excel 导入接口
|
||||||
|
*/
|
||||||
|
@NotNull(message = "是否生成 Excel 导入接口不能为空")
|
||||||
|
private Boolean importEnable;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -53,6 +53,7 @@ public class S3FileClient extends AbstractFileClient<S3FileClientConfig> {
|
||||||
AwsCredentialsProvider credentialsProvider = StaticCredentialsProvider.create(
|
AwsCredentialsProvider credentialsProvider = StaticCredentialsProvider.create(
|
||||||
AwsBasicCredentials.create(config.getAccessKey(), config.getAccessSecret()));
|
AwsBasicCredentials.create(config.getAccessKey(), config.getAccessSecret()));
|
||||||
URI endpoint = URI.create(buildEndpoint());
|
URI endpoint = URI.create(buildEndpoint());
|
||||||
|
URI presignerEndpoint = URI.create(buildPresignerEndpoint());
|
||||||
S3Configuration serviceConfiguration = S3Configuration.builder() // Path-style 访问
|
S3Configuration serviceConfiguration = S3Configuration.builder() // Path-style 访问
|
||||||
.pathStyleAccessEnabled(Boolean.TRUE.equals(config.getEnablePathStyleAccess()))
|
.pathStyleAccessEnabled(Boolean.TRUE.equals(config.getEnablePathStyleAccess()))
|
||||||
.chunkedEncodingEnabled(false) // 禁用分块编码,参见 https://t.zsxq.com/kBy57
|
.chunkedEncodingEnabled(false) // 禁用分块编码,参见 https://t.zsxq.com/kBy57
|
||||||
|
|
@ -66,7 +67,7 @@ public class S3FileClient extends AbstractFileClient<S3FileClientConfig> {
|
||||||
presigner = S3Presigner.builder()
|
presigner = S3Presigner.builder()
|
||||||
.credentialsProvider(credentialsProvider)
|
.credentialsProvider(credentialsProvider)
|
||||||
.region(region)
|
.region(region)
|
||||||
.endpointOverride(endpoint)
|
.endpointOverride(presignerEndpoint)
|
||||||
.serviceConfiguration(serviceConfiguration)
|
.serviceConfiguration(serviceConfiguration)
|
||||||
.build();
|
.build();
|
||||||
}
|
}
|
||||||
|
|
@ -161,6 +162,23 @@ public class S3FileClient extends AbstractFileClient<S3FileClientConfig> {
|
||||||
return StrUtil.format("https://{}", config.getEndpoint());
|
return StrUtil.format("https://{}", config.getEndpoint());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* presigner 节点地址
|
||||||
|
*
|
||||||
|
* @return 节点地址
|
||||||
|
*/
|
||||||
|
private String buildPresignerEndpoint() {
|
||||||
|
// 补全 domain
|
||||||
|
if (StrUtil.isEmpty(config.getDomain())) {
|
||||||
|
config.setDomain(buildDomain());
|
||||||
|
}
|
||||||
|
|
||||||
|
if (Boolean.TRUE.equals(config.getEnablePathStyleAccess())) {
|
||||||
|
return StrUtil.removeSuffix(config.getDomain(), StrUtil.format("/{}", config.getBucket()));
|
||||||
|
}
|
||||||
|
return StrUtil.replace(config.getDomain(), StrUtil.format("://{}.", config.getBucket()), "://");
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 解析 AWS 区域
|
* 解析 AWS 区域
|
||||||
* 优先级:配置的 region > 从 endpoint 解析的 region > 默认值 us-east-1
|
* 优先级:配置的 region > 从 endpoint 解析的 region > 默认值 us-east-1
|
||||||
|
|
|
||||||
|
|
@ -7,6 +7,7 @@ import org.springframework.context.annotation.Configuration;
|
||||||
import org.springframework.core.annotation.Order;
|
import org.springframework.core.annotation.Order;
|
||||||
import org.springframework.security.config.Customizer;
|
import org.springframework.security.config.Customizer;
|
||||||
import org.springframework.security.config.annotation.web.builders.HttpSecurity;
|
import org.springframework.security.config.annotation.web.builders.HttpSecurity;
|
||||||
|
import org.springframework.security.config.annotation.web.configurers.HeadersConfigurer;
|
||||||
import org.springframework.security.core.userdetails.User;
|
import org.springframework.security.core.userdetails.User;
|
||||||
import org.springframework.security.core.userdetails.UserDetails;
|
import org.springframework.security.core.userdetails.UserDetails;
|
||||||
import org.springframework.security.crypto.password.PasswordEncoder;
|
import org.springframework.security.crypto.password.PasswordEncoder;
|
||||||
|
|
@ -40,6 +41,9 @@ public class AdminServerConfiguration {
|
||||||
@Value("${spring.boot.admin.client.password:admin}")
|
@Value("${spring.boot.admin.client.password:admin}")
|
||||||
private String password;
|
private String password;
|
||||||
|
|
||||||
|
@Value("${spring.boot.admin.frame-ancestors:'self'}")
|
||||||
|
private String frameAncestors;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Spring Boot Admin 专用的 InMemoryUserDetailsManager
|
* Spring Boot Admin 专用的 InMemoryUserDetailsManager
|
||||||
* 使用内存存储,与系统用户隔离
|
* 使用内存存储,与系统用户隔离
|
||||||
|
|
@ -100,6 +104,16 @@ public class AdminServerConfiguration {
|
||||||
adminSeverContextPath + "/instances", // Admin Client 注册端点忽略 CSRF
|
adminSeverContextPath + "/instances", // Admin Client 注册端点忽略 CSRF
|
||||||
adminSeverContextPath + "/actuator/**" // Actuator 端点忽略 CSRF
|
adminSeverContextPath + "/actuator/**" // Actuator 端点忽略 CSRF
|
||||||
)
|
)
|
||||||
|
)
|
||||||
|
.headers(headers -> headers
|
||||||
|
// 特殊:Spring Boot Admin 前端基于 Vue,需 unsafe-inline / unsafe-eval 支持内联脚本与表达式
|
||||||
|
.contentSecurityPolicy(csp -> csp.policyDirectives(
|
||||||
|
"default-src 'self'; "
|
||||||
|
+ "script-src 'self' 'unsafe-inline' 'unsafe-eval'; "
|
||||||
|
+ "style-src 'self' 'unsafe-inline'; "
|
||||||
|
+ "frame-ancestors " + frameAncestors))
|
||||||
|
.frameOptions(HeadersConfigurer.FrameOptionsConfig::sameOrigin) // 显式设置 X-Frame-Options 为 SAMEORIGIN
|
||||||
|
.cacheControl(HeadersConfigurer.CacheControlConfig::disable) // 禁用缓存,避免旧配置生效
|
||||||
);
|
);
|
||||||
return httpSecurity.build();
|
return httpSecurity.build();
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -12,6 +12,7 @@ import cn.iocoder.yudao.module.infra.enums.codegen.CodegenColumnListConditionEnu
|
||||||
import cn.iocoder.yudao.module.infra.enums.codegen.CodegenTemplateTypeEnum;
|
import cn.iocoder.yudao.module.infra.enums.codegen.CodegenTemplateTypeEnum;
|
||||||
import com.baomidou.mybatisplus.generator.config.po.TableField;
|
import com.baomidou.mybatisplus.generator.config.po.TableField;
|
||||||
import com.baomidou.mybatisplus.generator.config.po.TableInfo;
|
import com.baomidou.mybatisplus.generator.config.po.TableInfo;
|
||||||
|
import com.google.common.annotations.VisibleForTesting;
|
||||||
import com.google.common.collect.Sets;
|
import com.google.common.collect.Sets;
|
||||||
import org.springframework.stereotype.Component;
|
import org.springframework.stereotype.Component;
|
||||||
|
|
||||||
|
|
@ -117,8 +118,8 @@ public class CodegenBuilder {
|
||||||
table.setBusinessName(toCamelCase(subAfter(tableName, '_', false)).toLowerCase());
|
table.setBusinessName(toCamelCase(subAfter(tableName, '_', false)).toLowerCase());
|
||||||
// 驼峰 + 首字母大写;第一步,第一个 _ 前缀的后面,作为 class 名字;第二步,驼峰命名
|
// 驼峰 + 首字母大写;第一步,第一个 _ 前缀的后面,作为 class 名字;第二步,驼峰命名
|
||||||
table.setClassName(upperFirst(toCamelCase(subAfter(tableName, '_', false))));
|
table.setClassName(upperFirst(toCamelCase(subAfter(tableName, '_', false))));
|
||||||
// 去除结尾的表,作为类描述
|
// 去除结尾的表,作为类描述;注释中的英文引号替换为中文引号,避免破坏生成代码中的字符串字面量
|
||||||
table.setClassComment(StrUtil.removeSuffixIgnoreCase(table.getTableComment(), "表"));
|
table.setClassComment(StrUtil.removeSuffixIgnoreCase(sanitizeComment(table.getTableComment()), "表"));
|
||||||
table.setTemplateType(CodegenTemplateTypeEnum.ONE.getType());
|
table.setTemplateType(CodegenTemplateTypeEnum.ONE.getType());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -128,6 +129,7 @@ public class CodegenBuilder {
|
||||||
for (CodegenColumnDO column : columns) {
|
for (CodegenColumnDO column : columns) {
|
||||||
column.setTableId(tableId);
|
column.setTableId(tableId);
|
||||||
column.setOrdinalPosition(index++);
|
column.setOrdinalPosition(index++);
|
||||||
|
column.setColumnComment(sanitizeComment(column.getColumnComment()));
|
||||||
// 特殊处理:Byte => Integer
|
// 特殊处理:Byte => Integer
|
||||||
if (Byte.class.getSimpleName().equals(column.getJavaType())) {
|
if (Byte.class.getSimpleName().equals(column.getJavaType())) {
|
||||||
column.setJavaType(Integer.class.getSimpleName());
|
column.setJavaType(Integer.class.getSimpleName());
|
||||||
|
|
@ -217,4 +219,18 @@ public class CodegenBuilder {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 将注释中的英文引号替换为中文引号,避免破坏生成代码中的字符串字面量
|
||||||
|
*
|
||||||
|
* @param comment 原始注释
|
||||||
|
* @return 清理后的注释
|
||||||
|
*/
|
||||||
|
@VisibleForTesting
|
||||||
|
String sanitizeComment(String comment) {
|
||||||
|
if (StrUtil.isEmpty(comment)) {
|
||||||
|
return comment;
|
||||||
|
}
|
||||||
|
return comment.replace('"', '“').replace('\'', '‘');
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -72,6 +72,8 @@ public class CodegenEngine {
|
||||||
.put(javaTemplatePath("controller/vo/listReqVO"), javaModuleImplVOFilePath("ListReqVO"))
|
.put(javaTemplatePath("controller/vo/listReqVO"), javaModuleImplVOFilePath("ListReqVO"))
|
||||||
.put(javaTemplatePath("controller/vo/respVO"), javaModuleImplVOFilePath("RespVO"))
|
.put(javaTemplatePath("controller/vo/respVO"), javaModuleImplVOFilePath("RespVO"))
|
||||||
.put(javaTemplatePath("controller/vo/saveReqVO"), javaModuleImplVOFilePath("SaveReqVO"))
|
.put(javaTemplatePath("controller/vo/saveReqVO"), javaModuleImplVOFilePath("SaveReqVO"))
|
||||||
|
.put(javaTemplatePath("controller/vo/importExcelVO"), javaModuleImplVOFilePath("ImportExcelVO"))
|
||||||
|
.put(javaTemplatePath("controller/vo/importRespVO"), javaModuleImplVOFilePath("ImportRespVO"))
|
||||||
.put(javaTemplatePath("controller/controller"), javaModuleImplControllerFilePath())
|
.put(javaTemplatePath("controller/controller"), javaModuleImplControllerFilePath())
|
||||||
.put(javaTemplatePath("dal/do"),
|
.put(javaTemplatePath("dal/do"),
|
||||||
javaModuleImplMainFilePath("dal/dataobject/${table.businessName}/${table.className}DO"))
|
javaModuleImplMainFilePath("dal/dataobject/${table.businessName}/${table.className}DO"))
|
||||||
|
|
@ -126,6 +128,8 @@ public class CodegenEngine {
|
||||||
vue3FilePath("views/${table.moduleName}/${table.businessName}/index.vue"))
|
vue3FilePath("views/${table.moduleName}/${table.businessName}/index.vue"))
|
||||||
.put(CodegenFrontTypeEnum.VUE3_ELEMENT_PLUS.getType(), vue3TemplatePath("views/form.vue"),
|
.put(CodegenFrontTypeEnum.VUE3_ELEMENT_PLUS.getType(), vue3TemplatePath("views/form.vue"),
|
||||||
vue3FilePath("views/${table.moduleName}/${table.businessName}/${simpleClassName}Form.vue"))
|
vue3FilePath("views/${table.moduleName}/${table.businessName}/${simpleClassName}Form.vue"))
|
||||||
|
.put(CodegenFrontTypeEnum.VUE3_ELEMENT_PLUS.getType(), vue3TemplatePath("views/import.vue"),
|
||||||
|
vue3FilePath("views/${table.moduleName}/${table.businessName}/${simpleClassName}ImportForm.vue"))
|
||||||
.put(CodegenFrontTypeEnum.VUE3_ELEMENT_PLUS.getType(), vue3TemplatePath("views/components/form_sub_normal.vue"), // 特殊:主子表专属逻辑
|
.put(CodegenFrontTypeEnum.VUE3_ELEMENT_PLUS.getType(), vue3TemplatePath("views/components/form_sub_normal.vue"), // 特殊:主子表专属逻辑
|
||||||
vue3FilePath("views/${table.moduleName}/${table.businessName}/components/${subSimpleClassName}Form.vue"))
|
vue3FilePath("views/${table.moduleName}/${table.businessName}/components/${subSimpleClassName}Form.vue"))
|
||||||
.put(CodegenFrontTypeEnum.VUE3_ELEMENT_PLUS.getType(), vue3TemplatePath("views/components/form_sub_inner.vue"), // 特殊:主子表专属逻辑
|
.put(CodegenFrontTypeEnum.VUE3_ELEMENT_PLUS.getType(), vue3TemplatePath("views/components/form_sub_inner.vue"), // 特殊:主子表专属逻辑
|
||||||
|
|
@ -164,6 +168,8 @@ public class CodegenEngine {
|
||||||
vue3VbenFilePath("views/${table.moduleName}/${table.businessName}/index.vue"))
|
vue3VbenFilePath("views/${table.moduleName}/${table.businessName}/index.vue"))
|
||||||
.put(CodegenFrontTypeEnum.VUE3_VBEN5_ANTD_SCHEMA.getType(), vue3Vben5AntdSchemaTemplatePath("views/form.vue"),
|
.put(CodegenFrontTypeEnum.VUE3_VBEN5_ANTD_SCHEMA.getType(), vue3Vben5AntdSchemaTemplatePath("views/form.vue"),
|
||||||
vue3VbenFilePath("views/${table.moduleName}/${table.businessName}/modules/form.vue"))
|
vue3VbenFilePath("views/${table.moduleName}/${table.businessName}/modules/form.vue"))
|
||||||
|
.put(CodegenFrontTypeEnum.VUE3_VBEN5_ANTD_SCHEMA.getType(), vue3Vben5AntdSchemaTemplatePath("views/import.vue"),
|
||||||
|
vue3VbenFilePath("views/${table.moduleName}/${table.businessName}/modules/import-form.vue"))
|
||||||
.put(CodegenFrontTypeEnum.VUE3_VBEN5_ANTD_SCHEMA.getType(), vue3Vben5AntdSchemaTemplatePath("api/api.ts"),
|
.put(CodegenFrontTypeEnum.VUE3_VBEN5_ANTD_SCHEMA.getType(), vue3Vben5AntdSchemaTemplatePath("api/api.ts"),
|
||||||
vue3VbenFilePath("api/${table.moduleName}/${table.businessName}/index.ts"))
|
vue3VbenFilePath("api/${table.moduleName}/${table.businessName}/index.ts"))
|
||||||
.put(CodegenFrontTypeEnum.VUE3_VBEN5_ANTD_SCHEMA.getType(), vue3Vben5AntdSchemaTemplatePath("views/modules/form_sub_normal.vue"), // 特殊:主子表专属逻辑
|
.put(CodegenFrontTypeEnum.VUE3_VBEN5_ANTD_SCHEMA.getType(), vue3Vben5AntdSchemaTemplatePath("views/modules/form_sub_normal.vue"), // 特殊:主子表专属逻辑
|
||||||
|
|
@ -181,6 +187,8 @@ public class CodegenEngine {
|
||||||
vue3VbenFilePath("views/${table.moduleName}/${table.businessName}/index.vue"))
|
vue3VbenFilePath("views/${table.moduleName}/${table.businessName}/index.vue"))
|
||||||
.put(CodegenFrontTypeEnum.VUE3_VBEN5_ANTD_GENERAL.getType(), vue3Vben5AntdGeneralTemplatePath("views/form.vue"),
|
.put(CodegenFrontTypeEnum.VUE3_VBEN5_ANTD_GENERAL.getType(), vue3Vben5AntdGeneralTemplatePath("views/form.vue"),
|
||||||
vue3VbenFilePath("views/${table.moduleName}/${table.businessName}/modules/form.vue"))
|
vue3VbenFilePath("views/${table.moduleName}/${table.businessName}/modules/form.vue"))
|
||||||
|
.put(CodegenFrontTypeEnum.VUE3_VBEN5_ANTD_GENERAL.getType(), vue3Vben5AntdGeneralTemplatePath("views/import.vue"),
|
||||||
|
vue3VbenFilePath("views/${table.moduleName}/${table.businessName}/modules/import-form.vue"))
|
||||||
.put(CodegenFrontTypeEnum.VUE3_VBEN5_ANTD_GENERAL.getType(), vue3Vben5AntdGeneralTemplatePath("api/api.ts"),
|
.put(CodegenFrontTypeEnum.VUE3_VBEN5_ANTD_GENERAL.getType(), vue3Vben5AntdGeneralTemplatePath("api/api.ts"),
|
||||||
vue3VbenFilePath("api/${table.moduleName}/${table.businessName}/index.ts"))
|
vue3VbenFilePath("api/${table.moduleName}/${table.businessName}/index.ts"))
|
||||||
.put(CodegenFrontTypeEnum.VUE3_VBEN5_ANTD_GENERAL.getType(), vue3Vben5AntdGeneralTemplatePath("views/modules/form_sub_normal.vue"), // 特殊:主子表专属逻辑
|
.put(CodegenFrontTypeEnum.VUE3_VBEN5_ANTD_GENERAL.getType(), vue3Vben5AntdGeneralTemplatePath("views/modules/form_sub_normal.vue"), // 特殊:主子表专属逻辑
|
||||||
|
|
@ -200,6 +208,8 @@ public class CodegenEngine {
|
||||||
vue3VbenFilePath("views/${table.moduleName}/${table.businessName}/index.vue"))
|
vue3VbenFilePath("views/${table.moduleName}/${table.businessName}/index.vue"))
|
||||||
.put(CodegenFrontTypeEnum.VUE3_VBEN5_EP_SCHEMA.getType(), vue3Vben5EpSchemaTemplatePath("views/form.vue"),
|
.put(CodegenFrontTypeEnum.VUE3_VBEN5_EP_SCHEMA.getType(), vue3Vben5EpSchemaTemplatePath("views/form.vue"),
|
||||||
vue3VbenFilePath("views/${table.moduleName}/${table.businessName}/modules/form.vue"))
|
vue3VbenFilePath("views/${table.moduleName}/${table.businessName}/modules/form.vue"))
|
||||||
|
.put(CodegenFrontTypeEnum.VUE3_VBEN5_EP_SCHEMA.getType(), vue3Vben5EpSchemaTemplatePath("views/import.vue"),
|
||||||
|
vue3VbenFilePath("views/${table.moduleName}/${table.businessName}/modules/import-form.vue"))
|
||||||
.put(CodegenFrontTypeEnum.VUE3_VBEN5_EP_SCHEMA.getType(), vue3Vben5EpSchemaTemplatePath("api/api.ts"),
|
.put(CodegenFrontTypeEnum.VUE3_VBEN5_EP_SCHEMA.getType(), vue3Vben5EpSchemaTemplatePath("api/api.ts"),
|
||||||
vue3VbenFilePath("api/${table.moduleName}/${table.businessName}/index.ts"))
|
vue3VbenFilePath("api/${table.moduleName}/${table.businessName}/index.ts"))
|
||||||
.put(CodegenFrontTypeEnum.VUE3_VBEN5_EP_SCHEMA.getType(), vue3Vben5EpSchemaTemplatePath("views/modules/form_sub_normal.vue"), // 特殊:主子表专属逻辑
|
.put(CodegenFrontTypeEnum.VUE3_VBEN5_EP_SCHEMA.getType(), vue3Vben5EpSchemaTemplatePath("views/modules/form_sub_normal.vue"), // 特殊:主子表专属逻辑
|
||||||
|
|
@ -217,6 +227,8 @@ public class CodegenEngine {
|
||||||
vue3VbenFilePath("views/${table.moduleName}/${table.businessName}/index.vue"))
|
vue3VbenFilePath("views/${table.moduleName}/${table.businessName}/index.vue"))
|
||||||
.put(CodegenFrontTypeEnum.VUE3_VBEN5_EP_GENERAL.getType(), vue3Vben5EpGeneralTemplatePath("views/form.vue"),
|
.put(CodegenFrontTypeEnum.VUE3_VBEN5_EP_GENERAL.getType(), vue3Vben5EpGeneralTemplatePath("views/form.vue"),
|
||||||
vue3VbenFilePath("views/${table.moduleName}/${table.businessName}/modules/form.vue"))
|
vue3VbenFilePath("views/${table.moduleName}/${table.businessName}/modules/form.vue"))
|
||||||
|
.put(CodegenFrontTypeEnum.VUE3_VBEN5_EP_GENERAL.getType(), vue3Vben5EpGeneralTemplatePath("views/import.vue"),
|
||||||
|
vue3VbenFilePath("views/${table.moduleName}/${table.businessName}/modules/import-form.vue"))
|
||||||
.put(CodegenFrontTypeEnum.VUE3_VBEN5_EP_GENERAL.getType(), vue3Vben5EpGeneralTemplatePath("api/api.ts"),
|
.put(CodegenFrontTypeEnum.VUE3_VBEN5_EP_GENERAL.getType(), vue3Vben5EpGeneralTemplatePath("api/api.ts"),
|
||||||
vue3VbenFilePath("api/${table.moduleName}/${table.businessName}/index.ts"))
|
vue3VbenFilePath("api/${table.moduleName}/${table.businessName}/index.ts"))
|
||||||
.put(CodegenFrontTypeEnum.VUE3_VBEN5_EP_GENERAL.getType(), vue3Vben5EpGeneralTemplatePath("views/modules/form_sub_normal.vue"), // 特殊:主子表专属逻辑
|
.put(CodegenFrontTypeEnum.VUE3_VBEN5_EP_GENERAL.getType(), vue3Vben5EpGeneralTemplatePath("views/modules/form_sub_normal.vue"), // 特殊:主子表专属逻辑
|
||||||
|
|
@ -284,6 +296,7 @@ public class CodegenEngine {
|
||||||
globalBindingMap.put("jakartaPackage", jakartaEnable ? "jakarta" : "javax");
|
globalBindingMap.put("jakartaPackage", jakartaEnable ? "jakarta" : "javax");
|
||||||
globalBindingMap.put("voType", codegenProperties.getVoType());
|
globalBindingMap.put("voType", codegenProperties.getVoType());
|
||||||
globalBindingMap.put("deleteBatchEnable", codegenProperties.getDeleteBatchEnable());
|
globalBindingMap.put("deleteBatchEnable", codegenProperties.getDeleteBatchEnable());
|
||||||
|
globalBindingMap.put("importEnable", codegenProperties.getImportEnable());
|
||||||
// 全局 Java Bean
|
// 全局 Java Bean
|
||||||
globalBindingMap.put("CommonResultClassName", CommonResult.class.getName());
|
globalBindingMap.put("CommonResultClassName", CommonResult.class.getName());
|
||||||
globalBindingMap.put("PageResultClassName", PageResult.class.getName());
|
globalBindingMap.put("PageResultClassName", PageResult.class.getName());
|
||||||
|
|
@ -343,6 +356,11 @@ public class CodegenEngine {
|
||||||
if (!CodegenTemplateTypeEnum.isTree(table.getTemplateType())) {
|
if (!CodegenTemplateTypeEnum.isTree(table.getTemplateType())) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
} else if (isImportTemplate(vmPath)) {
|
||||||
|
// 关闭 import 时,跳过 ImportExcelVO / ImportRespVO 的生成
|
||||||
|
if (!Boolean.TRUE.equals(codegenProperties.getImportEnable())) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
// 2.3 默认生成
|
// 2.3 默认生成
|
||||||
generateCode(result, vmPath, filePath, bindingMap);
|
generateCode(result, vmPath, filePath, bindingMap);
|
||||||
|
|
@ -676,4 +694,9 @@ public class CodegenEngine {
|
||||||
return path.contains("listReqVO");
|
return path.contains("listReqVO");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private static boolean isImportTemplate(String path) {
|
||||||
|
return path.contains("importExcelVO") || path.contains("importRespVO")
|
||||||
|
|| path.contains("views/import.vue");
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -2,6 +2,7 @@ package cn.iocoder.yudao.module.infra.service.file;
|
||||||
|
|
||||||
import cn.hutool.core.io.resource.ResourceUtil;
|
import cn.hutool.core.io.resource.ResourceUtil;
|
||||||
import cn.hutool.core.util.IdUtil;
|
import cn.hutool.core.util.IdUtil;
|
||||||
|
import cn.hutool.core.util.StrUtil;
|
||||||
import cn.iocoder.yudao.framework.common.pojo.PageResult;
|
import cn.iocoder.yudao.framework.common.pojo.PageResult;
|
||||||
import cn.iocoder.yudao.framework.common.util.json.JsonUtils;
|
import cn.iocoder.yudao.framework.common.util.json.JsonUtils;
|
||||||
import cn.iocoder.yudao.framework.common.util.validation.ValidationUtils;
|
import cn.iocoder.yudao.framework.common.util.validation.ValidationUtils;
|
||||||
|
|
@ -93,7 +94,7 @@ public class FileConfigServiceImpl implements FileConfigService {
|
||||||
fileConfigMapper.updateById(updateObj);
|
fileConfigMapper.updateById(updateObj);
|
||||||
|
|
||||||
// 清空缓存
|
// 清空缓存
|
||||||
clearCache(config.getId(), null);
|
clearCache(config.getId(), config.getMaster());
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
@ -132,7 +133,7 @@ public class FileConfigServiceImpl implements FileConfigService {
|
||||||
fileConfigMapper.deleteById(id);
|
fileConfigMapper.deleteById(id);
|
||||||
|
|
||||||
// 清空缓存
|
// 清空缓存
|
||||||
clearCache(id, null);
|
clearCache(id, config.getMaster());
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
@ -149,7 +150,7 @@ public class FileConfigServiceImpl implements FileConfigService {
|
||||||
fileConfigMapper.deleteByIds(ids);
|
fileConfigMapper.deleteByIds(ids);
|
||||||
|
|
||||||
// 清空缓存
|
// 清空缓存
|
||||||
ids.forEach(id -> clearCache(id, null));
|
ids.forEach(id -> clearCache(id, false));
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
@ -191,7 +192,7 @@ public class FileConfigServiceImpl implements FileConfigService {
|
||||||
validateFileConfigExists(id);
|
validateFileConfigExists(id);
|
||||||
// 上传文件
|
// 上传文件
|
||||||
byte[] content = ResourceUtil.readBytes("file/erweima.jpg");
|
byte[] content = ResourceUtil.readBytes("file/erweima.jpg");
|
||||||
return getFileClient(id).upload(content, IdUtil.fastSimpleUUID() + ".jpg", "image/jpeg");
|
return getFileClient(id).upload(content, "public" + StrUtil.SLASH + IdUtil.fastSimpleUUID() + ".jpg", "image/jpeg");
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
|
||||||
|
|
@ -3,6 +3,7 @@ package cn.iocoder.yudao.module.infra.service.file;
|
||||||
import cn.hutool.core.date.LocalDateTimeUtil;
|
import cn.hutool.core.date.LocalDateTimeUtil;
|
||||||
import cn.hutool.core.io.FileUtil;
|
import cn.hutool.core.io.FileUtil;
|
||||||
import cn.hutool.core.lang.Assert;
|
import cn.hutool.core.lang.Assert;
|
||||||
|
import cn.hutool.core.util.RandomUtil;
|
||||||
import cn.hutool.core.util.StrUtil;
|
import cn.hutool.core.util.StrUtil;
|
||||||
import cn.hutool.crypto.digest.DigestUtil;
|
import cn.hutool.crypto.digest.DigestUtil;
|
||||||
import cn.iocoder.yudao.framework.common.pojo.PageResult;
|
import cn.iocoder.yudao.framework.common.pojo.PageResult;
|
||||||
|
|
@ -41,12 +42,19 @@ public class FileServiceImpl implements FileService {
|
||||||
*/
|
*/
|
||||||
static boolean PATH_PREFIX_DATE_ENABLE = true;
|
static boolean PATH_PREFIX_DATE_ENABLE = true;
|
||||||
/**
|
/**
|
||||||
* 上传文件的后缀,是否包含时间戳
|
* 上传文件的后缀,是否启用
|
||||||
*
|
*
|
||||||
* 目的:保证文件的唯一性,避免覆盖
|
* 算法:当前时间戳(毫秒)+ 5 位随机数;目的是保证文件的唯一性,避免覆盖
|
||||||
* 定制:可按需调整成 UUID、或者其他方式
|
* 定制:可按需调整成 UUID、或者其他方式
|
||||||
*/
|
*/
|
||||||
static boolean PATH_SUFFIX_TIMESTAMP_ENABLE = true;
|
static boolean PATH_SUFFIX_TIMESTAMP_ENABLE = false;
|
||||||
|
/**
|
||||||
|
* 后缀是否作为上级目录
|
||||||
|
*
|
||||||
|
* true:{@code yyyyMMdd/<后缀>/原文件名.ext};保留原文件名
|
||||||
|
* false:{@code yyyyMMdd/原文件名_<后缀>.ext};后缀拼到文件名
|
||||||
|
*/
|
||||||
|
static boolean PATH_SUFFIX_AS_DIRECTORY = true;
|
||||||
|
|
||||||
@Resource
|
@Resource
|
||||||
private FileConfigService fileConfigService;
|
private FileConfigService fileConfigService;
|
||||||
|
|
@ -101,16 +109,21 @@ public class FileServiceImpl implements FileService {
|
||||||
}
|
}
|
||||||
String suffix = null;
|
String suffix = null;
|
||||||
if (PATH_SUFFIX_TIMESTAMP_ENABLE) {
|
if (PATH_SUFFIX_TIMESTAMP_ENABLE) {
|
||||||
suffix = String.valueOf(System.currentTimeMillis());
|
// 5 位随机数,避免同一毫秒内的重复
|
||||||
|
suffix = String.valueOf(System.currentTimeMillis()) + RandomUtil.randomInt(10000, 100000);
|
||||||
}
|
}
|
||||||
|
|
||||||
// 2.1 先拼接 suffix 后缀
|
// 2.1 先拼接 suffix 后缀
|
||||||
if (StrUtil.isNotEmpty(suffix)) {
|
if (StrUtil.isNotEmpty(suffix)) {
|
||||||
String ext = FileUtil.extName(name);
|
if (PATH_SUFFIX_AS_DIRECTORY) {
|
||||||
if (StrUtil.isNotEmpty(ext)) {
|
name = suffix + StrUtil.SLASH + name;
|
||||||
name = FileUtil.mainName(name) + StrUtil.C_UNDERLINE + suffix + StrUtil.DOT + ext;
|
|
||||||
} else {
|
} else {
|
||||||
name = name + StrUtil.C_UNDERLINE + suffix;
|
String ext = FileUtil.extName(name);
|
||||||
|
if (StrUtil.isNotEmpty(ext)) {
|
||||||
|
name = FileUtil.mainName(name) + StrUtil.C_UNDERLINE + suffix + StrUtil.DOT + ext;
|
||||||
|
} else {
|
||||||
|
name = name + StrUtil.C_UNDERLINE + suffix;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// 2.2 再拼接 prefix 前缀
|
// 2.2 再拼接 prefix 前缀
|
||||||
|
|
|
||||||
|
|
@ -102,7 +102,7 @@ xxl:
|
||||||
# Lock4j 配置项
|
# Lock4j 配置项
|
||||||
lock4j:
|
lock4j:
|
||||||
acquire-timeout: 3000 # 获取分布式锁超时时间,默认为 3000 毫秒
|
acquire-timeout: 3000 # 获取分布式锁超时时间,默认为 3000 毫秒
|
||||||
expire: 30000 # 分布式锁的超时时间,默认为 30 毫秒
|
expire: 30000 # 分布式锁的超时时间,默认为 30000 毫秒
|
||||||
|
|
||||||
--- #################### 监控相关配置 ####################
|
--- #################### 监控相关配置 ####################
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -113,7 +113,7 @@ xxl:
|
||||||
# Lock4j 配置项
|
# Lock4j 配置项
|
||||||
lock4j:
|
lock4j:
|
||||||
acquire-timeout: 3000 # 获取分布式锁超时时间,默认为 3000 毫秒
|
acquire-timeout: 3000 # 获取分布式锁超时时间,默认为 3000 毫秒
|
||||||
expire: 30000 # 分布式锁的超时时间,默认为 30 毫秒
|
expire: 30000 # 分布式锁的超时时间,默认为 30000 毫秒
|
||||||
|
|
||||||
--- #################### 监控相关配置 ####################
|
--- #################### 监控相关配置 ####################
|
||||||
|
|
||||||
|
|
@ -137,6 +137,8 @@ spring:
|
||||||
password: admin
|
password: admin
|
||||||
# Spring Boot Admin Server 服务端的相关配置
|
# Spring Boot Admin Server 服务端的相关配置
|
||||||
context-path: /admin # 配置 Spring
|
context-path: /admin # 配置 Spring
|
||||||
|
# 允许嵌入 iframe 的域名(支持通配符),实际部署时,可以改为 "'self' [你的公网域名]"
|
||||||
|
frame-ancestors: "'self' localhost localhost:48082 127.0.0.1 127.0.0.1:48082"
|
||||||
|
|
||||||
# 日志文件配置
|
# 日志文件配置
|
||||||
logging:
|
logging:
|
||||||
|
|
|
||||||
|
|
@ -164,6 +164,7 @@ yudao:
|
||||||
vo-type: 10 # VO 的类型,参见 CodegenVOTypeEnum 枚举类
|
vo-type: 10 # VO 的类型,参见 CodegenVOTypeEnum 枚举类
|
||||||
delete-batch-enable: true # 是否生成批量删除接口
|
delete-batch-enable: true # 是否生成批量删除接口
|
||||||
unit-test-enable: false # 是否生成单元测试
|
unit-test-enable: false # 是否生成单元测试
|
||||||
|
import-enable: false # 是否生成 Excel 导入接口
|
||||||
tenant: # 多租户相关配置项
|
tenant: # 多租户相关配置项
|
||||||
enable: true
|
enable: true
|
||||||
ignore-urls:
|
ignore-urls:
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,9 @@
|
||||||
package ${basePackage}.module.${table.moduleName}.controller.${sceneEnum.basePackage}.${table.businessName};
|
package ${basePackage}.module.${table.moduleName}.controller.${sceneEnum.basePackage}.${table.businessName};
|
||||||
|
|
||||||
import org.springframework.web.bind.annotation.*;
|
import org.springframework.web.bind.annotation.*;
|
||||||
|
#if ($importEnable)
|
||||||
|
import org.springframework.web.multipart.MultipartFile;
|
||||||
|
#end
|
||||||
import ${jakartaPackage}.annotation.Resource;
|
import ${jakartaPackage}.annotation.Resource;
|
||||||
import org.springframework.validation.annotation.Validated;
|
import org.springframework.validation.annotation.Validated;
|
||||||
#if ($sceneEnum.scene == 1)import org.springframework.security.access.prepost.PreAuthorize;#end
|
#if ($sceneEnum.scene == 1)import org.springframework.security.access.prepost.PreAuthorize;#end
|
||||||
|
|
@ -159,6 +162,29 @@ public class ${sceneEnum.prefixClass}${table.className}Controller {
|
||||||
BeanUtils.toBean(list, ${table.className}RespVO.class));
|
BeanUtils.toBean(list, ${table.className}RespVO.class));
|
||||||
}
|
}
|
||||||
#end
|
#end
|
||||||
|
#if ($importEnable)
|
||||||
|
|
||||||
|
@GetMapping("/get-import-template")
|
||||||
|
@Operation(summary = "获得导入${table.classComment}模板")
|
||||||
|
#if ($sceneEnum.scene == 1)
|
||||||
|
@PreAuthorize("@ss.hasPermission('${permissionPrefix}:import')")
|
||||||
|
#end
|
||||||
|
public void importTemplate(HttpServletResponse response) throws IOException {
|
||||||
|
ExcelUtils.write(response, "${table.classComment}导入模板.xls", "数据",
|
||||||
|
${sceneEnum.prefixClass}${table.className}ImportExcelVO.class, Collections.emptyList());
|
||||||
|
}
|
||||||
|
|
||||||
|
@PostMapping("/import")
|
||||||
|
@Operation(summary = "导入${table.classComment}")
|
||||||
|
@Parameter(name = "file", description = "Excel 文件", required = true)
|
||||||
|
#if ($sceneEnum.scene == 1)
|
||||||
|
@PreAuthorize("@ss.hasPermission('${permissionPrefix}:import')")
|
||||||
|
#end
|
||||||
|
public CommonResult<${sceneEnum.prefixClass}${table.className}ImportRespVO> importExcel(@RequestParam("file") MultipartFile file) throws Exception {
|
||||||
|
List<${sceneEnum.prefixClass}${table.className}ImportExcelVO> list = ExcelUtils.read(file, ${sceneEnum.prefixClass}${table.className}ImportExcelVO.class);
|
||||||
|
return success(${classNameVar}Service.import${simpleClassName}List(list));
|
||||||
|
}
|
||||||
|
#end
|
||||||
|
|
||||||
## 特殊:主子表专属逻辑
|
## 特殊:主子表专属逻辑
|
||||||
#foreach ($subTable in $subTables)
|
#foreach ($subTable in $subTables)
|
||||||
|
|
@ -268,4 +294,4 @@ public class ${sceneEnum.prefixClass}${table.className}Controller {
|
||||||
|
|
||||||
#end
|
#end
|
||||||
#end
|
#end
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,38 @@
|
||||||
|
package ${basePackage}.module.${table.moduleName}.controller.${sceneEnum.basePackage}.${table.businessName}.vo;
|
||||||
|
|
||||||
|
import cn.idev.excel.annotation.ExcelProperty;
|
||||||
|
import lombok.AllArgsConstructor;
|
||||||
|
import lombok.Builder;
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.NoArgsConstructor;
|
||||||
|
#foreach ($column in $columns)
|
||||||
|
#if (${column.createOperation} && "$!column.dictType" != "")
|
||||||
|
import ${DictFormatClassName};
|
||||||
|
import ${DictConvertClassName};
|
||||||
|
#break
|
||||||
|
#end
|
||||||
|
#end
|
||||||
|
|
||||||
|
/**
|
||||||
|
* ${table.classComment} Excel 导入 VO
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
@Builder
|
||||||
|
@AllArgsConstructor
|
||||||
|
@NoArgsConstructor
|
||||||
|
public class ${sceneEnum.prefixClass}${table.className}ImportExcelVO {
|
||||||
|
|
||||||
|
## 逐个处理字段
|
||||||
|
#foreach ($column in $columns)
|
||||||
|
#if (${column.createOperation})
|
||||||
|
#if ("$!column.dictType" != "")
|
||||||
|
@ExcelProperty(value = "${column.columnComment}", converter = DictConvert.class)
|
||||||
|
@DictFormat("${column.dictType}") // TODO 代码优化:建议设置到对应的 DictTypeConstants 枚举类中
|
||||||
|
#else
|
||||||
|
@ExcelProperty("${column.columnComment}")
|
||||||
|
#end
|
||||||
|
private ${column.javaType} ${column.javaField};
|
||||||
|
|
||||||
|
#end
|
||||||
|
#end
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,23 @@
|
||||||
|
package ${basePackage}.module.${table.moduleName}.controller.${sceneEnum.basePackage}.${table.businessName}.vo;
|
||||||
|
|
||||||
|
import io.swagger.v3.oas.annotations.media.Schema;
|
||||||
|
import lombok.Builder;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
import java.util.Map;
|
||||||
|
|
||||||
|
@Schema(description = "${sceneEnum.name} - ${table.classComment}导入 Response VO")
|
||||||
|
@Data
|
||||||
|
@Builder
|
||||||
|
public class ${sceneEnum.prefixClass}${table.className}ImportRespVO {
|
||||||
|
|
||||||
|
@Schema(description = "创建成功的数量", requiredMode = Schema.RequiredMode.REQUIRED, example = "10")
|
||||||
|
private Integer successCount;
|
||||||
|
|
||||||
|
@Schema(description = "导入失败的数量", requiredMode = Schema.RequiredMode.REQUIRED, example = "1")
|
||||||
|
private Integer failureCount;
|
||||||
|
|
||||||
|
@Schema(description = "导入失败的数据集合,key 为行号,value 为失败原因", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||||
|
private Map<Integer, String> failureRows;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
@ -25,6 +25,16 @@ public interface ${table.className}Service {
|
||||||
* @return 编号
|
* @return 编号
|
||||||
*/
|
*/
|
||||||
${primaryColumn.javaType} create${simpleClassName}(@Valid ${saveReqVOClass} ${saveReqVOVar});
|
${primaryColumn.javaType} create${simpleClassName}(@Valid ${saveReqVOClass} ${saveReqVOVar});
|
||||||
|
#if ($importEnable)
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 导入${table.classComment}
|
||||||
|
*
|
||||||
|
* @param importList 导入信息
|
||||||
|
* @return 导入结果
|
||||||
|
*/
|
||||||
|
${sceneEnum.prefixClass}${table.className}ImportRespVO import${simpleClassName}List(List<${sceneEnum.prefixClass}${table.className}ImportExcelVO> importList);
|
||||||
|
#end
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 更新${table.classComment}
|
* 更新${table.classComment}
|
||||||
|
|
@ -162,4 +172,4 @@ public interface ${table.className}Service {
|
||||||
|
|
||||||
#end
|
#end
|
||||||
#end
|
#end
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -7,6 +7,9 @@ import org.springframework.validation.annotation.Validated;
|
||||||
import org.springframework.transaction.annotation.Transactional;
|
import org.springframework.transaction.annotation.Transactional;
|
||||||
|
|
||||||
import java.util.*;
|
import java.util.*;
|
||||||
|
#if ($importEnable)
|
||||||
|
import java.util.concurrent.atomic.AtomicInteger;
|
||||||
|
#end
|
||||||
import ${basePackage}.module.${table.moduleName}.controller.${sceneEnum.basePackage}.${table.businessName}.vo.*;
|
import ${basePackage}.module.${table.moduleName}.controller.${sceneEnum.basePackage}.${table.businessName}.vo.*;
|
||||||
import ${basePackage}.module.${table.moduleName}.dal.dataobject.${table.businessName}.${table.className}DO;
|
import ${basePackage}.module.${table.moduleName}.dal.dataobject.${table.businessName}.${table.className}DO;
|
||||||
## 特殊:主子表专属逻辑
|
## 特殊:主子表专属逻辑
|
||||||
|
|
@ -91,6 +94,32 @@ public class ${table.className}ServiceImpl implements ${table.className}Service
|
||||||
// 返回
|
// 返回
|
||||||
return ${classNameVar}.getId();
|
return ${classNameVar}.getId();
|
||||||
}
|
}
|
||||||
|
#if ($importEnable)
|
||||||
|
|
||||||
|
@Override
|
||||||
|
@Transactional(rollbackFor = Exception.class) // 添加事务,异常则回滚所有导入
|
||||||
|
public ${sceneEnum.prefixClass}${table.className}ImportRespVO import${simpleClassName}List(List<${sceneEnum.prefixClass}${table.className}ImportExcelVO> importList) {
|
||||||
|
if (CollUtil.isEmpty(importList)) {
|
||||||
|
return ${sceneEnum.prefixClass}${table.className}ImportRespVO.builder()
|
||||||
|
.successCount(0).failureCount(0).failureRows(new LinkedHashMap<>()).build();
|
||||||
|
}
|
||||||
|
// 遍历,逐个创建
|
||||||
|
${sceneEnum.prefixClass}${table.className}ImportRespVO respVO = ${sceneEnum.prefixClass}${table.className}ImportRespVO.builder()
|
||||||
|
.successCount(0).failureCount(0).failureRows(new LinkedHashMap<>()).build();
|
||||||
|
AtomicInteger index = new AtomicInteger(1);
|
||||||
|
importList.forEach(importItem -> {
|
||||||
|
int currentIndex = index.getAndIncrement();
|
||||||
|
try {
|
||||||
|
create${simpleClassName}(BeanUtils.toBean(importItem, ${saveReqVOClass}.class));
|
||||||
|
respVO.setSuccessCount(respVO.getSuccessCount() + 1);
|
||||||
|
} catch (Exception ex) {
|
||||||
|
respVO.getFailureRows().put(currentIndex, ex.getMessage());
|
||||||
|
}
|
||||||
|
});
|
||||||
|
respVO.setFailureCount(respVO.getFailureRows().size());
|
||||||
|
return respVO;
|
||||||
|
}
|
||||||
|
#end
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
## 特殊:主子表专属逻辑(非 ERP 模式)
|
## 特殊:主子表专属逻辑(非 ERP 模式)
|
||||||
|
|
@ -359,6 +388,9 @@ public class ${table.className}ServiceImpl implements ${table.className}Service
|
||||||
#else
|
#else
|
||||||
#if ( $subTable.subJoinMany)
|
#if ( $subTable.subJoinMany)
|
||||||
private void create${subSimpleClassName}List(${primaryColumn.javaType} ${subJoinColumn.javaField}, List<${subTable.className}DO> list) {
|
private void create${subSimpleClassName}List(${primaryColumn.javaType} ${subJoinColumn.javaField}, List<${subTable.className}DO> list) {
|
||||||
|
if (CollUtil.isEmpty(list)) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
list.forEach(o -> o.set${SubJoinColumnName}(${subJoinColumn.javaField}).clean());
|
list.forEach(o -> o.set${SubJoinColumnName}(${subJoinColumn.javaField}).clean());
|
||||||
${subClassNameVars.get($index)}Mapper.insertBatch(list);
|
${subClassNameVars.get($index)}Mapper.insertBatch(list);
|
||||||
}
|
}
|
||||||
|
|
@ -416,4 +448,4 @@ public class ${table.className}ServiceImpl implements ${table.className}Service
|
||||||
#end
|
#end
|
||||||
|
|
||||||
#end
|
#end
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,11 @@
|
||||||
## 通用变量定义
|
## 通用变量定义
|
||||||
|
#if ($importEnable)
|
||||||
|
#set ($functionNames = ['查询', '创建', '更新', '删除', '导出', '导入'])
|
||||||
|
#set ($functionOps = ['query', 'create', 'update', 'delete', 'export', 'import'])
|
||||||
|
#else
|
||||||
#set ($functionNames = ['查询', '创建', '更新', '删除', '导出'])
|
#set ($functionNames = ['查询', '创建', '更新', '删除', '导出'])
|
||||||
#set ($functionOps = ['query', 'create', 'update', 'delete', 'export'])
|
#set ($functionOps = ['query', 'create', 'update', 'delete', 'export'])
|
||||||
|
#end
|
||||||
##
|
##
|
||||||
## 宏定义:生成按钮 SQL(通用部分)
|
## 宏定义:生成按钮 SQL(通用部分)
|
||||||
#macro(insertButtonSql $parentIdVar)
|
#macro(insertButtonSql $parentIdVar)
|
||||||
|
|
|
||||||
|
|
@ -73,6 +73,26 @@ export function export${simpleClassName}Excel(params) {
|
||||||
responseType: 'blob'
|
responseType: 'blob'
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
#if ($importEnable)
|
||||||
|
|
||||||
|
// 下载${table.classComment}导入模板
|
||||||
|
export function import${simpleClassName}Template() {
|
||||||
|
return request({
|
||||||
|
url: '${baseURL}/get-import-template',
|
||||||
|
method: 'get',
|
||||||
|
responseType: 'blob'
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
// 导入${table.classComment}
|
||||||
|
export function import${simpleClassName}(data) {
|
||||||
|
return request({
|
||||||
|
url: '${baseURL}/import',
|
||||||
|
method: 'post',
|
||||||
|
data
|
||||||
|
})
|
||||||
|
}
|
||||||
|
#end
|
||||||
## 特殊:主子表专属逻辑
|
## 特殊:主子表专属逻辑
|
||||||
#foreach ($subTable in $subTables)
|
#foreach ($subTable in $subTables)
|
||||||
#set ($index = $foreach.count - 1)
|
#set ($index = $foreach.count - 1)
|
||||||
|
|
@ -157,4 +177,4 @@ export function export${simpleClassName}Excel(params) {
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
#end
|
#end
|
||||||
#end
|
#end
|
||||||
|
|
|
||||||
|
|
@ -49,6 +49,16 @@
|
||||||
<el-button type="primary" plain icon="el-icon-plus" size="mini" @click="openForm(undefined)"
|
<el-button type="primary" plain icon="el-icon-plus" size="mini" @click="openForm(undefined)"
|
||||||
v-hasPermi="['${permissionPrefix}:create']">新增</el-button>
|
v-hasPermi="['${permissionPrefix}:create']">新增</el-button>
|
||||||
</el-col>
|
</el-col>
|
||||||
|
#if ($importEnable)
|
||||||
|
<el-col :span="1.5">
|
||||||
|
<el-button type="info" plain icon="el-icon-upload2" size="mini" @click="handleImport"
|
||||||
|
:loading="importLoading" v-hasPermi="['${permissionPrefix}:import']">导入</el-button>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="1.5">
|
||||||
|
<el-button type="info" plain icon="el-icon-document" size="mini" @click="handleImportTemplate"
|
||||||
|
v-hasPermi="['${permissionPrefix}:import']">导入模板</el-button>
|
||||||
|
</el-col>
|
||||||
|
#end
|
||||||
<el-col :span="1.5">
|
<el-col :span="1.5">
|
||||||
<el-button type="warning" plain icon="el-icon-download" size="mini" @click="handleExport" :loading="exportLoading"
|
<el-button type="warning" plain icon="el-icon-download" size="mini" @click="handleExport" :loading="exportLoading"
|
||||||
v-hasPermi="['${permissionPrefix}:export']">导出</el-button>
|
v-hasPermi="['${permissionPrefix}:export']">导出</el-button>
|
||||||
|
|
@ -78,6 +88,9 @@
|
||||||
#end
|
#end
|
||||||
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
|
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
|
||||||
</el-row>
|
</el-row>
|
||||||
|
#if ($importEnable)
|
||||||
|
<input ref="importFileRef" type="file" style="display: none" accept=".xls,.xlsx" @change="handleImportFileChange" />
|
||||||
|
#end
|
||||||
|
|
||||||
## 特殊:主子表专属逻辑
|
## 特殊:主子表专属逻辑
|
||||||
#if ( $table.templateType == 11 && $subTables && $subTables.size() > 0 )
|
#if ( $table.templateType == 11 && $subTables && $subTables.size() > 0 )
|
||||||
|
|
@ -244,6 +257,10 @@ export default {
|
||||||
loading: true,
|
loading: true,
|
||||||
// 导出遮罩层
|
// 导出遮罩层
|
||||||
exportLoading: false,
|
exportLoading: false,
|
||||||
|
#if ($importEnable)
|
||||||
|
// 导入遮罩层
|
||||||
|
importLoading: false,
|
||||||
|
#end
|
||||||
// 显示搜索条件
|
// 显示搜索条件
|
||||||
showSearch: true,
|
showSearch: true,
|
||||||
## 特殊:树表专属逻辑(树不需要分页接口)
|
## 特殊:树表专属逻辑(树不需要分页接口)
|
||||||
|
|
@ -322,6 +339,44 @@ export default {
|
||||||
openForm(id) {
|
openForm(id) {
|
||||||
this.#[[$]]#refs["formRef"].open(id);
|
this.#[[$]]#refs["formRef"].open(id);
|
||||||
},
|
},
|
||||||
|
#if ($importEnable)
|
||||||
|
/** 导入按钮操作 */
|
||||||
|
handleImport() {
|
||||||
|
this.$refs.importFileRef && this.$refs.importFileRef.click();
|
||||||
|
},
|
||||||
|
/** 导入模板下载 */
|
||||||
|
async handleImportTemplate() {
|
||||||
|
const data = await ${simpleClassName}Api.import${simpleClassName}Template();
|
||||||
|
this.#[[$]]#download.excel(data, '${table.classComment}导入模板.xls');
|
||||||
|
},
|
||||||
|
/** 导入文件变更 */
|
||||||
|
async handleImportFileChange(event) {
|
||||||
|
const target = event.target;
|
||||||
|
const file = target.files && target.files[0];
|
||||||
|
if (!file) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
this.importLoading = true;
|
||||||
|
try {
|
||||||
|
const formData = new FormData();
|
||||||
|
formData.append('file', file);
|
||||||
|
const res = await ${simpleClassName}Api.import${simpleClassName}(formData);
|
||||||
|
const data = res.data || res;
|
||||||
|
let text = '导入成功数量:' + (data.successCount || 0) + ';导入失败数量:' + (data.failureCount || 0) + ';';
|
||||||
|
if (data.failureRows) {
|
||||||
|
Object.keys(data.failureRows).forEach((rowNo) => {
|
||||||
|
text += '< 第' + rowNo + '行: ' + data.failureRows[rowNo] + ' >';
|
||||||
|
});
|
||||||
|
}
|
||||||
|
await this.$alert(text, '${table.classComment}导入结果', { dangerouslyUseHTMLString: true });
|
||||||
|
await this.getList();
|
||||||
|
} catch {
|
||||||
|
} finally {
|
||||||
|
target.value = '';
|
||||||
|
this.importLoading = false;
|
||||||
|
}
|
||||||
|
},
|
||||||
|
#end
|
||||||
/** 删除按钮操作 */
|
/** 删除按钮操作 */
|
||||||
async handleDelete(row) {
|
async handleDelete(row) {
|
||||||
const ${primaryColumn.javaField} = row.${primaryColumn.javaField};
|
const ${primaryColumn.javaField} = row.${primaryColumn.javaField};
|
||||||
|
|
|
||||||
|
|
@ -98,6 +98,18 @@ export const ${simpleClassName}Api = {
|
||||||
export${simpleClassName}: async (params) => {
|
export${simpleClassName}: async (params) => {
|
||||||
return await request.download({ url: `${baseURL}/export-excel`, params })
|
return await request.download({ url: `${baseURL}/export-excel`, params })
|
||||||
},
|
},
|
||||||
|
#if ($importEnable)
|
||||||
|
|
||||||
|
// 下载${table.classComment}导入模板
|
||||||
|
import${simpleClassName}Template: async () => {
|
||||||
|
return await request.download({ url: `${baseURL}/get-import-template` })
|
||||||
|
},
|
||||||
|
|
||||||
|
// 导入${table.classComment}
|
||||||
|
import${simpleClassName}: async (data: FormData) => {
|
||||||
|
return await request.upload({ url: `${baseURL}/import`, data })
|
||||||
|
},
|
||||||
|
#end
|
||||||
## 特殊:主子表专属逻辑
|
## 特殊:主子表专属逻辑
|
||||||
#foreach ($subTable in $subTables)
|
#foreach ($subTable in $subTables)
|
||||||
#set ($index = $foreach.count - 1)
|
#set ($index = $foreach.count - 1)
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,103 @@
|
||||||
|
<template>
|
||||||
|
<Dialog v-model="dialogVisible" title="${table.classComment}导入" width="400">
|
||||||
|
<el-upload
|
||||||
|
ref="uploadRef"
|
||||||
|
v-model:file-list="fileList"
|
||||||
|
:auto-upload="false"
|
||||||
|
:disabled="formLoading"
|
||||||
|
:limit="1"
|
||||||
|
:on-exceed="handleExceed"
|
||||||
|
accept=".xlsx, .xls"
|
||||||
|
action="none"
|
||||||
|
drag
|
||||||
|
>
|
||||||
|
<Icon icon="ep:upload" />
|
||||||
|
<div class="el-upload__text">将文件拖到此处,或<em>点击上传</em></div>
|
||||||
|
<template #tip>
|
||||||
|
<div class="el-upload__tip text-center">
|
||||||
|
<span>仅允许导入 xls、xlsx 格式文件。</span>
|
||||||
|
<el-link
|
||||||
|
:underline="false"
|
||||||
|
style="font-size: 12px; vertical-align: baseline"
|
||||||
|
type="primary"
|
||||||
|
@click="handleDownloadTemplate"
|
||||||
|
>
|
||||||
|
下载模板
|
||||||
|
</el-link>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
</el-upload>
|
||||||
|
<template #footer>
|
||||||
|
<el-button :disabled="formLoading" type="primary" @click="submitForm">确 定</el-button>
|
||||||
|
<el-button @click="dialogVisible = false">取 消</el-button>
|
||||||
|
</template>
|
||||||
|
</Dialog>
|
||||||
|
</template>
|
||||||
|
<script setup lang="ts">
|
||||||
|
import type { UploadUserFile } from 'element-plus'
|
||||||
|
import download from '@/utils/download'
|
||||||
|
import { ${simpleClassName}Api } from '@/api/${table.moduleName}/${table.businessName}'
|
||||||
|
|
||||||
|
/** ${table.classComment} 导入 */
|
||||||
|
defineOptions({ name: '${simpleClassName}ImportForm' })
|
||||||
|
|
||||||
|
const message = useMessage() // 消息弹窗
|
||||||
|
|
||||||
|
const dialogVisible = ref(false) // 弹窗的是否展示
|
||||||
|
const formLoading = ref(false) // 表单的加载中:上传、下载模板
|
||||||
|
const uploadRef = ref()
|
||||||
|
const fileList = ref<UploadUserFile[]>([])
|
||||||
|
|
||||||
|
/** 打开弹窗 */
|
||||||
|
const open = async () => {
|
||||||
|
dialogVisible.value = true
|
||||||
|
await resetForm()
|
||||||
|
}
|
||||||
|
defineExpose({ open }) // 提供 open 方法,用于打开弹窗
|
||||||
|
|
||||||
|
/** 提交导入 */
|
||||||
|
const emit = defineEmits(['success']) // 定义 success 事件,用于操作成功后的回调
|
||||||
|
const submitForm = async () => {
|
||||||
|
if (fileList.value.length === 0) {
|
||||||
|
message.error('请上传文件')
|
||||||
|
return
|
||||||
|
}
|
||||||
|
formLoading.value = true
|
||||||
|
try {
|
||||||
|
const formData = new FormData()
|
||||||
|
formData.append('file', fileList.value[0].raw as Blob)
|
||||||
|
const res = await ${simpleClassName}Api.import${simpleClassName}(formData)
|
||||||
|
const data = res.data
|
||||||
|
let text = '导入成功数量:' + data.successCount + ';导入失败数量:' + data.failureCount + ';'
|
||||||
|
if (data.failureCount > 0) {
|
||||||
|
for (const rowNo in data.failureRows) {
|
||||||
|
text += '< 第' + rowNo + '行: ' + data.failureRows[rowNo] + ' >'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
message.alert(text)
|
||||||
|
dialogVisible.value = false
|
||||||
|
emit('success')
|
||||||
|
} finally {
|
||||||
|
formLoading.value = false
|
||||||
|
await resetForm()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 下载导入模板 */
|
||||||
|
const handleDownloadTemplate = async () => {
|
||||||
|
const data = await ${simpleClassName}Api.import${simpleClassName}Template()
|
||||||
|
download.excel(data, '${table.classComment}导入模板.xls')
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 文件超限 */
|
||||||
|
const handleExceed = (): void => {
|
||||||
|
message.error('最多只能上传一个文件!')
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 重置表单 */
|
||||||
|
const resetForm = async () => {
|
||||||
|
fileList.value = []
|
||||||
|
await nextTick()
|
||||||
|
uploadRef.value?.clearFiles()
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
@ -92,6 +92,16 @@
|
||||||
>
|
>
|
||||||
<Icon icon="ep:plus" class="mr-5px" /> 新增
|
<Icon icon="ep:plus" class="mr-5px" /> 新增
|
||||||
</el-button>
|
</el-button>
|
||||||
|
#if ($importEnable)
|
||||||
|
<el-button
|
||||||
|
type="warning"
|
||||||
|
plain
|
||||||
|
@click="handleImport"
|
||||||
|
v-hasPermi="['${permissionPrefix}:import']"
|
||||||
|
>
|
||||||
|
<Icon icon="ep:upload" class="mr-5px" /> 导入
|
||||||
|
</el-button>
|
||||||
|
#end
|
||||||
<el-button
|
<el-button
|
||||||
type="success"
|
type="success"
|
||||||
plain
|
plain
|
||||||
|
|
@ -237,6 +247,11 @@
|
||||||
@pagination="getList"
|
@pagination="getList"
|
||||||
/>
|
/>
|
||||||
</ContentWrap>
|
</ContentWrap>
|
||||||
|
#if ($importEnable)
|
||||||
|
|
||||||
|
<!-- 导入弹窗 -->
|
||||||
|
<${simpleClassName}ImportForm ref="importRef" @success="getList" />
|
||||||
|
#end
|
||||||
|
|
||||||
<!-- 表单弹窗:添加/修改 -->
|
<!-- 表单弹窗:添加/修改 -->
|
||||||
<${simpleClassName}Form ref="formRef" @success="getList" />
|
<${simpleClassName}Form ref="formRef" @success="getList" />
|
||||||
|
|
@ -263,6 +278,9 @@
|
||||||
import { getIntDictOptions, getStrDictOptions, getBoolDictOptions, DICT_TYPE } from '@/utils/dict'
|
import { getIntDictOptions, getStrDictOptions, getBoolDictOptions, DICT_TYPE } from '@/utils/dict'
|
||||||
import { isEmpty } from '@/utils/is'
|
import { isEmpty } from '@/utils/is'
|
||||||
import { dateFormatter } from '@/utils/formatTime'
|
import { dateFormatter } from '@/utils/formatTime'
|
||||||
|
#if ($importEnable)
|
||||||
|
import ${simpleClassName}ImportForm from './${simpleClassName}ImportForm.vue'
|
||||||
|
#end
|
||||||
## 特殊:树表专属逻辑
|
## 特殊:树表专属逻辑
|
||||||
#if ( $table.templateType == 2 )
|
#if ( $table.templateType == 2 )
|
||||||
import { handleTree } from '@/utils/tree'
|
import { handleTree } from '@/utils/tree'
|
||||||
|
|
@ -308,6 +326,9 @@ const queryParams = reactive({
|
||||||
})
|
})
|
||||||
const queryFormRef = ref() // 搜索的表单
|
const queryFormRef = ref() // 搜索的表单
|
||||||
const exportLoading = ref(false) // 导出的加载中
|
const exportLoading = ref(false) // 导出的加载中
|
||||||
|
#if ($importEnable)
|
||||||
|
const importRef = ref() // ${table.classComment} 导入组件的 Ref
|
||||||
|
#end
|
||||||
|
|
||||||
/** 查询列表 */
|
/** 查询列表 */
|
||||||
const getList = async () => {
|
const getList = async () => {
|
||||||
|
|
@ -344,6 +365,13 @@ const formRef = ref()
|
||||||
const openForm = (type: string, id?: number) => {
|
const openForm = (type: string, id?: number) => {
|
||||||
formRef.value.open(type, id)
|
formRef.value.open(type, id)
|
||||||
}
|
}
|
||||||
|
#if ($importEnable)
|
||||||
|
|
||||||
|
/** 导入按钮操作 */
|
||||||
|
const handleImport = () => {
|
||||||
|
importRef.value.open()
|
||||||
|
}
|
||||||
|
#end
|
||||||
|
|
||||||
/** 删除按钮操作 */
|
/** 删除按钮操作 */
|
||||||
const handleDelete = async (id: number) => {
|
const handleDelete = async (id: number) => {
|
||||||
|
|
@ -421,4 +449,4 @@ const toggleExpandAll = async () => {
|
||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
getList()
|
getList()
|
||||||
})
|
})
|
||||||
</script>
|
</script>
|
||||||
|
|
|
||||||
|
|
@ -30,3 +30,15 @@ export function delete${simpleClassName}(id: number) {
|
||||||
export function export${simpleClassName}(params) {
|
export function export${simpleClassName}(params) {
|
||||||
return defHttp.download({ url: '${baseURL}/export-excel', params }, '${table.classComment}.xls')
|
return defHttp.download({ url: '${baseURL}/export-excel', params }, '${table.classComment}.xls')
|
||||||
}
|
}
|
||||||
|
#if ($importEnable)
|
||||||
|
|
||||||
|
// 下载${table.classComment}导入模板
|
||||||
|
export function import${simpleClassName}Template() {
|
||||||
|
return defHttp.download({ url: '${baseURL}/get-import-template' }, '${table.classComment}导入模板.xls')
|
||||||
|
}
|
||||||
|
|
||||||
|
// 导入${table.classComment}
|
||||||
|
export function import${simpleClassName}(data: FormData) {
|
||||||
|
return defHttp.post({ url: '${baseURL}/import', data })
|
||||||
|
}
|
||||||
|
#end
|
||||||
|
|
|
||||||
|
|
@ -1,18 +1,31 @@
|
||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import ${simpleClassName}Modal from './${simpleClassName}Modal.vue'
|
import ${simpleClassName}Modal from './${simpleClassName}Modal.vue'
|
||||||
import { columns, searchFormSchema } from './${classNameVar}.data'
|
import { columns, searchFormSchema } from './${classNameVar}.data'
|
||||||
|
import { ref } from 'vue'
|
||||||
import { useI18n } from '@/hooks/web/useI18n'
|
import { useI18n } from '@/hooks/web/useI18n'
|
||||||
import { useMessage } from '@/hooks/web/useMessage'
|
import { useMessage } from '@/hooks/web/useMessage'
|
||||||
import { useModal } from '@/components/Modal'
|
import { useModal } from '@/components/Modal'
|
||||||
import { IconEnum } from '@/enums/appEnum'
|
import { IconEnum } from '@/enums/appEnum'
|
||||||
import { BasicTable, TableAction, useTable } from '@/components/Table'
|
import { BasicTable, TableAction, useTable } from '@/components/Table'
|
||||||
import { delete${simpleClassName}, export${simpleClassName}, get${simpleClassName}Page } from '@/api/${table.moduleName}/${table.businessName}'
|
import {
|
||||||
|
delete${simpleClassName},
|
||||||
|
export${simpleClassName},
|
||||||
|
get${simpleClassName}Page,
|
||||||
|
#if ($importEnable)
|
||||||
|
import${simpleClassName},
|
||||||
|
import${simpleClassName}Template,
|
||||||
|
#end
|
||||||
|
} from '@/api/${table.moduleName}/${table.businessName}'
|
||||||
|
|
||||||
defineOptions({ name: '${table.className}' })
|
defineOptions({ name: '${table.className}' })
|
||||||
|
|
||||||
const { t } = useI18n()
|
const { t } = useI18n()
|
||||||
const { createConfirm, createMessage } = useMessage()
|
const { createConfirm, createMessage } = useMessage()
|
||||||
const [registerModal, { openModal }] = useModal()
|
const [registerModal, { openModal }] = useModal()
|
||||||
|
#if ($importEnable)
|
||||||
|
const importFileRef = ref<HTMLInputElement>()
|
||||||
|
const importLoading = ref(false)
|
||||||
|
#end
|
||||||
|
|
||||||
const [registerTable, { getForm, reload }] = useTable({
|
const [registerTable, { getForm, reload }] = useTable({
|
||||||
title: '${table.classComment}列表',
|
title: '${table.classComment}列表',
|
||||||
|
|
@ -48,6 +61,44 @@ async function handleExport() {
|
||||||
},
|
},
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
#if ($importEnable)
|
||||||
|
|
||||||
|
function handleImport() {
|
||||||
|
importFileRef.value?.click()
|
||||||
|
}
|
||||||
|
|
||||||
|
async function handleImportTemplateDownload() {
|
||||||
|
await import${simpleClassName}Template()
|
||||||
|
createMessage.success('模板下载已开始')
|
||||||
|
}
|
||||||
|
|
||||||
|
async function handleImportFileChange(event: Event) {
|
||||||
|
const target = event.target as HTMLInputElement
|
||||||
|
const file = target.files?.[0]
|
||||||
|
if (!file) {
|
||||||
|
return
|
||||||
|
}
|
||||||
|
importLoading.value = true
|
||||||
|
try {
|
||||||
|
const formData = new FormData()
|
||||||
|
formData.append('file', file)
|
||||||
|
const response: any = await import${simpleClassName}(formData)
|
||||||
|
const data = response?.data ?? response
|
||||||
|
let text =
|
||||||
|
'导入成功数量:' + (data?.successCount || 0) + ';导入失败数量:' + (data?.failureCount || 0) + ';'
|
||||||
|
if (data?.failureRows) {
|
||||||
|
Object.keys(data.failureRows).forEach((rowNo) => {
|
||||||
|
text += '< 第' + rowNo + '行: ' + data.failureRows[rowNo] + ' >'
|
||||||
|
})
|
||||||
|
}
|
||||||
|
createMessage.success(text)
|
||||||
|
await reload()
|
||||||
|
} finally {
|
||||||
|
target.value = ''
|
||||||
|
importLoading.value = false
|
||||||
|
}
|
||||||
|
}
|
||||||
|
#end
|
||||||
|
|
||||||
async function handleDelete(record: Recordable) {
|
async function handleDelete(record: Recordable) {
|
||||||
await delete${simpleClassName}(record.id)
|
await delete${simpleClassName}(record.id)
|
||||||
|
|
@ -62,6 +113,14 @@ async function handleDelete(record: Recordable) {
|
||||||
<a-button type="primary" v-auth="['${permissionPrefix}:create']" :preIcon="IconEnum.ADD" @click="handleCreate">
|
<a-button type="primary" v-auth="['${permissionPrefix}:create']" :preIcon="IconEnum.ADD" @click="handleCreate">
|
||||||
{{ t('action.create') }}
|
{{ t('action.create') }}
|
||||||
</a-button>
|
</a-button>
|
||||||
|
#if ($importEnable)
|
||||||
|
<a-button v-auth="['${permissionPrefix}:import']" :loading="importLoading" @click="handleImport">
|
||||||
|
导入
|
||||||
|
</a-button>
|
||||||
|
<a-button v-auth="['${permissionPrefix}:import']" @click="handleImportTemplateDownload">
|
||||||
|
导入模板
|
||||||
|
</a-button>
|
||||||
|
#end
|
||||||
<a-button v-auth="['${permissionPrefix}:export']" :preIcon="IconEnum.EXPORT" @click="handleExport">
|
<a-button v-auth="['${permissionPrefix}:export']" :preIcon="IconEnum.EXPORT" @click="handleExport">
|
||||||
{{ t('action.export') }}
|
{{ t('action.export') }}
|
||||||
</a-button>
|
</a-button>
|
||||||
|
|
@ -87,6 +146,9 @@ async function handleDelete(record: Recordable) {
|
||||||
</template>
|
</template>
|
||||||
</template>
|
</template>
|
||||||
</BasicTable>
|
</BasicTable>
|
||||||
|
#if ($importEnable)
|
||||||
|
<input ref="importFileRef" type="file" accept=".xls,.xlsx" class="hidden" @change="handleImportFileChange" />
|
||||||
|
#end
|
||||||
<${simpleClassName}Modal @register="registerModal" @success="reload()" />
|
<${simpleClassName}Modal @register="registerModal" @success="reload()" />
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
|
||||||
|
|
@ -100,6 +100,18 @@ export function delete${simpleClassName}List(ids: number[]) {
|
||||||
export function export${simpleClassName}(params: any) {
|
export function export${simpleClassName}(params: any) {
|
||||||
return requestClient.download('${baseURL}/export-excel', { params });
|
return requestClient.download('${baseURL}/export-excel', { params });
|
||||||
}
|
}
|
||||||
|
#if ($importEnable)
|
||||||
|
|
||||||
|
/** 下载${table.classComment}导入模板 */
|
||||||
|
export function import${simpleClassName}Template() {
|
||||||
|
return requestClient.download('${baseURL}/get-import-template');
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 导入${table.classComment} */
|
||||||
|
export function import${simpleClassName}(data: FormData) {
|
||||||
|
return requestClient.post('${baseURL}/import', data);
|
||||||
|
}
|
||||||
|
#end
|
||||||
|
|
||||||
## 特殊:主子表专属逻辑
|
## 特殊:主子表专属逻辑
|
||||||
#foreach ($subTable in $subTables)
|
#foreach ($subTable in $subTables)
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,71 @@
|
||||||
|
<script lang="ts" setup>
|
||||||
|
import type { FileType } from 'ant-design-vue/es/upload/interface';
|
||||||
|
|
||||||
|
import { ref } from 'vue';
|
||||||
|
|
||||||
|
import { useVbenModal } from '@vben/common-ui';
|
||||||
|
import { downloadFileFromBlobPart } from '@vben/utils';
|
||||||
|
|
||||||
|
import { Button, message, Upload } from 'ant-design-vue';
|
||||||
|
|
||||||
|
import { import${simpleClassName}, import${simpleClassName}Template } from '#/api/${table.moduleName}/${table.businessName}';
|
||||||
|
|
||||||
|
defineOptions({ name: '${simpleClassName}Import' });
|
||||||
|
|
||||||
|
const emit = defineEmits(['success']);
|
||||||
|
const fileRef = ref<File | null>(null);
|
||||||
|
|
||||||
|
const [Modal, modalApi] = useVbenModal({
|
||||||
|
async onConfirm() {
|
||||||
|
if (!fileRef.value) {
|
||||||
|
message.error('请上传文件');
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
modalApi.lock();
|
||||||
|
try {
|
||||||
|
const formData = new FormData();
|
||||||
|
formData.append('file', fileRef.value);
|
||||||
|
const response: any = await import${simpleClassName}(formData);
|
||||||
|
const data = response?.data ?? response ?? {};
|
||||||
|
let text = '导入成功数量:' + (data.successCount || 0) + ';导入失败数量:' + (data.failureCount || 0) + ';';
|
||||||
|
if (data.failureRows) {
|
||||||
|
Object.keys(data.failureRows).forEach((rowNo) => {
|
||||||
|
text += '< 第' + rowNo + '行: ' + data.failureRows[rowNo] + ' >';
|
||||||
|
});
|
||||||
|
}
|
||||||
|
message.info(text);
|
||||||
|
await modalApi.close();
|
||||||
|
emit('success');
|
||||||
|
} finally {
|
||||||
|
modalApi.unlock();
|
||||||
|
}
|
||||||
|
},
|
||||||
|
});
|
||||||
|
|
||||||
|
/** 上传前:拦截 antd Upload 的自动上传,文件存到 ref */
|
||||||
|
function beforeUpload(file: FileType) {
|
||||||
|
fileRef.value = file as unknown as File;
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 下载导入模板 */
|
||||||
|
async function handleDownload() {
|
||||||
|
const data = await import${simpleClassName}Template();
|
||||||
|
downloadFileFromBlobPart({ fileName: '${table.classComment}导入模板.xls', source: data });
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<template>
|
||||||
|
<Modal title="导入${table.classComment}" class="w-1/3">
|
||||||
|
<div class="mx-4">
|
||||||
|
<Upload :max-count="1" accept=".xls,.xlsx" :before-upload="beforeUpload">
|
||||||
|
<Button type="primary"> 选择 Excel 文件 </Button>
|
||||||
|
</Upload>
|
||||||
|
</div>
|
||||||
|
<template #prepend-footer>
|
||||||
|
<div class="flex flex-auto items-center">
|
||||||
|
<Button @click="handleDownload"> 下载导入模板 </Button>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
</Modal>
|
||||||
|
</template>
|
||||||
|
|
@ -31,6 +31,9 @@ import { get${simpleClassName}List, delete${simpleClassName}, export${simpleClas
|
||||||
#else## 标准表接口
|
#else## 标准表接口
|
||||||
import { get${simpleClassName}Page, delete${simpleClassName},#if ($deleteBatchEnable) delete${simpleClassName}List,#end export${simpleClassName} } from '#/api/${table.moduleName}/${table.businessName}';
|
import { get${simpleClassName}Page, delete${simpleClassName},#if ($deleteBatchEnable) delete${simpleClassName}List,#end export${simpleClassName} } from '#/api/${table.moduleName}/${table.businessName}';
|
||||||
#end
|
#end
|
||||||
|
#if ($importEnable)
|
||||||
|
import ${simpleClassName}Import from './modules/import-form.vue';
|
||||||
|
#end
|
||||||
|
|
||||||
#if ($table.templateType == 12 || $table.templateType == 11) ## 内嵌和erp情况
|
#if ($table.templateType == 12 || $table.templateType == 11) ## 内嵌和erp情况
|
||||||
/** 子表的列表 */
|
/** 子表的列表 */
|
||||||
|
|
@ -119,6 +122,17 @@ const [FormModal, formModalApi] = useVbenModal({
|
||||||
connectedComponent: ${simpleClassName}Form,
|
connectedComponent: ${simpleClassName}Form,
|
||||||
destroyOnClose: true,
|
destroyOnClose: true,
|
||||||
});
|
});
|
||||||
|
#if ($importEnable)
|
||||||
|
const [ImportFormModal, importFormModalApi] = useVbenModal({
|
||||||
|
connectedComponent: ${simpleClassName}Import,
|
||||||
|
destroyOnClose: true,
|
||||||
|
});
|
||||||
|
|
||||||
|
/** 导入${table.classComment} */
|
||||||
|
function handleImport() {
|
||||||
|
importFormModalApi.open();
|
||||||
|
}
|
||||||
|
#end
|
||||||
|
|
||||||
/** 创建${table.classComment} */
|
/** 创建${table.classComment} */
|
||||||
function handleCreate() {
|
function handleCreate() {
|
||||||
|
|
@ -190,6 +204,7 @@ try {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
#if (${table.templateType} == 2)
|
#if (${table.templateType} == 2)
|
||||||
/** 切换树形展开/收缩状态 */
|
/** 切换树形展开/收缩状态 */
|
||||||
const isExpanded = ref(true);
|
const isExpanded = ref(true);
|
||||||
|
|
@ -209,6 +224,9 @@ onMounted(() => {
|
||||||
<template>
|
<template>
|
||||||
<Page auto-content-height>
|
<Page auto-content-height>
|
||||||
<FormModal @success="getList" />
|
<FormModal @success="getList" />
|
||||||
|
#if ($importEnable)
|
||||||
|
<ImportFormModal @success="getList" />
|
||||||
|
#end
|
||||||
|
|
||||||
<Card v-if="!hiddenSearchBar" class="mb-4">
|
<Card v-if="!hiddenSearchBar" class="mb-4">
|
||||||
<!-- 搜索工作栏 -->
|
<!-- 搜索工作栏 -->
|
||||||
|
|
@ -314,6 +332,16 @@ onMounted(() => {
|
||||||
>
|
>
|
||||||
{{ $t('ui.actionTitle.create', ['${table.classComment}']) }}
|
{{ $t('ui.actionTitle.create', ['${table.classComment}']) }}
|
||||||
</Button>
|
</Button>
|
||||||
|
#if ($importEnable)
|
||||||
|
<Button
|
||||||
|
class="ml-2"
|
||||||
|
type="primary"
|
||||||
|
@click="handleImport"
|
||||||
|
v-access:code="['${permissionPrefix}:import']"
|
||||||
|
>
|
||||||
|
导入
|
||||||
|
</Button>
|
||||||
|
#end
|
||||||
<Button
|
<Button
|
||||||
:icon="h(Download)"
|
:icon="h(Download)"
|
||||||
type="primary"
|
type="primary"
|
||||||
|
|
|
||||||
|
|
@ -134,6 +134,21 @@ export function useFormSchema(): VbenFormSchema[] {
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#if ($importEnable)
|
||||||
|
/** 导入的表单 */
|
||||||
|
export function useImportFormSchema(): VbenFormSchema[] {
|
||||||
|
return [
|
||||||
|
{
|
||||||
|
fieldName: 'file',
|
||||||
|
label: '${table.classComment}数据',
|
||||||
|
component: 'Upload',
|
||||||
|
rules: 'required',
|
||||||
|
help: '仅允许导入 xls、xlsx 格式文件',
|
||||||
|
},
|
||||||
|
];
|
||||||
|
}
|
||||||
|
|
||||||
|
#end
|
||||||
/** 列表的搜索表单 */
|
/** 列表的搜索表单 */
|
||||||
export function useGridFormSchema(): VbenFormSchema[] {
|
export function useGridFormSchema(): VbenFormSchema[] {
|
||||||
return [
|
return [
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,82 @@
|
||||||
|
<script lang="ts" setup>
|
||||||
|
import type { FileType } from 'ant-design-vue/es/upload/interface';
|
||||||
|
|
||||||
|
import { useVbenModal } from '@vben/common-ui';
|
||||||
|
import { downloadFileFromBlobPart } from '@vben/utils';
|
||||||
|
|
||||||
|
import { Button, message, Upload } from 'ant-design-vue';
|
||||||
|
|
||||||
|
import { useVbenForm } from '#/adapter/form';
|
||||||
|
import { import${simpleClassName}, import${simpleClassName}Template } from '#/api/${table.moduleName}/${table.businessName}';
|
||||||
|
import { $t } from '#/locales';
|
||||||
|
|
||||||
|
import { useImportFormSchema } from '../data';
|
||||||
|
|
||||||
|
const emit = defineEmits(['success']);
|
||||||
|
|
||||||
|
const [Form, formApi] = useVbenForm({
|
||||||
|
commonConfig: {
|
||||||
|
formItemClass: 'col-span-2',
|
||||||
|
labelWidth: 120,
|
||||||
|
},
|
||||||
|
layout: 'horizontal',
|
||||||
|
schema: useImportFormSchema(),
|
||||||
|
showDefaultActions: false,
|
||||||
|
});
|
||||||
|
|
||||||
|
const [Modal, modalApi] = useVbenModal({
|
||||||
|
async onConfirm() {
|
||||||
|
const { valid } = await formApi.validate();
|
||||||
|
if (!valid) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
modalApi.lock();
|
||||||
|
// 提交表单
|
||||||
|
const data = await formApi.getValues();
|
||||||
|
try {
|
||||||
|
await import${simpleClassName}(data.file);
|
||||||
|
// 关闭并提示
|
||||||
|
await modalApi.close();
|
||||||
|
emit('success');
|
||||||
|
message.success($t('ui.actionMessage.operationSuccess'));
|
||||||
|
} finally {
|
||||||
|
modalApi.unlock();
|
||||||
|
}
|
||||||
|
},
|
||||||
|
});
|
||||||
|
|
||||||
|
/** 上传前 */
|
||||||
|
function beforeUpload(file: FileType) {
|
||||||
|
formApi.setFieldValue('file', file);
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 下载模板 */
|
||||||
|
async function handleDownload() {
|
||||||
|
const data = await import${simpleClassName}Template();
|
||||||
|
downloadFileFromBlobPart({ fileName: '${table.classComment}导入模板.xls', source: data });
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<template>
|
||||||
|
<Modal title="导入${table.classComment}" class="w-1/3">
|
||||||
|
<Form class="mx-4">
|
||||||
|
<template #file>
|
||||||
|
<div class="w-full">
|
||||||
|
<Upload
|
||||||
|
:max-count="1"
|
||||||
|
accept=".xls,.xlsx"
|
||||||
|
:before-upload="beforeUpload"
|
||||||
|
>
|
||||||
|
<Button type="primary"> 选择 Excel 文件 </Button>
|
||||||
|
</Upload>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
</Form>
|
||||||
|
<template #prepend-footer>
|
||||||
|
<div class="flex flex-auto items-center">
|
||||||
|
<Button @click="handleDownload"> 下载导入模板 </Button>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
</Modal>
|
||||||
|
</template>
|
||||||
|
|
@ -26,6 +26,9 @@ import {
|
||||||
get${simpleClassName}Page,
|
get${simpleClassName}Page,
|
||||||
} from '#/api/${table.moduleName}/${table.businessName}';
|
} from '#/api/${table.moduleName}/${table.businessName}';
|
||||||
#end
|
#end
|
||||||
|
#if ($importEnable)
|
||||||
|
import ${simpleClassName}Import from './modules/import-form.vue';
|
||||||
|
#end
|
||||||
import { $t } from '#/locales';
|
import { $t } from '#/locales';
|
||||||
|
|
||||||
import { useGridColumns, useGridFormSchema } from './data';
|
import { useGridColumns, useGridFormSchema } from './data';
|
||||||
|
|
@ -50,6 +53,17 @@ const [FormModal, formModalApi] = useVbenModal({
|
||||||
connectedComponent: Form,
|
connectedComponent: Form,
|
||||||
destroyOnClose: true,
|
destroyOnClose: true,
|
||||||
});
|
});
|
||||||
|
#if ($importEnable)
|
||||||
|
const [ImportFormModal, importFormModalApi] = useVbenModal({
|
||||||
|
connectedComponent: ${simpleClassName}Import,
|
||||||
|
destroyOnClose: true,
|
||||||
|
});
|
||||||
|
|
||||||
|
/** 导入${table.classComment} */
|
||||||
|
function handleImport() {
|
||||||
|
importFormModalApi.open();
|
||||||
|
}
|
||||||
|
#end
|
||||||
#if (${table.templateType} == 2)## 树表特有:控制表格展开收缩
|
#if (${table.templateType} == 2)## 树表特有:控制表格展开收缩
|
||||||
|
|
||||||
/** 切换树形展开/收缩状态 */
|
/** 切换树形展开/收缩状态 */
|
||||||
|
|
@ -135,6 +149,7 @@ async function handleExport() {
|
||||||
downloadFileFromBlobPart({ fileName: '${table.classComment}.xls', source: data });
|
downloadFileFromBlobPart({ fileName: '${table.classComment}.xls', source: data });
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
const [Grid, gridApi] = useVbenVxeGrid({
|
const [Grid, gridApi] = useVbenVxeGrid({
|
||||||
formOptions: {
|
formOptions: {
|
||||||
schema: useGridFormSchema(),
|
schema: useGridFormSchema(),
|
||||||
|
|
@ -210,6 +225,9 @@ const [Grid, gridApi] = useVbenVxeGrid({
|
||||||
<template>
|
<template>
|
||||||
<Page auto-content-height>
|
<Page auto-content-height>
|
||||||
<FormModal @success="handleRefresh" />
|
<FormModal @success="handleRefresh" />
|
||||||
|
#if ($importEnable)
|
||||||
|
<ImportFormModal @success="handleRefresh" />
|
||||||
|
#end
|
||||||
#if ($table.templateType == 11) ## erp情况
|
#if ($table.templateType == 11) ## erp情况
|
||||||
<div>
|
<div>
|
||||||
#end
|
#end
|
||||||
|
|
@ -247,6 +265,14 @@ const [Grid, gridApi] = useVbenVxeGrid({
|
||||||
onClick: handleExpand,
|
onClick: handleExpand,
|
||||||
},
|
},
|
||||||
#end
|
#end
|
||||||
|
#if ($importEnable)
|
||||||
|
{
|
||||||
|
label: '导入',
|
||||||
|
type: 'primary',
|
||||||
|
auth: ['${table.moduleName}:${simpleClassName_strikeCase}:import'],
|
||||||
|
onClick: handleImport,
|
||||||
|
},
|
||||||
|
#end
|
||||||
{
|
{
|
||||||
label: $t('ui.actionTitle.export'),
|
label: $t('ui.actionTitle.export'),
|
||||||
type: 'primary',
|
type: 'primary',
|
||||||
|
|
@ -318,4 +344,4 @@ const [Grid, gridApi] = useVbenVxeGrid({
|
||||||
</div>
|
</div>
|
||||||
#end
|
#end
|
||||||
</Page>
|
</Page>
|
||||||
</template>
|
</template>
|
||||||
|
|
|
||||||
|
|
@ -100,6 +100,18 @@ export function delete${simpleClassName}List(ids: number[]) {
|
||||||
export function export${simpleClassName}(params: any) {
|
export function export${simpleClassName}(params: any) {
|
||||||
return requestClient.download('${baseURL}/export-excel', { params });
|
return requestClient.download('${baseURL}/export-excel', { params });
|
||||||
}
|
}
|
||||||
|
#if ($importEnable)
|
||||||
|
|
||||||
|
/** 下载${table.classComment}导入模板 */
|
||||||
|
export function import${simpleClassName}Template() {
|
||||||
|
return requestClient.download('${baseURL}/get-import-template');
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 导入${table.classComment} */
|
||||||
|
export function import${simpleClassName}(data: FormData) {
|
||||||
|
return requestClient.post('${baseURL}/import', data);
|
||||||
|
}
|
||||||
|
#end
|
||||||
|
|
||||||
## 特殊:主子表专属逻辑
|
## 特殊:主子表专属逻辑
|
||||||
#foreach ($subTable in $subTables)
|
#foreach ($subTable in $subTables)
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,75 @@
|
||||||
|
<script lang="ts" setup>
|
||||||
|
import { ref } from 'vue';
|
||||||
|
|
||||||
|
import { useVbenModal } from '@vben/common-ui';
|
||||||
|
import { downloadFileFromBlobPart } from '@vben/utils';
|
||||||
|
|
||||||
|
import { ElButton, ElMessage, ElUpload } from 'element-plus';
|
||||||
|
|
||||||
|
import { import${simpleClassName}, import${simpleClassName}Template } from '#/api/${table.moduleName}/${table.businessName}';
|
||||||
|
|
||||||
|
defineOptions({ name: '${simpleClassName}Import' });
|
||||||
|
|
||||||
|
const emit = defineEmits(['success']);
|
||||||
|
const fileRef = ref<File | null>(null);
|
||||||
|
|
||||||
|
const [Modal, modalApi] = useVbenModal({
|
||||||
|
async onConfirm() {
|
||||||
|
if (!fileRef.value) {
|
||||||
|
ElMessage.error('请上传文件');
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
modalApi.lock();
|
||||||
|
try {
|
||||||
|
const formData = new FormData();
|
||||||
|
formData.append('file', fileRef.value);
|
||||||
|
const response: any = await import${simpleClassName}(formData);
|
||||||
|
const data = response?.data ?? response ?? {};
|
||||||
|
let text = '导入成功数量:' + (data.successCount || 0) + ';导入失败数量:' + (data.failureCount || 0) + ';';
|
||||||
|
if (data.failureRows) {
|
||||||
|
Object.keys(data.failureRows).forEach((rowNo) => {
|
||||||
|
text += '< 第' + rowNo + '行: ' + data.failureRows[rowNo] + ' >';
|
||||||
|
});
|
||||||
|
}
|
||||||
|
ElMessage.info(text);
|
||||||
|
await modalApi.close();
|
||||||
|
emit('success');
|
||||||
|
} finally {
|
||||||
|
modalApi.unlock();
|
||||||
|
}
|
||||||
|
},
|
||||||
|
});
|
||||||
|
|
||||||
|
/** 文件改变 */
|
||||||
|
function handleChange(file: any) {
|
||||||
|
if (file.raw) {
|
||||||
|
fileRef.value = file.raw;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 下载导入模板 */
|
||||||
|
async function handleDownload() {
|
||||||
|
const data = await import${simpleClassName}Template();
|
||||||
|
downloadFileFromBlobPart({ fileName: '${table.classComment}导入模板.xls', source: data });
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<template>
|
||||||
|
<Modal title="导入${table.classComment}" class="w-1/3">
|
||||||
|
<div class="mx-4">
|
||||||
|
<ElUpload
|
||||||
|
:limit="1"
|
||||||
|
accept=".xls,.xlsx"
|
||||||
|
:on-change="handleChange"
|
||||||
|
:auto-upload="false"
|
||||||
|
>
|
||||||
|
<ElButton type="primary"> 选择 Excel 文件 </ElButton>
|
||||||
|
</ElUpload>
|
||||||
|
</div>
|
||||||
|
<template #prepend-footer>
|
||||||
|
<div class="flex flex-auto items-center">
|
||||||
|
<ElButton @click="handleDownload"> 下载导入模板 </ElButton>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
</Modal>
|
||||||
|
</template>
|
||||||
|
|
@ -31,7 +31,9 @@ import { get${simpleClassName}List, delete${simpleClassName}, export${simpleClas
|
||||||
import { isEmpty } from '@vben/utils';
|
import { isEmpty } from '@vben/utils';
|
||||||
import { get${simpleClassName}Page, delete${simpleClassName},#if ($deleteBatchEnable) delete${simpleClassName}List,#end export${simpleClassName} } from '#/api/${table.moduleName}/${simpleClassName_strikeCase}';
|
import { get${simpleClassName}Page, delete${simpleClassName},#if ($deleteBatchEnable) delete${simpleClassName}List,#end export${simpleClassName} } from '#/api/${table.moduleName}/${simpleClassName_strikeCase}';
|
||||||
#end
|
#end
|
||||||
import { downloadFileFromBlobPart } from '@vben/utils';
|
#if ($importEnable)
|
||||||
|
import ${simpleClassName}Import from './modules/import-form.vue';
|
||||||
|
#end
|
||||||
|
|
||||||
#if ($table.templateType == 12 || $table.templateType == 11) ## 内嵌和erp情况
|
#if ($table.templateType == 12 || $table.templateType == 11) ## 内嵌和erp情况
|
||||||
/** 子表的列表 */
|
/** 子表的列表 */
|
||||||
|
|
@ -120,6 +122,17 @@ const [FormModal, formModalApi] = useVbenModal({
|
||||||
connectedComponent: ${simpleClassName}Form,
|
connectedComponent: ${simpleClassName}Form,
|
||||||
destroyOnClose: true,
|
destroyOnClose: true,
|
||||||
});
|
});
|
||||||
|
#if ($importEnable)
|
||||||
|
const [ImportFormModal, importFormModalApi] = useVbenModal({
|
||||||
|
connectedComponent: ${simpleClassName}Import,
|
||||||
|
destroyOnClose: true,
|
||||||
|
});
|
||||||
|
|
||||||
|
/** 导入${table.classComment} */
|
||||||
|
function handleImport() {
|
||||||
|
importFormModalApi.open();
|
||||||
|
}
|
||||||
|
#end
|
||||||
|
|
||||||
/** 创建${table.classComment} */
|
/** 创建${table.classComment} */
|
||||||
function handleCreate() {
|
function handleCreate() {
|
||||||
|
|
@ -189,6 +202,7 @@ try {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
#if (${table.templateType} == 2)
|
#if (${table.templateType} == 2)
|
||||||
/** 切换树形展开/收缩状态 */
|
/** 切换树形展开/收缩状态 */
|
||||||
const isExpanded = ref(true);
|
const isExpanded = ref(true);
|
||||||
|
|
@ -208,6 +222,9 @@ onMounted(() => {
|
||||||
<template>
|
<template>
|
||||||
<Page auto-content-height>
|
<Page auto-content-height>
|
||||||
<FormModal @success="getList" />
|
<FormModal @success="getList" />
|
||||||
|
#if ($importEnable)
|
||||||
|
<ImportFormModal @success="getList" />
|
||||||
|
#end
|
||||||
|
|
||||||
<ContentWrap v-if="!hiddenSearchBar">
|
<ContentWrap v-if="!hiddenSearchBar">
|
||||||
<!-- 搜索工作栏 -->
|
<!-- 搜索工作栏 -->
|
||||||
|
|
@ -316,6 +333,16 @@ onMounted(() => {
|
||||||
>
|
>
|
||||||
{{ $t('ui.actionTitle.create', ['${table.classComment}']) }}
|
{{ $t('ui.actionTitle.create', ['${table.classComment}']) }}
|
||||||
</el-button>
|
</el-button>
|
||||||
|
#if ($importEnable)
|
||||||
|
<el-button
|
||||||
|
class="ml-2"
|
||||||
|
type="primary"
|
||||||
|
@click="handleImport"
|
||||||
|
v-access:code="['${permissionPrefix}:import']"
|
||||||
|
>
|
||||||
|
导入
|
||||||
|
</el-button>
|
||||||
|
#end
|
||||||
<el-button
|
<el-button
|
||||||
:icon="h(Download)"
|
:icon="h(Download)"
|
||||||
type="primary"
|
type="primary"
|
||||||
|
|
|
||||||
|
|
@ -113,6 +113,18 @@ export function delete${simpleClassName}List(ids: number[]) {
|
||||||
export function export${simpleClassName}(params: any) {
|
export function export${simpleClassName}(params: any) {
|
||||||
return requestClient.download('${baseURL}/export-excel', { params });
|
return requestClient.download('${baseURL}/export-excel', { params });
|
||||||
}
|
}
|
||||||
|
#if ($importEnable)
|
||||||
|
|
||||||
|
/** 下载${table.classComment}导入模板 */
|
||||||
|
export function import${simpleClassName}Template() {
|
||||||
|
return requestClient.download('${baseURL}/get-import-template');
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 导入${table.classComment} */
|
||||||
|
export function import${simpleClassName}(file: File) {
|
||||||
|
return requestClient.upload('${baseURL}/import', { file });
|
||||||
|
}
|
||||||
|
#end
|
||||||
|
|
||||||
## 特殊:主子表专属逻辑
|
## 特殊:主子表专属逻辑
|
||||||
#foreach ($subTable in $subTables)
|
#foreach ($subTable in $subTables)
|
||||||
|
|
|
||||||
|
|
@ -137,6 +137,21 @@ export function useFormSchema(): VbenFormSchema[] {
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#if ($importEnable)
|
||||||
|
/** 导入的表单 */
|
||||||
|
export function useImportFormSchema(): VbenFormSchema[] {
|
||||||
|
return [
|
||||||
|
{
|
||||||
|
fieldName: 'file',
|
||||||
|
label: '${table.classComment}数据',
|
||||||
|
component: 'Upload',
|
||||||
|
rules: 'required',
|
||||||
|
help: '仅允许导入 xls、xlsx 格式文件',
|
||||||
|
},
|
||||||
|
];
|
||||||
|
}
|
||||||
|
|
||||||
|
#end
|
||||||
/** 列表的搜索表单 */
|
/** 列表的搜索表单 */
|
||||||
export function useGridFormSchema(): VbenFormSchema[] {
|
export function useGridFormSchema(): VbenFormSchema[] {
|
||||||
return [
|
return [
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,82 @@
|
||||||
|
<script lang="ts" setup>
|
||||||
|
import { useVbenModal } from '@vben/common-ui';
|
||||||
|
import { downloadFileFromBlobPart } from '@vben/utils';
|
||||||
|
|
||||||
|
import { ElButton, ElMessage, ElUpload } from 'element-plus';
|
||||||
|
|
||||||
|
import { useVbenForm } from '#/adapter/form';
|
||||||
|
import { import${simpleClassName}, import${simpleClassName}Template } from '#/api/${table.moduleName}/${table.businessName}';
|
||||||
|
import { $t } from '#/locales';
|
||||||
|
|
||||||
|
import { useImportFormSchema } from '../data';
|
||||||
|
|
||||||
|
const emit = defineEmits(['success']);
|
||||||
|
|
||||||
|
const [Form, formApi] = useVbenForm({
|
||||||
|
commonConfig: {
|
||||||
|
formItemClass: 'col-span-2',
|
||||||
|
labelWidth: 120,
|
||||||
|
},
|
||||||
|
layout: 'horizontal',
|
||||||
|
schema: useImportFormSchema(),
|
||||||
|
showDefaultActions: false,
|
||||||
|
});
|
||||||
|
|
||||||
|
const [Modal, modalApi] = useVbenModal({
|
||||||
|
async onConfirm() {
|
||||||
|
const { valid } = await formApi.validate();
|
||||||
|
if (!valid) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
modalApi.lock();
|
||||||
|
// 提交表单
|
||||||
|
const data = await formApi.getValues();
|
||||||
|
try {
|
||||||
|
await import${simpleClassName}(data.file);
|
||||||
|
// 关闭并提示
|
||||||
|
await modalApi.close();
|
||||||
|
emit('success');
|
||||||
|
ElMessage.success($t('ui.actionMessage.operationSuccess'));
|
||||||
|
} finally {
|
||||||
|
modalApi.unlock();
|
||||||
|
}
|
||||||
|
},
|
||||||
|
});
|
||||||
|
|
||||||
|
/** 文件改变时 */
|
||||||
|
function handleChange(file: any) {
|
||||||
|
if (file.raw) {
|
||||||
|
formApi.setFieldValue('file', file.raw);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 下载模板 */
|
||||||
|
async function handleDownload() {
|
||||||
|
const data = await import${simpleClassName}Template();
|
||||||
|
downloadFileFromBlobPart({ fileName: '${table.classComment}导入模板.xls', source: data });
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<template>
|
||||||
|
<Modal title="导入${table.classComment}" class="w-1/3">
|
||||||
|
<Form class="mx-4">
|
||||||
|
<template #file>
|
||||||
|
<div class="w-full">
|
||||||
|
<ElUpload
|
||||||
|
:limit="1"
|
||||||
|
accept=".xls,.xlsx"
|
||||||
|
:on-change="handleChange"
|
||||||
|
:auto-upload="false"
|
||||||
|
>
|
||||||
|
<ElButton type="primary"> 选择 Excel 文件 </ElButton>
|
||||||
|
</ElUpload>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
</Form>
|
||||||
|
<template #prepend-footer>
|
||||||
|
<div class="flex flex-auto items-center">
|
||||||
|
<ElButton @click="handleDownload"> 下载导入模板 </ElButton>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
</Modal>
|
||||||
|
</template>
|
||||||
|
|
@ -26,6 +26,9 @@ import {
|
||||||
get${simpleClassName}Page,
|
get${simpleClassName}Page,
|
||||||
} from '#/api/${table.moduleName}/${table.businessName}';
|
} from '#/api/${table.moduleName}/${table.businessName}';
|
||||||
#end
|
#end
|
||||||
|
#if ($importEnable)
|
||||||
|
import ${simpleClassName}Import from './modules/import-form.vue';
|
||||||
|
#end
|
||||||
import { $t } from '#/locales';
|
import { $t } from '#/locales';
|
||||||
|
|
||||||
import { useGridColumns, useGridFormSchema } from './data';
|
import { useGridColumns, useGridFormSchema } from './data';
|
||||||
|
|
@ -50,6 +53,17 @@ const [FormModal, formModalApi] = useVbenModal({
|
||||||
connectedComponent: Form,
|
connectedComponent: Form,
|
||||||
destroyOnClose: true,
|
destroyOnClose: true,
|
||||||
});
|
});
|
||||||
|
#if ($importEnable)
|
||||||
|
const [ImportFormModal, importFormModalApi] = useVbenModal({
|
||||||
|
connectedComponent: ${simpleClassName}Import,
|
||||||
|
destroyOnClose: true,
|
||||||
|
});
|
||||||
|
|
||||||
|
/** 导入${table.classComment} */
|
||||||
|
function handleImport() {
|
||||||
|
importFormModalApi.open();
|
||||||
|
}
|
||||||
|
#end
|
||||||
#if (${table.templateType} == 2)## 树表特有:控制表格展开收缩
|
#if (${table.templateType} == 2)## 树表特有:控制表格展开收缩
|
||||||
|
|
||||||
/** 切换树形展开/收缩状态 */
|
/** 切换树形展开/收缩状态 */
|
||||||
|
|
@ -133,6 +147,7 @@ async function handleExport() {
|
||||||
downloadFileFromBlobPart({ fileName: '${table.classComment}.xls', source: data });
|
downloadFileFromBlobPart({ fileName: '${table.classComment}.xls', source: data });
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
const [Grid, gridApi] = useVbenVxeGrid({
|
const [Grid, gridApi] = useVbenVxeGrid({
|
||||||
formOptions: {
|
formOptions: {
|
||||||
schema: useGridFormSchema(),
|
schema: useGridFormSchema(),
|
||||||
|
|
@ -208,6 +223,9 @@ const [Grid, gridApi] = useVbenVxeGrid({
|
||||||
<template>
|
<template>
|
||||||
<Page auto-content-height>
|
<Page auto-content-height>
|
||||||
<FormModal @success="handleRefresh" />
|
<FormModal @success="handleRefresh" />
|
||||||
|
#if ($importEnable)
|
||||||
|
<ImportFormModal @success="handleRefresh" />
|
||||||
|
#end
|
||||||
#if ($table.templateType == 11) ## erp情况
|
#if ($table.templateType == 11) ## erp情况
|
||||||
<div>
|
<div>
|
||||||
#end
|
#end
|
||||||
|
|
@ -245,6 +263,14 @@ const [Grid, gridApi] = useVbenVxeGrid({
|
||||||
onClick: handleExpand,
|
onClick: handleExpand,
|
||||||
},
|
},
|
||||||
#end
|
#end
|
||||||
|
#if ($importEnable)
|
||||||
|
{
|
||||||
|
label: '导入',
|
||||||
|
type: 'primary',
|
||||||
|
auth: ['${table.moduleName}:${simpleClassName_strikeCase}:import'],
|
||||||
|
onClick: handleImport,
|
||||||
|
},
|
||||||
|
#end
|
||||||
{
|
{
|
||||||
label: $t('ui.actionTitle.export'),
|
label: $t('ui.actionTitle.export'),
|
||||||
type: 'primary',
|
type: 'primary',
|
||||||
|
|
@ -317,4 +343,4 @@ const [Grid, gridApi] = useVbenVxeGrid({
|
||||||
</div>
|
</div>
|
||||||
#end
|
#end
|
||||||
</Page>
|
</Page>
|
||||||
</template>
|
</template>
|
||||||
|
|
|
||||||
|
|
@ -84,4 +84,19 @@ public class CodegenBuilderTest extends BaseMockitoUnitTest {
|
||||||
assertEquals("input", column.getHtmlType());
|
assertEquals("input", column.getHtmlType());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
public void testSanitizeComment() {
|
||||||
|
// 1. null / 空字符串:原样返回
|
||||||
|
assertNull(codegenBuilder.sanitizeComment(null));
|
||||||
|
assertEquals("", codegenBuilder.sanitizeComment(""));
|
||||||
|
// 2. 无英文引号:原样返回
|
||||||
|
assertEquals("无引号注释", codegenBuilder.sanitizeComment("无引号注释"));
|
||||||
|
// 3. 含英文双引号:替换为中文左双引号
|
||||||
|
assertEquals("含“双“引号", codegenBuilder.sanitizeComment("含\"双\"引号"));
|
||||||
|
// 4. 含英文单引号:替换为中文左单引号
|
||||||
|
assertEquals("含‘单‘引号", codegenBuilder.sanitizeComment("含'单'引号"));
|
||||||
|
// 5. 双 / 单引号混合
|
||||||
|
assertEquals("“混‘搭“‘", codegenBuilder.sanitizeComment("\"混'搭\"'"));
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -10,6 +10,7 @@ import cn.iocoder.yudao.framework.common.util.json.JsonUtils;
|
||||||
import cn.iocoder.yudao.framework.test.core.ut.BaseMockitoUnitTest;
|
import cn.iocoder.yudao.framework.test.core.ut.BaseMockitoUnitTest;
|
||||||
import cn.iocoder.yudao.module.infra.dal.dataobject.codegen.CodegenColumnDO;
|
import cn.iocoder.yudao.module.infra.dal.dataobject.codegen.CodegenColumnDO;
|
||||||
import cn.iocoder.yudao.module.infra.dal.dataobject.codegen.CodegenTableDO;
|
import cn.iocoder.yudao.module.infra.dal.dataobject.codegen.CodegenTableDO;
|
||||||
|
import cn.iocoder.yudao.module.infra.enums.codegen.CodegenVOTypeEnum;
|
||||||
import cn.iocoder.yudao.module.infra.framework.codegen.config.CodegenProperties;
|
import cn.iocoder.yudao.module.infra.framework.codegen.config.CodegenProperties;
|
||||||
import org.junit.jupiter.api.BeforeEach;
|
import org.junit.jupiter.api.BeforeEach;
|
||||||
import org.mockito.InjectMocks;
|
import org.mockito.InjectMocks;
|
||||||
|
|
@ -19,8 +20,10 @@ import java.io.ByteArrayInputStream;
|
||||||
import java.io.ByteArrayOutputStream;
|
import java.io.ByteArrayOutputStream;
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.HashMap;
|
import java.util.HashMap;
|
||||||
|
import java.util.LinkedHashSet;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
|
import java.util.Set;
|
||||||
|
|
||||||
import static org.junit.jupiter.api.Assertions.assertEquals;
|
import static org.junit.jupiter.api.Assertions.assertEquals;
|
||||||
|
|
||||||
|
|
@ -41,16 +44,18 @@ public abstract class CodegenEngineAbstractTest extends BaseMockitoUnitTest {
|
||||||
|
|
||||||
@Spy
|
@Spy
|
||||||
protected CodegenProperties codegenProperties = new CodegenProperties()
|
protected CodegenProperties codegenProperties = new CodegenProperties()
|
||||||
.setBasePackage("cn.iocoder.yudao");
|
.setBasePackage("cn.iocoder.yudao")
|
||||||
|
.setVoType(CodegenVOTypeEnum.VO.getType())
|
||||||
|
.setDeleteBatchEnable(true)
|
||||||
|
.setUnitTestEnable(true)
|
||||||
|
.setImportEnable(false);
|
||||||
|
|
||||||
@BeforeEach
|
@BeforeEach
|
||||||
public void setUp() {
|
public void setUp() {
|
||||||
codegenEngine.setJakartaEnable(true); // 强制使用 jakarta,保证单测可以基于 jakarta 断言
|
codegenEngine.setJakartaEnable(true); // 强制使用 jakarta,保证单测可以基于 jakarta 断言
|
||||||
codegenEngine.initGlobalBindingMap();
|
codegenEngine.initGlobalBindingMap();
|
||||||
// 单测强制使用
|
// 获取测试文件 resources 路径,writeResult 调试用
|
||||||
// 获取测试文件 resources 路径
|
|
||||||
String absolutePath = FileUtil.getAbsolutePath("application-unit-test.yaml");
|
String absolutePath = FileUtil.getAbsolutePath("application-unit-test.yaml");
|
||||||
// 系统不一样生成的文件也有差异,那就各自生成各自的
|
|
||||||
resourcesPath = absolutePath.split("/target")[0] + "/src/test/resources/codegen/";
|
resourcesPath = absolutePath.split("/target")[0] + "/src/test/resources/codegen/";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -82,17 +87,32 @@ public abstract class CodegenEngineAbstractTest extends BaseMockitoUnitTest {
|
||||||
return list;
|
return list;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 重新生成断言数据的开关,命令行加 {@code -Dcodegen.regenerate=true} 启用
|
||||||
|
*/
|
||||||
|
private static final boolean REGENERATE = Boolean.parseBoolean(System.getProperty("codegen.regenerate", "false"));
|
||||||
|
|
||||||
@SuppressWarnings("rawtypes")
|
@SuppressWarnings("rawtypes")
|
||||||
protected static void assertResult(Map<String, String> result, String path) {
|
protected void assertResult(Map<String, String> result, String path) {
|
||||||
|
if (REGENERATE) {
|
||||||
|
writeResult(result, resourcesPath + path);
|
||||||
|
return;
|
||||||
|
}
|
||||||
String assertContent = ResourceUtil.readUtf8Str("codegen/" + path + "/assert.json");
|
String assertContent = ResourceUtil.readUtf8Str("codegen/" + path + "/assert.json");
|
||||||
List<HashMap> asserts = JsonUtils.parseArray(assertContent, HashMap.class);
|
List<HashMap> asserts = JsonUtils.parseArray(assertContent, HashMap.class);
|
||||||
assertEquals(asserts.size(), result.size());
|
Set<String> expectedFiles = asserts.stream()
|
||||||
// 校验每个文件
|
.map(m -> (String) m.get("filePath"))
|
||||||
|
.collect(java.util.stream.Collectors.toCollection(LinkedHashSet::new));
|
||||||
|
assertEquals(expectedFiles, result.keySet(), "生成文件集合不匹配");
|
||||||
|
// 校验每个文件;归一化 \r\n 为 \n,让断言不依赖文件落盘的换行风格
|
||||||
asserts.forEach(assertMap -> {
|
asserts.forEach(assertMap -> {
|
||||||
String contentPath = (String) assertMap.get("contentPath");
|
String contentPath = (String) assertMap.get("contentPath");
|
||||||
String filePath = (String) assertMap.get("filePath");
|
String filePath = (String) assertMap.get("filePath");
|
||||||
String content = ResourceUtil.readUtf8Str("codegen/" + path + "/" + contentPath);
|
String expected = ResourceUtil.readUtf8Str("codegen/" + path + "/" + contentPath)
|
||||||
assertEquals(content, result.get(filePath), filePath + ":不匹配");
|
.replace("\r\n", "\n");
|
||||||
|
String actual = result.get(filePath);
|
||||||
|
assertEquals(expected, actual == null ? null : actual.replace("\r\n", "\n"),
|
||||||
|
filePath + ":不匹配");
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,109 @@
|
||||||
|
package cn.iocoder.yudao.module.infra.service.codegen.inner;
|
||||||
|
|
||||||
|
import cn.iocoder.yudao.module.infra.dal.dataobject.codegen.CodegenColumnDO;
|
||||||
|
import cn.iocoder.yudao.module.infra.dal.dataobject.codegen.CodegenTableDO;
|
||||||
|
import cn.iocoder.yudao.module.infra.enums.codegen.CodegenFrontTypeEnum;
|
||||||
|
import cn.iocoder.yudao.module.infra.enums.codegen.CodegenTemplateTypeEnum;
|
||||||
|
import com.baomidou.mybatisplus.annotation.DbType;
|
||||||
|
import org.junit.jupiter.api.Test;
|
||||||
|
|
||||||
|
import java.util.Arrays;
|
||||||
|
import java.util.List;
|
||||||
|
import java.util.Map;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* {@link CodegenEngine} 的 Vue3 + Vben5 + AntD + General 单元测试
|
||||||
|
*
|
||||||
|
* @author 芋道源码
|
||||||
|
*/
|
||||||
|
public class CodegenEngineVben5AntdGeneralTest extends CodegenEngineAbstractTest {
|
||||||
|
|
||||||
|
private static final Integer FRONT_TYPE = CodegenFrontTypeEnum.VUE3_VBEN5_ANTD_GENERAL.getType();
|
||||||
|
|
||||||
|
@Test
|
||||||
|
public void testExecute_one() {
|
||||||
|
// 准备参数
|
||||||
|
CodegenTableDO table = getTable("student")
|
||||||
|
.setFrontType(FRONT_TYPE)
|
||||||
|
.setTemplateType(CodegenTemplateTypeEnum.ONE.getType());
|
||||||
|
List<CodegenColumnDO> columns = getColumnList("student");
|
||||||
|
|
||||||
|
// 调用
|
||||||
|
Map<String, String> result = codegenEngine.execute(DbType.MYSQL, table, columns, null, null);
|
||||||
|
// 断言
|
||||||
|
assertResult(result, "/vben5_antd_general_one");
|
||||||
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
public void testExecute_one_importEnable() {
|
||||||
|
// 开启 import 开关
|
||||||
|
codegenProperties.setImportEnable(true);
|
||||||
|
codegenEngine.initGlobalBindingMap();
|
||||||
|
// 准备参数
|
||||||
|
CodegenTableDO table = getTable("student")
|
||||||
|
.setFrontType(FRONT_TYPE)
|
||||||
|
.setTemplateType(CodegenTemplateTypeEnum.ONE.getType());
|
||||||
|
List<CodegenColumnDO> columns = getColumnList("student");
|
||||||
|
|
||||||
|
// 调用
|
||||||
|
Map<String, String> result = codegenEngine.execute(DbType.MYSQL, table, columns, null, null);
|
||||||
|
// 断言
|
||||||
|
assertResult(result, "/vben5_antd_general_one_importEnable");
|
||||||
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
public void testExecute_tree() {
|
||||||
|
// 准备参数
|
||||||
|
CodegenTableDO table = getTable("category")
|
||||||
|
.setFrontType(FRONT_TYPE)
|
||||||
|
.setTemplateType(CodegenTemplateTypeEnum.TREE.getType());
|
||||||
|
List<CodegenColumnDO> columns = getColumnList("category");
|
||||||
|
|
||||||
|
// 调用
|
||||||
|
Map<String, String> result = codegenEngine.execute(DbType.MYSQL, table, columns, null, null);
|
||||||
|
// 断言
|
||||||
|
assertResult(result, "/vben5_antd_general_tree");
|
||||||
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
public void testExecute_master_normal() {
|
||||||
|
testExecute_master(CodegenTemplateTypeEnum.MASTER_NORMAL, "/vben5_antd_general_master_normal");
|
||||||
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
public void testExecute_master_erp() {
|
||||||
|
testExecute_master(CodegenTemplateTypeEnum.MASTER_ERP, "/vben5_antd_general_master_erp");
|
||||||
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
public void testExecute_master_inner() {
|
||||||
|
testExecute_master(CodegenTemplateTypeEnum.MASTER_INNER, "/vben5_antd_general_master_inner");
|
||||||
|
}
|
||||||
|
|
||||||
|
private void testExecute_master(CodegenTemplateTypeEnum templateType, String path) {
|
||||||
|
// 准备参数
|
||||||
|
CodegenTableDO table = getTable("student")
|
||||||
|
.setFrontType(FRONT_TYPE)
|
||||||
|
.setTemplateType(templateType.getType());
|
||||||
|
List<CodegenColumnDO> columns = getColumnList("student");
|
||||||
|
// 准备参数(子表)
|
||||||
|
CodegenTableDO contactTable = getTable("contact")
|
||||||
|
.setTemplateType(CodegenTemplateTypeEnum.SUB.getType())
|
||||||
|
.setFrontType(FRONT_TYPE)
|
||||||
|
.setSubJoinColumnId(100L).setSubJoinMany(true);
|
||||||
|
List<CodegenColumnDO> contactColumns = getColumnList("contact");
|
||||||
|
// 准备参数(班主任)
|
||||||
|
CodegenTableDO teacherTable = getTable("teacher")
|
||||||
|
.setTemplateType(CodegenTemplateTypeEnum.SUB.getType())
|
||||||
|
.setFrontType(FRONT_TYPE)
|
||||||
|
.setSubJoinColumnId(200L).setSubJoinMany(false);
|
||||||
|
List<CodegenColumnDO> teacherColumns = getColumnList("teacher");
|
||||||
|
|
||||||
|
// 调用
|
||||||
|
Map<String, String> result = codegenEngine.execute(DbType.MYSQL, table, columns,
|
||||||
|
Arrays.asList(contactTable, teacherTable), Arrays.asList(contactColumns, teacherColumns));
|
||||||
|
// 断言
|
||||||
|
assertResult(result, path);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,109 @@
|
||||||
|
package cn.iocoder.yudao.module.infra.service.codegen.inner;
|
||||||
|
|
||||||
|
import cn.iocoder.yudao.module.infra.dal.dataobject.codegen.CodegenColumnDO;
|
||||||
|
import cn.iocoder.yudao.module.infra.dal.dataobject.codegen.CodegenTableDO;
|
||||||
|
import cn.iocoder.yudao.module.infra.enums.codegen.CodegenFrontTypeEnum;
|
||||||
|
import cn.iocoder.yudao.module.infra.enums.codegen.CodegenTemplateTypeEnum;
|
||||||
|
import com.baomidou.mybatisplus.annotation.DbType;
|
||||||
|
import org.junit.jupiter.api.Test;
|
||||||
|
|
||||||
|
import java.util.Arrays;
|
||||||
|
import java.util.List;
|
||||||
|
import java.util.Map;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* {@link CodegenEngine} 的 Vue3 + Vben5 + AntD + Schema 单元测试
|
||||||
|
*
|
||||||
|
* @author 芋道源码
|
||||||
|
*/
|
||||||
|
public class CodegenEngineVben5AntdSchemaTest extends CodegenEngineAbstractTest {
|
||||||
|
|
||||||
|
private static final Integer FRONT_TYPE = CodegenFrontTypeEnum.VUE3_VBEN5_ANTD_SCHEMA.getType();
|
||||||
|
|
||||||
|
@Test
|
||||||
|
public void testExecute_one() {
|
||||||
|
// 准备参数
|
||||||
|
CodegenTableDO table = getTable("student")
|
||||||
|
.setFrontType(FRONT_TYPE)
|
||||||
|
.setTemplateType(CodegenTemplateTypeEnum.ONE.getType());
|
||||||
|
List<CodegenColumnDO> columns = getColumnList("student");
|
||||||
|
|
||||||
|
// 调用
|
||||||
|
Map<String, String> result = codegenEngine.execute(DbType.MYSQL, table, columns, null, null);
|
||||||
|
// 断言
|
||||||
|
assertResult(result, "/vben5_antd_schema_one");
|
||||||
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
public void testExecute_one_importEnable() {
|
||||||
|
// 开启 import 开关
|
||||||
|
codegenProperties.setImportEnable(true);
|
||||||
|
codegenEngine.initGlobalBindingMap();
|
||||||
|
// 准备参数
|
||||||
|
CodegenTableDO table = getTable("student")
|
||||||
|
.setFrontType(FRONT_TYPE)
|
||||||
|
.setTemplateType(CodegenTemplateTypeEnum.ONE.getType());
|
||||||
|
List<CodegenColumnDO> columns = getColumnList("student");
|
||||||
|
|
||||||
|
// 调用
|
||||||
|
Map<String, String> result = codegenEngine.execute(DbType.MYSQL, table, columns, null, null);
|
||||||
|
// 断言
|
||||||
|
assertResult(result, "/vben5_antd_schema_one_importEnable");
|
||||||
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
public void testExecute_tree() {
|
||||||
|
// 准备参数
|
||||||
|
CodegenTableDO table = getTable("category")
|
||||||
|
.setFrontType(FRONT_TYPE)
|
||||||
|
.setTemplateType(CodegenTemplateTypeEnum.TREE.getType());
|
||||||
|
List<CodegenColumnDO> columns = getColumnList("category");
|
||||||
|
|
||||||
|
// 调用
|
||||||
|
Map<String, String> result = codegenEngine.execute(DbType.MYSQL, table, columns, null, null);
|
||||||
|
// 断言
|
||||||
|
assertResult(result, "/vben5_antd_schema_tree");
|
||||||
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
public void testExecute_master_normal() {
|
||||||
|
testExecute_master(CodegenTemplateTypeEnum.MASTER_NORMAL, "/vben5_antd_schema_master_normal");
|
||||||
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
public void testExecute_master_erp() {
|
||||||
|
testExecute_master(CodegenTemplateTypeEnum.MASTER_ERP, "/vben5_antd_schema_master_erp");
|
||||||
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
public void testExecute_master_inner() {
|
||||||
|
testExecute_master(CodegenTemplateTypeEnum.MASTER_INNER, "/vben5_antd_schema_master_inner");
|
||||||
|
}
|
||||||
|
|
||||||
|
private void testExecute_master(CodegenTemplateTypeEnum templateType, String path) {
|
||||||
|
// 准备参数
|
||||||
|
CodegenTableDO table = getTable("student")
|
||||||
|
.setFrontType(FRONT_TYPE)
|
||||||
|
.setTemplateType(templateType.getType());
|
||||||
|
List<CodegenColumnDO> columns = getColumnList("student");
|
||||||
|
// 准备参数(子表)
|
||||||
|
CodegenTableDO contactTable = getTable("contact")
|
||||||
|
.setTemplateType(CodegenTemplateTypeEnum.SUB.getType())
|
||||||
|
.setFrontType(FRONT_TYPE)
|
||||||
|
.setSubJoinColumnId(100L).setSubJoinMany(true);
|
||||||
|
List<CodegenColumnDO> contactColumns = getColumnList("contact");
|
||||||
|
// 准备参数(班主任)
|
||||||
|
CodegenTableDO teacherTable = getTable("teacher")
|
||||||
|
.setTemplateType(CodegenTemplateTypeEnum.SUB.getType())
|
||||||
|
.setFrontType(FRONT_TYPE)
|
||||||
|
.setSubJoinColumnId(200L).setSubJoinMany(false);
|
||||||
|
List<CodegenColumnDO> teacherColumns = getColumnList("teacher");
|
||||||
|
|
||||||
|
// 调用
|
||||||
|
Map<String, String> result = codegenEngine.execute(DbType.MYSQL, table, columns,
|
||||||
|
Arrays.asList(contactTable, teacherTable), Arrays.asList(contactColumns, teacherColumns));
|
||||||
|
// 断言
|
||||||
|
assertResult(result, path);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,109 @@
|
||||||
|
package cn.iocoder.yudao.module.infra.service.codegen.inner;
|
||||||
|
|
||||||
|
import cn.iocoder.yudao.module.infra.dal.dataobject.codegen.CodegenColumnDO;
|
||||||
|
import cn.iocoder.yudao.module.infra.dal.dataobject.codegen.CodegenTableDO;
|
||||||
|
import cn.iocoder.yudao.module.infra.enums.codegen.CodegenFrontTypeEnum;
|
||||||
|
import cn.iocoder.yudao.module.infra.enums.codegen.CodegenTemplateTypeEnum;
|
||||||
|
import com.baomidou.mybatisplus.annotation.DbType;
|
||||||
|
import org.junit.jupiter.api.Test;
|
||||||
|
|
||||||
|
import java.util.Arrays;
|
||||||
|
import java.util.List;
|
||||||
|
import java.util.Map;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* {@link CodegenEngine} 的 Vue3 + Vben5 + Element Plus + General 单元测试
|
||||||
|
*
|
||||||
|
* @author 芋道源码
|
||||||
|
*/
|
||||||
|
public class CodegenEngineVben5EleGeneralTest extends CodegenEngineAbstractTest {
|
||||||
|
|
||||||
|
private static final Integer FRONT_TYPE = CodegenFrontTypeEnum.VUE3_VBEN5_EP_GENERAL.getType();
|
||||||
|
|
||||||
|
@Test
|
||||||
|
public void testExecute_one() {
|
||||||
|
// 准备参数
|
||||||
|
CodegenTableDO table = getTable("student")
|
||||||
|
.setFrontType(FRONT_TYPE)
|
||||||
|
.setTemplateType(CodegenTemplateTypeEnum.ONE.getType());
|
||||||
|
List<CodegenColumnDO> columns = getColumnList("student");
|
||||||
|
|
||||||
|
// 调用
|
||||||
|
Map<String, String> result = codegenEngine.execute(DbType.MYSQL, table, columns, null, null);
|
||||||
|
// 断言
|
||||||
|
assertResult(result, "/vben5_ele_general_one");
|
||||||
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
public void testExecute_one_importEnable() {
|
||||||
|
// 开启 import 开关
|
||||||
|
codegenProperties.setImportEnable(true);
|
||||||
|
codegenEngine.initGlobalBindingMap();
|
||||||
|
// 准备参数
|
||||||
|
CodegenTableDO table = getTable("student")
|
||||||
|
.setFrontType(FRONT_TYPE)
|
||||||
|
.setTemplateType(CodegenTemplateTypeEnum.ONE.getType());
|
||||||
|
List<CodegenColumnDO> columns = getColumnList("student");
|
||||||
|
|
||||||
|
// 调用
|
||||||
|
Map<String, String> result = codegenEngine.execute(DbType.MYSQL, table, columns, null, null);
|
||||||
|
// 断言
|
||||||
|
assertResult(result, "/vben5_ele_general_one_importEnable");
|
||||||
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
public void testExecute_tree() {
|
||||||
|
// 准备参数
|
||||||
|
CodegenTableDO table = getTable("category")
|
||||||
|
.setFrontType(FRONT_TYPE)
|
||||||
|
.setTemplateType(CodegenTemplateTypeEnum.TREE.getType());
|
||||||
|
List<CodegenColumnDO> columns = getColumnList("category");
|
||||||
|
|
||||||
|
// 调用
|
||||||
|
Map<String, String> result = codegenEngine.execute(DbType.MYSQL, table, columns, null, null);
|
||||||
|
// 断言
|
||||||
|
assertResult(result, "/vben5_ele_general_tree");
|
||||||
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
public void testExecute_master_normal() {
|
||||||
|
testExecute_master(CodegenTemplateTypeEnum.MASTER_NORMAL, "/vben5_ele_general_master_normal");
|
||||||
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
public void testExecute_master_erp() {
|
||||||
|
testExecute_master(CodegenTemplateTypeEnum.MASTER_ERP, "/vben5_ele_general_master_erp");
|
||||||
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
public void testExecute_master_inner() {
|
||||||
|
testExecute_master(CodegenTemplateTypeEnum.MASTER_INNER, "/vben5_ele_general_master_inner");
|
||||||
|
}
|
||||||
|
|
||||||
|
private void testExecute_master(CodegenTemplateTypeEnum templateType, String path) {
|
||||||
|
// 准备参数
|
||||||
|
CodegenTableDO table = getTable("student")
|
||||||
|
.setFrontType(FRONT_TYPE)
|
||||||
|
.setTemplateType(templateType.getType());
|
||||||
|
List<CodegenColumnDO> columns = getColumnList("student");
|
||||||
|
// 准备参数(子表)
|
||||||
|
CodegenTableDO contactTable = getTable("contact")
|
||||||
|
.setTemplateType(CodegenTemplateTypeEnum.SUB.getType())
|
||||||
|
.setFrontType(FRONT_TYPE)
|
||||||
|
.setSubJoinColumnId(100L).setSubJoinMany(true);
|
||||||
|
List<CodegenColumnDO> contactColumns = getColumnList("contact");
|
||||||
|
// 准备参数(班主任)
|
||||||
|
CodegenTableDO teacherTable = getTable("teacher")
|
||||||
|
.setTemplateType(CodegenTemplateTypeEnum.SUB.getType())
|
||||||
|
.setFrontType(FRONT_TYPE)
|
||||||
|
.setSubJoinColumnId(200L).setSubJoinMany(false);
|
||||||
|
List<CodegenColumnDO> teacherColumns = getColumnList("teacher");
|
||||||
|
|
||||||
|
// 调用
|
||||||
|
Map<String, String> result = codegenEngine.execute(DbType.MYSQL, table, columns,
|
||||||
|
Arrays.asList(contactTable, teacherTable), Arrays.asList(contactColumns, teacherColumns));
|
||||||
|
// 断言
|
||||||
|
assertResult(result, path);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,109 @@
|
||||||
|
package cn.iocoder.yudao.module.infra.service.codegen.inner;
|
||||||
|
|
||||||
|
import cn.iocoder.yudao.module.infra.dal.dataobject.codegen.CodegenColumnDO;
|
||||||
|
import cn.iocoder.yudao.module.infra.dal.dataobject.codegen.CodegenTableDO;
|
||||||
|
import cn.iocoder.yudao.module.infra.enums.codegen.CodegenFrontTypeEnum;
|
||||||
|
import cn.iocoder.yudao.module.infra.enums.codegen.CodegenTemplateTypeEnum;
|
||||||
|
import com.baomidou.mybatisplus.annotation.DbType;
|
||||||
|
import org.junit.jupiter.api.Test;
|
||||||
|
|
||||||
|
import java.util.Arrays;
|
||||||
|
import java.util.List;
|
||||||
|
import java.util.Map;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* {@link CodegenEngine} 的 Vue3 + Vben5 + Element Plus + Schema 单元测试
|
||||||
|
*
|
||||||
|
* @author 芋道源码
|
||||||
|
*/
|
||||||
|
public class CodegenEngineVben5EleSchemaTest extends CodegenEngineAbstractTest {
|
||||||
|
|
||||||
|
private static final Integer FRONT_TYPE = CodegenFrontTypeEnum.VUE3_VBEN5_EP_SCHEMA.getType();
|
||||||
|
|
||||||
|
@Test
|
||||||
|
public void testExecute_one() {
|
||||||
|
// 准备参数
|
||||||
|
CodegenTableDO table = getTable("student")
|
||||||
|
.setFrontType(FRONT_TYPE)
|
||||||
|
.setTemplateType(CodegenTemplateTypeEnum.ONE.getType());
|
||||||
|
List<CodegenColumnDO> columns = getColumnList("student");
|
||||||
|
|
||||||
|
// 调用
|
||||||
|
Map<String, String> result = codegenEngine.execute(DbType.MYSQL, table, columns, null, null);
|
||||||
|
// 断言
|
||||||
|
assertResult(result, "/vben5_ele_schema_one");
|
||||||
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
public void testExecute_one_importEnable() {
|
||||||
|
// 开启 import 开关
|
||||||
|
codegenProperties.setImportEnable(true);
|
||||||
|
codegenEngine.initGlobalBindingMap();
|
||||||
|
// 准备参数
|
||||||
|
CodegenTableDO table = getTable("student")
|
||||||
|
.setFrontType(FRONT_TYPE)
|
||||||
|
.setTemplateType(CodegenTemplateTypeEnum.ONE.getType());
|
||||||
|
List<CodegenColumnDO> columns = getColumnList("student");
|
||||||
|
|
||||||
|
// 调用
|
||||||
|
Map<String, String> result = codegenEngine.execute(DbType.MYSQL, table, columns, null, null);
|
||||||
|
// 断言
|
||||||
|
assertResult(result, "/vben5_ele_schema_one_importEnable");
|
||||||
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
public void testExecute_tree() {
|
||||||
|
// 准备参数
|
||||||
|
CodegenTableDO table = getTable("category")
|
||||||
|
.setFrontType(FRONT_TYPE)
|
||||||
|
.setTemplateType(CodegenTemplateTypeEnum.TREE.getType());
|
||||||
|
List<CodegenColumnDO> columns = getColumnList("category");
|
||||||
|
|
||||||
|
// 调用
|
||||||
|
Map<String, String> result = codegenEngine.execute(DbType.MYSQL, table, columns, null, null);
|
||||||
|
// 断言
|
||||||
|
assertResult(result, "/vben5_ele_schema_tree");
|
||||||
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
public void testExecute_master_normal() {
|
||||||
|
testExecute_master(CodegenTemplateTypeEnum.MASTER_NORMAL, "/vben5_ele_schema_master_normal");
|
||||||
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
public void testExecute_master_erp() {
|
||||||
|
testExecute_master(CodegenTemplateTypeEnum.MASTER_ERP, "/vben5_ele_schema_master_erp");
|
||||||
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
public void testExecute_master_inner() {
|
||||||
|
testExecute_master(CodegenTemplateTypeEnum.MASTER_INNER, "/vben5_ele_schema_master_inner");
|
||||||
|
}
|
||||||
|
|
||||||
|
private void testExecute_master(CodegenTemplateTypeEnum templateType, String path) {
|
||||||
|
// 准备参数
|
||||||
|
CodegenTableDO table = getTable("student")
|
||||||
|
.setFrontType(FRONT_TYPE)
|
||||||
|
.setTemplateType(templateType.getType());
|
||||||
|
List<CodegenColumnDO> columns = getColumnList("student");
|
||||||
|
// 准备参数(子表)
|
||||||
|
CodegenTableDO contactTable = getTable("contact")
|
||||||
|
.setTemplateType(CodegenTemplateTypeEnum.SUB.getType())
|
||||||
|
.setFrontType(FRONT_TYPE)
|
||||||
|
.setSubJoinColumnId(100L).setSubJoinMany(true);
|
||||||
|
List<CodegenColumnDO> contactColumns = getColumnList("contact");
|
||||||
|
// 准备参数(班主任)
|
||||||
|
CodegenTableDO teacherTable = getTable("teacher")
|
||||||
|
.setTemplateType(CodegenTemplateTypeEnum.SUB.getType())
|
||||||
|
.setFrontType(FRONT_TYPE)
|
||||||
|
.setSubJoinColumnId(200L).setSubJoinMany(false);
|
||||||
|
List<CodegenColumnDO> teacherColumns = getColumnList("teacher");
|
||||||
|
|
||||||
|
// 调用
|
||||||
|
Map<String, String> result = codegenEngine.execute(DbType.MYSQL, table, columns,
|
||||||
|
Arrays.asList(contactTable, teacherTable), Arrays.asList(contactColumns, teacherColumns));
|
||||||
|
// 断言
|
||||||
|
assertResult(result, path);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
@ -5,7 +5,6 @@ import cn.iocoder.yudao.module.infra.dal.dataobject.codegen.CodegenTableDO;
|
||||||
import cn.iocoder.yudao.module.infra.enums.codegen.CodegenFrontTypeEnum;
|
import cn.iocoder.yudao.module.infra.enums.codegen.CodegenFrontTypeEnum;
|
||||||
import cn.iocoder.yudao.module.infra.enums.codegen.CodegenTemplateTypeEnum;
|
import cn.iocoder.yudao.module.infra.enums.codegen.CodegenTemplateTypeEnum;
|
||||||
import com.baomidou.mybatisplus.annotation.DbType;
|
import com.baomidou.mybatisplus.annotation.DbType;
|
||||||
import org.junit.jupiter.api.Disabled;
|
|
||||||
import org.junit.jupiter.api.Test;
|
import org.junit.jupiter.api.Test;
|
||||||
|
|
||||||
import java.util.Arrays;
|
import java.util.Arrays;
|
||||||
|
|
@ -17,7 +16,6 @@ import java.util.Map;
|
||||||
*
|
*
|
||||||
* @author 芋道源码
|
* @author 芋道源码
|
||||||
*/
|
*/
|
||||||
@Disabled
|
|
||||||
public class CodegenEngineVue2Test extends CodegenEngineAbstractTest {
|
public class CodegenEngineVue2Test extends CodegenEngineAbstractTest {
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
|
|
@ -36,6 +34,23 @@ public class CodegenEngineVue2Test extends CodegenEngineAbstractTest {
|
||||||
assertResult(result, "/vue2_one");
|
assertResult(result, "/vue2_one");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
public void testExecute_vue2_one_importEnable() {
|
||||||
|
// 开启 import 开关
|
||||||
|
codegenProperties.setImportEnable(true);
|
||||||
|
codegenEngine.initGlobalBindingMap();
|
||||||
|
// 准备参数
|
||||||
|
CodegenTableDO table = getTable("student")
|
||||||
|
.setFrontType(CodegenFrontTypeEnum.VUE2_ELEMENT_UI.getType())
|
||||||
|
.setTemplateType(CodegenTemplateTypeEnum.ONE.getType());
|
||||||
|
List<CodegenColumnDO> columns = getColumnList("student");
|
||||||
|
|
||||||
|
// 调用
|
||||||
|
Map<String, String> result = codegenEngine.execute(DbType.MYSQL, table, columns, null, null);
|
||||||
|
// 断言
|
||||||
|
assertResult(result, "/vue2_one_importEnable");
|
||||||
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
public void testExecute_vue2_tree() {
|
public void testExecute_vue2_tree() {
|
||||||
// 准备参数
|
// 准备参数
|
||||||
|
|
|
||||||
|
|
@ -5,7 +5,6 @@ import cn.iocoder.yudao.module.infra.dal.dataobject.codegen.CodegenTableDO;
|
||||||
import cn.iocoder.yudao.module.infra.enums.codegen.CodegenFrontTypeEnum;
|
import cn.iocoder.yudao.module.infra.enums.codegen.CodegenFrontTypeEnum;
|
||||||
import cn.iocoder.yudao.module.infra.enums.codegen.CodegenTemplateTypeEnum;
|
import cn.iocoder.yudao.module.infra.enums.codegen.CodegenTemplateTypeEnum;
|
||||||
import com.baomidou.mybatisplus.annotation.DbType;
|
import com.baomidou.mybatisplus.annotation.DbType;
|
||||||
import org.junit.jupiter.api.Disabled;
|
|
||||||
import org.junit.jupiter.api.Test;
|
import org.junit.jupiter.api.Test;
|
||||||
|
|
||||||
import java.util.Arrays;
|
import java.util.Arrays;
|
||||||
|
|
@ -17,7 +16,6 @@ import java.util.Map;
|
||||||
*
|
*
|
||||||
* @author 芋道源码
|
* @author 芋道源码
|
||||||
*/
|
*/
|
||||||
@Disabled
|
|
||||||
public class CodegenEngineVue3Test extends CodegenEngineAbstractTest {
|
public class CodegenEngineVue3Test extends CodegenEngineAbstractTest {
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
|
|
@ -36,6 +34,23 @@ public class CodegenEngineVue3Test extends CodegenEngineAbstractTest {
|
||||||
assertResult(result, "/vue3_one");
|
assertResult(result, "/vue3_one");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
public void testExecute_vue3_one_importEnable() {
|
||||||
|
// 开启 import 开关
|
||||||
|
codegenProperties.setImportEnable(true);
|
||||||
|
codegenEngine.initGlobalBindingMap();
|
||||||
|
// 准备参数
|
||||||
|
CodegenTableDO table = getTable("student")
|
||||||
|
.setFrontType(CodegenFrontTypeEnum.VUE3_ELEMENT_PLUS.getType())
|
||||||
|
.setTemplateType(CodegenTemplateTypeEnum.ONE.getType());
|
||||||
|
List<CodegenColumnDO> columns = getColumnList("student");
|
||||||
|
|
||||||
|
// 调用
|
||||||
|
Map<String, String> result = codegenEngine.execute(DbType.MYSQL, table, columns, null, null);
|
||||||
|
// 断言
|
||||||
|
assertResult(result, "/vue3_one_importEnable");
|
||||||
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
public void testExecute_vue3_tree() {
|
public void testExecute_vue3_tree() {
|
||||||
// 准备参数
|
// 准备参数
|
||||||
|
|
|
||||||
|
|
@ -42,6 +42,7 @@ public class FileServiceImplTest extends BaseDbUnitTest {
|
||||||
public void setUp() {
|
public void setUp() {
|
||||||
FileServiceImpl.PATH_PREFIX_DATE_ENABLE = true;
|
FileServiceImpl.PATH_PREFIX_DATE_ENABLE = true;
|
||||||
FileServiceImpl.PATH_SUFFIX_TIMESTAMP_ENABLE = true;
|
FileServiceImpl.PATH_SUFFIX_TIMESTAMP_ENABLE = true;
|
||||||
|
FileServiceImpl.PATH_SUFFIX_AS_DIRECTORY = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
|
|
@ -93,7 +94,7 @@ public class FileServiceImplTest extends BaseDbUnitTest {
|
||||||
String url = randomString();
|
String url = randomString();
|
||||||
AtomicReference<String> pathRef = new AtomicReference<>();
|
AtomicReference<String> pathRef = new AtomicReference<>();
|
||||||
when(client.upload(same(content), argThat(path -> {
|
when(client.upload(same(content), argThat(path -> {
|
||||||
assertTrue(path.matches(directory + "/\\d{8}/" + name + "_\\d+.jpg"));
|
assertTrue(path.matches(directory + "/\\d{8}/\\d+/" + name + ".jpg"));
|
||||||
pathRef.set(path);
|
pathRef.set(path);
|
||||||
return true;
|
return true;
|
||||||
}), eq(type))).thenReturn(url);
|
}), eq(type))).thenReturn(url);
|
||||||
|
|
@ -125,7 +126,7 @@ public class FileServiceImplTest extends BaseDbUnitTest {
|
||||||
String url = randomString();
|
String url = randomString();
|
||||||
AtomicReference<String> pathRef = new AtomicReference<>();
|
AtomicReference<String> pathRef = new AtomicReference<>();
|
||||||
when(client.upload(same(content), argThat(path -> {
|
when(client.upload(same(content), argThat(path -> {
|
||||||
assertTrue(path.matches("\\d{8}/6318848e882d8a7e7e82789d87608f684ee52d41966bfc8cad3ce15aad2b970e_\\d+\\.jpg"));
|
assertTrue(path.matches("\\d{8}/\\d+/6318848e882d8a7e7e82789d87608f684ee52d41966bfc8cad3ce15aad2b970e\\.jpg"));
|
||||||
pathRef.set(path);
|
pathRef.set(path);
|
||||||
return true;
|
return true;
|
||||||
}), eq(type))).thenReturn(url);
|
}), eq(type))).thenReturn(url);
|
||||||
|
|
@ -200,10 +201,10 @@ public class FileServiceImplTest extends BaseDbUnitTest {
|
||||||
String path = fileService.generateUploadPath(name, directory);
|
String path = fileService.generateUploadPath(name, directory);
|
||||||
|
|
||||||
// 断言
|
// 断言
|
||||||
// 格式为:avatar/yyyyMMdd/test_timestamp.jpg
|
// 格式为:avatar/yyyyMMdd/{时间戳+随机数}/test.jpg
|
||||||
assertTrue(path.startsWith(directory + "/"));
|
assertTrue(path.startsWith(directory + "/"));
|
||||||
// 包含日期格式:8 位数字,如 20240517
|
// 包含日期格式:8 位数字,如 20240517
|
||||||
assertTrue(path.matches(directory + "/\\d{8}/test_\\d+\\.jpg"));
|
assertTrue(path.matches(directory + "/\\d{8}/\\d+/test\\.jpg"));
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
|
|
@ -236,9 +237,9 @@ public class FileServiceImplTest extends BaseDbUnitTest {
|
||||||
String path = fileService.generateUploadPath(name, directory);
|
String path = fileService.generateUploadPath(name, directory);
|
||||||
|
|
||||||
// 断言
|
// 断言
|
||||||
// 格式为:avatar/test_timestamp.jpg
|
// 格式为:avatar/{时间戳+随机数}/test.jpg
|
||||||
assertTrue(path.startsWith(directory + "/"));
|
assertTrue(path.startsWith(directory + "/"));
|
||||||
assertTrue(path.matches(directory + "/test_\\d+\\.jpg"));
|
assertTrue(path.matches(directory + "/\\d+/test\\.jpg"));
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
|
|
@ -269,9 +270,9 @@ public class FileServiceImplTest extends BaseDbUnitTest {
|
||||||
String path = fileService.generateUploadPath(name, directory);
|
String path = fileService.generateUploadPath(name, directory);
|
||||||
|
|
||||||
// 断言
|
// 断言
|
||||||
// 格式为:avatar/yyyyMMdd/test_timestamp
|
// 格式为:avatar/yyyyMMdd/{时间戳+随机数}/test
|
||||||
assertTrue(path.startsWith(directory + "/"));
|
assertTrue(path.startsWith(directory + "/"));
|
||||||
assertTrue(path.matches(directory + "/\\d{8}/test_\\d+"));
|
assertTrue(path.matches(directory + "/\\d{8}/\\d+/test"));
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
|
|
@ -286,8 +287,59 @@ public class FileServiceImplTest extends BaseDbUnitTest {
|
||||||
String path = fileService.generateUploadPath(name, directory);
|
String path = fileService.generateUploadPath(name, directory);
|
||||||
|
|
||||||
// 断言
|
// 断言
|
||||||
// 格式为:yyyyMMdd/test_timestamp.jpg
|
// 格式为:yyyyMMdd/{时间戳+随机数}/test.jpg
|
||||||
assertTrue(path.matches("\\d{8}/test_\\d+\\.jpg"));
|
assertTrue(path.matches("\\d{8}/\\d+/test\\.jpg"));
|
||||||
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
public void testGenerateUploadPath_SuffixAsName_AllEnabled() {
|
||||||
|
// 准备参数
|
||||||
|
String name = "test.jpg";
|
||||||
|
String directory = "avatar";
|
||||||
|
FileServiceImpl.PATH_PREFIX_DATE_ENABLE = true;
|
||||||
|
FileServiceImpl.PATH_SUFFIX_TIMESTAMP_ENABLE = true;
|
||||||
|
FileServiceImpl.PATH_SUFFIX_AS_DIRECTORY = false;
|
||||||
|
|
||||||
|
// 调用
|
||||||
|
String path = fileService.generateUploadPath(name, directory);
|
||||||
|
|
||||||
|
// 断言
|
||||||
|
// 格式为:avatar/yyyyMMdd/test_{时间戳+随机数}.jpg
|
||||||
|
assertTrue(path.matches(directory + "/\\d{8}/test_\\d+\\.jpg"));
|
||||||
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
public void testGenerateUploadPath_SuffixAsName_PrefixDisabled() {
|
||||||
|
// 准备参数
|
||||||
|
String name = "test.jpg";
|
||||||
|
String directory = "avatar";
|
||||||
|
FileServiceImpl.PATH_PREFIX_DATE_ENABLE = false;
|
||||||
|
FileServiceImpl.PATH_SUFFIX_TIMESTAMP_ENABLE = true;
|
||||||
|
FileServiceImpl.PATH_SUFFIX_AS_DIRECTORY = false;
|
||||||
|
|
||||||
|
// 调用
|
||||||
|
String path = fileService.generateUploadPath(name, directory);
|
||||||
|
|
||||||
|
// 断言
|
||||||
|
// 格式为:avatar/test_{时间戳+随机数}.jpg
|
||||||
|
assertTrue(path.matches(directory + "/test_\\d+\\.jpg"));
|
||||||
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
public void testGenerateUploadPath_SuffixAsName_NoExtension() {
|
||||||
|
// 准备参数
|
||||||
|
String name = "test";
|
||||||
|
String directory = "avatar";
|
||||||
|
FileServiceImpl.PATH_PREFIX_DATE_ENABLE = true;
|
||||||
|
FileServiceImpl.PATH_SUFFIX_TIMESTAMP_ENABLE = true;
|
||||||
|
FileServiceImpl.PATH_SUFFIX_AS_DIRECTORY = false;
|
||||||
|
|
||||||
|
// 调用
|
||||||
|
String path = fileService.generateUploadPath(name, directory);
|
||||||
|
|
||||||
|
// 断言
|
||||||
|
// 格式为:avatar/yyyyMMdd/test_{时间戳+随机数}
|
||||||
|
assertTrue(path.matches(directory + "/\\d{8}/test_\\d+"));
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
|
|
@ -302,8 +354,8 @@ public class FileServiceImplTest extends BaseDbUnitTest {
|
||||||
String path = fileService.generateUploadPath(name, directory);
|
String path = fileService.generateUploadPath(name, directory);
|
||||||
|
|
||||||
// 断言
|
// 断言
|
||||||
// 格式为:yyyyMMdd/test_timestamp.jpg
|
// 格式为:yyyyMMdd/{时间戳+随机数}/test.jpg
|
||||||
assertTrue(path.matches("\\d{8}/test_\\d+\\.jpg"));
|
assertTrue(path.matches("\\d{8}/\\d+/test\\.jpg"));
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,73 @@
|
||||||
|
[ {
|
||||||
|
"contentPath" : "java/InfraStudentPageReqVO",
|
||||||
|
"filePath" : "yudao-module-infra/yudao-module-infra-server/src/main/java/cn/iocoder/yudao/module/infra/controller/admin/demo/vo/InfraStudentPageReqVO.java"
|
||||||
|
}, {
|
||||||
|
"contentPath" : "java/InfraStudentRespVO",
|
||||||
|
"filePath" : "yudao-module-infra/yudao-module-infra-server/src/main/java/cn/iocoder/yudao/module/infra/controller/admin/demo/vo/InfraStudentRespVO.java"
|
||||||
|
}, {
|
||||||
|
"contentPath" : "java/InfraStudentSaveReqVO",
|
||||||
|
"filePath" : "yudao-module-infra/yudao-module-infra-server/src/main/java/cn/iocoder/yudao/module/infra/controller/admin/demo/vo/InfraStudentSaveReqVO.java"
|
||||||
|
}, {
|
||||||
|
"contentPath" : "java/InfraStudentController",
|
||||||
|
"filePath" : "yudao-module-infra/yudao-module-infra-server/src/main/java/cn/iocoder/yudao/module/infra/controller/admin/demo/InfraStudentController.java"
|
||||||
|
}, {
|
||||||
|
"contentPath" : "java/InfraStudentDO",
|
||||||
|
"filePath" : "yudao-module-infra/yudao-module-infra-server/src/main/java/cn/iocoder/yudao/module/infra/dal/dataobject/demo/InfraStudentDO.java"
|
||||||
|
}, {
|
||||||
|
"contentPath" : "java/InfraStudentContactDO",
|
||||||
|
"filePath" : "yudao-module-infra/yudao-module-infra-server/src/main/java/cn/iocoder/yudao/module/infra/dal/dataobject/demo/InfraStudentContactDO.java"
|
||||||
|
}, {
|
||||||
|
"contentPath" : "java/InfraStudentTeacherDO",
|
||||||
|
"filePath" : "yudao-module-infra/yudao-module-infra-server/src/main/java/cn/iocoder/yudao/module/infra/dal/dataobject/demo/InfraStudentTeacherDO.java"
|
||||||
|
}, {
|
||||||
|
"contentPath" : "java/InfraStudentMapper",
|
||||||
|
"filePath" : "yudao-module-infra/yudao-module-infra-server/src/main/java/cn/iocoder/yudao/module/infra/dal/mysql/demo/InfraStudentMapper.java"
|
||||||
|
}, {
|
||||||
|
"contentPath" : "java/InfraStudentContactMapper",
|
||||||
|
"filePath" : "yudao-module-infra/yudao-module-infra-server/src/main/java/cn/iocoder/yudao/module/infra/dal/mysql/demo/InfraStudentContactMapper.java"
|
||||||
|
}, {
|
||||||
|
"contentPath" : "java/InfraStudentTeacherMapper",
|
||||||
|
"filePath" : "yudao-module-infra/yudao-module-infra-server/src/main/java/cn/iocoder/yudao/module/infra/dal/mysql/demo/InfraStudentTeacherMapper.java"
|
||||||
|
}, {
|
||||||
|
"contentPath" : "xml/InfraStudentMapper",
|
||||||
|
"filePath" : "yudao-module-infra/yudao-module-infra-server/src/main/resources/mapper/demo/InfraStudentMapper.xml"
|
||||||
|
}, {
|
||||||
|
"contentPath" : "java/InfraStudentServiceImpl",
|
||||||
|
"filePath" : "yudao-module-infra/yudao-module-infra-server/src/main/java/cn/iocoder/yudao/module/infra/service/demo/InfraStudentServiceImpl.java"
|
||||||
|
}, {
|
||||||
|
"contentPath" : "java/InfraStudentService",
|
||||||
|
"filePath" : "yudao-module-infra/yudao-module-infra-server/src/main/java/cn/iocoder/yudao/module/infra/service/demo/InfraStudentService.java"
|
||||||
|
}, {
|
||||||
|
"contentPath" : "java/InfraStudentServiceImplTest",
|
||||||
|
"filePath" : "yudao-module-infra/yudao-module-infra-server/src/test/java/cn/iocoder/yudao/module/infra/service/demo/InfraStudentServiceImplTest.java"
|
||||||
|
}, {
|
||||||
|
"contentPath" : "java/ErrorCodeConstants_手动操作",
|
||||||
|
"filePath" : "yudao-module-infra/yudao-module-infra-api/src/main/java/cn/iocoder/yudao/module/infra/enums/ErrorCodeConstants_手动操作.java"
|
||||||
|
}, {
|
||||||
|
"contentPath" : "sql/sql",
|
||||||
|
"filePath" : "sql/sql.sql"
|
||||||
|
}, {
|
||||||
|
"contentPath" : "sql/h2",
|
||||||
|
"filePath" : "sql/h2.sql"
|
||||||
|
}, {
|
||||||
|
"contentPath" : "vue/index",
|
||||||
|
"filePath" : "yudao-ui-admin-vben/src/views/infra/demo/index.vue"
|
||||||
|
}, {
|
||||||
|
"contentPath" : "vue/form",
|
||||||
|
"filePath" : "yudao-ui-admin-vben/src/views/infra/demo/modules/form.vue"
|
||||||
|
}, {
|
||||||
|
"contentPath" : "ts/index",
|
||||||
|
"filePath" : "yudao-ui-admin-vben/src/api/infra/demo/index.ts"
|
||||||
|
}, {
|
||||||
|
"contentPath" : "vue/student-contact-form",
|
||||||
|
"filePath" : "yudao-ui-admin-vben/src/views/infra/demo/modules/student-contact-form.vue"
|
||||||
|
}, {
|
||||||
|
"contentPath" : "vue/student-teacher-form",
|
||||||
|
"filePath" : "yudao-ui-admin-vben/src/views/infra/demo/modules/student-teacher-form.vue"
|
||||||
|
}, {
|
||||||
|
"contentPath" : "vue/student-contact-list",
|
||||||
|
"filePath" : "yudao-ui-admin-vben/src/views/infra/demo/modules/student-contact-list.vue"
|
||||||
|
}, {
|
||||||
|
"contentPath" : "vue/student-teacher-list",
|
||||||
|
"filePath" : "yudao-ui-admin-vben/src/views/infra/demo/modules/student-teacher-list.vue"
|
||||||
|
} ]
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
// TODO 待办:请将下面的错误码复制到 yudao-module-infra-api 模块的 ErrorCodeConstants 类中。注意,请给“TODO 补充编号”设置一个错误码编号!!!
|
// TODO 待办:请将下面的错误码复制到 yudao-module-infra 模块的 ErrorCodeConstants 类中。注意,请给“TODO 补充编号”设置一个错误码编号!!!
|
||||||
// ========== 学生 TODO 补充编号 ==========
|
// ========== 学生 TODO 补充编号 ==========
|
||||||
ErrorCode STUDENT_NOT_EXISTS = new ErrorCode(TODO 补充编号, "学生不存在");
|
ErrorCode STUDENT_NOT_EXISTS = new ErrorCode(TODO 补充编号, "学生不存在");
|
||||||
ErrorCode STUDENT_CONTACT_NOT_EXISTS = new ErrorCode(TODO 补充编号, "学生联系人不存在");
|
ErrorCode STUDENT_CONTACT_NOT_EXISTS = new ErrorCode(TODO 补充编号, "学生联系人不存在");
|
||||||
ErrorCode STUDENT_TEACHER_NOT_EXISTS = new ErrorCode(TODO 补充编号, "学生班主任不存在");
|
ErrorCode STUDENT_TEACHER_NOT_EXISTS = new ErrorCode(TODO 补充编号, "学生班主任不存在");
|
||||||
ErrorCode STUDENT_TEACHER_EXISTS = new ErrorCode(TODO 补充编号, "学生班主任已存在");
|
ErrorCode STUDENT_TEACHER_EXISTS = new ErrorCode(TODO 补充编号, "学生班主任已存在");
|
||||||
|
|
@ -27,4 +27,8 @@ public interface InfraStudentContactMapper extends BaseMapperX<InfraStudentConta
|
||||||
return delete(InfraStudentContactDO::getStudentId, studentId);
|
return delete(InfraStudentContactDO::getStudentId, studentId);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
default int deleteByStudentIds(List<Long> studentIds) {
|
||||||
|
return deleteBatch(InfraStudentContactDO::getStudentId, studentIds);
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
@ -1,16 +1,16 @@
|
||||||
package cn.iocoder.yudao.module.infra.controller.admin.demo;
|
package cn.iocoder.yudao.module.infra.controller.admin.demo;
|
||||||
|
|
||||||
import org.springframework.web.bind.annotation.*;
|
import org.springframework.web.bind.annotation.*;
|
||||||
import javax.annotation.Resource;
|
import jakarta.annotation.Resource;
|
||||||
import org.springframework.validation.annotation.Validated;
|
import org.springframework.validation.annotation.Validated;
|
||||||
import org.springframework.security.access.prepost.PreAuthorize;
|
import org.springframework.security.access.prepost.PreAuthorize;
|
||||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||||
import io.swagger.v3.oas.annotations.Parameter;
|
import io.swagger.v3.oas.annotations.Parameter;
|
||||||
import io.swagger.v3.oas.annotations.Operation;
|
import io.swagger.v3.oas.annotations.Operation;
|
||||||
|
|
||||||
import javax.validation.constraints.*;
|
import jakarta.validation.constraints.*;
|
||||||
import javax.validation.*;
|
import jakarta.validation.*;
|
||||||
import javax.servlet.http.*;
|
import jakarta.servlet.http.*;
|
||||||
import java.util.*;
|
import java.util.*;
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
|
|
||||||
|
|
@ -22,8 +22,8 @@ import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success;
|
||||||
|
|
||||||
import cn.iocoder.yudao.framework.excel.core.util.ExcelUtils;
|
import cn.iocoder.yudao.framework.excel.core.util.ExcelUtils;
|
||||||
|
|
||||||
import cn.iocoder.yudao.framework.operatelog.core.annotations.OperateLog;
|
import cn.iocoder.yudao.framework.apilog.core.annotation.ApiAccessLog;
|
||||||
import static cn.iocoder.yudao.framework.operatelog.core.enums.OperateTypeEnum.*;
|
import static cn.iocoder.yudao.framework.apilog.core.enums.OperateTypeEnum.*;
|
||||||
|
|
||||||
import cn.iocoder.yudao.module.infra.controller.admin.demo.vo.*;
|
import cn.iocoder.yudao.module.infra.controller.admin.demo.vo.*;
|
||||||
import cn.iocoder.yudao.module.infra.dal.dataobject.demo.InfraStudentDO;
|
import cn.iocoder.yudao.module.infra.dal.dataobject.demo.InfraStudentDO;
|
||||||
|
|
@ -64,6 +64,15 @@ public class InfraStudentController {
|
||||||
return success(true);
|
return success(true);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@DeleteMapping("/delete-list")
|
||||||
|
@Parameter(name = "ids", description = "编号", required = true)
|
||||||
|
@Operation(summary = "批量删除学生")
|
||||||
|
@PreAuthorize("@ss.hasPermission('infra:student:delete')")
|
||||||
|
public CommonResult<Boolean> deleteStudentList(@RequestParam("ids") List<Long> ids) {
|
||||||
|
studentService.deleteStudentListByIds(ids);
|
||||||
|
return success(true);
|
||||||
|
}
|
||||||
|
|
||||||
@GetMapping("/get")
|
@GetMapping("/get")
|
||||||
@Operation(summary = "获得学生")
|
@Operation(summary = "获得学生")
|
||||||
@Parameter(name = "id", description = "编号", required = true, example = "1024")
|
@Parameter(name = "id", description = "编号", required = true, example = "1024")
|
||||||
|
|
@ -84,7 +93,7 @@ public class InfraStudentController {
|
||||||
@GetMapping("/export-excel")
|
@GetMapping("/export-excel")
|
||||||
@Operation(summary = "导出学生 Excel")
|
@Operation(summary = "导出学生 Excel")
|
||||||
@PreAuthorize("@ss.hasPermission('infra:student:export')")
|
@PreAuthorize("@ss.hasPermission('infra:student:export')")
|
||||||
@OperateLog(type = EXPORT)
|
@ApiAccessLog(operateType = EXPORT)
|
||||||
public void exportStudentExcel(@Valid InfraStudentPageReqVO pageReqVO,
|
public void exportStudentExcel(@Valid InfraStudentPageReqVO pageReqVO,
|
||||||
HttpServletResponse response) throws IOException {
|
HttpServletResponse response) throws IOException {
|
||||||
pageReqVO.setPageSize(PageParam.PAGE_SIZE_NONE);
|
pageReqVO.setPageSize(PageParam.PAGE_SIZE_NONE);
|
||||||
|
|
@ -129,6 +138,15 @@ public class InfraStudentController {
|
||||||
return success(true);
|
return success(true);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@DeleteMapping("/student-contact/delete-list")
|
||||||
|
@Parameter(name = "ids", description = "编号", required = true)
|
||||||
|
@Operation(summary = "批量删除学生联系人")
|
||||||
|
@PreAuthorize("@ss.hasPermission('infra:student:delete')")
|
||||||
|
public CommonResult<Boolean> deleteStudentContactList(@RequestParam("ids") List<Long> ids) {
|
||||||
|
studentService.deleteStudentContactListByIds(ids);
|
||||||
|
return success(true);
|
||||||
|
}
|
||||||
|
|
||||||
@GetMapping("/student-contact/get")
|
@GetMapping("/student-contact/get")
|
||||||
@Operation(summary = "获得学生联系人")
|
@Operation(summary = "获得学生联系人")
|
||||||
@Parameter(name = "id", description = "编号", required = true)
|
@Parameter(name = "id", description = "编号", required = true)
|
||||||
|
|
@ -172,6 +190,15 @@ public class InfraStudentController {
|
||||||
return success(true);
|
return success(true);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@DeleteMapping("/student-teacher/delete-list")
|
||||||
|
@Parameter(name = "ids", description = "编号", required = true)
|
||||||
|
@Operation(summary = "批量删除学生班主任")
|
||||||
|
@PreAuthorize("@ss.hasPermission('infra:student:delete')")
|
||||||
|
public CommonResult<Boolean> deleteStudentTeacherList(@RequestParam("ids") List<Long> ids) {
|
||||||
|
studentService.deleteStudentTeacherListByIds(ids);
|
||||||
|
return success(true);
|
||||||
|
}
|
||||||
|
|
||||||
@GetMapping("/student-teacher/get")
|
@GetMapping("/student-teacher/get")
|
||||||
@Operation(summary = "获得学生班主任")
|
@Operation(summary = "获得学生班主任")
|
||||||
@Parameter(name = "id", description = "编号", required = true)
|
@Parameter(name = "id", description = "编号", required = true)
|
||||||
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue