You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
fu-hsi-service/docker/docker-compose/sql/20250109/migration2.2.sql

86 lines
7.9 KiB
MySQL

4 months ago
INSERT INTO `nx_llm`.`com_dictionary` (`id`, `name`, `code`, `pid`, `type`, `status`, `note`, `priority`, `creator`,
`update_time`, `create_time`, `updater`, `data_status`, `create_user_id`,
`update_user_id`)
VALUES (89, '任务状态', NULL, 0, 'task_status', '1', NULL, 0, NULL, NULL, CURRENT_TIMESTAMP, NULL, '1', NULL, NULL);
INSERT INTO `nx_llm`.`com_dictionary` (`id`, `name`, `code`, `pid`, `type`, `status`, `note`, `priority`, `creator`,
`update_time`, `create_time`, `updater`, `data_status`, `create_user_id`,
`update_user_id`)
VALUES (90, '待处理', '0', 89, 'task_status', '1', NULL, 0, NULL, NULL, CURRENT_TIMESTAMP, NULL, '1', NULL, NULL);
INSERT INTO `nx_llm`.`com_dictionary` (`id`, `name`, `code`, `pid`, `type`, `status`, `note`, `priority`, `creator`,
`update_time`, `create_time`, `updater`, `data_status`, `create_user_id`,
`update_user_id`)
VALUES (91, '处理中', '1', 89, 'task_status', '1', NULL, 0, NULL, NULL, CURRENT_TIMESTAMP, NULL, '1', NULL, NULL);
INSERT INTO `nx_llm`.`com_dictionary` (`id`, `name`, `code`, `pid`, `type`, `status`, `note`, `priority`, `creator`,
`update_time`, `create_time`, `updater`, `data_status`, `create_user_id`,
`update_user_id`)
VALUES (92, '取消中', '2', 89, 'task_status', '1', NULL, 0, NULL, NULL, CURRENT_TIMESTAMP, NULL, '1', NULL, NULL);
INSERT INTO `nx_llm`.`com_dictionary` (`id`, `name`, `code`, `pid`, `type`, `status`, `note`, `priority`, `creator`,
`update_time`, `create_time`, `updater`, `data_status`, `create_user_id`,
`update_user_id`)
VALUES (93, '已取消', '3', 89, 'task_status', '1', NULL, 0, NULL, NULL, CURRENT_TIMESTAMP, NULL, '1', NULL, NULL);
INSERT INTO `nx_llm`.`com_dictionary` (`id`, `name`, `code`, `pid`, `type`, `status`, `note`, `priority`, `creator`,
`update_time`, `create_time`, `updater`, `data_status`, `create_user_id`,
`update_user_id`)
VALUES (94, '处理成功', '4', 89, 'task_status', '1', NULL, 0, NULL, NULL, CURRENT_TIMESTAMP, NULL, '1', NULL, NULL);
INSERT INTO `nx_llm`.`com_dictionary` (`id`, `name`, `code`, `pid`, `type`, `status`, `note`, `priority`, `creator`,
`update_time`, `create_time`, `updater`, `data_status`, `create_user_id`,
`update_user_id`)
VALUES (95, '处理失败', '5', 89, 'task_status', '1', NULL, 0, NULL, NULL, CURRENT_TIMESTAMP, NULL, '1', NULL, NULL);
-- 案件分析状态字典
INSERT INTO nx_llm.com_dictionary (id, name, code, pid, type, status, note, priority, creator, update_time, create_time, updater, data_status, create_user_id, update_user_id) VALUES (97, '分析状态', null, 0, 'case_analysis_status', '1', null, 0, null, null, '2024-12-31 14:26:52', null, '1', null, null);
INSERT INTO nx_llm.com_dictionary (id, name, code, pid, type, status, note, priority, creator, update_time, create_time, updater, data_status, create_user_id, update_user_id) VALUES (98, '未分析', '0', 97, 'case_analysis_status', '1', null, 0, null, null, '2024-12-31 14:26:52', null, '1', null, null);
INSERT INTO nx_llm.com_dictionary (id, name, code, pid, type, status, note, priority, creator, update_time, create_time, updater, data_status, create_user_id, update_user_id) VALUES (99, '正在分析', '1', 97, 'case_analysis_status', '1', null, 0, null, null, '2024-12-31 14:26:52', null, '1', null, null);
INSERT INTO nx_llm.com_dictionary (id, name, code, pid, type, status, note, priority, creator, update_time, create_time, updater, data_status, create_user_id, update_user_id) VALUES (100, '分析成功', '2', 97, 'case_analysis_status', '1', null, 0, null, null, '2024-12-31 14:26:52', null, '1', null, null);
INSERT INTO nx_llm.com_dictionary (id, name, code, pid, type, status, note, priority, creator, update_time, create_time, updater, data_status, create_user_id, update_user_id) VALUES (101, '分析失败', '3', 97, 'case_analysis_status', '1', null, 0, null, null, '2024-12-31 14:26:52', null, '1', null, null);
-- 添加运营管理菜单
INSERT INTO nx_llm.system_menu (id, label, label_code, label_type, parent_id, create_user_id, create_time, update_user_id, update_time) VALUES ('16', '运营管理', 'p_operationManagement', 0, null, null, '2025-01-02 14:29:10', null, '2025-01-02 14:29:10');
INSERT INTO nx_llm.system_menu (id, label, label_code, label_type, parent_id, create_user_id, create_time, update_user_id, update_time) VALUES ('17', '任务列表', 'p_taskList', 0, '16', null, '2025-01-02 14:29:47', null, '2025-01-02 14:29:47');
INSERT INTO nx_llm.system_menu (id, label, label_code, label_type, parent_id, create_user_id, create_time, update_user_id, update_time) VALUES ('18', '案件批量处理', 'p_handleCases', 0, '16', null, '2025-01-02 16:13:47', null, '2025-01-02 16:13:47');
-- 给管理员角色添加权限
INSERT INTO nx_llm.system_role_menu_relation (id, role_id, menu_id, create_user_id, create_time, update_user_id, update_time) VALUES ('1830865690704818280', '1820688378166366209', '16', null, '2025-01-02 15:09:31', null, '2025-01-02 15:09:31');
INSERT INTO nx_llm.system_role_menu_relation (id, role_id, menu_id, create_user_id, create_time, update_user_id, update_time) VALUES ('1830865690704818281', '1820688378166366209', '17', null, '2025-01-02 15:09:31', null, '2025-01-02 15:09:31');
INSERT INTO nx_llm.system_role_menu_relation (id, role_id, menu_id, create_user_id, create_time, update_user_id, update_time) VALUES ('1830865690704818282', '1820688378166366209', '18', null, '2024-09-03 15:09:31', null, '2024-09-03 15:09:31');
4 months ago
CREATE TABLE `task_record`
(
`id` varchar(64) NOT NULL,
`name` varchar(255) DEFAULT NULL COMMENT '名称',
`prompt_id` varchar(64) DEFAULT NULL,
`case_id` text COMMENT '案件ID英文逗号分隔',
`record_id` text COMMENT '笔录ID英文逗号分隔',
`evidence_id` text COMMENT '证据ID英文逗号分隔',
`type` varchar(1) DEFAULT NULL COMMENT '0全部案件 1部分案件 2部分笔录 3部分证据',
`status` varchar(1) DEFAULT '0' COMMENT '0待处理 1处理中 2取消中 3已取消 4处理成功 5处理失败',
`cancel_time` datetime DEFAULT NULL COMMENT '取消时间',
`create_user_id` varchar(64) DEFAULT NULL COMMENT '创建人ID',
`create_time` datetime DEFAULT NULL COMMENT '创建时间',
`update_user_id` varchar(64) DEFAULT NULL COMMENT '更新人ID',
`update_time` datetime DEFAULT NULL COMMENT '更新时间',
PRIMARY KEY (`id`)
) ENGINE = InnoDB
DEFAULT CHARSET = utf8mb4;
CREATE TABLE `task_case_record`
(
`id` varchar(64) NOT NULL,
`task_record_id` varchar(64) DEFAULT NULL COMMENT '任务ID',
`case_id` varchar(64) DEFAULT NULL COMMENT '案件ID',
`waiting_id` text COMMENT '等待处理的ID逗号分隔',
`processed_id` text COMMENT '处理完成的ID逗号分隔',
`exception_id` text COMMENT '异常ID逗号分隔',
`status` varchar(1) DEFAULT NULL COMMENT '0待处理 1处理中 2取消中 3已取消 4处理成功 5处理失败',
`create_user_id` varchar(64) DEFAULT NULL COMMENT '创建人ID',
`create_time` datetime DEFAULT NULL COMMENT '创建时间',
`update_user_id` varchar(64) DEFAULT NULL COMMENT '更新人ID',
`update_time` datetime DEFAULT NULL COMMENT '更新时间',
PRIMARY KEY (`id`)
) ENGINE = InnoDB
DEFAULT CHARSET = utf8mb4;
-- 创建索引
create index model_atomic_result_case_id_index
on model_atomic_result (case_id);