Commit 10e521dcf774631d55fd1f0d50060273ee01daf3
Committed by
GitHub
Merge branch 'YunaiV:master-jdk17' into master-jdk17
Showing
98 changed files
with
1365 additions
and
350 deletions
README.md
| ... | ... | @@ -232,18 +232,19 @@ |
| 232 | 232 | |
| 233 | 233 | ### 微信公众号 |
| 234 | 234 | |
| 235 | -| | 功能 | 描述 | | |
| 236 | -|-----|--------|-------------------------------| | |
| 237 | -| 🚀 | 账号管理 | 配置接入的微信公众号,可支持多个公众号 | | |
| 238 | -| 🚀 | 数据统计 | 统计公众号的用户增减、累计用户、消息概况、接口分析等数据 | | |
| 239 | -| 🚀 | 粉丝管理 | 查看已关注、取关的粉丝列表,可对粉丝进行同步、打标签等操作 | | |
| 240 | -| 🚀 | 消息管理 | 查看粉丝发送的消息列表,可主动回复粉丝消息 | | |
| 241 | -| 🚀 | 自动回复 | 自动回复粉丝发送的消息,支持关注回复、消息回复、关键字回复 | | |
| 242 | -| 🚀 | 标签管理 | 对公众号的标签进行创建、查询、修改、删除等操作 | | |
| 243 | -| 🚀 | 菜单管理 | 自定义公众号的菜单,也可以从公众号同步菜单 | | |
| 244 | -| 🚀 | 素材管理 | 管理公众号的图片、语音、视频等素材,支持在线播放语音、视频 | | |
| 245 | -| 🚀 | 图文草稿箱 | 新增常用的图文素材到草稿箱,可发布到公众号 | | |
| 246 | -| 🚀 | 图文发表记录 | 查看已发布成功的图文素材,支持删除操作 | | |
| 235 | +| | 功能 | 描述 | | |
| 236 | +|----|--------|-------------------------------| | |
| 237 | +| 🚀 | 账号管理 | 配置接入的微信公众号,可支持多个公众号 | | |
| 238 | +| 🚀 | 数据统计 | 统计公众号的用户增减、累计用户、消息概况、接口分析等数据 | | |
| 239 | +| 🚀 | 粉丝管理 | 查看已关注、取关的粉丝列表,可对粉丝进行同步、打标签等操作 | | |
| 240 | +| 🚀 | 消息管理 | 查看粉丝发送的消息列表,可主动回复粉丝消息 | | |
| 241 | +| 🚀 | 模版消息 | 配置和发送模版消息,用于向粉丝推送通知类消息 | | |
| 242 | +| 🚀 | 自动回复 | 自动回复粉丝发送的消息,支持关注回复、消息回复、关键字回复 | | |
| 243 | +| 🚀 | 标签管理 | 对公众号的标签进行创建、查询、修改、删除等操作 | | |
| 244 | +| 🚀 | 菜单管理 | 自定义公众号的菜单,也可以从公众号同步菜单 | | |
| 245 | +| 🚀 | 素材管理 | 管理公众号的图片、语音、视频等素材,支持在线播放语音、视频 | | |
| 246 | +| 🚀 | 图文草稿箱 | 新增常用的图文素材到草稿箱,可发布到公众号 | | |
| 247 | +| 🚀 | 图文发表记录 | 查看已发布成功的图文素材,支持删除操作 | | |
| 247 | 248 | |
| 248 | 249 | ### 商城系统 |
| 249 | 250 | ... | ... |
pom.xml
| ... | ... | @@ -32,7 +32,7 @@ |
| 32 | 32 | <url>https://github.com/YunaiV/ruoyi-vue-pro</url> |
| 33 | 33 | |
| 34 | 34 | <properties> |
| 35 | - <revision>2025.10-SNAPSHOT</revision> | |
| 35 | + <revision>2025.11-SNAPSHOT</revision> | |
| 36 | 36 | <!-- Maven 相关 --> |
| 37 | 37 | <java.version>17</java.version> |
| 38 | 38 | <maven.compiler.source>${java.version}</maven.compiler.source> |
| ... | ... | @@ -41,7 +41,7 @@ |
| 41 | 41 | <maven-compiler-plugin.version>3.14.0</maven-compiler-plugin.version> |
| 42 | 42 | <flatten-maven-plugin.version>1.7.2</flatten-maven-plugin.version> |
| 43 | 43 | <!-- maven-surefire-plugin 暂时无法通过 bom 的依赖读取(兼容老版本 IDEA 2024 及以前版本) --> |
| 44 | - <lombok.version>1.18.38</lombok.version> | |
| 44 | + <lombok.version>1.18.42</lombok.version> | |
| 45 | 45 | <spring.boot.version>3.5.5</spring.boot.version> |
| 46 | 46 | <mapstruct.version>1.6.3</mapstruct.version> |
| 47 | 47 | <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> | ... | ... |
sql/dm/ruoyi-vue-pro-dm8.sql
| ... | ... | @@ -1063,7 +1063,7 @@ INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_t |
| 1063 | 1063 | 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 (1690, 5, '向量', '5', 'ai_model_type', 0, '', '', '', '1', '2025-03-03 12:28:15', '1', '2025-03-03 12:28:15', '0'); |
| 1064 | 1064 | 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 (1691, 6, '重排', '6', 'ai_model_type', 0, '', '', '', '1', '2025-03-03 12:28:26', '1', '2025-03-03 12:28:26', '0'); |
| 1065 | 1065 | 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 (1692, 14, 'MiniMax', 'MiniMax', 'ai_platform', 0, '', '', '', '1', '2025-03-11 20:04:51', '1', '2025-03-11 20:04:51', '0'); |
| 1066 | -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 (1693, 15, '月之暗灭', 'Moonshot', 'ai_platform', 0, '', '', '', '1', '2025-03-11 20:05:08', '1', '2025-03-11 20:05:08', '0'); | |
| 1066 | +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 (1693, 15, '月之暗面', 'Moonshot', 'ai_platform', 0, '', '', '', '1', '2025-03-11 20:05:08', '1', '2025-03-11 20:05:08', '0'); | |
| 1067 | 1067 | 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 (2000, 0, '标准数据格式(JSON)', '0', 'iot_data_format', 0, 'default', '', '', '1', '2024-08-10 11:53:26', '1', '2025-03-17 09:28:16', '0'); |
| 1068 | 1068 | 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 (2001, 1, '透传/自定义', '1', 'iot_data_format', 0, 'default', '', '', '1', '2024-08-10 11:53:37', '1', '2025-03-17 09:28:19', '0'); |
| 1069 | 1069 | 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 (2002, 0, '直连设备', '0', 'iot_product_device_type', 0, 'default', '', '', '1', '2024-08-10 11:54:58', '1', '2025-03-17 09:28:22', '0'); | ... | ... |
sql/kingbase/ruoyi-vue-pro.sql
| ... | ... | @@ -1177,7 +1177,7 @@ INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_t |
| 1177 | 1177 | 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 (1690, 5, '向量', '5', 'ai_model_type', 0, '', '', '', '1', '2025-03-03 12:28:15', '1', '2025-03-03 12:28:15', '0'); |
| 1178 | 1178 | 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 (1691, 6, '重排', '6', 'ai_model_type', 0, '', '', '', '1', '2025-03-03 12:28:26', '1', '2025-03-03 12:28:26', '0'); |
| 1179 | 1179 | 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 (1692, 14, 'MiniMax', 'MiniMax', 'ai_platform', 0, '', '', '', '1', '2025-03-11 20:04:51', '1', '2025-03-11 20:04:51', '0'); |
| 1180 | -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 (1693, 15, '月之暗灭', 'Moonshot', 'ai_platform', 0, '', '', '', '1', '2025-03-11 20:05:08', '1', '2025-03-11 20:05:08', '0'); | |
| 1180 | +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 (1693, 15, '月之暗面', 'Moonshot', 'ai_platform', 0, '', '', '', '1', '2025-03-11 20:05:08', '1', '2025-03-11 20:05:08', '0'); | |
| 1181 | 1181 | 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 (2000, 0, '标准数据格式(JSON)', '0', 'iot_data_format', 0, 'default', '', '', '1', '2024-08-10 11:53:26', '1', '2025-03-17 09:28:16', '0'); |
| 1182 | 1182 | 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 (2001, 1, '透传/自定义', '1', 'iot_data_format', 0, 'default', '', '', '1', '2024-08-10 11:53:37', '1', '2025-03-17 09:28:19', '0'); |
| 1183 | 1183 | 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 (2002, 0, '直连设备', '0', 'iot_product_device_type', 0, 'default', '', '', '1', '2024-08-10 11:54:58', '1', '2025-03-17 09:28:22', '0'); | ... | ... |
sql/mysql/ruoyi-vue-pro.sql
| ... | ... | @@ -11,7 +11,7 @@ |
| 11 | 11 | Target Server Version : 80200 (8.2.0) |
| 12 | 12 | File Encoding : 65001 |
| 13 | 13 | |
| 14 | - Date: 31/08/2025 11:12:28 | |
| 14 | + Date: 26/11/2025 22:43:12 | |
| 15 | 15 | */ |
| 16 | 16 | |
| 17 | 17 | SET NAMES utf8mb4; |
| ... | ... | @@ -91,7 +91,7 @@ CREATE TABLE `infra_api_error_log` ( |
| 91 | 91 | `deleted` bit(1) NOT NULL DEFAULT b'0' COMMENT '是否删除', |
| 92 | 92 | `tenant_id` bigint NOT NULL DEFAULT 0 COMMENT '租户编号', |
| 93 | 93 | PRIMARY KEY (`id`) USING BTREE |
| 94 | -) ENGINE = InnoDB AUTO_INCREMENT = 22656 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci COMMENT = '系统异常日志'; | |
| 94 | +) ENGINE = InnoDB AUTO_INCREMENT = 23210 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci COMMENT = '系统异常日志'; | |
| 95 | 95 | |
| 96 | 96 | -- ---------------------------- |
| 97 | 97 | -- Records of infra_api_error_log |
| ... | ... | @@ -128,7 +128,7 @@ CREATE TABLE `infra_codegen_column` ( |
| 128 | 128 | `update_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间', |
| 129 | 129 | `deleted` bit(1) NOT NULL DEFAULT b'0' COMMENT '是否删除', |
| 130 | 130 | PRIMARY KEY (`id`) USING BTREE |
| 131 | -) ENGINE = InnoDB AUTO_INCREMENT = 2603 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci COMMENT = '代码生成表字段定义'; | |
| 131 | +) ENGINE = InnoDB AUTO_INCREMENT = 2659 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci COMMENT = '代码生成表字段定义'; | |
| 132 | 132 | |
| 133 | 133 | -- ---------------------------- |
| 134 | 134 | -- Records of infra_codegen_column |
| ... | ... | @@ -166,7 +166,7 @@ CREATE TABLE `infra_codegen_table` ( |
| 166 | 166 | `update_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间', |
| 167 | 167 | `deleted` bit(1) NOT NULL DEFAULT b'0' COMMENT '是否删除', |
| 168 | 168 | PRIMARY KEY (`id`) USING BTREE |
| 169 | -) ENGINE = InnoDB AUTO_INCREMENT = 196 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci COMMENT = '代码生成表定义'; | |
| 169 | +) ENGINE = InnoDB AUTO_INCREMENT = 197 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci COMMENT = '代码生成表定义'; | |
| 170 | 170 | |
| 171 | 171 | -- ---------------------------- |
| 172 | 172 | -- Records of infra_codegen_table |
| ... | ... | @@ -251,7 +251,7 @@ CREATE TABLE `infra_file` ( |
| 251 | 251 | `update_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间', |
| 252 | 252 | `deleted` bit(1) NOT NULL DEFAULT b'0' COMMENT '是否删除', |
| 253 | 253 | PRIMARY KEY (`id`) USING BTREE |
| 254 | -) ENGINE = InnoDB AUTO_INCREMENT = 1983 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci COMMENT = '文件表'; | |
| 254 | +) ENGINE = InnoDB AUTO_INCREMENT = 2142 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci COMMENT = '文件表'; | |
| 255 | 255 | |
| 256 | 256 | -- ---------------------------- |
| 257 | 257 | -- Records of infra_file |
| ... | ... | @@ -276,22 +276,23 @@ CREATE TABLE `infra_file_config` ( |
| 276 | 276 | `update_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间', |
| 277 | 277 | `deleted` bit(1) NOT NULL DEFAULT b'0' COMMENT '是否删除', |
| 278 | 278 | PRIMARY KEY (`id`) USING BTREE |
| 279 | -) ENGINE = InnoDB AUTO_INCREMENT = 35 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci COMMENT = '文件配置表'; | |
| 279 | +) ENGINE = InnoDB AUTO_INCREMENT = 36 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci COMMENT = '文件配置表'; | |
| 280 | 280 | |
| 281 | 281 | -- ---------------------------- |
| 282 | 282 | -- Records of infra_file_config |
| 283 | 283 | -- ---------------------------- |
| 284 | 284 | BEGIN; |
| 285 | -INSERT INTO `infra_file_config` (`id`, `name`, `storage`, `remark`, `master`, `config`, `creator`, `create_time`, `updater`, `update_time`, `deleted`) VALUES (4, '数据库(示例)', 1, '我是数据库', b'0', '{\"@class\":\"cn.iocoder.yudao.module.infra.framework.file.core.client.db.DBFileClientConfig\",\"domain\":\"http://127.0.0.1:48080\"}', '1', '2022-03-15 23:56:24', '1', '2025-08-18 08:35:14', b'0'); | |
| 286 | -INSERT INTO `infra_file_config` (`id`, `name`, `storage`, `remark`, `master`, `config`, `creator`, `create_time`, `updater`, `update_time`, `deleted`) VALUES (22, '七牛存储器(示例)', 20, '请换成你自己的密钥!!!', b'1', '{\"@class\":\"cn.iocoder.yudao.module.infra.framework.file.core.client.s3.S3FileClientConfig\",\"endpoint\":\"s3.cn-south-1.qiniucs.com\",\"domain\":\"http://test.yudao.iocoder.cn\",\"bucket\":\"ruoyi-vue-pro\",\"accessKey\":\"3TvrJ70gl2Gt6IBe7_IZT1F6i_k0iMuRtyEv4EyS\",\"accessSecret\":\"wd0tbVBYlp0S-ihA8Qg2hPLncoP83wyrIq24OZuY\",\"enablePathStyleAccess\":false,\"enablePublicAccess\":true}', '1', '2024-01-13 22:11:12', '1', '2025-08-18 08:35:14', b'0'); | |
| 287 | -INSERT INTO `infra_file_config` (`id`, `name`, `storage`, `remark`, `master`, `config`, `creator`, `create_time`, `updater`, `update_time`, `deleted`) VALUES (24, '腾讯云存储(示例)', 20, '请换成你的密钥!!!', b'0', '{\"@class\":\"cn.iocoder.yudao.module.infra.framework.file.core.client.s3.S3FileClientConfig\",\"endpoint\":\"https://cos.ap-shanghai.myqcloud.com\",\"domain\":\"http://tengxun-oss.iocoder.cn\",\"bucket\":\"aoteman-1255880240\",\"accessKey\":\"AKIDAF6WSh1uiIjwqtrOsGSN3WryqTM6cTMt\",\"accessSecret\":\"X\",\"enablePathStyleAccess\":false,\"enablePublicAccess\":true}', '1', '2024-11-09 16:03:22', '1', '2025-08-18 08:35:14', b'0'); | |
| 288 | -INSERT INTO `infra_file_config` (`id`, `name`, `storage`, `remark`, `master`, `config`, `creator`, `create_time`, `updater`, `update_time`, `deleted`) VALUES (25, '阿里云存储(示例)', 20, '', b'0', '{\"@class\":\"cn.iocoder.yudao.module.infra.framework.file.core.client.s3.S3FileClientConfig\",\"endpoint\":\"oss-cn-beijing.aliyuncs.com\",\"domain\":\"http://ali-oss.iocoder.cn\",\"bucket\":\"yunai-aoteman\",\"accessKey\":\"LTAI5tEQLgnDyjh3WpNcdMKA\",\"accessSecret\":\"X\",\"enablePathStyleAccess\":false,\"enablePublicAccess\":true}', '1', '2024-11-09 16:47:08', '1', '2025-08-18 08:35:14', b'0'); | |
| 289 | -INSERT INTO `infra_file_config` (`id`, `name`, `storage`, `remark`, `master`, `config`, `creator`, `create_time`, `updater`, `update_time`, `deleted`) VALUES (26, '火山云存储(示例)', 20, '', b'0', '{\"@class\":\"cn.iocoder.yudao.module.infra.framework.file.core.client.s3.S3FileClientConfig\",\"endpoint\":\"tos-s3-cn-beijing.volces.com\",\"domain\":null,\"bucket\":\"yunai\",\"accessKey\":\"AKLTZjc3Zjc4MzZmMjU3NDk0ZTgxYmIyMmFkNTIwMDI1ZGE\",\"accessSecret\":\"X==\",\"enablePathStyleAccess\":false,\"enablePublicAccess\":true}', '1', '2024-11-09 16:56:42', '1', '2025-08-18 08:35:14', b'0'); | |
| 290 | -INSERT INTO `infra_file_config` (`id`, `name`, `storage`, `remark`, `master`, `config`, `creator`, `create_time`, `updater`, `update_time`, `deleted`) VALUES (27, '华为云存储(示例)', 20, '', b'0', '{\"@class\":\"cn.iocoder.yudao.module.infra.framework.file.core.client.s3.S3FileClientConfig\",\"endpoint\":\"obs.cn-east-3.myhuaweicloud.com\",\"domain\":\"\",\"bucket\":\"yudao\",\"accessKey\":\"PVDONDEIOTW88LF8DC4U\",\"accessSecret\":\"X\",\"enablePathStyleAccess\":false}', '1', '2024-11-09 17:18:41', '1', '2025-08-18 08:35:14', b'0'); | |
| 291 | -INSERT INTO `infra_file_config` (`id`, `name`, `storage`, `remark`, `master`, `config`, `creator`, `create_time`, `updater`, `update_time`, `deleted`) VALUES (28, 'MinIO 存储(示例)', 20, '', b'0', '{\"@class\":\"cn.iocoder.yudao.module.infra.framework.file.core.client.s3.S3FileClientConfig\",\"endpoint\":\"http://127.0.0.1:9000\",\"domain\":\"http://127.0.0.1:9000/yudao\",\"bucket\":\"yudao\",\"accessKey\":\"admin\",\"accessSecret\":\"password\",\"enablePathStyleAccess\":false,\"enablePublicAccess\":true}', '1', '2024-11-09 17:43:10', '1', '2025-08-18 08:35:14', b'0'); | |
| 292 | -INSERT INTO `infra_file_config` (`id`, `name`, `storage`, `remark`, `master`, `config`, `creator`, `create_time`, `updater`, `update_time`, `deleted`) VALUES (29, '本地存储(示例)', 10, '仅适合 mac 或 windows', b'0', '{\"@class\":\"cn.iocoder.yudao.module.infra.framework.file.core.client.local.LocalFileClientConfig\",\"basePath\":\"/Users/yunai/tmp/file\",\"domain\":\"http://127.0.0.1:48080\"}', '1', '2025-05-02 11:25:45', '1', '2025-08-18 08:35:14', b'0'); | |
| 293 | -INSERT INTO `infra_file_config` (`id`, `name`, `storage`, `remark`, `master`, `config`, `creator`, `create_time`, `updater`, `update_time`, `deleted`) VALUES (30, 'SFTP 存储(示例)', 12, '', b'0', '{\"@class\":\"cn.iocoder.yudao.module.infra.framework.file.core.client.sftp.SftpFileClientConfig\",\"basePath\":\"/upload\",\"domain\":\"http://127.0.0.1:48080\",\"host\":\"127.0.0.1\",\"port\":2222,\"username\":\"foo\",\"password\":\"pass\"}', '1', '2025-05-02 16:34:10', '1', '2025-08-18 08:35:14', b'0'); | |
| 294 | -INSERT INTO `infra_file_config` (`id`, `name`, `storage`, `remark`, `master`, `config`, `creator`, `create_time`, `updater`, `update_time`, `deleted`) VALUES (34, '七牛云存储【私有】(示例)', 20, '请换成你自己的密钥!!!', b'0', '{\"@class\":\"cn.iocoder.yudao.module.infra.framework.file.core.client.s3.S3FileClientConfig\",\"endpoint\":\"s3.cn-south-1.qiniucs.com\",\"domain\":\"http://t151glocd.hn-bkt.clouddn.com\",\"bucket\":\"ruoyi-vue-pro-private\",\"accessKey\":\"3TvrJ70gl2Gt6IBe7_IZT1F6i_k0iMuRtyEv4EyS\",\"accessSecret\":\"wd0tbVBYlp0S-ihA8Qg2hPLncoP83wyrIq24OZuY\",\"enablePathStyleAccess\":false,\"enablePublicAccess\":false}', '1', '2025-08-17 21:22:00', '1', '2025-08-18 08:35:55', b'0'); | |
| 285 | +INSERT INTO `infra_file_config` (`id`, `name`, `storage`, `remark`, `master`, `config`, `creator`, `create_time`, `updater`, `update_time`, `deleted`) VALUES (4, '数据库(示例)', 1, '我是数据库', b'0', '{\"@class\":\"cn.iocoder.yudao.module.infra.framework.file.core.client.db.DBFileClientConfig\",\"domain\":\"http://127.0.0.1:48080\"}', '1', '2022-03-15 23:56:24', '1', '2025-11-24 20:57:14', b'0'); | |
| 286 | +INSERT INTO `infra_file_config` (`id`, `name`, `storage`, `remark`, `master`, `config`, `creator`, `create_time`, `updater`, `update_time`, `deleted`) VALUES (22, '七牛存储器(示例)', 20, '请换成你自己的密钥!!!', b'1', '{\"@class\":\"cn.iocoder.yudao.module.infra.framework.file.core.client.s3.S3FileClientConfig\",\"endpoint\":\"s3.cn-south-1.qiniucs.com\",\"domain\":\"http://test.yudao.iocoder.cn\",\"bucket\":\"ruoyi-vue-pro\",\"accessKey\":\"3TvrJ70gl2Gt6IBe7_IZT1F6i_k0iMuRtyEv4EyS\",\"accessSecret\":\"wd0tbVBYlp0S-ihA8Qg2hPLncoP83wyrIq24OZuY\",\"enablePathStyleAccess\":false,\"enablePublicAccess\":true}', '1', '2024-01-13 22:11:12', '1', '2025-11-24 20:57:14', b'0'); | |
| 287 | +INSERT INTO `infra_file_config` (`id`, `name`, `storage`, `remark`, `master`, `config`, `creator`, `create_time`, `updater`, `update_time`, `deleted`) VALUES (24, '腾讯云存储(示例)', 20, '请换成你的密钥!!!', b'0', '{\"@class\":\"cn.iocoder.yudao.module.infra.framework.file.core.client.s3.S3FileClientConfig\",\"endpoint\":\"https://cos.ap-shanghai.myqcloud.com\",\"domain\":\"http://tengxun-oss.iocoder.cn\",\"bucket\":\"aoteman-1255880240\",\"accessKey\":\"AKIDAF6WSh1uiIjwqtrOsGSN3WryqTM6cTMt\",\"accessSecret\":\"X\",\"enablePathStyleAccess\":false,\"enablePublicAccess\":true}', '1', '2024-11-09 16:03:22', '1', '2025-11-24 20:57:14', b'0'); | |
| 288 | +INSERT INTO `infra_file_config` (`id`, `name`, `storage`, `remark`, `master`, `config`, `creator`, `create_time`, `updater`, `update_time`, `deleted`) VALUES (25, '阿里云存储(示例)', 20, '', b'0', '{\"@class\":\"cn.iocoder.yudao.module.infra.framework.file.core.client.s3.S3FileClientConfig\",\"endpoint\":\"oss-cn-beijing.aliyuncs.com\",\"domain\":\"http://ali-oss.iocoder.cn\",\"bucket\":\"yunai-aoteman\",\"accessKey\":\"LTAI5tEQLgnDyjh3WpNcdMKA\",\"accessSecret\":\"X\",\"enablePathStyleAccess\":false,\"enablePublicAccess\":true}', '1', '2024-11-09 16:47:08', '1', '2025-11-24 20:57:14', b'0'); | |
| 289 | +INSERT INTO `infra_file_config` (`id`, `name`, `storage`, `remark`, `master`, `config`, `creator`, `create_time`, `updater`, `update_time`, `deleted`) VALUES (26, '火山云存储(示例)', 20, '', b'0', '{\"@class\":\"cn.iocoder.yudao.module.infra.framework.file.core.client.s3.S3FileClientConfig\",\"endpoint\":\"tos-s3-cn-beijing.volces.com\",\"domain\":null,\"bucket\":\"yunai\",\"accessKey\":\"AKLTZjc3Zjc4MzZmMjU3NDk0ZTgxYmIyMmFkNTIwMDI1ZGE\",\"accessSecret\":\"X==\",\"enablePathStyleAccess\":false,\"enablePublicAccess\":true}', '1', '2024-11-09 16:56:42', '1', '2025-11-24 20:57:14', b'0'); | |
| 290 | +INSERT INTO `infra_file_config` (`id`, `name`, `storage`, `remark`, `master`, `config`, `creator`, `create_time`, `updater`, `update_time`, `deleted`) VALUES (27, '华为云存储(示例)', 20, '', b'0', '{\"@class\":\"cn.iocoder.yudao.module.infra.framework.file.core.client.s3.S3FileClientConfig\",\"endpoint\":\"obs.cn-east-3.myhuaweicloud.com\",\"domain\":\"\",\"bucket\":\"yudao\",\"accessKey\":\"PVDONDEIOTW88LF8DC4U\",\"accessSecret\":\"X\",\"enablePathStyleAccess\":false,\"enablePublicAccess\":true}', '1', '2024-11-09 17:18:41', '1', '2025-11-24 20:57:14', b'0'); | |
| 291 | +INSERT INTO `infra_file_config` (`id`, `name`, `storage`, `remark`, `master`, `config`, `creator`, `create_time`, `updater`, `update_time`, `deleted`) VALUES (28, 'MinIO 存储(示例)', 20, '', b'0', '{\"@class\":\"cn.iocoder.yudao.module.infra.framework.file.core.client.s3.S3FileClientConfig\",\"endpoint\":\"http://127.0.0.1:9000\",\"domain\":\"http://127.0.0.1:9000/yudao\",\"bucket\":\"yudao\",\"accessKey\":\"admin\",\"accessSecret\":\"password\",\"enablePathStyleAccess\":false,\"enablePublicAccess\":true}', '1', '2024-11-09 17:43:10', '1', '2025-11-24 20:57:14', b'0'); | |
| 292 | +INSERT INTO `infra_file_config` (`id`, `name`, `storage`, `remark`, `master`, `config`, `creator`, `create_time`, `updater`, `update_time`, `deleted`) VALUES (29, '本地存储(示例)', 10, 'mac/linux 使用 /,windows 使用 \\', b'0', '{\"@class\":\"cn.iocoder.yudao.module.infra.framework.file.core.client.local.LocalFileClientConfig\",\"basePath\":\"/Users/yunai/tmp/file\",\"domain\":\"http://127.0.0.1:48080\"}', '1', '2025-05-02 11:25:45', '1', '2025-11-24 20:57:14', b'0'); | |
| 293 | +INSERT INTO `infra_file_config` (`id`, `name`, `storage`, `remark`, `master`, `config`, `creator`, `create_time`, `updater`, `update_time`, `deleted`) VALUES (30, 'SFTP 存储(示例)', 12, '', b'0', '{\"@class\":\"cn.iocoder.yudao.module.infra.framework.file.core.client.sftp.SftpFileClientConfig\",\"basePath\":\"/upload\",\"domain\":\"http://127.0.0.1:48080\",\"host\":\"127.0.0.1\",\"port\":2222,\"username\":\"foo\",\"password\":\"pass\"}', '1', '2025-05-02 16:34:10', '1', '2025-11-24 20:57:14', b'0'); | |
| 294 | +INSERT INTO `infra_file_config` (`id`, `name`, `storage`, `remark`, `master`, `config`, `creator`, `create_time`, `updater`, `update_time`, `deleted`) VALUES (34, '七牛云存储【私有】(示例)', 20, '请换成你自己的密钥!!!', b'0', '{\"@class\":\"cn.iocoder.yudao.module.infra.framework.file.core.client.s3.S3FileClientConfig\",\"endpoint\":\"s3.cn-south-1.qiniucs.com\",\"domain\":\"http://t151glocd.hn-bkt.clouddn.com\",\"bucket\":\"ruoyi-vue-pro-private\",\"accessKey\":\"3TvrJ70gl2Gt6IBe7_IZT1F6i_k0iMuRtyEv4EyS\",\"accessSecret\":\"wd0tbVBYlp0S-ihA8Qg2hPLncoP83wyrIq24OZuY\",\"enablePathStyleAccess\":false,\"enablePublicAccess\":false}', '1', '2025-08-17 21:22:00', '1', '2025-11-24 20:57:14', b'0'); | |
| 295 | +INSERT INTO `infra_file_config` (`id`, `name`, `storage`, `remark`, `master`, `config`, `creator`, `create_time`, `updater`, `update_time`, `deleted`) VALUES (35, '1', 20, '1', b'0', '{\"@class\":\"cn.iocoder.yudao.module.infra.framework.file.core.client.s3.S3FileClientConfig\",\"endpoint\":\"http://www.baidu.com\",\"domain\":\"http://www.xxx.com\",\"bucket\":\"1\",\"accessKey\":\"2\",\"accessSecret\":\"3\",\"enablePathStyleAccess\":false,\"enablePublicAccess\":false}', '1', '2025-10-02 14:32:12', '1', '2025-11-24 20:57:14', b'0'); | |
| 295 | 296 | COMMIT; |
| 296 | 297 | |
| 297 | 298 | -- ---------------------------- |
| ... | ... | @@ -337,7 +338,7 @@ CREATE TABLE `infra_job` ( |
| 337 | 338 | `update_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间', |
| 338 | 339 | `deleted` bit(1) NOT NULL DEFAULT b'0' COMMENT '是否删除', |
| 339 | 340 | PRIMARY KEY (`id`) USING BTREE |
| 340 | -) ENGINE = InnoDB AUTO_INCREMENT = 38 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci COMMENT = '定时任务表'; | |
| 341 | +) ENGINE = InnoDB AUTO_INCREMENT = 41 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci COMMENT = '定时任务表'; | |
| 341 | 342 | |
| 342 | 343 | -- ---------------------------- |
| 343 | 344 | -- Records of infra_job |
| ... | ... | @@ -347,10 +348,10 @@ INSERT INTO `infra_job` (`id`, `name`, `status`, `handler_name`, `handler_param` |
| 347 | 348 | INSERT INTO `infra_job` (`id`, `name`, `status`, `handler_name`, `handler_param`, `cron_expression`, `retry_count`, `retry_interval`, `monitor_timeout`, `creator`, `create_time`, `updater`, `update_time`, `deleted`) VALUES (17, '支付订单同步 Job', 2, 'payOrderSyncJob', NULL, '0 0/1 * * * ?', 0, 0, 0, '1', '2023-07-22 14:36:26', '1', '2023-07-22 15:39:08', b'0'); |
| 348 | 349 | INSERT INTO `infra_job` (`id`, `name`, `status`, `handler_name`, `handler_param`, `cron_expression`, `retry_count`, `retry_interval`, `monitor_timeout`, `creator`, `create_time`, `updater`, `update_time`, `deleted`) VALUES (18, '支付订单过期 Job', 2, 'payOrderExpireJob', NULL, '0 0/1 * * * ?', 0, 0, 0, '1', '2023-07-22 15:36:23', '1', '2023-07-22 15:39:54', b'0'); |
| 349 | 350 | INSERT INTO `infra_job` (`id`, `name`, `status`, `handler_name`, `handler_param`, `cron_expression`, `retry_count`, `retry_interval`, `monitor_timeout`, `creator`, `create_time`, `updater`, `update_time`, `deleted`) VALUES (19, '退款订单的同步 Job', 2, 'payRefundSyncJob', NULL, '0 0/1 * * * ?', 0, 0, 0, '1', '2023-07-23 21:03:44', '1', '2023-07-23 21:09:00', b'0'); |
| 350 | -INSERT INTO `infra_job` (`id`, `name`, `status`, `handler_name`, `handler_param`, `cron_expression`, `retry_count`, `retry_interval`, `monitor_timeout`, `creator`, `create_time`, `updater`, `update_time`, `deleted`) VALUES (21, '交易订单的自动过期 Job', 2, 'tradeOrderAutoCancelJob', '', '0 * * * * ?', 3, 0, 0, '1', '2023-09-25 23:43:26', '1', '2023-09-26 19:23:30', b'0'); | |
| 351 | -INSERT INTO `infra_job` (`id`, `name`, `status`, `handler_name`, `handler_param`, `cron_expression`, `retry_count`, `retry_interval`, `monitor_timeout`, `creator`, `create_time`, `updater`, `update_time`, `deleted`) VALUES (22, '交易订单的自动收货 Job', 2, 'tradeOrderAutoReceiveJob', '', '0 * * * * ?', 3, 0, 0, '1', '2023-09-26 19:23:53', '1', '2023-09-26 23:38:08', b'0'); | |
| 352 | -INSERT INTO `infra_job` (`id`, `name`, `status`, `handler_name`, `handler_param`, `cron_expression`, `retry_count`, `retry_interval`, `monitor_timeout`, `creator`, `create_time`, `updater`, `update_time`, `deleted`) VALUES (23, '交易订单的自动评论 Job', 2, 'tradeOrderAutoCommentJob', '', '0 * * * * ?', 3, 0, 0, '1', '2023-09-26 23:38:29', '1', '2023-09-27 11:03:10', b'0'); | |
| 353 | -INSERT INTO `infra_job` (`id`, `name`, `status`, `handler_name`, `handler_param`, `cron_expression`, `retry_count`, `retry_interval`, `monitor_timeout`, `creator`, `create_time`, `updater`, `update_time`, `deleted`) VALUES (24, '佣金解冻 Job', 2, 'brokerageRecordUnfreezeJob', '', '0 * * * * ?', 3, 0, 0, '1', '2023-09-28 22:01:46', '1', '2023-09-28 22:01:56', b'0'); | |
| 351 | +INSERT INTO `infra_job` (`id`, `name`, `status`, `handler_name`, `handler_param`, `cron_expression`, `retry_count`, `retry_interval`, `monitor_timeout`, `creator`, `create_time`, `updater`, `update_time`, `deleted`) VALUES (21, 'Mall 交易订单的自动过期 Job', 2, 'tradeOrderAutoCancelJob', '', '0 * * * * ?', 3, 0, 0, '1', '2023-09-25 23:43:26', '1', '2025-10-02 11:08:34', b'0'); | |
| 352 | +INSERT INTO `infra_job` (`id`, `name`, `status`, `handler_name`, `handler_param`, `cron_expression`, `retry_count`, `retry_interval`, `monitor_timeout`, `creator`, `create_time`, `updater`, `update_time`, `deleted`) VALUES (22, 'Mall 交易订单的自动收货 Job', 2, 'tradeOrderAutoReceiveJob', '', '0 * * * * ?', 3, 0, 0, '1', '2023-09-26 19:23:53', '1', '2025-10-02 11:08:36', b'0'); | |
| 353 | +INSERT INTO `infra_job` (`id`, `name`, `status`, `handler_name`, `handler_param`, `cron_expression`, `retry_count`, `retry_interval`, `monitor_timeout`, `creator`, `create_time`, `updater`, `update_time`, `deleted`) VALUES (23, 'Mall 交易订单的自动评论 Job', 2, 'tradeOrderAutoCommentJob', '', '0 * * * * ?', 3, 0, 0, '1', '2023-09-26 23:38:29', '1', '2025-10-02 11:08:38', b'0'); | |
| 354 | +INSERT INTO `infra_job` (`id`, `name`, `status`, `handler_name`, `handler_param`, `cron_expression`, `retry_count`, `retry_interval`, `monitor_timeout`, `creator`, `create_time`, `updater`, `update_time`, `deleted`) VALUES (24, 'Mall 佣金解冻 Job', 2, 'brokerageRecordUnfreezeJob', '', '0 * * * * ?', 3, 0, 0, '1', '2023-09-28 22:01:46', '1', '2025-10-02 11:08:04', b'0'); | |
| 354 | 355 | INSERT INTO `infra_job` (`id`, `name`, `status`, `handler_name`, `handler_param`, `cron_expression`, `retry_count`, `retry_interval`, `monitor_timeout`, `creator`, `create_time`, `updater`, `update_time`, `deleted`) VALUES (25, '访问日志清理 Job', 2, 'accessLogCleanJob', '', '0 0 0 * * ?', 3, 0, 0, '1', '2023-10-03 10:59:41', '1', '2023-10-03 11:01:10', b'0'); |
| 355 | 356 | INSERT INTO `infra_job` (`id`, `name`, `status`, `handler_name`, `handler_param`, `cron_expression`, `retry_count`, `retry_interval`, `monitor_timeout`, `creator`, `create_time`, `updater`, `update_time`, `deleted`) VALUES (26, '错误日志清理 Job', 2, 'errorLogCleanJob', '', '0 0 0 * * ?', 3, 0, 0, '1', '2023-10-03 11:00:43', '1', '2023-10-03 11:01:12', b'0'); |
| 356 | 357 | INSERT INTO `infra_job` (`id`, `name`, `status`, `handler_name`, `handler_param`, `cron_expression`, `retry_count`, `retry_interval`, `monitor_timeout`, `creator`, `create_time`, `updater`, `update_time`, `deleted`) VALUES (27, '任务日志清理 Job', 2, 'jobLogCleanJob', '', '0 0 0 * * ?', 3, 0, 0, '1', '2023-10-03 11:01:33', '1', '2024-09-12 13:40:34', b'0'); |
| ... | ... | @@ -358,6 +359,9 @@ INSERT INTO `infra_job` (`id`, `name`, `status`, `handler_name`, `handler_param` |
| 358 | 359 | INSERT INTO `infra_job` (`id`, `name`, `status`, `handler_name`, `handler_param`, `cron_expression`, `retry_count`, `retry_interval`, `monitor_timeout`, `creator`, `create_time`, `updater`, `update_time`, `deleted`) VALUES (35, '转账订单的同步 Job', 2, 'payTransferSyncJob', '', '0 * * * * ?', 0, 0, 0, '1', '2025-05-10 17:35:54', '1', '2025-05-10 18:13:52', b'0'); |
| 359 | 360 | INSERT INTO `infra_job` (`id`, `name`, `status`, `handler_name`, `handler_param`, `cron_expression`, `retry_count`, `retry_interval`, `monitor_timeout`, `creator`, `create_time`, `updater`, `update_time`, `deleted`) VALUES (36, 'IoT 设备离线检查 Job', 2, 'iotDeviceOfflineCheckJob', '', '0 * * * * ?', 0, 0, 0, '1', '2025-07-03 23:48:44', '\"1\"', '2025-07-03 23:48:47', b'0'); |
| 360 | 361 | INSERT INTO `infra_job` (`id`, `name`, `status`, `handler_name`, `handler_param`, `cron_expression`, `retry_count`, `retry_interval`, `monitor_timeout`, `creator`, `create_time`, `updater`, `update_time`, `deleted`) VALUES (37, 'IoT OTA 升级推送 Job', 2, 'iotOtaUpgradeJob', '', '0 * * * * ?', 0, 0, 0, '1', '2025-07-03 23:49:07', '\"1\"', '2025-07-03 23:49:13', b'0'); |
| 362 | +INSERT INTO `infra_job` (`id`, `name`, `status`, `handler_name`, `handler_param`, `cron_expression`, `retry_count`, `retry_interval`, `monitor_timeout`, `creator`, `create_time`, `updater`, `update_time`, `deleted`) VALUES (38, 'Mall 拼团过期 Job', 2, 'combinationRecordExpireJob', '', '0 * * * * ?', 0, 0, 0, '1', '2025-10-02 11:07:11', '1', '2025-10-02 11:07:14', b'0'); | |
| 363 | +INSERT INTO `infra_job` (`id`, `name`, `status`, `handler_name`, `handler_param`, `cron_expression`, `retry_count`, `retry_interval`, `monitor_timeout`, `creator`, `create_time`, `updater`, `update_time`, `deleted`) VALUES (39, 'Mall 优惠券过期 Job', 2, 'couponExpireJob', '', '0 * * * * ?', 0, 0, 0, '1', '2025-10-02 11:07:34', '1', '2025-10-02 11:07:37', b'0'); | |
| 364 | +INSERT INTO `infra_job` (`id`, `name`, `status`, `handler_name`, `handler_param`, `cron_expression`, `retry_count`, `retry_interval`, `monitor_timeout`, `creator`, `create_time`, `updater`, `update_time`, `deleted`) VALUES (40, 'Mall 商品统计 Job', 2, 'productStatisticsJob', '', '0 0 0 * * ?', 0, 0, 0, '1', '2025-11-22 18:51:25', '1', '2025-11-22 18:56:21', b'0'); | |
| 361 | 365 | COMMIT; |
| 362 | 366 | |
| 363 | 367 | -- ---------------------------- |
| ... | ... | @@ -381,7 +385,7 @@ CREATE TABLE `infra_job_log` ( |
| 381 | 385 | `update_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间', |
| 382 | 386 | `deleted` bit(1) NOT NULL DEFAULT b'0' COMMENT '是否删除', |
| 383 | 387 | PRIMARY KEY (`id`) USING BTREE |
| 384 | -) ENGINE = InnoDB AUTO_INCREMENT = 980 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci COMMENT = '定时任务日志表'; | |
| 388 | +) ENGINE = InnoDB AUTO_INCREMENT = 987 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci COMMENT = '定时任务日志表'; | |
| 385 | 389 | |
| 386 | 390 | -- ---------------------------- |
| 387 | 391 | -- Records of infra_job_log |
| ... | ... | @@ -409,7 +413,7 @@ CREATE TABLE `system_dept` ( |
| 409 | 413 | `deleted` bit(1) NOT NULL DEFAULT b'0' COMMENT '是否删除', |
| 410 | 414 | `tenant_id` bigint NOT NULL DEFAULT 0 COMMENT '租户编号', |
| 411 | 415 | PRIMARY KEY (`id`) USING BTREE |
| 412 | -) ENGINE = InnoDB AUTO_INCREMENT = 115 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci COMMENT = '部门表'; | |
| 416 | +) ENGINE = InnoDB AUTO_INCREMENT = 116 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci COMMENT = '部门表'; | |
| 413 | 417 | |
| 414 | 418 | -- ---------------------------- |
| 415 | 419 | -- Records of system_dept |
| ... | ... | @@ -451,7 +455,7 @@ CREATE TABLE `system_dict_data` ( |
| 451 | 455 | `update_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间', |
| 452 | 456 | `deleted` bit(1) NOT NULL DEFAULT b'0' COMMENT '是否删除', |
| 453 | 457 | PRIMARY KEY (`id`) USING BTREE |
| 454 | -) ENGINE = InnoDB AUTO_INCREMENT = 3031 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci COMMENT = '字典数据表'; | |
| 458 | +) ENGINE = InnoDB AUTO_INCREMENT = 3035 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci COMMENT = '字典数据表'; | |
| 455 | 459 | |
| 456 | 460 | -- ---------------------------- |
| 457 | 461 | -- Records of system_dict_data |
| ... | ... | @@ -883,7 +887,7 @@ INSERT INTO `system_dict_data` (`id`, `sort`, `label`, `value`, `dict_type`, `st |
| 883 | 887 | 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 (1690, 5, '向量', '5', 'ai_model_type', 0, '', '', '', '1', '2025-03-03 12:28:15', '1', '2025-03-03 12:28:15', b'0'); |
| 884 | 888 | 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 (1691, 6, '重排', '6', 'ai_model_type', 0, '', '', '', '1', '2025-03-03 12:28:26', '1', '2025-03-03 12:28:26', b'0'); |
| 885 | 889 | 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 (1692, 14, 'MiniMax', 'MiniMax', 'ai_platform', 0, '', '', '', '1', '2025-03-11 20:04:51', '1', '2025-03-11 20:04:51', b'0'); |
| 886 | -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 (1693, 15, '月之暗灭', 'Moonshot', 'ai_platform', 0, '', '', '', '1', '2025-03-11 20:05:08', '1', '2025-03-11 20:05:08', b'0'); | |
| 890 | +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 (1693, 15, '月之暗面', 'Moonshot', 'ai_platform', 0, '', '', '', '1', '2025-03-11 20:05:08', '1', '2025-11-24 07:17:39', b'0'); | |
| 887 | 891 | 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 (2002, 0, '直连设备', '0', 'iot_product_device_type', 0, 'default', '', '', '1', '2024-08-10 11:54:58', '1', '2025-03-17 09:28:22', b'0'); |
| 888 | 892 | 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 (2003, 2, '网关设备', '2', 'iot_product_device_type', 0, 'default', '', '', '1', '2024-08-10 11:55:08', '1', '2025-03-17 09:28:28', b'0'); |
| 889 | 893 | 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 (2004, 1, '网关子设备', '1', 'iot_product_device_type', 0, 'default', '', '', '1', '2024-08-10 11:55:20', '1', '2025-03-17 09:28:31', b'0'); |
| ... | ... | @@ -1054,7 +1058,7 @@ INSERT INTO `system_dict_data` (`id`, `sort`, `label`, `value`, `dict_type`, `st |
| 1054 | 1058 | 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 (2185, 2, '设备服务调用', '2', 'iot_rule_scene_action_type_enum', 0, 'primary', '', '', '1', '2025-03-28 15:27:25', '\"1\"', '2025-07-06 10:37:41', b'0'); |
| 1055 | 1059 | 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 (2186, 100, '告警触发', '100', 'iot_rule_scene_action_type_enum', 0, 'primary', '', '', '1', '2025-03-28 15:27:35', '\"1\"', '2025-07-06 10:37:50', b'0'); |
| 1056 | 1060 | 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 (3000, 16, '百川智能', 'BaiChuan', 'ai_platform', 0, '', '', '', '1', '2025-03-23 12:15:46', '1', '2025-03-23 12:15:46', b'0'); |
| 1057 | -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 (3001, 50, 'Vben5.0 Ant Design Schema 模版', '40', 'infra_codegen_front_type', 0, '', '', NULL, '1', '2025-04-23 21:47:47', '1', '2025-05-02 12:01:15', b'0'); | |
| 1061 | +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 (3001, 40, 'Vben5.0 Ant Design Schema 模版', '40', 'infra_codegen_front_type', 0, '', '', NULL, '1', '2025-04-23 21:47:47', '1', '2025-09-04 23:25:12', b'0'); | |
| 1058 | 1062 | 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 (3002, 6, '支付宝余额', '6', 'brokerage_withdraw_type', 0, '', '', 'API 打款', '1', '2025-05-10 08:24:49', '1', '2025-05-10 08:24:49', b'0'); |
| 1059 | 1063 | 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 (3003, 1, 'Alink', 'Alink', 'iot_codec_type', 0, '', '', '阿里云 Alink', '1', '2025-06-12 22:56:06', '1', '2025-06-12 23:22:24', b'0'); |
| 1060 | 1064 | 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 (3004, 3, 'WARN', '3', 'iot_alert_level', 0, 'warning', '', '', '1', '2025-06-27 20:32:22', '1', '2025-06-27 20:34:31', b'0'); |
| ... | ... | @@ -1084,6 +1088,10 @@ INSERT INTO `system_dict_data` (`id`, `sort`, `label`, `value`, `dict_type`, `st |
| 1084 | 1088 | 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 (3028, 2, 'Anthropic', 'Anthropic', 'ai_platform', 0, '', '', '', '1', '2025-08-21 22:54:24', '1', '2025-08-21 22:57:58', b'0'); |
| 1085 | 1089 | 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 (3029, 2, '谷歌 Gemini', 'Gemini', 'ai_platform', 0, '', '', '', '1', '2025-08-22 22:39:35', '1', '2025-08-22 22:44:49', b'0'); |
| 1086 | 1090 | 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 (3030, 1, '文件系统', 'filesystem', 'ai_mcp_client_name', 0, '', '', '', '1', '2025-08-28 13:58:43', '1', '2025-08-28 21:19:42', b'0'); |
| 1091 | +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 (3031, 41, 'Vben5.0 Ant Design 标准模版', '41', 'infra_codegen_front_type', 0, '', '', '', '1', '2025-09-04 23:26:07', '1', '2025-09-04 23:26:07', b'0'); | |
| 1092 | +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 (3032, 50, 'Vben5.0 Element Plus Schema 模版', '50', 'infra_codegen_front_type', 0, '', '', '', '1', '2025-09-04 23:26:38', '1', '2025-09-04 23:26:38', b'0'); | |
| 1093 | +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 (3033, 51, 'Vben5.0 Element Plus 标准模版', '51', 'infra_codegen_front_type', 0, '', '', '', '1', '2025-09-04 23:26:49', '1', '2025-09-04 23:26:49', b'0'); | |
| 1094 | +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 (3034, 1, 'ttt', 'tt', 'iot_ota_task_record_status', 0, 'success', '', NULL, '1', '2025-09-06 00:02:21', '1', '2025-09-06 00:02:31', b'0'); | |
| 1087 | 1095 | COMMIT; |
| 1088 | 1096 | |
| 1089 | 1097 | -- ---------------------------- |
| ... | ... | @@ -1243,7 +1251,7 @@ CREATE TABLE `system_login_log` ( |
| 1243 | 1251 | `deleted` bit(1) NOT NULL DEFAULT b'0' COMMENT '是否删除', |
| 1244 | 1252 | `tenant_id` bigint NOT NULL DEFAULT 0 COMMENT '租户编号', |
| 1245 | 1253 | PRIMARY KEY (`id`) USING BTREE |
| 1246 | -) ENGINE = InnoDB AUTO_INCREMENT = 4021 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci COMMENT = '系统访问记录'; | |
| 1254 | +) ENGINE = InnoDB AUTO_INCREMENT = 4066 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci COMMENT = '系统访问记录'; | |
| 1247 | 1255 | |
| 1248 | 1256 | -- ---------------------------- |
| 1249 | 1257 | -- Records of system_login_log |
| ... | ... | @@ -1311,7 +1319,7 @@ CREATE TABLE `system_mail_log` ( |
| 1311 | 1319 | `update_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间', |
| 1312 | 1320 | `deleted` bit(1) NOT NULL DEFAULT b'0' COMMENT '是否删除', |
| 1313 | 1321 | PRIMARY KEY (`id`) USING BTREE |
| 1314 | -) ENGINE = InnoDB AUTO_INCREMENT = 367 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci COMMENT = '邮件日志表'; | |
| 1322 | +) ENGINE = InnoDB AUTO_INCREMENT = 368 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci COMMENT = '邮件日志表'; | |
| 1315 | 1323 | |
| 1316 | 1324 | -- ---------------------------- |
| 1317 | 1325 | -- Records of system_mail_log |
| ... | ... | @@ -1376,7 +1384,7 @@ CREATE TABLE `system_menu` ( |
| 1376 | 1384 | `update_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间', |
| 1377 | 1385 | `deleted` bit(1) NOT NULL DEFAULT b'0' COMMENT '是否删除', |
| 1378 | 1386 | PRIMARY KEY (`id`) USING BTREE |
| 1379 | -) ENGINE = InnoDB AUTO_INCREMENT = 5042 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci COMMENT = '菜单权限表'; | |
| 1387 | +) ENGINE = InnoDB AUTO_INCREMENT = 5047 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci COMMENT = '菜单权限表'; | |
| 1380 | 1388 | |
| 1381 | 1389 | -- ---------------------------- |
| 1382 | 1390 | -- Records of system_menu |
| ... | ... | @@ -1594,7 +1602,7 @@ INSERT INTO `system_menu` (`id`, `name`, `permission`, `type`, `sort`, `parent_i |
| 1594 | 1602 | 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 (2010, '品牌创建', 'product:brand:create', 3, 2, 2008, '', '', '', NULL, 0, b'1', b'1', b'1', '', '2022-07-30 13:52:44', '', '2022-07-30 13:52:44', b'0'); |
| 1595 | 1603 | 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 (2011, '品牌更新', 'product:brand:update', 3, 3, 2008, '', '', '', NULL, 0, b'1', b'1', b'1', '', '2022-07-30 13:52:44', '', '2022-07-30 13:52:44', b'0'); |
| 1596 | 1604 | 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 (2012, '品牌删除', 'product:brand:delete', 3, 4, 2008, '', '', '', NULL, 0, b'1', b'1', b'1', '', '2022-07-30 13:52:44', '', '2022-07-30 13:52:44', b'0'); |
| 1597 | -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 (2014, '商品列表', '', 2, 1, 2000, 'spu', 'ep:apple', 'mall/product/spu/index', 'ProductSpu', 0, b'1', b'1', b'1', '', '2022-07-30 14:22:58', '1', '2023-08-21 10:27:01', b'0'); | |
| 1605 | +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 (2014, '商品列表', '', 2, 1, 2000, 'spu', 'ep:apple', 'mall/product/spu/index', 'ProductSpu', 0, b'1', b'1', b'1', '', '2022-07-30 14:22:58', '1', '2025-10-08 10:36:52', b'0'); | |
| 1598 | 1606 | 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 (2015, '商品查询', 'product:spu:query', 3, 1, 2014, '', '', '', NULL, 0, b'1', b'1', b'1', '', '2022-07-30 14:22:58', '', '2022-07-30 14:22:58', b'0'); |
| 1599 | 1607 | 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 (2016, '商品创建', 'product:spu:create', 3, 2, 2014, '', '', '', NULL, 0, b'1', b'1', b'1', '', '2022-07-30 14:22:58', '', '2022-07-30 14:22:58', b'0'); |
| 1600 | 1608 | 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 (2017, '商品更新', 'product:spu:update', 3, 3, 2014, '', '', '', NULL, 0, b'1', b'1', b'1', '', '2022-07-30 14:22:58', '', '2022-07-30 14:22:58', b'0'); |
| ... | ... | @@ -2313,6 +2321,11 @@ INSERT INTO `system_menu` (`id`, `name`, `permission`, `type`, `sort`, `parent_i |
| 2313 | 2321 | 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 (5039, 'OTA 升级任务创建', 'iot:ota-task:create', 3, 12, 5032, '', '', '', '', 0, b'1', b'1', b'1', '1', '2025-07-02 23:57:52', '1', '2025-07-02 23:57:52', b'0'); |
| 2314 | 2322 | 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 (5040, 'OTA 升级记录查询', 'iot:ota-task-record:query', 3, 21, 5032, '', '', '', '', 0, b'1', b'1', b'1', '1', '2025-07-02 23:58:30', '1', '2025-07-02 23:58:30', b'0'); |
| 2315 | 2323 | 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 (5041, 'OTA 升级记录取消', 'iot:ota-task-record:cancel', 3, 23, 5032, '', '', '', '', 0, b'1', b'1', b'1', '1', '2025-07-02 23:59:18', '1', '2025-07-02 23:59:18', b'0'); |
| 2324 | +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 (5042, '模版消息', '', 2, 5, 2084, 'message-template', 'ep:notebook', 'mp/messageTemplate/index', 'MpMessageTemplate', 0, b'1', b'1', b'1', '1', '2025-11-26 16:45:35', '1', '2025-11-26 18:44:52', b'0'); | |
| 2325 | +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 (5043, '查询模版消息', 'mp:message-template:query', 3, 1, 5042, '', '', '', '', 0, b'1', b'1', b'1', '1', '2025-11-26 17:00:15', '1', '2025-11-26 18:45:00', b'0'); | |
| 2326 | +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'); | |
| 2327 | +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'); | |
| 2328 | +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'); | |
| 2316 | 2329 | COMMIT; |
| 2317 | 2330 | |
| 2318 | 2331 | -- ---------------------------- |
| ... | ... | @@ -2434,7 +2447,7 @@ CREATE TABLE `system_oauth2_access_token` ( |
| 2434 | 2447 | PRIMARY KEY (`id`) USING BTREE, |
| 2435 | 2448 | INDEX `idx_access_token`(`access_token` ASC) USING BTREE, |
| 2436 | 2449 | INDEX `idx_refresh_token`(`refresh_token` ASC) USING BTREE |
| 2437 | -) ENGINE = InnoDB AUTO_INCREMENT = 20179 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci COMMENT = 'OAuth2 访问令牌'; | |
| 2450 | +) ENGINE = InnoDB AUTO_INCREMENT = 39737 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci COMMENT = 'OAuth2 访问令牌'; | |
| 2438 | 2451 | |
| 2439 | 2452 | -- ---------------------------- |
| 2440 | 2453 | -- Records of system_oauth2_access_token |
| ... | ... | @@ -2505,7 +2518,7 @@ BEGIN; |
| 2505 | 2518 | INSERT INTO `system_oauth2_client` (`id`, `client_id`, `secret`, `name`, `logo`, `description`, `status`, `access_token_validity_seconds`, `refresh_token_validity_seconds`, `redirect_uris`, `authorized_grant_types`, `scopes`, `auto_approve_scopes`, `authorities`, `resource_ids`, `additional_information`, `creator`, `create_time`, `updater`, `update_time`, `deleted`) VALUES (1, 'default', 'admin123', '芋道源码', 'http://test.yudao.iocoder.cn/20250502/sort2_1746189740718.png', '我是描述', 0, 1800, 2592000, '[\"https://www.iocoder.cn\",\"https://doc.iocoder.cn\"]', '[\"password\",\"authorization_code\",\"implicit\",\"refresh_token\",\"client_credentials\"]', '[\"user.read\",\"user.write\"]', '[]', '[\"user.read\",\"user.write\"]', '[]', '{}', '1', '2022-05-11 21:47:12', '1', '2025-08-21 10:04:50', b'0'); |
| 2506 | 2519 | INSERT INTO `system_oauth2_client` (`id`, `client_id`, `secret`, `name`, `logo`, `description`, `status`, `access_token_validity_seconds`, `refresh_token_validity_seconds`, `redirect_uris`, `authorized_grant_types`, `scopes`, `auto_approve_scopes`, `authorities`, `resource_ids`, `additional_information`, `creator`, `create_time`, `updater`, `update_time`, `deleted`) VALUES (40, 'test', 'test2', 'biubiu', 'http://test.yudao.iocoder.cn/xx/20250502/ed07110a37464b5299f8bd7c67ad65c7_1746187077009.jpg', '啦啦啦啦', 0, 1800, 43200, '[\"https://www.iocoder.cn\"]', '[\"password\",\"authorization_code\",\"implicit\"]', '[\"user_info\",\"projects\"]', '[\"user_info\"]', '[]', '[]', '{}', '1', '2022-05-12 00:28:20', '1', '2025-05-02 19:58:08', b'0'); |
| 2507 | 2520 | INSERT INTO `system_oauth2_client` (`id`, `client_id`, `secret`, `name`, `logo`, `description`, `status`, `access_token_validity_seconds`, `refresh_token_validity_seconds`, `redirect_uris`, `authorized_grant_types`, `scopes`, `auto_approve_scopes`, `authorities`, `resource_ids`, `additional_information`, `creator`, `create_time`, `updater`, `update_time`, `deleted`) VALUES (41, 'yudao-sso-demo-by-code', 'test', '基于授权码模式,如何实现 SSO 单点登录?', 'http://test.yudao.iocoder.cn/it/20250502/sign_1746181948685.png', NULL, 0, 1800, 43200, '[\"http://127.0.0.1:18080\"]', '[\"authorization_code\",\"refresh_token\"]', '[\"user.read\",\"user.write\"]', '[]', '[]', '[]', NULL, '1', '2022-09-29 13:28:31', '1', '2025-05-02 18:32:30', b'0'); |
| 2508 | -INSERT INTO `system_oauth2_client` (`id`, `client_id`, `secret`, `name`, `logo`, `description`, `status`, `access_token_validity_seconds`, `refresh_token_validity_seconds`, `redirect_uris`, `authorized_grant_types`, `scopes`, `auto_approve_scopes`, `authorities`, `resource_ids`, `additional_information`, `creator`, `create_time`, `updater`, `update_time`, `deleted`) VALUES (42, 'yudao-sso-demo-by-password', 'test', '基于密码模式,如何实现 SSO 单点登录?', 'http://test.yudao.iocoder.cn/604bdc695e13b3b22745be704d1f2aa8ee05c5f26f9fead6d1ca49005afbc857.jpeg', NULL, 0, 1800, 43200, '[\"http://127.0.0.1:18080\"]', '[\"password\",\"refresh_token\"]', '[\"user.read\",\"user.write\"]', '[]', '[]', '[]', NULL, '1', '2022-10-04 17:40:16', '1', '2025-05-04 16:00:46', b'0'); | |
| 2521 | +INSERT INTO `system_oauth2_client` (`id`, `client_id`, `secret`, `name`, `logo`, `description`, `status`, `access_token_validity_seconds`, `refresh_token_validity_seconds`, `redirect_uris`, `authorized_grant_types`, `scopes`, `auto_approve_scopes`, `authorities`, `resource_ids`, `additional_information`, `creator`, `create_time`, `updater`, `update_time`, `deleted`) VALUES (42, 'yudao-sso-demo-by-password', 'test', '基于密码模式,如何实现 SSO 单点登录?', 'http://test.yudao.iocoder.cn/20251025/images (3)_1761360515810.jpeg', NULL, 0, 1800, 43200, '[\"http://127.0.0.1:18080\"]', '[\"password\",\"refresh_token\"]', '[\"user.read\",\"user.write\"]', '[]', '[]', '[]', NULL, '1', '2022-10-04 17:40:16', '1', '2025-10-25 10:49:40', b'0'); | |
| 2509 | 2522 | COMMIT; |
| 2510 | 2523 | |
| 2511 | 2524 | -- ---------------------------- |
| ... | ... | @@ -2556,7 +2569,7 @@ CREATE TABLE `system_oauth2_refresh_token` ( |
| 2556 | 2569 | `deleted` bit(1) NOT NULL DEFAULT b'0' COMMENT '是否删除', |
| 2557 | 2570 | `tenant_id` bigint NOT NULL DEFAULT 0 COMMENT '租户编号', |
| 2558 | 2571 | PRIMARY KEY (`id`) USING BTREE |
| 2559 | -) ENGINE = InnoDB AUTO_INCREMENT = 2201 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci COMMENT = 'OAuth2 刷新令牌'; | |
| 2572 | +) ENGINE = InnoDB AUTO_INCREMENT = 2243 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci COMMENT = 'OAuth2 刷新令牌'; | |
| 2560 | 2573 | |
| 2561 | 2574 | -- ---------------------------- |
| 2562 | 2575 | -- Records of system_oauth2_refresh_token |
| ... | ... | @@ -2590,7 +2603,7 @@ CREATE TABLE `system_operate_log` ( |
| 2590 | 2603 | `deleted` bit(1) NOT NULL DEFAULT b'0' COMMENT '是否删除', |
| 2591 | 2604 | `tenant_id` bigint NOT NULL DEFAULT 0 COMMENT '租户编号', |
| 2592 | 2605 | PRIMARY KEY (`id`) USING BTREE |
| 2593 | -) ENGINE = InnoDB AUTO_INCREMENT = 9134 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci COMMENT = '操作日志记录 V2 版本'; | |
| 2606 | +) ENGINE = InnoDB AUTO_INCREMENT = 9178 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci COMMENT = '操作日志记录 V2 版本'; | |
| 2594 | 2607 | |
| 2595 | 2608 | -- ---------------------------- |
| 2596 | 2609 | -- Records of system_operate_log |
| ... | ... | @@ -2616,16 +2629,16 @@ CREATE TABLE `system_post` ( |
| 2616 | 2629 | `deleted` bit(1) NOT NULL DEFAULT b'0' COMMENT '是否删除', |
| 2617 | 2630 | `tenant_id` bigint NOT NULL DEFAULT 0 COMMENT '租户编号', |
| 2618 | 2631 | PRIMARY KEY (`id`) USING BTREE |
| 2619 | -) ENGINE = InnoDB AUTO_INCREMENT = 7 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci COMMENT = '岗位信息表'; | |
| 2632 | +) ENGINE = InnoDB AUTO_INCREMENT = 8 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci COMMENT = '岗位信息表'; | |
| 2620 | 2633 | |
| 2621 | 2634 | -- ---------------------------- |
| 2622 | 2635 | -- Records of system_post |
| 2623 | 2636 | -- ---------------------------- |
| 2624 | 2637 | BEGIN; |
| 2625 | -INSERT INTO `system_post` (`id`, `code`, `name`, `sort`, `status`, `remark`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (1, 'ceo', '董事长', 1, 0, '', 'admin', '2021-01-06 17:03:48', '1', '2023-02-11 15:19:04', b'0', 1); | |
| 2626 | 2638 | INSERT INTO `system_post` (`id`, `code`, `name`, `sort`, `status`, `remark`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (2, 'se', '项目经理', 2, 0, '', 'admin', '2021-01-05 17:03:48', '1', '2023-11-15 09:18:20', b'0', 1); |
| 2627 | 2639 | INSERT INTO `system_post` (`id`, `code`, `name`, `sort`, `status`, `remark`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (4, 'user', '普通员工', 4, 0, '111222', 'admin', '2021-01-05 17:03:48', '1', '2025-03-24 21:32:40', b'0', 1); |
| 2628 | 2640 | INSERT INTO `system_post` (`id`, `code`, `name`, `sort`, `status`, `remark`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (5, 'HR', '人力资源', 5, 0, '`', '1', '2024-03-24 20:45:40', '1', '2025-03-29 19:08:10', b'0', 1); |
| 2641 | +INSERT INTO `system_post` (`id`, `code`, `name`, `sort`, `status`, `remark`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (7, 'test', '测试', 10, 0, NULL, '1', '2025-09-02 08:45:57', '1', '2025-09-02 08:45:57', b'0', 1); | |
| 2629 | 2642 | COMMIT; |
| 2630 | 2643 | |
| 2631 | 2644 | -- ---------------------------- |
| ... | ... | @@ -2660,7 +2673,7 @@ INSERT INTO `system_role` (`id`, `name`, `code`, `sort`, `data_scope`, `data_sco |
| 2660 | 2673 | INSERT INTO `system_role` (`id`, `name`, `code`, `sort`, `data_scope`, `data_scope_dept_ids`, `status`, `type`, `remark`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (3, 'CRM 管理员', 'crm_admin', 2, 1, '', 0, 1, 'CRM 专属角色', '1', '2024-02-24 10:51:13', '1', '2024-02-24 02:51:32', b'0', 1); |
| 2661 | 2674 | INSERT INTO `system_role` (`id`, `name`, `code`, `sort`, `data_scope`, `data_scope_dept_ids`, `status`, `type`, `remark`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (109, '租户管理员', 'tenant_admin', 0, 1, '', 0, 1, '系统自动生成', '1', '2022-02-22 00:56:14', '1', '2022-02-22 00:56:14', b'0', 121); |
| 2662 | 2675 | INSERT INTO `system_role` (`id`, `name`, `code`, `sort`, `data_scope`, `data_scope_dept_ids`, `status`, `type`, `remark`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (111, '租户管理员', 'tenant_admin', 0, 1, '', 0, 1, '系统自动生成', '1', '2022-03-07 21:37:58', '1', '2022-03-07 21:37:58', b'0', 122); |
| 2663 | -INSERT INTO `system_role` (`id`, `name`, `code`, `sort`, `data_scope`, `data_scope_dept_ids`, `status`, `type`, `remark`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (155, '测试数据权限', 'test-dp', 3, 2, '[100,102,103,104,105,108]', 0, 2, '', '1', '2025-03-31 14:58:06', '1', '2025-04-17 23:07:44', b'0', 1); | |
| 2676 | +INSERT INTO `system_role` (`id`, `name`, `code`, `sort`, `data_scope`, `data_scope_dept_ids`, `status`, `type`, `remark`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (155, '测试数据权限', 'test-dp', 3, 2, '[112,100,102,103,104,105,107,108]', 0, 2, '', '1', '2025-03-31 14:58:06', '1', '2025-09-06 20:15:13', b'0', 1); | |
| 2664 | 2677 | COMMIT; |
| 2665 | 2678 | |
| 2666 | 2679 | -- ---------------------------- |
| ... | ... | @@ -2678,7 +2691,7 @@ CREATE TABLE `system_role_menu` ( |
| 2678 | 2691 | `deleted` bit(1) NOT NULL DEFAULT b'0' COMMENT '是否删除', |
| 2679 | 2692 | `tenant_id` bigint NOT NULL DEFAULT 0 COMMENT '租户编号', |
| 2680 | 2693 | PRIMARY KEY (`id`) USING BTREE |
| 2681 | -) ENGINE = InnoDB AUTO_INCREMENT = 6139 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci COMMENT = '角色和菜单关联表'; | |
| 2694 | +) ENGINE = InnoDB AUTO_INCREMENT = 6293 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci COMMENT = '角色和菜单关联表'; | |
| 2682 | 2695 | |
| 2683 | 2696 | -- ---------------------------- |
| 2684 | 2697 | -- Records of system_role_menu |
| ... | ... | @@ -3344,6 +3357,160 @@ INSERT INTO `system_role_menu` (`id`, `role_id`, `menu_id`, `creator`, `create_t |
| 3344 | 3357 | INSERT INTO `system_role_menu` (`id`, `role_id`, `menu_id`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (6135, 155, 4017, '1', '2025-04-01 13:49:30', '1', '2025-04-01 13:49:30', b'0', 1); |
| 3345 | 3358 | INSERT INTO `system_role_menu` (`id`, `role_id`, `menu_id`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (6136, 155, 4018, '1', '2025-04-01 13:49:30', '1', '2025-04-01 13:49:30', b'0', 1); |
| 3346 | 3359 | INSERT INTO `system_role_menu` (`id`, `role_id`, `menu_id`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (6137, 155, 4031, '1', '2025-04-01 13:49:30', '1', '2025-04-01 13:49:30', b'0', 1); |
| 3360 | +INSERT INTO `system_role_menu` (`id`, `role_id`, `menu_id`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (6139, 109, 1117, '1', '2025-09-06 20:52:12', '1', '2025-09-06 20:52:12', b'0', 121); | |
| 3361 | +INSERT INTO `system_role_menu` (`id`, `role_id`, `menu_id`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (6140, 109, 1126, '1', '2025-09-06 20:52:12', '1', '2025-09-06 20:52:12', b'0', 121); | |
| 3362 | +INSERT INTO `system_role_menu` (`id`, `role_id`, `menu_id`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (6141, 109, 1127, '1', '2025-09-06 20:52:12', '1', '2025-09-06 20:52:12', b'0', 121); | |
| 3363 | +INSERT INTO `system_role_menu` (`id`, `role_id`, `menu_id`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (6142, 109, 1128, '1', '2025-09-06 20:52:12', '1', '2025-09-06 20:52:12', b'0', 121); | |
| 3364 | +INSERT INTO `system_role_menu` (`id`, `role_id`, `menu_id`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (6143, 109, 1129, '1', '2025-09-06 20:52:12', '1', '2025-09-06 20:52:12', b'0', 121); | |
| 3365 | +INSERT INTO `system_role_menu` (`id`, `role_id`, `menu_id`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (6144, 109, 1130, '1', '2025-09-06 20:52:12', '1', '2025-09-06 20:52:12', b'0', 121); | |
| 3366 | +INSERT INTO `system_role_menu` (`id`, `role_id`, `menu_id`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (6145, 109, 1132, '1', '2025-09-06 20:52:12', '1', '2025-09-06 20:52:12', b'0', 121); | |
| 3367 | +INSERT INTO `system_role_menu` (`id`, `role_id`, `menu_id`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (6146, 109, 1133, '1', '2025-09-06 20:52:12', '1', '2025-09-06 20:52:12', b'0', 121); | |
| 3368 | +INSERT INTO `system_role_menu` (`id`, `role_id`, `menu_id`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (6147, 109, 1134, '1', '2025-09-06 20:52:12', '1', '2025-09-06 20:52:12', b'0', 121); | |
| 3369 | +INSERT INTO `system_role_menu` (`id`, `role_id`, `menu_id`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (6148, 109, 1135, '1', '2025-09-06 20:52:12', '1', '2025-09-06 20:52:12', b'0', 121); | |
| 3370 | +INSERT INTO `system_role_menu` (`id`, `role_id`, `menu_id`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (6149, 109, 1136, '1', '2025-09-06 20:52:12', '1', '2025-09-06 20:52:12', b'0', 121); | |
| 3371 | +INSERT INTO `system_role_menu` (`id`, `role_id`, `menu_id`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (6150, 109, 1137, '1', '2025-09-06 20:52:12', '1', '2025-09-06 20:52:12', b'0', 121); | |
| 3372 | +INSERT INTO `system_role_menu` (`id`, `role_id`, `menu_id`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (6151, 109, 2161, '1', '2025-09-06 20:52:12', '1', '2025-09-06 20:52:12', b'0', 121); | |
| 3373 | +INSERT INTO `system_role_menu` (`id`, `role_id`, `menu_id`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (6152, 109, 1150, '1', '2025-09-06 20:52:12', '1', '2025-09-06 20:52:12', b'0', 121); | |
| 3374 | +INSERT INTO `system_role_menu` (`id`, `role_id`, `menu_id`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (6153, 109, 1161, '1', '2025-09-06 20:52:12', '1', '2025-09-06 20:52:12', b'0', 121); | |
| 3375 | +INSERT INTO `system_role_menu` (`id`, `role_id`, `menu_id`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (6154, 109, 1162, '1', '2025-09-06 20:52:12', '1', '2025-09-06 20:52:12', b'0', 121); | |
| 3376 | +INSERT INTO `system_role_menu` (`id`, `role_id`, `menu_id`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (6155, 109, 1166, '1', '2025-09-06 20:52:12', '1', '2025-09-06 20:52:12', b'0', 121); | |
| 3377 | +INSERT INTO `system_role_menu` (`id`, `role_id`, `menu_id`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (6156, 109, 1173, '1', '2025-09-06 20:52:12', '1', '2025-09-06 20:52:12', b'0', 121); | |
| 3378 | +INSERT INTO `system_role_menu` (`id`, `role_id`, `menu_id`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (6157, 109, 1174, '1', '2025-09-06 20:52:12', '1', '2025-09-06 20:52:12', b'0', 121); | |
| 3379 | +INSERT INTO `system_role_menu` (`id`, `role_id`, `menu_id`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (6158, 109, 1178, '1', '2025-09-06 20:52:12', '1', '2025-09-06 20:52:12', b'0', 121); | |
| 3380 | +INSERT INTO `system_role_menu` (`id`, `role_id`, `menu_id`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (6159, 109, 2745, '1', '2025-09-06 20:52:12', '1', '2025-09-06 20:52:12', b'0', 121); | |
| 3381 | +INSERT INTO `system_role_menu` (`id`, `role_id`, `menu_id`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (6160, 109, 2746, '1', '2025-09-06 20:52:12', '1', '2025-09-06 20:52:12', b'0', 121); | |
| 3382 | +INSERT INTO `system_role_menu` (`id`, `role_id`, `menu_id`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (6161, 109, 2747, '1', '2025-09-06 20:52:12', '1', '2025-09-06 20:52:12', b'0', 121); | |
| 3383 | +INSERT INTO `system_role_menu` (`id`, `role_id`, `menu_id`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (6162, 109, 2748, '1', '2025-09-06 20:52:12', '1', '2025-09-06 20:52:12', b'0', 121); | |
| 3384 | +INSERT INTO `system_role_menu` (`id`, `role_id`, `menu_id`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (6163, 109, 2301, '1', '2025-09-06 20:52:12', '1', '2025-09-06 20:52:12', b'0', 121); | |
| 3385 | +INSERT INTO `system_role_menu` (`id`, `role_id`, `menu_id`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (6164, 109, 2302, '1', '2025-09-06 20:52:12', '1', '2025-09-06 20:52:12', b'0', 121); | |
| 3386 | +INSERT INTO `system_role_menu` (`id`, `role_id`, `menu_id`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (6165, 109, 5011, '1', '2025-09-06 20:52:12', '1', '2025-09-06 20:52:12', b'0', 121); | |
| 3387 | +INSERT INTO `system_role_menu` (`id`, `role_id`, `menu_id`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (6166, 109, 5012, '1', '2025-09-06 20:52:12', '1', '2025-09-06 20:52:12', b'0', 121); | |
| 3388 | +INSERT INTO `system_role_menu` (`id`, `role_id`, `menu_id`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (6167, 109, 2549, '1', '2025-09-06 20:52:12', '1', '2025-09-06 20:52:12', b'0', 121); | |
| 3389 | +INSERT INTO `system_role_menu` (`id`, `role_id`, `menu_id`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (6168, 109, 2550, '1', '2025-09-06 20:52:12', '1', '2025-09-06 20:52:12', b'0', 121); | |
| 3390 | +INSERT INTO `system_role_menu` (`id`, `role_id`, `menu_id`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (6169, 109, 2551, '1', '2025-09-06 20:52:12', '1', '2025-09-06 20:52:12', b'0', 121); | |
| 3391 | +INSERT INTO `system_role_menu` (`id`, `role_id`, `menu_id`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (6170, 109, 2552, '1', '2025-09-06 20:52:12', '1', '2025-09-06 20:52:12', b'0', 121); | |
| 3392 | +INSERT INTO `system_role_menu` (`id`, `role_id`, `menu_id`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (6171, 109, 2553, '1', '2025-09-06 20:52:12', '1', '2025-09-06 20:52:12', b'0', 121); | |
| 3393 | +INSERT INTO `system_role_menu` (`id`, `role_id`, `menu_id`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (6172, 109, 2554, '1', '2025-09-06 20:52:12', '1', '2025-09-06 20:52:12', b'0', 121); | |
| 3394 | +INSERT INTO `system_role_menu` (`id`, `role_id`, `menu_id`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (6173, 109, 2555, '1', '2025-09-06 20:52:12', '1', '2025-09-06 20:52:12', b'0', 121); | |
| 3395 | +INSERT INTO `system_role_menu` (`id`, `role_id`, `menu_id`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (6174, 109, 2556, '1', '2025-09-06 20:52:12', '1', '2025-09-06 20:52:12', b'0', 121); | |
| 3396 | +INSERT INTO `system_role_menu` (`id`, `role_id`, `menu_id`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (6175, 109, 2557, '1', '2025-09-06 20:52:12', '1', '2025-09-06 20:52:12', b'0', 121); | |
| 3397 | +INSERT INTO `system_role_menu` (`id`, `role_id`, `menu_id`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (6176, 109, 2558, '1', '2025-09-06 20:52:12', '1', '2025-09-06 20:52:12', b'0', 121); | |
| 3398 | +INSERT INTO `system_role_menu` (`id`, `role_id`, `menu_id`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (6177, 109, 2559, '1', '2025-09-06 20:52:12', '1', '2025-09-06 20:52:12', b'0', 121); | |
| 3399 | +INSERT INTO `system_role_menu` (`id`, `role_id`, `menu_id`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (6178, 111, 1117, '1', '2025-09-06 20:52:12', '1', '2025-09-06 20:52:12', b'0', 122); | |
| 3400 | +INSERT INTO `system_role_menu` (`id`, `role_id`, `menu_id`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (6179, 111, 1126, '1', '2025-09-06 20:52:12', '1', '2025-09-06 20:52:12', b'0', 122); | |
| 3401 | +INSERT INTO `system_role_menu` (`id`, `role_id`, `menu_id`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (6180, 111, 1127, '1', '2025-09-06 20:52:12', '1', '2025-09-06 20:52:12', b'0', 122); | |
| 3402 | +INSERT INTO `system_role_menu` (`id`, `role_id`, `menu_id`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (6181, 111, 1128, '1', '2025-09-06 20:52:12', '1', '2025-09-06 20:52:12', b'0', 122); | |
| 3403 | +INSERT INTO `system_role_menu` (`id`, `role_id`, `menu_id`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (6182, 111, 1129, '1', '2025-09-06 20:52:12', '1', '2025-09-06 20:52:12', b'0', 122); | |
| 3404 | +INSERT INTO `system_role_menu` (`id`, `role_id`, `menu_id`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (6183, 111, 1130, '1', '2025-09-06 20:52:12', '1', '2025-09-06 20:52:12', b'0', 122); | |
| 3405 | +INSERT INTO `system_role_menu` (`id`, `role_id`, `menu_id`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (6184, 111, 1132, '1', '2025-09-06 20:52:12', '1', '2025-09-06 20:52:12', b'0', 122); | |
| 3406 | +INSERT INTO `system_role_menu` (`id`, `role_id`, `menu_id`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (6185, 111, 1133, '1', '2025-09-06 20:52:12', '1', '2025-09-06 20:52:12', b'0', 122); | |
| 3407 | +INSERT INTO `system_role_menu` (`id`, `role_id`, `menu_id`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (6186, 111, 1134, '1', '2025-09-06 20:52:12', '1', '2025-09-06 20:52:12', b'0', 122); | |
| 3408 | +INSERT INTO `system_role_menu` (`id`, `role_id`, `menu_id`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (6187, 111, 1135, '1', '2025-09-06 20:52:12', '1', '2025-09-06 20:52:12', b'0', 122); | |
| 3409 | +INSERT INTO `system_role_menu` (`id`, `role_id`, `menu_id`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (6188, 111, 1136, '1', '2025-09-06 20:52:12', '1', '2025-09-06 20:52:12', b'0', 122); | |
| 3410 | +INSERT INTO `system_role_menu` (`id`, `role_id`, `menu_id`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (6189, 111, 1137, '1', '2025-09-06 20:52:12', '1', '2025-09-06 20:52:12', b'0', 122); | |
| 3411 | +INSERT INTO `system_role_menu` (`id`, `role_id`, `menu_id`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (6190, 111, 2161, '1', '2025-09-06 20:52:12', '1', '2025-09-06 20:52:12', b'0', 122); | |
| 3412 | +INSERT INTO `system_role_menu` (`id`, `role_id`, `menu_id`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (6191, 111, 1150, '1', '2025-09-06 20:52:12', '1', '2025-09-06 20:52:12', b'0', 122); | |
| 3413 | +INSERT INTO `system_role_menu` (`id`, `role_id`, `menu_id`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (6192, 111, 1161, '1', '2025-09-06 20:52:12', '1', '2025-09-06 20:52:12', b'0', 122); | |
| 3414 | +INSERT INTO `system_role_menu` (`id`, `role_id`, `menu_id`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (6193, 111, 1162, '1', '2025-09-06 20:52:12', '1', '2025-09-06 20:52:12', b'0', 122); | |
| 3415 | +INSERT INTO `system_role_menu` (`id`, `role_id`, `menu_id`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (6194, 111, 1166, '1', '2025-09-06 20:52:12', '1', '2025-09-06 20:52:12', b'0', 122); | |
| 3416 | +INSERT INTO `system_role_menu` (`id`, `role_id`, `menu_id`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (6195, 111, 1173, '1', '2025-09-06 20:52:12', '1', '2025-09-06 20:52:12', b'0', 122); | |
| 3417 | +INSERT INTO `system_role_menu` (`id`, `role_id`, `menu_id`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (6196, 111, 1174, '1', '2025-09-06 20:52:12', '1', '2025-09-06 20:52:12', b'0', 122); | |
| 3418 | +INSERT INTO `system_role_menu` (`id`, `role_id`, `menu_id`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (6197, 111, 1178, '1', '2025-09-06 20:52:12', '1', '2025-09-06 20:52:12', b'0', 122); | |
| 3419 | +INSERT INTO `system_role_menu` (`id`, `role_id`, `menu_id`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (6198, 111, 2745, '1', '2025-09-06 20:52:12', '1', '2025-09-06 20:52:12', b'0', 122); | |
| 3420 | +INSERT INTO `system_role_menu` (`id`, `role_id`, `menu_id`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (6199, 111, 2746, '1', '2025-09-06 20:52:12', '1', '2025-09-06 20:52:12', b'0', 122); | |
| 3421 | +INSERT INTO `system_role_menu` (`id`, `role_id`, `menu_id`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (6200, 111, 2747, '1', '2025-09-06 20:52:12', '1', '2025-09-06 20:52:12', b'0', 122); | |
| 3422 | +INSERT INTO `system_role_menu` (`id`, `role_id`, `menu_id`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (6201, 111, 2748, '1', '2025-09-06 20:52:12', '1', '2025-09-06 20:52:12', b'0', 122); | |
| 3423 | +INSERT INTO `system_role_menu` (`id`, `role_id`, `menu_id`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (6202, 111, 2301, '1', '2025-09-06 20:52:12', '1', '2025-09-06 20:52:12', b'0', 122); | |
| 3424 | +INSERT INTO `system_role_menu` (`id`, `role_id`, `menu_id`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (6203, 111, 2302, '1', '2025-09-06 20:52:12', '1', '2025-09-06 20:52:12', b'0', 122); | |
| 3425 | +INSERT INTO `system_role_menu` (`id`, `role_id`, `menu_id`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (6204, 111, 5011, '1', '2025-09-06 20:52:12', '1', '2025-09-06 20:52:12', b'0', 122); | |
| 3426 | +INSERT INTO `system_role_menu` (`id`, `role_id`, `menu_id`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (6205, 111, 5012, '1', '2025-09-06 20:52:12', '1', '2025-09-06 20:52:12', b'0', 122); | |
| 3427 | +INSERT INTO `system_role_menu` (`id`, `role_id`, `menu_id`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (6206, 111, 2549, '1', '2025-09-06 20:52:12', '1', '2025-09-06 20:52:12', b'0', 122); | |
| 3428 | +INSERT INTO `system_role_menu` (`id`, `role_id`, `menu_id`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (6207, 111, 2550, '1', '2025-09-06 20:52:12', '1', '2025-09-06 20:52:12', b'0', 122); | |
| 3429 | +INSERT INTO `system_role_menu` (`id`, `role_id`, `menu_id`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (6208, 111, 2551, '1', '2025-09-06 20:52:12', '1', '2025-09-06 20:52:12', b'0', 122); | |
| 3430 | +INSERT INTO `system_role_menu` (`id`, `role_id`, `menu_id`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (6209, 111, 2552, '1', '2025-09-06 20:52:12', '1', '2025-09-06 20:52:12', b'0', 122); | |
| 3431 | +INSERT INTO `system_role_menu` (`id`, `role_id`, `menu_id`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (6210, 111, 2553, '1', '2025-09-06 20:52:12', '1', '2025-09-06 20:52:12', b'0', 122); | |
| 3432 | +INSERT INTO `system_role_menu` (`id`, `role_id`, `menu_id`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (6211, 111, 2554, '1', '2025-09-06 20:52:12', '1', '2025-09-06 20:52:12', b'0', 122); | |
| 3433 | +INSERT INTO `system_role_menu` (`id`, `role_id`, `menu_id`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (6212, 111, 2555, '1', '2025-09-06 20:52:12', '1', '2025-09-06 20:52:12', b'0', 122); | |
| 3434 | +INSERT INTO `system_role_menu` (`id`, `role_id`, `menu_id`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (6213, 111, 2556, '1', '2025-09-06 20:52:12', '1', '2025-09-06 20:52:12', b'0', 122); | |
| 3435 | +INSERT INTO `system_role_menu` (`id`, `role_id`, `menu_id`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (6214, 111, 2557, '1', '2025-09-06 20:52:12', '1', '2025-09-06 20:52:12', b'0', 122); | |
| 3436 | +INSERT INTO `system_role_menu` (`id`, `role_id`, `menu_id`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (6215, 111, 2558, '1', '2025-09-06 20:52:12', '1', '2025-09-06 20:52:12', b'0', 122); | |
| 3437 | +INSERT INTO `system_role_menu` (`id`, `role_id`, `menu_id`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (6216, 111, 2559, '1', '2025-09-06 20:52:12', '1', '2025-09-06 20:52:12', b'0', 122); | |
| 3438 | +INSERT INTO `system_role_menu` (`id`, `role_id`, `menu_id`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (6217, 109, 2756, '1', '2025-09-06 20:52:25', '1', '2025-09-06 20:52:25', b'0', 121); | |
| 3439 | +INSERT INTO `system_role_menu` (`id`, `role_id`, `menu_id`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (6218, 109, 2757, '1', '2025-09-06 20:52:25', '1', '2025-09-06 20:52:25', b'0', 121); | |
| 3440 | +INSERT INTO `system_role_menu` (`id`, `role_id`, `menu_id`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (6219, 109, 2262, '1', '2025-09-06 20:52:25', '1', '2025-09-06 20:52:25', b'0', 121); | |
| 3441 | +INSERT INTO `system_role_menu` (`id`, `role_id`, `menu_id`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (6220, 109, 2275, '1', '2025-09-06 20:52:25', '1', '2025-09-06 20:52:25', b'0', 121); | |
| 3442 | +INSERT INTO `system_role_menu` (`id`, `role_id`, `menu_id`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (6221, 109, 2276, '1', '2025-09-06 20:52:25', '1', '2025-09-06 20:52:25', b'0', 121); | |
| 3443 | +INSERT INTO `system_role_menu` (`id`, `role_id`, `menu_id`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (6222, 109, 2277, '1', '2025-09-06 20:52:25', '1', '2025-09-06 20:52:25', b'0', 121); | |
| 3444 | +INSERT INTO `system_role_menu` (`id`, `role_id`, `menu_id`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (6223, 109, 2281, '1', '2025-09-06 20:52:25', '1', '2025-09-06 20:52:25', b'0', 121); | |
| 3445 | +INSERT INTO `system_role_menu` (`id`, `role_id`, `menu_id`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (6224, 109, 2282, '1', '2025-09-06 20:52:25', '1', '2025-09-06 20:52:25', b'0', 121); | |
| 3446 | +INSERT INTO `system_role_menu` (`id`, `role_id`, `menu_id`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (6225, 109, 2283, '1', '2025-09-06 20:52:25', '1', '2025-09-06 20:52:25', b'0', 121); | |
| 3447 | +INSERT INTO `system_role_menu` (`id`, `role_id`, `menu_id`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (6226, 109, 2284, '1', '2025-09-06 20:52:25', '1', '2025-09-06 20:52:25', b'0', 121); | |
| 3448 | +INSERT INTO `system_role_menu` (`id`, `role_id`, `menu_id`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (6227, 109, 2285, '1', '2025-09-06 20:52:25', '1', '2025-09-06 20:52:25', b'0', 121); | |
| 3449 | +INSERT INTO `system_role_menu` (`id`, `role_id`, `menu_id`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (6228, 109, 2287, '1', '2025-09-06 20:52:25', '1', '2025-09-06 20:52:25', b'0', 121); | |
| 3450 | +INSERT INTO `system_role_menu` (`id`, `role_id`, `menu_id`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (6229, 109, 2288, '1', '2025-09-06 20:52:25', '1', '2025-09-06 20:52:25', b'0', 121); | |
| 3451 | +INSERT INTO `system_role_menu` (`id`, `role_id`, `menu_id`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (6230, 109, 2293, '1', '2025-09-06 20:52:25', '1', '2025-09-06 20:52:25', b'0', 121); | |
| 3452 | +INSERT INTO `system_role_menu` (`id`, `role_id`, `menu_id`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (6231, 109, 2294, '1', '2025-09-06 20:52:25', '1', '2025-09-06 20:52:25', b'0', 121); | |
| 3453 | +INSERT INTO `system_role_menu` (`id`, `role_id`, `menu_id`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (6232, 109, 2297, '1', '2025-09-06 20:52:25', '1', '2025-09-06 20:52:25', b'0', 121); | |
| 3454 | +INSERT INTO `system_role_menu` (`id`, `role_id`, `menu_id`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (6233, 109, 2300, '1', '2025-09-06 20:52:25', '1', '2025-09-06 20:52:25', b'0', 121); | |
| 3455 | +INSERT INTO `system_role_menu` (`id`, `role_id`, `menu_id`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (6234, 109, 2317, '1', '2025-09-06 20:52:25', '1', '2025-09-06 20:52:25', b'0', 121); | |
| 3456 | +INSERT INTO `system_role_menu` (`id`, `role_id`, `menu_id`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (6235, 109, 2318, '1', '2025-09-06 20:52:25', '1', '2025-09-06 20:52:25', b'0', 121); | |
| 3457 | +INSERT INTO `system_role_menu` (`id`, `role_id`, `menu_id`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (6236, 109, 2319, '1', '2025-09-06 20:52:25', '1', '2025-09-06 20:52:25', b'0', 121); | |
| 3458 | +INSERT INTO `system_role_menu` (`id`, `role_id`, `menu_id`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (6237, 109, 2320, '1', '2025-09-06 20:52:25', '1', '2025-09-06 20:52:25', b'0', 121); | |
| 3459 | +INSERT INTO `system_role_menu` (`id`, `role_id`, `menu_id`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (6238, 109, 2321, '1', '2025-09-06 20:52:25', '1', '2025-09-06 20:52:25', b'0', 121); | |
| 3460 | +INSERT INTO `system_role_menu` (`id`, `role_id`, `menu_id`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (6239, 109, 2322, '1', '2025-09-06 20:52:25', '1', '2025-09-06 20:52:25', b'0', 121); | |
| 3461 | +INSERT INTO `system_role_menu` (`id`, `role_id`, `menu_id`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (6240, 109, 2323, '1', '2025-09-06 20:52:25', '1', '2025-09-06 20:52:25', b'0', 121); | |
| 3462 | +INSERT INTO `system_role_menu` (`id`, `role_id`, `menu_id`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (6241, 109, 2324, '1', '2025-09-06 20:52:25', '1', '2025-09-06 20:52:25', b'0', 121); | |
| 3463 | +INSERT INTO `system_role_menu` (`id`, `role_id`, `menu_id`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (6242, 109, 2325, '1', '2025-09-06 20:52:25', '1', '2025-09-06 20:52:25', b'0', 121); | |
| 3464 | +INSERT INTO `system_role_menu` (`id`, `role_id`, `menu_id`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (6243, 109, 2326, '1', '2025-09-06 20:52:25', '1', '2025-09-06 20:52:25', b'0', 121); | |
| 3465 | +INSERT INTO `system_role_menu` (`id`, `role_id`, `menu_id`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (6244, 109, 2327, '1', '2025-09-06 20:52:25', '1', '2025-09-06 20:52:25', b'0', 121); | |
| 3466 | +INSERT INTO `system_role_menu` (`id`, `role_id`, `menu_id`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (6245, 109, 2328, '1', '2025-09-06 20:52:25', '1', '2025-09-06 20:52:25', b'0', 121); | |
| 3467 | +INSERT INTO `system_role_menu` (`id`, `role_id`, `menu_id`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (6246, 109, 2329, '1', '2025-09-06 20:52:25', '1', '2025-09-06 20:52:25', b'0', 121); | |
| 3468 | +INSERT INTO `system_role_menu` (`id`, `role_id`, `menu_id`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (6247, 109, 2330, '1', '2025-09-06 20:52:25', '1', '2025-09-06 20:52:25', b'0', 121); | |
| 3469 | +INSERT INTO `system_role_menu` (`id`, `role_id`, `menu_id`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (6248, 109, 2331, '1', '2025-09-06 20:52:25', '1', '2025-09-06 20:52:25', b'0', 121); | |
| 3470 | +INSERT INTO `system_role_menu` (`id`, `role_id`, `menu_id`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (6249, 109, 2332, '1', '2025-09-06 20:52:25', '1', '2025-09-06 20:52:25', b'0', 121); | |
| 3471 | +INSERT INTO `system_role_menu` (`id`, `role_id`, `menu_id`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (6250, 109, 2333, '1', '2025-09-06 20:52:25', '1', '2025-09-06 20:52:25', b'0', 121); | |
| 3472 | +INSERT INTO `system_role_menu` (`id`, `role_id`, `menu_id`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (6251, 109, 2334, '1', '2025-09-06 20:52:25', '1', '2025-09-06 20:52:25', b'0', 121); | |
| 3473 | +INSERT INTO `system_role_menu` (`id`, `role_id`, `menu_id`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (6252, 109, 2335, '1', '2025-09-06 20:52:25', '1', '2025-09-06 20:52:25', b'0', 121); | |
| 3474 | +INSERT INTO `system_role_menu` (`id`, `role_id`, `menu_id`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (6253, 109, 2363, '1', '2025-09-06 20:52:25', '1', '2025-09-06 20:52:25', b'0', 121); | |
| 3475 | +INSERT INTO `system_role_menu` (`id`, `role_id`, `menu_id`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (6254, 109, 2364, '1', '2025-09-06 20:52:25', '1', '2025-09-06 20:52:25', b'0', 121); | |
| 3476 | +INSERT INTO `system_role_menu` (`id`, `role_id`, `menu_id`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (6255, 111, 2756, '1', '2025-09-06 20:52:25', '1', '2025-09-06 20:52:25', b'0', 122); | |
| 3477 | +INSERT INTO `system_role_menu` (`id`, `role_id`, `menu_id`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (6256, 111, 2757, '1', '2025-09-06 20:52:25', '1', '2025-09-06 20:52:25', b'0', 122); | |
| 3478 | +INSERT INTO `system_role_menu` (`id`, `role_id`, `menu_id`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (6257, 111, 2262, '1', '2025-09-06 20:52:25', '1', '2025-09-06 20:52:25', b'0', 122); | |
| 3479 | +INSERT INTO `system_role_menu` (`id`, `role_id`, `menu_id`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (6258, 111, 2275, '1', '2025-09-06 20:52:25', '1', '2025-09-06 20:52:25', b'0', 122); | |
| 3480 | +INSERT INTO `system_role_menu` (`id`, `role_id`, `menu_id`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (6259, 111, 2276, '1', '2025-09-06 20:52:25', '1', '2025-09-06 20:52:25', b'0', 122); | |
| 3481 | +INSERT INTO `system_role_menu` (`id`, `role_id`, `menu_id`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (6260, 111, 2277, '1', '2025-09-06 20:52:25', '1', '2025-09-06 20:52:25', b'0', 122); | |
| 3482 | +INSERT INTO `system_role_menu` (`id`, `role_id`, `menu_id`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (6261, 111, 2281, '1', '2025-09-06 20:52:25', '1', '2025-09-06 20:52:25', b'0', 122); | |
| 3483 | +INSERT INTO `system_role_menu` (`id`, `role_id`, `menu_id`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (6262, 111, 2282, '1', '2025-09-06 20:52:25', '1', '2025-09-06 20:52:25', b'0', 122); | |
| 3484 | +INSERT INTO `system_role_menu` (`id`, `role_id`, `menu_id`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (6263, 111, 2283, '1', '2025-09-06 20:52:25', '1', '2025-09-06 20:52:25', b'0', 122); | |
| 3485 | +INSERT INTO `system_role_menu` (`id`, `role_id`, `menu_id`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (6264, 111, 2284, '1', '2025-09-06 20:52:25', '1', '2025-09-06 20:52:25', b'0', 122); | |
| 3486 | +INSERT INTO `system_role_menu` (`id`, `role_id`, `menu_id`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (6265, 111, 2285, '1', '2025-09-06 20:52:25', '1', '2025-09-06 20:52:25', b'0', 122); | |
| 3487 | +INSERT INTO `system_role_menu` (`id`, `role_id`, `menu_id`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (6266, 111, 2287, '1', '2025-09-06 20:52:25', '1', '2025-09-06 20:52:25', b'0', 122); | |
| 3488 | +INSERT INTO `system_role_menu` (`id`, `role_id`, `menu_id`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (6267, 111, 2288, '1', '2025-09-06 20:52:25', '1', '2025-09-06 20:52:25', b'0', 122); | |
| 3489 | +INSERT INTO `system_role_menu` (`id`, `role_id`, `menu_id`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (6268, 111, 2293, '1', '2025-09-06 20:52:25', '1', '2025-09-06 20:52:25', b'0', 122); | |
| 3490 | +INSERT INTO `system_role_menu` (`id`, `role_id`, `menu_id`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (6269, 111, 2294, '1', '2025-09-06 20:52:25', '1', '2025-09-06 20:52:25', b'0', 122); | |
| 3491 | +INSERT INTO `system_role_menu` (`id`, `role_id`, `menu_id`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (6270, 111, 2297, '1', '2025-09-06 20:52:25', '1', '2025-09-06 20:52:25', b'0', 122); | |
| 3492 | +INSERT INTO `system_role_menu` (`id`, `role_id`, `menu_id`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (6271, 111, 2300, '1', '2025-09-06 20:52:25', '1', '2025-09-06 20:52:25', b'0', 122); | |
| 3493 | +INSERT INTO `system_role_menu` (`id`, `role_id`, `menu_id`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (6272, 111, 2317, '1', '2025-09-06 20:52:25', '1', '2025-09-06 20:52:25', b'0', 122); | |
| 3494 | +INSERT INTO `system_role_menu` (`id`, `role_id`, `menu_id`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (6273, 111, 2318, '1', '2025-09-06 20:52:25', '1', '2025-09-06 20:52:25', b'0', 122); | |
| 3495 | +INSERT INTO `system_role_menu` (`id`, `role_id`, `menu_id`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (6274, 111, 2319, '1', '2025-09-06 20:52:25', '1', '2025-09-06 20:52:25', b'0', 122); | |
| 3496 | +INSERT INTO `system_role_menu` (`id`, `role_id`, `menu_id`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (6275, 111, 2320, '1', '2025-09-06 20:52:25', '1', '2025-09-06 20:52:25', b'0', 122); | |
| 3497 | +INSERT INTO `system_role_menu` (`id`, `role_id`, `menu_id`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (6276, 111, 2321, '1', '2025-09-06 20:52:25', '1', '2025-09-06 20:52:25', b'0', 122); | |
| 3498 | +INSERT INTO `system_role_menu` (`id`, `role_id`, `menu_id`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (6277, 111, 2322, '1', '2025-09-06 20:52:25', '1', '2025-09-06 20:52:25', b'0', 122); | |
| 3499 | +INSERT INTO `system_role_menu` (`id`, `role_id`, `menu_id`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (6278, 111, 2323, '1', '2025-09-06 20:52:25', '1', '2025-09-06 20:52:25', b'0', 122); | |
| 3500 | +INSERT INTO `system_role_menu` (`id`, `role_id`, `menu_id`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (6279, 111, 2324, '1', '2025-09-06 20:52:25', '1', '2025-09-06 20:52:25', b'0', 122); | |
| 3501 | +INSERT INTO `system_role_menu` (`id`, `role_id`, `menu_id`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (6280, 111, 2325, '1', '2025-09-06 20:52:25', '1', '2025-09-06 20:52:25', b'0', 122); | |
| 3502 | +INSERT INTO `system_role_menu` (`id`, `role_id`, `menu_id`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (6281, 111, 2326, '1', '2025-09-06 20:52:25', '1', '2025-09-06 20:52:25', b'0', 122); | |
| 3503 | +INSERT INTO `system_role_menu` (`id`, `role_id`, `menu_id`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (6282, 111, 2327, '1', '2025-09-06 20:52:25', '1', '2025-09-06 20:52:25', b'0', 122); | |
| 3504 | +INSERT INTO `system_role_menu` (`id`, `role_id`, `menu_id`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (6283, 111, 2328, '1', '2025-09-06 20:52:25', '1', '2025-09-06 20:52:25', b'0', 122); | |
| 3505 | +INSERT INTO `system_role_menu` (`id`, `role_id`, `menu_id`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (6284, 111, 2329, '1', '2025-09-06 20:52:25', '1', '2025-09-06 20:52:25', b'0', 122); | |
| 3506 | +INSERT INTO `system_role_menu` (`id`, `role_id`, `menu_id`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (6285, 111, 2330, '1', '2025-09-06 20:52:25', '1', '2025-09-06 20:52:25', b'0', 122); | |
| 3507 | +INSERT INTO `system_role_menu` (`id`, `role_id`, `menu_id`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (6286, 111, 2331, '1', '2025-09-06 20:52:25', '1', '2025-09-06 20:52:25', b'0', 122); | |
| 3508 | +INSERT INTO `system_role_menu` (`id`, `role_id`, `menu_id`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (6287, 111, 2332, '1', '2025-09-06 20:52:25', '1', '2025-09-06 20:52:25', b'0', 122); | |
| 3509 | +INSERT INTO `system_role_menu` (`id`, `role_id`, `menu_id`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (6288, 111, 2333, '1', '2025-09-06 20:52:25', '1', '2025-09-06 20:52:25', b'0', 122); | |
| 3510 | +INSERT INTO `system_role_menu` (`id`, `role_id`, `menu_id`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (6289, 111, 2334, '1', '2025-09-06 20:52:25', '1', '2025-09-06 20:52:25', b'0', 122); | |
| 3511 | +INSERT INTO `system_role_menu` (`id`, `role_id`, `menu_id`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (6290, 111, 2335, '1', '2025-09-06 20:52:25', '1', '2025-09-06 20:52:25', b'0', 122); | |
| 3512 | +INSERT INTO `system_role_menu` (`id`, `role_id`, `menu_id`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (6291, 111, 2363, '1', '2025-09-06 20:52:25', '1', '2025-09-06 20:52:25', b'0', 122); | |
| 3513 | +INSERT INTO `system_role_menu` (`id`, `role_id`, `menu_id`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (6292, 111, 2364, '1', '2025-09-06 20:52:25', '1', '2025-09-06 20:52:25', b'0', 122); | |
| 3347 | 3514 | COMMIT; |
| 3348 | 3515 | |
| 3349 | 3516 | -- ---------------------------- |
| ... | ... | @@ -3398,7 +3565,7 @@ CREATE TABLE `system_sms_code` ( |
| 3398 | 3565 | `tenant_id` bigint NOT NULL DEFAULT 0 COMMENT '租户编号', |
| 3399 | 3566 | PRIMARY KEY (`id`) USING BTREE, |
| 3400 | 3567 | INDEX `idx_mobile`(`mobile` ASC) USING BTREE COMMENT '手机号' |
| 3401 | -) ENGINE = InnoDB AUTO_INCREMENT = 681 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci COMMENT = '手机验证码'; | |
| 3568 | +) ENGINE = InnoDB AUTO_INCREMENT = 682 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci COMMENT = '手机验证码'; | |
| 3402 | 3569 | |
| 3403 | 3570 | -- ---------------------------- |
| 3404 | 3571 | -- Records of system_sms_code |
| ... | ... | @@ -3439,7 +3606,7 @@ CREATE TABLE `system_sms_log` ( |
| 3439 | 3606 | `update_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间', |
| 3440 | 3607 | `deleted` bit(1) NOT NULL DEFAULT b'0' COMMENT '是否删除', |
| 3441 | 3608 | PRIMARY KEY (`id`) USING BTREE |
| 3442 | -) ENGINE = InnoDB AUTO_INCREMENT = 1491 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci COMMENT = '短信日志'; | |
| 3609 | +) ENGINE = InnoDB AUTO_INCREMENT = 1528 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci COMMENT = '短信日志'; | |
| 3443 | 3610 | |
| 3444 | 3611 | -- ---------------------------- |
| 3445 | 3612 | -- Records of system_sms_log |
| ... | ... | @@ -3512,7 +3679,7 @@ CREATE TABLE `system_social_client` ( |
| 3512 | 3679 | `deleted` bit(1) NOT NULL DEFAULT b'0' COMMENT '是否删除', |
| 3513 | 3680 | `tenant_id` bigint NOT NULL DEFAULT 0 COMMENT '租户编号', |
| 3514 | 3681 | PRIMARY KEY (`id`) USING BTREE |
| 3515 | -) ENGINE = InnoDB AUTO_INCREMENT = 45 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci COMMENT = '社交客户端表'; | |
| 3682 | +) ENGINE = InnoDB AUTO_INCREMENT = 46 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci COMMENT = '社交客户端表'; | |
| 3516 | 3683 | |
| 3517 | 3684 | -- ---------------------------- |
| 3518 | 3685 | -- Records of system_social_client |
| ... | ... | @@ -3523,6 +3690,7 @@ INSERT INTO `system_social_client` (`id`, `name`, `social_type`, `user_type`, `c |
| 3523 | 3690 | INSERT INTO `system_social_client` (`id`, `name`, `social_type`, `user_type`, `client_id`, `client_secret`, `agent_id`, `status`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (3, '微信公众号', 31, 1, 'wx5b23ba7a5589ecbb', '2a7b3b20c537e52e74afd395eb85f61f', NULL, 0, '', '2023-10-18 16:07:46', '1', '2023-12-20 21:28:23', b'1', 1); |
| 3524 | 3691 | INSERT INTO `system_social_client` (`id`, `name`, `social_type`, `user_type`, `client_id`, `client_secret`, `agent_id`, `status`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (43, '微信小程序', 34, 1, 'wx63c280fe3248a3e7', '6f270509224a7ae1296bbf1c8cb97aed', NULL, 0, '', '2023-10-19 13:37:41', '1', '2023-12-20 21:28:25', b'1', 1); |
| 3525 | 3692 | INSERT INTO `system_social_client` (`id`, `name`, `social_type`, `user_type`, `client_id`, `client_secret`, `agent_id`, `status`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (44, '1', 10, 1, '2', '3', NULL, 0, '1', '2025-04-06 20:36:28', '1', '2025-04-06 20:43:12', b'1', 1); |
| 3693 | +INSERT INTO `system_social_client` (`id`, `name`, `social_type`, `user_type`, `client_id`, `client_secret`, `agent_id`, `status`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (45, '1', 10, 1, '2', '3', NULL, 1, '1', '2025-09-06 20:26:15', '1', '2025-09-06 20:27:55', b'1', 1); | |
| 3526 | 3694 | COMMIT; |
| 3527 | 3695 | |
| 3528 | 3696 | -- ---------------------------- |
| ... | ... | @@ -3609,7 +3777,7 @@ CREATE TABLE `system_tenant` ( |
| 3609 | 3777 | BEGIN; |
| 3610 | 3778 | INSERT INTO `system_tenant` (`id`, `name`, `contact_user_id`, `contact_name`, `contact_mobile`, `status`, `websites`, `package_id`, `expire_time`, `account_count`, `creator`, `create_time`, `updater`, `update_time`, `deleted`) VALUES (1, '芋道源码', NULL, '芋艿', '17321315478', 0, 'www.iocoder.cn,127.0.0.1:3000,wxc4598c446f8a9cb3', 0, '2099-02-19 17:14:16', 9999, '1', '2021-01-05 17:03:47', '1', '2025-08-19 05:18:41', b'0'); |
| 3611 | 3779 | INSERT INTO `system_tenant` (`id`, `name`, `contact_user_id`, `contact_name`, `contact_mobile`, `status`, `websites`, `package_id`, `expire_time`, `account_count`, `creator`, `create_time`, `updater`, `update_time`, `deleted`) VALUES (121, '小租户', 110, '小王2', '15601691300', 0, 'zsxq.iocoder.cn,123321', 111, '2026-07-10 00:00:00', 30, '1', '2022-02-22 00:56:14', '1', '2025-08-19 21:19:29', b'0'); |
| 3612 | -INSERT INTO `system_tenant` (`id`, `name`, `contact_user_id`, `contact_name`, `contact_mobile`, `status`, `websites`, `package_id`, `expire_time`, `account_count`, `creator`, `create_time`, `updater`, `update_time`, `deleted`) VALUES (122, '测试租户', 113, '芋道', '15601691300', 0, 'test.iocoder.cn', 111, '2022-04-29 00:00:00', 50, '1', '2022-03-07 21:37:58', '1', '2025-08-24 14:46:15', b'0'); | |
| 3780 | +INSERT INTO `system_tenant` (`id`, `name`, `contact_user_id`, `contact_name`, `contact_mobile`, `status`, `websites`, `package_id`, `expire_time`, `account_count`, `creator`, `create_time`, `updater`, `update_time`, `deleted`) VALUES (122, '测试租户', 113, '芋道', '15601691300', 0, 'test.iocoder.cn,222,333', 111, '2022-04-29 00:00:00', 50, '1', '2022-03-07 21:37:58', '1', '2025-09-06 20:44:42', b'0'); | |
| 3613 | 3781 | COMMIT; |
| 3614 | 3782 | |
| 3615 | 3783 | -- ---------------------------- |
| ... | ... | @@ -3634,7 +3802,7 @@ CREATE TABLE `system_tenant_package` ( |
| 3634 | 3802 | -- Records of system_tenant_package |
| 3635 | 3803 | -- ---------------------------- |
| 3636 | 3804 | BEGIN; |
| 3637 | -INSERT INTO `system_tenant_package` (`id`, `name`, `status`, `remark`, `menu_ids`, `creator`, `create_time`, `updater`, `update_time`, `deleted`) VALUES (111, '普通套餐', 0, '小功能', '[1,2,5,1031,1032,1033,1034,1035,1036,1037,1038,1039,1050,1051,1052,1053,1054,1056,1057,1058,1059,1060,1063,1064,1065,1066,1067,1070,1075,1077,1078,1082,1083,1084,1085,1086,1087,1088,1089,1090,1091,1092,1118,1119,1120,100,101,102,103,106,107,110,111,112,113,114,1138,1139,115,1140,116,1141,1142,1143,2713,2714,2715,2716,2717,2718,2720,2721,1185,2722,1186,1187,2723,1188,2724,1189,2725,1190,2726,1191,2727,2472,1192,2728,2729,1193,1194,2730,1195,2731,2732,1197,2733,2478,1198,2734,2479,1199,2735,2480,1200,2481,1201,2482,1202,2739,2483,2484,2740,2485,2486,2487,1207,2488,1208,2489,1209,2490,1210,2491,1211,2492,1212,2493,1213,2494,2495,1215,1216,2497,1217,1218,1219,1220,1221,1222,1224,1225,1226,1227,1228,1229,1237,1238,1239,1240,1241,1242,1243,2525,1255,1256,1001,1257,1002,1258,1003,1259,1004,1260,1005,1006,1007,1008,1009,1010,1011,1012,1013,1014,1015,1016,1017,1018,1019,1020]', '1', '2022-02-22 00:54:00', '1', '2025-05-14 14:06:34', b'0'); | |
| 3805 | +INSERT INTO `system_tenant_package` (`id`, `name`, `status`, `remark`, `menu_ids`, `creator`, `create_time`, `updater`, `update_time`, `deleted`) VALUES (111, '普通套餐', 0, '小功能', '[1,2,5,1031,1032,1033,1034,1035,1036,1037,1038,1039,1050,1051,1052,1053,1054,1056,1057,1058,1059,1060,1063,1064,1065,1066,1067,1070,1075,1077,1078,1082,1083,1084,1085,1086,1087,1088,1089,1090,1091,1092,1117,1118,1119,1120,100,101,102,1126,103,1127,1128,1129,106,1130,107,1132,1133,110,1134,111,1135,112,1136,113,1137,2161,114,1138,1139,115,1140,116,1141,1142,1143,1150,1161,1162,1166,1173,1174,2713,2714,1178,2715,2716,2717,2718,2720,2721,1185,2722,1186,1187,2723,1188,2724,1189,2725,1190,2726,1191,2727,1192,2728,2729,1193,1194,2730,1195,2731,2732,1197,2733,1198,2734,1199,2735,1200,1201,1202,2739,2740,1207,1208,1209,2745,1210,2746,1211,2747,1212,2748,1213,1215,1216,1217,1218,1219,1220,2756,1221,2757,1222,1224,1225,1226,1227,1228,1229,1237,1238,2262,1239,1240,1241,1242,1243,2275,2276,2277,1255,1256,1257,2281,1258,2282,1259,2283,1260,2284,2285,2287,2288,2293,2294,2297,2300,2301,2302,2317,2318,2319,2320,2321,2322,2323,2324,2325,2326,2327,2328,2329,2330,2331,2332,2333,2334,2335,2363,2364,5011,5012,2472,2478,2479,2480,2481,2482,2483,2484,2485,2486,2487,2488,2489,2490,2491,2492,2493,2494,2495,2497,2525,1001,1002,1003,1004,1005,1006,1007,1008,1009,1010,1011,1012,1013,2549,1014,2550,1015,2551,1016,2552,1017,2553,1018,2554,1019,2555,1020,2556,2557,2558,2559]', '1', '2022-02-22 00:54:00', '1', '2025-09-06 20:52:25', b'0'); | |
| 3638 | 3806 | COMMIT; |
| 3639 | 3807 | |
| 3640 | 3808 | -- ---------------------------- |
| ... | ... | @@ -3684,7 +3852,7 @@ CREATE TABLE `system_user_role` ( |
| 3684 | 3852 | `deleted` bit(1) NULL DEFAULT b'0' COMMENT '是否删除', |
| 3685 | 3853 | `tenant_id` bigint NOT NULL DEFAULT 0 COMMENT '租户编号', |
| 3686 | 3854 | PRIMARY KEY (`id`) USING BTREE |
| 3687 | -) ENGINE = InnoDB AUTO_INCREMENT = 50 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci COMMENT = '用户和角色关联表'; | |
| 3855 | +) ENGINE = InnoDB AUTO_INCREMENT = 51 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci COMMENT = '用户和角色关联表'; | |
| 3688 | 3856 | |
| 3689 | 3857 | -- ---------------------------- |
| 3690 | 3858 | -- Records of system_user_role |
| ... | ... | @@ -3706,6 +3874,7 @@ INSERT INTO `system_user_role` (`id`, `user_id`, `role_id`, `creator`, `create_t |
| 3706 | 3874 | INSERT INTO `system_user_role` (`id`, `user_id`, `role_id`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (47, 104, 2, '1', '2025-01-04 10:40:33', '1', '2025-01-04 10:40:33', b'0', 1); |
| 3707 | 3875 | INSERT INTO `system_user_role` (`id`, `user_id`, `role_id`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (48, 100, 155, '1', '2025-04-04 10:41:14', '1', '2025-04-04 10:41:14', b'0', 1); |
| 3708 | 3876 | INSERT INTO `system_user_role` (`id`, `user_id`, `role_id`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (49, 142, 1, '1', '2025-07-23 09:11:42', '1', '2025-07-23 09:11:42', b'0', 1); |
| 3877 | +INSERT INTO `system_user_role` (`id`, `user_id`, `role_id`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (50, 142, 2, '1', '2025-10-07 20:50:37', '1', '2025-10-07 20:50:37', b'0', 1); | |
| 3709 | 3878 | COMMIT; |
| 3710 | 3879 | |
| 3711 | 3880 | -- ---------------------------- |
| ... | ... | @@ -3740,7 +3909,7 @@ CREATE TABLE `system_users` ( |
| 3740 | 3909 | -- Records of system_users |
| 3741 | 3910 | -- ---------------------------- |
| 3742 | 3911 | BEGIN; |
| 3743 | -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$KljJDa/LK7QfDm0lF5OhuePhlPfjRH3tB2Wu351Uidz.oQGJXevPi', '芋道源码', '管理员', 103, '[1,2]', '11aoteman@126.com', '18818260272', 2, 'http://test.yudao.iocoder.cn/user/avatar/20250709/blob_1752042302026.jpg', 0, '0:0:0:0:0:0:0:1', '2025-08-30 19:57:52', 'admin', '2021-01-05 17:03:47', NULL, '2025-08-30 19:57:52', b'0', 1); | |
| 3912 | +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$KljJDa/LK7QfDm0lF5OhuePhlPfjRH3tB2Wu351Uidz.oQGJXevPi', '芋道源码', '管理员', 103, '[1,2]', '11aoteman@126.com', '18818260272', 2, 'http://test.yudao.iocoder.cn/20250921/avatar_1758423875594.png', 0, '0:0:0:0:0:0:0:1', '2025-11-22 18:50:21', 'admin', '2021-01-05 17:03:47', NULL, '2025-11-22 18:50:21', b'0', 1); | |
| 3744 | 3913 | 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-04-08 09:36:40', '', '2021-01-07 09:07:17', NULL, '2025-04-21 14:23:08', b'0', 1); |
| 3745 | 3914 | 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); |
| 3746 | 3915 | 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', '2025-03-28 20:01:16', '', '2021-01-21 02:13:53', NULL, '2025-04-21 14:23:08', b'0', 1); |
| ... | ... | @@ -3754,10 +3923,10 @@ INSERT INTO `system_users` (`id`, `username`, `password`, `nickname`, `remark`, |
| 3754 | 3923 | INSERT INTO `system_users` (`id`, `username`, `password`, `nickname`, `remark`, `dept_id`, `post_ids`, `email`, `mobile`, `sex`, `avatar`, `status`, `login_ip`, `login_date`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (114, 'hrmgr', '$2a$10$TR4eybBioGRhBmDBWkqWLO6NIh3mzYa8KBKDDB5woiGYFVlRAi.fu', 'hr 小姐姐', NULL, NULL, '[5]', '', '15601691236', 1, NULL, 0, '0:0:0:0:0:0:0:1', '2024-03-24 22:21:05', '1', '2022-03-19 21:50:58', NULL, '2025-04-21 14:23:08', b'0', 1); |
| 3755 | 3924 | INSERT INTO `system_users` (`id`, `username`, `password`, `nickname`, `remark`, `dept_id`, `post_ids`, `email`, `mobile`, `sex`, `avatar`, `status`, `login_ip`, `login_date`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (115, 'aotemane', '$2a$04$GcyP0Vyzb2F2Yni5PuIK9ueGxM0tkZGMtDwVRwrNbtMvorzbpNsV2', '阿呆', '11222', 102, '[1,2]', '7648@qq.com', '15601691229', 2, NULL, 0, '', NULL, '1', '2022-04-30 02:55:43', '1', '2025-04-21 14:23:08', b'0', 1); |
| 3756 | 3925 | INSERT INTO `system_users` (`id`, `username`, `password`, `nickname`, `remark`, `dept_id`, `post_ids`, `email`, `mobile`, `sex`, `avatar`, `status`, `login_ip`, `login_date`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (117, 'admin123', '$2a$04$sEtimsHu9YCkYY4/oqElHem2Ijc9ld20eYO6lN.g/21NfLUTDLB9W', '测试号02', '1111', 100, '[2]', '', '15601691234', 1, NULL, 0, '0:0:0:0:0:0:0:1', '2024-10-02 10:16:20', '1', '2022-07-09 17:40:26', '1', '2025-05-14 09:56:04', b'0', 1); |
| 3757 | -INSERT INTO `system_users` (`id`, `username`, `password`, `nickname`, `remark`, `dept_id`, `post_ids`, `email`, `mobile`, `sex`, `avatar`, `status`, `login_ip`, `login_date`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (118, 'goudan', '$2a$04$jth0yOj8cSJq84D6vrzusOHDwW/LpBfgBnQ6bfFlD8zNZfM632Ta2', '狗蛋', NULL, 103, '[1]', '', '15601691239', 1, NULL, 0, '0:0:0:0:0:0:0:1', '2024-03-17 09:10:27', '1', '2022-07-09 17:44:43', '1', '2025-07-09 23:52:36', b'0', 1); | |
| 3926 | +INSERT INTO `system_users` (`id`, `username`, `password`, `nickname`, `remark`, `dept_id`, `post_ids`, `email`, `mobile`, `sex`, `avatar`, `status`, `login_ip`, `login_date`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (118, 'goudan', '$2a$04$3suGZjnA6rM5bErf38u1felbgqbsPHGdRG3l9NkxPCEt2ah9Y6aJi', '狗蛋', NULL, 103, '[1]', '', '15601691239', 1, NULL, 0, '0:0:0:0:0:0:0:1', '2025-11-23 15:28:25', '1', '2022-07-09 17:44:43', NULL, '2025-11-23 15:28:25', b'0', 1); | |
| 3758 | 3927 | 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 (139, 'wwbwwb', '$2a$04$aOHoFbQU6zfBk/1Z9raF/ugTdhjNdx7culC1HhO0zvoczAnahCiMq', '小秃头', NULL, NULL, NULL, '', '', 0, NULL, 0, '0:0:0:0:0:0:0:1', '2024-09-10 21:03:58', NULL, '2024-09-10 21:03:58', NULL, '2025-04-21 14:23:08', b'0', 1); |
| 3759 | 3928 | 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 (141, 'admin1', '$2a$04$oj6F6d7HrZ70kYVD3TNzEu.m3TPUzajOVuC66zdKna8KRerK1FmVa', '新用户', NULL, NULL, NULL, '', '', 0, '', 0, '0:0:0:0:0:0:0:1', '2025-04-08 13:09:07', '1', '2025-04-08 13:09:07', '1', '2025-05-14 19:11:48', b'0', 1); |
| 3760 | -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 (142, 'test01', '$2a$04$vxfBq9d3vVIfUbo6Dw7Mt.KOJfvG7RJ.l2/B3Kw09NtNyAZ1vbB1m', 'test01', '', NULL, '[]', '', '', 1, '', 0, '0:0:0:0:0:0:0:1', '2025-07-29 19:47:17', '1', '2025-07-09 21:07:10', NULL, '2025-07-29 19:47:17', b'0', 1); | |
| 3929 | +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 (142, 'test01', '$2a$04$IaR0fGYtalIDURMMdcaD2.4JDWZ15ueQZwap9oPUuxkwSbL66vIRG', 'test01', '', NULL, '[]', '', '19021719925', 1, '', 0, '0:0:0:0:0:0:0:1', '2025-07-29 19:47:17', '1', '2025-07-09 21:07:10', '1', '2025-11-25 19:49:08', b'0', 1); | |
| 3761 | 3930 | COMMIT; |
| 3762 | 3931 | |
| 3763 | 3932 | -- ---------------------------- |
| ... | ... | @@ -3802,7 +3971,7 @@ CREATE TABLE `yudao_demo02_category` ( |
| 3802 | 3971 | `deleted` bit(1) NOT NULL DEFAULT b'0' COMMENT '是否删除', |
| 3803 | 3972 | `tenant_id` bigint NOT NULL DEFAULT 0 COMMENT '租户编号', |
| 3804 | 3973 | PRIMARY KEY (`id`) USING BTREE |
| 3805 | -) ENGINE = InnoDB AUTO_INCREMENT = 7 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci COMMENT = '示例分类表'; | |
| 3974 | +) ENGINE = InnoDB AUTO_INCREMENT = 8 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci COMMENT = '示例分类表'; | |
| 3806 | 3975 | |
| 3807 | 3976 | -- ---------------------------- |
| 3808 | 3977 | -- Records of yudao_demo02_category |
| ... | ... | @@ -3814,6 +3983,7 @@ INSERT INTO `yudao_demo02_category` (`id`, `name`, `parent_id`, `creator`, `crea |
| 3814 | 3983 | INSERT INTO `yudao_demo02_category` (`id`, `name`, `parent_id`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (4, '小番茄', 2, '1', '2023-11-16 20:24:39', '1', '2023-11-16 20:24:39', b'0', 1); |
| 3815 | 3984 | INSERT INTO `yudao_demo02_category` (`id`, `name`, `parent_id`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (5, '大番茄', 2, '1', '2023-11-16 20:24:46', '1', '2023-11-16 20:24:46', b'0', 1); |
| 3816 | 3985 | INSERT INTO `yudao_demo02_category` (`id`, `name`, `parent_id`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (6, '11', 3, '1', '2023-11-24 19:29:34', '1', '2023-11-24 19:29:34', b'0', 1); |
| 3986 | +INSERT INTO `yudao_demo02_category` (`id`, `name`, `parent_id`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (7, '1', 0, '1', '2025-10-01 09:19:20', '1', '2025-10-01 09:19:20', b'0', 1); | |
| 3817 | 3987 | COMMIT; |
| 3818 | 3988 | |
| 3819 | 3989 | -- ---------------------------- | ... | ... |
sql/opengauss/ruoyi-vue-pro.sql
| ... | ... | @@ -1177,7 +1177,7 @@ INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_t |
| 1177 | 1177 | 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 (1690, 5, '向量', '5', 'ai_model_type', 0, '', '', '', '1', '2025-03-03 12:28:15', '1', '2025-03-03 12:28:15', '0'); |
| 1178 | 1178 | 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 (1691, 6, '重排', '6', 'ai_model_type', 0, '', '', '', '1', '2025-03-03 12:28:26', '1', '2025-03-03 12:28:26', '0'); |
| 1179 | 1179 | 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 (1692, 14, 'MiniMax', 'MiniMax', 'ai_platform', 0, '', '', '', '1', '2025-03-11 20:04:51', '1', '2025-03-11 20:04:51', '0'); |
| 1180 | -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 (1693, 15, '月之暗灭', 'Moonshot', 'ai_platform', 0, '', '', '', '1', '2025-03-11 20:05:08', '1', '2025-03-11 20:05:08', '0'); | |
| 1180 | +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 (1693, 15, '月之暗面', 'Moonshot', 'ai_platform', 0, '', '', '', '1', '2025-03-11 20:05:08', '1', '2025-03-11 20:05:08', '0'); | |
| 1181 | 1181 | 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 (2000, 0, '标准数据格式(JSON)', '0', 'iot_data_format', 0, 'default', '', '', '1', '2024-08-10 11:53:26', '1', '2025-03-17 09:28:16', '0'); |
| 1182 | 1182 | 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 (2001, 1, '透传/自定义', '1', 'iot_data_format', 0, 'default', '', '', '1', '2024-08-10 11:53:37', '1', '2025-03-17 09:28:19', '0'); |
| 1183 | 1183 | 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 (2002, 0, '直连设备', '0', 'iot_product_device_type', 0, 'default', '', '', '1', '2024-08-10 11:54:58', '1', '2025-03-17 09:28:22', '0'); | ... | ... |
sql/oracle/ruoyi-vue-pro.sql
| ... | ... | @@ -1129,7 +1129,7 @@ INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_t |
| 1129 | 1129 | 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 (1690, 5, '向量', '5', 'ai_model_type', 0, '', '', '', '1', to_date('2025-03-03 12:28:15', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2025-03-03 12:28:15', 'SYYYY-MM-DD HH24:MI:SS'), '0'); |
| 1130 | 1130 | 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 (1691, 6, '重排', '6', 'ai_model_type', 0, '', '', '', '1', to_date('2025-03-03 12:28:26', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2025-03-03 12:28:26', 'SYYYY-MM-DD HH24:MI:SS'), '0'); |
| 1131 | 1131 | 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 (1692, 14, 'MiniMax', 'MiniMax', 'ai_platform', 0, '', '', '', '1', to_date('2025-03-11 20:04:51', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2025-03-11 20:04:51', 'SYYYY-MM-DD HH24:MI:SS'), '0'); |
| 1132 | -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 (1693, 15, '月之暗灭', 'Moonshot', 'ai_platform', 0, '', '', '', '1', to_date('2025-03-11 20:05:08', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2025-03-11 20:05:08', 'SYYYY-MM-DD HH24:MI:SS'), '0'); | |
| 1132 | +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 (1693, 15, '月之暗面', 'Moonshot', 'ai_platform', 0, '', '', '', '1', to_date('2025-03-11 20:05:08', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2025-03-11 20:05:08', 'SYYYY-MM-DD HH24:MI:SS'), '0'); | |
| 1133 | 1133 | 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 (2000, 0, '标准数据格式(JSON)', '0', 'iot_data_format', 0, 'default', '', '', '1', to_date('2024-08-10 11:53:26', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2025-03-17 09:28:16', 'SYYYY-MM-DD HH24:MI:SS'), '0'); |
| 1134 | 1134 | 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 (2001, 1, '透传/自定义', '1', 'iot_data_format', 0, 'default', '', '', '1', to_date('2024-08-10 11:53:37', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2025-03-17 09:28:19', 'SYYYY-MM-DD HH24:MI:SS'), '0'); |
| 1135 | 1135 | 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 (2002, 0, '直连设备', '0', 'iot_product_device_type', 0, 'default', '', '', '1', to_date('2024-08-10 11:54:58', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2025-03-17 09:28:22', 'SYYYY-MM-DD HH24:MI:SS'), '0'); | ... | ... |
sql/postgresql/ruoyi-vue-pro.sql
| ... | ... | @@ -1177,7 +1177,7 @@ INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_t |
| 1177 | 1177 | 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 (1690, 5, '向量', '5', 'ai_model_type', 0, '', '', '', '1', '2025-03-03 12:28:15', '1', '2025-03-03 12:28:15', '0'); |
| 1178 | 1178 | 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 (1691, 6, '重排', '6', 'ai_model_type', 0, '', '', '', '1', '2025-03-03 12:28:26', '1', '2025-03-03 12:28:26', '0'); |
| 1179 | 1179 | 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 (1692, 14, 'MiniMax', 'MiniMax', 'ai_platform', 0, '', '', '', '1', '2025-03-11 20:04:51', '1', '2025-03-11 20:04:51', '0'); |
| 1180 | -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 (1693, 15, '月之暗灭', 'Moonshot', 'ai_platform', 0, '', '', '', '1', '2025-03-11 20:05:08', '1', '2025-03-11 20:05:08', '0'); | |
| 1180 | +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 (1693, 15, '月之暗面', 'Moonshot', 'ai_platform', 0, '', '', '', '1', '2025-03-11 20:05:08', '1', '2025-03-11 20:05:08', '0'); | |
| 1181 | 1181 | 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 (2000, 0, '标准数据格式(JSON)', '0', 'iot_data_format', 0, 'default', '', '', '1', '2024-08-10 11:53:26', '1', '2025-03-17 09:28:16', '0'); |
| 1182 | 1182 | 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 (2001, 1, '透传/自定义', '1', 'iot_data_format', 0, 'default', '', '', '1', '2024-08-10 11:53:37', '1', '2025-03-17 09:28:19', '0'); |
| 1183 | 1183 | 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 (2002, 0, '直连设备', '0', 'iot_product_device_type', 0, 'default', '', '', '1', '2024-08-10 11:54:58', '1', '2025-03-17 09:28:22', '0'); | ... | ... |
sql/sqlserver/ruoyi-vue-pro.sql
| ... | ... | @@ -2945,7 +2945,7 @@ INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_t |
| 2945 | 2945 | GO |
| 2946 | 2946 | 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 (1692, 14, N'MiniMax', N'MiniMax', N'ai_platform', 0, N'', N'', N'', N'1', N'2025-03-11 20:04:51', N'1', N'2025-03-11 20:04:51', N'0') |
| 2947 | 2947 | GO |
| 2948 | -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 (1693, 15, N'月之暗灭', N'Moonshot', N'ai_platform', 0, N'', N'', N'', N'1', N'2025-03-11 20:05:08', N'1', N'2025-03-11 20:05:08', N'0') | |
| 2948 | +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 (1693, 15, N'月之暗面', N'Moonshot', N'ai_platform', 0, N'', N'', N'', N'1', N'2025-03-11 20:05:08', N'1', N'2025-03-11 20:05:08', N'0') | |
| 2949 | 2949 | GO |
| 2950 | 2950 | 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 (2000, 0, N'标准数据格式(JSON)', N'0', N'iot_data_format', 0, N'default', N'', N'', N'1', N'2024-08-10 11:53:26', N'1', N'2025-03-17 09:28:16', N'0') |
| 2951 | 2951 | GO | ... | ... |
sql/tools/convertor.py
| ... | ... | @@ -52,6 +52,7 @@ def load_and_clean(sql_file: str) -> str: |
| 52 | 52 | REPLACE_PAIR_LIST = ( |
| 53 | 53 | (")\nVALUES ", ") VALUES "), |
| 54 | 54 | (" CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci ", " "), |
| 55 | + (" CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci ", " "), | |
| 55 | 56 | (" KEY `", " INDEX `"), |
| 56 | 57 | ("UNIQUE INDEX", "UNIQUE KEY"), |
| 57 | 58 | ("b'0'", "'0'"), |
| ... | ... | @@ -61,6 +62,11 @@ def load_and_clean(sql_file: str) -> str: |
| 61 | 62 | content = open(sql_file, encoding="utf-8").read() |
| 62 | 63 | for replace_pair in REPLACE_PAIR_LIST: |
| 63 | 64 | content = content.replace(*replace_pair) |
| 65 | + # 移除索引字段的前缀长度定义,例如: `name`(32) -> `name` | |
| 66 | + # 移除索引定义上的 USING BTREE COMMENT 部分 | |
| 67 | + # 相关 issue:https://t.zsxq.com/96IFc 、https://t.zsxq.com/rC3A3 | |
| 68 | + content = re.sub(r'`([^`]+)`\(\d+\)', r'`\1`', content) | |
| 69 | + content = re.sub(r'\s+USING\s+BTREE\s+COMMENT\s+\'[^\']+\'', '', content) | |
| 64 | 70 | content = re.sub(r"ENGINE.*COMMENT", "COMMENT", content) |
| 65 | 71 | content = re.sub(r"ENGINE.*;", ";", content) |
| 66 | 72 | return content |
| ... | ... | @@ -262,10 +268,10 @@ class Convertor(ABC): |
| 262 | 268 | # 解析注释 |
| 263 | 269 | for column in table_ddl["columns"]: |
| 264 | 270 | column["comment"] = bytes(column["comment"], "utf-8").decode( |
| 265 | - "unicode_escape" | |
| 271 | + r"unicode_escape" | |
| 266 | 272 | )[1:-1] |
| 267 | 273 | table_ddl["comment"] = bytes(table_ddl["comment"], "utf-8").decode( |
| 268 | - "unicode_escape" | |
| 274 | + r"unicode_escape" | |
| 269 | 275 | )[1:-1] |
| 270 | 276 | |
| 271 | 277 | # 为每个表生成个6个基本部分 | ... | ... |
yudao-dependencies/pom.xml
| ... | ... | @@ -14,12 +14,12 @@ |
| 14 | 14 | <url>https://github.com/YunaiV/ruoyi-vue-pro</url> |
| 15 | 15 | |
| 16 | 16 | <properties> |
| 17 | - <revision>2025.10-SNAPSHOT</revision> | |
| 17 | + <revision>2025.11-SNAPSHOT</revision> | |
| 18 | 18 | <flatten-maven-plugin.version>1.7.2</flatten-maven-plugin.version> |
| 19 | 19 | <!-- 统一依赖管理 --> |
| 20 | - <spring.boot.version>3.5.5</spring.boot.version> | |
| 20 | + <spring.boot.version>3.5.8</spring.boot.version> | |
| 21 | 21 | <!-- Web 相关 --> |
| 22 | - <springdoc.version>2.8.11</springdoc.version> | |
| 22 | + <springdoc.version>2.8.14</springdoc.version> | |
| 23 | 23 | <knife4j.version>4.5.0</knife4j.version> |
| 24 | 24 | <!-- DB 相关 --> |
| 25 | 25 | <druid.version>1.2.27</druid.version> |
| ... | ... | @@ -28,54 +28,53 @@ |
| 28 | 28 | <mybatis-plus-join.version>1.5.4</mybatis-plus-join.version> |
| 29 | 29 | <dynamic-datasource.version>4.3.1</dynamic-datasource.version> |
| 30 | 30 | <easy-trans.version>3.0.6</easy-trans.version> |
| 31 | - <redisson.version>3.51.0</redisson.version> | |
| 31 | + <redisson.version>3.52.0</redisson.version> | |
| 32 | 32 | <dm8.jdbc.version>8.1.3.140</dm8.jdbc.version> |
| 33 | 33 | <kingbase.jdbc.version>8.6.0</kingbase.jdbc.version> |
| 34 | 34 | <opengauss.jdbc.version>5.1.0</opengauss.jdbc.version> |
| 35 | - <taos.version>3.7.3</taos.version> | |
| 35 | + <taos.version>3.7.8</taos.version> | |
| 36 | 36 | <!-- 消息队列 --> |
| 37 | 37 | <rocketmq-spring.version>2.3.4</rocketmq-spring.version> |
| 38 | 38 | <!-- 服务保障相关 --> |
| 39 | 39 | <lock4j.version>2.2.7</lock4j.version> |
| 40 | 40 | <!-- 监控相关 --> |
| 41 | 41 | <skywalking.version>9.5.0</skywalking.version> |
| 42 | - <spring-boot-admin.version>3.5.2</spring-boot-admin.version> | |
| 42 | + <spring-boot-admin.version>3.5.6</spring-boot-admin.version> | |
| 43 | 43 | <opentracing.version>0.33.0</opentracing.version> |
| 44 | 44 | <!-- Test 测试相关 --> |
| 45 | 45 | <podam.version>8.0.2.RELEASE</podam.version> |
| 46 | - <jedis-mock.version>1.1.11</jedis-mock.version> | |
| 46 | + <jedis-mock.version>1.1.12</jedis-mock.version> | |
| 47 | 47 | <mockito-inline.version>5.2.0</mockito-inline.version> |
| 48 | 48 | <!-- Bpm 工作流相关 --> |
| 49 | - <flowable.version>7.0.1</flowable.version> | |
| 49 | + <flowable.version>7.2.0</flowable.version> | |
| 50 | 50 | <!-- 工具类相关 --> |
| 51 | 51 | <anji-plus-captcha.version>1.4.0</anji-plus-captcha.version> |
| 52 | 52 | <jsoup.version>1.21.2</jsoup.version> |
| 53 | - <lombok.version>1.18.38</lombok.version> | |
| 53 | + <lombok.version>1.18.42</lombok.version> | |
| 54 | 54 | <mapstruct.version>1.6.3</mapstruct.version> |
| 55 | - <hutool-5.version>5.8.40</hutool-5.version> | |
| 55 | + <hutool-5.version>5.8.41</hutool-5.version> | |
| 56 | 56 | <hutool-6.version>6.0.0-M22</hutool-6.version> |
| 57 | 57 | <fastexcel.version>1.3.0</fastexcel.version> |
| 58 | 58 | <velocity.version>2.4.1</velocity.version> |
| 59 | 59 | <fastjson.version>1.2.83</fastjson.version> |
| 60 | - <guava.version>33.4.8-jre</guava.version> | |
| 60 | + <guava.version>33.5.0-jre</guava.version> | |
| 61 | 61 | <transmittable-thread-local.version>2.14.5</transmittable-thread-local.version> |
| 62 | - <commons-net.version>3.11.1</commons-net.version> | |
| 63 | - <commons-lang3.version>3.18.0</commons-lang3.version> | |
| 64 | - <jsch.version>2.27.3</jsch.version> | |
| 65 | - <tika-core.version>3.2.2</tika-core.version> | |
| 62 | + <commons-net.version>3.12.0</commons-net.version> | |
| 63 | + <commons-lang3.version>3.20.0</commons-lang3.version> | |
| 64 | + <jsch.version>2.27.6</jsch.version> | |
| 65 | + <tika-core.version>3.2.3</tika-core.version> | |
| 66 | 66 | <ip2region.version>2.7.0</ip2region.version> |
| 67 | 67 | <bizlog-sdk.version>3.0.6</bizlog-sdk.version> |
| 68 | - <netty.version>4.2.4.Final</netty.version> | |
| 68 | + <netty.version>4.2.7.Final</netty.version> | |
| 69 | 69 | <mqtt.version>1.2.5</mqtt.version> |
| 70 | - <pf4j-spring.version>0.9.0</pf4j-spring.version> | |
| 71 | - <vertx.version>4.5.13</vertx.version> | |
| 70 | + <vertx.version>4.5.22</vertx.version> | |
| 72 | 71 | <!-- 三方云服务相关 --> |
| 73 | - <awssdk.version>2.30.14</awssdk.version> | |
| 72 | + <awssdk.version>2.39.2</awssdk.version> | |
| 74 | 73 | <justauth.version>1.16.7</justauth.version> |
| 75 | 74 | <justauth-starter.version>1.4.0</justauth-starter.version> |
| 76 | - <jimureport.version>2.1.1</jimureport.version> | |
| 77 | - <jimubi.version>2.1.0</jimubi.version> | |
| 78 | - <weixin-java.version>4.7.7-20250808.182223</weixin-java.version> | |
| 75 | + <jimureport.version>2.1.3</jimureport.version> | |
| 76 | + <jimubi.version>2.2.0</jimubi.version> | |
| 77 | + <weixin-java.version>4.7.8-20251117.120146</weixin-java.version> | |
| 79 | 78 | </properties> |
| 80 | 79 | |
| 81 | 80 | <dependencyManagement> |
| ... | ... | @@ -618,19 +617,6 @@ |
| 618 | 617 | </exclusions> |
| 619 | 618 | </dependency> |
| 620 | 619 | |
| 621 | - <!-- PF4J --> | |
| 622 | - <dependency> | |
| 623 | - <groupId>org.pf4j</groupId> | |
| 624 | - <artifactId>pf4j-spring</artifactId> | |
| 625 | - <version>${pf4j-spring.version}</version> | |
| 626 | - <exclusions> | |
| 627 | - <exclusion> | |
| 628 | - <groupId>org.slf4j</groupId> | |
| 629 | - <artifactId>slf4j-log4j12</artifactId> | |
| 630 | - </exclusion> | |
| 631 | - </exclusions> | |
| 632 | - </dependency> | |
| 633 | - | |
| 634 | 620 | <!-- Vert.x --> |
| 635 | 621 | <dependency> |
| 636 | 622 | <groupId>io.vertx</groupId> | ... | ... |
yudao-framework/yudao-common/src/main/java/cn/iocoder/yudao/framework/common/util/json/databind/TimestampLocalDateTimeSerializer.java
| 1 | 1 | package cn.iocoder.yudao.framework.common.util.json.databind; |
| 2 | 2 | |
| 3 | +import cn.hutool.core.util.ReflectUtil; | |
| 4 | +import com.fasterxml.jackson.annotation.JsonFormat; | |
| 3 | 5 | import com.fasterxml.jackson.core.JsonGenerator; |
| 4 | 6 | import com.fasterxml.jackson.databind.JsonSerializer; |
| 5 | 7 | import com.fasterxml.jackson.databind.SerializerProvider; |
| 6 | 8 | |
| 7 | 9 | import java.io.IOException; |
| 10 | +import java.lang.reflect.Field; | |
| 8 | 11 | import java.time.LocalDateTime; |
| 9 | 12 | import java.time.ZoneId; |
| 13 | +import java.time.format.DateTimeFormatter; | |
| 10 | 14 | |
| 11 | 15 | /** |
| 12 | 16 | * 基于时间戳的 LocalDateTime 序列化器 |
| ... | ... | @@ -19,7 +23,19 @@ public class TimestampLocalDateTimeSerializer extends JsonSerializer<LocalDateTi |
| 19 | 23 | |
| 20 | 24 | @Override |
| 21 | 25 | public void serialize(LocalDateTime value, JsonGenerator gen, SerializerProvider serializers) throws IOException { |
| 22 | - // 将 LocalDateTime 对象,转换为 Long 时间戳 | |
| 26 | + String fieldName = gen.getOutputContext().getCurrentName(); | |
| 27 | + Class<?> clazz = gen.getOutputContext().getCurrentValue().getClass(); | |
| 28 | + Field field = ReflectUtil.getField(clazz, fieldName); | |
| 29 | + // 情况一:有 JsonFormat 自定义注解,则使用它。https://github.com/YunaiV/ruoyi-vue-pro/pull/1019 | |
| 30 | + JsonFormat[] jsonFormats = field.getAnnotationsByType(JsonFormat.class); | |
| 31 | + if (jsonFormats.length > 0) { | |
| 32 | + String pattern = jsonFormats[0].pattern(); | |
| 33 | + DateTimeFormatter formatter = DateTimeFormatter.ofPattern(pattern); | |
| 34 | + gen.writeString(formatter.format(value)); | |
| 35 | + return; | |
| 36 | + } | |
| 37 | + | |
| 38 | + // 情况二:默认将 LocalDateTime 对象,转换为 Long 时间戳 | |
| 23 | 39 | gen.writeNumber(value.atZone(ZoneId.systemDefault()).toInstant().toEpochMilli()); |
| 24 | 40 | } |
| 25 | 41 | ... | ... |
yudao-framework/yudao-spring-boot-starter-biz-data-permission/src/main/java/cn/iocoder/yudao/framework/datapermission/core/rule/DataPermissionRuleFactoryImpl.java
| ... | ... | @@ -4,6 +4,7 @@ import cn.hutool.core.collection.CollUtil; |
| 4 | 4 | import cn.hutool.core.util.ArrayUtil; |
| 5 | 5 | import cn.iocoder.yudao.framework.datapermission.core.annotation.DataPermission; |
| 6 | 6 | import cn.iocoder.yudao.framework.datapermission.core.aop.DataPermissionContextHolder; |
| 7 | +import com.fhs.trans.service.impl.SimpleTransService; | |
| 7 | 8 | import lombok.RequiredArgsConstructor; |
| 8 | 9 | |
| 9 | 10 | import java.util.Collections; |
| ... | ... | @@ -31,32 +32,53 @@ public class DataPermissionRuleFactoryImpl implements DataPermissionRuleFactory |
| 31 | 32 | |
| 32 | 33 | @Override // mappedStatementId 参数,暂时没有用。以后,可以基于 mappedStatementId + DataPermission 进行缓存 |
| 33 | 34 | public List<DataPermissionRule> getDataPermissionRule(String mappedStatementId) { |
| 34 | - // 1. 无数据权限 | |
| 35 | + // 1.1 无数据权限 | |
| 35 | 36 | if (CollUtil.isEmpty(rules)) { |
| 36 | 37 | return Collections.emptyList(); |
| 37 | 38 | } |
| 38 | - // 2. 未配置,则默认开启 | |
| 39 | + // 1.2 未配置,则默认开启 | |
| 39 | 40 | DataPermission dataPermission = DataPermissionContextHolder.get(); |
| 40 | 41 | if (dataPermission == null) { |
| 41 | 42 | return rules; |
| 42 | 43 | } |
| 43 | - // 3. 已配置,但禁用 | |
| 44 | + // 1.3 已配置,但禁用 | |
| 44 | 45 | if (!dataPermission.enable()) { |
| 45 | 46 | return Collections.emptyList(); |
| 46 | 47 | } |
| 48 | + // 1.4 特殊:数据翻译时,强制忽略数据权限 https://github.com/YunaiV/ruoyi-vue-pro/issues/1007 | |
| 49 | + if (isTranslateCall()) { | |
| 50 | + return Collections.emptyList(); | |
| 51 | + } | |
| 47 | 52 | |
| 48 | - // 4. 已配置,只选择部分规则 | |
| 53 | + // 2.1 情况一:已配置,只选择部分规则 | |
| 49 | 54 | if (ArrayUtil.isNotEmpty(dataPermission.includeRules())) { |
| 50 | 55 | return rules.stream().filter(rule -> ArrayUtil.contains(dataPermission.includeRules(), rule.getClass())) |
| 51 | 56 | .collect(Collectors.toList()); // 一般规则不会太多,所以不采用 HashSet 查询 |
| 52 | 57 | } |
| 53 | - // 5. 已配置,只排除部分规则 | |
| 58 | + // 2.2 已配置,只排除部分规则 | |
| 54 | 59 | if (ArrayUtil.isNotEmpty(dataPermission.excludeRules())) { |
| 55 | 60 | return rules.stream().filter(rule -> !ArrayUtil.contains(dataPermission.excludeRules(), rule.getClass())) |
| 56 | 61 | .collect(Collectors.toList()); // 一般规则不会太多,所以不采用 HashSet 查询 |
| 57 | 62 | } |
| 58 | - // 6. 已配置,全部规则 | |
| 63 | + // 2.3 已配置,全部规则 | |
| 59 | 64 | return rules; |
| 60 | 65 | } |
| 61 | 66 | |
| 67 | + /** | |
| 68 | + * 判断是否为数据翻译 {@link com.fhs.core.trans.anno.Trans} 的调用 | |
| 69 | + * | |
| 70 | + * 目前暂时只有这个办法,已经和 easy-trans 做过沟通 | |
| 71 | + * | |
| 72 | + * @return 是否 | |
| 73 | + */ | |
| 74 | + private boolean isTranslateCall() { | |
| 75 | + StackTraceElement[] stack = Thread.currentThread().getStackTrace(); | |
| 76 | + for (StackTraceElement e : stack) { | |
| 77 | + if (SimpleTransService.class.getName().equals(e.getClassName())) { | |
| 78 | + return true; | |
| 79 | + } | |
| 80 | + } | |
| 81 | + return false; | |
| 82 | + } | |
| 83 | + | |
| 62 | 84 | } | ... | ... |
yudao-framework/yudao-spring-boot-starter-excel/src/main/java/cn/iocoder/yudao/framework/excel/core/util/ExcelUtils.java
| ... | ... | @@ -9,6 +9,7 @@ import jakarta.servlet.http.HttpServletResponse; |
| 9 | 9 | import org.springframework.web.multipart.MultipartFile; |
| 10 | 10 | |
| 11 | 11 | import java.io.IOException; |
| 12 | +import java.io.InputStream; | |
| 12 | 13 | import java.util.List; |
| 13 | 14 | |
| 14 | 15 | /** |
| ... | ... | @@ -44,9 +45,12 @@ public class ExcelUtils { |
| 44 | 45 | } |
| 45 | 46 | |
| 46 | 47 | public static <T> List<T> read(MultipartFile file, Class<T> head) throws IOException { |
| 47 | - return FastExcelFactory.read(file.getInputStream(), head, null) | |
| 48 | - .autoCloseStream(false) // 不要自动关闭,交给 Servlet 自己处理 | |
| 49 | - .doReadAllSync(); | |
| 48 | + // 参考 https://t.zsxq.com/zM77F 帖子,增加 try 处理,兼容 windows 场景 | |
| 49 | + try (InputStream inputStream = file.getInputStream()) { | |
| 50 | + return FastExcelFactory.read(inputStream, head, null) | |
| 51 | + .autoCloseStream(false) // 不要自动关闭,交给 Servlet 自己处理 | |
| 52 | + .doReadAllSync(); | |
| 53 | + } | |
| 50 | 54 | } |
| 51 | 55 | |
| 52 | 56 | } | ... | ... |
yudao-framework/yudao-spring-boot-starter-mybatis/src/main/java/cn/iocoder/yudao/framework/mybatis/config/IdTypeEnvironmentPostProcessor.java
| ... | ... | @@ -9,7 +9,10 @@ import lombok.extern.slf4j.Slf4j; |
| 9 | 9 | import org.springframework.boot.SpringApplication; |
| 10 | 10 | import org.springframework.boot.env.EnvironmentPostProcessor; |
| 11 | 11 | import org.springframework.core.env.ConfigurableEnvironment; |
| 12 | +import org.springframework.core.env.MapPropertySource; | |
| 12 | 13 | |
| 14 | +import java.util.HashMap; | |
| 15 | +import java.util.Map; | |
| 13 | 16 | import java.util.Set; |
| 14 | 17 | |
| 15 | 18 | /** |
| ... | ... | @@ -56,11 +59,19 @@ public class IdTypeEnvironmentPostProcessor implements EnvironmentPostProcessor |
| 56 | 59 | } |
| 57 | 60 | |
| 58 | 61 | public IdType getIdType(ConfigurableEnvironment environment) { |
| 59 | - return environment.getProperty(ID_TYPE_KEY, IdType.class); | |
| 62 | + String value = environment.getProperty(ID_TYPE_KEY); | |
| 63 | + try { | |
| 64 | + return StrUtil.isNotBlank(value) ? IdType.valueOf(value) : IdType.NONE; | |
| 65 | + } catch (IllegalArgumentException ex) { | |
| 66 | + log.error("[getIdType][无法解析 id-type 配置值({})]", value, ex); | |
| 67 | + return IdType.NONE; | |
| 68 | + } | |
| 60 | 69 | } |
| 61 | 70 | |
| 62 | 71 | public void setIdType(ConfigurableEnvironment environment, IdType idType) { |
| 63 | - environment.getSystemProperties().put(ID_TYPE_KEY, idType); | |
| 72 | + Map<String, Object> map = new HashMap<>(); | |
| 73 | + map.put(ID_TYPE_KEY, idType); | |
| 74 | + environment.getPropertySources().addFirst(new MapPropertySource("mybatisPlusIdType", map)); | |
| 64 | 75 | log.info("[setIdType][修改 MyBatis Plus 的 idType 为({})]", idType); |
| 65 | 76 | } |
| 66 | 77 | ... | ... |
yudao-framework/yudao-spring-boot-starter-mybatis/src/main/java/cn/iocoder/yudao/framework/mybatis/core/mapper/BaseMapperX.java
| ... | ... | @@ -68,6 +68,29 @@ public interface BaseMapperX<T> extends MPJBaseMapper<T> { |
| 68 | 68 | return new PageResult<>(mpPage.getRecords(), mpPage.getTotal()); |
| 69 | 69 | } |
| 70 | 70 | |
| 71 | + /** | |
| 72 | + * 执行分页查询并返回结果。 | |
| 73 | + * | |
| 74 | + * @param pageParam 分页参数,包含页码、每页条数和排序字段信息。如果 pageSize 为 {@link PageParam#PAGE_SIZE_NONE},则不分页,直接查询所有数据。 | |
| 75 | + * @param clazz 结果集的类类型 | |
| 76 | + * @param lambdaWrapper MyBatis Plus Join 查询条件包装器 | |
| 77 | + * @param <D> 结果集的泛型类型 | |
| 78 | + * @return 返回分页查询的结果,包括总记录数和当前页的数据列表 | |
| 79 | + */ | |
| 80 | + default <D> PageResult<D> selectJoinPage(SortablePageParam pageParam, Class<D> clazz, MPJLambdaWrapper<T> lambdaWrapper) { | |
| 81 | + // 特殊:不分页,直接查询全部 | |
| 82 | + if (PageParam.PAGE_SIZE_NONE.equals(pageParam.getPageSize())) { | |
| 83 | + List<D> list = selectJoinList(clazz, lambdaWrapper); | |
| 84 | + return new PageResult<>(list, (long) list.size()); | |
| 85 | + } | |
| 86 | + | |
| 87 | + // MyBatis Plus Join 查询 | |
| 88 | + IPage<D> mpPage = MyBatisUtils.buildPage(pageParam, pageParam.getSortingFields()); | |
| 89 | + mpPage = selectJoinPage(mpPage, clazz, lambdaWrapper); | |
| 90 | + // 转换返回 | |
| 91 | + return new PageResult<>(mpPage.getRecords(), mpPage.getTotal()); | |
| 92 | + } | |
| 93 | + | |
| 71 | 94 | default <DTO> PageResult<DTO> selectJoinPage(PageParam pageParam, Class<DTO> resultTypeClass, MPJBaseJoin<T> joinQueryWrapper) { |
| 72 | 95 | IPage<DTO> mpPage = MyBatisUtils.buildPage(pageParam); |
| 73 | 96 | selectJoinPage(mpPage, resultTypeClass, joinQueryWrapper); | ... | ... |
yudao-framework/yudao-spring-boot-starter-mybatis/src/main/java/cn/iocoder/yudao/framework/mybatis/core/util/MyBatisUtils.java
| ... | ... | @@ -38,6 +38,7 @@ public class MyBatisUtils { |
| 38 | 38 | public static <T> Page<T> buildPage(PageParam pageParam, Collection<SortingField> sortingFields) { |
| 39 | 39 | // 页码 + 数量 |
| 40 | 40 | Page<T> page = new Page<>(pageParam.getPageNo(), pageParam.getPageSize()); |
| 41 | + page.setOptimizeJoinOfCountSql(false); // 关联 issue:https://gitee.com/zhijiantianya/yudao-cloud/issues/ID2QLL | |
| 41 | 42 | // 排序字段 |
| 42 | 43 | if (CollUtil.isNotEmpty(sortingFields)) { |
| 43 | 44 | for (SortingField sortingField : sortingFields) { | ... | ... |
yudao-framework/yudao-spring-boot-starter-web/src/main/java/cn/iocoder/yudao/framework/encrypt/core/filter/ApiEncryptResponseWrapper.java
| ... | ... | @@ -42,15 +42,16 @@ public class ApiEncryptResponseWrapper extends HttpServletResponseWrapper { |
| 42 | 42 | this.flushBuffer(); |
| 43 | 43 | byte[] body = byteArrayOutputStream.toByteArray(); |
| 44 | 44 | |
| 45 | - // 2. 加密 body | |
| 46 | - String encryptedBody = symmetricEncryptor != null ? symmetricEncryptor.encryptBase64(body) | |
| 47 | - : asymmetricEncryptor.encryptBase64(body, KeyType.PublicKey); | |
| 48 | - response.getWriter().write(encryptedBody); | |
| 49 | - | |
| 50 | - // 3. 添加加密 header 标识 | |
| 45 | + // 2. 添加加密 header 标识 | |
| 51 | 46 | this.addHeader(properties.getHeader(), "true"); |
| 52 | 47 | // 特殊:特殊:https://juejin.cn/post/6867327674675625992 |
| 53 | 48 | this.addHeader("Access-Control-Expose-Headers", properties.getHeader()); |
| 49 | + | |
| 50 | + // 3.1 加密 body | |
| 51 | + String encryptedBody = symmetricEncryptor != null ? symmetricEncryptor.encryptBase64(body) | |
| 52 | + : asymmetricEncryptor.encryptBase64(body, KeyType.PublicKey); | |
| 53 | + // 3.2 输出加密后的 body:(设置 header 要放在 response 的 write 之前) | |
| 54 | + response.getWriter().write(encryptedBody); | |
| 54 | 55 | } |
| 55 | 56 | |
| 56 | 57 | @Override | ... | ... |
yudao-framework/yudao-spring-boot-starter-web/src/main/java/cn/iocoder/yudao/framework/web/config/YudaoWebAutoConfiguration.java
| ... | ... | @@ -9,7 +9,6 @@ import cn.iocoder.yudao.framework.web.core.handler.GlobalExceptionHandler; |
| 9 | 9 | import cn.iocoder.yudao.framework.web.core.handler.GlobalResponseBodyHandler; |
| 10 | 10 | import cn.iocoder.yudao.framework.web.core.util.WebFrameworkUtils; |
| 11 | 11 | import com.google.common.collect.Maps; |
| 12 | -import jakarta.annotation.Resource; | |
| 13 | 12 | import jakarta.servlet.Filter; |
| 14 | 13 | import org.springframework.beans.factory.annotation.Value; |
| 15 | 14 | import org.springframework.boot.autoconfigure.AutoConfiguration; |
| ... | ... | @@ -28,8 +27,6 @@ import org.springframework.web.client.RestTemplate; |
| 28 | 27 | import org.springframework.web.cors.CorsConfiguration; |
| 29 | 28 | import org.springframework.web.cors.UrlBasedCorsConfigurationSource; |
| 30 | 29 | import org.springframework.web.filter.CorsFilter; |
| 31 | -import org.springframework.web.servlet.config.annotation.PathMatchConfigurer; | |
| 32 | -import org.springframework.web.servlet.config.annotation.WebMvcConfigurer; | |
| 33 | 30 | import org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerMapping; |
| 34 | 31 | |
| 35 | 32 | import java.util.Map; |
| ... | ... | @@ -108,6 +105,7 @@ public class YudaoWebAutoConfiguration { |
| 108 | 105 | */ |
| 109 | 106 | @Order(value = WebFilterOrderEnum.CORS_FILTER) |
| 110 | 107 | @Bean |
| 108 | + @Order(value = WebFilterOrderEnum.CORS_FILTER) // 特殊:修复因执行顺序影响到跨域配置不生效问题 | |
| 111 | 109 | public FilterRegistrationBean<CorsFilter> corsFilterBean() { |
| 112 | 110 | // 创建 CorsConfiguration 对象 |
| 113 | 111 | CorsConfiguration config = new CorsConfiguration(); | ... | ... |
yudao-module-ai/pom.xml
| ... | ... | @@ -19,9 +19,9 @@ |
| 19 | 19 | 国外:OpenAI、Ollama、Midjourney、StableDiffusion、Suno |
| 20 | 20 | </description> |
| 21 | 21 | <properties> |
| 22 | - <spring-ai.version>1.0.1</spring-ai.version> | |
| 23 | - <alibaba-ai.version>1.0.0.3</alibaba-ai.version> | |
| 24 | - <tinyflow.version>1.0.2</tinyflow.version> | |
| 22 | + <spring-ai.version>1.1.0</spring-ai.version> | |
| 23 | + <alibaba-ai.version>1.1.0.0-M5</alibaba-ai.version> | |
| 24 | + <tinyflow.version>1.2.6</tinyflow.version> | |
| 25 | 25 | </properties> |
| 26 | 26 | |
| 27 | 27 | <dependencies> |
| ... | ... | @@ -136,7 +136,7 @@ |
| 136 | 136 | <version>1.0.0</version> |
| 137 | 137 | </dependency> |
| 138 | 138 | <dependency> |
| 139 | - <!-- 月之暗灭 --> | |
| 139 | + <!-- 月之暗面 --> | |
| 140 | 140 | <groupId>org.springaicommunity</groupId> |
| 141 | 141 | <artifactId>moonshot-spring-boot-starter</artifactId> |
| 142 | 142 | <version>1.0.0</version> | ... | ... |
yudao-module-ai/src/main/java/cn/iocoder/yudao/module/ai/enums/model/AiPlatformEnum.java
| ... | ... | @@ -26,7 +26,7 @@ public enum AiPlatformEnum implements ArrayValuable<String> { |
| 26 | 26 | HUN_YUAN("HunYuan", "混元"), // 腾讯 |
| 27 | 27 | SILICON_FLOW("SiliconFlow", "硅基流动"), // 硅基流动 |
| 28 | 28 | MINI_MAX("MiniMax", "MiniMax"), // 稀宇科技 |
| 29 | - MOONSHOT("Moonshot", "月之暗灭"), // KIMI | |
| 29 | + MOONSHOT("Moonshot", "月之暗面"), // KIMI | |
| 30 | 30 | BAI_CHUAN("BaiChuan", "百川智能"), // 百川智能 |
| 31 | 31 | |
| 32 | 32 | // ========== 国外平台 ========== |
| ... | ... | @@ -40,6 +40,7 @@ public enum AiPlatformEnum implements ArrayValuable<String> { |
| 40 | 40 | STABLE_DIFFUSION("StableDiffusion", "StableDiffusion"), // Stability AI |
| 41 | 41 | MIDJOURNEY("Midjourney", "Midjourney"), // Midjourney |
| 42 | 42 | SUNO("Suno", "Suno"), // Suno AI |
| 43 | + GROK("Grok","Grok"), // Grok | |
| 43 | 44 | |
| 44 | 45 | ; |
| 45 | 46 | ... | ... |
yudao-module-ai/src/main/java/cn/iocoder/yudao/module/ai/framework/ai/config/AiAutoConfiguration.java
| ... | ... | @@ -7,6 +7,7 @@ import cn.iocoder.yudao.module.ai.framework.ai.core.model.AiModelFactoryImpl; |
| 7 | 7 | import cn.iocoder.yudao.module.ai.framework.ai.core.model.baichuan.BaiChuanChatModel; |
| 8 | 8 | import cn.iocoder.yudao.module.ai.framework.ai.core.model.doubao.DouBaoChatModel; |
| 9 | 9 | import cn.iocoder.yudao.module.ai.framework.ai.core.model.gemini.GeminiChatModel; |
| 10 | +import cn.iocoder.yudao.module.ai.framework.ai.core.model.grok.GrokChatModel; | |
| 10 | 11 | import cn.iocoder.yudao.module.ai.framework.ai.core.model.hunyuan.HunYuanChatModel; |
| 11 | 12 | import cn.iocoder.yudao.module.ai.framework.ai.core.model.midjourney.api.MidjourneyApi; |
| 12 | 13 | import cn.iocoder.yudao.module.ai.framework.ai.core.model.siliconflow.SiliconFlowApiConstants; |
| ... | ... | @@ -16,7 +17,9 @@ import cn.iocoder.yudao.module.ai.framework.ai.core.model.xinghuo.XingHuoChatMod |
| 16 | 17 | import cn.iocoder.yudao.module.ai.framework.ai.core.webserch.AiWebSearchClient; |
| 17 | 18 | import cn.iocoder.yudao.module.ai.framework.ai.core.webserch.bocha.AiBoChaWebSearchClient; |
| 18 | 19 | import cn.iocoder.yudao.module.ai.tool.method.PersonService; |
| 20 | +import io.micrometer.observation.ObservationRegistry; | |
| 19 | 21 | import lombok.extern.slf4j.Slf4j; |
| 22 | +import org.springframework.ai.chat.model.ChatModel; | |
| 20 | 23 | import org.springframework.ai.deepseek.DeepSeekChatModel; |
| 21 | 24 | import org.springframework.ai.deepseek.DeepSeekChatOptions; |
| 22 | 25 | import org.springframework.ai.deepseek.api.DeepSeekApi; |
| ... | ... | @@ -34,12 +37,14 @@ import org.springframework.ai.vectorstore.milvus.autoconfigure.MilvusServiceClie |
| 34 | 37 | import org.springframework.ai.vectorstore.milvus.autoconfigure.MilvusVectorStoreProperties; |
| 35 | 38 | import org.springframework.ai.vectorstore.qdrant.autoconfigure.QdrantVectorStoreProperties; |
| 36 | 39 | import org.springframework.ai.vectorstore.redis.autoconfigure.RedisVectorStoreProperties; |
| 40 | +import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean; | |
| 37 | 41 | import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty; |
| 38 | 42 | import org.springframework.boot.context.properties.EnableConfigurationProperties; |
| 39 | 43 | import org.springframework.context.annotation.Bean; |
| 40 | 44 | import org.springframework.context.annotation.Configuration; |
| 41 | 45 | |
| 42 | 46 | import java.util.List; |
| 47 | +import java.util.Optional; | |
| 43 | 48 | |
| 44 | 49 | /** |
| 45 | 50 | * 芋道 AI 自动配置 |
| ... | ... | @@ -60,6 +65,13 @@ public class AiAutoConfiguration { |
| 60 | 65 | return new AiModelFactoryImpl(); |
| 61 | 66 | } |
| 62 | 67 | |
| 68 | + @Bean | |
| 69 | + @ConditionalOnMissingBean | |
| 70 | + public ObservationRegistry observationRegistry() { | |
| 71 | + // 特殊:兜底有 ObservationRegistry Bean,避免相关的 ChatModel 创建报错。相关 issue:https://t.zsxq.com/CuPu4 | |
| 72 | + return ObservationRegistry.NOOP; | |
| 73 | + } | |
| 74 | + | |
| 63 | 75 | // ========== 各种 AI Client 创建 ========== |
| 64 | 76 | |
| 65 | 77 | @Bean |
| ... | ... | @@ -252,6 +264,28 @@ public class AiAutoConfiguration { |
| 252 | 264 | return new SunoApi(yudaoAiProperties.getSuno().getBaseUrl()); |
| 253 | 265 | } |
| 254 | 266 | |
| 267 | + public ChatModel buildGrokChatClient(YudaoAiProperties.Grok properties) { | |
| 268 | + if (StrUtil.isEmpty(properties.getModel())) { | |
| 269 | + properties.setModel(GrokChatModel.MODEL_DEFAULT); | |
| 270 | + } | |
| 271 | + OpenAiChatModel openAiChatModel = OpenAiChatModel.builder() | |
| 272 | + .openAiApi(OpenAiApi.builder() | |
| 273 | + .baseUrl(Optional.ofNullable(properties.getBaseUrl()) | |
| 274 | + .orElse(GrokChatModel.BASE_URL)) | |
| 275 | + .completionsPath(GrokChatModel.COMPLETE_PATH) | |
| 276 | + .apiKey(properties.getApiKey()) | |
| 277 | + .build()) | |
| 278 | + .defaultOptions(OpenAiChatOptions.builder() | |
| 279 | + .model(properties.getModel()) | |
| 280 | + .temperature(properties.getTemperature()) | |
| 281 | + .maxTokens(properties.getMaxTokens()) | |
| 282 | + .topP(properties.getTopP()) | |
| 283 | + .build()) | |
| 284 | + .toolCallingManager(getToolCallingManager()) | |
| 285 | + .build(); | |
| 286 | + return new DouBaoChatModel(openAiChatModel); | |
| 287 | + } | |
| 288 | + | |
| 255 | 289 | // ========== RAG 相关 ========== |
| 256 | 290 | |
| 257 | 291 | @Bean | ... | ... |
yudao-module-ai/src/main/java/cn/iocoder/yudao/module/ai/framework/ai/config/YudaoAiProperties.java
| ... | ... | @@ -161,6 +161,20 @@ public class YudaoAiProperties { |
| 161 | 161 | } |
| 162 | 162 | |
| 163 | 163 | @Data |
| 164 | + public static class Grok { | |
| 165 | + | |
| 166 | + private String enable; | |
| 167 | + private String apiKey; | |
| 168 | + private String baseUrl; | |
| 169 | + | |
| 170 | + private String model; | |
| 171 | + private Double temperature; | |
| 172 | + private Integer maxTokens; | |
| 173 | + private Double topP; | |
| 174 | + | |
| 175 | + } | |
| 176 | + | |
| 177 | + @Data | |
| 164 | 178 | public static class WebSearch { |
| 165 | 179 | |
| 166 | 180 | private boolean enable; | ... | ... |
yudao-module-ai/src/main/java/cn/iocoder/yudao/module/ai/framework/ai/core/model/AiModelFactoryImpl.java
| ... | ... | @@ -87,7 +87,7 @@ import org.springframework.ai.model.zhipuai.autoconfigure.ZhiPuAiImageAutoConfig |
| 87 | 87 | import org.springframework.ai.ollama.OllamaChatModel; |
| 88 | 88 | import org.springframework.ai.ollama.OllamaEmbeddingModel; |
| 89 | 89 | import org.springframework.ai.ollama.api.OllamaApi; |
| 90 | -import org.springframework.ai.ollama.api.OllamaOptions; | |
| 90 | +import org.springframework.ai.ollama.api.OllamaEmbeddingOptions; | |
| 91 | 91 | import org.springframework.ai.openai.OpenAiChatModel; |
| 92 | 92 | import org.springframework.ai.openai.OpenAiEmbeddingModel; |
| 93 | 93 | import org.springframework.ai.openai.OpenAiEmbeddingOptions; |
| ... | ... | @@ -178,6 +178,8 @@ public class AiModelFactoryImpl implements AiModelFactory { |
| 178 | 178 | return buildGeminiChatModel(apiKey); |
| 179 | 179 | case OLLAMA: |
| 180 | 180 | return buildOllamaChatModel(url); |
| 181 | + case GROK: | |
| 182 | + return buildGrokChatModel(apiKey,url); | |
| 181 | 183 | default: |
| 182 | 184 | throw new IllegalArgumentException(StrUtil.format("未知平台({})", platform)); |
| 183 | 185 | } |
| ... | ... | @@ -436,10 +438,12 @@ public class AiModelFactoryImpl implements AiModelFactory { |
| 436 | 438 | * 可参考 {@link ZhiPuAiChatAutoConfiguration} 的 zhiPuAiChatModel 方法 |
| 437 | 439 | */ |
| 438 | 440 | private ZhiPuAiChatModel buildZhiPuChatModel(String apiKey, String url) { |
| 439 | - ZhiPuAiApi zhiPuAiApi = StrUtil.isEmpty(url) ? new ZhiPuAiApi(apiKey) | |
| 440 | - : new ZhiPuAiApi(url, apiKey); | |
| 441 | + ZhiPuAiApi.Builder zhiPuAiApiBuilder = ZhiPuAiApi.builder().apiKey(apiKey); | |
| 442 | + if (StrUtil.isNotEmpty(url)) { | |
| 443 | + zhiPuAiApiBuilder.baseUrl(url); | |
| 444 | + } | |
| 441 | 445 | ZhiPuAiChatOptions options = ZhiPuAiChatOptions.builder().model(ZhiPuAiApi.DEFAULT_CHAT_MODEL).temperature(0.7).build(); |
| 442 | - return new ZhiPuAiChatModel(zhiPuAiApi, options, getToolCallingManager(), DEFAULT_RETRY_TEMPLATE, | |
| 446 | + return new ZhiPuAiChatModel(zhiPuAiApiBuilder.build(), options, getToolCallingManager(), DEFAULT_RETRY_TEMPLATE, | |
| 443 | 447 | getObservationRegistry().getIfAvailable()); |
| 444 | 448 | } |
| 445 | 449 | |
| ... | ... | @@ -586,6 +590,13 @@ public class AiModelFactoryImpl implements AiModelFactory { |
| 586 | 590 | return new StabilityAiImageModel(stabilityAiApi); |
| 587 | 591 | } |
| 588 | 592 | |
| 593 | + private ChatModel buildGrokChatModel(String apiKey,String url) { | |
| 594 | + YudaoAiProperties.Grok properties = new YudaoAiProperties.Grok() | |
| 595 | + .setBaseUrl(url) | |
| 596 | + .setApiKey(apiKey); | |
| 597 | + return new AiAutoConfiguration().buildGrokChatClient(properties); | |
| 598 | + } | |
| 599 | + | |
| 589 | 600 | // ========== 各种创建 EmbeddingModel 的方法 ========== |
| 590 | 601 | |
| 591 | 602 | /** |
| ... | ... | @@ -601,10 +612,12 @@ public class AiModelFactoryImpl implements AiModelFactory { |
| 601 | 612 | * 可参考 {@link ZhiPuAiEmbeddingAutoConfiguration} 的 zhiPuAiEmbeddingModel 方法 |
| 602 | 613 | */ |
| 603 | 614 | private ZhiPuAiEmbeddingModel buildZhiPuEmbeddingModel(String apiKey, String url, String model) { |
| 604 | - ZhiPuAiApi zhiPuAiApi = StrUtil.isEmpty(url) ? new ZhiPuAiApi(apiKey) | |
| 605 | - : new ZhiPuAiApi(url, apiKey); | |
| 615 | + ZhiPuAiApi.Builder zhiPuAiApiBuilder = ZhiPuAiApi.builder().apiKey(apiKey); | |
| 616 | + if (StrUtil.isNotEmpty(url)) { | |
| 617 | + zhiPuAiApiBuilder.baseUrl(url); | |
| 618 | + } | |
| 606 | 619 | ZhiPuAiEmbeddingOptions zhiPuAiEmbeddingOptions = ZhiPuAiEmbeddingOptions.builder().model(model).build(); |
| 607 | - return new ZhiPuAiEmbeddingModel(zhiPuAiApi, MetadataMode.EMBED, zhiPuAiEmbeddingOptions); | |
| 620 | + return new ZhiPuAiEmbeddingModel(zhiPuAiApiBuilder.build(), MetadataMode.EMBED, zhiPuAiEmbeddingOptions); | |
| 608 | 621 | } |
| 609 | 622 | |
| 610 | 623 | /** |
| ... | ... | @@ -632,7 +645,7 @@ public class AiModelFactoryImpl implements AiModelFactory { |
| 632 | 645 | |
| 633 | 646 | private OllamaEmbeddingModel buildOllamaEmbeddingModel(String url, String model) { |
| 634 | 647 | OllamaApi ollamaApi = OllamaApi.builder().baseUrl(url).build(); |
| 635 | - OllamaOptions ollamaOptions = OllamaOptions.builder().model(model).build(); | |
| 648 | + OllamaEmbeddingOptions ollamaOptions = OllamaEmbeddingOptions.builder().model(model).build(); | |
| 636 | 649 | return OllamaEmbeddingModel.builder() |
| 637 | 650 | .ollamaApi(ollamaApi) |
| 638 | 651 | .defaultOptions(ollamaOptions) | ... | ... |
yudao-module-ai/src/main/java/cn/iocoder/yudao/module/ai/framework/ai/core/model/grok/GrokChatModel.java
0 → 100644
| 1 | +package cn.iocoder.yudao.module.ai.framework.ai.core.model.grok; | |
| 2 | + | |
| 3 | +import lombok.RequiredArgsConstructor; | |
| 4 | +import lombok.extern.slf4j.Slf4j; | |
| 5 | +import org.springframework.ai.chat.model.ChatModel; | |
| 6 | +import org.springframework.ai.chat.model.ChatResponse; | |
| 7 | +import org.springframework.ai.chat.prompt.ChatOptions; | |
| 8 | +import org.springframework.ai.chat.prompt.Prompt; | |
| 9 | +import reactor.core.publisher.Flux; | |
| 10 | + | |
| 11 | +/** | |
| 12 | + * Grok {@link ChatModel} 实现类 | |
| 13 | + * | |
| 14 | + * | |
| 15 | + */ | |
| 16 | +@Slf4j | |
| 17 | +@RequiredArgsConstructor | |
| 18 | +public class GrokChatModel implements ChatModel { | |
| 19 | + | |
| 20 | + public static final String BASE_URL = "https://api.x.ai"; | |
| 21 | + public static final String COMPLETE_PATH = "/v1/chat/completions"; | |
| 22 | + public static final String MODEL_DEFAULT = "grok-4-fast-reasoning"; | |
| 23 | + | |
| 24 | + /** | |
| 25 | + * 兼容 OpenAI 接口,进行复用 | |
| 26 | + */ | |
| 27 | + private final ChatModel openAiChatModel; | |
| 28 | + | |
| 29 | + @Override | |
| 30 | + public ChatResponse call(Prompt prompt) { | |
| 31 | + return openAiChatModel.call(prompt); | |
| 32 | + } | |
| 33 | + | |
| 34 | + @Override | |
| 35 | + public Flux<ChatResponse> stream(Prompt prompt) { | |
| 36 | + return openAiChatModel.stream(prompt); | |
| 37 | + } | |
| 38 | + | |
| 39 | + @Override | |
| 40 | + public ChatOptions getDefaultOptions() { | |
| 41 | + return openAiChatModel.getDefaultOptions(); | |
| 42 | + } | |
| 43 | + | |
| 44 | +} | ... | ... |
yudao-module-ai/src/main/java/cn/iocoder/yudao/module/ai/framework/security/config/SecurityConfiguration.java
| ... | ... | @@ -2,7 +2,8 @@ package cn.iocoder.yudao.module.ai.framework.security.config; |
| 2 | 2 | |
| 3 | 3 | import cn.iocoder.yudao.framework.security.config.AuthorizeRequestsCustomizer; |
| 4 | 4 | import jakarta.annotation.Resource; |
| 5 | -import org.springframework.ai.mcp.server.autoconfigure.McpServerProperties; | |
| 5 | +import org.springframework.ai.mcp.server.common.autoconfigure.properties.McpServerSseProperties; | |
| 6 | +import org.springframework.ai.mcp.server.common.autoconfigure.properties.McpServerStreamableHttpProperties; | |
| 6 | 7 | import org.springframework.context.annotation.Bean; |
| 7 | 8 | import org.springframework.context.annotation.Configuration; |
| 8 | 9 | import org.springframework.security.config.annotation.web.builders.HttpSecurity; |
| ... | ... | @@ -17,7 +18,9 @@ import java.util.Optional; |
| 17 | 18 | public class SecurityConfiguration { |
| 18 | 19 | |
| 19 | 20 | @Resource |
| 20 | - private Optional<McpServerProperties> serverProperties; | |
| 21 | + private Optional<McpServerSseProperties> mcpServerSseProperties; | |
| 22 | + @Resource | |
| 23 | + private Optional<McpServerStreamableHttpProperties> mcpServerStreamableHttpProperties; | |
| 21 | 24 | |
| 22 | 25 | @Bean("aiAuthorizeRequestsCustomizer") |
| 23 | 26 | public AuthorizeRequestsCustomizer authorizeRequestsCustomizer() { |
| ... | ... | @@ -25,11 +28,12 @@ public class SecurityConfiguration { |
| 25 | 28 | |
| 26 | 29 | @Override |
| 27 | 30 | public void customize(AuthorizeHttpRequestsConfigurer<HttpSecurity>.AuthorizationManagerRequestMatcherRegistry registry) { |
| 28 | - // MCP Server | |
| 29 | - serverProperties.ifPresent(properties -> { | |
| 31 | + mcpServerSseProperties.ifPresent(properties -> { | |
| 30 | 32 | registry.requestMatchers(properties.getSseEndpoint()).permitAll(); |
| 31 | 33 | registry.requestMatchers(properties.getSseMessageEndpoint()).permitAll(); |
| 32 | 34 | }); |
| 35 | + mcpServerStreamableHttpProperties.ifPresent(properties -> | |
| 36 | + registry.requestMatchers(properties.getMcpEndpoint()).permitAll()); | |
| 33 | 37 | } |
| 34 | 38 | |
| 35 | 39 | }; | ... | ... |
yudao-module-ai/src/main/java/cn/iocoder/yudao/module/ai/service/chat/AiChatMessageServiceImpl.java
| ... | ... | @@ -49,7 +49,7 @@ import org.springframework.ai.chat.model.StreamingChatModel; |
| 49 | 49 | import org.springframework.ai.chat.prompt.ChatOptions; |
| 50 | 50 | import org.springframework.ai.chat.prompt.Prompt; |
| 51 | 51 | import org.springframework.ai.mcp.SyncMcpToolCallbackProvider; |
| 52 | -import org.springframework.ai.mcp.client.autoconfigure.properties.McpClientCommonProperties; | |
| 52 | +import org.springframework.ai.mcp.client.common.autoconfigure.properties.McpClientCommonProperties; | |
| 53 | 53 | import org.springframework.ai.tool.ToolCallback; |
| 54 | 54 | import org.springframework.ai.tool.resolution.ToolCallbackResolver; |
| 55 | 55 | import org.springframework.beans.factory.annotation.Autowired; | ... | ... |
yudao-module-ai/src/main/java/cn/iocoder/yudao/module/ai/service/knowledge/AiKnowledgeSegmentServiceImpl.java
| ... | ... | @@ -227,6 +227,9 @@ public class AiKnowledgeSegmentServiceImpl implements AiKnowledgeSegmentService |
| 227 | 227 | |
| 228 | 228 | // 2. 检索 |
| 229 | 229 | List<Document> documents = searchDocument(knowledge, reqBO); |
| 230 | + if (CollUtil.isEmpty(documents)) { | |
| 231 | + return ListUtil.empty(); | |
| 232 | + } | |
| 230 | 233 | |
| 231 | 234 | // 3.1 段落召回 |
| 232 | 235 | List<AiKnowledgeSegmentDO> segments = segmentMapper | ... | ... |
yudao-module-ai/src/main/java/cn/iocoder/yudao/module/ai/util/AiUtils.java
| ... | ... | @@ -16,7 +16,7 @@ import org.springframework.ai.chat.prompt.ChatOptions; |
| 16 | 16 | import org.springframework.ai.deepseek.DeepSeekAssistantMessage; |
| 17 | 17 | import org.springframework.ai.deepseek.DeepSeekChatOptions; |
| 18 | 18 | import org.springframework.ai.minimax.MiniMaxChatOptions; |
| 19 | -import org.springframework.ai.ollama.api.OllamaOptions; | |
| 19 | +import org.springframework.ai.ollama.api.OllamaChatOptions; | |
| 20 | 20 | import org.springframework.ai.openai.OpenAiChatOptions; |
| 21 | 21 | import org.springframework.ai.tool.ToolCallback; |
| 22 | 22 | import org.springframework.ai.zhipuai.ZhiPuAiChatOptions; |
| ... | ... | @@ -68,6 +68,7 @@ public class AiUtils { |
| 68 | 68 | case OPENAI: |
| 69 | 69 | case GEMINI: // 复用 OpenAI 客户端 |
| 70 | 70 | case BAI_CHUAN: // 复用 OpenAI 客户端 |
| 71 | + case GROK: // 复用 OpenAI 客户端 | |
| 71 | 72 | return OpenAiChatOptions.builder().model(model).temperature(temperature).maxTokens(maxTokens) |
| 72 | 73 | .toolCallbacks(toolCallbacks).toolContext(toolContext).build(); |
| 73 | 74 | case AZURE_OPENAI: |
| ... | ... | @@ -77,7 +78,7 @@ public class AiUtils { |
| 77 | 78 | return AnthropicChatOptions.builder().model(model).temperature(temperature).maxTokens(maxTokens) |
| 78 | 79 | .toolCallbacks(toolCallbacks).toolContext(toolContext).build(); |
| 79 | 80 | case OLLAMA: |
| 80 | - return OllamaOptions.builder().model(model).temperature(temperature).numPredict(maxTokens) | |
| 81 | + return OllamaChatOptions.builder().model(model).temperature(temperature).numPredict(maxTokens) | |
| 81 | 82 | .toolCallbacks(toolCallbacks).toolContext(toolContext).build(); |
| 82 | 83 | default: |
| 83 | 84 | throw new IllegalArgumentException(StrUtil.format("未知平台({})", platform)); | ... | ... |
yudao-module-ai/src/test/java/cn/iocoder/yudao/module/ai/framework/ai/core/model/chat/AnthropicChatModelTest.java
| ... | ... | @@ -28,7 +28,7 @@ public class AnthropicChatModelTest { |
| 28 | 28 | .baseUrl("https://aihubmix.com") |
| 29 | 29 | .build()) |
| 30 | 30 | .defaultOptions(AnthropicChatOptions.builder() |
| 31 | - .model(AnthropicApi.ChatModel.CLAUDE_SONNET_4) | |
| 31 | + .model(AnthropicApi.ChatModel.CLAUDE_SONNET_4_5) | |
| 32 | 32 | .temperature(0.7) |
| 33 | 33 | .maxTokens(4096) |
| 34 | 34 | .build()) |
| ... | ... | @@ -70,7 +70,7 @@ public class AnthropicChatModelTest { |
| 70 | 70 | List<Message> messages = new ArrayList<>(); |
| 71 | 71 | messages.add(new UserMessage("thkinking 下,1+1 为什么等于 2 ")); |
| 72 | 72 | AnthropicChatOptions options = AnthropicChatOptions.builder() |
| 73 | - .model(AnthropicApi.ChatModel.CLAUDE_SONNET_4) | |
| 73 | + .model(AnthropicApi.ChatModel.CLAUDE_SONNET_4_5) | |
| 74 | 74 | .thinking(AnthropicApi.ThinkingType.ENABLED, 3096) |
| 75 | 75 | .temperature(1D) |
| 76 | 76 | .build(); | ... | ... |
yudao-module-ai/src/test/java/cn/iocoder/yudao/module/ai/framework/ai/core/model/chat/LlamaChatModelTests.java
| ... | ... | @@ -9,8 +9,8 @@ import org.springframework.ai.chat.model.ChatResponse; |
| 9 | 9 | import org.springframework.ai.chat.prompt.Prompt; |
| 10 | 10 | import org.springframework.ai.ollama.OllamaChatModel; |
| 11 | 11 | import org.springframework.ai.ollama.api.OllamaApi; |
| 12 | +import org.springframework.ai.ollama.api.OllamaChatOptions; | |
| 12 | 13 | import org.springframework.ai.ollama.api.OllamaModel; |
| 13 | -import org.springframework.ai.ollama.api.OllamaOptions; | |
| 14 | 14 | import reactor.core.publisher.Flux; |
| 15 | 15 | |
| 16 | 16 | import java.util.ArrayList; |
| ... | ... | @@ -27,7 +27,7 @@ public class LlamaChatModelTests { |
| 27 | 27 | .ollamaApi(OllamaApi.builder() |
| 28 | 28 | .baseUrl("http://127.0.0.1:11434") // Ollama 服务地址 |
| 29 | 29 | .build()) |
| 30 | - .defaultOptions(OllamaOptions.builder() | |
| 30 | + .defaultOptions(OllamaChatOptions.builder() | |
| 31 | 31 | .model(OllamaModel.LLAMA3.getName()) // 模型 |
| 32 | 32 | .build()) |
| 33 | 33 | .build(); |
| ... | ... | @@ -70,7 +70,7 @@ public class LlamaChatModelTests { |
| 70 | 70 | // 准备参数 |
| 71 | 71 | List<Message> messages = new ArrayList<>(); |
| 72 | 72 | messages.add(new UserMessage("详细分析下,如何设计一个电商系统?")); |
| 73 | - OllamaOptions options = OllamaOptions.builder() | |
| 73 | + OllamaChatOptions options = OllamaChatOptions.builder() | |
| 74 | 74 | .model("qwen3") |
| 75 | 75 | .build(); |
| 76 | 76 | |
| ... | ... | @@ -83,5 +83,4 @@ public class LlamaChatModelTests { |
| 83 | 83 | }).then().block(); |
| 84 | 84 | } |
| 85 | 85 | |
| 86 | - | |
| 87 | 86 | } | ... | ... |
yudao-module-ai/src/test/java/cn/iocoder/yudao/module/ai/framework/ai/core/model/chat/OllamaChatModelTests.java
| ... | ... | @@ -9,7 +9,7 @@ import org.springframework.ai.chat.model.ChatResponse; |
| 9 | 9 | import org.springframework.ai.chat.prompt.Prompt; |
| 10 | 10 | import org.springframework.ai.ollama.OllamaChatModel; |
| 11 | 11 | import org.springframework.ai.ollama.api.OllamaApi; |
| 12 | -import org.springframework.ai.ollama.api.OllamaOptions; | |
| 12 | +import org.springframework.ai.ollama.api.OllamaChatOptions; | |
| 13 | 13 | import reactor.core.publisher.Flux; |
| 14 | 14 | |
| 15 | 15 | import java.util.ArrayList; |
| ... | ... | @@ -26,7 +26,7 @@ public class OllamaChatModelTests { |
| 26 | 26 | .ollamaApi(OllamaApi.builder() |
| 27 | 27 | .baseUrl("http://127.0.0.1:11434") // Ollama 服务地址 |
| 28 | 28 | .build()) |
| 29 | - .defaultOptions(OllamaOptions.builder() | |
| 29 | + .defaultOptions(OllamaChatOptions.builder() | |
| 30 | 30 | // .model("qwen") // 模型(https://ollama.com/library/qwen) |
| 31 | 31 | .model("deepseek-r1") // 模型(https://ollama.com/library/deepseek-r1) |
| 32 | 32 | .build()) | ... | ... |
yudao-module-ai/src/test/java/cn/iocoder/yudao/module/ai/framework/ai/core/model/chat/ZhiPuAiChatModelTests.java
| ... | ... | @@ -23,7 +23,7 @@ import java.util.List; |
| 23 | 23 | public class ZhiPuAiChatModelTests { |
| 24 | 24 | |
| 25 | 25 | private final ZhiPuAiChatModel chatModel = new ZhiPuAiChatModel( |
| 26 | - new ZhiPuAiApi("2f35fb6ca4ea41fab898729b7fac086c.6ESSfPcCkxaKEUlR"), // 密钥 | |
| 26 | + ZhiPuAiApi.builder().apiKey("2f35fb6ca4ea41fab898729b7fac086c.6ESSfPcCkxaKEUlR").build(), // 密钥 | |
| 27 | 27 | ZhiPuAiChatOptions.builder() |
| 28 | 28 | .model(ZhiPuAiApi.ChatModel.GLM_4.getName()) // 模型 |
| 29 | 29 | .build() | ... | ... |
yudao-module-ai/src/test/java/cn/iocoder/yudao/module/ai/framework/ai/core/websearch/AiBoChaWebSearchClientTest.java
| ... | ... | @@ -4,6 +4,7 @@ import cn.iocoder.yudao.framework.common.util.json.JsonUtils; |
| 4 | 4 | import cn.iocoder.yudao.module.ai.framework.ai.core.webserch.AiWebSearchRequest; |
| 5 | 5 | import cn.iocoder.yudao.module.ai.framework.ai.core.webserch.AiWebSearchResponse; |
| 6 | 6 | import cn.iocoder.yudao.module.ai.framework.ai.core.webserch.bocha.AiBoChaWebSearchClient; |
| 7 | +import org.junit.jupiter.api.Disabled; | |
| 7 | 8 | import org.junit.jupiter.api.Test; |
| 8 | 9 | |
| 9 | 10 | /** |
| ... | ... | @@ -17,6 +18,7 @@ public class AiBoChaWebSearchClientTest { |
| 17 | 18 | "sk-40500e52840f4d24b956d0b1d80d9abe"); |
| 18 | 19 | |
| 19 | 20 | @Test |
| 21 | + @Disabled | |
| 20 | 22 | public void testSearch() { |
| 21 | 23 | AiWebSearchRequest request = new AiWebSearchRequest() |
| 22 | 24 | .setQuery("阿里巴巴") | ... | ... |
yudao-module-bpm/src/main/java/cn/iocoder/yudao/module/bpm/framework/flowable/core/enums/BpmnVariableConstants.java
| ... | ... | @@ -54,11 +54,11 @@ public class BpmnVariableConstants { |
| 54 | 54 | public static final String PROCESS_INSTANCE_VARIABLE_RETURN_FLAG = "RETURN_FLAG_%s"; |
| 55 | 55 | |
| 56 | 56 | /** |
| 57 | - * 流程实例的变量前缀 - 用于退回操作,记录需要预测的节点:格式 NEED_SIMULATE_TASK_{节点定义 id} | |
| 57 | + * 流程实例的变量 - 用于退回操作,记录需要预测的节点 ids, 变量值类型为 Set | |
| 58 | 58 | * |
| 59 | 59 | * 目的是:退回操作,预测节点会不准,在流程变量中记录需要预测的节点,来辅助预测 |
| 60 | 60 | */ |
| 61 | - public static final String PROCESS_INSTANCE_VARIABLE_NEED_SIMULATE_PREFIX = "NEED_SIMULATE_TASK_"; | |
| 61 | + public static final String PROCESS_INSTANCE_VARIABLE_NEED_SIMULATE_TASK_IDS = "NEED_SIMULATE_TASK_IDS"; | |
| 62 | 62 | |
| 63 | 63 | /** |
| 64 | 64 | * 流程实例的变量 - 是否跳过表达式 | ... | ... |
yudao-module-bpm/src/main/java/cn/iocoder/yudao/module/bpm/framework/flowable/core/util/BpmnModelUtils.java
| ... | ... | @@ -18,11 +18,11 @@ import cn.iocoder.yudao.module.bpm.framework.flowable.core.enums.BpmnModelConsta |
| 18 | 18 | import com.google.common.collect.Maps; |
| 19 | 19 | import lombok.extern.slf4j.Slf4j; |
| 20 | 20 | import org.flowable.bpmn.converter.BpmnXMLConverter; |
| 21 | -import org.flowable.bpmn.model.Process; | |
| 22 | 21 | import org.flowable.bpmn.model.*; |
| 22 | +import org.flowable.bpmn.model.Process; | |
| 23 | 23 | import org.flowable.common.engine.api.FlowableException; |
| 24 | +import org.flowable.common.engine.api.delegate.Expression; | |
| 24 | 25 | import org.flowable.common.engine.impl.util.io.BytesStreamSource; |
| 25 | -import org.flowable.engine.impl.el.FixedValue; | |
| 26 | 26 | |
| 27 | 27 | import java.util.*; |
| 28 | 28 | |
| ... | ... | @@ -406,7 +406,7 @@ public class BpmnModelUtils { |
| 406 | 406 | flowableListener.getFieldExtensions().add(fieldExtension); |
| 407 | 407 | } |
| 408 | 408 | |
| 409 | - public static BpmSimpleModelNodeVO.ListenerHandler parseListenerConfig(FixedValue fixedValue) { | |
| 409 | + public static BpmSimpleModelNodeVO.ListenerHandler parseListenerConfig(Expression fixedValue) { | |
| 410 | 410 | String expressionText = fixedValue.getExpressionText(); |
| 411 | 411 | Assert.notNull(expressionText, "监听器扩展字段({})不能为空", expressionText); |
| 412 | 412 | return JsonUtils.parseObject(expressionText, BpmSimpleModelNodeVO.ListenerHandler.class); | ... | ... |
yudao-module-bpm/src/main/java/cn/iocoder/yudao/module/bpm/service/task/BpmProcessInstanceCopyServiceImpl.java
| ... | ... | @@ -54,7 +54,7 @@ public class BpmProcessInstanceCopyServiceImpl implements BpmProcessInstanceCopy |
| 54 | 54 | } |
| 55 | 55 | // 执行抄送 |
| 56 | 56 | createProcessInstanceCopy(userIds, reason, |
| 57 | - task.getProcessInstanceId(), task.getTaskDefinitionKey(), task.getId(), task.getName()); | |
| 57 | + task.getProcessInstanceId(), task.getTaskDefinitionKey(), task.getName(), task.getId()); | |
| 58 | 58 | } |
| 59 | 59 | |
| 60 | 60 | @Override | ... | ... |
yudao-module-bpm/src/main/java/cn/iocoder/yudao/module/bpm/service/task/BpmProcessInstanceServiceImpl.java
| ... | ... | @@ -2,9 +2,9 @@ package cn.iocoder.yudao.module.bpm.service.task; |
| 2 | 2 | |
| 3 | 3 | import cn.hutool.core.collection.CollUtil; |
| 4 | 4 | import cn.hutool.core.collection.ListUtil; |
| 5 | +import cn.hutool.core.convert.Convert; | |
| 5 | 6 | import cn.hutool.core.date.DateUtil; |
| 6 | 7 | import cn.hutool.core.lang.Assert; |
| 7 | -import cn.hutool.core.map.MapUtil; | |
| 8 | 8 | import cn.hutool.core.util.*; |
| 9 | 9 | import cn.iocoder.yudao.framework.common.pojo.PageResult; |
| 10 | 10 | import cn.iocoder.yudao.framework.common.util.collection.CollectionUtils; |
| ... | ... | @@ -12,6 +12,7 @@ import cn.iocoder.yudao.framework.common.util.date.DateUtils; |
| 12 | 12 | import cn.iocoder.yudao.framework.common.util.json.JsonUtils; |
| 13 | 13 | import cn.iocoder.yudao.framework.common.util.object.ObjectUtils; |
| 14 | 14 | import cn.iocoder.yudao.framework.common.util.object.PageUtils; |
| 15 | +import cn.iocoder.yudao.framework.datapermission.core.annotation.DataPermission; | |
| 15 | 16 | import cn.iocoder.yudao.module.bpm.api.task.dto.BpmProcessInstanceCreateReqDTO; |
| 16 | 17 | import cn.iocoder.yudao.module.bpm.controller.admin.definition.vo.model.BpmModelMetaInfoVO; |
| 17 | 18 | import cn.iocoder.yudao.module.bpm.controller.admin.definition.vo.model.simple.BpmSimpleModelNodeVO; |
| ... | ... | @@ -72,7 +73,6 @@ import static cn.iocoder.yudao.framework.common.util.collection.CollectionUtils. |
| 72 | 73 | import static cn.iocoder.yudao.module.bpm.controller.admin.task.vo.instance.BpmApprovalDetailRespVO.ActivityNode; |
| 73 | 74 | import static cn.iocoder.yudao.module.bpm.enums.ErrorCodeConstants.*; |
| 74 | 75 | import static cn.iocoder.yudao.module.bpm.framework.flowable.core.enums.BpmnModelConstants.START_USER_NODE_ID; |
| 75 | -import static cn.iocoder.yudao.module.bpm.framework.flowable.core.enums.BpmnVariableConstants.PROCESS_INSTANCE_VARIABLE_NEED_SIMULATE_PREFIX; | |
| 76 | 76 | import static cn.iocoder.yudao.module.bpm.framework.flowable.core.util.BpmnModelUtils.parseNodeType; |
| 77 | 77 | import static java.util.Arrays.asList; |
| 78 | 78 | import static java.util.Collections.singletonList; |
| ... | ... | @@ -227,11 +227,8 @@ public class BpmProcessInstanceServiceImpl implements BpmProcessInstanceService |
| 227 | 227 | // 3.2 获取由于退回操作,需要预测的节点。从流程变量中获取,回退操作会设置这些变量 |
| 228 | 228 | Set<String> needSimulateTaskDefKeysByReturn = new HashSet<>(); |
| 229 | 229 | if (StrUtil.isNotEmpty(reqVO.getProcessInstanceId())) { |
| 230 | - Map<String, Object> variables = runtimeService.getVariables(reqVO.getProcessInstanceId()); | |
| 231 | - Map<String, Object> simulateTaskVariables = MapUtil.filter(variables, | |
| 232 | - item -> item.getKey().startsWith(PROCESS_INSTANCE_VARIABLE_NEED_SIMULATE_PREFIX)); | |
| 233 | - simulateTaskVariables.forEach((key, value) -> | |
| 234 | - needSimulateTaskDefKeysByReturn.add(StrUtil.removePrefix(key, PROCESS_INSTANCE_VARIABLE_NEED_SIMULATE_PREFIX))); | |
| 230 | + Object needSimulateTaskIds = runtimeService.getVariable(reqVO.getProcessInstanceId(), BpmnVariableConstants.PROCESS_INSTANCE_VARIABLE_NEED_SIMULATE_TASK_IDS); | |
| 231 | + needSimulateTaskDefKeysByReturn.addAll(Convert.toSet(String.class, needSimulateTaskIds)); | |
| 235 | 232 | } |
| 236 | 233 | // 移除运行中的节点,运行中的节点无需预测 |
| 237 | 234 | if (CollUtil.isNotEmpty(runActivityNodes)) { |
| ... | ... | @@ -756,6 +753,7 @@ public class BpmProcessInstanceServiceImpl implements BpmProcessInstanceService |
| 756 | 753 | |
| 757 | 754 | @Override |
| 758 | 755 | @Transactional(rollbackFor = Exception.class) |
| 756 | + @DataPermission(enable = false) // 关闭数据权限,避免查询不到用户数据。相关案例:https://gitee.com/zhijiantianya/yudao-cloud/issues/ID1UYA | |
| 759 | 757 | public String createProcessInstance(Long userId, @Valid BpmProcessInstanceCreateReqVO createReqVO) { |
| 760 | 758 | // 获得流程定义 |
| 761 | 759 | ProcessDefinition definition = processDefinitionService |
| ... | ... | @@ -766,6 +764,7 @@ public class BpmProcessInstanceServiceImpl implements BpmProcessInstanceService |
| 766 | 764 | } |
| 767 | 765 | |
| 768 | 766 | @Override |
| 767 | + @DataPermission(enable = false) // 关闭数据权限,避免查询不到用户数据。相关案例:https://gitee.com/zhijiantianya/yudao-cloud/issues/ID1UYA | |
| 769 | 768 | public String createProcessInstance(Long userId, @Valid BpmProcessInstanceCreateReqDTO createReqDTO) { |
| 770 | 769 | return FlowableUtils.executeAuthenticatedUserId(userId, () -> { |
| 771 | 770 | // 获得流程定义 |
| ... | ... | @@ -882,6 +881,7 @@ public class BpmProcessInstanceServiceImpl implements BpmProcessInstanceService |
| 882 | 881 | } |
| 883 | 882 | |
| 884 | 883 | @Override |
| 884 | + @DataPermission(enable = false) // 关闭数据权限,避免查询不到用户数据。相关案例:https://gitee.com/zhijiantianya/yudao-cloud/issues/ID1UYA | |
| 885 | 885 | public void cancelProcessInstanceByStartUser(Long userId, @Valid BpmProcessInstanceCancelReqVO cancelReqVO) { |
| 886 | 886 | // 1.1 校验流程实例存在 |
| 887 | 887 | ProcessInstance instance = getProcessInstance(cancelReqVO.getId()); |
| ... | ... | @@ -911,6 +911,7 @@ public class BpmProcessInstanceServiceImpl implements BpmProcessInstanceService |
| 911 | 911 | } |
| 912 | 912 | |
| 913 | 913 | @Override |
| 914 | + @DataPermission(enable = false) // 关闭数据权限,避免查询不到用户数据。相关案例:https://gitee.com/zhijiantianya/yudao-cloud/issues/ID1UYA | |
| 914 | 915 | public void cancelProcessInstanceByAdmin(Long userId, BpmProcessInstanceCancelReqVO cancelReqVO) { |
| 915 | 916 | // 1.1 校验流程实例存在 |
| 916 | 917 | ProcessInstance instance = getProcessInstance(cancelReqVO.getId()); | ... | ... |
yudao-module-bpm/src/main/java/cn/iocoder/yudao/module/bpm/service/task/BpmTaskServiceImpl.java
| ... | ... | @@ -69,7 +69,6 @@ import static cn.iocoder.yudao.framework.common.exception.util.ServiceExceptionU |
| 69 | 69 | import static cn.iocoder.yudao.framework.common.util.collection.CollectionUtils.*; |
| 70 | 70 | import static cn.iocoder.yudao.module.bpm.enums.ErrorCodeConstants.*; |
| 71 | 71 | import static cn.iocoder.yudao.module.bpm.framework.flowable.core.enums.BpmnModelConstants.START_USER_NODE_ID; |
| 72 | -//import static cn.iocoder.yudao.module.bpm.framework.flowable.core.enums.BpmnVariableConstants.*; | |
| 73 | 72 | import static cn.iocoder.yudao.module.bpm.framework.flowable.core.util.BpmnModelUtils.*; |
| 74 | 73 | |
| 75 | 74 | /** |
| ... | ... | @@ -377,6 +376,11 @@ public class BpmTaskServiceImpl implements BpmTaskService { |
| 377 | 376 | } |
| 378 | 377 | // 2.2 过滤:只有串行可到达的节点,才可以退回。类似非串行、子流程无法退回 |
| 379 | 378 | previousUserList.removeIf(userTask -> !BpmnModelUtils.isSequentialReachable(source, userTask, null)); |
| 379 | + | |
| 380 | + // 2.3 过滤:只能退回到已经处理过的节点(排除审批未经过的节点)。相关 issue:https://github.com/YunaiV/ruoyi-vue-pro/issues/982 | |
| 381 | + List<HistoricTaskInstance> finishedTasks = getFinishedTaskListByProcessInstanceIdWithoutCancel(task.getProcessInstanceId()); | |
| 382 | + Set<String> finishedTaskDefinitionKeys = convertSet(finishedTasks, HistoricTaskInstance::getTaskDefinitionKey); | |
| 383 | + previousUserList.removeIf(userTask -> !finishedTaskDefinitionKeys.contains(userTask.getId())); | |
| 380 | 384 | return previousUserList; |
| 381 | 385 | } |
| 382 | 386 | |
| ... | ... | @@ -545,6 +549,7 @@ public class BpmTaskServiceImpl implements BpmTaskService { |
| 545 | 549 | |
| 546 | 550 | @Override |
| 547 | 551 | @Transactional(rollbackFor = Exception.class) |
| 552 | + @DataPermission(enable = false) // 关闭数据权限,避免查询不到用户数据。相关案例:https://gitee.com/zhijiantianya/yudao-cloud/issues/ID1UYA | |
| 548 | 553 | public void approveTask(Long userId, @Valid BpmTaskApproveReqVO reqVO) { |
| 549 | 554 | // 1.1 校验任务存在 |
| 550 | 555 | Task task = validateTask(userId, reqVO.getId()); |
| ... | ... | @@ -604,11 +609,13 @@ public class BpmTaskServiceImpl implements BpmTaskService { |
| 604 | 609 | bpmnModel, reqVO.getNextAssignees(), instance); |
| 605 | 610 | runtimeService.setVariables(task.getProcessInstanceId(), variables); |
| 606 | 611 | |
| 607 | - // 5. 移除辅助预测的流程变量,这些变量在回退操作中设置 | |
| 608 | - // todo @jason:可以直接 + 拼接哈 | |
| 609 | - String simulateVariableName = StrUtil.concat(false, | |
| 610 | - BpmnVariableConstants.PROCESS_INSTANCE_VARIABLE_NEED_SIMULATE_PREFIX, task.getTaskDefinitionKey()); | |
| 611 | - runtimeService.removeVariable(task.getProcessInstanceId(), simulateVariableName); | |
| 612 | + // 5. 如果当前节点 Id 存在于需要预测的流程节点中,从中移除。 流程变量在回退操作中设置 | |
| 613 | + Object needSimulateTaskIds = runtimeService.getVariable(task.getProcessInstanceId(), BpmnVariableConstants.PROCESS_INSTANCE_VARIABLE_NEED_SIMULATE_TASK_IDS); | |
| 614 | + Set<String> needSimulateTaskIdsByReturn = Convert.toSet(String.class, needSimulateTaskIds); | |
| 615 | + if (needSimulateTaskIdsByReturn.contains(task.getTaskDefinitionKey())) { | |
| 616 | + needSimulateTaskIdsByReturn.remove(task.getTaskDefinitionKey()); | |
| 617 | + runtimeService.setVariable(task.getProcessInstanceId(), BpmnVariableConstants.PROCESS_INSTANCE_VARIABLE_NEED_SIMULATE_TASK_IDS, needSimulateTaskIdsByReturn); | |
| 618 | + } | |
| 612 | 619 | |
| 613 | 620 | // 6. 调用 BPM complete 去完成任务 |
| 614 | 621 | taskService.complete(task.getId(), variables, true); |
| ... | ... | @@ -787,6 +794,7 @@ public class BpmTaskServiceImpl implements BpmTaskService { |
| 787 | 794 | |
| 788 | 795 | @Override |
| 789 | 796 | @Transactional(rollbackFor = Exception.class) |
| 797 | + @DataPermission(enable = false) // 关闭数据权限,避免查询不到用户数据。相关案例:https://gitee.com/zhijiantianya/yudao-cloud/issues/ID1UYA | |
| 790 | 798 | public void rejectTask(Long userId, @Valid BpmTaskRejectReqVO reqVO) { |
| 791 | 799 | // 1.1 校验任务存在 |
| 792 | 800 | Task task = validateTask(userId, reqVO.getId()); |
| ... | ... | @@ -854,6 +862,7 @@ public class BpmTaskServiceImpl implements BpmTaskService { |
| 854 | 862 | |
| 855 | 863 | @Override |
| 856 | 864 | @Transactional(rollbackFor = Exception.class) |
| 865 | + @DataPermission(enable = false) // 关闭数据权限,避免查询不到用户数据。相关案例:https://gitee.com/zhijiantianya/yudao-cloud/issues/ID1UYA | |
| 857 | 866 | public void returnTask(Long userId, BpmTaskReturnReqVO reqVO) { |
| 858 | 867 | // 1.1 当前任务 task |
| 859 | 868 | Task task = validateTask(userId, reqVO.getId()); |
| ... | ... | @@ -937,24 +946,21 @@ public class BpmTaskServiceImpl implements BpmTaskService { |
| 937 | 946 | }); |
| 938 | 947 | |
| 939 | 948 | // 3. 构建需要预测的任务流程变量 |
| 940 | - // TODO @jason:【驳回预测相关】是不是搞成一个变量,里面是 set 更简洁一点呀? | |
| 941 | 949 | Set<String> needSimulateTaskDefinitionKeys = getNeedSimulateTaskDefinitionKeys(bpmnModel, currentTask, targetElement); |
| 942 | - Map<String, Object> needSimulateVariables = convertMap(needSimulateTaskDefinitionKeys, | |
| 943 | - key -> StrUtil.concat(false, BpmnVariableConstants.PROCESS_INSTANCE_VARIABLE_NEED_SIMULATE_PREFIX, key), item -> Boolean.TRUE); | |
| 944 | - | |
| 945 | 950 | |
| 946 | 951 | // 4. 执行驳回 |
| 947 | - // 使用 moveExecutionsToSingleActivityId 替换 moveActivityIdsToSingleActivityId 原因: | |
| 948 | - // 当多实例任务回退的时候有问题。相关 issue: https://github.com/flowable/flowable-engine/issues/3944 | |
| 952 | + // ① 使用 moveExecutionsToSingleActivityId 替换 moveActivityIdsToSingleActivityId。原因:当多实例任务回退的时候有问题。 | |
| 953 | + // 相关 issue: https://github.com/flowable/flowable-engine/issues/3944 | |
| 954 | + // ② flowable 7.2.0 版本后,继续使用 moveActivityIdsToSingleActivityId 方法。原因:flowable 7.2.0 版本修复了该问题。 | |
| 955 | + // 相关 issue:https://github.com/YunaiV/ruoyi-vue-pro/issues/1018 | |
| 949 | 956 | runtimeService.createChangeActivityStateBuilder() |
| 950 | 957 | .processInstanceId(currentTask.getProcessInstanceId()) |
| 951 | - .moveExecutionsToSingleActivityId(runExecutionIds, reqVO.getTargetTaskDefinitionKey()) | |
| 952 | - // 设置需要预测的任务流程变量,用于辅助预测 | |
| 953 | - .processVariables(needSimulateVariables) | |
| 954 | - // 设置流程变量(local)节点退回标记, 用于退回到节点,不执行 BpmUserTaskAssignStartUserHandlerTypeEnum 策略,导致自动通过 | |
| 958 | + .moveActivityIdsToSingleActivityId(runExecutionIds, reqVO.getTargetTaskDefinitionKey()) | |
| 959 | + // 设置需要预测的任务 ids 的流程变量,用于辅助预测 | |
| 960 | + .processVariable(BpmnVariableConstants.PROCESS_INSTANCE_VARIABLE_NEED_SIMULATE_TASK_IDS, needSimulateTaskDefinitionKeys) | |
| 961 | + // 设置流程变量(local)节点退回标记, 用于退回到节点,不执行 BpmUserTaskAssignStartUserHandlerTypeEnum 策略,导致自动通过 | |
| 955 | 962 | .localVariable(reqVO.getTargetTaskDefinitionKey(), |
| 956 | - String.format(BpmnVariableConstants.PROCESS_INSTANCE_VARIABLE_RETURN_FLAG, reqVO.getTargetTaskDefinitionKey()), | |
| 957 | - Boolean.TRUE) | |
| 963 | + String.format(BpmnVariableConstants.PROCESS_INSTANCE_VARIABLE_RETURN_FLAG, reqVO.getTargetTaskDefinitionKey()), Boolean.TRUE) | |
| 958 | 964 | .changeState(); |
| 959 | 965 | } |
| 960 | 966 | |
| ... | ... | @@ -987,6 +993,7 @@ public class BpmTaskServiceImpl implements BpmTaskService { |
| 987 | 993 | |
| 988 | 994 | @Override |
| 989 | 995 | @Transactional(rollbackFor = Exception.class) |
| 996 | + @DataPermission(enable = false) // 关闭数据权限,避免查询不到用户数据。相关案例:https://gitee.com/zhijiantianya/yudao-cloud/issues/ID1UYA | |
| 990 | 997 | public void delegateTask(Long userId, BpmTaskDelegateReqVO reqVO) { |
| 991 | 998 | String taskId = reqVO.getId(); |
| 992 | 999 | // 1.1 校验任务 |
| ... | ... | @@ -1016,6 +1023,8 @@ public class BpmTaskServiceImpl implements BpmTaskService { |
| 1016 | 1023 | } |
| 1017 | 1024 | |
| 1018 | 1025 | @Override |
| 1026 | + @Transactional(rollbackFor = Exception.class) | |
| 1027 | + @DataPermission(enable = false) // 关闭数据权限,避免查询不到用户数据。相关案例:https://gitee.com/zhijiantianya/yudao-cloud/issues/ID1UYA | |
| 1019 | 1028 | public void transferTask(Long userId, BpmTaskTransferReqVO reqVO) { |
| 1020 | 1029 | String taskId = reqVO.getId(); |
| 1021 | 1030 | // 1.1 校验任务 |
| ... | ... | @@ -1046,6 +1055,7 @@ public class BpmTaskServiceImpl implements BpmTaskService { |
| 1046 | 1055 | |
| 1047 | 1056 | @Override |
| 1048 | 1057 | @Transactional(rollbackFor = Exception.class) |
| 1058 | + @DataPermission(enable = false) // 关闭数据权限,避免查询不到用户数据。相关案例:https://gitee.com/zhijiantianya/yudao-cloud/issues/ID1UYA | |
| 1049 | 1059 | public void moveTaskToEnd(String processInstanceId, String reason) { |
| 1050 | 1060 | List<Task> taskList = getRunningTaskListByProcessInstanceId(processInstanceId, null, null); |
| 1051 | 1061 | if (CollUtil.isEmpty(taskList)) { |
| ... | ... | @@ -1084,6 +1094,7 @@ public class BpmTaskServiceImpl implements BpmTaskService { |
| 1084 | 1094 | |
| 1085 | 1095 | @Override |
| 1086 | 1096 | @Transactional(rollbackFor = Exception.class) |
| 1097 | + @DataPermission(enable = false) // 关闭数据权限,避免查询不到用户数据。相关案例:https://gitee.com/zhijiantianya/yudao-cloud/issues/ID1UYA | |
| 1087 | 1098 | public void createSignTask(Long userId, BpmTaskSignCreateReqVO reqVO) { |
| 1088 | 1099 | // 1. 获取和校验任务 |
| 1089 | 1100 | TaskEntityImpl taskEntity = validateTaskCanCreateSign(userId, reqVO); |
| ... | ... | @@ -1200,6 +1211,7 @@ public class BpmTaskServiceImpl implements BpmTaskService { |
| 1200 | 1211 | |
| 1201 | 1212 | @Override |
| 1202 | 1213 | @Transactional(rollbackFor = Exception.class) |
| 1214 | + @DataPermission(enable = false) // 关闭数据权限,避免查询不到用户数据。相关案例:https://gitee.com/zhijiantianya/yudao-cloud/issues/ID1UYA | |
| 1203 | 1215 | @SuppressWarnings("DataFlowIssue") |
| 1204 | 1216 | public void deleteSignTask(Long userId, BpmTaskSignDeleteReqVO reqVO) { |
| 1205 | 1217 | // 1.1 校验 task 可以被减签 |
| ... | ... | @@ -1239,6 +1251,7 @@ public class BpmTaskServiceImpl implements BpmTaskService { |
| 1239 | 1251 | |
| 1240 | 1252 | @Override |
| 1241 | 1253 | @Transactional(rollbackFor = Exception.class) |
| 1254 | + @DataPermission(enable = false) // 关闭数据权限,避免查询不到用户数据。相关案例:https://gitee.com/zhijiantianya/yudao-cloud/issues/ID1UYA | |
| 1242 | 1255 | public void withdrawTask(Long userId, String taskId) { |
| 1243 | 1256 | // 1.1 查询本人已办任务 |
| 1244 | 1257 | HistoricTaskInstance taskInstance = historyService.createHistoricTaskInstanceQuery() | ... | ... |
yudao-module-bpm/src/main/java/cn/iocoder/yudao/module/bpm/service/task/listener/BpmCallActivityListener.java
| ... | ... | @@ -14,9 +14,9 @@ import cn.iocoder.yudao.module.bpm.service.task.BpmProcessInstanceService; |
| 14 | 14 | import jakarta.annotation.Resource; |
| 15 | 15 | import lombok.Setter; |
| 16 | 16 | import lombok.extern.slf4j.Slf4j; |
| 17 | +import org.flowable.common.engine.api.delegate.Expression; | |
| 17 | 18 | import org.flowable.engine.delegate.DelegateExecution; |
| 18 | 19 | import org.flowable.engine.delegate.ExecutionListener; |
| 19 | -import org.flowable.engine.impl.el.FixedValue; | |
| 20 | 20 | import org.flowable.engine.runtime.ProcessInstance; |
| 21 | 21 | import org.springframework.stereotype.Component; |
| 22 | 22 | |
| ... | ... | @@ -34,7 +34,7 @@ public class BpmCallActivityListener implements ExecutionListener { |
| 34 | 34 | public static final String DELEGATE_EXPRESSION = "${bpmCallActivityListener}"; |
| 35 | 35 | |
| 36 | 36 | @Setter |
| 37 | - private FixedValue listenerConfig; | |
| 37 | + private Expression listenerConfig; | |
| 38 | 38 | |
| 39 | 39 | @Resource |
| 40 | 40 | private BpmProcessDefinitionService processDefinitionService; | ... | ... |
yudao-module-bpm/src/main/java/cn/iocoder/yudao/module/bpm/service/task/listener/BpmUserTaskListener.java
| ... | ... | @@ -7,8 +7,8 @@ import cn.iocoder.yudao.module.bpm.service.task.BpmProcessInstanceService; |
| 7 | 7 | import jakarta.annotation.Resource; |
| 8 | 8 | import lombok.Setter; |
| 9 | 9 | import lombok.extern.slf4j.Slf4j; |
| 10 | +import org.flowable.common.engine.api.delegate.Expression; | |
| 10 | 11 | import org.flowable.engine.delegate.TaskListener; |
| 11 | -import org.flowable.engine.impl.el.FixedValue; | |
| 12 | 12 | import org.flowable.engine.runtime.ProcessInstance; |
| 13 | 13 | import org.flowable.task.service.delegate.DelegateTask; |
| 14 | 14 | import org.springframework.context.annotation.Scope; |
| ... | ... | @@ -33,7 +33,7 @@ public class BpmUserTaskListener implements TaskListener { |
| 33 | 33 | private BpmProcessInstanceService processInstanceService; |
| 34 | 34 | |
| 35 | 35 | @Setter |
| 36 | - private FixedValue listenerConfig; | |
| 36 | + private Expression listenerConfig; | |
| 37 | 37 | |
| 38 | 38 | @Override |
| 39 | 39 | public void notify(DelegateTask delegateTask) { | ... | ... |
yudao-module-crm/src/main/java/cn/iocoder/yudao/module/crm/controller/admin/receivable/vo/plan/CrmReceivablePlanRespVO.java
| ... | ... | @@ -59,7 +59,6 @@ public class CrmReceivablePlanRespVO { |
| 59 | 59 | @ExcelProperty("回款编号") |
| 60 | 60 | private Long receivableId; |
| 61 | 61 | @Schema(description = "回款信息") |
| 62 | - @ExcelProperty("回款信息") | |
| 63 | 62 | private CrmReceivableRespVO receivable; |
| 64 | 63 | |
| 65 | 64 | @Schema(description = "提前几天提醒", requiredMode = Schema.RequiredMode.REQUIRED, example = "1") | ... | ... |
yudao-module-infra/src/main/java/cn/iocoder/yudao/module/infra/framework/file/core/client/AbstractFileClient.java
| ... | ... | @@ -19,10 +19,18 @@ public abstract class AbstractFileClient<Config extends FileClientConfig> implem |
| 19 | 19 | * 文件配置 |
| 20 | 20 | */ |
| 21 | 21 | protected Config config; |
| 22 | + /** | |
| 23 | + * 原始的文件配置 | |
| 24 | + * | |
| 25 | + * 原因:{@link #config} 可能被子类所修改,无法用于判断配置是否变更 | |
| 26 | + * @link <a href="https://t.zsxq.com/29wkW">相关案例</a> | |
| 27 | + */ | |
| 28 | + private Config originalConfig; | |
| 22 | 29 | |
| 23 | 30 | public AbstractFileClient(Long id, Config config) { |
| 24 | 31 | this.id = id; |
| 25 | 32 | this.config = config; |
| 33 | + this.originalConfig = config; | |
| 26 | 34 | } |
| 27 | 35 | |
| 28 | 36 | /** |
| ... | ... | @@ -40,11 +48,12 @@ public abstract class AbstractFileClient<Config extends FileClientConfig> implem |
| 40 | 48 | |
| 41 | 49 | public final void refresh(Config config) { |
| 42 | 50 | // 判断是否更新 |
| 43 | - if (config.equals(this.config)) { | |
| 51 | + if (config.equals(this.originalConfig)) { | |
| 44 | 52 | return; |
| 45 | 53 | } |
| 46 | 54 | log.info("[refresh][配置({})发生变化,重新初始化]", config); |
| 47 | 55 | this.config = config; |
| 56 | + this.originalConfig = config; | |
| 48 | 57 | // 初始化 |
| 49 | 58 | this.init(); |
| 50 | 59 | } | ... | ... |
yudao-module-infra/src/main/java/cn/iocoder/yudao/module/infra/framework/file/core/utils/FileTypeUtils.java
| ... | ... | @@ -91,9 +91,8 @@ public class FileTypeUtils { |
| 91 | 91 | } |
| 92 | 92 | // 针对 video 的特殊处理,解决视频地址在移动端播放的兼容性问题 |
| 93 | 93 | if (StrUtil.containsIgnoreCase(mineType, "video")) { |
| 94 | - response.setHeader("Content-Length", String.valueOf(content.length)); | |
| 95 | - response.setHeader("Content-Range", "bytes 0-" + (content.length - 1) + "/" + content.length); | |
| 96 | 94 | response.setHeader("Accept-Ranges", "bytes"); |
| 95 | + response.setHeader("Content-Length", String.valueOf(content.length)); | |
| 97 | 96 | } |
| 98 | 97 | // 输出附件 |
| 99 | 98 | IoUtil.write(response.getOutputStream(), false, content); | ... | ... |
yudao-module-infra/src/main/resources/codegen/vue3_vben5_antd/general/views/form.vue.vm
| 1 | 1 | <script lang="ts" setup> |
| 2 | 2 | import type { Rule } from 'ant-design-vue/es/form'; |
| 3 | -import type { ${simpleClassName}Api } from '#/api/${table.moduleName}/${simpleClassName_strikeCase}'; | |
| 3 | +import type { ${simpleClassName}Api } from '#/api/${table.moduleName}/${table.businessName}'; | |
| 4 | 4 | |
| 5 | 5 | import { computed, ref } from 'vue'; |
| 6 | 6 | |
| ... | ... | @@ -11,7 +11,7 @@ import { Tinymce as RichTextarea } from '#/components/tinymce'; |
| 11 | 11 | import { ImageUpload, FileUpload } from "#/components/upload"; |
| 12 | 12 | import { message, Tabs, Form, Input, Textarea, Select, RadioGroup, Radio, CheckboxGroup, Checkbox, DatePicker, TreeSelect } from 'ant-design-vue'; |
| 13 | 13 | #if($table.templateType == 2)## 树表需要导入这些 |
| 14 | -import { get${simpleClassName}List } from '#/api/${table.moduleName}/${simpleClassName_strikeCase}'; | |
| 14 | +import { get${simpleClassName}List } from '#/api/${table.moduleName}/${table.businessName}'; | |
| 15 | 15 | import { handleTree } from '@vben/utils' |
| 16 | 16 | #end |
| 17 | 17 | ## 特殊:主子表专属逻辑 |
| ... | ... | @@ -24,7 +24,7 @@ import { handleTree } from '@vben/utils' |
| 24 | 24 | #end |
| 25 | 25 | |
| 26 | 26 | import { $t } from '#/locales'; |
| 27 | -import { get${simpleClassName}, create${simpleClassName}, update${simpleClassName} } from '#/api/${table.moduleName}/${simpleClassName_strikeCase}'; | |
| 27 | +import { get${simpleClassName}, create${simpleClassName}, update${simpleClassName} } from '#/api/${table.moduleName}/${table.businessName}'; | |
| 28 | 28 | |
| 29 | 29 | const emit = defineEmits(['success']); |
| 30 | 30 | ... | ... |
yudao-module-infra/src/main/resources/codegen/vue3_vben5_antd/general/views/index.vue.vm
| 1 | 1 | <script lang="ts" setup> |
| 2 | -import type { ${simpleClassName}Api } from '#/api/${table.moduleName}/${simpleClassName_strikeCase}'; | |
| 2 | +import type { ${simpleClassName}Api } from '#/api/${table.moduleName}/${table.businessName}'; | |
| 3 | 3 | |
| 4 | 4 | import { ref, h, reactive, onMounted, nextTick } from 'vue'; |
| 5 | 5 | |
| ... | ... | @@ -7,12 +7,13 @@ import { Page, useVbenModal } from '@vben/common-ui'; |
| 7 | 7 | import { DICT_TYPE } from '@vben/constants'; |
| 8 | 8 | import { getDictOptions } from '@vben/hooks'; |
| 9 | 9 | import { useTableToolbar, VbenVxeTableToolbar } from '@vben/plugins/vxe-table'; |
| 10 | -import { cloneDeep, downloadFileFromBlobPart, formatDateTime } from '@vben/utils'; | |
| 11 | -import { Button, message,Tabs,Pagination,Form,RangePicker,DatePicker,Select,Input } from 'ant-design-vue'; | |
| 10 | +import { cloneDeep, downloadFileFromBlobPart, formatDateTime, isEmpty } from '@vben/utils'; | |
| 11 | +import { Button, Card, message, Tabs, Pagination, Form, RangePicker, DatePicker, Select, Input } from 'ant-design-vue'; | |
| 12 | 12 | import ${simpleClassName}Form from './modules/form.vue'; |
| 13 | 13 | import { Download, Plus, RefreshCw, Search, Trash2 } from '@vben/icons'; |
| 14 | -import { ContentWrap } from '#/components/content-wrap'; | |
| 14 | +import { DictTag } from '#/components/dict-tag'; | |
| 15 | 15 | import { VxeColumn, VxeTable } from '#/adapter/vxe-table'; |
| 16 | +import { getRangePickerDefaultProps } from '#/utils/rangePickerProps'; | |
| 16 | 17 | |
| 17 | 18 | ## 特殊:主子表专属逻辑 |
| 18 | 19 | #if ( $table.templateType == 11 || $table.templateType == 12 ) |
| ... | ... | @@ -25,13 +26,11 @@ import { VxeColumn, VxeTable } from '#/adapter/vxe-table'; |
| 25 | 26 | |
| 26 | 27 | import { $t } from '#/locales'; |
| 27 | 28 | #if (${table.templateType} == 2)## 树表接口 |
| 28 | -import { handleTree,isEmpty } from '@vben/utils' | |
| 29 | -import { get${simpleClassName}List, delete${simpleClassName}, export${simpleClassName} } from '#/api/${table.moduleName}/${simpleClassName_strikeCase}'; | |
| 29 | +import { handleTree } from '@vben/utils' | |
| 30 | +import { get${simpleClassName}List, delete${simpleClassName}, export${simpleClassName} } from '#/api/${table.moduleName}/${table.businessName}'; | |
| 30 | 31 | #else## 标准表接口 |
| 31 | -import { isEmpty } from '@vben/utils'; | |
| 32 | -import { get${simpleClassName}Page, delete${simpleClassName},#if ($deleteBatchEnable) delete${simpleClassName}List,#end export${simpleClassName} } from '#/api/${table.moduleName}/${simpleClassName_strikeCase}'; | |
| 32 | +import { get${simpleClassName}Page, delete${simpleClassName},#if ($deleteBatchEnable) delete${simpleClassName}List,#end export${simpleClassName} } from '#/api/${table.moduleName}/${table.businessName}'; | |
| 33 | 33 | #end |
| 34 | -import { downloadFileFromBlobPart } from '@vben/utils'; | |
| 35 | 34 | |
| 36 | 35 | #if ($table.templateType == 12 || $table.templateType == 11) ## 内嵌和erp情况 |
| 37 | 36 | /** 子表的列表 */ |
| ... | ... | @@ -211,7 +210,7 @@ onMounted(() => { |
| 211 | 210 | <Page auto-content-height> |
| 212 | 211 | <FormModal @success="getList" /> |
| 213 | 212 | |
| 214 | - <ContentWrap v-if="!hiddenSearchBar"> | |
| 213 | + <Card v-if="!hiddenSearchBar" class="mb-4"> | |
| 215 | 214 | <!-- 搜索工作栏 --> |
| 216 | 215 | <Form |
| 217 | 216 | :model="queryParams" |
| ... | ... | @@ -292,10 +291,10 @@ onMounted(() => { |
| 292 | 291 | </Button> |
| 293 | 292 | </Form.Item> |
| 294 | 293 | </Form> |
| 295 | - </ContentWrap> | |
| 294 | + </Card> | |
| 296 | 295 | |
| 297 | 296 | <!-- 列表 --> |
| 298 | - <ContentWrap title="${table.classComment}"> | |
| 297 | + <Card title="${table.classComment}"> | |
| 299 | 298 | <template #extra> |
| 300 | 299 | <VbenVxeTableToolbar |
| 301 | 300 | ref="tableToolbarRef" |
| ... | ... | @@ -338,9 +337,9 @@ onMounted(() => { |
| 338 | 337 | 批量删除 |
| 339 | 338 | </Button> |
| 340 | 339 | #end |
| 341 | - </TableToolbar> | |
| 340 | + </VbenVxeTableToolbar> | |
| 342 | 341 | </template> |
| 343 | - <vxe-table | |
| 342 | + <VxeTable | |
| 344 | 343 | ref="tableRef" |
| 345 | 344 | :data="list" |
| 346 | 345 | #if ( $table.templateType == 2 ) |
| ... | ... | @@ -368,12 +367,12 @@ onMounted(() => { |
| 368 | 367 | #end |
| 369 | 368 | > |
| 370 | 369 | #if ($table.templateType != 2 && $deleteBatchEnable) |
| 371 | - <vxe-column type="checkbox" width="40"></vxe-column> | |
| 370 | + <VxeColumn type="checkbox" width="40" /> | |
| 372 | 371 | #end |
| 373 | 372 | ## 特殊:主子表专属逻辑 |
| 374 | 373 | #if ( $table.templateType == 12 && $subTables && $subTables.size() > 0 ) |
| 375 | 374 | <!-- 子表的列表 --> |
| 376 | - <vxe-column type="expand" width="60"> | |
| 375 | + <VxeColumn type="expand" width="60"> | |
| 377 | 376 | <template #content="{ row }"> |
| 378 | 377 | <!-- 子表的表单 --> |
| 379 | 378 | <Tabs v-model:active-key="subTabsName" class="mx-8"> |
| ... | ... | @@ -388,7 +387,7 @@ onMounted(() => { |
| 388 | 387 | #end |
| 389 | 388 | </Tabs> |
| 390 | 389 | </template> |
| 391 | - </vxe-column> | |
| 390 | + </VxeColumn> | |
| 392 | 391 | #end |
| 393 | 392 | #foreach($column in $columns) |
| 394 | 393 | #if ($column.listOperationResult) |
| ... | ... | @@ -397,31 +396,31 @@ onMounted(() => { |
| 397 | 396 | #set ($AttrName=$column.javaField.substring(0,1).toUpperCase() + ${column.javaField.substring(1)}) |
| 398 | 397 | #set ($comment=$column.columnComment) |
| 399 | 398 | #if ($column.javaType == "LocalDateTime")## 时间类型 |
| 400 | - <vxe-column field="${javaField}" title="${comment}" align="center"> | |
| 399 | + <VxeColumn field="${javaField}" title="${comment}" align="center"> | |
| 401 | 400 | <template #default="{row}"> |
| 402 | 401 | {{formatDateTime(row.${javaField})}} |
| 403 | 402 | </template> |
| 404 | - </vxe-column> | |
| 403 | + </VxeColumn> | |
| 405 | 404 | #elseif($column.dictType && "" != $column.dictType)## 数据字典 |
| 406 | - <vxe-column field="${javaField}" title="${comment}" align="center"> | |
| 405 | + <VxeColumn field="${javaField}" title="${comment}" align="center"> | |
| 407 | 406 | <template #default="{row}"> |
| 408 | 407 | <dict-tag :type="DICT_TYPE.$dictType.toUpperCase()" :value="row.${javaField}" /> |
| 409 | 408 | </template> |
| 410 | - </vxe-column> | |
| 409 | + </VxeColumn> | |
| 411 | 410 | #elseif ($table.templateType == 2 && $javaField == $treeNameColumn.javaField) |
| 412 | - <vxe-column field="${javaField}" title="${comment}" align="center" tree-node/> | |
| 411 | + <VxeColumn field="${javaField}" title="${comment}" align="center" tree-node/> | |
| 413 | 412 | #else |
| 414 | - <vxe-column field="${javaField}" title="${comment}" align="center" /> | |
| 413 | + <VxeColumn field="${javaField}" title="${comment}" align="center" /> | |
| 415 | 414 | #end |
| 416 | 415 | #end |
| 417 | 416 | #end |
| 418 | - <vxe-column field="operation" title="操作" align="center"> | |
| 417 | + <VxeColumn field="operation" title="操作" align="center"> | |
| 419 | 418 | <template #default="{row}"> |
| 420 | 419 | #if ( $table.templateType == 2 ) |
| 421 | 420 | <Button |
| 422 | 421 | size="small" |
| 423 | 422 | type="link" |
| 424 | - @click="handleAppend(row as any)" | |
| 423 | + @click="handleAppend(row)" | |
| 425 | 424 | v-access:code="['${permissionPrefix}:create']" |
| 426 | 425 | > |
| 427 | 426 | 新增下级 |
| ... | ... | @@ -430,7 +429,7 @@ onMounted(() => { |
| 430 | 429 | <Button |
| 431 | 430 | size="small" |
| 432 | 431 | type="link" |
| 433 | - @click="handleEdit(row as any)" | |
| 432 | + @click="handleEdit(row)" | |
| 434 | 433 | v-access:code="['${permissionPrefix}:update']" |
| 435 | 434 | > |
| 436 | 435 | {{ $t('ui.actionTitle.edit') }} |
| ... | ... | @@ -443,14 +442,14 @@ onMounted(() => { |
| 443 | 442 | #if ( $table.templateType == 2 ) |
| 444 | 443 | :disabled="!isEmpty(row?.children)" |
| 445 | 444 | #end |
| 446 | - @click="handleDelete(row as any)" | |
| 445 | + @click="handleDelete(row)" | |
| 447 | 446 | v-access:code="['${permissionPrefix}:delete']" |
| 448 | 447 | > |
| 449 | 448 | {{ $t('ui.actionTitle.delete') }} |
| 450 | 449 | </Button> |
| 451 | 450 | </template> |
| 452 | - </vxe-column> | |
| 453 | - </vxe-table> | |
| 451 | + </VxeColumn> | |
| 452 | + </VxeTable> | |
| 454 | 453 | #if ( $table.templateType != 2 ) |
| 455 | 454 | <!-- 分页 --> |
| 456 | 455 | <div class="mt-2 flex justify-end"> |
| ... | ... | @@ -463,9 +462,9 @@ onMounted(() => { |
| 463 | 462 | /> |
| 464 | 463 | </div> |
| 465 | 464 | #end |
| 466 | - </ContentWrap> | |
| 465 | + </Card> | |
| 467 | 466 | #if ($table.templateType == 11) ## erp情况 |
| 468 | - <ContentWrap> | |
| 467 | + <Card> | |
| 469 | 468 | <!-- 子表的表单 --> |
| 470 | 469 | <Tabs v-model:active-key="subTabsName"> |
| 471 | 470 | #foreach ($subTable in $subTables) |
| ... | ... | @@ -478,7 +477,7 @@ onMounted(() => { |
| 478 | 477 | </Tabs.TabPane> |
| 479 | 478 | #end |
| 480 | 479 | </Tabs> |
| 481 | - </ContentWrap> | |
| 480 | + </Card> | |
| 482 | 481 | #end |
| 483 | 482 | </Page> |
| 484 | 483 | </template> | ... | ... |
yudao-module-infra/src/main/resources/codegen/vue3_vben5_antd/general/views/modules/form_sub_erp.vue.vm
| ... | ... | @@ -4,21 +4,20 @@ |
| 4 | 4 | #set ($subSimpleClassName = $subSimpleClassNames.get($subIndex)) |
| 5 | 5 | <script lang="ts" setup> |
| 6 | 6 | import type { Rule } from 'ant-design-vue/es/form'; |
| 7 | -import type { ${simpleClassName}Api } from '#/api/${table.moduleName}/${simpleClassName_strikeCase}'; | |
| 7 | +import type { ${simpleClassName}Api } from '#/api/${table.moduleName}/${table.businessName}'; | |
| 8 | 8 | |
| 9 | 9 | import { computed, ref } from 'vue'; |
| 10 | 10 | |
| 11 | 11 | import { useVbenModal } from '@vben/common-ui'; |
| 12 | 12 | import { DICT_TYPE } from '@vben/constants'; |
| 13 | 13 | import { getDictOptions } from '@vben/hooks'; |
| 14 | -import { cloneDeep, formatDateTime } from '@vben/utils'; | |
| 15 | 14 | import { Tinymce as RichTextarea } from '#/components/tinymce'; |
| 16 | 15 | import { ImageUpload, FileUpload } from "#/components/upload"; |
| 17 | 16 | import { message, Tabs, Form, Input, Textarea, Select, RadioGroup, Radio, CheckboxGroup, Checkbox, DatePicker, TreeSelect } from 'ant-design-vue'; |
| 18 | 17 | |
| 19 | 18 | import { $t } from '#/locales'; |
| 20 | 19 | |
| 21 | -import { get${subSimpleClassName}, create${subSimpleClassName}, update${subSimpleClassName} } from '#/api/${table.moduleName}/${simpleClassName_strikeCase}'; | |
| 20 | +import { get${subSimpleClassName}, create${subSimpleClassName}, update${subSimpleClassName} } from '#/api/${table.moduleName}/${table.businessName}'; | |
| 22 | 21 | |
| 23 | 22 | const emit = defineEmits(['success']); |
| 24 | 23 | const getTitle = computed(() => { | ... | ... |
yudao-module-infra/src/main/resources/codegen/vue3_vben5_antd/general/views/modules/form_sub_normal.vue.vm
| ... | ... | @@ -5,25 +5,27 @@ |
| 5 | 5 | #set ($subClassNameVar = $subClassNameVars.get($subIndex)) |
| 6 | 6 | #set ($SubJoinColumnName = $subJoinColumn.javaField.substring(0,1).toUpperCase() + ${subJoinColumn.javaField.substring(1)})##首字母大写 |
| 7 | 7 | <script lang="ts" setup> |
| 8 | -import type { ${simpleClassName}Api } from '#/api/${table.moduleName}/${simpleClassName_strikeCase}'; | |
| 8 | +import type { ${simpleClassName}Api } from '#/api/${table.moduleName}/${table.businessName}'; | |
| 9 | 9 | |
| 10 | -import { computed, ref, h, onMounted,watch,nextTick } from 'vue'; | |
| 10 | +import { computed, ref, h, onMounted, watch, nextTick } from 'vue'; | |
| 11 | 11 | |
| 12 | 12 | import { DICT_TYPE } from '@vben/constants'; |
| 13 | 13 | import { getDictOptions } from '@vben/hooks'; |
| 14 | 14 | |
| 15 | -import { message, Tabs, Form, Input, Textarea,Button, Select, RadioGroup, Radio, CheckboxGroup, Checkbox, DatePicker } from 'ant-design-vue'; | |
| 15 | +import { message, Tabs, Form, Input, Textarea, Button, Select, RadioGroup, Radio, CheckboxGroup, Checkbox, DatePicker } from 'ant-design-vue'; | |
| 16 | 16 | import { $t } from '#/locales'; |
| 17 | 17 | |
| 18 | 18 | #if ($subTable.subJoinMany) ## 一对多 |
| 19 | 19 | import type { VxeTableInstance } from '#/adapter/vxe-table'; |
| 20 | 20 | import { Plus } from "@vben/icons"; |
| 21 | 21 | import { VxeColumn, VxeTable } from '#/adapter/vxe-table'; |
| 22 | -import { get${subSimpleClassName}ListBy${SubJoinColumnName} } from '#/api/${table.moduleName}/${simpleClassName_strikeCase}'; | |
| 22 | +import { ImageUpload, FileUpload } from "#/components/upload"; | |
| 23 | +import { get${subSimpleClassName}ListBy${SubJoinColumnName} } from '#/api/${table.moduleName}/${table.businessName}'; | |
| 23 | 24 | #else |
| 24 | 25 | import type { Rule } from 'ant-design-vue/es/form'; |
| 25 | 26 | import { Tinymce as RichTextarea } from '#/components/tinymce'; |
| 26 | -import { get${subSimpleClassName}By${SubJoinColumnName} } from '#/api/${table.moduleName}/${simpleClassName_strikeCase}'; | |
| 27 | +import { ImageUpload, FileUpload } from "#/components/upload"; | |
| 28 | +import { get${subSimpleClassName}By${SubJoinColumnName} } from '#/api/${table.moduleName}/${table.businessName}'; | |
| 27 | 29 | #end |
| 28 | 30 | |
| 29 | 31 | const props = defineProps<{ |
| ... | ... | @@ -55,6 +57,7 @@ defineExpose({ |
| 55 | 57 | (row) => !removeRecords.some((removed) => removed.id === row.id), |
| 56 | 58 | ), |
| 57 | 59 | ...insertRecords.map((row: any) => ({ ...row, id: undefined })), |
| 60 | + ]; | |
| 58 | 61 | }, |
| 59 | 62 | }); |
| 60 | 63 | |
| ... | ... | @@ -113,7 +116,7 @@ watch( |
| 113 | 116 | |
| 114 | 117 | <template> |
| 115 | 118 | #if ($subTable.subJoinMany) ## 一对多 |
| 116 | - <vxe-table ref="tableRef" :data="list" show-overflow class="mx-4"> | |
| 119 | + <VxeTable ref="tableRef" :data="list" show-overflow class="mx-4"> | |
| 117 | 120 | #foreach($column in $subColumns) |
| 118 | 121 | #if ($column.createOperation || $column.updateOperation) |
| 119 | 122 | #set ($comment = $column.columnComment) |
| ... | ... | @@ -128,25 +131,25 @@ watch( |
| 128 | 131 | #end |
| 129 | 132 | #if ( $column.id == $subJoinColumn.id) ## 特殊:忽略主子表的 join 字段,不用填写 |
| 130 | 133 | #elseif ($column.htmlType == "input" && !$column.primaryKey)## 忽略主键,不用在表单里 |
| 131 | - <vxe-column field="${javaField}" title="${comment}" align="center"> | |
| 134 | + <VxeColumn field="${javaField}" title="${comment}" align="center"> | |
| 132 | 135 | <template #default="{ row }"> |
| 133 | 136 | <Input v-model:value="row.${javaField}" /> |
| 134 | 137 | </template> |
| 135 | - </vxe-column> | |
| 138 | + </VxeColumn> | |
| 136 | 139 | #elseif($column.htmlType == "imageUpload")## 图片上传 |
| 137 | - <vxe-column field="${javaField}" title="${comment}" align="center"> | |
| 140 | + <VxeColumn field="${javaField}" title="${comment}" align="center"> | |
| 138 | 141 | <template #default="{ row }"> |
| 139 | 142 | <ImageUpload v-model:value="row.${javaField}" /> |
| 140 | 143 | </template> |
| 141 | - </vxe-column> | |
| 144 | + </VxeColumn> | |
| 142 | 145 | #elseif($column.htmlType == "fileUpload")## 文件上传 |
| 143 | - <vxe-column field="${javaField}" title="${comment}" align="center"> | |
| 146 | + <VxeColumn field="${javaField}" title="${comment}" align="center"> | |
| 144 | 147 | <template #default="{ row }"> |
| 145 | 148 | <FileUpload v-model:value="row.${javaField}" /> |
| 146 | 149 | </template> |
| 147 | - </vxe-column> | |
| 150 | + </VxeColumn> | |
| 148 | 151 | #elseif($column.htmlType == "select")## 下拉框 |
| 149 | - <vxe-column field="${javaField}" title="${comment}" align="center"> | |
| 152 | + <VxeColumn field="${javaField}" title="${comment}" align="center"> | |
| 150 | 153 | <template #default="{ row }"> |
| 151 | 154 | <Select v-model:value="row.${javaField}" placeholder="请选择${comment}"> |
| 152 | 155 | #if ("" != $dictType)## 有数据字典 |
| ... | ... | @@ -162,9 +165,9 @@ watch( |
| 162 | 165 | #end |
| 163 | 166 | </Select> |
| 164 | 167 | </template> |
| 165 | - </vxe-column> | |
| 168 | + </VxeColumn> | |
| 166 | 169 | #elseif($column.htmlType == "checkbox")## 多选框 |
| 167 | - <vxe-column field="${javaField}" title="${comment}" align="center"> | |
| 170 | + <VxeColumn field="${javaField}" title="${comment}" align="center"> | |
| 168 | 171 | <template #default="{ row }"> |
| 169 | 172 | <CheckboxGroup v-model:value="row.${javaField}"> |
| 170 | 173 | #if ("" != $dictType)## 有数据字典 |
| ... | ... | @@ -180,9 +183,9 @@ watch( |
| 180 | 183 | #end |
| 181 | 184 | </CheckboxGroup> |
| 182 | 185 | </template> |
| 183 | - </vxe-column> | |
| 186 | + </VxeColumn> | |
| 184 | 187 | #elseif($column.htmlType == "radio")## 单选框 |
| 185 | - <vxe-column field="${javaField}" title="${comment}" align="center"> | |
| 188 | + <VxeColumn field="${javaField}" title="${comment}" align="center"> | |
| 186 | 189 | <template #default="{ row }"> |
| 187 | 190 | <RadioGroup v-model:value="row.${javaField}"> |
| 188 | 191 | #if ("" != $dictType)## 有数据字典 |
| ... | ... | @@ -198,9 +201,9 @@ watch( |
| 198 | 201 | #end |
| 199 | 202 | </RadioGroup> |
| 200 | 203 | </template> |
| 201 | - </vxe-column> | |
| 204 | + </VxeColumn> | |
| 202 | 205 | #elseif($column.htmlType == "datetime")## 时间框 |
| 203 | - <vxe-column field="${javaField}" title="${comment}" align="center"> | |
| 206 | + <VxeColumn field="${javaField}" title="${comment}" align="center"> | |
| 204 | 207 | <template #default="{ row }"> |
| 205 | 208 | <DatePicker |
| 206 | 209 | v-model:value="row.${javaField}" |
| ... | ... | @@ -209,30 +212,30 @@ watch( |
| 209 | 212 | valueFormat='x' |
| 210 | 213 | /> |
| 211 | 214 | </template> |
| 212 | - </vxe-column> | |
| 215 | + </VxeColumn> | |
| 213 | 216 | #elseif($column.htmlType == "textarea" || $column.htmlType == "editor")## 文本框 |
| 214 | - <vxe-column field="${javaField}" title="${comment}" align="center"> | |
| 217 | + <VxeColumn field="${javaField}" title="${comment}" align="center"> | |
| 215 | 218 | <template #default="{ row }"> |
| 216 | 219 | <Textarea v-model:value="row.${javaField}" /> |
| 217 | 220 | </template> |
| 218 | - </vxe-column> | |
| 221 | + </VxeColumn> | |
| 219 | 222 | #end |
| 220 | 223 | #end |
| 221 | 224 | #end |
| 222 | - <vxe-column field="operation" title="操作" align="center"> | |
| 225 | + <VxeColumn field="operation" title="操作" align="center"> | |
| 223 | 226 | <template #default="{ row }"> |
| 224 | 227 | <Button |
| 225 | 228 | size="small" |
| 226 | 229 | type="link" |
| 227 | 230 | danger |
| 228 | - @click="handleDelect(row)" | |
| 231 | + @click="handleDelete(row)" | |
| 229 | 232 | v-access:code="['${permissionPrefix}:delete']" |
| 230 | 233 | > |
| 231 | 234 | {{ $t('ui.actionTitle.delete') }} |
| 232 | 235 | </Button> |
| 233 | 236 | </template> |
| 234 | - </vxe-column> | |
| 235 | - </vxe-table> | |
| 237 | + </VxeColumn> | |
| 238 | + </VxeTable> | |
| 236 | 239 | <div class="flex justify-center mt-4"> |
| 237 | 240 | <Button :icon="h(Plus)" type="primary" ghost @click="handleAdd" v-access:code="['${permissionPrefix}:create']"> |
| 238 | 241 | {{ $t('ui.actionTitle.create', ['${subTable.classComment}']) }} | ... | ... |
yudao-module-infra/src/main/resources/codegen/vue3_vben5_antd/general/views/modules/list_sub_erp.vue.vm
| ... | ... | @@ -6,18 +6,18 @@ |
| 6 | 6 | #set ($subSimpleClassName_strikeCase = $subSimpleClassName_strikeCases.get($subIndex)) |
| 7 | 7 | #set ($SubJoinColumnName = $subJoinColumn.javaField.substring(0,1).toUpperCase() + ${subJoinColumn.javaField.substring(1)})##首字母大写 |
| 8 | 8 | <script lang="ts" setup> |
| 9 | -import type { ${simpleClassName}Api } from '#/api/${table.moduleName}/${simpleClassName_strikeCase}'; | |
| 9 | +import type { ${simpleClassName}Api } from '#/api/${table.moduleName}/${table.businessName}'; | |
| 10 | 10 | import type { VxeTableInstance } from '#/adapter/vxe-table'; |
| 11 | 11 | |
| 12 | -import { reactive,ref, h, nextTick,watch,onMounted } from 'vue'; | |
| 12 | +import { reactive, ref, h, nextTick, watch, onMounted } from 'vue'; | |
| 13 | 13 | |
| 14 | 14 | import { DICT_TYPE } from '@vben/constants'; |
| 15 | 15 | import { getDictOptions } from '@vben/hooks'; |
| 16 | 16 | |
| 17 | 17 | import { DictTag } from '#/components/dict-tag'; |
| 18 | -import { getRangePickerDefaultProps } from '#/utils'; | |
| 18 | +import { getRangePickerDefaultProps } from '#/utils/rangePickerProps'; | |
| 19 | 19 | import { VxeColumn, VxeTable } from '#/adapter/vxe-table'; |
| 20 | -import { ContentWrap } from '#/components/content-wrap'; | |
| 20 | +import { formatDateTime } from '@vben/utils'; | |
| 21 | 21 | |
| 22 | 22 | #if ($table.templateType == 11) ## erp |
| 23 | 23 | import { useVbenModal } from '@vben/common-ui'; |
| ... | ... | @@ -25,19 +25,19 @@ import { useTableToolbar, VbenVxeTableToolbar } from '@vben/plugins/vxe-table'; |
| 25 | 25 | import ${subSimpleClassName}Form from './${subSimpleClassName_strikeCase}-form.vue' |
| 26 | 26 | import { Tinymce as RichTextarea } from '#/components/tinymce'; |
| 27 | 27 | import { ImageUpload, FileUpload } from "#/components/upload"; |
| 28 | -import { message,Button, Tabs,Pagination, Form, Input, Textarea, Select, RadioGroup, Radio, CheckboxGroup, Checkbox,RangePicker, DatePicker, TreeSelect } from 'ant-design-vue'; | |
| 28 | +import { message, Button, Card, Tabs, Pagination, Form, Input, Textarea, Select, RadioGroup, Radio, CheckboxGroup, Checkbox, RangePicker, DatePicker, TreeSelect } from 'ant-design-vue'; | |
| 29 | 29 | import { Plus, Trash2 } from '@vben/icons'; |
| 30 | 30 | import { $t } from '#/locales'; |
| 31 | 31 | #end |
| 32 | 32 | |
| 33 | 33 | #if ($table.templateType == 11) ## erp |
| 34 | -import { delete${subSimpleClassName},#if ($deleteBatchEnable) delete${subSimpleClassName}List,#end get${subSimpleClassName}Page } from '#/api/${table.moduleName}/${simpleClassName_strikeCase}'; | |
| 35 | -import { isEmpty } from '@vben/utils'; | |
| 34 | +import { delete${subSimpleClassName},#if ($deleteBatchEnable) delete${subSimpleClassName}List,#end get${subSimpleClassName}Page } from '#/api/${table.moduleName}/${table.businessName}'; | |
| 35 | +import { isEmpty, cloneDeep } from '@vben/utils'; | |
| 36 | 36 | #else |
| 37 | 37 | #if ($subTable.subJoinMany) ## 一对多 |
| 38 | -import { get${subSimpleClassName}ListBy${SubJoinColumnName} } from '#/api/${table.moduleName}/${simpleClassName_strikeCase}'; | |
| 38 | +import { get${subSimpleClassName}ListBy${SubJoinColumnName} } from '#/api/${table.moduleName}/${table.businessName}'; | |
| 39 | 39 | #else |
| 40 | -import { get${subSimpleClassName}By${SubJoinColumnName} } from '#/api/${table.moduleName}/${simpleClassName_strikeCase}'; | |
| 40 | +import { get${subSimpleClassName}By${SubJoinColumnName} } from '#/api/${table.moduleName}/${table.businessName}'; | |
| 41 | 41 | #end |
| 42 | 42 | #end |
| 43 | 43 | |
| ... | ... | @@ -203,7 +203,7 @@ onMounted(() => { |
| 203 | 203 | #if ($table.templateType == 11) ## erp |
| 204 | 204 | <FormModal @success="getList" /> |
| 205 | 205 | <div class="h-[600px]"> |
| 206 | - <ContentWrap v-if="!hiddenSearchBar"> | |
| 206 | + <Card v-if="!hiddenSearchBar" class="mb-4"> | |
| 207 | 207 | <!-- 搜索工作栏 --> |
| 208 | 208 | <Form |
| 209 | 209 | :model="queryParams" |
| ... | ... | @@ -284,10 +284,10 @@ onMounted(() => { |
| 284 | 284 | </Button> |
| 285 | 285 | </Form.Item> |
| 286 | 286 | </Form> |
| 287 | - </ContentWrap> | |
| 287 | + </Card> | |
| 288 | 288 | |
| 289 | 289 | <!-- 列表 --> |
| 290 | - <ContentWrap title="${table.classComment}"> | |
| 290 | + <Card title="${table.classComment}"> | |
| 291 | 291 | <template #extra> |
| 292 | 292 | <VbenVxeTableToolbar |
| 293 | 293 | ref="tableToolbarRef" |
| ... | ... | @@ -315,9 +315,9 @@ onMounted(() => { |
| 315 | 315 | 批量删除 |
| 316 | 316 | </Button> |
| 317 | 317 | #end |
| 318 | - </TableToolbar> | |
| 318 | + </VbenVxeTableToolbar> | |
| 319 | 319 | </template> |
| 320 | - <vxe-table | |
| 320 | + <VxeTable | |
| 321 | 321 | ref="tableRef" |
| 322 | 322 | :data="list" |
| 323 | 323 | show-overflow |
| ... | ... | @@ -328,7 +328,7 @@ onMounted(() => { |
| 328 | 328 | #end |
| 329 | 329 | > |
| 330 | 330 | #if ($deleteBatchEnable) |
| 331 | - <vxe-column type="checkbox" width="40"></vxe-column> | |
| 331 | + <VxeColumn type="checkbox" width="40" /> | |
| 332 | 332 | #end |
| 333 | 333 | #foreach($column in $subColumns) |
| 334 | 334 | #if ($column.listOperationResult) |
| ... | ... | @@ -336,30 +336,30 @@ onMounted(() => { |
| 336 | 336 | #set ($javaField = $column.javaField) |
| 337 | 337 | #set ($comment=$column.columnComment) |
| 338 | 338 | #if ($column.javaType == "LocalDateTime")## 时间类型 |
| 339 | - <vxe-column field="${javaField}" title="${comment}" align="center"> | |
| 339 | + <VxeColumn field="${javaField}" title="${comment}" align="center"> | |
| 340 | 340 | <template #default="{row}"> |
| 341 | 341 | {{formatDateTime(row.${javaField})}} |
| 342 | 342 | </template> |
| 343 | - </vxe-column> | |
| 343 | + </VxeColumn> | |
| 344 | 344 | #elseif($column.dictType && "" != $column.dictType)## 数据字典 |
| 345 | - <vxe-column field="${javaField}" title="${comment}" align="center"> | |
| 345 | + <VxeColumn field="${javaField}" title="${comment}" align="center"> | |
| 346 | 346 | <template #default="{row}"> |
| 347 | 347 | <dict-tag :type="DICT_TYPE.$dictType.toUpperCase()" :value="row.${javaField}" /> |
| 348 | 348 | </template> |
| 349 | - </vxe-column> | |
| 349 | + </VxeColumn> | |
| 350 | 350 | #elseif ($table.templateType == 2 && $javaField == $treeNameColumn.javaField) |
| 351 | - <vxe-column field="${javaField}" title="${comment}" align="center" tree-node/> | |
| 351 | + <VxeColumn field="${javaField}" title="${comment}" align="center" tree-node/> | |
| 352 | 352 | #else |
| 353 | - <vxe-column field="${javaField}" title="${comment}" align="center" /> | |
| 353 | + <VxeColumn field="${javaField}" title="${comment}" align="center" /> | |
| 354 | 354 | #end |
| 355 | 355 | #end |
| 356 | 356 | #end |
| 357 | - <vxe-column field="operation" title="操作" align="center"> | |
| 357 | + <VxeColumn field="operation" title="操作" align="center"> | |
| 358 | 358 | <template #default="{row}"> |
| 359 | 359 | <Button |
| 360 | 360 | size="small" |
| 361 | 361 | type="link" |
| 362 | - @click="handleEdit(row as any)" | |
| 362 | + @click="handleEdit(row)" | |
| 363 | 363 | v-access:code="['${permissionPrefix}:update']" |
| 364 | 364 | > |
| 365 | 365 | {{ $t('ui.actionTitle.edit') }} |
| ... | ... | @@ -369,14 +369,14 @@ onMounted(() => { |
| 369 | 369 | type="link" |
| 370 | 370 | danger |
| 371 | 371 | class="ml-2" |
| 372 | - @click="handleDelete(row as any)" | |
| 372 | + @click="handleDelete(row)" | |
| 373 | 373 | v-access:code="['${permissionPrefix}:delete']" |
| 374 | 374 | > |
| 375 | 375 | {{ $t('ui.actionTitle.delete') }} |
| 376 | 376 | </Button> |
| 377 | 377 | </template> |
| 378 | - </vxe-column> | |
| 379 | - </vxe-table> | |
| 378 | + </VxeColumn> | |
| 379 | + </VxeTable> | |
| 380 | 380 | <!-- 分页 --> |
| 381 | 381 | <div class="mt-2 flex justify-end"> |
| 382 | 382 | <Pagination |
| ... | ... | @@ -387,11 +387,11 @@ onMounted(() => { |
| 387 | 387 | @change="getList" |
| 388 | 388 | /> |
| 389 | 389 | </div> |
| 390 | - </ContentWrap> | |
| 390 | + </Card> | |
| 391 | 391 | </div> |
| 392 | 392 | #else |
| 393 | - <ContentWrap title="${subTable.classComment}列表"> | |
| 394 | - <vxe-table | |
| 393 | + <Card title="${subTable.classComment}列表"> | |
| 394 | + <VxeTable | |
| 395 | 395 | :data="list" |
| 396 | 396 | show-overflow |
| 397 | 397 | :loading="loading" |
| ... | ... | @@ -402,23 +402,23 @@ onMounted(() => { |
| 402 | 402 | #set ($javaField = $column.javaField) |
| 403 | 403 | #set ($comment=$column.columnComment) |
| 404 | 404 | #if ($column.javaType == "LocalDateTime")## 时间类型 |
| 405 | - <vxe-column field="${javaField}" title="${comment}" align="center"> | |
| 405 | + <VxeColumn field="${javaField}" title="${comment}" align="center"> | |
| 406 | 406 | <template #default="{row}"> |
| 407 | 407 | {{formatDateTime(row.${javaField})}} |
| 408 | 408 | </template> |
| 409 | - </vxe-column> | |
| 409 | + </VxeColumn> | |
| 410 | 410 | #elseif($column.dictType && "" != $column.dictType)## 数据字典 |
| 411 | - <vxe-column field="${javaField}" title="${comment}" align="center"> | |
| 411 | + <VxeColumn field="${javaField}" title="${comment}" align="center"> | |
| 412 | 412 | <template #default="{row}"> |
| 413 | 413 | <dict-tag :type="DICT_TYPE.$dictType.toUpperCase()" :value="row.${javaField}" /> |
| 414 | 414 | </template> |
| 415 | - </vxe-column> | |
| 415 | + </VxeColumn> | |
| 416 | 416 | #else |
| 417 | - <vxe-column field="${javaField}" title="${comment}" align="center" /> | |
| 417 | + <VxeColumn field="${javaField}" title="${comment}" align="center" /> | |
| 418 | 418 | #end |
| 419 | 419 | #end |
| 420 | 420 | #end |
| 421 | - </vxe-table> | |
| 422 | - </ContentWrap> | |
| 421 | + </VxeTable> | |
| 422 | + </Card> | |
| 423 | 423 | #end |
| 424 | 424 | </template> | ... | ... |
yudao-module-infra/src/main/resources/codegen/vue3_vben5_antd/schema/views/modules/form_sub_normal.vue.vm
| ... | ... | @@ -8,7 +8,7 @@ |
| 8 | 8 | <script lang="ts" setup> |
| 9 | 9 | import type { ${apiName} } from '#/api/${table.moduleName}/${table.businessName}'; |
| 10 | 10 | |
| 11 | - import { computed, ref, h, onMounted,watch,nextTick } from 'vue'; | |
| 11 | + import { computed, ref, h, onMounted, watch, nextTick } from 'vue'; | |
| 12 | 12 | |
| 13 | 13 | import { $t } from '#/locales'; |
| 14 | 14 | |
| ... | ... | @@ -16,7 +16,6 @@ |
| 16 | 16 | import { Plus } from "@vben/icons"; |
| 17 | 17 | import { Button, Tabs, Checkbox, Input, Textarea, Select,RadioGroup,CheckboxGroup, DatePicker } from 'ant-design-vue'; |
| 18 | 18 | import { ImageUpload, FileUpload } from "#/components/upload"; |
| 19 | -import type { OnActionClickParams } from '#/adapter/vxe-table'; | |
| 20 | 19 | import { useVbenVxeGrid } from '#/adapter/vxe-table'; |
| 21 | 20 | import { use${subSimpleClassName}GridEditColumns } from '../data'; |
| 22 | 21 | import { get${subSimpleClassName}ListBy${SubJoinColumnName} } from '#/api/${table.moduleName}/${table.businessName}'; |
| ... | ... | @@ -31,22 +30,9 @@ const props = defineProps<{ |
| 31 | 30 | }>() |
| 32 | 31 | |
| 33 | 32 | #if ($subTable.subJoinMany) ## 一对多 |
| 34 | -/** 表格操作按钮的回调函数 */ | |
| 35 | -function onActionClick({ | |
| 36 | - code, | |
| 37 | - row, | |
| 38 | -}: OnActionClickParams<${apiName}.${subSimpleClassName}>) { | |
| 39 | - switch (code) { | |
| 40 | - case 'delete': { | |
| 41 | - handleDelete(row); | |
| 42 | - break; | |
| 43 | - } | |
| 44 | - } | |
| 45 | -} | |
| 46 | - | |
| 47 | 33 | const [Grid, gridApi] = useVbenVxeGrid({ |
| 48 | 34 | gridOptions: { |
| 49 | - columns: use${subSimpleClassName}GridEditColumns(onActionClick), | |
| 35 | + columns: use${subSimpleClassName}GridEditColumns(), | |
| 50 | 36 | border: true, |
| 51 | 37 | showOverflow: true, |
| 52 | 38 | autoResize: true, |
| ... | ... | @@ -186,6 +172,17 @@ watch( |
| 186 | 172 | #end |
| 187 | 173 | #end |
| 188 | 174 | #end |
| 175 | + <template #actions="{ row }"> | |
| 176 | + <Button | |
| 177 | + size="small" | |
| 178 | + type="link" | |
| 179 | + danger | |
| 180 | + @click="handleDelete(row)" | |
| 181 | + v-access:code="['${subTable.moduleName}:${simpleClassName_strikeCase}:delete']" | |
| 182 | + > | |
| 183 | + {{ $t('ui.actionTitle.delete') }} | |
| 184 | + </Button> | |
| 185 | + </template> | |
| 189 | 186 | </Grid> |
| 190 | 187 | <div class="flex justify-center -mt-4"> |
| 191 | 188 | <Button :icon="h(Plus)" type="primary" ghost @click="handleAdd" v-access:code="['${subTable.moduleName}:${simpleClassName_strikeCase}:create']"> | ... | ... |
yudao-module-infra/src/main/resources/codegen/vue3_vben5_antd/schema/views/modules/list_sub_erp.vue.vm
| ... | ... | @@ -82,7 +82,7 @@ async function handleDeleteBatch() { |
| 82 | 82 | try { |
| 83 | 83 | await delete${subSimpleClassName}List(checkedIds.value); |
| 84 | 84 | checkedIds.value = []; |
| 85 | - message.success($t('ui.actionMessage.deleteSuccess', [row.id])); | |
| 85 | + message.success($t('ui.actionMessage.deleteSuccess')); | |
| 86 | 86 | handleRefresh(); |
| 87 | 87 | } finally { |
| 88 | 88 | hideLoading(); |
| ... | ... | @@ -134,7 +134,7 @@ const [Grid, gridApi] = useVbenVxeGrid({ |
| 134 | 134 | #else |
| 135 | 135 | columns: use${subSimpleClassName}GridColumns(), |
| 136 | 136 | pagerConfig: { |
| 137 | - nabled: false, | |
| 137 | + enabled: false, | |
| 138 | 138 | }, |
| 139 | 139 | toolbarConfig: { |
| 140 | 140 | enabled: false, | ... | ... |
yudao-module-infra/src/main/resources/codegen/vue3_vben5_ele/schema/views/data.ts.vm
| ... | ... | @@ -114,6 +114,7 @@ export function useFormSchema(): VbenFormSchema[] { |
| 114 | 114 | showTime: true, |
| 115 | 115 | format: 'YYYY-MM-DD HH:mm:ss', |
| 116 | 116 | valueFormat: 'x', |
| 117 | + class: '!w-full', | |
| 117 | 118 | }, |
| 118 | 119 | #elseif($column.htmlType == "textarea")## 文本域 |
| 119 | 120 | component: 'Textarea', |
| ... | ... | @@ -317,6 +318,7 @@ export function use${subSimpleClassName}FormSchema(): VbenFormSchema[] { |
| 317 | 318 | showTime: true, |
| 318 | 319 | format: 'YYYY-MM-DD HH:mm:ss', |
| 319 | 320 | valueFormat: 'x', |
| 321 | + class: '!w-full', | |
| 320 | 322 | }, |
| 321 | 323 | #elseif($column.htmlType == "textarea")## 文本域 |
| 322 | 324 | component: 'Textarea', |
| ... | ... | @@ -552,6 +554,7 @@ export function use${subSimpleClassName}GridColumns(): VxeTableGridOptions<${api |
| 552 | 554 | showTime: true, |
| 553 | 555 | format: 'YYYY-MM-DD HH:mm:ss', |
| 554 | 556 | valueFormat: 'x', |
| 557 | + class: '!w-full', | |
| 555 | 558 | }, |
| 556 | 559 | #elseif($column.htmlType == "textarea")## 文本域 |
| 557 | 560 | component: 'Textarea', | ... | ... |
yudao-module-iot/yudao-module-iot-biz/src/main/java/cn/iocoder/yudao/module/iot/controller/admin/product/IotProductController.java
| ... | ... | @@ -146,7 +146,7 @@ public class IotProductController { |
| 146 | 146 | public CommonResult<List<IotProductRespVO>> getProductSimpleList() { |
| 147 | 147 | List<IotProductDO> list = productService.getProductList(); |
| 148 | 148 | return success(convertList(list, product -> // 只返回 id、name 字段 |
| 149 | - new IotProductRespVO().setId(product.getId()).setName(product.getName()) | |
| 149 | + new IotProductRespVO().setId(product.getId()).setName(product.getName()).setStatus(product.getStatus()) | |
| 150 | 150 | .setDeviceType(product.getDeviceType()).setLocationType(product.getLocationType()))); |
| 151 | 151 | } |
| 152 | 152 | ... | ... |
yudao-module-iot/yudao-module-iot-biz/src/main/java/cn/iocoder/yudao/module/iot/dal/mysql/alert/IotAlertConfigMapper.java
| ... | ... | @@ -33,7 +33,7 @@ public interface IotAlertConfigMapper extends BaseMapperX<IotAlertConfigDO> { |
| 33 | 33 | default List<IotAlertConfigDO> selectListBySceneRuleIdAndStatus(Long sceneRuleId, Integer status) { |
| 34 | 34 | return selectList(new LambdaQueryWrapperX<IotAlertConfigDO>() |
| 35 | 35 | .eq(IotAlertConfigDO::getStatus, status) |
| 36 | - .apply(MyBatisUtils.findInSet("scene_rule_id", sceneRuleId))); | |
| 36 | + .apply(MyBatisUtils.findInSet("scene_rule_ids", sceneRuleId))); | |
| 37 | 37 | } |
| 38 | 38 | |
| 39 | 39 | } |
| 40 | 40 | \ No newline at end of file | ... | ... |
yudao-module-iot/yudao-module-iot-biz/src/main/java/cn/iocoder/yudao/module/iot/mq/consumer/rule/IotSceneRuleMessageHandler.java
| ... | ... | @@ -42,9 +42,6 @@ public class IotSceneRuleMessageHandler implements IotMessageSubscriber<IotDevic |
| 42 | 42 | |
| 43 | 43 | @Override |
| 44 | 44 | public void onMessage(IotDeviceMessage message) { |
| 45 | - if (true) { | |
| 46 | - return; | |
| 47 | - } | |
| 48 | 45 | log.info("[onMessage][消息内容({})]", message); |
| 49 | 46 | sceneRuleService.executeSceneRuleByDevice(message); |
| 50 | 47 | } | ... | ... |
yudao-module-iot/yudao-module-iot-biz/src/main/java/cn/iocoder/yudao/module/iot/service/rule/scene/IotSceneRuleServiceImpl.java
| ... | ... | @@ -241,13 +241,13 @@ public class IotSceneRuleServiceImpl implements IotSceneRuleService { |
| 241 | 241 | */ |
| 242 | 242 | private List<IotSceneRuleDO> getMatchedSceneRuleListByMessage(IotDeviceMessage message) { |
| 243 | 243 | // 1.1 通过 deviceId 获取设备信息 |
| 244 | - IotDeviceDO device = getSelf().deviceService.getDeviceFromCache(message.getDeviceId()); | |
| 244 | + IotDeviceDO device = deviceService.getDeviceFromCache(message.getDeviceId()); | |
| 245 | 245 | if (device == null) { |
| 246 | 246 | log.warn("[getMatchedSceneRuleListByMessage][设备({}) 不存在]", message.getDeviceId()); |
| 247 | 247 | return ListUtil.of(); |
| 248 | 248 | } |
| 249 | 249 | // 1.2 通过 productId 获取产品信息 |
| 250 | - IotProductDO product = getSelf().productService.getProductFromCache(device.getProductId()); | |
| 250 | + IotProductDO product = productService.getProductFromCache(device.getProductId()); | |
| 251 | 251 | if (product == null) { |
| 252 | 252 | log.warn("[getMatchedSceneRuleListByMessage][产品({}) 不存在]", device.getProductId()); |
| 253 | 253 | return ListUtil.of(); | ... | ... |
yudao-module-iot/yudao-module-iot-biz/src/main/java/cn/iocoder/yudao/module/iot/service/rule/scene/matcher/trigger/IotDeviceEventPostTriggerMatcher.java
| ... | ... | @@ -48,13 +48,13 @@ public class IotDeviceEventPostTriggerMatcher implements IotSceneRuleTriggerMatc |
| 48 | 48 | // 2. 对于事件触发器,通常不需要检查操作符和值,只要事件发生即匹配 |
| 49 | 49 | // 但如果配置了操作符和值,则需要进行条件匹配 |
| 50 | 50 | if (StrUtil.isNotBlank(trigger.getOperator()) && StrUtil.isNotBlank(trigger.getValue())) { |
| 51 | - Object eventData = message.getData(); | |
| 52 | - if (eventData == null) { | |
| 53 | - IotSceneRuleMatcherHelper.logTriggerMatchFailure(message, trigger, "消息中事件数据为空"); | |
| 51 | + Object eventParams = message.getParams(); | |
| 52 | + if (eventParams == null) { | |
| 53 | + IotSceneRuleMatcherHelper.logTriggerMatchFailure(message, trigger, "消息中事件参数为空"); | |
| 54 | 54 | return false; |
| 55 | 55 | } |
| 56 | 56 | |
| 57 | - boolean matched = IotSceneRuleMatcherHelper.evaluateCondition(eventData, trigger.getOperator(), trigger.getValue()); | |
| 57 | + boolean matched = IotSceneRuleMatcherHelper.evaluateCondition(eventParams, trigger.getOperator(), trigger.getValue()); | |
| 58 | 58 | if (!matched) { |
| 59 | 59 | IotSceneRuleMatcherHelper.logTriggerMatchFailure(message, trigger, "事件数据条件不匹配"); |
| 60 | 60 | return false; | ... | ... |
yudao-module-iot/yudao-module-iot-biz/src/test/java/cn/iocoder/yudao/module/iot/service/rule/data/action/IotTcpDataRuleActionTest.java
| ... | ... | @@ -5,6 +5,7 @@ import cn.iocoder.yudao.module.iot.core.mq.message.IotDeviceMessage; |
| 5 | 5 | import cn.iocoder.yudao.module.iot.dal.dataobject.rule.config.IotDataSinkTcpConfig; |
| 6 | 6 | import cn.iocoder.yudao.module.iot.service.rule.data.action.tcp.IotTcpClient; |
| 7 | 7 | import org.junit.jupiter.api.BeforeEach; |
| 8 | +import org.junit.jupiter.api.Disabled; | |
| 8 | 9 | import org.junit.jupiter.api.Test; |
| 9 | 10 | import org.mockito.Mock; |
| 10 | 11 | import org.mockito.MockitoAnnotations; |
| ... | ... | @@ -17,6 +18,7 @@ import static org.mockito.Mockito.*; |
| 17 | 18 | * |
| 18 | 19 | * @author HUIHUI |
| 19 | 20 | */ |
| 21 | +@Disabled // TODO @puhui999:单测有报错,先屏蔽 | |
| 20 | 22 | class IotTcpDataRuleActionTest { |
| 21 | 23 | |
| 22 | 24 | private IotTcpDataRuleAction tcpDataRuleAction; | ... | ... |
yudao-module-iot/yudao-module-iot-biz/src/test/java/cn/iocoder/yudao/module/iot/service/rule/scene/IotSceneRuleServiceSimpleTest.java
| ... | ... | @@ -9,6 +9,7 @@ import cn.iocoder.yudao.module.iot.framework.job.core.IotSchedulerManager; |
| 9 | 9 | import cn.iocoder.yudao.module.iot.service.device.IotDeviceService; |
| 10 | 10 | import cn.iocoder.yudao.module.iot.service.product.IotProductService; |
| 11 | 11 | import cn.iocoder.yudao.module.iot.service.rule.scene.action.IotSceneRuleAction; |
| 12 | +import org.junit.jupiter.api.Disabled; | |
| 12 | 13 | import org.junit.jupiter.api.Test; |
| 13 | 14 | import org.mockito.InjectMocks; |
| 14 | 15 | import org.mockito.Mock; |
| ... | ... | @@ -29,6 +30,7 @@ import static org.mockito.Mockito.*; |
| 29 | 30 | * |
| 30 | 31 | * @author 芋道源码 |
| 31 | 32 | */ |
| 33 | +@Disabled // TODO @puhui999:单测有报错,先屏蔽 | |
| 32 | 34 | public class IotSceneRuleServiceSimpleTest extends BaseMockitoUnitTest { |
| 33 | 35 | |
| 34 | 36 | @InjectMocks | ... | ... |
yudao-module-iot/yudao-module-iot-biz/src/test/java/cn/iocoder/yudao/module/iot/service/rule/scene/matcher/condition/IotCurrentTimeConditionMatcherTest.java
| ... | ... | @@ -6,6 +6,7 @@ import cn.iocoder.yudao.module.iot.enums.rule.IotSceneRuleConditionOperatorEnum; |
| 6 | 6 | import cn.iocoder.yudao.module.iot.enums.rule.IotSceneRuleConditionTypeEnum; |
| 7 | 7 | import cn.iocoder.yudao.module.iot.service.rule.scene.matcher.IotBaseConditionMatcherTest; |
| 8 | 8 | import org.junit.jupiter.api.BeforeEach; |
| 9 | +import org.junit.jupiter.api.Disabled; | |
| 9 | 10 | import org.junit.jupiter.api.Test; |
| 10 | 11 | |
| 11 | 12 | import java.time.LocalDateTime; |
| ... | ... | @@ -20,6 +21,7 @@ import static org.junit.jupiter.api.Assertions.*; |
| 20 | 21 | * |
| 21 | 22 | * @author HUIHUI |
| 22 | 23 | */ |
| 24 | +@Disabled // TODO @puhui999:单测有报错,先屏蔽 | |
| 23 | 25 | public class IotCurrentTimeConditionMatcherTest extends IotBaseConditionMatcherTest { |
| 24 | 26 | |
| 25 | 27 | private IotCurrentTimeConditionMatcher matcher; | ... | ... |
yudao-module-iot/yudao-module-iot-biz/src/test/java/cn/iocoder/yudao/module/iot/service/rule/scene/matcher/condition/IotDevicePropertyConditionMatcherTest.java
| ... | ... | @@ -6,6 +6,7 @@ import cn.iocoder.yudao.module.iot.enums.rule.IotSceneRuleConditionOperatorEnum; |
| 6 | 6 | import cn.iocoder.yudao.module.iot.enums.rule.IotSceneRuleConditionTypeEnum; |
| 7 | 7 | import cn.iocoder.yudao.module.iot.service.rule.scene.matcher.IotBaseConditionMatcherTest; |
| 8 | 8 | import org.junit.jupiter.api.BeforeEach; |
| 9 | +import org.junit.jupiter.api.Disabled; | |
| 9 | 10 | import org.junit.jupiter.api.Test; |
| 10 | 11 | |
| 11 | 12 | import java.util.HashMap; |
| ... | ... | @@ -19,6 +20,7 @@ import static org.junit.jupiter.api.Assertions.*; |
| 19 | 20 | * |
| 20 | 21 | * @author HUIHUI |
| 21 | 22 | */ |
| 23 | +@Disabled // TODO @puhui999:单测有报错,先屏蔽 | |
| 22 | 24 | public class IotDevicePropertyConditionMatcherTest extends IotBaseConditionMatcherTest { |
| 23 | 25 | |
| 24 | 26 | private IotDevicePropertyConditionMatcher matcher; | ... | ... |
yudao-module-iot/yudao-module-iot-biz/src/test/java/cn/iocoder/yudao/module/iot/service/rule/scene/matcher/condition/IotDeviceStateConditionMatcherTest.java
| ... | ... | @@ -7,6 +7,7 @@ import cn.iocoder.yudao.module.iot.enums.rule.IotSceneRuleConditionOperatorEnum; |
| 7 | 7 | import cn.iocoder.yudao.module.iot.enums.rule.IotSceneRuleConditionTypeEnum; |
| 8 | 8 | import cn.iocoder.yudao.module.iot.service.rule.scene.matcher.IotBaseConditionMatcherTest; |
| 9 | 9 | import org.junit.jupiter.api.BeforeEach; |
| 10 | +import org.junit.jupiter.api.Disabled; | |
| 10 | 11 | import org.junit.jupiter.api.Test; |
| 11 | 12 | |
| 12 | 13 | import static cn.iocoder.yudao.framework.test.core.util.RandomUtils.randomLongId; |
| ... | ... | @@ -18,6 +19,7 @@ import static org.junit.jupiter.api.Assertions.*; |
| 18 | 19 | * |
| 19 | 20 | * @author HUIHUI |
| 20 | 21 | */ |
| 22 | +@Disabled // TODO @puhui999:单测有报错,先屏蔽 | |
| 21 | 23 | public class IotDeviceStateConditionMatcherTest extends IotBaseConditionMatcherTest { |
| 22 | 24 | |
| 23 | 25 | private IotDeviceStateConditionMatcher matcher; | ... | ... |
yudao-module-iot/yudao-module-iot-biz/src/test/java/cn/iocoder/yudao/module/iot/service/rule/scene/matcher/trigger/IotDeviceEventPostTriggerMatcherTest.java
| ... | ... | @@ -7,6 +7,7 @@ import cn.iocoder.yudao.module.iot.dal.dataobject.rule.IotSceneRuleDO; |
| 7 | 7 | import cn.iocoder.yudao.module.iot.enums.rule.IotSceneRuleTriggerTypeEnum; |
| 8 | 8 | import cn.iocoder.yudao.module.iot.service.rule.scene.matcher.IotBaseConditionMatcherTest; |
| 9 | 9 | import org.junit.jupiter.api.BeforeEach; |
| 10 | +import org.junit.jupiter.api.Disabled; | |
| 10 | 11 | import org.junit.jupiter.api.Test; |
| 11 | 12 | |
| 12 | 13 | import java.util.HashMap; |
| ... | ... | @@ -22,6 +23,7 @@ import static org.junit.jupiter.api.Assertions.*; |
| 22 | 23 | * |
| 23 | 24 | * @author HUIHUI |
| 24 | 25 | */ |
| 26 | +@Disabled // TODO @puhui999:单测有报错,先屏蔽 | |
| 25 | 27 | public class IotDeviceEventPostTriggerMatcherTest extends IotBaseConditionMatcherTest { |
| 26 | 28 | |
| 27 | 29 | private IotDeviceEventPostTriggerMatcher matcher; | ... | ... |
yudao-module-iot/yudao-module-iot-biz/src/test/java/cn/iocoder/yudao/module/iot/service/rule/scene/matcher/trigger/IotDevicePropertyPostTriggerMatcherTest.java
| ... | ... | @@ -8,6 +8,7 @@ import cn.iocoder.yudao.module.iot.enums.rule.IotSceneRuleConditionOperatorEnum; |
| 8 | 8 | import cn.iocoder.yudao.module.iot.enums.rule.IotSceneRuleTriggerTypeEnum; |
| 9 | 9 | import cn.iocoder.yudao.module.iot.service.rule.scene.matcher.IotBaseConditionMatcherTest; |
| 10 | 10 | import org.junit.jupiter.api.BeforeEach; |
| 11 | +import org.junit.jupiter.api.Disabled; | |
| 11 | 12 | import org.junit.jupiter.api.Test; |
| 12 | 13 | |
| 13 | 14 | import java.util.HashMap; |
| ... | ... | @@ -24,6 +25,7 @@ import static org.junit.jupiter.api.Assertions.*; |
| 24 | 25 | * |
| 25 | 26 | * @author HUIHUI |
| 26 | 27 | */ |
| 28 | +@Disabled // TODO @puhui999:单测有报错,先屏蔽 | |
| 27 | 29 | public class IotDevicePropertyPostTriggerMatcherTest extends IotBaseConditionMatcherTest { |
| 28 | 30 | |
| 29 | 31 | private IotDevicePropertyPostTriggerMatcher matcher; | ... | ... |
yudao-module-iot/yudao-module-iot-biz/src/test/java/cn/iocoder/yudao/module/iot/service/rule/scene/matcher/trigger/IotDeviceServiceInvokeTriggerMatcherTest.java
| ... | ... | @@ -7,6 +7,7 @@ import cn.iocoder.yudao.module.iot.dal.dataobject.rule.IotSceneRuleDO; |
| 7 | 7 | import cn.iocoder.yudao.module.iot.enums.rule.IotSceneRuleTriggerTypeEnum; |
| 8 | 8 | import cn.iocoder.yudao.module.iot.service.rule.scene.matcher.IotBaseConditionMatcherTest; |
| 9 | 9 | import org.junit.jupiter.api.BeforeEach; |
| 10 | +import org.junit.jupiter.api.Disabled; | |
| 10 | 11 | import org.junit.jupiter.api.Test; |
| 11 | 12 | |
| 12 | 13 | import java.util.HashMap; |
| ... | ... | @@ -22,6 +23,7 @@ import static org.junit.jupiter.api.Assertions.*; |
| 22 | 23 | * |
| 23 | 24 | * @author HUIHUI |
| 24 | 25 | */ |
| 26 | +@Disabled // TODO @puhui999:单测有报错,先屏蔽 | |
| 25 | 27 | public class IotDeviceServiceInvokeTriggerMatcherTest extends IotBaseConditionMatcherTest { |
| 26 | 28 | |
| 27 | 29 | private IotDeviceServiceInvokeTriggerMatcher matcher; | ... | ... |
yudao-module-iot/yudao-module-iot-biz/src/test/java/cn/iocoder/yudao/module/iot/service/rule/scene/matcher/trigger/IotDeviceStateUpdateTriggerMatcherTest.java
| ... | ... | @@ -8,6 +8,7 @@ import cn.iocoder.yudao.module.iot.enums.rule.IotSceneRuleConditionOperatorEnum; |
| 8 | 8 | import cn.iocoder.yudao.module.iot.enums.rule.IotSceneRuleTriggerTypeEnum; |
| 9 | 9 | import cn.iocoder.yudao.module.iot.service.rule.scene.matcher.IotBaseConditionMatcherTest; |
| 10 | 10 | import org.junit.jupiter.api.BeforeEach; |
| 11 | +import org.junit.jupiter.api.Disabled; | |
| 11 | 12 | import org.junit.jupiter.api.Test; |
| 12 | 13 | |
| 13 | 14 | import static cn.iocoder.yudao.framework.test.core.util.RandomUtils.randomLongId; |
| ... | ... | @@ -18,6 +19,7 @@ import static org.junit.jupiter.api.Assertions.*; |
| 18 | 19 | * |
| 19 | 20 | * @author HUIHUI |
| 20 | 21 | */ |
| 22 | +@Disabled // TODO @puhui999:单测有报错,先屏蔽 | |
| 21 | 23 | public class IotDeviceStateUpdateTriggerMatcherTest extends IotBaseConditionMatcherTest { |
| 22 | 24 | |
| 23 | 25 | private IotDeviceStateUpdateTriggerMatcher matcher; | ... | ... |
yudao-module-iot/yudao-module-iot-biz/src/test/java/cn/iocoder/yudao/module/iot/service/rule/scene/matcher/trigger/IotTimerTriggerMatcherTest.java
| ... | ... | @@ -5,6 +5,7 @@ import cn.iocoder.yudao.module.iot.dal.dataobject.rule.IotSceneRuleDO; |
| 5 | 5 | import cn.iocoder.yudao.module.iot.enums.rule.IotSceneRuleTriggerTypeEnum; |
| 6 | 6 | import cn.iocoder.yudao.module.iot.service.rule.scene.matcher.IotBaseConditionMatcherTest; |
| 7 | 7 | import org.junit.jupiter.api.BeforeEach; |
| 8 | +import org.junit.jupiter.api.Disabled; | |
| 8 | 9 | import org.junit.jupiter.api.Test; |
| 9 | 10 | |
| 10 | 11 | import static cn.iocoder.yudao.framework.test.core.util.RandomUtils.randomLongId; |
| ... | ... | @@ -16,6 +17,7 @@ import static org.junit.jupiter.api.Assertions.*; |
| 16 | 17 | * |
| 17 | 18 | * @author HUIHUI |
| 18 | 19 | */ |
| 20 | +@Disabled // TODO @puhui999:单测有报错,先屏蔽 | |
| 19 | 21 | public class IotTimerTriggerMatcherTest extends IotBaseConditionMatcherTest { |
| 20 | 22 | |
| 21 | 23 | private IotTimerTriggerMatcher matcher; | ... | ... |
yudao-module-iot/yudao-module-iot-core/src/test/java/cn/iocoder/yudao/module/iot/core/messagebus/core/rocketmq/RocketMQIotMessageBusTest.java
| ... | ... | @@ -8,6 +8,7 @@ import cn.iocoder.yudao.module.iot.core.messagebus.core.TestMessage; |
| 8 | 8 | import jakarta.annotation.Resource; |
| 9 | 9 | import lombok.extern.slf4j.Slf4j; |
| 10 | 10 | import org.apache.rocketmq.spring.autoconfigure.RocketMQAutoConfiguration; |
| 11 | +import org.junit.jupiter.api.Disabled; | |
| 11 | 12 | import org.junit.jupiter.api.Test; |
| 12 | 13 | import org.springframework.boot.test.context.SpringBootTest; |
| 13 | 14 | import org.springframework.context.annotation.Import; |
| ... | ... | @@ -28,12 +29,13 @@ import static org.junit.jupiter.api.Assertions.*; |
| 28 | 29 | @SpringBootTest(classes = RocketMQIotMessageBusTest.class) |
| 29 | 30 | @Import({RocketMQAutoConfiguration.class, IotMessageBusAutoConfiguration.class}) |
| 30 | 31 | @TestPropertySource(properties = { |
| 31 | - "yudao.iot.message-bus.type=rocketmq", | |
| 32 | - "rocketmq.name-server=127.0.0.1:9876", | |
| 33 | - "rocketmq.producer.group=test-rocketmq-group", | |
| 34 | - "rocketmq.producer.send-message-timeout=10000" | |
| 32 | + "yudao.iot.message-bus.type=rocketmq", | |
| 33 | + "rocketmq.name-server=127.0.0.1:9876", | |
| 34 | + "rocketmq.producer.group=test-rocketmq-group", | |
| 35 | + "rocketmq.producer.send-message-timeout=10000" | |
| 35 | 36 | }) |
| 36 | 37 | @Slf4j |
| 38 | +@Disabled | |
| 37 | 39 | public class RocketMQIotMessageBusTest { |
| 38 | 40 | |
| 39 | 41 | @Resource | ... | ... |
yudao-module-iot/yudao-module-iot-gateway/pom.xml
yudao-module-mall/yudao-module-promotion/src/main/java/cn/iocoder/yudao/module/promotion/service/coupon/CouponServiceImpl.java
| ... | ... | @@ -282,10 +282,11 @@ public class CouponServiceImpl implements CouponService { |
| 282 | 282 | if (ObjUtil.notEqual(couponTemplate.getTakeType(), takeType.getType())) { |
| 283 | 283 | throw exception(COUPON_TEMPLATE_CANNOT_TAKE); |
| 284 | 284 | } |
| 285 | - // 校验发放数量不能过小(仅在 CouponTakeTypeEnum.USER 用户领取时) | |
| 285 | + // 校验剩余发放数量是否充足(仅在 CouponTakeTypeEnum.USER 用户领取时) | |
| 286 | + // 关联案例:https://t.zsxq.com/mElGQ、https://t.zsxq.com/6pLzr | |
| 286 | 287 | if (CouponTakeTypeEnum.isUser(couponTemplate.getTakeType()) |
| 287 | 288 | && ObjUtil.notEqual(couponTemplate.getTakeLimitCount(), CouponTemplateDO.TAKE_LIMIT_COUNT_MAX) // 校验不限制领取数 |
| 288 | - && ObjUtil.notEqual(couponTemplate.getTotalCount(), CouponTemplateDO.TOTAL_COUNT_MAX)) { // 校验不限制发放数量 | |
| 289 | + && couponTemplate.getTakeCount() > couponTemplate.getTotalCount()) { // 已领取数量 >= 总发放数量 | |
| 289 | 290 | throw exception(COUPON_TEMPLATE_NOT_ENOUGH); |
| 290 | 291 | } |
| 291 | 292 | // 校验"固定日期"的有效期类型是否过期 | ... | ... |
yudao-module-mall/yudao-module-trade/src/main/java/cn/iocoder/yudao/module/trade/convert/delivery/DeliveryExpressTemplateConvert.java
| ... | ... | @@ -85,7 +85,9 @@ public interface DeliveryExpressTemplateConvert { |
| 85 | 85 | .setChargeMode(template.getChargeMode()) |
| 86 | 86 | .setCharge(convertTemplateCharge(findFirst(templateIdChargeMap.get(template.getId()), charge -> charge.getAreaIds().contains(areaId)))) |
| 87 | 87 | .setFree(convertTemplateFree(findFirst(templateIdFreeMap.get(template.getId()), free -> free.getAreaIds().contains(areaId)))); |
| 88 | - result.put(template.getId(), bo); | |
| 88 | + if (bo.getCharge() != null || bo.getFree() != null) { | |
| 89 | + result.put(template.getId(), bo); | |
| 90 | + } | |
| 89 | 91 | }); |
| 90 | 92 | return result; |
| 91 | 93 | } | ... | ... |
yudao-module-mall/yudao-module-trade/src/main/java/cn/iocoder/yudao/module/trade/convert/order/TradeOrderConvert.java
| ... | ... | @@ -268,7 +268,9 @@ public interface TradeOrderConvert { |
| 268 | 268 | .setTitle(StrUtil.format("{}成功购买{}", user.getNickname(), item.getSpuName())) |
| 269 | 269 | .setFirstFixedPrice(0).setSecondFixedPrice(0); |
| 270 | 270 | if (BooleanUtil.isTrue(spu.getSubCommissionType())) { |
| 271 | - bo.setFirstFixedPrice(sku.getFirstBrokeragePrice()).setSecondFixedPrice(sku.getSecondBrokeragePrice()); | |
| 271 | + // 特殊:单独设置的佣金需要乘以购买数量。关联 https://gitee.com/yudaocode/yudao-mall-uniapp/issues/ICY7SJ | |
| 272 | + bo.setFirstFixedPrice(sku.getFirstBrokeragePrice() * item.getCount()) | |
| 273 | + .setSecondFixedPrice(sku.getSecondBrokeragePrice() * item.getCount()); | |
| 272 | 274 | } |
| 273 | 275 | return bo; |
| 274 | 276 | } | ... | ... |
yudao-module-mall/yudao-module-trade/src/main/java/cn/iocoder/yudao/module/trade/dal/dataobject/brokerage/BrokerageRecordDO.java
yudao-module-mall/yudao-module-trade/src/main/java/cn/iocoder/yudao/module/trade/dal/mysql/brokerage/BrokerageRecordMapper.java
| ... | ... | @@ -44,7 +44,7 @@ public interface BrokerageRecordMapper extends BaseMapperX<BrokerageRecordDO> { |
| 44 | 44 | .lt(BrokerageRecordDO::getUnfreezeTime, unfreezeTime)); |
| 45 | 45 | } |
| 46 | 46 | |
| 47 | - default int updateByIdAndStatus(Integer id, Integer status, BrokerageRecordDO updateObj) { | |
| 47 | + default int updateByIdAndStatus(Long id, Integer status, BrokerageRecordDO updateObj) { | |
| 48 | 48 | return update(updateObj, new LambdaQueryWrapper<BrokerageRecordDO>() |
| 49 | 49 | .eq(BrokerageRecordDO::getId, id) |
| 50 | 50 | .eq(BrokerageRecordDO::getStatus, status)); | ... | ... |
yudao-module-mall/yudao-module-trade/src/main/java/cn/iocoder/yudao/module/trade/service/aftersale/AfterSaleServiceImpl.java
| 1 | 1 | package cn.iocoder.yudao.module.trade.service.aftersale; |
| 2 | 2 | |
| 3 | 3 | import cn.hutool.core.map.MapUtil; |
| 4 | +import cn.hutool.core.util.ObjUtil; | |
| 4 | 5 | import cn.hutool.core.util.ObjectUtil; |
| 5 | 6 | import cn.hutool.core.util.StrUtil; |
| 6 | 7 | import cn.iocoder.yudao.framework.common.enums.UserTypeEnum; |
| ... | ... | @@ -352,12 +353,20 @@ public class AfterSaleServiceImpl implements AfterSaleService { |
| 352 | 353 | throw exception(AFTER_SALE_REFUND_FAIL_STATUS_NOT_WAIT_REFUND); |
| 353 | 354 | } |
| 354 | 355 | |
| 355 | - // 发起退款单。注意,需要在事务提交后,再进行发起,避免重复发起 | |
| 356 | - createPayRefund(userIp, afterSale); | |
| 356 | + Integer newStatus; | |
| 357 | + if (ObjUtil.equals(afterSale.getRefundPrice(), 0)) { | |
| 358 | + // 特殊:退款为 0 的订单,直接标记为完成(积分商城)。关联案例:https://t.zsxq.com/AQEvL | |
| 359 | + updateAfterSaleStatus(afterSale.getId(), AfterSaleStatusEnum.WAIT_REFUND.getStatus(), new AfterSaleDO() | |
| 360 | + .setStatus(AfterSaleStatusEnum.COMPLETE.getStatus()).setRefundTime(LocalDateTime.now())); | |
| 361 | + newStatus = AfterSaleStatusEnum.COMPLETE.getStatus(); | |
| 362 | + } else { | |
| 363 | + // 发起退款单。注意,需要在事务提交后,再进行发起,避免重复发起 | |
| 364 | + createPayRefund(userIp, afterSale); | |
| 365 | + newStatus = afterSale.getStatus(); // 特殊:这里状态不变,而是最终 updateAfterSaleRefunded 处理!!! | |
| 366 | + } | |
| 357 | 367 | |
| 358 | 368 | // 记录售后日志 |
| 359 | - AfterSaleLogUtils.setAfterSaleInfo(afterSale.getId(), afterSale.getStatus(), | |
| 360 | - afterSale.getStatus()); // 特殊:这里状态不变,而是最终 updateAfterSaleRefunded 处理!!! | |
| 369 | + AfterSaleLogUtils.setAfterSaleInfo(afterSale.getId(), afterSale.getStatus(), newStatus); | |
| 361 | 370 | } |
| 362 | 371 | |
| 363 | 372 | private void createPayRefund(String userIp, AfterSaleDO afterSale) { | ... | ... |
yudao-module-mall/yudao-module-trade/src/main/java/cn/iocoder/yudao/module/trade/service/brokerage/BrokerageWithdrawServiceImpl.java
| ... | ... | @@ -147,9 +147,10 @@ public class BrokerageWithdrawServiceImpl implements BrokerageWithdrawService { |
| 147 | 147 | userAccount = wallet.getId().toString(); |
| 148 | 148 | } |
| 149 | 149 | // 1.2 构建请求 |
| 150 | + Integer transferPrice = withdraw.getPrice() - withdraw.getFeePrice(); // 计算实际转账金额(提现金额 - 手续费) | |
| 150 | 151 | PayTransferCreateReqDTO transferReqDTO = new PayTransferCreateReqDTO() |
| 151 | 152 | .setAppKey(tradeOrderProperties.getPayAppKey()).setChannelCode(channelCode) |
| 152 | - .setMerchantTransferId(withdraw.getId().toString()).setSubject("佣金提现").setPrice(withdraw.getPrice()) | |
| 153 | + .setMerchantTransferId(withdraw.getId().toString()).setSubject("佣金提现").setPrice(transferPrice) | |
| 153 | 154 | .setUserAccount(userAccount).setUserName(userName).setUserIp(getClientIP()) |
| 154 | 155 | .setUserId(withdraw.getUserId()).setUserType(UserTypeEnum.MEMBER.getValue()) // 用户信息 |
| 155 | 156 | .setChannelExtras(channelExtras); |
| ... | ... | @@ -280,9 +281,10 @@ public class BrokerageWithdrawServiceImpl implements BrokerageWithdrawService { |
| 280 | 281 | throw exception(BROKERAGE_WITHDRAW_UPDATE_STATUS_FAIL_PAY_TRANSFER_STATUS_NOT_SUCCESS_OR_CLOSED); |
| 281 | 282 | } |
| 282 | 283 | // 2.2 校验转账金额一致 |
| 283 | - if (ObjectUtil.notEqual(payTransfer.getPrice(), withdraw.getPrice())) { | |
| 284 | - log.error("[validateBrokerageTransferStatusCanUpdate][withdraw({}) payTransfer({}) 转账金额不匹配,请进行处理!withdraw 数据是:{},payTransfer 数据是:{}]", | |
| 285 | - withdraw.getId(), payTransferId, JsonUtils.toJsonString(withdraw), JsonUtils.toJsonString(payTransfer)); | |
| 284 | + Integer expectedTransferPrice = withdraw.getPrice() - withdraw.getFeePrice(); // 转账金额 = 提现金额 - 手续费 | |
| 285 | + if (ObjectUtil.notEqual(payTransfer.getPrice(), expectedTransferPrice)) { | |
| 286 | + log.error("[validateBrokerageTransferStatusCanUpdate][withdraw({}) payTransfer({}) 转账金额不匹配,请进行处理!withdraw 数据是:{},payTransfer 数据是:{},期望转账金额:{}]", | |
| 287 | + withdraw.getId(), payTransferId, JsonUtils.toJsonString(withdraw), JsonUtils.toJsonString(payTransfer), expectedTransferPrice); | |
| 286 | 288 | throw exception(BROKERAGE_WITHDRAW_UPDATE_STATUS_FAIL_PAY_PRICE_NOT_MATCH); |
| 287 | 289 | } |
| 288 | 290 | // 2.3 校验转账订单匹配 | ... | ... |
yudao-module-mp/src/main/java/cn/iocoder/yudao/module/mp/controller/admin/message/MpMessageTemplateController.http
0 → 100644
| 1 | +### 请求 /mp/message-template/get 接口 => 成功 | |
| 2 | +GET {{baseUrl}}/mp/message-template/get?id=1 | |
| 3 | +Content-Type: application/json | |
| 4 | +Authorization: Bearer {{token}} | |
| 5 | +tenant-id: {{adminTenantId}} | |
| 6 | + | |
| 7 | +### 请求 /mp/message-template/list 接口 => 成功 | |
| 8 | +GET {{baseUrl}}/mp/message-template/list?accountId=1 | |
| 9 | +Content-Type: application/json | |
| 10 | +Authorization: Bearer {{token}} | |
| 11 | +tenant-id: {{adminTenantId}} | |
| 12 | + | |
| 13 | +### 请求 /mp/message-template/delete 接口 => 成功 | |
| 14 | +DELETE {{baseUrl}}/mp/message-template/delete?id=1 | |
| 15 | +Content-Type: application/json | |
| 16 | +Authorization: Bearer {{token}} | |
| 17 | +tenant-id: {{adminTenantId}} | |
| 18 | + | |
| 19 | +### 请求 /mp/message-template/sync 接口 => 成功 | |
| 20 | +POST {{baseUrl}}/mp/message-template/sync?accountId=5 | |
| 21 | +Content-Type: application/json | |
| 22 | +Authorization: Bearer {{token}} | |
| 23 | +tenant-id: {{adminTenantId}} | |
| 24 | + | |
| 25 | +### 请求 /mp/message-template/send 接口 => 成功 | |
| 26 | +POST {{baseUrl}}/mp/message-template/send | |
| 27 | +Content-Type: application/json | |
| 28 | +Authorization: Bearer {{token}} | |
| 29 | +tenant-id: {{adminTenantId}} | |
| 30 | + | |
| 31 | +{ | |
| 32 | + "id": 66, | |
| 33 | + "userId": 65, | |
| 34 | + "url": "https://example.com", | |
| 35 | + "data": { | |
| 36 | + "result": "领奖成功", | |
| 37 | + "withdrawMoney": "1000.00元", | |
| 38 | + "withdrawTime": "2024-01-01 10:00:00", | |
| 39 | + "cardInfo": "工商银行(尾号1234)", | |
| 40 | + "arrivedTime": "2024-01-01 10:30:00" | |
| 41 | + } | |
| 42 | +} | |
| 43 | + | |
| 44 | +// "miniprogram": "{\"appid\":\"wx1234567890\",\"pagepath\":\"pages/index/index\"}", | ... | ... |
yudao-module-mp/src/main/java/cn/iocoder/yudao/module/mp/controller/admin/message/MpMessageTemplateController.java
0 → 100644
| 1 | +package cn.iocoder.yudao.module.mp.controller.admin.message; | |
| 2 | + | |
| 3 | +import cn.iocoder.yudao.framework.common.pojo.CommonResult; | |
| 4 | +import cn.iocoder.yudao.framework.common.util.object.BeanUtils; | |
| 5 | +import cn.iocoder.yudao.module.mp.controller.admin.message.vo.template.MpMessageTemplateListReqVO; | |
| 6 | +import cn.iocoder.yudao.module.mp.controller.admin.message.vo.template.MpMessageTemplateRespVO; | |
| 7 | +import cn.iocoder.yudao.module.mp.controller.admin.message.vo.template.MpMessageTemplateSendReqVO; | |
| 8 | +import cn.iocoder.yudao.module.mp.dal.dataobject.message.MpMessageTemplateDO; | |
| 9 | +import cn.iocoder.yudao.module.mp.service.message.MpMessageTemplateService; | |
| 10 | +import io.swagger.v3.oas.annotations.Operation; | |
| 11 | +import io.swagger.v3.oas.annotations.Parameter; | |
| 12 | +import io.swagger.v3.oas.annotations.tags.Tag; | |
| 13 | +import jakarta.annotation.Resource; | |
| 14 | +import jakarta.validation.Valid; | |
| 15 | +import org.springframework.security.access.prepost.PreAuthorize; | |
| 16 | +import org.springframework.validation.annotation.Validated; | |
| 17 | +import org.springframework.web.bind.annotation.*; | |
| 18 | + | |
| 19 | +import java.util.List; | |
| 20 | + | |
| 21 | +import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success; | |
| 22 | + | |
| 23 | +@Tag(name = "管理后台 - 公众号模版消息") | |
| 24 | +@RestController | |
| 25 | +@RequestMapping("/mp/message-template") | |
| 26 | +@Validated | |
| 27 | +public class MpMessageTemplateController { | |
| 28 | + | |
| 29 | + @Resource | |
| 30 | + private MpMessageTemplateService messageTemplateService; | |
| 31 | + | |
| 32 | + @DeleteMapping("/delete") | |
| 33 | + @Operation(summary = "删除模版消息") | |
| 34 | + @Parameter(name = "id", description = "编号", required = true) | |
| 35 | + @PreAuthorize("@ss.hasPermission('mp:message-template:delete')") | |
| 36 | + public CommonResult<Boolean> deleteMessageTemplate(@RequestParam("id") Long id) { | |
| 37 | + messageTemplateService.deleteMessageTemplate(id); | |
| 38 | + return success(true); | |
| 39 | + } | |
| 40 | + | |
| 41 | + @GetMapping("/get") | |
| 42 | + @Operation(summary = "获得模版消息") | |
| 43 | + @Parameter(name = "id", description = "编号", required = true, example = "1024") | |
| 44 | + @PreAuthorize("@ss.hasPermission('mp:message-template:query')") | |
| 45 | + public CommonResult<MpMessageTemplateRespVO> getMessageTemplate(@RequestParam("id") Long id) { | |
| 46 | + MpMessageTemplateDO msgTemplate = messageTemplateService.getMessageTemplate(id); | |
| 47 | + return success(BeanUtils.toBean(msgTemplate, MpMessageTemplateRespVO.class)); | |
| 48 | + } | |
| 49 | + | |
| 50 | + @GetMapping("/list") | |
| 51 | + @Operation(summary = "获得模版消息列表") | |
| 52 | + @Parameter(name = "accountId", description = "公众号账号的编号", required = true, example = "2048") | |
| 53 | + @PreAuthorize("@ss.hasPermission('mp:message-template:query')") | |
| 54 | + public CommonResult<List<MpMessageTemplateRespVO>> getMessageTemplateList(MpMessageTemplateListReqVO listReqVO) { | |
| 55 | + List<MpMessageTemplateDO> list = messageTemplateService.getMessageTemplateList(listReqVO); | |
| 56 | + return success(BeanUtils.toBean(list, MpMessageTemplateRespVO.class)); | |
| 57 | + } | |
| 58 | + | |
| 59 | + @PostMapping("/sync") | |
| 60 | + @Operation(summary = "同步公众号模板") | |
| 61 | + @Parameter(name = "accountId", description = "公众号账号的编号", required = true, example = "2048") | |
| 62 | + @PreAuthorize("@ss.hasPermission('mp:message-template:sync')") | |
| 63 | + public CommonResult<Boolean> syncMessageTemplate(@RequestParam("accountId") Long accountId) { | |
| 64 | + messageTemplateService.syncMessageTemplate(accountId); | |
| 65 | + return success(true); | |
| 66 | + } | |
| 67 | + | |
| 68 | + @PostMapping("/send") | |
| 69 | + @Operation(summary = "给粉丝发送模版消息") | |
| 70 | + @PreAuthorize("@ss.hasPermission('mp:message-template:send')") | |
| 71 | + public CommonResult<Boolean> sendMessageTemplate(@Valid @RequestBody MpMessageTemplateSendReqVO sendReqVO) { | |
| 72 | + messageTemplateService.sendMessageTempalte(sendReqVO); | |
| 73 | + return success(true); | |
| 74 | + } | |
| 75 | + | |
| 76 | +} | |
| 0 | 77 | \ No newline at end of file | ... | ... |
yudao-module-mp/src/main/java/cn/iocoder/yudao/module/mp/controller/admin/message/vo/template/MpMessageTemplateListReqVO.java
0 → 100644
| 1 | +package cn.iocoder.yudao.module.mp.controller.admin.message.vo.template; | |
| 2 | + | |
| 3 | +import io.swagger.v3.oas.annotations.media.Schema; | |
| 4 | +import jakarta.validation.constraints.NotNull; | |
| 5 | +import lombok.Data; | |
| 6 | + | |
| 7 | +@Schema(description = "管理后台 - 公众号模版消息列表 Request VO") | |
| 8 | +@Data | |
| 9 | +public class MpMessageTemplateListReqVO { | |
| 10 | + | |
| 11 | + @Schema(description = "公众号账号的编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "2048") | |
| 12 | + @NotNull(message = "公众号账号的编号不能为空") | |
| 13 | + private Long accountId; | |
| 14 | + | |
| 15 | +} | ... | ... |
yudao-module-mp/src/main/java/cn/iocoder/yudao/module/mp/controller/admin/message/vo/template/MpMessageTemplateRespVO.java
0 → 100644
| 1 | +package cn.iocoder.yudao.module.mp.controller.admin.message.vo.template; | |
| 2 | + | |
| 3 | +import io.swagger.v3.oas.annotations.media.Schema; | |
| 4 | +import lombok.Data; | |
| 5 | + | |
| 6 | +import java.time.LocalDateTime; | |
| 7 | + | |
| 8 | +@Schema(description = "管理后台 - 公众号模版消息 Response VO") | |
| 9 | +@Data | |
| 10 | +public class MpMessageTemplateRespVO { | |
| 11 | + | |
| 12 | + @Schema(description = "模版主键", requiredMode = Schema.RequiredMode.REQUIRED, example = "7019") | |
| 13 | + private Long id; | |
| 14 | + | |
| 15 | + @Schema(description = "公众号账号的编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "1024") | |
| 16 | + private Long accountId; | |
| 17 | + | |
| 18 | + @Schema(description = "appId", requiredMode = Schema.RequiredMode.REQUIRED, example = "wx1234567890abcdef") | |
| 19 | + private String appId; | |
| 20 | + | |
| 21 | + @Schema(description = "公众号模板ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "IjkGxO9M_mC9pE5Yl7QYJk1h0Dj2N4lC3oOp6rRsT8u") | |
| 22 | + private String templateId; | |
| 23 | + | |
| 24 | + @Schema(description = "标题", requiredMode = Schema.RequiredMode.REQUIRED, example = "订单状态提醒") | |
| 25 | + private String title; | |
| 26 | + | |
| 27 | + @Schema(description = "模板内容", requiredMode = Schema.RequiredMode.REQUIRED) | |
| 28 | + private String content; | |
| 29 | + | |
| 30 | + @Schema(description = "模板示例") | |
| 31 | + private String example; | |
| 32 | + | |
| 33 | + @Schema(description = "模板所属行业的一级行业", example = "电商") | |
| 34 | + private String primaryIndustry; | |
| 35 | + | |
| 36 | + @Schema(description = "模板所属行业的二级行业", example = "商品售后") | |
| 37 | + private String deputyIndustry; | |
| 38 | + | |
| 39 | + @Schema(description = "创建时间", requiredMode = Schema.RequiredMode.REQUIRED) | |
| 40 | + private LocalDateTime createTime; | |
| 41 | + | |
| 42 | +} | |
| 0 | 43 | \ No newline at end of file | ... | ... |
yudao-module-mp/src/main/java/cn/iocoder/yudao/module/mp/controller/admin/message/vo/template/MpMessageTemplateSendReqVO.java
0 → 100644
| 1 | +package cn.iocoder.yudao.module.mp.controller.admin.message.vo.template; | |
| 2 | + | |
| 3 | +import io.swagger.v3.oas.annotations.media.Schema; | |
| 4 | +import jakarta.validation.constraints.NotNull; | |
| 5 | +import lombok.Data; | |
| 6 | + | |
| 7 | +import java.util.Map; | |
| 8 | + | |
| 9 | +@Schema(description = "管理后台 - 公众号消息模版发送 Request VO") // 关联 https://developers.weixin.qq.com/doc/service/api/notify/template/api_sendtemplatemessage.html 文档 | |
| 10 | +@Data | |
| 11 | +public class MpMessageTemplateSendReqVO { | |
| 12 | + | |
| 13 | + @Schema(description = "模版主键", requiredMode = Schema.RequiredMode.REQUIRED, example = "7019") | |
| 14 | + @NotNull(message = "模版主键不能为空") | |
| 15 | + private Long id; | |
| 16 | + | |
| 17 | + @Schema(description = "公众号粉丝的编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "1024") | |
| 18 | + @NotNull(message = "公众号粉丝的编号不能为空") | |
| 19 | + private Long userId; | |
| 20 | + | |
| 21 | + @Schema(description = "模板跳转链接") | |
| 22 | + private String url; | |
| 23 | + | |
| 24 | + @Schema(description = "跳转小程序时填写") | |
| 25 | + private String miniprogram; | |
| 26 | + | |
| 27 | + @Schema(description = "模板内容") | |
| 28 | + private Map<String, String> data; | |
| 29 | + | |
| 30 | +} | |
| 0 | 31 | \ No newline at end of file | ... | ... |
yudao-module-mp/src/main/java/cn/iocoder/yudao/module/mp/dal/dataobject/message/MpMessageTemplateDO.java
0 → 100644
| 1 | +package cn.iocoder.yudao.module.mp.dal.dataobject.message; | |
| 2 | + | |
| 3 | +import cn.iocoder.yudao.framework.mybatis.core.dataobject.BaseDO; | |
| 4 | +import cn.iocoder.yudao.module.mp.dal.dataobject.account.MpAccountDO; | |
| 5 | +import com.baomidou.mybatisplus.annotation.KeySequence; | |
| 6 | +import com.baomidou.mybatisplus.annotation.TableId; | |
| 7 | +import com.baomidou.mybatisplus.annotation.TableName; | |
| 8 | +import lombok.*; | |
| 9 | + | |
| 10 | +/** | |
| 11 | + * 公众号模版消息 DO | |
| 12 | + * | |
| 13 | + * @author dengsl | |
| 14 | + */ | |
| 15 | +@TableName("mp_message_template") | |
| 16 | +@KeySequence("mp_message_template_seq") // 用于 Oracle、PostgreSQL、Kingbase、DB2、H2 数据库的主键自增。如果是 MySQL 等数据库,可不写。 | |
| 17 | +@Data | |
| 18 | +@EqualsAndHashCode(callSuper = true) | |
| 19 | +@ToString(callSuper = true) | |
| 20 | +@Builder | |
| 21 | +@NoArgsConstructor | |
| 22 | +@AllArgsConstructor | |
| 23 | +public class MpMessageTemplateDO extends BaseDO { | |
| 24 | + | |
| 25 | + /** | |
| 26 | + * 主键 | |
| 27 | + */ | |
| 28 | + @TableId | |
| 29 | + private Long id; | |
| 30 | + /** | |
| 31 | + * 公众号账号的编号 | |
| 32 | + * | |
| 33 | + * 关联 {@link MpAccountDO#getId()} | |
| 34 | + */ | |
| 35 | + private Long accountId; | |
| 36 | + /** | |
| 37 | + * 公众号 appId | |
| 38 | + * | |
| 39 | + * 冗余 {@link MpAccountDO#getAppId()} | |
| 40 | + */ | |
| 41 | + private String appId; | |
| 42 | + /** | |
| 43 | + * 公众号模板 ID | |
| 44 | + */ | |
| 45 | + private String templateId; | |
| 46 | + | |
| 47 | + /** | |
| 48 | + * 标题 | |
| 49 | + */ | |
| 50 | + private String title; | |
| 51 | + /** | |
| 52 | + * 模板内容 | |
| 53 | + */ | |
| 54 | + private String content; | |
| 55 | + /** | |
| 56 | + * 模板示例 | |
| 57 | + */ | |
| 58 | + private String example; | |
| 59 | + | |
| 60 | + /** | |
| 61 | + * 模板所属行业的一级行业 | |
| 62 | + */ | |
| 63 | + private String primaryIndustry; | |
| 64 | + /** | |
| 65 | + * 模板所属行业的二级行业 | |
| 66 | + */ | |
| 67 | + private String deputyIndustry; | |
| 68 | + | |
| 69 | +} | |
| 0 | 70 | \ No newline at end of file | ... | ... |
yudao-module-mp/src/main/java/cn/iocoder/yudao/module/mp/dal/mysql/message/MpMessageTemplateMapper.java
0 → 100644
| 1 | +package cn.iocoder.yudao.module.mp.dal.mysql.message; | |
| 2 | + | |
| 3 | +import cn.iocoder.yudao.framework.mybatis.core.mapper.BaseMapperX; | |
| 4 | +import cn.iocoder.yudao.module.mp.controller.admin.message.vo.template.MpMessageTemplateListReqVO; | |
| 5 | +import cn.iocoder.yudao.module.mp.dal.dataobject.message.MpMessageTemplateDO; | |
| 6 | +import org.apache.ibatis.annotations.Mapper; | |
| 7 | + | |
| 8 | +import java.util.List; | |
| 9 | + | |
| 10 | +@Mapper | |
| 11 | +public interface MpMessageTemplateMapper extends BaseMapperX<MpMessageTemplateDO> { | |
| 12 | + | |
| 13 | + default List<MpMessageTemplateDO> selectList(MpMessageTemplateListReqVO listReqVO) { | |
| 14 | + return selectList(MpMessageTemplateDO::getAccountId, listReqVO.getAccountId()); | |
| 15 | + } | |
| 16 | + | |
| 17 | +} | |
| 0 | 18 | \ No newline at end of file | ... | ... |
yudao-module-mp/src/main/java/cn/iocoder/yudao/module/mp/enums/ErrorCodeConstants.java
| ... | ... | @@ -61,4 +61,10 @@ public interface ErrorCodeConstants { |
| 61 | 61 | ErrorCode AUTO_REPLY_ADD_MESSAGE_FAIL_EXISTS = new ErrorCode(1_006_009_002, "操作失败,原因:已存在该消息类型的回复"); |
| 62 | 62 | ErrorCode AUTO_REPLY_ADD_KEYWORD_FAIL_EXISTS = new ErrorCode(1_006_009_003, "操作失败,原因:已关在该关键字的回复"); |
| 63 | 63 | |
| 64 | + // ========== 公众号模版消息 1-006-010-000 ============ | |
| 65 | + ErrorCode MESSAGE_TEMPLATE_NOT_EXISTS = new ErrorCode(1_006_010_000, "模版消息不存在"); | |
| 66 | + ErrorCode MESSAGE_TEMPLATE_DELETE_FAIL = new ErrorCode(1_006_010_002, "删除模版消息失败,原因:{}"); | |
| 67 | + ErrorCode MESSAGE_TEMPLATE_SYNC_FAIL = new ErrorCode(1_006_010_003, "同步模版消息失败,原因:{}"); | |
| 68 | + ErrorCode MESSAGE_TEMPLATE_SEND_FAIL = new ErrorCode(1_006_010_004, "发送模版消息失败,原因:{}"); | |
| 69 | + | |
| 64 | 70 | } | ... | ... |
yudao-module-mp/src/main/java/cn/iocoder/yudao/module/mp/service/message/MpMessageTemplateService.java
0 → 100644
| 1 | +package cn.iocoder.yudao.module.mp.service.message; | |
| 2 | + | |
| 3 | +import cn.iocoder.yudao.module.mp.controller.admin.message.vo.template.MpMessageTemplateListReqVO; | |
| 4 | +import cn.iocoder.yudao.module.mp.controller.admin.message.vo.template.MpMessageTemplateSendReqVO; | |
| 5 | +import cn.iocoder.yudao.module.mp.dal.dataobject.message.MpMessageTemplateDO; | |
| 6 | + | |
| 7 | +import java.util.List; | |
| 8 | + | |
| 9 | +/** | |
| 10 | + * 公众号模版消息 Service 接口 | |
| 11 | + * | |
| 12 | + * @author dengsl | |
| 13 | + */ | |
| 14 | +public interface MpMessageTemplateService { | |
| 15 | + | |
| 16 | + /** | |
| 17 | + * 删除模版消息 | |
| 18 | + * | |
| 19 | + * @param id 编号 | |
| 20 | + */ | |
| 21 | + void deleteMessageTemplate(Long id); | |
| 22 | + | |
| 23 | + /** | |
| 24 | + * 获得模版消息 | |
| 25 | + * | |
| 26 | + * @param id 编号 | |
| 27 | + * @return 模版消息 | |
| 28 | + */ | |
| 29 | + MpMessageTemplateDO getMessageTemplate(Long id); | |
| 30 | + | |
| 31 | + /** | |
| 32 | + * 获得模版消息列表 | |
| 33 | + * | |
| 34 | + * @param listReqVO 查询条件 | |
| 35 | + * @return 模版消息列表 | |
| 36 | + */ | |
| 37 | + List<MpMessageTemplateDO> getMessageTemplateList(MpMessageTemplateListReqVO listReqVO); | |
| 38 | + | |
| 39 | + /** | |
| 40 | + * 同步公众号已添加的模版消息 | |
| 41 | + * | |
| 42 | + * @param accountId 公众号账号的编号 | |
| 43 | + */ | |
| 44 | + void syncMessageTemplate(Long accountId); | |
| 45 | + | |
| 46 | + /** | |
| 47 | + * 使用公众号,给粉丝发送【模版】消息 | |
| 48 | + * | |
| 49 | + * @param sendReqVO 消息内容 | |
| 50 | + */ | |
| 51 | + void sendMessageTempalte(MpMessageTemplateSendReqVO sendReqVO); | |
| 52 | + | |
| 53 | +} | |
| 0 | 54 | \ No newline at end of file | ... | ... |
yudao-module-mp/src/main/java/cn/iocoder/yudao/module/mp/service/message/MpMessageTemplateServiceImpl.java
0 → 100644
| 1 | +package cn.iocoder.yudao.module.mp.service.message; | |
| 2 | + | |
| 3 | +import cn.hutool.core.collection.CollUtil; | |
| 4 | +import cn.hutool.core.util.StrUtil; | |
| 5 | +import cn.iocoder.yudao.framework.common.util.json.JsonUtils; | |
| 6 | +import cn.iocoder.yudao.framework.mybatis.core.query.LambdaQueryWrapperX; | |
| 7 | +import cn.iocoder.yudao.module.mp.controller.admin.message.vo.template.MpMessageTemplateListReqVO; | |
| 8 | +import cn.iocoder.yudao.module.mp.controller.admin.message.vo.template.MpMessageTemplateSendReqVO; | |
| 9 | +import cn.iocoder.yudao.module.mp.dal.dataobject.account.MpAccountDO; | |
| 10 | +import cn.iocoder.yudao.module.mp.dal.dataobject.message.MpMessageTemplateDO; | |
| 11 | +import cn.iocoder.yudao.module.mp.dal.dataobject.user.MpUserDO; | |
| 12 | +import cn.iocoder.yudao.module.mp.dal.mysql.message.MpMessageTemplateMapper; | |
| 13 | +import cn.iocoder.yudao.module.mp.framework.mp.core.MpServiceFactory; | |
| 14 | +import cn.iocoder.yudao.module.mp.service.account.MpAccountService; | |
| 15 | +import cn.iocoder.yudao.module.mp.service.user.MpUserService; | |
| 16 | +import jakarta.annotation.Resource; | |
| 17 | +import lombok.extern.slf4j.Slf4j; | |
| 18 | +import me.chanjar.weixin.common.error.WxErrorException; | |
| 19 | +import me.chanjar.weixin.mp.bean.template.WxMpTemplate; | |
| 20 | +import me.chanjar.weixin.mp.bean.template.WxMpTemplateData; | |
| 21 | +import me.chanjar.weixin.mp.bean.template.WxMpTemplateMessage; | |
| 22 | +import org.springframework.context.annotation.Lazy; | |
| 23 | +import org.springframework.stereotype.Service; | |
| 24 | +import org.springframework.transaction.annotation.Transactional; | |
| 25 | +import org.springframework.validation.annotation.Validated; | |
| 26 | + | |
| 27 | +import java.util.ArrayList; | |
| 28 | +import java.util.List; | |
| 29 | +import java.util.Map; | |
| 30 | + | |
| 31 | +import static cn.iocoder.yudao.framework.common.exception.util.ServiceExceptionUtil.exception; | |
| 32 | +import static cn.iocoder.yudao.framework.common.util.collection.CollectionUtils.convertList; | |
| 33 | +import static cn.iocoder.yudao.framework.common.util.collection.CollectionUtils.convertMap; | |
| 34 | +import static cn.iocoder.yudao.module.mp.enums.ErrorCodeConstants.*; | |
| 35 | + | |
| 36 | +/** | |
| 37 | + * 公众号模版消息 Service 实现类 | |
| 38 | + * | |
| 39 | + * @author dengsl | |
| 40 | + */ | |
| 41 | +@Service | |
| 42 | +@Validated | |
| 43 | +@Slf4j | |
| 44 | +public class MpMessageTemplateServiceImpl implements MpMessageTemplateService { | |
| 45 | + | |
| 46 | + @Resource | |
| 47 | + @Lazy // 延迟加载,为了解决延迟加载 | |
| 48 | + private MpServiceFactory mpServiceFactory; | |
| 49 | + | |
| 50 | + @Resource | |
| 51 | + private MpMessageTemplateMapper messageTemplateMapper; | |
| 52 | + | |
| 53 | + @Resource | |
| 54 | + private MpAccountService mpAccountService; | |
| 55 | + | |
| 56 | + @Resource | |
| 57 | + private MpUserService mpUserService; | |
| 58 | + | |
| 59 | + @Override | |
| 60 | + public void deleteMessageTemplate(Long id) { | |
| 61 | + // 校验存在 | |
| 62 | + MpMessageTemplateDO template = validateMsgTemplateExists(id); | |
| 63 | + | |
| 64 | + // 第一步,删除模板到公众号平台 | |
| 65 | + try { | |
| 66 | + mpServiceFactory.getRequiredMpService(template.getAppId()) | |
| 67 | + .getTemplateMsgService().delPrivateTemplate(template.getTemplateId()); | |
| 68 | + } catch (WxErrorException e) { | |
| 69 | + throw exception(MESSAGE_TEMPLATE_DELETE_FAIL, e.getError().getErrorMsg()); | |
| 70 | + } | |
| 71 | + | |
| 72 | + // 第二步,删除模板到数据库 | |
| 73 | + messageTemplateMapper.deleteById(id); | |
| 74 | + } | |
| 75 | + | |
| 76 | + private MpMessageTemplateDO validateMsgTemplateExists(Long id) { | |
| 77 | + MpMessageTemplateDO template = messageTemplateMapper.selectById(id); | |
| 78 | + if (template == null) { | |
| 79 | + throw exception(MESSAGE_TEMPLATE_NOT_EXISTS); | |
| 80 | + } | |
| 81 | + return template; | |
| 82 | + } | |
| 83 | + | |
| 84 | + @Override | |
| 85 | + public MpMessageTemplateDO getMessageTemplate(Long id) { | |
| 86 | + return messageTemplateMapper.selectById(id); | |
| 87 | + } | |
| 88 | + | |
| 89 | + @Override | |
| 90 | + public List<MpMessageTemplateDO> getMessageTemplateList(MpMessageTemplateListReqVO listReqVO) { | |
| 91 | + return messageTemplateMapper.selectList(listReqVO); | |
| 92 | + } | |
| 93 | + | |
| 94 | + @Override | |
| 95 | + @Transactional(rollbackFor = Exception.class) | |
| 96 | + public void syncMessageTemplate(Long accountId) { | |
| 97 | + MpAccountDO account = mpAccountService.getRequiredAccount(accountId); | |
| 98 | + | |
| 99 | + // 第一步,从公众号平台获取最新的模板列表 | |
| 100 | + List<WxMpTemplate> wxTemplates; | |
| 101 | + try { | |
| 102 | + wxTemplates = mpServiceFactory.getRequiredMpService(accountId) | |
| 103 | + .getTemplateMsgService().getAllPrivateTemplate(); | |
| 104 | + } catch (WxErrorException e) { | |
| 105 | + throw exception(MESSAGE_TEMPLATE_SYNC_FAIL, e.getError().getErrorMsg()); | |
| 106 | + } | |
| 107 | + | |
| 108 | + // 第二步,合并更新回自己的数据库 | |
| 109 | + Map<String, MpMessageTemplateDO> templateMap = convertMap( | |
| 110 | + messageTemplateMapper.selectList(new LambdaQueryWrapperX<MpMessageTemplateDO>() | |
| 111 | + .eq(MpMessageTemplateDO::getAppId, account.getAppId())), | |
| 112 | + MpMessageTemplateDO::getTemplateId); | |
| 113 | + wxTemplates.forEach(wxTemplate -> { | |
| 114 | + MpMessageTemplateDO template = templateMap.remove(wxTemplate.getTemplateId()); | |
| 115 | + // 情况一,不存在,新增 | |
| 116 | + if (template == null) { | |
| 117 | + template = new MpMessageTemplateDO().setAccountId(account.getId()).setAppId(account.getAppId()) | |
| 118 | + .setTemplateId(wxTemplate.getTemplateId()).setTitle(wxTemplate.getTitle()) | |
| 119 | + .setContent(wxTemplate.getContent()).setExample(wxTemplate.getExample()) | |
| 120 | + .setPrimaryIndustry(wxTemplate.getPrimaryIndustry()).setDeputyIndustry(wxTemplate.getDeputyIndustry()); | |
| 121 | + messageTemplateMapper.insert(template); | |
| 122 | + return; | |
| 123 | + } | |
| 124 | + // 情况二,存在,则更新 | |
| 125 | + messageTemplateMapper.updateById(new MpMessageTemplateDO().setId(template.getId()) | |
| 126 | + .setTitle(wxTemplate.getTitle()).setContent(wxTemplate.getContent()).setExample(wxTemplate.getExample()) | |
| 127 | + .setPrimaryIndustry(wxTemplate.getPrimaryIndustry()).setDeputyIndustry(wxTemplate.getDeputyIndustry())); | |
| 128 | + }); | |
| 129 | + // 情况三,部分模板已经不存在了,删除 | |
| 130 | + if (CollUtil.isNotEmpty(templateMap)) { | |
| 131 | + messageTemplateMapper.deleteByIds(convertList(templateMap.values(), MpMessageTemplateDO::getId)); | |
| 132 | + } | |
| 133 | + } | |
| 134 | + | |
| 135 | + @Override | |
| 136 | + public void sendMessageTempalte(MpMessageTemplateSendReqVO sendReqVO) { | |
| 137 | + // 获得关联信息 | |
| 138 | + MpUserDO user = mpUserService.getRequiredUser(sendReqVO.getUserId()); | |
| 139 | + MpMessageTemplateDO template = validateMsgTemplateExists(sendReqVO.getId()); | |
| 140 | + | |
| 141 | + // 发送模版消息 | |
| 142 | + WxMpTemplateMessage templateMessage = buildTemplateMessage(template, user, sendReqVO); | |
| 143 | + try { | |
| 144 | + mpServiceFactory.getRequiredMpService(template.getAppId()) | |
| 145 | + .getTemplateMsgService().sendTemplateMsg(templateMessage); | |
| 146 | + } catch (WxErrorException e) { | |
| 147 | + throw exception(MESSAGE_TEMPLATE_SEND_FAIL, e.getError().getErrorMsg()); | |
| 148 | + } | |
| 149 | + | |
| 150 | + // 不用记录 MpMessageDO 记录,因为,微信会主动推送,可见文档 https://developers.weixin.qq.com/doc/service/guide/product/template_message/Template_Message_Interface.html | |
| 151 | + } | |
| 152 | + | |
| 153 | + private WxMpTemplateMessage buildTemplateMessage(MpMessageTemplateDO msgTemplateDO, MpUserDO user, | |
| 154 | + MpMessageTemplateSendReqVO sendReqVO) { | |
| 155 | + List<WxMpTemplateData> data = new ArrayList<>(); | |
| 156 | + WxMpTemplateMessage.WxMpTemplateMessageBuilder builder = WxMpTemplateMessage.builder() | |
| 157 | + .templateId(msgTemplateDO.getTemplateId()) | |
| 158 | + .data(data) | |
| 159 | + .toUser(user.getOpenid()); | |
| 160 | + // 设置跳转链接 | |
| 161 | + if (StrUtil.isNotBlank(sendReqVO.getUrl())) { | |
| 162 | + builder.url(sendReqVO.getUrl()); | |
| 163 | + } | |
| 164 | + // 设置小程序跳转 | |
| 165 | + if (StrUtil.isNotBlank(sendReqVO.getMiniprogram())) { | |
| 166 | + // https://developers.weixin.qq.com/doc/service/api/notify/template/api_sendtemplatemessage.html#Body__miniprogram | |
| 167 | + builder.miniProgram(JsonUtils.parseObject(sendReqVO.getMiniprogram(), WxMpTemplateMessage.MiniProgram.class)); | |
| 168 | + } | |
| 169 | + // 设置模板数据 | |
| 170 | + if (sendReqVO.getData() != null) { | |
| 171 | + sendReqVO.getData().forEach((key, value) -> data.add(new WxMpTemplateData(key, value))); | |
| 172 | + } | |
| 173 | + return builder.build(); | |
| 174 | + } | |
| 175 | + | |
| 176 | +} | |
| 0 | 177 | \ No newline at end of file | ... | ... |
yudao-module-pay/src/main/java/cn/iocoder/yudao/module/pay/controller/app/order/AppPayOrderController.java
| 1 | 1 | package cn.iocoder.yudao.module.pay.controller.app.order; |
| 2 | 2 | |
| 3 | +import cn.hutool.core.text.CharSequenceUtil; | |
| 3 | 4 | import cn.hutool.core.util.ObjUtil; |
| 4 | 5 | import cn.iocoder.yudao.framework.common.pojo.CommonResult; |
| 5 | 6 | import cn.iocoder.yudao.framework.common.util.object.BeanUtils; |
| ... | ... | @@ -46,13 +47,21 @@ public class AppPayOrderController { |
| 46 | 47 | @GetMapping("/get") |
| 47 | 48 | @Operation(summary = "获得支付订单") |
| 48 | 49 | @Parameters({ |
| 49 | - @Parameter(name = "id", description = "编号", required = true, example = "1024"), | |
| 50 | + @Parameter(name = "id", description = "编号", example = "1024"), | |
| 51 | + @Parameter(name = "no", description = "支付订单号", example = "Pxxx"), | |
| 50 | 52 | @Parameter(name = "sync", description = "是否同步", example = "true") |
| 51 | 53 | }) |
| 52 | - public CommonResult<PayOrderRespVO> getOrder(@RequestParam("id") Long id, | |
| 54 | + public CommonResult<PayOrderRespVO> getOrder(@RequestParam(value = "id", required = false) Long id, | |
| 55 | + @RequestParam(value = "no", required = false) String no, | |
| 53 | 56 | @RequestParam(value = "sync", required = false) Boolean sync) { |
| 54 | - PayOrderDO order = payOrderService.getOrder(id); | |
| 55 | - if (order== null) { | |
| 57 | + PayOrderDO order = null; | |
| 58 | + if (CharSequenceUtil.isNotEmpty(no)) { | |
| 59 | + order = payOrderService.getOrder(no); | |
| 60 | + } | |
| 61 | + if (ObjUtil.isNull(order) && ObjUtil.isNotNull(id)) { | |
| 62 | + order = payOrderService.getOrder(id); | |
| 63 | + } | |
| 64 | + if (order == null) { | |
| 56 | 65 | return success(null); |
| 57 | 66 | } |
| 58 | 67 | // 重要:校验订单是否是当前用户,避免越权 |
| ... | ... | @@ -65,7 +74,7 @@ public class AppPayOrderController { |
| 65 | 74 | if (Boolean.TRUE.equals(sync) && PayOrderStatusEnum.isWaiting(order.getStatus())) { |
| 66 | 75 | payOrderService.syncOrderQuietly(order.getId()); |
| 67 | 76 | // 重新查询,因为同步后,可能会有变化 |
| 68 | - order = payOrderService.getOrder(id); | |
| 77 | + order = payOrderService.getOrder(order.getId()); | |
| 69 | 78 | } |
| 70 | 79 | return success(BeanUtils.toBean(order, PayOrderRespVO.class)); |
| 71 | 80 | } | ... | ... |
yudao-module-pay/src/main/java/cn/iocoder/yudao/module/pay/dal/mysql/order/PayOrderMapper.java
| ... | ... | @@ -48,6 +48,10 @@ public interface PayOrderMapper extends BaseMapperX<PayOrderDO> { |
| 48 | 48 | PayOrderDO::getMerchantOrderId, merchantOrderId); |
| 49 | 49 | } |
| 50 | 50 | |
| 51 | + default PayOrderDO selectByNo(String no) { | |
| 52 | + return selectOne(PayOrderDO::getNo, no); | |
| 53 | + } | |
| 54 | + | |
| 51 | 55 | default int updateByIdAndStatus(Long id, Integer status, PayOrderDO update) { |
| 52 | 56 | return update(update, new LambdaQueryWrapper<PayOrderDO>() |
| 53 | 57 | .eq(PayOrderDO::getId, id).eq(PayOrderDO::getStatus, status)); | ... | ... |
yudao-module-pay/src/main/java/cn/iocoder/yudao/module/pay/service/order/PayOrderService.java
| ... | ... | @@ -34,6 +34,14 @@ public interface PayOrderService { |
| 34 | 34 | /** |
| 35 | 35 | * 获得支付订单 |
| 36 | 36 | * |
| 37 | + * @param no 支付订单号 | |
| 38 | + * @return 支付订单 | |
| 39 | + */ | |
| 40 | + PayOrderDO getOrder(String no); | |
| 41 | + | |
| 42 | + /** | |
| 43 | + * 获得支付订单 | |
| 44 | + * | |
| 37 | 45 | * @param appId 应用编号 |
| 38 | 46 | * @param merchantOrderId 商户订单编号 |
| 39 | 47 | * @return 支付订单 | ... | ... |
yudao-module-pay/src/main/java/cn/iocoder/yudao/module/pay/service/order/PayOrderServiceImpl.java
| ... | ... | @@ -80,6 +80,11 @@ public class PayOrderServiceImpl implements PayOrderService { |
| 80 | 80 | } |
| 81 | 81 | |
| 82 | 82 | @Override |
| 83 | + public PayOrderDO getOrder(String no) { | |
| 84 | + return orderMapper.selectByNo(no); | |
| 85 | + } | |
| 86 | + | |
| 87 | + @Override | |
| 83 | 88 | public PayOrderDO getOrder(Long appId, String merchantOrderId) { |
| 84 | 89 | return orderMapper.selectByAppIdAndMerchantOrderId(appId, merchantOrderId); |
| 85 | 90 | } | ... | ... |
yudao-module-system/src/main/java/cn/iocoder/yudao/module/system/dal/mysql/oauth2/OAuth2AccessTokenMapper.java
| ... | ... | @@ -32,4 +32,9 @@ public interface OAuth2AccessTokenMapper extends BaseMapperX<OAuth2AccessTokenDO |
| 32 | 32 | .orderByDesc(OAuth2AccessTokenDO::getId)); |
| 33 | 33 | } |
| 34 | 34 | |
| 35 | + default List<OAuth2AccessTokenDO> selectListByUserIdAndUserType(Long userId, Integer userType) { | |
| 36 | + return selectList(OAuth2AccessTokenDO::getUserId, userId, | |
| 37 | + OAuth2AccessTokenDO::getUserType, userType); | |
| 38 | + } | |
| 39 | + | |
| 35 | 40 | } | ... | ... |
yudao-module-system/src/main/java/cn/iocoder/yudao/module/system/service/oauth2/OAuth2TokenService.java
| ... | ... | @@ -70,6 +70,17 @@ public interface OAuth2TokenService { |
| 70 | 70 | OAuth2AccessTokenDO removeAccessToken(String accessToken); |
| 71 | 71 | |
| 72 | 72 | /** |
| 73 | + * 移除访问令牌 | |
| 74 | + * 注意:该流程中,会移除相关的刷新令牌 | |
| 75 | + * | |
| 76 | + * 参考 DefaultTokenServices 的 revokeToken 方法 | |
| 77 | + * | |
| 78 | + * @param userId 用户编号 | |
| 79 | + * @param userType 用户类型 | |
| 80 | + */ | |
| 81 | + void removeAccessToken(Long userId, Integer userType); | |
| 82 | + | |
| 83 | + /** | |
| 73 | 84 | * 获得访问令牌分页 |
| 74 | 85 | * |
| 75 | 86 | * @param reqVO 请求 | ... | ... |
yudao-module-system/src/main/java/cn/iocoder/yudao/module/system/service/oauth2/OAuth2TokenServiceImpl.java
| ... | ... | @@ -154,6 +154,21 @@ public class OAuth2TokenServiceImpl implements OAuth2TokenService { |
| 154 | 154 | } |
| 155 | 155 | |
| 156 | 156 | @Override |
| 157 | + public void removeAccessToken(Long userId, Integer userType) { | |
| 158 | + List<OAuth2AccessTokenDO> accessTokens = oauth2AccessTokenMapper.selectListByUserIdAndUserType(userId, userType); | |
| 159 | + if (CollUtil.isEmpty(accessTokens)) { | |
| 160 | + return; | |
| 161 | + } | |
| 162 | + accessTokens.forEach(accessToken -> { | |
| 163 | + // 删除访问令牌 | |
| 164 | + oauth2AccessTokenMapper.deleteById(accessToken.getId()); | |
| 165 | + oauth2AccessTokenRedisDAO.delete(accessToken.getAccessToken()); | |
| 166 | + // 删除刷新令牌 | |
| 167 | + oauth2RefreshTokenMapper.deleteByRefreshToken(accessToken.getRefreshToken()); | |
| 168 | + }); | |
| 169 | + } | |
| 170 | + | |
| 171 | + @Override | |
| 157 | 172 | public PageResult<OAuth2AccessTokenDO> getAccessTokenPage(OAuth2AccessTokenPageReqVO reqVO) { |
| 158 | 173 | return oauth2AccessTokenMapper.selectPage(reqVO); |
| 159 | 174 | } | ... | ... |
yudao-module-system/src/main/java/cn/iocoder/yudao/module/system/service/social/SocialUserServiceImpl.java
| ... | ... | @@ -153,6 +153,7 @@ public class SocialUserServiceImpl implements SocialUserService { |
| 153 | 153 | if (socialUser.getId() == null) { |
| 154 | 154 | socialUserMapper.insert(socialUser); |
| 155 | 155 | } else { |
| 156 | + socialUser.clean(); // 避免 updateTime 不更新:https://gitee.com/yudaocode/yudao-boot-mini/issues/ID7FUL | |
| 156 | 157 | socialUserMapper.updateById(socialUser); |
| 157 | 158 | } |
| 158 | 159 | return socialUser; | ... | ... |
yudao-module-system/src/main/java/cn/iocoder/yudao/module/system/service/user/AdminUserServiceImpl.java
| ... | ... | @@ -5,6 +5,7 @@ import cn.hutool.core.collection.CollectionUtil; |
| 5 | 5 | import cn.hutool.core.util.ObjUtil; |
| 6 | 6 | import cn.hutool.core.util.StrUtil; |
| 7 | 7 | import cn.iocoder.yudao.framework.common.enums.CommonStatusEnum; |
| 8 | +import cn.iocoder.yudao.framework.common.enums.UserTypeEnum; | |
| 8 | 9 | import cn.iocoder.yudao.framework.common.exception.ServiceException; |
| 9 | 10 | import cn.iocoder.yudao.framework.common.pojo.PageResult; |
| 10 | 11 | import cn.iocoder.yudao.framework.common.util.collection.CollectionUtils; |
| ... | ... | @@ -26,6 +27,7 @@ import cn.iocoder.yudao.module.system.dal.mysql.dept.UserPostMapper; |
| 26 | 27 | import cn.iocoder.yudao.module.system.dal.mysql.user.AdminUserMapper; |
| 27 | 28 | import cn.iocoder.yudao.module.system.service.dept.DeptService; |
| 28 | 29 | import cn.iocoder.yudao.module.system.service.dept.PostService; |
| 30 | +import cn.iocoder.yudao.module.system.service.oauth2.OAuth2TokenService; | |
| 29 | 31 | import cn.iocoder.yudao.module.system.service.permission.PermissionService; |
| 30 | 32 | import cn.iocoder.yudao.module.system.service.tenant.TenantService; |
| 31 | 33 | import com.google.common.annotations.VisibleForTesting; |
| ... | ... | @@ -75,6 +77,9 @@ public class AdminUserServiceImpl implements AdminUserService { |
| 75 | 77 | @Resource |
| 76 | 78 | @Lazy // 延迟,避免循环依赖报错 |
| 77 | 79 | private TenantService tenantService; |
| 80 | + @Resource | |
| 81 | + @Lazy // 懒加载,避免循环依赖 | |
| 82 | + private OAuth2TokenService oauth2TokenService; | |
| 78 | 83 | |
| 79 | 84 | @Resource |
| 80 | 85 | private UserPostMapper userPostMapper; |
| ... | ... | @@ -227,6 +232,11 @@ public class AdminUserServiceImpl implements AdminUserService { |
| 227 | 232 | updateObj.setId(id); |
| 228 | 233 | updateObj.setStatus(status); |
| 229 | 234 | userMapper.updateById(updateObj); |
| 235 | + | |
| 236 | + // 如果是禁用用户,则删除其 Token 信息 | |
| 237 | + if (CommonStatusEnum.isDisable(status)) { | |
| 238 | + oauth2TokenService.removeAccessToken(id, UserTypeEnum.ADMIN.getValue()); | |
| 239 | + } | |
| 230 | 240 | } |
| 231 | 241 | |
| 232 | 242 | @Override |
| ... | ... | @@ -276,7 +286,9 @@ public class AdminUserServiceImpl implements AdminUserService { |
| 276 | 286 | // 如果有角色编号,查询角色对应的用户编号 |
| 277 | 287 | Set<Long> userIds = reqVO.getRoleId() != null ? |
| 278 | 288 | permissionService.getUserRoleIdListByRoleId(singleton(reqVO.getRoleId())) : null; |
| 279 | - | |
| 289 | + if (userIds != null && userIds.isEmpty()) { | |
| 290 | + return PageResult.empty(); | |
| 291 | + } | |
| 280 | 292 | // 分页查询 |
| 281 | 293 | return userMapper.selectPage(reqVO, getDeptCondition(reqVO.getDeptId()), userIds); |
| 282 | 294 | } | ... | ... |
yudao-module-system/src/test/java/cn/iocoder/yudao/module/system/service/user/AdminUserServiceImplTest.java
| ... | ... | @@ -25,6 +25,7 @@ import cn.iocoder.yudao.module.system.dal.mysql.user.AdminUserMapper; |
| 25 | 25 | import cn.iocoder.yudao.module.system.enums.common.SexEnum; |
| 26 | 26 | import cn.iocoder.yudao.module.system.service.dept.DeptService; |
| 27 | 27 | import cn.iocoder.yudao.module.system.service.dept.PostService; |
| 28 | +import cn.iocoder.yudao.module.system.service.oauth2.OAuth2TokenService; | |
| 28 | 29 | import cn.iocoder.yudao.module.system.service.permission.PermissionService; |
| 29 | 30 | import cn.iocoder.yudao.module.system.service.tenant.TenantService; |
| 30 | 31 | import jakarta.annotation.Resource; |
| ... | ... | @@ -82,6 +83,8 @@ public class AdminUserServiceImplTest extends BaseDbUnitTest { |
| 82 | 83 | private FileApi fileApi; |
| 83 | 84 | @MockitoBean |
| 84 | 85 | private ConfigApi configApi; |
| 86 | + @MockitoBean | |
| 87 | + private OAuth2TokenService oauth2TokenService; | |
| 85 | 88 | |
| 86 | 89 | @BeforeEach |
| 87 | 90 | public void before() { | ... | ... |
yudao-server/src/main/resources/application-local.yaml
| ... | ... | @@ -69,8 +69,8 @@ spring: |
| 69 | 69 | username: root |
| 70 | 70 | password: 123456 |
| 71 | 71 | # tdengine: # IoT 数据库(需要 IoT 物联网再开启噢!) |
| 72 | -# url: jdbc:TAOS-RS://127.0.0.1:6041/ruoyi_vue_pro | |
| 73 | -# driver-class-name: com.taosdata.jdbc.rs.RestfulDriver | |
| 72 | +# url: jdbc:TAOS-WS://127.0.0.1:6041/ruoyi_vue_pro | |
| 73 | +# driver-class-name: com.taosdata.jdbc.ws.WebSocketDriver | |
| 74 | 74 | # username: root |
| 75 | 75 | # password: taosdata |
| 76 | 76 | # druid: | ... | ... |
yudao-server/src/main/resources/application.yaml
| ... | ... | @@ -187,7 +187,7 @@ spring: |
| 187 | 187 | api-key: sk-47aa124781be4bfb95244cc62f6xxxx |
| 188 | 188 | minimax: # Minimax:https://www.minimaxi.com/ |
| 189 | 189 | api-key: xxxx |
| 190 | - moonshot: # 月之暗灭(KIMI) | |
| 190 | + moonshot: # 月之暗面(KIMI) | |
| 191 | 191 | api-key: sk-abc |
| 192 | 192 | deepseek: # DeepSeek |
| 193 | 193 | api-key: sk-e94db327cc7d457d99a8de8810fc6b12 |
| ... | ... | @@ -211,6 +211,8 @@ spring: |
| 211 | 211 | filesystem: |
| 212 | 212 | url: http://127.0.0.1:8089 |
| 213 | 213 | sse-endpoint: /sse |
| 214 | + annotation-scanner: | |
| 215 | + enabled: false # TODO @芋艿:有 bug https://github.com/spring-projects/spring-ai/issues/4917 需要官方修复 | |
| 214 | 216 | |
| 215 | 217 | yudao: |
| 216 | 218 | ai: | ... | ... |