Skip to content

v2.1.8

sql 脚本 - DDL

sql
-- 修改字段排序
ALTER TABLE `data_group` 
MODIFY COLUMN `user_id` bigint(0) NULL DEFAULT NULL COMMENT '用户id' AFTER `id`;
-- 系统配置表
CREATE TABLE `system_setting` (
  `id` bigint NOT NULL AUTO_INCREMENT COMMENT 'id',
  `type` char(16) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '配置类型',
  `item` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '配置项',
  `value` json DEFAULT NULL COMMENT '配置值',
  `create_time` datetime DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
  `update_time` datetime DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '修改时间',
  `creator` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '创建人',
  `updater` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '更新人',
  `deleted` tinyint(1) DEFAULT '0' COMMENT '是否删除 0未删除 1已删除',
  PRIMARY KEY (`id`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci ROW_FORMAT=DYNAMIC COMMENT='系统设置';
-- 修改表名称
RENAME TABLE `host_connect_log` TO `terminal_connect_log`;
ALTER TABLE `terminal_connect_log` COMMENT = '终端连接日志';

sql 脚本 - DML

sql
-- SFTP 系统配置
INSERT INTO `system_setting` VALUES (1, 'SFTP', 'previewSize', '{\"value\": 2}', '2024-09-27 17:33:05', '2024-09-27 17:33:05', '1', '1', 0);

-- 修改操作日志
UPDATE operator_log SET module = 'asset:terminal-connect-log' WHERE module = 'asset:host-connect-log';
UPDATE operator_log SET type = REPLACE(type, 'host-connect-log:', 'terminal-connect-log:') WHERE type LIKE 'host-connect-log:%';
UPDATE operator_log SET module = 'asset:terminal' WHERE module = 'asset:host-terminal';
UPDATE operator_log SET type = REPLACE(type, 'host-terminal:', 'terminal:') WHERE type LIKE 'host-terminal:%';

-- 字典项
DELETE FROM `dict_key` WHERE id IN (27, 28, 29);
INSERT INTO `dict_key` VALUES (27, 'terminalConnectType', 'STRING', '[{\"name\": \"color\", \"type\": \"COLOR\"}]', '终端连接类型', '2023-12-26 23:23:08', '2024-10-15 12:46:11', '1', '1', 0);
INSERT INTO `dict_key` VALUES (28, 'terminalConnectStatus', 'STRING', '[{\"name\": \"color\", \"type\": \"COLOR\"}]', '终端连接状态', '2023-12-26 23:23:51', '2024-10-15 13:39:53', '1', '1', 0);
INSERT INTO `dict_key` VALUES (29, 'terminalSessionStatus', 'INTEGER', '[{\"name\": \"status\", \"type\": \"STRING\"}]', '终端会话状态', '2024-01-09 00:32:00', '2024-10-15 13:39:51', '1', '1', 0);

-- 字典值
DELETE FROM `dict_value` WHERE id IN (176, 177, 178, 179, 180, 181, 182, 183, 184, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 214, 215, 216, 217, 218, 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, 424, 425);
INSERT INTO `dict_value` VALUES (176, 27, 'terminalConnectType', 'SSH', 'SSH', '{\"color\": \"arcoblue\"}', 10, '2023-12-26 23:23:18', '2024-10-15 11:56:41', '1', '1', 0);
INSERT INTO `dict_value` VALUES (177, 28, 'terminalConnectStatus', 'CONNECTING', '连接中', '{\"color\": \"rgb(var(--green-6))\"}', 10, '2023-12-26 23:29:00', '2024-10-15 11:59:01', '1', '1', 0);
INSERT INTO `dict_value` VALUES (178, 28, 'terminalConnectStatus', 'COMPLETE', '完成', '{\"color\": \"rgb(var(--blue-6))\"}', 20, '2023-12-26 23:29:15', '2024-10-15 11:59:01', '1', '1', 0);
INSERT INTO `dict_value` VALUES (179, 28, 'terminalConnectStatus', 'FAILED', '失败', '{\"color\": \"rgb(var(--red-6))\"}', 30, '2023-12-26 23:29:34', '2024-10-15 11:59:01', '1', '1', 0);
INSERT INTO `dict_value` VALUES (180, 1, 'operatorLogModule', 'asset:terminal', '主机终端', '{}', 2050, '2023-12-27 18:42:39', '2024-10-15 15:52:47', '2', '1', 0);
INSERT INTO `dict_value` VALUES (181, 2, 'operatorLogType', 'terminal:connect', '连接主机终端', '{}', 10, '2023-12-27 18:43:17', '2024-10-15 15:54:47', '2', '1', 0);
INSERT INTO `dict_value` VALUES (182, 29, 'terminalSessionStatus', '0', '连接中', '{\"status\": \"normal\"}', 10, '2024-01-09 00:32:47', '2024-10-15 13:39:21', '1', '1', 0);
INSERT INTO `dict_value` VALUES (183, 29, 'terminalSessionStatus', '1', '已连接', '{\"status\": \"processing\"}', 20, '2024-01-09 00:32:59', '2024-10-15 13:39:23', '1', '1', 0);
INSERT INTO `dict_value` VALUES (184, 29, 'terminalSessionStatus', '2', '已断开', '{\"status\": \"danger\"}', 30, '2024-01-09 00:33:09', '2024-10-15 13:39:24', '1', '1', 0);
INSERT INTO `dict_value` VALUES (193, 27, 'terminalConnectType', 'SFTP', 'SFTP', '{\"color\": \"purple\"}', 20, '2024-02-04 18:23:10', '2024-10-15 11:56:41', '1', '1', 0);
INSERT INTO `dict_value` VALUES (194, 2, 'operatorLogType', 'terminal:sftp-mkdir', '创建文件夹', '{}', 20, '2024-02-23 17:53:21', '2024-10-15 15:54:47', '1', '1', 0);
INSERT INTO `dict_value` VALUES (195, 2, 'operatorLogType', 'terminal:sftp-touch', '创建文件', '{}', 30, '2024-02-23 17:53:28', '2024-10-15 15:54:47', '1', '1', 0);
INSERT INTO `dict_value` VALUES (196, 2, 'operatorLogType', 'terminal:sftp-move', '移动文件', '{}', 40, '2024-02-23 17:53:39', '2024-10-15 15:54:47', '1', '1', 0);
INSERT INTO `dict_value` VALUES (197, 2, 'operatorLogType', 'terminal:sftp-remove', '删除文件', '{}', 50, '2024-02-23 17:53:51', '2024-10-15 15:54:47', '1', '1', 0);
INSERT INTO `dict_value` VALUES (198, 2, 'operatorLogType', 'terminal:sftp-truncate', '截断文件', '{}', 60, '2024-02-23 17:54:06', '2024-10-15 15:54:47', '1', '1', 0);
INSERT INTO `dict_value` VALUES (199, 2, 'operatorLogType', 'terminal:sftp-chmod', '文件提权', '{}', 70, '2024-02-23 17:54:17', '2024-10-15 15:54:47', '1', '1', 0);
INSERT INTO `dict_value` VALUES (200, 2, 'operatorLogType', 'terminal:sftp-set-content', '修改文件内容', '{}', 80, '2024-02-23 17:54:37', '2024-10-15 15:54:47', '1', '1', 0);
INSERT INTO `dict_value` VALUES (201, 2, 'operatorLogType', 'terminal:sftp-upload', '上传文件', '{}', 90, '2024-02-23 17:54:52', '2024-10-15 15:54:47', '1', '1', 0);
INSERT INTO `dict_value` VALUES (202, 2, 'operatorLogType', 'terminal:sftp-download', '下载文件', '{}', 100, '2024-02-23 17:55:03', '2024-10-15 15:54:47', '1', '1', 0);
INSERT INTO `dict_value` VALUES (214, 28, 'terminalConnectStatus', 'FORCE_OFFLINE', '强制下线', '{\"color\": \"rgb(var(--red-6))\"}', 40, '2024-03-04 12:51:13', '2024-10-15 11:59:01', '1', '1', 0);
INSERT INTO `dict_value` VALUES (215, 1, 'operatorLogModule', 'asset:terminal-connect-log', '终端连接日志', '{}', 2060, '2024-03-04 13:43:33', '2024-10-15 11:31:41', '1', '1', 0);
INSERT INTO `dict_value` VALUES (216, 2, 'operatorLogType', 'terminal-connect-log:delete', '删除终端连接日志', '{}', 10, '2024-03-04 13:44:34', '2024-10-15 11:36:08', '1', '1', 0);
INSERT INTO `dict_value` VALUES (217, 2, 'operatorLogType', 'terminal-connect-log:clear', '清空终端连接日志', '{}', 20, '2024-03-04 13:45:07', '2024-10-15 11:36:27', '1', '1', 0);
INSERT INTO `dict_value` VALUES (218, 2, 'operatorLogType', 'terminal-connect-log:force-offline', '强制下线', '{}', 30, '2024-03-04 13:45:36', '2024-10-15 11:35:15', '1', '1', 0);
INSERT INTO `dict_value` VALUES (222, 2, 'operatorLogType', 'terminal:delete-sftp-log', '删除文件操作日志', '{}', 15, '2024-03-05 15:28:00', '2024-10-15 15:54:47', '1', '1', 0);
INSERT INTO `dict_value` VALUES (223, 33, 'sftpOperatorType', 'terminal:sftp-mkdir', '创建文件夹', '{}', 10, '2024-03-05 16:50:17', '2024-10-15 15:54:47', '1', '1', 0);
INSERT INTO `dict_value` VALUES (224, 33, 'sftpOperatorType', 'terminal:sftp-touch', '创建文件', '{}', 20, '2024-03-05 16:50:27', '2024-10-15 15:54:47', '1', '1', 0);
INSERT INTO `dict_value` VALUES (225, 33, 'sftpOperatorType', 'terminal:sftp-move', '移动文件', '{}', 30, '2024-03-05 16:50:41', '2024-10-15 15:54:47', '1', '1', 0);
INSERT INTO `dict_value` VALUES (226, 33, 'sftpOperatorType', 'terminal:sftp-remove', '删除文件', '{}', 40, '2024-03-05 16:50:53', '2024-10-15 15:54:47', '1', '1', 0);
INSERT INTO `dict_value` VALUES (227, 33, 'sftpOperatorType', 'terminal:sftp-truncate', '截断文件', '{}', 50, '2024-03-05 16:51:04', '2024-10-15 15:54:47', '1', '1', 0);
INSERT INTO `dict_value` VALUES (228, 33, 'sftpOperatorType', 'terminal:sftp-chmod', '文件提权', '{}', 60, '2024-03-05 16:51:15', '2024-10-15 15:54:47', '1', '1', 0);
INSERT INTO `dict_value` VALUES (229, 33, 'sftpOperatorType', 'terminal:sftp-set-content', '修改文件内容', '{}', 70, '2024-03-05 16:51:30', '2024-10-15 15:54:47', '1', '1', 0);
INSERT INTO `dict_value` VALUES (230, 33, 'sftpOperatorType', 'terminal:sftp-upload', '上传文件', '{}', 80, '2024-03-05 16:52:06', '2024-10-15 15:54:47', '1', '1', 0);
INSERT INTO `dict_value` VALUES (231, 33, 'sftpOperatorType', 'terminal:sftp-download', '下载文件', '{}', 90, '2024-03-05 16:52:18', '2024-10-15 15:54:47', '1', '1', 0);
INSERT INTO `dict_value` VALUES (424, 1, 'operatorLogModule', 'infra:system-setting', '系统设置', '{}', 1070, '2024-10-09 19:28:58', '2024-10-09 19:28:58', '1', '1', 0);
INSERT INTO `dict_value` VALUES (425, 2, 'operatorLogType', 'system-setting:update', '更新系统设置', '{}', 10, '2024-10-09 19:30:17', '2024-10-09 19:30:43', '1', '1', 0);

-- 菜单表
DELETE FROM `system_menu` WHERE id IN (149, 151, 153, 154, 155, 159, 160, 195, 196, 265);
INSERT INTO `system_menu` VALUES (149, 148, '查询连接日志', 'asset:terminal-connect-log:management:query', 3, 10, 1, 1, 1, 0, NULL, NULL, NULL, '2023-12-26 22:53:08', '2024-10-15 11:28:08', '1', '1', 0);
INSERT INTO `system_menu` VALUES (151, 146, '连接终端', 'asset:terminal:access', 3, 10, 1, 1, 1, 0, NULL, NULL, NULL, '2023-12-27 18:56:33', '2024-10-15 15:52:13', '2', '2', 0);
INSERT INTO `system_menu` VALUES (153, 148, '删除连接日志', 'asset:terminal-connect-log:management:delete', 3, 20, 1, 1, 1, 0, NULL, NULL, NULL, '2024-03-04 13:39:46', '2024-10-15 11:28:08', '1', '1', 0);
INSERT INTO `system_menu` VALUES (154, 148, '清空连接日志', 'asset:terminal-connect-log:management:clear', 3, 30, 1, 1, 1, 0, NULL, NULL, NULL, '2024-03-04 13:40:05', '2024-10-15 11:28:08', '1', '1', 0);
INSERT INTO `system_menu` VALUES (155, 148, '强制断开连接', 'asset:terminal-connect-log:management:force-offline', 3, 40, 1, 1, 1, 0, NULL, NULL, NULL, '2024-03-04 13:41:02', '2024-10-15 11:28:08', '1', '1', 0);
INSERT INTO `system_menu` VALUES (159, 158, '查询文件操作日志', 'asset:terminal-sftp-log:management:query', 3, 10, 1, 1, 1, 0, NULL, NULL, NULL, '2024-03-05 15:31:02', '2024-04-12 14:49:18', '1', '1', 0);
INSERT INTO `system_menu` VALUES (160, 158, '删除文件操作日志', 'asset:terminal-sftp-log:management:delete', 3, 20, 1, 1, 1, 0, NULL, NULL, NULL, '2024-03-05 15:31:17', '2024-04-12 14:49:21', '1', '1', 0);
INSERT INTO `system_menu` VALUES (195, 194, '查询在线会话', 'asset:terminal-connect-session:management:query', 3, 10, 1, 1, 1, 0, NULL, NULL, NULL, '2024-05-07 11:13:16', '2024-10-15 11:28:11', '1', '1', 0);
INSERT INTO `system_menu` VALUES (196, 194, '强制断开连接', 'asset:terminal-connect-session:management:force-offline', 3, 20, 1, 1, 1, 0, NULL, NULL, NULL, '2024-05-07 11:13:37', '2024-10-15 11:28:11', '1', '1', 0);
INSERT INTO `system_menu` VALUES (265, 203, '更新系统设置', 'infra:system-setting:update', 3, 20, 1, 1, 1, 0, NULL, NULL, NULL, '2024-10-09 19:25:28', '2024-10-09 19:25:28', '1', '1', 0);

Released under the Apache 2.0 License.