From 0f27c0aa72a5910188dba352044fd9323205170b Mon Sep 17 00:00:00 2001 From: YunaiV Date: Sun, 28 Dec 2025 10:22:05 +0800 Subject: [PATCH] =?UTF-8?q?=E3=80=90=E5=90=8C=E6=AD=A5=E3=80=91BOOT=20?= =?UTF-8?q?=E5=92=8C=20CLOUD=20=E7=9A=84=E5=8A=9F=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- sql/postgresql/ruoyi-vue-pro.sql | 2592 ++++++++--------- .../TimestampLocalDateTimeSerializer.java | 57 +- .../admin/task/BpmTaskController.java | 2 +- .../BpmParallelMultiInstanceBehavior.java | 6 + .../BpmSequentialMultiInstanceBehavior.java | 10 +- .../candidate/BpmTaskCandidateInvoker.java | 1 + .../core/listener/BpmCopyTaskDelegate.java | 6 +- .../enums/codegen/CodegenFrontTypeEnum.java | 2 + .../controller/admin/file/FileController.java | 8 + .../service/codegen/CodegenServiceImpl.java | 11 +- .../service/codegen/inner/CodegenEngine.java | 34 +- .../infra/service/file/FileService.java | 1 + .../infra/service/file/FileServiceImpl.java | 5 + .../src/main/resources/codegen/sql/sql.vm | 161 +- .../components/search-form.vue.vm | 297 ++ .../views/detail/index.vue.vm | 151 + .../vue3_admin_uniapp/views/form/index.vue.vm | 253 ++ .../vue3_admin_uniapp/views/index.vue.vm | 211 ++ .../codegen/CodegenServiceImplTest.java | 15 +- .../codegen/inner/CodegenEngineVue2Test.java | 7 +- .../codegen/inner/CodegenEngineVue3Test.java | 7 +- .../mysql/coupon/CouponTemplateMapper.java | 2 +- .../service/coupon/CouponServiceImpl.java | 9 +- .../service/coupon/CouponTemplateService.java | 19 +- .../coupon/CouponTemplateServiceImpl.java | 13 +- .../admin/user/MemberUserController.java | 12 +- .../admin/logger/LoginLogController.java | 8 + .../admin/logger/OperateLogController.java | 1 + .../vo/operatelog/OperateLogRespVO.java | 7 + .../admin/sms/SmsLogController.java | 11 + .../system/convert/auth/AuthConvert.java | 8 +- .../sms/core/client/impl/AliyunSmsClient.java | 4 +- .../service/auth/AdminAuthServiceImpl.java | 5 +- .../service/logger/LoginLogService.java | 8 + .../service/logger/LoginLogServiceImpl.java | 5 + .../service/mail/MailTemplateServiceImpl.java | 99 +- .../oauth2/OAuth2TokenServiceImpl.java | 8 +- .../service/permission/MenuServiceImpl.java | 5 +- .../system/service/sms/SmsLogService.java | 8 + .../system/service/sms/SmsLogServiceImpl.java | 5 + .../mail/MailTemplateServiceImplTest.java | 171 +- 41 files changed, 2851 insertions(+), 1394 deletions(-) create mode 100644 yudao-module-infra/yudao-module-infra-server/src/main/resources/codegen/vue3_admin_uniapp/components/search-form.vue.vm create mode 100644 yudao-module-infra/yudao-module-infra-server/src/main/resources/codegen/vue3_admin_uniapp/views/detail/index.vue.vm create mode 100644 yudao-module-infra/yudao-module-infra-server/src/main/resources/codegen/vue3_admin_uniapp/views/form/index.vue.vm create mode 100644 yudao-module-infra/yudao-module-infra-server/src/main/resources/codegen/vue3_admin_uniapp/views/index.vue.vm diff --git a/sql/postgresql/ruoyi-vue-pro.sql b/sql/postgresql/ruoyi-vue-pro.sql index 5fe221ae4..017e9fb73 100644 --- a/sql/postgresql/ruoyi-vue-pro.sql +++ b/sql/postgresql/ruoyi-vue-pro.sql @@ -5,7 +5,7 @@ Target Server Type : PostgreSQL - Date: 2025-05-22 21:03:59 + Date: 2025-12-27 19:04:22 */ @@ -27,45 +27,39 @@ COMMENT ON TABLE dual IS '数据库连接的表'; INSERT INTO dual VALUES (1); -- @formatter:on -DROP SEQUENCE IF EXISTS infra_api_access_log_seq; -CREATE SEQUENCE infra_api_access_log_seq - START 1; - -- ---------------------------- -- Table structure for infra_api_access_log -- ---------------------------- DROP TABLE IF EXISTS infra_api_access_log; -CREATE TABLE infra_api_access_log -( - id int8 NOT NULL DEFAULT NEXTVAL('infra_api_access_log_seq'), - trace_id varchar(64) NOT NULL DEFAULT '', - user_id int8 NOT NULL DEFAULT 0, - user_type int2 NOT NULL DEFAULT 0, - application_name varchar(50) NOT NULL, - request_method varchar(16) NOT NULL DEFAULT '', - request_url varchar(255) NOT NULL DEFAULT '', - request_params text NULL, - response_body text NULL, - user_ip varchar(50) NOT NULL, - user_agent varchar(512) NOT NULL, - operate_module varchar(50) NULL DEFAULT NULL, - operate_name varchar(50) NULL DEFAULT NULL, - operate_type int2 NULL DEFAULT 0, - begin_time timestamp NOT NULL, - end_time timestamp NOT NULL, - duration int4 NOT NULL, - result_code int4 NOT NULL DEFAULT 0, - result_msg varchar(512) NULL DEFAULT '', - creator varchar(64) NULL DEFAULT '', - create_time timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, - updater varchar(64) NULL DEFAULT '', - update_time timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, - deleted int2 NOT NULL DEFAULT 0, - tenant_id int8 NOT NULL DEFAULT 0 +CREATE TABLE infra_api_access_log ( + id int8 NOT NULL, + trace_id varchar(64) NOT NULL DEFAULT '', + user_id int8 NOT NULL DEFAULT 0, + user_type int2 NOT NULL DEFAULT 0, + application_name varchar(50) NOT NULL, + request_method varchar(16) NOT NULL DEFAULT '', + request_url varchar(255) NOT NULL DEFAULT '', + request_params text NULL, + response_body text NULL, + user_ip varchar(50) NOT NULL, + user_agent varchar(512) NOT NULL, + operate_module varchar(50) NULL DEFAULT NULL, + operate_name varchar(50) NULL DEFAULT NULL, + operate_type int2 NULL DEFAULT 0, + begin_time timestamp NOT NULL, + end_time timestamp NOT NULL, + duration int4 NOT NULL, + result_code int4 NOT NULL DEFAULT 0, + result_msg varchar(512) NULL DEFAULT '', + creator varchar(64) NULL DEFAULT '', + create_time timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, + updater varchar(64) NULL DEFAULT '', + update_time timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, + deleted int2 NOT NULL DEFAULT 0, + tenant_id int8 NOT NULL DEFAULT 0 ); -ALTER TABLE infra_api_access_log - ADD CONSTRAINT pk_infra_api_access_log PRIMARY KEY (id); +ALTER TABLE infra_api_access_log ADD CONSTRAINT pk_infra_api_access_log PRIMARY KEY (id); CREATE INDEX idx_infra_api_access_log_01 ON infra_api_access_log (create_time); @@ -96,48 +90,46 @@ COMMENT ON COLUMN infra_api_access_log.deleted IS '是否删除'; COMMENT ON COLUMN infra_api_access_log.tenant_id IS '租户编号'; COMMENT ON TABLE infra_api_access_log IS 'API 访问日志表'; -DROP SEQUENCE IF EXISTS infra_api_error_log_seq; -CREATE SEQUENCE infra_api_error_log_seq +DROP SEQUENCE IF EXISTS infra_api_access_log_seq; +CREATE SEQUENCE infra_api_access_log_seq START 1; -- ---------------------------- -- Table structure for infra_api_error_log -- ---------------------------- DROP TABLE IF EXISTS infra_api_error_log; -CREATE TABLE infra_api_error_log -( - id int8 NOT NULL DEFAULT NEXTVAL('infra_api_error_log_seq'), - trace_id varchar(64) NOT NULL, - user_id int8 NOT NULL DEFAULT 0, - user_type int2 NOT NULL DEFAULT 0, - application_name varchar(50) NOT NULL, - request_method varchar(16) NOT NULL, - request_url varchar(255) NOT NULL, - request_params varchar(8000) NOT NULL, - user_ip varchar(50) NOT NULL, - user_agent varchar(512) NOT NULL, - exception_time timestamp NOT NULL, - exception_name varchar(128) NOT NULL DEFAULT '', - exception_message text NOT NULL, - exception_root_cause_message text NOT NULL, - exception_stack_trace text NOT NULL, - exception_class_name varchar(512) NOT NULL, - exception_file_name varchar(512) NOT NULL, - exception_method_name varchar(512) NOT NULL, - exception_line_number int4 NOT NULL, - process_status int2 NOT NULL, - process_time timestamp NULL DEFAULT NULL, - process_user_id int4 NULL DEFAULT 0, - creator varchar(64) NULL DEFAULT '', - create_time timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, - updater varchar(64) NULL DEFAULT '', - update_time timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, - deleted int2 NOT NULL DEFAULT 0, - tenant_id int8 NOT NULL DEFAULT 0 +CREATE TABLE infra_api_error_log ( + id int8 NOT NULL, + trace_id varchar(64) NOT NULL, + user_id int8 NOT NULL DEFAULT 0, + user_type int2 NOT NULL DEFAULT 0, + application_name varchar(50) NOT NULL, + request_method varchar(16) NOT NULL, + request_url varchar(255) NOT NULL, + request_params varchar(8000) NOT NULL, + user_ip varchar(50) NOT NULL, + user_agent varchar(512) NOT NULL, + exception_time timestamp NOT NULL, + exception_name varchar(128) NOT NULL DEFAULT '', + exception_message text NOT NULL, + exception_root_cause_message text NOT NULL, + exception_stack_trace text NOT NULL, + exception_class_name varchar(512) NOT NULL, + exception_file_name varchar(512) NOT NULL, + exception_method_name varchar(512) NOT NULL, + exception_line_number int4 NOT NULL, + process_status int2 NOT NULL, + process_time timestamp NULL DEFAULT NULL, + process_user_id int4 NULL DEFAULT 0, + creator varchar(64) NULL DEFAULT '', + create_time timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, + updater varchar(64) NULL DEFAULT '', + update_time timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, + deleted int2 NOT NULL DEFAULT 0, + tenant_id int8 NOT NULL DEFAULT 0 ); -ALTER TABLE infra_api_error_log - ADD CONSTRAINT pk_infra_api_error_log PRIMARY KEY (id); +ALTER TABLE infra_api_error_log ADD CONSTRAINT pk_infra_api_error_log PRIMARY KEY (id); COMMENT ON COLUMN infra_api_error_log.id IS '编号'; COMMENT ON COLUMN infra_api_error_log.trace_id IS '链路追踪编号'; @@ -169,43 +161,41 @@ COMMENT ON COLUMN infra_api_error_log.deleted IS '是否删除'; COMMENT ON COLUMN infra_api_error_log.tenant_id IS '租户编号'; COMMENT ON TABLE infra_api_error_log IS '系统异常日志'; -DROP SEQUENCE IF EXISTS infra_codegen_column_seq; -CREATE SEQUENCE infra_codegen_column_seq +DROP SEQUENCE IF EXISTS infra_api_error_log_seq; +CREATE SEQUENCE infra_api_error_log_seq START 1; -- ---------------------------- -- Table structure for infra_codegen_column -- ---------------------------- DROP TABLE IF EXISTS infra_codegen_column; -CREATE TABLE infra_codegen_column -( - id int8 NOT NULL default nextval('infra_codegen_column_seq'), - table_id int8 NOT NULL, - column_name varchar(200) NOT NULL, - data_type varchar(100) NOT NULL, - column_comment varchar(500) NOT NULL, - nullable bool NOT NULL, - primary_key bool NOT NULL, - ordinal_position int4 NOT NULL, - java_type varchar(32) NOT NULL, - java_field varchar(64) NOT NULL, - dict_type varchar(200) NULL DEFAULT '', - example varchar(64) NULL DEFAULT NULL, - create_operation bool NOT NULL, - update_operation bool NOT NULL, - list_operation bool NOT NULL, - list_operation_condition varchar(32) NOT NULL DEFAULT '=', - list_operation_result bool NOT NULL, - html_type varchar(32) NOT NULL, - creator varchar(64) NULL DEFAULT '', - create_time timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, - updater varchar(64) NULL DEFAULT '', - update_time timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, - deleted int2 NOT NULL DEFAULT 0 +CREATE TABLE infra_codegen_column ( + id int8 NOT NULL, + table_id int8 NOT NULL, + column_name varchar(200) NOT NULL, + data_type varchar(100) NOT NULL, + column_comment varchar(500) NOT NULL, + nullable bool NOT NULL, + primary_key bool NOT NULL, + ordinal_position int4 NOT NULL, + java_type varchar(32) NOT NULL, + java_field varchar(64) NOT NULL, + dict_type varchar(200) NULL DEFAULT '', + example varchar(64) NULL DEFAULT NULL, + create_operation bool NOT NULL, + update_operation bool NOT NULL, + list_operation bool NOT NULL, + list_operation_condition varchar(32) NOT NULL DEFAULT '=', + list_operation_result bool NOT NULL, + html_type varchar(32) NOT NULL, + creator varchar(64) NULL DEFAULT '', + create_time timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, + updater varchar(64) NULL DEFAULT '', + update_time timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, + deleted int2 NOT NULL DEFAULT 0 ); -ALTER TABLE infra_codegen_column - ADD CONSTRAINT pk_infra_codegen_column PRIMARY KEY (id); +ALTER TABLE infra_codegen_column ADD CONSTRAINT pk_infra_codegen_column PRIMARY KEY (id); COMMENT ON COLUMN infra_codegen_column.id IS '编号'; COMMENT ON COLUMN infra_codegen_column.table_id IS '表编号'; @@ -232,44 +222,42 @@ COMMENT ON COLUMN infra_codegen_column.update_time IS '更新时间'; COMMENT ON COLUMN infra_codegen_column.deleted IS '是否删除'; COMMENT ON TABLE infra_codegen_column IS '代码生成表字段定义'; -DROP SEQUENCE IF EXISTS infra_codegen_table_seq; -CREATE SEQUENCE infra_codegen_table_seq +DROP SEQUENCE IF EXISTS infra_codegen_column_seq; +CREATE SEQUENCE infra_codegen_column_seq START 1; -- ---------------------------- -- Table structure for infra_codegen_table -- ---------------------------- DROP TABLE IF EXISTS infra_codegen_table; -CREATE TABLE infra_codegen_table -( - id int8 NOT NULL default nextval('infra_codegen_table_seq'), - data_source_config_id int8 NOT NULL, - scene int2 NOT NULL DEFAULT 1, - table_name varchar(200) NOT NULL DEFAULT '', - table_comment varchar(500) NOT NULL DEFAULT '', - remark varchar(500) NULL DEFAULT NULL, - module_name varchar(30) NOT NULL, - business_name varchar(30) NOT NULL, - class_name varchar(100) NOT NULL DEFAULT '', - class_comment varchar(50) NOT NULL, - author varchar(50) NOT NULL, - template_type int2 NOT NULL DEFAULT 1, - front_type int2 NOT NULL, - parent_menu_id int8 NULL DEFAULT NULL, - master_table_id int8 NULL DEFAULT NULL, - sub_join_column_id int8 NULL DEFAULT NULL, - sub_join_many bool NULL DEFAULT NULL, - tree_parent_column_id int8 NULL DEFAULT NULL, - tree_name_column_id int8 NULL DEFAULT NULL, - creator varchar(64) NULL DEFAULT '', - create_time timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, - updater varchar(64) NULL DEFAULT '', - update_time timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, - deleted int2 NOT NULL DEFAULT 0 +CREATE TABLE infra_codegen_table ( + id int8 NOT NULL, + data_source_config_id int8 NOT NULL, + scene int2 NOT NULL DEFAULT 1, + table_name varchar(200) NOT NULL DEFAULT '', + table_comment varchar(500) NOT NULL DEFAULT '', + remark varchar(500) NULL DEFAULT NULL, + module_name varchar(30) NOT NULL, + business_name varchar(30) NOT NULL, + class_name varchar(100) NOT NULL DEFAULT '', + class_comment varchar(50) NOT NULL, + author varchar(50) NOT NULL, + template_type int2 NOT NULL DEFAULT 1, + front_type int2 NOT NULL, + parent_menu_id int8 NULL DEFAULT NULL, + master_table_id int8 NULL DEFAULT NULL, + sub_join_column_id int8 NULL DEFAULT NULL, + sub_join_many bool NULL DEFAULT NULL, + tree_parent_column_id int8 NULL DEFAULT NULL, + tree_name_column_id int8 NULL DEFAULT NULL, + creator varchar(64) NULL DEFAULT '', + create_time timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, + updater varchar(64) NULL DEFAULT '', + update_time timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, + deleted int2 NOT NULL DEFAULT 0 ); -ALTER TABLE infra_codegen_table - ADD CONSTRAINT pk_infra_codegen_table PRIMARY KEY (id); +ALTER TABLE infra_codegen_table ADD CONSTRAINT pk_infra_codegen_table PRIMARY KEY (id); COMMENT ON COLUMN infra_codegen_table.id IS '编号'; COMMENT ON COLUMN infra_codegen_table.data_source_config_id IS '数据源配置的编号'; @@ -297,34 +285,31 @@ COMMENT ON COLUMN infra_codegen_table.update_time IS '更新时间'; COMMENT ON COLUMN infra_codegen_table.deleted IS '是否删除'; COMMENT ON TABLE infra_codegen_table IS '代码生成表定义'; - -DROP SEQUENCE IF EXISTS infra_config_seq; -CREATE SEQUENCE infra_config_seq +DROP SEQUENCE IF EXISTS infra_codegen_table_seq; +CREATE SEQUENCE infra_codegen_table_seq START 1; -- ---------------------------- -- Table structure for infra_config -- ---------------------------- DROP TABLE IF EXISTS infra_config; -CREATE TABLE infra_config -( - id int8 NOT NULL default nextval('infra_config_seq'), - category varchar(50) NOT NULL, - type int2 NOT NULL, - name varchar(100) NOT NULL DEFAULT '', - config_key varchar(100) NOT NULL DEFAULT '', - value varchar(500) NOT NULL DEFAULT '', - visible bool NOT NULL, - remark varchar(500) NULL DEFAULT NULL, - creator varchar(64) NULL DEFAULT '', - create_time timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, - updater varchar(64) NULL DEFAULT '', - update_time timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, - deleted int2 NOT NULL DEFAULT 0 +CREATE TABLE infra_config ( + id int8 NOT NULL, + category varchar(50) NOT NULL, + type int2 NOT NULL, + name varchar(100) NOT NULL DEFAULT '', + config_key varchar(100) NOT NULL DEFAULT '', + value varchar(500) NOT NULL DEFAULT '', + visible bool NOT NULL, + remark varchar(500) NULL DEFAULT NULL, + creator varchar(64) NULL DEFAULT '', + create_time timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, + updater varchar(64) NULL DEFAULT '', + update_time timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, + deleted int2 NOT NULL DEFAULT 0 ); -ALTER TABLE infra_config - ADD CONSTRAINT pk_infra_config PRIMARY KEY (id); +ALTER TABLE infra_config ADD CONSTRAINT pk_infra_config PRIMARY KEY (id); COMMENT ON COLUMN infra_config.id IS '参数主键'; COMMENT ON COLUMN infra_config.category IS '参数分组'; @@ -357,30 +342,28 @@ INSERT INTO infra_config (id, category, type, name, config_key, value, visible, COMMIT; -- @formatter:on -DROP SEQUENCE IF EXISTS infra_data_source_config_seq; -CREATE SEQUENCE infra_data_source_config_seq - START 1; +DROP SEQUENCE IF EXISTS infra_config_seq; +CREATE SEQUENCE infra_config_seq + START 14; -- ---------------------------- -- Table structure for infra_data_source_config -- ---------------------------- DROP TABLE IF EXISTS infra_data_source_config; -CREATE TABLE infra_data_source_config -( - id int8 NOT NULL default nextval('infra_data_source_config_seq'), - name varchar(100) NOT NULL DEFAULT '', - url varchar(1024) NOT NULL, - username varchar(255) NOT NULL, - password varchar(255) NOT NULL DEFAULT '', - creator varchar(64) NULL DEFAULT '', - create_time timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, - updater varchar(64) NULL DEFAULT '', - update_time timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, - deleted int2 NOT NULL DEFAULT 0 +CREATE TABLE infra_data_source_config ( + id int8 NOT NULL, + name varchar(100) NOT NULL DEFAULT '', + url varchar(1024) NOT NULL, + username varchar(255) NOT NULL, + password varchar(255) NOT NULL DEFAULT '', + creator varchar(64) NULL DEFAULT '', + create_time timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, + updater varchar(64) NULL DEFAULT '', + update_time timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, + deleted int2 NOT NULL DEFAULT 0 ); -ALTER TABLE infra_data_source_config - ADD CONSTRAINT pk_infra_data_source_config PRIMARY KEY (id); +ALTER TABLE infra_data_source_config ADD CONSTRAINT pk_infra_data_source_config PRIMARY KEY (id); COMMENT ON COLUMN infra_data_source_config.id IS '主键编号'; COMMENT ON COLUMN infra_data_source_config.name IS '参数名称'; @@ -394,32 +377,30 @@ COMMENT ON COLUMN infra_data_source_config.update_time IS '更新时间'; COMMENT ON COLUMN infra_data_source_config.deleted IS '是否删除'; COMMENT ON TABLE infra_data_source_config IS '数据源配置表'; -DROP SEQUENCE IF EXISTS infra_file_seq; -CREATE SEQUENCE infra_file_seq +DROP SEQUENCE IF EXISTS infra_data_source_config_seq; +CREATE SEQUENCE infra_data_source_config_seq START 1; -- ---------------------------- -- Table structure for infra_file -- ---------------------------- DROP TABLE IF EXISTS infra_file; -CREATE TABLE infra_file -( - id int8 NOT NULL default nextval('infra_file_seq'), - config_id int8 NULL DEFAULT NULL, - name varchar(256) NULL DEFAULT NULL, - path varchar(512) NOT NULL, - url varchar(1024) NOT NULL, - type varchar(128) NULL DEFAULT NULL, - size int4 NOT NULL, - creator varchar(64) NULL DEFAULT '', - create_time timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, - updater varchar(64) NULL DEFAULT '', - update_time timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, - deleted int2 NOT NULL DEFAULT 0 +CREATE TABLE infra_file ( + id int8 NOT NULL, + config_id int8 NULL DEFAULT NULL, + name varchar(256) NULL DEFAULT NULL, + path varchar(512) NOT NULL, + url varchar(1024) NOT NULL, + type varchar(128) NULL DEFAULT NULL, + size int4 NOT NULL, + creator varchar(64) NULL DEFAULT '', + create_time timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, + updater varchar(64) NULL DEFAULT '', + update_time timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, + deleted int2 NOT NULL DEFAULT 0 ); -ALTER TABLE infra_file - ADD CONSTRAINT pk_infra_file PRIMARY KEY (id); +ALTER TABLE infra_file ADD CONSTRAINT pk_infra_file PRIMARY KEY (id); COMMENT ON COLUMN infra_file.id IS '文件编号'; COMMENT ON COLUMN infra_file.config_id IS '配置编号'; @@ -435,31 +416,29 @@ COMMENT ON COLUMN infra_file.update_time IS '更新时间'; COMMENT ON COLUMN infra_file.deleted IS '是否删除'; COMMENT ON TABLE infra_file IS '文件表'; -DROP SEQUENCE IF EXISTS infra_file_config_seq; -CREATE SEQUENCE infra_file_config_seq - START 31; +DROP SEQUENCE IF EXISTS infra_file_seq; +CREATE SEQUENCE infra_file_seq + START 1; -- ---------------------------- -- Table structure for infra_file_config -- ---------------------------- DROP TABLE IF EXISTS infra_file_config; -CREATE TABLE infra_file_config -( - id int8 NOT NULL default nextval('infra_file_config_seq'), - name varchar(63) NOT NULL, - storage int2 NOT NULL, - remark varchar(255) NULL DEFAULT NULL, - master bool NOT NULL, - config varchar(4096) NOT NULL, - creator varchar(64) NULL DEFAULT '', - create_time timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, - updater varchar(64) NULL DEFAULT '', - update_time timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, - deleted int2 NOT NULL DEFAULT 0 +CREATE TABLE infra_file_config ( + id int8 NOT NULL, + name varchar(63) NOT NULL, + storage int2 NOT NULL, + remark varchar(255) NULL DEFAULT NULL, + master bool NOT NULL, + config varchar(4096) NOT NULL, + creator varchar(64) NULL DEFAULT '', + create_time timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, + updater varchar(64) NULL DEFAULT '', + update_time timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, + deleted int2 NOT NULL DEFAULT 0 ); -ALTER TABLE infra_file_config - ADD CONSTRAINT pk_infra_file_config PRIMARY KEY (id); +ALTER TABLE infra_file_config ADD CONSTRAINT pk_infra_file_config PRIMARY KEY (id); COMMENT ON COLUMN infra_file_config.id IS '编号'; COMMENT ON COLUMN infra_file_config.name IS '配置名'; @@ -479,41 +458,41 @@ COMMENT ON TABLE infra_file_config IS '文件配置表'; -- ---------------------------- -- @formatter:off BEGIN; -INSERT INTO infra_file_config (id, name, storage, remark, master, config, creator, create_time, updater, update_time, deleted) VALUES (4, '数据库(示例)', 1, '我是数据库', '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-05-02 18:30:28', '0'); -INSERT INTO infra_file_config (id, name, storage, remark, master, config, creator, create_time, updater, update_time, deleted) VALUES (22, '七牛存储器(示例)', 20, '请换成你自己的密钥!!!', '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}', '1', '2024-01-13 22:11:12', '1', '2025-05-02 18:30:28', '0'); -INSERT INTO infra_file_config (id, name, storage, remark, master, config, creator, create_time, updater, update_time, deleted) VALUES (24, '腾讯云存储(示例)', 20, '请换成你的密钥!!!', '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"}', '1', '2024-11-09 16:03:22', '1', '2025-05-02 18:30:28', '0'); -INSERT INTO infra_file_config (id, name, storage, remark, master, config, creator, create_time, updater, update_time, deleted) VALUES (25, '阿里云存储(示例)', 20, '', '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}', '1', '2024-11-09 16:47:08', '1', '2025-05-02 18:30:28', '0'); -INSERT INTO infra_file_config (id, name, storage, remark, master, config, creator, create_time, updater, update_time, deleted) VALUES (26, '火山云存储(示例)', 20, '', '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}', '1', '2024-11-09 16:56:42', '1', '2025-05-02 18:30:28', '0'); -INSERT INTO infra_file_config (id, name, storage, remark, master, config, creator, create_time, updater, update_time, deleted) VALUES (27, '华为云存储(示例)', 20, '', '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-05-02 18:30:28', '0'); -INSERT INTO infra_file_config (id, name, storage, remark, master, config, creator, create_time, updater, update_time, deleted) VALUES (28, 'MinIO 存储(示例)', 20, '', '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}', '1', '2024-11-09 17:43:10', '1', '2025-05-02 18:30:28', '0'); -INSERT INTO infra_file_config (id, name, storage, remark, master, config, creator, create_time, updater, update_time, deleted) VALUES (29, '本地存储(示例)', 10, '仅适合 mac 或 windows', '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-05-02 18:30:28', '0'); -INSERT INTO infra_file_config (id, name, storage, remark, master, config, creator, create_time, updater, update_time, deleted) VALUES (30, 'SFTP 存储(示例)', 12, '', '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-05-02 18:30:28', '0'); +INSERT INTO infra_file_config (id, name, storage, remark, master, config, creator, create_time, updater, update_time, deleted) VALUES (4, '数据库(示例)', 1, '我是数据库', '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', '0'); +INSERT INTO infra_file_config (id, name, storage, remark, master, config, creator, create_time, updater, update_time, deleted) VALUES (22, '七牛存储器(示例)', 20, '请换成你自己的密钥!!!', '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', '0'); +INSERT INTO infra_file_config (id, name, storage, remark, master, config, creator, create_time, updater, update_time, deleted) VALUES (24, '腾讯云存储(示例)', 20, '请换成你的密钥!!!', '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', '0'); +INSERT INTO infra_file_config (id, name, storage, remark, master, config, creator, create_time, updater, update_time, deleted) VALUES (25, '阿里云存储(示例)', 20, '', '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', '0'); +INSERT INTO infra_file_config (id, name, storage, remark, master, config, creator, create_time, updater, update_time, deleted) VALUES (26, '火山云存储(示例)', 20, '', '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', '0'); +INSERT INTO infra_file_config (id, name, storage, remark, master, config, creator, create_time, updater, update_time, deleted) VALUES (27, '华为云存储(示例)', 20, '', '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', '0'); +INSERT INTO infra_file_config (id, name, storage, remark, master, config, creator, create_time, updater, update_time, deleted) VALUES (28, 'MinIO 存储(示例)', 20, '', '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', '0'); +INSERT INTO infra_file_config (id, name, storage, remark, master, config, creator, create_time, updater, update_time, deleted) VALUES (29, '本地存储(示例)', 10, 'mac/linux 使用 /,windows 使用 \\', '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', '0'); +INSERT INTO infra_file_config (id, name, storage, remark, master, config, creator, create_time, updater, update_time, deleted) VALUES (30, 'SFTP 存储(示例)', 12, '', '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', '0'); +INSERT INTO infra_file_config (id, name, storage, remark, master, config, creator, create_time, updater, update_time, deleted) VALUES (34, '七牛云存储【私有】(示例)', 20, '请换成你自己的密钥!!!', '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', '0'); +INSERT INTO infra_file_config (id, name, storage, remark, master, config, creator, create_time, updater, update_time, deleted) VALUES (35, '1', 20, '1', '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', '0'); COMMIT; -- @formatter:on -DROP SEQUENCE IF EXISTS infra_file_content_seq; -CREATE SEQUENCE infra_file_content_seq - START 1; +DROP SEQUENCE IF EXISTS infra_file_config_seq; +CREATE SEQUENCE infra_file_config_seq + START 36; -- ---------------------------- -- Table structure for infra_file_content -- ---------------------------- DROP TABLE IF EXISTS infra_file_content; -CREATE TABLE infra_file_content -( - id int8 NOT NULL default nextval('infra_file_content_seq'), - config_id int8 NOT NULL, - path varchar(512) NOT NULL, - content bytea NOT NULL, - creator varchar(64) NULL DEFAULT '', - create_time timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, - updater varchar(64) NULL DEFAULT '', - update_time timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, - deleted int2 NOT NULL DEFAULT 0 +CREATE TABLE infra_file_content ( + id int8 NOT NULL, + config_id int8 NOT NULL, + path varchar(512) NOT NULL, + content bytea NOT NULL, + creator varchar(64) NULL DEFAULT '', + create_time timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, + updater varchar(64) NULL DEFAULT '', + update_time timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, + deleted int2 NOT NULL DEFAULT 0 ); -ALTER TABLE infra_file_content - ADD CONSTRAINT pk_infra_file_content PRIMARY KEY (id); +ALTER TABLE infra_file_content ADD CONSTRAINT pk_infra_file_content PRIMARY KEY (id); COMMENT ON COLUMN infra_file_content.id IS '编号'; COMMENT ON COLUMN infra_file_content.config_id IS '配置编号'; @@ -526,34 +505,32 @@ COMMENT ON COLUMN infra_file_content.update_time IS '更新时间'; COMMENT ON COLUMN infra_file_content.deleted IS '是否删除'; COMMENT ON TABLE infra_file_content IS '文件表'; -DROP SEQUENCE IF EXISTS infra_job_seq; -CREATE SEQUENCE infra_job_seq +DROP SEQUENCE IF EXISTS infra_file_content_seq; +CREATE SEQUENCE infra_file_content_seq START 1; -- ---------------------------- -- Table structure for infra_job -- ---------------------------- DROP TABLE IF EXISTS infra_job; -CREATE TABLE infra_job -( - id int8 NOT NULL default nextval('infra_job_seq'), - name varchar(32) NOT NULL, - status int2 NOT NULL, - handler_name varchar(64) NOT NULL, - handler_param varchar(255) NULL DEFAULT NULL, - cron_expression varchar(32) NOT NULL, - retry_count int4 NOT NULL DEFAULT 0, - retry_interval int4 NOT NULL DEFAULT 0, - monitor_timeout int4 NOT NULL DEFAULT 0, - creator varchar(64) NULL DEFAULT '', - create_time timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, - updater varchar(64) NULL DEFAULT '', - update_time timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, - deleted int2 NOT NULL DEFAULT 0 +CREATE TABLE infra_job ( + id int8 NOT NULL, + name varchar(32) NOT NULL, + status int2 NOT NULL, + handler_name varchar(64) NOT NULL, + handler_param varchar(255) NULL DEFAULT NULL, + cron_expression varchar(32) NOT NULL, + retry_count int4 NOT NULL DEFAULT 0, + retry_interval int4 NOT NULL DEFAULT 0, + monitor_timeout int4 NOT NULL DEFAULT 0, + creator varchar(64) NULL DEFAULT '', + create_time timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, + updater varchar(64) NULL DEFAULT '', + update_time timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, + deleted int2 NOT NULL DEFAULT 0 ); -ALTER TABLE infra_job - ADD CONSTRAINT pk_infra_job PRIMARY KEY (id); +ALTER TABLE infra_job ADD CONSTRAINT pk_infra_job PRIMARY KEY (id); COMMENT ON COLUMN infra_job.id IS '任务编号'; COMMENT ON COLUMN infra_job.name IS '任务名称'; @@ -580,47 +557,50 @@ INSERT INTO infra_job (id, name, status, handler_name, handler_param, cron_expre 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', '0'); 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', '0'); 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', '0'); -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', '0'); -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', '0'); -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', '0'); -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', '0'); +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', '0'); +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', '0'); +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', '0'); +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', '0'); 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', '0'); 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', '0'); 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', '0'); 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 (33, 'demoJob', 2, 'demoJob', '', '0 * * * * ?', 1, 1, 0, '1', '2024-10-27 19:38:46', '1', '2025-05-10 18:13:54', '0'); 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', '0'); +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', '0'); +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', '0'); +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', '0'); +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', '0'); +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', '0'); COMMIT; -- @formatter:on -DROP SEQUENCE IF EXISTS infra_job_log_seq; -CREATE SEQUENCE infra_job_log_seq - START 1; +DROP SEQUENCE IF EXISTS infra_job_seq; +CREATE SEQUENCE infra_job_seq + START 41; -- ---------------------------- -- Table structure for infra_job_log -- ---------------------------- DROP TABLE IF EXISTS infra_job_log; -CREATE TABLE infra_job_log -( - id int8 NOT NULL default nextval('infra_job_log_seq'), - job_id int8 NOT NULL, - handler_name varchar(64) NOT NULL, - handler_param varchar(255) NULL DEFAULT NULL, - execute_index int2 NOT NULL DEFAULT 1, - begin_time timestamp NOT NULL, - end_time timestamp NULL DEFAULT NULL, - duration int4 NULL DEFAULT NULL, - status int2 NOT NULL, - result varchar(4000) NULL DEFAULT '', - creator varchar(64) NULL DEFAULT '', - create_time timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, - updater varchar(64) NULL DEFAULT '', - update_time timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, - deleted int2 NOT NULL DEFAULT 0 +CREATE TABLE infra_job_log ( + id int8 NOT NULL, + job_id int8 NOT NULL, + handler_name varchar(64) NOT NULL, + handler_param varchar(255) NULL DEFAULT NULL, + execute_index int2 NOT NULL DEFAULT 1, + begin_time timestamp NOT NULL, + end_time timestamp NULL DEFAULT NULL, + duration int4 NULL DEFAULT NULL, + status int2 NOT NULL, + result varchar(4000) NULL DEFAULT '', + creator varchar(64) NULL DEFAULT '', + create_time timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, + updater varchar(64) NULL DEFAULT '', + update_time timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, + deleted int2 NOT NULL DEFAULT 0 ); -ALTER TABLE infra_job_log - ADD CONSTRAINT pk_infra_job_log PRIMARY KEY (id); +ALTER TABLE infra_job_log ADD CONSTRAINT pk_infra_job_log PRIMARY KEY (id); COMMENT ON COLUMN infra_job_log.id IS '日志编号'; COMMENT ON COLUMN infra_job_log.job_id IS '任务编号'; @@ -639,34 +619,32 @@ COMMENT ON COLUMN infra_job_log.update_time IS '更新时间'; COMMENT ON COLUMN infra_job_log.deleted IS '是否删除'; COMMENT ON TABLE infra_job_log IS '定时任务日志表'; -DROP SEQUENCE IF EXISTS system_dept_seq; -CREATE SEQUENCE system_dept_seq +DROP SEQUENCE IF EXISTS infra_job_log_seq; +CREATE SEQUENCE infra_job_log_seq START 1; -- ---------------------------- -- Table structure for system_dept -- ---------------------------- DROP TABLE IF EXISTS system_dept; -CREATE TABLE system_dept -( - id int8 NOT NULL default nextval('system_dept_seq'), - name varchar(30) NOT NULL DEFAULT '', - parent_id int8 NOT NULL DEFAULT 0, - sort int4 NOT NULL DEFAULT 0, - leader_user_id int8 NULL DEFAULT NULL, - phone varchar(11) NULL DEFAULT NULL, - email varchar(50) NULL DEFAULT NULL, - status int2 NOT NULL, - creator varchar(64) NULL DEFAULT '', - create_time timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, - updater varchar(64) NULL DEFAULT '', - update_time timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, - deleted int2 NOT NULL DEFAULT 0, - tenant_id int8 NOT NULL DEFAULT 0 +CREATE TABLE system_dept ( + id int8 NOT NULL, + name varchar(30) NOT NULL DEFAULT '', + parent_id int8 NOT NULL DEFAULT 0, + sort int4 NOT NULL DEFAULT 0, + leader_user_id int8 NULL DEFAULT NULL, + phone varchar(11) NULL DEFAULT NULL, + email varchar(50) NULL DEFAULT NULL, + status int2 NOT NULL, + creator varchar(64) NULL DEFAULT '', + create_time timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, + updater varchar(64) NULL DEFAULT '', + update_time timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, + deleted int2 NOT NULL DEFAULT 0, + tenant_id int8 NOT NULL DEFAULT 0 ); -ALTER TABLE system_dept - ADD CONSTRAINT pk_system_dept PRIMARY KEY (id); +ALTER TABLE system_dept ADD CONSTRAINT pk_system_dept PRIMARY KEY (id); COMMENT ON COLUMN system_dept.id IS '部门id'; COMMENT ON COLUMN system_dept.name IS '部门名称'; @@ -706,34 +684,32 @@ INSERT INTO system_dept (id, name, parent_id, sort, leader_user_id, phone, email COMMIT; -- @formatter:on -DROP SEQUENCE IF EXISTS system_dict_data_seq; -CREATE SEQUENCE system_dict_data_seq - START 1; +DROP SEQUENCE IF EXISTS system_dept_seq; +CREATE SEQUENCE system_dept_seq + START 114; -- ---------------------------- -- Table structure for system_dict_data -- ---------------------------- DROP TABLE IF EXISTS system_dict_data; -CREATE TABLE system_dict_data -( - id int8 NOT NULL default nextval('system_dict_data_seq'), - sort int4 NOT NULL DEFAULT 0, - label varchar(100) NOT NULL DEFAULT '', - value varchar(100) NOT NULL DEFAULT '', - dict_type varchar(100) NOT NULL DEFAULT '', - status int2 NOT NULL DEFAULT 0, - color_type varchar(100) NULL DEFAULT '', - css_class varchar(100) NULL DEFAULT '', - remark varchar(500) NULL DEFAULT NULL, - creator varchar(64) NULL DEFAULT '', - create_time timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, - updater varchar(64) NULL DEFAULT '', - update_time timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, - deleted int2 NOT NULL DEFAULT 0 +CREATE TABLE system_dict_data ( + id int8 NOT NULL, + sort int4 NOT NULL DEFAULT 0, + label varchar(100) NOT NULL DEFAULT '', + value varchar(100) NOT NULL DEFAULT '', + dict_type varchar(100) NOT NULL DEFAULT '', + status int2 NOT NULL DEFAULT 0, + color_type varchar(100) NULL DEFAULT '', + css_class varchar(100) NULL DEFAULT '', + remark varchar(500) NULL DEFAULT NULL, + creator varchar(64) NULL DEFAULT '', + create_time timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, + updater varchar(64) NULL DEFAULT '', + update_time timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, + deleted int2 NOT NULL DEFAULT 0 ); -ALTER TABLE system_dict_data - ADD CONSTRAINT pk_system_dict_data PRIMARY KEY (id); +ALTER TABLE system_dict_data ADD CONSTRAINT pk_system_dict_data PRIMARY KEY (id); COMMENT ON COLUMN system_dict_data.id IS '字典编码'; COMMENT ON COLUMN system_dict_data.sort IS '字典排序'; @@ -941,7 +917,7 @@ INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_t 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 (1230, 13, '支付宝条码支付', 'alipay_bar', 'pay_channel_code', 0, 'primary', '', '支付宝条码支付', '1', '2023-02-18 23:32:24', '1', '2023-07-19 20:09:23', '0'); INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1231, 10, 'Vue2 Element UI 标准模版', '10', 'infra_codegen_front_type', 0, '', '', '', '1', '2023-04-13 00:03:55', '1', '2023-04-13 00:03:55', '0'); INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1232, 20, 'Vue3 Element Plus 标准模版', '20', 'infra_codegen_front_type', 0, '', '', '', '1', '2023-04-13 00:04:08', '1', '2023-04-13 00:04:08', '0'); -INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1234, 30, 'Vben2.0 Ant Design Schema 模版', '30', 'infra_codegen_front_type', 0, '', '', '', '1', '2023-04-13 00:04:26', '1', '2025-04-23 21:27:34', '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1234, 30, 'Vben2.0 Ant Design Schema 模版', '30', 'infra_codegen_front_type', 1, '', '', '', '1', '2023-04-13 00:04:26', '1', '2025-07-27 10:55:14', '0'); INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1244, 0, '按件', '1', 'trade_delivery_express_charge_mode', 0, '', '', '', '1', '2023-05-21 22:46:40', '1', '2023-05-21 22:46:40', '0'); INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1245, 1, '按重量', '2', 'trade_delivery_express_charge_mode', 0, '', '', '', '1', '2023-05-21 22:46:58', '1', '2023-05-21 22:46:58', '0'); INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (1246, 2, '按体积', '3', 'trade_delivery_express_charge_mode', 0, '', '', '', '1', '2023-05-21 22:47:18', '1', '2023-05-21 22:47:18', '0'); @@ -1182,37 +1158,22 @@ INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_t 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'); 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'); 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'); -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'); -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'); -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'); +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', '0'); INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (2002, 0, '直连设备', '0', 'iot_product_device_type', 0, 'default', '', '', '1', '2024-08-10 11:54:58', '1', '2025-03-17 09:28:22', '0'); INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (2003, 2, '网关设备', '2', 'iot_product_device_type', 0, 'default', '', '', '1', '2024-08-10 11:55:08', '1', '2025-03-17 09:28:28', '0'); INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (2004, 1, '网关子设备', '1', 'iot_product_device_type', 0, 'default', '', '', '1', '2024-08-10 11:55:20', '1', '2025-03-17 09:28:31', '0'); INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (2005, 1, '已发布', '1', 'iot_product_status', 0, 'success', '', '', '1', '2024-08-10 12:10:33', '1', '2025-03-17 09:28:34', '0'); INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (2006, 0, '开发中', '0', 'iot_product_status', 0, 'default', '', '', '1', '2024-08-10 14:19:18', '1', '2025-03-17 09:28:39', '0'); -INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (2007, 0, '弱校验', '0', 'iot_validate_type', 0, '', '', '', '1', '2024-09-06 20:05:48', '1', '2025-03-17 09:28:41', '0'); -INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (2008, 1, '免校验', '1', 'iot_validate_type', 0, '', '', '', '1', '2024-09-06 20:06:03', '1', '2025-03-17 09:28:44', '0'); INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (2009, 0, 'Wi-Fi', '0', 'iot_net_type', 0, '', '', '', '1', '2024-09-06 22:04:47', '1', '2025-03-17 09:28:47', '0'); -INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (2010, 1, '蜂窝(2G / 3G / 4G / 5G)', '1', 'iot_net_type', 0, '', '', '', '1', '2024-09-06 22:05:14', '1', '2025-03-17 09:28:49', '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (2010, 1, '移动网络', '1', 'iot_net_type', 0, '', '', '', '1', '2024-09-06 22:05:14', '1', '2025-06-12 23:27:19', '0'); INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (2011, 2, '以太网', '2', 'iot_net_type', 0, '', '', '', '1', '2024-09-06 22:05:35', '1', '2025-03-17 09:28:51', '0'); INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (2012, 3, '其他', '3', 'iot_net_type', 0, '', '', '', '1', '2024-09-06 22:05:52', '1', '2025-03-17 09:28:54', '0'); -INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (2013, 0, '自定义', '0', 'iot_protocol_type', 0, '', '', '', '1', '2024-09-06 22:26:10', '1', '2025-03-17 09:28:56', '0'); -INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (2014, 1, 'Modbus', '1', 'iot_protocol_type', 0, '', '', '', '1', '2024-09-06 22:26:21', '1', '2025-03-17 09:28:58', '0'); -INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (2015, 2, 'OPC UA', '2', 'iot_protocol_type', 0, '', '', '', '1', '2024-09-06 22:26:31', '1', '2025-03-17 09:29:00', '0'); -INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (2016, 3, 'ZigBee', '3', 'iot_protocol_type', 0, '', '', '', '1', '2024-09-06 22:26:39', '1', '2025-03-17 09:29:04', '0'); -INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (2017, 4, 'BLE', '4', 'iot_protocol_type', 0, '', '', '', '1', '2024-09-06 22:26:48', '1', '2025-03-17 09:29:06', '0'); INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (2018, 0, '未激活', '0', 'iot_device_state', 0, '', '', '', '1', '2024-09-21 08:13:34', '1', '2025-03-17 09:29:09', '0'); INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (2019, 1, '在线', '1', 'iot_device_state', 0, '', '', '', '1', '2024-09-21 08:13:48', '1', '2025-03-17 09:29:12', '0'); INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (2020, 2, '离线', '2', 'iot_device_state', 0, '', '', '', '1', '2024-09-21 08:13:59', '1', '2025-03-17 09:29:14', '0'); INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (2021, 1, '属性', '1', 'iot_thing_model_type', 0, '', '', '', '1', '2024-09-29 20:03:01', '1', '2025-03-17 09:29:24', '0'); INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (2022, 2, '服务', '2', 'iot_thing_model_type', 0, '', '', '', '1', '2024-09-29 20:03:11', '1', '2025-03-17 09:29:27', '0'); INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (2023, 3, '事件', '3', 'iot_thing_model_type', 0, '', '', '', '1', '2024-09-29 20:03:20', '1', '2025-03-17 09:29:29', '0'); -INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (2024, 1, 'JAR 部署', '0', 'iot_plugin_deploy_type', 0, '', '', '', '1', '2024-12-13 10:55:32', '1', '2025-03-17 09:29:32', '0'); -INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (2025, 2, '独立部署', '1', 'iot_plugin_deploy_type', 0, '', '', '', '1', '2024-12-13 10:55:43', '1', '2025-03-17 09:29:34', '0'); -INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (2026, 0, '停止', '0', 'iot_plugin_status', 0, 'danger', '', '', '1', '2024-12-13 11:07:37', '1', '2025-03-17 09:29:37', '0'); -INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (2027, 1, '运行', '1', 'iot_plugin_status', 0, '', '', '', '1', '2024-12-13 11:07:45', '1', '2025-03-17 09:34:17', '0'); -INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (2028, 0, '普通插件', '0', 'iot_plugin_type', 0, '', '', '', '1', '2024-12-13 11:08:32', '1', '2025-03-17 09:34:19', '0'); -INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (2029, 1, '设备插件', '1', 'iot_plugin_type', 0, '', '', '', '1', '2024-12-13 11:08:41', '1', '2025-03-17 09:34:22', '0'); INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (2030, 1, '升每分钟', 'L/min', 'iot_thing_model_unit', 0, '', '', '', '1', '2024-12-13 11:08:41', '1', '2025-03-17 09:34:24', '0'); INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (2031, 2, '毫克每千克', 'mg/kg', 'iot_thing_model_unit', 0, '', '', '', '1', '2024-12-13 11:08:41', '1', '2025-03-17 09:34:27', '0'); INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (2032, 3, '浊度', 'NTU', 'iot_thing_model_unit', 0, '', '', '', '1', '2024-12-13 11:08:41', '1', '2025-03-17 09:34:31', '0'); @@ -1345,48 +1306,90 @@ INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_t 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 (2160, 130, '分米', 'dm', 'iot_thing_model_unit', 0, '', '', '', '1', '2024-12-13 11:08:41', '1', '2025-03-17 09:40:46', '0'); INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (2161, 131, '千米', 'km', 'iot_thing_model_unit', 0, '', '', '', '1', '2024-12-13 11:08:41', '1', '2025-03-17 09:40:46', '0'); INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (2162, 132, '米', 'm', 'iot_thing_model_unit', 0, '', '', '', '1', '2024-12-13 11:08:41', '1', '2025-03-17 09:40:46', '0'); -INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (2163, 1, '输入', '1', 'iot_data_bridge_direction_enum', 0, 'primary', '', '', '1', '2025-03-09 12:38:24', '1', '2025-03-17 09:40:46', '0'); -INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (2164, 2, '输出', '2', 'iot_data_bridge_direction_enum', 0, 'primary', '', '', '1', '2025-03-09 12:38:36', '1', '2025-03-17 09:40:46', '0'); -INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (2165, 1, 'HTTP', '1', 'iot_data_bridge_type_enum', 0, 'primary', '', '', '1', '2025-03-09 12:39:54', '1', '2025-03-17 09:40:46', '0'); -INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (2166, 2, 'TCP', '2', 'iot_data_bridge_type_enum', 0, 'primary', '', '', '1', '2025-03-09 12:40:06', '1', '2025-03-17 09:40:46', '0'); -INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (2167, 3, 'WEBSOCKET', '3', 'iot_data_bridge_type_enum', 0, 'primary', '', '', '1', '2025-03-09 12:40:24', '1', '2025-03-17 09:40:46', '0'); -INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (2168, 10, 'MQTT', '10', 'iot_data_bridge_type_enum', 0, 'primary', '', '', '1', '2025-03-09 12:40:37', '1', '2025-03-17 09:40:46', '0'); -INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (2169, 20, 'DATABASE', '20', 'iot_data_bridge_type_enum', 0, 'primary', '', '', '1', '2025-03-09 12:41:05', '1', '2025-03-17 09:40:46', '0'); -INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (2170, 21, 'REDIS_STREAM', '21', 'iot_data_bridge_type_enum', 0, 'primary', '', '', '1', '2025-03-09 12:41:18', '1', '2025-03-17 09:40:46', '0'); -INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (2171, 30, 'ROCKETMQ', '30', 'iot_data_bridge_type_enum', 0, 'primary', '', '', '1', '2025-03-09 12:41:30', '1', '2025-03-17 09:40:46', '0'); -INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (2172, 31, 'RABBITMQ', '31', 'iot_data_bridge_type_enum', 0, 'primary', '', '', '1', '2025-03-09 12:41:47', '1', '2025-03-17 09:40:46', '0'); -INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (2173, 32, 'KAFKA', '32', 'iot_data_bridge_type_enum', 0, 'primary', '', '', '1', '2025-03-09 12:41:59', '1', '2025-03-17 09:40:46', '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (2165, 1, 'HTTP', '1', 'iot_data_sink_type_enum', 0, 'default', '', '', '1', '2025-03-09 12:39:54', '1', '2025-06-24 12:44:47', '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (2166, 2, 'TCP', '2', 'iot_data_sink_type_enum', 0, 'default', '', '', '1', '2025-03-09 12:40:06', '1', '2025-06-24 12:44:46', '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (2167, 3, 'WebSocket', '3', 'iot_data_sink_type_enum', 0, 'default', '', '', '1', '2025-03-09 12:40:24', '1', '2025-06-24 12:44:45', '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (2168, 10, 'MQTT', '10', 'iot_data_sink_type_enum', 0, 'default', '', '', '1', '2025-03-09 12:40:37', '1', '2025-06-24 12:44:44', '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (2169, 20, 'Database', '20', 'iot_data_sink_type_enum', 0, 'default', '', '', '1', '2025-03-09 12:41:05', '1', '2025-06-24 12:44:44', '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (2170, 21, 'Redis Stream', '21', 'iot_data_sink_type_enum', 0, 'default', '', '', '1', '2025-03-09 12:41:18', '1', '2025-06-24 12:44:43', '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (2171, 30, 'RocketMQ', '30', 'iot_data_sink_type_enum', 0, 'default', '', '', '1', '2025-03-09 12:41:30', '1', '2025-06-24 12:44:42', '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (2172, 31, 'RabbitMQ', '31', 'iot_data_sink_type_enum', 0, 'default', '', '', '1', '2025-03-09 12:41:47', '1', '2025-06-24 12:44:41', '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (2173, 32, 'Kafka', '32', 'iot_data_sink_type_enum', 0, 'default', '', '', '1', '2025-03-09 12:41:59', '1', '2025-06-24 12:44:39', '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (2174, 1, '设备上下线变更', '1', 'iot_rule_scene_trigger_type_enum', 0, 'primary', '', '', '1', '2025-03-20 15:00:01', '"1"', '2025-07-06 10:28:16', '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (2175, 2, '物模型属性上报', '2', 'iot_rule_scene_trigger_type_enum', 0, 'primary', '', '', '1', '2025-03-20 15:00:09', '"1"', '2025-07-06 10:28:22', '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (2176, 1, '设备状态', 'state', 'iot_device_message_type_enum', 0, 'primary', '', '', '1', '2025-03-20 15:24:58', '1', '2025-03-20 15:24:58', '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (2177, 2, '设备属性', 'property', 'iot_device_message_type_enum', 0, 'primary', '', '', '1', '2025-03-20 15:25:09', '1', '2025-03-20 15:25:09', '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (2178, 3, '设备事件', 'event', 'iot_device_message_type_enum', 0, 'primary', '', '', '1', '2025-03-20 15:25:23', '1', '2025-03-20 15:25:23', '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (2179, 4, '设备服务', 'service', 'iot_device_message_type_enum', 0, 'primary', '', '', '1', '2025-03-20 15:25:39', '1', '2025-03-20 15:25:39', '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (2180, 5, '设备配置', 'config', 'iot_device_message_type_enum', 0, 'primary', '', '', '1', '2025-03-20 15:25:51', '1', '2025-03-20 15:25:57', '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (2181, 6, '设备 OTA', 'ota', 'iot_device_message_type_enum', 0, 'primary', '', '', '1', '2025-03-20 15:26:17', '1', '2025-03-20 15:26:17', '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (2182, 7, '设备注册', 'register', 'iot_device_message_type_enum', 0, 'primary', '', '', '1', '2025-03-20 15:26:35', '1', '2025-03-20 15:26:35', '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (2183, 8, '设备拓扑', 'topology', 'iot_device_message_type_enum', 0, 'primary', '', '', '1', '2025-03-20 15:26:46', '1', '2025-03-20 15:26:46', '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (2184, 1, '设备属性设置', '1', 'iot_rule_scene_action_type_enum', 0, 'primary', '', '', '1', '2025-03-28 15:27:12', '"1"', '2025-07-06 10:37:33', '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (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', '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (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', '0'); INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (3000, 16, '百川智能', 'BaiChuan', 'ai_platform', 0, '', '', '', '1', '2025-03-23 12:15:46', '1', '2025-03-23 12:15:46', '0'); -INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (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', '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (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', '0'); INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (3002, 6, '支付宝余额', '6', 'brokerage_withdraw_type', 0, '', '', 'API 打款', '1', '2025-05-10 08:24:49', '1', '2025-05-10 08:24:49', '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (3003, 1, 'Alink', 'Alink', 'iot_codec_type', 0, '', '', '阿里云 Alink', '1', '2025-06-12 22:56:06', '1', '2025-06-12 23:22:24', '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (3004, 3, 'WARN', '3', 'iot_alert_level', 0, 'warning', '', '', '1', '2025-06-27 20:32:22', '1', '2025-06-27 20:34:31', '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (3005, 1, 'INFO', '1', 'iot_alert_level', 0, 'primary', '', '', '1', '2025-06-27 20:33:28', '1', '2025-06-27 20:34:35', '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (3006, 5, 'ERROR', '5', 'iot_alert_level', 0, 'danger', '', '', '1', '2025-06-27 20:33:50', '1', '2025-06-27 20:33:50', '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (3007, 1, '短信', '1', 'iot_alert_receive_type', 0, '', '', '', '1', '2025-06-27 22:49:30', '1', '2025-06-27 22:49:30', '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (3008, 2, '邮箱', '2', 'iot_alert_receive_type', 0, '', '', '', '1', '2025-06-27 22:49:39', '1', '2025-06-27 22:50:07', '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (3009, 3, '站内信', '3', 'iot_alert_receive_type', 0, '', '', '', '1', '2025-06-27 22:50:20', '1', '2025-06-27 22:50:20', '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (3010, 1, '全部设备', '1', 'iot_ota_task_device_scope', 0, '', '', '', '1', '2025-07-02 09:43:09', '1', '2025-07-02 09:43:09', '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (3011, 2, '指定设备', '2', 'iot_ota_task_device_scope', 0, '', '', '', '1', '2025-07-02 09:43:15', '1', '2025-07-02 09:43:15', '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (3012, 10, '进行中', '10', 'iot_ota_task_status', 0, 'primary', '', '', '1', '2025-07-02 09:44:01', '"1"', '2025-07-02 09:44:21', '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (3013, 20, '已结束', '20', 'iot_ota_task_status', 0, 'success', '', '', '1', '2025-07-02 09:44:14', '"1"', '2025-07-02 23:56:12', '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (3014, 30, '已取消', '30', 'iot_ota_task_status', 0, 'danger', '', '', '1', '2025-07-02 09:44:36', '1', '2025-07-02 09:44:36', '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (3015, 0, '待推送', '0', 'iot_ota_task_record_status', 0, '', '', '', '1', '2025-07-02 09:45:16', '1', '2025-07-02 09:45:16', '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (3016, 10, '已推送', '10', 'iot_ota_task_record_status', 0, '', '', '', '1', '2025-07-02 09:45:25', '1', '2025-07-02 09:45:25', '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (3017, 20, '升级中', '20', 'iot_ota_task_record_status', 0, 'primary', '', '', '1', '2025-07-02 09:45:37', '1', '2025-07-02 09:45:37', '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (3018, 30, '升级成功', '30', 'iot_ota_task_record_status', 0, 'success', '', '', '1', '2025-07-02 09:45:47', '1', '2025-07-02 09:45:47', '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (3019, 40, '升级失败', '40', 'iot_ota_task_record_status', 0, 'danger', '', '', '1', '2025-07-02 09:46:02', '1', '2025-07-02 09:46:02', '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (3020, 50, '升级取消', '50', 'iot_ota_task_record_status', 0, 'warning', '', '', '1', '2025-07-02 09:46:09', '"1"', '2025-07-02 09:46:27', '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (3021, 1, 'IP 定位', '1', 'iot_location_type', 0, '', '', '', '1', '2025-07-05 09:56:46', '1', '2025-07-05 09:56:46', '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (3022, 2, '设备上报', '2', 'iot_location_type', 0, '', '', '', '1', '2025-07-05 09:56:57', '1', '2025-07-05 09:56:57', '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (3023, 3, '手动定位', '3', 'iot_location_type', 0, '', '', '', '1', '2025-07-05 09:57:05', '1', '2025-07-05 09:57:05', '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (3024, 3, '设备事件上报', '3', 'iot_rule_scene_trigger_type_enum', 0, '', '', '', '1', '2025-07-06 10:28:29', '1', '2025-07-06 10:28:29', '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (3025, 4, '设备服务调用', '4', 'iot_rule_scene_trigger_type_enum', 0, '', '', '', '1', '2025-07-06 10:28:35', '1', '2025-07-06 10:28:35', '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (3026, 100, '定时触发', '100', 'iot_rule_scene_trigger_type_enum', 0, '', '', '', '1', '2025-07-06 10:28:48', '1', '2025-07-06 10:28:48', '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (3027, 101, '告警恢复', '101', 'iot_rule_scene_action_type_enum', 0, '', '', '', '1', '2025-07-06 10:37:57', '1', '2025-07-06 10:37:57', '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (3028, 2, 'Anthropic', 'Anthropic', 'ai_platform', 0, '', '', '', '1', '2025-08-21 22:54:24', '1', '2025-08-21 22:57:58', '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (3029, 2, '谷歌 Gemini', 'Gemini', 'ai_platform', 0, '', '', '', '1', '2025-08-22 22:39:35', '1', '2025-08-22 22:44:49', '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (3030, 1, '文件系统', 'filesystem', 'ai_mcp_client_name', 0, '', '', '', '1', '2025-08-28 13:58:43', '1', '2025-08-28 21:19:42', '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (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', '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (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', '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (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', '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (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', '0'); +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (3035, 40, '支付宝小程序', '40', 'system_social_type', 0, '', '', '', '1', '2023-11-04 13:05:38', '1', '2023-11-04 13:07:16', '0'); COMMIT; -- @formatter:on -DROP SEQUENCE IF EXISTS system_dict_type_seq; -CREATE SEQUENCE system_dict_type_seq - START 1; +DROP SEQUENCE IF EXISTS system_dict_data_seq; +CREATE SEQUENCE system_dict_data_seq + START 3036; -- ---------------------------- -- Table structure for system_dict_type -- ---------------------------- DROP TABLE IF EXISTS system_dict_type; -CREATE TABLE system_dict_type -( - id int8 NOT NULL default nextval('system_dict_type_seq'), - name varchar(100) NOT NULL DEFAULT '', - type varchar(100) NOT NULL DEFAULT '', - status int2 NOT NULL DEFAULT 0, - remark varchar(500) NULL DEFAULT NULL, - creator varchar(64) NULL DEFAULT '', - create_time timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, - updater varchar(64) NULL DEFAULT '', - update_time timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, - deleted int2 NOT NULL DEFAULT 0, - deleted_time timestamp NULL DEFAULT NULL +CREATE TABLE system_dict_type ( + id int8 NOT NULL, + name varchar(100) NOT NULL DEFAULT '', + type varchar(100) NOT NULL DEFAULT '', + status int2 NOT NULL DEFAULT 0, + remark varchar(500) NULL DEFAULT NULL, + creator varchar(64) NULL DEFAULT '', + create_time timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, + updater varchar(64) NULL DEFAULT '', + update_time timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, + deleted int2 NOT NULL DEFAULT 0, + deleted_time timestamp NULL DEFAULT NULL ); -ALTER TABLE system_dict_type - ADD CONSTRAINT pk_system_dict_type PRIMARY KEY (id); +ALTER TABLE system_dict_type ADD CONSTRAINT pk_system_dict_type PRIMARY KEY (id); COMMENT ON COLUMN system_dict_type.id IS '字典主键'; COMMENT ON COLUMN system_dict_type.name IS '字典名称'; @@ -1499,52 +1502,54 @@ INSERT INTO system_dict_type (id, name, type, status, remark, creator, create_ti INSERT INTO system_dict_type (id, name, type, status, remark, creator, create_time, updater, update_time, deleted, deleted_time) VALUES (628, 'AI 写作类型', 'ai_write_type', 0, '', '1', '2024-07-10 21:25:29', '1', '2024-07-10 21:25:29', '0', '1970-01-01 00:00:00'); INSERT INTO system_dict_type (id, name, type, status, remark, creator, create_time, updater, update_time, deleted, deleted_time) VALUES (629, 'BPM 流程模型类型', 'bpm_model_type', 0, '', '1', '2024-08-26 15:21:43', '1', '2024-08-26 15:21:43', '0', '1970-01-01 00:00:00'); INSERT INTO system_dict_type (id, name, type, status, remark, creator, create_time, updater, update_time, deleted, deleted_time) VALUES (640, 'AI 模型类型', 'ai_model_type', 0, '', '1', '2025-03-03 12:24:07', '1', '2025-03-03 12:24:07', '0', '1970-01-01 00:00:00'); -INSERT INTO system_dict_type (id, name, type, status, remark, creator, create_time, updater, update_time, deleted, deleted_time) VALUES (1000, 'IoT 数据格式', 'iot_data_format', 0, '', '1', '2024-08-10 11:52:58', '1', '2025-03-17 09:25:06', '0', '1970-01-01 00:00:00'); INSERT INTO system_dict_type (id, name, type, status, remark, creator, create_time, updater, update_time, deleted, deleted_time) VALUES (1001, 'IoT 产品设备类型', 'iot_product_device_type', 0, '', '1', '2024-08-10 11:54:30', '1', '2025-03-17 09:25:08', '0', '1970-01-01 00:00:00'); INSERT INTO system_dict_type (id, name, type, status, remark, creator, create_time, updater, update_time, deleted, deleted_time) VALUES (1002, 'IoT 产品状态', 'iot_product_status', 0, '', '1', '2024-08-10 12:06:09', '1', '2025-03-17 09:25:10', '0', '1970-01-01 00:00:00'); -INSERT INTO system_dict_type (id, name, type, status, remark, creator, create_time, updater, update_time, deleted, deleted_time) VALUES (1003, 'IoT 数据校验级别', 'iot_validate_type', 0, '', '1', '2024-09-06 20:05:13', '1', '2025-03-17 09:25:12', '0', '1970-01-01 00:00:00'); INSERT INTO system_dict_type (id, name, type, status, remark, creator, create_time, updater, update_time, deleted, deleted_time) VALUES (1004, 'IoT 联网方式', 'iot_net_type', 0, '', '1', '2024-09-06 22:04:13', '1', '2025-03-17 09:25:14', '0', '1970-01-01 00:00:00'); -INSERT INTO system_dict_type (id, name, type, status, remark, creator, create_time, updater, update_time, deleted, deleted_time) VALUES (1005, 'IoT 接入网关协议', 'iot_protocol_type', 0, '', '1', '2024-09-06 22:20:17', '1', '2025-03-17 09:25:16', '0', '1970-01-01 00:00:00'); INSERT INTO system_dict_type (id, name, type, status, remark, creator, create_time, updater, update_time, deleted, deleted_time) VALUES (1006, 'IoT 设备状态', 'iot_device_state', 0, '', '1', '2024-09-21 08:12:55', '1', '2025-03-17 09:25:19', '0', '1970-01-01 00:00:00'); INSERT INTO system_dict_type (id, name, type, status, remark, creator, create_time, updater, update_time, deleted, deleted_time) VALUES (1007, 'IoT 物模型功能类型', 'iot_thing_model_type', 0, '', '1', '2024-09-29 20:02:36', '1', '2025-03-17 09:25:24', '0', '1970-01-01 00:00:00'); -INSERT INTO system_dict_type (id, name, type, status, remark, creator, create_time, updater, update_time, deleted, deleted_time) VALUES (1008, 'IoT 插件部署方式', 'iot_plugin_deploy_type', 0, '', '1', '2024-12-13 10:55:13', '1', '2025-03-17 09:25:27', '0', '1970-01-01 00:00:00'); -INSERT INTO system_dict_type (id, name, type, status, remark, creator, create_time, updater, update_time, deleted, deleted_time) VALUES (1009, 'IoT 插件状态', 'iot_plugin_status', 0, '', '1', '2024-12-13 11:05:34', '1', '2025-03-17 09:25:30', '0', '1970-01-01 00:00:00'); -INSERT INTO system_dict_type (id, name, type, status, remark, creator, create_time, updater, update_time, deleted, deleted_time) VALUES (1010, 'IoT 插件类型', 'iot_plugin_type', 0, '', '1', '2024-12-13 11:08:19', '1', '2025-03-17 09:25:32', '0', '1970-01-01 00:00:00'); INSERT INTO system_dict_type (id, name, type, status, remark, creator, create_time, updater, update_time, deleted, deleted_time) VALUES (1011, 'IoT 物模型单位', 'iot_thing_model_unit', 0, '', '1', '2024-12-25 17:36:46', '1', '2025-03-17 09:25:35', '0', '1970-01-01 00:00:00'); -INSERT INTO system_dict_type (id, name, type, status, remark, creator, create_time, updater, update_time, deleted, deleted_time) VALUES (1012, 'IoT 数据桥接的方向枚举', 'iot_data_bridge_direction_enum', 0, '', '1', '2025-03-09 12:37:40', '1', '2025-03-17 09:25:39', '0', '1970-01-01 00:00:00'); -INSERT INTO system_dict_type (id, name, type, status, remark, creator, create_time, updater, update_time, deleted, deleted_time) VALUES (1013, 'IoT 数据桥梁的类型枚举', 'iot_data_bridge_type_enum', 0, '', '1', '2025-03-09 12:39:36', '1', '2025-04-06 17:09:46', '0', '1970-01-01 00:00:00'); +INSERT INTO system_dict_type (id, name, type, status, remark, creator, create_time, updater, update_time, deleted, deleted_time) VALUES (1013, 'IoT 数据流转目的的类型枚举', 'iot_data_sink_type_enum', 0, '', '1', '2025-03-09 12:39:36', '1', '2025-06-24 12:45:24', '0', '1970-01-01 00:00:00'); +INSERT INTO system_dict_type (id, name, type, status, remark, creator, create_time, updater, update_time, deleted, deleted_time) VALUES (1014, 'IoT 场景流转的触发类型枚举', 'iot_rule_scene_trigger_type_enum', 0, '', '1', '2025-03-20 14:59:44', '1', '2025-03-20 14:59:44', '0', '1970-01-01 00:00:00'); +INSERT INTO system_dict_type (id, name, type, status, remark, creator, create_time, updater, update_time, deleted, deleted_time) VALUES (1015, 'IoT 设备消息类型枚举', 'iot_device_message_type_enum', 0, '', '1', '2025-03-20 15:01:15', '1', '2025-03-20 15:01:15', '0', '1970-01-01 00:00:00'); +INSERT INTO system_dict_type (id, name, type, status, remark, creator, create_time, updater, update_time, deleted, deleted_time) VALUES (1016, 'IoT 规则场景的触发类型枚举', 'iot_rule_scene_action_type_enum', 0, '', '1', '2025-03-28 15:26:54', '1', '2025-03-28 15:29:13', '0', '1970-01-01 00:00:00'); +INSERT INTO system_dict_type (id, name, type, status, remark, creator, create_time, updater, update_time, deleted, deleted_time) VALUES (2000, 'IoT 数据格式', 'iot_codec_type', 0, 'IoT 编解码器类型', '1', '2025-06-12 22:55:46', '1', '2025-06-12 22:55:46', '0', '1970-01-01 00:00:00'); +INSERT INTO system_dict_type (id, name, type, status, remark, creator, create_time, updater, update_time, deleted, deleted_time) VALUES (2001, 'IoT 告警级别', 'iot_alert_level', 0, '', '1', '2025-06-27 20:30:57', '1', '2025-06-27 20:30:57', '0', '1970-01-01 00:00:00'); +INSERT INTO system_dict_type (id, name, type, status, remark, creator, create_time, updater, update_time, deleted, deleted_time) VALUES (2002, 'IoT 告警', 'iot_alert_receive_type', 0, '', '1', '2025-06-27 22:49:19', '1', '2025-06-27 22:49:19', '0', '1970-01-01 00:00:00'); +INSERT INTO system_dict_type (id, name, type, status, remark, creator, create_time, updater, update_time, deleted, deleted_time) VALUES (2003, 'IoT 固件设备范围', 'iot_ota_task_device_scope', 0, '', '1', '2025-07-02 09:42:49', '1', '2025-07-02 09:42:49', '0', '1970-01-01 00:00:00'); +INSERT INTO system_dict_type (id, name, type, status, remark, creator, create_time, updater, update_time, deleted, deleted_time) VALUES (2004, 'IoT 固件升级任务状态', 'iot_ota_task_status', 0, '', '1', '2025-07-02 09:43:43', '1', '2025-07-02 09:43:43', '0', '1970-01-01 00:00:00'); +INSERT INTO system_dict_type (id, name, type, status, remark, creator, create_time, updater, update_time, deleted, deleted_time) VALUES (2005, 'IoT 固件升级记录状态', 'iot_ota_task_record_status', 0, '', '1', '2025-07-02 09:45:02', '1', '2025-07-02 09:45:02', '0', '1970-01-01 00:00:00'); +INSERT INTO system_dict_type (id, name, type, status, remark, creator, create_time, updater, update_time, deleted, deleted_time) VALUES (2006, 'IoT 定位类型', 'iot_location_type', 0, '', '1', '2025-07-05 09:56:25', '1', '2025-07-05 09:56:25', '0', '1970-01-01 00:00:00'); +INSERT INTO system_dict_type (id, name, type, status, remark, creator, create_time, updater, update_time, deleted, deleted_time) VALUES (2007, 'AI MCP 客户端名字', 'ai_mcp_client_name', 0, '', '1', '2025-08-28 13:57:40', '1', '2025-08-28 13:57:40', '0', '1970-01-01 00:00:00'); COMMIT; -- @formatter:on -DROP SEQUENCE IF EXISTS system_login_log_seq; -CREATE SEQUENCE system_login_log_seq - START 1; +DROP SEQUENCE IF EXISTS system_dict_type_seq; +CREATE SEQUENCE system_dict_type_seq + START 2008; -- ---------------------------- -- Table structure for system_login_log -- ---------------------------- DROP TABLE IF EXISTS system_login_log; -CREATE TABLE system_login_log -( - id int8 NOT NULL default nextval('system_login_log_seq'), - log_type int8 NOT NULL, - trace_id varchar(64) NOT NULL DEFAULT '', - user_id int8 NOT NULL DEFAULT 0, - user_type int2 NOT NULL DEFAULT 0, - username varchar(50) NOT NULL DEFAULT '', - result int2 NOT NULL, - user_ip varchar(50) NOT NULL, - user_agent varchar(512) NOT NULL, - creator varchar(64) NULL DEFAULT '', - create_time timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, - updater varchar(64) NULL DEFAULT '', - update_time timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, - deleted int2 NOT NULL DEFAULT 0, - tenant_id int8 NOT NULL DEFAULT 0 +CREATE TABLE system_login_log ( + id int8 NOT NULL, + log_type int8 NOT NULL, + trace_id varchar(64) NOT NULL DEFAULT '', + user_id int8 NOT NULL DEFAULT 0, + user_type int2 NOT NULL DEFAULT 0, + username varchar(50) NOT NULL DEFAULT '', + result int2 NOT NULL, + user_ip varchar(50) NOT NULL, + user_agent varchar(512) NOT NULL, + creator varchar(64) NULL DEFAULT '', + create_time timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, + updater varchar(64) NULL DEFAULT '', + update_time timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, + deleted int2 NOT NULL DEFAULT 0, + tenant_id int8 NOT NULL DEFAULT 0 ); -ALTER TABLE system_login_log - ADD CONSTRAINT pk_system_login_log PRIMARY KEY (id); +ALTER TABLE system_login_log ADD CONSTRAINT pk_system_login_log PRIMARY KEY (id); COMMENT ON COLUMN system_login_log.id IS '访问ID'; COMMENT ON COLUMN system_login_log.log_type IS '日志类型'; @@ -1563,33 +1568,31 @@ COMMENT ON COLUMN system_login_log.deleted IS '是否删除'; COMMENT ON COLUMN system_login_log.tenant_id IS '租户编号'; COMMENT ON TABLE system_login_log IS '系统访问记录'; -DROP SEQUENCE IF EXISTS system_mail_account_seq; -CREATE SEQUENCE system_mail_account_seq +DROP SEQUENCE IF EXISTS system_login_log_seq; +CREATE SEQUENCE system_login_log_seq START 1; -- ---------------------------- -- Table structure for system_mail_account -- ---------------------------- DROP TABLE IF EXISTS system_mail_account; -CREATE TABLE system_mail_account -( - id int8 NOT NULL default nextval('system_mail_account_seq'), - mail varchar(255) NOT NULL, - username varchar(255) NOT NULL, - password varchar(255) NOT NULL, - host varchar(255) NOT NULL, - port int4 NOT NULL, - ssl_enable bool NOT NULL DEFAULT '0', - starttls_enable bool NOT NULL DEFAULT '0', - creator varchar(64) NULL DEFAULT '', - create_time timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, - updater varchar(64) NULL DEFAULT '', - update_time timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, - deleted int2 NOT NULL DEFAULT 0 +CREATE TABLE system_mail_account ( + id int8 NOT NULL, + mail varchar(255) NOT NULL, + username varchar(255) NOT NULL, + password varchar(255) NOT NULL, + host varchar(255) NOT NULL, + port int4 NOT NULL, + ssl_enable bool NOT NULL DEFAULT '0', + starttls_enable bool NOT NULL DEFAULT '0', + creator varchar(64) NULL DEFAULT '', + create_time timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, + updater varchar(64) NULL DEFAULT '', + update_time timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, + deleted int2 NOT NULL DEFAULT 0 ); -ALTER TABLE system_mail_account - ADD CONSTRAINT pk_system_mail_account PRIMARY KEY (id); +ALTER TABLE system_mail_account ADD CONSTRAINT pk_system_mail_account PRIMARY KEY (id); COMMENT ON COLUMN system_mail_account.id IS '主键'; COMMENT ON COLUMN system_mail_account.mail IS '邮箱'; @@ -1612,52 +1615,54 @@ COMMENT ON TABLE system_mail_account IS '邮箱账号表'; -- @formatter:off BEGIN; INSERT INTO system_mail_account (id, mail, username, password, host, port, ssl_enable, starttls_enable, creator, create_time, updater, update_time, deleted) VALUES (1, '7684413@qq.com', '7684413@qq.com', '1234576', '127.0.0.1', 8080, '0', '0', '1', '2023-01-25 17:39:52', '1', '2025-04-04 16:34:40', '0'); -INSERT INTO system_mail_account (id, mail, username, password, host, port, ssl_enable, starttls_enable, creator, create_time, updater, update_time, deleted) VALUES (2, 'ydym_test@163.com', 'ydym_test@163.com', 'WBZTEINMIFVRYSOE', 'smtp.163.com', 465, '1', '0', '1', '2023-01-26 01:26:03', '1', '2023-04-12 22:39:38', '0'); +INSERT INTO system_mail_account (id, mail, username, password, host, port, ssl_enable, starttls_enable, creator, create_time, updater, update_time, deleted) VALUES (2, 'ydym_test@163.com', 'ydym_test@163.com', 'WBZTEINMIFVRYSOE', 'smtp.163.com', 465, '1', '0', '1', '2023-01-26 01:26:03', '1', '2025-07-26 21:57:55', '0'); INSERT INTO system_mail_account (id, mail, username, password, host, port, ssl_enable, starttls_enable, creator, create_time, updater, update_time, deleted) VALUES (3, '76854114@qq.com', '3335', '11234', 'yunai1.cn', 466, '0', '0', '1', '2023-01-27 15:06:38', '1', '2023-01-27 07:08:36', '1'); INSERT INTO system_mail_account (id, mail, username, password, host, port, ssl_enable, starttls_enable, creator, create_time, updater, update_time, deleted) VALUES (4, '7685413x@qq.com', '2', '3', '4', 5, '1', '0', '1', '2023-04-12 23:05:06', '1', '2023-04-12 15:05:11', '1'); COMMIT; -- @formatter:on -DROP SEQUENCE IF EXISTS system_mail_log_seq; -CREATE SEQUENCE system_mail_log_seq - START 1; +DROP SEQUENCE IF EXISTS system_mail_account_seq; +CREATE SEQUENCE system_mail_account_seq + START 5; -- ---------------------------- -- Table structure for system_mail_log -- ---------------------------- DROP TABLE IF EXISTS system_mail_log; -CREATE TABLE system_mail_log -( - id int8 NOT NULL default nextval('system_mail_log_seq'), - user_id int8 NULL DEFAULT NULL, - user_type int2 NULL DEFAULT NULL, - to_mail varchar(255) NOT NULL, - account_id int8 NOT NULL, - from_mail varchar(255) NOT NULL, - template_id int8 NOT NULL, - template_code varchar(63) NOT NULL, - template_nickname varchar(255) NULL DEFAULT NULL, - template_title varchar(255) NOT NULL, - template_content varchar(10240) NOT NULL, - template_params varchar(255) NOT NULL, - send_status int2 NOT NULL DEFAULT 0, - send_time timestamp NULL DEFAULT NULL, - send_message_id varchar(255) NULL DEFAULT NULL, - send_exception varchar(4096) NULL DEFAULT NULL, - creator varchar(64) NULL DEFAULT '', - create_time timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, - updater varchar(64) NULL DEFAULT '', - update_time timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, - deleted int2 NOT NULL DEFAULT 0 +CREATE TABLE system_mail_log ( + id int8 NOT NULL, + user_id int8 NULL DEFAULT NULL, + user_type int2 NULL DEFAULT NULL, + to_mails varchar(1024) NOT NULL, + cc_mails varchar(1024) NULL DEFAULT NULL, + bcc_mails varchar(1024) NULL DEFAULT NULL, + account_id int8 NOT NULL, + from_mail varchar(255) NOT NULL, + template_id int8 NOT NULL, + template_code varchar(63) NOT NULL, + template_nickname varchar(255) NULL DEFAULT NULL, + template_title varchar(255) NOT NULL, + template_content text NOT NULL, + template_params varchar(255) NOT NULL, + send_status int2 NOT NULL DEFAULT 0, + send_time timestamp NULL DEFAULT NULL, + send_message_id varchar(255) NULL DEFAULT NULL, + send_exception varchar(4096) NULL DEFAULT NULL, + creator varchar(64) NULL DEFAULT '', + create_time timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, + updater varchar(64) NULL DEFAULT '', + update_time timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, + deleted int2 NOT NULL DEFAULT 0 ); -ALTER TABLE system_mail_log - ADD CONSTRAINT pk_system_mail_log PRIMARY KEY (id); +ALTER TABLE system_mail_log ADD CONSTRAINT pk_system_mail_log PRIMARY KEY (id); COMMENT ON COLUMN system_mail_log.id IS '编号'; COMMENT ON COLUMN system_mail_log.user_id IS '用户编号'; COMMENT ON COLUMN system_mail_log.user_type IS '用户类型'; -COMMENT ON COLUMN system_mail_log.to_mail IS '接收邮箱地址'; +COMMENT ON COLUMN system_mail_log.to_mails IS '接收邮箱地址'; +COMMENT ON COLUMN system_mail_log.cc_mails IS '抄送邮箱地址'; +COMMENT ON COLUMN system_mail_log.bcc_mails IS '密送邮箱地址'; COMMENT ON COLUMN system_mail_log.account_id IS '邮箱账号编号'; COMMENT ON COLUMN system_mail_log.from_mail IS '发送邮箱地址'; COMMENT ON COLUMN system_mail_log.template_id IS '模板编号'; @@ -1677,35 +1682,33 @@ COMMENT ON COLUMN system_mail_log.update_time IS '更新时间'; COMMENT ON COLUMN system_mail_log.deleted IS '是否删除'; COMMENT ON TABLE system_mail_log IS '邮件日志表'; -DROP SEQUENCE IF EXISTS system_mail_template_seq; -CREATE SEQUENCE system_mail_template_seq +DROP SEQUENCE IF EXISTS system_mail_log_seq; +CREATE SEQUENCE system_mail_log_seq START 1; -- ---------------------------- -- Table structure for system_mail_template -- ---------------------------- DROP TABLE IF EXISTS system_mail_template; -CREATE TABLE system_mail_template -( - id int8 NOT NULL default nextval('system_mail_template_seq'), - name varchar(63) NOT NULL, - code varchar(63) NOT NULL, - account_id int8 NOT NULL, - nickname varchar(255) NULL DEFAULT NULL, - title varchar(255) NOT NULL, - content varchar(10240) NOT NULL, - params varchar(255) NOT NULL, - status int2 NOT NULL, - remark varchar(255) NULL DEFAULT NULL, - creator varchar(64) NULL DEFAULT '', - create_time timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, - updater varchar(64) NULL DEFAULT '', - update_time timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, - deleted int2 NOT NULL DEFAULT 0 +CREATE TABLE system_mail_template ( + id int8 NOT NULL, + name varchar(63) NOT NULL, + code varchar(63) NOT NULL, + account_id int8 NOT NULL, + nickname varchar(255) NULL DEFAULT NULL, + title varchar(255) NOT NULL, + content varchar(10240) NOT NULL, + params varchar(255) NOT NULL, + status int2 NOT NULL, + remark varchar(255) NULL DEFAULT NULL, + creator varchar(64) NULL DEFAULT '', + create_time timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, + updater varchar(64) NULL DEFAULT '', + update_time timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, + deleted int2 NOT NULL DEFAULT 0 ); -ALTER TABLE system_mail_template - ADD CONSTRAINT pk_system_mail_template PRIMARY KEY (id); +ALTER TABLE system_mail_template ADD CONSTRAINT pk_system_mail_template PRIMARY KEY (id); COMMENT ON COLUMN system_mail_template.id IS '编号'; COMMENT ON COLUMN system_mail_template.name IS '模板名称'; @@ -1730,44 +1733,42 @@ COMMENT ON TABLE system_mail_template IS '邮件模版表'; -- @formatter:off BEGIN; INSERT INTO system_mail_template (id, name, code, account_id, nickname, title, content, params, status, remark, creator, create_time, updater, update_time, deleted) VALUES (13, '后台用户短信登录', 'admin-sms-login', 1, '奥特曼', '你猜我猜', '

您的验证码是{code},名字是{name}

', '["code","name"]', 0, '3', '1', '2021-10-11 08:10:00', '1', '2023-12-02 19:51:14', '0'); -INSERT INTO system_mail_template (id, name, code, account_id, nickname, title, content, params, status, remark, creator, create_time, updater, update_time, deleted) VALUES (14, '测试模版', 'test_01', 2, '芋艿', '一个标题', '

你是 {key01} 吗?


是的话,赶紧 {key02} 一下!

', '["key01","key02"]', 0, NULL, '1', '2023-01-26 01:27:40', '1', '2023-01-27 10:32:16', '0'); -INSERT INTO system_mail_template (id, name, code, account_id, nickname, title, content, params, status, remark, creator, create_time, updater, update_time, deleted) VALUES (15, '3', '2', 2, '7', '4', '

45

', '[]', 1, '80', '1', '2023-01-27 15:50:35', '1', '2023-01-27 16:34:49', '0'); +INSERT INTO system_mail_template (id, name, code, account_id, nickname, title, content, params, status, remark, creator, create_time, updater, update_time, deleted) VALUES (14, '测试模版', 'test_01', 2, '芋艿', '一个标题', '

你是 {key01} 吗?


是的话,赶紧 {key02} 一下!

', '["key01","key02"]', 0, NULL, '1', '2023-01-26 01:27:40', '1', '2025-07-26 21:48:45', '0'); +INSERT INTO system_mail_template (id, name, code, account_id, nickname, title, content, params, status, remark, creator, create_time, updater, update_time, deleted) VALUES (15, '3', '2', 2, '7', '4', '

45

', '[]', 1, '80', '1', '2023-01-27 15:50:35', '1', '2025-07-26 21:47:49', '1'); COMMIT; -- @formatter:on -DROP SEQUENCE IF EXISTS system_menu_seq; -CREATE SEQUENCE system_menu_seq - START 1; +DROP SEQUENCE IF EXISTS system_mail_template_seq; +CREATE SEQUENCE system_mail_template_seq + START 16; -- ---------------------------- -- Table structure for system_menu -- ---------------------------- DROP TABLE IF EXISTS system_menu; -CREATE TABLE system_menu -( - id int8 NOT NULL default nextval('system_menu_seq'), - name varchar(50) NOT NULL, - permission varchar(100) NOT NULL DEFAULT '', - type int2 NOT NULL, - sort int4 NOT NULL DEFAULT 0, - parent_id int8 NOT NULL DEFAULT 0, - path varchar(200) NULL DEFAULT '', - icon varchar(100) NULL DEFAULT '#', - component varchar(255) NULL DEFAULT NULL, - component_name varchar(255) NULL DEFAULT NULL, - status int2 NOT NULL DEFAULT 0, - visible bool NOT NULL DEFAULT '1', - keep_alive bool NOT NULL DEFAULT '1', - always_show bool NOT NULL DEFAULT '1', - creator varchar(64) NULL DEFAULT '', - create_time timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, - updater varchar(64) NULL DEFAULT '', - update_time timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, - deleted int2 NOT NULL DEFAULT 0 +CREATE TABLE system_menu ( + id int8 NOT NULL, + name varchar(50) NOT NULL, + permission varchar(100) NOT NULL DEFAULT '', + type int2 NOT NULL, + sort int4 NOT NULL DEFAULT 0, + parent_id int8 NOT NULL DEFAULT 0, + path varchar(200) NULL DEFAULT '', + icon varchar(100) NULL DEFAULT '#', + component varchar(255) NULL DEFAULT NULL, + component_name varchar(255) NULL DEFAULT NULL, + status int2 NOT NULL DEFAULT 0, + visible bool NOT NULL DEFAULT '1', + keep_alive bool NOT NULL DEFAULT '1', + always_show bool NOT NULL DEFAULT '1', + creator varchar(64) NULL DEFAULT '', + create_time timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, + updater varchar(64) NULL DEFAULT '', + update_time timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, + deleted int2 NOT NULL DEFAULT 0 ); -ALTER TABLE system_menu - ADD CONSTRAINT pk_system_menu PRIMARY KEY (id); +ALTER TABLE system_menu ADD CONSTRAINT pk_system_menu PRIMARY KEY (id); COMMENT ON COLUMN system_menu.id IS '菜单ID'; COMMENT ON COLUMN system_menu.name IS '菜单名称'; @@ -2007,7 +2008,7 @@ INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon 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, '1', '1', '1', '', '2022-07-30 13:52:44', '', '2022-07-30 13:52:44', '0'); INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2011, '品牌更新', 'product:brand:update', 3, 3, 2008, '', '', '', NULL, 0, '1', '1', '1', '', '2022-07-30 13:52:44', '', '2022-07-30 13:52:44', '0'); INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2012, '品牌删除', 'product:brand:delete', 3, 4, 2008, '', '', '', NULL, 0, '1', '1', '1', '', '2022-07-30 13:52:44', '', '2022-07-30 13:52:44', '0'); -INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2014, '商品列表', '', 2, 1, 2000, 'spu', 'ep:apple', 'mall/product/spu/index', 'ProductSpu', 0, '1', '1', '1', '', '2022-07-30 14:22:58', '1', '2023-08-21 10:27:01', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2014, '商品列表', '', 2, 1, 2000, 'spu', 'ep:apple', 'mall/product/spu/index', 'ProductSpu', 0, '1', '1', '1', '', '2022-07-30 14:22:58', '1', '2025-10-08 10:36:52', '0'); INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2015, '商品查询', 'product:spu:query', 3, 1, 2014, '', '', '', NULL, 0, '1', '1', '1', '', '2022-07-30 14:22:58', '', '2022-07-30 14:22:58', '0'); INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2016, '商品创建', 'product:spu:create', 3, 2, 2014, '', '', '', NULL, 0, '1', '1', '1', '', '2022-07-30 14:22:58', '', '2022-07-30 14:22:58', '0'); INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (2017, '商品更新', 'product:spu:update', 3, 3, 2014, '', '', '', NULL, 0, '1', '1', '1', '', '2022-07-30 14:22:58', '', '2022-07-30 14:22:58', '0'); @@ -2647,55 +2648,47 @@ INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon 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 (2924, '工具删除', 'ai:tool:delete', 3, 4, 2920, '', '', '', NULL, 0, '1', '1', '1', '', '2025-03-14 11:19:29', '', '2025-03-14 11:19:29', '0'); INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (4000, 'IoT 物联网', '', 1, 500, 0, '/iot', 'fa-solid:hdd', '', '', 0, '1', '1', '1', '1', '2024-08-10 09:55:28', '1', '2024-12-07 15:58:34', '0'); INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (4001, '设备接入', '', 1, 2, 4000, 'device', 'ep:platform', '', '', 0, '1', '1', '1', '1', '2024-08-10 09:57:56', '1', '2025-02-27 08:39:49', '0'); -INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (4002, '产品管理', '', 2, 2, 4001, 'product', 'fa-solid:tools', 'iot/product/product/index', 'IoTProduct', 0, '1', '1', '1', '', '2024-08-10 02:38:02', '1', '2024-12-07 18:47:53', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (4002, '产品管理', '', 2, 1, 4001, 'product', 'fa-solid:tools', 'iot/product/product/index', 'IoTProduct', 0, '1', '1', '1', '', '2024-08-10 02:38:02', '1', '2025-06-15 20:56:06', '0'); INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (4003, '产品查询', 'iot:product:query', 3, 1, 4002, '', '', '', NULL, 0, '1', '1', '1', '', '2024-08-10 02:38:02', '', '2024-12-07 15:55:00', '0'); INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (4004, '产品创建', 'iot:product:create', 3, 2, 4002, '', '', '', NULL, 0, '1', '1', '1', '', '2024-08-10 02:38:02', '', '2024-12-07 15:55:03', '0'); INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (4005, '产品更新', 'iot:product:update', 3, 3, 4002, '', '', '', NULL, 0, '1', '1', '1', '', '2024-08-10 02:38:02', '', '2024-12-07 15:55:05', '0'); INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (4006, '产品删除', 'iot:product:delete', 3, 4, 4002, '', '', '', NULL, 0, '1', '1', '1', '', '2024-08-10 02:38:02', '', '2024-12-07 15:55:06', '0'); INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (4007, '产品导出', 'iot:product:export', 3, 5, 4002, '', '', '', NULL, 0, '1', '1', '1', '', '2024-08-10 02:38:02', '', '2024-12-07 15:55:13', '0'); -INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (4008, '设备管理', '', 2, 4, 4001, 'device', 'fa:mobile', 'iot/device/device/index', 'IoTDevice', 0, '1', '1', '1', '', '2024-09-16 18:48:19', '1', '2024-12-14 11:39:30', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (4008, '设备管理', '', 2, 2, 4001, 'device', 'fa:mobile', 'iot/device/device/index', 'IoTDevice', 0, '1', '1', '1', '', '2024-09-16 18:48:19', '1', '2025-06-15 20:56:10', '0'); INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (4009, '设备查询', 'iot:device:query', 3, 1, 4008, '', '', '', '', 0, '1', '1', '1', '', '2024-09-16 18:48:19', '1', '2024-12-07 15:55:40', '0'); INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (4010, '设备创建', 'iot:device:create', 3, 2, 4008, '', '', '', '', 0, '1', '1', '1', '', '2024-09-16 18:48:19', '1', '2024-12-07 15:55:41', '0'); INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (4011, '设备更新', 'iot:device:update', 3, 3, 4008, '', '', '', '', 0, '1', '1', '1', '', '2024-09-16 18:48:19', '1', '2024-12-07 15:55:42', '0'); INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (4012, '设备删除', 'iot:device:delete', 3, 4, 4008, '', '', '', '', 0, '1', '1', '1', '', '2024-09-16 18:48:19', '1', '2024-12-07 15:55:43', '0'); INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (4013, '设备导出', 'iot:device:export', 3, 5, 4008, '', '', '', '', 0, '1', '1', '1', '', '2024-09-16 18:48:19', '1', '2024-12-07 15:55:44', '0'); -INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (4014, '产品分类', '', 2, 1, 4001, 'product-category', 'ep:notebook', 'iot/product/category/index', 'IotProductCategory', 0, '1', '1', '1', '', '2024-12-07 16:01:35', '1', '2024-12-07 16:31:52', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (4014, '产品分类', '', 2, 3, 4001, 'product-category', 'ep:notebook', 'iot/product/category/index', 'IotProductCategory', 0, '1', '1', '1', '', '2024-12-07 16:01:35', '1', '2025-06-15 20:56:39', '0'); INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (4015, '产品分类查询', 'iot:product-category:query', 3, 1, 4014, '', '', '', NULL, 0, '1', '1', '1', '', '2024-12-07 16:01:35', '', '2024-12-07 16:01:35', '0'); INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (4016, '产品分类创建', 'iot:product-category:create', 3, 2, 4014, '', '', '', NULL, 0, '1', '1', '1', '', '2024-12-07 16:01:35', '', '2024-12-07 16:01:35', '0'); INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (4017, '产品分类更新', 'iot:product-category:update', 3, 3, 4014, '', '', '', NULL, 0, '1', '1', '1', '', '2024-12-07 16:01:35', '', '2024-12-07 16:01:35', '0'); INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (4018, '产品分类删除', 'iot:product-category:delete', 3, 4, 4014, '', '', '', NULL, 0, '1', '1', '1', '', '2024-12-07 16:01:35', '', '2024-12-07 16:01:35', '0'); -INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (4025, '插件管理', '', 2, 5, 4047, 'plugin-config', 'ep:folder-opened', 'iot/plugin/index', 'IoTPlugin', 0, '1', '1', '1', '', '2024-12-09 21:25:06', '1', '2025-02-05 22:23:12', '0'); -INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (4026, '插件查询', 'iot:plugin-config:query', 3, 1, 4025, '', '', '', NULL, 0, '1', '1', '1', '', '2024-12-09 21:25:06', '', '2025-02-05 21:23:20', '0'); -INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (4027, '插件创建', 'iot:plugin-config:create', 3, 2, 4025, '', '', '', NULL, 0, '1', '1', '1', '', '2024-12-09 21:25:06', '', '2025-02-05 21:23:16', '0'); -INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (4028, '插件更新', 'iot:plugin-config:update', 3, 3, 4025, '', '', '', NULL, 0, '1', '1', '1', '', '2024-12-09 21:25:06', '', '2025-02-05 21:23:12', '0'); -INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (4029, '插件删除', 'iot:plugin-config:delete', 3, 4, 4025, '', '', '', NULL, 0, '1', '1', '1', '', '2024-12-09 21:25:06', '', '2025-02-05 21:23:09', '0'); -INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (4030, '插件导出', 'iot:plugin-config:export', 3, 5, 4025, '', '', '', NULL, 0, '1', '1', '1', '', '2024-12-09 21:25:06', '', '2025-02-05 21:23:06', '0'); INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (4031, '设备分组', '', 2, 3, 4001, 'device-group', 'fa-solid:layer-group', 'iot/device/group/index', 'IotDeviceGroup', 0, '1', '1', '1', '', '2024-12-14 17:08:29', '1', '2024-12-14 17:09:17', '0'); INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (4032, '设备分组查询', 'iot:device-group:query', 3, 1, 4031, '', '', '', NULL, 0, '1', '1', '1', '', '2024-12-14 17:08:29', '', '2024-12-14 17:08:29', '0'); INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (4033, '设备分组创建', 'iot:device-group:create', 3, 2, 4031, '', '', '', NULL, 0, '1', '1', '1', '', '2024-12-14 17:08:29', '', '2024-12-14 17:08:29', '0'); INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (4034, '设备分组更新', 'iot:device-group:update', 3, 3, 4031, '', '', '', NULL, 0, '1', '1', '1', '', '2024-12-14 17:08:29', '', '2024-12-14 17:08:29', '0'); INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (4035, '设备分组删除', 'iot:device-group:delete', 3, 4, 4031, '', '', '', NULL, 0, '1', '1', '1', '', '2024-12-14 17:08:29', '', '2024-12-14 17:08:29', '0'); INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (4036, '设备导入', 'iot:device:import', 3, 6, 4008, '', '', '', '', 0, '1', '1', '1', '1', '2024-12-15 10:35:47', '1', '2024-12-15 10:35:47', '0'); -INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (4037, '产品物模型', '', 2, 2, 4001, 'thing-model', 'ep:mostly-cloudy', 'iot/thingmodel/index', 'IoTThingModel', 0, '0', '0', '0', '', '2024-12-16 17:17:50', '1', '2024-12-27 11:03:37', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (4037, '产品物模型', '', 2, 99, 4001, 'thing-model', 'ep:mostly-cloudy', 'iot/thingmodel/index', 'IoTThingModel', 0, '0', '0', '0', '', '2024-12-16 17:17:50', '1', '2025-06-15 20:56:19', '0'); INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (4038, '产品物模型功能查询', 'iot:thing-model:query', 3, 1, 4037, '', '', '', NULL, 0, '1', '1', '1', '', '2024-12-16 17:17:51', '', '2025-03-17 09:14:54', '0'); INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (4039, '产品物模型功能创建', 'iot:thing-model:create', 3, 2, 4037, '', '', '', NULL, 0, '1', '1', '1', '', '2024-12-16 17:17:52', '', '2025-03-17 09:14:58', '0'); INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (4040, '产品物模型功能更新', 'iot:thing-model:update', 3, 3, 4037, '', '', '', NULL, 0, '1', '1', '1', '', '2024-12-16 17:17:52', '', '2025-03-17 09:15:03', '0'); INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (4041, '产品物模型功能删除', 'iot:thing-model:delete', 3, 4, 4037, '', '', '', NULL, 0, '1', '1', '1', '', '2024-12-16 17:17:52', '', '2025-03-17 09:15:06', '0'); INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (4042, '产品物模型功能导出', 'iot:thing-model:export', 3, 5, 4037, '', '', '', NULL, 0, '1', '1', '1', '', '2024-12-16 17:17:53', '', '2025-03-17 09:15:09', '0'); -INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (4043, '设备上行', 'iot:device:upstream', 3, 7, 4008, '', '', '', '', 0, '1', '1', '1', '1', '2025-01-28 04:40:16', '1', '2025-01-31 22:45:53', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (4043, '设备消息发送', 'iot:device:message-send', 3, 12, 4008, '', '', '', '', 0, '1', '1', '1', '1', '2025-01-28 04:40:16', '1', '2025-06-14 14:09:26', '0'); INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (4044, '设备属性查询', 'iot:device:property-query', 3, 10, 4008, '', '', '', '', 0, '1', '1', '1', '1', '2025-01-28 11:52:54', '1', '2025-01-28 11:52:54', '0'); -INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (4045, '设备日志查询', 'iot:device:log-query', 3, 11, 4008, '', '', '', '', 0, '1', '1', '1', '1', '2025-01-28 11:53:22', '1', '2025-01-28 11:53:22', '0'); -INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (4046, '设备下行', 'iot:device:downstream', 3, 8, 4008, '', '', '', '', 0, '1', '1', '1', '1', '2025-01-31 22:46:11', '1', '2025-01-31 22:46:11', '0'); -INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (4047, '运维管理', '', 1, 2, 4000, 'operations', 'fa:cog', '', '', 0, '1', '1', '1', '1', '2025-02-05 22:21:37', '1', '2025-02-05 22:22:53', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (4045, '设备消息查询', 'iot:device:message-query', 3, 11, 4008, '', '', '', '', 0, '1', '1', '1', '1', '2025-01-28 11:53:22', '1', '2025-06-14 11:11:20', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (4047, '运维管理', '', 1, 4, 4000, 'operation', 'fa:align-center', '', '', 0, '1', '1', '1', '1', '2025-02-05 22:21:37', '"1"', '2025-06-30 20:12:48', '0'); INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (4048, '规则引擎', '', 1, 3, 4000, 'rule', 'fa-solid:cogs', '', '', 0, '1', '1', '1', '1', '2025-02-11 14:10:54', '1', '2025-02-11 14:10:54', '0'); -INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (4049, '场景联动', '', 2, 1, 4048, 'scene', 'ep:link', 'iot/rule/scene/index', 'Scene', 0, '1', '1', '1', '1', '2025-02-11 14:12:44', '1', '2025-02-12 10:15:36', '0'); -INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (4050, 'IoT首页', '', 2, 1, 4000, 'home', 'ep:home-filled', 'iot/home/index', 'IotHome', 0, '1', '1', '1', '1', '2025-02-27 08:39:35', '1', '2025-02-27 08:40:28', '0'); -INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (4051, '数据桥梁', '', 2, 0, 4048, 'data-bridge', 'ep:guide', 'iot/rule/databridge/index', 'IotDataBridge', 0, '1', '1', '1', '', '2025-03-09 13:47:11', '1', '2025-03-09 13:47:51', '0'); -INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (4052, 'IoT 数据桥梁查询', 'iot:data-bridge:query', 3, 1, 4051, '', '', '', NULL, 0, '1', '1', '1', '', '2025-03-09 13:47:11', '', '2025-03-09 13:47:11', '0'); -INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (4053, 'IoT 数据桥梁创建', 'iot:data-bridge:create', 3, 2, 4051, '', '', '', NULL, 0, '1', '1', '1', '', '2025-03-09 13:47:11', '', '2025-03-09 13:47:11', '0'); -INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (4054, 'IoT 数据桥梁更新', 'iot:data-bridge:update', 3, 3, 4051, '', '', '', NULL, 0, '1', '1', '1', '', '2025-03-09 13:47:11', '', '2025-03-09 13:47:11', '0'); -INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (4055, 'IoT 数据桥梁删除', 'iot:data-bridge:delete', 3, 4, 4051, '', '', '', NULL, 0, '1', '1', '1', '', '2025-03-09 13:47:12', '', '2025-03-09 13:47:12', '0'); -INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (4056, 'IoT 数据桥梁导出', 'iot:data-bridge:export', 3, 5, 4051, '', '', '', NULL, 0, '1', '1', '1', '', '2025-03-09 13:47:12', '', '2025-03-09 13:47:12', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (4049, '场景联动', '', 2, 1, 4048, 'scene', 'ep:link', 'iot/rule/scene/index', 'IoTSceneRule', 0, '1', '1', '1', '1', '2025-02-11 14:12:44', '"1"', '2025-08-09 15:38:32', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (4050, 'IoT 首页', '', 2, 1, 4000, 'home', 'ep:home-filled', 'iot/home/index', 'IotHome', 0, '1', '1', '1', '1', '2025-02-27 08:39:35', '1', '2025-06-24 14:22:50', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (4051, '数据流转', '', 2, 2, 4048, 'data-rule', 'ep:guide', 'iot/rule/data/index', 'IoTDataRule', 0, '1', '1', '1', '', '2025-03-09 13:47:11', '"1"', '2025-08-09 15:38:37', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (4052, '数据流转规则查询', 'iot:data-rule:query', 3, 1, 4051, '', '', '', '', 0, '1', '1', '1', '', '2025-03-09 13:47:11', '1', '2025-06-24 20:48:04', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (4053, '数据流转规则创建', 'iot:data-rule:create', 3, 2, 4051, '', '', '', '', 0, '1', '1', '1', '', '2025-03-09 13:47:11', '1', '2025-06-24 20:48:08', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (4054, '数据流转规则更新', 'iot:data-rule:update', 3, 3, 4051, '', '', '', '', 0, '1', '1', '1', '', '2025-03-09 13:47:11', '1', '2025-06-24 20:48:11', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (4055, '数据流转规则删除', 'iot:data-rule:delete', 3, 4, 4051, '', '', '', '', 0, '1', '1', '1', '', '2025-03-09 13:47:12', '1', '2025-06-24 20:48:15', '0'); INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (5000, 'AI 工作流', '', 2, 5, 2758, 'workflow', 'fa:hand-grab-o', 'ai/workflow/index.vue', 'AiWorkflow', 0, '1', '1', '1', '1', '2025-03-25 09:50:27', '1', '2025-05-03 18:55:12', '0'); INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (5001, 'AI 工作流查询', 'ai:workflow:query', 3, 1, 5000, '', '', '', '', 0, '1', '1', '1', '1', '2025-03-25 09:51:11', '1', '2025-03-25 09:51:11', '0'); INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (5002, 'AI 工作流创建', 'ai:workflow:create', 3, 2, 5000, '', '', '', '', 0, '1', '1', '1', '1', '2025-03-25 09:51:28', '1', '2025-03-25 09:51:28', '0'); @@ -2706,34 +2699,65 @@ INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon 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 (5010, '租户切换', 'system:tenant:visit', 3, 999, 1138, '', '', '', '', 0, '1', '1', '1', '1', '2025-05-05 15:25:32', '1', '2025-05-05 15:25:32', '0'); INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (5011, '转账订单查询', 'pay:transfer:query', 3, 1, 2559, '', '', '', '', 0, '1', '1', '1', '1', '2025-05-08 12:46:53', '1', '2025-05-08 12:46:53', '0'); INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (5012, '转账订单导出', 'pay:transfer:export', 3, 2, 2559, '', '', '', '', 0, '1', '1', '1', '1', '2025-05-10 17:00:28', '1', '2025-05-10 17:00:28', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (5013, '场景联动查询', 'iot:rule-scene:query', 3, 1, 4049, '', '', '', '', 0, '1', '1', '1', '1', '2025-06-20 16:53:01', '1', '2025-06-20 16:53:01', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (5014, '场景联动创建', 'iot:rule-scene:create', 3, 2, 4049, '', '', '', '', 0, '1', '1', '1', '1', '2025-06-20 16:54:31', '1', '2025-06-20 16:54:31', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (5015, '场景联动更新', 'iot:rule-scene:update', 3, 3, 4049, '', '', '', '', 0, '1', '1', '1', '1', '2025-06-20 16:54:47', '1', '2025-06-20 16:54:47', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (5016, '场景联动删除', 'iot:rule-scene:delete', 3, 4, 4049, '', '', '', '', 0, '1', '1', '1', '1', '2025-06-20 16:55:04', '1', '2025-06-20 16:55:27', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (5017, '场景联动导出', 'iot:rule-scene:export', 3, 5, 4049, '', '', '', '', 0, '1', '1', '1', '1', '2025-06-20 16:57:56', '1', '2025-06-20 16:57:56', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (5018, '数据流转目的查询', 'iot:data-sink:query', 3, 11, 4051, '', '', '', '', 0, '1', '1', '1', '1', '2025-06-24 20:48:40', '1', '2025-06-24 20:48:40', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (5019, '数据流转目的创建', 'iot:data-sink:create', 3, 12, 4051, '', '', '', '', 0, '1', '1', '1', '1', '2025-06-24 20:48:57', '1', '2025-06-24 20:48:57', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (5020, '数据流转目的更新', 'iot:data-sink:update', 3, 13, 4051, '', '', '', '', 0, '1', '1', '1', '1', '2025-06-24 20:49:10', '1', '2025-06-24 20:49:10', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (5021, '数据流转目的删除', 'iot:data-sink:delete', 3, 14, 4051, '', '', '', '', 0, '1', '1', '1', '1', '2025-06-24 20:49:23', '1', '2025-06-24 20:49:23', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (5022, '告警配置', '', 2, 1, 5028, 'config', 'fa:connectdevelop', 'iot/alert/config/index', 'IotAlertConfig', 0, '1', '1', '1', '', '2025-06-27 14:28:59', '1', '2025-06-27 22:31:19', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (5023, '告警配置查询', 'iot:alert-config:query', 3, 1, 5022, '', '', '', '', 0, '1', '1', '1', '', '2025-06-27 14:28:59', '1', '2025-06-28 16:00:31', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (5024, '告警配置创建', 'iot:alert-config:create', 3, 2, 5022, '', '', '', '', 0, '1', '1', '1', '', '2025-06-27 14:28:59', '1', '2025-06-28 16:00:35', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (5025, '告警配置更新', 'iot:alert-config:update', 3, 3, 5022, '', '', '', '', 0, '1', '1', '1', '', '2025-06-27 14:28:59', '1', '2025-06-28 16:00:43', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (5026, '告警配置删除', 'iot:alert-config:delete', 3, 4, 5022, '', '', '', '', 0, '1', '1', '1', '', '2025-06-27 14:29:00', '1', '2025-06-28 16:00:39', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (5028, '告警中心', '', 1, 3, 4000, 'alert', 'fa:soundcloud', '', '', 0, '1', '1', '1', '1', '2025-06-27 22:30:04', '1', '2025-06-27 22:30:19', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (5029, '告警记录', '', 2, 2, 5028, 'record', 'fa-solid:record-vinyl', 'iot/alert/record/index', 'IotAlertRecord', 0, '1', '1', '1', '', '2025-06-28 07:59:32', '1', '2025-06-28 16:01:48', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (5030, '告警记录查询', 'iot:alert-record:query', 3, 1, 5029, '', '', '', '', 0, '1', '1', '1', '', '2025-06-28 07:59:32', '1', '2025-06-28 16:00:53', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (5031, '告警记录处理', 'iot:alert-record:process', 3, 2, 5029, '', '', '', '', 0, '1', '1', '1', '', '2025-06-28 07:59:32', '1', '2025-06-28 16:01:04', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (5032, 'OTA 固件', '', 2, 1, 4047, 'ota/firmware', 'fa-solid:award', 'iot/ota/firmware/index', 'IoTOtaFirmware', 0, '1', '1', '1', '', '2025-06-30 07:50:29', '"1"', '2025-06-30 20:13:28', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (5033, 'OTA 固件查询', 'iot:ota-firmware:query', 3, 1, 5032, '', '', '', '', 0, '1', '1', '1', '', '2025-06-30 07:50:29', '"1"', '2025-06-30 17:38:12', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (5034, 'OTA 固件创建', 'iot:ota-firmware:create', 3, 2, 5032, '', '', '', '', 0, '1', '1', '1', '', '2025-06-30 07:50:29', '"1"', '2025-06-30 17:38:21', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (5035, 'OTA 固件更新', 'iot:ota-firmware:update', 3, 3, 5032, '', '', '', '', 0, '1', '1', '1', '', '2025-06-30 07:50:29', '"1"', '2025-06-30 17:38:29', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (5036, 'OTA 固件删除', 'iot:ota-firmware:delete', 3, 4, 5032, '', '', '', '', 0, '1', '1', '1', '', '2025-06-30 07:50:29', '"1"', '2025-06-30 17:38:37', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (5037, 'OTA 升级任务查询', 'iot:ota-task:create', 3, 11, 5032, '', '', '', '', 0, '1', '1', '1', '1', '2025-07-02 23:56:56', '1', '2025-07-02 23:56:56', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (5038, 'OTA 升级任务取消', 'iot:ota-task:cancel', 3, 13, 5032, '', '', '', '', 0, '1', '1', '1', '1', '2025-07-02 23:57:26', '1', '2025-07-02 23:57:26', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (5039, 'OTA 升级任务创建', 'iot:ota-task:create', 3, 12, 5032, '', '', '', '', 0, '1', '1', '1', '1', '2025-07-02 23:57:52', '1', '2025-07-02 23:57:52', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (5040, 'OTA 升级记录查询', 'iot:ota-task-record:query', 3, 21, 5032, '', '', '', '', 0, '1', '1', '1', '1', '2025-07-02 23:58:30', '1', '2025-07-02 23:58:30', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (5041, 'OTA 升级记录取消', 'iot:ota-task-record:cancel', 3, 23, 5032, '', '', '', '', 0, '1', '1', '1', '1', '2025-07-02 23:59:18', '1', '2025-07-02 23:59:18', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (5042, '模版消息', '', 2, 5, 2084, 'message-template', 'ep:notebook', 'mp/messageTemplate/index', 'MpMessageTemplate', 0, '1', '1', '1', '1', '2025-11-26 16:45:35', '1', '2025-11-26 18:44:52', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (5043, '查询模版消息', 'mp:message-template:query', 3, 1, 5042, '', '', '', '', 0, '1', '1', '1', '1', '2025-11-26 17:00:15', '1', '2025-11-26 18:45:00', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (5044, '删除模版消息', 'mp:message-template:delete', 3, 2, 5042, '', '', '', '', 0, '1', '1', '1', '1', '2025-11-26 17:00:31', '1', '2025-11-26 18:45:05', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (5045, '同步公众号模板', 'mp:message-template:sync', 3, 3, 5042, '', '', '', '', 0, '1', '1', '1', '1', '2025-11-26 17:00:55', '1', '2025-11-26 17:00:55', '0'); +INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, create_time, updater, update_time, deleted) VALUES (5046, '给粉丝发送模版消息', 'mp:message-template:send', 3, 4, 5042, '', '', '', '', 0, '1', '1', '1', '1', '2025-11-26 17:01:11', '1', '2025-11-26 17:01:11', '0'); COMMIT; -- @formatter:on -DROP SEQUENCE IF EXISTS system_notice_seq; -CREATE SEQUENCE system_notice_seq - START 1; +DROP SEQUENCE IF EXISTS system_menu_seq; +CREATE SEQUENCE system_menu_seq + START 5047; -- ---------------------------- -- Table structure for system_notice -- ---------------------------- DROP TABLE IF EXISTS system_notice; -CREATE TABLE system_notice -( - id int8 NOT NULL default nextval('system_notice_seq'), - title varchar(50) NOT NULL, - content text NOT NULL, - type int2 NOT NULL, - status int2 NOT NULL DEFAULT 0, - creator varchar(64) NULL DEFAULT '', - create_time timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, - updater varchar(64) NULL DEFAULT '', - update_time timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, - deleted int2 NOT NULL DEFAULT 0, - tenant_id int8 NOT NULL DEFAULT 0 +CREATE TABLE system_notice ( + id int8 NOT NULL, + title varchar(50) NOT NULL, + content text NOT NULL, + type int2 NOT NULL, + status int2 NOT NULL DEFAULT 0, + creator varchar(64) NULL DEFAULT '', + create_time timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, + updater varchar(64) NULL DEFAULT '', + update_time timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, + deleted int2 NOT NULL DEFAULT 0, + tenant_id int8 NOT NULL DEFAULT 0 ); -ALTER TABLE system_notice - ADD CONSTRAINT pk_system_notice PRIMARY KEY (id); +ALTER TABLE system_notice ADD CONSTRAINT pk_system_notice PRIMARY KEY (id); COMMENT ON COLUMN system_notice.id IS '公告ID'; COMMENT ON COLUMN system_notice.title IS '公告标题'; @@ -2753,43 +2777,41 @@ COMMENT ON TABLE system_notice IS '通知公告表'; -- ---------------------------- -- @formatter:off BEGIN; -INSERT INTO system_notice (id, title, content, type, status, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1, '芋道的公众', '

新版本内容133

', 1, 0, 'admin', '2021-01-05 17:03:48', '1', '2022-05-04 21:00:20', '0', 1); +INSERT INTO system_notice (id, title, content, type, status, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1, '芋道的公众', '

新版本内容133222

', 1, 0, 'admin', '2021-01-05 17:03:48', '"1"', '2025-08-31 09:38:22', '0', 1); INSERT INTO system_notice (id, title, content, type, status, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2, '维护通知:2018-07-01 系统凌晨维护', '

11112222image3333

', 2, 1, 'admin', '2021-01-05 17:03:48', '1', '2025-04-18 23:56:40', '0', 1); INSERT INTO system_notice (id, title, content, type, status, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4, '我是测试标题', '

哈哈哈哈123

', 1, 0, '110', '2022-02-22 01:01:25', '110', '2022-02-22 01:01:46', '0', 121); COMMIT; -- @formatter:on -DROP SEQUENCE IF EXISTS system_notify_message_seq; -CREATE SEQUENCE system_notify_message_seq - START 1; +DROP SEQUENCE IF EXISTS system_notice_seq; +CREATE SEQUENCE system_notice_seq + START 5; -- ---------------------------- -- Table structure for system_notify_message -- ---------------------------- DROP TABLE IF EXISTS system_notify_message; -CREATE TABLE system_notify_message -( - id int8 NOT NULL default nextval('system_notify_message_seq'), - user_id int8 NOT NULL, - user_type int2 NOT NULL, - template_id int8 NOT NULL, - template_code varchar(64) NOT NULL, - template_nickname varchar(63) NOT NULL, - template_content varchar(1024) NOT NULL, - template_type int4 NOT NULL, - template_params varchar(255) NOT NULL, - read_status bool NOT NULL, - read_time timestamp NULL DEFAULT NULL, - creator varchar(64) NULL DEFAULT '', - create_time timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, - updater varchar(64) NULL DEFAULT '', - update_time timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, - deleted int2 NOT NULL DEFAULT 0, - tenant_id int8 NOT NULL DEFAULT 0 +CREATE TABLE system_notify_message ( + id int8 NOT NULL, + user_id int8 NOT NULL, + user_type int2 NOT NULL, + template_id int8 NOT NULL, + template_code varchar(64) NOT NULL, + template_nickname varchar(63) NOT NULL, + template_content varchar(1024) NOT NULL, + template_type int4 NOT NULL, + template_params varchar(255) NOT NULL, + read_status bool NOT NULL, + read_time timestamp NULL DEFAULT NULL, + creator varchar(64) NULL DEFAULT '', + create_time timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, + updater varchar(64) NULL DEFAULT '', + update_time timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, + deleted int2 NOT NULL DEFAULT 0, + tenant_id int8 NOT NULL DEFAULT 0 ); -ALTER TABLE system_notify_message - ADD CONSTRAINT pk_system_notify_message PRIMARY KEY (id); +ALTER TABLE system_notify_message ADD CONSTRAINT pk_system_notify_message PRIMARY KEY (id); COMMENT ON COLUMN system_notify_message.id IS '用户ID'; COMMENT ON COLUMN system_notify_message.user_id IS '用户id'; @@ -2827,34 +2849,32 @@ INSERT INTO system_notify_message (id, user_id, user_type, template_id, template COMMIT; -- @formatter:on -DROP SEQUENCE IF EXISTS system_notify_template_seq; -CREATE SEQUENCE system_notify_template_seq - START 1; +DROP SEQUENCE IF EXISTS system_notify_message_seq; +CREATE SEQUENCE system_notify_message_seq + START 11; -- ---------------------------- -- Table structure for system_notify_template -- ---------------------------- DROP TABLE IF EXISTS system_notify_template; -CREATE TABLE system_notify_template -( - id int8 NOT NULL default nextval('system_notify_template_seq'), - name varchar(63) NOT NULL, - code varchar(64) NOT NULL, - nickname varchar(255) NOT NULL, - content varchar(1024) NOT NULL, - type int2 NOT NULL, - params varchar(255) NULL DEFAULT NULL, - status int2 NOT NULL, - remark varchar(255) NULL DEFAULT NULL, - creator varchar(64) NULL DEFAULT '', - create_time timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, - updater varchar(64) NULL DEFAULT '', - update_time timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, - deleted int2 NOT NULL DEFAULT 0 +CREATE TABLE system_notify_template ( + id int8 NOT NULL, + name varchar(63) NOT NULL, + code varchar(64) NOT NULL, + nickname varchar(255) NOT NULL, + content varchar(1024) NOT NULL, + type int2 NOT NULL, + params varchar(255) NULL DEFAULT NULL, + status int2 NOT NULL, + remark varchar(255) NULL DEFAULT NULL, + creator varchar(64) NULL DEFAULT '', + create_time timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, + updater varchar(64) NULL DEFAULT '', + update_time timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, + deleted int2 NOT NULL DEFAULT 0 ); -ALTER TABLE system_notify_template - ADD CONSTRAINT pk_system_notify_template PRIMARY KEY (id); +ALTER TABLE system_notify_template ADD CONSTRAINT pk_system_notify_template PRIMARY KEY (id); COMMENT ON COLUMN system_notify_template.id IS '主键'; COMMENT ON COLUMN system_notify_template.name IS '模板名称'; @@ -2872,35 +2892,33 @@ COMMENT ON COLUMN system_notify_template.update_time IS '更新时间'; COMMENT ON COLUMN system_notify_template.deleted IS '是否删除'; COMMENT ON TABLE system_notify_template IS '站内信模板表'; -DROP SEQUENCE IF EXISTS system_oauth2_access_token_seq; -CREATE SEQUENCE system_oauth2_access_token_seq +DROP SEQUENCE IF EXISTS system_notify_template_seq; +CREATE SEQUENCE system_notify_template_seq START 1; -- ---------------------------- -- Table structure for system_oauth2_access_token -- ---------------------------- DROP TABLE IF EXISTS system_oauth2_access_token; -CREATE TABLE system_oauth2_access_token -( - id int8 NOT NULL default nextval('system_oauth2_access_token_seq'), - user_id int8 NOT NULL, - user_type int2 NOT NULL, - user_info varchar(512) NOT NULL, - access_token varchar(255) NOT NULL, - refresh_token varchar(32) NOT NULL, - client_id varchar(255) NOT NULL, - scopes varchar(255) NULL DEFAULT NULL, - expires_time timestamp NOT NULL, - creator varchar(64) NULL DEFAULT '', - create_time timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, - updater varchar(64) NULL DEFAULT '', - update_time timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, - deleted int2 NOT NULL DEFAULT 0, - tenant_id int8 NOT NULL DEFAULT 0 +CREATE TABLE system_oauth2_access_token ( + id int8 NOT NULL, + user_id int8 NOT NULL, + user_type int2 NOT NULL, + user_info varchar(512) NOT NULL, + access_token varchar(255) NOT NULL, + refresh_token varchar(32) NOT NULL, + client_id varchar(255) NOT NULL, + scopes varchar(255) NULL DEFAULT NULL, + expires_time timestamp NOT NULL, + creator varchar(64) NULL DEFAULT '', + create_time timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, + updater varchar(64) NULL DEFAULT '', + update_time timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, + deleted int2 NOT NULL DEFAULT 0, + tenant_id int8 NOT NULL DEFAULT 0 ); -ALTER TABLE system_oauth2_access_token - ADD CONSTRAINT pk_system_oauth2_access_token PRIMARY KEY (id); +ALTER TABLE system_oauth2_access_token ADD CONSTRAINT pk_system_oauth2_access_token PRIMARY KEY (id); CREATE INDEX idx_system_oauth2_access_token_01 ON system_oauth2_access_token (access_token); CREATE INDEX idx_system_oauth2_access_token_02 ON system_oauth2_access_token (refresh_token); @@ -2922,33 +2940,31 @@ COMMENT ON COLUMN system_oauth2_access_token.deleted IS '是否删除'; COMMENT ON COLUMN system_oauth2_access_token.tenant_id IS '租户编号'; COMMENT ON TABLE system_oauth2_access_token IS 'OAuth2 访问令牌'; -DROP SEQUENCE IF EXISTS system_oauth2_approve_seq; -CREATE SEQUENCE system_oauth2_approve_seq +DROP SEQUENCE IF EXISTS system_oauth2_access_token_seq; +CREATE SEQUENCE system_oauth2_access_token_seq START 1; -- ---------------------------- -- Table structure for system_oauth2_approve -- ---------------------------- DROP TABLE IF EXISTS system_oauth2_approve; -CREATE TABLE system_oauth2_approve -( - id int8 NOT NULL default nextval('system_oauth2_approve_seq'), - user_id int8 NOT NULL, - user_type int2 NOT NULL, - client_id varchar(255) NOT NULL, - scope varchar(255) NOT NULL DEFAULT '', - approved bool NOT NULL DEFAULT '0', - expires_time timestamp NOT NULL, - creator varchar(64) NULL DEFAULT '', - create_time timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, - updater varchar(64) NULL DEFAULT '', - update_time timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, - deleted int2 NOT NULL DEFAULT 0, - tenant_id int8 NOT NULL DEFAULT 0 +CREATE TABLE system_oauth2_approve ( + id int8 NOT NULL, + user_id int8 NOT NULL, + user_type int2 NOT NULL, + client_id varchar(255) NOT NULL, + scope varchar(255) NOT NULL DEFAULT '', + approved bool NOT NULL DEFAULT '0', + expires_time timestamp NOT NULL, + creator varchar(64) NULL DEFAULT '', + create_time timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, + updater varchar(64) NULL DEFAULT '', + update_time timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, + deleted int2 NOT NULL DEFAULT 0, + tenant_id int8 NOT NULL DEFAULT 0 ); -ALTER TABLE system_oauth2_approve - ADD CONSTRAINT pk_system_oauth2_approve PRIMARY KEY (id); +ALTER TABLE system_oauth2_approve ADD CONSTRAINT pk_system_oauth2_approve PRIMARY KEY (id); COMMENT ON COLUMN system_oauth2_approve.id IS '编号'; COMMENT ON COLUMN system_oauth2_approve.user_id IS '用户编号'; @@ -2965,41 +2981,39 @@ COMMENT ON COLUMN system_oauth2_approve.deleted IS '是否删除'; COMMENT ON COLUMN system_oauth2_approve.tenant_id IS '租户编号'; COMMENT ON TABLE system_oauth2_approve IS 'OAuth2 批准表'; -DROP SEQUENCE IF EXISTS system_oauth2_client_seq; -CREATE SEQUENCE system_oauth2_client_seq +DROP SEQUENCE IF EXISTS system_oauth2_approve_seq; +CREATE SEQUENCE system_oauth2_approve_seq START 1; -- ---------------------------- -- Table structure for system_oauth2_client -- ---------------------------- DROP TABLE IF EXISTS system_oauth2_client; -CREATE TABLE system_oauth2_client -( - id int8 NOT NULL default nextval('system_oauth2_client_seq'), - client_id varchar(255) NOT NULL, - secret varchar(255) NOT NULL, - name varchar(255) NOT NULL, - logo varchar(255) NOT NULL, - description varchar(255) NULL DEFAULT NULL, - status int2 NOT NULL, - access_token_validity_seconds int4 NOT NULL, - refresh_token_validity_seconds int4 NOT NULL, - redirect_uris varchar(255) NOT NULL, - authorized_grant_types varchar(255) NOT NULL, - scopes varchar(255) NULL DEFAULT NULL, - auto_approve_scopes varchar(255) NULL DEFAULT NULL, - authorities varchar(255) NULL DEFAULT NULL, - resource_ids varchar(255) NULL DEFAULT NULL, - additional_information varchar(4096) NULL DEFAULT NULL, - creator varchar(64) NULL DEFAULT '', - create_time timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, - updater varchar(64) NULL DEFAULT '', - update_time timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, - deleted int2 NOT NULL DEFAULT 0 +CREATE TABLE system_oauth2_client ( + id int8 NOT NULL, + client_id varchar(255) NOT NULL, + secret varchar(255) NOT NULL, + name varchar(255) NOT NULL, + logo varchar(255) NOT NULL, + description varchar(255) NULL DEFAULT NULL, + status int2 NOT NULL, + access_token_validity_seconds int4 NOT NULL, + refresh_token_validity_seconds int4 NOT NULL, + redirect_uris varchar(255) NOT NULL, + authorized_grant_types varchar(255) NOT NULL, + scopes varchar(255) NULL DEFAULT NULL, + auto_approve_scopes varchar(255) NULL DEFAULT NULL, + authorities varchar(255) NULL DEFAULT NULL, + resource_ids varchar(255) NULL DEFAULT NULL, + additional_information varchar(4096) NULL DEFAULT NULL, + creator varchar(64) NULL DEFAULT '', + create_time timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, + updater varchar(64) NULL DEFAULT '', + update_time timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, + deleted int2 NOT NULL DEFAULT 0 ); -ALTER TABLE system_oauth2_client - ADD CONSTRAINT pk_system_oauth2_client PRIMARY KEY (id); +ALTER TABLE system_oauth2_client ADD CONSTRAINT pk_system_oauth2_client PRIMARY KEY (id); COMMENT ON COLUMN system_oauth2_client.id IS '编号'; COMMENT ON COLUMN system_oauth2_client.client_id IS '客户端编号'; @@ -3029,42 +3043,40 @@ COMMENT ON TABLE system_oauth2_client IS 'OAuth2 客户端表'; -- ---------------------------- -- @formatter:off BEGIN; -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"]', '["user.read","user.write"]', '[]', '["user.read","user.write"]', '[]', '{}', '1', '2022-05-11 21:47:12', '1', '2025-05-02 20:42:22', '0'); +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', '0'); 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', '0'); 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', '0'); -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', '0'); +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', '0'); COMMIT; -- @formatter:on -DROP SEQUENCE IF EXISTS system_oauth2_code_seq; -CREATE SEQUENCE system_oauth2_code_seq - START 1; +DROP SEQUENCE IF EXISTS system_oauth2_client_seq; +CREATE SEQUENCE system_oauth2_client_seq + START 43; -- ---------------------------- -- Table structure for system_oauth2_code -- ---------------------------- DROP TABLE IF EXISTS system_oauth2_code; -CREATE TABLE system_oauth2_code -( - id int8 NOT NULL default nextval('system_oauth2_code_seq'), - user_id int8 NOT NULL, - user_type int2 NOT NULL, - code varchar(32) NOT NULL, - client_id varchar(255) NOT NULL, - scopes varchar(255) NULL DEFAULT '', - expires_time timestamp NOT NULL, - redirect_uri varchar(255) NULL DEFAULT NULL, - state varchar(255) NOT NULL DEFAULT '', - creator varchar(64) NULL DEFAULT '', - create_time timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, - updater varchar(64) NULL DEFAULT '', - update_time timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, - deleted int2 NOT NULL DEFAULT 0, - tenant_id int8 NOT NULL DEFAULT 0 +CREATE TABLE system_oauth2_code ( + id int8 NOT NULL, + user_id int8 NOT NULL, + user_type int2 NOT NULL, + code varchar(32) NOT NULL, + client_id varchar(255) NOT NULL, + scopes varchar(255) NULL DEFAULT '', + expires_time timestamp NOT NULL, + redirect_uri varchar(255) NULL DEFAULT NULL, + state varchar(255) NOT NULL DEFAULT '', + creator varchar(64) NULL DEFAULT '', + create_time timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, + updater varchar(64) NULL DEFAULT '', + update_time timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, + deleted int2 NOT NULL DEFAULT 0, + tenant_id int8 NOT NULL DEFAULT 0 ); -ALTER TABLE system_oauth2_code - ADD CONSTRAINT pk_system_oauth2_code PRIMARY KEY (id); +ALTER TABLE system_oauth2_code ADD CONSTRAINT pk_system_oauth2_code PRIMARY KEY (id); COMMENT ON COLUMN system_oauth2_code.id IS '编号'; COMMENT ON COLUMN system_oauth2_code.user_id IS '用户编号'; @@ -3083,33 +3095,31 @@ COMMENT ON COLUMN system_oauth2_code.deleted IS '是否删除'; COMMENT ON COLUMN system_oauth2_code.tenant_id IS '租户编号'; COMMENT ON TABLE system_oauth2_code IS 'OAuth2 授权码表'; -DROP SEQUENCE IF EXISTS system_oauth2_refresh_token_seq; -CREATE SEQUENCE system_oauth2_refresh_token_seq +DROP SEQUENCE IF EXISTS system_oauth2_code_seq; +CREATE SEQUENCE system_oauth2_code_seq START 1; -- ---------------------------- -- Table structure for system_oauth2_refresh_token -- ---------------------------- DROP TABLE IF EXISTS system_oauth2_refresh_token; -CREATE TABLE system_oauth2_refresh_token -( - id int8 NOT NULL default nextval('system_oauth2_refresh_token_seq'), - user_id int8 NOT NULL, - refresh_token varchar(32) NOT NULL, - user_type int2 NOT NULL, - client_id varchar(255) NOT NULL, - scopes varchar(255) NULL DEFAULT NULL, - expires_time timestamp NOT NULL, - creator varchar(64) NULL DEFAULT '', - create_time timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, - updater varchar(64) NULL DEFAULT '', - update_time timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, - deleted int2 NOT NULL DEFAULT 0, - tenant_id int8 NOT NULL DEFAULT 0 +CREATE TABLE system_oauth2_refresh_token ( + id int8 NOT NULL, + user_id int8 NOT NULL, + refresh_token varchar(32) NOT NULL, + user_type int2 NOT NULL, + client_id varchar(255) NOT NULL, + scopes varchar(255) NULL DEFAULT NULL, + expires_time timestamp NOT NULL, + creator varchar(64) NULL DEFAULT '', + create_time timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, + updater varchar(64) NULL DEFAULT '', + update_time timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, + deleted int2 NOT NULL DEFAULT 0, + tenant_id int8 NOT NULL DEFAULT 0 ); -ALTER TABLE system_oauth2_refresh_token - ADD CONSTRAINT pk_system_oauth2_refresh_token PRIMARY KEY (id); +ALTER TABLE system_oauth2_refresh_token ADD CONSTRAINT pk_system_oauth2_refresh_token PRIMARY KEY (id); COMMENT ON COLUMN system_oauth2_refresh_token.id IS '编号'; COMMENT ON COLUMN system_oauth2_refresh_token.user_id IS '用户编号'; @@ -3126,40 +3136,38 @@ COMMENT ON COLUMN system_oauth2_refresh_token.deleted IS '是否删除'; COMMENT ON COLUMN system_oauth2_refresh_token.tenant_id IS '租户编号'; COMMENT ON TABLE system_oauth2_refresh_token IS 'OAuth2 刷新令牌'; -DROP SEQUENCE IF EXISTS system_operate_log_seq; -CREATE SEQUENCE system_operate_log_seq +DROP SEQUENCE IF EXISTS system_oauth2_refresh_token_seq; +CREATE SEQUENCE system_oauth2_refresh_token_seq START 1; -- ---------------------------- -- Table structure for system_operate_log -- ---------------------------- DROP TABLE IF EXISTS system_operate_log; -CREATE TABLE system_operate_log -( - id int8 NOT NULL default nextval('system_operate_log_seq'), - trace_id varchar(64) NOT NULL DEFAULT '', - user_id int8 NOT NULL, - user_type int2 NOT NULL DEFAULT 0, - type varchar(50) NOT NULL, - sub_type varchar(50) NOT NULL, - biz_id int8 NOT NULL, - action varchar(2000) NOT NULL DEFAULT '', - success bool NOT NULL DEFAULT '1', - extra varchar(2000) NOT NULL DEFAULT '', - request_method varchar(16) NULL DEFAULT '', - request_url varchar(255) NULL DEFAULT '', - user_ip varchar(50) NULL DEFAULT NULL, - user_agent varchar(512) NULL DEFAULT NULL, - creator varchar(64) NULL DEFAULT '', - create_time timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, - updater varchar(64) NULL DEFAULT '', - update_time timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, - deleted int2 NOT NULL DEFAULT 0, - tenant_id int8 NOT NULL DEFAULT 0 +CREATE TABLE system_operate_log ( + id int8 NOT NULL, + trace_id varchar(64) NOT NULL DEFAULT '', + user_id int8 NOT NULL, + user_type int2 NOT NULL DEFAULT 0, + type varchar(50) NOT NULL, + sub_type varchar(50) NOT NULL, + biz_id int8 NOT NULL, + action varchar(2000) NOT NULL DEFAULT '', + success bool NOT NULL DEFAULT '1', + extra varchar(2000) NOT NULL DEFAULT '', + request_method varchar(16) NULL DEFAULT '', + request_url varchar(255) NULL DEFAULT '', + user_ip varchar(50) NULL DEFAULT NULL, + user_agent varchar(512) NULL DEFAULT NULL, + creator varchar(64) NULL DEFAULT '', + create_time timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, + updater varchar(64) NULL DEFAULT '', + update_time timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, + deleted int2 NOT NULL DEFAULT 0, + tenant_id int8 NOT NULL DEFAULT 0 ); -ALTER TABLE system_operate_log - ADD CONSTRAINT pk_system_operate_log PRIMARY KEY (id); +ALTER TABLE system_operate_log ADD CONSTRAINT pk_system_operate_log PRIMARY KEY (id); COMMENT ON COLUMN system_operate_log.id IS '日志主键'; COMMENT ON COLUMN system_operate_log.trace_id IS '链路追踪编号'; @@ -3183,32 +3191,30 @@ COMMENT ON COLUMN system_operate_log.deleted IS '是否删除'; COMMENT ON COLUMN system_operate_log.tenant_id IS '租户编号'; COMMENT ON TABLE system_operate_log IS '操作日志记录 V2 版本'; -DROP SEQUENCE IF EXISTS system_post_seq; -CREATE SEQUENCE system_post_seq +DROP SEQUENCE IF EXISTS system_operate_log_seq; +CREATE SEQUENCE system_operate_log_seq START 1; -- ---------------------------- -- Table structure for system_post -- ---------------------------- DROP TABLE IF EXISTS system_post; -CREATE TABLE system_post -( - id int8 NOT NULL default nextval('system_post_seq'), - code varchar(64) NOT NULL, - name varchar(50) NOT NULL, - sort int4 NOT NULL, - status int2 NOT NULL, - remark varchar(500) NULL DEFAULT NULL, - creator varchar(64) NULL DEFAULT '', - create_time timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, - updater varchar(64) NULL DEFAULT '', - update_time timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, - deleted int2 NOT NULL DEFAULT 0, - tenant_id int8 NOT NULL DEFAULT 0 +CREATE TABLE system_post ( + id int8 NOT NULL, + code varchar(64) NOT NULL, + name varchar(50) NOT NULL, + sort int4 NOT NULL, + status int2 NOT NULL, + remark varchar(500) NULL DEFAULT NULL, + creator varchar(64) NULL DEFAULT '', + create_time timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, + updater varchar(64) NULL DEFAULT '', + update_time timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, + deleted int2 NOT NULL DEFAULT 0, + tenant_id int8 NOT NULL DEFAULT 0 ); -ALTER TABLE system_post - ADD CONSTRAINT pk_system_post PRIMARY KEY (id); +ALTER TABLE system_post ADD CONSTRAINT pk_system_post PRIMARY KEY (id); COMMENT ON COLUMN system_post.id IS '岗位ID'; COMMENT ON COLUMN system_post.code IS '岗位编码'; @@ -3229,49 +3235,47 @@ COMMENT ON TABLE system_post IS '岗位信息表'; -- ---------------------------- -- @formatter:off BEGIN; -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', '0', 1); 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', '0', 1); 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', '0', 1); 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', '0', 1); +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', '0', 1); COMMIT; -- @formatter:on -DROP SEQUENCE IF EXISTS system_role_seq; -CREATE SEQUENCE system_role_seq - START 1; +DROP SEQUENCE IF EXISTS system_post_seq; +CREATE SEQUENCE system_post_seq + START 8; -- ---------------------------- -- Table structure for system_role -- ---------------------------- DROP TABLE IF EXISTS system_role; -CREATE TABLE system_role -( - id int8 NOT NULL default nextval('system_role_seq'), - name varchar(30) NOT NULL, - code varchar(100) NOT NULL, - sort int4 NOT NULL, - data_scope int2 NOT NULL DEFAULT 1, - data_scope_dept_ids varchar(500) NOT NULL DEFAULT '', - status int2 NOT NULL, - type int2 NOT NULL, - remark varchar(500) NULL DEFAULT NULL, - creator varchar(64) NULL DEFAULT '', - create_time timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, - updater varchar(64) NULL DEFAULT '', - update_time timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, - deleted int2 NOT NULL DEFAULT 0, - tenant_id int8 NOT NULL DEFAULT 0 +CREATE TABLE system_role ( + id int8 NOT NULL, + name varchar(30) NOT NULL, + code varchar(100) NOT NULL, + sort int4 NOT NULL, + data_scope int2 NOT NULL DEFAULT 1, + data_scope_dept_ids varchar(500) NOT NULL DEFAULT '', + status int2 NOT NULL, + type int2 NOT NULL, + remark varchar(500) NULL DEFAULT NULL, + creator varchar(64) NULL DEFAULT '', + create_time timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, + updater varchar(64) NULL DEFAULT '', + update_time timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, + deleted int2 NOT NULL DEFAULT 0, + tenant_id int8 NOT NULL DEFAULT 0 ); -ALTER TABLE system_role - ADD CONSTRAINT pk_system_role PRIMARY KEY (id); +ALTER TABLE system_role ADD CONSTRAINT pk_system_role PRIMARY KEY (id); COMMENT ON COLUMN system_role.id IS '角色ID'; COMMENT ON COLUMN system_role.name IS '角色名称'; COMMENT ON COLUMN system_role.code IS '角色权限字符串'; COMMENT ON COLUMN system_role.sort IS '显示顺序'; COMMENT ON COLUMN system_role.data_scope IS '数据范围(1:全部数据权限 2:自定数据权限 3:本部门数据权限 4:本部门及以下数据权限)'; -COMMENT ON COLUMN system_role.data_scope_dept_ids IS '数据范围 ( 指定部门数组)'; +COMMENT ON COLUMN system_role.data_scope_dept_ids IS '数据范围 ( 指定部门数组 ) '; COMMENT ON COLUMN system_role.status IS '角色状态(0正常 1停用)'; COMMENT ON COLUMN system_role.type IS '角色类型'; COMMENT ON COLUMN system_role.remark IS '备注'; @@ -3291,37 +3295,33 @@ BEGIN; INSERT INTO system_role (id, name, code, sort, data_scope, data_scope_dept_ids, status, type, remark, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1, '超级管理员', 'super_admin', 1, 1, '', 0, 1, '超级管理员', 'admin', '2021-01-05 17:03:48', '', '2022-02-22 05:08:21', '0', 1); INSERT INTO system_role (id, name, code, sort, data_scope, data_scope_dept_ids, status, type, remark, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2, '普通角色', 'common', 2, 2, '', 0, 1, '普通角色', 'admin', '2021-01-05 17:03:48', '', '2022-02-22 05:08:20', '0', 1); 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', '0', 1); -INSERT INTO system_role (id, name, code, sort, data_scope, data_scope_dept_ids, status, type, remark, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (101, '测试账号', 'test', 0, 1, '[]', 0, 2, '123', '', '2021-01-06 13:49:35', '1', '2025-04-30 17:38:28', '0', 1); 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', '0', 121); 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', '0', 122); -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', '0', 1); -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 (158, '2', '3', 4, 1, '', 0, 2, NULL, '1', '2025-04-17 20:08:08', '1', '2025-04-17 23:05:31', '0', 1); +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', '0', 1); COMMIT; -- @formatter:on -DROP SEQUENCE IF EXISTS system_role_menu_seq; -CREATE SEQUENCE system_role_menu_seq - START 1; +DROP SEQUENCE IF EXISTS system_role_seq; +CREATE SEQUENCE system_role_seq + START 156; -- ---------------------------- -- Table structure for system_role_menu -- ---------------------------- DROP TABLE IF EXISTS system_role_menu; -CREATE TABLE system_role_menu -( - id int8 NOT NULL default nextval('system_role_menu_seq'), - role_id int8 NOT NULL, - menu_id int8 NOT NULL, - creator varchar(64) NULL DEFAULT '', - create_time timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, - updater varchar(64) NULL DEFAULT '', - update_time timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, - deleted int2 NOT NULL DEFAULT 0, - tenant_id int8 NOT NULL DEFAULT 0 +CREATE TABLE system_role_menu ( + id int8 NOT NULL, + role_id int8 NOT NULL, + menu_id int8 NOT NULL, + creator varchar(64) NULL DEFAULT '', + create_time timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, + updater varchar(64) NULL DEFAULT '', + update_time timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, + deleted int2 NOT NULL DEFAULT 0, + tenant_id int8 NOT NULL DEFAULT 0 ); -ALTER TABLE system_role_menu - ADD CONSTRAINT pk_system_role_menu PRIMARY KEY (id); +ALTER TABLE system_role_menu ADD CONSTRAINT pk_system_role_menu PRIMARY KEY (id); COMMENT ON COLUMN system_role_menu.id IS '自增编号'; COMMENT ON COLUMN system_role_menu.role_id IS '角色ID'; @@ -3374,87 +3374,6 @@ INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, update INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (707, 2, 113, '1', '2022-02-22 13:16:57', '1', '2022-02-22 13:16:57', '0', 1); INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1296, 110, 1, '110', '2022-02-23 00:23:55', '110', '2022-02-23 00:23:55', '0', 121); INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1578, 111, 1, '1', '2022-03-07 21:37:58', '1', '2022-03-07 21:37:58', '0', 122); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1604, 101, 1216, '1', '2022-03-19 21:45:52', '1', '2022-03-19 21:45:52', '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1605, 101, 1217, '1', '2022-03-19 21:45:52', '1', '2022-03-19 21:45:52', '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1606, 101, 1218, '1', '2022-03-19 21:45:52', '1', '2022-03-19 21:45:52', '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1607, 101, 1219, '1', '2022-03-19 21:45:52', '1', '2022-03-19 21:45:52', '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1608, 101, 1220, '1', '2022-03-19 21:45:52', '1', '2022-03-19 21:45:52', '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1609, 101, 1221, '1', '2022-03-19 21:45:52', '1', '2022-03-19 21:45:52', '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1610, 101, 5, '1', '2022-03-19 21:45:52', '1', '2022-03-19 21:45:52', '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1611, 101, 1222, '1', '2022-03-19 21:45:52', '1', '2022-03-19 21:45:52', '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1612, 101, 1118, '1', '2022-03-19 21:45:52', '1', '2022-03-19 21:45:52', '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1613, 101, 1119, '1', '2022-03-19 21:45:52', '1', '2022-03-19 21:45:52', '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1614, 101, 1120, '1', '2022-03-19 21:45:52', '1', '2022-03-19 21:45:52', '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1615, 101, 1185, '1', '2022-03-19 21:45:52', '1', '2022-03-19 21:45:52', '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1616, 101, 1186, '1', '2022-03-19 21:45:52', '1', '2022-03-19 21:45:52', '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1617, 101, 1187, '1', '2022-03-19 21:45:52', '1', '2022-03-19 21:45:52', '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1618, 101, 1188, '1', '2022-03-19 21:45:52', '1', '2022-03-19 21:45:52', '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1619, 101, 1189, '1', '2022-03-19 21:45:52', '1', '2022-03-19 21:45:52', '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1620, 101, 1190, '1', '2022-03-19 21:45:52', '1', '2022-03-19 21:45:52', '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1621, 101, 1191, '1', '2022-03-19 21:45:52', '1', '2022-03-19 21:45:52', '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1622, 101, 1192, '1', '2022-03-19 21:45:52', '1', '2022-03-19 21:45:52', '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1623, 101, 1193, '1', '2022-03-19 21:45:52', '1', '2022-03-19 21:45:52', '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1624, 101, 1194, '1', '2022-03-19 21:45:52', '1', '2022-03-19 21:45:52', '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1625, 101, 1195, '1', '2022-03-19 21:45:52', '1', '2022-03-19 21:45:52', '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1627, 101, 1197, '1', '2022-03-19 21:45:52', '1', '2022-03-19 21:45:52', '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1628, 101, 1198, '1', '2022-03-19 21:45:52', '1', '2022-03-19 21:45:52', '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1629, 101, 1199, '1', '2022-03-19 21:45:52', '1', '2022-03-19 21:45:52', '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1630, 101, 1200, '1', '2022-03-19 21:45:52', '1', '2022-03-19 21:45:52', '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1631, 101, 1201, '1', '2022-03-19 21:45:52', '1', '2022-03-19 21:45:52', '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1632, 101, 1202, '1', '2022-03-19 21:45:52', '1', '2022-03-19 21:45:52', '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1633, 101, 1207, '1', '2022-03-19 21:45:52', '1', '2022-03-19 21:45:52', '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1634, 101, 1208, '1', '2022-03-19 21:45:52', '1', '2022-03-19 21:45:52', '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1635, 101, 1209, '1', '2022-03-19 21:45:52', '1', '2022-03-19 21:45:52', '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1636, 101, 1210, '1', '2022-03-19 21:45:52', '1', '2022-03-19 21:45:52', '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1637, 101, 1211, '1', '2022-03-19 21:45:52', '1', '2022-03-19 21:45:52', '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1638, 101, 1212, '1', '2022-03-19 21:45:52', '1', '2022-03-19 21:45:52', '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1639, 101, 1213, '1', '2022-03-19 21:45:52', '1', '2022-03-19 21:45:52', '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1640, 101, 1215, '1', '2022-03-19 21:45:52', '1', '2022-03-19 21:45:52', '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1641, 101, 2, '1', '2022-04-01 22:21:24', '1', '2022-04-01 22:21:24', '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1642, 101, 1031, '1', '2022-04-01 22:21:37', '1', '2022-04-01 22:21:37', '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1643, 101, 1032, '1', '2022-04-01 22:21:37', '1', '2022-04-01 22:21:37', '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1644, 101, 1033, '1', '2022-04-01 22:21:37', '1', '2022-04-01 22:21:37', '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1645, 101, 1034, '1', '2022-04-01 22:21:37', '1', '2022-04-01 22:21:37', '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1646, 101, 1035, '1', '2022-04-01 22:21:37', '1', '2022-04-01 22:21:37', '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1647, 101, 1050, '1', '2022-04-01 22:21:37', '1', '2022-04-01 22:21:37', '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1648, 101, 1051, '1', '2022-04-01 22:21:37', '1', '2022-04-01 22:21:37', '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1649, 101, 1052, '1', '2022-04-01 22:21:37', '1', '2022-04-01 22:21:37', '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1650, 101, 1053, '1', '2022-04-01 22:21:37', '1', '2022-04-01 22:21:37', '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1651, 101, 1054, '1', '2022-04-01 22:21:37', '1', '2022-04-01 22:21:37', '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1652, 101, 1056, '1', '2022-04-01 22:21:37', '1', '2022-04-01 22:21:37', '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1653, 101, 1057, '1', '2022-04-01 22:21:37', '1', '2022-04-01 22:21:37', '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1654, 101, 1058, '1', '2022-04-01 22:21:37', '1', '2022-04-01 22:21:37', '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1655, 101, 1059, '1', '2022-04-01 22:21:37', '1', '2022-04-01 22:21:37', '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1656, 101, 1060, '1', '2022-04-01 22:21:37', '1', '2022-04-01 22:21:37', '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1657, 101, 1066, '1', '2022-04-01 22:21:37', '1', '2022-04-01 22:21:37', '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1658, 101, 1067, '1', '2022-04-01 22:21:37', '1', '2022-04-01 22:21:37', '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1659, 101, 1070, '1', '2022-04-01 22:21:37', '1', '2022-04-01 22:21:37', '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1664, 101, 1075, '1', '2022-04-01 22:21:37', '1', '2022-04-01 22:21:37', '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1666, 101, 1077, '1', '2022-04-01 22:21:37', '1', '2022-04-01 22:21:37', '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1667, 101, 1078, '1', '2022-04-01 22:21:37', '1', '2022-04-01 22:21:37', '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1668, 101, 1082, '1', '2022-04-01 22:21:37', '1', '2022-04-01 22:21:37', '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1669, 101, 1083, '1', '2022-04-01 22:21:37', '1', '2022-04-01 22:21:37', '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1670, 101, 1084, '1', '2022-04-01 22:21:37', '1', '2022-04-01 22:21:37', '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1671, 101, 1085, '1', '2022-04-01 22:21:37', '1', '2022-04-01 22:21:37', '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1672, 101, 1086, '1', '2022-04-01 22:21:37', '1', '2022-04-01 22:21:37', '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1673, 101, 1087, '1', '2022-04-01 22:21:37', '1', '2022-04-01 22:21:37', '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1674, 101, 1088, '1', '2022-04-01 22:21:37', '1', '2022-04-01 22:21:37', '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1675, 101, 1089, '1', '2022-04-01 22:21:37', '1', '2022-04-01 22:21:37', '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1679, 101, 1237, '1', '2022-04-01 22:21:37', '1', '2022-04-01 22:21:37', '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1680, 101, 1238, '1', '2022-04-01 22:21:37', '1', '2022-04-01 22:21:37', '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1681, 101, 1239, '1', '2022-04-01 22:21:37', '1', '2022-04-01 22:21:37', '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1682, 101, 1240, '1', '2022-04-01 22:21:37', '1', '2022-04-01 22:21:37', '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1683, 101, 1241, '1', '2022-04-01 22:21:37', '1', '2022-04-01 22:21:37', '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1684, 101, 1242, '1', '2022-04-01 22:21:37', '1', '2022-04-01 22:21:37', '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1685, 101, 1243, '1', '2022-04-01 22:21:37', '1', '2022-04-01 22:21:37', '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1687, 101, 106, '1', '2022-04-01 22:21:37', '1', '2022-04-01 22:21:37', '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1688, 101, 110, '1', '2022-04-01 22:21:37', '1', '2022-04-01 22:21:37', '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1689, 101, 111, '1', '2022-04-01 22:21:37', '1', '2022-04-01 22:21:37', '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1690, 101, 112, '1', '2022-04-01 22:21:37', '1', '2022-04-01 22:21:37', '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1691, 101, 113, '1', '2022-04-01 22:21:37', '1', '2022-04-01 22:21:37', '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1692, 101, 114, '1', '2022-04-01 22:21:37', '1', '2022-04-01 22:21:37', '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1693, 101, 115, '1', '2022-04-01 22:21:37', '1', '2022-04-01 22:21:37', '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1694, 101, 116, '1', '2022-04-01 22:21:37', '1', '2022-04-01 22:21:37', '0', 1); INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1729, 109, 100, '1', '2022-09-21 22:08:51', '1', '2022-09-21 22:08:51', '0', 121); INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1730, 109, 101, '1', '2022-09-21 22:08:51', '1', '2022-09-21 22:08:51', '0', 121); INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1731, 109, 1063, '1', '2022-09-21 22:08:51', '1', '2022-09-21 22:08:51', '0', 121); @@ -3734,119 +3653,6 @@ INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, update INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2182, 2, 2016, '1', '2023-01-25 08:43:12', '1', '2023-01-25 08:43:12', '0', 1); INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2183, 2, 2017, '1', '2023-01-25 08:43:12', '1', '2023-01-25 08:43:12', '0', 1); INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2184, 2, 2018, '1', '2023-01-25 08:43:12', '1', '2023-01-25 08:43:12', '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2188, 101, 1024, '1', '2023-02-09 23:49:46', '1', '2023-02-09 23:49:46', '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2189, 101, 1, '1', '2023-02-09 23:49:46', '1', '2023-02-09 23:49:46', '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2190, 101, 1025, '1', '2023-02-09 23:49:46', '1', '2023-02-09 23:49:46', '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2191, 101, 1026, '1', '2023-02-09 23:49:46', '1', '2023-02-09 23:49:46', '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2192, 101, 1027, '1', '2023-02-09 23:49:46', '1', '2023-02-09 23:49:46', '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2193, 101, 1028, '1', '2023-02-09 23:49:46', '1', '2023-02-09 23:49:46', '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2194, 101, 1029, '1', '2023-02-09 23:49:46', '1', '2023-02-09 23:49:46', '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2195, 101, 1030, '1', '2023-02-09 23:49:46', '1', '2023-02-09 23:49:46', '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2196, 101, 1036, '1', '2023-02-09 23:49:46', '1', '2023-02-09 23:49:46', '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2197, 101, 1037, '1', '2023-02-09 23:49:46', '1', '2023-02-09 23:49:46', '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2198, 101, 1038, '1', '2023-02-09 23:49:46', '1', '2023-02-09 23:49:46', '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2199, 101, 1039, '1', '2023-02-09 23:49:46', '1', '2023-02-09 23:49:46', '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2200, 101, 1040, '1', '2023-02-09 23:49:46', '1', '2023-02-09 23:49:46', '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2201, 101, 1042, '1', '2023-02-09 23:49:46', '1', '2023-02-09 23:49:46', '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2202, 101, 1043, '1', '2023-02-09 23:49:46', '1', '2023-02-09 23:49:46', '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2203, 101, 1045, '1', '2023-02-09 23:49:46', '1', '2023-02-09 23:49:46', '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2204, 101, 1046, '1', '2023-02-09 23:49:46', '1', '2023-02-09 23:49:46', '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2205, 101, 1048, '1', '2023-02-09 23:49:46', '1', '2023-02-09 23:49:46', '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2206, 101, 2083, '1', '2023-02-09 23:49:46', '1', '2023-02-09 23:49:46', '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2207, 101, 1063, '1', '2023-02-09 23:49:46', '1', '2023-02-09 23:49:46', '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2208, 101, 1064, '1', '2023-02-09 23:49:46', '1', '2023-02-09 23:49:46', '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2209, 101, 1065, '1', '2023-02-09 23:49:46', '1', '2023-02-09 23:49:46', '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2210, 101, 1093, '1', '2023-02-09 23:49:46', '1', '2023-02-09 23:49:46', '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2211, 101, 1094, '1', '2023-02-09 23:49:46', '1', '2023-02-09 23:49:46', '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2212, 101, 1095, '1', '2023-02-09 23:49:46', '1', '2023-02-09 23:49:46', '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2213, 101, 1096, '1', '2023-02-09 23:49:46', '1', '2023-02-09 23:49:46', '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2214, 101, 1097, '1', '2023-02-09 23:49:46', '1', '2023-02-09 23:49:46', '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2215, 101, 1098, '1', '2023-02-09 23:49:46', '1', '2023-02-09 23:49:46', '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2216, 101, 1100, '1', '2023-02-09 23:49:46', '1', '2023-02-09 23:49:46', '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2217, 101, 1101, '1', '2023-02-09 23:49:46', '1', '2023-02-09 23:49:46', '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2218, 101, 1102, '1', '2023-02-09 23:49:46', '1', '2023-02-09 23:49:46', '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2219, 101, 1103, '1', '2023-02-09 23:49:46', '1', '2023-02-09 23:49:46', '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2220, 101, 1104, '1', '2023-02-09 23:49:46', '1', '2023-02-09 23:49:46', '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2221, 101, 1105, '1', '2023-02-09 23:49:46', '1', '2023-02-09 23:49:46', '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2222, 101, 1106, '1', '2023-02-09 23:49:46', '1', '2023-02-09 23:49:46', '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2223, 101, 2130, '1', '2023-02-09 23:49:46', '1', '2023-02-09 23:49:46', '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2224, 101, 1107, '1', '2023-02-09 23:49:46', '1', '2023-02-09 23:49:46', '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2225, 101, 2131, '1', '2023-02-09 23:49:46', '1', '2023-02-09 23:49:46', '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2226, 101, 1108, '1', '2023-02-09 23:49:46', '1', '2023-02-09 23:49:46', '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2227, 101, 2132, '1', '2023-02-09 23:49:46', '1', '2023-02-09 23:49:46', '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2228, 101, 1109, '1', '2023-02-09 23:49:46', '1', '2023-02-09 23:49:46', '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2229, 101, 2133, '1', '2023-02-09 23:49:46', '1', '2023-02-09 23:49:46', '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2230, 101, 2134, '1', '2023-02-09 23:49:46', '1', '2023-02-09 23:49:46', '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2232, 101, 2135, '1', '2023-02-09 23:49:46', '1', '2023-02-09 23:49:46', '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2234, 101, 2136, '1', '2023-02-09 23:49:46', '1', '2023-02-09 23:49:46', '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2236, 101, 2137, '1', '2023-02-09 23:49:46', '1', '2023-02-09 23:49:46', '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2238, 101, 2138, '1', '2023-02-09 23:49:46', '1', '2023-02-09 23:49:46', '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2240, 101, 2139, '1', '2023-02-09 23:49:46', '1', '2023-02-09 23:49:46', '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2242, 101, 2140, '1', '2023-02-09 23:49:46', '1', '2023-02-09 23:49:46', '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2243, 101, 2141, '1', '2023-02-09 23:49:46', '1', '2023-02-09 23:49:46', '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2244, 101, 2142, '1', '2023-02-09 23:49:46', '1', '2023-02-09 23:49:46', '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2245, 101, 2143, '1', '2023-02-09 23:49:46', '1', '2023-02-09 23:49:46', '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2246, 101, 2144, '1', '2023-02-09 23:49:46', '1', '2023-02-09 23:49:46', '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2247, 101, 2145, '1', '2023-02-09 23:49:46', '1', '2023-02-09 23:49:46', '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2248, 101, 2146, '1', '2023-02-09 23:49:46', '1', '2023-02-09 23:49:46', '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2249, 101, 2147, '1', '2023-02-09 23:49:46', '1', '2023-02-09 23:49:46', '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2250, 101, 100, '1', '2023-02-09 23:49:46', '1', '2023-02-09 23:49:46', '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2251, 101, 2148, '1', '2023-02-09 23:49:46', '1', '2023-02-09 23:49:46', '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2252, 101, 101, '1', '2023-02-09 23:49:46', '1', '2023-02-09 23:49:46', '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2253, 101, 2149, '1', '2023-02-09 23:49:46', '1', '2023-02-09 23:49:46', '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2254, 101, 102, '1', '2023-02-09 23:49:46', '1', '2023-02-09 23:49:46', '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2255, 101, 2150, '1', '2023-02-09 23:49:46', '1', '2023-02-09 23:49:46', '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2256, 101, 103, '1', '2023-02-09 23:49:46', '1', '2023-02-09 23:49:46', '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2257, 101, 2151, '1', '2023-02-09 23:49:46', '1', '2023-02-09 23:49:46', '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2258, 101, 104, '1', '2023-02-09 23:49:46', '1', '2023-02-09 23:49:46', '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2259, 101, 2152, '1', '2023-02-09 23:49:46', '1', '2023-02-09 23:49:46', '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2260, 101, 105, '1', '2023-02-09 23:49:46', '1', '2023-02-09 23:49:46', '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2261, 101, 107, '1', '2023-02-09 23:49:46', '1', '2023-02-09 23:49:46', '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2262, 101, 108, '1', '2023-02-09 23:49:46', '1', '2023-02-09 23:49:46', '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2263, 101, 109, '1', '2023-02-09 23:49:46', '1', '2023-02-09 23:49:46', '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2264, 101, 1138, '1', '2023-02-09 23:49:46', '1', '2023-02-09 23:49:46', '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2265, 101, 1139, '1', '2023-02-09 23:49:46', '1', '2023-02-09 23:49:46', '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2266, 101, 1140, '1', '2023-02-09 23:49:46', '1', '2023-02-09 23:49:46', '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2267, 101, 1141, '1', '2023-02-09 23:49:46', '1', '2023-02-09 23:49:46', '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2268, 101, 1142, '1', '2023-02-09 23:49:46', '1', '2023-02-09 23:49:46', '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2269, 101, 1143, '1', '2023-02-09 23:49:46', '1', '2023-02-09 23:49:46', '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2270, 101, 1224, '1', '2023-02-09 23:49:46', '1', '2023-02-09 23:49:46', '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2271, 101, 1225, '1', '2023-02-09 23:49:46', '1', '2023-02-09 23:49:46', '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2272, 101, 1226, '1', '2023-02-09 23:49:46', '1', '2023-02-09 23:49:46', '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2273, 101, 1227, '1', '2023-02-09 23:49:46', '1', '2023-02-09 23:49:46', '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2274, 101, 1228, '1', '2023-02-09 23:49:46', '1', '2023-02-09 23:49:46', '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2275, 101, 1229, '1', '2023-02-09 23:49:46', '1', '2023-02-09 23:49:46', '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2282, 101, 1261, '1', '2023-02-09 23:49:46', '1', '2023-02-09 23:49:46', '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2283, 101, 1263, '1', '2023-02-09 23:49:46', '1', '2023-02-09 23:49:46', '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2284, 101, 1264, '1', '2023-02-09 23:49:46', '1', '2023-02-09 23:49:46', '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2285, 101, 1265, '1', '2023-02-09 23:49:46', '1', '2023-02-09 23:49:46', '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2286, 101, 1266, '1', '2023-02-09 23:49:46', '1', '2023-02-09 23:49:46', '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2287, 101, 1267, '1', '2023-02-09 23:49:46', '1', '2023-02-09 23:49:46', '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2288, 101, 1001, '1', '2023-02-09 23:49:46', '1', '2023-02-09 23:49:46', '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2289, 101, 1002, '1', '2023-02-09 23:49:46', '1', '2023-02-09 23:49:46', '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2290, 101, 1003, '1', '2023-02-09 23:49:46', '1', '2023-02-09 23:49:46', '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2291, 101, 1004, '1', '2023-02-09 23:49:46', '1', '2023-02-09 23:49:46', '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2292, 101, 1005, '1', '2023-02-09 23:49:46', '1', '2023-02-09 23:49:46', '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2293, 101, 1006, '1', '2023-02-09 23:49:46', '1', '2023-02-09 23:49:46', '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2294, 101, 1007, '1', '2023-02-09 23:49:46', '1', '2023-02-09 23:49:46', '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2295, 101, 1008, '1', '2023-02-09 23:49:46', '1', '2023-02-09 23:49:46', '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2296, 101, 1009, '1', '2023-02-09 23:49:46', '1', '2023-02-09 23:49:46', '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2297, 101, 1010, '1', '2023-02-09 23:49:46', '1', '2023-02-09 23:49:46', '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2298, 101, 1011, '1', '2023-02-09 23:49:46', '1', '2023-02-09 23:49:46', '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2299, 101, 1012, '1', '2023-02-09 23:49:46', '1', '2023-02-09 23:49:46', '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2300, 101, 500, '1', '2023-02-09 23:49:46', '1', '2023-02-09 23:49:46', '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2301, 101, 1013, '1', '2023-02-09 23:49:46', '1', '2023-02-09 23:49:46', '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2302, 101, 501, '1', '2023-02-09 23:49:46', '1', '2023-02-09 23:49:46', '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2303, 101, 1014, '1', '2023-02-09 23:49:46', '1', '2023-02-09 23:49:46', '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2304, 101, 1015, '1', '2023-02-09 23:49:46', '1', '2023-02-09 23:49:46', '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2305, 101, 1016, '1', '2023-02-09 23:49:46', '1', '2023-02-09 23:49:46', '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2306, 101, 1017, '1', '2023-02-09 23:49:46', '1', '2023-02-09 23:49:46', '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2307, 101, 1018, '1', '2023-02-09 23:49:46', '1', '2023-02-09 23:49:46', '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2308, 101, 1019, '1', '2023-02-09 23:49:46', '1', '2023-02-09 23:49:46', '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2309, 101, 1020, '1', '2023-02-09 23:49:46', '1', '2023-02-09 23:49:46', '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2310, 101, 1021, '1', '2023-02-09 23:49:46', '1', '2023-02-09 23:49:46', '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2311, 101, 1022, '1', '2023-02-09 23:49:46', '1', '2023-02-09 23:49:46', '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2312, 101, 1023, '1', '2023-02-09 23:49:46', '1', '2023-02-09 23:49:46', '0', 1); INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2929, 109, 1224, '1', '2023-12-02 23:19:40', '1', '2023-12-02 23:19:40', '0', 121); INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2930, 109, 1225, '1', '2023-12-02 23:19:40', '1', '2023-12-02 23:19:40', '0', 121); INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2931, 109, 1226, '1', '2023-12-02 23:19:40', '1', '2023-12-02 23:19:40', '0', 121); @@ -4064,7 +3870,6 @@ INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, update INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4193, 109, 2730, '1', '2024-03-30 17:53:17', '1', '2024-03-30 17:53:17', '0', 121); INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4194, 109, 1195, '1', '2024-03-30 17:53:17', '1', '2024-03-30 17:53:17', '0', 121); INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4195, 109, 2731, '1', '2024-03-30 17:53:17', '1', '2024-03-30 17:53:17', '0', 121); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4196, 109, 1196, '1', '2024-03-30 17:53:17', '1', '2024-03-30 17:53:17', '0', 121); INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4197, 109, 2732, '1', '2024-03-30 17:53:17', '1', '2024-03-30 17:53:17', '0', 121); INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4198, 109, 1197, '1', '2024-03-30 17:53:17', '1', '2024-03-30 17:53:17', '0', 121); INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4199, 109, 2733, '1', '2024-03-30 17:53:17', '1', '2024-03-30 17:53:17', '0', 121); @@ -4123,7 +3928,6 @@ INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, update INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4252, 111, 2730, '1', '2024-03-30 17:53:18', '1', '2024-03-30 17:53:18', '0', 122); INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4253, 111, 1195, '1', '2024-03-30 17:53:18', '1', '2024-03-30 17:53:18', '0', 122); INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4254, 111, 2731, '1', '2024-03-30 17:53:18', '1', '2024-03-30 17:53:18', '0', 122); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4255, 111, 1196, '1', '2024-03-30 17:53:18', '1', '2024-03-30 17:53:18', '0', 122); INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4256, 111, 2732, '1', '2024-03-30 17:53:18', '1', '2024-03-30 17:53:18', '0', 122); INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4257, 111, 1197, '1', '2024-03-30 17:53:18', '1', '2024-03-30 17:53:18', '0', 122); INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4258, 111, 2733, '1', '2024-03-30 17:53:18', '1', '2024-03-30 17:53:18', '0', 122); @@ -4149,8 +3953,6 @@ INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, update INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4278, 111, 1220, '1', '2024-03-30 17:53:18', '1', '2024-03-30 17:53:18', '0', 122); INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4279, 111, 1221, '1', '2024-03-30 17:53:18', '1', '2024-03-30 17:53:18', '0', 122); INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4280, 111, 1222, '1', '2024-03-30 17:53:18', '1', '2024-03-30 17:53:18', '0', 122); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (5777, 101, 2739, '1', '2024-04-30 09:38:37', '1', '2024-04-30 09:38:37', '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (5778, 101, 2740, '1', '2024-04-30 09:38:37', '1', '2024-04-30 09:38:37', '0', 1); INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (5779, 2, 2739, '1', '2024-07-07 20:39:38', '1', '2024-07-07 20:39:38', '0', 1); INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (5780, 2, 2740, '1', '2024-07-07 20:39:38', '1', '2024-07-07 20:39:38', '0', 1); INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (5781, 2, 2758, '1', '2024-07-07 20:39:38', '1', '2024-07-07 20:39:38', '0', 1); @@ -4158,9 +3960,6 @@ INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, update INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (5783, 2, 2362, '1', '2024-07-07 20:39:38', '1', '2024-07-07 20:39:38', '0', 1); INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (5784, 2, 2387, '1', '2024-07-07 20:39:38', '1', '2024-07-07 20:39:38', '0', 1); INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (5785, 2, 2030, '1', '2024-07-07 20:39:38', '1', '2024-07-07 20:39:38', '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (5786, 101, 2758, '1', '2024-07-07 20:39:55', '1', '2024-07-07 20:39:55', '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (5787, 101, 2759, '1', '2024-07-07 20:39:55', '1', '2024-07-07 20:39:55', '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (5788, 101, 2783, '1', '2024-07-07 20:39:55', '1', '2024-07-07 20:39:55', '0', 1); INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (5789, 109, 2739, '1', '2024-07-13 22:37:24', '1', '2024-07-13 22:37:24', '0', 121); INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (5790, 109, 2740, '1', '2024-07-13 22:37:24', '1', '2024-07-13 22:37:24', '0', 121); INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (5791, 111, 2739, '1', '2024-07-13 22:37:24', '1', '2024-07-13 22:37:24', '0', 122); @@ -4181,7 +3980,6 @@ INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, update INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (6115, 155, 4043, '1', '2025-04-01 13:49:30', '1', '2025-04-01 13:49:30', '0', 1); INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (6116, 155, 4044, '1', '2025-04-01 13:49:30', '1', '2025-04-01 13:49:30', '0', 1); INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (6117, 155, 4045, '1', '2025-04-01 13:49:30', '1', '2025-04-01 13:49:30', '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (6118, 155, 4046, '1', '2025-04-01 13:49:30', '1', '2025-04-01 13:49:30', '0', 1); INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (6119, 155, 4001, '1', '2025-04-01 13:49:30', '1', '2025-04-01 13:49:30', '0', 1); INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (6120, 155, 4002, '1', '2025-04-01 13:49:30', '1', '2025-04-01 13:49:30', '0', 1); INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (6121, 155, 4003, '1', '2025-04-01 13:49:30', '1', '2025-04-01 13:49:30', '0', 1); @@ -4201,37 +3999,188 @@ INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, update 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', '0', 1); 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', '0', 1); 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', '0', 1); -INSERT INTO system_role_menu (id, role_id, menu_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (6138, 101, 5010, '1', '2025-05-05 17:49:17', '1', '2025-05-05 17:49:17', '0', 1); +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', '0', 121); +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', '0', 121); +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', '0', 121); +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', '0', 121); +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', '0', 121); +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', '0', 121); +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', '0', 121); +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', '0', 121); +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', '0', 121); +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', '0', 121); +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', '0', 121); +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', '0', 121); +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', '0', 121); +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', '0', 121); +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', '0', 121); +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', '0', 121); +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', '0', 121); +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', '0', 121); +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', '0', 121); +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', '0', 121); +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', '0', 121); +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', '0', 121); +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', '0', 121); +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', '0', 121); +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', '0', 121); +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', '0', 121); +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', '0', 121); +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', '0', 121); +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', '0', 121); +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', '0', 121); +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', '0', 121); +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', '0', 121); +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', '0', 121); +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', '0', 121); +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', '0', 121); +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', '0', 121); +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', '0', 121); +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', '0', 121); +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', '0', 121); +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', '0', 122); +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', '0', 122); +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', '0', 122); +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', '0', 122); +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', '0', 122); +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', '0', 122); +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', '0', 122); +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', '0', 122); +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', '0', 122); +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', '0', 122); +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', '0', 122); +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', '0', 122); +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', '0', 122); +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', '0', 122); +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', '0', 122); +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', '0', 122); +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', '0', 122); +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', '0', 122); +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', '0', 122); +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', '0', 122); +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', '0', 122); +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', '0', 122); +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', '0', 122); +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', '0', 122); +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', '0', 122); +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', '0', 122); +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', '0', 122); +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', '0', 122); +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', '0', 122); +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', '0', 122); +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', '0', 122); +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', '0', 122); +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', '0', 122); +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', '0', 122); +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', '0', 122); +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', '0', 122); +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', '0', 122); +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', '0', 122); +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', '0', 122); +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', '0', 121); +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', '0', 121); +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', '0', 121); +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', '0', 121); +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', '0', 121); +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', '0', 121); +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', '0', 121); +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', '0', 121); +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', '0', 121); +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', '0', 121); +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', '0', 121); +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', '0', 121); +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', '0', 121); +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', '0', 121); +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', '0', 121); +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', '0', 121); +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', '0', 121); +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', '0', 121); +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', '0', 121); +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', '0', 121); +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', '0', 121); +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', '0', 121); +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', '0', 121); +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', '0', 121); +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', '0', 121); +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', '0', 121); +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', '0', 121); +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', '0', 121); +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', '0', 121); +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', '0', 121); +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', '0', 121); +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', '0', 121); +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', '0', 121); +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', '0', 121); +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', '0', 121); +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', '0', 121); +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', '0', 121); +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', '0', 121); +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', '0', 122); +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', '0', 122); +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', '0', 122); +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', '0', 122); +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', '0', 122); +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', '0', 122); +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', '0', 122); +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', '0', 122); +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', '0', 122); +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', '0', 122); +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', '0', 122); +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', '0', 122); +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', '0', 122); +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', '0', 122); +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', '0', 122); +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', '0', 122); +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', '0', 122); +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', '0', 122); +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', '0', 122); +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', '0', 122); +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', '0', 122); +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', '0', 122); +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', '0', 122); +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', '0', 122); +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', '0', 122); +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', '0', 122); +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', '0', 122); +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', '0', 122); +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', '0', 122); +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', '0', 122); +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', '0', 122); +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', '0', 122); +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', '0', 122); +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', '0', 122); +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', '0', 122); +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', '0', 122); +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', '0', 122); +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', '0', 122); COMMIT; -- @formatter:on -DROP SEQUENCE IF EXISTS system_sms_channel_seq; -CREATE SEQUENCE system_sms_channel_seq - START 1; +DROP SEQUENCE IF EXISTS system_role_menu_seq; +CREATE SEQUENCE system_role_menu_seq + START 6293; -- ---------------------------- -- Table structure for system_sms_channel -- ---------------------------- DROP TABLE IF EXISTS system_sms_channel; -CREATE TABLE system_sms_channel -( - id int8 NOT NULL default nextval('system_sms_channel_seq'), - signature varchar(12) NOT NULL, - code varchar(63) NOT NULL, - status int2 NOT NULL, - remark varchar(255) NULL DEFAULT NULL, - api_key varchar(128) NOT NULL, - api_secret varchar(128) NULL DEFAULT NULL, - callback_url varchar(255) NULL DEFAULT NULL, - creator varchar(64) NULL DEFAULT '', - create_time timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, - updater varchar(64) NULL DEFAULT '', - update_time timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, - deleted int2 NOT NULL DEFAULT 0 +CREATE TABLE system_sms_channel ( + id int8 NOT NULL, + signature varchar(12) NOT NULL, + code varchar(63) NOT NULL, + status int2 NOT NULL, + remark varchar(255) NULL DEFAULT NULL, + api_key varchar(128) NOT NULL, + api_secret varchar(128) NULL DEFAULT NULL, + callback_url varchar(255) NULL DEFAULT NULL, + creator varchar(64) NULL DEFAULT '', + create_time timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, + updater varchar(64) NULL DEFAULT '', + update_time timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, + deleted int2 NOT NULL DEFAULT 0 ); -ALTER TABLE system_sms_channel - ADD CONSTRAINT pk_system_sms_channel PRIMARY KEY (id); +ALTER TABLE system_sms_channel ADD CONSTRAINT pk_system_sms_channel PRIMARY KEY (id); COMMENT ON COLUMN system_sms_channel.id IS '编号'; COMMENT ON COLUMN system_sms_channel.signature IS '短信签名'; @@ -4259,35 +4208,33 @@ INSERT INTO system_sms_channel (id, signature, code, status, remark, api_key, ap COMMIT; -- @formatter:on -DROP SEQUENCE IF EXISTS system_sms_code_seq; -CREATE SEQUENCE system_sms_code_seq - START 1; +DROP SEQUENCE IF EXISTS system_sms_channel_seq; +CREATE SEQUENCE system_sms_channel_seq + START 8; -- ---------------------------- -- Table structure for system_sms_code -- ---------------------------- DROP TABLE IF EXISTS system_sms_code; -CREATE TABLE system_sms_code -( - id int8 NOT NULL default nextval('system_sms_code_seq'), - mobile varchar(11) NOT NULL, - code varchar(6) NOT NULL, - create_ip varchar(15) NOT NULL, - scene int2 NOT NULL, - today_index int2 NOT NULL, - used int2 NOT NULL, - used_time timestamp NULL DEFAULT NULL, - used_ip varchar(255) NULL DEFAULT NULL, - creator varchar(64) NULL DEFAULT '', - create_time timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, - updater varchar(64) NULL DEFAULT '', - update_time timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, - deleted int2 NOT NULL DEFAULT 0, - tenant_id int8 NOT NULL DEFAULT 0 +CREATE TABLE system_sms_code ( + id int8 NOT NULL, + mobile varchar(11) NOT NULL, + code varchar(6) NOT NULL, + create_ip varchar(15) NOT NULL, + scene int2 NOT NULL, + today_index int2 NOT NULL, + used int2 NOT NULL, + used_time timestamp NULL DEFAULT NULL, + used_ip varchar(255) NULL DEFAULT NULL, + creator varchar(64) NULL DEFAULT '', + create_time timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, + updater varchar(64) NULL DEFAULT '', + update_time timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, + deleted int2 NOT NULL DEFAULT 0, + tenant_id int8 NOT NULL DEFAULT 0 ); -ALTER TABLE system_sms_code - ADD CONSTRAINT pk_system_sms_code PRIMARY KEY (id); +ALTER TABLE system_sms_code ADD CONSTRAINT pk_system_sms_code PRIMARY KEY (id); CREATE INDEX idx_system_sms_code_01 ON system_sms_code (mobile); @@ -4308,47 +4255,45 @@ COMMENT ON COLUMN system_sms_code.deleted IS '是否删除'; COMMENT ON COLUMN system_sms_code.tenant_id IS '租户编号'; COMMENT ON TABLE system_sms_code IS '手机验证码'; -DROP SEQUENCE IF EXISTS system_sms_log_seq; -CREATE SEQUENCE system_sms_log_seq +DROP SEQUENCE IF EXISTS system_sms_code_seq; +CREATE SEQUENCE system_sms_code_seq START 1; -- ---------------------------- -- Table structure for system_sms_log -- ---------------------------- DROP TABLE IF EXISTS system_sms_log; -CREATE TABLE system_sms_log -( - id int8 NOT NULL default nextval('system_sms_log_seq'), - channel_id int8 NOT NULL, - channel_code varchar(63) NOT NULL, - template_id int8 NOT NULL, - template_code varchar(63) NOT NULL, - template_type int2 NOT NULL, - template_content varchar(255) NOT NULL, - template_params varchar(255) NOT NULL, - api_template_id varchar(63) NOT NULL, - mobile varchar(11) NOT NULL, - user_id int8 NULL DEFAULT NULL, - user_type int2 NULL DEFAULT NULL, - send_status int2 NOT NULL DEFAULT 0, - send_time timestamp NULL DEFAULT NULL, - api_send_code varchar(63) NULL DEFAULT NULL, - api_send_msg varchar(255) NULL DEFAULT NULL, - api_request_id varchar(255) NULL DEFAULT NULL, - api_serial_no varchar(255) NULL DEFAULT NULL, - receive_status int2 NOT NULL DEFAULT 0, - receive_time timestamp NULL DEFAULT NULL, - api_receive_code varchar(63) NULL DEFAULT NULL, - api_receive_msg varchar(255) NULL DEFAULT NULL, - creator varchar(64) NULL DEFAULT '', - create_time timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, - updater varchar(64) NULL DEFAULT '', - update_time timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, - deleted int2 NOT NULL DEFAULT 0 +CREATE TABLE system_sms_log ( + id int8 NOT NULL, + channel_id int8 NOT NULL, + channel_code varchar(63) NOT NULL, + template_id int8 NOT NULL, + template_code varchar(63) NOT NULL, + template_type int2 NOT NULL, + template_content varchar(255) NOT NULL, + template_params varchar(255) NOT NULL, + api_template_id varchar(63) NOT NULL, + mobile varchar(11) NOT NULL, + user_id int8 NULL DEFAULT NULL, + user_type int2 NULL DEFAULT NULL, + send_status int2 NOT NULL DEFAULT 0, + send_time timestamp NULL DEFAULT NULL, + api_send_code varchar(63) NULL DEFAULT NULL, + api_send_msg varchar(255) NULL DEFAULT NULL, + api_request_id varchar(255) NULL DEFAULT NULL, + api_serial_no varchar(255) NULL DEFAULT NULL, + receive_status int2 NOT NULL DEFAULT 0, + receive_time timestamp NULL DEFAULT NULL, + api_receive_code varchar(63) NULL DEFAULT NULL, + api_receive_msg varchar(255) NULL DEFAULT NULL, + creator varchar(64) NULL DEFAULT '', + create_time timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, + updater varchar(64) NULL DEFAULT '', + update_time timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, + deleted int2 NOT NULL DEFAULT 0 ); -ALTER TABLE system_sms_log - ADD CONSTRAINT pk_system_sms_log PRIMARY KEY (id); +ALTER TABLE system_sms_log ADD CONSTRAINT pk_system_sms_log PRIMARY KEY (id); COMMENT ON COLUMN system_sms_log.id IS '编号'; COMMENT ON COLUMN system_sms_log.channel_id IS '短信渠道编号'; @@ -4379,36 +4324,34 @@ COMMENT ON COLUMN system_sms_log.update_time IS '更新时间'; COMMENT ON COLUMN system_sms_log.deleted IS '是否删除'; COMMENT ON TABLE system_sms_log IS '短信日志'; -DROP SEQUENCE IF EXISTS system_sms_template_seq; -CREATE SEQUENCE system_sms_template_seq +DROP SEQUENCE IF EXISTS system_sms_log_seq; +CREATE SEQUENCE system_sms_log_seq START 1; -- ---------------------------- -- Table structure for system_sms_template -- ---------------------------- DROP TABLE IF EXISTS system_sms_template; -CREATE TABLE system_sms_template -( - id int8 NOT NULL default nextval('system_sms_template_seq'), - type int2 NOT NULL, - status int2 NOT NULL, - code varchar(63) NOT NULL, - name varchar(63) NOT NULL, - content varchar(255) NOT NULL, - params varchar(255) NOT NULL, - remark varchar(255) NULL DEFAULT NULL, - api_template_id varchar(63) NOT NULL, - channel_id int8 NOT NULL, - channel_code varchar(63) NOT NULL, - creator varchar(64) NULL DEFAULT '', - create_time timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, - updater varchar(64) NULL DEFAULT '', - update_time timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, - deleted int2 NOT NULL DEFAULT 0 +CREATE TABLE system_sms_template ( + id int8 NOT NULL, + type int2 NOT NULL, + status int2 NOT NULL, + code varchar(63) NOT NULL, + name varchar(63) NOT NULL, + content varchar(255) NOT NULL, + params varchar(255) NOT NULL, + remark varchar(255) NULL DEFAULT NULL, + api_template_id varchar(63) NOT NULL, + channel_id int8 NOT NULL, + channel_code varchar(63) NOT NULL, + creator varchar(64) NULL DEFAULT '', + create_time timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, + updater varchar(64) NULL DEFAULT '', + update_time timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, + deleted int2 NOT NULL DEFAULT 0 ); -ALTER TABLE system_sms_template - ADD CONSTRAINT pk_system_sms_template PRIMARY KEY (id); +ALTER TABLE system_sms_template ADD CONSTRAINT pk_system_sms_template PRIMARY KEY (id); COMMENT ON COLUMN system_sms_template.id IS '编号'; COMMENT ON COLUMN system_sms_template.type IS '模板类型'; @@ -4451,35 +4394,33 @@ INSERT INTO system_sms_template (id, type, status, code, name, content, params, COMMIT; -- @formatter:on -DROP SEQUENCE IF EXISTS system_social_client_seq; -CREATE SEQUENCE system_social_client_seq - START 1; +DROP SEQUENCE IF EXISTS system_sms_template_seq; +CREATE SEQUENCE system_sms_template_seq + START 20; -- ---------------------------- -- Table structure for system_social_client -- ---------------------------- DROP TABLE IF EXISTS system_social_client; -CREATE TABLE system_social_client -( - id int8 NOT NULL default nextval('system_social_client_seq'), - name varchar(255) NOT NULL, - social_type int2 NOT NULL, - user_type int2 NOT NULL, - client_id varchar(255) NOT NULL, - client_secret varchar(255) NOT NULL, - public_key varchar(255) NULL DEFAULT NULL, - agent_id varchar(255) NULL DEFAULT NULL, - status int2 NOT NULL, - creator varchar(64) NULL DEFAULT '', - create_time timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, - updater varchar(64) NULL DEFAULT '', - update_time timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, - deleted int2 NOT NULL DEFAULT 0, - tenant_id int8 NOT NULL DEFAULT 0 +CREATE TABLE system_social_client ( + id int8 NOT NULL, + name varchar(255) NOT NULL, + social_type int2 NOT NULL, + user_type int2 NOT NULL, + client_id varchar(255) NOT NULL, + client_secret varchar(2048) NOT NULL, + public_key varchar(2048) NULL, + agent_id varchar(255) NULL DEFAULT NULL, + status int2 NOT NULL, + creator varchar(64) NULL DEFAULT '', + create_time timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, + updater varchar(64) NULL DEFAULT '', + update_time timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, + deleted int2 NOT NULL DEFAULT 0, + tenant_id int8 NOT NULL DEFAULT 0 ); -ALTER TABLE system_social_client - ADD CONSTRAINT pk_system_social_client PRIMARY KEY (id); +ALTER TABLE system_social_client ADD CONSTRAINT pk_system_social_client PRIMARY KEY (id); COMMENT ON COLUMN system_social_client.id IS '编号'; COMMENT ON COLUMN system_social_client.name IS '应用名'; @@ -4487,7 +4428,7 @@ COMMENT ON COLUMN system_social_client.social_type IS '社交平台的类型'; COMMENT ON COLUMN system_social_client.user_type IS '用户类型'; COMMENT ON COLUMN system_social_client.client_id IS '客户端编号'; COMMENT ON COLUMN system_social_client.client_secret IS '客户端密钥'; -COMMENT ON COLUMN system_social_client.public_key IS 'publicKey 公钥'; +COMMENT ON COLUMN system_social_client.public_key IS 'publicKey公钥'; COMMENT ON COLUMN system_social_client.agent_id IS '代理编号'; COMMENT ON COLUMN system_social_client.status IS '状态'; COMMENT ON COLUMN system_social_client.creator IS '创建者'; @@ -4508,41 +4449,40 @@ INSERT INTO system_social_client (id, name, social_type, user_type, client_id, c 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', '1', 1); 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', '1', 1); 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', '1', 1); +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', '1', 1); COMMIT; -- @formatter:on -DROP SEQUENCE IF EXISTS system_social_user_seq; -CREATE SEQUENCE system_social_user_seq - START 1; +DROP SEQUENCE IF EXISTS system_social_client_seq; +CREATE SEQUENCE system_social_client_seq + START 46; -- ---------------------------- -- Table structure for system_social_user -- ---------------------------- DROP TABLE IF EXISTS system_social_user; -CREATE TABLE system_social_user -( - id int8 NOT NULL default nextval('system_social_user_seq'), - type int2 NOT NULL, - openid varchar(32) NOT NULL, - token varchar(256) NULL DEFAULT NULL, - raw_token_info varchar(1024) NOT NULL, - nickname varchar(32) NOT NULL, - avatar varchar(255) NULL DEFAULT NULL, - raw_user_info varchar(1024) NOT NULL, - code varchar(256) NOT NULL, - state varchar(256) NULL DEFAULT NULL, - creator varchar(64) NULL DEFAULT '', - create_time timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, - updater varchar(64) NULL DEFAULT '', - update_time timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, - deleted int2 NOT NULL DEFAULT 0, - tenant_id int8 NOT NULL DEFAULT 0 +CREATE TABLE system_social_user ( + id int8 NOT NULL, + type int2 NOT NULL, + openid varchar(32) NOT NULL, + token varchar(256) NULL DEFAULT NULL, + raw_token_info varchar(1024) NOT NULL, + nickname varchar(32) NOT NULL, + avatar varchar(255) NULL DEFAULT NULL, + raw_user_info varchar(1024) NOT NULL, + code varchar(256) NOT NULL, + state varchar(256) NULL DEFAULT NULL, + creator varchar(64) NULL DEFAULT '', + create_time timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, + updater varchar(64) NULL DEFAULT '', + update_time timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, + deleted int2 NOT NULL DEFAULT 0, + tenant_id int8 NOT NULL DEFAULT 0 ); -ALTER TABLE system_social_user - ADD CONSTRAINT pk_system_social_user PRIMARY KEY (id); +ALTER TABLE system_social_user ADD CONSTRAINT pk_system_social_user PRIMARY KEY (id); -COMMENT ON COLUMN system_social_user.id IS '主键 ( 自增策略)'; +COMMENT ON COLUMN system_social_user.id IS '主键 ( 自增策略 ) '; COMMENT ON COLUMN system_social_user.type IS '社交平台的类型'; COMMENT ON COLUMN system_social_user.openid IS '社交 openid'; COMMENT ON COLUMN system_social_user.token IS '社交 token'; @@ -4560,33 +4500,31 @@ COMMENT ON COLUMN system_social_user.deleted IS '是否删除'; COMMENT ON COLUMN system_social_user.tenant_id IS '租户编号'; COMMENT ON TABLE system_social_user IS '社交用户表'; -DROP SEQUENCE IF EXISTS system_social_user_bind_seq; -CREATE SEQUENCE system_social_user_bind_seq +DROP SEQUENCE IF EXISTS system_social_user_seq; +CREATE SEQUENCE system_social_user_seq START 1; -- ---------------------------- -- Table structure for system_social_user_bind -- ---------------------------- DROP TABLE IF EXISTS system_social_user_bind; -CREATE TABLE system_social_user_bind -( - id int8 NOT NULL default nextval('system_social_user_bind_seq'), - user_id int8 NOT NULL, - user_type int2 NOT NULL, - social_type int2 NOT NULL, - social_user_id int8 NOT NULL, - creator varchar(64) NULL DEFAULT '', - create_time timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, - updater varchar(64) NULL DEFAULT '', - update_time timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, - deleted int2 NOT NULL DEFAULT 0, - tenant_id int8 NOT NULL DEFAULT 0 +CREATE TABLE system_social_user_bind ( + id int8 NOT NULL, + user_id int8 NOT NULL, + user_type int2 NOT NULL, + social_type int2 NOT NULL, + social_user_id int8 NOT NULL, + creator varchar(64) NULL DEFAULT '', + create_time timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, + updater varchar(64) NULL DEFAULT '', + update_time timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, + deleted int2 NOT NULL DEFAULT 0, + tenant_id int8 NOT NULL DEFAULT 0 ); -ALTER TABLE system_social_user_bind - ADD CONSTRAINT pk_system_social_user_bind PRIMARY KEY (id); +ALTER TABLE system_social_user_bind ADD CONSTRAINT pk_system_social_user_bind PRIMARY KEY (id); -COMMENT ON COLUMN system_social_user_bind.id IS '主键 ( 自增策略)'; +COMMENT ON COLUMN system_social_user_bind.id IS '主键 ( 自增策略 ) '; COMMENT ON COLUMN system_social_user_bind.user_id IS '用户编号'; COMMENT ON COLUMN system_social_user_bind.user_type IS '用户类型'; COMMENT ON COLUMN system_social_user_bind.social_type IS '社交平台的类型'; @@ -4599,42 +4537,40 @@ COMMENT ON COLUMN system_social_user_bind.deleted IS '是否删除'; COMMENT ON COLUMN system_social_user_bind.tenant_id IS '租户编号'; COMMENT ON TABLE system_social_user_bind IS '社交绑定表'; -DROP SEQUENCE IF EXISTS system_tenant_seq; -CREATE SEQUENCE system_tenant_seq +DROP SEQUENCE IF EXISTS system_social_user_bind_seq; +CREATE SEQUENCE system_social_user_bind_seq START 1; -- ---------------------------- -- Table structure for system_tenant -- ---------------------------- DROP TABLE IF EXISTS system_tenant; -CREATE TABLE system_tenant -( - id int8 NOT NULL default nextval('system_tenant_seq'), - name varchar(30) NOT NULL, - contact_user_id int8 NULL DEFAULT NULL, - contact_name varchar(30) NOT NULL, - contact_mobile varchar(500) NULL DEFAULT NULL, - status int2 NOT NULL DEFAULT 0, - websites varchar(256) NULL DEFAULT '', - package_id int8 NOT NULL, - expire_time timestamp NOT NULL, - account_count int4 NOT NULL, - creator varchar(64) NOT NULL DEFAULT '', - create_time timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, - updater varchar(64) NULL DEFAULT '', - update_time timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, - deleted int2 NOT NULL DEFAULT 0 +CREATE TABLE system_tenant ( + id int8 NOT NULL, + name varchar(30) NOT NULL, + contact_user_id int8 NULL DEFAULT NULL, + contact_name varchar(30) NOT NULL, + contact_mobile varchar(500) NULL DEFAULT NULL, + status int2 NOT NULL DEFAULT 0, + websites varchar(1024) NULL DEFAULT '', + package_id int8 NOT NULL, + expire_time timestamp NOT NULL, + account_count int4 NOT NULL, + creator varchar(64) NOT NULL DEFAULT '', + create_time timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, + updater varchar(64) NULL DEFAULT '', + update_time timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, + deleted int2 NOT NULL DEFAULT 0 ); -ALTER TABLE system_tenant - ADD CONSTRAINT pk_system_tenant PRIMARY KEY (id); +ALTER TABLE system_tenant ADD CONSTRAINT pk_system_tenant PRIMARY KEY (id); COMMENT ON COLUMN system_tenant.id IS '租户编号'; COMMENT ON COLUMN system_tenant.name IS '租户名'; COMMENT ON COLUMN system_tenant.contact_user_id IS '联系人的用户编号'; COMMENT ON COLUMN system_tenant.contact_name IS '联系人'; COMMENT ON COLUMN system_tenant.contact_mobile IS '联系手机'; -COMMENT ON COLUMN system_tenant.status IS '租户状态(0正常 1停用)'; +COMMENT ON COLUMN system_tenant.status IS '租户状态'; COMMENT ON COLUMN system_tenant.websites IS '绑定域名数组'; COMMENT ON COLUMN system_tenant.package_id IS '租户套餐编号'; COMMENT ON COLUMN system_tenant.expire_time IS '过期时间'; @@ -4651,36 +4587,34 @@ COMMENT ON TABLE system_tenant IS '租户表'; -- ---------------------------- -- @formatter:off BEGIN; -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', 0, '2099-02-19 17:14:16', 9999, '1', '2021-01-05 17:03:47', '1', '2023-11-06 11:41:41', '0'); -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', 111, '2026-07-10 00:00:00', 30, '1', '2022-02-22 00:56:14', '1', '2025-04-03 21:33:01', '0'); -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', '2024-09-22 12:10:50', '0'); +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', '0'); +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', '0'); +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', '0'); COMMIT; -- @formatter:on -DROP SEQUENCE IF EXISTS system_tenant_package_seq; -CREATE SEQUENCE system_tenant_package_seq - START 1; +DROP SEQUENCE IF EXISTS system_tenant_seq; +CREATE SEQUENCE system_tenant_seq + START 123; -- ---------------------------- -- Table structure for system_tenant_package -- ---------------------------- DROP TABLE IF EXISTS system_tenant_package; -CREATE TABLE system_tenant_package -( - id int8 NOT NULL default nextval('system_tenant_package_seq'), - name varchar(30) NOT NULL, - status int2 NOT NULL DEFAULT 0, - remark varchar(256) NULL DEFAULT '', - menu_ids varchar(4096) NOT NULL, - creator varchar(64) NOT NULL DEFAULT '', - create_time timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, - updater varchar(64) NULL DEFAULT '', - update_time timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, - deleted int2 NOT NULL DEFAULT 0 +CREATE TABLE system_tenant_package ( + id int8 NOT NULL, + name varchar(30) NOT NULL, + status int2 NOT NULL DEFAULT 0, + remark varchar(256) NULL DEFAULT '', + menu_ids varchar(4096) NOT NULL, + creator varchar(64) NOT NULL DEFAULT '', + create_time timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, + updater varchar(64) NULL DEFAULT '', + update_time timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, + deleted int2 NOT NULL DEFAULT 0 ); -ALTER TABLE system_tenant_package - ADD CONSTRAINT pk_system_tenant_package PRIMARY KEY (id); +ALTER TABLE system_tenant_package ADD CONSTRAINT pk_system_tenant_package PRIMARY KEY (id); COMMENT ON COLUMN system_tenant_package.id IS '套餐编号'; COMMENT ON COLUMN system_tenant_package.name IS '套餐名'; @@ -4699,34 +4633,31 @@ COMMENT ON TABLE system_tenant_package IS '租户套餐表'; -- ---------------------------- -- @formatter:off BEGIN; -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,1138,114,1139,115,1140,116,1141,1142,1143,2713,2714,2715,2716,2717,2718,2720,1185,2721,1186,2722,1187,2723,1188,2724,1189,2725,1190,2726,1191,2727,2472,1192,2728,1193,2729,1194,2730,1195,2731,1196,2732,1197,2733,2478,1198,2734,2479,1199,2735,2480,1200,2481,1201,2482,1202,2483,2739,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', '2024-07-13 22:37:24', '0'); -INSERT INTO system_tenant_package (id, name, status, remark, menu_ids, creator, create_time, updater, update_time, deleted) VALUES (112, '再来一个套餐', 0, '1234', '[1024,1,1025,1026,2,1027,1028,1029,1030,1031,1032,1033,1034,1035,1036,1037,1038,1039,1040,1042,1043,1045,1046,1048,1050,1051,1052,1053,1054,1056,1057,1058,2083,1059,1060,1063,1064,1065,1066,1067,1070,1075,1077,1078,1082,1083,1084,1085,1086,1087,1088,1089,1090,1091,1092,1093,1094,1095,1096,1097,1098,1100,1101,1102,1103,1104,1105,1106,2130,1107,2131,1108,2132,1109,2133,2134,2135,2136,2137,2138,2139,2140,2141,2142,2143,2144,2145,2146,2147,100,2148,101,2149,102,2150,103,2151,104,2152,105,106,107,108,109,110,111,112,113,1138,114,1139,115,1140,116,1141,1142,1143,2739,2740,1224,1225,1226,1227,1228,1229,1237,1238,1239,1240,1241,1242,1243,1255,1256,1257,1258,1259,1260,1261,1263,1264,1265,1266,1267,2447,2448,2449,2450,2451,2452,2453,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,500,1013,501,1014,1015,1016,1017,1018,1019,1020,1021,1022,1023]', '1', '2025-04-04 08:15:02', '1', '2025-04-04 08:15:21', '0'); +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', '0'); COMMIT; -- @formatter:on -DROP SEQUENCE IF EXISTS system_user_post_seq; -CREATE SEQUENCE system_user_post_seq - START 1; +DROP SEQUENCE IF EXISTS system_tenant_package_seq; +CREATE SEQUENCE system_tenant_package_seq + START 112; -- ---------------------------- -- Table structure for system_user_post -- ---------------------------- DROP TABLE IF EXISTS system_user_post; -CREATE TABLE system_user_post -( - id int8 NOT NULL default nextval('system_user_post_seq'), - user_id int8 NOT NULL DEFAULT 0, - post_id int8 NOT NULL DEFAULT 0, - creator varchar(64) NULL DEFAULT '', - create_time timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, - updater varchar(64) NULL DEFAULT '', - update_time timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, - deleted int2 NOT NULL DEFAULT 0, - tenant_id int8 NOT NULL DEFAULT 0 +CREATE TABLE system_user_post ( + id int8 NOT NULL, + user_id int8 NOT NULL DEFAULT 0, + post_id int8 NOT NULL DEFAULT 0, + creator varchar(64) NULL DEFAULT '', + create_time timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, + updater varchar(64) NULL DEFAULT '', + update_time timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, + deleted int2 NOT NULL DEFAULT 0, + tenant_id int8 NOT NULL DEFAULT 0 ); -ALTER TABLE system_user_post - ADD CONSTRAINT pk_system_user_post PRIMARY KEY (id); +ALTER TABLE system_user_post ADD CONSTRAINT pk_system_user_post PRIMARY KEY (id); COMMENT ON COLUMN system_user_post.id IS 'id'; COMMENT ON COLUMN system_user_post.user_id IS '用户ID'; @@ -4756,29 +4687,27 @@ INSERT INTO system_user_post (id, user_id, post_id, creator, create_time, update COMMIT; -- @formatter:on -DROP SEQUENCE IF EXISTS system_user_role_seq; -CREATE SEQUENCE system_user_role_seq - START 1; +DROP SEQUENCE IF EXISTS system_user_post_seq; +CREATE SEQUENCE system_user_post_seq + START 126; -- ---------------------------- -- Table structure for system_user_role -- ---------------------------- DROP TABLE IF EXISTS system_user_role; -CREATE TABLE system_user_role -( - id int8 NOT NULL default nextval('system_user_role_seq'), - user_id int8 NOT NULL, - role_id int8 NOT NULL, - creator varchar(64) NULL DEFAULT '', - create_time timestamp NULL DEFAULT CURRENT_TIMESTAMP, - updater varchar(64) NULL DEFAULT '', - update_time timestamp NULL DEFAULT CURRENT_TIMESTAMP, - deleted int2 NOT NULL DEFAULT 0, - tenant_id int8 NOT NULL DEFAULT 0 +CREATE TABLE system_user_role ( + id int8 NOT NULL, + user_id int8 NOT NULL, + role_id int8 NOT NULL, + creator varchar(64) NULL DEFAULT '', + create_time timestamp NULL DEFAULT CURRENT_TIMESTAMP, + updater varchar(64) NULL DEFAULT '', + update_time timestamp NULL DEFAULT CURRENT_TIMESTAMP, + deleted int2 NOT NULL DEFAULT 0, + tenant_id int8 NOT NULL DEFAULT 0 ); -ALTER TABLE system_user_role - ADD CONSTRAINT pk_system_user_role PRIMARY KEY (id); +ALTER TABLE system_user_role ADD CONSTRAINT pk_system_user_role PRIMARY KEY (id); COMMENT ON COLUMN system_user_role.id IS '自增编号'; COMMENT ON COLUMN system_user_role.user_id IS '用户ID'; @@ -4798,7 +4727,6 @@ COMMENT ON TABLE system_user_role IS '用户和角色关联表'; BEGIN; INSERT INTO system_user_role (id, user_id, role_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1, 1, 1, '', '2022-01-11 13:19:45', '', '2022-05-12 12:35:17', '0', 1); INSERT INTO system_user_role (id, user_id, role_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (2, 2, 2, '', '2022-01-11 13:19:45', '', '2022-05-12 12:35:13', '0', 1); -INSERT INTO system_user_role (id, user_id, role_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (4, 100, 101, '', '2022-01-11 13:19:45', '', '2022-05-12 12:35:13', '0', 1); INSERT INTO system_user_role (id, user_id, role_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (5, 100, 1, '', '2022-01-11 13:19:45', '', '2022-05-12 12:35:12', '0', 1); INSERT INTO system_user_role (id, user_id, role_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (6, 100, 2, '', '2022-01-11 13:19:45', '', '2022-05-12 12:35:11', '0', 1); INSERT INTO system_user_role (id, user_id, role_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (10, 103, 1, '1', '2022-01-11 13:19:45', '1', '2022-01-11 13:19:45', '0', 1); @@ -4809,47 +4737,46 @@ INSERT INTO system_user_role (id, user_id, role_id, creator, create_time, update INSERT INTO system_user_role (id, user_id, role_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (22, 115, 2, '1', '2022-07-21 22:08:30', '1', '2022-07-21 22:08:30', '0', 1); INSERT INTO system_user_role (id, user_id, role_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (35, 112, 1, '1', '2024-03-15 20:00:24', '1', '2024-03-15 20:00:24', '0', 1); INSERT INTO system_user_role (id, user_id, role_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (36, 118, 1, '1', '2024-03-17 09:12:08', '1', '2024-03-17 09:12:08', '0', 1); -INSERT INTO system_user_role (id, user_id, role_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (38, 114, 101, '1', '2024-03-24 22:23:03', '1', '2024-03-24 22:23:03', '0', 1); INSERT INTO system_user_role (id, user_id, role_id, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (46, 117, 1, '1', '2024-10-02 10:16:11', '1', '2024-10-02 10:16:11', '0', 1); 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', '0', 1); 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', '0', 1); +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', '0', 1); +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', '0', 1); COMMIT; -- @formatter:on -DROP SEQUENCE IF EXISTS system_users_seq; -CREATE SEQUENCE system_users_seq - START 1; +DROP SEQUENCE IF EXISTS system_user_role_seq; +CREATE SEQUENCE system_user_role_seq + START 51; -- ---------------------------- -- Table structure for system_users -- ---------------------------- DROP TABLE IF EXISTS system_users; -CREATE TABLE system_users -( - id int8 NOT NULL default nextval('system_users_seq'), - username varchar(30) NOT NULL, - password varchar(100) NOT NULL DEFAULT '', - nickname varchar(30) NOT NULL, - remark varchar(500) NULL DEFAULT NULL, - dept_id int8 NULL DEFAULT NULL, - post_ids varchar(255) NULL DEFAULT NULL, - email varchar(50) NULL DEFAULT '', - mobile varchar(11) NULL DEFAULT '', - sex int2 NULL DEFAULT 0, - avatar varchar(512) NULL DEFAULT '', - status int2 NOT NULL DEFAULT 0, - login_ip varchar(50) NULL DEFAULT '', - login_date timestamp NULL DEFAULT NULL, - creator varchar(64) NULL DEFAULT '', - create_time timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, - updater varchar(64) NULL DEFAULT '', - update_time timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, - deleted int2 NOT NULL DEFAULT 0, - tenant_id int8 NOT NULL DEFAULT 0 +CREATE TABLE system_users ( + id int8 NOT NULL, + username varchar(30) NOT NULL, + password varchar(100) NOT NULL DEFAULT '', + nickname varchar(30) NOT NULL, + remark varchar(500) NULL DEFAULT NULL, + dept_id int8 NULL DEFAULT NULL, + post_ids varchar(255) NULL DEFAULT NULL, + email varchar(50) NULL DEFAULT '', + mobile varchar(11) NULL DEFAULT '', + sex int2 NULL DEFAULT 0, + avatar varchar(512) NULL DEFAULT '', + status int2 NOT NULL DEFAULT 0, + login_ip varchar(50) NULL DEFAULT '', + login_date timestamp NULL DEFAULT NULL, + creator varchar(64) NULL DEFAULT '', + create_time timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, + updater varchar(64) NULL DEFAULT '', + update_time timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, + deleted int2 NOT NULL DEFAULT 0, + tenant_id int8 NOT NULL DEFAULT 0 ); -ALTER TABLE system_users - ADD CONSTRAINT pk_system_users PRIMARY KEY (id); +ALTER TABLE system_users ADD CONSTRAINT pk_system_users PRIMARY KEY (id); COMMENT ON COLUMN system_users.id IS '用户ID'; COMMENT ON COLUMN system_users.username IS '用户账号'; @@ -4878,9 +4805,9 @@ COMMENT ON TABLE system_users IS '用户信息表'; -- ---------------------------- -- @formatter:off BEGIN; -INSERT INTO system_users (id, username, password, nickname, remark, dept_id, post_ids, email, mobile, sex, avatar, status, login_ip, login_date, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1, 'admin', '$2a$04$KljJDa/LK7QfDm0lF5OhuePhlPfjRH3tB2Wu351Uidz.oQGJXevPi', '芋道源码', '管理员', 103, '[1,2]', '11aoteman@126.com', '18818260277', 2, 'http://test.yudao.iocoder.cn/test/20250502/avatar_1746154660449.png', 0, '0:0:0:0:0:0:0:1', '2025-05-10 18:03:15', 'admin', '2021-01-05 17:03:47', NULL, '2025-05-10 18:03:15', '0', 1); +INSERT INTO system_users (id, username, password, nickname, remark, dept_id, post_ids, email, mobile, sex, avatar, status, login_ip, login_date, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (1, 'admin', '$2a$04$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', '0', 1); INSERT INTO system_users (id, username, password, nickname, remark, dept_id, post_ids, email, mobile, sex, avatar, status, login_ip, login_date, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (100, 'yudao', '$2a$04$h.aaPKgO.odHepnk5PCsWeEwKdojFWdTItxGKfx1r0e1CSeBzsTJ6', '芋道', '不要吓我', 104, '[1]', 'yudao@iocoder.cn', '15601691300', 1, NULL, 0, '0:0:0:0:0:0:0:1', '2025-04-08 09:36:40', '', '2021-01-07 09:07:17', NULL, '2025-04-21 14:23:08', '0', 1); -INSERT INTO system_users (id, username, password, nickname, remark, dept_id, post_ids, email, mobile, sex, avatar, status, login_ip, login_date, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (103, 'yuanma', '$2a$04$fUBSmjKCPYAUmnMzOb6qE.eZCGPhHi1JmAKclODbfS/O7fHOl2bH6', '源码', NULL, 106, NULL, 'yuanma@iocoder.cn', '15601701300', 0, NULL, 0, '0:0:0:0:0:0:0:1', '2024-08-11 17:48:12', '', '2021-01-13 23:50:35', NULL, '2025-04-21 14:23:08', '0', 1); +INSERT INTO system_users (id, username, password, nickname, remark, dept_id, post_ids, email, mobile, sex, avatar, status, login_ip, login_date, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (103, 'yuanma', '$2a$04$fUBSmjKCPYAUmnMzOb6qE.eZCGPhHi1JmAKclODbfS/O7fHOl2bH6', '源码', NULL, 106, NULL, 'yuanma@iocoder.cn', '15601701300', 0, NULL, 0, '0:0:0:0:0:0:0:1', '2024-08-11 17:48:12', '', '2021-01-13 23:50:35', '1', '2025-07-09 23:41:58', '0', 1); INSERT INTO system_users (id, username, password, nickname, remark, dept_id, post_ids, email, mobile, sex, avatar, status, login_ip, login_date, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (104, 'test', '$2a$04$BrwaYn303hjA/6TnXqdGoOLhyHOAA0bVrAFu6.1dJKycqKUnIoRz2', '测试号', NULL, 107, '[1,2]', '111@qq.com', '15601691200', 1, NULL, 0, '0:0:0:0:0:0:0:1', '2025-03-28 20:01:16', '', '2021-01-21 02:13:53', NULL, '2025-04-21 14:23:08', '0', 1); INSERT INTO system_users (id, username, password, nickname, remark, dept_id, post_ids, email, mobile, sex, avatar, status, login_ip, login_date, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (107, 'admin107', '$2a$10$dYOOBKMO93v/.ReCqzyFg.o67Tqk.bbc2bhrpyBGkIw9aypCtr2pm', '芋艿', NULL, NULL, NULL, '', '15601691300', 0, NULL, 0, '', NULL, '1', '2022-02-20 22:59:33', '1', '2025-04-21 14:23:08', '0', 118); INSERT INTO system_users (id, username, password, nickname, remark, dept_id, post_ids, email, mobile, sex, avatar, status, login_ip, login_date, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (108, 'admin108', '$2a$10$y6mfvKoNYL1GXWak8nYwVOH.kCWqjactkzdoIDgiKl93WN3Ejg.Lu', '芋艿', NULL, NULL, NULL, '', '15601691300', 0, NULL, 0, '', NULL, '1', '2022-02-20 23:00:50', '1', '2025-04-21 14:23:08', '0', 119); @@ -4891,40 +4818,38 @@ INSERT INTO system_users (id, username, password, nickname, remark, dept_id, pos INSERT INTO system_users (id, username, password, nickname, remark, dept_id, post_ids, email, mobile, sex, avatar, status, login_ip, login_date, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (113, 'aoteman', '$2a$10$0acJOIk2D25/oC87nyclE..0lzeu9DtQ/n3geP4fkun/zIVRhHJIO', '芋道1', NULL, NULL, NULL, '', '15601691300', 0, NULL, 0, '127.0.0.1', '2022-03-19 18:38:51', '1', '2022-03-07 21:37:58', '1', '2025-05-05 15:30:53', '0', 122); 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', '0', 1); INSERT INTO system_users (id, username, password, nickname, remark, dept_id, post_ids, email, mobile, sex, avatar, status, login_ip, login_date, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (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', '0', 1); -INSERT INTO system_users (id, username, password, nickname, remark, dept_id, post_ids, email, mobile, sex, avatar, status, login_ip, login_date, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (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', NULL, '2025-04-21 14:23:08', '0', 1); -INSERT INTO system_users (id, username, password, nickname, remark, dept_id, post_ids, email, mobile, sex, avatar, status, login_ip, login_date, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (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-04-21 14:23:08', '0', 1); -INSERT INTO system_users (id, username, password, nickname, remark, dept_id, post_ids, email, mobile, sex, avatar, status, login_ip, login_date, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (131, 'hh', '$2a$04$jyH9h6.gaw8mpOjPfHIpx.8as2Rzfcmdlj5rlJFwgCw4rsv/MTb2K', '呵呵', NULL, 100, '[]', '777@qq.com', '15601882312', 1, NULL, 0, '', NULL, '1', '2024-04-27 08:45:56', '1', '2025-04-21 14:23:08', '0', 1); +INSERT INTO system_users (id, username, password, nickname, remark, dept_id, post_ids, email, mobile, sex, avatar, status, login_ip, login_date, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (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', '0', 1); +INSERT INTO system_users (id, username, password, nickname, remark, dept_id, post_ids, email, mobile, sex, avatar, status, login_ip, login_date, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (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', '0', 1); INSERT INTO system_users (id, username, password, nickname, remark, dept_id, post_ids, email, mobile, sex, avatar, status, login_ip, login_date, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (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', '0', 1); -INSERT INTO system_users (id, username, password, nickname, remark, dept_id, post_ids, email, mobile, sex, avatar, status, login_ip, login_date, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (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-04-08 13:09:07', '0', 1); +INSERT INTO system_users (id, username, password, nickname, remark, dept_id, post_ids, email, mobile, sex, avatar, status, login_ip, login_date, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (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', '0', 1); +INSERT INTO system_users (id, username, password, nickname, remark, dept_id, post_ids, email, mobile, sex, avatar, status, login_ip, login_date, creator, create_time, updater, update_time, deleted, tenant_id) VALUES (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', '0', 1); COMMIT; -- @formatter:on -DROP SEQUENCE IF EXISTS yudao_demo01_contact_seq; -CREATE SEQUENCE yudao_demo01_contact_seq - START 1; +DROP SEQUENCE IF EXISTS system_users_seq; +CREATE SEQUENCE system_users_seq + START 143; -- ---------------------------- -- Table structure for yudao_demo01_contact -- ---------------------------- DROP TABLE IF EXISTS yudao_demo01_contact; -CREATE TABLE yudao_demo01_contact -( - id int8 NOT NULL default nextval('yudao_demo01_contact_seq'), - name varchar(100) NOT NULL DEFAULT '', - sex int2 NOT NULL, - birthday timestamp NOT NULL, - description varchar(255) NOT NULL, - avatar varchar(512) NULL DEFAULT NULL, - creator varchar(64) NULL DEFAULT '', - create_time timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, - updater varchar(64) NULL DEFAULT '', - update_time timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, - deleted int2 NOT NULL DEFAULT 0, - tenant_id int8 NOT NULL DEFAULT 0 +CREATE TABLE yudao_demo01_contact ( + id int8 NOT NULL, + name varchar(100) NOT NULL DEFAULT '', + sex int2 NOT NULL, + birthday timestamp NOT NULL, + description varchar(255) NOT NULL, + avatar varchar(512) NULL DEFAULT NULL, + creator varchar(64) NULL DEFAULT '', + create_time timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, + updater varchar(64) NULL DEFAULT '', + update_time timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, + deleted int2 NOT NULL DEFAULT 0, + tenant_id int8 NOT NULL DEFAULT 0 ); -ALTER TABLE yudao_demo01_contact - ADD CONSTRAINT pk_yudao_demo01_contact PRIMARY KEY (id); +ALTER TABLE yudao_demo01_contact ADD CONSTRAINT pk_yudao_demo01_contact PRIMARY KEY (id); COMMENT ON COLUMN yudao_demo01_contact.id IS '编号'; COMMENT ON COLUMN yudao_demo01_contact.name IS '名字'; @@ -4949,29 +4874,27 @@ INSERT INTO yudao_demo01_contact (id, name, sex, birthday, description, avatar, COMMIT; -- @formatter:on -DROP SEQUENCE IF EXISTS yudao_demo02_category_seq; -CREATE SEQUENCE yudao_demo02_category_seq - START 1; +DROP SEQUENCE IF EXISTS yudao_demo01_contact_seq; +CREATE SEQUENCE yudao_demo01_contact_seq + START 2; -- ---------------------------- -- Table structure for yudao_demo02_category -- ---------------------------- DROP TABLE IF EXISTS yudao_demo02_category; -CREATE TABLE yudao_demo02_category -( - id int8 NOT NULL default nextval('yudao_demo02_category_seq'), - name varchar(100) NOT NULL DEFAULT '', - parent_id int8 NOT NULL, - creator varchar(64) NULL DEFAULT '', - create_time timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, - updater varchar(64) NULL DEFAULT '', - update_time timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, - deleted int2 NOT NULL DEFAULT 0, - tenant_id int8 NOT NULL DEFAULT 0 +CREATE TABLE yudao_demo02_category ( + id int8 NOT NULL, + name varchar(100) NOT NULL DEFAULT '', + parent_id int8 NOT NULL, + creator varchar(64) NULL DEFAULT '', + create_time timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, + updater varchar(64) NULL DEFAULT '', + update_time timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, + deleted int2 NOT NULL DEFAULT 0, + tenant_id int8 NOT NULL DEFAULT 0 ); -ALTER TABLE yudao_demo02_category - ADD CONSTRAINT pk_yudao_demo02_category PRIMARY KEY (id); +ALTER TABLE yudao_demo02_category ADD CONSTRAINT pk_yudao_demo02_category PRIMARY KEY (id); COMMENT ON COLUMN yudao_demo02_category.id IS '编号'; COMMENT ON COLUMN yudao_demo02_category.name IS '名字'; @@ -4995,33 +4918,32 @@ INSERT INTO yudao_demo02_category (id, name, parent_id, creator, create_time, up 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', '0', 1); 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', '0', 1); 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', '0', 1); +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', '0', 1); COMMIT; -- @formatter:on -DROP SEQUENCE IF EXISTS yudao_demo03_course_seq; -CREATE SEQUENCE yudao_demo03_course_seq - START 1; +DROP SEQUENCE IF EXISTS yudao_demo02_category_seq; +CREATE SEQUENCE yudao_demo02_category_seq + START 8; -- ---------------------------- -- Table structure for yudao_demo03_course -- ---------------------------- DROP TABLE IF EXISTS yudao_demo03_course; -CREATE TABLE yudao_demo03_course -( - id int8 NOT NULL default nextval('yudao_demo03_course_seq'), - student_id int8 NOT NULL, - name varchar(100) NOT NULL DEFAULT '', - score int2 NOT NULL, - creator varchar(64) NULL DEFAULT '', - create_time timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, - updater varchar(64) NULL DEFAULT '', - update_time timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, - deleted int2 NOT NULL DEFAULT 0, - tenant_id int8 NOT NULL DEFAULT 0 +CREATE TABLE yudao_demo03_course ( + id int8 NOT NULL, + student_id int8 NOT NULL, + name varchar(100) NOT NULL DEFAULT '', + score int2 NOT NULL, + creator varchar(64) NULL DEFAULT '', + create_time timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, + updater varchar(64) NULL DEFAULT '', + update_time timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, + deleted int2 NOT NULL DEFAULT 0, + tenant_id int8 NOT NULL DEFAULT 0 ); -ALTER TABLE yudao_demo03_course - ADD CONSTRAINT pk_yudao_demo03_course PRIMARY KEY (id); +ALTER TABLE yudao_demo03_course ADD CONSTRAINT pk_yudao_demo03_course PRIMARY KEY (id); COMMENT ON COLUMN yudao_demo03_course.id IS '编号'; COMMENT ON COLUMN yudao_demo03_course.student_id IS '学生编号'; @@ -5060,30 +4982,28 @@ INSERT INTO yudao_demo03_course (id, student_id, name, score, creator, create_ti COMMIT; -- @formatter:on -DROP SEQUENCE IF EXISTS yudao_demo03_grade_seq; -CREATE SEQUENCE yudao_demo03_grade_seq - START 1; +DROP SEQUENCE IF EXISTS yudao_demo03_course_seq; +CREATE SEQUENCE yudao_demo03_course_seq + START 21; -- ---------------------------- -- Table structure for yudao_demo03_grade -- ---------------------------- DROP TABLE IF EXISTS yudao_demo03_grade; -CREATE TABLE yudao_demo03_grade -( - id int8 NOT NULL default nextval('yudao_demo03_grade_seq'), - student_id int8 NOT NULL, - name varchar(100) NOT NULL DEFAULT '', - teacher varchar(255) NOT NULL, - creator varchar(64) NULL DEFAULT '', - create_time timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, - updater varchar(64) NULL DEFAULT '', - update_time timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, - deleted int2 NOT NULL DEFAULT 0, - tenant_id int8 NOT NULL DEFAULT 0 +CREATE TABLE yudao_demo03_grade ( + id int8 NOT NULL, + student_id int8 NOT NULL, + name varchar(100) NOT NULL DEFAULT '', + teacher varchar(255) NOT NULL, + creator varchar(64) NULL DEFAULT '', + create_time timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, + updater varchar(64) NULL DEFAULT '', + update_time timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, + deleted int2 NOT NULL DEFAULT 0, + tenant_id int8 NOT NULL DEFAULT 0 ); -ALTER TABLE yudao_demo03_grade - ADD CONSTRAINT pk_yudao_demo03_grade PRIMARY KEY (id); +ALTER TABLE yudao_demo03_grade ADD CONSTRAINT pk_yudao_demo03_grade PRIMARY KEY (id); COMMENT ON COLUMN yudao_demo03_grade.id IS '编号'; COMMENT ON COLUMN yudao_demo03_grade.student_id IS '学生编号'; @@ -5108,31 +5028,29 @@ INSERT INTO yudao_demo03_grade (id, student_id, name, teacher, creator, create_t COMMIT; -- @formatter:on -DROP SEQUENCE IF EXISTS yudao_demo03_student_seq; -CREATE SEQUENCE yudao_demo03_student_seq - START 1; +DROP SEQUENCE IF EXISTS yudao_demo03_grade_seq; +CREATE SEQUENCE yudao_demo03_grade_seq + START 10; -- ---------------------------- -- Table structure for yudao_demo03_student -- ---------------------------- DROP TABLE IF EXISTS yudao_demo03_student; -CREATE TABLE yudao_demo03_student -( - id int8 NOT NULL default nextval('yudao_demo03_student_seq'), - name varchar(100) NOT NULL DEFAULT '', - sex int2 NOT NULL, - birthday timestamp NOT NULL, - description varchar(255) NOT NULL, - creator varchar(64) NULL DEFAULT '', - create_time timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, - updater varchar(64) NULL DEFAULT '', - update_time timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, - deleted int2 NOT NULL DEFAULT 0, - tenant_id int8 NOT NULL DEFAULT 0 +CREATE TABLE yudao_demo03_student ( + id int8 NOT NULL, + name varchar(100) NOT NULL DEFAULT '', + sex int2 NOT NULL, + birthday timestamp NOT NULL, + description varchar(255) NOT NULL, + creator varchar(64) NULL DEFAULT '', + create_time timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, + updater varchar(64) NULL DEFAULT '', + update_time timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, + deleted int2 NOT NULL DEFAULT 0, + tenant_id int8 NOT NULL DEFAULT 0 ); -ALTER TABLE yudao_demo03_student - ADD CONSTRAINT pk_yudao_demo03_student PRIMARY KEY (id); +ALTER TABLE yudao_demo03_student ADD CONSTRAINT pk_yudao_demo03_student PRIMARY KEY (id); COMMENT ON COLUMN yudao_demo03_student.id IS '编号'; COMMENT ON COLUMN yudao_demo03_student.name IS '名字'; @@ -5158,3 +5076,7 @@ INSERT INTO yudao_demo03_student (id, name, sex, birthday, description, creator, COMMIT; -- @formatter:on +DROP SEQUENCE IF EXISTS yudao_demo03_student_seq; +CREATE SEQUENCE yudao_demo03_student_seq + START 10; + diff --git a/yudao-framework/yudao-common/src/main/java/cn/iocoder/yudao/framework/common/util/json/databind/TimestampLocalDateTimeSerializer.java b/yudao-framework/yudao-common/src/main/java/cn/iocoder/yudao/framework/common/util/json/databind/TimestampLocalDateTimeSerializer.java index baefa5001..4e422feef 100644 --- a/yudao-framework/yudao-common/src/main/java/cn/iocoder/yudao/framework/common/util/json/databind/TimestampLocalDateTimeSerializer.java +++ b/yudao-framework/yudao-common/src/main/java/cn/iocoder/yudao/framework/common/util/json/databind/TimestampLocalDateTimeSerializer.java @@ -1,39 +1,58 @@ package cn.iocoder.yudao.framework.common.util.json.databind; +import cn.hutool.core.util.ObjUtil; import cn.hutool.core.util.ReflectUtil; +import cn.hutool.core.util.StrUtil; import com.fasterxml.jackson.annotation.JsonFormat; +import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.core.JsonGenerator; import com.fasterxml.jackson.databind.JsonSerializer; import com.fasterxml.jackson.databind.SerializerProvider; +import lombok.extern.slf4j.Slf4j; import java.io.IOException; import java.lang.reflect.Field; import java.time.LocalDateTime; import java.time.ZoneId; import java.time.format.DateTimeFormatter; +import java.util.HashMap; +import java.util.Map; +import java.util.concurrent.ConcurrentHashMap; /** * 基于时间戳的 LocalDateTime 序列化器 * * @author 老五 */ +@Slf4j public class TimestampLocalDateTimeSerializer extends JsonSerializer { public static final TimestampLocalDateTimeSerializer INSTANCE = new TimestampLocalDateTimeSerializer(); + private static final Map, Map> FIELD_CACHE = new ConcurrentHashMap<>(); + @Override public void serialize(LocalDateTime value, JsonGenerator gen, SerializerProvider serializers) throws IOException { // 情况一:有 JsonFormat 自定义注解,则使用它。https://github.com/YunaiV/ruoyi-vue-pro/pull/1019 String fieldName = gen.getOutputContext().getCurrentName(); if (fieldName != null) { - Class clazz = gen.getOutputContext().getCurrentValue().getClass(); - Field field = ReflectUtil.getField(clazz, fieldName); - JsonFormat[] jsonFormats = field.getAnnotationsByType(JsonFormat.class); - if (jsonFormats.length > 0) { - String pattern = jsonFormats[0].pattern(); - DateTimeFormatter formatter = DateTimeFormatter.ofPattern(pattern); - gen.writeString(formatter.format(value)); - return; + Object currentValue = gen.getOutputContext().getCurrentValue(); + if (currentValue != null) { + Class clazz = currentValue.getClass(); + Map fieldMap = FIELD_CACHE.computeIfAbsent(clazz, this::buildFieldMap); + Field field = fieldMap.get(fieldName); + // 进一步修复:https://gitee.com/zhijiantianya/ruoyi-vue-pro/pulls/1480 + if (field != null && field.isAnnotationPresent(JsonFormat.class)) { + JsonFormat jsonFormat = field.getAnnotation(JsonFormat.class); + try { + DateTimeFormatter formatter = DateTimeFormatter.ofPattern(jsonFormat.pattern()); + gen.writeString(formatter.format(value)); + return; + } catch (Exception ex) { + log.warn("[serialize][({}#{}) 使用 JsonFormat pattern 失败,尝试使用默认的 Long 时间戳]", + clazz.getName(), fieldName, ex); + } + } } } @@ -41,4 +60,26 @@ public class TimestampLocalDateTimeSerializer extends JsonSerializer buildFieldMap(Class clazz) { + Map fieldMap = new HashMap<>(); + for (Field field : ReflectUtil.getFields(clazz)) { + String fieldName = field.getName(); + JsonProperty jsonProperty = field.getAnnotation(JsonProperty.class); + if (jsonProperty != null) { + String value = jsonProperty.value(); + if (StrUtil.isNotEmpty(value) && ObjUtil.notEqual("\u0000", value)) { + fieldName = value; + } + } + fieldMap.put(fieldName, field); + } + return fieldMap; + } + } diff --git a/yudao-module-bpm/yudao-module-bpm-server/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/task/BpmTaskController.java b/yudao-module-bpm/yudao-module-bpm-server/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/task/BpmTaskController.java index b327b8e77..4a6e64ef3 100644 --- a/yudao-module-bpm/yudao-module-bpm-server/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/task/BpmTaskController.java +++ b/yudao-module-bpm/yudao-module-bpm-server/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/task/BpmTaskController.java @@ -100,7 +100,7 @@ public class BpmTaskController { @GetMapping("manager-page") @Operation(summary = "获取全部任务的分页", description = "用于【流程任务】菜单") - @PreAuthorize("@ss.hasPermission('bpm:task:mananger-query')") + @PreAuthorize("@ss.hasPermission('bpm:task:manager-query')") public CommonResult> getTaskManagerPage(@Valid BpmTaskPageReqVO pageVO) { PageResult pageResult = taskService.getTaskPage(getLoginUserId(), pageVO); if (CollUtil.isEmpty(pageResult.getList())) { diff --git a/yudao-module-bpm/yudao-module-bpm-server/src/main/java/cn/iocoder/yudao/module/bpm/framework/flowable/core/behavior/BpmParallelMultiInstanceBehavior.java b/yudao-module-bpm/yudao-module-bpm-server/src/main/java/cn/iocoder/yudao/module/bpm/framework/flowable/core/behavior/BpmParallelMultiInstanceBehavior.java index 57f4d393f..20fcf5475 100644 --- a/yudao-module-bpm/yudao-module-bpm-server/src/main/java/cn/iocoder/yudao/module/bpm/framework/flowable/core/behavior/BpmParallelMultiInstanceBehavior.java +++ b/yudao-module-bpm/yudao-module-bpm-server/src/main/java/cn/iocoder/yudao/module/bpm/framework/flowable/core/behavior/BpmParallelMultiInstanceBehavior.java @@ -34,6 +34,12 @@ public class BpmParallelMultiInstanceBehavior extends ParallelMultiInstanceBehav public BpmParallelMultiInstanceBehavior(Activity activity, AbstractBpmnActivityBehavior innerActivityBehavior) { super(activity, innerActivityBehavior); + // 关联 Pull Request:https://gitee.com/zhijiantianya/ruoyi-vue-pro/pulls/1483 + // 在解析/构造阶段基于 activityId 初始化与 activity 绑定且不变的字段,避免在运行期修改 Behavior 实例状态 + super.collectionExpression = null; // collectionExpression 和 collectionVariable 是互斥的 + super.collectionVariable = FlowableUtils.formatExecutionCollectionVariable(activity.getId()); + // 从 execution.getVariable() 读取当前所有任务处理的人的 key + super.collectionElementVariable = FlowableUtils.formatExecutionCollectionElementVariable(activity.getId()); } /** diff --git a/yudao-module-bpm/yudao-module-bpm-server/src/main/java/cn/iocoder/yudao/module/bpm/framework/flowable/core/behavior/BpmSequentialMultiInstanceBehavior.java b/yudao-module-bpm/yudao-module-bpm-server/src/main/java/cn/iocoder/yudao/module/bpm/framework/flowable/core/behavior/BpmSequentialMultiInstanceBehavior.java index e48b1f95d..ebf67a46b 100644 --- a/yudao-module-bpm/yudao-module-bpm-server/src/main/java/cn/iocoder/yudao/module/bpm/framework/flowable/core/behavior/BpmSequentialMultiInstanceBehavior.java +++ b/yudao-module-bpm/yudao-module-bpm-server/src/main/java/cn/iocoder/yudao/module/bpm/framework/flowable/core/behavior/BpmSequentialMultiInstanceBehavior.java @@ -30,6 +30,12 @@ public class BpmSequentialMultiInstanceBehavior extends SequentialMultiInstanceB public BpmSequentialMultiInstanceBehavior(Activity activity, AbstractBpmnActivityBehavior innerActivityBehavior) { super(activity, innerActivityBehavior); + // 关联 Pull Request:https://gitee.com/zhijiantianya/ruoyi-vue-pro/pulls/1483 + // 在解析/构造阶段基于 activityId 初始化与 activity 绑定且不变的字段,避免在运行期修改 Behavior 实例状态 + super.collectionExpression = null; // collectionExpression 和 collectionVariable 是互斥的 + super.collectionVariable = FlowableUtils.formatExecutionCollectionVariable(activity.getId()); + // 从 execution.getVariable() 读取当前所有任务处理的人的 key + super.collectionElementVariable = FlowableUtils.formatExecutionCollectionElementVariable(activity.getId()); } /** @@ -88,10 +94,6 @@ public class BpmSequentialMultiInstanceBehavior extends SequentialMultiInstanceB super.executeOriginalBehavior(execution, multiInstanceRootExecution, loopCounter); return; } - // 参见 https://gitee.com/zhijiantianya/yudao-cloud/issues/IC239F - super.collectionExpression = null; - super.collectionVariable = FlowableUtils.formatExecutionCollectionVariable(execution.getCurrentActivityId()); - super.collectionElementVariable = FlowableUtils.formatExecutionCollectionElementVariable(execution.getCurrentActivityId()); super.executeOriginalBehavior(execution, multiInstanceRootExecution, loopCounter); } diff --git a/yudao-module-bpm/yudao-module-bpm-server/src/main/java/cn/iocoder/yudao/module/bpm/framework/flowable/core/candidate/BpmTaskCandidateInvoker.java b/yudao-module-bpm/yudao-module-bpm-server/src/main/java/cn/iocoder/yudao/module/bpm/framework/flowable/core/candidate/BpmTaskCandidateInvoker.java index df8b0d5fd..cf9f1b329 100644 --- a/yudao-module-bpm/yudao-module-bpm-server/src/main/java/cn/iocoder/yudao/module/bpm/framework/flowable/core/candidate/BpmTaskCandidateInvoker.java +++ b/yudao-module-bpm/yudao-module-bpm-server/src/main/java/cn/iocoder/yudao/module/bpm/framework/flowable/core/candidate/BpmTaskCandidateInvoker.java @@ -125,6 +125,7 @@ public class BpmTaskCandidateInvoker { }); } + @DataPermission(enable = false) // 忽略数据权限,避免因为过滤,导致找不到候选人 public Set calculateUsersByActivity(BpmnModel bpmnModel, String activityId, Long startUserId, String processDefinitionId, Map processVariables) { // 如果是 CallActivity 子流程,不进行计算候选人 diff --git a/yudao-module-bpm/yudao-module-bpm-server/src/main/java/cn/iocoder/yudao/module/bpm/framework/flowable/core/listener/BpmCopyTaskDelegate.java b/yudao-module-bpm/yudao-module-bpm-server/src/main/java/cn/iocoder/yudao/module/bpm/framework/flowable/core/listener/BpmCopyTaskDelegate.java index e58d345e9..68c43db04 100644 --- a/yudao-module-bpm/yudao-module-bpm-server/src/main/java/cn/iocoder/yudao/module/bpm/framework/flowable/core/listener/BpmCopyTaskDelegate.java +++ b/yudao-module-bpm/yudao-module-bpm-server/src/main/java/cn/iocoder/yudao/module/bpm/framework/flowable/core/listener/BpmCopyTaskDelegate.java @@ -2,6 +2,7 @@ package cn.iocoder.yudao.module.bpm.framework.flowable.core.listener; import cn.hutool.core.collection.CollUtil; import cn.iocoder.yudao.module.bpm.framework.flowable.core.candidate.BpmTaskCandidateInvoker; +import cn.iocoder.yudao.module.bpm.framework.flowable.core.util.FlowableUtils; import cn.iocoder.yudao.module.bpm.service.task.BpmProcessInstanceCopyService; import jakarta.annotation.Resource; import org.flowable.bpmn.model.FlowElement; @@ -40,8 +41,9 @@ public class BpmCopyTaskDelegate implements JavaDelegate { } // 2. 执行抄送 FlowElement currentFlowElement = execution.getCurrentFlowElement(); - processInstanceCopyService.createProcessInstanceCopy(userIds, null, execution.getProcessInstanceId(), - currentFlowElement.getId(), currentFlowElement.getName(), null); + FlowableUtils.execute(execution.getTenantId(), () -> + processInstanceCopyService.createProcessInstanceCopy(userIds, null, execution.getProcessInstanceId(), + currentFlowElement.getId(), currentFlowElement.getName(), null)); } } diff --git a/yudao-module-infra/yudao-module-infra-api/src/main/java/cn/iocoder/yudao/module/infra/enums/codegen/CodegenFrontTypeEnum.java b/yudao-module-infra/yudao-module-infra-api/src/main/java/cn/iocoder/yudao/module/infra/enums/codegen/CodegenFrontTypeEnum.java index 7f55507e4..b3c8116cd 100644 --- a/yudao-module-infra/yudao-module-infra-api/src/main/java/cn/iocoder/yudao/module/infra/enums/codegen/CodegenFrontTypeEnum.java +++ b/yudao-module-infra/yudao-module-infra-api/src/main/java/cn/iocoder/yudao/module/infra/enums/codegen/CodegenFrontTypeEnum.java @@ -23,6 +23,8 @@ public enum CodegenFrontTypeEnum { VUE3_VBEN5_EP_SCHEMA(50), // Vue3 VBEN5 + EP + schema 模版 VUE3_VBEN5_EP_GENERAL(51), // Vue3 VBEN5 + EP 标准模版 + + VUE3_ADMIN_UNIAPP_WOT(60), // Vue3 Admin + Uniapp + WOT 标准模版 ; /** diff --git a/yudao-module-infra/yudao-module-infra-server/src/main/java/cn/iocoder/yudao/module/infra/controller/admin/file/FileController.java b/yudao-module-infra/yudao-module-infra-server/src/main/java/cn/iocoder/yudao/module/infra/controller/admin/file/FileController.java index 5b6f52ea9..ca7db6407 100644 --- a/yudao-module-infra/yudao-module-infra-server/src/main/java/cn/iocoder/yudao/module/infra/controller/admin/file/FileController.java +++ b/yudao-module-infra/yudao-module-infra-server/src/main/java/cn/iocoder/yudao/module/infra/controller/admin/file/FileController.java @@ -72,6 +72,14 @@ public class FileController { return success(fileService.createFile(createReqVO)); } + @GetMapping("/get") + @Operation(summary = "获得文件") + @Parameter(name = "id", description = "编号", required = true) + @PreAuthorize("@ss.hasPermission('infra:file:query')") + public CommonResult getFile(@RequestParam("id") Long id) { + return success(BeanUtils.toBean(fileService.getFile(id), FileRespVO.class)); + } + @DeleteMapping("/delete") @Operation(summary = "删除文件") @Parameter(name = "id", description = "编号", required = true) diff --git a/yudao-module-infra/yudao-module-infra-server/src/main/java/cn/iocoder/yudao/module/infra/service/codegen/CodegenServiceImpl.java b/yudao-module-infra/yudao-module-infra-server/src/main/java/cn/iocoder/yudao/module/infra/service/codegen/CodegenServiceImpl.java index 01efb65ca..3e3ff2dbf 100644 --- a/yudao-module-infra/yudao-module-infra-server/src/main/java/cn/iocoder/yudao/module/infra/service/codegen/CodegenServiceImpl.java +++ b/yudao-module-infra/yudao-module-infra-server/src/main/java/cn/iocoder/yudao/module/infra/service/codegen/CodegenServiceImpl.java @@ -4,12 +4,14 @@ import cn.hutool.core.collection.CollUtil; import cn.hutool.core.util.StrUtil; import cn.iocoder.yudao.framework.common.pojo.PageResult; import cn.iocoder.yudao.framework.common.util.object.BeanUtils; +import cn.iocoder.yudao.framework.mybatis.core.util.JdbcUtils; import cn.iocoder.yudao.module.infra.controller.admin.codegen.vo.CodegenCreateListReqVO; import cn.iocoder.yudao.module.infra.controller.admin.codegen.vo.CodegenUpdateReqVO; import cn.iocoder.yudao.module.infra.controller.admin.codegen.vo.table.CodegenTablePageReqVO; import cn.iocoder.yudao.module.infra.controller.admin.codegen.vo.table.DatabaseTableRespVO; import cn.iocoder.yudao.module.infra.dal.dataobject.codegen.CodegenColumnDO; import cn.iocoder.yudao.module.infra.dal.dataobject.codegen.CodegenTableDO; +import cn.iocoder.yudao.module.infra.dal.dataobject.db.DataSourceConfigDO; import cn.iocoder.yudao.module.infra.dal.mysql.codegen.CodegenColumnMapper; import cn.iocoder.yudao.module.infra.dal.mysql.codegen.CodegenTableMapper; import cn.iocoder.yudao.module.infra.enums.codegen.CodegenSceneEnum; @@ -17,7 +19,9 @@ import cn.iocoder.yudao.module.infra.enums.codegen.CodegenTemplateTypeEnum; import cn.iocoder.yudao.module.infra.framework.codegen.config.CodegenProperties; import cn.iocoder.yudao.module.infra.service.codegen.inner.CodegenBuilder; import cn.iocoder.yudao.module.infra.service.codegen.inner.CodegenEngine; +import cn.iocoder.yudao.module.infra.service.db.DataSourceConfigService; import cn.iocoder.yudao.module.infra.service.db.DatabaseTableService; +import com.baomidou.mybatisplus.annotation.DbType; import com.baomidou.mybatisplus.generator.config.po.TableField; import com.baomidou.mybatisplus.generator.config.po.TableInfo; import com.google.common.annotations.VisibleForTesting; @@ -45,6 +49,8 @@ public class CodegenServiceImpl implements CodegenService { @Resource private DatabaseTableService databaseTableService; + @Resource + private DataSourceConfigService dataSourceConfigService; @Resource private CodegenTableMapper codegenTableMapper; @@ -284,8 +290,11 @@ public class CodegenServiceImpl implements CodegenService { } } + // 获取数据源对应的数据库类型 + DataSourceConfigDO dataSourceConfig = dataSourceConfigService.getDataSourceConfig(table.getDataSourceConfigId()); + DbType dbType = JdbcUtils.getDbType(dataSourceConfig.getUrl()); // 执行生成 - return codegenEngine.execute(table, columns, subTables, subColumnsList); + return codegenEngine.execute(dbType, table, columns, subTables, subColumnsList); } @Override diff --git a/yudao-module-infra/yudao-module-infra-server/src/main/java/cn/iocoder/yudao/module/infra/service/codegen/inner/CodegenEngine.java b/yudao-module-infra/yudao-module-infra-server/src/main/java/cn/iocoder/yudao/module/infra/service/codegen/inner/CodegenEngine.java index cf8e03094..458acb540 100644 --- a/yudao-module-infra/yudao-module-infra-server/src/main/java/cn/iocoder/yudao/module/infra/service/codegen/inner/CodegenEngine.java +++ b/yudao-module-infra/yudao-module-infra-server/src/main/java/cn/iocoder/yudao/module/infra/service/codegen/inner/CodegenEngine.java @@ -33,6 +33,7 @@ import cn.iocoder.yudao.module.infra.enums.codegen.CodegenSceneEnum; import cn.iocoder.yudao.module.infra.enums.codegen.CodegenTemplateTypeEnum; import cn.iocoder.yudao.module.infra.enums.codegen.CodegenVOTypeEnum; import cn.iocoder.yudao.module.infra.framework.codegen.config.CodegenProperties; +import com.baomidou.mybatisplus.annotation.DbType; import com.google.common.annotations.VisibleForTesting; import com.google.common.collect.ImmutableTable; import com.google.common.collect.Maps; @@ -96,7 +97,7 @@ public class CodegenEngine { .build(); /** - * 后端的配置模版 + * 前端的配置模版 * * key1:UI 模版的类型 {@link CodegenFrontTypeEnum#getType()} * key2:模板在 resources 的地址 @@ -137,6 +138,16 @@ public class CodegenEngine { vue3FilePath("views/${table.moduleName}/${table.businessName}/components/${subSimpleClassName}List.vue")) .put(CodegenFrontTypeEnum.VUE3_ELEMENT_PLUS.getType(), vue3TemplatePath("api/api.ts"), vue3FilePath("api/${table.moduleName}/${table.businessName}/index.ts")) + .put(CodegenFrontTypeEnum.VUE3_ADMIN_UNIAPP_WOT.getType(), vue3AdminUniappTemplatePath("api/api.ts"), + vue3UniappFilePath("api/${table.moduleName}/${table.businessName}/index.ts")) + .put(CodegenFrontTypeEnum.VUE3_ADMIN_UNIAPP_WOT.getType(), vue3AdminUniappTemplatePath("views/index.vue"), + vue3UniappFilePath("pages-${table.moduleName}/${table.businessName}/index.vue")) + .put(CodegenFrontTypeEnum.VUE3_ADMIN_UNIAPP_WOT.getType(), vue3AdminUniappTemplatePath("components/search-form.vue"), + vue3UniappFilePath("pages-${table.moduleName}/${table.businessName}/components/search-form.vue")) + .put(CodegenFrontTypeEnum.VUE3_ADMIN_UNIAPP_WOT.getType(), vue3AdminUniappTemplatePath("views/form/index.vue"), + vue3UniappFilePath("pages-${table.moduleName}/${table.businessName}/form/index.vue")) + .put(CodegenFrontTypeEnum.VUE3_ADMIN_UNIAPP_WOT.getType(), vue3AdminUniappTemplatePath("views/detail/index.vue"), + vue3UniappFilePath("pages-${table.moduleName}/${table.businessName}/detail/index.vue")) // VUE3_VBEN2_ANTD_SCHEMA .put(CodegenFrontTypeEnum.VUE3_VBEN2_ANTD_SCHEMA.getType(), vue3VbenTemplatePath("views/data.ts"), vue3VbenFilePath("views/${table.moduleName}/${table.businessName}/${classNameVar}.data.ts")) @@ -300,16 +311,17 @@ public class CodegenEngine { /** * 生成代码 * + * @param dbType 数据库类型 * @param table 表定义 * @param columns table 的字段定义数组 * @param subTables 子表数组,当且仅当主子表时使用 * @param subColumnsList subTables 的字段定义数组 * @return 生成的代码,key 是路径,value 是对应代码 */ - public Map execute(CodegenTableDO table, List columns, + public Map execute(DbType dbType, CodegenTableDO table, List columns, List subTables, List> subColumnsList) { // 1.1 初始化 bindMap 上下文 - Map bindingMap = initBindingMap(table, columns, subTables, subColumnsList); + Map bindingMap = initBindingMap(dbType, table, columns, subTables, subColumnsList); // 1.2 获得模版 Map templates = getTemplates(table.getFrontType()); @@ -387,8 +399,8 @@ public class CodegenEngine { * @return 格式化后的代码 */ private String prettyCode(String content, String vmPath) { - // Vue 界面:去除字段后面多余的 , 逗号,解决前端的 Pretty 代码格式检查的报错(需要排除 vben5) - if (!StrUtil.contains(vmPath, "vben5")) { + // Vue 界面:去除字段后面多余的 , 逗号,解决前端的 Pretty 代码格式检查的报错(需要排除 vben5、vue3_admin_uniapp) + if (!StrUtil.containsAny(vmPath, "vben5", "vue3_admin_uniapp")) { content = content.replaceAll(",\n}", "\n}").replaceAll(",\n }", "\n }"); } // Vue 界面:去除多的 dateFormatter,只有一个的情况下,说明没使用到 @@ -415,10 +427,11 @@ public class CodegenEngine { return content; } - private Map initBindingMap(CodegenTableDO table, List columns, + private Map initBindingMap(DbType dbType, CodegenTableDO table, List columns, List subTables, List> subColumnsList) { // 创建 bindingMap Map bindingMap = new HashMap<>(globalBindingMap); + bindingMap.put("dbType", dbType); bindingMap.put("table", table); bindingMap.put("columns", columns); bindingMap.put("primaryColumn", CollectionUtils.findFirst(columns, CodegenColumnDO::getPrimaryKey)); // 主键字段 @@ -617,6 +630,15 @@ public class CodegenEngine { "src/" + path; } + private static String vue3AdminUniappTemplatePath(String path) { + return "codegen/vue3_admin_uniapp/" + path + ".vm"; + } + + private static String vue3UniappFilePath(String path) { + return "yudao-ui-${sceneEnum.basePackage}-uniapp/" + // 顶级目录 + "src/" + path; + } + private static String vue3VbenFilePath(String path) { return "yudao-ui-${sceneEnum.basePackage}-vben/" + // 顶级目录 "src/" + path; diff --git a/yudao-module-infra/yudao-module-infra-server/src/main/java/cn/iocoder/yudao/module/infra/service/file/FileService.java b/yudao-module-infra/yudao-module-infra-server/src/main/java/cn/iocoder/yudao/module/infra/service/file/FileService.java index 5e3448b0f..421bbe8d4 100644 --- a/yudao-module-infra/yudao-module-infra-server/src/main/java/cn/iocoder/yudao/module/infra/service/file/FileService.java +++ b/yudao-module-infra/yudao-module-infra-server/src/main/java/cn/iocoder/yudao/module/infra/service/file/FileService.java @@ -61,6 +61,7 @@ public interface FileService { * @return 编号 */ Long createFile(FileCreateReqVO createReqVO); + FileDO getFile(Long id); /** * 删除文件 diff --git a/yudao-module-infra/yudao-module-infra-server/src/main/java/cn/iocoder/yudao/module/infra/service/file/FileServiceImpl.java b/yudao-module-infra/yudao-module-infra-server/src/main/java/cn/iocoder/yudao/module/infra/service/file/FileServiceImpl.java index f47275d33..703df8c5f 100644 --- a/yudao-module-infra/yudao-module-infra-server/src/main/java/cn/iocoder/yudao/module/infra/service/file/FileServiceImpl.java +++ b/yudao-module-infra/yudao-module-infra-server/src/main/java/cn/iocoder/yudao/module/infra/service/file/FileServiceImpl.java @@ -152,6 +152,11 @@ public class FileServiceImpl implements FileService { return file.getId(); } + @Override + public FileDO getFile(Long id) { + return validateFileExists(id); + } + @Override public void deleteFile(Long id) throws Exception { // 校验存在 diff --git a/yudao-module-infra/yudao-module-infra-server/src/main/resources/codegen/sql/sql.vm b/yudao-module-infra/yudao-module-infra-server/src/main/resources/codegen/sql/sql.vm index 41b107dba..6e50837ca 100644 --- a/yudao-module-infra/yudao-module-infra-server/src/main/resources/codegen/sql/sql.vm +++ b/yudao-module-infra/yudao-module-infra-server/src/main/resources/codegen/sql/sql.vm @@ -1,3 +1,24 @@ +## 通用变量定义 +#set ($functionNames = ['查询', '创建', '更新', '删除', '导出']) +#set ($functionOps = ['query', 'create', 'update', 'delete', 'export']) +## +## 宏定义:生成按钮 SQL(通用部分) +#macro(insertButtonSql $parentIdVar) +#foreach ($functionName in $functionNames) +#set ($index = $foreach.count - 1) + INSERT INTO system_menu( + name, permission, type, sort, parent_id, + path, icon, component, status + ) + VALUES ( + '${table.classComment}${functionName}', '${permissionPrefix}:${functionOps.get($index)}', 3, $foreach.count, ${parentIdVar}, + '', '', '', 0 + ); +#end +#end +## +## ======================= MySQL / OceanBase ======================= +#if ($dbType.name() == 'MYSQL' || $dbType.name() == 'OCEAN_BASE') -- 菜单 SQL INSERT INTO system_menu( name, permission, type, sort, parent_id, @@ -9,12 +30,9 @@ VALUES ( ); -- 按钮父菜单ID --- 暂时只支持 MySQL。如果你是 Oracle、PostgreSQL、SQLServer 的话,需要手动修改 @parentId 的部分的代码 SELECT @parentId := LAST_INSERT_ID(); -- 按钮 SQL -#set ($functionNames = ['查询', '创建', '更新', '删除', '导出']) -#set ($functionOps = ['query', 'create', 'update', 'delete', 'export']) #foreach ($functionName in $functionNames) #set ($index = $foreach.count - 1) INSERT INTO system_menu( @@ -25,4 +43,139 @@ VALUES ( '${table.classComment}${functionName}', '${permissionPrefix}:${functionOps.get($index)}', 3, $foreach.count, @parentId, '', '', '', 0 ); -#end \ No newline at end of file +#end +## +## ======================= Oracle / 达梦 DM ======================= +#elseif ($dbType.name() == 'ORACLE' || $dbType.name() == 'DM') +-- 菜单 SQL +INSERT INTO system_menu( + name, permission, type, sort, parent_id, + path, icon, component, status, component_name +) +VALUES ( + '${table.classComment}管理', '', 2, 0, ${table.parentMenuId}, + '${simpleClassName_strikeCase}', '', '${table.moduleName}/${table.businessName}/index', 0, '${table.className}' +); + +-- 按钮父菜单ID +-- 说明:Oracle/达梦 使用序列获取上一个插入的 ID +DECLARE + v_parent_id NUMBER; +BEGIN + SELECT system_menu_seq.CURRVAL INTO v_parent_id FROM DUAL; + -- 按钮 SQL +#foreach ($functionName in $functionNames) +#set ($index = $foreach.count - 1) + INSERT INTO system_menu( + name, permission, type, sort, parent_id, + path, icon, component, status + ) + VALUES ( + '${table.classComment}${functionName}', '${permissionPrefix}:${functionOps.get($index)}', 3, $foreach.count, v_parent_id, + '', '', '', 0 + ); +#end +END; +/ +## +## ======================= PostgreSQL / 人大金仓 KingbaseES ======================= +#elseif ($dbType.name() == 'POSTGRE_SQL' || $dbType.name() == 'KINGBASE_ES') +-- 菜单 SQL +INSERT INTO system_menu( + name, permission, type, sort, parent_id, + path, icon, component, status, component_name +) +VALUES ( + '${table.classComment}管理', '', 2, 0, ${table.parentMenuId}, + '${simpleClassName_strikeCase}', '', '${table.moduleName}/${table.businessName}/index', 0, '${table.className}' +); + +-- 按钮父菜单ID +-- 说明:PostgreSQL/KingbaseES 使用 lastval() 获取上一个插入的序列值 +DO $$ +DECLARE + v_parent_id BIGINT; +BEGIN + v_parent_id := lastval(); + -- 按钮 SQL +#foreach ($functionName in $functionNames) +#set ($index = $foreach.count - 1) + INSERT INTO system_menu( + name, permission, type, sort, parent_id, + path, icon, component, status + ) + VALUES ( + '${table.classComment}${functionName}', '${permissionPrefix}:${functionOps.get($index)}', 3, $foreach.count, v_parent_id, + '', '', '', 0 + ); +#end +END $$; +## +## ======================= SQL Server ======================= +#elseif ($dbType.name() == 'SQL_SERVER' || $dbType.name() == 'SQL_SERVER2005') +-- 菜单 SQL +INSERT INTO system_menu( + name, permission, type, sort, parent_id, + path, icon, component, status, component_name +) +VALUES ( + '${table.classComment}管理', '', 2, 0, ${table.parentMenuId}, + '${simpleClassName_strikeCase}', '', '${table.moduleName}/${table.businessName}/index', 0, '${table.className}' +); + +-- 按钮父菜单ID +-- 说明:SQL Server 使用 SCOPE_IDENTITY() 获取上一个插入的自增 ID +DECLARE @parentId BIGINT; +SET @parentId = SCOPE_IDENTITY(); + +-- 按钮 SQL +#foreach ($functionName in $functionNames) +#set ($index = $foreach.count - 1) +INSERT INTO system_menu( + name, permission, type, sort, parent_id, + path, icon, component, status +) +VALUES ( + '${table.classComment}${functionName}', '${permissionPrefix}:${functionOps.get($index)}', 3, $foreach.count, @parentId, + '', '', '', 0 +); +#end +## +## ======================= 不支持的数据库类型 ======================= +#else +-- !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! +-- 注意:当前数据库类型 ${dbType.name()} 暂不支持自动生成菜单 SQL +-- 请参考以下 MySQL 语法,手动修改为您的数据库对应的语法 +-- !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! + +-- 菜单 SQL +INSERT INTO system_menu( + name, permission, type, sort, parent_id, + path, icon, component, status, component_name +) +VALUES ( + '${table.classComment}管理', '', 2, 0, ${table.parentMenuId}, + '${simpleClassName_strikeCase}', '', '${table.moduleName}/${table.businessName}/index', 0, '${table.className}' +); + +-- 按钮父菜单ID +-- TODO: 请根据您的数据库类型,修改获取上一个插入 ID 的方式 +-- MySQL: SELECT @parentId := LAST_INSERT_ID(); +-- Oracle: SELECT system_menu_seq.CURRVAL INTO v_parent_id FROM DUAL; +-- PostgreSQL: SELECT lastval() INTO v_parent_id; +-- SQL Server: SET @parentId = SCOPE_IDENTITY(); +SELECT @parentId := LAST_INSERT_ID(); + +-- 按钮 SQL +#foreach ($functionName in $functionNames) +#set ($index = $foreach.count - 1) +INSERT INTO system_menu( + name, permission, type, sort, parent_id, + path, icon, component, status +) +VALUES ( + '${table.classComment}${functionName}', '${permissionPrefix}:${functionOps.get($index)}', 3, $foreach.count, @parentId, + '', '', '', 0 +); +#end +#end diff --git a/yudao-module-infra/yudao-module-infra-server/src/main/resources/codegen/vue3_admin_uniapp/components/search-form.vue.vm b/yudao-module-infra/yudao-module-infra-server/src/main/resources/codegen/vue3_admin_uniapp/components/search-form.vue.vm new file mode 100644 index 000000000..194f17290 --- /dev/null +++ b/yudao-module-infra/yudao-module-infra-server/src/main/resources/codegen/vue3_admin_uniapp/components/search-form.vue.vm @@ -0,0 +1,297 @@ + + + + diff --git a/yudao-module-infra/yudao-module-infra-server/src/main/resources/codegen/vue3_admin_uniapp/views/detail/index.vue.vm b/yudao-module-infra/yudao-module-infra-server/src/main/resources/codegen/vue3_admin_uniapp/views/detail/index.vue.vm new file mode 100644 index 000000000..b3302e521 --- /dev/null +++ b/yudao-module-infra/yudao-module-infra-server/src/main/resources/codegen/vue3_admin_uniapp/views/detail/index.vue.vm @@ -0,0 +1,151 @@ + + + + + diff --git a/yudao-module-infra/yudao-module-infra-server/src/main/resources/codegen/vue3_admin_uniapp/views/form/index.vue.vm b/yudao-module-infra/yudao-module-infra-server/src/main/resources/codegen/vue3_admin_uniapp/views/form/index.vue.vm new file mode 100644 index 000000000..60c844381 --- /dev/null +++ b/yudao-module-infra/yudao-module-infra-server/src/main/resources/codegen/vue3_admin_uniapp/views/form/index.vue.vm @@ -0,0 +1,253 @@ + + + + + diff --git a/yudao-module-infra/yudao-module-infra-server/src/main/resources/codegen/vue3_admin_uniapp/views/index.vue.vm b/yudao-module-infra/yudao-module-infra-server/src/main/resources/codegen/vue3_admin_uniapp/views/index.vue.vm new file mode 100644 index 000000000..2d7daaba1 --- /dev/null +++ b/yudao-module-infra/yudao-module-infra-server/src/main/resources/codegen/vue3_admin_uniapp/views/index.vue.vm @@ -0,0 +1,211 @@ + + + + + diff --git a/yudao-module-infra/yudao-module-infra-server/src/test/java/cn/iocoder/yudao/module/infra/service/codegen/CodegenServiceImplTest.java b/yudao-module-infra/yudao-module-infra-server/src/test/java/cn/iocoder/yudao/module/infra/service/codegen/CodegenServiceImplTest.java index 1e2ecbc27..86f1f10d8 100644 --- a/yudao-module-infra/yudao-module-infra-server/src/test/java/cn/iocoder/yudao/module/infra/service/codegen/CodegenServiceImplTest.java +++ b/yudao-module-infra/yudao-module-infra-server/src/test/java/cn/iocoder/yudao/module/infra/service/codegen/CodegenServiceImplTest.java @@ -11,6 +11,7 @@ import cn.iocoder.yudao.module.infra.controller.admin.codegen.vo.table.CodegenTa import cn.iocoder.yudao.module.infra.controller.admin.codegen.vo.table.DatabaseTableRespVO; import cn.iocoder.yudao.module.infra.dal.dataobject.codegen.CodegenColumnDO; import cn.iocoder.yudao.module.infra.dal.dataobject.codegen.CodegenTableDO; +import cn.iocoder.yudao.module.infra.dal.dataobject.db.DataSourceConfigDO; import cn.iocoder.yudao.module.infra.dal.mysql.codegen.CodegenColumnMapper; import cn.iocoder.yudao.module.infra.dal.mysql.codegen.CodegenTableMapper; import cn.iocoder.yudao.module.infra.enums.codegen.CodegenFrontTypeEnum; @@ -19,7 +20,9 @@ import cn.iocoder.yudao.module.infra.enums.codegen.CodegenTemplateTypeEnum; import cn.iocoder.yudao.module.infra.framework.codegen.config.CodegenProperties; import cn.iocoder.yudao.module.infra.service.codegen.inner.CodegenBuilder; import cn.iocoder.yudao.module.infra.service.codegen.inner.CodegenEngine; +import cn.iocoder.yudao.module.infra.service.db.DataSourceConfigService; import cn.iocoder.yudao.module.infra.service.db.DatabaseTableService; +import com.baomidou.mybatisplus.annotation.DbType; import com.baomidou.mybatisplus.generator.config.po.TableField; import com.baomidou.mybatisplus.generator.config.po.TableInfo; import jakarta.annotation.Resource; @@ -62,6 +65,8 @@ public class CodegenServiceImplTest extends BaseDbUnitTest { @MockitoBean private DatabaseTableService databaseTableService; + @MockitoBean + private DataSourceConfigService dataSourceConfigService; @MockitoBean private CodegenBuilder codegenBuilder; @@ -453,9 +458,12 @@ public class CodegenServiceImplTest extends BaseDbUnitTest { CodegenColumnDO column02 = randomPojo(CodegenColumnDO.class, o -> o.setTableId(table.getId()) .setOrdinalPosition(2)); codegenColumnMapper.insert(column02); + // mock 数据(DataSourceConfigDO) + when(dataSourceConfigService.getDataSourceConfig(eq(table.getDataSourceConfigId()))) + .thenReturn(randomPojo(DataSourceConfigDO.class, o -> o.setUrl("jdbc:mysql://"))); // mock 执行生成 Map codes = MapUtil.of(randomString(), randomString()); - when(codegenEngine.execute(eq(table), argThat(columns -> { + when(codegenEngine.execute(eq(DbType.MYSQL), eq(table), argThat(columns -> { assertEquals(2, columns.size()); assertEquals(column01, columns.get(0)); assertEquals(column02, columns.get(1)); @@ -494,9 +502,12 @@ public class CodegenServiceImplTest extends BaseDbUnitTest { // mock 数据(sub CodegenColumnDO) CodegenColumnDO subColumn01 = randomPojo(CodegenColumnDO.class, o -> o.setId(1024L).setTableId(subTable.getId())); codegenColumnMapper.insert(subColumn01); + // mock 数据(DataSourceConfigDO) + when(dataSourceConfigService.getDataSourceConfig(eq(table.getDataSourceConfigId()))) + .thenReturn(randomPojo(DataSourceConfigDO.class, o -> o.setUrl("jdbc:mysql://"))); // mock 执行生成 Map codes = MapUtil.of(randomString(), randomString()); - when(codegenEngine.execute(eq(table), argThat(columns -> { + when(codegenEngine.execute(eq(DbType.MYSQL), eq(table), argThat(columns -> { assertEquals(2, columns.size()); assertEquals(column01, columns.get(0)); assertEquals(column02, columns.get(1)); diff --git a/yudao-module-infra/yudao-module-infra-server/src/test/java/cn/iocoder/yudao/module/infra/service/codegen/inner/CodegenEngineVue2Test.java b/yudao-module-infra/yudao-module-infra-server/src/test/java/cn/iocoder/yudao/module/infra/service/codegen/inner/CodegenEngineVue2Test.java index a251484df..9cc0e05c9 100644 --- a/yudao-module-infra/yudao-module-infra-server/src/test/java/cn/iocoder/yudao/module/infra/service/codegen/inner/CodegenEngineVue2Test.java +++ b/yudao-module-infra/yudao-module-infra-server/src/test/java/cn/iocoder/yudao/module/infra/service/codegen/inner/CodegenEngineVue2Test.java @@ -4,6 +4,7 @@ import cn.iocoder.yudao.module.infra.dal.dataobject.codegen.CodegenColumnDO; import cn.iocoder.yudao.module.infra.dal.dataobject.codegen.CodegenTableDO; import cn.iocoder.yudao.module.infra.enums.codegen.CodegenFrontTypeEnum; import cn.iocoder.yudao.module.infra.enums.codegen.CodegenTemplateTypeEnum; +import com.baomidou.mybatisplus.annotation.DbType; import org.junit.jupiter.api.Disabled; import org.junit.jupiter.api.Test; @@ -28,7 +29,7 @@ public class CodegenEngineVue2Test extends CodegenEngineAbstractTest { List columns = getColumnList("student"); // 调用 - Map result = codegenEngine.execute(table, columns, null, null); + Map result = codegenEngine.execute(DbType.MYSQL, table, columns, null, null); // 生成测试文件 //writeResult(result, resourcesPath + "/vue2_one"); // 断言 @@ -44,7 +45,7 @@ public class CodegenEngineVue2Test extends CodegenEngineAbstractTest { List columns = getColumnList("category"); // 调用 - Map result = codegenEngine.execute(table, columns, null, null); + Map result = codegenEngine.execute(DbType.MYSQL, table, columns, null, null); // 生成测试文件 //writeResult(result, resourcesPath + "/vue2_tree"); // 断言 @@ -88,7 +89,7 @@ public class CodegenEngineVue2Test extends CodegenEngineAbstractTest { List teacherColumns = getColumnList("teacher"); // 调用 - Map result = codegenEngine.execute(table, columns, + Map result = codegenEngine.execute(DbType.MYSQL, table, columns, Arrays.asList(contactTable, teacherTable), Arrays.asList(contactColumns, teacherColumns)); // 生成测试文件 //writeResult(result, resourcesPath + path); diff --git a/yudao-module-infra/yudao-module-infra-server/src/test/java/cn/iocoder/yudao/module/infra/service/codegen/inner/CodegenEngineVue3Test.java b/yudao-module-infra/yudao-module-infra-server/src/test/java/cn/iocoder/yudao/module/infra/service/codegen/inner/CodegenEngineVue3Test.java index 7695dac70..109e44ff6 100644 --- a/yudao-module-infra/yudao-module-infra-server/src/test/java/cn/iocoder/yudao/module/infra/service/codegen/inner/CodegenEngineVue3Test.java +++ b/yudao-module-infra/yudao-module-infra-server/src/test/java/cn/iocoder/yudao/module/infra/service/codegen/inner/CodegenEngineVue3Test.java @@ -4,6 +4,7 @@ import cn.iocoder.yudao.module.infra.dal.dataobject.codegen.CodegenColumnDO; import cn.iocoder.yudao.module.infra.dal.dataobject.codegen.CodegenTableDO; import cn.iocoder.yudao.module.infra.enums.codegen.CodegenFrontTypeEnum; import cn.iocoder.yudao.module.infra.enums.codegen.CodegenTemplateTypeEnum; +import com.baomidou.mybatisplus.annotation.DbType; import org.junit.jupiter.api.Disabled; import org.junit.jupiter.api.Test; @@ -28,7 +29,7 @@ public class CodegenEngineVue3Test extends CodegenEngineAbstractTest { List columns = getColumnList("student"); // 调用 - Map result = codegenEngine.execute(table, columns, null, null); + Map result = codegenEngine.execute(DbType.MYSQL, table, columns, null, null); // 生成测试文件 //writeResult(result, resourcesPath + "/vue3_one"); // 断言 @@ -44,7 +45,7 @@ public class CodegenEngineVue3Test extends CodegenEngineAbstractTest { List columns = getColumnList("category"); // 调用 - Map result = codegenEngine.execute(table, columns, null, null); + Map result = codegenEngine.execute(DbType.MYSQL, table, columns, null, null); // 生成测试文件 //writeResult(result, resourcesPath + "/vue3_tree"); // 断言 @@ -88,7 +89,7 @@ public class CodegenEngineVue3Test extends CodegenEngineAbstractTest { List teacherColumns = getColumnList("teacher"); // 调用 - Map result = codegenEngine.execute(table, columns, + Map result = codegenEngine.execute(DbType.MYSQL, table, columns, Arrays.asList(contactTable, teacherTable), Arrays.asList(contactColumns, teacherColumns)); // 生成测试文件 //writeResult(result, resourcesPath + path); diff --git a/yudao-module-mall/yudao-module-promotion-server/src/main/java/cn/iocoder/yudao/module/promotion/dal/mysql/coupon/CouponTemplateMapper.java b/yudao-module-mall/yudao-module-promotion-server/src/main/java/cn/iocoder/yudao/module/promotion/dal/mysql/coupon/CouponTemplateMapper.java index 84e98f3db..68693e0a3 100755 --- a/yudao-module-mall/yudao-module-promotion-server/src/main/java/cn/iocoder/yudao/module/promotion/dal/mysql/coupon/CouponTemplateMapper.java +++ b/yudao-module-mall/yudao-module-promotion-server/src/main/java/cn/iocoder/yudao/module/promotion/dal/mysql/coupon/CouponTemplateMapper.java @@ -76,7 +76,7 @@ public interface CouponTemplateMapper extends BaseMapperX { .in(CouponTemplateDO::getTakeType, canTakeTypes) // 2. 领取方式一致 .and(ww -> ww.gt(CouponTemplateDO::getValidEndTime, LocalDateTime.now()) // 3.1 未过期 .or().eq(CouponTemplateDO::getValidityType, CouponTemplateValidityTypeEnum.TERM.getType())) // 3.2 领取之后 - .apply(" (take_count < total_count OR total_count = -1)"); // 4. 剩余数量大于 0,或者无限领取 + .apply(" (take_count < total_count OR total_count = " + CouponTemplateDO.TOTAL_COUNT_MAX + ")"); // 4. 剩余数量大于 0,或者无限领取 } return canTakeConsumer; } diff --git a/yudao-module-mall/yudao-module-promotion-server/src/main/java/cn/iocoder/yudao/module/promotion/service/coupon/CouponServiceImpl.java b/yudao-module-mall/yudao-module-promotion-server/src/main/java/cn/iocoder/yudao/module/promotion/service/coupon/CouponServiceImpl.java index cefb7264c..229f2baa5 100644 --- a/yudao-module-mall/yudao-module-promotion-server/src/main/java/cn/iocoder/yudao/module/promotion/service/coupon/CouponServiceImpl.java +++ b/yudao-module-mall/yudao-module-promotion-server/src/main/java/cn/iocoder/yudao/module/promotion/service/coupon/CouponServiceImpl.java @@ -285,8 +285,8 @@ public class CouponServiceImpl implements CouponService { // 校验剩余发放数量是否充足(仅在 CouponTakeTypeEnum.USER 用户领取时) // 关联案例:https://t.zsxq.com/mElGQ、https://t.zsxq.com/6pLzr if (CouponTakeTypeEnum.isUser(couponTemplate.getTakeType()) - && ObjUtil.notEqual(couponTemplate.getTakeLimitCount(), CouponTemplateDO.TAKE_LIMIT_COUNT_MAX) // 校验不限制领取数 - && couponTemplate.getTakeCount() > couponTemplate.getTotalCount()) { // 已领取数量 >= 总发放数量 + && !couponTemplateService.isTotalCountUnlimited(couponTemplate.getTotalCount()) // 校验不限制总发放数量 + && couponTemplate.getTakeCount() > couponTemplate.getTotalCount()) { // 已领取数量 > 总发放数量 throw exception(COUPON_TEMPLATE_NOT_ENOUGH); } // 校验"固定日期"的有效期类型是否过期 @@ -304,7 +304,7 @@ public class CouponServiceImpl implements CouponService { * @param couponTemplate 优惠劵模版 */ private void removeTakeLimitUser(Set userIds, CouponTemplateDO couponTemplate) { - if (couponTemplate.getTakeLimitCount() <= 0) { + if (couponTemplateService.isTakeLimitCountUnlimited(couponTemplate.getTakeLimitCount())) { return; } // 查询已领过券的用户 @@ -360,7 +360,8 @@ public class CouponServiceImpl implements CouponService { } // 2.1 过滤领取数量无限制的 - Set templateIds = convertSet(templates, CouponTemplateDO::getId, template -> template.getTakeLimitCount() != -1); + Set templateIds = convertSet(templates, CouponTemplateDO::getId, + template -> !couponTemplateService.isTakeLimitCountUnlimited(template.getTakeLimitCount())); // 2.2 检查用户领取的数量是否超过限制 if (CollUtil.isNotEmpty(templateIds)) { Map couponTakeCountMap = this.getTakeCountMapByTemplateIds(templateIds, userId); diff --git a/yudao-module-mall/yudao-module-promotion-server/src/main/java/cn/iocoder/yudao/module/promotion/service/coupon/CouponTemplateService.java b/yudao-module-mall/yudao-module-promotion-server/src/main/java/cn/iocoder/yudao/module/promotion/service/coupon/CouponTemplateService.java index 75c03b56a..cce2cf59e 100755 --- a/yudao-module-mall/yudao-module-promotion-server/src/main/java/cn/iocoder/yudao/module/promotion/service/coupon/CouponTemplateService.java +++ b/yudao-module-mall/yudao-module-promotion-server/src/main/java/cn/iocoder/yudao/module/promotion/service/coupon/CouponTemplateService.java @@ -6,8 +6,8 @@ import cn.iocoder.yudao.module.promotion.controller.admin.coupon.vo.template.Cou import cn.iocoder.yudao.module.promotion.controller.admin.coupon.vo.template.CouponTemplateUpdateReqVO; import cn.iocoder.yudao.module.promotion.dal.dataobject.coupon.CouponTemplateDO; import cn.iocoder.yudao.module.promotion.enums.coupon.CouponTakeTypeEnum; -import jakarta.validation.Valid; +import jakarta.validation.Valid; import java.util.Collection; import java.util.List; @@ -18,6 +18,23 @@ import java.util.List; */ public interface CouponTemplateService { + /** + * 判断是否不限制每人领取数量 + * + * @param takeLimitCount 每人限领个数 + * @return 是否不限制 + */ + boolean isTakeLimitCountUnlimited(Integer takeLimitCount); + + /** + * 判断是否不限制总发放数量 + * + * @param totalCount 发放数量 + * @return 是否不限制 + */ + @SuppressWarnings("BooleanMethodIsAlwaysInverted") + boolean isTotalCountUnlimited(Integer totalCount); + /** * 创建优惠劵模板 * diff --git a/yudao-module-mall/yudao-module-promotion-server/src/main/java/cn/iocoder/yudao/module/promotion/service/coupon/CouponTemplateServiceImpl.java b/yudao-module-mall/yudao-module-promotion-server/src/main/java/cn/iocoder/yudao/module/promotion/service/coupon/CouponTemplateServiceImpl.java index 1341e4f03..debddcf3d 100755 --- a/yudao-module-mall/yudao-module-promotion-server/src/main/java/cn/iocoder/yudao/module/promotion/service/coupon/CouponTemplateServiceImpl.java +++ b/yudao-module-mall/yudao-module-promotion-server/src/main/java/cn/iocoder/yudao/module/promotion/service/coupon/CouponTemplateServiceImpl.java @@ -1,6 +1,5 @@ package cn.iocoder.yudao.module.promotion.service.coupon; -import cn.hutool.core.util.ObjUtil; import cn.iocoder.yudao.framework.common.enums.CommonStatusEnum; import cn.iocoder.yudao.framework.common.pojo.PageResult; import cn.iocoder.yudao.module.product.api.category.ProductCategoryApi; @@ -41,6 +40,16 @@ public class CouponTemplateServiceImpl implements CouponTemplateService { @Resource private ProductSpuApi productSpuApi; + @Override + public boolean isTakeLimitCountUnlimited(Integer takeLimitCount) { + return CouponTemplateDO.TAKE_LIMIT_COUNT_MAX.equals(takeLimitCount); + } + + @Override + public boolean isTotalCountUnlimited(Integer totalCount) { + return CouponTemplateDO.TOTAL_COUNT_MAX.equals(totalCount); + } + @Override public Long createCouponTemplate(CouponTemplateCreateReqVO createReqVO) { // 校验商品范围 @@ -59,7 +68,7 @@ public class CouponTemplateServiceImpl implements CouponTemplateService { CouponTemplateDO couponTemplate = validateCouponTemplateExists(updateReqVO.getId()); // 校验发放数量不能过小(仅在 CouponTakeTypeEnum.USER 用户领取时) if (CouponTakeTypeEnum.isUser(couponTemplate.getTakeType()) - && ObjUtil.notEqual(couponTemplate.getTakeLimitCount(), CouponTemplateDO.TAKE_LIMIT_COUNT_MAX) // 非不限制 + && !isTotalCountUnlimited(updateReqVO.getTotalCount()) // 非不限制总发放数量 && updateReqVO.getTotalCount() < couponTemplate.getTakeCount()) { throw exception(COUPON_TEMPLATE_TOTAL_COUNT_TOO_SMALL, couponTemplate.getTakeCount()); } diff --git a/yudao-module-member/yudao-module-member-server/src/main/java/cn/iocoder/yudao/module/member/controller/admin/user/MemberUserController.java b/yudao-module-member/yudao-module-member-server/src/main/java/cn/iocoder/yudao/module/member/controller/admin/user/MemberUserController.java index 6a642bbf0..ab8976bc0 100644 --- a/yudao-module-member/yudao-module-member-server/src/main/java/cn/iocoder/yudao/module/member/controller/admin/user/MemberUserController.java +++ b/yudao-module-member/yudao-module-member-server/src/main/java/cn/iocoder/yudao/module/member/controller/admin/user/MemberUserController.java @@ -82,7 +82,17 @@ public class MemberUserController { @PreAuthorize("@ss.hasPermission('member:user:query')") public CommonResult getUser(@RequestParam("id") Long id) { MemberUserDO user = memberUserService.getUser(id); - return success(MemberUserConvert.INSTANCE.convert03(user)); + if (user == null) { + return success(null); + } + MemberUserRespVO userVO = MemberUserConvert.INSTANCE.convert03(user); + if (user.getLevelId() != null) { + MemberLevelDO level = memberLevelService.getLevel(userVO.getId()); + if (level != null) { + userVO.setLevelName(level.getName()); + } + } + return success(userVO); } @GetMapping("/page") diff --git a/yudao-module-system/yudao-module-system-server/src/main/java/cn/iocoder/yudao/module/system/controller/admin/logger/LoginLogController.java b/yudao-module-system/yudao-module-system-server/src/main/java/cn/iocoder/yudao/module/system/controller/admin/logger/LoginLogController.java index b55d0643a..0361b05d4 100644 --- a/yudao-module-system/yudao-module-system-server/src/main/java/cn/iocoder/yudao/module/system/controller/admin/logger/LoginLogController.java +++ b/yudao-module-system/yudao-module-system-server/src/main/java/cn/iocoder/yudao/module/system/controller/admin/logger/LoginLogController.java @@ -36,6 +36,14 @@ public class LoginLogController { @Resource private LoginLogService loginLogService; + @GetMapping("/get") + @Operation(summary = "获得登录日志") + @PreAuthorize("@ss.hasPermission('system:login-log:query')") + public CommonResult getLoginLog(Long id) { + LoginLogDO loginLog = loginLogService.getLoginLog(id); + return success(BeanUtils.toBean(loginLog, LoginLogRespVO.class)); + } + @GetMapping("/page") @Operation(summary = "获得登录日志分页列表") @PreAuthorize("@ss.hasPermission('system:login-log:query')") diff --git a/yudao-module-system/yudao-module-system-server/src/main/java/cn/iocoder/yudao/module/system/controller/admin/logger/OperateLogController.java b/yudao-module-system/yudao-module-system-server/src/main/java/cn/iocoder/yudao/module/system/controller/admin/logger/OperateLogController.java index be9dedc68..3e7e7b03d 100644 --- a/yudao-module-system/yudao-module-system-server/src/main/java/cn/iocoder/yudao/module/system/controller/admin/logger/OperateLogController.java +++ b/yudao-module-system/yudao-module-system-server/src/main/java/cn/iocoder/yudao/module/system/controller/admin/logger/OperateLogController.java @@ -61,6 +61,7 @@ public class OperateLogController { @Operation(summary = "导出操作日志") @GetMapping("/export-excel") @PreAuthorize("@ss.hasPermission('system:operate-log:export')") + @TransMethodResult @ApiAccessLog(operateType = EXPORT) public void exportOperateLog(HttpServletResponse response, @Valid OperateLogPageReqVO exportReqVO) throws IOException { exportReqVO.setPageSize(PageParam.PAGE_SIZE_NONE); diff --git a/yudao-module-system/yudao-module-system-server/src/main/java/cn/iocoder/yudao/module/system/controller/admin/logger/vo/operatelog/OperateLogRespVO.java b/yudao-module-system/yudao-module-system-server/src/main/java/cn/iocoder/yudao/module/system/controller/admin/logger/vo/operatelog/OperateLogRespVO.java index 436d20906..ae6d56483 100644 --- a/yudao-module-system/yudao-module-system-server/src/main/java/cn/iocoder/yudao/module/system/controller/admin/logger/vo/operatelog/OperateLogRespVO.java +++ b/yudao-module-system/yudao-module-system-server/src/main/java/cn/iocoder/yudao/module/system/controller/admin/logger/vo/operatelog/OperateLogRespVO.java @@ -1,8 +1,10 @@ package cn.iocoder.yudao.module.system.controller.admin.logger.vo.operatelog; +import cn.iocoder.yudao.framework.excel.core.annotations.DictFormat; import cn.iocoder.yudao.module.system.dal.dataobject.user.AdminUserDO; import cn.idev.excel.annotation.ExcelIgnoreUnannotated; import cn.idev.excel.annotation.ExcelProperty; +import cn.iocoder.yudao.module.system.enums.DictTypeConstants; import com.fhs.core.trans.anno.Trans; import com.fhs.core.trans.constant.TransType; import com.fhs.core.trans.vo.VO; @@ -31,6 +33,11 @@ public class OperateLogRespVO implements VO { @ExcelProperty("操作人") private String userName; + @Schema(description = "用户类型", requiredMode = Schema.RequiredMode.REQUIRED, example = "1", implementation = Integer.class) + @ExcelProperty("用户类型") + @DictFormat(DictTypeConstants.USER_TYPE) + private Integer userType; + @Schema(description = "操作模块类型", requiredMode = Schema.RequiredMode.REQUIRED, example = "订单") @ExcelProperty("操作模块类型") private String type; diff --git a/yudao-module-system/yudao-module-system-server/src/main/java/cn/iocoder/yudao/module/system/controller/admin/sms/SmsLogController.java b/yudao-module-system/yudao-module-system-server/src/main/java/cn/iocoder/yudao/module/system/controller/admin/sms/SmsLogController.java index 4646e785e..d7e1b6ee7 100644 --- a/yudao-module-system/yudao-module-system-server/src/main/java/cn/iocoder/yudao/module/system/controller/admin/sms/SmsLogController.java +++ b/yudao-module-system/yudao-module-system-server/src/main/java/cn/iocoder/yudao/module/system/controller/admin/sms/SmsLogController.java @@ -11,6 +11,7 @@ import cn.iocoder.yudao.module.system.controller.admin.sms.vo.log.SmsLogRespVO; import cn.iocoder.yudao.module.system.dal.dataobject.sms.SmsLogDO; import cn.iocoder.yudao.module.system.service.sms.SmsLogService; import io.swagger.v3.oas.annotations.Operation; +import io.swagger.v3.oas.annotations.Parameter; import io.swagger.v3.oas.annotations.tags.Tag; import jakarta.annotation.Resource; import jakarta.servlet.http.HttpServletResponse; @@ -18,6 +19,7 @@ import jakarta.validation.Valid; import org.springframework.security.access.prepost.PreAuthorize; import org.springframework.validation.annotation.Validated; import org.springframework.web.bind.annotation.GetMapping; +import org.springframework.web.bind.annotation.RequestParam; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RestController; @@ -44,6 +46,15 @@ public class SmsLogController { return success(BeanUtils.toBean(pageResult, SmsLogRespVO.class)); } + @GetMapping("/get") + @Operation(summary = "获得短信日志") + @Parameter(name = "id", description = "编号", required = true, example = "1024") + @PreAuthorize("@ss.hasPermission('system:sms-log:query')") + public CommonResult getSmsLog(@RequestParam("id") Long id) { + SmsLogDO smsLog = smsLogService.getSmsLog(id); + return success(BeanUtils.toBean(smsLog, SmsLogRespVO.class)); + } + @GetMapping("/export-excel") @Operation(summary = "导出短信日志 Excel") @PreAuthorize("@ss.hasPermission('system:sms-log:export')") diff --git a/yudao-module-system/yudao-module-system-server/src/main/java/cn/iocoder/yudao/module/system/convert/auth/AuthConvert.java b/yudao-module-system/yudao-module-system-server/src/main/java/cn/iocoder/yudao/module/system/convert/auth/AuthConvert.java index 18463e7f6..72c8cb187 100644 --- a/yudao-module-system/yudao-module-system-server/src/main/java/cn/iocoder/yudao/module/system/convert/auth/AuthConvert.java +++ b/yudao-module-system/yudao-module-system-server/src/main/java/cn/iocoder/yudao/module/system/convert/auth/AuthConvert.java @@ -5,8 +5,10 @@ import cn.iocoder.yudao.framework.common.util.object.BeanUtils; import cn.iocoder.yudao.module.system.api.sms.dto.code.SmsCodeSendReqDTO; import cn.iocoder.yudao.module.system.api.sms.dto.code.SmsCodeUseReqDTO; import cn.iocoder.yudao.module.system.api.social.dto.SocialUserBindReqDTO; -import cn.iocoder.yudao.module.system.controller.admin.auth.vo.*; -import cn.iocoder.yudao.module.system.dal.dataobject.oauth2.OAuth2AccessTokenDO; +import cn.iocoder.yudao.module.system.controller.admin.auth.vo.AuthPermissionInfoRespVO; +import cn.iocoder.yudao.module.system.controller.admin.auth.vo.AuthSmsLoginReqVO; +import cn.iocoder.yudao.module.system.controller.admin.auth.vo.AuthSmsSendReqVO; +import cn.iocoder.yudao.module.system.controller.admin.auth.vo.AuthSocialLoginReqVO; import cn.iocoder.yudao.module.system.dal.dataobject.permission.MenuDO; import cn.iocoder.yudao.module.system.dal.dataobject.permission.RoleDO; import cn.iocoder.yudao.module.system.dal.dataobject.user.AdminUserDO; @@ -26,8 +28,6 @@ public interface AuthConvert { AuthConvert INSTANCE = Mappers.getMapper(AuthConvert.class); - AuthLoginRespVO convert(OAuth2AccessTokenDO bean); - default AuthPermissionInfoRespVO convert(AdminUserDO user, List roleList, List menuList) { return AuthPermissionInfoRespVO.builder() .user(BeanUtils.toBean(user, AuthPermissionInfoRespVO.UserVO.class)) diff --git a/yudao-module-system/yudao-module-system-server/src/main/java/cn/iocoder/yudao/module/system/framework/sms/core/client/impl/AliyunSmsClient.java b/yudao-module-system/yudao-module-system-server/src/main/java/cn/iocoder/yudao/module/system/framework/sms/core/client/impl/AliyunSmsClient.java index 03898996d..9025ea209 100644 --- a/yudao-module-system/yudao-module-system-server/src/main/java/cn/iocoder/yudao/module/system/framework/sms/core/client/impl/AliyunSmsClient.java +++ b/yudao-module-system/yudao-module-system-server/src/main/java/cn/iocoder/yudao/module/system/framework/sms/core/client/impl/AliyunSmsClient.java @@ -91,10 +91,10 @@ public class AliyunSmsClient extends AbstractSmsClient { @Override public SmsTemplateRespDTO getSmsTemplate(String apiTemplateId) throws Throwable { // 1. 执行请求 - // 参考链接 https://api.aliyun.com/document/Dysmsapi/2017-05-25/QuerySmsTemplate + // 参考链接 https://api.aliyun.com/document/Dysmsapi/2017-05-25/GetSmsTemplate TreeMap queryParam = new TreeMap<>(); queryParam.put("TemplateCode", apiTemplateId); - JSONObject response = request("QuerySmsTemplate", queryParam); + JSONObject response = request("GetSmsTemplate", queryParam); // 2.1 请求失败 String code = response.getStr("Code"); diff --git a/yudao-module-system/yudao-module-system-server/src/main/java/cn/iocoder/yudao/module/system/service/auth/AdminAuthServiceImpl.java b/yudao-module-system/yudao-module-system-server/src/main/java/cn/iocoder/yudao/module/system/service/auth/AdminAuthServiceImpl.java index 029a2912a..ee3d29fd0 100644 --- a/yudao-module-system/yudao-module-system-server/src/main/java/cn/iocoder/yudao/module/system/service/auth/AdminAuthServiceImpl.java +++ b/yudao-module-system/yudao-module-system-server/src/main/java/cn/iocoder/yudao/module/system/service/auth/AdminAuthServiceImpl.java @@ -4,6 +4,7 @@ import cn.hutool.core.util.ObjectUtil; import cn.iocoder.yudao.framework.common.enums.CommonStatusEnum; import cn.iocoder.yudao.framework.common.enums.UserTypeEnum; import cn.iocoder.yudao.framework.common.util.monitor.TracerUtils; +import cn.iocoder.yudao.framework.common.util.object.BeanUtils; import cn.iocoder.yudao.framework.common.util.servlet.ServletUtils; import cn.iocoder.yudao.framework.common.util.validation.ValidationUtils; import cn.iocoder.yudao.framework.datapermission.core.annotation.DataPermission; @@ -215,13 +216,13 @@ public class AdminAuthServiceImpl implements AdminAuthService { OAuth2AccessTokenDO accessTokenDO = oauth2TokenService.createAccessToken(userId, getUserType().getValue(), OAuth2ClientConstants.CLIENT_ID_DEFAULT, null); // 构建返回结果 - return AuthConvert.INSTANCE.convert(accessTokenDO); + return BeanUtils.toBean(accessTokenDO, AuthLoginRespVO.class); } @Override public AuthLoginRespVO refreshToken(String refreshToken) { OAuth2AccessTokenDO accessTokenDO = oauth2TokenService.refreshAccessToken(refreshToken, OAuth2ClientConstants.CLIENT_ID_DEFAULT); - return AuthConvert.INSTANCE.convert(accessTokenDO); + return BeanUtils.toBean(accessTokenDO, AuthLoginRespVO.class); } @Override diff --git a/yudao-module-system/yudao-module-system-server/src/main/java/cn/iocoder/yudao/module/system/service/logger/LoginLogService.java b/yudao-module-system/yudao-module-system-server/src/main/java/cn/iocoder/yudao/module/system/service/logger/LoginLogService.java index ba9722e6b..49aca0194 100644 --- a/yudao-module-system/yudao-module-system-server/src/main/java/cn/iocoder/yudao/module/system/service/logger/LoginLogService.java +++ b/yudao-module-system/yudao-module-system-server/src/main/java/cn/iocoder/yudao/module/system/service/logger/LoginLogService.java @@ -12,6 +12,14 @@ import jakarta.validation.Valid; */ public interface LoginLogService { + /** + * 获得登录日志 + * + * @param id 编号 + * @return 登录日志 + */ + LoginLogDO getLoginLog(Long id); + /** * 获得登录日志分页 * diff --git a/yudao-module-system/yudao-module-system-server/src/main/java/cn/iocoder/yudao/module/system/service/logger/LoginLogServiceImpl.java b/yudao-module-system/yudao-module-system-server/src/main/java/cn/iocoder/yudao/module/system/service/logger/LoginLogServiceImpl.java index 421b91dd2..4dff719a3 100644 --- a/yudao-module-system/yudao-module-system-server/src/main/java/cn/iocoder/yudao/module/system/service/logger/LoginLogServiceImpl.java +++ b/yudao-module-system/yudao-module-system-server/src/main/java/cn/iocoder/yudao/module/system/service/logger/LoginLogServiceImpl.java @@ -21,6 +21,11 @@ public class LoginLogServiceImpl implements LoginLogService { @Resource private LoginLogMapper loginLogMapper; + @Override + public LoginLogDO getLoginLog(Long id) { + return loginLogMapper.selectById(id); + } + @Override public PageResult getLoginLogPage(LoginLogPageReqVO pageReqVO) { return loginLogMapper.selectPage(pageReqVO); diff --git a/yudao-module-system/yudao-module-system-server/src/main/java/cn/iocoder/yudao/module/system/service/mail/MailTemplateServiceImpl.java b/yudao-module-system/yudao-module-system-server/src/main/java/cn/iocoder/yudao/module/system/service/mail/MailTemplateServiceImpl.java index 3088ee79a..2ee46dbf7 100644 --- a/yudao-module-system/yudao-module-system-server/src/main/java/cn/iocoder/yudao/module/system/service/mail/MailTemplateServiceImpl.java +++ b/yudao-module-system/yudao-module-system-server/src/main/java/cn/iocoder/yudao/module/system/service/mail/MailTemplateServiceImpl.java @@ -19,8 +19,10 @@ import org.springframework.cache.annotation.Cacheable; import org.springframework.stereotype.Service; import org.springframework.validation.annotation.Validated; +import java.util.ArrayList; import java.util.List; import java.util.Map; +import java.util.regex.Matcher; import java.util.regex.Pattern; import static cn.iocoder.yudao.framework.common.exception.util.ServiceExceptionUtil.exception; @@ -53,7 +55,7 @@ public class MailTemplateServiceImpl implements MailTemplateService { // 插入 MailTemplateDO template = BeanUtils.toBean(createReqVO, MailTemplateDO.class) - .setParams(parseTemplateContentParams(createReqVO.getContent())); + .setParams(parseTemplateTitleAndContentParams(createReqVO.getTitle(), createReqVO.getContent())); mailTemplateMapper.insert(template); return template.getId(); } @@ -69,7 +71,7 @@ public class MailTemplateServiceImpl implements MailTemplateService { // 更新 MailTemplateDO updateObj = BeanUtils.toBean(updateReqVO, MailTemplateDO.class) - .setParams(parseTemplateContentParams(updateReqVO.getContent())); + .setParams(parseTemplateTitleAndContentParams(updateReqVO.getTitle(), updateReqVO.getContent())); mailTemplateMapper.updateById(updateObj); } @@ -129,7 +131,77 @@ public class MailTemplateServiceImpl implements MailTemplateService { @Override public String formatMailTemplateContent(String content, Map params) { - return StrUtil.format(content, params); + // 1. 先替换模板变量 + String formattedContent = StrUtil.format(content, params); + + // 关联 Pull Request:https://gitee.com/zhijiantianya/ruoyi-vue-pro/pulls/1461 讨论 + // 2.1 反转义HTML特殊字符 + formattedContent = unescapeHtml(formattedContent); + // 2.2 处理代码块(确保
标签格式正确)
+        formattedContent = formatHtmlCodeBlocks(formattedContent);
+        // 2.3 将最外层的 pre 标签替换为 div 标签
+        formattedContent = replaceOuterPreWithDiv(formattedContent);
+        return formattedContent;
+    }
+
+    private String replaceOuterPreWithDiv(String content) {
+        if (StrUtil.isEmpty(content)) {
+            return content;
+        }
+        // 使用正则表达式匹配所有的 
 标签,包括嵌套的  标签
+        String regex = "(?s)]*>(.*?)
"; + Pattern pattern = Pattern.compile(regex); + Matcher matcher = pattern.matcher(content); + StringBuilder sb = new StringBuilder(); + while (matcher.find()) { + // 提取
 标签内的内容
+            String innerContent = matcher.group(1);
+            // 返回 div 标签包裹的内容
+            matcher.appendReplacement(sb, "
" + innerContent + "
"); + } + matcher.appendTail(sb); + return sb.toString(); + } + + /** + * 反转义 HTML 特殊字符 + * + * @param input 输入字符串 + * @return 反转义后的字符串 + */ + private String unescapeHtml(String input) { + if (StrUtil.isEmpty(input)) { + return input; + } + return input + .replace("&", "&") + .replace("<", "<") + .replace(">", ">") + .replace(""", "\"") + .replace("'", "'") + .replace(" ", " "); + } + + /** + * 格式化 HTML 中的代码块 + * + * @param content 邮件内容 + * @return 格式化后的邮件内容 + */ + private String formatHtmlCodeBlocks(String content) { + // 匹配
 标签的代码块
+        Pattern codeBlockPattern = Pattern.compile("(.*?)
", Pattern.DOTALL); + Matcher matcher = codeBlockPattern.matcher(content); + StringBuilder sb = new StringBuilder(); + while (matcher.find()) { + // 获取代码块内容 + String codeBlock = matcher.group(1); + // 为代码块添加样式 + String replacement = "
" + codeBlock + "
"; + matcher.appendReplacement(sb, replacement); + } + matcher.appendTail(sb); + return sb.toString(); } @Override @@ -137,14 +209,31 @@ public class MailTemplateServiceImpl implements MailTemplateService { return mailTemplateMapper.selectCountByAccountId(accountId); } + /** + * 解析标题和内容中的参数 + */ + @VisibleForTesting + public List parseTemplateTitleAndContentParams(String title, String content) { + List titleParams = ReUtil.findAllGroup1(PATTERN_PARAMS, title); + List contentParams = ReUtil.findAllGroup1(PATTERN_PARAMS, content); + // 合并参数并去重 + List allParams = new ArrayList<>(titleParams); + for (String param : contentParams) { + if (!allParams.contains(param)) { + allParams.add(param); + } + } + return allParams; + } + /** * 获得邮件模板中的参数,形如 {key} * * @param content 内容 * @return 参数列表 */ - private List parseTemplateContentParams(String content) { + List parseTemplateContentParams(String content) { return ReUtil.findAllGroup1(PATTERN_PARAMS, content); } -} +} \ No newline at end of file diff --git a/yudao-module-system/yudao-module-system-server/src/main/java/cn/iocoder/yudao/module/system/service/oauth2/OAuth2TokenServiceImpl.java b/yudao-module-system/yudao-module-system-server/src/main/java/cn/iocoder/yudao/module/system/service/oauth2/OAuth2TokenServiceImpl.java index 5342cbdb9..a35945ed7 100644 --- a/yudao-module-system/yudao-module-system-server/src/main/java/cn/iocoder/yudao/module/system/service/oauth2/OAuth2TokenServiceImpl.java +++ b/yudao-module-system/yudao-module-system-server/src/main/java/cn/iocoder/yudao/module/system/service/oauth2/OAuth2TokenServiceImpl.java @@ -180,7 +180,13 @@ public class OAuth2TokenServiceImpl implements OAuth2TokenService { .setClientId(clientDO.getClientId()).setScopes(refreshTokenDO.getScopes()) .setRefreshToken(refreshTokenDO.getRefreshToken()) .setExpiresTime(LocalDateTime.now().plusSeconds(clientDO.getAccessTokenValiditySeconds())); - accessTokenDO.setTenantId(TenantContextHolder.getTenantId()); // 手动设置租户编号,避免缓存到 Redis 的时候,无对应的租户编号 + // 优先从 refreshToken 获取租户编号,避免 ThreadLocal 被污染时导致 tenantId 为 null + // 可能关联的 issue:https://t.zsxq.com/JIi5G + Long tenantId = refreshTokenDO.getTenantId(); + if (tenantId == null) { + tenantId = TenantContextHolder.getTenantId(); + } + accessTokenDO.setTenantId(tenantId); oauth2AccessTokenMapper.insert(accessTokenDO); // 记录到 Redis 中 oauth2AccessTokenRedisDAO.set(accessTokenDO); diff --git a/yudao-module-system/yudao-module-system-server/src/main/java/cn/iocoder/yudao/module/system/service/permission/MenuServiceImpl.java b/yudao-module-system/yudao-module-system-server/src/main/java/cn/iocoder/yudao/module/system/service/permission/MenuServiceImpl.java index 80832e969..7f2f695f1 100644 --- a/yudao-module-system/yudao-module-system-server/src/main/java/cn/iocoder/yudao/module/system/service/permission/MenuServiceImpl.java +++ b/yudao-module-system/yudao-module-system-server/src/main/java/cn/iocoder/yudao/module/system/service/permission/MenuServiceImpl.java @@ -255,6 +255,9 @@ public class MenuServiceImpl implements MenuService { return; } // 如果 id 为空,说明不用比较是否为相同 id 的菜单 + if (id == null) { + throw exception(MENU_NAME_DUPLICATE); + } if (!menu.getId().equals(id)) { throw exception(MENU_NAME_DUPLICATE); } @@ -277,7 +280,7 @@ public class MenuServiceImpl implements MenuService { } // 如果 id 为空,说明不用比较是否为相同 id 的菜单 if (id == null) { - return; + throw exception(MENU_COMPONENT_NAME_DUPLICATE); } if (!menu.getId().equals(id)) { throw exception(MENU_COMPONENT_NAME_DUPLICATE); diff --git a/yudao-module-system/yudao-module-system-server/src/main/java/cn/iocoder/yudao/module/system/service/sms/SmsLogService.java b/yudao-module-system/yudao-module-system-server/src/main/java/cn/iocoder/yudao/module/system/service/sms/SmsLogService.java index 49ec93aac..d40a0e9fd 100644 --- a/yudao-module-system/yudao-module-system-server/src/main/java/cn/iocoder/yudao/module/system/service/sms/SmsLogService.java +++ b/yudao-module-system/yudao-module-system-server/src/main/java/cn/iocoder/yudao/module/system/service/sms/SmsLogService.java @@ -58,6 +58,14 @@ public interface SmsLogService { void updateSmsReceiveResult(Long id, String apiSerialNo, Boolean success, LocalDateTime receiveTime, String apiReceiveCode, String apiReceiveMsg); + /** + * 获得短信日志 + * + * @param id 日志编号 + * @return 短信日志 + */ + SmsLogDO getSmsLog(Long id); + /** * 获得短信日志分页 * diff --git a/yudao-module-system/yudao-module-system-server/src/main/java/cn/iocoder/yudao/module/system/service/sms/SmsLogServiceImpl.java b/yudao-module-system/yudao-module-system-server/src/main/java/cn/iocoder/yudao/module/system/service/sms/SmsLogServiceImpl.java index 45660e60e..cd49ce54f 100644 --- a/yudao-module-system/yudao-module-system-server/src/main/java/cn/iocoder/yudao/module/system/service/sms/SmsLogServiceImpl.java +++ b/yudao-module-system/yudao-module-system-server/src/main/java/cn/iocoder/yudao/module/system/service/sms/SmsLogServiceImpl.java @@ -79,6 +79,11 @@ public class SmsLogServiceImpl implements SmsLogService { .receiveTime(receiveTime).apiReceiveCode(apiReceiveCode).apiReceiveMsg(apiReceiveMsg).build()); } + @Override + public SmsLogDO getSmsLog(Long id) { + return smsLogMapper.selectById(id); + } + @Override public PageResult getSmsLogPage(SmsLogPageReqVO pageReqVO) { return smsLogMapper.selectPage(pageReqVO); diff --git a/yudao-module-system/yudao-module-system-server/src/test/java/cn/iocoder/yudao/module/system/service/mail/MailTemplateServiceImplTest.java b/yudao-module-system/yudao-module-system-server/src/test/java/cn/iocoder/yudao/module/system/service/mail/MailTemplateServiceImplTest.java index 85e8d8b88..fa9b709a7 100755 --- a/yudao-module-system/yudao-module-system-server/src/test/java/cn/iocoder/yudao/module/system/service/mail/MailTemplateServiceImplTest.java +++ b/yudao-module-system/yudao-module-system-server/src/test/java/cn/iocoder/yudao/module/system/service/mail/MailTemplateServiceImplTest.java @@ -3,8 +3,8 @@ package cn.iocoder.yudao.module.system.service.mail; import cn.iocoder.yudao.framework.common.enums.CommonStatusEnum; import cn.iocoder.yudao.framework.common.pojo.PageResult; import cn.iocoder.yudao.framework.test.core.ut.BaseDbUnitTest; -import cn.iocoder.yudao.module.system.controller.admin.mail.vo.template.MailTemplatePageReqVO; import cn.iocoder.yudao.module.system.controller.admin.mail.vo.template.MailTemplateSaveReqVO; +import cn.iocoder.yudao.module.system.controller.admin.mail.vo.template.MailTemplatePageReqVO; import cn.iocoder.yudao.module.system.dal.dataobject.mail.MailTemplateDO; import cn.iocoder.yudao.module.system.dal.mysql.mail.MailTemplateMapper; import org.junit.jupiter.api.Test; @@ -196,6 +196,119 @@ public class MailTemplateServiceImplTest extends BaseDbUnitTest { mailTemplateService.formatMailTemplateContent("{name},你好,{what}吃了吗?", params)); } + @Test + public void testFormatMailTemplateContent_htmlUnescape() { + // 准备参数 + Map params = new HashMap<>(); + params.put("title", "测试标题"); + + // 测试HTML反转义 + String content = "

{title}

<p>这是一个测试</p>&nbsp;空格"; + String expected = "

测试标题

这是一个测试

空格"; + // 调用,并断言 + assertEquals(expected, + mailTemplateService.formatMailTemplateContent(content, params)); + } + + @Test + public void testFormatMailTemplateContent_codeBlockFormatting() { + // 准备参数 + Map params = new HashMap<>(); + params.put("name", "测试"); + + // 测试代码块格式化 + String content = "
public class Test {\n    public static void main(String[] args) {\n        System.out.println(\"Hello {name}\"));\n    }\n}
"; + + // 调用,并断言结果 + String result = mailTemplateService.formatMailTemplateContent(content, params); + // 断言 pre 标签被替换为 div 标签 + assertTrue(result.contains("
public class Test {")); + assertTrue(result.contains("System.out.println(\"Hello 测试\"")); + assertTrue(result.contains("
")); + } + + @Test + public void testFormatMailTemplateContent_preToDiv() { + // 准备参数 + Map params = new HashMap<>(); + params.put("content", "测试内容"); + + // 测试 pre 标签替换为 div 标签 + String content = "
{content}
"; + String result = mailTemplateService.formatMailTemplateContent(content, params); + // 断言结果中包含 div 标签,而不包含 pre 标签 + assertTrue(result.contains("
测试内容
")); + } + + @Test + public void testFormatMailTemplateContent_completeHtml() { + // 准备参数 + Map params = new HashMap<>(); + params.put("username", "testuser"); + params.put("company", "测试公司"); + + // 测试完整的 HTML 邮件模板 + String content = "\n \n \n \n \n Title\n \n \n
\n \n
\n
\n
\n
\n \n
\n
\n \n \n \n \n \n \n \n \n
\n
\n \n \n \n
\n
此邮件由系统发出,请勿直接回复或转发他人
\n

\n
\n \n \n \n \n \n \n \n \n
\n

\n 尊敬的 {username},\n

\n
\n
\n

\n 内容
\n 内容
\n 内容123

\n\n 如果您在使用过程中遇到任何问题或者有任何建议,都可以随时联系我们的客户团队,我们将竭诚为您服务。\n\n\n\n\n
\n
\n {company}
\n 地址:xxxxx
\n 邮箱:lambc77@163.com\n

\n
\n
\n
\n
\n
\n 声明:本邮件含有保密信息,仅限于收件人所用。禁止任何人未经发件人许可,以任何形式(包括但不限于部分的泄露、复制或散发)不当的使用本邮件中的信息。如果您错收了本邮件,请您立即电话或邮件通知发件人并删除本邮件,谢谢!\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n \n \n "; + + // 调用,并断言成功处理 + String result = mailTemplateService.formatMailTemplateContent(content, params); + // 断言结果中包含替换后的变量 + assertTrue(result.contains("尊敬的 testuser")); + assertTrue(result.contains("测试公司")); + // 断言结果是有效的 HTML + assertTrue(result.startsWith("")); + } + + @Test + public void testFormatMailTemplateContent_emptyContent() { + // 准备参数 + Map params = new HashMap<>(); + + // 测试空内容 + String result = mailTemplateService.formatMailTemplateContent("", params); + assertEquals("", result); + } + + @Test + public void testFormatMailTemplateContent_noParams() { + // 准备参数 + Map params = new HashMap<>(); + + // 测试没有参数需要替换的情况 + String content = "
System.out.println(\"Hello World\");
"; + String result = mailTemplateService.formatMailTemplateContent(content, params); + assertTrue(result.contains("
System.out.println(\"Hello World\");
")); + } + + @Test + public void testFormatMailTemplateContent_multiplePreTags() { + // 准备参数 + Map params = new HashMap<>(); + params.put("param1", "value1"); + params.put("param2", "value2"); + + // 测试多个 pre 标签的情况 + String content = "
First code block: {param1}
\n" + + "

Some text between code blocks

\n" + + "
Second code block: {param2}
"; + String result = mailTemplateService.formatMailTemplateContent(content, params); + // 断言两个pre标签都被替换为div标签 + assertTrue(result.contains("
First code block: value1
")); + assertTrue(result.contains("
Second code block: value2
")); + } + + @Test + public void testFormatMailTemplateContent_specialCharacters() { + // 准备参数 + Map params = new HashMap<>(); + + // 简化测试,只测试基本的 HTML 特殊字符 + String content = "<div>测试 & 特殊字符</div>"; + String result = mailTemplateService.formatMailTemplateContent(content, params); + // 断言特殊字符被正确反转义 + assertTrue(result.contains("
测试 & 特殊字符
")); + } + @Test public void testCountByAccountId() { // mock 数据 @@ -212,4 +325,60 @@ public class MailTemplateServiceImplTest extends BaseDbUnitTest { assertEquals(1, count); } + @Test + public void testDifferenceWithHtmlContent() { + // 准备包含 HTML 格式的模板内容 + String content = "
" + + "

Welcome, {username}!

" + + "

Your account has been created successfully.

" + + "
" + + "Account Details:
" + + "Username: {username}
" + + "Email: {email}
" + + "Role: {role}
" + + "
" + + "

Please click here to activate your account.

" + + "
public class WelcomeMessage {\n    public static void main(String[] args) {\n        System.out.println(\"Hello {username}!\");\n    }\n}
" + + "
"; + + Map params = new HashMap<>(); + params.put("username", "testuser"); + params.put("email", "test@163.com"); + params.put("role", "admin"); + params.put("activationLink", "https://example.com/activate?code=12345"); + + // 1. 使用 parseTemplateContentParams:只提取参数名称,忽略了 HTML 格式 + List parsedParams = mailTemplateService.parseTemplateContentParams(content); + System.out.println("parseTemplateContentParams结果:" + parsedParams); + + // 断言:只提取了纯参数名称,没有 HTML 格式 + assertEquals(6, parsedParams.size()); + // 检查所有参数类型 + assertEquals(3, parsedParams.stream().filter("username"::equals).count()); + assertEquals(1, parsedParams.stream().filter("email"::equals).count()); + assertEquals(1, parsedParams.stream().filter("role"::equals).count()); + assertEquals(1, parsedParams.stream().filter("activationLink"::equals).count()); + // 断言:没有包含任何 HTML 标签 + for (String param : parsedParams) { + assertFalse(param.contains("<")); + assertFalse(param.contains(">")); + } + + // 2. 使用 formatMailTemplateContent:处理 HTML 格式,生成最终内容 + String formattedContent = mailTemplateService.formatMailTemplateContent(content, params); + System.out.println("formatMailTemplateContent结果:" + formattedContent); + + // 断言:HTML 格式被保留并处理 + assertTrue(formattedContent.contains("
")); + assertTrue(formattedContent.contains("

Welcome, testuser!

")); + assertTrue(formattedContent.contains("here")); + assertTrue(formattedContent.contains("
public class WelcomeMessage {")); + assertTrue(formattedContent.contains("
")); + // 断言:所有参数都被正确替换 + assertFalse(formattedContent.contains("{username}")); + assertFalse(formattedContent.contains("{email}")); + assertFalse(formattedContent.contains("{role}")); + assertFalse(formattedContent.contains("{activationLink}")); + } + }